commit 890abbcc8ae507b233db68bd78d5c17b114e100f Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed Mar 4 06:31:53 2026 +0000 Deploy to GitHub pages diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..ce7b1b1a --- /dev/null +++ b/404.html @@ -0,0 +1,249 @@ + + + + + + + + + + + + + Not Found | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+ +
+

Oops! The page you’re looking for doesn’t exist.

+

You may have mistyped the address or the page may have been moved.

+ Go to homepage +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..7845b750 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +pocketpy.dev \ No newline at end of file diff --git a/bindings-cpp/index.html b/bindings-cpp/index.html new file mode 100644 index 00000000..790d0b6d --- /dev/null +++ b/bindings-cpp/index.html @@ -0,0 +1,654 @@ + + + + + + + + + + + + + Write C++ Bindings | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Write C++ Bindings +

+
+ +

+ # + Quick Start +

+
+

pkpy provides a pybind11 compatible layer which allows users to do convenient bindings. +Header files are located in the include/pybind11 directory. Make sure you have added -Iinclude to your compiler flags.

+

To begin with, use py::scoped_interpreter guard{} to start the interpreter before using any Python objects. +Or explicitly call py::interpreter::initialize() and py::interpreter::finalize().

+ +

+ # + module +

+
+
+
#include <pybind11/pybind11.h>
+namespace py = pybind11;
+
+PYBIND11_EMBEDDED_MODULE(example, m) {
+    m.def("add", [](int a, int b) {
+        return a + b;
+    });
+
+    auto math = m.def_submodule("math");
+}
+
+ +

+ # + function +

+
+
+
int add(int a, int b) { return a + b; }
+
+int add(int a, int b, int c) { return a + b + c; }
+
+void register_function(py::module_& m)
+{
+    m.def("add", py::overload_cast<int, int>(&add));
+
+    // support function overload
+    m.def("add", py::overload_cast<int, int, int>(&add));
+
+    // bind with default arguments
+    m.def("sub", [](int a, int b) { 
+        return a - b; 
+    }, py::arg("a") = 1, py::arg("b") = 2);
+
+    // bind *args
+    m.def("add", [](py::args args) {
+        int sum = 0;
+        for (auto& arg : args) {
+            sum += arg.cast<int>();
+        }
+        return sum;
+    });
+
+    // bind **kwargs
+    m.def("add", [](py::kwargs kwargs) {
+        int sum = 0;
+        for (auto item : kwargs) {
+            sum += item.second.cast<int>();
+        }
+        return sum;
+    });
+}
+
+ +

+ # + class +

+
+
+
struct Point
+{
+    const int x;
+    int y;
+
+public:
+    Point() : x(0), y(0) {}
+
+    Point(int x, int y) : x(x), y(y) {}
+
+    Point(const Point& p) : x(p.x), y(p.y) {}
+
+    std::string stringfy() const { 
+        return "(" + std::to_string(x) + ", " + std::to_string(y) + ")"; 
+    }
+};
+
+struct Point3D : Point
+{
+private:
+    int z;
+
+public:
+    Point3D(int x, int y, int z) : Point(x, y), z(z) {}
+
+    int get_z() const { return z; }
+
+    void set_z(int z) { this->z = z; }
+};
+
+void bind_class(py::module_& m)
+{
+    py::class_<Point>(m, "Point")
+        .def(py::init<>())
+        .def(py::init<int, int>())
+        .def(py::init<const Point&>())
+        .def_readonly("x", &Point::x)
+        .def_readwrite("y", &Point::y)
+        .def("__str__", &Point::stringfy);
+
+    // only support single inheritance
+    py::class_<Point3D, Point>(m, "Point3D", py::dynamic_attr())
+        .def(py::init<int, int, int>())
+        .def_property("z", &Point3D::get_z, &Point3D::set_z);
+
+    // dynamic_attr will enable the dict of bound class
+}
+
+ +

+ # + operators +

+
+
+
#include <pybind11/operators.h>
+namespace py = pybind11;
+
+struct Int {
+    int value;
+
+    Int(int value) : value(value) {}
+
+    Int operator+(const Int& other) const {
+        return Int(value + other.value);
+    }
+
+    Int operator-(const Int& other) const {
+        return Int(value - other.value);
+    }
+
+    bool operator==(const Int& other) const {
+        return value == other.value;
+    }
+
+    bool operator!=(const Int& other) const {
+        return value != other.value;
+    }
+};
+
+void bind_operators(py::module_& m)
+{
+    py::class_<Int>(m, "Int")
+        .def(py::init<int>())
+        .def(py::self + py::self)
+        .def(py::self - py::self)
+        .def(py::self == py::self)
+        .def(py::self != py::self);
+        // other operators are similar
+}
+
+ +

+ # + py::object +

+
+

py::object is just simple wrapper around PyVar. It supports some convenient methods to interact with Python objects.

+

here are some common methods:

+
+
obj.attr("x"); // access attribute
+obj[1]; // access item
+
+obj.is_none(); // same as obj is None in Python
+obj.is(obj2); // same as obj is obj2 in Python
+
+// operators
+obj + obj2; // same as obj + obj2 in Python
+// ...
+obj == obj2; // same as obj == obj2 in Python
+// ...
+
+obj(...); // same as obj.__call__(...)
+
+py::cast(obj); // cast to Python object
+obj.cast<T>; // cast to C++ type
+
+py::type::of(obj); // get type of obj
+py::type::of<T>(); // get type of T, if T is registered
+
+

you can also create some builtin objects with their according wrappers:

+
+
py::bool_ b = {true};
+py::int_ i = {1};
+py::float_ f = {1.0};
+py::str s = {"hello"};
+py::list l = {1, 2, 3};
+py::tuple t = {1, 2, 3};
+// ...
+
+ +

+ # + More Examples +

+
+

More examples please see the test folder in the GSoC repository. All tested features are supported.

+ +

+ # + Limits and Comparison +

+
+

This is a feature list of pybind11 for pocketpy. It lists all completed and pending features. It also lists the features that cannot be implemented in the current version of pocketpy.

+ +

+ # + Function +

+
+
    +
  • Function overloading
  • +
  • Return value policy
  • +
  • is_prepend
  • +
  • *args and **kwargs
  • +
  • Keep-alive
  • +
  • Call Guard
  • +
  • Default arguments
  • +
  • Keyword-Only arguments
  • +
  • Positional-Only arguments
  • +
  • Allow/Prohibiting None arguments
  • +
+ +

+ # + Class +

+
+
    +
  • Creating bindings for a custom type
  • +
  • Binding lambda functions
  • +
  • Dynamic attributes
  • +
  • Inheritance and automatic downcasting
  • +
  • Enumerations and internal types
  • +
  • Instance and static fields
  • +
+
+

Binding static fields may never be implemented in pocketpy because it requires a metaclass, which is a heavy and infrequently used feature.

+
+ +

+ # + Exceptions +

+
+

Need further discussion.

+ +

+ # + Smart pointers +

+
+
    +
  • std::shared_ptr
  • +
  • std::unique_ptr
  • +
  • Custom smart pointers
  • +
+ +

+ # + Type conversions +

+
+
    +
  • Python built-in types
  • +
  • STL Containers
  • +
  • Functional
  • +
  • Chrono
  • +
+ +

+ # + Python C++ interface +

+
+

Need further discussion.

+
    +
  • object
  • +
  • none
  • +
  • type
  • +
  • bool_
  • +
  • int_
  • +
  • float_
  • +
  • str
  • +
  • bytes
  • +
  • bytearray
  • +
  • tuple
  • +
  • list
  • +
  • set
  • +
  • dict
  • +
  • slice
  • +
  • iterable
  • +
  • iterator
  • +
  • function
  • +
  • buffer
  • +
  • memoryview
  • +
  • capsule
  • +
+ +

+ # + Miscellaneous +

+
+
    +
  • Global Interpreter Lock (GIL)
  • +
  • Binding sequence data types, iterators, the slicing protocol, etc.
  • +
  • Convenient operators binding
  • +
+ +

+ # + Differences between CPython and pocketpy +

+
+
    +
  • only add, sub and mul have corresponding right versions in pocketpy. So if you bind int() >> py::self, it will has no effect in pocketpy.

    +
  • +
  • __new__ and __del__ are not supported in pocketpy.

    +
  • +
  • in-place operators, such as +=, -=, *=, etc., are not supported in pocketpy.

    +
  • +
  • the return value of globals is immutable in pocketpy.

    +
  • +
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/bindings/index.html b/bindings/index.html new file mode 100644 index 00000000..8e1c7b7b --- /dev/null +++ b/bindings/index.html @@ -0,0 +1,374 @@ + + + + + + + + + + + + + Write C Bindings | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Write C Bindings +

+
+

In order to use a C/C++ library in python, you need to write bindings for it.

+

pkpy uses an universal signature to wrap a C function pointer as a python function or method, i.e py_CFunction.

+
+
typedef bool (*py_CFunction)(int argc, py_Ref argv);
+
+
    +
  • argc is the number of arguments passed to the function.
  • +
  • argv is the pointer to the first argument.
  • +
+

If successful, the function should return true and set the return value in py_retval(). In case there is no return value, you should use py_newnone(py_retval()). +If an error occurs, the function should raise an exception and return false.

+ +

+ # + Steps +

+
+

Say you have a function add that takes two integers and returns their sum.

+
+
int add(int a, int b) {
+    return a + b;
+}
+
+

Here is how you can write the binding for it:

+
+
// 1. Define a wrapper function with the signature `py_CFunction`.
+bool py_add(int argc, py_Ref argv) {
+    // 2. Check the number of arguments.
+    PY_CHECK_ARGC(2);
+    // 3. Check the type of arguments.
+    PY_CHECK_ARG_TYPE(0, tp_int);
+    PY_CHECK_ARG_TYPE(1, tp_int);
+    // 4. Convert the arguments into C types.
+    int _0 = py_toint(py_arg(0));
+    int _1 = py_toint(py_arg(1));
+    // 5. Call the original function.
+    int res = add(_0, _1);
+    // 6. Set the return value.
+    py_newint(py_retval(), res);
+    // 7. Return `true`.
+    return true;
+}
+
+

Once you have the wrapper function, you can bind it to a python module via py_bindfunc.

+
+
py_GlobalRef mod = py_getmodule("__main__");
+py_bindfunc(mod, "add", py_add);
+
+

Alternatively, you can use py_bind with a signature, which allows you to specify some default values.

+
+
py_GlobalRef mod = py_getmodule("__main__");
+py_bind(mod, "add(a, b=1)", py_add);
+
+

See also:

+ + + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/c-api/functions/index.html b/c-api/functions/index.html new file mode 100644 index 00000000..17fce868 --- /dev/null +++ b/c-api/functions/index.html @@ -0,0 +1,3001 @@ + + + + + + + + + + + + + Functions | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Functions +

+
+ +

+ # + py_initialize +

+
+
+
/// Initialize pocketpy and the default VM.
+PK_API void py_initialize();
+
+ +

+ # + py_finalize +

+
+
+
/// Finalize pocketpy and free all VMs. This opearation is irreversible.
+/// After this call, you cannot use any function from this header anymore.
+PK_API void py_finalize();
+
+ +

+ # + py_currentvm +

+
+
+
/// Get the current VM index.
+PK_API int py_currentvm();
+
+ +

+ # + py_switchvm +

+
+
+
/// Switch to a VM.
+/// @param index index of the VM ranging from 0 to 16 (exclusive). `0` is the default VM.
+PK_API void py_switchvm(int index);
+
+ +

+ # + py_resetvm +

+
+
+
/// Reset the current VM.
+PK_API void py_resetvm();
+
+ +

+ # + py_resetallvm +

+
+
+
/// Reset All VMs.
+PK_API void py_resetallvm();
+
+ +

+ # + py_getvmctx +

+
+
+
/// Get the current VM context. This is used for user-defined data.
+PK_API void* py_getvmctx();
+
+ +

+ # + py_setvmctx +

+
+
+
/// Set the current VM context. This is used for user-defined data.
+PK_API void py_setvmctx(void* ctx);
+
+ +

+ # + py_callbacks +

+
+
+
/// Setup the callbacks for the current VM.
+PK_API py_Callbacks* py_callbacks();
+
+ +

+ # + py_appcallbacks +

+
+
+
/// Setup the application callbacks
+PK_API py_AppCallbacks* py_appcallbacks();
+
+ +

+ # + py_sys_setargv +

+
+
+
/// Set `sys.argv`. Used for storing command-line arguments.
+PK_API void py_sys_setargv(int argc, char** argv);
+
+ +

+ # + py_sys_settrace +

+
+
+
/// Set the trace function for the current VM.
+PK_API void py_sys_settrace(py_TraceFunc func, bool reset);
+
+ +

+ # + py_gc_collect +

+
+
+
/// Invoke the garbage collector.
+PK_API int py_gc_collect();
+
+ +

+ # + py_malloc +

+
+
+
/// Wrapper for `PK_MALLOC(size)`.
+PK_API void* py_malloc(size_t size);
+
+ +

+ # + py_realloc +

+
+
+
/// Wrapper for `PK_REALLOC(ptr, size)`.
+PK_API void* py_realloc(void* ptr, size_t size);
+
+ +

+ # + py_free +

+
+
+
/// Wrapper for `PK_FREE(ptr)`.
+PK_API void py_free(void* ptr);
+
+ +

+ # + py_True +

+
+
+
/// A shorthand for `True`.
+PK_API py_GlobalRef py_True();
+
+ +

+ # + py_False +

+
+
+
/// A shorthand for `False`.
+PK_API py_GlobalRef py_False();
+
+ +

+ # + py_None +

+
+
+
/// A shorthand for `None`.
+PK_API py_GlobalRef py_None();
+
+ +

+ # + py_NIL +

+
+
+
/// A shorthand for `nil`. `nil` is not a valid python object.
+PK_API py_GlobalRef py_NIL();
+
+ +

+ # + py_Frame_newglobals +

+
+
+
/// Python equivalent to `globals()` with respect to the given frame.
+PK_API void py_Frame_newglobals(py_Frame* frame, py_OutRef out);
+
+ +

+ # + py_Frame_newlocals +

+
+
+
/// Python equivalent to `locals()` with respect to the given frame.
+PK_API void py_Frame_newlocals(py_Frame* frame, py_OutRef out);
+
+ +

+ # + py_Frame_function +

+
+
+
/// Get the function object of the frame.
+/// Returns `NULL` if not available.
+PK_API py_StackRef py_Frame_function(py_Frame* frame);
+
+ +

+ # + py_compile + raise + + return + +

+
+
+
/// Compile a source string into a code object.
+/// Use python's `exec()` or `eval()` to execute it.
+PK_API bool py_compile(const char* source,
+                       const char* filename,
+                       enum py_CompileMode mode,
+                       bool is_dynamic);
+
+ +

+ # + py_compilefile + raise + +

+
+
+
/// Compile a `.py` file into a `.pyc` file.
+PK_API bool py_compilefile(const char* src_path,
+                           const char* dst_path);
+
+ +

+ # + py_execo + raise + + return + +

+
+
+
/// Run a compiled code object.
+PK_API bool py_execo(const void* data, int size, const char* filename, py_Ref module);
+
+ +

+ # + py_exec + raise + + return + +

+
+
+
/// Run a source string.
+/// @param source source string.
+/// @param filename filename (for error messages).
+/// @param mode compile mode. Use `EXEC_MODE` for statements `EVAL_MODE` for expressions.
+/// @param module target module. Use NULL for the main module.
+/// @return `true` if the execution is successful or `false` if an exception is raised.
+PK_API bool py_exec(const char* source,
+                    const char* filename,
+                    enum py_CompileMode mode,
+                    py_Ref module);
+
+ +

+ # + py_eval + raise + + return + +

+
+
+
/// Evaluate a source string. Equivalent to `py_exec(source, "<string>", EVAL_MODE, module)`.
+PK_API bool py_eval(const char* source, py_Ref module);
+
+ +

+ # + py_smartexec + raise + + return + +

+
+
+
/// Run a source string with smart interpretation.
+/// Example:
+/// `py_newstr(py_r0(), "abc");`
+/// `py_newint(py_r1(), 123);`
+/// `py_smartexec("print(_0, _1)", NULL, py_r0(), py_r1());`
+/// `// "abc 123" will be printed`.
+PK_API bool py_smartexec(const char* source, py_Ref module, ...);
+
+ +

+ # + py_smarteval + raise + + return + +

+
+
+
/// Evaluate a source string with smart interpretation.
+/// Example:
+/// `py_newstr(py_r0(), "abc");`
+/// `py_smarteval("len(_)", NULL, py_r0());`
+/// `int res = py_toint(py_retval());`
+/// `// res will be 3`.
+PK_API bool py_smarteval(const char* source, py_Ref module, ...);
+
+ +

+ # + py_newint +

+
+
+
/// Create an `int` object.
+PK_API void py_newint(py_OutRef, py_i64);
+
+ +

+ # + py_newtrivial +

+
+
+
/// Create a trivial value object.
+PK_API void py_newtrivial(py_OutRef out, py_Type type, void* data, int size);
+
+ +

+ # + py_newfloat +

+
+
+
/// Create a `float` object.
+PK_API void py_newfloat(py_OutRef, py_f64);
+
+ +

+ # + py_newbool +

+
+
+
/// Create a `bool` object.
+PK_API void py_newbool(py_OutRef, bool);
+
+ +

+ # + py_newstr +

+
+
+
/// Create a `str` object from a null-terminated string (utf-8).
+PK_API void py_newstr(py_OutRef, const char*);
+
+ +

+ # + py_newstrn +

+
+
+
/// Create a `str` object with `n` UNINITIALIZED bytes plus `'\0'`.
+PK_API char* py_newstrn(py_OutRef, int);
+
+ +

+ # + py_newstrv +

+
+
+
/// Create a `str` object from a `c11_sv`.
+PK_API void py_newstrv(py_OutRef, c11_sv);
+
+ +

+ # + py_newfstr +

+
+
+
/// Create a formatted `str` object.
+PK_API void py_newfstr(py_OutRef, const char*, ...);
+
+ +

+ # + py_newnone +

+
+
+
/// Create a `None` object.
+PK_API void py_newnone(py_OutRef);
+
+ +

+ # + py_newnotimplemented +

+
+
+
/// Create a `NotImplemented` object.
+PK_API void py_newnotimplemented(py_OutRef);
+
+ +

+ # + py_newellipsis +

+
+
+
/// Create a `...` object.
+PK_API void py_newellipsis(py_OutRef);
+
+ +

+ # + py_newnil +

+
+
+
/// Create a `nil` object. `nil` is an invalid representation of an object.
+/// Don't use it unless you know what you are doing.
+PK_API void py_newnil(py_OutRef);
+
+ +

+ # + py_newnativefunc +

+
+
+
/// Create a `nativefunc` object.
+PK_API void py_newnativefunc(py_OutRef, py_CFunction);
+
+ +

+ # + py_newfunction +

+
+
+
/// Create a `function` object.
+PK_API py_Name py_newfunction(py_OutRef out,
+                              const char* sig,
+                              py_CFunction f,
+                              const char* docstring,
+                              int slots);
+
+ +

+ # + py_newboundmethod +

+
+
+
/// Create a `boundmethod` object.
+PK_API void py_newboundmethod(py_OutRef out, py_Ref self, py_Ref func);
+
+ +

+ # + py_newobject +

+
+
+
/// Create a new object.
+/// @param out output reference.
+/// @param type type of the object.
+/// @param slots number of slots. Use `-1` to create a `__dict__`.
+/// @param udsize size of your userdata.
+/// @return pointer to the userdata.
+PK_API void* py_newobject(py_OutRef out, py_Type type, int slots, int udsize);
+
+ +

+ # + py_name +

+
+
+
/// Convert a null-terminated string to a name.
+PK_API py_Name py_name(const char*);
+
+ +

+ # + py_name2ref +

+
+
+
/// Convert a name to a python `str` object with cache.
+PK_API py_GlobalRef py_name2ref(py_Name);
+
+ +

+ # + py_namev +

+
+
+
/// Convert a `c11_sv` to a name.
+PK_API py_Name py_namev(c11_sv);
+
+ +

+ # + py_name2sv +

+
+
+
/// Convert a name to a `c11_sv`.
+PK_API c11_sv py_name2sv(py_Name);
+
+ +

+ # + py_bind +

+
+
+
/// Bind a function to the object via "decl-based" style.
+/// @param obj the target object.
+/// @param sig signature of the function. e.g. `add(x, y)`.
+/// @param f function to bind.
+PK_API void py_bind(py_Ref obj, const char* sig, py_CFunction f);
+
+ +

+ # + py_bindmethod +

+
+
+
/// Bind a method to type via "argc-based" style.
+/// @param type the target type.
+/// @param name name of the method.
+/// @param f function to bind.
+PK_API void py_bindmethod(py_Type type, const char* name, py_CFunction f);
+
+ +

+ # + py_bindstaticmethod +

+
+
+
/// Bind a static method to type via "argc-based" style.
+/// @param type the target type.
+/// @param name name of the method.
+/// @param f function to bind.
+PK_API void py_bindstaticmethod(py_Type type, const char* name, py_CFunction f);
+
+ +

+ # + py_bindfunc +

+
+
+
/// Bind a function to the object via "argc-based" style.
+/// @param obj the target object.
+/// @param name name of the function.
+/// @param f function to bind.
+PK_API void py_bindfunc(py_Ref obj, const char* name, py_CFunction f);
+
+ +

+ # + py_bindproperty +

+
+
+
/// Bind a property to type.
+/// @param type the target type.
+/// @param name name of the property.
+/// @param getter getter function.
+/// @param setter setter function. Use `NULL` if not needed.
+PK_API void py_bindproperty(py_Type type, const char* name, py_CFunction getter, py_CFunction setter);
+
+ +

+ # + py_bindmagic +

+
+
+
/// Bind a magic method to type.
+PK_API void py_bindmagic(py_Type type, py_Name name, py_CFunction f);
+
+ +

+ # + py_toint +

+
+
+
/// Convert an `int` object in python to `int64_t`.
+PK_API py_i64 py_toint(py_Ref);
+
+ +

+ # + py_totrivial +

+
+
+
/// Get the address of the trivial value object (16 bytes).
+PK_API void* py_totrivial(py_Ref);
+
+ +

+ # + py_tofloat +

+
+
+
/// Convert a `float` object in python to `double`.
+PK_API py_f64 py_tofloat(py_Ref);
+
+ +

+ # + py_castfloat + raise + +

+
+
+
/// Cast a `int` or `float` object in python to `double`.
+/// If successful, return true and set the value to `out`.
+/// Otherwise, return false and raise `TypeError`.
+PK_API bool py_castfloat(py_Ref, py_f64* out);
+
+ +

+ # + py_castfloat32 + raise + +

+
+
+
/// 32-bit version of `py_castfloat`.
+PK_API bool py_castfloat32(py_Ref, float* out);
+
+ +

+ # + py_castint + raise + +

+
+
+
/// Cast a `int` object in python to `int64_t`.
+PK_API bool py_castint(py_Ref, py_i64* out);
+
+ +

+ # + py_tobool +

+
+
+
/// Convert a `bool` object in python to `bool`.
+PK_API bool py_tobool(py_Ref);
+
+ +

+ # + py_totype +

+
+
+
/// Convert a `type` object in python to `py_Type`.
+PK_API py_Type py_totype(py_Ref);
+
+ +

+ # + py_touserdata +

+
+
+
/// Convert a user-defined object to its userdata.
+PK_API void* py_touserdata(py_Ref);
+
+ +

+ # + py_tosv +

+
+
+
/// Convert a `str` object in python to `c11_sv`.
+PK_API c11_sv py_tosv(py_Ref);
+
+ +

+ # + py_bytes_resize +

+
+
+
/// Resize a `bytes` object. It can only be resized down.
+PK_API void py_bytes_resize(py_Ref, int size);
+
+ +

+ # + py_newtype +

+
+
+
/// Create a new type.
+/// @param name name of the type.
+/// @param base base type.
+/// @param module module where the type is defined. Use `NULL` for built-in types.
+/// @param dtor destructor function. Use `NULL` if not needed.
+PK_API py_Type py_newtype(const char* name, py_Type base, const py_GlobalRef module, py_Dtor dtor);
+
+ +

+ # + py_istype +

+
+
+
/// Check if the object is exactly the given type.
+PK_API bool py_istype(py_Ref, py_Type);
+
+ +

+ # + py_typeof +

+
+
+
/// Get the type of the object.
+PK_API py_Type py_typeof(py_Ref self);
+
+ +

+ # + py_isinstance +

+
+
+
/// Check if the object is an instance of the given type.
+PK_API bool py_isinstance(py_Ref obj, py_Type type);
+
+ +

+ # + py_issubclass +

+
+
+
/// Check if the derived type is a subclass of the base type.
+PK_API bool py_issubclass(py_Type derived, py_Type base);
+
+ +

+ # + py_gettype +

+
+
+
/// Get type by module and name. e.g. `py_gettype("time", py_name("struct_time"))`.
+/// Return `0` if not found.
+PK_API py_Type py_gettype(const char* module, py_Name name);
+
+ +

+ # + py_checktype + raise + +

+
+
+
/// Check if the object is an instance of the given type exactly.
+/// Raise `TypeError` if the check fails.
+PK_API bool py_checktype(py_Ref self, py_Type type);
+
+ +

+ # + py_checkinstance + raise + +

+
+
+
/// Check if the object is an instance of the given type or its subclass.
+/// Raise `TypeError` if the check fails.
+PK_API bool py_checkinstance(py_Ref self, py_Type type);
+
+ +

+ # + py_tpfindmagic +

+
+
+
/// Search the magic method from the given type to the base type.
+/// Return `NULL` if not found.
+PK_API py_GlobalRef py_tpfindmagic(py_Type, py_Name name);
+
+ +

+ # + py_tpfindname +

+
+
+
/// Search the name from the given type to the base type.
+/// Return `NULL` if not found.
+PK_API py_ItemRef py_tpfindname(py_Type, py_Name name);
+
+ +

+ # + py_tpbase +

+
+
+
/// Get the base type of the given type.
+PK_API py_Type py_tpbase(py_Type type);
+
+ +

+ # + py_tpobject +

+
+
+
/// Get the type object of the given type.
+PK_API py_GlobalRef py_tpobject(py_Type type);
+
+ +

+ # + py_tpsetfinal +

+
+
+
/// Disable the type for subclassing.
+PK_API void py_tpsetfinal(py_Type type);
+
+ +

+ # + py_tphookattributes +

+
+
+
/// Set attribute hooks for the given type.
+PK_API void py_tphookattributes(py_Type type,
+                                bool (*getattribute)(py_Ref self, py_Name name) PY_RAISE PY_RETURN,
+                                bool (*setattribute)(py_Ref self, py_Name name, py_Ref val)
+                                    PY_RAISE PY_RETURN,
+                                bool (*delattribute)(py_Ref self, py_Name name) PY_RAISE,
+                                bool (*getunboundmethod)(py_Ref self, py_Name name) PY_RETURN);
+
+ +

+ # + py_inspect_currentfunction +

+
+
+
/// Get the current `function` object on the stack.
+/// Return `NULL` if not available.
+/// NOTE: This function should be placed at the beginning of your decl-based bindings.
+PK_API py_StackRef py_inspect_currentfunction();
+
+ +

+ # + py_inspect_currentmodule +

+
+
+
/// Get the current `module` object where the code is executed.
+/// Return `NULL` if not available.
+PK_API py_GlobalRef py_inspect_currentmodule();
+
+ +

+ # + py_inspect_currentframe +

+
+
+
/// Get the current frame object.
+/// Return `NULL` if not available.
+PK_API py_Frame* py_inspect_currentframe();
+
+ +

+ # + py_newglobals +

+
+
+
/// Python equivalent to `globals()`.
+PK_API void py_newglobals(py_OutRef);
+
+ +

+ # + py_newlocals +

+
+
+
/// Python equivalent to `locals()`.
+PK_API void py_newlocals(py_OutRef);
+
+ +

+ # + py_getreg +

+
+
+
/// Get the i-th register.
+/// All registers are located in a contiguous memory.
+PK_API py_GlobalRef py_getreg(int i);
+
+ +

+ # + py_setreg +

+
+
+
/// Set the i-th register.
+PK_API void py_setreg(int i, py_Ref val);
+
+ +

+ # + py_retval +

+
+
+
/// Get the last return value.
+/// Please note that `py_retval()` cannot be used as input argument.
+PK_API py_GlobalRef py_retval();
+
+ +

+ # + py_getdict +

+
+
+
/// Get an item from the object's `__dict__`.
+/// Return `NULL` if not found.
+PK_API py_ItemRef py_getdict(py_Ref self, py_Name name);
+
+ +

+ # + py_setdict +

+
+
+
/// Set an item to the object's `__dict__`.
+PK_API void py_setdict(py_Ref self, py_Name name, py_Ref val);
+
+ +

+ # + py_deldict +

+
+
+
/// Delete an item from the object's `__dict__`.
+/// Return `true` if the deletion is successful.
+PK_API bool py_deldict(py_Ref self, py_Name name);
+
+ +

+ # + py_emplacedict +

+
+
+
/// Prepare an insertion to the object's `__dict__`.
+PK_API py_ItemRef py_emplacedict(py_Ref self, py_Name name);
+
+ +

+ # + py_applydict + raise + +

+
+
+
/// Apply a function to all items in the object's `__dict__`.
+/// Return `true` if the function is successful for all items.
+/// NOTE: Be careful if `f` modifies the object's `__dict__`.
+PK_API bool py_applydict(py_Ref self, bool (*f)(py_Name name, py_Ref val, void* ctx), void* ctx);
+
+ +

+ # + py_cleardict +

+
+
+
/// Clear the object's `__dict__`. This function is dangerous.
+PK_API void py_cleardict(py_Ref self);
+
+ +

+ # + py_getslot +

+
+
+
/// Get the i-th slot of the object.
+/// The object must have slots and `i` must be in valid range.
+PK_API py_ObjectRef py_getslot(py_Ref self, int i);
+
+ +

+ # + py_setslot +

+
+
+
/// Set the i-th slot of the object.
+PK_API void py_setslot(py_Ref self, int i, py_Ref val);
+
+ +

+ # + py_getbuiltin +

+
+
+
/// Get variable in the `builtins` module.
+PK_API py_ItemRef py_getbuiltin(py_Name name);
+
+ +

+ # + py_getglobal +

+
+
+
/// Get variable in the `__main__` module.
+PK_API py_ItemRef py_getglobal(py_Name name);
+
+ +

+ # + py_setglobal +

+
+
+
/// Set variable in the `__main__` module.
+PK_API void py_setglobal(py_Name name, py_Ref val);
+
+ +

+ # + py_peek +

+
+
+
/// Get the i-th object from the top of the stack.
+/// `i` should be negative, e.g. (-1) means TOS.
+PK_API py_StackRef py_peek(int i);
+
+ +

+ # + py_push +

+
+
+
/// Push the object to the stack.
+PK_API void py_push(py_Ref src);
+
+ +

+ # + py_pushnil +

+
+
+
/// Push a `nil` object to the stack.
+PK_API void py_pushnil();
+
+ +

+ # + py_pushnone +

+
+
+
/// Push a `None` object to the stack.
+PK_API void py_pushnone();
+
+ +

+ # + py_pushname +

+
+
+
/// Push a `py_Name` to the stack. This is used for keyword arguments.
+PK_API void py_pushname(py_Name name);
+
+ +

+ # + py_pop +

+
+
+
/// Pop an object from the stack.
+PK_API void py_pop();
+
+ +

+ # + py_shrink +

+
+
+
/// Shrink the stack by n.
+PK_API void py_shrink(int n);
+
+ +

+ # + py_pushtmp +

+
+
+
/// Get a temporary variable from the stack.
+PK_API py_StackRef py_pushtmp();
+
+ +

+ # + py_pushmethod +

+
+
+
/// Get the unbound method of the object.
+/// Assume the object is located at the top of the stack.
+/// If return true:  `[self] -> [unbound, self]`.
+/// If return false: `[self] -> [self]` (no change).
+PK_API bool py_pushmethod(py_Name name);
+
+ +

+ # + py_pusheval + raise + +

+
+
+
/// Evaluate an expression and push the result to the stack.
+/// This function is used for testing.
+PK_API bool py_pusheval(const char* expr, py_GlobalRef module);
+
+ +

+ # + py_vectorcall + raise + + return + +

+
+
+
/// Call a callable object via pocketpy's calling convention.
+/// You need to prepare the stack using the following format:
+/// `callable, self/nil, arg1, arg2, ..., k1, v1, k2, v2, ...`.
+/// `argc` is the number of positional arguments excluding `self`.
+/// `kwargc` is the number of keyword arguments.
+/// The result will be set to `py_retval()`.
+/// The stack size will be reduced by `2 + argc + kwargc * 2`.
+PK_API bool py_vectorcall(uint16_t argc, uint16_t kwargc);
+
+ +

+ # + py_call + raise + + return + +

+
+
+
/// Call a function.
+/// It prepares the stack and then performs a `vectorcall(argc, 0, false)`.
+/// The result will be set to `py_retval()`.
+/// The stack remains unchanged if successful.
+PK_API bool py_call(py_Ref f, int argc, py_Ref argv);
+
+ +

+ # + py_tpcall + raise + + return + +

+
+
+
/// Call a type to create a new instance.
+PK_API bool py_tpcall(py_Type type, int argc, py_Ref argv);
+
+ +

+ # + py_callcfunc + raise + + return + +

+
+
+
/// Call a `py_CFunction` in a safe way.
+/// This function does extra checks to help you debug `py_CFunction`.
+PK_API bool py_callcfunc(py_CFunction f, int argc, py_Ref argv);
+
+ +

+ # + py_binaryop + raise + + return + +

+
+
+
/// Perform a binary operation.
+/// The result will be set to `py_retval()`.
+/// The stack remains unchanged after the operation.
+PK_API bool py_binaryop(py_Ref lhs, py_Ref rhs, py_Name op, py_Name rop);
+
+ +

+ # + py_binaryadd + raise + + return + +

+
+
+
/// lhs + rhs
+PK_API bool py_binaryadd(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binarysub + raise + + return + +

+
+
+
/// lhs - rhs
+PK_API bool py_binarysub(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binarymul + raise + + return + +

+
+
+
/// lhs * rhs
+PK_API bool py_binarymul(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binarytruediv + raise + + return + +

+
+
+
/// lhs / rhs
+PK_API bool py_binarytruediv(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binaryfloordiv + raise + + return + +

+
+
+
/// lhs // rhs
+PK_API bool py_binaryfloordiv(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binarymod + raise + + return + +

+
+
+
/// lhs % rhs
+PK_API bool py_binarymod(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binarypow + raise + + return + +

+
+
+
/// lhs ** rhs
+PK_API bool py_binarypow(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binarylshift + raise + + return + +

+
+
+
/// lhs << rhs
+PK_API bool py_binarylshift(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binaryrshift + raise + + return + +

+
+
+
/// lhs >> rhs
+PK_API bool py_binaryrshift(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binaryand + raise + + return + +

+
+
+
/// lhs & rhs
+PK_API bool py_binaryand(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binaryor + raise + + return + +

+
+
+
/// lhs | rhs
+PK_API bool py_binaryor(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binaryxor + raise + + return + +

+
+
+
/// lhs ^ rhs
+PK_API bool py_binaryxor(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_binarymatmul + raise + + return + +

+
+
+
/// lhs @ rhs
+PK_API bool py_binarymatmul(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_eq + raise + + return + +

+
+
+
/// lhs == rhs
+PK_API bool py_eq(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_ne + raise + + return + +

+
+
+
/// lhs != rhs
+PK_API bool py_ne(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_lt + raise + + return + +

+
+
+
/// lhs < rhs
+PK_API bool py_lt(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_le + raise + + return + +

+
+
+
/// lhs <= rhs
+PK_API bool py_le(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_gt + raise + + return + +

+
+
+
/// lhs > rhs
+PK_API bool py_gt(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_ge + raise + + return + +

+
+
+
/// lhs >= rhs
+PK_API bool py_ge(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_isidentical +

+
+
+
/// Python equivalent to `lhs is rhs`.
+PK_API bool py_isidentical(py_Ref, py_Ref);
+
+ +

+ # + py_bool + raise + +

+
+
+
/// Python equivalent to `bool(val)`.
+/// 1: true, 0: false, -1: error
+PK_API int py_bool(py_Ref val);
+
+ +

+ # + py_equal + raise + +

+
+
+
/// Compare two objects.
+/// 1: lhs == rhs, 0: lhs != rhs, -1: error
+PK_API int py_equal(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_less + raise + +

+
+
+
/// Compare two objects.
+/// 1: lhs < rhs, 0: lhs >= rhs, -1: error
+PK_API int py_less(py_Ref lhs, py_Ref rhs);
+
+ +

+ # + py_callable +

+
+
+
/// Python equivalent to `callable(val)`.
+PK_API bool py_callable(py_Ref val);
+
+ +

+ # + py_hash + raise + +

+
+
+
/// Get the hash value of the object.
+PK_API bool py_hash(py_Ref, py_i64* out);
+
+ +

+ # + py_iter + raise + + return + +

+
+
+
/// Get the iterator of the object.
+PK_API bool py_iter(py_Ref);
+
+ +

+ # + py_next + raise + + return + +

+
+
+
/// Get the next element from the iterator.
+/// 1: success, 0: StopIteration, -1: error
+PK_API int py_next(py_Ref);
+
+ +

+ # + py_str + raise + + return + +

+
+
+
/// Python equivalent to `str(val)`.
+PK_API bool py_str(py_Ref val);
+
+ +

+ # + py_repr + raise + + return + +

+
+
+
/// Python equivalent to `repr(val)`.
+PK_API bool py_repr(py_Ref val);
+
+ +

+ # + py_len + raise + + return + +

+
+
+
/// Python equivalent to `len(val)`.
+PK_API bool py_len(py_Ref val);
+
+ +

+ # + py_getattr + raise + + return + +

+
+
+
/// Python equivalent to `getattr(self, name)`.
+PK_API bool py_getattr(py_Ref self, py_Name name);
+
+ +

+ # + py_setattr + raise + +

+
+
+
/// Python equivalent to `setattr(self, name, val)`.
+PK_API bool py_setattr(py_Ref self, py_Name name, py_Ref val);
+
+ +

+ # + py_delattr + raise + +

+
+
+
/// Python equivalent to `delattr(self, name)`.
+PK_API bool py_delattr(py_Ref self, py_Name name);
+
+ +

+ # + py_getitem + raise + + return + +

+
+
+
/// Python equivalent to `self[key]`.
+PK_API bool py_getitem(py_Ref self, py_Ref key);
+
+ +

+ # + py_setitem + raise + +

+
+
+
/// Python equivalent to `self[key] = val`.
+PK_API bool py_setitem(py_Ref self, py_Ref key, py_Ref val);
+
+ +

+ # + py_delitem + raise + +

+
+
+
/// Python equivalent to `del self[key]`.
+PK_API bool py_delitem(py_Ref self, py_Ref key);
+
+ +

+ # + py_getmodule +

+
+
+
/// Get a module by path.
+PK_API py_GlobalRef py_getmodule(const char* path);
+
+ +

+ # + py_newmodule +

+
+
+
/// Create a new module.
+PK_API py_GlobalRef py_newmodule(const char* path);
+
+ +

+ # + py_importlib_reload + raise + + return + +

+
+
+
/// Reload an existing module.
+PK_API bool py_importlib_reload(py_Ref module);
+
+ +

+ # + py_import + raise + + return + +

+
+
+
/// Import a module.
+/// The result will be set to `py_retval()`.
+/// -1: error, 0: not found, 1: success
+PK_API int py_import(const char* path);
+
+ +

+ # + py_checkexc +

+
+
+
/// Check if there is an unhandled exception.
+PK_API bool py_checkexc();
+
+ +

+ # + py_matchexc + return + +

+
+
+
/// Check if the unhandled exception is an instance of the given type.
+/// If match, the exception will be stored in `py_retval()`.
+PK_API bool py_matchexc(py_Type type);
+
+ +

+ # + py_clearexc +

+
+
+
/// Clear the unhandled exception.
+/// @param p0 the unwinding point. Use `NULL` if not needed.
+PK_API void py_clearexc(py_StackRef p0);
+
+ +

+ # + py_printexc +

+
+
+
/// Print the unhandled exception.
+PK_API void py_printexc();
+
+ +

+ # + py_formatexc +

+
+
+
/// Format the unhandled exception and return a null-terminated string.
+/// The returned string should be freed by the caller.
+PK_API char* py_formatexc();
+
+ +

+ # + py_exception + raise + +

+
+
+
/// Raise an exception by type and message. Always return false.
+PK_API bool py_exception(py_Type type, const char* fmt, ...);
+
+ +

+ # + py_raise + raise + +

+
+
+
/// Raise an exception object. Always return false.
+PK_API bool py_raise(py_Ref);
+
+ +

+ # + KeyError + raise + +

+
+
+

+PK_API bool KeyError(py_Ref key);
+
+ +

+ # + StopIteration + raise + +

+
+
+

+PK_API bool StopIteration();
+
+ +

+ # + py_debugger_waitforattach +

+
+
+

+PK_API void py_debugger_waitforattach(const char* hostname, unsigned short port);
+
+ +

+ # + py_debugger_status +

+
+
+

+PK_API int py_debugger_status();
+
+ +

+ # + py_debugger_exceptionbreakpoint +

+
+
+

+PK_API void py_debugger_exceptionbreakpoint(py_Ref exc);
+
+ +

+ # + py_debugger_exit +

+
+
+

+PK_API void py_debugger_exit(int code);
+
+ +

+ # + py_newtuple +

+
+
+
/// Create a `tuple` with `n` UNINITIALIZED elements.
+/// You should initialize all elements before using it.
+PK_API py_ObjectRef py_newtuple(py_OutRef, int n);
+
+ +

+ # + py_tuple_data +

+
+
+

+PK_API py_ObjectRef py_tuple_data(py_Ref self);
+
+ +

+ # + py_tuple_getitem +

+
+
+

+PK_API py_ObjectRef py_tuple_getitem(py_Ref self, int i);
+
+ +

+ # + py_tuple_setitem +

+
+
+

+PK_API void py_tuple_setitem(py_Ref self, int i, py_Ref val);
+
+ +

+ # + py_tuple_len +

+
+
+

+PK_API int py_tuple_len(py_Ref self);
+
+ +

+ # + py_newlist +

+
+
+
/// Create an empty `list`.
+PK_API void py_newlist(py_OutRef);
+
+ +

+ # + py_newlistn +

+
+
+
/// Create a `list` with `n` UNINITIALIZED elements.
+/// You should initialize all elements before using it.
+PK_API void py_newlistn(py_OutRef, int n);
+
+ +

+ # + py_list_data +

+
+
+

+PK_API py_ItemRef py_list_data(py_Ref self);
+
+ +

+ # + py_list_getitem +

+
+
+

+PK_API py_ItemRef py_list_getitem(py_Ref self, int i);
+
+ +

+ # + py_list_setitem +

+
+
+

+PK_API void py_list_setitem(py_Ref self, int i, py_Ref val);
+
+ +

+ # + py_list_delitem +

+
+
+

+PK_API void py_list_delitem(py_Ref self, int i);
+
+ +

+ # + py_list_len +

+
+
+

+PK_API int py_list_len(py_Ref self);
+
+ +

+ # + py_list_swap +

+
+
+

+PK_API void py_list_swap(py_Ref self, int i, int j);
+
+ +

+ # + py_list_append +

+
+
+

+PK_API void py_list_append(py_Ref self, py_Ref val);
+
+ +

+ # + py_list_emplace +

+
+
+

+PK_API py_ItemRef py_list_emplace(py_Ref self);
+
+ +

+ # + py_list_clear +

+
+
+

+PK_API void py_list_clear(py_Ref self);
+
+ +

+ # + py_list_insert +

+
+
+

+PK_API void py_list_insert(py_Ref self, int i, py_Ref val);
+
+ +

+ # + py_newdict +

+
+
+
/// Create an empty `dict`.
+PK_API void py_newdict(py_OutRef);
+
+ +

+ # + py_dict_getitem + raise + + return + +

+
+
+
/// -1: error, 0: not found, 1: found
+PK_API int py_dict_getitem(py_Ref self, py_Ref key);
+
+ +

+ # + py_dict_setitem + raise + +

+
+
+
/// true: success, false: error
+PK_API bool py_dict_setitem(py_Ref self, py_Ref key, py_Ref val);
+
+ +

+ # + py_dict_delitem + raise + +

+
+
+
/// -1: error, 0: not found, 1: found (and deleted)
+PK_API int py_dict_delitem(py_Ref self, py_Ref key);
+
+ +

+ # + py_dict_getitem_by_str + raise + + return + +

+
+
+
/// -1: error, 0: not found, 1: found
+PK_API int py_dict_getitem_by_str(py_Ref self, const char* key);
+
+ +

+ # + py_dict_getitem_by_int + raise + + return + +

+
+
+
/// -1: error, 0: not found, 1: found
+PK_API int py_dict_getitem_by_int(py_Ref self, py_i64 key);
+
+ +

+ # + py_dict_setitem_by_str + raise + +

+
+
+
/// true: success, false: error
+PK_API bool py_dict_setitem_by_str(py_Ref self, const char* key, py_Ref val);
+
+ +

+ # + py_dict_setitem_by_int + raise + +

+
+
+
/// true: success, false: error
+PK_API bool py_dict_setitem_by_int(py_Ref self, py_i64 key, py_Ref val);
+
+ +

+ # + py_dict_delitem_by_str + raise + +

+
+
+
/// -1: error, 0: not found, 1: found (and deleted)
+PK_API int py_dict_delitem_by_str(py_Ref self, const char* key);
+
+ +

+ # + py_dict_delitem_by_int + raise + +

+
+
+
/// -1: error, 0: not found, 1: found (and deleted)
+PK_API int py_dict_delitem_by_int(py_Ref self, py_i64 key);
+
+ +

+ # + py_dict_apply + raise + +

+
+
+
/// true: success, false: error
+PK_API bool py_dict_apply(py_Ref self, bool (*f)(py_Ref key, py_Ref val, void* ctx), void* ctx);
+
+ +

+ # + py_dict_len +

+
+
+
/// noexcept
+PK_API int py_dict_len(py_Ref self);
+
+ +

+ # + py_newslice +

+
+
+
/// Create an UNINITIALIZED `slice` object.
+/// You should use `py_setslot()` to set `start`, `stop`, and `step`.
+PK_API py_ObjectRef py_newslice(py_OutRef);
+
+ +

+ # + py_newsliceint +

+
+
+
/// Create a `slice` object from 3 integers.
+PK_API void py_newsliceint(py_OutRef out, py_i64 start, py_i64 stop, py_i64 step);
+
+ +

+ # + py_newRandom +

+
+
+

+PK_API void py_newRandom(py_OutRef out);
+
+ +

+ # + py_Random_seed +

+
+
+

+PK_API void py_Random_seed(py_Ref self, py_i64 seed);
+
+ +

+ # + py_Random_random +

+
+
+

+PK_API py_f64 py_Random_random(py_Ref self);
+
+ +

+ # + py_Random_uniform +

+
+
+

+PK_API py_f64 py_Random_uniform(py_Ref self, py_f64 a, py_f64 b);
+
+ +

+ # + py_Random_randint +

+
+
+

+PK_API py_i64 py_Random_randint(py_Ref self, py_i64 a, py_i64 b);
+
+ +

+ # + py_newarray2d +

+
+
+

+PK_API void py_newarray2d(py_OutRef out, int width, int height);
+
+ +

+ # + py_array2d_getwidth +

+
+
+

+PK_API int py_array2d_getwidth(py_Ref self);
+
+ +

+ # + py_array2d_getheight +

+
+
+

+PK_API int py_array2d_getheight(py_Ref self);
+
+ +

+ # + py_array2d_getitem +

+
+
+

+PK_API py_ObjectRef py_array2d_getitem(py_Ref self, int x, int y);
+
+ +

+ # + py_array2d_setitem +

+
+
+

+PK_API void py_array2d_setitem(py_Ref self, int x, int y, py_Ref val);
+
+ +

+ # + py_newvec2 +

+
+
+

+PK_API void py_newvec2(py_OutRef out, c11_vec2);
+
+ +

+ # + py_newvec3 +

+
+
+

+PK_API void py_newvec3(py_OutRef out, c11_vec3);
+
+ +

+ # + py_newvec2i +

+
+
+

+PK_API void py_newvec2i(py_OutRef out, c11_vec2i);
+
+ +

+ # + py_newvec3i +

+
+
+

+PK_API void py_newvec3i(py_OutRef out, c11_vec3i);
+
+ +

+ # + py_newvec4i +

+
+
+

+PK_API void py_newvec4i(py_OutRef out, c11_vec4i);
+
+ +

+ # + py_newcolor32 +

+
+
+

+PK_API void py_newcolor32(py_OutRef out, c11_color32);
+
+ +

+ # + py_newmat3x3 +

+
+
+

+PK_API c11_mat3x3* py_newmat3x3(py_OutRef out);
+
+ +

+ # + py_tovec2 +

+
+
+

+PK_API c11_vec2 py_tovec2(py_Ref self);
+
+ +

+ # + py_tovec3 +

+
+
+

+PK_API c11_vec3 py_tovec3(py_Ref self);
+
+ +

+ # + py_tovec2i +

+
+
+

+PK_API c11_vec2i py_tovec2i(py_Ref self);
+
+ +

+ # + py_tovec3i +

+
+
+

+PK_API c11_vec3i py_tovec3i(py_Ref self);
+
+ +

+ # + py_tovec4i +

+
+
+

+PK_API c11_vec4i py_tovec4i(py_Ref self);
+
+ +

+ # + py_tomat3x3 +

+
+
+

+PK_API c11_mat3x3* py_tomat3x3(py_Ref self);
+
+ +

+ # + py_tocolor32 +

+
+
+

+PK_API c11_color32 py_tocolor32(py_Ref self);
+
+ +

+ # + py_json_dumps + raise + + return + +

+
+
+
/// Python equivalent to `json.dumps(val)`.
+PK_API bool py_json_dumps(py_Ref val, int indent);
+
+ +

+ # + py_json_loads + raise + + return + +

+
+
+
/// Python equivalent to `json.loads(val)`.
+PK_API bool py_json_loads(const char* source);
+
+ +

+ # + py_pickle_dumps + raise + + return + +

+
+
+
/// Python equivalent to `pickle.dumps(val)`.
+PK_API bool py_pickle_dumps(py_Ref val);
+
+ +

+ # + py_pickle_loads + raise + + return + +

+
+
+
/// Python equivalent to `pickle.loads(val)`.
+PK_API bool py_pickle_loads(const unsigned char* data, int size);
+
+ +

+ # + py_watchdog_begin +

+
+
+
/// Begin the watchdog with `timeout` in milliseconds.
+/// `PK_ENABLE_WATCHDOG` must be defined to `1` to use this feature.
+/// You need to call `py_watchdog_end()` later.
+/// If `timeout` is reached, `TimeoutError` will be raised.
+PK_API void py_watchdog_begin(py_i64 timeout);
+
+ +

+ # + py_watchdog_end +

+
+
+
/// Reset the watchdog.
+PK_API void py_watchdog_end();
+
+ +

+ # + py_profiler_begin +

+
+
+

+PK_API void py_profiler_begin();
+
+ +

+ # + py_profiler_end +

+
+
+

+PK_API void py_profiler_end();
+
+ +

+ # + py_profiler_reset +

+
+
+

+PK_API void py_profiler_reset();
+
+ +

+ # + py_profiler_report +

+
+
+

+PK_API char* py_profiler_report();
+
+ +

+ # + py_replinput +

+
+
+
/// An utility function to read a line from stdin for REPL.
+PK_API int py_replinput(char* buf, int max_size);
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/c-api/introduction/index.html b/c-api/introduction/index.html new file mode 100644 index 00000000..784ffb18 --- /dev/null +++ b/c-api/introduction/index.html @@ -0,0 +1,416 @@ + + + + + + + + + + + + + Introduction | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Introduction +

+
+

All public functions in the C API are prefixed with py_ in pocketpy.h.

+ +

+ # + Overview +

+
+

pocketpy works with opaque references. py_Ref is used to reference objects in the virtual machine. It is your responsibility to ensure a reference is valid before using it. See following reference types:

+
+
/// A generic reference to a python object.
+typedef py_TValue* py_Ref;
+/// A reference which has the same lifespan as the python object.
+typedef py_TValue* py_ObjectRef;
+/// A global reference which has the same lifespan as the VM.
+typedef py_TValue* py_GlobalRef;
+/// A specific location in the value stack of the VM.
+typedef py_TValue* py_StackRef;
+/// An item reference to a container object. It invalidates when the container is modified.
+typedef py_TValue* py_ItemRef;
+/// An output reference for returning a value.
+typedef py_TValue* py_OutRef;
+
+

You can store python objects into "stack" or "register". +We provide 8 registers and you can get references to them by py_reg(). +Also, py_retval() is a special register that is used to store the return value of a py_CFunction. +Registers are shared so they could be overwritten easily. +If you want to store python objects across function calls, you should store them into the stack via py_push() and py_pop().

+ +

+ # + Data Types +

+
+

You can do conversions between C types and python objects using the following functions:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
C typePython typeC to PythonPython to C
char,short,int,longintpy_newint()py_toint()
float,doublefloatpy_newfloat()py_tofloat(), py_castfloat()
boolboolpy_newbool()py_tobool()
const char*strpy_newstr()py_tostr()
void*,intptr_tintpy_newint()(void*)py_toint()
+
+
+ +

+ # + PY_RAISE macro +

+
+

Mark a function that can raise an exception on failure.

+
    +
  • If the function returns bool, then false means an exception is raised.
  • +
  • If the function returns int, then -1 means an exception is raised.
  • +
+ +

+ # + PY_RETURN macro +

+
+

Mark a function that can store a value in py_retval() on success.

+ +

+ # + PY_MAYBENULL macro +

+
+

Mark a variable or callback function that may be NULL.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/coding-style-guide/index.html b/coding-style-guide/index.html new file mode 100644 index 00000000..c067593d --- /dev/null +++ b/coding-style-guide/index.html @@ -0,0 +1,564 @@ + + + + + + + + + + + + + Coding Style Guide | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Coding Style Guide +

+
+ +

+ # + Indentation +

+
+

Use four spaces for indentation. Do not use TAB.

+ +

+ # + Strings +

+
+
+
# Prefer single quotes for strings
+s = 'this is a string'
+
+# Use double quotes only if the string itself contains a single quote
+s = "this ' is single quote"
+
+ +

+ # + Docstrings +

+
+

Always use triple quotes for docstrings.

+
+
def f():
+    """This is a multi-line docstring.
+
+    Here is some content. Docstrings partially support Markdown.
+    """
+
+def g():
+    """This is a single-line docstring."""
+
+

Use natural language to describe the function's purpose. Do not enumerate each parameter and return value.

+
+
# Correct
+def add(a: int, b: int):
+    """Add two integers `a` and `b`."""
+
+# Incorrect
+def add(a: int, b: int):
+    """
+    @param a, the first argument
+    @param b, the second argument
+    @return, the result of a + b
+    """
+
+ +

+ # + Spaces +

+
+
+
# Add a space after `,` or `:`
+a, b = 1, 2
+c = [1, 2, 3]
+d = {'key': 'value'}
+
+# Spaces may be added around operators
+res = 1 + 2
+if res < 2: pass
+# Spaces can also be selectively added to indicate operator precedence
+x = x * 2 - 1
+hypot2 = x * x + y * y
+c = (a + b) * (a - b)
+
+# Add a space after `:` in type annotations
+def f(a: int, b: float): ...
+def g() -> int: ...
+
+# Add spaces around `=` when specifying default values in function parameters
+def f(a: int = 1, b: int | None = None): ...
+# However, omit spaces if the parameter has no type annotation
+def f(a=1, b=2): pass
+
+# Do not add spaces in keyword arguments when calling functions
+print(1, 2, 3, end='', sep=',')
+f(a=10, b=20)
+
+ +

+ # + Naming Conventions +

+
+
    +
  • Classes: CapitalizedWords
  • +
  • Functions and variables: lower_case_with_underscores
  • +
  • Constants and enums: UPPER_CASE_WITH_UNDERSCORES or CapitalizedWords
  • +
  • Anonymous ordered variables: _0, _1, _2
  • +
  • Discarded variables: _
  • +
  • Some standard library functions: lowercase
  • +
+

Here are some commonly used naming conventions:

+
    +
  • self: The first parameter of an instance method
  • +
  • cls: The first parameter of class methods and __new__
  • +
+ +

+ # + Using Abbreviations +

+
+

Use abbreviations only for temporary variables and internal implementations.

+

Abbreviations should be well-established, include key syllables of the original word, and be immediately recognizable.

+
    +
  • context -> ctx (✔)
  • +
  • temporary -> tmp (✔)
  • +
  • distribution -> dist (✔)
  • +
  • visited -> vis ()
  • +
+
+
# Incorrect: Using abbreviations in public function parameters
+def some_pub_fn(ctx, req_id, data):
+    pass
+
+# Correct
+def some_public_function(context, request_id, data):
+    pass
+
+ +

+ # + Using Precise Terminology +

+
+

Naming should convey precise meanings, especially when multiple synonyms exist.

+

For example, count, size, and length all relate to quantity, but they have different nuances:

+
    +
  • count: Represents a counted value
  • +
  • length: Represents the number of elements in a container
  • +
  • size: Represents the byte size of an object
  • +
+
+
s = 'aaabc⭐'
+count = s.count('a')
+length = len(s)
+size = len(s.encode())
+
+print(f"{s!r} has a length of {length}, a size of {size} bytes, and contains {count} occurrences of 'a'")
+# 'aaabc⭐' has a length of 6, a size of 8 bytes, and contains 3 occurrences of 'a'
+
+ +

+ # + Using Professional Terminology +

+
+
    +
  • For item quantities in a game: quantity is better than item_count
  • +
  • For grid counts: area (meaning surface area) is better than grid_count
  • +
+ +

+ # + Avoiding Built-in Names +

+
+
+
# Incorrect: Overwriting `builtins.map`
+map = [[1, 2, 3], [4, 5, 6]]
+# Incorrect: Overwriting `builtins.type`
+type = some_thing.type
+
+ +

+ # + Internal Functions and Classes +

+
+

Use a single underscore _ as a prefix for internal functions. Never use a double underscore __ (except for magic methods).

+
+
def _internal_func():
+    """This is an internal function."""
+
+class _InternalClass:
+    def _internal_f(self): pass
+
+ +

+ # + Importing Modules +

+
+
    +
  1. Import standard library modules first.
  2. +
  3. Then import third-party dependencies.
  4. +
  5. Finally, import project-specific modules.
  6. +
+
+
from typing import Any
+from collections import deque
+
+from array2d import array2d
+
+from ..utils import logger
+
+ +

+ # + Coding Practices +

+
+

Use is not when checking for None. Do not explicitly compare with True or False.

+
+
# Correct
+if x is not None: pass
+
+# Incorrect
+if x != None: pass
+
+# Correct
+x = True
+if x: pass
+if not x: pass
+
+# Incorrect
+if x == True: pass
+if x is True: pass
+if x != False: pass
+
+

The if statement implicitly calls bool(), so it can be used to check if a container is empty.

+
+
not_empty_list = [1]
+not_empty_string = '1'
+truth = True
+
+if not_empty_list:
+    print('true value')
+
+if not_empty_string:
+    print('true value')
+
+if truth:
+    print('true value')
+
+# Explicitly checking for emptiness is also valid
+if len(not_empty_list) > 0: pass
+
+ +

+ # + References +

+
+

PEP 8 – Style Guide for Python Code

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/features/basic/index.html b/features/basic/index.html new file mode 100644 index 00000000..02f5d4e8 --- /dev/null +++ b/features/basic/index.html @@ -0,0 +1,517 @@ + + + + + + + + + + + + + Basic Features | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Basic Features +

+
+

The following table shows the basic features of pkpy with respect to cpython.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameExampleSupported
If Elseif..else..elif
Loopfor/while/break/continue
Functiondef f(x,*args,y=1):
Subclassclass A(B):
List[1, 2, 'a']
ListComp[i for i in range(5)]
Slicea[1:2], a[:2], a[1:]
Tuple(1, 2, 'a')
Dict{'a': 1, 'b': 2}
F-Stringf'value is {x}'
Unpackinga, b = 1, 2
Star Unpackinga, *b = [1, 2, 3]
Exceptionraise/try..except..
Dynamic Codeeval()/exec()
Reflectionhasattr()/getattr()/setattr()
Importimport/from..import
Context Blockwith <expr> as <id>:
Type Annotationdef f(a:int, b:float=1)
Generatoryield i
Decorator@cache
Match Casematch code: case 200:
+
+ +

+ # + Supported magic methods +

+
+ +

+ # + Unary operators +

+
+
    +
  • __repr__
  • +
  • __str__
  • +
  • __hash__
  • +
  • __len__
  • +
  • __iter__
  • +
  • __next__
  • +
  • __neg__
  • +
+ +

+ # + Logical operators +

+
+
    +
  • __eq__
  • +
  • __lt__
  • +
  • __le__
  • +
  • __gt__
  • +
  • __ge__
  • +
  • __contains__
  • +
+ +

+ # + Binary operators +

+
+
    +
  • __add__
  • +
  • __radd__
  • +
  • __sub__
  • +
  • __rsub__
  • +
  • __mul__
  • +
  • __rmul__
  • +
  • __truediv__
  • +
  • __floordiv__
  • +
  • __mod__
  • +
  • __pow__
  • +
  • __matmul__
  • +
  • __lshift__
  • +
  • __rshift__
  • +
  • __and__
  • +
  • __or__
  • +
  • __xor__
  • +
  • __invert__
  • +
+ +

+ # + Indexer +

+
+
    +
  • __getitem__
  • +
  • __setitem__
  • +
  • __delitem__
  • +
+ +

+ # + Specials +

+
+
    +
  • __new__
  • +
  • __init__
  • +
  • __call__
  • +
  • __divmod__
  • +
  • __enter__
  • +
  • __exit__
  • +
  • __name__
  • +
  • __all__
  • +
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/features/debugging/index.html b/features/debugging/index.html new file mode 100644 index 00000000..5952d300 --- /dev/null +++ b/features/debugging/index.html @@ -0,0 +1,439 @@ + + + + + + + + + + + + + Debugging | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Debugging +

+
+ +

+ # + Install VSCode Extension +

+
+

To debug a pocketpy program, you need to install our VSCode extension first:

+

https://marketplace.visualstudio.com/items?itemName=pocketpy.pocketpy

+
+
+ +
+ +

+ # + Create a launch.json file +

+
+

Navigate to the Debug view in VSCode, and click on "create a launch.json file" link. +In the dropdown menu, select "pocketpy".

+

+ launch_json +
launch_json
+
+

+

Then a default launch.json file will be created in the .vscode folder +with a sample pocketpy debug configuration.

+ +

+ # + How does it work? +

+
+

pocketpy provides a C-API py_debugger_waitforattach, +which starts a debug server and waits for the VSCode extension to attach. +When the debugger is attached, the program will continue to run.

+
    +
  • If you are using pocketpy's standalone executable main.exe, you can pass --debug flag to it. This will automatically call py_debugger_waitforattach("127.0.0.1", 6110) before running your program.
  • +
  • If you are embedding pocketpy as a library, you need to call py_debugger_waitforattach manually in your C/C++ code.
  • +
+ +

+ # + Configuration +

+
+
    +
  • type: must be pocketpy
  • +
  • request: can be attach or launch
  • +
  • name: the name of this configuration
  • +
  • port: the port number of the debug server, must match the one in py_debugger_waitforattach
  • +
  • host: the host of the debug server, must match the one in py_debugger_waitforattach
  • +
  • sourceFolder: the root folder of your python source code, default to ${workspaceFolder}. However, +sometimes you may run your program from a subfolder, in this case you need to set sourceFolder to the correct path. If this is not set correctly, breakpoints will not be hit.
  • +
  • program: (for launch mode only) the path to the executable file which calls py_debugger_waitforattach, e.g. the pocketpy standalone executable main.exe.
  • +
  • args: (for launch mode only) the arguments to pass to the executable file, e.g. --debug and the script path if you are using main.exe.
  • +
  • cwd: (for launch mode only) the working directory to launch the executable file, default to ${workspaceFolder}.
  • +
+ +

+ # + For attach mode +

+
+

In this mode, you need to start your pocketpy program manually which must call py_debugger_waitforattach first. +After the program starts, you can let VSCode attach to the debug server.

+
+
{
+    "type": "pocketpy",
+    "request": "attach",
+    "name": "Attach to pocketpy program",
+    "port": 6110,
+    "host": "localhost",
+    "sourceFolder": "${workspaceFolder}"
+}
+
+ +

+ # + For launch mode +

+
+

In this mode, VSCode will start your program with the specified program, args and cwd. +After the program starts, VSCode attempts to attach to the debug server automatically.

+
+
{
+    "type": "pocketpy",
+    "request": "launch",
+    "name": "Launch pocketpy program",
+    "port": 6110,
+    "host": "localhost",
+    "sourceFolder": "${workspaceFolder}",
+    "program": "${workspaceFolder}/pocketpy/main.exe",
+    "args": [
+        "--debug"
+    ],
+    "cwd": "${workspaceFolder}"
+}
+
+ +

+ # + Showcase +

+
+

+ debugger_demo +
debugger_demo
+
+

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/features/deploy/index.html b/features/deploy/index.html new file mode 100644 index 00000000..666bdd05 --- /dev/null +++ b/features/deploy/index.html @@ -0,0 +1,372 @@ + + + + + + + + + + + + + Deploy Bytecodes | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Deploy Bytecodes +

+
+
+
+ +
+

You can deploy your pocketpy program as .pyc files, which are compiled bytecodes with necessary metadata. +This slightly improves the loading speed of your program.

+

It also makes your users unable to get your source code directly, unless they do expensive reverse engineering.

+

To compile a .py file into a .pyc bytecode file, you need the command-line executable main, +which can be simply built by running python cmake_build.py in the repository root.

+ +

+ # + Example +

+
+

Once you have main executable, you can run the following command to compile input_file.py:

+
+
./main --compile input_file.py output_file.pyc
+
+

Alternatively, you can invoke the compileall.py script in the repository root. +It compiles all .py files in the specified directory into .pyc files.

+
+
python compileall.py ./main input_path output_path
+
+ +

+ # + Running .pyc files +

+
+

The command-line executable main can run .pyc files directly:

+
+
./main output_file.pyc
+
+

If you are using C-APIs, you can use the py_execo() function.

+
+
/// Run a compiled code object.
+PK_API bool py_execo(const void* data, int size, const char* filename, py_Ref module) PY_RAISE PY_RETURN;
+
+ +

+ # + Trackback Support +

+
+

Since .pyc files do not contain raw sources, +trackbacks will show line numbers but not the actual source code lines.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/features/differences/index.html b/features/differences/index.html new file mode 100644 index 00000000..36993e36 --- /dev/null +++ b/features/differences/index.html @@ -0,0 +1,357 @@ + + + + + + + + + + + + + Comparison with CPython | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Comparison with CPython +

+
+

cpython is the reference implementation of the Python programming language. It is written in C and is the most widely used implementation of Python.

+ +

+ # + The design goal +

+
+

pkpy aims to be an alternative to lua for +game scripting, not cpython for general purpose programming.

+
    +
  • For syntax and semantics, pkpy is designed to be as close to cpython as possible.
  • +
  • For ecosystem and others, pkpy is not compatible with cpython.
  • +
+

pkpy supports most of the syntax and semantics of python. +For performance and simplicity, some features are not implemented, or behave differently. +The easiest way to test a feature is to try it on your browser.

+ +

+ # + Unimplemented features +

+
+
    +
  1. Descriptor protocol __get__ and __set__. However, @property is implemented.
  2. +
  3. __slots__ in class definition.
  4. +
  5. else and finally clause in try..except.
  6. +
  7. Inplace methods like __iadd__ and __imul__.
  8. +
  9. __del__ in class definition.
  10. +
  11. Multiple inheritance.
  12. +
+ +

+ # + Different behaviors +

+
+
    +
  1. positional and keyword arguments are strictly evaluated.
  2. +
  3. bool does not derive from int. They are independent types.
  4. +
  5. int is 64-bit.
  6. +
  7. Raw string cannot have boundary quotes in it, even escaped. See #55.
  8. +
  9. In a starred unpacked assignment, e.g. a, b, *c = x, the starred variable can only be presented in the last position. a, *b, c = x is not supported.
  10. +
  11. A Tab is equivalent to 4 spaces. You can mix Tab and spaces in indentation, but it is not recommended.
  12. +
  13. A return, break, continue in try/except/with block will make the finally block not executed.
  14. +
  15. match is a keyword and match..case is equivalent to if..elif..else.
  16. +
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/features/profiling/index.html b/features/profiling/index.html new file mode 100644 index 00000000..1e95cd39 --- /dev/null +++ b/features/profiling/index.html @@ -0,0 +1,348 @@ + + + + + + + + + + + + + Profiling | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Profiling +

+
+

To profile your pocketpy program, you can run main.exe with --profile flag.

+

For example, to profile test/test_math.py, run

+
+
main.exe --profile test/test_math.py
+
+

This will output a JSON report file named profile_report.json in the current directory, +which records the time spent for each line. To visualize the report, please install our VSCode extension.

+

https://marketplace.visualstudio.com/items?itemName=pocketpy.pocketpy

+
+
+ +
+

With pocketpy VSCode extension, press F1 and type pocketpy: Load Line Profiler Report, +select 1. the profile_report.json file; 2. the source root of the program. Then you will see a nice visualization of the profiling result.

+

+ profiler_report +
profiler_report
+
+

+

Press ESC to exit the report view.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/features/threading/index.html b/features/threading/index.html new file mode 100644 index 00000000..dd45c3bc --- /dev/null +++ b/features/threading/index.html @@ -0,0 +1,462 @@ + + + + + + + + + + + + + Compute Threads | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Compute Threads +

+
+

pocketpy organizes its state by VM structure. +Users can have at maximum 16 VM instances (index from 0 to 15). +Each VM instance can only be accessed by exactly one thread at a time. +If you are trying to run two python scripts in parallel refering the same VM instance, +you will crash it definitely.

+

However, there are two ways to achieve multi-threading in pocketpy.

+

One way is to use a native threading library such as pthread. +You can wrap the multi-threading logic into a C function and bind it to pocketpy. +Be careful and not to access the same VM instance from multiple threads at the same time. +You need to lock critical resources or perform a deep copy of all needed data.

+ +

+ # + ComputeThread +

+
+

The other way is to use pkpy.ComputeThread. +It is like an isolate in Dart language. +ComputeThread is a true multi-threading model to allow you run python scripts in parallel without lock, +backed by a separate VM instance.

+

ComputeThread is highly designed for computational intensive tasks in games. +For example, you can run game logic in main thread (VM 0) and run world generation in another thread (e.g. VM 1).

+
graph TD
+    subgraph Main Thread
+        A[Game Start]
+        B[Submit WorldGen Job]
+        C[Frame 1]
+        D[Frame 2]
+        E[Frame 3]
+        F[...]
+        G[Get WorldGen Result]
+        H[Render World]
+    end
+    subgraph WorldGen Thread
+        O[Generate Biomes]
+        P[Generate Terrain]
+        Q[Generate Creatures]
+        R[Dump Result]
+    end
+    A --> B
+    B --> C
+    C --> D
+    D --> E
+    E --> F
+    F --> G
+    G --> H
+
+    O --> P
+    P --> Q
+    Q --> R
+
+    B --> O
+    R --> G
+ +

+ # + main.py +

+
+
+
import time
+from pkpy import ComputeThread
+
+thread = ComputeThread(1)
+print("Game Start")
+
+# import worldgen.py
+thread.exec('from worldgen import gen_world')
+
+print("Submit WorldGen Job")
+thread.submit_call('gen_world', 3, (100, 100), 10)
+
+# wait for worldgen to finish
+for i in range(1, 100000):
+    print('Frame:', i)
+    time.sleep(1)
+    if thread.is_done:
+        break
+
+error = thread.last_error()
+if error is not None:
+    print("Error:", error)
+else:
+    retval = thread.last_retval()
+    biomes = retval['biomes']
+    terrain = retval['terrain']
+    creatures = retval['creatures']
+    print("World Generation Complete", len(biomes), len(terrain), len(creatures))
+
+ +

+ # + worldgen.py +

+
+
+
import time
+import random
+
+def gen_world(biome_count: int, terrain_size: tuple[int, int], creature_count: int) -> dict:
+    # simulate a long computation
+    time.sleep(3)
+
+    # generate world data
+    all_biomes = ["forest", "desert", "ocean", "mountain", "swamp"]
+    all_creatures = ["wolf", "bear", "fish", "bird", "lizard"]
+
+    width, height = terrain_size
+
+    terrain_data = [
+        random.randint(1, 10)
+        for _ in range(width * height)
+    ]
+
+    creatures = [
+        {
+            "name": random.choice(all_creatures),
+            "x": random.randint(0, width - 1),
+            "y": random.randint(0, height - 1),
+        }
+        for i in range(creature_count)
+    ]
+
+    return {
+        "biomes": all_biomes[:biome_count],
+        "terrain": terrain_data,
+        "creatures": creatures,
+    }
+
+

Run main.py and you will see the result like this:

+
+
Game Start
+Submit WorldGen Job
+Frame: 1
+Frame: 2
+Frame: 3
+Frame: 4
+World Generation Complete 3 10000 10
+
+

ComputeThread uses pickle module to serialize the data between threads. +Parameters and return values must be supported by pickle. +See pickle for more details.

+

Since ComputeThread is backed by a separate VM instance, +it does not share any state with the main thread +except for the parameters you pass to it. +Therefore, common python modules will be imported twice in each thread.

+

If you want to identify which VM instance the module is running in, +you can call pkpy.currentvm or let your ComputeThread set some special flags +before importing these modules.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/features/ub/index.html b/features/ub/index.html new file mode 100644 index 00000000..4543f76e --- /dev/null +++ b/features/ub/index.html @@ -0,0 +1,318 @@ + + + + + + + + + + + + + Undefined Behaviour | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Undefined Behaviour +

+
+

These are the undefined behaviours of pkpy. The behaviour of pkpy is undefined if you do the following things.

+
    +
  1. Delete a builtin object. For example, del int.__add__.
  2. +
  3. Call an unbound method with the wrong type of self. For example, int.__add__('1', 2).
  4. +
  5. Type T's __new__ returns an object that is not an instance of T.
  6. +
  7. Call __new__ with a type that is not a subclass of type.
  8. +
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/gsoc2024/guide/index.html b/gsoc2024/guide/index.html new file mode 100644 index 00000000..ea293c23 --- /dev/null +++ b/gsoc2024/guide/index.html @@ -0,0 +1,379 @@ + + + + + + + + + + + + + Application Guide | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Application Guide +

+
+

Before starting, please read the Ideas page and choose a project you are interested in. +Set up a C++ compiler, clone pocketpy sources from github and try to build. +This helps you confirm that your skills and experience match the requirements of the project.

+ +

+ # + Build guide for beginners +

+
+

First, you need to install these tools:

+
    +
  1. Python(>= 3.8), I am sure you already have it.
  2. +
  3. A C++ compiler, such as GCC, Clang or MSVC. If you are on Linux, gcc and g++ are already installed. If you are on Windows, you can install Visual Studio with C++ development tools.
  4. +
  5. CMake(>= 3.10), a cross-platform build tool. You can use pip install cmake to install it.
  6. +
+

Then, clone pocketpy sources from github and try to build:

+
+
git clone https://github.com/pocketpy/pocketpy
+cd pocketpy
+
+python cmake_build.py
+
+

If everything goes well, you will get a main executable (main.exe on Windows) in the root directory of pocketpy. +Simply run it and you will enter pocketpy's REPL.

+
+
pocketpy 1.4.0 (Jan 24 2024, 12:39:13) [32 bit] on emscripten
+https://github.com/pocketpy/pocketpy
+Type "exit()" to exit.
+>>>
+>>> "Hello, world"
+'Hello, world'
+
+ +

+ # + Application guide +

+
+

Your need to send an email to blueloveth@foxmail.com with the following information:

+
    +
  1. A brief introduction about yourself, including the most related open sourced project you have worked on before. It is highly recommended to attach your Github profile link.
  2. +
  3. A technical proposal for the project you are interested in working on, including: +
      +
    • Your understanding of the project.
    • +
    • The technical approach/architecture you will adopt.
    • +
    • The challenges you might face and how you will overcome them.
    • +
    +
  4. +
  5. A timeline for the project, including the milestones and deliverables.
  6. +
  7. Other information required by the Google Summer of Code program.
  8. +
+ +

+ # + Coding style guide +

+
+

See Coding Style Guide.

+ +

+ # + Contact us +

+
+

If you have any questions, you can join our Discord +or contact me via email. +We are glad to help you with your application.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/gsoc2024/ideas/index.html b/gsoc2024/ideas/index.html new file mode 100644 index 00000000..75331881 --- /dev/null +++ b/gsoc2024/ideas/index.html @@ -0,0 +1,355 @@ + + + + + + + + + + + + + Project Ideas | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Project Ideas +

+
+ +

+ # + Implement pybind11 for bindings +

+
+
    +
  • Difficulty Level: 5/5 (Hard)
  • +
  • Skill: Advanced C++ with metaprogramming; Python
  • +
  • Project Length: Medium (175 hours)
  • +
+
+

https://summerofcode.withgoogle.com/archive/2024/projects/Ji2Mi97o

+
+

pocketpy has provided a low-level API for creating bindings. It is fast, lightweight and easy to debug. +However, it still requires a lot of boilerplate code to create bindings for complex C++ classes. +The community has long expected a high-level API for creating bindings.

+

pybind11 +is the most popular C++ library for creating Python bindings for CPython. A bunch of Python libraries are using it. pybind11 adopts a template metaprogramming approach to automatically generate bindings for C++ classes.

+

Our goal is to introduce a pybind11 compatible solution to pocketpy as an alternative way to create bindings +for functions and classes. +You can use C++17 features to implement it, instead of C++11 used in pybind11.

+

See https://github.com/pocketpy/pocketpy/issues/216 for more details.

+ +

+ # + Add numpy module +

+
+
    +
  • Difficulty Level: 4/5 (Intermediate)
  • +
  • Skill: Intermediate C++; Python; Linear Algebra
  • +
  • Project Length: Medium (175 hours)
  • +
+
+

https://summerofcode.withgoogle.com/archive/2024/projects/sJLuASSP

+
+

Though pocketpy is designed for game scripting, +some people are using it for scientific computing. +It would be nice to have a numpy module in pocketpy.

+

numpy is a huge project. +Our goal is to implement a most commonly used subset of numpy in pocketpy. +You can mix C++ and Python code to simplify the overall workloads.

+

See https://github.com/pocketpy/pocketpy/issues/202 for more details.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/gsoc2025/guide/index.html b/gsoc2025/guide/index.html new file mode 100644 index 00000000..8ae06f1a --- /dev/null +++ b/gsoc2025/guide/index.html @@ -0,0 +1,379 @@ + + + + + + + + + + + + + Application Guide | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Application Guide +

+
+

Before starting, please read the Ideas page and choose a project you are interested in. +Set up a C11 compiler, clone pocketpy sources from github and try to build. +This helps you confirm that your skills and experience match the requirements of the project.

+ +

+ # + Build guide for beginners +

+
+

First, you need to install these tools:

+
    +
  1. Python(>= 3.8), I am sure you already have it.
  2. +
  3. A C11 compiler, such as GCC, Clang or MSVC. If you are on Linux, gcc is already installed. If you are on Windows, you can install Visual Studio with C/C++ development tools.
  4. +
  5. CMake(>= 3.10), a cross-platform build tool. You can use pip install cmake to install it.
  6. +
+

Then, clone pocketpy sources from github and try to build:

+
+
git clone https://github.com/pocketpy/pocketpy
+cd pocketpy
+
+python cmake_build.py
+
+

If everything goes well, you will get a main executable (main.exe on Windows) in the root directory of pocketpy. +Simply run it and you will enter pocketpy's REPL.

+
+
pocketpy 2.0.5 (Jan 17 2025, 14:36:15) [64 bit] on darwin
+https://github.com/pocketpy/pocketpy
+Type "exit()" to exit.
+>>> 
+>>> "Hello, world"
+'Hello, world'
+
+ +

+ # + Application guide +

+
+

Your need to send an email to blueloveth@foxmail.com with the following information:

+
    +
  1. A brief introduction about yourself, including the most related open sourced project you have worked on before. It is highly recommended to attach your Github profile link.
  2. +
  3. A technical proposal for the project you are interested in working on, including: +
      +
    • Your understanding of the project.
    • +
    • The technical approach/architecture you will adopt.
    • +
    • The challenges you might face and how you will overcome them.
    • +
    +
  4. +
  5. A timeline for the project, including the milestones and deliverables.
  6. +
  7. Other information required by the Google Summer of Code program.
  8. +
+ +

+ # + Coding style guide +

+
+

See Coding Style Guide.

+ +

+ # + Contact us +

+
+

If you have any questions, you can join our Discord +or contact me via email. +We are glad to help you with your application.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/gsoc2025/ideas/index.html b/gsoc2025/ideas/index.html new file mode 100644 index 00000000..f3f9fd01 --- /dev/null +++ b/gsoc2025/ideas/index.html @@ -0,0 +1,341 @@ + + + + + + + + + + + + + Project Ideas | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Project Ideas +

+
+ +

+ # + VSCode plugin for debugging pocketpy applications +

+
+
    +
  • Difficulty Level: 3/5 (Medium)
  • +
  • Skill: TypeScript; C
  • +
  • Project Length: Medium
  • +
+

Community users have reported that there is no convenient way to debug python applications interpreted by pocketpy. Fortunately, VSCode provides a mechanism of Debugger Extension that allows us to integrate pocketpy debugger into VSCode UI through Debug Adapter Protocol (DAP).

+

This project aims to develop a VSCode plugin like Python Debugger, which implements DAP for pocketpy. With this plugin, users can launch their pocketpy applications in VSCode with breakpoints, call stacks, and variable inspection. Students with experience in TypeScript will be helpful for this project.

+ +

+ # + Develop math operators for cTensor library +

+
+
    +
  • Difficulty Level: 4/5 (Hard)
  • +
  • Skill: C; Further Mathematics
  • +
  • Project Length: Small or Medium
  • +
+

pocketpy is providing a tensor library cTensor for users who want to integrate neural networks into their applications. cTensor implements automatic differentiation and dynamic compute graph. It allows users to train and deploy neural networks on client-side devices like mobile phones and microcontrollers (e.g. ESP32-C3). We have a runable prototype located at pocketpy/cTensor. But math operators have not been implemented yet.

+

In this project, students will develop forward and backward math operators, as well as basic neural network layers and optimizers (e.g. SGD, Adam). The project is written in C11. +We expect students to have a good understanding of further mathematics and C programming.

+
+

This year we also accept custom project ideas. If you are not interested in the above, you can propose your own idea and contact me via blueloveth@foxmail.com. We will discuss the feasibility and mentorship for your idea.

+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/gsoc2026/guide/index.html b/gsoc2026/guide/index.html new file mode 100644 index 00000000..1d7f1c0c --- /dev/null +++ b/gsoc2026/guide/index.html @@ -0,0 +1,403 @@ + + + + + + + + + + + + + Application Guide | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Application Guide +

+
+

Welcome to the Google Summer of Code 2026 application guide for pocketpy. +We are recruiting a student who is passionate about vibe coding and mobile game development.

+

See Project Ideas for more details about the project.

+ +

+ # + Prerequisites +

+
+

To apply for this project, you need to satisfy the following prerequisites:

+
    +
  • You are a student enrolled in an accredited institution (university, college, etc.) pursuing a degree in computer science or a related field. And this is your first time participating in Google Summer of Code.
  • +
  • You have interest in vibe coding and mobile game development.
  • +
  • You are experienced in Python and backend technologies, such as FastAPI or Flask.
  • +
  • You are glad to learn game engines like Godot.
  • +
+ +

+ # + Application steps +

+
+ +

+ # + Step 1 +

+
+

If you think you meet the prerequisites, +send an email to blueloveth@foxmail.com with the following information.

+
    +
  1. A brief introduction about yourself, including the most related open sourced project you have worked on before. It is highly recommended to attach your Github profile link.
  2. +
  3. Your understanding of this project and why you are capable of completing it.
  4. +
  5. Your free time during the whole GSoC period (From 2026-03-01 to 2026-08-31).
  6. +
+ +

+ # + Step 2 +

+
+

After you get a positive reply from us, +you need to complete 1~2 pull requests to pocketpy's repository on GitHub. +This is mandatory as it demonstrates your coding skills and commitment to the project. +We will provide you a few good first issues to work on.

+ +

+ # + Step 3 +

+
+

Once your pull requests are merged, +we will guide you to write a full proposal +for the project you are going to work on during GSoC 2026. +This proposal will be submitted to Google for review.

+ +

+ # + Build guide for pocketpy +

+
+

First, you need to install these tools:

+
    +
  1. Python(>= 3.8), I am sure you already have it.
  2. +
  3. A C11 compiler, such as GCC, Clang or MSVC. If you are on Linux, gcc is already installed. If you are on Windows, you can install Visual Studio with C/C++ development tools.
  4. +
  5. CMake(>= 3.10), a cross-platform build tool. You can use pip install cmake to install it.
  6. +
+

Then, clone pocketpy sources from github and try to build:

+
+
git clone https://github.com/pocketpy/pocketpy
+cd pocketpy
+
+python cmake_build.py
+
+

If everything goes well, you will get a main executable (main.exe on Windows) in the root directory of pocketpy. +Simply run it and you will enter pocketpy's REPL.

+
+
pocketpy 2.1.7 (Jan  7 2026, 16:42:45) [64 bit] on darwin
+https://github.com/pocketpy/pocketpy
+Type "exit()" to exit.
+>>> 
+>>> "Hello, world"
+'Hello, world'
+
+ +

+ # + Coding style guide +

+
+

See Coding Style Guide.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/gsoc2026/ideas/index.html b/gsoc2026/ideas/index.html new file mode 100644 index 00000000..ae06f314 --- /dev/null +++ b/gsoc2026/ideas/index.html @@ -0,0 +1,358 @@ + + + + + + + + + + + + + Project Ideas | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Project Ideas +

+
+ +

+ # + Idea Title +

+
+

Build a Vibe Coding Agent in Python for Creating Games

+ +

+ # + Project Size +

+
+

Medium

+ +

+ # + Related Skills +

+
+
    +
  • CPython
  • +
  • Agentic Programming
  • +
  • Prompt Engineering
  • +
  • Game Engines
  • +
+ +

+ # + Description +

+
+

pocketpy is an organization dedicated to creating game development tools in Python language. +Nowadays, vibe coding has become a popular approach for rapid game development, allowing developers to create games quickly and efficiently by leveraging language models and agentic programming techniques.

+

For Google Summer of Code 2026, we are looking for a student to develop a vibe coding agent that can assist developers in creating games. +This agent is composed of two main components, +backend and frontend.

+

The backend part should be developed in CPython, +which is composed of the following modules:

+
    +
  • Virtual Container. The agent needs to create a virtual linux container for each vibe coding project. This module provides management for users' sources and assets inside the container.
  • +
  • AI Service Provider. This module is responsible for communicating with AI service providers, such as OpenAI, to generate code and assets based on user prompts.
  • +
  • Persistent Memory. This module stores the state of each vibe coding project, including project progress, user preferences, and other relevant information.
  • +
  • Agentic Core. This module uses Persistent Memory and AI Service Provider to implement the agentic programming logic, enabling the agent to understand user prompts and generate appropriate code and assets.
  • +
  • Game Engine Integration.
  • +
+

For more details, we will discuss with the selected student during the community bonding period.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/index.html b/index.html new file mode 100644 index 00000000..e7896a72 --- /dev/null +++ b/index.html @@ -0,0 +1,382 @@ + + + + + + + + + + + + + Welcome to pocketpy | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Welcome to pocketpy +

+
+

pocketpy is a portable Python 3.x interpreter, written in C11. +It aims to be an alternative to Lua for game scripting, with elegant syntax, powerful features and competitive performance. +pocketpy has no dependencies other than the C standard library, which can be easily integrated into your C/C++ project. +Developers are able to write Python bindings via C-API or pybind11 compatible interfaces.

+ + +

+ # + What it looks like +

+
+
+
def is_prime(x):
+  if x < 2:
+    return False
+  for i in range(2, x):
+    if x % i == 0:
+      return False
+  return True
+
+primes = [i for i in range(2, 20) if is_prime(i)]
+print(primes)
+# [2, 3, 5, 7, 11, 13, 17, 19]
+
+ +

+ # + Supported platforms +

+
+

pkpy should work on any platform with a C11 compiler. +These platforms are officially tested.

+
    +
  • Windows 64-bit
  • +
  • Linux 64-bit / 32-bit
  • +
  • macOS 64-bit
  • +
  • Android 64-bit / 32-bit
  • +
  • iOS 64-bit
  • +
  • Emscripten 32-bit
  • +
  • Raspberry Pi OS 64-bit
  • +
  • Luckfox Pico SDK 32-bit
  • +
+

On Windows platform, only MSVC compiler is officially supported.

+ +

+ # + Star the repo +

+
+

If you find pkpy useful, consider star this repository (●'◡'●)

+ +

You can sponsor this project via these ways.

+ +

Your sponsorship will help us develop pkpy continuously.

+ +

+ # + Upgrade to v2.0 +

+
+

pkpy v2.0 is a C11 project instead of C++17. All your existing code for v1.x won't work anymore.

+

We provide two API sets for v2.0, C-API and pybind11 API (C++17). If you are a C user, use the C-API. If you are a C++ user, use the pybind11 API.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/license/index.html b/license/index.html new file mode 100644 index 00000000..5a73d04a --- /dev/null +++ b/license/index.html @@ -0,0 +1,328 @@ + + + + + + + + + + + + + License | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + License +

+
+

pkpy is licensed under the MIT License.

+
+
MIT License
+
+Copyright (c) 2026 blueloveTH
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/array2d/index.html b/modules/array2d/index.html new file mode 100644 index 00000000..4773454d --- /dev/null +++ b/modules/array2d/index.html @@ -0,0 +1,485 @@ + + + + + + + + + + + + + array2d | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + array2d +

+
+

Efficient general-purpose 2D array.

+ +

+ # + Source code +

+
+
+
from typing import Callable, Literal, overload, Iterator, Self
+from vmath import vec2i, color32
+
+Neighborhood = Literal['Moore', 'von Neumann']
+
+class array2d_like[T]:
+    @property
+    def n_cols(self) -> int: ...
+    @property
+    def n_rows(self) -> int: ...
+    @property
+    def width(self) -> int: ...
+    @property
+    def height(self) -> int: ...
+    @property
+    def shape(self) -> vec2i: ...
+    @property
+    def numel(self) -> int: ...
+
+    @overload
+    def is_valid(self, col: int, row: int) -> bool: ...
+    @overload
+    def is_valid(self, pos: vec2i) -> bool: ...
+
+    def get[R](self, col: int, row: int, default: R = None) -> T | R:
+        """Get the value at the given position.
+
+        If the position is out of bounds, returns the default value.
+        """
+
+    def index(self, value: T) -> vec2i:
+        """Get the position of the first occurrence of the given value.
+
+        Raises `ValueError` if the value is not found.
+        """
+
+    def render(self) -> str: ...
+    def render_with_color(self, fg: array2d_like[color32 | None], bg: array2d_like[color32 | None]) -> str: ...
+
+    def all(self: array2d_like[bool]) -> bool: ...
+    def any(self: array2d_like[bool]) -> bool: ...
+
+    def map[R](self, f: Callable[[T], R]) -> array2d[R]: ...
+    def apply(self, f: Callable[[T], T]) -> None: ...
+    def zip_with[R, U](self, other: array2d_like[U], f: Callable[[T, U], R]) -> array2d[R]: ...
+    def copy(self) -> 'array2d[T]': ...
+    def tolist(self) -> list[list[T]]: ...
+
+    def __le__(self, other: T | array2d_like[T]) -> array2d[bool]: ...
+    def __lt__(self, other: T | array2d_like[T]) -> array2d[bool]: ...
+    def __ge__(self, other: T | array2d_like[T]) -> array2d[bool]: ...
+    def __gt__(self, other: T | array2d_like[T]) -> array2d[bool]: ...
+    def __eq__(self, other: T | array2d_like[T]) -> array2d[bool]: ...  # type: ignore
+    def __ne__(self, other: T | array2d_like[T]) -> array2d[bool]: ...  # type: ignore
+
+    def __add__(self, other: T | array2d_like[T]) -> array2d[T]: ...
+    def __sub__(self, other: T | array2d_like[T]) -> array2d[T]: ...
+    def __mul__(self, other: T | array2d_like[T]) -> array2d[T]: ...
+    def __truediv__(self, other: T | array2d_like[T]) -> array2d[T]: ...
+    def __floordiv__(self, other: T | array2d_like[T]) -> array2d[T]: ...
+    def __mod__(self, other: T | array2d_like[T]) -> array2d[T]: ...
+    def __pow__(self, other: T | array2d_like[T]) -> array2d[T]: ...
+
+    def __and__(self, other: T | array2d_like[T]) -> array2d[T]: ...
+    def __or__(self, other: T | array2d_like[T]) -> array2d[T]: ...
+    def __xor__(self, other: T | array2d_like[T]) -> array2d[T]: ...
+    def __invert__(self) -> array2d[T]: ...
+
+    def __iter__(self) -> Iterator[tuple[vec2i, T]]: ...
+    def __repr__(self) -> str: ...
+
+    @overload
+    def __getitem__(self, index: vec2i) -> T: ...
+    @overload
+    def __getitem__(self, index: tuple[int, int]) -> T: ...
+    @overload
+    def __getitem__(self, index: tuple[slice, slice]) -> array2d_view[T]: ...
+    @overload
+    def __getitem__(self, index: tuple[slice, int] | tuple[int, slice]) -> array2d_view[T]: ...
+    @overload
+    def __getitem__(self, mask: array2d_like[bool]) -> list[T]: ...
+    @overload
+    def __setitem__(self, index: vec2i, value: T): ...
+    @overload
+    def __setitem__(self, index: tuple[int, int], value: T): ...
+    @overload
+    def __setitem__(self, index: tuple[slice, slice], value: T | 'array2d_like[T]'): ...
+    @overload
+    def __setitem__(self, index: tuple[slice, int] | tuple[int, slice], value: T | 'array2d_like[T]'): ...
+    @overload
+    def __setitem__(self, mask: array2d_like[bool], value: T): ...
+
+    # algorithms
+    def count(self, value: T) -> int:
+        """Count the number of cells with the given value."""
+
+    def count_neighbors(self, value: T, neighborhood: Neighborhood) -> array2d[int]:
+        """Count the number of neighbors with the given value for each cell."""
+
+    def get_bounding_rect(self, value: T) -> tuple[int, int, int, int]:
+        """Get the bounding rectangle of the given value.
+
+        Returns a tuple `(x, y, width, height)` or raise `ValueError` if the value is not found.
+        """
+
+    def convolve(self: array2d_like[int], kernel: array2d_like[int], padding: int) -> array2d[int]:
+        """Convolve the array with the given kernel."""
+
+    def get_connected_components(self, value: T, neighborhood: Neighborhood) -> tuple[array2d[int], int]:
+        """Get connected components of the grid via BFS algorithm.
+
+        Returns the `visited` array and the number of connected components,
+        where `0` means unvisited, and non-zero means the index of the connected component.
+        """
+
+
+class array2d_view[T](array2d_like[T]):
+    @property
+    def origin(self) -> vec2i: ...
+
+
+class array2d[T](array2d_like[T]):
+    def __new__(
+            cls,
+            n_cols: int,
+            n_rows: int,
+            default: T | Callable[[vec2i], T] | None = None
+            ): ...
+
+    @staticmethod
+    def fromlist(data: list[list[T]]) -> array2d[T]: ...
+
+
+class chunked_array2d[T, TContext]:
+    def __new__(
+            cls,
+            chunk_size: int,
+            default: T | None = None,
+            auto_add_chunk: bool = True,
+            ): ...
+
+    @property
+    def chunk_size(self) -> int: ...
+
+    def __getitem__(self, index: vec2i) -> T: ...
+    def __setitem__(self, index: vec2i, value: T): ...
+    def __iter__(self) -> Iterator[tuple[vec2i, TContext]]: ...
+    def __len__(self) -> int: ...
+
+    def clear(self) -> None: ...
+    def copy(self) -> Self: ...
+
+    def world_to_chunk(self, world_pos: vec2i) -> tuple[vec2i, vec2i]:
+        """Converts world position to chunk position and local position."""
+
+    def add_chunk(self, chunk_pos: vec2i, context: TContext | None) -> None: ...
+    def remove_chunk(self, chunk_pos: vec2i) -> bool: ...
+    def move_chunk(self, src_chunk_pos: vec2i, dst_chunk_pos: vec2i) -> bool: ...
+    def get_context(self, chunk_pos: vec2i) -> TContext | None: ...
+
+    def view(self) -> array2d_view[T]: ...
+    def view_rect(self, pos: vec2i, width: int, height: int) -> array2d_view[T]: ...
+    def view_chunk(self, chunk_pos: vec2i) -> array2d_view[T]: ...
+    def view_chunks(self, chunk_pos: vec2i, width: int, height: int) -> array2d_view[T]: ...
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/base64/index.html b/modules/base64/index.html new file mode 100644 index 00000000..ec68da44 --- /dev/null +++ b/modules/base64/index.html @@ -0,0 +1,325 @@ + + + + + + + + + + + + + base64 | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + base64 +

+
+ +

+ # + base64.b64encode(b: bytes) -> bytes +

+
+

Encode bytes-like object b using the standard Base64 alphabet.

+ +

+ # + base64.b64decode(b: str | bytes) -> bytes +

+
+

Decode Base64 encoded bytes-like object b.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/bisect/index.html b/modules/bisect/index.html new file mode 100644 index 00000000..9a93984c --- /dev/null +++ b/modules/bisect/index.html @@ -0,0 +1,422 @@ + + + + + + + + + + + + + bisect | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + bisect +

+
+ +

+ # + bisect.bisect_left(a, x) +

+
+

Return the index where to insert item x in list a, assuming a is sorted.

+ +

+ # + bisect.bisect_right(a, x) +

+
+

Return the index where to insert item x in list a, assuming a is sorted.

+ +

+ # + bisect.insort_left(a, x) +

+
+

Insert item x in list a, and keep it sorted assuming a is sorted.

+

If x is already in a, insert it to the left of the leftmost x.

+ +

+ # + bisect.insort_right(a, x) +

+
+

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.

+ +

+ # + Source code +

+
+
+
"""Bisection algorithms."""
+
+def insort_right(a, x, lo=0, hi=None):
+    """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 len(a)) bound the
+    slice of a to be searched.
+    """
+
+    lo = bisect_right(a, x, lo, hi)
+    a.insert(lo, x)
+
+def bisect_right(a, x, lo=0, hi=None):
+    """Return the index where to insert item x in list a, assuming a is sorted.
+
+    The return value i is such that all e in a[:i] have e <= x, and all e in
+    a[i:] have e > x.  So if x already appears in the list, a.insert(x) will
+    insert just after the rightmost x already there.
+
+    Optional args lo (default 0) and hi (default len(a)) bound the
+    slice of a to be searched.
+    """
+
+    if lo < 0:
+        raise ValueError('lo must be non-negative')
+    if hi is None:
+        hi = len(a)
+    while lo < hi:
+        mid = (lo+hi)//2
+        if x < a[mid]: hi = mid
+        else: lo = mid+1
+    return lo
+
+def insort_left(a, x, lo=0, hi=None):
+    """Insert item x in list a, and keep it sorted assuming a is sorted.
+
+    If x is already in a, insert it to the left of the leftmost x.
+
+    Optional args lo (default 0) and hi (default len(a)) bound the
+    slice of a to be searched.
+    """
+
+    lo = bisect_left(a, x, lo, hi)
+    a.insert(lo, x)
+
+
+def bisect_left(a, x, lo=0, hi=None):
+    """Return the index where to insert item x in list a, assuming a is sorted.
+
+    The return value i is such that all e in a[:i] have e < x, and all e in
+    a[i:] have e >= x.  So if x already appears in the list, a.insert(x) will
+    insert just before the leftmost x already there.
+
+    Optional args lo (default 0) and hi (default len(a)) bound the
+    slice of a to be searched.
+    """
+
+    if lo < 0:
+        raise ValueError('lo must be non-negative')
+    if hi is None:
+        hi = len(a)
+    while lo < hi:
+        mid = (lo+hi)//2
+        if a[mid] < x: lo = mid+1
+        else: hi = mid
+    return lo
+
+# Create aliases
+bisect = bisect_right
+insort = insort_right
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/cmath/index.html b/modules/cmath/index.html new file mode 100644 index 00000000..bae1011b --- /dev/null +++ b/modules/cmath/index.html @@ -0,0 +1,509 @@ + + + + + + + + + + + + + cmath | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + cmath +

+
+

Mathematical functions for complex numbers.

+

https://docs.python.org/3/library/cmath.html

+ +

+ # + Source code +

+
+
+
import math
+
+class complex:
+    def __init__(self, real, imag=0):
+        self._real = float(real)
+        self._imag = float(imag)
+
+    @property
+    def real(self):
+        return self._real
+
+    @property
+    def imag(self):
+        return self._imag
+
+    def conjugate(self):
+        return complex(self.real, -self.imag)
+
+    def __repr__(self):
+        s = ['(', str(self.real)]
+        s.append('-' if self.imag < 0 else '+')
+        s.append(str(abs(self.imag)))
+        s.append('j)')
+        return ''.join(s)
+
+    def __eq__(self, other):
+        if type(other) is complex:
+            return self.real == other.real and self.imag == other.imag
+        if type(other) in (int, float):
+            return self.real == other and self.imag == 0
+        return NotImplemented
+
+    def __ne__(self, other):
+        res = self == other
+        if res is NotImplemented:
+            return res
+        return not res
+
+    def __add__(self, other):
+        if type(other) is complex:
+            return complex(self.real + other.real, self.imag + other.imag)
+        if type(other) in (int, float):
+            return complex(self.real + other, self.imag)
+        return NotImplemented
+
+    def __radd__(self, other):
+        return self.__add__(other)
+
+    def __sub__(self, other):
+        if type(other) is complex:
+            return complex(self.real - other.real, self.imag - other.imag)
+        if type(other) in (int, float):
+            return complex(self.real - other, self.imag)
+        return NotImplemented
+
+    def __rsub__(self, other):
+        if type(other) is complex:
+            return complex(other.real - self.real, other.imag - self.imag)
+        if type(other) in (int, float):
+            return complex(other - self.real, -self.imag)
+        return NotImplemented
+
+    def __mul__(self, other):
+        if type(other) is complex:
+            return complex(self.real * other.real - self.imag * other.imag,
+                           self.real * other.imag + self.imag * other.real)
+        if type(other) in (int, float):
+            return complex(self.real * other, self.imag * other)
+        return NotImplemented
+
+    def __rmul__(self, other):
+        return self.__mul__(other)
+
+    def __truediv__(self, other):
+        if type(other) is complex:
+            denominator = other.real ** 2 + other.imag ** 2
+            real_part = (self.real * other.real + self.imag * other.imag) / denominator
+            imag_part = (self.imag * other.real - self.real * other.imag) / denominator
+            return complex(real_part, imag_part)
+        if type(other) in (int, float):
+            return complex(self.real / other, self.imag / other)
+        return NotImplemented
+
+    def __pow__(self, other: int | float):
+        if type(other) in (int, float):
+            return complex(self.__abs__() ** other * math.cos(other * phase(self)),
+                           self.__abs__() ** other * math.sin(other * phase(self)))
+        return NotImplemented
+
+    def __abs__(self) -> float:
+        return math.sqrt(self.real ** 2 + self.imag ** 2)
+
+    def __neg__(self):
+        return complex(-self.real, -self.imag)
+
+    def __hash__(self):
+        return hash((self.real, self.imag))
+
+
+# Conversions to and from polar coordinates
+
+def phase(z: complex):
+    return math.atan2(z.imag, z.real)
+
+def polar(z: complex):
+    return z.__abs__(), phase(z)
+
+def rect(r: float, phi: float):
+    return r * math.cos(phi) + r * math.sin(phi) * 1j
+
+# Power and logarithmic functions
+
+def exp(z: complex):
+    return math.exp(z.real) * rect(1, z.imag)
+
+def log(z: complex, base=2.718281828459045):
+    return math.log(z.__abs__(), base) + phase(z) * 1j
+
+def log10(z: complex):
+    return log(z, 10)
+
+def sqrt(z: complex):
+    return z ** 0.5
+
+# Trigonometric functions
+
+def acos(z: complex):
+    return -1j * log(z + sqrt(z * z - 1))
+
+def asin(z: complex):
+    return -1j * log(1j * z + sqrt(1 - z * z))
+
+def atan(z: complex):
+    return 1j / 2 * log((1 - 1j * z) / (1 + 1j * z))
+
+def cos(z: complex):
+    return (exp(z) + exp(-z)) / 2
+
+def sin(z: complex):
+    return (exp(z) - exp(-z)) / (2 * 1j)
+
+def tan(z: complex):
+    return sin(z) / cos(z)
+
+# Hyperbolic functions
+
+def acosh(z: complex):
+    return log(z + sqrt(z * z - 1))
+
+def asinh(z: complex):
+    return log(z + sqrt(z * z + 1))
+
+def atanh(z: complex):
+    return 1 / 2 * log((1 + z) / (1 - z))
+
+def cosh(z: complex):
+    return (exp(z) + exp(-z)) / 2
+
+def sinh(z: complex):
+    return (exp(z) - exp(-z)) / 2
+
+def tanh(z: complex):
+    return sinh(z) / cosh(z)
+
+# Classification functions
+
+def isfinite(z: complex):
+    return math.isfinite(z.real) and math.isfinite(z.imag)
+
+def isinf(z: complex):
+    return math.isinf(z.real) or math.isinf(z.imag)
+
+def isnan(z: complex):
+    return math.isnan(z.real) or math.isnan(z.imag)
+
+def isclose(a: complex, b: complex):
+    return math.isclose(a.real, b.real) and math.isclose(a.imag, b.imag)
+
+# Constants
+
+pi = math.pi
+e = math.e
+tau = 2 * pi
+inf = math.inf
+infj = complex(0, inf)
+nan = math.nan
+nanj = complex(0, nan)
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/collections/index.html b/modules/collections/index.html new file mode 100644 index 00000000..31c8e9bf --- /dev/null +++ b/modules/collections/index.html @@ -0,0 +1,509 @@ + + + + + + + + + + + + + collections | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + collections +

+
+ +

+ # + collections.Counter(iterable) +

+
+

Return a dict containing the counts of each element in iterable.

+ +

+ # + collections.deque +

+
+

A double-ended queue.

+ +

+ # + collections.defaultdict +

+
+

A dictionary that returns a default value when a key is not found.

+ +

+ # + Source code +

+
+
+
from typing import TypeVar, Iterable
+
+def Counter[T](iterable: Iterable[T]):
+    a: dict[T, int] = {}
+    for x in iterable:
+        if x in a:
+            a[x] += 1
+        else:
+            a[x] = 1
+    return a
+
+
+class defaultdict(dict):
+    def __init__(self, default_factory, *args):
+        super().__init__(*args)
+        self.default_factory = default_factory
+
+    def __missing__(self, key):
+        self[key] = self.default_factory()
+        return self[key]
+
+    def __repr__(self) -> str:
+        return f"defaultdict({self.default_factory}, {super().__repr__()})"
+
+    def copy(self):
+        return defaultdict(self.default_factory, self)
+
+
+class deque[T]:
+    _head: int
+    _tail: int
+    _maxlen: int | None
+    _capacity: int
+    _data: list[T]
+
+    def __init__(self, iterable: Iterable[T] = None, maxlen: int | None = None):
+        if maxlen is not None:
+            assert maxlen > 0
+
+        self._head = 0
+        self._tail = 0
+        self._maxlen = maxlen
+        self._capacity = 8 if maxlen is None else maxlen + 1
+        self._data = [None] * self._capacity # type: ignore
+
+        if iterable is not None:
+            self.extend(iterable)
+
+    @property
+    def maxlen(self) -> int | None:
+        return self._maxlen
+
+    def __resize_2x(self):
+        backup = list(self)
+        self._capacity *= 2
+        self._head = 0
+        self._tail = len(backup)
+        self._data.clear()
+        self._data.extend(backup)
+        self._data.extend([None] * (self._capacity - len(backup)))
+
+    def append(self, x: T):
+        if (self._tail + 1) % self._capacity == self._head:
+            if self._maxlen is None:
+                self.__resize_2x()
+            else:
+                self.popleft()
+        self._data[self._tail] = x
+        self._tail = (self._tail + 1) % self._capacity
+
+    def appendleft(self, x: T):
+        if (self._tail + 1) % self._capacity == self._head:
+            if self._maxlen is None:
+                self.__resize_2x()
+            else:
+                self.pop()
+        self._head = (self._head - 1) % self._capacity
+        self._data[self._head] = x
+
+    def copy(self):
+        return deque(self, maxlen=self.maxlen)
+
+    def count(self, x: T) -> int:
+        n = 0
+        for item in self:
+            if item == x:
+                n += 1
+        return n
+
+    def extend(self, iterable: Iterable[T]):
+        for x in iterable:
+            self.append(x)
+
+    def extendleft(self, iterable: Iterable[T]):
+        for x in iterable:
+            self.appendleft(x)
+
+    def pop(self) -> T:
+        if self._head == self._tail:
+            raise IndexError("pop from an empty deque")
+        self._tail = (self._tail - 1) % self._capacity
+        x = self._data[self._tail]
+        self._data[self._tail] = None
+        return x
+
+    def popleft(self) -> T:
+        if self._head == self._tail:
+            raise IndexError("pop from an empty deque")
+        x = self._data[self._head]
+        self._data[self._head] = None
+        self._head = (self._head + 1) % self._capacity
+        return x
+
+    def clear(self):
+        i = self._head
+        while i != self._tail:
+            self._data[i] = None # type: ignore
+            i = (i + 1) % self._capacity
+        self._head = 0
+        self._tail = 0
+
+    def rotate(self, n: int = 1):
+        if len(self) == 0:
+            return
+        if n > 0:
+            n = n % len(self)
+            for _ in range(n):
+                self.appendleft(self.pop())
+        elif n < 0:
+            n = -n % len(self)
+            for _ in range(n):
+                self.append(self.popleft())
+
+    def __len__(self) -> int:
+        return (self._tail - self._head) % self._capacity
+
+    def __contains__(self, x: object) -> bool:
+        for item in self:
+            if item == x:
+                return True
+        return False
+
+    def __iter__(self):
+        i = self._head
+        while i != self._tail:
+            yield self._data[i]
+            i = (i + 1) % self._capacity
+
+    def __eq__(self, other: object) -> bool:
+        if not isinstance(other, deque):
+            return NotImplemented
+        if len(self) != len(other):
+            return False
+        for x, y in zip(self, other):
+            if x != y:
+                return False
+        return True
+
+    def __ne__(self, other: object) -> bool:
+        if not isinstance(other, deque):
+            return NotImplemented
+        return not self == other
+
+    def __repr__(self) -> str:
+        if self.maxlen is None:
+            return f"deque({list(self)!r})"
+        return f"deque({list(self)!r}, maxlen={self.maxlen})"
+
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/cute_png/index.html b/modules/cute_png/index.html new file mode 100644 index 00000000..ac543eeb --- /dev/null +++ b/modules/cute_png/index.html @@ -0,0 +1,367 @@ + + + + + + + + + + + + + cute_png | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + cute_png +

+
+
+
+ +
+

Wraps cute_png.h for PNG image loading and saving.

+ +

+ # + Source code +

+
+
+
from array2d import array2d
+from vmath import color32, vec2i
+
+class Image:
+    @property
+    def width(self) -> int: ...
+    @property
+    def height(self) -> int: ...
+
+    def __new__(cls, width: int, height: int) -> "Image": ...
+
+    @staticmethod
+    def from_bytes(data: bytes) -> "Image": ...
+    @staticmethod
+    def from_file(path: str) -> "Image": ...
+
+    def setpixel(self, x: int, y: int, color: color32) -> None: ...
+    def getpixel(self, x: int, y: int) -> color32: ...
+    def clear(self, color: color32) -> None: ...
+
+    def paste(self, src_img: "Image", src_pos: vec2i, dst_pos: vec2i, width: int, height: int, fg: color32, bg: color32) -> None: ...
+
+    def to_png_bytes(self) -> bytes: ...
+    def to_png_file(self, path: str) -> int: ...
+    def to_rgb565_file(self, path: str) -> int: ...
+
+
+def loads(data: bytes) -> array2d[color32]: ...
+def dumps(image: array2d[color32]) -> bytes: ...
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/dataclasses/index.html b/modules/dataclasses/index.html new file mode 100644 index 00000000..6d61ed99 --- /dev/null +++ b/modules/dataclasses/index.html @@ -0,0 +1,409 @@ + + + + + + + + + + + + + dataclasses | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + dataclasses +

+
+ +

+ # + dataclasses.dataclass +

+
+

A decorator that is used to add special method to classes, including __init__, __repr__ and __eq__.

+ +

+ # + dataclasses.asdict(obj) -> dict +

+
+

Convert a dataclass instance to a dictionary.

+ +

+ # + Source code +

+
+
+
def _get_annotations(cls: type):
+    inherits = []
+    while cls is not object:
+        inherits.append(cls)
+        cls = cls.__base__
+    inherits.reverse()
+    res = {}
+    for cls in inherits:
+        res.update(cls.__annotations__)
+    return res.keys()
+
+def _wrapped__init__(self, *args, **kwargs):
+    cls = type(self)
+    cls_d = cls.__dict__
+    fields = _get_annotations(cls)
+    i = 0   # index into args
+    for field in fields:
+        if field in kwargs:
+            setattr(self, field, kwargs.pop(field))
+        else:
+            if i < len(args):
+                setattr(self, field, args[i])
+                i += 1
+            elif field in cls_d:    # has default value
+                setattr(self, field, cls_d[field])
+            else:
+                raise TypeError(f"{cls.__name__} missing required argument {field!r}")
+    if len(args) > i:
+        raise TypeError(f"{cls.__name__} takes {len(fields)} positional arguments but {len(args)} were given")
+    if len(kwargs) > 0:
+        raise TypeError(f"{cls.__name__} got an unexpected keyword argument {next(iter(kwargs))!r}")
+
+def _wrapped__repr__(self):
+    fields = _get_annotations(type(self))
+    obj_d = self.__dict__
+    args: list = [f"{field}={obj_d[field]!r}" for field in fields]
+    return f"{type(self).__name__}({', '.join(args)})"
+
+def _wrapped__eq__(self, other):
+    if type(self) is not type(other):
+        return False
+    fields = _get_annotations(type(self))
+    for field in fields:
+        if getattr(self, field) != getattr(other, field):
+            return False
+    return True
+
+def _wrapped__ne__(self, other):
+    return not self.__eq__(other)
+
+def dataclass(cls: type):
+    assert type(cls) is type
+    cls_d = cls.__dict__
+    if '__init__' not in cls_d:
+        cls.__init__ = _wrapped__init__
+    if '__repr__' not in cls_d:
+        cls.__repr__ = _wrapped__repr__
+    if '__eq__' not in cls_d:
+        cls.__eq__ = _wrapped__eq__
+    if '__ne__' not in cls_d:
+        cls.__ne__ = _wrapped__ne__
+    fields = _get_annotations(cls)
+    has_default = False
+    for field in fields:
+        if field in cls_d:
+            has_default = True
+        else:
+            if has_default:
+                raise TypeError(f"non-default argument {field!r} follows default argument")
+    return cls
+
+def asdict(obj) -> dict:
+    fields = _get_annotations(type(obj))
+    obj_d = obj.__dict__
+    return {field: obj_d[field] for field in fields}
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/datetime/index.html b/modules/datetime/index.html new file mode 100644 index 00000000..4f0b1099 --- /dev/null +++ b/modules/datetime/index.html @@ -0,0 +1,466 @@ + + + + + + + + + + + + + datetime | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + datetime +

+
+ +

+ # + datetime.now() +

+
+

Returns the current date and time as a datetime object.

+ +

+ # + date.today() +

+
+

Returns the current local date as a date object.

+ +

+ # + Source code +

+
+
+
from time import localtime
+import operator
+
+class timedelta:
+    def __init__(self, days=0, seconds=0):
+        self.days = days
+        self.seconds = seconds
+
+    def __repr__(self):
+        return f"datetime.timedelta(days={self.days}, seconds={self.seconds})"
+
+    def __eq__(self, other) -> bool:
+        if not isinstance(other, timedelta):
+            return NotImplemented
+        return (self.days, self.seconds) == (other.days, other.seconds)
+
+    def __ne__(self, other) -> bool:
+        if not isinstance(other, timedelta):
+            return NotImplemented
+        return (self.days, self.seconds) != (other.days, other.seconds)
+
+
+class date:
+    def __init__(self, year: int, month: int, day: int):
+        self.year = year
+        self.month = month
+        self.day = day
+
+    @staticmethod
+    def today():
+        t = localtime()
+        return date(t.tm_year, t.tm_mon, t.tm_mday)
+
+    def __cmp(self, other, op):
+        if not isinstance(other, date):
+            return NotImplemented
+        if self.year != other.year:
+            return op(self.year, other.year)
+        if self.month != other.month:
+            return op(self.month, other.month)
+        return op(self.day, other.day)
+
+    def __eq__(self, other) -> bool:
+        return self.__cmp(other, operator.eq)
+
+    def __ne__(self, other) -> bool:
+        return self.__cmp(other, operator.ne)
+
+    def __lt__(self, other: 'date') -> bool:
+        return self.__cmp(other, operator.lt)
+
+    def __le__(self, other: 'date') -> bool:
+        return self.__cmp(other, operator.le)
+
+    def __gt__(self, other: 'date') -> bool:
+        return self.__cmp(other, operator.gt)
+
+    def __ge__(self, other: 'date') -> bool:
+        return self.__cmp(other, operator.ge)
+
+    def __str__(self):
+        return f"{self.year}-{self.month:02}-{self.day:02}"
+
+    def __repr__(self):
+        return f"datetime.date({self.year}, {self.month}, {self.day})"
+
+
+class datetime(date):
+    def __init__(self, year: int, month: int, day: int, hour: int, minute: int, second: int):
+        super().__init__(year, month, day)
+        # Validate and set hour, minute, and second
+        if not 0 <= hour <= 23:
+            raise ValueError("Hour must be between 0 and 23")
+        self.hour = hour
+        if not 0 <= minute <= 59:
+            raise ValueError("Minute must be between 0 and 59")
+        self.minute = minute
+        if not 0 <= second <= 59:
+            raise ValueError("Second must be between 0 and 59")
+        self.second = second
+
+    def date(self) -> date:
+        return date(self.year, self.month, self.day)
+
+    @staticmethod
+    def now():
+        t = localtime()
+        tm_sec = t.tm_sec
+        if tm_sec == 60:
+            tm_sec = 59
+        return datetime(t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, tm_sec)
+
+    def __str__(self):
+        return f"{self.year}-{self.month:02}-{self.day:02} {self.hour:02}:{self.minute:02}:{self.second:02}"
+
+    def __repr__(self):
+        return f"datetime.datetime({self.year}, {self.month}, {self.day}, {self.hour}, {self.minute}, {self.second})"
+
+    def __cmp(self, other, op):
+        if not isinstance(other, datetime):
+            return NotImplemented
+        if self.year != other.year:
+            return op(self.year, other.year)
+        if self.month != other.month:
+            return op(self.month, other.month)
+        if self.day != other.day:
+            return op(self.day, other.day)
+        if self.hour != other.hour:
+            return op(self.hour, other.hour)
+        if self.minute != other.minute:
+            return op(self.minute, other.minute)
+        return op(self.second, other.second)
+
+    def __eq__(self, other) -> bool:
+        return self.__cmp(other, operator.eq)
+
+    def __ne__(self, other) -> bool:
+        return self.__cmp(other, operator.ne)
+
+    def __lt__(self, other) -> bool:
+        return self.__cmp(other, operator.lt)
+
+    def __le__(self, other) -> bool:
+        return self.__cmp(other, operator.le)
+
+    def __gt__(self, other) -> bool:
+        return self.__cmp(other, operator.gt)
+
+    def __ge__(self, other) -> bool:
+        return self.__cmp(other, operator.ge)
+
+
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/easing/index.html b/modules/easing/index.html new file mode 100644 index 00000000..b4effa55 --- /dev/null +++ b/modules/easing/index.html @@ -0,0 +1,345 @@ + + + + + + + + + + + + + easing | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + easing +

+
+

Python wrapper for easing functions.

+
    +
  • easing.Linear(t: float) -> float
  • +
  • easing.InSine(t: float) -> float
  • +
  • easing.OutSine(t: float) -> float
  • +
  • easing.InOutSine(t: float) -> float
  • +
  • easing.InQuad(t: float) -> float
  • +
  • easing.OutQuad(t: float) -> float
  • +
  • easing.InOutQuad(t: float) -> float
  • +
  • easing.InCubic(t: float) -> float
  • +
  • easing.OutCubic(t: float) -> float
  • +
  • easing.InOutCubic(t: float) -> float
  • +
  • easing.InQuart(t: float) -> float
  • +
  • easing.OutQuart(t: float) -> float
  • +
  • easing.InOutQuart(t: float) -> float
  • +
  • easing.InQuint(t: float) -> float
  • +
  • easing.OutQuint(t: float) -> float
  • +
  • easing.InOutQuint(t: float) -> float
  • +
  • easing.InExpo(t: float) -> float
  • +
  • easing.OutExpo(t: float) -> float
  • +
  • easing.InOutExpo(t: float) -> float
  • +
  • easing.InCirc(t: float) -> float
  • +
  • easing.OutCirc(t: float) -> float
  • +
  • easing.InOutCirc(t: float) -> float
  • +
  • easing.InBack(t: float) -> float
  • +
  • easing.OutBack(t: float) -> float
  • +
  • easing.InOutBack(t: float) -> float
  • +
  • easing.InElastic(t: float) -> float
  • +
  • easing.OutElastic(t: float) -> float
  • +
  • easing.InOutElastic(t: float) -> float
  • +
  • easing.InBounce(t: float) -> float
  • +
  • easing.OutBounce(t: float) -> float
  • +
  • easing.InOutBounce(t: float) -> float
  • +
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/enum/index.html b/modules/enum/index.html new file mode 100644 index 00000000..28d15efc --- /dev/null +++ b/modules/enum/index.html @@ -0,0 +1,332 @@ + + + + + + + + + + + + + enum | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + enum +

+
+ +

+ # + enum.Enum +

+
+

Base class for creating enumerated constants.

+

Example:

+
+
from enum import Enum
+
+class Color(Enum):
+    RED = 1
+    GREEN = 2
+    BLUE = 3
+
+print(Color.RED)    # Color.RED
+print(Color.RED.name)    # 'RED'
+print(Color.RED.value)    # 1
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/functools/index.html b/modules/functools/index.html new file mode 100644 index 00000000..5ad51cdd --- /dev/null +++ b/modules/functools/index.html @@ -0,0 +1,403 @@ + + + + + + + + + + + + + functools | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + functools +

+
+ +

+ # + functools.cache +

+
+

A decorator that caches a function's return value each time it is called. If called later with the same arguments, the cached value is returned, and not re-evaluated.

+ +

+ # + functools.lru_cache(maxsize=128) +

+
+

A decorator that wraps a function with a memoizing callable that saves up to the maxsize most recent calls.

+ +

+ # + functools.reduce(function, sequence, initial=...) +

+
+

Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, functools.reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). The left argument, x, is the accumulated value and the right argument, y, is the update value from the sequence. If the optional initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty.

+ +

+ # + functools.partial(f, *args, **kwargs) +

+
+

Return a new partial object which when called will behave like f called with the positional arguments args and keyword arguments kwargs. If more arguments are supplied to the call, they are appended to args. If additional keyword arguments are supplied, they extend and override kwargs.

+ +

+ # + Source code +

+
+
+
class cache:
+    def __init__(self, f):
+        self.f = f
+        self.cache = {}
+
+    def __call__(self, *args):
+        if args not in self.cache:
+            self.cache[args] = self.f(*args)
+        return self.cache[args]
+
+class lru_cache:
+    def __init__(self, maxsize=128):
+        self.maxsize = maxsize
+        self.cache = {}
+
+    def __call__(self, f):
+        def wrapped(*args):
+            if args in self.cache:
+                res = self.cache.pop(args)
+                self.cache[args] = res
+                return res
+
+            res = f(*args)
+            if len(self.cache) >= self.maxsize:
+                first_key = next(iter(self.cache))
+                self.cache.pop(first_key)
+            self.cache[args] = res
+            return res
+        return wrapped
+
+def reduce(function, sequence, initial=...):
+    it = iter(sequence)
+    if initial is ...:
+        try:
+            value = next(it)
+        except StopIteration:
+            raise TypeError("reduce() of empty sequence with no initial value")
+    else:
+        value = initial
+    for element in it:
+        value = function(value, element)
+    return value
+
+class partial:
+    def __init__(self, f, *args, **kwargs):
+        self.f = f
+        if not callable(f):
+            raise TypeError("the first argument must be callable")
+        self.args = args
+        self.kwargs = kwargs
+
+    def __call__(self, *args, **kwargs):
+        kwargs.update(self.kwargs)
+        return self.f(*self.args, *args, **kwargs)
+
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/gc/index.html b/modules/gc/index.html new file mode 100644 index 00000000..35e49576 --- /dev/null +++ b/modules/gc/index.html @@ -0,0 +1,348 @@ + + + + + + + + + + + + + gc | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + gc +

+
+

Garbage collection interface module.

+ +

+ # + Source code +

+
+
+
from typing import Callable, Literal
+
+def isenabled() -> bool:
+    """Check if automatic garbage collection is enabled."""
+
+def enable() -> None:
+    """Enable automatic garbage collection."""
+
+def disable() -> None:
+    """Disable automatic garbage collection."""
+
+def collect() -> int:
+    """Run a full collection immediately.
+
+    Returns an integer indicating the number of unreachable objects found.
+    """
+
+def collect_hint() -> int:
+    """Hint the garbage collector to run a collection.
+
+    The typical usage scenario for this function is in frame-driven games,
+    where `gc.disable()` is called at the start of the game,
+    and `gc.collect_hint()` is called at the end of each frame.
+    """
+
+def setup_debug_callback(cb: Callable[[Literal['start', 'stop'], str], None] | None) -> None:
+    """Setup a callback that will be triggered at the end of each collection."""
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/heapq/index.html b/modules/heapq/index.html new file mode 100644 index 00000000..59d86011 --- /dev/null +++ b/modules/heapq/index.html @@ -0,0 +1,441 @@ + + + + + + + + + + + + + heapq | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + heapq +

+
+ +

+ # + heapq.heappush(heap, item) +

+
+

Push the value item onto the heap, maintaining the heap invariant.

+ +

+ # + heapq.heappop(heap) +

+
+

Pop and return the smallest item from the heap, maintaining the heap invariant. If the heap is empty, IndexError is raised. To access the smallest item without popping it, use heap[0].

+ +

+ # + heapq.heapify(x) +

+
+

Transform list x into a heap, in-place, in linear time.

+ +

+ # + heapq.heappushpop(heap, item) +

+
+

Push item on the heap, then pop and return the smallest item from the heap. The combined action runs more efficiently than heappush() followed by a separate heappop().

+ +

+ # + heapq.heapreplace(heap, item) +

+
+

Pop and return the smallest item from the heap, and also push the new item. The heap size doesn’t change. If the heap is empty, IndexError is raised.

+ +

+ # + Source code +

+
+
+
# Heap queue algorithm (a.k.a. priority queue)
+def heappush(heap, item):
+    """Push item onto heap, maintaining the heap invariant."""
+    heap.append(item)
+    _siftdown(heap, 0, len(heap)-1)
+
+def heappop(heap):
+    """Pop the smallest item off the heap, maintaining the heap invariant."""
+    lastelt = heap.pop()    # raises appropriate IndexError if heap is empty
+    if heap:
+        returnitem = heap[0]
+        heap[0] = lastelt
+        _siftup(heap, 0)
+        return returnitem
+    return lastelt
+
+def heapreplace(heap, item):
+    """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 uses of
+    this routine unless written as part of a conditional replacement:
+
+        if item > heap[0]:
+            item = heapreplace(heap, item)
+    """
+    returnitem = heap[0]    # raises appropriate IndexError if heap is empty
+    heap[0] = item
+    _siftup(heap, 0)
+    return returnitem
+
+def heappushpop(heap, item):
+    """Fast version of a heappush followed by a heappop."""
+    if heap and heap[0] < item:
+        item, heap[0] = heap[0], item
+        _siftup(heap, 0)
+    return item
+
+def heapify(x):
+    """Transform list into a heap, in-place, in O(len(x)) time."""
+    n = len(x)
+    # Transform bottom-up.  The largest index there's any point to looking at
+    # is the largest with a child index in-range, so must have 2*i + 1 < n,
+    # or i < (n-1)/2.  If n is even = 2*j, this is (2*j-1)/2 = j-1/2 so
+    # j-1 is the largest, which is n//2 - 1.  If n is odd = 2*j+1, this is
+    # (2*j+1-1)/2 = j so j-1 is the largest, and that's again n//2-1.
+    for i in reversed(range(n//2)):
+        _siftup(x, i)
+
+# 'heap' is a heap at all indices >= startpos, except possibly for pos.  pos
+# is the index of a leaf with a possibly out-of-order value.  Restore the
+# heap invariant.
+def _siftdown(heap, startpos, pos):
+    newitem = heap[pos]
+    # Follow the path to the root, moving parents down until finding a place
+    # newitem fits.
+    while pos > startpos:
+        parentpos = (pos - 1) >> 1
+        parent = heap[parentpos]
+        if newitem < parent:
+            heap[pos] = parent
+            pos = parentpos
+            continue
+        break
+    heap[pos] = newitem
+
+def _siftup(heap, pos):
+    endpos = len(heap)
+    startpos = pos
+    newitem = heap[pos]
+    # Bubble up the smaller child until hitting a leaf.
+    childpos = 2*pos + 1    # leftmost child position
+    while childpos < endpos:
+        # Set childpos to index of smaller child.
+        rightpos = childpos + 1
+        if rightpos < endpos and not heap[childpos] < heap[rightpos]:
+            childpos = rightpos
+        # Move the smaller child up.
+        heap[pos] = heap[childpos]
+        pos = childpos
+        childpos = 2*pos + 1
+    # The leaf at pos is empty now.  Put newitem there, and bubble it up
+    # to its final resting place (by sifting its parents down).
+    heap[pos] = newitem
+    _siftdown(heap, startpos, pos)
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/importlib/index.html b/modules/importlib/index.html new file mode 100644 index 00000000..27eef254 --- /dev/null +++ b/modules/importlib/index.html @@ -0,0 +1,318 @@ + + + + + + + + + + + + + importlib | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + importlib +

+
+ +

+ # + importlib.reload(module) +

+
+

Reload a previously imported module. The argument must be a module object, so it must have been successfully imported before. This is useful if you have edited the module source file using an external editor and want to try out the new version without leaving the Python interpreter. The return value is the module object (the same as the argument).

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/json/index.html b/modules/json/index.html new file mode 100644 index 00000000..38035f2f --- /dev/null +++ b/modules/json/index.html @@ -0,0 +1,331 @@ + + + + + + + + + + + + + json | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + json +

+
+

JSON serialization and deserialization module.

+

This module is not safe. You may not want to use it with untrusted data. +If you need a safe alternative, consider a 3rd-party library like cjson.

+

You can override the json functions with:

+
+
py_GlobalRef mod = py_getmodule("json");
+py_bindfunc(mod, "loads", _safe_json_loads);
+py_bindfunc(mod, "dumps", _safe_json_dumps);
+
+ +

+ # + Source code +

+
+
+
def loads(s: str): ...
+def dumps(obj, indent=0): ...
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/lz4/index.html b/modules/lz4/index.html new file mode 100644 index 00000000..9741aac3 --- /dev/null +++ b/modules/lz4/index.html @@ -0,0 +1,349 @@ + + + + + + + + + + + + + lz4 | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + lz4 +

+
+
+
+ +
+

LZ4 compression and decompression.

+ +

+ # + Source code +

+
+
+
def compress(data: bytes) -> bytes:
+    """Compress the given data into LZ4 block format.
+
+    This function is equivalent to `lz4.block.compress` of https://pypi.org/project/lz4/.
+    """
+
+def decompress(data: bytes) -> bytes:
+    """Decompress the given LZ4 block format data produced by `lz4.compress()`.
+
+    This function is equivalent to `lz4.block.decompress` of https://pypi.org/project/lz4/.
+    """
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/math/index.html b/modules/math/index.html new file mode 100644 index 00000000..6c240095 --- /dev/null +++ b/modules/math/index.html @@ -0,0 +1,534 @@ + + + + + + + + + + + + + math | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + math +

+
+ +

+ # + math.pi +

+
+

3.141592653589793

+ +

+ # + math.e +

+
+

2.718281828459045

+ +

+ # + math.inf +

+
+

The inf.

+ +

+ # + math.nan +

+
+

The nan.

+ +

+ # + math.ceil(x) +

+
+

Return the ceiling of x as a float, the smallest integer value greater than or equal to x.

+ +

+ # + math.fabs(x) +

+
+

Return the absolute value of x.

+ +

+ # + math.floor(x) +

+
+

Return the floor of x as a float, the largest integer value less than or equal to x.

+ +

+ # + math.fsum(iterable) +

+
+

Return an accurate floating point sum of values in the iterable. Avoids loss of precision by tracking multiple intermediate partial sums:

+
+
>>> sum([0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1])
+0.9999999999999999
+>>> fsum([0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1])
+1.0
+
+ +

+ # + math.gcd(a, b) +

+
+

Return the greatest common divisor of the integers a and b.

+ +

+ # + math.isfinite(x) +

+
+

Return True if x is neither an infinity nor a NaN, and False otherwise.

+ +

+ # + math.isinf(x) +

+
+

Return True if x is a positive or negative infinity, and False otherwise.

+ +

+ # + math.isnan(x) +

+
+

Return True if x is a NaN (not a number), and False otherwise.

+ +

+ # + math.isclose(a, b) +

+
+

Return True if the values a and b are close to each other and False otherwise.

+ +

+ # + math.exp(x) +

+
+

Return e raised to the power of x.

+ +

+ # + math.log(x) +

+
+

Return the natural logarithm of x (to base e).

+ +

+ # + math.log2(x) +

+
+

Return the base-2 logarithm of x. This is usually more accurate than log(x, 2).

+ +

+ # + math.log10(x) +

+
+

Return the base-10 logarithm of x. This is usually more accurate than log(x, 10).

+ +

+ # + math.pow(x, y) +

+
+

Return x raised to the power y.

+ +

+ # + math.sqrt(x) +

+
+

Return the square root of x.

+ +

+ # + math.acos(x) +

+
+

Return the arc cosine of x, in radians.

+ +

+ # + math.asin(x) +

+
+

Return the arc sine of x, in radians.

+ +

+ # + math.atan(x) +

+
+

Return the arc tangent of x, in radians.

+ +

+ # + math.atan2(y, x) +

+
+

Return atan(y / x), in radians. The result is between -pi and pi. The vector in the plane from the origin to point (x, y) makes this angle with the positive X axis. The point of atan2() is that the signs of both inputs are known to it, so it can compute the correct quadrant for the angle. For example, atan(1) and atan2(1, 1) are both pi/4, but atan2(-1, -1) is -3*pi/4.

+ +

+ # + math.cos(x) +

+
+

Return the cosine of x radians.

+ +

+ # + math.sin(x) +

+
+

Return the sine of x radians.

+ +

+ # + math.tan(x) +

+
+

Return the tangent of x radians.

+ +

+ # + math.degrees(x) +

+
+

Convert angle x from radians to degrees.

+ +

+ # + math.radians(x) +

+
+

Convert angle x from degrees to radians.

+ +

+ # + math.modf(x) +

+
+

Return the fractional and integer parts of x. Both results carry the sign of x and are floats.

+ +

+ # + math.copysign(x, y) +

+
+

Return a float with the magnitude (absolute value) of x but the sign of y.

+ +

+ # + math.factorial(x) +

+
+

Return x factorial as an integer.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/msgpack/index.html b/modules/msgpack/index.html new file mode 100644 index 00000000..454945bb --- /dev/null +++ b/modules/msgpack/index.html @@ -0,0 +1,342 @@ + + + + + + + + + + + + + msgpack | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + msgpack +

+
+
+
+ +
+ +

+ # + msgpack.loads(data: bytes) +

+
+

Decode a msgpack bytes into a python object.

+ +

+ # + msgpack.dumps(obj) -> bytes +

+
+

Encode a python object into a msgpack bytes.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/operator/index.html b/modules/operator/index.html new file mode 100644 index 00000000..62a95647 --- /dev/null +++ b/modules/operator/index.html @@ -0,0 +1,550 @@ + + + + + + + + + + + + + operator | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + operator +

+
+

The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y. Many function names are those used for special methods, without the double underscores.

+ +

+ # + Mapping Operators to Functions +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OperationSyntaxFunction
Orderinga <= ble(a, b)
Orderinga < blt(a, b)
Orderinga >= bge(a, b)
Orderinga > bgt(a, b)
Equalitya == beq(a, b)
Equalitya != bne(a, b)
Bitwise ANDa & band_(a, b)
Bitwise ORa | bor_(a, b)
Bitwise XORa ^ bxor(a, b)
Bitwise Inversion~ainvert(a)
Left Shifta << blshift(a, b)
Right Shifta >> brshift(a, b)
Identitya is bis_(a, b)
Identitya is not bis_not(a, b)
Negation (Logical)not anot_(a)
Negation (Arithmetic)-aneg(a)
Truth Testbool(a)truth(a)
Containment Testb in acontains(a, b)
Additiona + badd(a, b)
Subtractiona - bsub(a, b)
Multiplicationa * bmul(a, b)
Divisiona / btruediv(a, b)
Divisiona // bfloordiv(a, b)
Moduloa % bmod(a, b)
Exponentiationa ** bpow(a, b)
Matrix Multiplicationa @ bmatmul(a, b)
Indexinga[b]getitem(a, b)
Index Assignmenta[b] = csetitem(a, b, c)
Index Deletiondel a[b]delitem(a, b)
+
+ +

+ # + In-place Operators +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OperationSyntaxFunction
Additiona += biadd(a, b)
Subtractiona -= bisub(a, b)
Multiplicationa *= bimul(a, b)
Divisiona /= bitruediv(a, b)
Divisiona //= bifloordiv(a, b)
Moduloa %= bimod(a, b)
Bitwise ANDa &= biand(a, b)
Bitwise ORa |= bior(a, b)
Bitwise XORa ^= bixor(a, b)
Left Shifta <<= bilshift(a, b)
Right Shifta >>= birshift(a, b)
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/periphery/index.html b/modules/periphery/index.html new file mode 100644 index 00000000..b9139840 --- /dev/null +++ b/modules/periphery/index.html @@ -0,0 +1,920 @@ + + + + + + + + + + + + + periphery | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + periphery +

+
+
+
+ +
+ +

+ # + Source code +

+
+
+
from typing import overload
+from stdc import intptr
+
+class gpio_config:
+    direction: int #  (gpio_direction_t)
+    edge: int #  (gpio_edge_t)
+    event_clock: int #  (gpio_event_clock_t)
+    debounce_us: int #  (uint32_t)
+    bias: int #  (gpio_bias_t)
+    drive: int #  (gpio_drive_t)
+    inverted: bool #  (bool)
+    label: str #  (const char*)
+
+    @overload
+    def __init__(self): ...
+    @overload
+    def __init__(self, direction: int, edge: int, event_clock: int, debounce_us: int, bias: int, drive: int, inverted: bool, label: str): ...
+
+class spi_msg:
+    txbuf: intptr #  (const uint8_t*)
+    rxbuf: intptr #  (uint8_t*)
+    len: int #  (size_t)
+    deselect: bool #  (bool)
+    deselect_delay_us: int #  (uint16_t)
+    word_delay_us: int #  (uint8_t)
+
+    @overload
+    def __init__(self): ...
+    @overload
+    def __init__(self, txbuf: intptr, rxbuf: intptr, len: int, deselect: bool, deselect_delay_us: int, word_delay_us: int): ...
+
+class periphery_version:
+    major: int #  (unsigned)
+    minor: int #  (unsigned)
+    patch: int #  (unsigned)
+    commit_id: str #  (const char*)
+
+    @overload
+    def __init__(self): ...
+    @overload
+    def __init__(self, major: int, minor: int, patch: int, commit_id: str): ...
+
+def gpio_new() -> intptr:
+    """Wraps `gpio_t* gpio_new()`"""
+
+def gpio_open(gpio: intptr, path: str, line: int, direction: int, /) -> int:
+    """Wraps `int gpio_open(gpio_t* gpio, const char* path, unsigned line, gpio_direction_t direction)`"""
+
+def gpio_open_name(gpio: intptr, path: str, name: str, direction: int, /) -> int:
+    """Wraps `int gpio_open_name(gpio_t* gpio, const char* path, const char* name, gpio_direction_t direction)`"""
+
+def gpio_open_advanced(gpio: intptr, path: str, line: int, config: intptr, /) -> int:
+    """Wraps `int gpio_open_advanced(gpio_t* gpio, const char* path, unsigned line, const gpio_config_t* config)`"""
+
+def gpio_open_name_advanced(gpio: intptr, path: str, name: str, config: intptr, /) -> int:
+    """Wraps `int gpio_open_name_advanced(gpio_t* gpio, const char* path, const char* name, const gpio_config_t* config)`"""
+
+def gpio_open_sysfs(gpio: intptr, line: int, direction: int, /) -> int:
+    """Wraps `int gpio_open_sysfs(gpio_t* gpio, unsigned line, gpio_direction_t direction)`"""
+
+def gpio_read(gpio: intptr, value: intptr, /) -> int:
+    """Wraps `int gpio_read(gpio_t* gpio, bool* value)`"""
+
+def gpio_write(gpio: intptr, value: bool, /) -> int:
+    """Wraps `int gpio_write(gpio_t* gpio, bool value)`"""
+
+def gpio_poll(gpio: intptr, timeout_ms: int, /) -> int:
+    """Wraps `int gpio_poll(gpio_t* gpio, int timeout_ms)`"""
+
+def gpio_close(gpio: intptr, /) -> int:
+    """Wraps `int gpio_close(gpio_t* gpio)`"""
+
+def gpio_free(gpio: intptr, /) -> None:
+    """Wraps `void gpio_free(gpio_t* gpio)`"""
+
+def gpio_read_event(gpio: intptr, edge: intptr, timestamp: intptr, /) -> int:
+    """Wraps `int gpio_read_event(gpio_t* gpio, gpio_edge_t* edge, uint64_t* timestamp)`"""
+
+def gpio_poll_multiple(gpios: intptr, count: int, timeout_ms: int, gpios_ready: intptr, /) -> int:
+    """Wraps `int gpio_poll_multiple(gpio_t** gpios, size_t count, int timeout_ms, bool* gpios_ready)`"""
+
+def gpio_get_direction(gpio: intptr, direction: intptr, /) -> int:
+    """Wraps `int gpio_get_direction(gpio_t* gpio, gpio_direction_t* direction)`"""
+
+def gpio_get_edge(gpio: intptr, edge: intptr, /) -> int:
+    """Wraps `int gpio_get_edge(gpio_t* gpio, gpio_edge_t* edge)`"""
+
+def gpio_get_event_clock(gpio: intptr, event_clock: intptr, /) -> int:
+    """Wraps `int gpio_get_event_clock(gpio_t* gpio, gpio_event_clock_t* event_clock)`"""
+
+def gpio_get_debounce_us(gpio: intptr, debounce_us: intptr, /) -> int:
+    """Wraps `int gpio_get_debounce_us(gpio_t* gpio, uint32_t* debounce_us)`"""
+
+def gpio_get_bias(gpio: intptr, bias: intptr, /) -> int:
+    """Wraps `int gpio_get_bias(gpio_t* gpio, gpio_bias_t* bias)`"""
+
+def gpio_get_drive(gpio: intptr, drive: intptr, /) -> int:
+    """Wraps `int gpio_get_drive(gpio_t* gpio, gpio_drive_t* drive)`"""
+
+def gpio_get_inverted(gpio: intptr, inverted: intptr, /) -> int:
+    """Wraps `int gpio_get_inverted(gpio_t* gpio, bool* inverted)`"""
+
+def gpio_set_direction(gpio: intptr, direction: int, /) -> int:
+    """Wraps `int gpio_set_direction(gpio_t* gpio, gpio_direction_t direction)`"""
+
+def gpio_set_edge(gpio: intptr, edge: int, /) -> int:
+    """Wraps `int gpio_set_edge(gpio_t* gpio, gpio_edge_t edge)`"""
+
+def gpio_set_event_clock(gpio: intptr, event_clock: int, /) -> int:
+    """Wraps `int gpio_set_event_clock(gpio_t* gpio, gpio_event_clock_t event_clock)`"""
+
+def gpio_set_debounce_us(gpio: intptr, debounce_us: int, /) -> int:
+    """Wraps `int gpio_set_debounce_us(gpio_t* gpio, uint32_t debounce_us)`"""
+
+def gpio_set_bias(gpio: intptr, bias: int, /) -> int:
+    """Wraps `int gpio_set_bias(gpio_t* gpio, gpio_bias_t bias)`"""
+
+def gpio_set_drive(gpio: intptr, drive: int, /) -> int:
+    """Wraps `int gpio_set_drive(gpio_t* gpio, gpio_drive_t drive)`"""
+
+def gpio_set_inverted(gpio: intptr, inverted: bool, /) -> int:
+    """Wraps `int gpio_set_inverted(gpio_t* gpio, bool inverted)`"""
+
+def gpio_line(gpio: intptr, /) -> int:
+    """Wraps `unsigned gpio_line(gpio_t* gpio)`"""
+
+def gpio_fd(gpio: intptr, /) -> int:
+    """Wraps `int gpio_fd(gpio_t* gpio)`"""
+
+def gpio_name(gpio: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int gpio_name(gpio_t* gpio, char* str, size_t len)`"""
+
+def gpio_label(gpio: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int gpio_label(gpio_t* gpio, char* str, size_t len)`"""
+
+def gpio_chip_fd(gpio: intptr, /) -> int:
+    """Wraps `int gpio_chip_fd(gpio_t* gpio)`"""
+
+def gpio_chip_name(gpio: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int gpio_chip_name(gpio_t* gpio, char* str, size_t len)`"""
+
+def gpio_chip_label(gpio: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int gpio_chip_label(gpio_t* gpio, char* str, size_t len)`"""
+
+def gpio_tostring(gpio: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int gpio_tostring(gpio_t* gpio, char* str, size_t len)`"""
+
+def gpio_errno(gpio: intptr, /) -> int:
+    """Wraps `int gpio_errno(gpio_t* gpio)`"""
+
+def gpio_errmsg(gpio: intptr, /) -> str:
+    """Wraps `const char* gpio_errmsg(gpio_t* gpio)`"""
+
+def led_new() -> intptr:
+    """Wraps `led_t* led_new()`"""
+
+def led_open(led: intptr, name: str, /) -> int:
+    """Wraps `int led_open(led_t* led, const char* name)`"""
+
+def led_read(led: intptr, value: intptr, /) -> int:
+    """Wraps `int led_read(led_t* led, bool* value)`"""
+
+def led_write(led: intptr, value: bool, /) -> int:
+    """Wraps `int led_write(led_t* led, bool value)`"""
+
+def led_close(led: intptr, /) -> int:
+    """Wraps `int led_close(led_t* led)`"""
+
+def led_free(led: intptr, /) -> None:
+    """Wraps `void led_free(led_t* led)`"""
+
+def led_get_brightness(led: intptr, brightness: intptr, /) -> int:
+    """Wraps `int led_get_brightness(led_t* led, unsigned* brightness)`"""
+
+def led_get_max_brightness(led: intptr, max_brightness: intptr, /) -> int:
+    """Wraps `int led_get_max_brightness(led_t* led, unsigned* max_brightness)`"""
+
+def led_get_trigger(led: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int led_get_trigger(led_t* led, char* str, size_t len)`"""
+
+def led_get_triggers_entry(led: intptr, index: int, str: intptr, len: int, /) -> int:
+    """Wraps `int led_get_triggers_entry(led_t* led, unsigned index, char* str, size_t len)`"""
+
+def led_get_triggers_count(led: intptr, count: intptr, /) -> int:
+    """Wraps `int led_get_triggers_count(led_t* led, unsigned* count)`"""
+
+def led_set_brightness(led: intptr, brightness: int, /) -> int:
+    """Wraps `int led_set_brightness(led_t* led, unsigned brightness)`"""
+
+def led_set_trigger(led: intptr, trigger: str, /) -> int:
+    """Wraps `int led_set_trigger(led_t* led, const char* trigger)`"""
+
+def led_name(led: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int led_name(led_t* led, char* str, size_t len)`"""
+
+def led_tostring(led: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int led_tostring(led_t* led, char* str, size_t len)`"""
+
+def led_errno(led: intptr, /) -> int:
+    """Wraps `int led_errno(led_t* led)`"""
+
+def led_errmsg(led: intptr, /) -> str:
+    """Wraps `const char* led_errmsg(led_t* led)`"""
+
+def mmio_new() -> intptr:
+    """Wraps `mmio_t* mmio_new()`"""
+
+def mmio_open(mmio: intptr, base: int, size: int, /) -> int:
+    """Wraps `int mmio_open(mmio_t* mmio, uintptr_t base, size_t size)`"""
+
+def mmio_open_advanced(mmio: intptr, base: int, size: int, path: str, /) -> int:
+    """Wraps `int mmio_open_advanced(mmio_t* mmio, uintptr_t base, size_t size, const char* path)`"""
+
+def mmio_ptr(mmio: intptr, /) -> intptr:
+    """Wraps `void* mmio_ptr(mmio_t* mmio)`"""
+
+def mmio_read64(mmio: intptr, offset: int, value: intptr, /) -> int:
+    """Wraps `int mmio_read64(mmio_t* mmio, uintptr_t offset, uint64_t* value)`"""
+
+def mmio_read32(mmio: intptr, offset: int, value: intptr, /) -> int:
+    """Wraps `int mmio_read32(mmio_t* mmio, uintptr_t offset, uint32_t* value)`"""
+
+def mmio_read16(mmio: intptr, offset: int, value: intptr, /) -> int:
+    """Wraps `int mmio_read16(mmio_t* mmio, uintptr_t offset, uint16_t* value)`"""
+
+def mmio_read8(mmio: intptr, offset: int, value: intptr, /) -> int:
+    """Wraps `int mmio_read8(mmio_t* mmio, uintptr_t offset, uint8_t* value)`"""
+
+def mmio_read(mmio: intptr, offset: int, buf: intptr, len: int, /) -> int:
+    """Wraps `int mmio_read(mmio_t* mmio, uintptr_t offset, uint8_t* buf, size_t len)`"""
+
+def mmio_write64(mmio: intptr, offset: int, value: int, /) -> int:
+    """Wraps `int mmio_write64(mmio_t* mmio, uintptr_t offset, uint64_t value)`"""
+
+def mmio_write32(mmio: intptr, offset: int, value: int, /) -> int:
+    """Wraps `int mmio_write32(mmio_t* mmio, uintptr_t offset, uint32_t value)`"""
+
+def mmio_write16(mmio: intptr, offset: int, value: int, /) -> int:
+    """Wraps `int mmio_write16(mmio_t* mmio, uintptr_t offset, uint16_t value)`"""
+
+def mmio_write8(mmio: intptr, offset: int, value: int, /) -> int:
+    """Wraps `int mmio_write8(mmio_t* mmio, uintptr_t offset, uint8_t value)`"""
+
+def mmio_write(mmio: intptr, offset: int, buf: intptr, len: int, /) -> int:
+    """Wraps `int mmio_write(mmio_t* mmio, uintptr_t offset, const uint8_t* buf, size_t len)`"""
+
+def mmio_close(mmio: intptr, /) -> int:
+    """Wraps `int mmio_close(mmio_t* mmio)`"""
+
+def mmio_free(mmio: intptr, /) -> None:
+    """Wraps `void mmio_free(mmio_t* mmio)`"""
+
+def mmio_base(mmio: intptr, /) -> int:
+    """Wraps `uintptr_t mmio_base(mmio_t* mmio)`"""
+
+def mmio_size(mmio: intptr, /) -> int:
+    """Wraps `size_t mmio_size(mmio_t* mmio)`"""
+
+def mmio_tostring(mmio: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int mmio_tostring(mmio_t* mmio, char* str, size_t len)`"""
+
+def mmio_errno(mmio: intptr, /) -> int:
+    """Wraps `int mmio_errno(mmio_t* mmio)`"""
+
+def mmio_errmsg(mmio: intptr, /) -> str:
+    """Wraps `const char* mmio_errmsg(mmio_t* mmio)`"""
+
+def pwm_new() -> intptr:
+    """Wraps `pwm_t* pwm_new()`"""
+
+def pwm_open(pwm: intptr, chip: int, channel: int, /) -> int:
+    """Wraps `int pwm_open(pwm_t* pwm, unsigned chip, unsigned channel)`"""
+
+def pwm_enable(pwm: intptr, /) -> int:
+    """Wraps `int pwm_enable(pwm_t* pwm)`"""
+
+def pwm_disable(pwm: intptr, /) -> int:
+    """Wraps `int pwm_disable(pwm_t* pwm)`"""
+
+def pwm_close(pwm: intptr, /) -> int:
+    """Wraps `int pwm_close(pwm_t* pwm)`"""
+
+def pwm_free(pwm: intptr, /) -> None:
+    """Wraps `void pwm_free(pwm_t* pwm)`"""
+
+def pwm_get_enabled(pwm: intptr, enabled: intptr, /) -> int:
+    """Wraps `int pwm_get_enabled(pwm_t* pwm, bool* enabled)`"""
+
+def pwm_get_period_ns(pwm: intptr, period_ns: intptr, /) -> int:
+    """Wraps `int pwm_get_period_ns(pwm_t* pwm, uint64_t* period_ns)`"""
+
+def pwm_get_duty_cycle_ns(pwm: intptr, duty_cycle_ns: intptr, /) -> int:
+    """Wraps `int pwm_get_duty_cycle_ns(pwm_t* pwm, uint64_t* duty_cycle_ns)`"""
+
+def pwm_get_period(pwm: intptr, period: intptr, /) -> int:
+    """Wraps `int pwm_get_period(pwm_t* pwm, double* period)`"""
+
+def pwm_get_duty_cycle(pwm: intptr, duty_cycle: intptr, /) -> int:
+    """Wraps `int pwm_get_duty_cycle(pwm_t* pwm, double* duty_cycle)`"""
+
+def pwm_get_frequency(pwm: intptr, frequency: intptr, /) -> int:
+    """Wraps `int pwm_get_frequency(pwm_t* pwm, double* frequency)`"""
+
+def pwm_get_polarity(pwm: intptr, polarity: intptr, /) -> int:
+    """Wraps `int pwm_get_polarity(pwm_t* pwm, pwm_polarity_t* polarity)`"""
+
+def pwm_set_enabled(pwm: intptr, enabled: bool, /) -> int:
+    """Wraps `int pwm_set_enabled(pwm_t* pwm, bool enabled)`"""
+
+def pwm_set_period_ns(pwm: intptr, period_ns: int, /) -> int:
+    """Wraps `int pwm_set_period_ns(pwm_t* pwm, uint64_t period_ns)`"""
+
+def pwm_set_duty_cycle_ns(pwm: intptr, duty_cycle_ns: int, /) -> int:
+    """Wraps `int pwm_set_duty_cycle_ns(pwm_t* pwm, uint64_t duty_cycle_ns)`"""
+
+def pwm_set_period(pwm: intptr, period: float, /) -> int:
+    """Wraps `int pwm_set_period(pwm_t* pwm, double period)`"""
+
+def pwm_set_duty_cycle(pwm: intptr, duty_cycle: float, /) -> int:
+    """Wraps `int pwm_set_duty_cycle(pwm_t* pwm, double duty_cycle)`"""
+
+def pwm_set_frequency(pwm: intptr, frequency: float, /) -> int:
+    """Wraps `int pwm_set_frequency(pwm_t* pwm, double frequency)`"""
+
+def pwm_set_polarity(pwm: intptr, polarity: int, /) -> int:
+    """Wraps `int pwm_set_polarity(pwm_t* pwm, pwm_polarity_t polarity)`"""
+
+def pwm_chip(pwm: intptr, /) -> int:
+    """Wraps `unsigned pwm_chip(pwm_t* pwm)`"""
+
+def pwm_channel(pwm: intptr, /) -> int:
+    """Wraps `unsigned pwm_channel(pwm_t* pwm)`"""
+
+def pwm_tostring(pwm: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int pwm_tostring(pwm_t* pwm, char* str, size_t len)`"""
+
+def pwm_errno(pwm: intptr, /) -> int:
+    """Wraps `int pwm_errno(pwm_t* pwm)`"""
+
+def pwm_errmsg(pwm: intptr, /) -> str:
+    """Wraps `const char* pwm_errmsg(pwm_t* pwm)`"""
+
+def serial_new() -> intptr:
+    """Wraps `serial_t* serial_new()`"""
+
+def serial_open(serial: intptr, path: str, baudrate: int, /) -> int:
+    """Wraps `int serial_open(serial_t* serial, const char* path, uint32_t baudrate)`"""
+
+def serial_open_advanced(serial: intptr, path: str, baudrate: int, databits: int, parity: int, stopbits: int, xonxoff: bool, rtscts: bool, /) -> int:
+    """Wraps `int serial_open_advanced(serial_t* serial, const char* path, uint32_t baudrate, unsigned databits, serial_parity_t parity, unsigned stopbits, bool xonxoff, bool rtscts)`"""
+
+def serial_read(serial: intptr, buf: intptr, len: int, timeout_ms: int, /) -> int:
+    """Wraps `int serial_read(serial_t* serial, uint8_t* buf, size_t len, int timeout_ms)`"""
+
+def serial_write(serial: intptr, buf: intptr, len: int, /) -> int:
+    """Wraps `int serial_write(serial_t* serial, const uint8_t* buf, size_t len)`"""
+
+def serial_flush(serial: intptr, /) -> int:
+    """Wraps `int serial_flush(serial_t* serial)`"""
+
+def serial_input_waiting(serial: intptr, count: intptr, /) -> int:
+    """Wraps `int serial_input_waiting(serial_t* serial, unsigned* count)`"""
+
+def serial_output_waiting(serial: intptr, count: intptr, /) -> int:
+    """Wraps `int serial_output_waiting(serial_t* serial, unsigned* count)`"""
+
+def serial_poll(serial: intptr, timeout_ms: int, /) -> int:
+    """Wraps `int serial_poll(serial_t* serial, int timeout_ms)`"""
+
+def serial_close(serial: intptr, /) -> int:
+    """Wraps `int serial_close(serial_t* serial)`"""
+
+def serial_free(serial: intptr, /) -> None:
+    """Wraps `void serial_free(serial_t* serial)`"""
+
+def serial_get_baudrate(serial: intptr, baudrate: intptr, /) -> int:
+    """Wraps `int serial_get_baudrate(serial_t* serial, uint32_t* baudrate)`"""
+
+def serial_get_databits(serial: intptr, databits: intptr, /) -> int:
+    """Wraps `int serial_get_databits(serial_t* serial, unsigned* databits)`"""
+
+def serial_get_parity(serial: intptr, parity: intptr, /) -> int:
+    """Wraps `int serial_get_parity(serial_t* serial, serial_parity_t* parity)`"""
+
+def serial_get_stopbits(serial: intptr, stopbits: intptr, /) -> int:
+    """Wraps `int serial_get_stopbits(serial_t* serial, unsigned* stopbits)`"""
+
+def serial_get_xonxoff(serial: intptr, xonxoff: intptr, /) -> int:
+    """Wraps `int serial_get_xonxoff(serial_t* serial, bool* xonxoff)`"""
+
+def serial_get_rtscts(serial: intptr, rtscts: intptr, /) -> int:
+    """Wraps `int serial_get_rtscts(serial_t* serial, bool* rtscts)`"""
+
+def serial_get_vmin(serial: intptr, vmin: intptr, /) -> int:
+    """Wraps `int serial_get_vmin(serial_t* serial, unsigned* vmin)`"""
+
+def serial_get_vtime(serial: intptr, vtime: intptr, /) -> int:
+    """Wraps `int serial_get_vtime(serial_t* serial, float* vtime)`"""
+
+def serial_set_baudrate(serial: intptr, baudrate: int, /) -> int:
+    """Wraps `int serial_set_baudrate(serial_t* serial, uint32_t baudrate)`"""
+
+def serial_set_databits(serial: intptr, databits: int, /) -> int:
+    """Wraps `int serial_set_databits(serial_t* serial, unsigned databits)`"""
+
+def serial_set_parity(serial: intptr, parity: int, /) -> int:
+    """Wraps `int serial_set_parity(serial_t* serial, serial_parity_t parity)`"""
+
+def serial_set_stopbits(serial: intptr, stopbits: int, /) -> int:
+    """Wraps `int serial_set_stopbits(serial_t* serial, unsigned stopbits)`"""
+
+def serial_set_xonxoff(serial: intptr, enabled: bool, /) -> int:
+    """Wraps `int serial_set_xonxoff(serial_t* serial, bool enabled)`"""
+
+def serial_set_rtscts(serial: intptr, enabled: bool, /) -> int:
+    """Wraps `int serial_set_rtscts(serial_t* serial, bool enabled)`"""
+
+def serial_set_vmin(serial: intptr, vmin: int, /) -> int:
+    """Wraps `int serial_set_vmin(serial_t* serial, unsigned vmin)`"""
+
+def serial_set_vtime(serial: intptr, vtime: float, /) -> int:
+    """Wraps `int serial_set_vtime(serial_t* serial, float vtime)`"""
+
+def serial_fd(serial: intptr, /) -> int:
+    """Wraps `int serial_fd(serial_t* serial)`"""
+
+def serial_tostring(serial: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int serial_tostring(serial_t* serial, char* str, size_t len)`"""
+
+def serial_errno(serial: intptr, /) -> int:
+    """Wraps `int serial_errno(serial_t* serial)`"""
+
+def serial_errmsg(serial: intptr, /) -> str:
+    """Wraps `const char* serial_errmsg(serial_t* serial)`"""
+
+def spi_new() -> intptr:
+    """Wraps `spi_t* spi_new()`"""
+
+def spi_open(spi: intptr, path: str, mode: int, max_speed: int, /) -> int:
+    """Wraps `int spi_open(spi_t* spi, const char* path, unsigned mode, uint32_t max_speed)`"""
+
+def spi_open_advanced(spi: intptr, path: str, mode: int, max_speed: int, bit_order: int, bits_per_word: int, extra_flags: int, /) -> int:
+    """Wraps `int spi_open_advanced(spi_t* spi, const char* path, unsigned mode, uint32_t max_speed, spi_bit_order_t bit_order, uint8_t bits_per_word, uint8_t extra_flags)`"""
+
+def spi_open_advanced2(spi: intptr, path: str, mode: int, max_speed: int, bit_order: int, bits_per_word: int, extra_flags: int, /) -> int:
+    """Wraps `int spi_open_advanced2(spi_t* spi, const char* path, unsigned mode, uint32_t max_speed, spi_bit_order_t bit_order, uint8_t bits_per_word, uint32_t extra_flags)`"""
+
+def spi_transfer(spi: intptr, txbuf: intptr, rxbuf: intptr, len: int, /) -> int:
+    """Wraps `int spi_transfer(spi_t* spi, const uint8_t* txbuf, uint8_t* rxbuf, size_t len)`"""
+
+def spi_transfer_advanced(spi: intptr, msgs: intptr, count: int, /) -> int:
+    """Wraps `int spi_transfer_advanced(spi_t* spi, const spi_msg_t* msgs, size_t count)`"""
+
+def spi_close(spi: intptr, /) -> int:
+    """Wraps `int spi_close(spi_t* spi)`"""
+
+def spi_free(spi: intptr, /) -> None:
+    """Wraps `void spi_free(spi_t* spi)`"""
+
+def spi_get_mode(spi: intptr, mode: intptr, /) -> int:
+    """Wraps `int spi_get_mode(spi_t* spi, unsigned* mode)`"""
+
+def spi_get_max_speed(spi: intptr, max_speed: intptr, /) -> int:
+    """Wraps `int spi_get_max_speed(spi_t* spi, uint32_t* max_speed)`"""
+
+def spi_get_bit_order(spi: intptr, bit_order: intptr, /) -> int:
+    """Wraps `int spi_get_bit_order(spi_t* spi, spi_bit_order_t* bit_order)`"""
+
+def spi_get_bits_per_word(spi: intptr, bits_per_word: intptr, /) -> int:
+    """Wraps `int spi_get_bits_per_word(spi_t* spi, uint8_t* bits_per_word)`"""
+
+def spi_get_extra_flags(spi: intptr, extra_flags: intptr, /) -> int:
+    """Wraps `int spi_get_extra_flags(spi_t* spi, uint8_t* extra_flags)`"""
+
+def spi_get_extra_flags32(spi: intptr, extra_flags: intptr, /) -> int:
+    """Wraps `int spi_get_extra_flags32(spi_t* spi, uint32_t* extra_flags)`"""
+
+def spi_set_mode(spi: intptr, mode: int, /) -> int:
+    """Wraps `int spi_set_mode(spi_t* spi, unsigned mode)`"""
+
+def spi_set_max_speed(spi: intptr, max_speed: int, /) -> int:
+    """Wraps `int spi_set_max_speed(spi_t* spi, uint32_t max_speed)`"""
+
+def spi_set_bit_order(spi: intptr, bit_order: int, /) -> int:
+    """Wraps `int spi_set_bit_order(spi_t* spi, spi_bit_order_t bit_order)`"""
+
+def spi_set_bits_per_word(spi: intptr, bits_per_word: int, /) -> int:
+    """Wraps `int spi_set_bits_per_word(spi_t* spi, uint8_t bits_per_word)`"""
+
+def spi_set_extra_flags(spi: intptr, extra_flags: int, /) -> int:
+    """Wraps `int spi_set_extra_flags(spi_t* spi, uint8_t extra_flags)`"""
+
+def spi_set_extra_flags32(spi: intptr, extra_flags: int, /) -> int:
+    """Wraps `int spi_set_extra_flags32(spi_t* spi, uint32_t extra_flags)`"""
+
+def spi_fd(spi: intptr, /) -> int:
+    """Wraps `int spi_fd(spi_t* spi)`"""
+
+def spi_tostring(spi: intptr, str: intptr, len: int, /) -> int:
+    """Wraps `int spi_tostring(spi_t* spi, char* str, size_t len)`"""
+
+def spi_errno(spi: intptr, /) -> int:
+    """Wraps `int spi_errno(spi_t* spi)`"""
+
+def spi_errmsg(spi: intptr, /) -> str:
+    """Wraps `const char* spi_errmsg(spi_t* spi)`"""
+
+def periphery_version() -> str:
+    """Wraps `const char* periphery_version()`"""
+
+def periphery_version_info() -> intptr:
+    """Wraps `const periphery_version_t* periphery_version_info()`"""
+
+# aliases
+gpio_direction_t = int
+gpio_edge_t = int
+gpio_event_clock_t = int
+gpio_bias_t = int
+gpio_drive_t = int
+pwm_polarity_t = int
+serial_parity_t = int
+spi_bit_order_t = int
+# enums
+GPIO_ERROR_ARG: int
+GPIO_ERROR_OPEN: int
+GPIO_ERROR_NOT_FOUND: int
+GPIO_ERROR_QUERY: int
+GPIO_ERROR_CONFIGURE: int
+GPIO_ERROR_UNSUPPORTED: int
+GPIO_ERROR_INVALID_OPERATION: int
+GPIO_ERROR_IO: int
+GPIO_ERROR_CLOSE: int
+GPIO_DIR_IN: int
+GPIO_DIR_OUT: int
+GPIO_DIR_OUT_LOW: int
+GPIO_DIR_OUT_HIGH: int
+GPIO_EDGE_NONE: int
+GPIO_EDGE_RISING: int
+GPIO_EDGE_FALLING: int
+GPIO_EDGE_BOTH: int
+GPIO_EVENT_CLOCK_REALTIME: int
+GPIO_EVENT_CLOCK_MONOTONIC: int
+GPIO_EVENT_CLOCK_HTE: int
+GPIO_BIAS_DEFAULT: int
+GPIO_BIAS_PULL_UP: int
+GPIO_BIAS_PULL_DOWN: int
+GPIO_BIAS_DISABLE: int
+GPIO_DRIVE_DEFAULT: int
+GPIO_DRIVE_OPEN_DRAIN: int
+GPIO_DRIVE_OPEN_SOURCE: int
+LED_ERROR_ARG: int
+LED_ERROR_OPEN: int
+LED_ERROR_QUERY: int
+LED_ERROR_IO: int
+LED_ERROR_CLOSE: int
+MMIO_ERROR_ARG: int
+MMIO_ERROR_OPEN: int
+MMIO_ERROR_CLOSE: int
+PWM_ERROR_ARG: int
+PWM_ERROR_OPEN: int
+PWM_ERROR_QUERY: int
+PWM_ERROR_CONFIGURE: int
+PWM_ERROR_CLOSE: int
+PWM_POLARITY_NORMAL: int
+PWM_POLARITY_INVERSED: int
+SERIAL_ERROR_ARG: int
+SERIAL_ERROR_OPEN: int
+SERIAL_ERROR_QUERY: int
+SERIAL_ERROR_CONFIGURE: int
+SERIAL_ERROR_IO: int
+SERIAL_ERROR_CLOSE: int
+PARITY_NONE: int
+PARITY_ODD: int
+PARITY_EVEN: int
+SPI_ERROR_ARG: int
+SPI_ERROR_OPEN: int
+SPI_ERROR_QUERY: int
+SPI_ERROR_CONFIGURE: int
+SPI_ERROR_TRANSFER: int
+SPI_ERROR_CLOSE: int
+SPI_ERROR_UNSUPPORTED: int
+MSB_FIRST: int
+LSB_FIRST: int
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/pickle/index.html b/modules/pickle/index.html new file mode 100644 index 00000000..7bb7cc5e --- /dev/null +++ b/modules/pickle/index.html @@ -0,0 +1,348 @@ + + + + + + + + + + + + + pickle | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + pickle +

+
+ +

+ # + pickle.dumps(obj) -> bytes +

+
+

Return the pickled representation of an object as a bytes object.

+ +

+ # + pickle.loads(b: bytes) +

+
+

Return the unpickled object from a bytes object.

+ +

+ # + What can be pickled and unpickled? +

+
+

The following types can be pickled:

+
    +
  • None, True, and False;
  • +
  • integers, floating-point numbers;
  • +
  • strings, bytes;
  • +
  • tuples, lists, sets, and dictionaries containing only picklable objects;
  • +
  • functions (user-defined) accessible from the top level of a module (using def, not lambda);
  • +
  • classes accessible from the top level of a module;
  • +
  • instances of such classes
  • +
+

The following magic methods are available:

+
    +
  • __getnewargs__
  • +
  • __getstate__
  • +
  • __setstate__
  • +
  • __reduce__
  • +
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/pkpy/index.html b/modules/pkpy/index.html new file mode 100644 index 00000000..bff8b1c7 --- /dev/null +++ b/modules/pkpy/index.html @@ -0,0 +1,387 @@ + + + + + + + + + + + + + pkpy | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + pkpy +

+
+

Provide internal access to the pocketpy interpreter.

+ +

+ # + Source code +

+
+
+
from typing import Self, Literal
+from vmath import vec2, vec2i
+
+class TValue[T]:
+    def __new__(cls, value: T) -> Self: ...
+
+    @property
+    def value(self) -> T: ...
+
+# TValue_int = TValue[int]
+# TValue_float = TValue[float]
+# TValue_vec2i = TValue[vec2i]
+# TValue_vec2 = TValue[vec2]
+
+configmacros: dict[str, int]
+
+def memory_usage_info() -> str: ...
+def memory_usage() -> int: ...
+
+
+def currentvm() -> int:
+    """Return the current VM index."""
+
+
+def watchdog_begin(timeout: int):
+    """Begin the watchdog with `timeout` in milliseconds.
+
+    `PK_ENABLE_WATCHDOG` must be defined to `1` to use this feature.
+    You need to call `watchdog_end()` later.
+    If `timeout` is reached, `TimeoutError` will be raised.
+    """
+def watchdog_end() -> None:
+    """End the watchdog after a call to `watchdog_begin()`."""
+
+def profiler_begin() -> None: ...
+def profiler_end() -> None: ...
+def profiler_reset() -> None: ...
+def profiler_report() -> dict[str, list[list]]: ...
+
+class ComputeThread:
+    def __init__(self, vm_index: Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]): ...
+
+    @property
+    def is_done(self) -> bool:
+        """Check if the current job is done."""
+
+    def wait_for_done(self) -> None:
+        """Wait for the current job to finish."""
+
+    def last_error(self) -> str | None: ...
+    def last_retval(self): ...
+
+    def submit_exec(self, source: str) -> None:
+        """Submit a job to execute some source code."""
+
+    def submit_eval(self, source: str) -> None:
+        """Submit a job to evaluate some source code."""
+
+    def submit_call(self, eval_src: str, *args, **kwargs) -> None:
+        """Submit a job to call a function with arguments."""
+
+    def exec(self, source: str) -> None:
+        """Directly execute some source code."""
+
+    def eval(self, source: str):
+        """Directly evaluate some source code."""
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/random/index.html b/modules/random/index.html new file mode 100644 index 00000000..f60f803b --- /dev/null +++ b/modules/random/index.html @@ -0,0 +1,360 @@ + + + + + + + + + + + + + random | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + random +

+
+ +

+ # + random.seed(a) +

+
+

Set the random seed.

+ +

+ # + random.random() +

+
+

Return a random float number in the range [0.0, 1.0).

+ +

+ # + random.randint(a, b) +

+
+

Return a random integer in the range [a, b].

+ +

+ # + random.uniform(a, b) +

+
+

Return a random float number in the range [a, b).

+ +

+ # + random.choice(seq) +

+
+

Return a random element from a sequence.

+ +

+ # + random.shuffle(seq) +

+
+

Shuffle a sequence inplace.

+ +

+ # + random.choices(population, weights=None, k=1) +

+
+

Return a k sized list of elements chosen from the population with replacement.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/sys/index.html b/modules/sys/index.html new file mode 100644 index 00000000..7a69a2fa --- /dev/null +++ b/modules/sys/index.html @@ -0,0 +1,354 @@ + + + + + + + + + + + + + sys | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + sys +

+
+ +

+ # + sys.version +

+
+

The version of pkpy.

+ +

+ # + sys.platform +

+
+

May be one of:

+
    +
  • win32
  • +
  • linux
  • +
  • darwin
  • +
  • android
  • +
  • ios
  • +
  • emscripten
  • +
+ +

+ # + sys.argv +

+
+

The command line arguments. Set by py_sys_setargv.

+ +

+ # + sys.setrecursionlimit(limit: int) +

+
+

Set the maximum depth of the Python interpreter stack to limit. This limit prevents infinite recursion from causing an overflow of the C stack and crashing the interpreter.

+ +

+ # + sys.getrecursionlimit() -> int +

+
+

Return the current value of the recursion limit.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/time/index.html b/modules/time/index.html new file mode 100644 index 00000000..ef4ab423 --- /dev/null +++ b/modules/time/index.html @@ -0,0 +1,332 @@ + + + + + + + + + + + + + time | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + time +

+
+ +

+ # + time.time() +

+
+

Returns the current time in seconds since the epoch as a floating point number.

+ +

+ # + time.sleep(secs) +

+
+

Suspend execution of the calling thread for the given number of seconds.

+ +

+ # + time.localtime() +

+
+

Returns the current struct time as a struct_time object.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/traceback/index.html b/modules/traceback/index.html new file mode 100644 index 00000000..65ff9651 --- /dev/null +++ b/modules/traceback/index.html @@ -0,0 +1,325 @@ + + + + + + + + + + + + + traceback | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + traceback +

+
+ +

+ # + traceback.print_exc() -> None +

+
+

Print the last exception and its traceback.

+ +

+ # + traceback.format_exc() -> str +

+
+

Return the last exception and its traceback as a string.

+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/typing/index.html b/modules/typing/index.html new file mode 100644 index 00000000..ce7af7db --- /dev/null +++ b/modules/typing/index.html @@ -0,0 +1,382 @@ + + + + + + + + + + + + + typing | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + typing +

+
+

Placeholder module for type hints.

+ +

+ # + Source code +

+
+
+
class _Placeholder:
+    def __init__(self, *args, **kwargs):
+        pass
+    def __getitem__(self, *args):
+        return self
+    def __call__(self, *args, **kwargs):
+        return self
+    def __and__(self, other):
+        return self
+    def __or__(self, other):
+        return self
+    def __xor__(self, other):
+        return self
+
+
+_PLACEHOLDER = _Placeholder()
+
+Sequence = _PLACEHOLDER
+List = _PLACEHOLDER
+Dict = _PLACEHOLDER
+Tuple = _PLACEHOLDER
+Set = _PLACEHOLDER
+Any = _PLACEHOLDER
+Union = _PLACEHOLDER
+Optional = _PLACEHOLDER
+Callable = _PLACEHOLDER
+Type = _PLACEHOLDER
+TypeAlias = _PLACEHOLDER
+NewType = _PLACEHOLDER
+
+ClassVar = _PLACEHOLDER
+
+Literal = _PLACEHOLDER
+LiteralString = _PLACEHOLDER
+
+Iterable = _PLACEHOLDER
+Generator = _PLACEHOLDER
+Iterator = _PLACEHOLDER
+
+Hashable = _PLACEHOLDER
+
+TypeVar = _PLACEHOLDER
+Self = _PLACEHOLDER
+
+Protocol = object
+Generic = object
+Never = object
+
+TYPE_CHECKING = False
+
+# decorators
+overload = lambda x: x
+final = lambda x: x
+
+# exhaustiveness checking
+assert_never = lambda x: x
+
+TypedDict = dict
+NotRequired = _PLACEHOLDER
+
+cast = lambda _, val: val
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/unicodedata/index.html b/modules/unicodedata/index.html new file mode 100644 index 00000000..55048537 --- /dev/null +++ b/modules/unicodedata/index.html @@ -0,0 +1,326 @@ + + + + + + + + + + + + + unicodedata | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + unicodedata +

+
+ +

+ # + unicodedata.east_asian_width(char: str) -> str +

+
+

Returns the East Asian width of a Unicode character. The width is one of the following values:

+
    +
  • F: Fullwidth
  • +
  • H: Halfwidth
  • +
  • N: Neutral
  • +
  • Na: Narrow
  • +
  • W: Wide
  • +
  • A: Ambiguous
  • +
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/modules/vmath/index.html b/modules/vmath/index.html new file mode 100644 index 00000000..aa9c6029 --- /dev/null +++ b/modules/vmath/index.html @@ -0,0 +1,564 @@ + + + + + + + + + + + + + vmath | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + vmath +

+
+

Provide vector math operations.

+ +

+ # + Source code +

+
+
+
from typing import overload, Iterator
+
+class _vecF[T]:
+    ONE: T
+    ZERO: T
+
+    def __add__(self, other: T) -> T: ...
+    def __sub__(self, other: T) -> T: ...
+    @overload
+    def __mul__(self, other: float) -> T: ...
+    @overload
+    def __mul__(self, other: T) -> T: ...
+    def __truediv__(self, other: float) -> T: ...
+
+    def dot(self, other: T) -> float: ...
+    def length(self) -> float: ...
+    def length_squared(self) -> float: ...
+    def normalize(self) -> T: ...
+
+    # dummy iter for unpacking
+    def __iter__(self) -> Iterator[float]: ...
+
+class _vecI[T]:
+    ONE: T
+    ZERO: T
+
+    def __add__(self, other: T) -> T: ...
+    def __sub__(self, other: T) -> T: ...
+    @overload
+    def __mul__(self, other: int) -> T: ...
+    @overload
+    def __mul__(self, other: T) -> T: ...
+    def __floordiv__(self, other: int) -> T: ...
+
+    def __hash__(self) -> int: ...
+
+    def dot(self, other: T) -> int: ...
+
+    # dummy iter for unpacking
+    def __iter__(self) -> Iterator[int]: ...
+
+
+class vec2(_vecF['vec2']):
+    LEFT: vec2
+    RIGHT: vec2
+    UP: vec2
+    DOWN: vec2
+
+    @property
+    def x(self) -> float: ...
+    @property
+    def y(self) -> float: ...
+
+    def with_x(self, x: float) -> vec2: ...
+    def with_y(self, y: float) -> vec2: ...
+    def with_z(self, z: float) -> vec3: ...
+
+    @overload
+    def __init__(self, x: float, y: float) -> None: ...
+    @overload
+    def __init__(self, xy: vec2i) -> None: ...
+
+    def rotate(self, radians: float) -> vec2:
+        """Rotate the vector by `radians`.
+
+        + If y axis is top to bottom, positive value means clockwise (default)
+        + If y axis is bottom to top, positive value means counter-clockwise
+        """
+
+    @staticmethod
+    def angle(__from: vec2, __to: vec2) -> float:
+        """Return the angle in radians between vectors `from` and `to`.
+
+        The result range is `[-pi, pi]`.
+
+        + If y axis is top to bottom, positive value means clockwise (default)
+        + If y axis is bottom to top, positive value means counter-clockwise
+        """
+
+    @staticmethod
+    def smooth_damp(current: vec2, target: vec2, current_velocity: vec2, smooth_time: float, max_speed: float, delta_time: float) -> tuple[vec2, vec2]:
+        """Smoothly change a vector towards a desired goal over time.
+
+        Returns a new value that is closer to the target and current velocity.
+        """
+
+
+class mat3x3:
+    def __init__(self, _11, _12, _13, _21, _22, _23, _31, _32, _33) -> None: ...
+
+    def __getitem__(self, index: tuple[int, int]) -> float: ...
+    def __setitem__(self, index: tuple[int, int], value: float) -> None: ...
+
+    @overload
+    def __matmul__(self, other: mat3x3) -> mat3x3: ...
+    @overload
+    def __matmul__(self, other: vec3) -> vec3: ...
+
+    def __invert__(self) -> mat3x3: ...
+
+    def matmul(self, other: mat3x3, out: mat3x3) -> mat3x3 | None: ...
+    def determinant(self) -> float: ...
+
+    def copy(self) -> mat3x3: ...
+    def inverse(self) -> mat3x3: ...
+
+    def copy_(self, other: mat3x3) -> None: ...
+    def inverse_(self) -> None: ...
+
+    @staticmethod
+    def zeros() -> mat3x3: ...
+    @staticmethod
+    def identity() -> mat3x3: ...
+
+    # affine transformations
+    @staticmethod
+    def trs(t: vec2, r: float, s: vec2) -> mat3x3: ...
+
+    def copy_trs_(self, t: vec2, r: float, s: vec2) -> None: ...
+
+    def t(self) -> vec2: ...
+    def r(self) -> float: ...
+    def s(self) -> vec2: ...
+
+    def transform_point(self, p: vec2) -> vec2: ...
+    def transform_vector(self, v: vec2) -> vec2: ...
+
+
+class vec2i(_vecI['vec2i']):
+    LEFT: vec2i
+    RIGHT: vec2i
+    UP: vec2i
+    DOWN: vec2i
+
+    @property
+    def x(self) -> int: ...
+    @property
+    def y(self) -> int: ...
+
+    def with_x(self, x: int) -> vec2i: ...
+    def with_y(self, y: int) -> vec2i: ...
+
+    def __init__(self, x: int, y: int) -> None: ...
+
+
+class vec3i(_vecI['vec3i']):
+    @property
+    def x(self) -> int: ...
+    @property
+    def y(self) -> int: ...
+    @property
+    def z(self) -> int: ...
+
+    def with_x(self, x: int) -> vec3i: ...
+    def with_y(self, y: int) -> vec3i: ...
+    def with_z(self, z: int) -> vec3i: ...
+
+    def __init__(self, x: int, y: int, z: int) -> None: ...
+
+class vec4i(_vecI['vec4i']):
+    @property
+    def x(self) -> int: ...
+    @property
+    def y(self) -> int: ...
+    @property
+    def z(self) -> int: ...
+    @property
+    def w(self) -> int: ...
+
+    def with_x(self, x: int) -> vec4i: ...
+    def with_y(self, y: int) -> vec4i: ...
+    def with_z(self, z: int) -> vec4i: ...
+    def with_w(self, w: int) -> vec4i: ...
+
+    def __init__(self, x: int, y: int, z: int, w: int) -> None: ...
+
+
+class vec3(_vecF['vec3']):
+    @property
+    def x(self) -> float: ...
+    @property
+    def y(self) -> float: ...
+    @property
+    def z(self) -> float: ...
+
+    @property
+    def xy(self) -> vec2: ...
+
+    def with_x(self, x: float) -> vec3: ...
+    def with_y(self, y: float) -> vec3: ...
+    def with_z(self, z: float) -> vec3: ...
+    def with_xy(self, xy: vec2) -> vec3: ...
+
+    @overload
+    def __init__(self, x: float, y: float, z: float) -> None: ...
+    @overload
+    def __init__(self, xyz: vec3i) -> None: ...
+
+
+# Color32
+class color32:
+    def __new__(cls, r: int, g: int, b: int, a: int) -> 'color32': ...
+    def __eq__(self, other: object) -> bool: ...
+    def __ne__(self, other: object) -> bool: ...
+    def __repr__(self) -> str: ...
+    def __hash__(self) -> int: ...
+
+    @property
+    def r(self) -> int: ...
+    @property
+    def g(self) -> int: ...
+    @property
+    def b(self) -> int: ...
+    @property
+    def a(self) -> int: ...
+
+    def with_r(self, r: int) -> 'color32': ...
+    def with_g(self, g: int) -> 'color32': ...
+    def with_b(self, b: int) -> 'color32': ...
+    def with_a(self, a: int) -> 'color32': ...
+
+    @staticmethod
+    def from_hex(hex: str) -> 'color32': ...
+    @staticmethod
+    def from_vec3(vec: vec3) -> 'color32': ...
+    @staticmethod
+    def from_vec3i(vec: vec3i) -> 'color32': ...
+
+    def to_hex(self) -> str: ...
+    def to_vec3(self) -> vec3: ...
+    def to_vec3i(self) -> vec3i: ...
+
+    def to_rgb565(self) -> int: ...
+
+    def ansi_fg(self, text: str) -> str: ...
+    def ansi_bg(self, text: str) -> str: ...
+
+    @staticmethod
+    def alpha_blend(src: color32, dst: color32 | None) -> color32: ...
+
+
+def rgb(r: int, g: int, b: int) -> color32: ...
+def rgba(r: int, g: int, b: int, a: float) -> color32: ...
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/performance/index.html b/performance/index.html new file mode 100644 index 00000000..8ef09231 --- /dev/null +++ b/performance/index.html @@ -0,0 +1,505 @@ + + + + + + + + + + + + + Performance | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Performance +

+
+

Currently, pkpy is as fast as cpython 3.9. +Performance results for cpython 3.9 are applicable to for pkpy.

+

Here is a benchmark result of v1.2.6. +Files are located in benchmarks/.

+ +

+ # + win32 64-bit cpy39 +

+
+
+
CPython: 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
+System: 64-bit
+Testing directory: benchmarks/
+> benchmarks/fib.py
+  cpython:  0.986091s (100%)
+  pocketpy: 0.985427s (99.93%)
+> benchmarks/loop_0.py
+  cpython:  0.515685s (100%)
+  pocketpy: 0.344132s (66.73%)
+> benchmarks/loop_1.py
+  cpython:  0.938407s (100%)
+  pocketpy: 0.595634s (63.47%)
+> benchmarks/loop_2.py
+  cpython:  1.188671s (100%)
+  pocketpy: 0.735259s (61.86%)
+> benchmarks/loop_3.py
+  cpython:  4.957218s (100%)
+  pocketpy: 2.314210s (46.68%)
+> benchmarks/primes.py
+  cpython:  9.146332s (100%)
+  pocketpy: 8.507227s (93.01%)
+> benchmarks/recursive.py
+  cpython:  0.044789s (100%)
+  pocketpy: 0.031252s (69.78%)
+> benchmarks/simple.py
+  cpython:  0.516624s (100%)
+  pocketpy: 0.453159s (87.72%)
+> benchmarks/sort.py
+  cpython:  0.929597s (100%)
+  pocketpy: 0.406802s (43.76%)
+> benchmarks/sum.py
+  cpython:  0.047151s (100%)
+  pocketpy: 0.031266s (66.31%)
+ALL TESTS PASSED
+
+ +

+ # + linux 64-bit cpy38 +

+
+
+
CPython: 3.8.10 (default, May 26 2023, 14:05:08) [GCC 9.4.0]
+System: 64-bit
+Testing directory: benchmarks/
+> benchmarks/fib.py
+  cpython:  0.739547s (100%)
+  pocketpy: 0.613591s (82.97%)
+> benchmarks/loop_0.py
+  cpython:  0.356003s (100%)
+  pocketpy: 0.224396s (63.03%)
+> benchmarks/loop_1.py
+  cpython:  0.661924s (100%)
+  pocketpy: 0.446577s (67.47%)
+> benchmarks/loop_2.py
+  cpython:  0.937243s (100%)
+  pocketpy: 0.514324s (54.88%)
+> benchmarks/loop_3.py
+  cpython:  3.671752s (100%)
+  pocketpy: 1.876151s (51.10%)
+> benchmarks/primes.py
+  cpython:  7.293947s (100%)
+  pocketpy: 5.427518s (74.41%)
+> benchmarks/recursive.py
+  cpython:  0.021559s (100%)
+  pocketpy: 0.010227s (47.44%)
+> benchmarks/simple.py
+  cpython:  0.408654s (100%)
+  pocketpy: 0.265084s (64.87%)
+> benchmarks/sort.py
+  cpython:  0.372539s (100%)
+  pocketpy: 0.243566s (65.38%)
+> benchmarks/sum.py
+  cpython:  0.021242s (100%)
+  pocketpy: 0.010113s (47.61%)
+ALL TESTS PASSED
+
+ +

+ # + linux 32-bit cpy39 +

+
+
+
CPython: 3.9.18 (main, Aug 26 2023, 11:50:23) [GCC 10.3.1 20211027]
+System: 32-bit
+Testing directory: benchmarks/
+> benchmarks/fib.py
+  cpython:  1.967908s (100%)
+  pocketpy: 0.960947s (48.83%)
+> benchmarks/loop_0.py
+  cpython:  1.063461s (100%)
+  pocketpy: 0.396626s (37.30%)
+> benchmarks/loop_1.py
+  cpython:  1.563821s (100%)
+  pocketpy: 0.639663s (40.90%)
+> benchmarks/loop_2.py
+  cpython:  2.626848s (100%)
+  pocketpy: 0.757444s (28.83%)
+> benchmarks/loop_3.py
+  cpython:  13.428345s (100%)
+  pocketpy: 2.852351s (21.24%)
+> benchmarks/primes.py
+  cpython:  18.174904s (100%)
+  pocketpy: 8.423515s (46.35%)
+> benchmarks/recursive.py
+  cpython:  0.025673s (100%)
+  pocketpy: 0.012470s (48.57%)
+> benchmarks/simple.py
+  cpython:  1.042090s (100%)
+  pocketpy: 0.480013s (46.06%)
+> benchmarks/sort.py
+  cpython:  0.989279s (100%)
+  pocketpy: 0.379171s (38.33%)
+> benchmarks/sum.py
+  cpython:  0.024227s (100%)
+  pocketpy: 0.012477s (51.50%)
+ALL TESTS PASSED
+
+

See actions/runs.

+ +

+ # + Primes benchmarks +

+
+

These are the results of the primes benchmark on Intel i5-12400F, WSL (Ubuntu 20.04 LTS).

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
nameversiontimefile
c++gnu++110.104s ■□□□□□□□□□□□□□□□benchmarks/primes.cpp
lua5.3.31.576s ■■■■■■■■■□□□□□□□benchmarks/primes.lua
pkpy1.2.72.385s ■■■■■■■■■■■■■□□□benchmarks/primes.py
cpython3.8.102.871s ■■■■■■■■■■■■■■■■benchmarks/primes.py
+
+
+
$ time lua benchmarks/primes.lua 
+
+real    0m1.576s
+user    0m1.514s
+sys     0m0.060s
+$ time ./main benchmarks/primes.py 
+
+real    0m2.385s
+user    0m2.247s
+sys     0m0.100s
+$ time python benchmarks/primes.py 
+
+real    0m2.871s
+user    0m2.798s
+sys     0m0.060s
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/quick-start/index.html b/quick-start/index.html new file mode 100644 index 00000000..7601b7ef --- /dev/null +++ b/quick-start/index.html @@ -0,0 +1,440 @@ + + + + + + + + + + + + + Quick Start | Portable Python 3.x Interpreter in Modern C + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + +
+ + + + + + + + +
+ +
+
+
+
+ +
+ + +

+ # + Quick Start +

+
+

You have two options to integrate pkpy into your project.

+ +

+ # + Use CMake (Recommended) +

+
+

Clone the whole repository as a submodule into your project, +In your CMakelists.txt, add the following lines:

+ +

See CMakeLists.txt for details.

+

It is safe to use main branch in production if CI badge is green.

+ +

+ # + Use the single header file +

+
+

Download the pocketpy.h and pocketpy.c on our GitHub Release page. +And #include it in your project.

+ +

+ # + Compile flags +

+
+

To compile it with your project, these flags must be set:

+
    +
  • --std=c11 flag must be set
  • +
  • For MSVC, /utf-8 and /experimental:c11atomics flag must be set
  • +
  • NDEBUG macro should be defined for release build, or you will get poor performance
  • +
+ +

+ # + Get prebuilt binaries +

+
+

We have prebuilt binaries, +check them out on our GitHub Actions.

+

You can download an artifact there which contains the following files.

+
+
├── android
+│   ├── arm64-v8a
+│   │   └── libpocketpy.so
+│   ├── armeabi-v7a
+│   │   └── libpocketpy.so
+│   └── x86_64
+│       └── libpocketpy.so
+├── ios
+│   └── libpocketpy.a
+├── linux
+│   └── x86_64
+│       ├── libpocketpy.so
+│       └── main
+└── windows
+    └── x86_64
+        ├── main.exe
+        └── pocketpy.dll
+
+ +

+ # + Example +

+
+
+
#include "pocketpy.h"
+#include <stdio.h>
+
+static bool int_add(int argc, py_Ref argv) {
+    PY_CHECK_ARGC(2);
+    PY_CHECK_ARG_TYPE(0, tp_int);
+    PY_CHECK_ARG_TYPE(1, tp_int);
+    py_i64 a = py_toint(py_arg(0));
+    py_i64 b = py_toint(py_arg(1));
+    py_newint(py_retval(), a + b);
+    return true;
+}
+
+int main() {
+    // Initialize pocketpy
+    py_initialize();
+
+    // Hello world!
+    bool ok = py_exec("print('Hello world!')", "<string>", EXEC_MODE, NULL);
+    if(!ok) goto __ERROR;
+
+    // Create a list: [1, 2, 3]
+    py_Ref r0 = py_tmpr0();
+    py_newlistn(r0, 3);
+    py_newint(py_list_getitem(r0, 0), 1);
+    py_newint(py_list_getitem(r0, 1), 2);
+    py_newint(py_list_getitem(r0, 2), 3);
+
+    // Eval the sum of the list
+    py_Ref f_sum = py_getbuiltin(py_name("sum"));
+    py_push(f_sum);
+    py_pushnil();
+    py_push(r0);
+    ok = py_vectorcall(1, 0);
+    if(!ok) goto __ERROR;
+
+    printf("Sum of the list: %d\n", (int)py_toint(py_retval()));  // 6
+
+    // Bind native `int_add` as a global variable
+    py_newnativefunc(r0, int_add);
+    py_setglobal(py_name("add"), r0);
+
+    // Call `add` in python
+    ok = py_exec("add(3, 7)", "<string>", EVAL_MODE, NULL);
+    if(!ok) goto __ERROR;
+
+    py_i64 res = py_toint(py_retval());
+    printf("Sum of 2 variables: %d\n", (int)res);  // 10
+
+    py_finalize();
+    return 0;
+
+__ERROR:
+    py_printexc();
+    py_finalize();
+    return 1;
+}
+
+ + + + +
+ +
+ + +
+ + + + + + + +
+ +
+
+ + + +
+ + +
+ + + + diff --git a/resources/css/retype.css b/resources/css/retype.css new file mode 100644 index 00000000..60fd97dd --- /dev/null +++ b/resources/css/retype.css @@ -0,0 +1,17 @@ +/*! Retype v4.1.0 | retype.com | Copyright 2026. Retype, Inc. All rights reserved. */ + +/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--shadow-xs:0 1px 2px 0 #0000000d;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,::backdrop,:after,:before{border-color:var(--base-border)}::file-selector-button{border-color:var(--base-border)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-5{top:calc(var(--spacing)*5)}.top-16{top:4rem}.top-20{top:5rem}.right-0{right:calc(var(--spacing)*0)}.right-3{right:calc(var(--spacing)*3)}.right-6{right:calc(var(--spacing)*6)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-6{bottom:calc(var(--spacing)*6)}.left-0{left:calc(var(--spacing)*0)}.z-5{z-index:5}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.float-left{float:left}.clear-both{clear:both}.m-0{margin:calc(var(--spacing)*0)}.-mx-px{margin-inline:-1px}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.my-2\.5{margin-block:calc(var(--spacing)*2.5)}.-mt-1{margin-top:calc(var(--spacing)*-1)}.-mt-2{margin-top:calc(var(--spacing)*-2)}.-mt-3{margin-top:calc(var(--spacing)*-3)}.-mt-3\.5{margin-top:calc(var(--spacing)*-3.5)}.-mt-5{margin-top:calc(var(--spacing)*-5)}.-mt-px{margin-top:-1px}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-0\.75{margin-top:.1875rem}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-12{margin-top:calc(var(--spacing)*12)}.mt-14{margin-top:calc(var(--spacing)*14)}.mt-20{margin-top:calc(var(--spacing)*20)}.mt-auto{margin-top:auto}.mt-card-date-margin-top{margin-top:var(--card-date-margin-top)}.mt-card-description-margin-top{margin-top:var(--card-description-margin-top)}.mt-description-margin-top{margin-top:var(--description-margin-top)}.mt-px{margin-top:1px}.-mr-2{margin-right:calc(var(--spacing)*-2)}.mr-0{margin-right:calc(var(--spacing)*0)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.mr-4{margin-right:calc(var(--spacing)*4)}.mr-6{margin-right:calc(var(--spacing)*6)}.mr-8{margin-right:calc(var(--spacing)*8)}.-mb-0\.5{margin-bottom:calc(var(--spacing)*-.5)}.-mb-px{margin-bottom:-1px}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.mb-12{margin-bottom:calc(var(--spacing)*12)}.mb-card-group-margin-bottom{margin-bottom:var(--card-group-margin-bottom)}.mb-card-margin-bottom{margin-bottom:var(--card-margin-bottom)}.mb-description-margin-bottom{margin-bottom:var(--description-margin-bottom)}.mb-px{margin-bottom:1px}.-ml-1{margin-left:calc(var(--spacing)*-1)}.-ml-4{margin-left:calc(var(--spacing)*-4)}.-ml-6{margin-left:calc(var(--spacing)*-6)}.ml-0\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-3\.5{margin-left:calc(var(--spacing)*3.5)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-5{margin-left:calc(var(--spacing)*5)}.ml-auto{margin-left:auto}.ml-color-preview-margin-left{margin-left:var(--color-preview-margin-left)}.ml-nav-badge-margin-left{margin-left:var(--nav-badge-margin-left)}.ml-nav-badge-margin-left-alt{margin-left:var(--nav-badge-margin-left-alt)}.line-clamp-1{-webkit-line-clamp:1}.line-clamp-1,.line-clamp-3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3}.line-clamp-4{-webkit-line-clamp:4}.line-clamp-4,.line-clamp-5{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-5{-webkit-line-clamp:5}.line-clamp-6{-webkit-line-clamp:6}.line-clamp-6,.line-clamp-7{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-7{-webkit-line-clamp:7}.line-clamp-8{-webkit-line-clamp:8}.line-clamp-8,.line-clamp-9{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-9{-webkit-line-clamp:9}.backlinks-display{display:var(--backlinks-display)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-video{aspect-ratio:var(--aspect-video)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-4\.5{height:1.125rem}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-color-preview-height{height:var(--color-preview-height)}.h-full{height:100%}.h-screen{height:100vh}.max-h-10{max-height:calc(var(--spacing)*10)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-\[50vh\]{max-height:50vh}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing)*2)}.w-4{width:calc(var(--spacing)*4)}.w-4\.5{width:1.125rem}.w-4\/5{width:80%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-24{width:calc(var(--spacing)*24)}.w-32{width:calc(var(--spacing)*32)}.w-40{width:calc(var(--spacing)*40)}.w-48{width:calc(var(--spacing)*48)}.w-52{width:calc(var(--spacing)*52)}.w-75{width:18.75rem}.w-color-preview-width{width:var(--color-preview-width)}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-card-max-width-sm{max-width:var(--card-max-width-sm)}.max-w-core{max-width:49.75rem}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-card-min-width{min-width:var(--card-min-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.origin-center{transform-origin:50%}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0)}.translate-x-0,.translate-x-full{translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-1\/2,.-translate-y-2{translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-2{--tw-translate-y:calc(var(--spacing)*-2)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0)}.translate-y-0,.translate-y-4{translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing)*4)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%}.scale-100,.scale-95{scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.grid-flow-col{grid-auto-flow:column}.\[grid-template-columns\:repeat\(auto-fit\,minmax\(300px\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.content-center{align-content:center}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-card-group-gap{gap:var(--card-group-gap)}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*2*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*2*var(--tw-space-x-reverse))}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-clip{overflow-x:clip}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-4xl{border-radius:var(--radius-4xl)}.rounded-card-rounded{border-radius:var(--card-rounded)}.rounded-full{border-radius:3.40282e+38px}.rounded-image-rounded{border-radius:var(--image-rounded)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t{border-top-right-radius:.25rem}.rounded-l,.rounded-t{border-top-left-radius:.25rem}.rounded-l{border-bottom-left-radius:.25rem}.rounded-l-lg{border-bottom-left-radius:var(--radius-lg);border-top-left-radius:var(--radius-lg)}.rounded-tl{border-top-left-radius:.25rem}.rounded-tl-lg{border-top-left-radius:var(--radius-lg)}.rounded-r{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}.rounded-r-lg{border-bottom-right-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.rounded-tr{border-top-right-radius:.25rem}.rounded-tr-lg{border-top-right-radius:var(--radius-lg)}.rounded-b-md{border-bottom-left-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.rounded-br{border-bottom-right-radius:.25rem}.rounded-br-full{border-bottom-right-radius:3.40282e+38px}.rounded-br-lg{border-bottom-right-radius:var(--radius-lg)}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-bl-lg{border-bottom-left-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-image-border-width{border-style:var(--tw-border-style);border-width:var(--image-border-width)}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-solid{--tw-border-style:solid;border-style:solid}.border-badge-base-border{border-color:var(--badge-base-border)}.border-badge-contrast-border{border-color:var(--badge-contrast-border)}.border-badge-danger-border{border-color:var(--badge-danger-border)}.border-badge-dark-border{border-color:var(--badge-dark-border)}.border-badge-ghost-border{border-color:var(--badge-ghost-border)}.border-badge-info-border{border-color:var(--badge-info-border)}.border-badge-light-border{border-color:var(--badge-light-border)}.border-badge-primary-border{border-color:var(--badge-primary-border)}.border-badge-question-border{border-color:var(--badge-question-border)}.border-badge-secondary-border{border-color:var(--badge-secondary-border)}.border-badge-success-border{border-color:var(--badge-success-border)}.border-badge-warning-border{border-color:var(--badge-warning-border)}.border-base-500{border-color:#5293F3}.border-base-border{border-color:var(--base-border)}.border-button-info-border{border-color:var(--button-info-border)}.border-button-question-border{border-color:var(--button-question-border)}.border-callout-base-border{border-color:var(--callout-base-border)}.border-callout-contrast-border{border-color:var(--callout-contrast-border)}.border-card-border{border-color:var(--card-border)}.border-card-image-inner-border{border-color:var(--card-image-inner-border)}.border-color-preview-border{border-color:var(--color-preview-border)}.border-filter-border{border-color:var(--filter-border)}.border-gray-200{border-color:#E4E6F3}.border-gray-300{border-color:#BDC8DA}.border-gray-400,.border-gray-400\/50{border-color:#8695A8}@supports (color:color-mix(in lab,red,red)){.border-gray-400\/50{border-color:color-mix(in oklab,var(--gray-400) 50%,transparent)}}.border-gray-500{border-color:#535C77}.border-gray-600{border-color:#3F4862}.border-header-border{border-color:var(--header-border)}.border-image-border{border-color:var(--image-border)}.border-search-border{border-color:var(--search-border)}.border-search-hint-border{border-color:var(--search-hint-border)}.border-search-modal-border{border-color:var(--search-modal-border)}.border-search-result-border{border-color:var(--search-result-border)}.border-sidebar-left-border{border-color:var(--sidebar-left-border)}.border-sidebar-right-border{border-color:var(--sidebar-right-border)}.border-tab-border{border-color:var(--tab-border)}.border-tab-border-active{border-color:var(--tab-border-active)}.border-white{border-color:#fff}.bg-badge-base{background-color:var(--badge-base)}.bg-badge-contrast{background-color:var(--badge-contrast)}.bg-badge-danger{background-color:var(--badge-danger)}.bg-badge-dark{background-color:var(--badge-dark)}.bg-badge-ghost{background-color:var(--badge-ghost)}.bg-badge-info{background-color:var(--badge-info)}.bg-badge-light{background-color:var(--badge-light)}.bg-badge-primary,.bg-badge-primary\/25{background-color:var(--badge-primary)}@supports (color:color-mix(in lab,red,red)){.bg-badge-primary\/25{background-color:color-mix(in oklab,var(--badge-primary) 25%,transparent)}}.bg-badge-question{background-color:var(--badge-question)}.bg-badge-secondary{background-color:var(--badge-secondary)}.bg-badge-success{background-color:var(--badge-success)}.bg-badge-warning{background-color:var(--badge-warning)}.bg-base-500{background-color:#5293F3}.bg-base-bg{background-color:var(--base-bg)}.bg-base-item-bg{background-color:var(--base-item-bg)}.bg-base-item-bg-hover{background-color:var(--base-item-bg-hover)}.bg-base-link{background-color:var(--base-link)}.bg-body-bg{background-color:var(--body-bg)}.bg-branding-label-bg{background-color:var(--branding-label-bg)}.bg-button-base{background-color:var(--button-base)}.bg-button-contrast{background-color:var(--button-contrast)}.bg-button-danger{background-color:var(--button-danger)}.bg-button-dark{background-color:var(--button-dark)}.bg-button-ghost{background-color:var(--button-ghost)}.bg-button-info{background-color:var(--button-info)}.bg-button-light{background-color:var(--button-light)}.bg-button-primary{background-color:var(--button-primary)}.bg-button-question{background-color:var(--button-question)}.bg-button-secondary{background-color:var(--button-secondary)}.bg-button-success{background-color:var(--button-success)}.bg-button-warning{background-color:var(--button-warning)}.bg-callout-base{background-color:var(--callout-base)}.bg-callout-base-bg{background-color:var(--callout-base-bg)}.bg-callout-contrast{background-color:var(--callout-contrast)}.bg-callout-contrast-bg{background-color:var(--callout-contrast-bg)}.bg-callout-danger{background-color:var(--callout-danger)}.bg-callout-dark{background-color:var(--callout-dark)}.bg-callout-ghost{background-color:var(--callout-ghost)}.bg-callout-info{background-color:var(--callout-info)}.bg-callout-light{background-color:var(--callout-light)}.bg-callout-primary{background-color:var(--callout-primary)}.bg-callout-question{background-color:var(--callout-question)}.bg-callout-secondary{background-color:var(--callout-secondary)}.bg-callout-success{background-color:var(--callout-success)}.bg-callout-tip{background-color:var(--callout-tip)}.bg-callout-warning{background-color:var(--callout-warning)}.bg-card-image-bg{background-color:var(--card-image-bg)}.bg-danger-100{background-color:#F8E3E3}.bg-dark-850,.bg-dark-850\/50{background-color:#201E20}@supports (color:color-mix(in lab,red,red)){.bg-dark-850\/50{background-color:color-mix(in oklab,var(--dark-850) 50%,transparent)}}.bg-dark-900\/95{background-color:#101211}@supports (color:color-mix(in lab,red,red)){.bg-dark-900\/95{background-color:color-mix(in oklab,var(--dark-900) 95%,transparent)}}.bg-filter-bg{background-color:var(--filter-bg)}.bg-gray-100{background-color:#F4F7FD}.bg-gray-200{background-color:#E4E6F3}.bg-gray-400{background-color:#8695A8}.bg-gray-600{background-color:#3F4862}.bg-gray-700{background-color:#2D3048}.bg-gray-900{background-color:#0B0F1B}.bg-header-bg{background-color:var(--header-bg)}.bg-nav-item-bg-active{background-color:var(--nav-item-bg-active)}.bg-nav-item-border-active{background-color:var(--nav-item-border-active)}.bg-scheme-menu-item-bg{background-color:var(--scheme-menu-item-bg)}.bg-search-bg{background-color:var(--search-bg)}.bg-search-footer-kbd-bg{background-color:var(--search-footer-kbd-bg)}.bg-search-highlight-bg{background-color:var(--search-highlight-bg)}.bg-search-hint-bg{background-color:var(--search-hint-bg)}.bg-search-modal-bg{background-color:var(--search-modal-bg)}.bg-search-result-code-bg{background-color:var(--search-result-code-bg)}.bg-search-result-hover{background-color:var(--search-result-hover)}.bg-search-results-bg{background-color:var(--search-results-bg)}.bg-sidebar-left-bg{background-color:var(--sidebar-left-bg)}.bg-sidebar-right-bg{background-color:var(--sidebar-right-bg)}.bg-skeleton-bg{background-color:var(--skeleton-bg)}.bg-success-100{background-color:#E3F0EF}.bg-toc-border-active{background-color:var(--toc-border-active)}.bg-transparent{background-color:#0000}.bg-warning-100{background-color:#F9F1E2}.bg-white{background-color:#fff}.bg-white\/70{background-color:oklab(100% 0 5.96046e-8/.7)}.bg-white\/80{background-color:oklab(100% 0 5.96046e-8/.8)}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-card-padding{padding:var(--card-padding)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-0\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:.375rem}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:.375rem}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-3\/4{padding-top:75%}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pt-9\/16{padding-top:56.25%}.pt-9\/21{padding-top:42.857%}.pt-\[15vh\]{padding-top:15vh}.pt-full{padding-top:100%}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-5{padding-right:calc(var(--spacing)*5)}.pr-6{padding-right:calc(var(--spacing)*6)}.pr-14{padding-right:calc(var(--spacing)*14)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-5{padding-bottom:calc(var(--spacing)*5)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pb-9\/16{padding-bottom:56.25%}.pb-12{padding-bottom:calc(var(--spacing)*12)}.pb-16{padding-bottom:calc(var(--spacing)*16)}.pl-0{padding-left:calc(var(--spacing)*0)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.pl-6{padding-left:calc(var(--spacing)*6)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-body{font-family:Inter var,ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:1.5rem}.text-2xs{font-size:.75rem}.text-3xs{font-size:.675rem}.text-base{font-size:1rem}.text-card-category{font-size:var(--card-category-font-size)}.text-card-date{font-size:var(--card-date-font-size)}.text-card-title{font-size:var(--card-title-font-size)}.text-lg{font-size:1.125rem}.text-sm{font-size:.875rem}.text-transform-description{font-size:var(--description-text-transform)}.text-xl{font-size:1.25rem}.text-xs{font-size:.8125rem}.leading-8{--tw-leading:calc(var(--spacing)*8);line-height:calc(var(--spacing)*8)}.leading-10{--tw-leading:calc(var(--spacing)*10);line-height:calc(var(--spacing)*10)}.leading-card-title{--tw-leading:var(--card-title-leading);line-height:var(--card-title-leading)}.leading-description{--tw-leading:var(--description-line-height);line-height:var(--description-line-height)}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:1.6;line-height:1.6}.leading-relaxed{--tw-leading:1.75;line-height:1.75}.leading-snug{--tw-leading:1.375;line-height:1.375}.leading-tight{--tw-leading:1.25;line-height:1.25}.font-body-link{--tw-font-weight:var(--body-link-weight);font-weight:var(--body-link-weight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-card-category{--tw-font-weight:var(--card-category-font-weight);font-weight:var(--card-category-font-weight)}.font-card-title{--tw-font-weight:var(--card-title-font-weight);font-weight:var(--card-title-font-weight)}.font-description{--tw-font-weight:var(--description-weight);font-weight:var(--description-weight)}.font-footer-link{--tw-font-weight:var(--footer-link-weight);font-weight:var(--footer-link-weight)}.font-header-text{--tw-font-weight:var(--header-text-weight);font-weight:var(--header-text-weight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-nav-item-text-active{--tw-font-weight:var(--nav-item-text-active-weight);font-weight:var(--nav-item-text-active-weight)}.font-nav-item-text-stack{--tw-font-weight:var(--nav-item-text-stack-weight);font-weight:var(--nav-item-text-stack-weight)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-toc-heading{--tw-font-weight:var(--toc-heading-weight);font-weight:var(--toc-heading-weight)}.tracking-description{--tw-tracking:var(--description-letter-spacing);letter-spacing:var(--description-letter-spacing)}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-badge-base-text{color:var(--badge-base-text)}.text-badge-contrast-text{color:var(--badge-contrast-text)}.text-badge-danger-text{color:var(--badge-danger-text)}.text-badge-dark-text{color:var(--badge-dark-text)}.text-badge-ghost-text{color:var(--badge-ghost-text)}.text-badge-info-text{color:var(--badge-info-text)}.text-badge-light-text{color:var(--badge-light-text)}.text-badge-primary-text{color:var(--badge-primary-text)}.text-badge-question-text{color:var(--badge-question-text)}.text-badge-secondary-text{color:var(--badge-secondary-text)}.text-badge-success-text{color:var(--badge-success-text)}.text-badge-warning-text{color:var(--badge-warning-text)}.text-base-500{color:#5293F3}.text-base-item-text{color:var(--base-item-text)}.text-base-item-text-active{color:var(--base-item-text-active)}.text-base-link{color:var(--base-link)}.text-base-text{color:var(--base-text)}.text-base-text-muted{color:var(--base-text-muted)}.text-body-link{color:var(--body-link)}.text-branding-label-text{color:var(--branding-label-text)}.text-button-base-text{color:var(--button-base-text)}.text-button-contrast-text{color:var(--button-contrast-text)}.text-button-danger-text{color:var(--button-danger-text)}.text-button-dark-text{color:var(--button-dark-text)}.text-button-ghost-text{color:var(--button-ghost-text)}.text-button-info-text{color:var(--button-info-text)}.text-button-light-text{color:var(--button-light-text)}.text-button-primary{color:var(--button-primary)}.text-button-primary-text{color:var(--button-primary-text)}.text-button-question-text{color:var(--button-question-text)}.text-button-secondary-text{color:var(--button-secondary-text)}.text-button-success-text{color:var(--button-success-text)}.text-button-warning-text{color:var(--button-warning-text)}.text-callout-base{color:var(--callout-base)}.text-callout-contrast{color:var(--callout-contrast)}.text-callout-contrast-text{color:var(--callout-contrast-text)}.text-callout-danger{color:var(--callout-danger)}.text-callout-dark{color:var(--callout-dark)}.text-callout-ghost{color:var(--callout-ghost)}.text-callout-info{color:var(--callout-info)}.text-callout-light{color:var(--callout-light)}.text-callout-primary{color:var(--callout-primary)}.text-callout-question{color:var(--callout-question)}.text-callout-secondary{color:var(--callout-secondary)}.text-callout-success{color:var(--callout-success)}.text-callout-tip{color:var(--callout-tip)}.text-callout-warning{color:var(--callout-warning)}.text-card-category-text{color:var(--card-category-text)}.text-card-date-text{color:var(--card-date-text)}.text-card-description-text{color:var(--card-description-text)}.text-card-title-text{color:var(--card-title-text)}.text-danger-600{color:#BF4340}.text-danger-700{color:#A83F3A}.text-danger-800{color:#7E2F28}.text-dark-300{color:#C3C2C4}.text-dark-350{color:#9E9DA0}.text-description{color:var(--description-color)}.text-filter-placeholder{color:var(--filter-placeholder)}.text-footer-link{color:var(--footer-link)}.text-footer-text{color:var(--footer-text)}.text-gray-300{color:#BDC8DA}.text-gray-350{color:#A6B2C4}.text-gray-400{color:#8695A8}.text-gray-500{color:#535C77}.text-gray-600{color:#3F4862}.text-gray-700{color:#2D3048}.text-gray-900{color:#0B0F1B}.text-heading-h1{color:var(--heading-h1)}.text-inherit{color:inherit}.text-nav-item-button{color:var(--nav-item-button)}.text-nav-item-text{color:var(--nav-item-text)}.text-nav-item-text-active{color:var(--nav-item-text-active)}.text-nav-item-text-stack{color:var(--nav-item-text-stack)}.text-scheme-menu-item-text{color:var(--scheme-menu-item-text)}.text-search-footer-text{color:var(--search-footer-text)}.text-search-hint-text{color:var(--search-hint-text)}.text-search-no-results-icon{color:var(--search-no-results-icon)}.text-search-no-results-text{color:var(--search-no-results-text)}.text-search-placeholder{color:var(--search-placeholder)}.text-search-result-breadcrumb{color:var(--search-result-breadcrumb)}.text-search-result-count{color:var(--search-result-count)}.text-search-result-heading{color:var(--search-result-heading)}.text-search-result-icon{color:var(--search-result-icon)}.text-search-result-text{color:var(--search-result-text)}.text-search-text{color:var(--search-text)}.text-success-700{color:#46877A}.text-tab-text{color:var(--tab-text)}.text-tab-text-active{color:var(--tab-text-active)}.text-toc-heading{color:var(--toc-heading)}.text-toc-text{color:var(--toc-text)}.text-toc-text-active{color:var(--toc-text-active)}.text-warning-700{color:#B58D39}.text-white{color:#fff}.card-category-case{text-transform:var(--card-category-case)}.heading-case{text-transform:var(--heading-case)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-filter-placeholder::placeholder{color:var(--filter-placeholder)}.placeholder-gray-400::placeholder{color:#8695A8}.placeholder-search-placeholder::placeholder{color:var(--search-placeholder)}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040)}.shadow-2xl,.shadow-lg{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.shadow-md,.shadow-none{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)}.shadow-xl,.shadow-xs{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-branding-label-border{--tw-ring-color:var(--branding-label-border)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-colors{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-transform{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\:inline-flex:is(:where(.group):hover *){display:inline-flex}.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:text-nav-item-text-hover:is(:where(.group):hover *){color:var(--nav-item-text-hover)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\:z-5:hover{z-index:5}.hover\:border-badge-base-border-hover:hover{border-color:var(--badge-base-border-hover)}.hover\:border-badge-contrast-border-hover:hover{border-color:var(--badge-contrast-border-hover)}.hover\:border-badge-danger-border-hover:hover{border-color:var(--badge-danger-border-hover)}.hover\:border-badge-dark-border-hover:hover{border-color:var(--badge-dark-border-hover)}.hover\:border-badge-ghost-border-hover:hover{border-color:var(--badge-ghost-border-hover)}.hover\:border-badge-info-border-hover:hover{border-color:var(--badge-info-border-hover)}.hover\:border-badge-light-border-hover:hover{border-color:var(--badge-light-border-hover)}.hover\:border-badge-primary-border-hover:hover{border-color:var(--badge-primary-border-hover)}.hover\:border-badge-question-border-hover:hover{border-color:var(--badge-question-border-hover)}.hover\:border-badge-secondary-border-hover:hover{border-color:var(--badge-secondary-border-hover)}.hover\:border-badge-success-border-hover:hover{border-color:var(--badge-success-border-hover)}.hover\:border-badge-warning-border-hover:hover{border-color:var(--badge-warning-border-hover)}.hover\:border-base-border-hover:hover{border-color:var(--base-border-hover)}.hover\:border-button-info-border-hover:hover{border-color:var(--button-info-border-hover)}.hover\:border-button-question-border-hover:hover{border-color:var(--button-question-border-hover)}.hover\:border-card-border-hover:hover{border-color:var(--card-border-hover)}.hover\:border-filter-border-hover:hover{border-color:var(--filter-border-hover)}.hover\:border-gray-400\/10:hover{border-color:#8695A8}@supports (color:color-mix(in lab,red,red)){.hover\:border-gray-400\/10:hover{border-color:color-mix(in oklab,var(--gray-400) 10%,transparent)}}.hover\:border-search-border-hover:hover{border-color:var(--search-border-hover)}.hover\:border-tab-border-hover:hover{border-color:var(--tab-border-hover)}.hover\:bg-badge-base-hover:hover{background-color:var(--badge-base-hover)}.hover\:bg-badge-contrast-hover:hover{background-color:var(--badge-contrast-hover)}.hover\:bg-badge-danger-hover:hover{background-color:var(--badge-danger-hover)}.hover\:bg-badge-dark-hover:hover{background-color:var(--badge-dark-hover)}.hover\:bg-badge-ghost-hover:hover{background-color:var(--badge-ghost-hover)}.hover\:bg-badge-info-hover:hover{background-color:var(--badge-info-hover)}.hover\:bg-badge-light-hover:hover{background-color:var(--badge-light-hover)}.hover\:bg-badge-primary-hover:hover{background-color:var(--badge-primary-hover)}.hover\:bg-badge-question-hover:hover{background-color:var(--badge-question-hover)}.hover\:bg-badge-secondary-hover:hover{background-color:var(--badge-secondary-hover)}.hover\:bg-badge-success-hover:hover{background-color:var(--badge-success-hover)}.hover\:bg-badge-warning-hover:hover{background-color:var(--badge-warning-hover)}.hover\:bg-base-item-bg-active:hover{background-color:var(--base-item-bg-active)}.hover\:bg-base-item-bg-hover:hover{background-color:var(--base-item-bg-hover)}.hover\:bg-button-base-hover:hover{background-color:var(--button-base-hover)}.hover\:bg-button-contrast-hover:hover{background-color:var(--button-contrast-hover)}.hover\:bg-button-danger-hover:hover{background-color:var(--button-danger-hover)}.hover\:bg-button-dark-hover:hover{background-color:var(--button-dark-hover)}.hover\:bg-button-ghost-hover:hover{background-color:var(--button-ghost-hover)}.hover\:bg-button-info-hover:hover{background-color:var(--button-info-hover)}.hover\:bg-button-light-hover:hover{background-color:var(--button-light-hover)}.hover\:bg-button-primary-hover:hover{background-color:var(--button-primary-hover)}.hover\:bg-button-question-hover:hover{background-color:var(--button-question-hover)}.hover\:bg-button-secondary-hover:hover{background-color:var(--button-secondary-hover)}.hover\:bg-button-success-hover:hover{background-color:var(--button-success-hover)}.hover\:bg-button-warning-hover:hover{background-color:var(--button-warning-hover)}.hover\:bg-gray-200:hover{background-color:#E4E6F3}.hover\:bg-gray-300:hover{background-color:#BDC8DA}.hover\:bg-nav-item-bg-hover:hover{background-color:var(--nav-item-bg-hover)}.hover\:bg-nav-item-button-active-hover\/50:hover{background-color:var(--nav-item-button-active-hover)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-nav-item-button-active-hover\/50:hover{background-color:color-mix(in oklab,var(--nav-item-button-active-hover) 50%,transparent)}}.hover\:bg-search-result-hover:hover{background-color:var(--search-result-hover)}.hover\:text-badge-base-text-hover:hover{color:var(--badge-base-text-hover)}.hover\:text-badge-contrast-text-hover:hover{color:var(--badge-contrast-text-hover)}.hover\:text-badge-danger-text-hover:hover{color:var(--badge-danger-text-hover)}.hover\:text-badge-dark-text-hover:hover{color:var(--badge-dark-text-hover)}.hover\:text-badge-ghost-text-hover:hover{color:var(--badge-ghost-text-hover)}.hover\:text-badge-info-text-hover:hover{color:var(--badge-info-text-hover)}.hover\:text-badge-light-text-hover:hover{color:var(--badge-light-text-hover)}.hover\:text-badge-primary-text-hover:hover{color:var(--badge-primary-text-hover)}.hover\:text-badge-question-text-hover:hover{color:var(--badge-question-text-hover)}.hover\:text-badge-secondary-text-hover:hover{color:var(--badge-secondary-text-hover)}.hover\:text-badge-success-text-hover:hover{color:var(--badge-success-text-hover)}.hover\:text-badge-warning-text-hover:hover{color:var(--badge-warning-text-hover)}.hover\:text-base-500:hover{color:#5293F3}.hover\:text-base-link-hover:hover{color:var(--base-link-hover)}.hover\:text-body-link-hover:hover{color:var(--body-link-hover)}.hover\:text-button-info-text-hover:hover{color:var(--button-info-text-hover)}.hover\:text-button-primary-hover:hover{color:var(--button-primary-hover)}.hover\:text-button-question-text-hover:hover{color:var(--button-question-text-hover)}.hover\:text-footer-link-hover:hover{color:var(--footer-link-hover)}.hover\:text-gray-600:hover{color:#3F4862}.hover\:text-gray-800:hover{color:#181F2D}.hover\:text-header-text-hover:hover{color:var(--header-text-hover)}.hover\:text-nav-item-text-active-hover:hover{color:var(--nav-item-text-active-hover)}.hover\:text-search-result-text:hover{color:var(--search-result-text)}.hover\:text-tab-text-hover:hover{color:var(--tab-text-hover)}.hover\:text-toc-text-hover:hover{color:var(--toc-text-hover)}.hover\:text-white:hover{color:#fff}.hover\:underline:hover{text-decoration-line:underline}}.focus\:border-filter-border-focus:focus{border-color:var(--filter-border-focus)}.focus\:border-gray-600:focus{border-color:#3F4862}.focus\:border-search-border-focus:focus{border-color:var(--search-border-focus)}.focus\:bg-gray-200:focus{background-color:#E4E6F3}.focus\:bg-gray-300:focus{background-color:#BDC8DA}.focus\:bg-gray-400:focus{background-color:#8695A8}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline:2px solid #0000;outline-offset:2px}}@media not all and (min-width:960px){.max-md\:right-10{right:calc(var(--spacing)*10)}}@media (min-width:640px){.sm\:mr-1{margin-right:calc(var(--spacing)*1)}.sm\:block{display:block}.sm\:grid{display:grid}.sm\:inline{display:inline}.sm\:w-1\/2{width:50%}.sm\:w-auto{width:auto}.sm\:px-3{padding-inline:calc(var(--spacing)*3)}.sm\:px-16{padding-inline:calc(var(--spacing)*16)}}@media (min-width:960px){.md\:sticky{position:sticky}.md\:top-20{top:5rem}.md\:z-0{z-index:0}.md\:mt-6{margin-top:calc(var(--spacing)*6)}.md\:mt-16{margin-top:calc(var(--spacing)*16)}.md\:mb-0{margin-bottom:calc(var(--spacing)*0)}.md\:line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.md\:flex{display:flex}.md\:hidden{display:none}.md\:inline-block{display:inline-block}.md\:h-20{height:calc(var(--spacing)*20)}.md\:h-screen{height:100vh}.md\:w-5\/12{width:41.6667%}.md\:w-75{width:18.75rem}.md\:w-104{width:26rem}.md\:max-w-card-max-width{max-width:var(--card-max-width)}.md\:grow{flex-grow:1}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.md\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.md\:border-none{--tw-border-style:none;border-style:none}.md\:bg-transparent{background-color:#0000}.md\:p-0{padding:calc(var(--spacing)*0)}.md\:px-4{padding-inline:calc(var(--spacing)*4)}.md\:px-6{padding-inline:calc(var(--spacing)*6)}.md\:px-8{padding-inline:calc(var(--spacing)*8)}.md\:px-16{padding-inline:calc(var(--spacing)*16)}.md\:pt-0{padding-top:calc(var(--spacing)*0)}.md\:pb-0{padding-bottom:calc(var(--spacing)*0)}.md\:pl-16{padding-left:calc(var(--spacing)*16)}.md\:text-2xs{font-size:.75rem}.md\:text-4xl{font-size:2.5rem}.md\:text-card-title-md{font-size:var(--card-title-font-size-md)}.md\:text-lg{font-size:1.125rem}.md\:text-sm{font-size:.875rem}.md\:text-header-text{color:var(--header-text)}.md\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.md\:transition-transform{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}}@media (min-width:1200px){.lg\:sticky{position:sticky}.lg\:top-20{top:5rem}.lg\:top-40{top:10rem}.lg\:z-0{z-index:0}.lg\:ml-2{margin-left:calc(var(--spacing)*2)}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-auto{height:auto}.lg\:w-64{width:calc(var(--spacing)*64)}.lg\:shrink-0{flex-shrink:0}.lg\:translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x) var(--tw-translate-y)}.lg\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.lg\:border-none{--tw-border-style:none;border-style:none}.lg\:pt-2{padding-top:calc(var(--spacing)*2)}.lg\:pt-6{padding-top:calc(var(--spacing)*6)}.lg\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@media (min-width:1440px){.xl\:block{display:block}}.dark\:hidden:is(.dark *){display:none}.dark\:inline-block:is(.dark *){display:inline-block}.dark\:border-base-border:is(.dark *){border-color:var(--base-border)}.dark\:border-dark-450:is(.dark *){border-color:#434444}.dark\:border-dark-500:is(.dark *){border-color:#343533}.dark\:border-dark-600:is(.dark *){border-color:#2B2C2E}.dark\:border-dark-700:is(.dark *){border-color:#292625}.dark\:border-dark-850:is(.dark *){border-color:#201E20}.dark\:bg-danger-400:is(.dark *){background-color:#E07E7C}.dark\:bg-danger-500:is(.dark *){background-color:#D44A47}.dark\:bg-dark-400:is(.dark *){background-color:#635F60}.dark\:bg-dark-450:is(.dark *){background-color:#434444}.dark\:bg-dark-500:is(.dark *){background-color:#343533}.dark\:bg-dark-550:is(.dark *),.dark\:bg-dark-550\/50:is(.dark *){background-color:#333130}@supports (color:color-mix(in lab,red,red)){.dark\:bg-dark-550\/50:is(.dark *){background-color:color-mix(in oklab,var(--dark-550) 50%,transparent)}}.dark\:bg-dark-600:is(.dark *){background-color:#2B2C2E}.dark\:bg-dark-650:is(.dark *){background-color:#2D2B2D}.dark\:bg-dark-700:is(.dark *){background-color:#292625}.dark\:bg-dark-800:is(.dark *),.dark\:bg-dark-800\/50:is(.dark *){background-color:#242221}@supports (color:color-mix(in lab,red,red)){.dark\:bg-dark-800\/50:is(.dark *){background-color:color-mix(in oklab,var(--dark-800) 50%,transparent)}}.dark\:bg-dark-850:is(.dark *),.dark\:bg-dark-850\/70:is(.dark *){background-color:#201E20}@supports (color:color-mix(in lab,red,red)){.dark\:bg-dark-850\/70:is(.dark *){background-color:color-mix(in oklab,var(--dark-850) 70%,transparent)}}.dark\:bg-dark-850\/80:is(.dark *){background-color:#201E20}@supports (color:color-mix(in lab,red,red)){.dark\:bg-dark-850\/80:is(.dark *){background-color:color-mix(in oklab,var(--dark-850) 80%,transparent)}}.dark\:bg-dark-900:is(.dark *),.dark\:bg-dark-900\/70:is(.dark *){background-color:#101211}@supports (color:color-mix(in lab,red,red)){.dark\:bg-dark-900\/70:is(.dark *){background-color:color-mix(in oklab,var(--dark-900) 70%,transparent)}}.dark\:bg-success-500:is(.dark *){background-color:#5AA99A}.dark\:bg-warning-500:is(.dark *){background-color:#E4AE47}.dark\:bg-white:is(.dark *){background-color:#fff}.dark\:px-5:is(.dark *){padding-inline:calc(var(--spacing)*5)}.dark\:text-dark-200:is(.dark *){color:#ECEEEF}.dark\:text-dark-250:is(.dark *){color:#DFDFE0}.dark\:text-dark-300:is(.dark *){color:#C3C2C4}.dark\:text-dark-350:is(.dark *){color:#9E9DA0}.dark\:text-dark-400:is(.dark *){color:#635F60}.dark\:text-dark-650:is(.dark *){color:#2D2B2D}.dark\:text-white:is(.dark *){color:#fff}.dark\:placeholder-dark-400:is(.dark *)::placeholder{color:#635F60}.dark\:shadow-lg:is(.dark *){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media (hover:hover){.dark\:hover\:border-dark-450:is(.dark *):hover{border-color:#434444}.dark\:hover\:bg-dark-450:is(.dark *):hover{background-color:#434444}.dark\:hover\:bg-dark-500:is(.dark *):hover,.dark\:hover\:bg-dark-500\/50:is(.dark *):hover{background-color:#343533}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-dark-500\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--dark-500) 50%,transparent)}}.dark\:hover\:text-dark-300:is(.dark *):hover{color:#C3C2C4}}.dark\:focus\:border-dark-450:is(.dark *):focus{border-color:#434444}.dark\:focus\:bg-dark-450:is(.dark *):focus{background-color:#434444}.dark\:focus\:bg-dark-750:is(.dark *):focus{background-color:#262726}@media print{.print\:hidden{display:none}.print\:justify-center{justify-content:center}.print\:border-none{--tw-border-style:none;border-style:none}}}:root{--base-text-muted:#8695A8;--base-text:#2D3048;--base-text-strong:#0B0F1B;--base-bg:#fff;--base-border:#E4E6F3;--base-border-hover:#BDC8DA;--base-border-strong:#8695A8;--base-link:#5293F3;--base-link-hover:#304C91;--base-link-weight:500;--base-item-text:var(--base-text-strong);--base-item-text-active:var(--base-link);--base-item-bg:var(--transparent);--base-item-bg-hover:#F0F6FE;--base-item-bg-active:#E3EFFF;--selector:#5495f1;--selection-bg:#CBDFF9;--selection-text:var(--base-text-strong);--transparent:transparent;--skeleton-bg:#E4E6F3;--color-preview-display:inline-block;--color-preview-width:12px;--color-preview-height:12px;--color-preview-margin-left:.25rem;--color-preview-border:var(--base-border);--branding-label-text:#5293F3;--branding-label-bg:#F0F6FE;--branding-label-border:#AAC9F9;--header-bg:var(--base-bg);--header-border:var(--base-border);--header-text:var(--base-link);--header-text-weight:var(--base-link-weight);--header-text-hover:var(--base-link-hover);--search-text:var(--base-text);--search-placeholder:var(--base-text-muted);--search-bg:var(--header-bg);--search-border:var(--base-border);--search-border-hover:var(--base-border-hover);--search-border-focus:var(--base-border-hover);--search-highlight-bg:#E3EFFF;--search-hint-text:var(--search-placeholder);--search-hint-bg:var(--header-bg);--search-hint-border:var(--search-border);--search-result-heading:var(--base-text-strong);--search-result-text:var(--base-text);--search-result-breadcrumb:var(--base-text-muted);--search-result-icon:var(--base-text-muted);--search-result-hover:var(--base-item-bg-hover);--search-result-border:#F4F7FD;--search-result-code-bg:#F4F7FD;--search-result-count:var(--base-text-muted);--search-no-results-text:var(--base-text-muted);--search-no-results-icon:#BDC8DA;--search-footer-text:var(--base-text-muted);--search-footer-kbd-bg:#F4F7FD;--search-modal-bg:#fff;--search-modal-border:#E4E6F3;--search-results-bg:#fff;--search-backdrop:#4b5563b3;--filter-text:var(--base-text);--filter-placeholder:var(--base-text-muted);--filter-bg:var(--sidebar-left-bg);--filter-border:var(--base-border);--filter-border-hover:var(--base-border-hover);--filter-border-focus:var(--base-border-hover);--body-bg:var(--base-bg);--body-text:var(--base-text);--body-link:var(--base-link);--body-link-hover:var(--base-link-hover);--body-link-weight:var(--base-link-weight);--heading-text:#0B0F1B;--heading-weight:700;--heading-case:normal-case;--heading-h1-border-top:var(--transparent);--heading-h2-border-top:var(--transparent);--heading-h3-border-top:var(--transparent);--heading-h4-border-top:var(--transparent);--heading-h5-border-top:var(--transparent);--heading-h6-border-top:var(--transparent);--heading-h1-margin-bottom:2rem;--heading-h2-margin-bottom:1.5rem;--heading-h3-margin-bottom:1rem;--heading-h4-margin-bottom:.75rem;--heading-h5-margin-bottom:.5rem;--heading-h6-margin-bottom:.5rem;--heading-h1-padding-top:0;--heading-h2-padding-top:0;--heading-h3-padding-top:0;--heading-h4-padding-top:0;--heading-h5-padding-top:0;--heading-h6-padding-top:0;--heading-h1:var(--heading-text);--heading-h2:var(--heading-text);--heading-h3:var(--heading-text);--heading-h4:var(--heading-text);--heading-h5:var(--heading-text);--heading-h6:var(--heading-text);--heading-h1-weight:var(--heading-weight);--heading-h2-weight:var(--heading-weight);--heading-h3-weight:var(--heading-weight);--heading-h4-weight:var(--heading-weight);--heading-h5-weight:var(--heading-weight);--heading-h6-weight:var(--heading-weight);--heading-h1-case:var(--heading-case);--heading-h2-case:var(--heading-case);--heading-h3-case:var(--heading-case);--heading-h4-case:var(--heading-case);--heading-h5-case:var(--heading-case);--heading-h6-case:var(--heading-case);--heading-h1-font-size:2.5rem;--heading-h2-font-size:2rem;--heading-h3-font-size:1.5rem;--heading-h4-font-size:1.125rem;--heading-h5-font-size:1rem;--heading-h6-font-size:.875rem;--scheme-menu-item-bg:var(--base-item-bg);--scheme-menu-item-bg-hover:var(--base-item-bg-hover);--scheme-menu-item-bg-active:var(--base-item-bg-active);--scheme-menu-item-text:var(--base-text);--scheme-menu-item-text-active:var(--base-item-text-active);--sidebar-left-bg:var(--base-bg);--sidebar-left-border:var(--base-border);--nav-bg:var(--sidebar-left-bg);--nav-item-bg-hover:var(--base-item-bg-hover);--nav-item-bg-active:var(--base-item-bg-active);--nav-item-bg-active-hover:var(--base-item-bg-active);--nav-item-text:#0B0F1B;--nav-item-text-hover:var(--base-item-text-active);--nav-item-text-active:var(--base-item-text-active);--nav-item-text-active-hover:var(--base-item-text-active);--nav-item-text-active-weight:var(--base-link-weight);--nav-item-button:#8695A8;--nav-item-button-active-hover:#CBDFF9;--nav-item-border-active:#5293F3;--nav-item-text-stack:#2D3048;--nav-item-text-stack-case:uppercase;--nav-item-text-stack-weight:600;--nav-badge-margin-left:auto;--nav-badge-margin-left-alt:.75rem;--sidebar-right-bg:var(--base-bg);--sidebar-right-border:var(--base-border);--toc-heading:#2D3048;--toc-text:#2D3048;--toc-text-hover:#5293F3;--toc-text-active:#5293F3;--toc-border-active:#5293F3;--toc-heading-case:uppercase;--toc-heading-weight:600;--footer-text:#535C77;--footer-link:var(--base-link);--footer-link-hover:var(--base-link-hover);--footer-link-weight:var(--base-link-weight);--description-font-size:1.2rem;--description-weight:500;--description-color:#8695A8;--description-line-height:1.75;--description-margin-bottom:2rem;--description-margin-top:-.75rem;--description-letter-spacing:0;--description-text-transform:none;--description-display:block;--backlinks-display:block;--backlinks-margin-top:0;--backlinks-margin-bottom:1.5rem;--backlinks-border-top:var(--transparent);--backlinks-title:var(--heading-h2);--backlinks-title-case:var(--heading-h2-case);--backlinks-title-padding-top:var(--heading-h2-padding-top);--backlinks-title-margin-top:0;--backlinks-title-margin-bottom:var(--heading-h2-margin-bottom);--backlinks-title-font-size:var(--heading-h2-font-size);--backlinks-title-font-weight:var(--heading-h2-weight);--backlinks-card-border:var(--base-border);--backlinks-card-border-hover:var(--base-border-hover);--backlinks-card-rounded:.5rem;--backlinks-card-shadow-hover:var(--shadow-xs);--backlinks-link:var(--base-link);--backlinks-link-hover:var(--base-link-hover);--backlinks-link-font-size:.875rem;--backlinks-text:var(--body-text);--backlinks-text-font-size:.875rem;--backlinks-text-font-weight:400;--card-bg:var(--base-bg);--card-border:#E4E6F3;--card-border-hover:#8695A8;--card-rounded:.5rem;--card-padding:1.5rem;--card-margin-bottom:1.5rem;--card-max-width:960px;--card-max-width-sm:558px;--card-min-width:250px;--card-flex-basis:250px;--card-image-bg:#BDC8DA;--card-image-inner-border:#E4E6F3;--card-image-width:41.6667%;--card-title-text:var(--base-text-strong);--card-title-font-size:1.125rem;--card-title-font-size-md:1.25rem;--card-title-font-weight:600;--card-title-leading:1.375;--card-description-text:var(--body-text);--card-description-margin-top:.5rem;--card-category-text:var(--body-link);--card-category-font-size:.8125rem;--card-category-font-weight:600;--card-category-case:uppercase;--card-date-text:#535C77;--card-date-font-size:.875rem;--card-date-margin-top:.75rem;--card-group-gap:1.5rem;--card-group-margin-bottom:1.5rem;--pager-margin-top:2.5rem;--pager-margin-bottom:1.5rem;--pager-gap:.5rem;--pager-item-size:2.5rem;--pager-font-size:.875rem;--pager-font-weight:500;--pager-text-decoration:none;--pager-border-radius:.25rem;--pager-border-width:1px;--pager-transition-duration:.2s;--pager-text:#5293F3;--pager-bg:transparent;--pager-border:#E4E6F3;--pager-text-hover:#5293F3;--pager-bg-hover:#EDF1F7;--pager-border-hover:#E4E6F3;--pager-text-active:#fff;--pager-bg-active:#5293F3;--pager-border-active:#4B77DB;--pager-text-active-hover:#fff;--pager-bg-active-hover:#87B3F6;--pager-border-active-hover:#5293F3;--badge-base:#E3EFFF;--badge-base-hover:#E3EFFF;--badge-base-text:#5293F3;--badge-base-text-hover:#5293F3;--badge-base-border:#CBDFF9;--badge-base-border-hover:#87B3F6;--badge-primary:#E6EFFE;--badge-primary-hover:#E6EFFE;--badge-primary-text:#4283FD;--badge-primary-text-hover:#4283FD;--badge-primary-border:#CAE1FB;--badge-primary-border-hover:#85B3F3;--badge-secondary:#F4F7FD;--badge-secondary-hover:#F4F7FD;--badge-secondary-text:#3F4862;--badge-secondary-text-hover:#3F4862;--badge-secondary-border:#E4E6F3;--badge-secondary-border-hover:#8695A8;--badge-success:#E3F0EF;--badge-success-hover:#E3F0EF;--badge-success-text:#46877A;--badge-success-text-hover:#46877A;--badge-success-border:#C8E6E0;--badge-success-border-hover:#86C4BA;--badge-danger:#F8E3E3;--badge-danger-hover:#F8E3E3;--badge-danger-text:#BF4340;--badge-danger-text-hover:#BF4340;--badge-danger-border:#F0C9C6;--badge-danger-border-hover:#E07E7C;--badge-warning:#F9F1E2;--badge-warning-hover:#F9F1E2;--badge-warning-text:#B58D39;--badge-warning-text-hover:#B58D39;--badge-warning-border:#F4E7C2;--badge-warning-border-hover:#ECC875;--badge-info:var(--transparent);--badge-info-hover:var(--transparent);--badge-info-text:#5293F3;--badge-info-text-hover:#AAC9F9;--badge-info-border:#5293F3;--badge-info-border-hover:#AAC9F9;--badge-question:#EFE9F9;--badge-question-hover:#EFE9F9;--badge-question-text:#8057AF;--badge-question-text-hover:#8057AF;--badge-question-border:#DFD0F3;--badge-question-border-hover:#BB95E5;--badge-light:#fff;--badge-light-hover:#F4F7FD;--badge-light-text:#3F4862;--badge-light-text-hover:#3F4862;--badge-light-border:#E4E6F3;--badge-light-border-hover:#8695A8;--badge-dark:#2D3048;--badge-dark-hover:#3F4862;--badge-dark-text:#fff;--badge-dark-text-hover:#fff;--badge-dark-border:#2D3048;--badge-dark-border-hover:#535C77;--badge-ghost:var(--body-bg);--badge-ghost-hover:#F9F7FB;--badge-ghost-text:#BDC8DA;--badge-ghost-text-hover:#BDC8DA;--badge-ghost-border:#E4E6F3;--badge-ghost-border-hover:#BDC8DA;--badge-contrast:#0B0F1B;--badge-contrast-hover:#3F4862;--badge-contrast-text:#fff;--badge-contrast-text-hover:#fff;--badge-contrast-border:#0B0F1B;--badge-contrast-border-hover:#181F2D;--button-base:#5293F3;--button-base-hover:#4368C2;--button-base-text:#F0F6FE;--button-primary:#4283FD;--button-primary-hover:#4269C3;--button-primary-text:#ECF4FE;--button-secondary:#535C77;--button-secondary-hover:#2D3048;--button-secondary-text:#F9F7FB;--button-success:#5AA99A;--button-success-hover:#46877A;--button-success-text:#ECF5F6;--button-danger:#D44A47;--button-danger-hover:#A83F3A;--button-danger-text:#F9EDEE;--button-warning:#E4AE47;--button-warning-hover:#CA9D3E;--button-warning-text:#5C451B;--button-info:var(--transparent);--button-info-hover:var(--transparent);--button-info-text:#5293F3;--button-info-text-hover:#AAC9F9;--button-info-border:#5293F3;--button-info-border-hover:#AAC9F9;--button-question:#9B6CDB;--button-question-hover:#8057AF;--button-question-text:#F6EEFA;--button-question-text-hover:#EFE9F9;--button-question-border:#9B6CDB;--button-question-border-hover:#8057AF;--button-light:#E4E6F3;--button-light-hover:#BDC8DA;--button-light-text:#0B0F1B;--button-dark:#2D3048;--button-dark-hover:#3F4862;--button-dark-text:#F9F7FB;--button-ghost:#F4F7FD;--button-ghost-hover:#EDF1F7;--button-ghost-text:#BDC8DA;--button-contrast:#0B0F1B;--button-contrast-hover:#2D3048;--button-contrast-text:#F9F7FB;--callout-base-bg:#fff;--callout-base-border:var(--base-border);--callout-base:#5293F3;--callout-primary:#4283FD;--callout-secondary:#535C77;--callout-success:#5AA99A;--callout-tip:#86C4BA;--callout-danger:#D44A47;--callout-warning:#E4AE47;--callout-info:#AAC9F9;--callout-question:#9B6CDB;--callout-light:#BDC8DA;--callout-dark:#0B0F1B;--callout-ghost:#F4F7FD;--callout-contrast:#3F4862;--callout-contrast-bg:#0B0F1B;--callout-contrast-text:#BDC8DA;--callout-contrast-border:#0B0F1B;--image-rounded:0px;--image-border:var(--base-border);--image-border-width:0;--list-checked:#5293F3;--list-unchecked:#BDC8DA;--tab-text-active:#5293F3;--tab-border-active:#5293F3;--tab-text:#535C77;--tab-text-hover:#5293F3;--tab-border:var(--transparent);--tab-border-hover:#BDC8DA;--step-number-bg:#5293F3;--step-number-text:#fff;--step-number-border:#5293F3;--step-line:#BDC8DA;--step-title-text:var(--base-text-strong);--grid:#5495f1;--base-50:#5293F3;}@supports (color:color-mix(in lab,red,red)){:root{--base-50:color-mix(in srgb,#5293F3 var(--mix-50),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--base-100:color-mix(in srgb,#5293F3 var(--mix-100),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--base-200:color-mix(in srgb,#5293F3 var(--mix-200),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--base-300:color-mix(in srgb,#5293F3 var(--mix-300),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--base-400:color-mix(in srgb,#5293F3 var(--mix-400),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--base-600:color-mix(in srgb,#5293F3 var(--mix-600),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--base-700:color-mix(in srgb,#5293F3 var(--mix-700),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--base-800:color-mix(in srgb,#5293F3 var(--mix-800),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--base-900:color-mix(in srgb,#5293F3 var(--mix-900),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--primary-50:color-mix(in srgb,#4283FD var(--mix-50),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--primary-100:color-mix(in srgb,#4283FD var(--mix-100),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--primary-200:color-mix(in srgb,#4283FD var(--mix-200),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--primary-300:color-mix(in srgb,#4283FD var(--mix-300),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--primary-400:color-mix(in srgb,#4283FD var(--mix-400),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--primary-600:color-mix(in srgb,#4283FD var(--mix-600),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--primary-700:color-mix(in srgb,#4283FD var(--mix-700),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--primary-800:color-mix(in srgb,#4283FD var(--mix-800),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--primary-900:color-mix(in srgb,#4283FD var(--mix-900),#000)}}:root{--gray-50:#f8f9fc;--gray-100:#f4f6fc;--gray-150:#edf0f6;--gray-200:#e4e8f1;--gray-250:#d2d9e3;--gray-300:#bdc8da;--gray-350:#a4b1c6;--gray-400:#8693a9;--gray-450:#65718c;--gray-500:#525e78;--gray-550:#46536d;--gray-600:#3f4a64;--gray-650:#313c56;--gray-700:#2c3047;--gray-750:#1f2236;--gray-800:#181d2d;--gray-850:#101523;--gray-900:#090d1c;--dark-50:#fafafa;--dark-100:#f7f7f7;--dark-150:#f2f2f2;--dark-200:#eee;--dark-250:#e0e0e0;--dark-300:#c4c4c4;--dark-350:#9e9e9e;--dark-400:#616161;--dark-450:#424242;--dark-500:#353535;--dark-550:#323232;--dark-600:#2d2d2d;--dark-650:#2c2c2c;--dark-700:#272727;--dark-750:#252525;--dark-800:#222;--dark-850:#1e1e1e;--dark-900:#121212;}@supports (color:color-mix(in lab,red,red)){:root{--success-50:color-mix(in srgb,#5AA99A var(--mix-50),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--success-100:color-mix(in srgb,#5AA99A var(--mix-100),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--success-200:color-mix(in srgb,#5AA99A var(--mix-200),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--success-300:color-mix(in srgb,#5AA99A var(--mix-300),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--success-400:color-mix(in srgb,#5AA99A var(--mix-400),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--success-600:color-mix(in srgb,#5AA99A var(--mix-600),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--success-700:color-mix(in srgb,#5AA99A var(--mix-700),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--success-800:color-mix(in srgb,#5AA99A var(--mix-800),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--success-900:color-mix(in srgb,#5AA99A var(--mix-900),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--danger-50:color-mix(in srgb,#D44A47 var(--mix-50),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--danger-100:color-mix(in srgb,#D44A47 var(--mix-100),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--danger-200:color-mix(in srgb,#D44A47 var(--mix-200),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--danger-300:color-mix(in srgb,#D44A47 var(--mix-300),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--danger-400:color-mix(in srgb,#D44A47 var(--mix-400),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--danger-600:color-mix(in srgb,#D44A47 var(--mix-600),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--danger-700:color-mix(in srgb,#D44A47 var(--mix-700),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--danger-800:color-mix(in srgb,#D44A47 var(--mix-800),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--danger-900:color-mix(in srgb,#D44A47 var(--mix-900),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--warning-50:color-mix(in srgb,#E4AE47 var(--mix-50),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--warning-100:color-mix(in srgb,#E4AE47 var(--mix-100),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--warning-200:color-mix(in srgb,#E4AE47 var(--mix-200),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--warning-300:color-mix(in srgb,#E4AE47 var(--mix-300),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--warning-400:color-mix(in srgb,#E4AE47 var(--mix-400),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--warning-600:color-mix(in srgb,#E4AE47 var(--mix-600),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--warning-700:color-mix(in srgb,#E4AE47 var(--mix-700),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--warning-800:color-mix(in srgb,#E4AE47 var(--mix-800),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--warning-900:color-mix(in srgb,#E4AE47 var(--mix-900),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--royal-50:color-mix(in srgb,#9B6CDB var(--mix-50),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--royal-100:color-mix(in srgb,#9B6CDB var(--mix-100),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--royal-200:color-mix(in srgb,#9B6CDB var(--mix-200),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--royal-300:color-mix(in srgb,#9B6CDB var(--mix-300),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--royal-400:color-mix(in srgb,#9B6CDB var(--mix-400),#fff)}}@supports (color:color-mix(in lab,red,red)){:root{--royal-600:color-mix(in srgb,#9B6CDB var(--mix-600),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--royal-700:color-mix(in srgb,#9B6CDB var(--mix-700),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--royal-800:color-mix(in srgb,#9B6CDB var(--mix-800),#000)}}@supports (color:color-mix(in lab,red,red)){:root{--royal-900:color-mix(in srgb,#9B6CDB var(--mix-900),#000)}}.dark{--base-text-muted:#8695A8;--base-text:#C3C2C4;--base-text-strong:#fff;--base-bg:#101211;--base-border:#2D2B2D;--base-border-hover:#44556E;--base-border-strong:#66708B;--base-link-hover:#AAC9F9;--base-item-bg-hover:#2B2C2E;--base-item-bg-active:#333130;--selection-bg:#4368C2;--selection-text:#fff;--skeleton-bg:#2B2C2E;--branding-label-text:#5293F3;--branding-label-border:#5293F3;--branding-label-bg:transparent;--heading-text:#fff;--search-highlight-bg:#304C91;--search-border:var(--base-border-hover);--search-border-hover:var(--base-border-strong);--search-border-focus:var(--base-border-strong);--search-result-hover:#434444;--search-result-border:#343533;--search-result-code-bg:#2B2C2E;--search-no-results-icon:#3F4862;--search-footer-kbd-bg:#343533;--search-modal-bg:#2D2B2D;--search-modal-border:#343533;--search-results-bg:#292625;--search-backdrop:#121212e6;--filter-border:var(--base-border-hover);--filter-border-hover:var(--base-border-strong);--filter-border-focus:var(--base-border-strong);--nav-item-text:#C3C2C4;--nav-item-text-stack:var(--base-text-strong);--nav-item-button:#635F60;--toc-heading:#635F60;--toc-text:#C3C2C4;--footer-text:#9E9DA0;--description-color:#9E9DA0;--card-border:#292625;--card-border-hover:#434444;--card-image-bg:#434444;--card-image-inner-border:#292625;--card-date-text:#9E9DA0;--badge-base-hover:#CBDFF9;--badge-primary-hover:#CAE1FB;--badge-secondary-hover:#D0DBE3;--badge-success-hover:#C8E6E0;--badge-danger-hover:#F0C9C6;--badge-warning-hover:#F4E7C2;--badge-question-hover:#DFD0F3;--badge-light-hover:#ECEEEF;--badge-light-text:#2B2C2E;--badge-light-text-hover:#2B2C2E;--badge-light-border:var(--transparent);--badge-dark:#434444;--badge-dark-hover:#635F60;--badge-dark-border:#434444;--badge-dark-border-hover:#635F60;--badge-ghost:#333130;--badge-ghost-hover:#434444;--badge-ghost-text:#635F60;--badge-ghost-text-hover:#434444;--badge-ghost-border:#434444;--badge-ghost-border-hover:#434444;--badge-contrast:#fff;--badge-contrast-hover:#ECEEEF;--badge-contrast-text:#201E20;--badge-contrast-text-hover:#201E20;--badge-contrast-border:#fff;--badge-contrast-border-hover:#fff;--button-secondary-hover:#434444;--button-light:#DFDFE0;--button-light-hover:#9E9DA0;--button-light-text:#000;--button-dark:#333130;--button-dark-hover:#434444;--button-dark-text:#9E9DA0;--button-ghost:#2B2C2E;--button-ghost-hover:#434444;--button-ghost-text:#635F60;--button-contrast:#fff;--button-contrast-hover:#C3C2C4;--button-contrast-text:#000;--callout-base-bg:#242221;--callout-contrast-bg:#fff;--callout-contrast-text:#242221;--callout-contrast-border:#292625;--list-unchecked:#635F60;--tab-text-active:#5293F3;--tab-border-active:#5293F3;--tab-text:#9E9DA0;--tab-border-hover:#434444;--step-line:#343533;--pager-text:#C3C2C4;--pager-bg:transparent;--pager-border:#333130;--pager-text-hover:#C3C2C4;--pager-bg-hover:#2B2C2E;--pager-border-hover:#333130;--pager-text-active:#fff;--pager-bg-active:#4368C2;--pager-border-active:#304C91;--pager-text-active-hover:#fff;--pager-bg-active-hover:#5293F3;--pager-border-active-hover:#4B77DB}.nav-item-text-stack-case{text-transform:var(--nav-item-text-stack-case)}.toc-heading-case{text-transform:var(--toc-heading-case)}.color-preview-display{display:var(--color-preview-display)}.description-display{display:var(--description-display)}::selection{background-color:var(--selection-bg);color:var(--selection-text)}.content-left{display:table;float:left;margin-right:calc(var(--spacing)*7)}.content-center{display:grid;justify-items:center}.content-leftplus{display:table;float:left;margin-left:calc(var(--spacing)*-6);margin-right:calc(var(--spacing)*7)}@media (min-width:1200px){.content-leftplus{margin-left:calc(var(--spacing)*-32)}}@media (min-width:1440px){.content-leftplus{margin-left:calc(var(--spacing)*-48)}}.content-right,.content-rightplus{display:table;float:right;margin-left:calc(var(--spacing)*7)}.content-rightplus{margin-right:calc(var(--spacing)*-6)}@media (min-width:1200px){.content-rightplus{margin-right:calc(var(--spacing)*-32)}}@media (min-width:1440px){.content-rightplus{margin-right:calc(var(--spacing)*-48)}}.content-centerplus{display:grid;justify-items:center;margin-inline:calc(var(--spacing)*-6)}@media (min-width:1200px){.content-centerplus{margin-inline:calc(var(--spacing)*-32)}}@media (min-width:1440px){.content-centerplus{margin-inline:calc(var(--spacing)*-48)}}.caption-float{caption-side:bottom;display:table-caption}html{font-feature-settings:"cv02","cv03","cv04","cv11"}@font-face{font-display:swap;font-family:Inter var;font-style:normal;font-weight:100 900;src:url(../fonts/Inter-roman-latin-var.woff2)format("woff2");font-named-instance:"Regular"}@font-face{font-display:swap;font-family:Inter var;font-style:italic;font-weight:100 900;src:url(../fonts/Inter-italic-latin-var.woff2)format("woff2");font-named-instance:"Italic"}.container{margin-inline:auto;max-width:1800px}.skeleton,[v-cloak]{display:none}[v-cloak].skeleton{display:flex}@media (min-width:960px){.retype-mobile-menu-button{display:none!important}}.loading{overflow:hidden;position:relative}.loading:after{animation:loading 1.5s cubic-bezier(0,0,.22,1.21) infinite;background:linear-gradient(90deg,#0000,#ffffffd9,#0000);content:"";display:block;height:100%;position:absolute;width:100%}@keyframes loading{0%{transform:translate(-100%)}to{transform:translate(100%)}}.dark{background-color:#201E20}.dark .loading:after{background:linear-gradient(90deg,#0000,#ffffff0d,#0000)}.no-transitions,.no-transitions *{transition:none!important}#retype-copyright a{color:var(--footer-link)}@media (hover:hover){#retype-copyright a:hover{color:var(--footer-link-hover);text-decoration-line:underline}}.docs-icon{display:inline;font-size:87.5%;vertical-align:-.2em;width:1.3em}.outbound .docs-icon{font-size:75%}.btn{cursor:pointer;height:calc(var(--spacing)*8);padding-inline:calc(var(--spacing)*3);--tw-leading:1;--tw-font-weight:var(--font-weight-medium);font-size:.875rem;font-weight:var(--font-weight-medium);line-height:1;transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));white-space:nowrap;--tw-duration:.2s;--tw-ease:linear;align-items:center;border-radius:.25rem;display:inline-flex;justify-content:center;transition-duration:.2s;transition-timing-function:linear;-webkit-user-select:none;user-select:none}.btn:active,.btn:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.btn:active,.btn:focus{outline:2px solid #0000;outline-offset:2px}}.btn-gray-outline{background-color:#fff;border-color:#8695A8;border-style:var(--tw-border-style);border-width:1px;color:#0B0F1B}.btn-gray-outline:active,.btn-gray-outline:focus,.btn-gray-outline:hover{border-color:#535C77}.btn-icon{padding-inline:calc(var(--spacing)*0);width:calc(var(--spacing)*8)}code[class*=language-],pre[class*=language-]{color:#e2e2e2;direction:ltr;font-family:Menlo,Monaco,Consolas,Andale Mono,Ubuntu Mono,Courier New,monospace;font-size:13px;-webkit-hyphens:none;hyphens:none;line-height:1.5;tab-size:4;text-align:left;text-shadow:none;white-space:pre;word-break:normal;word-spacing:normal}pre[class*=language-]::selection{background:#75a7ca;text-shadow:none}code[class*=language-]::selection{background:#75a7ca;text-shadow:none}pre[class*=language-] ::selection{background:#75a7ca;text-shadow:none}code[class*=language-] ::selection{background:#75a7ca;text-shadow:none}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{background:#1e1e1e;margin:.5em 0;padding:1em}.namespace{opacity:1}.token.doctype .token.doctype-tag{color:#569cd6}.token.doctype .token.name{color:#9cdcfe}.token.comment,.token.prolog{color:#6a9955}.language-html .language-css .token.punctuation,.language-html .language-javascript .token.punctuation,.token.punctuation{color:#d4d4d4}.token.boolean,.token.constant,.token.inserted,.token.number,.token.property,.token.symbol,.token.tag,.token.unit{color:#b5cea8}.token.attr-name,.token.builtin,.token.char,.token.deleted,.token.selector,.token.string{color:#ce9178}.language-css .token.string.url{text-decoration:underline}.token.entity,.token.operator{color:#d4d4d4}.token.operator.arrow{color:#569cd6}.token.atrule{color:#ce9178}.token.atrule .token.rule{color:#c586c0}.token.atrule .token.url{color:#9cdcfe}.token.atrule .token.url .token.function{color:#dcdcaa}.token.atrule .token.url .token.punctuation{color:#9cdcfe}.token.keyword{color:#569cd6}.token.keyword.control-flow,.token.keyword.module{color:#c586c0}.token.function,.token.function .token.maybe-class-name{color:#dcdcaa}.token.regex{color:#d16969}.token.important{color:#569cd6}.token.italic{font-style:italic}.token.constant{color:#9cdcfe}.token.class-name,.token.maybe-class-name{color:#4ec9b0}.token.console,.token.interpolation,.token.parameter{color:#9cdcfe}.token.boolean,.token.punctuation.interpolation-punctuation{color:#569cd6}.token.exports .token.maybe-class-name,.token.imports .token.maybe-class-name,.token.property,.token.variable{color:#9cdcfe}.token.escape,.token.selector{color:#d7ba7d}.token.tag{color:#569cd6}.token.cdata,.token.tag .token.punctuation{color:gray}.token.attr-name{color:#9cdcfe}.token.attr-value,.token.attr-value .token.punctuation{color:#ce9178}.token.attr-value .token.punctuation.attr-equals{color:#9cdcfe}.token.entity{color:#569cd6}.token.namespace{color:#4ec9b0}code[class*=language-cs],code[class*=language-javascript],code[class*=language-jsx],code[class*=language-tsx],code[class*=language-typescript],pre[class*=language-cs],pre[class*=language-javascript],pre[class*=language-jsx],pre[class*=language-tsx],pre[class*=language-typescript]{color:#9cdcfe}code[class*=language-css],pre[class*=language-css]{color:#ce9178}code[class*=language-html],pre[class*=language-html]{color:#9cdcfe}.language-regex .token.anchor{color:#dcdcaa}.language-html .token.punctuation{color:gray}.language-cs .token.keyword-using{color:#c586c0}.language-shell .token:not(.comment){color:#e2e2e2}pre[class*=language-]>.line-highlight{margin-top:.875rem}.line-highlight{background:#ffffff1a;left:0;line-height:inherit;margin-top:1rem;padding:0;pointer-events:none;position:absolute;right:0;white-space:pre;z-index:1}@media print{.line-highlight{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.retype-markdown{--tw-leading:1.75;line-height:1.75}.retype-markdown img:not(.hidden):not(.dark\:hidden){display:inline-block}.retype-markdown h1,.retype-markdown h2,.retype-markdown h3,.retype-markdown h4,.retype-markdown h5,.retype-markdown h6{margin-left:calc(var(--spacing)*-8);padding-left:calc(var(--spacing)*8);--tw-leading:1.25;--tw-font-weight:var(--heading-weight);color:var(--heading-text);font-weight:var(--heading-weight);line-height:1.25;overflow-wrap:break-word;text-transform:var(--heading-case)}:is(.retype-markdown h1,.retype-markdown h2,.retype-markdown h3,.retype-markdown h4,.retype-markdown h5,.retype-markdown h6) .header-anchor-trigger{float:left;margin-left:calc(var(--spacing)*-6);margin-top:calc(var(--spacing)*3.5);--tw-font-weight:var(--font-weight-normal);color:var(--body-link);font-size:1.125rem;font-weight:var(--font-weight-normal);opacity:0}:is(.retype-markdown h1,.retype-markdown h2,.retype-markdown h3,.retype-markdown h4,.retype-markdown h5,.retype-markdown h6) .header-anchor-trigger:hover{color:var(--body-link-hover)!important;text-decoration-line:none!important}:is(.retype-markdown h1,.retype-markdown h2,.retype-markdown h3,.retype-markdown h4,.retype-markdown h5,.retype-markdown h6):hover .header-anchor-trigger{opacity:1}.retype-markdown h2 .header-anchor-trigger{margin-top:calc(var(--spacing)*2.5)}.retype-markdown h3 .header-anchor-trigger{margin-top:calc(var(--spacing)*1)}:is(.retype-markdown h4,.retype-markdown h5,.retype-markdown h6) .header-anchor-trigger{margin-top:calc(var(--spacing)*0)}:is(.retype-markdown h5,.retype-markdown h6) .header-anchor-trigger{font-size:1rem}.retype-markdown h1{border-top:1px var(--tw-border-style) var(--heading-h1-border-top);margin-bottom:var(--heading-h1-margin-bottom);padding-right:calc(var(--spacing)*8);padding-top:var(--heading-h1-padding-top);z-index:10;--tw-font-weight:var(--heading-h1-weight);color:var(--heading-h1);font-size:var(--heading-h1-font-size);font-weight:var(--heading-h1-weight);text-transform:var(--heading-h1-case)}.retype-markdown h2{border-top:1px var(--tw-border-style) var(--heading-h2-border-top);margin-bottom:var(--heading-h2-margin-bottom);padding-top:var(--heading-h2-padding-top);--tw-font-weight:var(--heading-h2-weight);color:var(--heading-h2);font-size:var(--heading-h2-font-size);font-weight:var(--heading-h2-weight);text-transform:var(--heading-h2-case)}.retype-markdown h3{border-top:1px var(--tw-border-style) var(--heading-h3-border-top);margin-bottom:var(--heading-h3-margin-bottom);padding-top:var(--heading-h3-padding-top);--tw-font-weight:var(--heading-h3-weight);color:var(--heading-h3);font-size:var(--heading-h3-font-size);font-weight:var(--heading-h3-weight);text-transform:var(--heading-h3-case)}.retype-markdown h4{border-top:1px var(--tw-border-style) var(--heading-h4-border-top);margin-bottom:var(--heading-h4-margin-bottom);padding-top:var(--heading-h4-padding-top);--tw-font-weight:var(--heading-h4-weight);color:var(--heading-h4);font-size:var(--heading-h4-font-size);font-weight:var(--heading-h4-weight);text-transform:var(--heading-h4-case)}.retype-markdown h5{border-top:1px var(--tw-border-style) var(--heading-h5-border-top);margin-bottom:var(--heading-h5-margin-bottom);padding-top:var(--heading-h5-padding-top);--tw-font-weight:var(--heading-h5-weight);color:var(--heading-h5);font-size:var(--heading-h5-font-size);font-weight:var(--heading-h5-weight);text-transform:var(--heading-h5-case)}.retype-markdown h6{border-top:1px var(--tw-border-style) var(--heading-h6-border-top);margin-bottom:var(--heading-h6-margin-bottom);padding-top:var(--heading-h6-padding-top);--tw-font-weight:var(--heading-h6-weight);color:var(--heading-h6);font-size:var(--heading-h6-font-size);font-weight:var(--heading-h6-weight);text-transform:var(--heading-h6-case)}.retype-markdown p:not(.hidden){margin-bottom:calc(var(--spacing)*6)}.retype-markdown p:not(.hidden):has(+ol),.retype-markdown p:not(.hidden):has(+ul){margin-bottom:calc(var(--spacing)*2)}.retype-markdown h1~.xtype{display:block;margin-bottom:calc(var(--spacing)*8);margin-top:calc(var(--spacing)*-6)}.retype-markdown a:not(.no-link):not(:is(h1 a,h2 a,h3 a,h4 a,h5 a,h6 a)){--tw-font-weight:var(--body-link-weight);color:var(--body-link);font-weight:var(--body-link-weight)}.retype-markdown a:not(.no-link):not(:is(h1 a,h2 a,h3 a,h4 a,h5 a,h6 a)):hover{color:var(--body-link-hover);text-decoration-line:underline}.retype-markdown a:not(.no-link):not(:is(h1 a,h2 a,h3 a,h4 a,h5 a,h6 a)) code:not([class*=language-]):not(.member-signature){color:inherit}.retype-markdown h1 a:not(.no-link),.retype-markdown h2 a:not(.no-link),.retype-markdown h3 a:not(.no-link),.retype-markdown h4 a:not(.no-link),.retype-markdown h5 a:not(.no-link),.retype-markdown h6 a:not(.no-link){color:var(--body-link)}:is(.retype-markdown h1 a:not(.no-link),.retype-markdown h2 a:not(.no-link),.retype-markdown h3 a:not(.no-link),.retype-markdown h4 a:not(.no-link),.retype-markdown h5 a:not(.no-link),.retype-markdown h6 a:not(.no-link)):hover{color:var(--body-link-hover);text-decoration-line:underline}.retype-markdown .link-dark{--tw-font-weight:var(--font-weight-semibold);color:#0B0F1B;font-weight:var(--font-weight-semibold)}.retype-markdown .link-dark:hover{color:#0B0F1B;text-decoration-line:underline}.retype-markdown code:not([class*=language-]):not(.member-signature),.retype-markdown kbd,.retype-markdown pre:not([class*=language-]):not(.member-signature){--tw-font-weight:var(--font-weight-normal);font-size:92.5%;font-weight:var(--font-weight-normal)}.retype-markdown code:not([class*=language-]):not(.member-signature){background-color:#F4F7FD;border-color:#E4E6F3;border-style:var(--tw-border-style);border-width:1px;--tw-leading:1;align-items:center;border-radius:.25rem;color:#0B0F1B;display:inline-flex;line-height:1;padding:4px 5px}.retype-markdown kbd{border-color:#8695A8;border-radius:.25rem;border-style:var(--tw-border-style);border-width:1px;display:inline-block}@supports (color:color-mix(in lab,red,red)){.retype-markdown kbd{border-color:color-mix(in oklab,var(--gray-400) 75%,transparent)}}.retype-markdown kbd{--tw-leading:1;background-color:#fff;box-shadow:0 1px #edeff4;color:#0B0F1B;line-height:1;padding:4px 5px}.retype-markdown select{border-color:#BDC8DA;border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;color:#0B0F1B;height:calc(var(--spacing)*8);margin-bottom:calc(var(--spacing)*6);padding-block:calc(var(--spacing)*1);padding-inline:calc(var(--spacing)*3);--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));--tw-duration:.2s;--tw-ease:linear;background-color:#fff;font-size:.875rem;transition-duration:.2s;transition-timing-function:linear}.retype-markdown select:focus{border-color:#3F4862;--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.retype-markdown select:focus{outline:2px solid #0000;outline-offset:2px}}.retype-markdown select{appearance:none;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1em;padding-right:2rem;transition:color .2s,background-color .2s}.retype-markdown select[multiple]{background-image:none;padding-block:calc(var(--spacing)*2);padding-right:.5rem}.retype-markdown select:disabled{background-color:#F4F7FD;border-color:#E4E6F3;color:#535C77;cursor:not-allowed}.retype-markdown select.lg{font-size:1rem;height:calc(var(--spacing)*10);padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*4);padding-right:2.5rem}.retype-markdown select.sm{font-size:.8125rem;height:calc(var(--spacing)*6);padding-block:calc(var(--spacing)*.5);padding-inline:calc(var(--spacing)*2);padding-right:1.5rem}.retype-markdown ol,.retype-markdown ul{margin-bottom:calc(var(--spacing)*6);padding-left:calc(var(--spacing)*8)}.retype-markdown ol ol,.retype-markdown ol ul,.retype-markdown ul ol,.retype-markdown ul ul{margin-bottom:calc(var(--spacing)*0);padding-left:calc(var(--spacing)*8)}.retype-markdown ol{list-style-type:decimal}.retype-markdown ol[type=A]{list-style-type:upper-alpha}.retype-markdown ol[type=a]{list-style-type:lower-alpha}.retype-markdown ol[type=I]{list-style-type:upper-roman}.retype-markdown ol[type=i]{list-style-type:lower-roman}.retype-markdown ol[type="1"]{list-style-type:decimal}.retype-markdown ul{list-style-type:disc}.retype-markdown ul ul{list-style-type:circle}.retype-markdown ul ul ul{list-style-type:square}.retype-markdown ul.contains-task-list{list-style-type:none;padding-left:9px}.retype-markdown ul.contains-task-list input{margin-left:1px;margin-right:5px;margin-top:1px;position:relative}.retype-markdown ul.contains-task-list input:after,.retype-markdown ul.contains-task-list input:before{border-radius:var(--radius-xs);display:block;height:calc(var(--spacing)*4);position:absolute;width:calc(var(--spacing)*4);z-index:5}.retype-markdown ul.contains-task-list input:before{background-color:var(--list-unchecked);content:"";left:-1px;top:calc(var(--spacing)*0);z-index:5}.retype-markdown ul.contains-task-list input:checked:before{background-color:var(--list-checked)}.retype-markdown ul.contains-task-list input:checked:after{border-radius:0;border-style:var(--tw-border-style);border-width:0 2px 2px 0;bottom:calc(var(--spacing)*.5);content:"";display:inline-block;height:calc(var(--spacing)*2.5);left:calc(var(--spacing)*1);rotate:45deg;width:.375rem;z-index:10}.retype-markdown dl{border-collapse:separate;display:table;margin-bottom:calc(var(--spacing)*6);width:100%}.retype-markdown dl:after{clear:both;--tw-content:"";content:var(--tw-content);display:block}.retype-markdown dt{border-top-style:var(--tw-border-style);clear:left;float:left;padding-bottom:calc(var(--spacing)*4);padding-right:calc(var(--spacing)*4);padding-top:calc(var(--spacing)*4);width:33.3333%;--tw-font-weight:var(--font-weight-medium);border-top-width:1px;font-weight:var(--font-weight-medium)}.retype-markdown dt:is(.dark *){border-top-color:#2D2B2D}.retype-markdown dd,.retype-markdown dt:first-child{padding-top:calc(var(--spacing)*4)}.retype-markdown dd{border-top-style:var(--tw-border-style);border-top-width:1px;padding-bottom:calc(var(--spacing)*4);padding-right:calc(var(--spacing)*4);width:66.6667%}.retype-markdown dd:is(.dark *){border-top-color:#2D2B2D}.retype-markdown dd{margin-left:33.3333%}.retype-markdown dt+dt{border-top-style:var(--tw-border-style);border-top-width:0;padding-bottom:calc(var(--spacing)*1);padding-top:calc(var(--spacing)*0)}.retype-markdown dd+dd+dt,.retype-markdown dd+dt{clear:both;padding-top:calc(var(--spacing)*4)}.retype-markdown dl+*{clear:both}.retype-markdown ul.list-icon,.retype-markdown ul.list-icon ul{list-style-type:none;padding-left:calc(var(--spacing)*4)}:is(.retype-markdown ul.list-icon,.retype-markdown ul.list-icon ul) li>svg.docs-icon:first-child{margin-right:calc(var(--spacing)*1)}.retype-markdown blockquote{background-color:#F4F7FD;border-left-style:var(--tw-border-style);border-left-width:4px;color:#3F4862;margin-bottom:calc(var(--spacing)*6);padding:calc(var(--spacing)*4);padding-left:calc(var(--spacing)*5)}.retype-markdown blockquote p:last-child{margin-bottom:calc(var(--spacing)*0)}.retype-markdown .table-wrapper{border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;margin-bottom:calc(var(--spacing)*6)}.retype-markdown table{border-collapse:separate;border-spacing:0;overflow:auto}.retype-markdown table tr td,.retype-markdown table tr th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-right-style:var(--tw-border-style);border-right-width:1px;padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*3)}.retype-markdown table tr td:last-child,.retype-markdown table tr th:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.retype-markdown table th{--tw-font-weight:var(--font-weight-medium);color:#0B0F1B;font-weight:var(--font-weight-medium)}.retype-markdown table th:empty{display:none}.retype-markdown table tbody>tr:last-child td{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.retype-markdown table.compact{font-size:.875rem;width:100%}.retype-markdown table.compact th{text-align:left}.retype-markdown table.compact tr td,.retype-markdown table.compact tr th{padding-block:.375rem;padding-inline:calc(var(--spacing)*2.5)}.retype-markdown table.comfortable{width:100%}.retype-markdown table.comfortable th{text-align:left}.retype-markdown table.comfortable tr td,.retype-markdown table.comfortable tr th{padding-block:calc(var(--spacing)*4);padding-inline:calc(var(--spacing)*5)}.retype-markdown hr{border-color:#E4E6F3;margin-block:calc(var(--spacing)*8)}.retype-markdown figure{margin-bottom:calc(var(--spacing)*6)}.retype-markdown figure>:first-child{margin-bottom:calc(var(--spacing)*0)}.retype-markdown .caption{color:#535C77;font-size:.875rem;margin-top:calc(var(--spacing)*2);text-align:center}.retype-markdown .doc-member h3{font-size:1rem;margin:calc(var(--spacing)*0);padding:calc(var(--spacing)*0)}.retype-markdown .doc-member p{margin-bottom:calc(var(--spacing)*4)}.retype-markdown .doc-member :last-child{margin-bottom:0}.retype-markdown .doc-member-group>.doc-member{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md);border-top-style:var(--tw-border-style);border-top-width:1px}.retype-markdown .doc-member-group>.doc-member:last-child{border-bottom-left-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.retype-markdown .doc-member-group>.doc-member~.doc-member{border-top-left-radius:0;border-top-right-radius:0}.retype-markdown.filtered>:not(.doc-member-group){display:none}.retype-markdown .docs-columns{display:grid}.retype-markdown .docs-columns-content>:last-child{margin-bottom:0}.retype-markdown .docs-columns-code{background-color:#201E20;border-color:#333130}.retype-markdown .docs-columns-code .codeblock-wrapper{border:none!important}.retype-markdown .docs-columns-code-title{background-color:#201E20;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:#333130}.retype-markdown code[class*=language-],.retype-markdown pre[class*=language-]{--tw-leading:1.6;line-height:1.6}.retype-markdown pre[class*=language-]{margin:calc(var(--spacing)*0);padding-block:calc(var(--spacing)*4);padding-inline:calc(var(--spacing)*5)}.retype-markdown .codeblock-wrapper{background-color:#201E20;border-color:#fff;border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;margin-bottom:calc(var(--spacing)*6);overflow:hidden;width:100%}.retype-markdown .codeblock.line-numbers pre{padding-left:3.75rem}.retype-markdown .codeblock .tooltip,.retype-markdown .codeblock .tooltip .arrow:before{background-color:#343533}.retype-markdown .codeblock-title{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:#333130;font-family:var(--font-mono);height:calc(var(--spacing)*12);padding-inline:calc(var(--spacing)*5);text-overflow:ellipsis;white-space:nowrap;--tw-leading:3rem;color:#DFDFE0;font-size:.875rem;line-height:3rem;overflow:hidden}.retype-markdown .codeblock-title code{background-color:#343533!important;border-color:#434444!important;border-style:var(--tw-border-style)!important;border-width:1px!important;color:#fff!important}.retype-markdown nav.breadcrumb{margin-bottom:calc(var(--spacing)*4);--tw-font-weight:var(--font-weight-medium);color:#535C77;display:flex;font-size:.875rem;font-weight:var(--font-weight-medium)}.retype-markdown nav.breadcrumb ol{align-items:center;display:flex;flex-wrap:wrap;list-style-type:none;margin:calc(var(--spacing)*0);padding:calc(var(--spacing)*0)}.retype-markdown nav.breadcrumb ol li{align-items:center;display:flex}.retype-markdown nav.breadcrumb ol li a{color:#535C77;transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));--tw-duration:.2s;--tw-ease:linear;text-decoration-line:none;transition-duration:.2s;transition-timing-function:linear}.retype-markdown nav.breadcrumb ol li a:hover{color:#5293F3;text-decoration-line:none}.retype-markdown .blog-pager{display:flex;justify-content:center;margin-bottom:var(--pager-margin-bottom);margin-top:var(--pager-margin-top)}.retype-markdown .blog-pager ul{display:flex;flex-wrap:wrap;gap:var(--pager-gap);justify-content:center;list-style-type:none;margin:calc(var(--spacing)*0);padding:calc(var(--spacing)*0)}.retype-markdown .blog-pager li a{background-color:var(--pager-bg);border-color:var(--pager-border);border-radius:var(--pager-border-radius);border-style:var(--tw-border-style);border-width:1px;font-size:var(--pager-font-size);height:var(--pager-item-size);width:var(--pager-item-size);--tw-font-weight:var(--pager-font-weight);align-items:center;border-width:var(--pager-border-width);color:var(--pager-text);display:flex;font-weight:var(--pager-font-weight);justify-content:center;-webkit-text-decoration:var(--pager-text-decoration);text-decoration:var(--pager-text-decoration);transition-duration:var(--tw-duration,var(--default-transition-duration));transition-duration:var(--pager-transition-duration);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.retype-markdown .blog-pager li a:hover{background-color:var(--pager-bg-hover);border-color:var(--pager-border-hover);color:var(--pager-text-hover);text-decoration-line:none!important}.retype-markdown .blog-pager li.active a{background-color:var(--pager-bg-active);border-color:var(--pager-border-active);color:var(--pager-text-active)}.retype-markdown .blog-pager li.active a:hover{background-color:var(--pager-bg-active-hover);border-color:var(--pager-border-active-hover);color:var(--pager-text-active-hover);text-decoration-line:none!important}#retype-app #docs-hub-link{margin-right:calc(var(--spacing)*2);padding:calc(var(--spacing)*.5);transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));--tw-duration:.2s;--tw-ease:var(--ease-in);border-radius:.25rem;display:flex;transition-duration:.2s;transition-timing-function:var(--ease-in)}#retype-app #docs-hub-link:hover{background-color:#E4E6F3}#retype-app #docs-hub-link:focus{background-color:#BDC8DA;--tw-outline-style:none;outline-style:none}@media (forced-colors:active){#retype-app #docs-hub-link:focus{outline:2px solid #0000;outline-offset:2px}}.dark .retype-markdown a:not(.no-link) code:not([class*=language-]):not(.member-signature){color:inherit}.dark .retype-markdown .link-dark{color:#fff}.dark .retype-markdown blockquote{background-color:#292625;border-color:#343533;border-style:var(--tw-border-style);border-width:0 0 0 4px;color:#C3C2C4}.dark .retype-markdown code:not([class*=language-]):not(.member-signature){background-color:#343533;border-color:#434444;border-style:var(--tw-border-style);border-width:1px;color:#fff}.dark .retype-markdown kbd{border-color:#635F60;border-radius:.25rem;border-style:var(--tw-border-style);border-width:1px;display:inline-block}@supports (color:color-mix(in lab,red,red)){.dark .retype-markdown kbd{border-color:color-mix(in oklab,var(--dark-400) 75%,transparent)}}.dark .retype-markdown kbd{background-color:#242221;--tw-leading:1;box-shadow:0 1px #505050;color:#fff;line-height:1;padding:2px 5px}.dark .retype-markdown .table-wrapper,.dark .retype-markdown table td,.dark .retype-markdown table th,.dark .retype-markdown table tr{border-color:#343533}.dark .retype-markdown table th{color:#BDC8DA}.dark .retype-markdown hr{border-color:#2B2C2E}.dark .retype-markdown .caption{color:#9E9DA0}.dark .retype-markdown .doc-member h3{color:#BDC8DA}.dark .retype-markdown .doc-member-group>.doc-member{border-color:#2D2B2D}.dark .retype-markdown .docs-columns-code,.dark .retype-markdown .docs-columns-code-title,.dark .retype-markdown pre[class*=language-]{background-color:#242221}.dark .retype-markdown .codeblock-wrapper{background-color:#242221;border-color:#2D2B2D}.dark .retype-markdown nav.breadcrumb{color:#635F60}.dark .retype-markdown nav.breadcrumb ol li a{color:#635F60!important}.dark .retype-markdown nav.breadcrumb ol li a:hover{color:#87B3F6!important}.dark .retype-markdown select{background-color:#333130;border-color:#2B2C2E;color:#fff}.dark .retype-markdown select::placeholder{color:#635F60}@media (hover:hover){.dark .retype-markdown select:hover{background-color:#434444;border-color:#434444}}.dark .retype-markdown select:focus{background-color:#434444;border-color:#434444}.dark .retype-markdown select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}.dark .retype-markdown select:disabled{background-color:#292625;border-color:#333130;color:#9E9DA0}.dark #retype-app #docs-hub-link{color:#fff}.dark #retype-app #docs-hub-link:hover{background-color:#343533}.dark #retype-app #docs-hub-link:focus{background-color:#434444}.doc-callout h5{margin-bottom:calc(var(--spacing)*1);margin-left:calc(var(--spacing)*0);padding:calc(var(--spacing)*0);--tw-leading:1.75;line-height:1.75}.doc-callout p:last-child,:is(.doc-callout ol,.doc-callout ul):last-child{margin-bottom:calc(var(--spacing)*0)}.doc-callout.doc-callout-contrast a{color:#85B3F3!important}.doc-callout.doc-callout-contrast h5{color:#fff}.doc-callout.doc-callout-contrast code:not([class*=language-]):not(.member-signature){background-color:#2D3048;border-color:#3F4862;color:#fff}.dark .doc-callout.doc-callout-contrast a{color:#5293F3!important}.dark .doc-callout.doc-callout-contrast h5{color:#0B0F1B}.dark .doc-callout.doc-callout-contrast code:not([class*=language-]){background-color:#f3f5f9;border-color:#BDC8DA;color:#0B0F1B}#retype-backlinks{border-top:1px var(--tw-border-style) var(--backlinks-border-top);display:var(--backlinks-display);margin-bottom:var(--backlinks-margin-bottom);margin-top:var(--backlinks-margin-top)}#retype-backlinks h2{margin-bottom:var(--backlinks-title-margin-bottom);margin-top:var(--backlinks-title-margin-top);padding-top:var(--backlinks-title-padding-top);--tw-font-weight:var(--backlinks-title-font-weight);color:var(--backlinks-title);font-weight:var(--backlinks-title-font-weight);text-transform:var(--backlinks-title-case)}#retype-backlinks a{border-color:var(--backlinks-card-border);border-radius:var(--backlinks-card-rounded);border-style:var(--tw-border-style);border-width:1px;color:var(--backlinks-link);height:100%;padding:calc(var(--spacing)*4);transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));--tw-duration:.15s;transition-duration:.15s}#retype-backlinks a:hover{border-color:var(--backlinks-card-border-hover);--tw-shadow:var(--backlinks-card-shadow-hover);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#retype-backlinks a p{margin:calc(var(--spacing)*0);--tw-font-weight:var(--backlinks-text-font-weight);color:var(--backlinks-text);font-size:var(--backlinks-text-font-size);font-weight:var(--backlinks-text-font-weight)}#retype-backlinks a div div{align-items:center;gap:calc(var(--spacing)*2);margin-bottom:calc(var(--spacing)*1);--tw-font-weight:var(--body-link-weight);color:var(--backlinks-link);display:flex;font-weight:var(--body-link-weight)}@media (hover:hover){#retype-backlinks a div div:hover{color:var(--base-link-hover)}}#retype-backlinks a div div{font-size:var(--backlinks-link-font-size)}[data-simplebar]{align-items:flex-start;flex-flow:column wrap;place-content:flex-start;position:relative}.simplebar-wrapper{height:inherit;max-height:inherit;max-width:inherit;overflow:hidden;width:inherit}.simplebar-mask{direction:inherit;height:auto!important;overflow:hidden;width:auto!important;z-index:0}.simplebar-mask,.simplebar-offset{inset:0;margin:0;padding:0;position:absolute}.simplebar-offset{-webkit-overflow-scrolling:touch;box-sizing:inherit!important;direction:inherit!important;resize:none!important}.simplebar-content-wrapper{direction:inherit;scrollbar-width:none;-ms-overflow-style:none;box-sizing:border-box!important;display:block;height:100%;max-height:100%;max-width:100%;overflow:auto;position:relative;width:auto}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{display:none;height:0;width:0}.simplebar-content:after,.simplebar-content:before{content:" ";display:table}.simplebar-placeholder{max-height:100%;max-width:100%;pointer-events:none;width:100%}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;flex-basis:0;flex-grow:inherit;flex-shrink:0;float:left;height:100%;margin:0;max-height:1px;max-width:1px;overflow:hidden;padding:0;pointer-events:none;position:relative;width:100%;z-index:-1}.simplebar-height-auto-observer{box-sizing:inherit;display:block;height:1000%;left:0;min-height:1px;min-width:1px;opacity:0;top:0;width:1000%;z-index:-1}.simplebar-height-auto-observer,.simplebar-track{overflow:hidden;pointer-events:none;position:absolute}.simplebar-track{bottom:0;right:0;z-index:1}[data-simplebar].simplebar-dragging,[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-khtml-user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{left:0;min-height:10px;position:absolute;right:0}.simplebar-scrollbar:before{background:#000;border-radius:7px;content:"";left:2px;opacity:0;position:absolute;right:2px;transition:opacity .2s linear .5s}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-scrollbar:before{inset:2px}.simplebar-track.simplebar-horizontal{height:11px;left:0}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{inset:0 auto 0 0;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{left:0;right:auto}.simplebar-dummy-scrollbar-size{direction:rtl;height:500px;opacity:0;overflow:scroll hidden;position:fixed;visibility:hidden;width:500px;-ms-overflow-style:scrollbar!important}.simplebar-dummy-scrollbar-size>div{height:200%;margin:10px 0;width:200%}.simplebar-hide-scrollbar{scrollbar-width:none;visibility:hidden;-ms-overflow-style:none;left:0;overflow-y:scroll;position:fixed}.simplebar-scrollbar:before{background:initial;background-color:#0B0F1B}@supports (color:color-mix(in lab,red,red)){.simplebar-scrollbar:before{background-color:color-mix(in oklab,var(--gray-900) 20%,transparent)}}.simplebar-scrollbar.simplebar-visible:before{opacity:1}.dark .simplebar-scrollbar:before{background-color:oklab(100% 0 5.96046e-8/.2)}pre[class*=language-] .simplebar-content:after,pre[class*=language-] .simplebar-content:before{content:normal;display:initial}pre[class*=language-] .simplebar-scrollbar:before{background-color:oklab(100% 0 5.96046e-8/.3)}.dark pre[class*=language-] .simplebar-scrollbar:before{background-color:oklab(100% 0 5.96046e-8/.2)}@media print{#retype-backlinks,#retype-content-footer,#retype-edit-button,#retype-header,#retype-sidebar-left,#retype-sidebar-left-toggle-button,#retype-sidebar-right,#retype-sidebar-right-toggle,#retype-tags,.codeblock-wrapper button,.docs-powered-by,.docs-toc,.docs-toc-container,.header-anchor-trigger,.retype-mobile-menu-button,.retype-outbound-trigger,doc-back-to-top,doc-history,doc-search-desktop,doc-search-mobile,doc-theme-switch,doc-toolbar-member-filter-no-results,header,nav.breadcrumb{display:none!important}#retype-content{margin:0;max-width:100%;padding:0;width:100%}#retype-app,.retype-markdown,body{background-color:#fff;color:#000}.retype-markdown h1,.retype-markdown h2,.retype-markdown h3,.retype-markdown h4,.retype-markdown h5,.retype-markdown h6{break-after:avoid;color:#000!important}.retype-markdown h2{break-inside:avoid}.retype-markdown h1{font-size:3rem}h2,h3,h4,h5,h6,p{orphans:3;widows:3}.retype-markdown a:not(.no-link):not(:is(h1 a,h2 a,h3 a,h4 a,h5 a,h6 a)){color:var(--body-link)!important;font-weight:var(--body-link-weight)!important;text-decoration:none}.retype-markdown h1 a:not(.no-link),.retype-markdown h2 a:not(.no-link),.retype-markdown h3 a:not(.no-link),.retype-markdown h4 a:not(.no-link),.retype-markdown h5 a:not(.no-link),.retype-markdown h6 a:not(.no-link){color:var(--body-link)!important;text-decoration:none}a.no-link{text-decoration:none!important}[class*=text-badge-],[class*=text-button-]{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}abbr{border-bottom:none!important;text-decoration:none!important}.table-wrapper{border:1px solid #d1d5db!important;border-radius:8px!important;break-inside:avoid;margin-bottom:16px!important;overflow:hidden!important;padding:0!important}.table-wrapper .simplebar-content,.table-wrapper .simplebar-content-wrapper,.table-wrapper .simplebar-mask,.table-wrapper .simplebar-offset,.table-wrapper .simplebar-wrapper{height:auto!important;margin:0!important;max-height:none!important;min-height:0!important;overflow:visible!important;padding:0!important}.table-wrapper .simplebar-mask,.table-wrapper .simplebar-offset{position:static!important}.table-wrapper .simplebar-placeholder,.table-wrapper .simplebar-track{display:none!important;height:0!important}table{background-color:#0000!important;border:none!important;border-collapse:separate!important;border-spacing:0!important;margin:0!important;width:100%!important}table,tbody,thead,tr{break-inside:avoid}td,th{background-color:#0000!important;border-bottom:1px solid #d1d5db!important;border-right:1px solid #d1d5db!important;color:#000!important;padding:8px 12px!important;text-align:left!important;vertical-align:middle!important}td:last-child,th:last-child{border-right:none!important}tbody>tr:last-child td{border-bottom:none!important}th{background-color:#f9fafb!important;font-weight:600!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}figure,pre{break-inside:avoid}.codeblock-wrapper{background-color:#f8f9fa!important;border:1px solid #d1d5db!important;border-radius:8px!important;box-sizing:border-box!important;break-inside:avoid!important;height:auto!important;max-width:100%!important;overflow:hidden!important;padding:0!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;width:100%!important}.codeblock-wrapper pre{font-size:.875rem!important;height:auto!important;line-height:1.5!important;margin:0!important;max-width:100%!important;min-height:0!important;padding:12px 16px!important}.codeblock-wrapper pre,.codeblock-wrapper pre code{white-space:pre-wrap!important;word-wrap:break-word!important;background-color:#0000!important;border:none!important;border-radius:0!important;color:#000!important;overflow:visible!important}.codeblock-wrapper pre code{display:block!important;line-height:inherit!important;padding:0!important}.codeblock-wrapper .simplebar-content,.codeblock-wrapper .simplebar-content-wrapper,.codeblock-wrapper .simplebar-mask,.codeblock-wrapper .simplebar-offset,.codeblock-wrapper .simplebar-wrapper{height:auto!important;margin:0!important;max-height:none!important;min-height:0!important;overflow:visible!important;padding:0!important}.codeblock-wrapper .simplebar-mask,.codeblock-wrapper .simplebar-offset{position:static!important}.codeblock-wrapper .simplebar-placeholder,.codeblock-wrapper .simplebar-track{display:none!important;height:0!important}.codeblock .line-numbers .simplebar-content:after,.codeblock .line-numbers .simplebar-content:before{display:none!important}.codeblock-title{background-color:#f0f1f3!important;border-bottom:1px solid #d1d5db!important;height:auto!important;line-height:1.5!important;padding:8px 16px!important}.codeblock-title,.retype-markdown code:not([class*=language-]):not(.member-signature){color:#000!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.retype-markdown code:not([class*=language-]):not(.member-signature){background-color:#f3f4f6!important;border:1px solid #d1d5db!important;border-radius:3px!important;display:inline!important;line-height:inherit!important;padding:2px 5px!important}[class*=bg-button-]{border:1px solid #00000026!important}[class*=bg-badge-],[class*=bg-button-]{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.border-card-border{border:1px solid #d1d5db!important;break-inside:avoid}.flex.flex-wrap.gap-card-group-gap,.retype-steps{break-inside:avoid}a.docs-step-number{background-color:var(--step-number-bg,#1a56db)!important;border:1px solid #0000001a!important;color:var(--step-number-text,#fff)!important;text-decoration:none!important}.docs-step-line,a.docs-step-number{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.docs-step-line{background-color:#d1d5db!important}.docs-step-title{color:#000!important}.flex.mb-6{break-inside:avoid}.shrink-0.w-1\.5{flex-shrink:0!important;min-width:6px!important;width:6px!important}.bg-callout-base,.bg-callout-contrast,.bg-callout-danger,.bg-callout-dark,.bg-callout-ghost,.bg-callout-info,.bg-callout-light,.bg-callout-primary,.bg-callout-question,.bg-callout-secondary,.bg-callout-success,.bg-callout-tip,.bg-callout-warning,.doc-callout,.shrink-0.w-1\.5{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.doc-callout{background-color:#0000!important;border:1px solid #ddd!important;break-inside:avoid}.doc-callout svg{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.mb-6.border.rounded-md{break-inside:avoid}blockquote{background-color:#f9fafb!important;border-left:4px solid #9ca3af!important;color:#374151!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}footer{text-align:center!important}footer,footer>div{justify-content:center!important}#retype-copyright{text-align:center!important;width:100%!important}.border-t:has(>div>footer){border-top-color:#0000!important}@page{margin:2cm}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(1turn)}} + +/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */.arrow[data-v-0a72d6d2],.arrow[data-v-0a72d6d2]:before{height:calc(var(--spacing,.25rem)*2);position:absolute;width:calc(var(--spacing,.25rem)*2);z-index:-1}.arrow[data-v-0a72d6d2]:before{background-color:#0B0F1B;content:"";rotate:45deg}.tooltip[data-popper-placement^=top]>.arrow[data-v-0a72d6d2]{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.arrow[data-v-0a72d6d2]{top:-4px}.tooltip[data-popper-placement^=left]>.arrow[data-v-0a72d6d2]{right:-4px}.tooltip[data-popper-placement^=right]>.arrow[data-v-0a72d6d2]{left:-4px}.dark .arrow[data-v-0a72d6d2]:before{background-color:#343533} + +/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */.collapse-content :last-child{margin-bottom:calc(var(--spacing,.25rem)*0)}@media (-webkit-min-device-pixel-ratio:2) and (min-resolution:0.001dpcm){.docs-emoji{font-size:1.25em;line-height:1;vertical-align:-.075em}}.spinner[data-v-79806448]{border-top-color:#444e66}.dark .spinner[data-v-79806448]{border-top-color:hsla(0,0%,100%,.6)}.docs-panel-content :last-child{margin-bottom:0!important} + +/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid}}}.docs-panels>*{border-radius:0;border-style:var(--tw-border-style);border-width:0 0 1px;margin-bottom:-1px}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}.sidebar{height:calc(100vh - 5rem);@media (max-width:959px){height:100vh!important;transform:translateX(-100%)}}@media (max-width:1199px){.sidebar-right[data-v-7ac62b95]{height:100vh!important}} + +/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial;--tw-leading:initial}}}.retype-steps{display:flex;flex-direction:column}.docs-step{display:flex}.docs-step-indicator{align-items:center;display:flex;flex-direction:column;flex-shrink:0;margin-right:calc(var(--spacing,.25rem)*4)}.docs-step-number{height:calc(var(--spacing,.25rem)*8);width:calc(var(--spacing,.25rem)*8);--tw-font-weight:var(--font-weight-semibold,600);align-items:center;background-color:var(--step-number-bg,#5293F3);border:1px solid var(--step-number-border,transparent);border-radius:3.40282e+38px;color:var(--step-number-text,#fff);display:flex;font-size:.875rem;font-weight:var(--font-weight-semibold,600);justify-content:center}.docs-step-line{background-color:var(--step-line,var(--base-border));flex-grow:1;margin-block:calc(var(--spacing,.25rem)*1);width:1px}.docs-step-body{flex-grow:1;min-width:calc(var(--spacing,.25rem)*0);padding-bottom:calc(var(--spacing,.25rem)*8)}.docs-step:last-child .docs-step-body{padding-bottom:calc(var(--spacing,.25rem)*0)}.docs-step-title{margin-bottom:calc(var(--spacing,.25rem)*2);--tw-leading:calc(var(--spacing,.25rem)*8);line-height:calc(var(--spacing,.25rem)*8);--tw-font-weight:var(--font-weight-semibold,600);color:var(--step-title-text,var(--base-text-strong));font-weight:var(--font-weight-semibold,600)} + +/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */.docs-step-content :last-child,.docs-step-title :last-child,.tab-content>:last-child{margin-bottom:calc(var(--spacing,.25rem)*0)} + +/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-4962ba66],[data-v-4962ba66]::backdrop,[data-v-4962ba66]:after,[data-v-4962ba66]:before{--tw-space-x-reverse:0;--tw-duration:initial;--tw-ease:initial;--tw-font-weight:initial}}}.scheme-menu[data-v-4962ba66]{display:flex;flex-direction:column}.scheme-menu-item[data-v-4962ba66]{align-items:center;display:flex;width:100%}:where(.scheme-menu-item[data-v-4962ba66]>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing,.25rem)*2*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing,.25rem)*2*var(--tw-space-x-reverse))}.scheme-menu-item[data-v-4962ba66]{background-color:var(--scheme-menu-item-bg);color:var(--scheme-menu-item-text);padding-block:calc(var(--spacing,.25rem)*2);padding-inline:calc(var(--spacing,.25rem)*3);text-align:left;transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));--tw-duration:.15s;--tw-ease:var(--ease-out,cubic-bezier(0,0,.2,1));transition-duration:.15s;transition-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1))}.scheme-menu-item[data-v-4962ba66]:hover{background-color:var(--scheme-menu-item-bg-hover)}.scheme-menu-item-active[data-v-4962ba66]{background-color:var(--scheme-menu-item-bg-active);--tw-font-weight:var(--font-weight-medium,500);color:var(--base-item-text-active);font-weight:var(--font-weight-medium,500)}.scheme-menu-item-text[data-v-4962ba66]{font-size:.875rem}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false} + +/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-97467732],[data-v-97467732]::backdrop,[data-v-97467732]:after,[data-v-97467732]:before{--tw-leading:initial}}}.member-links-dropdown a[data-v-97467732]{height:calc(var(--spacing,.25rem)*8);text-overflow:ellipsis;white-space:nowrap;--tw-leading:1;border-radius:.25rem;color:#5293F3;display:block;font-size:.875rem;line-height:1;overflow:hidden;padding:.5625rem .75rem}.member-links-dropdown a[data-v-97467732]:hover{background-color:#E4E6F3}.dark .member-links-dropdown a[data-v-97467732]{color:#5293F3}.dark .member-links-dropdown a[data-v-97467732]:hover{background-color:#343533}@property --tw-leading{syntax:"*";inherits:false} diff --git a/resources/fonts/Inter-italic-latin-var.woff2 b/resources/fonts/Inter-italic-latin-var.woff2 new file mode 100644 index 00000000..e09a2014 Binary files /dev/null and b/resources/fonts/Inter-italic-latin-var.woff2 differ diff --git a/resources/fonts/Inter-roman-latin-var.woff2 b/resources/fonts/Inter-roman-latin-var.woff2 new file mode 100644 index 00000000..44fabcbc Binary files /dev/null and b/resources/fonts/Inter-roman-latin-var.woff2 differ diff --git a/resources/js/config.js b/resources/js/config.js new file mode 100644 index 00000000..7d340222 --- /dev/null +++ b/resources/js/config.js @@ -0,0 +1 @@ +var __DOCS_CONFIG__ = {"id":"kbxAeWFZB9uucuzB95gbcrPB9BuxT169w2U","key":"i1Ca9Lq4dnAzYwuU+kNxjLcr+W3F3w+lHmN/EgAOeHk.N4v9/C3UdNpk6+WSdyU7cFl3t4CsQ8gtaWszqBH2rwtiSraJSQmc2u1yICc5+DXcyz/nPCkqKQpKzVDbtKnn5w.808269","base":"/","host":"pocketpy.dev","version":"","useRelativePaths":true,"documentName":"index.html","appendDocumentName":false,"trailingSlash":true,"preloadSearch":false,"cacheBustingToken":"4.1.0.825921057143","cacheBustingStrategy":"query","sidebarFilterPlaceholder":"Filter","toolbarFilterPlaceholder":"Filter","showSidebarFilter":true,"filterNotFoundMsg":"No member names found containing the query \"{query}\"","maxHistoryItems":15,"homeIcon":"","access":[{"value":"public","label":"Public"},{"value":"protected","label":"Protected"}],"toolbarLinks":[{"id":"fields","label":"Fields"},{"id":"properties","label":"Properties"},{"id":"methods","label":"Methods"},{"id":"events","label":"Events"}],"sidebar":[{"n":"/","l":"Welcome","s":""},{"n":"quick-start","l":"Quick Start","s":""},{"n":"bindings","l":"Write C Bindings","s":""},{"n":"bindings-cpp","l":"Write C++ Bindings","s":""},{"n":"features","l":"Features","c":false,"i":[{"n":"basic","l":"Basic Features","s":""},{"n":"differences","l":"Comparison with C​Python","s":""},{"n":"deploy","l":"Deploy Bytecodes","s":""},{"n":"debugging","l":"Debugging","s":""},{"n":"profiling","l":"Profiling","s":""},{"n":"threading","l":"Compute Threads","s":""},{"n":"ub","l":"Undefined Behaviour","s":""}],"s":""},{"n":"c-api","l":"C-​API","c":false,"i":[{"n":"introduction","l":"Introduction","s":""},{"n":"functions","l":"Functions","s":""}],"s":""},{"n":"modules","l":"Modules","c":false,"i":[{"n":"array2d","l":"array​2​d","s":""},{"n":"base64","l":"base​64","s":""},{"n":"bisect","s":""},{"n":"cmath","s":""},{"n":"collections","s":""},{"n":"cute_png","l":"cute_​png","s":""},{"n":"dataclasses","s":""},{"n":"datetime","s":""},{"n":"easing","s":""},{"n":"enum","s":""},{"n":"functools","s":""},{"n":"gc","s":""},{"n":"heapq","s":""},{"n":"importlib","s":""},{"n":"json","s":""},{"n":"lz4","l":"lz​4","s":""},{"n":"math","s":""},{"n":"msgpack","s":""},{"n":"operator","s":""},{"n":"periphery","s":""},{"n":"pickle","s":""},{"n":"pkpy","s":""},{"n":"random","s":""},{"n":"sys","s":""},{"n":"time","s":""},{"n":"traceback","s":""},{"n":"typing","s":""},{"n":"unicodedata","s":""},{"n":"vmath","s":""}],"s":""},{"n":"gsoc2026","l":"G​So​C 2026","c":false,"i":[{"n":"guide","l":"Application Guide","s":""},{"n":"ideas","l":"Project Ideas","s":""}]},{"n":"gsoc2025","l":"G​So​C 2025","c":false,"i":[{"n":"guide","l":"Application Guide","s":""},{"n":"ideas","l":"Project Ideas","s":""}]},{"n":"gsoc2024","l":"G​So​C 2024","c":false,"i":[{"n":"guide","l":"Application Guide","s":""},{"n":"ideas","l":"Project Ideas","s":""}]},{"n":"coding-style-guide","l":"Coding Style Guide","s":""},{"n":"performance","l":"Performance","s":""},{"n":"license","l":"License","s":""}],"search":{"mode":0,"minChars":2,"maxResults":20,"placeholder":"Search","hotkeys":["k"],"noResultsFoundMsg":"Sorry, no results found.","autodetect":true,"languages":[0],"preload":false,"excludeCode":false},"resources":{"History_Title_Label":"History","History_ClearLink_Label":"Clear","History_NoHistory_Label":"No history items","API_AccessFilter_Label":"Access","API_ParameterSection_Label":"PARAMETERS","API_SignatureSection_Label":"SIGNATURE","API_CopyHint_Label":"Copy","API_CopyNameHint_Label":"Copy name","API_CopyLinkHint_Label":"Copy link","API_CopiedAckHint_Label":"Copied!","API_MoreOverloads_Label":"more","API_MoreDropdownItems_Label":"More","API_OptionalParameter_Label":"optional","API_DefaultParameterValue_Label":"Default value","API_InheritedFilter_Label":"Inherited","Search_Input_Placeholder":"Search","Search_Navigate_Label":"navigate","Search_Open_Label":"open","Search_Close_Label":"close","Search_TopResults_Label":"Top {0} results","Search_Result_Singular_Label":"{0} result","Search_Result_Plural_Label":"{0} results","Toc_Contents_Label":"Contents","Toc_RelatedClasses_Label":"Related Classes","History_JustNowTime_Label":"just now","History_AgoTime_Label":"ago","History_YearTime_Label":"y","History_MonthTime_Label":"mo","History_DayTime_Label":"d","History_HourTime_Label":"h","History_MinuteTime_Label":"m","History_SecondTime_Label":"s","Text_Light":"Light","Text_Dark":"Dark","Text_System":"System"},"navIcons":{"mode":"all"},"flags":8}; diff --git a/resources/js/lunr.js b/resources/js/lunr.js new file mode 100644 index 00000000..b415297d --- /dev/null +++ b/resources/js/lunr.js @@ -0,0 +1,38 @@ +/*! Retype v4.1.0 | retype.com | Copyright 2026. Retype, Inc. All rights reserved. */ + +(()=>{var e={8291(e,t,r){var i,n;!function(){var s,o,a,u,l,c,h,d,f,p,y,m,g,x,v,w,Q,S,k,b,E,L,P,T,O,I,R,F,_,N,j=function(e){var t=new j.Builder;return t.pipeline.add(j.trimmer,j.stopWordFilter,j.stemmer),t.searchPipeline.add(j.stemmer),e.call(t,t),t.build()};j.version="2.3.9",j.utils={},j.utils.warn=(s=this,function(e){s.console&&console.warn&&console.warn(e)}),j.utils.asString=function(e){return null==e?"":e.toString()},j.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i0){var u=j.utils.clone(t)||{};u.position=[o,a],u.index=n.length,n.push(new j.Token(r.slice(o,s),u))}o=s+1}}return n},j.tokenizer.separator=/[\s\-]+/,j.Pipeline=function(){this._stack=[]},j.Pipeline.registeredFunctions=Object.create(null),j.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&j.utils.warn("Overwriting existing registered function: "+t),e.label=t,j.Pipeline.registeredFunctions[e.label]=e},j.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||j.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},j.Pipeline.load=function(e){var t=new j.Pipeline;return e.forEach(function(e){var r=j.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)}),t},j.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){j.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},j.Pipeline.prototype.after=function(e,t){j.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)},j.Pipeline.prototype.before=function(e,t){j.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},j.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},j.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e||s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},j.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},j.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var s,o=n.str.charAt(0);o in n.node.edges?s=n.node.edges[o]:(s=new j.TokenSet,n.node.edges[o]=s),1==n.str.length&&(s.final=!0),i.push({node:s,editsRemaining:n.editsRemaining,str:n.str.slice(1)})}if(0!=n.editsRemaining){if("*"in n.node.edges)var a=n.node.edges["*"];else{a=new j.TokenSet;n.node.edges["*"]=a}if(0==n.str.length&&(a.final=!0),i.push({node:a,editsRemaining:n.editsRemaining-1,str:n.str}),n.str.length>1&&i.push({node:n.node,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)}),1==n.str.length&&(n.node.final=!0),n.str.length>=1){if("*"in n.node.edges)var u=n.node.edges["*"];else{u=new j.TokenSet;n.node.edges["*"]=u}1==n.str.length&&(u.final=!0),i.push({node:u,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)})}if(n.str.length>1){var l,c=n.str.charAt(0),h=n.str.charAt(1);h in n.node.edges?l=n.node.edges[h]:(l=new j.TokenSet,n.node.edges[h]=l),1==n.str.length&&(l.final=!0),i.push({node:l,editsRemaining:n.editsRemaining-1,str:c+n.str.slice(2)})}}}return r},j.TokenSet.fromString=function(e){for(var t=new j.TokenSet,r=t,i=0,n=e.length;i=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},j.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},j.Index.prototype.search=function(e){return this.query(function(t){new j.QueryParser(e,t).parse()})},j.Index.prototype.query=function(e){for(var t=new j.Query(this.fields),r=Object.create(null),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=0;a1?1:e},j.Builder.prototype.k1=function(e){this._k1=e},j.Builder.prototype.add=function(e,t){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var n=0;n=this.length)return j.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},j.QueryLexer.prototype.width=function(){return this.pos-this.start},j.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},j.QueryLexer.prototype.backup=function(){this.pos-=1},j.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=j.QueryLexer.EOS&&this.backup()},j.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(j.QueryLexer.TERM)),e.ignore(),e.more())return j.QueryLexer.lexText},j.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(j.QueryLexer.EDIT_DISTANCE),j.QueryLexer.lexText},j.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(j.QueryLexer.BOOST),j.QueryLexer.lexText},j.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(j.QueryLexer.TERM)},j.QueryLexer.termSeparator=j.tokenizer.separator,j.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==j.QueryLexer.EOS)return j.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return j.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(j.QueryLexer.TERM),j.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(j.QueryLexer.TERM),j.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(j.QueryLexer.PRESENCE),j.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(j.QueryLexer.PRESENCE),j.QueryLexer.lexText;if(t.match(j.QueryLexer.termSeparator))return j.QueryLexer.lexTerm}else e.escapeCharacter()}},j.QueryParser=function(e,t){this.lexer=new j.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},j.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=j.QueryParser.parseClause;e;)e=e(this);return this.query},j.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},j.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},j.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},j.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case j.QueryLexer.PRESENCE:return j.QueryParser.parsePresence;case j.QueryLexer.FIELD:return j.QueryParser.parseField;case j.QueryLexer.TERM:return j.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 j.QueryParseError(r,t.start,t.end)}},j.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=j.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=j.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new j.QueryParseError(r,t.start,t.end)}var i=e.peekLexeme();if(null==i){r="expecting term or field, found nothing";throw new j.QueryParseError(r,t.start,t.end)}switch(i.type){case j.QueryLexer.FIELD:return j.QueryParser.parseField;case j.QueryLexer.TERM:return j.QueryParser.parseTerm;default:r="expecting term or field, found '"+i.type+"'";throw new j.QueryParseError(r,i.start,i.end)}}},j.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(", "),i="unrecognised field '"+t.str+"', possible fields: "+r;throw new j.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var n=e.peekLexeme();if(null==n){i="expecting term, found nothing";throw new j.QueryParseError(i,t.start,t.end)}if(n.type===j.QueryLexer.TERM)return j.QueryParser.parseTerm;i="expecting term, found '"+n.type+"'";throw new j.QueryParseError(i,n.start,n.end)}},j.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 j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new j.QueryParseError(i,r.start,r.end)}else e.nextClause()}},j.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new j.QueryParseError(i,t.start,t.end)}e.currentClause.editDistance=r;var n=e.peekLexeme();if(null!=n)switch(n.type){case j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+n.type+"'";throw new j.QueryParseError(i,n.start,n.end)}else e.nextClause()}},j.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="boost must be numeric";throw new j.QueryParseError(i,t.start,t.end)}e.currentClause.boost=r;var n=e.peekLexeme();if(null!=n)switch(n.type){case j.QueryLexer.TERM:return e.nextClause(),j.QueryParser.parseTerm;case j.QueryLexer.FIELD:return e.nextClause(),j.QueryParser.parseField;case j.QueryLexer.EDIT_DISTANCE:return j.QueryParser.parseEditDistance;case j.QueryLexer.BOOST:return j.QueryParser.parseBoost;case j.QueryLexer.PRESENCE:return e.nextClause(),j.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+n.type+"'";throw new j.QueryParseError(i,n.start,n.end)}else e.nextClause()}},void 0===(n="function"==typeof(i=function(){return j})?i.call(t,r,t,e):i)||(e.exports=n)}()}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";r.r(i),r.d(i,{default:()=>s});var e=r(8291),t=r.n(e),n=function(){return n=Object.assign||function(e){for(var t,r=1,i=arguments.length;r=i&&(e-=i,t[e>>3]&1<<(7&e)))return this.cursor++,!0}return!1},in_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e<=s&&e>=i&&(e-=i,t[e>>3]&1<<(7&e)))return this.cursor--,!0}return!1},out_grouping:function(t,i,s){if(this.cursors||e>3]&1<<(7&e)))return this.cursor++,!0}return!1},out_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e>s||e>3]&1<<(7&e)))return this.cursor--,!0}return!1},eq_s:function(t,i){if(this.limit-this.cursor>1),f=0,l=o0||e==s||c)break;c=!0}}for(;;){var _=t[s];if(o>=_.s_size){if(this.cursor=n+_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n+_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},find_among_b:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit_backward,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o=0;m--){if(n-l==u){f=-1;break}if(f=r.charCodeAt(n-1-l)-_.s[m])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){var _=t[s];if(o>=_.s_size){if(this.cursor=n-_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n-_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},replace_s:function(t,i,s){var e=s.length-(i-t),n=r.substring(0,t),u=r.substring(i);return r=n+s+u,this.limit+=e,this.cursor>=i?this.cursor+=e:this.cursor>t&&(this.cursor=t),e},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>r.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){var s=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=s),r<=this.ket&&(this.ket+=s)},slice_to:function(){return this.slice_check(),r.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}});}).call({lunr: x});});window.__DOCS_LUNR__.default.init(function(x){(function(){/*! + * Lunr languages, `French` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.fr=function(){this.pipeline.reset(),this.pipeline.add(e.fr.trimmer,e.fr.stopWordFilter,e.fr.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.fr.stemmer))},e.fr.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.fr.trimmer=e.trimmerSupport.generateTrimmer(e.fr.wordCharacters),e.Pipeline.registerFunction(e.fr.trimmer,"trimmer-fr"),e.fr.stemmer=function(){var r=e.stemmerSupport.Among,s=e.stemmerSupport.SnowballProgram,i=new function(){function e(e,r,s){return!(!W.eq_s(1,e)||(W.ket=W.cursor,!W.in_grouping(F,97,251)))&&(W.slice_from(r),W.cursor=s,!0)}function i(e,r,s){return!!W.eq_s(1,e)&&(W.ket=W.cursor,W.slice_from(r),W.cursor=s,!0)}function n(){for(var r,s;;){if(r=W.cursor,W.in_grouping(F,97,251)){if(W.bra=W.cursor,s=W.cursor,e("u","U",r))continue;if(W.cursor=s,e("i","I",r))continue;if(W.cursor=s,i("y","Y",r))continue}if(W.cursor=r,W.bra=r,!e("y","Y",r)){if(W.cursor=r,W.eq_s(1,"q")&&(W.bra=W.cursor,i("u","U",r)))continue;if(W.cursor=r,r>=W.limit)return;W.cursor++}}}function t(){for(;!W.in_grouping(F,97,251);){if(W.cursor>=W.limit)return!0;W.cursor++}for(;!W.out_grouping(F,97,251);){if(W.cursor>=W.limit)return!0;W.cursor++}return!1}function u(){var e=W.cursor;if(q=W.limit,g=q,p=q,W.in_grouping(F,97,251)&&W.in_grouping(F,97,251)&&W.cursor=W.limit){W.cursor=q;break}W.cursor++}while(!W.in_grouping(F,97,251))}q=W.cursor,W.cursor=e,t()||(g=W.cursor,t()||(p=W.cursor))}function o(){for(var e,r;;){if(r=W.cursor,W.bra=r,!(e=W.find_among(h,4)))break;switch(W.ket=W.cursor,e){case 1:W.slice_from("i");break;case 2:W.slice_from("u");break;case 3:W.slice_from("y");break;case 4:if(W.cursor>=W.limit)return;W.cursor++}}}function c(){return q<=W.cursor}function a(){return g<=W.cursor}function l(){return p<=W.cursor}function w(){var e,r;if(W.ket=W.cursor,e=W.find_among_b(C,43)){switch(W.bra=W.cursor,e){case 1:if(!l())return!1;W.slice_del();break;case 2:if(!l())return!1;W.slice_del(),W.ket=W.cursor,W.eq_s_b(2,"ic")&&(W.bra=W.cursor,l()?W.slice_del():W.slice_from("iqU"));break;case 3:if(!l())return!1;W.slice_from("log");break;case 4:if(!l())return!1;W.slice_from("u");break;case 5:if(!l())return!1;W.slice_from("ent");break;case 6:if(!c())return!1;if(W.slice_del(),W.ket=W.cursor,e=W.find_among_b(z,6))switch(W.bra=W.cursor,e){case 1:l()&&(W.slice_del(),W.ket=W.cursor,W.eq_s_b(2,"at")&&(W.bra=W.cursor,l()&&W.slice_del()));break;case 2:l()?W.slice_del():a()&&W.slice_from("eux");break;case 3:l()&&W.slice_del();break;case 4:c()&&W.slice_from("i")}break;case 7:if(!l())return!1;if(W.slice_del(),W.ket=W.cursor,e=W.find_among_b(y,3))switch(W.bra=W.cursor,e){case 1:l()?W.slice_del():W.slice_from("abl");break;case 2:l()?W.slice_del():W.slice_from("iqU");break;case 3:l()&&W.slice_del()}break;case 8:if(!l())return!1;if(W.slice_del(),W.ket=W.cursor,W.eq_s_b(2,"at")&&(W.bra=W.cursor,l()&&(W.slice_del(),W.ket=W.cursor,W.eq_s_b(2,"ic")))){W.bra=W.cursor,l()?W.slice_del():W.slice_from("iqU");break}break;case 9:W.slice_from("eau");break;case 10:if(!a())return!1;W.slice_from("al");break;case 11:if(l())W.slice_del();else{if(!a())return!1;W.slice_from("eux")}break;case 12:if(!a()||!W.out_grouping_b(F,97,251))return!1;W.slice_del();break;case 13:return c()&&W.slice_from("ant"),!1;case 14:return c()&&W.slice_from("ent"),!1;case 15:return r=W.limit-W.cursor,W.in_grouping_b(F,97,251)&&c()&&(W.cursor=W.limit-r,W.slice_del()),!1}return!0}return!1}function f(){var e,r;if(W.cursor=q){if(s=W.limit_backward,W.limit_backward=q,W.ket=W.cursor,e=W.find_among_b(P,7))switch(W.bra=W.cursor,e){case 1:if(l()){if(i=W.limit-W.cursor,!W.eq_s_b(1,"s")&&(W.cursor=W.limit-i,!W.eq_s_b(1,"t")))break;W.slice_del()}break;case 2:W.slice_from("i");break;case 3:W.slice_del();break;case 4:W.eq_s_b(2,"gu")&&W.slice_del()}W.limit_backward=s}}function b(){var e=W.limit-W.cursor;W.find_among_b(U,5)&&(W.cursor=W.limit-e,W.ket=W.cursor,W.cursor>W.limit_backward&&(W.cursor--,W.bra=W.cursor,W.slice_del()))}function d(){for(var e,r=1;W.out_grouping_b(F,97,251);)r--;if(r<=0){if(W.ket=W.cursor,e=W.limit-W.cursor,!W.eq_s_b(1,"é")&&(W.cursor=W.limit-e,!W.eq_s_b(1,"è")))return;W.bra=W.cursor,W.slice_from("e")}}function k(){if(!w()&&(W.cursor=W.limit,!f()&&(W.cursor=W.limit,!m())))return W.cursor=W.limit,void _();W.cursor=W.limit,W.ket=W.cursor,W.eq_s_b(1,"Y")?(W.bra=W.cursor,W.slice_from("i")):(W.cursor=W.limit,W.eq_s_b(1,"ç")&&(W.bra=W.cursor,W.slice_from("c")))}var p,g,q,v=[new r("col",-1,-1),new r("par",-1,-1),new r("tap",-1,-1)],h=[new r("",-1,4),new r("I",0,1),new r("U",0,2),new r("Y",0,3)],z=[new r("iqU",-1,3),new r("abl",-1,3),new r("Ièr",-1,4),new r("ièr",-1,4),new r("eus",-1,2),new r("iv",-1,1)],y=[new r("ic",-1,2),new r("abil",-1,1),new r("iv",-1,3)],C=[new r("iqUe",-1,1),new r("atrice",-1,2),new r("ance",-1,1),new r("ence",-1,5),new r("logie",-1,3),new r("able",-1,1),new r("isme",-1,1),new r("euse",-1,11),new r("iste",-1,1),new r("ive",-1,8),new r("if",-1,8),new r("usion",-1,4),new r("ation",-1,2),new r("ution",-1,4),new r("ateur",-1,2),new r("iqUes",-1,1),new r("atrices",-1,2),new r("ances",-1,1),new r("ences",-1,5),new r("logies",-1,3),new r("ables",-1,1),new r("ismes",-1,1),new r("euses",-1,11),new r("istes",-1,1),new r("ives",-1,8),new r("ifs",-1,8),new r("usions",-1,4),new r("ations",-1,2),new r("utions",-1,4),new r("ateurs",-1,2),new r("ments",-1,15),new r("ements",30,6),new r("issements",31,12),new r("ités",-1,7),new r("ment",-1,15),new r("ement",34,6),new r("issement",35,12),new r("amment",34,13),new r("emment",34,14),new r("aux",-1,10),new r("eaux",39,9),new r("eux",-1,1),new r("ité",-1,7)],x=[new r("ira",-1,1),new r("ie",-1,1),new r("isse",-1,1),new r("issante",-1,1),new r("i",-1,1),new r("irai",4,1),new r("ir",-1,1),new r("iras",-1,1),new r("ies",-1,1),new r("îmes",-1,1),new r("isses",-1,1),new r("issantes",-1,1),new r("îtes",-1,1),new r("is",-1,1),new r("irais",13,1),new r("issais",13,1),new r("irions",-1,1),new r("issions",-1,1),new r("irons",-1,1),new r("issons",-1,1),new r("issants",-1,1),new r("it",-1,1),new r("irait",21,1),new r("issait",21,1),new r("issant",-1,1),new r("iraIent",-1,1),new r("issaIent",-1,1),new r("irent",-1,1),new r("issent",-1,1),new r("iront",-1,1),new r("ît",-1,1),new r("iriez",-1,1),new r("issiez",-1,1),new r("irez",-1,1),new r("issez",-1,1)],I=[new r("a",-1,3),new r("era",0,2),new r("asse",-1,3),new r("ante",-1,3),new r("ée",-1,2),new r("ai",-1,3),new r("erai",5,2),new r("er",-1,2),new r("as",-1,3),new r("eras",8,2),new r("âmes",-1,3),new r("asses",-1,3),new r("antes",-1,3),new r("âtes",-1,3),new r("ées",-1,2),new r("ais",-1,3),new r("erais",15,2),new r("ions",-1,1),new r("erions",17,2),new r("assions",17,3),new r("erons",-1,2),new r("ants",-1,3),new r("és",-1,2),new r("ait",-1,3),new r("erait",23,2),new r("ant",-1,3),new r("aIent",-1,3),new r("eraIent",26,2),new r("èrent",-1,2),new r("assent",-1,3),new r("eront",-1,2),new r("ât",-1,3),new r("ez",-1,2),new r("iez",32,2),new r("eriez",33,2),new r("assiez",33,3),new r("erez",32,2),new r("é",-1,2)],P=[new r("e",-1,3),new r("Ière",0,2),new r("ière",0,2),new r("ion",-1,1),new r("Ier",-1,2),new r("ier",-1,2),new r("ë",-1,4)],U=[new r("ell",-1,-1),new r("eill",-1,-1),new r("enn",-1,-1),new r("onn",-1,-1),new r("ett",-1,-1)],F=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,128,130,103,8,5],S=[1,65,20,0,0,0,0,0,0,0,0,0,0,0,0,0,128],W=new s;this.setCurrent=function(e){W.setCurrent(e)},this.getCurrent=function(){return W.getCurrent()},this.stem=function(){var e=W.cursor;return n(),W.cursor=e,u(),W.limit_backward=e,W.cursor=W.limit,k(),W.cursor=W.limit,b(),W.cursor=W.limit,d(),W.cursor=W.limit_backward,o(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}}(),e.Pipeline.registerFunction(e.fr.stemmer,"stemmer-fr"),e.fr.stopWordFilter=e.generateStopWordFilter("ai aie aient aies ait as au aura aurai auraient aurais aurait auras aurez auriez aurions aurons auront aux avaient avais avait avec avez aviez avions avons ayant ayez ayons c ce ceci celà ces cet cette d dans de des du elle en es est et eu eue eues eurent eus eusse eussent eusses eussiez eussions eut eux eûmes eût eûtes furent fus fusse fussent fusses fussiez fussions fut fûmes fût fûtes ici il ils j je l la le les leur leurs lui m ma mais me mes moi mon même n ne nos notre nous on ont ou par pas pour qu que quel quelle quelles quels qui s sa sans se sera serai seraient serais serait seras serez seriez serions serons seront ses soi soient sois soit sommes son sont soyez soyons suis sur t ta te tes toi ton tu un une vos votre vous y à étaient étais était étant étiez étions été étée étées étés êtes".split(" ")),e.Pipeline.registerFunction(e.fr.stopWordFilter,"stopWordFilter-fr")}});}).call({lunr: x});});window.__DOCS_LUNR__.default.init(function(x){(function(){/*! + * Lunr languages, `Dutch` language + * https://github.com/MihaiValentin/lunr-languages + * + * Copyright 2014, Mihai Valentin + * http://www.mozilla.org/MPL/ + */ +/*! + * based on + * Snowball JavaScript Library v0.3 + * http://code.google.com/p/urim/ + * http://snowball.tartarus.org/ + * + * Copyright 2010, Oleg Mazko + * http://www.mozilla.org/MPL/ + */ + +!function(r,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():e()(r.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");r.nl=function(){this.pipeline.reset(),this.pipeline.add(r.nl.trimmer,r.nl.stopWordFilter,r.nl.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(r.nl.stemmer))},r.nl.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.nl.trimmer=r.trimmerSupport.generateTrimmer(r.nl.wordCharacters),r.Pipeline.registerFunction(r.nl.trimmer,"trimmer-nl"),r.nl.stemmer=function(){var e=r.stemmerSupport.Among,i=r.stemmerSupport.SnowballProgram,n=new function(){function r(){for(var r,e,i,o=C.cursor;;){if(C.bra=C.cursor,r=C.find_among(b,11))switch(C.ket=C.cursor,r){case 1:C.slice_from("a");continue;case 2:C.slice_from("e");continue;case 3:C.slice_from("i");continue;case 4:C.slice_from("o");continue;case 5:C.slice_from("u");continue;case 6:if(C.cursor>=C.limit)break;C.cursor++;continue}break}for(C.cursor=o,C.bra=o,C.eq_s(1,"y")?(C.ket=C.cursor,C.slice_from("Y")):C.cursor=o;;)if(e=C.cursor,C.in_grouping(q,97,232)){if(i=C.cursor,C.bra=i,C.eq_s(1,"i"))C.ket=C.cursor,C.in_grouping(q,97,232)&&(C.slice_from("I"),C.cursor=e);else if(C.cursor=i,C.eq_s(1,"y"))C.ket=C.cursor,C.slice_from("Y"),C.cursor=e;else if(n(e))break}else if(n(e))break}function n(r){return C.cursor=r,r>=C.limit||(C.cursor++,!1)}function o(){_=C.limit,d=_,t()||(_=C.cursor,_<3&&(_=3),t()||(d=C.cursor))}function t(){for(;!C.in_grouping(q,97,232);){if(C.cursor>=C.limit)return!0;C.cursor++}for(;!C.out_grouping(q,97,232);){if(C.cursor>=C.limit)return!0;C.cursor++}return!1}function s(){for(var r;;)if(C.bra=C.cursor,r=C.find_among(p,3))switch(C.ket=C.cursor,r){case 1:C.slice_from("y");break;case 2:C.slice_from("i");break;case 3:if(C.cursor>=C.limit)return;C.cursor++}}function u(){return _<=C.cursor}function c(){return d<=C.cursor}function a(){var r=C.limit-C.cursor;C.find_among_b(g,3)&&(C.cursor=C.limit-r,C.ket=C.cursor,C.cursor>C.limit_backward&&(C.cursor--,C.bra=C.cursor,C.slice_del()))}function l(){var r;w=!1,C.ket=C.cursor,C.eq_s_b(1,"e")&&(C.bra=C.cursor,u()&&(r=C.limit-C.cursor,C.out_grouping_b(q,97,232)&&(C.cursor=C.limit-r,C.slice_del(),w=!0,a())))}function m(){var r;u()&&(r=C.limit-C.cursor,C.out_grouping_b(q,97,232)&&(C.cursor=C.limit-r,C.eq_s_b(3,"gem")||(C.cursor=C.limit-r,C.slice_del(),a())))}function f(){var r,e,i,n,o,t,s=C.limit-C.cursor;if(C.ket=C.cursor,r=C.find_among_b(h,5))switch(C.bra=C.cursor,r){case 1:u()&&C.slice_from("heid");break;case 2:m();break;case 3:u()&&C.out_grouping_b(j,97,232)&&C.slice_del()}if(C.cursor=C.limit-s,l(),C.cursor=C.limit-s,C.ket=C.cursor,C.eq_s_b(4,"heid")&&(C.bra=C.cursor,c()&&(e=C.limit-C.cursor,C.eq_s_b(1,"c")||(C.cursor=C.limit-e,C.slice_del(),C.ket=C.cursor,C.eq_s_b(2,"en")&&(C.bra=C.cursor,m())))),C.cursor=C.limit-s,C.ket=C.cursor,r=C.find_among_b(k,6))switch(C.bra=C.cursor,r){case 1:if(c()){if(C.slice_del(),i=C.limit-C.cursor,C.ket=C.cursor,C.eq_s_b(2,"ig")&&(C.bra=C.cursor,c()&&(n=C.limit-C.cursor,!C.eq_s_b(1,"e")))){C.cursor=C.limit-n,C.slice_del();break}C.cursor=C.limit-i,a()}break;case 2:c()&&(o=C.limit-C.cursor,C.eq_s_b(1,"e")||(C.cursor=C.limit-o,C.slice_del()));break;case 3:c()&&(C.slice_del(),l());break;case 4:c()&&C.slice_del();break;case 5:c()&&w&&C.slice_del()}C.cursor=C.limit-s,C.out_grouping_b(z,73,232)&&(t=C.limit-C.cursor,C.find_among_b(v,4)&&C.out_grouping_b(q,97,232)&&(C.cursor=C.limit-t,C.ket=C.cursor,C.cursor>C.limit_backward&&(C.cursor--,C.bra=C.cursor,C.slice_del())))}var d,_,w,b=[new e("",-1,6),new e("á",0,1),new e("ä",0,1),new e("é",0,2),new e("ë",0,2),new e("í",0,3),new e("ï",0,3),new e("ó",0,4),new e("ö",0,4),new e("ú",0,5),new e("ü",0,5)],p=[new e("",-1,3),new e("I",0,2),new e("Y",0,1)],g=[new e("dd",-1,-1),new e("kk",-1,-1),new e("tt",-1,-1)],h=[new e("ene",-1,2),new e("se",-1,3),new e("en",-1,2),new e("heden",2,1),new e("s",-1,3)],k=[new e("end",-1,1),new e("ig",-1,2),new e("ing",-1,1),new e("lijk",-1,3),new e("baar",-1,4),new e("bar",-1,5)],v=[new e("aa",-1,-1),new e("ee",-1,-1),new e("oo",-1,-1),new e("uu",-1,-1)],q=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],z=[1,0,0,17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],j=[17,67,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],C=new i;this.setCurrent=function(r){C.setCurrent(r)},this.getCurrent=function(){return C.getCurrent()},this.stem=function(){var e=C.cursor;return r(),C.cursor=e,o(),C.limit_backward=e,C.cursor=C.limit,f(),C.cursor=C.limit_backward,s(),!0}};return function(r){return"function"==typeof r.update?r.update(function(r){return n.setCurrent(r),n.stem(),n.getCurrent()}):(n.setCurrent(r),n.stem(),n.getCurrent())}}(),r.Pipeline.registerFunction(r.nl.stemmer,"stemmer-nl"),r.nl.stopWordFilter=r.generateStopWordFilter(" aan al alles als altijd andere ben bij daar dan dat de der deze die dit doch doen door dus een eens en er ge geen geweest haar had heb hebben heeft hem het hier hij hoe hun iemand iets ik in is ja je kan kon kunnen maar me meer men met mij mijn moet na naar niet niets nog nu of om omdat onder ons ook op over reeds te tegen toch toen tot u uit uw van veel voor want waren was wat werd wezen wie wil worden wordt zal ze zelf zich zij zijn zo zonder zou".split(" ")),r.Pipeline.registerFunction(r.nl.stopWordFilter,"stopWordFilter-nl")}});}).call({lunr: x});});window.__DOCS_LUNR__.default.init(function(x){(function(){!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(e.lunr)}(this,function(){return function(e){e.multiLanguage=function(){for(var t=Array.prototype.slice.call(arguments),i=t.join("-"),r="",n=[],s=[],p=0;p{var t={9119(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},6750(t,e,r){"use strict";e.J=function(t){if(!t)return n.BLANK_URL;var e,r=a(t.trim());do{e=(r=a(r=i(r).replace(n.htmlCtrlEntityRegex,"").replace(n.ctrlCharactersRegex,"").replace(n.whitespaceEscapeCharsRegex,"").trim())).match(n.ctrlCharactersRegex)||r.match(n.htmlEntitiesRegex)||r.match(n.htmlCtrlEntityRegex)||r.match(n.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var s=r;if(!s)return n.BLANK_URL;if(function(t){return n.relativeFirstCharacters.indexOf(t[0])>-1}(s))return s;var o=s.trimStart(),l=o.match(n.urlSchemeRegex);if(!l)return s;var c=l[0].toLowerCase().trim();if(n.invalidProtocolRegex.test(c))return n.BLANK_URL;var h=o.replace(/\\/g,"/");if("mailto:"===c||c.includes("://"))return h;if("http:"===c||"https:"===c){if(!function(t){return URL.canParse(t)}(h))return n.BLANK_URL;var u=new URL(h);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return h};var n=r(9119);function i(t){return t.replace(n.ctrlCharactersRegex,"").replace(n.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}},7799(t,e,r){var n;n=function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}([function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(0).FDLayoutConstants;function i(){}for(var a in n)i[a]=n[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=n.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,t.exports=i},function(t,e,r){"use strict";var n=r(0).FDLayoutEdge;function i(t,e,r){n.call(this,t,e,r)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},function(t,e,r){"use strict";var n=r(0).LGraph;function i(t,e,r){n.call(this,t,e,r)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},function(t,e,r){"use strict";var n=r(0).LGraphManager;function i(t){n.call(this,t)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},function(t,e,r){"use strict";var n=r(0).FDLayoutNode,i=r(0).IMath;function a(t,e,r,i){n.call(this,t,e,r,i)}for(var s in a.prototype=Object.create(n.prototype),n)a[s]=n[s];a.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.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),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(t,e){for(var r,n=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.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%c.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 t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=c.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=c.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var r=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(r,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},r=0;r1)for(o=0;on&&(n=Math.floor(s.y)),a=Math.floor(s.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(h.WORLD_CENTER_X-s.x/2,h.WORLD_CENTER_Y-s.y/2))},v.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),l.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(e,null,0,359,0,n);var i=m.calculateBounds(t),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(r.x),a.setWorldOrgY(r.y);for(var s=0;s1;){var y=m[0];m.splice(0,1);var b=h.indexOf(y);b>=0&&h.splice(b,1),f--,u--}d=null!=e?(h.indexOf(m[0])+1)%f:0;for(var x=Math.abs(n-r)/u,w=d;p!=u;w=++w%f){var T=h[w].getOtherEnd(t);if(T!=e){var k=(r+p*x)%360,A=(k+x)%360;v.branchRadialLayout(T,t,k,A,i+a,a),p++}}},v.maxDiagonalInTree=function(t){for(var e=f.MIN_VALUE,r=0;re&&(e=n)}return e},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var r=[],n=this.graphManager.getAllNodes(),i=0;i1){var n="DummyCompound_"+r;t.memberGroups[n]=e[r];var i=e[r][0].getParent(),a=new s(t.graphManager);a.id=n,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,t.idToDummyNode[n]=a;var o=t.getGraphManager().add(t.newGraph(),a),l=i.getChild();l.add(a);for(var c=0;c=0;t--){var e=this.compoundOrder[t],r=e.id,n=e.paddingLeft,i=e.paddingTop;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,n,i)}},v.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(r){var n=t.idToDummyNode[r],i=n.paddingLeft,a=n.paddingTop;t.adjustLocations(e[r],n.rect.x,n.rect.y,i,a)})},v.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var r=t.getChild();if(null==r)return this.toBeTiled[e]=!1,!1;for(var n=r.getNodes(),i=0;i0)return this.toBeTiled[e]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[e]=!0,!0},v.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,n=0;nl&&(l=h.rect.height)}r+=l+t.verticalPadding}},v.prototype.tileCompoundMembers=function(t,e){var r=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(n){var i=e[n];r.tiledMemberPack[n]=r.tileNodes(t[n],i.paddingLeft+i.paddingRight),i.rect.width=r.tiledMemberPack[n].width,i.rect.height=r.tiledMemberPack[n].height})},v.prototype.tileNodes=function(t,e){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height0&&(a+=t.horizontalPadding),t.rowWidth[r]=a,t.width0&&(s+=t.verticalPadding);var o=0;s>t.rowHeight[r]&&(o=t.rowHeight[r],t.rowHeight[r]=s,o=t.rowHeight[r]-o),t.height+=o,t.rows[r].push(e)},v.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;nr&&(e=n,r=t.rowWidth[n]);return e},v.prototype.canAddHorizontal=function(t,e,r){var n=this.getShortestRowIndex(t);if(n<0)return!0;var i=t.rowWidth[n];if(i+t.horizontalPadding+e<=t.width)return!0;var a,s,o=0;return t.rowHeight[n]0&&(o=r+t.verticalPadding-t.rowHeight[n]),a=t.width-i>=e+t.horizontalPadding?(t.height+o)/(i+e+t.horizontalPadding):(t.height+o)/t.width,o=r+t.verticalPadding,(s=t.widtha&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=n[o].height);e>0&&(s+=t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[r];t.rowHeight[e]=s,t.rowHeight[r]0)for(var h=i;h<=a;h++)l[0]+=this.grid[h][s-1].length+this.grid[h][s].length-1;if(a0)for(h=s;h<=o;h++)l[3]+=this.grid[i-1][h].length+this.grid[i][h].length-1;for(var u,d,p=f.MAX_VALUE,g=0;g0&&(s=r.getGraphManager().add(r.newGraph(),a),this.processChildrenList(s,u,r))}},u.prototype.stop=function(){return this.stopped=!0,this};var p=function(t){t("layout","cose-bilkent",u)};"undefined"!=typeof cytoscape&&p(cytoscape),t.exports=p}])},t.exports=n(r(7799))},6527(t,e,r){var n;n=function(t){return(()=>{"use strict";var e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n{var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=r(140).layoutBase.LinkedList,a={getTopMostNodes:function(t){for(var e={},r=0;r0&&c.merge(t)});for(var h=0;h1){c=o[0],h=c.connectedEdges().length,o.forEach(function(t){t.connectedEdges().length0&&n.set("dummy"+(n.size+1),p),f},relocateComponent:function(t,e,r){if(!r.fixedNodeConstraint){var i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if("draft"==r.quality){var l=!0,c=!1,h=void 0;try{for(var u,d=e.nodeIndexes[Symbol.iterator]();!(l=(u=d.next()).done);l=!0){var p=u.value,f=n(p,2),g=f[0],m=f[1],y=r.cy.getElementById(g);if(y){var v=y.boundingBox(),b=e.xCoords[m]-v.w/2,x=e.xCoords[m]+v.w/2,w=e.yCoords[m]-v.h/2,T=e.yCoords[m]+v.h/2;ba&&(a=x),wo&&(o=T)}}}catch(C){c=!0,h=C}finally{try{!l&&d.return&&d.return()}finally{if(c)throw h}}var k=t.x-(a+i)/2,A=t.y-(o+s)/2;e.xCoords=e.xCoords.map(function(t){return t+k}),e.yCoords=e.yCoords.map(function(t){return t+A})}else{Object.keys(e).forEach(function(t){var r=e[t],n=r.getRect().x,l=r.getRect().x+r.getRect().width,c=r.getRect().y,h=r.getRect().y+r.getRect().height;na&&(a=l),co&&(o=h)});var _=t.x-(a+i)/2,E=t.y-(o+s)/2;Object.keys(e).forEach(function(t){var r=e[t];r.setCenter(r.getCenterX()+_,r.getCenterY()+E)})}}},calcBoundingBox:function(t,e,r,n){for(var i=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,l=void 0,c=void 0,h=void 0,u=void 0,d=t.descendants().not(":parent"),p=d.length,f=0;f(l=e[n.get(g.id())]-g.width()/2)&&(i=l),a<(c=e[n.get(g.id())]+g.width()/2)&&(a=c),s>(h=r[n.get(g.id())]-g.height()/2)&&(s=h),o<(u=r[n.get(g.id())]+g.height()/2)&&(o=u)}var m={};return m.topLeftX=i,m.topLeftY=s,m.width=a-i,m.height=o-s,m},calcParentsWithoutChildren:function(t,e){var r=t.collection();return e.nodes(":parent").forEach(function(t){var e=!1;t.children().forEach(function(t){"none"!=t.css("display")&&(e=!0)}),e||r.merge(t)}),r}};t.exports=a},816:(t,e,r)=>{var n=r(548),i=r(140).CoSELayout,a=r(140).CoSENode,s=r(140).layoutBase.PointD,o=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,c=r(140).layoutBase.FDLayoutConstants,h=r(140).CoSEConstants;t.exports={coseLayout:function(t,e){var r=t.cy,u=t.eles,d=u.nodes(),p=u.edges(),f=void 0,g=void 0,m=void 0,y={};t.randomize&&(f=e.nodeIndexes,g=e.xCoords,m=e.yCoords);var v=function(t){return"function"==typeof t},b=function(t,e){return v(t)?t(e):t},x=n.calcParentsWithoutChildren(r,u);null!=t.nestingFactor&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(h.TILING_COMPARE_BY=t.tilingCompareBy),"proof"==t.quality?l.QUALITY=2:l.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!t.randomize,h.ANIMATE=c.ANIMATE=l.ANIMATE=t.animate,h.TILE=t.tile,h.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!t.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),"enforced"==t.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),"cose"==t.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,T=w.newGraphManager();return function t(e,r,i,l){for(var c=r.length,h=0;h0&&t(i.getGraphManager().add(i.newGraph(),p),d,i,l)}}(T.addRoot(),n.getTopMostNodes(d),w,t),function(e,r,n){for(var i=0,a=0,s=0;s0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=i/a:v(t.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)}(w,T,p),function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)}(w,t),w.runLayout(),y}}},212:(t,e,r)=>{var n=function(){function t(t,e){for(var r=0;r0)if(u){var d=a.getTopMostNodes(t.eles.nodes());if((l=a.connectComponents(e,t.eles,d)).forEach(function(t){var e=t.boundingBox();c.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,n.push(s(t))}),"default"==t.quality||"proof"==t.quality){var p=e.collection();if(t.tile){var f=new Map,g=0,m={nodeIndexes:f,xCoords:[],yCoords:[]},y=[];if(l.forEach(function(t,e){0==t.edges().length&&(t.nodes().forEach(function(e,r){p.merge(t.nodes()[r]),e.isParent()||(m.nodeIndexes.set(t.nodes()[r].id(),g++),m.xCoords.push(t.nodes()[0].position().x),m.yCoords.push(t.nodes()[0].position().y))}),y.push(e))}),p.length>1){var v=p.boundingBox();c.push({x:v.x1+v.w/2,y:v.y1+v.h/2}),l.push(p),n.push(m);for(var b=y.length-1;b>=0;b--)l.splice(y[b],1),n.splice(y[b],1),c.splice(y[b],1)}}l.forEach(function(e,r){t.eles=e,i.push(o(t,n[r])),a.relocateComponent(c[r],i[r],t)})}else l.forEach(function(e,r){a.relocateComponent(c[r],n[r],t)});var x=new Set;if(l.length>1){var w=[],T=r.filter(function(t){return"none"==t.css("display")});l.forEach(function(e,r){var s=void 0;if("draft"==t.quality&&(s=n[r].nodeIndexes),e.nodes().not(T).length>0){var o={edges:[],nodes:[]},l=void 0;e.nodes().not(T).forEach(function(e){if("draft"==t.quality)if(e.isParent()){var c=a.calcBoundingBox(e,n[r].xCoords,n[r].yCoords,s);o.nodes.push({x:c.topLeftX,y:c.topLeftY,width:c.width,height:c.height})}else l=s.get(e.id()),o.nodes.push({x:n[r].xCoords[l]-e.boundingbox().w/2,y:n[r].yCoords[l]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else i[r][e.id()]&&o.nodes.push({x:i[r][e.id()].getLeft(),y:i[r][e.id()].getTop(),width:i[r][e.id()].getWidth(),height:i[r][e.id()].getHeight()})}),e.edges().forEach(function(e){var l=e.source(),c=e.target();if("none"!=l.css("display")&&"none"!=c.css("display"))if("draft"==t.quality){var h=s.get(l.id()),u=s.get(c.id()),d=[],p=[];if(l.isParent()){var f=a.calcBoundingBox(l,n[r].xCoords,n[r].yCoords,s);d.push(f.topLeftX+f.width/2),d.push(f.topLeftY+f.height/2)}else d.push(n[r].xCoords[h]),d.push(n[r].yCoords[h]);if(c.isParent()){var g=a.calcBoundingBox(c,n[r].xCoords,n[r].yCoords,s);p.push(g.topLeftX+g.width/2),p.push(g.topLeftY+g.height/2)}else p.push(n[r].xCoords[u]),p.push(n[r].yCoords[u]);o.edges.push({startX:d[0],startY:d[1],endX:p[0],endY:p[1]})}else i[r][l.id()]&&i[r][c.id()]&&o.edges.push({startX:i[r][l.id()].getCenterX(),startY:i[r][l.id()].getCenterY(),endX:i[r][c.id()].getCenterX(),endY:i[r][c.id()].getCenterY()})}),o.nodes.length>0&&(w.push(o),x.add(r))}});var k=h.packComponents(w,t.randomize).shifts;if("draft"==t.quality)n.forEach(function(t,e){var r=t.xCoords.map(function(t){return t+k[e].dx}),n=t.yCoords.map(function(t){return t+k[e].dy});t.xCoords=r,t.yCoords=n});else{var A=0;x.forEach(function(t){Object.keys(i[t]).forEach(function(e){var r=i[t][e];r.setCenter(r.getCenterX()+k[A].dx,r.getCenterY()+k[A].dy)}),A++})}}}else{var _=t.eles.boundingBox();if(c.push({x:_.x1+_.w/2,y:_.y1+_.h/2}),t.randomize){var E=s(t);n.push(E)}"default"==t.quality||"proof"==t.quality?(i.push(o(t,n[0])),a.relocateComponent(c[0],i[0],t)):a.relocateComponent(c[0],n[0],t)}var C=function(e,r){if("default"==t.quality||"proof"==t.quality){"number"==typeof e&&(e=r);var a=void 0,s=void 0,o=e.data("id");return i.forEach(function(t){o in t&&(a={x:t[o].getRect().getCenterX(),y:t[o].getRect().getCenterY()},s=t[o])}),t.nodeDimensionsIncludeLabels&&(s.labelWidth&&("left"==s.labelPosHorizontal?a.x+=s.labelWidth/2:"right"==s.labelPosHorizontal&&(a.x-=s.labelWidth/2)),s.labelHeight&&("top"==s.labelPosVertical?a.y+=s.labelHeight/2:"bottom"==s.labelPosVertical&&(a.y-=s.labelHeight/2))),null==a&&(a={x:e.position("x"),y:e.position("y")}),{x:a.x,y:a.y}}var l=void 0;return n.forEach(function(t){var r=t.nodeIndexes.get(e.id());null!=r&&(l={x:t.xCoords[r],y:t.yCoords[r]})}),null==l&&(l={x:e.position("x"),y:e.position("y")}),{x:l.x,y:l.y}};if("default"==t.quality||"proof"==t.quality||t.randomize){var S=a.calcParentsWithoutChildren(e,r),R=r.filter(function(t){return"none"==t.css("display")});t.eles=r.not(R),r.nodes().not(":parent").not(R).layoutPositions(this,t,C),S.length>0&&S.forEach(function(t){t.position(C(t))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),t}();t.exports=c},657:(t,e,r)=>{var n=r(548),i=r(140).layoutBase.Matrix,a=r(140).layoutBase.SVD;t.exports={spectralLayout:function(t){var e=t.cy,r=t.eles,s=r.nodes(),o=r.nodes(":parent"),l=new Map,c=new Map,h=new Map,u=[],d=[],p=[],f=[],g=[],m=[],y=[],v=[],b=void 0,x=1e8,w=1e-9,T=t.piTol,k=t.samplingType,A=t.nodeSeparation,_=void 0,E=function(t,e,r){for(var n=[],i=0,a=0,s=0,o=void 0,l=[],h=0,d=1,p=0;p=i;){s=n[i++];for(var f=u[s],y=0;yh&&(h=g[w],d=w)}return d};n.connectComponents(e,r,n.getTopMostNodes(s),l),o.forEach(function(t){n.connectComponents(e,r,n.getTopMostNodes(t.descendants().intersection(r)),l)});for(var C=0,S=0;S0&&(n.isParent()?u[e].push(h.get(n.id())):u[e].push(n.id()))})});var P=function(t){var r=c.get(t),n=void 0;l.get(t).forEach(function(i){n=e.getElementById(i).isParent()?h.get(i):i,u[r].push(n),u[c.get(n)].push(t)})},$=!0,B=!1,F=void 0;try{for(var z,K=l.keys()[Symbol.iterator]();!($=(z=K.next()).done);$=!0)P(z.value)}catch(X){B=!0,F=X}finally{try{!$&&K.return&&K.return()}finally{if(B)throw F}}var q=void 0;if((b=c.size)>2){_=b=1)break;c=l}for(var f=0;f=1)break;c=l}for(var y=0;y{var n=r(212),i=function(t){t&&t("layout","fcose",n)};"undefined"!=typeof cytoscape&&i(cytoscape),t.exports=i},140:e=>{e.exports=t}},r={},n=function t(n){var i=r[n];if(void 0!==i)return i.exports;var a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}(579);return n})()},t.exports=n(r(1709))},1709(t,e,r){var n;n=function(t){return(()=>{"use strict";var e={45:(t,e,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),t.exports=n},806:(t,e,r)=>{var n=r(551).FDLayoutConstants;function i(){}for(var a in n)i[a]=n[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,t.exports=i},767:(t,e,r)=>{var n=r(551).FDLayoutEdge;function i(t,e,r){n.call(this,t,e,r)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},880:(t,e,r)=>{var n=r(551).LGraph;function i(t,e,r){n.call(this,t,e,r)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},578:(t,e,r)=>{var n=r(551).LGraphManager;function i(t){n.call(this,t)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},765:(t,e,r)=>{var n=r(551).FDLayout,i=r(578),a=r(880),s=r(991),o=r(767),l=r(806),c=r(902),h=r(551).FDLayoutConstants,u=r(551).LayoutConstants,d=r(551).Point,p=r(551).PointD,f=r(551).DimensionD,g=r(551).Layout,m=r(551).Integer,y=r(551).IGeometry,v=r(551).LGraph,b=r(551).Transform,x=r(551).LinkedList;function w(){n.call(this),this.toBeTiled={},this.constraints={}}for(var T in w.prototype=Object.create(n.prototype),n)w[T]=n[T];w.prototype.newGraphManager=function(){var t=new i(this);return this.graphManager=t,t},w.prototype.newGraph=function(t){return new a(null,this.graphManager,t)},w.prototype.newNode=function(t){return new s(this.graphManager,t)},w.prototype.newEdge=function(t){return new o(null,null,t)},w.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(l.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},w.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},w.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},w.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)l.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),l.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},w.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%h.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 t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),l.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.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()),l.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var r=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(r,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},w.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},r=0;r0&&this.updateDisplacements(),e=0;e0&&(n.fixedNodeWeight=a)}if(this.constraints.relativePlacementConstraint){var s=new Map,o=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var c=this.constraints.alignmentConstraint.vertical;for(r=0;r=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),r=t[n],t[n]=t[e],t[e]=r;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var r=s.has(e.left)?s.get(e.left):e.left,n=s.has(e.right)?s.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(r)||(t.nodesInRelativeHorizontal.push(r),t.nodeToRelativeConstraintMapHorizontal.set(r,[]),t.dummyToNodeForVerticalAlignment.has(r)?t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(r).getCenterX())),t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(r).push({right:n,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(n).push({left:r,gap:e.gap})}else{var i=o.has(e.top)?o.get(e.top):e.top,a=o.has(e.bottom)?o.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(i)||(t.nodesInRelativeVertical.push(i),t.nodeToRelativeConstraintMapVertical.set(i,[]),t.dummyToNodeForHorizontalAlignment.has(i)?t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(i).getCenterY())),t.nodesInRelativeVertical.includes(a)||(t.nodesInRelativeVertical.push(a),t.nodeToRelativeConstraintMapVertical.set(a,[]),t.dummyToNodeForHorizontalAlignment.has(a)?t.nodeToTempPositionMapVertical.set(a,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(a,t.idToNodeMap.get(a).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:e.gap})}});else{var u=new Map,d=new Map;this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var e=s.has(t.left)?s.get(t.left):t.left,r=s.has(t.right)?s.get(t.right):t.right;u.has(e)?u.get(e).push(r):u.set(e,[r]),u.has(r)?u.get(r).push(e):u.set(r,[e])}else{var n=o.has(t.top)?o.get(t.top):t.top,i=o.has(t.bottom)?o.get(t.bottom):t.bottom;d.has(n)?d.get(n).push(i):d.set(n,[i]),d.has(i)?d.get(i).push(n):d.set(i,[n])}});var p=function(t,e){var r=[],n=[],i=new x,a=new Set,s=0;return t.forEach(function(o,l){if(!a.has(l)){r[s]=[],n[s]=!1;var c=l;for(i.push(c),a.add(c),r[s].push(c);0!=i.length;)c=i.shift(),e.has(c)&&(n[s]=!0),t.get(c).forEach(function(t){a.has(t)||(i.push(t),a.add(t),r[s].push(t))});s++}}),{components:r,isFixed:n}},f=p(u,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=f.components,this.fixedComponentsOnHorizontal=f.isFixed;var g=p(d,t.fixedNodesOnVertical);this.componentsOnVertical=g.components,this.fixedComponentsOnVertical=g.isFixed}}},w.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){var r=t.idToNodeMap.get(e.nodeId);r.displacementX=0,r.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,r=0;r1)for(o=0;on&&(n=Math.floor(s.y)),a=Math.floor(s.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-s.x/2,u.WORLD_CENTER_Y-s.y/2))},w.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),l.DEFAULT_RADIAL_SEPARATION);w.branchRadialLayout(e,null,0,359,0,n);var i=v.calculateBounds(t),a=new b;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(r.x),a.setWorldOrgY(r.y);for(var s=0;s1;){var m=g[0];g.splice(0,1);var v=h.indexOf(m);v>=0&&h.splice(v,1),f--,u--}d=null!=e?(h.indexOf(g[0])+1)%f:0;for(var b=Math.abs(n-r)/u,x=d;p!=u;x=++x%f){var T=h[x].getOtherEnd(t);if(T!=e){var k=(r+p*b)%360,A=(k+b)%360;w.branchRadialLayout(T,t,k,A,i+a,a),p++}}},w.maxDiagonalInTree=function(t){for(var e=m.MIN_VALUE,r=0;re&&(e=n)}return e},w.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},w.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var r=[],n=this.graphManager.getAllNodes(),i=0;i1){var n="DummyCompound_"+r;t.memberGroups[n]=e[r];var i=e[r][0].getParent(),a=new s(t.graphManager);a.id=n,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,t.idToDummyNode[n]=a;var o=t.getGraphManager().add(t.newGraph(),a),l=i.getChild();l.add(a);for(var c=0;ci?(n.rect.x-=(n.labelWidth-i)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-i)/2):"right"==n.labelPosHorizontal&&n.setWidth(i+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(a+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>a?(n.rect.y-=(n.labelHeight-a)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-a)/2):"bottom"==n.labelPosVertical&&n.setHeight(a+n.labelHeight))}})},w.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],r=e.id,n=e.paddingLeft,i=e.paddingTop,a=e.labelMarginLeft,s=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,n,i,a,s)}},w.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(r){var n=t.idToDummyNode[r],i=n.paddingLeft,a=n.paddingTop,s=n.labelMarginLeft,o=n.labelMarginTop;t.adjustLocations(e[r],n.rect.x,n.rect.y,i,a,s,o)})},w.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var r=t.getChild();if(null==r)return this.toBeTiled[e]=!1,!1;for(var n=r.getNodes(),i=0;i0)return this.toBeTiled[e]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[e]=!0,!0},w.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,n=0;nh&&(h=d.rect.height)}r+=h+t.verticalPadding}},w.prototype.tileCompoundMembers=function(t,e){var r=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(n){var i=e[n];if(r.tiledMemberPack[n]=r.tileNodes(t[n],i.paddingLeft+i.paddingRight),i.rect.width=r.tiledMemberPack[n].width,i.rect.height=r.tiledMemberPack[n].height,i.setCenter(r.tiledMemberPack[n].centerX,r.tiledMemberPack[n].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,s=i.rect.height;i.labelWidth&&("left"==i.labelPosHorizontal?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):"center"==i.labelPosHorizontal&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):"right"==i.labelPosHorizontal&&i.setWidth(a+i.labelWidth)),i.labelHeight&&("top"==i.labelPosVertical?(i.rect.y-=i.labelHeight,i.setHeight(s+i.labelHeight),i.labelMarginTop=i.labelHeight):"center"==i.labelPosVertical&&i.labelHeight>s?(i.rect.y-=(i.labelHeight-s)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-s)/2):"bottom"==i.labelPosVertical&&i.setHeight(s+i.labelHeight))}})},w.prototype.tileNodes=function(t,e){var r=this.tileNodesByFavoringDim(t,e,!0),n=this.tileNodesByFavoringDim(t,e,!1),i=this.getOrgRatio(r);return this.getOrgRatio(n)o&&(o=t.getWidth())});var c,h=a/i,u=s/i,d=Math.pow(r-n,2)+4*(h+n)*(u+r)*i,p=(n-r+Math.sqrt(d))/(2*(h+n));e?(c=Math.ceil(p))==p&&c++:c=Math.floor(p);var f=c*(h+n)-n;return o>f&&(f=o),f+=2*n},w.prototype.tileNodesByFavoringDim=function(t,e,r){var n=l.TILING_PADDING_VERTICAL,i=l.TILING_PADDING_HORIZONTAL,a=l.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:n,horizontalPadding:i,centerX:0,centerY:0};a&&(s.idealRowWidth=this.calcIdealRowWidth(t,r));var o=function(t){return t.rect.width*t.rect.height},c=function(t,e){return o(e)-o(t)};t.sort(function(t,e){var r=c;return s.idealRowWidth?(r=a)(t.id,e.id):r(t,e)});for(var h=0,u=0,d=0;d0&&(a+=t.horizontalPadding),t.rowWidth[r]=a,t.width0&&(s+=t.verticalPadding);var o=0;s>t.rowHeight[r]&&(o=t.rowHeight[r],t.rowHeight[r]=s,o=t.rowHeight[r]-o),t.height+=o,t.rows[r].push(e)},w.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;nr&&(e=n,r=t.rowWidth[n]);return e},w.prototype.canAddHorizontal=function(t,e,r){if(t.idealRowWidth){var n=t.rows.length-1;return t.rowWidth[n]+e+t.horizontalPadding<=t.idealRowWidth}var i=this.getShortestRowIndex(t);if(i<0)return!0;var a=t.rowWidth[i];if(a+t.horizontalPadding+e<=t.width)return!0;var s,o,l=0;return t.rowHeight[i]0&&(l=r+t.verticalPadding-t.rowHeight[i]),s=t.width-a>=e+t.horizontalPadding?(t.height+l)/(a+e+t.horizontalPadding):(t.height+l)/t.width,l=r+t.verticalPadding,(o=t.widtha&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=n[o].height);e>0&&(s+=t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[r];t.rowHeight[e]=s,t.rowHeight[r]0)for(var u=i;u<=a;u++)c[0]+=this.grid[u][s-1].length+this.grid[u][s].length-1;if(a0)for(u=s;u<=o;u++)c[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var d,p,f=m.MAX_VALUE,g=0;g{var n=r(551).FDLayoutNode,i=r(551).IMath;function a(t,e,r,i){n.call(this,t,e,r,i)}for(var s in a.prototype=Object.create(n.prototype),n)a[s]=n[s];a.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(t,e){for(var r,n=this.getChild().getNodes(),i=0;i{function n(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e0){var a=0;n.forEach(function(t){"horizontal"==e?(u.set(t,l.has(t)?c[l.get(t)]:i.get(t)),a+=u.get(t)):(u.set(t,l.has(t)?h[l.get(t)]:i.get(t)),a+=u.get(t))}),a/=n.length,t.forEach(function(t){r.has(t)||u.set(t,a)})}else{var s=0;t.forEach(function(t){s+="horizontal"==e?l.has(t)?c[l.get(t)]:i.get(t):l.has(t)?h[l.get(t)]:i.get(t)}),s/=t.length,t.forEach(function(t){u.set(t,s)})}});for(var f=function(){var n=p.shift();t.get(n).forEach(function(t){if(u.get(t.id)s&&(s=v),bo&&(o=b)}}catch(C){p=!0,f=C}finally{try{!d&&m.return&&m.return()}finally{if(p)throw f}}var x=(n+s)/2-(a+o)/2,w=!0,T=!1,k=void 0;try{for(var A,_=t[Symbol.iterator]();!(w=(A=_.next()).done);w=!0){var E=A.value;u.set(E,u.get(E)+x)}}catch(C){T=!0,k=C}finally{try{!w&&_.return&&_.return()}finally{if(T)throw k}}})}return u},y=function(t){var e=0,r=0,n=0,i=0;if(t.forEach(function(t){t.left?c[l.get(t.left)]-c[l.get(t.right)]>=0?e++:r++:h[l.get(t.top)]-h[l.get(t.bottom)]>=0?n++:i++}),e>r&&n>i)for(var a=0;ar)for(var s=0;si)for(var o=0;o1)e.fixedNodeConstraint.forEach(function(t,e){w[e]=[t.position.x,t.position.y],T[e]=[c[l.get(t.nodeId)],h[l.get(t.nodeId)]]}),k=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var r=e.alignmentConstraint.vertical,i=function(e){var i=new Set;r[e].forEach(function(t){i.add(t)});var a=new Set([].concat(n(i)).filter(function(t){return _.has(t)})),s=void 0;s=a.size>0?c[l.get(a.values().next().value)]:g(i).x,r[e].forEach(function(e){w[t]=[s,h[l.get(e)]],T[t]=[c[l.get(e)],h[l.get(e)]],t++})},a=0;a0?c[l.get(i.values().next().value)]:g(r).y,s[e].forEach(function(e){w[t]=[c[l.get(e)],a],T[t]=[c[l.get(e)],h[l.get(e)]],t++})},u=0;uR&&(R=S[D].length,L=D);if(R0){var W={x:0,y:0};e.fixedNodeConstraint.forEach(function(t,e){var r,n,i={x:c[l.get(t.nodeId)],y:h[l.get(t.nodeId)]},a=t.position,s=(n=i,{x:(r=a).x-n.x,y:r.y-n.y});W.x+=s.x,W.y+=s.y}),W.x/=e.fixedNodeConstraint.length,W.y/=e.fixedNodeConstraint.length,c.forEach(function(t,e){c[e]+=W.x}),h.forEach(function(t,e){h[e]+=W.y}),e.fixedNodeConstraint.forEach(function(t){c[l.get(t.nodeId)]=t.position.x,h[l.get(t.nodeId)]=t.position.y})}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var H=e.alignmentConstraint.vertical,V=function(t){var e=new Set;H[t].forEach(function(t){e.add(t)});var r=new Set([].concat(n(e)).filter(function(t){return _.has(t)})),i=void 0;i=r.size>0?c[l.get(r.values().next().value)]:g(e).x,e.forEach(function(t){_.has(t)||(c[l.get(t)]=i)})},X=0;X0?h[l.get(r.values().next().value)]:g(e).y,e.forEach(function(t){_.has(t)||(h[l.get(t)]=i)})},J=0;J{e.exports=t}},r={},n=function t(n){var i=r[n];if(void 0!==i)return i.exports;var a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}(45);return n})()},t.exports=n(r(6679))},6679(t){var e;e=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=28)}([function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(t,e,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(var o in s.prototype=Object.create(n.prototype),n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(5);function c(t,e,r,s){null==r&&null==s&&(s=e),n.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new a(e.x,e.y,r.width,r.height):new a}for(var h in c.prototype=Object.create(n.prototype),n)c[h]=n[h];c.prototype.getEdges=function(){return this.edges},c.prototype.getChild=function(){return this.child},c.prototype.getOwner=function(){return this.owner},c.prototype.getWidth=function(){return this.rect.width},c.prototype.setWidth=function(t){this.rect.width=t},c.prototype.getHeight=function(){return this.rect.height},c.prototype.setHeight=function(t){this.rect.height=t},c.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},c.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},c.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},c.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},c.prototype.getRect=function(){return this.rect},c.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},c.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},c.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},c.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},c.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},c.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},c.prototype.getEdgeListToNode=function(t){var e=[],r=this;return r.edges.forEach(function(n){if(n.target==t){if(n.source!=r)throw"Incorrect edge source!";e.push(n)}}),e},c.prototype.getEdgesBetween=function(t){var e=[],r=this;return r.edges.forEach(function(n){if(n.source!=r&&n.target!=r)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)}),e},c.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(r){if(r.source==e)t.add(r.target);else{if(r.target!=e)throw"Incorrect incidency!";t.add(r.source)}}),t},c.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;re?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(r+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>r?(this.rect.y-=(this.labelHeight-r)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(r+this.labelHeight))}}},c.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},c.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var r=this.rect.y;r>s.WORLD_BOUNDARY?r=s.WORLD_BOUNDARY:r<-s.WORLD_BOUNDARY&&(r=-s.WORLD_BOUNDARY);var n=new l(e,r),i=t.inverseTransformPoint(n);this.setLocation(i.x,i.y)},c.prototype.getLeft=function(){return this.rect.x},c.prototype.getRight=function(){return this.rect.x+this.rect.width},c.prototype.getTop=function(){return this.rect.y},c.prototype.getBottom=function(){return this.rect.y+this.rect.height},c.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=c},function(t,e,r){"use strict";var n=r(0);function i(){}for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,r){"use strict";function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(7),o=r(3),l=r(1),c=r(13),h=r(12),u=r(11);function d(t,e,r){n.call(this,r),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var p in d.prototype=Object.create(n.prototype),n)d[p]=n[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(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(n)>-1)throw"Node already in graph!";return n.owner=this,this.getNodes().push(n),n}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(r)>-1))throw"Source or target not in graph!";if(e.owner!=r.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=r.owner?null:(i.source=e,i.target=r,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),r!=e&&r.edges.push(i),i)},d.prototype.remove=function(t){var e=t;if(t instanceof o){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r=e.edges.slice(),n=r.length,i=0;i-1&&h>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(c,1),a.target!=a.source&&a.target.edges.splice(h,1),-1==(s=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(s,1)}},d.prototype.updateLeftTop=function(){for(var t,e,r,n=i.MAX_VALUE,a=i.MAX_VALUE,s=this.getNodes(),o=s.length,l=0;l(t=c.getTop())&&(n=t),a>(e=c.getLeft())&&(a=e)}return n==i.MAX_VALUE?null:(r=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=a-r,this.top=n-r,new h(this.left,this.top))},d.prototype.updateBounds=function(t){for(var e,r,n,a,s,o=i.MAX_VALUE,l=-i.MAX_VALUE,h=i.MAX_VALUE,u=-i.MAX_VALUE,d=this.nodes,p=d.length,f=0;f(e=g.getLeft())&&(o=e),l<(r=g.getRight())&&(l=r),h>(n=g.getTop())&&(h=n),u<(a=g.getBottom())&&(u=a)}var m=new c(o,h,l-o,u-h);o==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=m.x-s,this.right=m.x+m.width+s,this.top=m.y-s,this.bottom=m.y+m.height+s},d.calculateBounds=function(t){for(var e,r,n,a,s=i.MAX_VALUE,o=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,u=t.length,d=0;d(e=p.getLeft())&&(s=e),o<(r=p.getRight())&&(o=r),l>(n=p.getTop())&&(l=n),h<(a=p.getBottom())&&(h=a)}return new c(s,l,o-s,h-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 t=0,e=this.nodes,r=e.length,n=0;n=this.nodes.length){var l=0;i.forEach(function(e){e.owner==t&&l++}),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=d},function(t,e,r){"use strict";var n,i=r(1);function a(t){n=r(6),this.layout=t,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),r=this.add(t,e);return this.setRootGraph(r),this.rootGraph},a.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=r,r=t;var a=(n=e).getOwner(),s=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==s)return r.isInterGraph=!1,a.add(r,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,this.edges.indexOf(r)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},a.prototype.remove=function(t){if(t instanceof n){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var r,a=[],s=(a=a.concat(e.getEdges())).length,o=0;o=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var a=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(a=1);var s=a*r[0],o=r[1]/a;r[0]s)return r[0]=n,r[1]=l,r[2]=a,r[3]=b,!1;if(ia)return r[0]=o,r[1]=i,r[2]=y,r[3]=s,!1;if(na?(r[0]=h,r[1]=u,k=!0):(r[0]=c,r[1]=l,k=!0):_===C&&(n>a?(r[0]=o,r[1]=l,k=!0):(r[0]=d,r[1]=u,k=!0)),-E===C?a>n?(r[2]=v,r[3]=b,A=!0):(r[2]=y,r[3]=m,A=!0):E===C&&(a>n?(r[2]=g,r[3]=m,A=!0):(r[2]=x,r[3]=b,A=!0)),k&&A)return!1;if(n>a?i>s?(S=this.getCardinalDirection(_,C,4),R=this.getCardinalDirection(E,C,2)):(S=this.getCardinalDirection(-_,C,3),R=this.getCardinalDirection(-E,C,1)):i>s?(S=this.getCardinalDirection(-_,C,1),R=this.getCardinalDirection(-E,C,3)):(S=this.getCardinalDirection(_,C,2),R=this.getCardinalDirection(E,C,4)),!k)switch(S){case 1:D=l,L=n+-f/C,r[0]=L,r[1]=D;break;case 2:L=d,D=i+p*C,r[0]=L,r[1]=D;break;case 3:D=u,L=n+f/C,r[0]=L,r[1]=D;break;case 4:L=h,D=i+-p*C,r[0]=L,r[1]=D}if(!A)switch(R){case 1:I=m,N=a+-T/C,r[2]=N,r[3]=I;break;case 2:N=x,I=s+w*C,r[2]=N,r[3]=I;break;case 3:I=b,N=a+T/C,r[2]=N,r[3]=I;break;case 4:N=v,I=s+-w*C,r[2]=N,r[3]=I}}return!1},i.getCardinalDirection=function(t,e,r){return t>e?r:1+r%4},i.getIntersection=function(t,e,r,i){if(null==i)return this.getIntersection2(t,e,r);var a,s,o,l,c,h,u,d=t.x,p=t.y,f=e.x,g=e.y,m=r.x,y=r.y,v=i.x,b=i.y;return 0===(u=(a=g-p)*(l=m-v)-(s=b-y)*(o=d-f))?null:new n((o*(h=v*y-m*b)-l*(c=f*p-d*g))/u,(s*c-a*h)/u)},i.angleOfVector=function(t,e,r,n){var i=void 0;return t!==r?(i=Math.atan((n-e)/(r-t)),r=0){var h=(-l+Math.sqrt(l*l-4*o*c))/(2*o),u=(-l-Math.sqrt(l*l-4*o*c))/(2*o);return h>=0&&h<=1?[h]:u>=0&&u<=1?[u]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,r){"use strict";function n(){}n.sign=function(t){return t>0?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r0&&e;){for(o.push(c[0]);o.length>0&&e;){var h=o[0];o.splice(0,1),s.add(h);var u=h.getEdges();for(a=0;a-1&&c.splice(g,1)}s=new Set,l=new Map}else t=[]}return t},d.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],r=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(r),a=0;a=0&&e.splice(u,1),h.getNeighborsList().forEach(function(t){if(r.indexOf(t)<0){var e=n.get(t)-1;1==e&&l.push(t),n.set(t,e)}})}r=r.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},d.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=d},function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=1e4*Math.sin(n.seed++),n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(5);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,r=this.lworldExtX;return 0!=r&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/r),e},i.prototype.transformY=function(t){var e=0,r=this.lworldExtY;return 0!=r&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/r),e},i.prototype.inverseTransformX=function(t){var e=0,r=this.ldeviceExtX;return 0!=r&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/r),e},i.prototype.inverseTransformY=function(t){var e=0,r=this.ldeviceExtY;return 0!=r&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/r),e},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,r){"use strict";var n=r(15),i=r(4),a=r(0),s=r(8),o=r(9);function l(){n.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,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 c in l.prototype=Object.create(n.prototype),n)l[c]=n[c];l.prototype.initParameters=function(){n.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 t,e,r,n,s,o,l,c=this.getGraphManager().getAllEdges(),h=0;hi.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-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.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),r=0;r0&&void 0!==arguments[0])||arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),a=new Set,t=0;t(l=e.getEstimatedSize()*this.gravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*a):(s>(l=e.getEstimatedSize()*this.compoundGravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=o.length||c>=o[0].length))for(var h=0;ht}}]),t}();t.exports=a},function(t,e,r){"use strict";function n(){}n.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var r=[],n=0;n0;)e.push(0);return e}(this.n),i=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),a=Math.min(this.m-1,this.n),s=Math.max(0,Math.min(this.n-2,this.m)),o=0;o=0;C--)if(0!==this.s[C]){for(var S=C+1;S=0;O--){if(function(t,e){return t&&e}(O0;){var j=void 0,G=void 0;for(j=A-2;j>=-1&&-1!==j;j--)if(Math.abs(r[j])<=U+q*(Math.abs(this.s[j])+Math.abs(this.s[j+1]))){r[j]=0;break}if(j===A-2)G=4;else{var Y=void 0;for(Y=A-1;Y>=j&&Y!==j;Y--){var W=(Y!==A?Math.abs(r[Y]):0)+(Y!==j+1?Math.abs(r[Y-1]):0);if(Math.abs(this.s[Y])<=U+q*W){this.s[Y]=0;break}}Y===j?G=3:Y===A-1?G=1:(G=2,j=Y)}switch(j++,G){case 1:var H=r[A-2];r[A-2]=0;for(var V=A-2;V>=j;V--){var X=n.hypot(this.s[V],H),Z=this.s[V]/X,Q=H/X;this.s[V]=X,V!==j&&(H=-Q*r[V-1],r[V-1]=Z*r[V-1]);for(var J=0;J=this.s[j+1]);){var At=this.s[j];if(this.s[j]=this.s[j+1],this.s[j+1]=At,jMath.abs(e)?(r=e/t,r=Math.abs(t)*Math.sqrt(1+r*r)):0!=e?(r=t/e,r=Math.abs(e)*Math.sqrt(1+r*r)):r=0,r},t.exports=n},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r2&&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(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=r,this.match_score=n,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;r--){var n=this.listeners[r];n.event===t&&n.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r=e?t:""+Array(e+1-n.length).join(r)+t},v={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),i=r%60;return(e<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")},m:function t(e,r){if(e.date()1)return t(s[0])}else{var o=e.name;x[o]=e,i=o}return!n&&i&&(b=i),i||!n&&b},A=function(t,e){if(T(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new E(r)},_=v;_.l=k,_.i=T,_.w=function(t,e){return A(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var E=function(){function m(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}var y=m.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(_.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(f);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(e)}(t),this.init()},y.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()},y.$utils=function(){return _},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(t,e){var r=A(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return A(t)68?1900:2e3)},l=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),r=60*e[1]+(+e[2]||0);return 0===r?0:"+"===e[0]?-r:r}(t)}],h=function(t){var e=s[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var r,n=s.meridiem;if(n){for(var i=1;i<=24;i+=1)if(t.indexOf(n(i,0,e))>-1){r=i>12;break}}else r=t===(e?"pm":"PM");return r},d={A:[a,function(t){this.afternoon=u(t,!1)}],a:[a,function(t){this.afternoon=u(t,!0)}],Q:[r,function(t){this.month=3*(t-1)+1}],S:[r,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[n,l("day")],Do:[a,function(t){var e=s.ordinal,r=t.match(/\d+/);if(this.day=r[0],e)for(var n=1;n<=31;n+=1)e(n).replace(/\[|\]/g,"")===t&&(this.day=n)}],w:[i,l("week")],ww:[n,l("week")],M:[i,l("month")],MM:[n,l("month")],MMM:[a,function(t){var e=h("months"),r=(h("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1;if(r<1)throw new Error;this.month=r%12||r}],MMMM:[a,function(t){var e=h("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(t){this.year=o(t)}],YYYY:[/\d{4}/,l("year")],Z:c,ZZ:c};function p(r){var n,i;n=r,i=s&&s.formats;for(var a=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,r,n){var a=n&&n.toUpperCase();return r||i[n]||t[n]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,r){return e||r.slice(1)})})).match(e),o=a.length,l=0;l-1)return new Date(("X"===e?1e3:1)*t);var i=p(e)(t),a=i.year,s=i.month,o=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,f=i.week,g=new Date,m=o||(a||s?1:g.getDate()),y=a||g.getFullYear(),v=0;a&&!s||(v=s>0?s-1:g.getMonth());var b,x=l||0,w=c||0,T=h||0,k=u||0;return d?new Date(Date.UTC(y,v,m,x,w,T,k+60*d.offset*1e3)):r?new Date(Date.UTC(y,v,m,x,w,T,k)):(b=new Date(y,v,m,x,w,T,k),f&&(b=n(b).week(f).toDate()),b)}catch(t){return new Date("")}}(e,o,n,r),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 d=o.length,f=1;f<=d;f+=1){a[1]=o[f-1];var g=r.apply(this,a);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}f===d&&(this.$d=new Date(""))}else i.call(this,t)}}}()},3522(t){t.exports=function(){"use strict";var t,e,r=1e3,n=6e4,i=36e5,a=864e5,s=/\[([^\]]+)]|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,o=31536e6,l=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:o,months:l,days:a,hours:i,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},u=function(t){return t instanceof v},d=function(t,e,r){return new v(t,r,e.$l)},p=function(t){return e.p(t)+"s"},f=function(t){return t<0},g=function(t){return f(t)?Math.ceil(t):Math.floor(t)},m=function(t){return Math.abs(t)},y=function(t,e){return t?f(t)?{negative:!0,format:""+m(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},v=function(){function f(t,e,r){var n=this;if(this.$d={},this.$l=r,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return d(t*h[p(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(e){n.$d[p(e)]=t[e]}),this.calMilliseconds(),this;if("string"==typeof t){var i=t.match(c);if(i){var a=i.slice(2).map(function(t){return null!=t?Number(t):0});return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var m=f.prototype;return m.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(e,r){return e+(t.$d[r]||0)*h[r]},0)},m.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=g(t/o),t%=o,this.$d.months=g(t/l),t%=l,this.$d.days=g(t/a),t%=a,this.$d.hours=g(t/i),t%=i,this.$d.minutes=g(t/n),t%=n,this.$d.seconds=g(t/r),t%=r,this.$d.milliseconds=t},m.toISOString=function(){var t=y(this.$d.years,"Y"),e=y(this.$d.months,"M"),r=+this.$d.days||0;this.$d.weeks&&(r+=7*this.$d.weeks);var n=y(r,"D"),i=y(this.$d.hours,"H"),a=y(this.$d.minutes,"M"),s=this.$d.seconds||0;this.$d.milliseconds&&(s+=this.$d.milliseconds/1e3,s=Math.round(1e3*s)/1e3);var o=y(s,"S"),l=t.negative||e.negative||n.negative||i.negative||a.negative||o.negative,c=i.format||a.format||o.format?"T":"",h=(l?"-":"")+"P"+t.format+e.format+n.format+c+i.format+a.format+o.format;return"P"===h||"-P"===h?"P0D":h},m.toJSON=function(){return this.toISOString()},m.format=function(t){var r=t||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return r.replace(s,function(t,e){return e||String(n[t])})},m.as=function(t){return this.$ms/h[p(t)]},m.get=function(t){var e=this.$ms,r=p(t);return"milliseconds"===r?e%=1e3:e="weeks"===r?g(e/h[r]):this.$d[r],e||0},m.add=function(t,e,r){var n;return n=e?t*h[p(e)]:u(t)?t.$ms:d(t,this).$ms,d(this.$ms+n*(r?-1:1),this)},m.subtract=function(t,e){return this.add(t,e,!0)},m.locale=function(t){var e=this.clone();return e.$l=t,e},m.clone=function(){return d(this.$ms,this)},m.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},m.valueOf=function(){return this.asMilliseconds()},m.milliseconds=function(){return this.get("milliseconds")},m.asMilliseconds=function(){return this.as("milliseconds")},m.seconds=function(){return this.get("seconds")},m.asSeconds=function(){return this.as("seconds")},m.minutes=function(){return this.get("minutes")},m.asMinutes=function(){return this.as("minutes")},m.hours=function(){return this.get("hours")},m.asHours=function(){return this.as("hours")},m.days=function(){return this.get("days")},m.asDays=function(){return this.as("days")},m.weeks=function(){return this.get("weeks")},m.asWeeks=function(){return this.as("weeks")},m.months=function(){return this.get("months")},m.asMonths=function(){return this.as("months")},m.years=function(){return this.get("years")},m.asYears=function(){return this.as("years")},f}(),b=function(t,e,r){return t.add(e.years()*r,"y").add(e.months()*r,"M").add(e.days()*r,"d").add(e.hours()*r,"h").add(e.minutes()*r,"m").add(e.seconds()*r,"s").add(e.milliseconds()*r,"ms")};return function(r,n,i){t=i,e=i().$utils(),i.duration=function(t,e){var r=i.locale();return d(t,{$l:r},e)},i.isDuration=u;var a=n.prototype.add,s=n.prototype.subtract;n.prototype.add=function(t,e){return u(t)?b(this,t,1):a.bind(this)(t,e)},n.prototype.subtract=function(t,e){return u(t)?b(this,t,-1):s.bind(this)(t,e)}}}()},8313(t){t.exports=function(){"use strict";var t="day";return function(e,r,n){var i=function(e){return e.add(4-e.isoWeekday(),t)},a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var r,a,s,o=i(this),l=(r=this.isoWeekYear(),s=4-(a=(this.$u?n.utc:n)().year(r).startOf("year")).isoWeekday(),a.isoWeekday()>4&&(s+=7),a.add(s,t));return o.diff(l,"week")+1},a.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var s=a.startOf;a.startOf=function(t,e){var r=this.$utils(),n=!!r.u(e)||e;return"isoweek"===r.p(t)?n?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(t,e)}}}()},3143(t){var e;e=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=26)}([function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(t,e,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(var o in s.prototype=Object.create(n.prototype),n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(4);function c(t,e,r,s){null==r&&null==s&&(s=e),n.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new a(e.x,e.y,r.width,r.height):new a}for(var h in c.prototype=Object.create(n.prototype),n)c[h]=n[h];c.prototype.getEdges=function(){return this.edges},c.prototype.getChild=function(){return this.child},c.prototype.getOwner=function(){return this.owner},c.prototype.getWidth=function(){return this.rect.width},c.prototype.setWidth=function(t){this.rect.width=t},c.prototype.getHeight=function(){return this.rect.height},c.prototype.setHeight=function(t){this.rect.height=t},c.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},c.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},c.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},c.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},c.prototype.getRect=function(){return this.rect},c.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},c.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},c.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},c.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},c.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},c.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},c.prototype.getEdgeListToNode=function(t){var e=[],r=this;return r.edges.forEach(function(n){if(n.target==t){if(n.source!=r)throw"Incorrect edge source!";e.push(n)}}),e},c.prototype.getEdgesBetween=function(t){var e=[],r=this;return r.edges.forEach(function(n){if(n.source!=r&&n.target!=r)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)}),e},c.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(r){if(r.source==e)t.add(r.target);else{if(r.target!=e)throw"Incorrect incidency!";t.add(r.source)}}),t},c.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;re&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>r&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-r)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-r),this.setHeight(this.labelHeight))}}},c.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},c.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var r=this.rect.y;r>s.WORLD_BOUNDARY?r=s.WORLD_BOUNDARY:r<-s.WORLD_BOUNDARY&&(r=-s.WORLD_BOUNDARY);var n=new l(e,r),i=t.inverseTransformPoint(n);this.setLocation(i.x,i.y)},c.prototype.getLeft=function(){return this.rect.x},c.prototype.getRight=function(){return this.rect.x+this.rect.width},c.prototype.getTop=function(){return this.rect.y},c.prototype.getBottom=function(){return this.rect.y+this.rect.height},c.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=c},function(t,e,r){"use strict";function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(6),o=r(3),l=r(1),c=r(13),h=r(12),u=r(11);function d(t,e,r){n.call(this,r),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var p in d.prototype=Object.create(n.prototype),n)d[p]=n[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(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(n)>-1)throw"Node already in graph!";return n.owner=this,this.getNodes().push(n),n}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(r)>-1))throw"Source or target not in graph!";if(e.owner!=r.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=r.owner?null:(i.source=e,i.target=r,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),r!=e&&r.edges.push(i),i)},d.prototype.remove=function(t){var e=t;if(t instanceof o){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r=e.edges.slice(),n=r.length,i=0;i-1&&h>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(c,1),a.target!=a.source&&a.target.edges.splice(h,1),-1==(s=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(s,1)}},d.prototype.updateLeftTop=function(){for(var t,e,r,n=i.MAX_VALUE,a=i.MAX_VALUE,s=this.getNodes(),o=s.length,l=0;l(t=c.getTop())&&(n=t),a>(e=c.getLeft())&&(a=e)}return n==i.MAX_VALUE?null:(r=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=a-r,this.top=n-r,new h(this.left,this.top))},d.prototype.updateBounds=function(t){for(var e,r,n,a,s,o=i.MAX_VALUE,l=-i.MAX_VALUE,h=i.MAX_VALUE,u=-i.MAX_VALUE,d=this.nodes,p=d.length,f=0;f(e=g.getLeft())&&(o=e),l<(r=g.getRight())&&(l=r),h>(n=g.getTop())&&(h=n),u<(a=g.getBottom())&&(u=a)}var m=new c(o,h,l-o,u-h);o==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=m.x-s,this.right=m.x+m.width+s,this.top=m.y-s,this.bottom=m.y+m.height+s},d.calculateBounds=function(t){for(var e,r,n,a,s=i.MAX_VALUE,o=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,u=t.length,d=0;d(e=p.getLeft())&&(s=e),o<(r=p.getRight())&&(o=r),l>(n=p.getTop())&&(l=n),h<(a=p.getBottom())&&(h=a)}return new c(s,l,o-s,h-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 t=0,e=this.nodes,r=e.length,n=0;n=this.nodes.length){var l=0;i.forEach(function(e){e.owner==t&&l++}),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=d},function(t,e,r){"use strict";var n,i=r(1);function a(t){n=r(5),this.layout=t,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),r=this.add(t,e);return this.setRootGraph(r),this.rootGraph},a.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=r,r=t;var a=(n=e).getOwner(),s=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==s)return r.isInterGraph=!1,a.add(r,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,this.edges.indexOf(r)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},a.prototype.remove=function(t){if(t instanceof n){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var r,a=[],s=(a=a.concat(e.getEdges())).length,o=0;o=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var a=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(a=1);var s=a*r[0],o=r[1]/a;r[0]s)return r[0]=n,r[1]=l,r[2]=a,r[3]=b,!1;if(ia)return r[0]=o,r[1]=i,r[2]=y,r[3]=s,!1;if(na?(r[0]=h,r[1]=u,k=!0):(r[0]=c,r[1]=l,k=!0):_===C&&(n>a?(r[0]=o,r[1]=l,k=!0):(r[0]=d,r[1]=u,k=!0)),-E===C?a>n?(r[2]=v,r[3]=b,A=!0):(r[2]=y,r[3]=m,A=!0):E===C&&(a>n?(r[2]=g,r[3]=m,A=!0):(r[2]=x,r[3]=b,A=!0)),k&&A)return!1;if(n>a?i>s?(S=this.getCardinalDirection(_,C,4),R=this.getCardinalDirection(E,C,2)):(S=this.getCardinalDirection(-_,C,3),R=this.getCardinalDirection(-E,C,1)):i>s?(S=this.getCardinalDirection(-_,C,1),R=this.getCardinalDirection(-E,C,3)):(S=this.getCardinalDirection(_,C,2),R=this.getCardinalDirection(E,C,4)),!k)switch(S){case 1:D=l,L=n+-f/C,r[0]=L,r[1]=D;break;case 2:L=d,D=i+p*C,r[0]=L,r[1]=D;break;case 3:D=u,L=n+f/C,r[0]=L,r[1]=D;break;case 4:L=h,D=i+-p*C,r[0]=L,r[1]=D}if(!A)switch(R){case 1:I=m,N=a+-T/C,r[2]=N,r[3]=I;break;case 2:N=x,I=s+w*C,r[2]=N,r[3]=I;break;case 3:I=b,N=a+T/C,r[2]=N,r[3]=I;break;case 4:N=v,I=s+-w*C,r[2]=N,r[3]=I}}return!1},i.getCardinalDirection=function(t,e,r){return t>e?r:1+r%4},i.getIntersection=function(t,e,r,i){if(null==i)return this.getIntersection2(t,e,r);var a,s,o,l,c,h,u,d=t.x,p=t.y,f=e.x,g=e.y,m=r.x,y=r.y,v=i.x,b=i.y;return 0===(u=(a=g-p)*(l=m-v)-(s=b-y)*(o=d-f))?null:new n((o*(h=v*y-m*b)-l*(c=f*p-d*g))/u,(s*c-a*h)/u)},i.angleOfVector=function(t,e,r,n){var i=void 0;return t!==r?(i=Math.atan((n-e)/(r-t)),r0?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r0&&e;){for(o.push(c[0]);o.length>0&&e;){var h=o[0];o.splice(0,1),s.add(h);var u=h.getEdges();for(a=0;a-1&&c.splice(g,1)}s=new Set,l=new Map}else t=[]}return t},d.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],r=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(r),a=0;a=0&&e.splice(u,1),h.getNeighborsList().forEach(function(t){if(r.indexOf(t)<0){var e=n.get(t)-1;1==e&&l.push(t),n.set(t,e)}})}r=r.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},d.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=d},function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=1e4*Math.sin(n.seed++),n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(4);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,r=this.lworldExtX;return 0!=r&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/r),e},i.prototype.transformY=function(t){var e=0,r=this.lworldExtY;return 0!=r&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/r),e},i.prototype.inverseTransformX=function(t){var e=0,r=this.ldeviceExtX;return 0!=r&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/r),e},i.prototype.inverseTransformY=function(t){var e=0,r=this.ldeviceExtY;return 0!=r&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/r),e},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,r){"use strict";var n=r(15),i=r(7),a=r(0),s=r(8),o=r(9);function l(){n.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 c in l.prototype=Object.create(n.prototype),n)l[c]=n[c];l.prototype.initParameters=function(){n.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 t,e,r,n,s,o,l=this.getGraphManager().getAllEdges(),c=0;ci.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-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 t,e=this.getAllEdges(),r=0;r0&&void 0!==arguments[0])||arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),a=new Set,t=0;t(l=e.getEstimatedSize()*this.gravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*a):(s>(l=e.getEstimatedSize()*this.compoundGravityRangeFactor)||o>l)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=o.length||c>=o[0].length))for(var h=0;ht}}]),t}();t.exports=a},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r2&&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(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=r,this.match_score=n,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;r--){var n=this.listeners[r];n.event===t&&n.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r2&&n.push(t)}const a=[];e=Math.max(e,.1);const s=[];for(const i of n)for(let t=0;tt.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!s.length)return a;let o=[],l=s[0].ymin,c=0;for(;o.length||s.length;){if(s.length){let t=-1;for(let e=0;el);e++)t=e;s.splice(0,t+1).forEach(t=>{o.push({s:l,edge:t})})}if(o=o.filter(t=>!(t.edge.ymax<=l)),o.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||c%e==0)&&o.length>1)for(let t=0;t=o.length)break;const r=o[t].edge,n=o[e].edge;a.push([[Math.round(r.x),l],[Math.round(n.x),l]])}l+=r,o.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),c++}return a}(l,o,a);if(s){for(const t of l)n(t,c,-s);!function(t,e,r){const i=[];t.forEach(t=>i.push(...t)),n(i,e,r)}(h,c,-s)}return h}function s(t,e){var r;const n=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let s=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(s=i),a(t,i,n,s||1)}r.d(e,{A:()=>it});class o{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=s(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const n of t)r.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class c extends o{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const n=s(t,Object.assign({},e,{hachureGap:r})),i=Math.PI/180*e.hachureAngle,a=[],o=.5*r*Math.cos(i),c=.5*r*Math.sin(i);for(const[s,h]of n)l([s,h])&&a.push([[s[0]-o,s[1]+c],[...h]],[[s[0]+o,s[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class h extends o{fillPolygons(t,e){const r=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),i=this._fillPolygons(t,n);return r.ops=r.ops.concat(i.ops),r}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const r=s(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let i=e.fillWeight;i<0&&(i=e.strokeWidth/2);const a=n/4;for(const s of t){const t=l(s),o=t/n,c=Math.ceil(o)-1,h=t-c*n,u=(s[0][0]+s[1][0])/2-n/4,d=Math.min(s[0][1],s[1][1]);for(let s=0;s{const a=l(t),s=Math.floor(a/(r+n)),o=(a+n-s*(r+n))/2;let c=t[0],h=t[1];c[0]>h[0]&&(c=t[1],h=t[0]);const u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let l=0;l{const i=l(t),a=Math.round(i/(2*e));let s=t[0],o=t[1];s[0]>o[0]&&(s=t[1],o=t[0]);const c=Math.atan((o[1]-s[1])/(o[0]-s[0]));for(let l=0;ln%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{const t=o.map((t,n)=>n%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{const t=o.map((t,n)=>n%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function x(t){const e=[];let r="",n=0,i=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[n,i]=h,[a,s]=h;break;case"C":e.push({key:"C",data:[...h]}),n=h[4],i=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[n,i]=h;break;case"H":n=h[0],e.push({key:"L",data:[n,i]});break;case"V":i=h[0],e.push({key:"L",data:[n,i]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=n+(n-o),a=i+(i-l)):(t=n,a=i),e.push({key:"C",data:[t,a,...h]}),o=h[0],l=h[1],n=h[2],i=h[3];break}case"T":{const[t,a]=h;let s=0,c=0;"Q"===r||"T"===r?(s=n+(n-o),c=i+(i-l)):(s=n,c=i);const u=n+2*(s-n)/3,d=i+2*(c-i)/3,p=t+2*(s-t)/3,f=a+2*(c-a)/3;e.push({key:"C",data:[u,d,p,f,t,a]}),o=s,l=c,n=t,i=a;break}case"Q":{const[t,r,a,s]=h,c=n+2*(t-n)/3,u=i+2*(r-i)/3,d=a+2*(t-a)/3,p=s+2*(r-s)/3;e.push({key:"C",data:[c,u,d,p,a,s]}),o=t,l=r,n=a,i=s;break}case"A":{const t=Math.abs(h[0]),r=Math.abs(h[1]),a=h[2],s=h[3],o=h[4],l=h[5],c=h[6];0===t||0===r?(e.push({key:"C",data:[n,i,l,c,l,c]}),n=l,i=c):n===l&&i===c||(T(n,i,l,c,t,r,a,s,o).forEach(function(t){e.push({key:"C",data:t})}),n=l,i=c);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=c}return e}function w(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function T(t,e,r,n,i,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let d=[],p=0,f=0,g=0,m=0;if(c)[p,f,g,m]=c;else{[t,e]=w(t,e,-h),[r,n]=w(r,n,-h);const s=(t-r)/2,c=(e-n)/2;let u=s*s/(i*i)+c*c/(a*a);u>1&&(u=Math.sqrt(u),i*=u,a*=u);const d=i*i,y=a*a,v=d*y-d*c*c-y*s*s,b=d*c*c+y*s*s,x=(o===l?-1:1)*Math.sqrt(Math.abs(v/b));g=x*i*c/a+(t+r)/2,m=x*-a*s/i+(e+n)/2,p=Math.asin(parseFloat(((e-m)/a).toFixed(9))),f=Math.asin(parseFloat(((n-m)/a).toFixed(9))),tf&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let y=f-p;if(Math.abs(y)>120*Math.PI/180){const t=f,e=r,o=n;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=T(r=g+i*Math.cos(f),n=m+a*Math.sin(f),e,o,i,a,s,0,l,[f,t,g,m])}y=f-p;const v=Math.cos(p),b=Math.sin(p),x=Math.cos(f),k=Math.sin(f),A=Math.tan(y/4),_=4/3*i*A,E=4/3*a*A,C=[t,e],S=[t+_*b,e-E*v],R=[r+_*k,n-E*x],L=[r,n];if(S[0]=2*C[0]-S[0],S[1]=2*C[1]-S[1],c)return[S,R,L].concat(d);{d=[S,R,L].concat(d);const t=[];for(let e=0;e2){const i=[];for(let e=0;e2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(f-p)/2),y=q(m,c,h,u,d,p,f,1,l);if(!l.disableMultiStroke){const t=q(m,c,h,u,d,p,f,1.5,l);y.push(...t)}return s&&(o?y.push(...$(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l),...$(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:y}}function L(t,e){const r=x(b(v(t))),n=[];let i=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...$(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[t,r,i,s,l,c]=o;n.push(...U(t,r,i,s,l,c,a,e)),a=[l,c];break}case"Z":n.push(...$(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function D(t,e){const r=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,i=n.length;if(i>2){r.push({op:"move",data:[n[0][0]+P(t,e),n[0][1]+P(t,e)]});for(let a=1;a500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,d=.2+.2*M(i);let p=i.bowing*i.maxRandomnessOffset*(n-e)/200,f=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=P(p,i,c),f=P(f,i,c);const g=[],m=()=>P(u,i,c),y=()=>P(h,i,c),v=i.preserveVertices;return a&&(s?g.push({op:"move",data:[t+(v?0:m()),e+(v?0:m())]}):g.push({op:"move",data:[t+(v?0:P(h,i,c)),e+(v?0:P(h,i,c))]})),s?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+m(),f+e+(n-e)*d+m(),p+t+2*(r-t)*d+m(),f+e+2*(n-e)*d+m(),r+(v?0:m()),n+(v?0:m())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),f+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),f+e+2*(n-e)*d+y(),r+(v?0:y()),n+(v?0:y())]}),g}function F(t,e,r){if(!t.length)return[];const n=[];n.push([t[0][0]+P(e,r),t[0][1]+P(e,r)]),n.push([t[0][0]+P(e,r),t[0][1]+P(e,r)]);for(let i=1;i3){const a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&i.push(r)):i.push(r),i.push(t[e+3])}else{const n=.5,a=t[e+0],s=t[e+1],o=t[e+2],l=t[e+3],c=H(a,s,n),h=H(s,o,n),u=H(o,l,n),d=H(c,h,n),p=H(h,u,n),f=H(d,p,n);V([a,c,d,f],0,r,i),V([f,p,u,l],0,r,i)}var a,s;return i}function X(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,n,i){const a=i||[],s=t[e],o=t[r-1];let l=0,c=1;for(let h=e+1;hl&&(l=e,c=h)}return Math.sqrt(l)>n?(Z(t,e,c+1,n,a),Z(t,c,r,n,a)):(a.length||a.push(s),a.push(o)),a}function Q(t,e=.15,r){const n=[],i=(t.length-1)/3;for(let a=0;a0?Z(n,0,n.length,r):n}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,n,i){const a=this._o(i);return this._d("line",[A(t,e,r,n,a)],a)}rectangle(t,e,r,n,i){const a=this._o(i),s=[],o=function(t,e,r,n,i){return function(t,e){return _(t,!0,e)}([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],i)}(t,e,r,n,a);if(a.fill){const i=[[t,e],[t+r,e],[t+r,e+n],[t,e+n]];"solid"===a.fillStyle?s.push(D([i],a)):s.push(N([i],a))}return a.stroke!==J&&s.push(o),this._d("rectangle",s,a)}ellipse(t,e,r,n,i){const a=this._o(i),s=[],o=C(r,n,a),l=S(t,e,a,o);if(a.fill)if("solid"===a.fillStyle){const r=S(t,e,a,o).opset;r.type="fillPath",s.push(r)}else s.push(N([l.estimatedPoints],a));return a.stroke!==J&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,e,r,n){const i=this.ellipse(t,e,r,r,n);return i.shape="circle",i}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[_(t,!1,r)],r)}arc(t,e,r,n,i,a,s=!1,o){const l=this._o(o),c=[],h=R(t,e,r,n,i,a,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){const s=Object.assign({},l);s.disableMultiStroke=!0;const o=R(t,e,r,n,i,a,!0,!1,s);o.type="fillPath",c.push(o)}else c.push(function(t,e,r,n,i,a,s){const o=t,l=e;let c=Math.abs(r/2),h=Math.abs(n/2);c+=P(.01*c,s),h+=P(.01*h,s);let u=i,d=a;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/s.curveStepCount,f=[];for(let g=u;g<=d;g+=p)f.push([o+c*Math.cos(g),l+h*Math.sin(g)]);return f.push([o+c*Math.cos(d),l+h*Math.sin(d)]),f.push([o,l]),N([f],s)}(t,e,r,n,i,a,l));return l.stroke!==J&&c.push(h),this._d("arc",c,l)}curve(t,e){const r=this._o(e),n=[],i=E(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=E(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],i=t;if(i.length){const t="number"==typeof i[0][0]?[i]:i;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Q(G([n[0],n[0],n[1],n[2]]),10,(1+r.roughness)/2)):e.push(...Q(G(n),10,(1+r.roughness)/2))}e.length&&n.push(N([e],r))}return r.stroke!==J&&n.push(i),this._d("curve",n,r)}polygon(t,e){const r=this._o(e),n=[],i=_(t,!0,r);return r.fill&&("solid"===r.fillStyle?n.push(D([t],r)):n.push(N([t],r))),r.stroke!==J&&n.push(i),this._d("polygon",n,r)}path(t,e){const r=this._o(e),n=[];if(!t)return this._d("path",n,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=r.fill&&"transparent"!==r.fill&&r.fill!==J,a=r.stroke!==J,s=!!(r.simplification&&r.simplification<1),o=function(t,e,r){const n=x(b(v(t))),i=[];let a=[],s=[0,0],o=[];const l=()=>{o.length>=4&&a.push(...Q(o,1)),o=[]},c=()=>{l(),a.length&&(i.push(a),a=[])};for(const{key:u,data:d}of n)switch(u){case"M":c(),s=[d[0],d[1]],a.push(s);break;case"L":l(),a.push([d[0],d[1]]);break;case"C":if(!o.length){const t=a.length?a[a.length-1]:s;o.push([t[0],t[1]])}o.push([d[0],d[1]]),o.push([d[2],d[3]]),o.push([d[4],d[5]]);break;case"Z":l(),a.push([s[0],s[1]])}if(c(),!r)return i;const h=[];for(const u of i){const t=X(u,r);t.length&&h.push(t)}return h}(t,0,s?4-4*(r.simplification||1):(1+r.roughness)/2),l=L(t,r);if(i)if("solid"===r.fillStyle)if(1===o.length){const e=L(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else n.push(D(o,r));else n.push(N(o,r));return a&&(s?o.forEach(t=>{n.push(_(t,!1,r))}):n.push(l)),this._d("path",n,r)}opsToPath(t,e){let r="";for(const n of t.ops){const t="number"==typeof e&&e>=0?n.data.map(t=>+t.toFixed(e)):n.data;switch(n.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,n=[];for(const i of e){let t=null;switch(i.type){case"path":t={d:this.opsToPath(i),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":t={d:this.opsToPath(i),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":t=this.fillSketch(i,r)}t&&n.push(t)}return n}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),n=this.ctx,i=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":n.save(),n.strokeStyle="none"===r.stroke?"transparent":r.stroke,n.lineWidth=r.strokeWidth,r.strokeLineDash&&n.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(n.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(n,a,i),n.restore();break;case"fillPath":{n.save(),n.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,a,i,e),n.restore();break}case"fillSketch":this.fillSketch(n,a,r)}}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=n,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,n="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,n,i){const a=this.gen.line(t,e,r,n,i);return this.draw(a),a}rectangle(t,e,r,n,i){const a=this.gen.rectangle(t,e,r,n,i);return this.draw(a),a}ellipse(t,e,r,n,i){const a=this.gen.ellipse(t,e,r,n,i);return this.draw(a),a}circle(t,e,r,n){const i=this.gen.circle(t,e,r,n);return this.draw(i),i}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,n,i,a,s=!1,o){const l=this.gen.arc(t,e,r,n,i,a,s,o);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class nt{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,i=n.createElementNS(rt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":e=n.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=n.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,s,r)}e&&i.appendChild(e)}return i}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const i=t.createElementNS(rt,"path");return i.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),i.setAttribute("stroke",r.fill||""),i.setAttribute("stroke-width",n+""),i.setAttribute("fill","none"),r.fillLineDash&&i.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,n,i){const a=this.gen.line(t,e,r,n,i);return this.draw(a)}rectangle(t,e,r,n,i){const a=this.gen.rectangle(t,e,r,n,i);return this.draw(a)}ellipse(t,e,r,n,i){const a=this.gen.ellipse(t,e,r,n,i);return this.draw(a)}circle(t,e,r,n){const i=this.gen.circle(t,e,r,n);return this.draw(i)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,n,i,a,s=!1,o){const l=this.gen.arc(t,e,r,n,i,a,s,o);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var it={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new nt(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},513(t,e,r){"use strict";function n(t){for(var e=[],r=1;rn})},6087(t,e,r){"use strict";t.exports=r(6439)},6439(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0;r(4615).default.install();const a=r(3281);i(r(3281),e);class s extends a.AbstractMessageReader{constructor(t){super(),this._onData=new a.Emitter,this._messageListener=t=>{this._onData.fire(t.data)},t.addEventListener("error",t=>this.fireError(t)),t.onmessage=this._messageListener}listen(t){return this._onData.event(t)}}e.BrowserMessageReader=s;class o extends a.AbstractMessageWriter{constructor(t){super(),this.port=t,this.errorCount=0,t.addEventListener("error",t=>this.fireError(t))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(e){return this.handleError(e,t),Promise.reject(e)}}handleError(t,e){this.errorCount++,this.fireError(t,e,this.errorCount)}end(){}}e.BrowserMessageWriter=o,e.createMessageConnection=function(t,e,r,n){return void 0===r&&(r=a.NullLogger),a.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,a.createMessageConnection)(t,e,r,n)}},4615(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(3281);class i extends n.AbstractMessageBuffer{constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return i.emptyBuffer}fromString(t,e){return(new TextEncoder).encode(t)}toString(t,e){return"ascii"===e?this.asciiDecoder.decode(t):new TextDecoder(e).decode(t)}asNative(t,e){return void 0===e?t:t.slice(0,e)}allocNative(t){return new Uint8Array(t)}}i.emptyBuffer=new Uint8Array(0);class a{constructor(t){this.socket=t,this._onData=new n.Emitter,this._messageListener=t=>{t.data.arrayBuffer().then(t=>{this._onData.fire(new Uint8Array(t))},()=>{(0,n.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),n.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),n.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),n.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}}class s{constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),n.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),n.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),n.Disposable.create(()=>this.socket.removeEventListener("end",t))}write(t,e){if("string"==typeof t){if(void 0!==e&&"utf-8"!==e)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e}`);this.socket.send(t)}else this.socket.send(t);return Promise.resolve()}end(){this.socket.close()}}const o=new TextEncoder,l=Object.freeze({messageBuffer:Object.freeze({create:t=>new i(t)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(t,e)=>{if("utf-8"!==e.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e.charset}`);return Promise.resolve(o.encode(JSON.stringify(t,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(t,e)=>{if(!(t instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(e.charset).decode(t)))}})}),stream:Object.freeze({asReadableStream:t=>new a(t),asWritableStream:t=>new s(t)}),console,timer:Object.freeze({setTimeout(t,e,...r){const n=setTimeout(t,e,...r);return{dispose:()=>clearTimeout(n)}},setImmediate(t,...e){const r=setTimeout(t,0,...e);return{dispose:()=>clearTimeout(r)}},setInterval(t,e,...r){const n=setInterval(t,e,...r);return{dispose:()=>clearInterval(n)}}})});function c(){return l}!function(t){t.install=function(){n.RAL.install(l)}}(c||(c={})),e.default=c},3281(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;const n=r(6177);Object.defineProperty(e,"Message",{enumerable:!0,get:function(){return n.Message}}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:function(){return n.RequestType}}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:function(){return n.RequestType0}}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:function(){return n.RequestType1}}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:function(){return n.RequestType2}}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:function(){return n.RequestType3}}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:function(){return n.RequestType4}}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:function(){return n.RequestType5}}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:function(){return n.RequestType6}}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:function(){return n.RequestType7}}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:function(){return n.RequestType8}}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:function(){return n.RequestType9}}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:function(){return n.ResponseError}}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:function(){return n.ErrorCodes}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return n.NotificationType}}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:function(){return n.NotificationType0}}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:function(){return n.NotificationType1}}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:function(){return n.NotificationType2}}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:function(){return n.NotificationType3}}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:function(){return n.NotificationType4}}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:function(){return n.NotificationType5}}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:function(){return n.NotificationType6}}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:function(){return n.NotificationType7}}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:function(){return n.NotificationType8}}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:function(){return n.NotificationType9}}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:function(){return n.ParameterStructures}});const i=r(3352);Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(e,"Touch",{enumerable:!0,get:function(){return i.Touch}});const a=r(4019);Object.defineProperty(e,"Disposable",{enumerable:!0,get:function(){return a.Disposable}});const s=r(2676);Object.defineProperty(e,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const o=r(9850);Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:function(){return o.CancellationTokenSource}}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:function(){return o.CancellationToken}});const l=r(4996);Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return l.SharedArraySenderStrategy}}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return l.SharedArrayReceiverStrategy}});const c=r(9085);Object.defineProperty(e,"MessageReader",{enumerable:!0,get:function(){return c.MessageReader}}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:function(){return c.AbstractMessageReader}}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return c.ReadableStreamMessageReader}});const h=r(3193);Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:function(){return h.MessageWriter}}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:function(){return h.AbstractMessageWriter}}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return h.WriteableStreamMessageWriter}});const u=r(9244);Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:function(){return u.AbstractMessageBuffer}});const d=r(577);Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:function(){return d.ConnectionStrategy}}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:function(){return d.ConnectionOptions}}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:function(){return d.NullLogger}}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:function(){return d.createMessageConnection}}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:function(){return d.ProgressToken}}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:function(){return d.ProgressType}}),Object.defineProperty(e,"Trace",{enumerable:!0,get:function(){return d.Trace}}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:function(){return d.TraceValues}}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:function(){return d.TraceFormat}}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:function(){return d.SetTraceNotification}}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:function(){return d.LogTraceNotification}}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:function(){return d.ConnectionErrors}}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:function(){return d.ConnectionError}}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return d.CancellationReceiverStrategy}}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:function(){return d.CancellationSenderStrategy}}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:function(){return d.CancellationStrategy}}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:function(){return d.MessageStrategy}});const p=r(9590);e.RAL=p.default},9850(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const n=r(9590),i=r(8585),a=r(2676);var s;!function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),t.is=function(e){const r=e;return r&&(r===t.None||r===t.Cancelled||i.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}}(s||(e.CancellationToken=s={}));const o=Object.freeze(function(t,e){const r=(0,n.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}});class l{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}e.CancellationTokenSource=class{get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=s.None}}},577(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;const n=r(9590),i=r(8585),a=r(6177),s=r(3352),o=r(2676),l=r(9850);var c,h,u,d,p,f,g,m,y,v,b,x,w,T,k,A,_,E,C;!function(t){t.type=new a.NotificationType("$/cancelRequest")}(c||(c={})),function(t){t.is=function(t){return"string"==typeof t||"number"==typeof t}}(h||(e.ProgressToken=h={})),function(t){t.type=new a.NotificationType("$/progress")}(u||(u={}));e.ProgressType=class{constructor(){}},function(t){t.is=function(t){return i.func(t)}}(d||(d={})),e.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(t){t[t.Off=0]="Off",t[t.Messages=1]="Messages",t[t.Compact=2]="Compact",t[t.Verbose=3]="Verbose"}(p||(e.Trace=p={})),function(t){t.Off="off",t.Messages="messages",t.Compact="compact",t.Verbose="verbose"}(f||(e.TraceValues=f={})),function(t){t.fromString=function(e){if(!i.string(e))return t.Off;switch(e=e.toLowerCase()){case"off":default:return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose}},t.toString=function(e){switch(e){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}}(p||(e.Trace=p={})),function(t){t.Text="text",t.JSON="json"}(g||(e.TraceFormat=g={})),function(t){t.fromString=function(e){return i.string(e)&&"json"===(e=e.toLowerCase())?t.JSON:t.Text}}(g||(e.TraceFormat=g={})),function(t){t.type=new a.NotificationType("$/setTrace")}(m||(e.SetTraceNotification=m={})),function(t){t.type=new a.NotificationType("$/logTrace")}(y||(e.LogTraceNotification=y={})),function(t){t[t.Closed=1]="Closed",t[t.Disposed=2]="Disposed",t[t.AlreadyListening=3]="AlreadyListening"}(v||(e.ConnectionErrors=v={}));class S extends Error{constructor(t,e){super(e),this.code=t,Object.setPrototypeOf(this,S.prototype)}}e.ConnectionError=S,function(t){t.is=function(t){const e=t;return e&&i.func(e.cancelUndispatched)}}(b||(e.ConnectionStrategy=b={})),function(t){t.is=function(t){const e=t;return e&&(void 0===e.kind||"id"===e.kind)&&i.func(e.createCancellationTokenSource)&&(void 0===e.dispose||i.func(e.dispose))}}(x||(e.IdCancellationReceiverStrategy=x={})),function(t){t.is=function(t){const e=t;return e&&"request"===e.kind&&i.func(e.createCancellationTokenSource)&&(void 0===e.dispose||i.func(e.dispose))}}(w||(e.RequestCancellationReceiverStrategy=w={})),function(t){t.Message=Object.freeze({createCancellationTokenSource:t=>new l.CancellationTokenSource}),t.is=function(t){return x.is(t)||w.is(t)}}(T||(e.CancellationReceiverStrategy=T={})),function(t){t.Message=Object.freeze({sendCancellation:(t,e)=>t.sendNotification(c.type,{id:e}),cleanup(t){}}),t.is=function(t){const e=t;return e&&i.func(e.sendCancellation)&&i.func(e.cleanup)}}(k||(e.CancellationSenderStrategy=k={})),function(t){t.Message=Object.freeze({receiver:T.Message,sender:k.Message}),t.is=function(t){const e=t;return e&&T.is(e.receiver)&&k.is(e.sender)}}(A||(e.CancellationStrategy=A={})),function(t){t.is=function(t){const e=t;return e&&i.func(e.handleMessage)}}(_||(e.MessageStrategy=_={})),function(t){t.is=function(t){const e=t;return e&&(A.is(e.cancellationStrategy)||b.is(e.connectionStrategy)||_.is(e.messageStrategy))}}(E||(e.ConnectionOptions=E={})),function(t){t[t.New=1]="New",t[t.Listening=2]="Listening",t[t.Closed=3]="Closed",t[t.Disposed=4]="Disposed"}(C||(C={})),e.createMessageConnection=function(t,r,f,b){const w=void 0!==f?f:e.NullLogger;let T=0,k=0,E=0;const R="2.0";let L;const D=new Map;let N;const I=new Map,M=new Map;let O,P,$=new s.LinkedMap,B=new Map,F=new Set,z=new Map,K=p.Off,q=g.Text,U=C.New;const j=new o.Emitter,G=new o.Emitter,Y=new o.Emitter,W=new o.Emitter,H=new o.Emitter,V=b&&b.cancellationStrategy?b.cancellationStrategy:A.Message;function X(t){if(null===t)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+t.toString()}function Z(t,e){var r;a.Message.isRequest(e)?t.set(X(e.id),e):a.Message.isResponse(e)?t.set(null===(r=e.id)?"res-unknown-"+(++E).toString():"res-"+r.toString(),e):t.set("not-"+(++k).toString(),e)}function Q(t){}function J(){return U===C.Listening}function tt(){return U===C.Closed}function et(){return U===C.Disposed}function rt(){U!==C.New&&U!==C.Listening||(U=C.Closed,G.fire(void 0))}function nt(){O||0===$.size||(O=(0,n.default)().timer.setImmediate(()=>{O=void 0,function(){if(0===$.size)return;const t=$.shift();try{const e=b?.messageStrategy;_.is(e)?e.handleMessage(t,it):it(t)}finally{nt()}}()}))}function it(t){a.Message.isRequest(t)?function(t){if(et())return;function e(e,n,i){const s={jsonrpc:R,id:t.id};e instanceof a.ResponseError?s.error=e.toJson():s.result=void 0===e?null:e,ot(s,n,i),r.write(s).catch(()=>w.error("Sending response failed."))}function n(e,n,i){const a={jsonrpc:R,id:t.id,error:e.toJson()};ot(a,n,i),r.write(a).catch(()=>w.error("Sending response failed."))}function s(e,n,i){void 0===e&&(e=null);const a={jsonrpc:R,id:t.id,result:e};ot(a,n,i),r.write(a).catch(()=>w.error("Sending response failed."))}!function(t){if(K===p.Off||!P)return;if(q===g.Text){let e;K!==p.Verbose&&K!==p.Compact||!t.params||(e=`Params: ${st(t.params)}\n\n`),P.log(`Received request '${t.method} - (${t.id})'.`,e)}else ct("receive-request",t)}(t);const o=D.get(t.method);let l,c;o&&(l=o.type,c=o.handler);const h=Date.now();if(c||L){const r=t.id??String(Date.now()),o=x.is(V.receiver)?V.receiver.createCancellationTokenSource(r):V.receiver.createCancellationTokenSource(t);null!==t.id&&F.has(t.id)&&o.cancel(),null!==t.id&&z.set(r,o);try{let u;if(c)if(void 0===t.params){if(void 0!==l&&0!==l.numberOfParams)return void n(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${t.method} defines ${l.numberOfParams} params but received none.`),t.method,h);u=c(o.token)}else if(Array.isArray(t.params)){if(void 0!==l&&l.parameterStructures===a.ParameterStructures.byName)return void n(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${t.method} defines parameters by name but received parameters by position`),t.method,h);u=c(...t.params,o.token)}else{if(void 0!==l&&l.parameterStructures===a.ParameterStructures.byPosition)return void n(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${t.method} defines parameters by position but received parameters by name`),t.method,h);u=c(t.params,o.token)}else L&&(u=L(t.method,t.params,o.token));const d=u;u?d.then?d.then(n=>{z.delete(r),e(n,t.method,h)},e=>{z.delete(r),e instanceof a.ResponseError?n(e,t.method,h):e&&i.string(e.message)?n(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${t.method} failed with message: ${e.message}`),t.method,h):n(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${t.method} failed unexpectedly without providing any details.`),t.method,h)}):(z.delete(r),e(u,t.method,h)):(z.delete(r),s(u,t.method,h))}catch(u){z.delete(r),u instanceof a.ResponseError?e(u,t.method,h):u&&i.string(u.message)?n(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${t.method} failed with message: ${u.message}`),t.method,h):n(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${t.method} failed unexpectedly without providing any details.`),t.method,h)}}else n(new a.ResponseError(a.ErrorCodes.MethodNotFound,`Unhandled method ${t.method}`),t.method,h)}(t):a.Message.isNotification(t)?function(t){if(et())return;let e,r;if(t.method===c.type.method){const e=t.params.id;return F.delete(e),void lt(t)}{const n=I.get(t.method);n&&(r=n.handler,e=n.type)}if(r||N)try{if(lt(t),r)if(void 0===t.params)void 0!==e&&0!==e.numberOfParams&&e.parameterStructures!==a.ParameterStructures.byName&&w.error(`Notification ${t.method} defines ${e.numberOfParams} params but received none.`),r();else if(Array.isArray(t.params)){const n=t.params;t.method===u.type.method&&2===n.length&&h.is(n[0])?r({token:n[0],value:n[1]}):(void 0!==e&&(e.parameterStructures===a.ParameterStructures.byName&&w.error(`Notification ${t.method} defines parameters by name but received parameters by position`),e.numberOfParams!==t.params.length&&w.error(`Notification ${t.method} defines ${e.numberOfParams} params but received ${n.length} arguments`)),r(...n))}else void 0!==e&&e.parameterStructures===a.ParameterStructures.byPosition&&w.error(`Notification ${t.method} defines parameters by position but received parameters by name`),r(t.params);else N&&N(t.method,t.params)}catch(n){n.message?w.error(`Notification handler '${t.method}' failed with message: ${n.message}`):w.error(`Notification handler '${t.method}' failed unexpectedly.`)}else Y.fire(t)}(t):a.Message.isResponse(t)?function(t){if(et())return;if(null===t.id)t.error?w.error(`Received response message without id: Error is: \n${JSON.stringify(t.error,void 0,4)}`):w.error("Received response message without id. No further error information provided.");else{const r=t.id,n=B.get(r);if(function(t,e){if(K===p.Off||!P)return;if(q===g.Text){let r;if(K!==p.Verbose&&K!==p.Compact||(t.error&&t.error.data?r=`Error data: ${st(t.error.data)}\n\n`:t.result?r=`Result: ${st(t.result)}\n\n`:void 0===t.error&&(r="No result returned.\n\n")),e){const n=t.error?` Request failed: ${t.error.message} (${t.error.code}).`:"";P.log(`Received response '${e.method} - (${t.id})' in ${Date.now()-e.timerStart}ms.${n}`,r)}else P.log(`Received response ${t.id} without active response promise.`,r)}else ct("receive-response",t)}(t,n),void 0!==n){B.delete(r);try{if(t.error){const e=t.error;n.reject(new a.ResponseError(e.code,e.message,e.data))}else{if(void 0===t.result)throw new Error("Should never happen.");n.resolve(t.result)}}catch(e){e.message?w.error(`Response handler '${n.method}' failed with message: ${e.message}`):w.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(t):function(t){if(!t)return void w.error("Received empty message.");w.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(t,null,4)}`);const e=t;if(i.string(e.id)||i.number(e.id)){const t=e.id,r=B.get(t);r&&r.reject(new Error("The received response has neither a result nor an error property."))}}(t)}t.onClose(rt),t.onError(function(t){j.fire([t,void 0,void 0])}),r.onClose(rt),r.onError(function(t){j.fire(t)});const at=t=>{try{if(a.Message.isNotification(t)&&t.method===c.type.method){const e=t.params.id,n=X(e),i=$.get(n);if(a.Message.isRequest(i)){const a=b?.connectionStrategy,s=a&&a.cancelUndispatched?a.cancelUndispatched(i,Q):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return $.delete(n),z.delete(e),s.id=i.id,ot(s,t.method,Date.now()),void r.write(s).catch(()=>w.error("Sending response for canceled message failed."))}const s=z.get(e);if(void 0!==s)return s.cancel(),void lt(t);F.add(e)}Z($,t)}finally{nt()}};function st(t){if(null!=t)switch(K){case p.Verbose:return JSON.stringify(t,null,4);case p.Compact:return JSON.stringify(t);default:return}}function ot(t,e,r){if(K!==p.Off&&P)if(q===g.Text){let n;K!==p.Verbose&&K!==p.Compact||(t.error&&t.error.data?n=`Error data: ${st(t.error.data)}\n\n`:t.result?n=`Result: ${st(t.result)}\n\n`:void 0===t.error&&(n="No result returned.\n\n")),P.log(`Sending response '${e} - (${t.id})'. Processing request took ${Date.now()-r}ms`,n)}else ct("send-response",t)}function lt(t){if(K!==p.Off&&P&&t.method!==y.type.method)if(q===g.Text){let e;K!==p.Verbose&&K!==p.Compact||(e=t.params?`Params: ${st(t.params)}\n\n`:"No parameters provided.\n\n"),P.log(`Received notification '${t.method}'.`,e)}else ct("receive-notification",t)}function ct(t,e){if(!P||K===p.Off)return;const r={isLSPMessage:!0,type:t,message:e,timestamp:Date.now()};P.log(r)}function ht(){if(tt())throw new S(v.Closed,"Connection is closed.");if(et())throw new S(v.Disposed,"Connection is disposed.")}function ut(t){return void 0===t?null:t}function dt(t){return null===t?void 0:t}function pt(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function ft(t,e){switch(t){case a.ParameterStructures.auto:return pt(e)?dt(e):[ut(e)];case a.ParameterStructures.byName:if(!pt(e))throw new Error("Received parameters by name but param is not an object literal.");return dt(e);case a.ParameterStructures.byPosition:return[ut(e)];default:throw new Error(`Unknown parameter structure ${t.toString()}`)}}function gt(t,e){let r;const n=t.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=ft(t.parameterStructures,e[0]);break;default:r=[];for(let t=0;t{let n,s;if(ht(),i.string(t)){n=t;const r=e[0];let i=0,o=a.ParameterStructures.auto;a.ParameterStructures.is(r)&&(i=1,o=r);let l=e.length;const c=l-i;switch(c){case 0:s=void 0;break;case 1:s=ft(o,e[i]);break;default:if(o===a.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);s=e.slice(i,l).map(t=>ut(t))}}else{const r=e;n=t.method,s=gt(t,r)}const o={jsonrpc:R,method:n,params:s};return function(t){if(K!==p.Off&&P)if(q===g.Text){let e;K!==p.Verbose&&K!==p.Compact||(e=t.params?`Params: ${st(t.params)}\n\n`:"No parameters provided.\n\n"),P.log(`Sending notification '${t.method}'.`,e)}else ct("send-notification",t)}(o),r.write(o).catch(t=>{throw w.error("Sending notification failed."),t})},onNotification:(t,e)=>{let r;return ht(),i.func(t)?N=t:e&&(i.string(t)?(r=t,I.set(t,{type:void 0,handler:e})):(r=t.method,I.set(t.method,{type:t,handler:e}))),{dispose:()=>{void 0!==r?I.delete(r):N=void 0}}},onProgress:(t,e,r)=>{if(M.has(e))throw new Error(`Progress handler for token ${e} already registered`);return M.set(e,r),{dispose:()=>{M.delete(e)}}},sendProgress:(t,e,r)=>mt.sendNotification(u.type,{token:e,value:r}),onUnhandledProgress:W.event,sendRequest:(t,...e)=>{let n,s,o;if(ht(),function(){if(!J())throw new Error("Call listen() first.")}(),i.string(t)){n=t;const r=e[0],i=e[e.length-1];let c=0,h=a.ParameterStructures.auto;a.ParameterStructures.is(r)&&(c=1,h=r);let u=e.length;l.CancellationToken.is(i)&&(u-=1,o=i);const d=u-c;switch(d){case 0:s=void 0;break;case 1:s=ft(h,e[c]);break;default:if(h===a.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);s=e.slice(c,u).map(t=>ut(t))}}else{const r=e;n=t.method,s=gt(t,r);const i=t.numberOfParams;o=l.CancellationToken.is(r[i])?r[i]:void 0}const c=T++;let h;o&&(h=o.onCancellationRequested(()=>{const t=V.sender.sendCancellation(mt,c);return void 0===t?(w.log(`Received no promise from cancellation strategy when cancelling id ${c}`),Promise.resolve()):t.catch(()=>{w.log(`Sending cancellation messages for id ${c} failed`)})}));const u={jsonrpc:R,id:c,method:n,params:s};return function(t){if(K!==p.Off&&P)if(q===g.Text){let e;K!==p.Verbose&&K!==p.Compact||!t.params||(e=`Params: ${st(t.params)}\n\n`),P.log(`Sending request '${t.method} - (${t.id})'.`,e)}else ct("send-request",t)}(u),"function"==typeof V.sender.enableCancellation&&V.sender.enableCancellation(u),new Promise(async(t,e)=>{const i={method:n,timerStart:Date.now(),resolve:e=>{t(e),V.sender.cleanup(c),h?.dispose()},reject:t=>{e(t),V.sender.cleanup(c),h?.dispose()}};try{await r.write(u),B.set(c,i)}catch(s){throw w.error("Sending request failed."),i.reject(new a.ResponseError(a.ErrorCodes.MessageWriteError,s.message?s.message:"Unknown reason")),s}})},onRequest:(t,e)=>{ht();let r=null;return d.is(t)?(r=void 0,L=t):i.string(t)?(r=null,void 0!==e&&(r=t,D.set(t,{handler:e,type:void 0}))):void 0!==e&&(r=t.method,D.set(t.method,{type:t,handler:e})),{dispose:()=>{null!==r&&(void 0!==r?D.delete(r):L=void 0)}}},hasPendingResponse:()=>B.size>0,trace:async(t,e,r)=>{let n=!1,a=g.Text;void 0!==r&&(i.boolean(r)?n=r:(n=r.sendNotification||!1,a=r.traceFormat||g.Text)),K=t,q=a,P=K===p.Off?void 0:e,!n||tt()||et()||await mt.sendNotification(m.type,{value:p.toString(t)})},onError:j.event,onClose:G.event,onUnhandledNotification:Y.event,onDispose:H.event,end:()=>{r.end()},dispose:()=>{if(et())return;U=C.Disposed,H.fire(void 0);const e=new a.ResponseError(a.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const t of B.values())t.reject(e);B=new Map,z=new Map,F=new Set,$=new s.LinkedMap,i.func(r.dispose)&&r.dispose(),i.func(t.dispose)&&t.dispose()},listen:()=>{ht(),function(){if(J())throw new S(v.AlreadyListening,"Connection is already listening")}(),U=C.Listening,t.listen(at)},inspect:()=>{(0,n.default)().console.log("inspect")}};return mt.onNotification(y.type,t=>{if(K===p.Off||!P)return;const e=K===p.Verbose||K===p.Compact;P.log(t.message,e?t.verbose:void 0)}),mt.onNotification(u.type,t=>{const e=M.get(t.token);e?e(t.value):W.fire(t)}),mt}},4019(t,e){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0,function(t){t.create=function(t){return{dispose:t}}}(r||(e.Disposable=r={}))},2676(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;const n=r(9590);var i;!function(t){const e={dispose(){}};t.None=function(){return e}}(i||(e.Event=i={}));class a{add(t,e=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,e)})}remove(t,e=null){if(!this._callbacks)return;let r=!1;for(let n=0,i=this._callbacks.length;n{this._callbacks||(this._callbacks=new a),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,e);const n={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,e),n.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(n),n}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}e.Emitter=s,s._noop=function(){}},8585(t,e){"use strict";function r(t){return"string"==typeof t||t instanceof String}function n(t){return Array.isArray(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,e.boolean=function(t){return!0===t||!1===t},e.string=r,e.number=function(t){return"number"==typeof t||t instanceof Number},e.error=function(t){return t instanceof Error},e.func=function(t){return"function"==typeof t},e.array=n,e.stringArray=function(t){return n(t)&&t.every(t=>r(t))}},3352(t,e){"use strict";var r,n;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0,function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last}(n||(e.Touch=n={}));class i{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,e=n.None){const r=this._map.get(t);if(r)return e!==n.None&&this.touch(r,e),r.value}set(t,e,r=n.None){let i=this._map.get(t);if(i)i.value=e,r!==n.None&&this.touch(i,r);else{switch(i={key:t,value:e,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:default:this.addItemLast(i)}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){const e=this._map.get(t);if(e)return this._map.delete(t),this.removeItem(e),this._size--,e.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,e){const r=this._state;let n=this._head;for(;n;){if(e?t.bind(e)(n.value,n.key,this):t(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const t=this._state;let e=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(e){const t={value:e.key,done:!1};return e=e.next,t}return{value:void 0,done:!0}}};return r}values(){const t=this._state;let e=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(e){const t={value:e.value,done:!1};return e=e.next,t}return{value:void 0,done:!0}}};return r}entries(){const t=this._state;let e=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(e){const t={value:[e.key,e.value],done:!1};return e=e.next,t}return{value:void 0,done:!0}}};return r}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(0===t)return void this.clear();let e=this._head,r=this.size;for(;e&&r>t;)this._map.delete(e.key),e=e.next,r--;this._head=e,this._size=r,e&&(e.previous=void 0),this._state++}addItemFirst(t){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");t.next=this._head,this._head.previous=t}else this._tail=t;this._head=t,this._state++}addItemLast(t){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");t.previous=this._tail,this._tail.next=t}else this._head=t;this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{const e=t.next,r=t.previous;if(!e||!r)throw new Error("Invalid list");e.previous=r,r.next=e}t.next=void 0,t.previous=void 0,this._state++}touch(t,e){if(!this._head||!this._tail)throw new Error("Invalid list");if(e===n.First||e===n.Last)if(e===n.First){if(t===this._head)return;const e=t.next,r=t.previous;t===this._tail?(r.next=void 0,this._tail=r):(e.previous=r,r.next=e),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(e===n.Last){if(t===this._tail)return;const e=t.next,r=t.previous;t===this._head?(e.previous=void 0,this._head=e):(e.previous=r,r.next=e),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}toJSON(){const t=[];return this.forEach((e,r)=>{t.push([r,e])}),t}fromJSON(t){this.clear();for(const[e,r]of t)this.set(e,r)}}e.LinkedMap=i;e.LRUCache=class extends i{constructor(t,e=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,e),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,e=n.AsNew){return super.get(t,e)}peek(t){return super.get(t,n.None)}set(t,e){return super.set(t,e,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;e.AbstractMessageBuffer=class{constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){const e="string"==typeof t?this.fromString(t,this._encoding):t;this._chunks.push(e),this._totalLength+=e.byteLength}tryReadHeaders(t=!1){if(0===this._chunks.length)return;let e=0,r=0,n=0,i=0;t:for(;rthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){const e=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(e)}if(this._chunks[0].byteLength>t){const e=this._chunks[0],r=this.asNative(e,t);return this._chunks[0]=e.slice(t),this._totalLength-=t,r}const e=this.allocNative(t);let r=0;for(;t>0;){const n=this._chunks[0];if(n.byteLength>t){const i=n.slice(0,t);e.set(i,r),r+=t,this._chunks[0]=n.slice(t),this._totalLength-=t,t-=t}else e.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,t-=n.byteLength}return e}}},9085(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;const n=r(9590),i=r(8585),a=r(2676),s=r(4323);var o,l;!function(t){t.is=function(t){let e=t;return e&&i.func(e.listen)&&i.func(e.dispose)&&i.func(e.onError)&&i.func(e.onClose)&&i.func(e.onPartialMessage)}}(o||(e.MessageReader=o={}));class c{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter,this.partialMessageEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${i.string(t.message)?t.message:"unknown"}`)}}e.AbstractMessageReader=c,function(t){t.fromOptions=function(t){let e,r;const i=new Map;let a;const s=new Map;if(void 0===t||"string"==typeof t)e=t??"utf-8";else{if(e=t.charset??"utf-8",void 0!==t.contentDecoder&&(r=t.contentDecoder,i.set(r.name,r)),void 0!==t.contentDecoders)for(const e of t.contentDecoders)i.set(e.name,e);if(void 0!==t.contentTypeDecoder&&(a=t.contentTypeDecoder,s.set(a.name,a)),void 0!==t.contentTypeDecoders)for(const e of t.contentTypeDecoders)s.set(e.name,e)}return void 0===a&&(a=(0,n.default)().applicationJson.decoder,s.set(a.name,a)),{charset:e,contentDecoder:r,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:s}}}(l||(l={}));e.ReadableStreamMessageReader=class extends c{constructor(t,e){super(),this.readable=t,this.options=l.fromOptions(e),this.buffer=(0,n.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.Semaphore(1)}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;const e=this.readable.onData(t=>{this.onData(t)});return this.readable.onError(t=>this.fireError(t)),this.readable.onClose(()=>this.fireClose()),e}onData(t){try{for(this.buffer.append(t);;){if(-1===this.nextMessageLength){const t=this.buffer.tryReadHeaders(!0);if(!t)return;const e=t.get("content-length");if(!e)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(t))}`));const r=parseInt(e);if(isNaN(r))return void this.fireError(new Error(`Content-Length value must be a number. Got ${e}`));this.nextMessageLength=r}const t=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const e=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(t):t,r=await this.options.contentTypeDecoder.decode(e,this.options);this.callback(r)}).catch(t=>{this.fireError(t)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,n.default)().timer.setTimeout((t,e)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:e}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;const n=r(9590),i=r(8585),a=r(4323),s=r(2676);var o,l;!function(t){t.is=function(t){let e=t;return e&&i.func(e.dispose)&&i.func(e.onClose)&&i.func(e.onError)&&i.func(e.write)}}(o||(e.MessageWriter=o={}));class c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,e,r){this.errorEmitter.fire([this.asError(t),e,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${i.string(t.message)?t.message:"unknown"}`)}}e.AbstractMessageWriter=c,function(t){t.fromOptions=function(t){return void 0===t||"string"==typeof t?{charset:t??"utf-8",contentTypeEncoder:(0,n.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,n.default)().applicationJson.encoder}}}(l||(l={}));e.WriteableStreamMessageWriter=class extends c{constructor(t,e){super(),this.writable=t,this.options=l.fromOptions(e),this.errorCount=0,this.writeSemaphore=new a.Semaphore(1),this.writable.onError(t=>this.fireError(t)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(t=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(t):t).then(e=>{const r=[];return r.push("Content-Length: ",e.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(t,r,e)},t=>{throw this.fireError(t),t}))}async doWrite(t,e,r){try{return await this.writable.write(e.join(""),"ascii"),this.writable.write(r)}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,e){this.errorCount++,this.fireError(t,e,this.errorCount)}end(){this.writable.end()}}},6177(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;const n=r(8585);var i,a;!function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3}(i||(e.ErrorCodes=i={}));class s extends Error{constructor(t,e,r){super(e),this.code=n.number(t)?t:i.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,s.prototype)}toJson(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),t}}e.ResponseError=s;class o{constructor(t){this.kind=t}static is(t){return t===o.auto||t===o.byName||t===o.byPosition}toString(){return this.kind}}e.ParameterStructures=o,o.auto=new o("auto"),o.byPosition=new o("byPosition"),o.byName=new o("byName");class l{constructor(t,e){this.method=t,this.numberOfParams=e}get parameterStructures(){return o.auto}}e.AbstractMessageSignature=l;e.RequestType0=class extends l{constructor(t){super(t,0)}};e.RequestType=class extends l{constructor(t,e=o.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};e.RequestType1=class extends l{constructor(t,e=o.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};e.RequestType2=class extends l{constructor(t){super(t,2)}};e.RequestType3=class extends l{constructor(t){super(t,3)}};e.RequestType4=class extends l{constructor(t){super(t,4)}};e.RequestType5=class extends l{constructor(t){super(t,5)}};e.RequestType6=class extends l{constructor(t){super(t,6)}};e.RequestType7=class extends l{constructor(t){super(t,7)}};e.RequestType8=class extends l{constructor(t){super(t,8)}};e.RequestType9=class extends l{constructor(t){super(t,9)}};e.NotificationType=class extends l{constructor(t,e=o.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};e.NotificationType0=class extends l{constructor(t){super(t,0)}};e.NotificationType1=class extends l{constructor(t,e=o.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};e.NotificationType2=class extends l{constructor(t){super(t,2)}};e.NotificationType3=class extends l{constructor(t){super(t,3)}};e.NotificationType4=class extends l{constructor(t){super(t,4)}};e.NotificationType5=class extends l{constructor(t){super(t,5)}};e.NotificationType6=class extends l{constructor(t){super(t,6)}};e.NotificationType7=class extends l{constructor(t){super(t,7)}};e.NotificationType8=class extends l{constructor(t){super(t,8)}};e.NotificationType9=class extends l{constructor(t){super(t,9)}},function(t){t.isRequest=function(t){const e=t;return e&&n.string(e.method)&&(n.string(e.id)||n.number(e.id))},t.isNotification=function(t){const e=t;return e&&n.string(e.method)&&void 0===t.id},t.isResponse=function(t){const e=t;return e&&(void 0!==e.result||!!e.error)&&(n.string(e.id)||n.number(e.id)||null===e.id)}}(a||(e.Message=a={}))},9590(t,e){"use strict";let r;function n(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.install=function(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");r=t}}(n||(n={})),e.default=n},4323(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;const n=r(9590);e.Semaphore=class{constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((e,r)=>{this._waiting.push({thunk:t,resolve:e,reject:r}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,n.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const e=t.thunk();e instanceof Promise?e.then(e=>{this._active--,t.resolve(e),this.runNext()},e=>{this._active--,t.reject(e),this.runNext()}):(this._active--,t.resolve(e),this.runNext())}catch(e){this._active--,t.reject(e),this.runNext()}}}},4996(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;const n=r(9850);var i;!function(t){t.Continue=0,t.Cancelled=1}(i||(i={}));e.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(t){if(null===t.id)return;const e=new SharedArrayBuffer(4);new Int32Array(e,0,1)[0]=i.Continue,this.buffers.set(t.id,e),t.$cancellationData=e}async sendCancellation(t,e){const r=this.buffers.get(e);if(void 0===r)return;const n=new Int32Array(r,0,1);Atomics.store(n,0,i.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};class a{constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{constructor(t){this.token=new a(t)}cancel(){}dispose(){}}e.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(t){const e=t.$cancellationData;return void 0===e?new n.CancellationTokenSource:new s(e)}}},4512(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;const a=r(6087);i(r(6087),e),i(r(8766),e),e.createProtocolConnection=function(t,e,r,n){return(0,a.createMessageConnection)(t,e,r,n)}},8766(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,i(r(6439),e),i(r(6203),e),i(r(372),e),i(r(1560),e);var a,s=r(1580);Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(t){t.lspReservedErrorRangeStart=-32899,t.RequestFailed=-32803,t.ServerCancelled=-32802,t.ContentModified=-32801,t.RequestCancelled=-32800,t.lspReservedErrorRangeEnd=-32800}(a||(e.LSPErrorCodes=a={}))},1580(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;const n=r(6439);e.createProtocolConnection=function(t,e,r,i){return n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(t,e,r,i)}},372(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;const n=r(6439);var i;!function(t){t.clientToServer="clientToServer",t.serverToClient="serverToClient",t.both="both"}(i||(e.MessageDirection=i={}));e.RegistrationType=class{constructor(t){this.method=t}};class a extends n.RequestType0{constructor(t){super(t)}}e.ProtocolRequestType0=a;class s extends n.RequestType{constructor(t){super(t,n.ParameterStructures.byName)}}e.ProtocolRequestType=s;class o extends n.NotificationType0{constructor(t){super(t)}}e.ProtocolNotificationType0=o;class l extends n.NotificationType{constructor(t){super(t,n.ParameterStructures.byName)}}e.ProtocolNotificationType=l},8765(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;const n=r(372);var i,a,s;!function(t){t.method="textDocument/prepareCallHierarchy",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(i||(e.CallHierarchyPrepareRequest=i={})),function(t){t.method="callHierarchy/incomingCalls",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(a||(e.CallHierarchyIncomingCallsRequest=a={})),function(t){t.method="callHierarchy/outgoingCalls",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(s||(e.CallHierarchyOutgoingCallsRequest=s={}))},7672(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;const n=r(372);var i,a;!function(t){t.method="textDocument/documentColor",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(i||(e.DocumentColorRequest=i={})),function(t){t.method="textDocument/colorPresentation",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(a||(e.ColorPresentationRequest=a={}))},1660(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;const n=r(372);var i;!function(t){t.method="workspace/configuration",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)}(i||(e.ConfigurationRequest=i={}))},6914(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;const n=r(372);var i;!function(t){t.method="textDocument/declaration",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(i||(e.DeclarationRequest=i={}))},6011(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;const n=r(6439),i=r(8598),a=r(372);var s,o,l,c,h;!function(t){t.is=function(t){const e=t;return e&&i.boolean(e.retriggerRequest)}}(s||(e.DiagnosticServerCancellationData=s={})),function(t){t.Full="full",t.Unchanged="unchanged"}(o||(e.DocumentDiagnosticReportKind=o={})),function(t){t.method="textDocument/diagnostic",t.messageDirection=a.MessageDirection.clientToServer,t.type=new a.ProtocolRequestType(t.method),t.partialResult=new n.ProgressType}(l||(e.DocumentDiagnosticRequest=l={})),function(t){t.method="workspace/diagnostic",t.messageDirection=a.MessageDirection.clientToServer,t.type=new a.ProtocolRequestType(t.method),t.partialResult=new n.ProgressType}(c||(e.WorkspaceDiagnosticRequest=c={})),function(t){t.method="workspace/diagnostic/refresh",t.messageDirection=a.MessageDirection.serverToClient,t.type=new a.ProtocolRequestType0(t.method)}(h||(e.DiagnosticRefreshRequest=h={}))},9840(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;const n=r(372);var i,a,s,o,l,c,h;!function(t){t.file="file",t.folder="folder"}(i||(e.FileOperationPatternKind=i={})),function(t){t.method="workspace/willCreateFiles",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(a||(e.WillCreateFilesRequest=a={})),function(t){t.method="workspace/didCreateFiles",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(s||(e.DidCreateFilesNotification=s={})),function(t){t.method="workspace/willRenameFiles",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(o||(e.WillRenameFilesRequest=o={})),function(t){t.method="workspace/didRenameFiles",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(l||(e.DidRenameFilesNotification=l={})),function(t){t.method="workspace/didDeleteFiles",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(c||(e.DidDeleteFilesNotification=c={})),function(t){t.method="workspace/willDeleteFiles",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(h||(e.WillDeleteFilesRequest=h={}))},2874(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;const n=r(372);var i,a;!function(t){t.method="textDocument/foldingRange",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(i||(e.FoldingRangeRequest=i={})),function(t){t.method="workspace/foldingRange/refresh",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)}(a||(e.FoldingRangeRefreshRequest=a={}))},9574(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;const n=r(372);var i;!function(t){t.method="textDocument/implementation",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(i||(e.ImplementationRequest=i={}))},7752(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;const n=r(372);var i,a,s;!function(t){t.method="textDocument/inlayHint",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(i||(e.InlayHintRequest=i={})),function(t){t.method="inlayHint/resolve",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(a||(e.InlayHintResolveRequest=a={})),function(t){t.method="workspace/inlayHint/refresh",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)}(s||(e.InlayHintRefreshRequest=s={}))},3307(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;const n=r(372);var i;!function(t){t.method="textDocument/inlineCompletion",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(i||(e.InlineCompletionRequest=i={}))},3124(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;const n=r(372);var i,a;!function(t){t.method="textDocument/inlineValue",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(i||(e.InlineValueRequest=i={})),function(t){t.method="workspace/inlineValue/refresh",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)}(a||(e.InlineValueRefreshRequest=a={}))},1560(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;const n=r(372),i=r(6203),a=r(8598),s=r(9574);Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const o=r(8461);Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:function(){return o.TypeDefinitionRequest}});const l=r(9935);Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return l.WorkspaceFoldersRequest}}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return l.DidChangeWorkspaceFoldersNotification}});const c=r(1660);Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const h=r(7672);Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:function(){return h.DocumentColorRequest}}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:function(){return h.ColorPresentationRequest}});const u=r(2874);Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:function(){return u.FoldingRangeRequest}}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return u.FoldingRangeRefreshRequest}});const d=r(6914);Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:function(){return d.DeclarationRequest}});const p=r(3487);Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:function(){return p.SelectionRangeRequest}});const f=r(2687);Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:function(){return f.WorkDoneProgress}}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return f.WorkDoneProgressCreateRequest}}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return f.WorkDoneProgressCancelNotification}});const g=r(8765);Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return g.CallHierarchyPrepareRequest}});const m=r(2478);Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:function(){return m.TokenFormat}}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:function(){return m.SemanticTokensRequest}}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return m.SemanticTokensDeltaRequest}}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return m.SemanticTokensRangeRequest}}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return m.SemanticTokensRefreshRequest}}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return m.SemanticTokensRegistrationType}});const y=r(908);Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const v=r(5316);Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return v.LinkedEditingRangeRequest}});const b=r(9840);Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:function(){return b.FileOperationPatternKind}}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:function(){return b.DidCreateFilesNotification}}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:function(){return b.WillCreateFilesRequest}}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:function(){return b.DidRenameFilesNotification}}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:function(){return b.WillRenameFilesRequest}}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return b.DidDeleteFilesNotification}}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return b.WillDeleteFilesRequest}});const x=r(9047);Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:function(){return x.UniquenessLevel}}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:function(){return x.MonikerKind}}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:function(){return x.MonikerRequest}});const w=r(645);Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return w.TypeHierarchyPrepareRequest}}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return w.TypeHierarchySubtypesRequest}}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return w.TypeHierarchySupertypesRequest}});const T=r(3124);Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:function(){return T.InlineValueRequest}}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return T.InlineValueRefreshRequest}});const k=r(7752);Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:function(){return k.InlayHintRequest}}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:function(){return k.InlayHintResolveRequest}}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return k.InlayHintRefreshRequest}});const A=r(6011);Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return A.DiagnosticServerCancellationData}}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return A.DocumentDiagnosticReportKind}}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return A.DocumentDiagnosticRequest}}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return A.WorkspaceDiagnosticRequest}}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return A.DiagnosticRefreshRequest}});const _=r(3557);Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:function(){return _.NotebookCellKind}}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:function(){return _.ExecutionSummary}}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:function(){return _.NotebookCell}}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:function(){return _.NotebookDocument}}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return _.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return _.DidOpenNotebookDocumentNotification}}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:function(){return _.NotebookCellArrayChange}}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return _.DidChangeNotebookDocumentNotification}}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return _.DidSaveNotebookDocumentNotification}}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return _.DidCloseNotebookDocumentNotification}});const E=r(3307);var C,S,R,L,D,N,I,M,O,P,$,B,F,z,K,q,U,j,G,Y,W,H,V,X,Z,Q,J,tt,et,rt,nt,it,at,st,ot,lt,ct,ht,ut,dt,pt,ft,gt,mt,yt,vt,bt,xt,wt,Tt,kt,At,_t,Et,Ct,St,Rt,Lt,Dt,Nt,It,Mt,Ot,Pt,$t;Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:function(){return E.InlineCompletionRequest}}),function(t){t.is=function(t){const e=t;return a.string(e)||a.string(e.language)||a.string(e.scheme)||a.string(e.pattern)}}(C||(e.TextDocumentFilter=C={})),function(t){t.is=function(t){const e=t;return a.objectLiteral(e)&&(a.string(e.notebookType)||a.string(e.scheme)||a.string(e.pattern))}}(S||(e.NotebookDocumentFilter=S={})),function(t){t.is=function(t){const e=t;return a.objectLiteral(e)&&(a.string(e.notebook)||S.is(e.notebook))&&(void 0===e.language||a.string(e.language))}}(R||(e.NotebookCellTextDocumentFilter=R={})),function(t){t.is=function(t){if(!Array.isArray(t))return!1;for(let e of t)if(!a.string(e)&&!C.is(e)&&!R.is(e))return!1;return!0}}(L||(e.DocumentSelector=L={})),function(t){t.method="client/registerCapability",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)}(D||(e.RegistrationRequest=D={})),function(t){t.method="client/unregisterCapability",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)}(N||(e.UnregistrationRequest=N={})),function(t){t.Create="create",t.Rename="rename",t.Delete="delete"}(I||(e.ResourceOperationKind=I={})),function(t){t.Abort="abort",t.Transactional="transactional",t.TextOnlyTransactional="textOnlyTransactional",t.Undo="undo"}(M||(e.FailureHandlingKind=M={})),function(t){t.UTF8="utf-8",t.UTF16="utf-16",t.UTF32="utf-32"}(O||(e.PositionEncodingKind=O={})),function(t){t.hasId=function(t){const e=t;return e&&a.string(e.id)&&e.id.length>0}}(P||(e.StaticRegistrationOptions=P={})),function(t){t.is=function(t){const e=t;return e&&(null===e.documentSelector||L.is(e.documentSelector))}}($||(e.TextDocumentRegistrationOptions=$={})),function(t){t.is=function(t){const e=t;return a.objectLiteral(e)&&(void 0===e.workDoneProgress||a.boolean(e.workDoneProgress))},t.hasWorkDoneProgress=function(t){const e=t;return e&&a.boolean(e.workDoneProgress)}}(B||(e.WorkDoneProgressOptions=B={})),function(t){t.method="initialize",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(F||(e.InitializeRequest=F={})),function(t){t.unknownProtocolVersion=1}(z||(e.InitializeErrorCodes=z={})),function(t){t.method="initialized",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(K||(e.InitializedNotification=K={})),function(t){t.method="shutdown",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType0(t.method)}(q||(e.ShutdownRequest=q={})),function(t){t.method="exit",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType0(t.method)}(U||(e.ExitNotification=U={})),function(t){t.method="workspace/didChangeConfiguration",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(j||(e.DidChangeConfigurationNotification=j={})),function(t){t.Error=1,t.Warning=2,t.Info=3,t.Log=4,t.Debug=5}(G||(e.MessageType=G={})),function(t){t.method="window/showMessage",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)}(Y||(e.ShowMessageNotification=Y={})),function(t){t.method="window/showMessageRequest",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType(t.method)}(W||(e.ShowMessageRequest=W={})),function(t){t.method="window/logMessage",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)}(H||(e.LogMessageNotification=H={})),function(t){t.method="telemetry/event",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)}(V||(e.TelemetryEventNotification=V={})),function(t){t.None=0,t.Full=1,t.Incremental=2}(X||(e.TextDocumentSyncKind=X={})),function(t){t.method="textDocument/didOpen",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(Z||(e.DidOpenTextDocumentNotification=Z={})),function(t){t.isIncremental=function(t){let e=t;return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)},t.isFull=function(t){let e=t;return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}}(Q||(e.TextDocumentContentChangeEvent=Q={})),function(t){t.method="textDocument/didChange",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(J||(e.DidChangeTextDocumentNotification=J={})),function(t){t.method="textDocument/didClose",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(tt||(e.DidCloseTextDocumentNotification=tt={})),function(t){t.method="textDocument/didSave",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(et||(e.DidSaveTextDocumentNotification=et={})),function(t){t.Manual=1,t.AfterDelay=2,t.FocusOut=3}(rt||(e.TextDocumentSaveReason=rt={})),function(t){t.method="textDocument/willSave",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(nt||(e.WillSaveTextDocumentNotification=nt={})),function(t){t.method="textDocument/willSaveWaitUntil",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(it||(e.WillSaveTextDocumentWaitUntilRequest=it={})),function(t){t.method="workspace/didChangeWatchedFiles",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolNotificationType(t.method)}(at||(e.DidChangeWatchedFilesNotification=at={})),function(t){t.Created=1,t.Changed=2,t.Deleted=3}(st||(e.FileChangeType=st={})),function(t){t.is=function(t){const e=t;return a.objectLiteral(e)&&(i.URI.is(e.baseUri)||i.WorkspaceFolder.is(e.baseUri))&&a.string(e.pattern)}}(ot||(e.RelativePattern=ot={})),function(t){t.Create=1,t.Change=2,t.Delete=4}(lt||(e.WatchKind=lt={})),function(t){t.method="textDocument/publishDiagnostics",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolNotificationType(t.method)}(ct||(e.PublishDiagnosticsNotification=ct={})),function(t){t.Invoked=1,t.TriggerCharacter=2,t.TriggerForIncompleteCompletions=3}(ht||(e.CompletionTriggerKind=ht={})),function(t){t.method="textDocument/completion",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(ut||(e.CompletionRequest=ut={})),function(t){t.method="completionItem/resolve",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(dt||(e.CompletionResolveRequest=dt={})),function(t){t.method="textDocument/hover",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(pt||(e.HoverRequest=pt={})),function(t){t.Invoked=1,t.TriggerCharacter=2,t.ContentChange=3}(ft||(e.SignatureHelpTriggerKind=ft={})),function(t){t.method="textDocument/signatureHelp",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(gt||(e.SignatureHelpRequest=gt={})),function(t){t.method="textDocument/definition",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(mt||(e.DefinitionRequest=mt={})),function(t){t.method="textDocument/references",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(yt||(e.ReferencesRequest=yt={})),function(t){t.method="textDocument/documentHighlight",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(vt||(e.DocumentHighlightRequest=vt={})),function(t){t.method="textDocument/documentSymbol",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(bt||(e.DocumentSymbolRequest=bt={})),function(t){t.method="textDocument/codeAction",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(xt||(e.CodeActionRequest=xt={})),function(t){t.method="codeAction/resolve",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(wt||(e.CodeActionResolveRequest=wt={})),function(t){t.method="workspace/symbol",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(Tt||(e.WorkspaceSymbolRequest=Tt={})),function(t){t.method="workspaceSymbol/resolve",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(kt||(e.WorkspaceSymbolResolveRequest=kt={})),function(t){t.method="textDocument/codeLens",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(At||(e.CodeLensRequest=At={})),function(t){t.method="codeLens/resolve",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(_t||(e.CodeLensResolveRequest=_t={})),function(t){t.method="workspace/codeLens/refresh",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)}(Et||(e.CodeLensRefreshRequest=Et={})),function(t){t.method="textDocument/documentLink",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(Ct||(e.DocumentLinkRequest=Ct={})),function(t){t.method="documentLink/resolve",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(St||(e.DocumentLinkResolveRequest=St={})),function(t){t.method="textDocument/formatting",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(Rt||(e.DocumentFormattingRequest=Rt={})),function(t){t.method="textDocument/rangeFormatting",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(Lt||(e.DocumentRangeFormattingRequest=Lt={})),function(t){t.method="textDocument/rangesFormatting",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(Dt||(e.DocumentRangesFormattingRequest=Dt={})),function(t){t.method="textDocument/onTypeFormatting",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(Nt||(e.DocumentOnTypeFormattingRequest=Nt={})),function(t){t.Identifier=1}(It||(e.PrepareSupportDefaultBehavior=It={})),function(t){t.method="textDocument/rename",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(Mt||(e.RenameRequest=Mt={})),function(t){t.method="textDocument/prepareRename",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(Ot||(e.PrepareRenameRequest=Ot={})),function(t){t.method="workspace/executeCommand",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(Pt||(e.ExecuteCommandRequest=Pt={})),function(t){t.method="workspace/applyEdit",t.messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType("workspace/applyEdit")}($t||(e.ApplyWorkspaceEditRequest=$t={}))},5316(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;const n=r(372);var i;!function(t){t.method="textDocument/linkedEditingRange",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(i||(e.LinkedEditingRangeRequest=i={}))},9047(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;const n=r(372);var i,a,s;!function(t){t.document="document",t.project="project",t.group="group",t.scheme="scheme",t.global="global"}(i||(e.UniquenessLevel=i={})),function(t){t.$import="import",t.$export="export",t.local="local"}(a||(e.MonikerKind=a={})),function(t){t.method="textDocument/moniker",t.messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method)}(s||(e.MonikerRequest=s={}))},3557(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;const n=r(6203),i=r(8598),a=r(372);var s,o,l,c,h,u,d,p,f,g;!function(t){t.Markup=1,t.Code=2,t.is=function(t){return 1===t||2===t}}(s||(e.NotebookCellKind=s={})),function(t){t.create=function(t,e){const r={executionOrder:t};return!0!==e&&!1!==e||(r.success=e),r},t.is=function(t){const e=t;return i.objectLiteral(e)&&n.uinteger.is(e.executionOrder)&&(void 0===e.success||i.boolean(e.success))},t.equals=function(t,e){return t===e||null!=t&&null!=e&&(t.executionOrder===e.executionOrder&&t.success===e.success)}}(o||(e.ExecutionSummary=o={})),function(t){function e(t,r){if(t===r)return!0;if(null==t||null==r)return!1;if(typeof t!=typeof r)return!1;if("object"!=typeof t)return!1;const n=Array.isArray(t),a=Array.isArray(r);if(n!==a)return!1;if(n&&a){if(t.length!==r.length)return!1;for(let n=0;nr(t))},e.typedArray=function(t,e){return Array.isArray(t)&&t.every(e)},e.objectLiteral=function(t){return null!==t&&"object"==typeof t}},2607(t,e,r){"use strict";function n(t){return t.charCodeAt(0)}function i(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function a(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e];t[e]=!0}function s(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function o(){throw Error("Internal Error - Should never get here!")}function l(t){return"Character"===t.type}r.d(e,{z:()=>m,H:()=>g});const c=[];for(let y=n("0");y<=n("9");y++)c.push(y);const h=[n("_")].concat(c);for(let y=n("a");y<=n("z");y++)h.push(y);for(let y=n("A");y<=n("Z");y++)h.push(y);const u=[n(" "),n("\f"),n("\n"),n("\r"),n("\t"),n("\v"),n("\t"),n(" "),n(" "),n(" "),n(" "),n(" "),n(" "),n(" "),n(" "),n(" "),n(" "),n(" "),n(" "),n(" "),n("\u2028"),n("\u2029"),n(" "),n(" "),n(" "),n("\ufeff")],d=/[0-9a-fA-F]/,p=/[0-9]/,f=/[1-9]/;class g{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");const e=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":a(r,"global");break;case"i":a(r,"ignoreCase");break;case"m":a(r,"multiLine");break;case"u":a(r,"unicode");break;case"y":a(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:e,loc:this.loc(0)}}disjunction(){const t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){const t=[],e=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":let e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":e="Lookbehind";break;case"!":e="NegativeLookbehind"}}s(e);const r=this.disjunction();return this.consumeChar(")"),{type:e,value:r,loc:this.loc(t)}}return o()}quantifier(t=!1){let e;const r=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":const r=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:r,atMost:r};break;case",":let t;this.isDigit()?(t=this.integerIncludingZero(),e={atLeast:r,atMost:t}):e={atLeast:r,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;s(e)}if(!0!==t||void 0!==e)return s(e)?("?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(r),e):void 0}atom(){let t;const e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return void 0===t&&this.isPatternCharacter()&&(t=this.patternCharacter()),s(t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):o()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n("\n"),n("\r"),n("\u2028"),n("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=c;break;case"D":t=c,e=!0;break;case"s":t=u;break;case"S":t=u,e=!0;break;case"w":t=h;break;case"W":t=h,e=!0}return s(t)?{type:"Set",value:t,complement:e}:o()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=n("\f");break;case"n":t=n("\n");break;case"r":t=n("\r");break;case"t":t=n("\t");break;case"v":t=n("\v")}return s(t)?{type:"Character",value:t}:o()}controlLetterEscapeAtom(){this.consumeChar("c");const t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:n("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:n(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:n(this.popChar())}}}characterClass(){const t=[];let e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){const e=this.classAtom();e.type;if(l(e)&&this.isRangeDash()){this.consumeChar("-");const r=this.classAtom();r.type;if(l(r)){if(r.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}class m{visitChildren(t){for(const e in t){const r=t[e];t.hasOwnProperty(e)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Lookbehind":this.visitLookbehind(t);break;case"NegativeLookbehind":this.visitNegativeLookbehind(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitLookbehind(t){}visitNegativeLookbehind(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}},225(t,e,r){"use strict";r.d(e,{createArchitectureServices:()=>n.S});var n=r(7713);r(7492)},722(t,e,r){"use strict";r.d(e,{b:()=>c});var n=r(7492),i=r(4628),a=r(9364),s=r(4298),o=class extends n.mR{static{(0,n.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},l={parser:{TokenBuilder:(0,n.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function c(t=s.D){const e=(0,a.WQ)((0,i.u)(t),n.sr),r=(0,a.WQ)((0,i.t)({shared:e}),n.d$,l);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}(0,n.K2)(c,"createGitGraphServices")},6181(t,e,r){"use strict";r.d(e,{d:()=>p});var n=r(7492),i=r(4628),a=r(9364),s=r(4298),o=class extends n.mR{static{(0,n.K2)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},l=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,c=class extends n.dg{static{(0,n.K2)(this,"TreemapValueConverter")}runCustomConverter(t,e,r){if("NUMBER2"===t.name)return parseFloat(e.replace(/,/g,""));if("SEPARATOR"===t.name)return e.substring(1,e.length-1);if("STRING2"===t.name)return e.substring(1,e.length-1);if("INDENTATION"===t.name)return e.length;if("ClassDef"===t.name){if("string"!=typeof e)return e;const t=l.exec(e);if(t)return{$type:"ClassDefStatement",className:t[1],styleText:t[2]||void 0}}}};function h(t){const e=t.validation.TreemapValidator,r=t.validation.ValidationRegistry;if(r){const t={Treemap:e.checkSingleRoot.bind(e)};r.register(t,e)}}(0,n.K2)(h,"registerValidationChecks");var u=class{static{(0,n.K2)(this,"TreemapValidator")}checkSingleRoot(t,e){let r;for(const n of t.TreemapRows)n.item&&(void 0===r&&void 0===n.indent?r=0:(void 0===n.indent||void 0!==r&&r>=parseInt(n.indent,10))&&e("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},d={parser:{TokenBuilder:(0,n.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new c,"ValueConverter")},validation:{TreemapValidator:(0,n.K2)(()=>new u,"TreemapValidator")}};function p(t=s.D){const e=(0,a.WQ)((0,i.u)(t),n.sr),r=(0,a.WQ)((0,i.t)({shared:e}),n.XE,d);return e.ServiceRegistry.register(r),h(r),{shared:e,Treemap:r}}(0,n.K2)(p,"createTreemapServices")},2963(t,e,r){"use strict";r.d(e,{v:()=>c});var n=r(7492),i=r(4628),a=r(9364),s=r(4298),o=class extends n.mR{static{(0,n.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},l={parser:{TokenBuilder:(0,n.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function c(t=s.D){const e=(0,a.WQ)((0,i.u)(t),n.sr),r=(0,a.WQ)((0,i.t)({shared:e}),n.FZ,l);return e.ServiceRegistry.register(r),{shared:e,Info:r}}(0,n.K2)(c,"createInfoServices")},888(t,e,r){"use strict";r.d(e,{f:()=>h});var n=r(7492),i=r(4628),a=r(9364),s=r(4298),o=class extends n.mR{static{(0,n.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},l=class extends n.dg{static{(0,n.K2)(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},c={parser:{TokenBuilder:(0,n.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new l,"ValueConverter")}};function h(t=s.D){const e=(0,a.WQ)((0,i.u)(t),n.sr),r=(0,a.WQ)((0,i.t)({shared:e}),n.D_,c);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}(0,n.K2)(h,"createPieServices")},5626(t,e,r){"use strict";r.d(e,{$:()=>c});var n=r(7492),i=r(4628),a=r(9364),s=r(4298),o=class extends n.mR{static{(0,n.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},l={parser:{TokenBuilder:(0,n.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function c(t=s.D){const e=(0,a.WQ)((0,i.u)(t),n.sr),r=(0,a.WQ)((0,i.t)({shared:e}),n.p5,l);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}(0,n.K2)(c,"createPacketServices")},7492(t,e,r){"use strict";r.d(e,{mR:()=>Tr,dg:()=>xr,wV:()=>dr,Tm:()=>wr,d$:()=>pr,FZ:()=>fr,sr:()=>ur,p5:()=>gr,D_:()=>mr,Bg:()=>yr,XE:()=>vr,K2:()=>T});var n=r(2479),i=r(4628),a=r(9364),s=r(2151),o=r(4298),l=r(7608);const c={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},h={AstReflection:()=>new s.QX};function u(t){const e=function(){const t=(0,a.WQ)((0,i.u)(o.D),h),e=(0,a.WQ)((0,i.t)({shared:t}),c);return t.ServiceRegistry.register(e),e}(),r=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(r,l.r.parse(`memory:/${r.name??"grammar"}.langium`)),r}var d,p,f,g,m,y,v,b=r(5033),x=r(1945),w=Object.defineProperty,T=(t,e)=>w(t,"name",{value:e,configurable:!0});(d||(d={})).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[[\w ]+\]/},(p||(p={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(f||(f={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(g||(g={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(m||(m={})).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(y||(y={})).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(v||(v={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/};d.Terminals,p.Terminals,f.Terminals,g.Terminals,m.Terminals,y.Terminals,v.Terminals;var k="Architecture",A="accDescr",_="accTitle",E="edges",C="groups",S="junctions",R="services",L="title";T(function(t){return Xe.isInstance(t,k)},"isArchitecture");var D="Axis",N="label",I="name",M="Branch",O="name",P="order";T(function(t){return Xe.isInstance(t,M)},"isBranch");var $="Checkout",B="branch",F="CherryPicking",z="id",K="parent",q="tags",U="ClassDefStatement",j="className",G="styleText",Y="Commit",W="id",H="message",V="tags",X="type";T(function(t){return Xe.isInstance(t,Y)},"isCommit");var Z="Curve",Q="entries",J="label",tt="name",et="Direction",rt="accDescr",nt="accTitle",it="dir",at="statements",st="title",ot="Edge",lt="lhsDir",ct="lhsGroup",ht="lhsId",ut="lhsInto",dt="rhsDir",pt="rhsGroup",ft="rhsId",gt="rhsInto",mt="title",yt="Entry",vt="axis",bt="value",xt="GitGraph",wt="accDescr",Tt="accTitle",kt="statements",At="title";T(function(t){return Xe.isInstance(t,xt)},"isGitGraph");var _t="Group",Et="icon",Ct="id",St="in",Rt="title",Lt="Info",Dt="accDescr",Nt="accTitle",It="title";T(function(t){return Xe.isInstance(t,Lt)},"isInfo");var Mt="Item",Ot="classSelector",Pt="name",$t="Junction",Bt="id",Ft="in",zt="Leaf",Kt="classSelector",qt="name",Ut="value",jt="Merge",Gt="branch",Yt="id",Wt="tags",Ht="type";T(function(t){return Xe.isInstance(t,jt)},"isMerge");var Vt="Option",Xt="name",Zt="value",Qt="Packet",Jt="accDescr",te="accTitle",ee="blocks",re="title";T(function(t){return Xe.isInstance(t,Qt)},"isPacket");var ne="PacketBlock",ie="bits",ae="end",se="label",oe="start";T(function(t){return Xe.isInstance(t,ne)},"isPacketBlock");var le="Pie",ce="accDescr",he="accTitle",ue="sections",de="showData",pe="title";T(function(t){return Xe.isInstance(t,le)},"isPie");var fe="PieSection",ge="label",me="value";T(function(t){return Xe.isInstance(t,fe)},"isPieSection");var ye="Radar",ve="accDescr",be="accTitle",xe="axes",we="curves",Te="options",ke="title",Ae="Section",_e="classSelector",Ee="name",Ce="Service",Se="icon",Re="iconText",Le="id",De="in",Ne="title",Ie="Statement",Me="Treemap",Oe="accDescr",Pe="accTitle",$e="title",Be="TreemapRows";T(function(t){return Xe.isInstance(t,Me)},"isTreemap");var Fe,ze,Ke,qe,Ue,je,Ge,Ye="TreemapRow",We="indent",He="item",Ve=class extends n.kD{constructor(){super(...arguments),this.types={Architecture:{name:k,properties:{accDescr:{name:A},accTitle:{name:_},edges:{name:E,defaultValue:[]},groups:{name:C,defaultValue:[]},junctions:{name:S,defaultValue:[]},services:{name:R,defaultValue:[]},title:{name:L}},superTypes:[]},Axis:{name:D,properties:{label:{name:N},name:{name:I}},superTypes:[]},Branch:{name:M,properties:{name:{name:O},order:{name:P}},superTypes:[Ie]},Checkout:{name:$,properties:{branch:{name:B}},superTypes:[Ie]},CherryPicking:{name:F,properties:{id:{name:z},parent:{name:K},tags:{name:q,defaultValue:[]}},superTypes:[Ie]},ClassDefStatement:{name:U,properties:{className:{name:j},styleText:{name:G}},superTypes:[]},Commit:{name:Y,properties:{id:{name:W},message:{name:H},tags:{name:V,defaultValue:[]},type:{name:X}},superTypes:[Ie]},Curve:{name:Z,properties:{entries:{name:Q,defaultValue:[]},label:{name:J},name:{name:tt}},superTypes:[]},Direction:{name:et,properties:{accDescr:{name:rt},accTitle:{name:nt},dir:{name:it},statements:{name:at,defaultValue:[]},title:{name:st}},superTypes:[xt]},Edge:{name:ot,properties:{lhsDir:{name:lt},lhsGroup:{name:ct,defaultValue:!1},lhsId:{name:ht},lhsInto:{name:ut,defaultValue:!1},rhsDir:{name:dt},rhsGroup:{name:pt,defaultValue:!1},rhsId:{name:ft},rhsInto:{name:gt,defaultValue:!1},title:{name:mt}},superTypes:[]},Entry:{name:yt,properties:{axis:{name:vt,referenceType:D},value:{name:bt}},superTypes:[]},GitGraph:{name:xt,properties:{accDescr:{name:wt},accTitle:{name:Tt},statements:{name:kt,defaultValue:[]},title:{name:At}},superTypes:[]},Group:{name:_t,properties:{icon:{name:Et},id:{name:Ct},in:{name:St},title:{name:Rt}},superTypes:[]},Info:{name:Lt,properties:{accDescr:{name:Dt},accTitle:{name:Nt},title:{name:It}},superTypes:[]},Item:{name:Mt,properties:{classSelector:{name:Ot},name:{name:Pt}},superTypes:[]},Junction:{name:$t,properties:{id:{name:Bt},in:{name:Ft}},superTypes:[]},Leaf:{name:zt,properties:{classSelector:{name:Kt},name:{name:qt},value:{name:Ut}},superTypes:[Mt]},Merge:{name:jt,properties:{branch:{name:Gt},id:{name:Yt},tags:{name:Wt,defaultValue:[]},type:{name:Ht}},superTypes:[Ie]},Option:{name:Vt,properties:{name:{name:Xt},value:{name:Zt,defaultValue:!1}},superTypes:[]},Packet:{name:Qt,properties:{accDescr:{name:Jt},accTitle:{name:te},blocks:{name:ee,defaultValue:[]},title:{name:re}},superTypes:[]},PacketBlock:{name:ne,properties:{bits:{name:ie},end:{name:ae},label:{name:se},start:{name:oe}},superTypes:[]},Pie:{name:le,properties:{accDescr:{name:ce},accTitle:{name:he},sections:{name:ue,defaultValue:[]},showData:{name:de,defaultValue:!1},title:{name:pe}},superTypes:[]},PieSection:{name:fe,properties:{label:{name:ge},value:{name:me}},superTypes:[]},Radar:{name:ye,properties:{accDescr:{name:ve},accTitle:{name:be},axes:{name:xe,defaultValue:[]},curves:{name:we,defaultValue:[]},options:{name:Te,defaultValue:[]},title:{name:ke}},superTypes:[]},Section:{name:Ae,properties:{classSelector:{name:_e},name:{name:Ee}},superTypes:[Mt]},Service:{name:Ce,properties:{icon:{name:Se},iconText:{name:Re},id:{name:Le},in:{name:De},title:{name:Ne}},superTypes:[]},Statement:{name:Ie,properties:{},superTypes:[]},Treemap:{name:Me,properties:{accDescr:{name:Oe},accTitle:{name:Pe},title:{name:$e},TreemapRows:{name:Be,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Ye,properties:{indent:{name:We},item:{name:He}},superTypes:[]}}}static{T(this,"MermaidAstReflection")}},Xe=new Ve,Ze=T(()=>Fe??(Fe=u('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"ArchitectureGrammarGrammar"),Qe=T(()=>ze??(ze=u('{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"GitGraphGrammarGrammar"),Je=T(()=>Ke??(Ke=u('{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"InfoGrammarGrammar"),tr=T(()=>qe??(qe=u('{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PacketGrammarGrammar"),er=T(()=>Ue??(Ue=u('{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PieGrammarGrammar"),rr=T(()=>je??(je=u('{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}')),"RadarGrammarGrammar"),nr=T(()=>Ge??(Ge=u('{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}')),"TreemapGrammarGrammar"),ir={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ar={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},sr={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},or={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},lr={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},cr={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},hr={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ur={AstReflection:T(()=>new Ve,"AstReflection")},dr={Grammar:T(()=>Ze(),"Grammar"),LanguageMetaData:T(()=>ir,"LanguageMetaData"),parser:{}},pr={Grammar:T(()=>Qe(),"Grammar"),LanguageMetaData:T(()=>ar,"LanguageMetaData"),parser:{}},fr={Grammar:T(()=>Je(),"Grammar"),LanguageMetaData:T(()=>sr,"LanguageMetaData"),parser:{}},gr={Grammar:T(()=>tr(),"Grammar"),LanguageMetaData:T(()=>or,"LanguageMetaData"),parser:{}},mr={Grammar:T(()=>er(),"Grammar"),LanguageMetaData:T(()=>lr,"LanguageMetaData"),parser:{}},yr={Grammar:T(()=>rr(),"Grammar"),LanguageMetaData:T(()=>cr,"LanguageMetaData"),parser:{}},vr={Grammar:T(()=>nr(),"Grammar"),LanguageMetaData:T(()=>hr,"LanguageMetaData"),parser:{}},br={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},xr=class extends b.d{static{T(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){let n=this.runCommonConverter(t,e,r);return void 0===n&&(n=this.runCustomConverter(t,e,r)),void 0===n?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){const n=br[t.name];if(void 0===n)return;const i=n.exec(e);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},wr=class extends xr{static{T(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},Tr=class extends x.Q{static{T(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){const n=super.buildKeywordTokens(t,e,r);return n.forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}};(class extends Tr{static{T(this,"CommonTokenBuilder")}})},6645(t,e,r){"use strict";r.d(e,{f:()=>c});var n=r(7492),i=r(4628),a=r(9364),s=r(4298),o=class extends n.mR{static{(0,n.K2)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},l={parser:{TokenBuilder:(0,n.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function c(t=s.D){const e=(0,a.WQ)((0,i.u)(t),n.sr),r=(0,a.WQ)((0,i.t)({shared:e}),n.Bg,l);return e.ServiceRegistry.register(r),{shared:e,Radar:r}}(0,n.K2)(c,"createRadarServices")},7713(t,e,r){"use strict";r.d(e,{S:()=>h});var n=r(7492),i=r(4628),a=r(9364),s=r(4298),o=class extends n.mR{static{(0,n.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},l=class extends n.dg{static{(0,n.K2)(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){return"ARCH_ICON"===t.name?e.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===t.name?e.replace(/["()]/g,""):"ARCH_TITLE"===t.name?e.replace(/[[\]]/g,"").trim():void 0}},c={parser:{TokenBuilder:(0,n.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new l,"ValueConverter")}};function h(t=s.D){const e=(0,a.WQ)((0,i.u)(t),n.sr),r=(0,a.WQ)((0,i.t)({shared:e}),n.wV,c);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}(0,n.K2)(h,"createArchitectureServices")},2217(t,e,r){"use strict";r.d(e,{createGitGraphServices:()=>n.b});var n=r(722);r(7492)},3356(t,e,r){"use strict";r.d(e,{createInfoServices:()=>n.v});var n=r(2963);r(7492)},5149(t,e,r){"use strict";r.d(e,{createPacketServices:()=>n.$});var n=r(5626);r(7492)},8795(t,e,r){"use strict";r.d(e,{createPieServices:()=>n.f});var n=r(888);r(7492)},1903(t,e,r){"use strict";r.d(e,{createRadarServices:()=>n.f});var n=r(6645);r(7492)},4732(t,e,r){"use strict";r.d(e,{createTreemapServices:()=>n.d});var n=r(6181);r(7492)},8731(t,e,r){"use strict";r.d(e,{qg:()=>s});r(722),r(2963),r(5626),r(888),r(7713),r(6645),r(6181);var n=r(7492),i={},a={info:(0,n.K2)(async()=>{const{createInfoServices:t}=await Promise.resolve().then(r.bind(r,3356)),e=t().Info.parser.LangiumParser;i.info=e},"info"),packet:(0,n.K2)(async()=>{const{createPacketServices:t}=await Promise.resolve().then(r.bind(r,5149)),e=t().Packet.parser.LangiumParser;i.packet=e},"packet"),pie:(0,n.K2)(async()=>{const{createPieServices:t}=await Promise.resolve().then(r.bind(r,8795)),e=t().Pie.parser.LangiumParser;i.pie=e},"pie"),architecture:(0,n.K2)(async()=>{const{createArchitectureServices:t}=await Promise.resolve().then(r.bind(r,225)),e=t().Architecture.parser.LangiumParser;i.architecture=e},"architecture"),gitGraph:(0,n.K2)(async()=>{const{createGitGraphServices:t}=await Promise.resolve().then(r.bind(r,2217)),e=t().GitGraph.parser.LangiumParser;i.gitGraph=e},"gitGraph"),radar:(0,n.K2)(async()=>{const{createRadarServices:t}=await Promise.resolve().then(r.bind(r,1903)),e=t().Radar.parser.LangiumParser;i.radar=e},"radar"),treemap:(0,n.K2)(async()=>{const{createTreemapServices:t}=await Promise.resolve().then(r.bind(r,4732)),e=t().Treemap.parser.LangiumParser;i.treemap=e},"treemap")};async function s(t,e){const r=a[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);i[t]||await r();const n=i[t].parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new o(n);return n.value}(0,n.K2)(s,"parse");var o=class extends Error{constructor(t){super(`Parsing failed: ${t.lexerErrors.map(t=>t.message).join("\n")} ${t.parserErrors.map(t=>t.message).join("\n")}`),this.result=t}static{(0,n.K2)(this,"MermaidParseError")}}},724(t,e,r){"use strict";r.d(e,{ak:()=>j,mT:()=>Pn,LT:()=>Xe,jr:()=>Bn,T6:()=>dn,JG:()=>$e,wL:()=>P,c$:()=>F,Y2:()=>q,$P:()=>z,Cy:()=>K,Pp:()=>U,BK:()=>G,PW:()=>Me,my:()=>Je,jk:()=>kr,Sk:()=>Be,G:()=>Qe});var n=r(8058),i=r(2866),a=r(6401),s=r(4722),o=r(9622),l=r(53);function c(t){function e(){}e.prototype=t;const r=new e;function n(){return typeof r.bar}return n(),n(),t}const h=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n{e.accept(t)})}}class P extends O{constructor(t){super([]),this.idx=1,w(this,E(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}}class $ extends O{constructor(t){super(t.definition),this.orgText="",w(this,E(t,t=>void 0!==t))}}class B extends O{constructor(t){super(t.definition),this.ignoreAmbiguities=!1,w(this,E(t,t=>void 0!==t))}}class F extends O{constructor(t){super(t.definition),this.idx=1,w(this,E(t,t=>void 0!==t))}}class z extends O{constructor(t){super(t.definition),this.idx=1,w(this,E(t,t=>void 0!==t))}}class K extends O{constructor(t){super(t.definition),this.idx=1,w(this,E(t,t=>void 0!==t))}}class q extends O{constructor(t){super(t.definition),this.idx=1,w(this,E(t,t=>void 0!==t))}}class U extends O{constructor(t){super(t.definition),this.idx=1,w(this,E(t,t=>void 0!==t))}}class j extends O{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,w(this,E(t,t=>void 0!==t))}}class G{constructor(t){this.idx=1,w(this,E(t,t=>void 0!==t))}accept(t){t.visit(this)}}function Y(t){function e(t){return(0,s.A)(t,Y)}if(t instanceof P){const e={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return(0,p.A)(t.label)&&(e.label=t.label),e}if(t instanceof B)return{type:"Alternative",definition:e(t.definition)};if(t instanceof F)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof z)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof K)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Y(new G({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof U)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Y(new G({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof q)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof j)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof G){const e={type:"Terminal",name:t.terminalType.name,label:M(t.terminalType),idx:t.idx};(0,p.A)(t.label)&&(e.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(e.pattern=I(r)?r.source:r),e}if(t instanceof $)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}class W{visit(t){const e=t;switch(e.constructor){case P:return this.visitNonTerminal(e);case B:return this.visitAlternative(e);case F:return this.visitOption(e);case z:return this.visitRepetitionMandatory(e);case K:return this.visitRepetitionMandatoryWithSeparator(e);case U:return this.visitRepetitionWithSeparator(e);case q:return this.visitRepetition(e);case j:return this.visitAlternation(e);case G:return this.visitTerminal(e);case $:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}var H=r(3736),V=r(4288);const X=function(t,e){var r;return(0,V.A)(t,function(t,n,i){return!(r=e(t,n,i))}),!!r};var Z=r(2049),Q=r(6832);const J=function(t,e,r){var n=(0,Z.A)(t)?H.A:X;return r&&(0,Q.A)(t,e,r)&&(e=void 0),n(t,(0,k.A)(e,3))};var tt=r(5205),et=Math.max;const rt=function(t,e,r,n){t=(0,y.A)(t)?t:(0,i.A)(t),r=r&&!n?(0,u.A)(r):0;var a=t.length;return r<0&&(r=et(a+r,0)),(0,p.A)(t)?r<=a&&t.indexOf(e,r)>-1:!!a&&(0,tt.A)(t,e,r)>-1};const nt=function(t,e){for(var r=-1,n=null==t?0:t.length;++rst(t,e)):!(t instanceof P&&rt(e,t))&&(t instanceof O&&(t instanceof P&&e.push(t),at(t.definition,t=>st(t,e)))))}function ot(t){if(t instanceof P)return"SUBRULE";if(t instanceof F)return"OPTION";if(t instanceof j)return"OR";if(t instanceof z)return"AT_LEAST_ONE";if(t instanceof K)return"AT_LEAST_ONE_SEP";if(t instanceof U)return"MANY_SEP";if(t instanceof q)return"MANY";if(t instanceof G)return"CONSUME";throw Error("non exhaustive match")}class lt{walk(t,e=[]){(0,n.A)(t.definition,(r,n)=>{const i=d(t.definition,n+1);if(r instanceof P)this.walkProdRef(r,i,e);else if(r instanceof G)this.walkTerminal(r,i,e);else if(r instanceof B)this.walkFlat(r,i,e);else if(r instanceof F)this.walkOption(r,i,e);else if(r instanceof z)this.walkAtLeastOne(r,i,e);else if(r instanceof K)this.walkAtLeastOneSep(r,i,e);else if(r instanceof U)this.walkManySep(r,i,e);else if(r instanceof q)this.walkMany(r,i,e);else{if(!(r instanceof j))throw Error("non exhaustive match");this.walkOr(r,i,e)}})}walkTerminal(t,e,r){}walkProdRef(t,e,r){}walkFlat(t,e,r){const n=e.concat(r);this.walk(t,n)}walkOption(t,e,r){const n=e.concat(r);this.walk(t,n)}walkAtLeastOne(t,e,r){const n=[new F({definition:t.definition})].concat(e,r);this.walk(t,n)}walkAtLeastOneSep(t,e,r){const n=ct(t,e,r);this.walk(t,n)}walkMany(t,e,r){const n=[new F({definition:t.definition})].concat(e,r);this.walk(t,n)}walkManySep(t,e,r){const n=ct(t,e,r);this.walk(t,n)}walkOr(t,e,r){const i=e.concat(r);(0,n.A)(t.definition,t=>{const e=new B({definition:[t]});this.walk(e,i)})}}function ct(t,e,r){return[new F({definition:[new G({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var ht=r(7371);const ut=function(t){return t&&t.length?(0,ht.A)(t):[]};var dt=r(4098);function pt(t){if(t instanceof P)return pt(t.referencedRule);if(t instanceof G)return[t.terminalType];if(function(t){return t instanceof B||t instanceof F||t instanceof q||t instanceof z||t instanceof K||t instanceof U||t instanceof G||t instanceof $}(t))return function(t){let e=[];const r=t.definition;let n,i=0,a=r.length>i,s=!0;for(;a&&s;)n=r[i],s=st(n),e=e.concat(pt(n)),i+=1,a=r.length>i;return ut(e)}(t);if(function(t){return t instanceof j}(t))return function(t){const e=(0,s.A)(t.definition,t=>pt(t));return ut((0,dt.A)(e))}(t);throw Error("non exhaustive match")}const ft="_~IN~_";class gt extends lt{constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,r){}walkProdRef(t,e,r){const n=(i=t.referencedRule,a=t.idx,i.name+a+ft+this.topProd.name);var i,a;const s=e.concat(r),o=pt(new B({definition:s}));this.follows[n]=o}}var mt=r(9592),yt=r(2607),vt=r(3068),bt=r(2634),xt=r(1790);const wt=function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}};const Tt=function(t,e){return((0,Z.A)(t)?bt.A:xt.A)(t,wt((0,k.A)(e,3)))};var kt=r(9610),At=Math.max;const _t=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:(0,u.A)(r);return i<0&&(i=At(n+i,0)),(0,tt.A)(t,e,i)};var Et=r(3130),Ct=r(4092),St=r(8300),Rt=r(5530),Lt=r(7809),Dt=r(4099);const Nt=function(t,e,r,n){var i=-1,a=Rt.A,s=!0,o=t.length,l=[],c=e.length;if(!o)return l;r&&(e=(0,T.A)(e,(0,L.A)(r))),n?(a=Lt.A,s=!1):e.length>=200&&(a=Dt.A,s=!1,e=new St.A(e));t:for(;++i\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";e&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Kt(`${Wt}\n\tFailed parsing: < ${t.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function Vt(t,e,r){switch(t.type){case"Disjunction":for(let n=0;n{if("number"==typeof t)Xt(t,e,r);else{const n=t;if(!0===r)for(let t=n.from;t<=n.to;t++)Xt(t,e,r);else{for(let t=n.from;t<=n.to&&t=ve){const t=n.from>=ve?n.from:ve,r=n.to,i=xe(t),a=xe(r);for(let n=i;n<=a;n++)e[n]=n}}}});break;case"Group":Vt(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}const o=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===Qt(s)||"Group"!==s.type&&!1===o)break}break;default:throw Error("non exhaustive match!")}return(0,i.A)(e)}function Xt(t,e,r){const n=xe(t);e[n]=n,!0===r&&function(t,e){const r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){const t=xe(n.charCodeAt(0));e[t]=t}else{const t=r.toLowerCase();if(t!==r){const r=xe(t.charCodeAt(0));e[r]=r}}}(t,e)}function Zt(t,e){return(0,zt.A)(t.value,t=>{if("number"==typeof t)return rt(e,t);{const r=t;return void 0!==(0,zt.A)(e,t=>r.from<=t&&t<=r.to)}})}function Qt(t){const e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&((0,Z.A)(t.value)?at(t.value,Qt):Qt(t.value))}class Jt extends yt.z{constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t);case"Lookbehind":return void this.visitLookbehind(t);case"NegativeLookbehind":return void this.visitNegativeLookbehind(t)}super.visitChildren(t)}}visitCharacter(t){rt(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===Zt(t,this.targetCharCodes)&&(this.found=!0):void 0!==Zt(t,this.targetCharCodes)&&(this.found=!0)}}function te(t,e){if(e instanceof RegExp){const r=Gt(e),n=new Jt(t);return n.visit(r),n.found}return void 0!==(0,zt.A)(e,e=>rt(t,e.charCodeAt(0)))}const ee="PATTERN",re="defaultMode",ne="modes";let ie="boolean"==typeof new RegExp("(?:)").sticky;function ae(t,e){const r=(e=(0,vt.A)(e,{useSticky:ie,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(t,e)=>e()})).tracer;let i;r("initCharCodeToOptimizedIndexMap",()=>{!function(){if((0,a.A)(be)){be=new Array(65536);for(let t=0;t<65536;t++)be[t]=t>255?255+~~(t/255):t}}()}),r("Reject Lexer.NA",()=>{i=Tt(t,t=>t[ee]===$e.NA)});let l,c,h,u,d,f,g,m,y,v,b,x=!1;r("Transform Patterns",()=>{x=!1,l=(0,s.A)(i,t=>{const r=t[ee];if(I(r)){const t=r.source;return 1!==t.length||"^"===t||"$"===t||"."===t||r.ignoreCase?2!==t.length||"\\"!==t[0]||rt(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?e.useSticky?he(r):ce(r):t[1]:t}if((0,kt.A)(r))return x=!0,{exec:r};if("object"==typeof r)return x=!0,r;if("string"==typeof r){if(1===r.length)return r;{const t=r.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),n=new RegExp(t);return e.useSticky?he(n):ce(n)}}throw Error("non exhaustive match")})}),r("misc mapping",()=>{c=(0,s.A)(i,t=>t.tokenTypeIdx),h=(0,s.A)(i,t=>{const e=t.GROUP;if(e!==$e.SKIPPED){if((0,p.A)(e))return e;if((0,mt.A)(e))return!1;throw Error("non exhaustive match")}}),u=(0,s.A)(i,t=>{const e=t.LONGER_ALT;if(e){return(0,Z.A)(e)?(0,s.A)(e,t=>_t(i,t)):[_t(i,e)]}}),d=(0,s.A)(i,t=>t.PUSH_MODE),f=(0,s.A)(i,t=>(0,o.A)(t,"POP_MODE"))}),r("Line Terminator Handling",()=>{const t=me(e.lineTerminatorCharacters);g=(0,s.A)(i,t=>!1),"onlyOffset"!==e.positionTracking&&(g=(0,s.A)(i,e=>(0,o.A)(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===ge(e,t)&&te(t,e.PATTERN)))}),r("Misc Mapping #2",()=>{m=(0,s.A)(i,de),y=(0,s.A)(l,pe),v=(0,Et.A)(i,(t,e)=>{const r=e.GROUP;return(0,p.A)(r)&&r!==$e.SKIPPED&&(t[r]=[]),t},{}),b=(0,s.A)(l,(t,e)=>({pattern:l[e],longerAlt:u[e],canLineTerminator:g[e],isCustom:m[e],short:y[e],group:h[e],push:d[e],pop:f[e],tokenTypeIdx:c[e],tokenType:i[e]}))});let w=!0,T=[];return e.safeMode||r("First Char Optimization",()=>{T=(0,Et.A)(i,(t,r,i)=>{if("string"==typeof r.PATTERN){const e=xe(r.PATTERN.charCodeAt(0));ye(t,e,b[i])}else if((0,Z.A)(r.START_CHARS_HINT)){let e;(0,n.A)(r.START_CHARS_HINT,r=>{const n=xe("string"==typeof r?r.charCodeAt(0):r);e!==n&&(e=n,ye(t,n,b[i]))})}else if(I(r.PATTERN))if(r.PATTERN.unicode)w=!1,e.ensureOptimizations&&Kt(`${Wt}\tUnable to analyze < ${r.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const s=Ht(r.PATTERN,e.ensureOptimizations);(0,a.A)(s)&&(w=!1),(0,n.A)(s,e=>{ye(t,e,b[i])})}else e.ensureOptimizations&&Kt(`${Wt}\tTokenType: <${r.name}> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),w=!1;return t},[])}),{emptyGroups:v,patternIdxToConfig:b,charCodeToPatternIdxToConfig:T,hasCustom:x,canBeOptimized:w}}function se(t,e){let r=[];const i=function(t){const e=(0,Ct.A)(t,t=>!(0,o.A)(t,ee)),r=(0,s.A)(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:Oe.MISSING_PATTERN,tokenTypes:[t]})),n=$t(t,e);return{errors:r,valid:n}}(t);r=r.concat(i.errors);const a=function(t){const e=(0,Ct.A)(t,t=>{const e=t[ee];return!(I(e)||(0,kt.A)(e)||(0,o.A)(e,"exec")||(0,p.A)(e))}),r=(0,s.A)(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Oe.INVALID_PATTERN,tokenTypes:[t]})),n=$t(t,e);return{errors:r,valid:n}}(i.valid),l=a.valid;return r=r.concat(a.errors),r=r.concat(function(t){let e=[];const r=(0,Ct.A)(t,t=>I(t[ee]));return e=e.concat(function(t){class e extends yt.z{constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}const r=(0,Ct.A)(t,t=>{const r=t.PATTERN;try{const t=Gt(r),n=new e;return n.visit(t),n.found}catch(n){return oe.test(r.source)}}),n=(0,s.A)(r,t=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Oe.EOI_ANCHOR_FOUND,tokenTypes:[t]}));return n}(r)),e=e.concat(function(t){class e extends yt.z{constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}const r=(0,Ct.A)(t,t=>{const r=t.PATTERN;try{const t=Gt(r),n=new e;return n.visit(t),n.found}catch(n){return le.test(r.source)}}),n=(0,s.A)(r,t=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Oe.SOI_ANCHOR_FOUND,tokenTypes:[t]}));return n}(r)),e=e.concat(function(t){const e=(0,Ct.A)(t,t=>{const e=t[ee];return e instanceof RegExp&&(e.multiline||e.global)}),r=(0,s.A)(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Oe.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}));return r}(r)),e=e.concat(function(t){const e=[];let r=(0,s.A)(t,r=>(0,Et.A)(t,(t,n)=>(r.PATTERN.source!==n.PATTERN.source||rt(e,n)||n.PATTERN===$e.NA||(e.push(n),t.push(n)),t),[]));r=Bt(r);const n=(0,Ct.A)(r,t=>t.length>1),i=(0,s.A)(n,t=>{const e=(0,s.A)(t,t=>t.name);return{message:`The same RegExp pattern ->${Ft(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:Oe.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}});return i}(r)),e=e.concat(function(t){const e=(0,Ct.A)(t,t=>t.PATTERN.test("")),r=(0,s.A)(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:Oe.EMPTY_MATCH_PATTERN,tokenTypes:[t]}));return r}(r)),e}(l)),r=r.concat(function(t){const e=(0,Ct.A)(t,t=>{if(!(0,o.A)(t,"GROUP"))return!1;const e=t.GROUP;return e!==$e.SKIPPED&&e!==$e.NA&&!(0,p.A)(e)}),r=(0,s.A)(e,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Oe.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}));return r}(l)),r=r.concat(function(t,e){const r=(0,Ct.A)(t,t=>void 0!==t.PUSH_MODE&&!rt(e,t.PUSH_MODE)),n=(0,s.A)(r,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:Oe.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}));return n}(l,e)),r=r.concat(function(t){const e=[],r=(0,Et.A)(t,(t,e,r)=>{const n=e.PATTERN;return n===$e.NA||((0,p.A)(n)?t.push({str:n,idx:r,tokenType:e}):I(n)&&function(t){const e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return void 0===(0,zt.A)(e,e=>-1!==t.source.indexOf(e))}(n)&&t.push({str:n.source,idx:r,tokenType:e})),t},[]);return(0,n.A)(t,(t,i)=>{(0,n.A)(r,({str:r,idx:n,tokenType:a})=>{if(i${a.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${t.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:r,type:Oe.UNREACHABLE_PATTERN,tokenTypes:[t,a]})}})}),e}(l)),r}const oe=/[^\\][$]/;const le=/[^\\[][\^]|^\^/;function ce(t){const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function he(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function ue(t,e,r){const a=[];let s=!1;const l=Bt((0,dt.A)((0,i.A)(t.modes))),c=Tt(l,t=>t[ee]===$e.NA),h=me(r);return e&&(0,n.A)(c,t=>{const e=ge(t,h);if(!1!==e){const r=function(t,e){if(e.issue===Oe.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${t.name}> Token Type\n\t Root cause: ${e.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Oe.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <${t.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(t,e),n={message:r,type:e.issue,tokenType:t};a.push(n)}else(0,o.A)(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(s=!0):te(h,t.PATTERN)&&(s=!0)}),e&&!s&&a.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:Oe.NO_LINE_BREAKS_FLAGS}),a}function de(t){const e=t.PATTERN;if(I(e))return!1;if((0,kt.A)(e))return!0;if((0,o.A)(e,"exec"))return!0;if((0,p.A)(e))return!1;throw Error("non exhaustive match")}function pe(t){return!(!(0,p.A)(t)||1!==t.length)&&t.charCodeAt(0)}const fe={test:function(t){const e=t.length;for(let r=this.lastIndex;r(0,p.A)(t)?t.charCodeAt(0):t)}function ye(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}const ve=256;let be=[];function xe(t){return tt.CATEGORIES)));const t=$t(r,e);e=e.concat(t),(0,a.A)(t)?n=!1:r=t}return e}(t);!function(t){(0,n.A)(t,t=>{var e;De(t)||(Se[Ce]=t,t.tokenTypeIdx=Ce++),Ne(t)&&!(0,Z.A)(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Ne(t)||(t.CATEGORIES=[]),e=t,(0,o.A)(e,"categoryMatches")||(t.categoryMatches=[]),function(t){return(0,o.A)(t,"categoryMatchesMap")}(t)||(t.categoryMatchesMap={})})}(e),function(t){(0,n.A)(t,t=>{Le([],t)})}(e),function(t){(0,n.A)(t,t=>{t.categoryMatches=[],(0,n.A)(t.categoryMatchesMap,(e,r)=>{t.categoryMatches.push(Se[r].tokenTypeIdx)})})}(e),(0,n.A)(e,t=>{t.isParent=t.categoryMatches.length>0})}function Le(t,e){(0,n.A)(t,t=>{e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,n.A)(e.CATEGORIES,r=>{const n=t.concat(e);rt(n,r)||Le(n,r)})}function De(t){return(0,o.A)(t,"tokenTypeIdx")}function Ne(t){return(0,o.A)(t,"CATEGORIES")}function Ie(t){return(0,o.A)(t,"tokenTypeIdx")}const Me={buildUnableToPopLexerModeMessage:t=>`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(t,e,r,n,i,a)=>`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`};var Oe;!function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"}(Oe||(Oe={}));const Pe={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Me,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Pe);class $e{constructor(t,e=Pe){if(this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(t,e)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:n,value:i}=Ae(e),a=n>10?console.warn:console.log;return this.traceInitIndent time: ${n}ms`),this.traceInitIndent--,i}return e()},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=w({},Pe,e);const r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Pe.lineTerminatorsPattern)this.config.lineTerminatorsPattern=fe;else if(this.config.lineTerminatorCharacters===Pe.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),(0,Z.A)(t)?r={modes:{defaultMode:(0,l.A)(t)},defaultMode:re}:(i=!1,r=(0,l.A)(t))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(t){const e=[];return(0,o.A)(t,re)||e.push({message:"A MultiMode Lexer cannot be initialized without a <"+re+"> property in its definition\n",type:Oe.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,o.A)(t,ne)||e.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:Oe.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,o.A)(t,ne)&&(0,o.A)(t,re)&&!(0,o.A)(t.modes,t.defaultMode)&&e.push({message:`A MultiMode Lexer cannot be initialized with a ${re}: <${t.defaultMode}>which does not exist\n`,type:Oe.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,o.A)(t,ne)&&(0,n.A)(t.modes,(t,r)=>{(0,n.A)(t,(i,a)=>{if((0,mt.A)(i))e.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${r}> at index: <${a}>\n`,type:Oe.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if((0,o.A)(i,"LONGER_ALT")){const a=(0,Z.A)(i.LONGER_ALT)?i.LONGER_ALT:[i.LONGER_ALT];(0,n.A)(a,n=>{(0,mt.A)(n)||rt(t,n)||e.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${n.name}> on token <${i.name}> outside of mode <${r}>\n`,type:Oe.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),e}(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(ue(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes?r.modes:{},(0,n.A)(r.modes,(t,e)=>{r.modes[e]=Tt(t,t=>(0,mt.A)(t))});const h=(0,b.A)(r.modes);if((0,n.A)(r.modes,(t,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(se(t,h))}),(0,a.A)(this.lexerDefinitionErrors)){let n;Re(t),this.TRACE_INIT("analyzeTokenTypes",()=>{n=ae(t,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=n.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=n.charCodeToPatternIdxToConfig,this.emptyGroups=w({},this.emptyGroups,n.emptyGroups),this.hasCustom=n.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=n.canBeOptimized}})}),this.defaultMode=r.defaultMode,!(0,a.A)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const t=(0,s.A)(this.lexerDefinitionErrors,t=>t.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+t)}(0,n.A)(this.lexerDefinitionWarning,t=>{qt(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(ie?(this.chopInput=we.A,this.match=this.matchWithTest):(this.updateLastIndex=Te.A,this.match=this.matchWithExec),i&&(this.handleModes=Te.A),!1===this.trackStartLines&&(this.computeNewColumn=we.A),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=Te.A),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const t=(0,Et.A)(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(e.ensureOptimizations&&!(0,a.A)(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Ut={}}),this.TRACE_INIT("toFastProperties",()=>{c(this)})})}tokenize(t,e=this.defaultMode){if(!(0,a.A)(this.lexerDefinitionErrors)){const t=(0,s.A)(this.lexerDefinitionErrors,t=>t.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+t)}return this.tokenizeInternal(t,e)}tokenizeInternal(t,e){let r,i,a,s,o,l,c,h,u,d,p,f,g,m,y;const v=t,x=v.length;let w=0,T=0;const k=this.hasCustom?0:Math.floor(t.length/10),A=new Array(k),_=[];let E=this.trackStartLines?1:void 0,C=this.trackStartLines?1:void 0;const S=function(t){const e={},r=(0,b.A)(t);return(0,n.A)(r,r=>{const n=t[r];if(!(0,Z.A)(n))throw Error("non exhaustive match");e[r]=[]}),e}(this.emptyGroups),R=this.trackStartLines,L=this.config.lineTerminatorsPattern;let D=0,N=[],I=[];const M=[],O=[];let P;function $(){return N}function B(t){const e=xe(t),r=I[e];return void 0===r?O:r}Object.freeze(O);const F=t=>{if(1===M.length&&void 0===t.tokenType.PUSH_MODE){const e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);_.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})}else{M.pop();const t=(0,ke.A)(M);N=this.patternIdxToConfig[t],I=this.charCodeToPatternIdxToConfig[t],D=N.length;const e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;P=I&&e?B:$}};function z(t){M.push(t),I=this.charCodeToPatternIdxToConfig[t],N=this.patternIdxToConfig[t],D=N.length,D=N.length;const e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;P=I&&e?B:$}let K;z.call(this,e);const q=this.config.recoveryEnabled;for(;wl.length){l=s,c=h,K=e;break}}}break}}if(null!==l){if(u=l.length,d=K.group,void 0!==d&&(p=K.tokenTypeIdx,f=this.createTokenInstance(l,w,p,K.tokenType,E,C,u),this.handlePayload(f,c),!1===d?T=this.addToken(A,T,f):S[d].push(f)),t=this.chopInput(t,u),w+=u,C=this.computeNewColumn(C,u),!0===R&&!0===K.canLineTerminator){let t,e,r=0;L.lastIndex=0;do{t=L.test(l),!0===t&&(e=L.lastIndex-1,r++)}while(!0===t);0!==r&&(E+=r,C=u-e,this.updateTokenEndLineColumnLocation(f,d,e,r,E,C,u))}this.handleModes(K,F,z,f)}else{const e=w,r=E,n=C;let a=!1===q;for(;!1===a&&w`Expecting ${Fe(t)?`--\x3e ${Be(t)} <--`:`token of type --\x3e ${t.name} <--`} but found --\x3e '${e.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:t,ruleName:e})=>"Redundant input, expecting EOF but found: "+t.image,buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){const a="Expecting: ",o="\nbut found: '"+Ft(e).image+"'";if(n)return a+n+o;{const e=(0,Et.A)(t,(t,e)=>t.concat(e),[]),r=(0,s.A)(e,t=>`[${(0,s.A)(t,t=>Be(t)).join(", ")}]`);return a+`one of these possible Token sequences:\n${(0,s.A)(r,(t,e)=>` ${e+1}. ${t}`).join("\n")}`+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){const i="Expecting: ",a="\nbut found: '"+Ft(e).image+"'";if(r)return i+r+a;return i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${(0,s.A)(t,t=>`[${(0,s.A)(t,t=>Be(t)).join(",")}]`).join(" ,")}>`+a}};Object.freeze(Je);const tr={buildRuleNotFoundError:(t,e)=>"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"},er={buildDuplicateFoundError(t,e){const r=t.name,n=Ft(e),i=n.idx,a=ot(n),s=(o=n)instanceof G?o.terminalType.name:o instanceof P?o.nonTerminalName:"";var o;let l=`->${a}${i>0?i:""}<- ${s?`with argument: ->${s}<-`:""}\n appears more than once (${e.length} times) in the top level rule: ->${r}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,"\n"),l},buildNamespaceConflictError:t=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(t){const e=(0,s.A)(t.prefixPath,t=>Be(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(t){const e=(0,s.A)(t.prefixPath,t=>Be(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n},buildEmptyRepetitionError(t){let e=ot(t.repetition);0!==t.repetition.idx&&(e+=t.repetition.idx);return`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:t=>"deprecated",buildEmptyAlternationError:t=>`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in inside <${t.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:t=>`An Alternation cannot have more than 256 alternatives:\n inside <${t.topLevelRule.name}> Rule.\n has ${t.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(t){const e=t.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${e}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${e} --\x3e ${(0,s.A)(t.leftRecursionPath,t=>t.name).concat([e]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:t=>"deprecated",buildDuplicateRuleNameError(t){let e;e=t.topLevelRule instanceof $?t.topLevelRule.name:t.topLevelRule;return`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};class rr extends W{constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){(0,n.A)((0,i.A)(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){const e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{const e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:e,type:Mn.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}}var nr=r(8139),ir=r(2528);const ar=function(t,e,r,n){for(var i=-1,a=null==t?0:t.length;++i{!1===(0,a.A)(t.definition)&&(i=o(t.definition))}),i;if(!(e instanceof G))throw Error("non exhaustive match");r.push(e.terminalType)}}s++}return i.push({partialPath:r,suffixDef:d(t,s)}),i}function br(t,e,r,n){const i="EXIT_NONE_TERMINAL",s=[i],o="EXIT_ALTERNATIVE";let c=!1;const h=e.length,u=h-n-1,p=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!(0,a.A)(f);){const t=f.pop();if(t===o){c&&(0,ke.A)(f).idx<=u&&f.pop();continue}const n=t.def,g=t.idx,m=t.ruleStack,y=t.occurrenceStack;if((0,a.A)(n))continue;const v=n[0];if(v===i){const t={idx:g,def:d(n),ruleStack:hr(m),occurrenceStack:hr(y)};f.push(t)}else if(v instanceof G)if(g=0;e--){const t={idx:g,def:v.definition[e].definition.concat(d(n)),ruleStack:m,occurrenceStack:y};f.push(t),f.push(o)}else if(v instanceof B)f.push({idx:g,def:v.definition.concat(d(n)),ruleStack:m,occurrenceStack:y});else{if(!(v instanceof $))throw Error("non exhaustive match");f.push(xr(v,g,m,y))}}return p}function xr(t,e,r,n){const i=(0,l.A)(r);i.push(t.name);const a=(0,l.A)(n);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}var wr;function Tr(t){if(t instanceof F||"Option"===t)return wr.OPTION;if(t instanceof q||"Repetition"===t)return wr.REPETITION;if(t instanceof z||"RepetitionMandatory"===t)return wr.REPETITION_MANDATORY;if(t instanceof K||"RepetitionMandatoryWithSeparator"===t)return wr.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof U||"RepetitionWithSeparator"===t)return wr.REPETITION_WITH_SEPARATOR;if(t instanceof j||"Alternation"===t)return wr.ALTERNATION;throw Error("non exhaustive match")}function kr(t){const{occurrence:e,rule:r,prodType:n,maxLookahead:i}=t,a=Tr(n);return a===wr.ALTERNATION?Nr(e,r,i):Ir(e,r,a,i)}function Ar(t,e,r,i){const a=t.length,l=at(t,t=>at(t,t=>1===t.length));if(e)return function(e){const n=(0,s.A)(e,t=>t.GATE);for(let i=0;i(0,dt.A)(t)),r=(0,Et.A)(e,(t,e,r)=>((0,n.A)(e,e=>{(0,o.A)(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=r),(0,n.A)(e.categoryMatches,e=>{(0,o.A)(t,e)||(t[e]=r)})}),t),{});return function(){const t=this.LA(1);return r[t.tokenTypeIdx]}}return function(){for(let e=0;e1===t.length),s=t.length;if(i&&!r){const e=(0,dt.A)(t);if(1===e.length&&(0,a.A)(e[0].categoryMatches)){const t=e[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{const t=(0,Et.A)(e,(t,e,r)=>(t[e.tokenTypeIdx]=!0,(0,n.A)(e.categoryMatches,e=>{t[e]=!0}),t),[]);return function(){const e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){t:for(let r=0;rvr([t],1)),i=Sr(r.length),o=(0,s.A)(r,t=>{const e={};return(0,n.A)(t,t=>{const r=Rr(t.partialPath);(0,n.A)(r,t=>{e[t]=!0})}),e});let l=r;for(let s=1;s<=e;s++){const t=l;l=Sr(t.length);for(let r=0;r{const e=Rr(t.partialPath);(0,n.A)(e,t=>{o[r][t]=!0})})}}}}return i}function Nr(t,e,r,n){const i=new Cr(t,wr.ALTERNATION,n);return e.accept(i),Dr(i.result,r)}function Ir(t,e,r,n){const i=new Cr(t,r);e.accept(i);const a=i.result,s=new Er(e,t,r).startWalking();return Dr([new B({definition:a}),new B({definition:s})],n)}function Mr(t,e){t:for(let r=0;rat(t,t=>at(t,t=>(0,a.A)(t.categoryMatches))))}function Pr(t,e,r,a){const o=(0,nr.A)(t,t=>function(t,e){const r=new Fr;t.accept(r);const n=r.allProductions,a=cr(n,$r),o=E(a,t=>t.length>1),l=(0,s.A)((0,i.A)(o),r=>{const n=Ft(r),i=e.buildDuplicateFoundError(t,r),a=ot(n),s={message:i,type:Mn.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:a,occurrence:n.idx},o=Br(n);return o&&(s.parameter=o),s});return l}(t,r)),l=function(t,e,r){const i=[],a=(0,s.A)(e,t=>t.name);return(0,n.A)(t,t=>{const e=t.name;if(rt(a,e)){const n=r.buildNamespaceConflictError(t);i.push({message:n,type:Mn.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e})}}),i}(t,e,r),c=(0,nr.A)(t,t=>function(t,e){const r=new qr;t.accept(r);const n=r.alternations,i=(0,nr.A)(n,r=>r.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:r}),type:Mn.TOO_MANY_ALTS,ruleName:t.name,occurrence:r.idx}]:[]);return i}(t,r)),h=(0,nr.A)(t,e=>function(t,e,r,n){const i=[],a=(0,Et.A)(e,(e,r)=>r.name===t.name?e+1:e,0);if(a>1){const e=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:e,type:Mn.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}(e,t,a,r));return o.concat(l,c,h)}function $r(t){return`${ot(t)}_#_${t.idx}_#_${Br(t)}`}function Br(t){return t instanceof G?t.terminalType.name:t instanceof P?t.nonTerminalName:""}class Fr extends W{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}}function zr(t,e,r,n=[]){const i=[],s=Kr(e.definition);if((0,a.A)(s))return[];{const e=t.name;rt(s,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:Mn.LEFT_RECURSION,ruleName:e});const a=$t(s,n.concat([t])),o=(0,nr.A)(a,e=>{const i=(0,l.A)(n);return i.push(e),zr(t,e,r,i)});return i.concat(o)}}function Kr(t){let e=[];if((0,a.A)(t))return e;const r=Ft(t);if(r instanceof P)e.push(r.referencedRule);else if(r instanceof B||r instanceof F||r instanceof z||r instanceof K||r instanceof U||r instanceof q)e=e.concat(Kr(r.definition));else if(r instanceof j)e=(0,dt.A)((0,s.A)(r.definition,t=>Kr(t.definition)));else if(!(r instanceof G))throw Error("non exhaustive match");const n=st(r),i=t.length>1;if(n&&i){const r=d(t);return e.concat(Kr(r))}return e}class qr extends W{constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}}function Ur(t,e,r){const i=new qr;t.accept(i);let a=i.alternations;a=Tt(a,t=>!0===t.ignoreAmbiguities);const o=(0,nr.A)(a,i=>{const a=i.idx,o=i.maxLookahead||e,l=Nr(a,t,o,i),c=function(t,e,r,i){const a=[],o=(0,Et.A)(t,(r,i,s)=>(!0===e.definition[s].ignoreAmbiguities||(0,n.A)(i,i=>{const o=[s];(0,n.A)(t,(t,r)=>{s!==r&&Mr(t,i)&&!0!==e.definition[r].ignoreAmbiguities&&o.push(r)}),o.length>1&&!Mr(a,i)&&(a.push(i),r.push({alts:o,path:i}))}),r),[]),l=(0,s.A)(o,t=>{const n=(0,s.A)(t.alts,t=>t+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:n,prefixPath:t.path}),type:Mn.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:t.alts}});return l}(l,i,t,r),h=function(t,e,r,n){const i=(0,Et.A)(t,(t,e,r)=>{const n=(0,s.A)(e,t=>({idx:r,path:t}));return t.concat(n)},[]),a=Bt((0,nr.A)(i,t=>{if(!0===e.definition[t.idx].ignoreAmbiguities)return[];const a=t.idx,o=t.path,l=(0,Ct.A)(i,t=>{return!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx{const r=n[e];return t===r||r.categoryMatchesMap[t.tokenTypeIdx]}));var r,n});return(0,s.A)(l,t=>{const i=[t.idx+1,a+1],s=0===e.idx?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:i,prefixPath:t.path}),type:Mn.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:s,alternatives:i}})}));return a}(l,i,t,r);return c.concat(h)});return o}class jr extends W{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}}function Gr(t){const e=(0,vt.A)(t,{errMsgProvider:tr}),r={};return(0,n.A)(t.rules,t=>{r[t.name]=t}),function(t,e){const r=new rr(t,e);return r.resolveRefs(),r.errors}(r,e.errMsgProvider)}const Yr="MismatchedTokenException",Wr="NoViableAltException",Hr="EarlyExitException",Vr="NotAllInputParsedException",Xr=[Yr,Wr,Hr,Vr];function Zr(t){return rt(Xr,t.name)}Object.freeze(Xr);class Qr extends Error{constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class Jr extends Qr{constructor(t,e,r){super(t,e),this.previousToken=r,this.name=Yr}}class tn extends Qr{constructor(t,e,r){super(t,e),this.previousToken=r,this.name=Wr}}class en extends Qr{constructor(t,e){super(t,e),this.name=Vr}}class rn extends Qr{constructor(t,e,r){super(t,e),this.previousToken=r,this.name=Hr}}const nn={},an="InRuleRecoveryException";class sn extends Error{constructor(t){super(t),this.name=an}}function on(t,e,r,n,i,a,s){const o=this.getKeyForAutomaticLookahead(n,i);let l=this.firstAfterRepMap[o];if(void 0===l){const t=this.getCurrRuleFullName();l=new a(this.getGAstProductions()[t],i).startWalking(),this.firstAfterRepMap[o]=l}let c=l.token,h=l.occurrence;const u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=Xe,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(t,e,r,c)}const ln=1024,cn=1280,hn=1536;function un(t,e,r){return r|e|t}class dn{constructor(t){var e;this.maxLookahead=null!==(e=null==t?void 0:t.maxLookahead)&&void 0!==e?e:Nn.maxLookahead}validate(t){const e=this.validateNoLeftRecursion(t.rules);if((0,a.A)(e)){const r=this.validateEmptyOrAlternatives(t.rules),n=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...e,...r,...n,...i]}return e}validateNoLeftRecursion(t){return(0,nr.A)(t,t=>zr(t,t,er))}validateEmptyOrAlternatives(t){return(0,nr.A)(t,t=>function(t,e){const r=new qr;t.accept(r);const n=r.alternations;return(0,nr.A)(n,r=>{const n=hr(r.definition);return(0,nr.A)(n,(n,i)=>{const s=br([n],[],_e,1);return(0,a.A)(s)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:r,emptyChoiceIdx:i}),type:Mn.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:r.idx,alternative:i+1}]:[]})})}(t,er))}validateAmbiguousAlternationAlternatives(t,e){return(0,nr.A)(t,t=>Ur(t,e,er))}validateSomeNonEmptyLookaheadPath(t,e){return function(t,e,r){const i=[];return(0,n.A)(t,t=>{const s=new jr;t.accept(s);const o=s.allProductions;(0,n.A)(o,n=>{const s=Tr(n),o=n.maxLookahead||e,l=Ir(n.idx,t,s,o)[0];if((0,a.A)((0,dt.A)(l))){const e=r.buildEmptyRepetitionError({topLevelRule:t,repetition:n});i.push({message:e,type:Mn.NO_NON_EMPTY_LOOKAHEAD,ruleName:t.name})}})}),i}(t,e,er)}buildLookaheadForAlternation(t){return function(t,e,r,n,i,a){const s=Nr(t,e,r);return a(s,n,Or(s)?Ee:_e,i)}(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Ar)}buildLookaheadForOptional(t){return function(t,e,r,n,i,a){const s=Ir(t,e,i,r),o=Or(s)?Ee:_e;return a(s[0],o,n)}(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,Tr(t.prodType),_r)}}const pn=new class extends W{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}};function fn(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset!1===(0,kt.A)(t[e])),n=(0,s.A)(r,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:bn.MISSING_METHOD,methodName:e}));return Bt(n)}(t,e);return r}(this,e);if(!(0,a.A)(t)){const e=(0,s.A)(t,t=>t.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${e.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(r.prototype=n).constructor=r,r._RULE_NAMES=e,r}var bn;!function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"}(bn||(bn={}));var xn=r(3149);const wn={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(wn);const Tn=!0,kn=Math.pow(2,8)-1,An=Ve({name:"RECORDING_PHASE_TOKEN",pattern:$e.NA});Re([An]);const _n=Ze(An,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(_n);const En={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};function Cn(t,e,r,n=!1){Ln(r);const i=(0,ke.A)(this.recordingProdStack),a=(0,kt.A)(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),(0,o.A)(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),wn}function Sn(t,e){Ln(e);const r=(0,ke.A)(this.recordingProdStack),i=!1===(0,Z.A)(t),a=!1===i?t:t.DEF,s=new j({definition:[],idx:e,ignoreAmbiguities:i&&!0===t.IGNORE_AMBIGUITIES});(0,o.A)(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);const l=J(a,t=>(0,kt.A)(t.GATE));return s.hasPredicates=l,r.definition.push(s),(0,n.A)(a,t=>{const e=new B({definition:[]});s.definition.push(e),(0,o.A)(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:(0,o.A)(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),wn}function Rn(t){return 0===t?"":`${t}`}function Ln(t){if(t<0||t>kn){const e=new Error(`Invalid DSL Method idx value: <${t}>\n\tIdx value must be a none negative value smaller than ${kn+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}const Dn=Ze(Xe,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Dn);const Nn=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Je,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),In=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Mn,On;function Pn(t=void 0){return function(){return t}}!function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"}(Mn||(Mn={}));class $n{static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;const e=this.className;this.TRACE_INIT("toFastProps",()=>{c(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),(0,n.A)(this.definedRulesNames,t=>{const e=this[t].originalGrammarAction;let r;this.TRACE_INIT(`${t} Rule`,()=>{r=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=r})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=Gr({rules:(0,i.A)(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if((0,a.A)(r)&&!1===this.skipValidations){const r=(t={rules:(0,i.A)(this.gastProductionsCache),tokenTypes:(0,i.A)(this.tokensMap),errMsgProvider:er,grammarName:e},Pr((t=(0,vt.A)(t,{errMsgProvider:er})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)),n=function(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return(0,s.A)(e,t=>Object.assign({type:Mn.CUSTOM_LOOKAHEAD_VALIDATION},t))}({lookaheadStrategy:this.lookaheadStrategy,rules:(0,i.A)(this.gastProductionsCache),tokenTypes:(0,i.A)(this.tokensMap),grammarName:e});this.definitionErrors=this.definitionErrors.concat(r,n)}var t}),(0,a.A)(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const t=function(t){const e={};return(0,n.A)(t,t=>{const r=new gt(t).startWalking();w(e,r)}),e}((0,i.A)(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null===(e=(t=this.lookaheadStrategy).initialize)||void 0===e||e.call(t,{rules:(0,i.A)(this.gastProductionsCache)}),this.preComputeLookaheadFunctions((0,i.A)(this.gastProductionsCache))})),!$n.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,a.A)(this.definitionErrors))throw t=(0,s.A)(this.definitionErrors,t=>t.message),new Error(`Parser Definition Errors detected:\n ${t.join("\n-------------------------------\n")}`)})}constructor(t,e){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(e),r.initLexerAdapter(),r.initLooksAhead(e),r.initRecognizerEngine(t,e),r.initRecoverable(e),r.initTreeBuilder(e),r.initContentAssist(),r.initGastRecorder(e),r.initPerformanceTracer(e),(0,o.A)(e,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=(0,o.A)(e,"skipValidations")?e.skipValidations:Nn.skipValidations}}$n.DEFER_DEFINITION_ERRORS_HANDLING=!1,On=$n,[class{initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,o.A)(t,"recoveryEnabled")?t.recoveryEnabled:Nn.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=on)}getTokenToInsert(t){const e=Ze(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,r,n){const i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[];let o=!1;const l=this.LA(1);let c=this.LA(1);const h=()=>{const t=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:t,ruleName:this.getCurrRuleFullName()}),r=new Jr(e,l,this.LA(0));r.resyncedTokens=hr(s),this.SAVE_ERROR(r)};for(;!o;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,r){return!1!==r&&!this.tokenMatcher(this.LA(1),t)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e))}getFollowsForInRuleRecovery(t,e){const r=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){const t=this.SKIP_TOKEN();return this.consumeToken(),t}throw new sn("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if((0,a.A)(e))return!1;const r=this.LA(1);return void 0!==(0,zt.A)(e,t=>this.tokenMatcher(r,t))}canRecoverWithSingleTokenDeletion(t){return!!this.canTokenTypeBeDeletedInRecovery(t)&&this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){const e=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(e);return rt(r,t)}findReSyncTokenType(){const t=this.flattenFollowSet();let e=this.LA(1),r=2;for(;;){const n=(0,zt.A)(t,t=>Qe(e,t));if(void 0!==n)return n;e=this.LA(r),r++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return nn;const t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const t=this.RULE_STACK,e=this.RULE_OCCURRENCE_STACK;return(0,s.A)(t,(r,n)=>0===n?nn:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:e[n],inRule:this.shortRuleNameToFullName(t[n-1])})}flattenFollowSet(){const t=(0,s.A)(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return(0,dt.A)(t)}getFollowSetFromFollowKey(t){if(t===nn)return[Xe];const e=t.ruleName+t.idxInCallingRule+ft+t.inRule;return this.resyncFollows[e]}addToResyncTokens(t,e){return this.tokenMatcher(t,Xe)||e.push(t),e}reSyncTo(t){const e=[];let r=this.LA(1);for(;!1===this.tokenMatcher(r,t);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,e);return hr(e)}attemptInRepetitionRecovery(t,e,r,n,i,a,s){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,l.A)(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return(0,s.A)(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},class{initLooksAhead(t){this.dynamicTokensEnabled=(0,o.A)(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:Nn.dynamicTokensEnabled,this.maxLookahead=(0,o.A)(t,"maxLookahead")?t.maxLookahead:Nn.maxLookahead,this.lookaheadStrategy=(0,o.A)(t,"lookaheadStrategy")?t.lookaheadStrategy:new dn({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){(0,n.A)(t,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{const{alternation:e,repetition:r,option:i,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:o}=function(t){pn.reset(),t.accept(pn);const e=pn.dslMethods;return pn.reset(),e}(t);(0,n.A)(e,e=>{const r=0===e.idx?"":e.idx;this.TRACE_INIT(`${ot(e)}${r}`,()=>{const r=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:e.idx,rule:t,maxLookahead:e.maxLookahead||this.maxLookahead,hasPredicates:e.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),n=un(this.fullRuleNameToShort[t.name],256,e.idx);this.setLaFuncCache(n,r)})}),(0,n.A)(r,e=>{this.computeLookaheadFunc(t,e.idx,768,"Repetition",e.maxLookahead,ot(e))}),(0,n.A)(i,e=>{this.computeLookaheadFunc(t,e.idx,512,"Option",e.maxLookahead,ot(e))}),(0,n.A)(a,e=>{this.computeLookaheadFunc(t,e.idx,ln,"RepetitionMandatory",e.maxLookahead,ot(e))}),(0,n.A)(s,e=>{this.computeLookaheadFunc(t,e.idx,hn,"RepetitionMandatoryWithSeparator",e.maxLookahead,ot(e))}),(0,n.A)(o,e=>{this.computeLookaheadFunc(t,e.idx,cn,"RepetitionWithSeparator",e.maxLookahead,ot(e))})})})}computeLookaheadFunc(t,e,r,n,i,a){this.TRACE_INIT(`${a}${0===e?"":e}`,()=>{const a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:e,rule:t,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),s=un(this.fullRuleNameToShort[t.name],r,e);this.setLaFuncCache(s,a)})}getKeyForAutomaticLookahead(t,e){return un(this.getLastExplicitRuleShortName(),t,e)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},class{initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(0,o.A)(t,"nodeLocationTracking")?t.nodeLocationTracking:Nn.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=gn,this.setNodeLocationFromNode=gn,this.cstPostRule=Te.A,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Te.A,this.setNodeLocationFromNode=Te.A,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=fn,this.setNodeLocationFromNode=fn,this.cstPostRule=Te.A,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Te.A,this.setNodeLocationFromNode=Te.A,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=Te.A,this.setNodeLocationFromNode=Te.A,this.cstPostRule=Te.A,this.setInitialNodeLocation=Te.A}else this.cstInvocationStateUpdate=Te.A,this.cstFinallyStateUpdate=Te.A,this.cstPostTerminal=Te.A,this.cstPostNonTerminal=Te.A,this.cstPostRule=Te.A}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){const e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){const e={name:t,children:Object.create(null)};this.setInitialNodeLocation(e),this.CST_STACK.push(e)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){const e=this.LA(0),r=t.location;r.startOffset<=e.startOffset==1?(r.endOffset=e.endOffset,r.endLine=e.endLine,r.endColumn=e.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(t){const e=this.LA(0),r=t.location;r.startOffset<=e.startOffset==1?r.endOffset=e.endOffset:r.startOffset=NaN}cstPostTerminal(t,e){const r=this.CST_STACK[this.CST_STACK.length-1];var n,i,a;i=e,a=t,void 0===(n=r).children[a]?n.children[a]=[i]:n.children[a].push(i),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){const r=this.CST_STACK[this.CST_STACK.length-1];!function(t,e,r){void 0===t.children[e]?t.children[e]=[r]:t.children[e].push(r)}(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){if((0,mt.A)(this.baseCstVisitorConstructor)){const t=vn(this.className,(0,b.A)(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,mt.A)(this.baseCstVisitorWithDefaultsConstructor)){const t=function(t,e,r){const i=function(){};mn(i,t+"BaseSemanticsWithDefaults");const a=Object.create(r.prototype);return(0,n.A)(e,t=>{a[t]=yn}),(i.prototype=a).constructor=i,i}(this.className,(0,b.A)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){const t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){const t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Dn}LA(t){const e=this.currIdx+t;return e<0||this.tokVectorLength<=e?Dn:this.tokVector[e]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ee,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,o.A)(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,Z.A)(t)){if((0,a.A)(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,Z.A)(t))this.tokensMap=(0,Et.A)(t,(t,e)=>(t[e.name]=e,t),{});else if((0,o.A)(t,"modes")&&at((0,dt.A)((0,i.A)(t.modes)),Ie)){const e=(0,dt.A)((0,i.A)(t.modes)),r=ut(e);this.tokensMap=(0,Et.A)(r,(t,e)=>(t[e.name]=e,t),{})}else{if(!(0,xn.A)(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,l.A)(t)}this.tokensMap.EOF=Xe;const r=(0,o.A)(t,"modes")?(0,dt.A)((0,i.A)(t.modes)):(0,i.A)(t),n=at(r,t=>(0,a.A)(t.categoryMatches));this.tokenMatcher=n?Ee:_e,Re((0,i.A)(this.tokensMap))}defineRule(t,e,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const n=(0,o.A)(r,"resyncEnabled")?r.resyncEnabled:In.resyncEnabled,i=(0,o.A)(r,"recoveryValueFunc")?r.recoveryValueFunc:In.recoveryValueFunc,a=this.ruleShortNameIdx<<12;let s;return this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a,s=!0===this.outputCst?function(...r){try{this.ruleInvocationStateUpdate(a,t,this.subruleIdx),e.apply(this,r);const n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}catch(s){return this.invokeRuleCatch(s,n,i)}finally{this.ruleFinallyStateUpdate()}}:function(...r){try{return this.ruleInvocationStateUpdate(a,t,this.subruleIdx),e.apply(this,r)}catch(s){return this.invokeRuleCatch(s,n,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(s,{ruleName:t,originalGrammarAction:e})}invokeRuleCatch(t,e,r){const n=1===this.RULE_STACK.length,i=e&&!this.isBackTracking()&&this.recoveryEnabled;if(Zr(t)){const e=t;if(i){const n=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(n)){if(e.resyncedTokens=this.reSyncTo(n),this.outputCst){const t=this.CST_STACK[this.CST_STACK.length-1];return t.recoveredNode=!0,t}return r(t)}if(this.outputCst){const t=this.CST_STACK[this.CST_STACK.length-1];t.recoveredNode=!0,e.partialCstResult=t}throw e}if(n)return this.moveToTerminatedState(),r(t);throw e}throw t}optionInternal(t,e){const r=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,r)}optionInternalLogic(t,e,r){let n,i=this.getLaFuncFromCache(r);if("function"!=typeof t){n=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else n=t;if(!0===i.call(this))return n.call(this)}atLeastOneInternal(t,e){const r=this.getKeyForAutomaticLookahead(ln,t);return this.atLeastOneInternalLogic(t,e,r)}atLeastOneInternalLogic(t,e,r){let n,i=this.getLaFuncFromCache(r);if("function"!=typeof e){n=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else n=e;if(!0!==i.call(this))throw this.raiseEarlyExitException(t,wr.REPETITION_MANDATORY,e.ERR_MSG);{let t=this.doSingleRepetition(n);for(;!0===i.call(this)&&!0===t;)t=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],i,ln,t,mr)}atLeastOneSepFirstInternal(t,e){const r=this.getKeyForAutomaticLookahead(hn,t);this.atLeastOneSepFirstInternalLogic(t,e,r)}atLeastOneSepFirstInternalLogic(t,e,r){const n=e.DEF,i=e.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(t,wr.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);{n.call(this);const e=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,n,yr],e,hn,t,yr)}}manyInternal(t,e){const r=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,r)}manyInternalLogic(t,e,r){let n,i=this.getLaFuncFromCache(r);if("function"!=typeof e){n=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else n=e;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],i,768,t,fr,a)}manySepFirstInternal(t,e){const r=this.getKeyForAutomaticLookahead(cn,t);this.manySepFirstInternalLogic(t,e,r)}manySepFirstInternalLogic(t,e,r){const n=e.DEF,i=e.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){n.call(this);const e=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,n,gr],e,cn,t,gr)}}repetitionSepSecondInternal(t,e,r,n,i){for(;r();)this.CONSUME(e),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,r,n,i],r,hn,t,i)}doSingleRepetition(t){const e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){const r=this.getKeyForAutomaticLookahead(256,e),n=(0,Z.A)(t)?t:t.DEF,i=this.getLaFuncFromCache(r).call(this,n);if(void 0!==i)return n[i].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new en(e,t))}}subruleInternal(t,e,r){let n;try{const i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=e,n=t.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:t.ruleName),n}catch(i){throw this.subruleInternalError(i,r,t.ruleName)}}subruleInternalError(t,e,r){throw Zr(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:r),delete t.partialCstResult),t}consumeInternal(t,e,r){let n;try{const e=this.LA(1);!0===this.tokenMatcher(e,t)?(this.consumeToken(),n=e):this.consumeInternalError(t,e,r)}catch(i){n=this.consumeInternalRecovery(t,e,i)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:t.name,n),n}consumeInternalError(t,e,r){let n;const i=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Jr(n,e,i))}consumeInternalRecovery(t,e,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;{const i=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,i)}catch(n){throw n.name===an?r:n}}}saveRecogState(){const t=this.errors,e=(0,l.A)(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Xe)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(t){return t.call(this)}consume(t,e,r){return this.consumeInternal(e,t,r)}subrule(t,e,r){return this.subruleInternal(e,t,r)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,r=In){if(rt(this.definedRulesNames,t)){const e={message:er.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Mn.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(e)}this.definedRulesNames.push(t);const n=this.defineRule(t,e,r);return this[t]=n,n}OVERRIDE_RULE(t,e,r=In){const n=function(t,e,r){const n=[];let i;return rt(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Mn.INVALID_RULE_OVERRIDE,ruleName:t})),n}(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);const i=this.defineRule(t,e,r);return this[t]=i,i}BACKTRACK(t,e){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return t.apply(this,e),!0}catch(n){if(Zr(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return t=(0,i.A)(this.gastProductionsCache),(0,s.A)(t,Y);var t}},class{initErrorHandler(t){this._errors=[],this.errorMessageProvider=(0,o.A)(t,"errorMessageProvider")?t.errorMessageProvider:Nn.errorMessageProvider}SAVE_ERROR(t){if(Zr(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,l.A)(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return(0,l.A)(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){const n=this.getCurrRuleFullName(),i=Ir(t,this.getGAstProductions()[n],e,this.maxLookahead)[0],a=[];for(let o=1;o<=this.maxLookahead;o++)a.push(this.LA(o));const s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:a,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new rn(s,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){const r=this.getCurrRuleFullName(),n=Nr(t,this.getGAstProductions()[r],this.maxLookahead),i=[];for(let o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));const a=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:i,previous:a,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new tn(s,this.LA(1),a))}},class{initContentAssist(){}computeContentAssist(t,e){const r=this.gastProductionsCache[t];if((0,mt.A)(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return br([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){const e=Ft(t.ruleStack),r=this.getGAstProductions()[e];return new dr(r,t).startWalking()}},class{initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let t=0;t<10;t++){const e=t>0?t:"";this[`CONSUME${e}`]=function(e,r){return this.consumeInternalRecord(e,t,r)},this[`SUBRULE${e}`]=function(e,r){return this.subruleInternalRecord(e,t,r)},this[`OPTION${e}`]=function(e){return this.optionInternalRecord(e,t)},this[`OR${e}`]=function(e){return this.orInternalRecord(e,t)},this[`MANY${e}`]=function(e){this.manyInternalRecord(t,e)},this[`MANY_SEP${e}`]=function(e){this.manySepFirstInternalRecord(t,e)},this[`AT_LEAST_ONE${e}`]=function(e){this.atLeastOneInternalRecord(t,e)},this[`AT_LEAST_ONE_SEP${e}`]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}}this.consume=function(t,e,r){return this.consumeInternalRecord(e,t,r)},this.subrule=function(t,e,r){return this.subruleInternalRecord(e,t,r)},this.option=function(t,e){return this.optionInternalRecord(e,t)},this.or=function(t,e){return this.orInternalRecord(e,t)},this.many=function(t,e){this.manyInternalRecord(t,e)},this.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const t=this;for(let e=0;e<10;e++){const r=e>0?e:"";delete t[`CONSUME${r}`],delete t[`SUBRULE${r}`],delete t[`OPTION${r}`],delete t[`OR${r}`],delete t[`MANY${r}`],delete t[`MANY_SEP${r}`],delete t[`AT_LEAST_ONE${r}`],delete t[`AT_LEAST_ONE_SEP${r}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,e){return()=>!0}LA_RECORD(t){return Dn}topLevelRuleRecord(t,e){try{const r=new $({definition:[],name:t});return r.name=t,this.recordingProdStack.push(r),e.call(this),this.recordingProdStack.pop(),r}catch(r){if(!0!==r.KNOWN_RECORDER_ERROR)try{r.message=r.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(n){throw r}throw r}}optionInternalRecord(t,e){return Cn.call(this,F,t,e)}atLeastOneInternalRecord(t,e){Cn.call(this,z,e,t)}atLeastOneSepFirstInternalRecord(t,e){Cn.call(this,K,e,t,Tn)}manyInternalRecord(t,e){Cn.call(this,q,e,t)}manySepFirstInternalRecord(t,e){Cn.call(this,U,e,t,Tn)}orInternalRecord(t,e){return Sn.call(this,t,e)}subruleInternalRecord(t,e,r){if(Ln(e),!t||!1===(0,o.A)(t,"ruleName")){const r=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=(0,ke.A)(this.recordingProdStack),i=t.ruleName,a=new P({idx:e,nonTerminalName:i,label:null==r?void 0:r.LABEL,referencedRule:void 0});return n.definition.push(a),this.outputCst?En:wn}consumeInternalRecord(t,e,r){if(Ln(e),!De(t)){const r=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=(0,ke.A)(this.recordingProdStack),i=new G({idx:e,terminalType:t,label:null==r?void 0:r.LABEL});return n.definition.push(i),_n}},class{initPerformanceTracer(t){if((0,o.A)(t,"traceInitPerf")){const e=t.traceInitPerf,r="number"==typeof e;this.traceInitMaxIdent=r?e:1/0,this.traceInitPerf=r?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=Nn.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:n,value:i}=Ae(e),a=n>10?console.warn:console.log;return this.traceInitIndent time: ${n}ms`),this.traceInitIndent--,i}return e()}}].forEach(t=>{const e=t.prototype;Object.getOwnPropertyNames(e).forEach(r=>{if("constructor"===r)return;const n=Object.getOwnPropertyDescriptor(e,r);n&&(n.get||n.set)?Object.defineProperty(On.prototype,r,n):On.prototype[r]=t.prototype[r]})});class Bn extends $n{constructor(t,e=Nn){const r=(0,l.A)(e);r.outputCst=!1,super(t,r)}}},165(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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 a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}function o(t,e,r){return(e=h(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(t,e)||d(t,e)||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 c(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||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 h(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function d(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}r.d(e,{A:()=>Xd});var p="undefined"==typeof window?null:window,f=p?p.navigator:null;p&&p.document;var g,m,y,v,b,x,w,T,k,A,_,E,C,S,R,L,D,N,I,M,O,P,$,B,F,z,K,q,U=u(""),j=u({}),G=u(function(){}),Y="undefined"==typeof HTMLElement?"undefined":u(HTMLElement),W=function(t){return t&&t.instanceString&&V(t.instanceString)?t.instanceString():null},H=function(t){return null!=t&&u(t)==U},V=function(t){return null!=t&&u(t)===G},X=function(t){return!tt(t)&&(Array.isArray?Array.isArray(t):null!=t&&t instanceof Array)},Z=function(t){return null!=t&&u(t)===j&&!X(t)&&t.constructor===Object},Q=function(t){return null!=t&&u(t)===u(1)&&!isNaN(t)},J=function(t){return"undefined"===Y?void 0:null!=t&&t instanceof HTMLElement},tt=function(t){return et(t)||rt(t)},et=function(t){return"collection"===W(t)&&t._private.single},rt=function(t){return"collection"===W(t)&&!t._private.single},nt=function(t){return"core"===W(t)},it=function(t){return"stylesheet"===W(t)},at=function(t){return null==t||!(""!==t&&!t.match(/^\s+$/))},st=function(t){return function(t){return null!=t&&u(t)===j}(t)&&V(t.then)},ot=function(t,e){e||(e=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var t=[],e=0;ee?1:0},bt=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r255)return;e.push(Math.floor(a))}var s=n[1]||n[2]||n[3],o=n[1]&&n[2]&&n[3];if(s&&!o)return;var l=r[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;e.push(l)}}return e}(t)||function(t){var e,r,n,i,a,s,o,l;function c(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var h=new RegExp("^"+mt+"$").exec(t);if(h){if((r=parseInt(h[1]))<0?r=(360- -1*r%360)%360:r>360&&(r%=360),r/=360,(n=parseFloat(h[2]))<0||n>100)return;if(n/=100,(i=parseFloat(h[3]))<0||i>100)return;if(i/=100,void 0!==(a=h[4])&&((a=parseFloat(a))<0||a>1))return;if(0===n)s=o=l=Math.round(255*i);else{var u=i<.5?i*(1+n):i+n-i*n,d=2*i-u;s=Math.round(255*c(d,u,r+1/3)),o=Math.round(255*c(d,u,r)),l=Math.round(255*c(d,u,r-1/3))}e=[s,o,l,a]}return e}(t)},wt={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]},Tt=function(t){for(var e=t.map,r=t.keys,n=r.length,i=0;i=s||e<0||m&&t-f>=h}function x(){var t=e();if(b(t))return w(t);d=setTimeout(x,function(t){var e=s-(t-p);return m?i(e,h-(t-f)):e}(t))}function w(t){return d=void 0,y&&l?v(t):(l=c=void 0,u)}function T(){var t=e(),r=b(t);if(l=arguments,c=this,p=t,r){if(void 0===d)return function(t){return f=t,d=setTimeout(x,s),g?v(t):u}(p);if(m)return clearTimeout(d),d=setTimeout(x,s),v(p)}return void 0===d&&(d=setTimeout(x,s)),u}return s=r(s)||0,t(o)&&(g=!!o.leading,h=(m="maxWait"in o)?n(r(o.maxWait)||0,s):h,y="trailing"in o?!!o.trailing:y),T.cancel=function(){void 0!==d&&clearTimeout(d),f=0,l=p=c=d=void 0},T.flush=function(){return void 0===d?u:w(e())},T},K}(),It=_t(Nt),Mt=p?p.performance:null,Ot=Mt&&Mt.now?function(){return Mt.now()}:function(){return Date.now()},Pt=function(){if(p){if(p.requestAnimationFrame)return function(t){p.requestAnimationFrame(t)};if(p.mozRequestAnimationFrame)return function(t){p.mozRequestAnimationFrame(t)};if(p.webkitRequestAnimationFrame)return function(t){p.webkitRequestAnimationFrame(t)};if(p.msRequestAnimationFrame)return function(t){p.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(Ot())},1e3/60)}}(),$t=function(t){return Pt(t)},Bt=Ot,Ft=9261,zt=5381,Kt=function(t){for(var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ft;!(e=t.next()).done;)r=65599*r+e.value|0;return r},qt=function(t){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ft)+t|0},Ut=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zt;return(e<<5)+e+t|0},jt=function(t){return 2097152*t[0]+t[1]},Gt=function(t,e){return[qt(t[0],e[0]),Ut(t[1],e[1])]},Yt=function(t,e){var r={value:0,done:!1},n=0,i=t.length;return Kt({next:function(){return n=0;n--)t[n]===e&&t.splice(n,1)},fe=function(t){t.splice(0,t.length)},ge=function(t,e,r){return r&&(e=ht(r,e)),t[e]},me=function(t,e,r,n){r&&(e=ht(r,e)),t[e]=n},ye="undefined"!=typeof Map?Map:function(){return a(function t(){i(this,t),this._obj={}},[{key:"set",value:function(t,e){return this._obj[t]=e,this}},{key:"delete",value:function(t){return this._obj[t]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(t){return void 0!==this._obj[t]}},{key:"get",value:function(t){return this._obj[t]}}])}(),ve=function(){return a(function t(e){if(i(this,t),this._obj=Object.create(null),this.size=0,null!=e){var r;r=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e;for(var n=0;n2&&void 0!==arguments[2])||arguments[2];if(void 0!==t&&void 0!==e&&nt(t)){var n=e.group;if(null==n&&(n=e.data&&null!=e.data.source&&null!=e.data.target?"edges":"nodes"),"nodes"===n||"edges"===n){this.length=1,this[0]=this;var i=this._private={cy:t,single:!0,data:e.data||{},position:e.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!e.selected,selectable:void 0===e.selectable||!!e.selectable,locked:!!e.locked,grabbed:!1,grabbable:void 0===e.grabbable||!!e.grabbable,pannable:void 0===e.pannable?"edges"===n:!!e.pannable,active:!1,classes:new be,animation:{current:[],queue:[]},rscratch:{},scratch:e.scratch||{},edges:[],children:[],parent:e.parent&&e.parent.isNode()?e.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),e.renderedPosition){var a=e.renderedPosition,s=t.pan(),o=t.zoom();i.position={x:(a.x-s.x)/o,y:(a.y-s.y)/o}}var l=[];X(e.classes)?l=e.classes:H(e.classes)&&(l=e.classes.split(/\s+/));for(var c=0,h=l.length;ce?1:0},c=function(t,e,i,a,s){var o;if(null==i&&(i=0),null==s&&(s=r),i<0)throw new Error("lo must be non-negative");for(null==a&&(a=t.length);ir;0<=r?e++:e--)c.push(e);return c}.apply(this).reverse()).length;ag;0<=g?++d:--d)m.push(a(t,n));return m},f=function(t,e,n,i){var a,s,o;for(null==i&&(i=r),a=t[n];n>e&&i(a,s=t[o=n-1>>1])<0;)t[n]=s,n=o;return t[n]=a},g=function(t,e,n){var i,a,s,o,l;for(null==n&&(n=r),a=t.length,l=e,s=t[e],i=2*e+1;i0;){var w=y.pop(),T=g(w),k=w.id();if(u[k]=T,T!==1/0)for(var A=w.neighborhood().intersect(p),_=0;_0)for(r.unshift(e);h[i];){var a=h[i];r.unshift(a.edge),r.unshift(a.node),i=(n=a.node).id()}return s.spawn(r)}}}},Ie={kruskal:function(t){t=t||function(t){return 1};for(var e=this.byGroup(),r=e.nodes,n=e.edges,i=r.length,a=new Array(i),s=r,o=function(t){for(var e=0;e0;){if(x(),T++,c===u){for(var k=[],A=i,_=u,E=v[_];k.unshift(A),null!=E&&k.unshift(E),null!=(A=y[_]);)E=v[_=A.id()];return{found:!0,distance:d[c],path:this.spawn(k),steps:T}}f[c]=!0;for(var C=l._private.edges,S=0;SE&&(p[_]=E,y[_]=A,v[_]=x),!i){var C=A*c+k;!i&&p[C]>E&&(p[C]=E,y[C]=k,v[C]=x)}}}for(var S=0;S1&&void 0!==arguments[1]?arguments[1]:a,n=[],i=v(t);;){if(null==i)return e.spawn();var s=y(i),l=s.edge,c=s.pred;if(n.unshift(i[0]),i.same(r)&&n.length>0)break;null!=l&&n.unshift(l),i=c}return o.spawn(n)},hasNegativeWeightCycle:f,negativeWeightCycles:g}}},ze=Math.sqrt(2),Ke=function(t,e,r){0===r.length&&ae("Karger-Stein must be run on a connected (sub)graph");for(var n=r[t],i=n[1],a=n[2],s=e[i],o=e[a],l=r,c=l.length-1;c>=0;c--){var h=l[c],u=h[1],d=h[2];(e[u]===s&&e[d]===o||e[u]===o&&e[d]===s)&&l.splice(c,1)}for(var p=0;pn;){var i=Math.floor(Math.random()*e.length);e=Ke(i,t,e),r--}return e},Ue={kargerStein:function(){var t=this,e=this.byGroup(),r=e.nodes,n=e.edges;n.unmergeBy(function(t){return t.isLoop()});var i=r.length,a=n.length,s=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),o=Math.floor(i/ze);if(!(i<2)){for(var l=[],c=0;c0?1:t<0?-1:0},Xe=function(t,e){return Math.sqrt(Ze(t,e))},Ze=function(t,e){var r=e.x-t.x,n=e.y-t.y;return r*r+n*n},Qe=function(t){for(var e=t.length,r=0,n=0;n=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(null!=t.w&&null!=t.h&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},nr=function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},ir=function(t,e,r){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r),t.y2=Math.max(t.y2,r),t.h=t.y2-t.y1},ar=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.x1-=e,t.x2+=e,t.y1-=e,t.y2+=e,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},sr=function(t){var e,r,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===a.length)e=r=n=i=a[0];else if(2===a.length)e=n=a[0],i=r=a[1];else if(4===a.length){var s=l(a,4);e=s[0],r=s[1],n=s[2],i=s[3]}return t.x1-=i,t.x2+=r,t.y1-=e,t.y2+=n,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},or=function(t,e){t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},lr=function(t,e){return!(t.x1>e.x2)&&(!(e.x1>t.x2)&&(!(t.x2e.y2)&&!(e.y1>t.y2)))))))},cr=function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},hr=function(t,e){return cr(t,e.x,e.y)},ur=function(t,e){return cr(t,e.x1,e.y1)&&cr(t,e.x2,e.y2)},dr=null!==(Re=Math.hypot)&&void 0!==Re?Re:function(t,e){return Math.sqrt(t*t+e*e)};function pr(t,e,r,n,i,a){var s=function(t,e){if(t.length<3)throw new Error("Need at least 3 vertices");var r=function(t,e){return{x:t.x+e.x,y:t.y+e.y}},n=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},i=function(t,e){return{x:t.x*e,y:t.y*e}},a=function(t,e){return t.x*e.y-t.y*e.x},s=function(t){var e=dr(t.x,t.y);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},o=function(t,e,s,o){var l=n(e,t),c=n(o,s),h=a(l,c);if(Math.abs(h)<1e-9)return r(t,i(l,.5));var u=a(n(s,t),c)/h;return r(t,i(l,u))},l=t.map(function(t){return{x:t.x,y:t.y}});(function(t){for(var e=0,r=0;r7&&void 0!==arguments[7]?arguments[7]:"auto",h="auto"===c?Ir(i,a):c,u=i/2,d=a/2,p=(h=Math.min(h,u,d))!==u,f=h!==d;if(p){var g=n-d-s;if((o=Er(t,e,r,n,r-u+h-s,g,r+u-h+s,g,!1)).length>0)return o}if(f){var m=r+u+s;if((o=Er(t,e,r,n,m,n-d+h-s,m,n+d-h+s,!1)).length>0)return o}if(p){var y=n+d+s;if((o=Er(t,e,r,n,r-u+h-s,y,r+u-h+s,y,!1)).length>0)return o}if(f){var v=r-u-s;if((o=Er(t,e,r,n,v,n-d+h-s,v,n+d-h+s,!1)).length>0)return o}var b=r-u+h,x=n-d+h;if((l=Ar(t,e,r,n,b,x,h+s)).length>0&&l[0]<=b&&l[1]<=x)return[l[0],l[1]];var w=r+u-h,T=n-d+h;if((l=Ar(t,e,r,n,w,T,h+s)).length>0&&l[0]>=w&&l[1]<=T)return[l[0],l[1]];var k=r+u-h,A=n+d-h;if((l=Ar(t,e,r,n,k,A,h+s)).length>0&&l[0]>=k&&l[1]>=A)return[l[0],l[1]];var _=r-u+h,E=n+d-h;return(l=Ar(t,e,r,n,_,E,h+s)).length>0&&l[0]<=_&&l[1]>=E?[l[0],l[1]]:[]},gr=function(t,e,r,n,i,a,s){var o=s,l=Math.min(r,i),c=Math.max(r,i),h=Math.min(n,a),u=Math.max(n,a);return l-o<=t&&t<=c+o&&h-o<=e&&e<=u+o},mr=function(t,e,r,n,i,a,s,o,l){var c=Math.min(r,s,i)-l,h=Math.max(r,s,i)+l,u=Math.min(n,o,a)-l,d=Math.max(n,o,a)+l;return!(th||ed)},yr=function(t,e,r,n,i,a,s,o){var l=[];!function(t,e,r,n,i){var a,s,o,l,c,h,u,d;0===t&&(t=1e-5),o=-27*(n/=t)+(e/=t)*(9*(r/=t)-e*e*2),a=(s=(3*r-e*e)/9)*s*s+(o/=54)*o,i[1]=0,u=e/3,a>0?(c=(c=o+Math.sqrt(a))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),h=(h=o-Math.sqrt(a))<0?-Math.pow(-h,1/3):Math.pow(h,1/3),i[0]=-u+c+h,u+=(c+h)/2,i[4]=i[2]=-u,u=Math.sqrt(3)*(-h+c)/2,i[3]=u,i[5]=-u):(i[5]=i[3]=0,0===a?(d=o<0?-Math.pow(-o,1/3):Math.pow(o,1/3),i[0]=2*d-u,i[4]=i[2]=-(d+u)):(l=(s=-s)*s*s,l=Math.acos(o/Math.sqrt(l)),d=2*Math.sqrt(s),i[0]=-u+d*Math.cos(l/3),i[2]=-u+d*Math.cos((l+2*Math.PI)/3),i[4]=-u+d*Math.cos((l+4*Math.PI)/3)))}(1*r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s+n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o,9*r*i-3*r*r-3*r*s-6*i*i+3*i*s+9*n*a-3*n*n-3*n*o-6*a*a+3*a*o,3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t+3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e,1*r*i-r*r+r*t-i*t+n*a-n*n+n*e-a*e,l);for(var c=[],h=0;h<6;h+=2)Math.abs(l[h+1])<1e-7&&l[h]>=0&&l[h]<=1&&c.push(l[h]);c.push(1),c.push(0);for(var u,d,p,f=-1,g=0;g=0?pl?(t-i)*(t-i)+(e-a)*(e-a):c-u},br=function(t,e,r){for(var n,i,a,s,o=0,l=0;l=t&&t>=a||n<=t&&t<=a))continue;(t-n)/(a-n)*(s-i)+i>e&&o++}return o%2!=0},xr=function(t,e,r,n,i,a,s,o,l){var c,h=new Array(r.length);null!=o[0]?(c=Math.atan(o[1]/o[0]),o[0]<0?c+=Math.PI/2:c=-c-Math.PI/2):c=o;for(var u,d=Math.cos(-c),p=Math.sin(-c),f=0;f0){var g=Tr(h,-l);u=wr(g)}else u=h;return br(t,e,u)},wr=function(t){for(var e,r,n,i,a,s,o,l,c=new Array(t.length/2),h=0;h=0&&f<=1&&m.push(f),g>=0&&g<=1&&m.push(g),0===m.length)return[];var y=m[0]*o[0]+t,v=m[0]*o[1]+e;return m.length>1?m[0]==m[1]?[y,v]:[y,v,m[1]*o[0]+t,m[1]*o[1]+e]:[y,v]},_r=function(t,e,r){return e<=t&&t<=r||r<=t&&t<=e?t:t<=e&&e<=r||r<=e&&e<=t?e:r},Er=function(t,e,r,n,i,a,s,o,l){var c=t-i,h=r-t,u=s-i,d=e-a,p=n-e,f=o-a,g=u*d-f*c,m=h*d-p*c,y=f*h-u*p;if(0!==y){var v=g/y,b=m/y,x=-.001;return x<=v&&v<=1.001&&x<=b&&b<=1.001||l?[t+v*h,e+v*p]:[]}return 0===g||0===m?_r(t,r,s)===s?[s,o]:_r(t,r,i)===i?[i,a]:_r(i,s,r)===r?[r,n]:[]:[]},Cr=function(t,e,r,n,i){var a=[],s=n/2,o=i/2,l=e,c=r;a.push({x:l+s*t[0],y:c+o*t[1]});for(var h=1;h0){var v=Tr(g,-o);c=wr(v)}else c=g}else c=r;for(var b=0;bc&&(c=e)},u=function(t){return l[t]},d=0;d0?b.edgesTo(v)[0]:v.edgesTo(b)[0];var w=n(x);v=v.id(),c[v]>c[g]+w&&(c[v]=c[g]+w,d.nodes.indexOf(v)<0?d.push(v):d.updateItem(v),l[v]=0,r[v]=[]),c[v]==c[g]+w&&(l[v]=l[v]+l[g],r[v].push(g))}else for(var T=0;T0;){for(var E=e.pop(),C=0;C0&&s.push(r[o]);0!==s.length&&i.push(n.collection(s))}return i}(h,l,e,n);return b=function(t){for(var e=0;e5&&void 0!==arguments[5]?arguments[5]:en,s=n,o=0;o=2?ln(t,e,r,0,an,sn):ln(t,e,r,0,nn)},squaredEuclidean:function(t,e,r){return ln(t,e,r,0,an)},manhattan:function(t,e,r){return ln(t,e,r,0,nn)},max:function(t,e,r){return ln(t,e,r,-1/0,on)}};function hn(t,e,r,n,i,a){var s;return s=V(t)?t:cn[t]||cn.euclidean,0===e&&V(t)?s(i,a):s(e,r,n,i,a)}cn["squared-euclidean"]=cn.squaredEuclidean,cn.squaredeuclidean=cn.squaredEuclidean;var un=de({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),dn=function(t){return un(t)},pn=function(t,e,r,n,i){var a="kMedoids"!==i?function(t){return r[t]}:function(t){return n[t](r)},s=r,o=e;return hn(t,n.length,a,function(t){return n[t](e)},s,o)},fn=function(t,e,r){for(var n=r.length,i=new Array(n),a=new Array(n),s=new Array(e),o=null,l=0;lr)return!1}return!0},bn=function(t,e,r){for(var n=0;ni&&(i=e[l][c],a=c);s[a].push(t[l])}for(var h=0;h=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var p,f=e[s],g=e[n[s]];p="dendrogram"===i.mode?{left:f,right:g,key:f.key}:{value:f.value.concat(g.value),key:f.key},t[f.index]=p,t.splice(g.index,1),e[f.key]=p;for(var m=0;mr[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.linkage?(a=r[f.key][y.key],r[f.key][y.key]1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=!(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]?(r0&&t.splice(0,e)):t=t.slice(e,r);for(var a=0,s=t.length-1;s>=0;s--){var o=t[s];i?isFinite(o)||(t[s]=-1/0,a++):t.splice(s,1)}n&&t.sort(function(t,e){return t-e});var l=t.length,c=Math.floor(l/2);return l%2!=0?t[c+1+a]:(t[c-1+a]+t[c+a])/2}(t):"mean"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=0,i=0,a=e;a1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=1/0,i=e;i1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=-1/0,i=e;is&&(a=l,s=e[i*t+l])}a>0&&n.push(a)}for(var c=0;c=E?(C=E,E=R,S=L):R>C&&(C=R);for(var D=0;D0?1:0;k[T%c.minIterations*e+$]=B,P+=B}if(P>0&&(T>=c.minIterations-1||T==c.maxIterations-1)){for(var F=0,z=0;z0&&n.push(i);return n}(e,a,s),U=function(t,e,r){for(var n=$n(t,e,r),i=0;il&&(o=c,l=h)}r[i]=a[o]}return $n(t,e,r)}(e,n,q),j={},G=0;G1||s>1)&&(c=!0),h[e]=[],t.outgoers().forEach(function(t){t.isEdge()&&h[e].push(t.id())})}else u[e]=[void 0,t.target().id()]}):l.forEach(function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(r?n?c=!0:n=e:r=e),h[e]=[],t.connectedEdges().forEach(function(t){return h[e].push(t.id())})):u[e]=[t.source().id(),t.target().id()]});var d={found:!1,trail:void 0};if(c)return d;if(n&&r)if(o){if(i&&n!=i)return d;i=n}else{if(i&&n!=i&&r!=i)return d;i||(i=n)}else i||(i=l[0].id());var p=function(t){for(var e,r,n,i=t,a=[t];h[i].length;)e=h[i].shift(),r=u[e][0],i!=(n=u[e][1])?(h[n]=h[n].filter(function(t){return t!=e}),i=n):o||i==r||(h[r]=h[r].filter(function(t){return t!=e}),i=r),a.unshift(e),a.unshift(i);return a},f=[],g=[];for(g=p(i);1!=g.length;)0==h[g[0]].length?(f.unshift(l.getElementById(g.shift())),f.unshift(l.getElementById(g.shift()))):g=p(g.shift()).concat(g);for(var m in f.unshift(l.getElementById(g.shift())),h)if(h[m].length)return d;return d.found=!0,d.trail=this.spawn(f,!0),d}},qn=function(){var t=this,e={},r=0,n=0,i=[],a=[],s={},o=function(l,c,h){l===h&&(n+=1),e[c]={id:r,low:r++,cutVertex:!1};var u,d,p,f,g=t.getElementById(c).connectedEdges().intersection(t);0===g.size()?i.push(t.spawn(t.getElementById(c))):g.forEach(function(r){u=r.source().id(),d=r.target().id(),(p=u===c?d:u)!==h&&(f=r.id(),s[f]||(s[f]=!0,a.push({x:c,y:p,edge:r})),p in e?e[c].low=Math.min(e[c].low,e[p].id):(o(l,p,c),e[c].low=Math.min(e[c].low,e[p].low),e[c].id<=e[p].low&&(e[c].cutVertex=!0,function(r,n){for(var s=a.length-1,o=[],l=t.spawn();a[s].x!=r||a[s].y!=n;)o.push(a.pop().edge),s--;o.push(a.pop().edge),o.forEach(function(r){var n=r.connectedNodes().intersection(t);l.merge(r),n.forEach(function(r){var n=r.id(),i=r.connectedEdges().intersection(t);l.merge(r),e[n].cutVertex?l.merge(i.filter(function(t){return t.isLoop()})):l.merge(i)})}),i.push(l)}(c,p))))})};t.forEach(function(t){if(t.isNode()){var r=t.id();r in e||(n=0,o(r,r),e[r].cutVertex=n>1)}});var l=Object.keys(e).filter(function(t){return e[t].cutVertex}).map(function(e){return t.getElementById(e)});return{cut:t.spawn(l),components:i}},Un=function(){var t=this,e={},r=0,n=[],i=[],a=t.spawn(t),s=function(o){if(i.push(o),e[o]={index:r,low:r++,explored:!1},t.getElementById(o).connectedEdges().intersection(t).forEach(function(t){var r=t.target().id();r!==o&&(r in e||s(r),e[r].explored||(e[o].low=Math.min(e[o].low,e[r].low)))}),e[o].index===e[o].low){for(var l=t.spawn();;){var c=i.pop();if(l.merge(t.getElementById(c)),e[c].low=e[o].index,e[c].explored=!0,c===o)break}var h=l.edgesWith(l),u=l.merge(h);n.push(u),a=a.difference(u)}};return t.forEach(function(t){if(t.isNode()){var r=t.id();r in e||s(r)}}),{cut:a,components:n}},jn={};[Te,Ne,Ie,Oe,$e,Fe,Ue,Br,zr,qr,jr,tn,_n,In,Fn,Kn,{hopcroftTarjanBiconnected:qn,htbc:qn,htb:qn,hopcroftTarjanBiconnectedComponents:qn},{tarjanStronglyConnected:Un,tsc:Un,tscc:Un,tarjanStronglyConnectedComponents:Un}].forEach(function(t){bt(jn,t)});var Gn=function(t){if(!(this instanceof Gn))return new Gn(t);this.id="Thenable/1.0.7",this.state=0,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))};Gn.prototype={fulfill:function(t){return Yn(this,1,"fulfillValue",t)},reject:function(t){return Yn(this,2,"rejectReason",t)},then:function(t,e){var r=this,n=new Gn;return r.onFulfilled.push(Vn(t,n,"fulfill")),r.onRejected.push(Vn(e,n,"reject")),Wn(r),n.proxy}};var Yn=function(t,e,r,n){return 0===t.state&&(t.state=e,t[r]=n,Wn(t)),t},Wn=function(t){1===t.state?Hn(t,"onFulfilled",t.fulfillValue):2===t.state&&Hn(t,"onRejected",t.rejectReason)},Hn=function(t,e,r){if(0!==t[e].length){var n=t[e];t[e]=[];var i=function(){for(var t=0;t0:void 0}},clearQueue:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return this;for(var r=0;r-1}}(),i=function(){if(Gi)return ji;Gi=1;var t=za();return ji=function(e,r){var n=this.__data__,i=t(n,e);return i<0?(++this.size,n.push([e,r])):n[i][1]=r,this},ji}();function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1&&e%1==0&&e0&&this.spawn(n).updateStyle().emit("class"),e},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var e=this[0];return null!=e&&e._private.classes.has(t)},toggleClass:function(t,e){X(t)||(t=t.match(/\S+/g)||[]);for(var r=this,n=void 0===e,i=[],a=0,s=r.length;a0&&this.spawn(i).updateStyle().emit("class"),r},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,e){var r=this;if(null==e)e=250;else if(0===e)return r;return r.addClass(t),setTimeout(function(){r.removeClass(t)},e),r}};_s.className=_s.classNames=_s.classes;var Es={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:pt,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Es.variable="(?:[\\w-.]|(?:\\\\"+Es.metaChar+"))+",Es.className="(?:[\\w-]|(?:\\\\"+Es.metaChar+"))+",Es.value=Es.string+"|"+Es.number,Es.id=Es.variable,function(){var t,e,r;for(t=Es.comparatorOp.split("|"),r=0;r=0||"="!==e&&(Es.comparatorOp+="|\\!"+e)}();var Cs=0,Ss=1,Rs=2,Ls=3,Ds=4,Ns=5,Is=6,Ms=7,Os=8,Ps=9,$s=10,Bs=11,Fs=12,zs=13,Ks=14,qs=15,Us=16,js=17,Gs=18,Ys=19,Ws=20,Hs=[{selector:":selected",matches:function(t){return t.selected()}},{selector:":unselected",matches:function(t){return!t.selected()}},{selector:":selectable",matches:function(t){return t.selectable()}},{selector:":unselectable",matches:function(t){return!t.selectable()}},{selector:":locked",matches:function(t){return t.locked()}},{selector:":unlocked",matches:function(t){return!t.locked()}},{selector:":visible",matches:function(t){return t.visible()}},{selector:":hidden",matches:function(t){return!t.visible()}},{selector:":transparent",matches:function(t){return t.transparent()}},{selector:":grabbed",matches:function(t){return t.grabbed()}},{selector:":free",matches:function(t){return!t.grabbed()}},{selector:":removed",matches:function(t){return t.removed()}},{selector:":inside",matches:function(t){return!t.removed()}},{selector:":grabbable",matches:function(t){return t.grabbable()}},{selector:":ungrabbable",matches:function(t){return!t.grabbable()}},{selector:":animated",matches:function(t){return t.animated()}},{selector:":unanimated",matches:function(t){return!t.animated()}},{selector:":parent",matches:function(t){return t.isParent()}},{selector:":childless",matches:function(t){return t.isChildless()}},{selector:":child",matches:function(t){return t.isChild()}},{selector:":orphan",matches:function(t){return t.isOrphan()}},{selector:":nonorphan",matches:function(t){return t.isChild()}},{selector:":compound",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:":loop",matches:function(t){return t.isLoop()}},{selector:":simple",matches:function(t){return t.isSimple()}},{selector:":active",matches:function(t){return t.active()}},{selector:":inactive",matches:function(t){return!t.active()}},{selector:":backgrounding",matches:function(t){return t.backgrounding()}},{selector:":nonbackgrounding",matches:function(t){return!t.backgrounding()}}].sort(function(t,e){return function(t,e){return-1*vt(t,e)}(t.selector,e.selector)}),Vs=function(){for(var t,e={},r=0;r0&&c.edgeCount>0)return oe("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(c.edgeCount>1)return oe("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;1===c.edgeCount&&oe("The selector `"+t+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var t=function(t){return null==t?"":t},e=function(e){return H(e)?'"'+e+'"':t(e)},r=function(t){return" "+t+" "},n=function(n,a){var s=n.type,o=n.value;switch(s){case Cs:var l=t(o);return l.substring(0,l.length-1);case Ls:var c=n.field,h=n.operator;return"["+c+r(t(h))+e(o)+"]";case Ns:var u=n.operator,d=n.field;return"["+t(u)+d+"]";case Ds:return"["+n.field+"]";case Is:var p=n.operator;return"[["+n.field+r(t(p))+e(o)+"]]";case Ms:return o;case Os:return"#"+o;case Ps:return"."+o;case js:case qs:return i(n.parent,a)+r(">")+i(n.child,a);case Gs:case Us:return i(n.ancestor,a)+" "+i(n.descendant,a);case Ys:var f=i(n.left,a),g=i(n.subject,a),m=i(n.right,a);return f+(f.length>0?" ":"")+g+m;case Ws:return""}},i=function(t,e){return t.checks.reduce(function(r,i,a){return r+(e===t&&0===a?"$":"")+n(i,e)},"")},a="",s=0;s1&&s=0&&(e=e.replace("!",""),h=!0),e.indexOf("@")>=0&&(e=e.replace("@",""),c=!0),(s||l||c)&&(i=s||o?""+t:"",a=""+r),c&&(t=i=i.toLowerCase(),r=a=a.toLowerCase()),e){case"*=":n=i.indexOf(a)>=0;break;case"$=":n=i.indexOf(a,i.length-a.length)>=0;break;case"^=":n=0===i.indexOf(a);break;case"=":n=t===r;break;case">":u=!0,n=t>r;break;case">=":u=!0,n=t>=r;break;case"<":u=!0,n=t0;){var c=i.shift();e(c),a.add(c.id()),s&&n(i,a,c)}return t}function mo(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1],mo)},fo.forEachUp=function(t){return go(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],yo)},fo.forEachUpAndDown=function(t){return go(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],vo)},fo.ancestors=fo.parents,(ho=uo={data:ks.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:ks.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:ks.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ks.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:ks.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:ks.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}}).attr=ho.data,ho.removeAttr=ho.removeData;var bo,xo,wo=uo,To={};function ko(t){return function(e){var r=this;if(void 0===e&&(e=!0),0!==r.length&&r.isNode()&&!r.removed()){for(var n=0,i=r[0],a=i._private.edges,s=0;se}),minIndegree:Ao("indegree",function(t,e){return te}),minOutdegree:Ao("outdegree",function(t,e){return te})}),bt(To,{totalDegree:function(t){for(var e=0,r=this.nodes(),n=0;n0,h=c;c&&(l=l[0]);var u=h?l.position():{x:0,y:0};return i={x:o.x-u.x,y:o.y-u.y},void 0===t?i:i[t]}for(var d=0;d0,m=g;g&&(f=f[0]);var y=m?f.position():{x:0,y:0};void 0!==e?p.position(t,e+y[t]):void 0!==i&&p.position({x:i.x+y.x,y:i.y+y.y})}}else if(!a)return;return this}},bo.modelPosition=bo.point=bo.position,bo.modelPositions=bo.points=bo.positions,bo.renderedPoint=bo.renderedPosition,bo.relativePoint=bo.relativePosition;var Co,So,Ro=xo;Co=So={},So.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),i=r.pan(),a=e.x1*n+i.x,s=e.x2*n+i.x,o=e.y1*n+i.y,l=e.y2*n+i.y;return{x1:a,x2:s,y1:o,y2:l,w:s-a,h:l-o}},So.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()?(this.forEachUp(function(e){if(e.isParent()){var r=e._private;r.compoundBoundsClean=!1,r.bbCache=null,t||e.emitAndNotify("bounds")}}),this):this},So.updateCompoundBounds=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(t){if(t.isParent()){var e=t._private,r=t.children(),n="include"===t.pstyle("compound-sizing-wrt-labels").value,i={width:{val:t.pstyle("min-width").pfValue,left:t.pstyle("min-width-bias-left"),right:t.pstyle("min-width-bias-right")},height:{val:t.pstyle("min-height").pfValue,top:t.pstyle("min-height-bias-top"),bottom:t.pstyle("min-height-bias-bottom")}},a=r.boundingBox({includeLabels:n,includeOverlays:!1,useCache:!1}),s=e.position;0!==a.w&&0!==a.h||((a={w:t.pstyle("width").pfValue,h:t.pstyle("height").pfValue}).x1=s.x-a.w/2,a.x2=s.x+a.w/2,a.y1=s.y-a.h/2,a.y2=s.y+a.h/2);var o=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(o=100*o/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 c=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(c=100*c/i.height.val);var h=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(h=100*h/i.height.val);var u=y(i.width.val-a.w,o,l),d=u.biasDiff,p=u.biasComplementDiff,f=y(i.height.val-a.h,c,h),g=f.biasDiff,m=f.biasComplementDiff;e.autoPadding=function(t,e,r,n){if("%"!==r.units)return"px"===r.units?r.pfValue:0;switch(n){case"width":return t>0?r.pfValue*t:0;case"height":return e>0?r.pfValue*e:0;case"average":return t>0&&e>0?r.pfValue*(t+e)/2:0;case"min":return t>0&&e>0?t>e?r.pfValue*e:r.pfValue*t:0;case"max":return t>0&&e>0?t>e?r.pfValue*t:r.pfValue*e:0;default:return 0}}(a.w,a.h,t.pstyle("padding"),t.pstyle("padding-relative-to").value),e.autoWidth=Math.max(a.w,i.width.val),s.x=(-d+a.x1+a.x2+p)/2,e.autoHeight=Math.max(a.h,i.height.val),s.y=(-g+a.y1+a.y2+m)/2}function y(t,e,r){var n=0,i=0,a=e+r;return t>0&&a>0&&(n=e/a*t,i=r/a*t),{biasDiff:n,biasComplementDiff:i}}}for(var n=0;nt.x2?n:t.x2,t.y1=rt.y2?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},No=function(t,e){return null==e?t:Do(t,e.x1,e.y1,e.x2,e.y2)},Io=function(t,e,r){return ge(t,e,r)},Mo=function(t,e,r){if(!e.cy().headless()){var n,i,a=e._private,s=a.rstyle,o=s.arrowWidth/2;if("none"!==e.pstyle(r+"-arrow-shape").value){"source"===r?(n=s.srcX,i=s.srcY):"target"===r?(n=s.tgtX,i=s.tgtY):(n=s.midX,i=s.midY);var l=a.arrowBounds=a.arrowBounds||{},c=l[r]=l[r]||{};c.x1=n-o,c.y1=i-o,c.x2=n+o,c.y2=i+o,c.w=c.x2-c.x1,c.h=c.y2-c.y1,ar(c,1),Do(t,c.x1,c.y1,c.x2,c.y2)}}},Oo=function(t,e,r){if(!e.cy().headless()){var n;n=r?r+"-":"";var i=e._private,a=i.rstyle;if(e.pstyle(n+"label").strValue){var s,o,l,c,h=e.pstyle("text-halign"),u=e.pstyle("text-valign"),d=Io(a,"labelWidth",r),p=Io(a,"labelHeight",r),f=Io(a,"labelX",r),g=Io(a,"labelY",r),m=e.pstyle(n+"text-margin-x").pfValue,y=e.pstyle(n+"text-margin-y").pfValue,v=e.isEdge(),b=e.pstyle(n+"text-rotation"),x=e.pstyle("text-outline-width").pfValue,w=e.pstyle("text-border-width").pfValue/2,T=e.pstyle("text-background-padding").pfValue,k=p,A=d,_=A/2,E=k/2;if(v)s=f-_,o=f+_,l=g-E,c=g+E;else{switch(h.value){case"left":s=f-A,o=f;break;case"center":s=f-_,o=f+_;break;case"right":s=f,o=f+A}switch(u.value){case"top":l=g-k,c=g;break;case"center":l=g-E,c=g+E;break;case"bottom":l=g,c=g+k}}var C=m-Math.max(x,w)-T-2,S=m+Math.max(x,w)+T+2,R=y-Math.max(x,w)-T-2,L=y+Math.max(x,w)+T+2;s+=C,o+=S,l+=R,c+=L;var D=r||"main",N=i.labelBounds,I=N[D]=N[D]||{};I.x1=s,I.y1=l,I.x2=o,I.y2=c,I.w=o-s,I.h=c-l,I.leftPad=C,I.rightPad=S,I.topPad=R,I.botPad=L;var M=v&&"autorotate"===b.strValue,O=null!=b.pfValue&&0!==b.pfValue;if(M||O){var P=M?Io(i.rstyle,"labelAngle",r):b.pfValue,$=Math.cos(P),B=Math.sin(P),F=(s+o)/2,z=(l+c)/2;if(!v){switch(h.value){case"left":F=o;break;case"right":F=s}switch(u.value){case"top":z=c;break;case"bottom":z=l}}var K=function(t,e){return{x:(t-=F)*$-(e-=z)*B+F,y:t*B+e*$+z}},q=K(s,l),U=K(s,c),j=K(o,l),G=K(o,c);s=Math.min(q.x,U.x,j.x,G.x),o=Math.max(q.x,U.x,j.x,G.x),l=Math.min(q.y,U.y,j.y,G.y),c=Math.max(q.y,U.y,j.y,G.y)}var Y=D+"Rot",W=N[Y]=N[Y]||{};W.x1=s,W.y1=l,W.x2=o,W.y2=c,W.w=o-s,W.h=c-l,Do(t,s,l,o,c),Do(i.labelBounds.all,s,l,o,c)}return t}},Po=function(t,e){if(!e.cy().headless()){var r=e.pstyle("outline-opacity").value,n=e.pstyle("outline-width").value+e.pstyle("outline-offset").value;$o(t,e,r,n,"outside",n/2)}},$o=function(t,e,r,n,i,a){if(!(0===r||n<=0||"inside"===i)){var s=e.cy(),o=e.pstyle("shape").value,l=s.renderer().nodeShapes[o],c=e.position(),h=c.x,u=c.y,d=e.width(),p=e.height();if(l.hasMiterBounds){"center"===i&&(n/=2);var f=l.miterBounds(h,u,d,p,n);No(t,f)}else null!=a&&a>0&&sr(t,[a,a,a,a])}},Bo=function(t,e){var r,n,i,a,s,o,l,c=t._private.cy,h=c.styleEnabled(),u=c.headless(),d=rr(),p=t._private,f=t.isNode(),g=t.isEdge(),m=p.rstyle,y=f&&h?t.pstyle("bounds-expansion").pfValue:[0],v=function(t){return"none"!==t.pstyle("display").value},b=!h||v(t)&&(!g||v(t.source())&&v(t.target()));if(b){var x=0;h&&e.includeOverlays&&0!==t.pstyle("overlay-opacity").value&&(x=t.pstyle("overlay-padding").value);var w=0;h&&e.includeUnderlays&&0!==t.pstyle("underlay-opacity").value&&(w=t.pstyle("underlay-padding").value);var T=Math.max(x,w),k=0;if(h&&(k=t.pstyle("width").pfValue/2),f&&e.includeNodes){var A=t.position();s=A.x,o=A.y;var _=t.outerWidth()/2,E=t.outerHeight()/2;Do(d,r=s-_,i=o-E,n=s+_,a=o+E),h&&Po(d,t),h&&e.includeOutlines&&!u&&Po(d,t),h&&function(t,e){if(!e.cy().headless()){var r=e.pstyle("border-opacity").value,n=e.pstyle("border-width").pfValue,i=e.pstyle("border-position").value;$o(t,e,r,n,i)}}(d,t)}else if(g&&e.includeEdges)if(h&&!u){var C=t.pstyle("curve-style").strValue;if(r=Math.min(m.srcX,m.midX,m.tgtX),n=Math.max(m.srcX,m.midX,m.tgtX),i=Math.min(m.srcY,m.midY,m.tgtY),a=Math.max(m.srcY,m.midY,m.tgtY),Do(d,r-=k,i-=k,n+=k,a+=k),"haystack"===C){var S=m.haystackPts;if(S&&2===S.length){if(r=S[0].x,i=S[0].y,r>(n=S[1].x)){var R=r;r=n,n=R}if(i>(a=S[1].y)){var L=i;i=a,a=L}Do(d,r-k,i-k,n+k,a+k)}}else if("bezier"===C||"unbundled-bezier"===C||dt(C,"segments")||dt(C,"taxi")){var D;switch(C){case"bezier":case"unbundled-bezier":D=m.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":D=m.linePts}if(null!=D)for(var N=0;N(n=O.x)){var P=r;r=n,n=P}if((i=M.y)>(a=O.y)){var $=i;i=a,a=$}Do(d,r-=k,i-=k,n+=k,a+=k)}if(h&&e.includeEdges&&g&&(Mo(d,t,"mid-source"),Mo(d,t,"mid-target"),Mo(d,t,"source"),Mo(d,t,"target")),h)if("yes"===t.pstyle("ghost").value){var B=t.pstyle("ghost-offset-x").pfValue,F=t.pstyle("ghost-offset-y").pfValue;Do(d,d.x1+B,d.y1+F,d.x2+B,d.y2+F)}var z=p.bodyBounds=p.bodyBounds||{};or(z,d),sr(z,y),ar(z,1),h&&(r=d.x1,n=d.x2,i=d.y1,a=d.y2,Do(d,r-T,i-T,n+T,a+T));var K=p.overlayBounds=p.overlayBounds||{};or(K,d),sr(K,y),ar(K,1);var q=p.labelBounds=p.labelBounds||{};null!=q.all?((l=q.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):q.all=rr(),h&&e.includeLabels&&(e.includeMainLabels&&Oo(d,t,null),g&&(e.includeSourceLabels&&Oo(d,t,"source"),e.includeTargetLabels&&Oo(d,t,"target")))}return d.x1=Lo(d.x1),d.y1=Lo(d.y1),d.x2=Lo(d.x2),d.y2=Lo(d.y2),d.w=Lo(d.x2-d.x1),d.h=Lo(d.y2-d.y1),d.w>0&&d.h>0&&b&&(sr(d,y),ar(d,1)),d},Fo=function(t){var e=0,r=function(t){return(t?1:0)<0&&void 0!==arguments[0]?arguments[0]:al,e=arguments.length>1?arguments[1]:void 0,r=0;r=0;o--)s(o);return this},ol.removeAllListeners=function(){return this.removeListener("*")},ol.emit=ol.trigger=function(t,e,r){var n=this.listeners,i=n.length;return this.emitting++,X(e)||(e=[e]),hl(this,function(t,a){null!=r&&(n=[{event:a.event,type:a.type,namespace:a.namespace,callback:r}],i=n.length);for(var s=function(){var r=n[o];if(r.type===a.type&&(!r.namespace||r.namespace===a.namespace||".*"===r.namespace)&&t.eventMatches(t.context,r,a)){var i=[a];null!=e&&function(t,e){for(var r=0;r1&&!n){var i=this.length-1,a=this[i],s=a._private.data.id;this[i]=void 0,this[t]=a,r.set(s,{ele:a,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var e=this._private,r=t._private.data.id,n=e.map.get(r);if(!n)return this;var i=n.index;return this.unmergeAt(i),this},unmerge:function(t){var e=this._private.cy;if(!t)return this;if(t&&H(t)){var r=t;t=e.mutableElements().filter(r)}for(var n=0;n=0;e--){t(this[e])&&this.unmergeAt(e)}return this},map:function(t,e){for(var r=[],n=this,i=0;in&&(n=o,r=s)}return{value:n,ele:r}},min:function(t,e){for(var r,n=1/0,i=this,a=0;a=0&&i1&&void 0!==arguments[1])||arguments[1],r=this[0],n=r.cy();if(n.styleEnabled()&&r){r._private.styleDirty&&(r._private.styleDirty=!1,n.style().apply(r));var i=r._private.style[t];return null!=i?i:e?n.style().getDefaultProperty(t):null}},numericStyle:function(t){var e=this[0];if(e.cy().styleEnabled()&&e){var r=e.pstyle(t);return void 0!==r.pfValue?r.pfValue:r.value}},numericStyleUnits:function(t){var e=this[0];if(e.cy().styleEnabled())return e?e.pstyle(t).units:void 0},renderedStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var r=this[0];return r?e.style().getRenderedStyle(r,t):void 0},style:function(t,e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,i=r.style();if(Z(t)){var a=t;i.applyBypass(this,a,n),this.emitAndNotify("style")}else if(H(t)){if(void 0===e){var s=this[0];return s?i.getStylePropertyValue(s,t):void 0}i.applyBypass(this,t,e,n),this.emitAndNotify("style")}else if(void 0===t){var o=this[0];return o?i.getRawStyle(o):void 0}return this},removeStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var r=!1,n=e.style(),i=this;if(void 0===t)for(var a=0;a0&&e.push(h[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}}),Ol.neighbourhood=Ol.neighborhood,Ol.closedNeighbourhood=Ol.closedNeighborhood,Ol.openNeighbourhood=Ol.openNeighborhood,bt(Ol,{source:po(function(t){var e,r=this[0];return r&&(e=r._private.source||r.cy().collection()),e&&t?e.filter(t):e},"source"),target:po(function(t){var e,r=this[0];return r&&(e=r._private.target||r.cy().collection()),e&&t?e.filter(t):e},"target"),sources:Fl({attr:"source"}),targets:Fl({attr:"target"})}),bt(Ol,{edgesWith:po(zl(),"edgesWith"),edgesTo:po(zl({thisIsSrc:!0}),"edgesTo")}),bt(Ol,{connectedEdges:po(function(t){for(var e=[],r=0;r0);return a},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}}),Ol.componentsOf=Ol.components;var ql=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==t){var i=new ye,a=!1;if(e){if(e.length>0&&Z(e[0])&&!et(e[0])){a=!0;for(var s=[],o=new be,l=0,c=e.length;l0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,a=i.cy(),s=a._private,o=[],l=[],c=0,h=i.length;c0){for(var M=t.length===i.length?i:new ql(a,t),O=0;O0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this,n=[],i={},a=r._private.cy;function s(t){var r=i[t.id()];e&&t.removed()||r||(i[t.id()]=!0,t.isNode()?(n.push(t),function(t){for(var e=t._private.edges,r=0;r0&&(t?k.emitAndNotify("remove"):e&&k.emit("remove"));for(var A=0;A=.001?function(e,n){for(var i=0;i<4;++i){var a=d(n,t,r);if(0===a)return n;n-=(u(n,t,r)-e)/a}return n}(e,s):0===l?s:function(e,n,i){var a,s,o=0;do{(a=u(s=n+(i-n)/2,t,r)-e)>0?i=s:n=s}while(Math.abs(a)>1e-7&&++o<10);return s}(e,n,n+i)}var f=!1;function g(){f=!0,t===e&&r===n||function(){for(var e=0;e<11;++e)o[e]=u(e*i,t,r)}()}var m=function(i){return f||g(),t===e&&r===n?i:0===i?0:1===i?1:u(p(i),e,n)};m.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var y="generateBezier("+[t,e,r,n]+")";return m.toString=function(){return y},m}var Yl=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,r,n){var i={x:e.x+n.dx*r,v:e.v+n.dv*r,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function r(r,n){var i={dx:r.v,dv:t(r)},a=e(r,.5*n,i),s=e(r,.5*n,a),o=e(r,n,s),l=1/6*(i.dx+2*(a.dx+s.dx)+o.dx),c=1/6*(i.dv+2*(a.dv+s.dv)+o.dv);return r.x=r.x+l*n,r.v=r.v+c*n,r}return function t(e,n,i){var a,s,o,l={x:-1,v:0,tension:null,friction:null},c=[0],h=0,u=1e-4;for(e=parseFloat(e)||500,n=parseFloat(n)||20,i=i||null,l.tension=e,l.friction=n,s=(a=null!==i)?(h=t(e,n))/i*.016:.016;o=r(o||l,s),c.push(1+o.x),h+=16,Math.abs(o.x)>u&&Math.abs(o.v)>u;);return a?function(t){return c[t*(c.length-1)|0]}:h}}(),Wl=function(t,e,r,n){var i=Gl(t,e,r,n);return function(t,e,r){return t+(e-t)*i(r)}},Hl={linear:function(t,e,r){return t+(e-t)*r},ease:Wl(.25,.1,.25,1),"ease-in":Wl(.42,0,1,1),"ease-out":Wl(0,0,.58,1),"ease-in-out":Wl(.42,0,.58,1),"ease-in-sine":Wl(.47,0,.745,.715),"ease-out-sine":Wl(.39,.575,.565,1),"ease-in-out-sine":Wl(.445,.05,.55,.95),"ease-in-quad":Wl(.55,.085,.68,.53),"ease-out-quad":Wl(.25,.46,.45,.94),"ease-in-out-quad":Wl(.455,.03,.515,.955),"ease-in-cubic":Wl(.55,.055,.675,.19),"ease-out-cubic":Wl(.215,.61,.355,1),"ease-in-out-cubic":Wl(.645,.045,.355,1),"ease-in-quart":Wl(.895,.03,.685,.22),"ease-out-quart":Wl(.165,.84,.44,1),"ease-in-out-quart":Wl(.77,0,.175,1),"ease-in-quint":Wl(.755,.05,.855,.06),"ease-out-quint":Wl(.23,1,.32,1),"ease-in-out-quint":Wl(.86,0,.07,1),"ease-in-expo":Wl(.95,.05,.795,.035),"ease-out-expo":Wl(.19,1,.22,1),"ease-in-out-expo":Wl(1,0,0,1),"ease-in-circ":Wl(.6,.04,.98,.335),"ease-out-circ":Wl(.075,.82,.165,1),"ease-in-out-circ":Wl(.785,.135,.15,.86),spring:function(t,e,r){if(0===r)return Hl.linear;var n=Yl(t,e,r);return function(t,e,r){return t+(e-t)*n(r)}},"cubic-bezier":Wl};function Vl(t,e,r,n,i){if(1===n)return r;if(e===r)return r;var a=i(e,r,n);return null==t||((t.roundValue||t.color)&&(a=Math.round(a)),void 0!==t.min&&(a=Math.max(a,t.min)),void 0!==t.max&&(a=Math.min(a,t.max))),a}function Xl(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function Zl(t,e,r,n,i){var a=null!=i?i.type:null;r<0?r=0:r>1&&(r=1);var s=Xl(t,i),o=Xl(e,i);if(Q(s)&&Q(o))return Vl(a,s,o,r,n);if(X(s)&&X(o)){for(var l=[],c=0;c0?("spring"===u&&d.push(s.duration),s.easingImpl=Hl[u].apply(null,d)):s.easingImpl=Hl[u]}var p,f=s.easingImpl;if(p=0===s.duration?1:(r-l)/s.duration,s.applying&&(p=s.progress),p<0?p=0:p>1&&(p=1),null==s.delay){var g=s.startPosition,m=s.position;if(m&&i&&!t.locked()){var y={};Jl(g.x,m.x)&&(y.x=Zl(g.x,m.x,p,f)),Jl(g.y,m.y)&&(y.y=Zl(g.y,m.y,p,f)),t.position(y)}var v=s.startPan,b=s.pan,x=a.pan,w=null!=b&&n;w&&(Jl(v.x,b.x)&&(x.x=Zl(v.x,b.x,p,f)),Jl(v.y,b.y)&&(x.y=Zl(v.y,b.y,p,f)),t.emit("pan"));var T=s.startZoom,k=s.zoom,A=null!=k&&n;A&&(Jl(T,k)&&(a.zoom=er(a.minZoom,Zl(T,k,p,f),a.maxZoom)),t.emit("zoom")),(w||A)&&t.emit("viewport");var _=s.style;if(_&&_.length>0&&i){for(var E=0;E<_.length;E++){var C=_[E],S=C.name,R=C,L=s.startStyle[S],D=Zl(L,R,p,f,c.properties[L.name]);c.overrideBypass(t,S,D)}t.emit("style")}}return s.progress=p,p}function Jl(t,e){return null!=t&&null!=e&&(!(!Q(t)||!Q(e))||!(!t||!e))}function tc(t,e,r,n){var i=e._private;i.started=!0,i.startTime=r-i.progress*i.duration}function ec(t,e){var r=e._private.aniEles,n=[];function i(e,r){var i=e._private,a=i.animation.current,s=i.animation.queue,o=!1;if(0===a.length){var l=s.shift();l&&a.push(l)}for(var c=function(t){for(var e=t.length-1;e>=0;e--){(0,t[e])()}t.splice(0,t.length)},h=a.length-1;h>=0;h--){var u=a[h],d=u._private;d.stopped?(a.splice(h,1),d.hooked=!1,d.playing=!1,d.started=!1,c(d.frames)):(d.playing||d.applying)&&(d.playing&&d.applying&&(d.applying=!1),d.started||tc(0,u,t),Ql(e,u,t,r),d.applying&&(d.applying=!1),c(d.frames),null!=d.step&&d.step(t),u.completed()&&(a.splice(h,1),d.hooked=!1,d.playing=!1,d.started=!1,c(d.completes)),o=!0)}return r||0!==a.length||0!==s.length||n.push(e),o}for(var a=!1,s=0;s0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}var rc={animate:ks.animate(),animation:ks.animation(),animated:ks.animated(),clearQueue:ks.clearQueue(),delay:ks.delay(),delayAnimation:ks.delayAnimation(),stop:ks.stop(),addToAnimationPool:function(t){this.styleEnabled()&&this._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,t.styleEnabled()){var e=t.renderer();e&&e.beforeRender?e.beforeRender(function(e,r){ec(r,t)},e.beforeRenderPriorities.animations):function e(){t._private.animationsRunning&&$t(function(r){ec(r,t),e()})}()}}},nc={qualifierCompare:function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},eventMatches:function(t,e,r){var n=e.qualifier;return null==n||t!==r.target&&et(r.target)&&n.matches(r.target)},addEventFields:function(t,e){e.cy=t,e.target=t},callbackContext:function(t,e,r){return null!=e.qualifier?r.target:t}},ic=function(t){return H(t)?new oo(t):t},ac={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new sl(nc,this)),this},emitter:function(){return this._private.emitter},on:function(t,e,r){return this.emitter().on(t,ic(e),r),this},removeListener:function(t,e,r){return this.emitter().removeListener(t,ic(e),r),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,e,r){return this.emitter().one(t,ic(e),r),this},once:function(t,e,r){return this.emitter().one(t,ic(e),r),this},emit:function(t,e){return this.emitter().emit(t,e),this},emitAndNotify:function(t,e){return this.emit(t),this.notify(t,e),this}};ks.eventAliasesOn(ac);var sc={png:function(t){return t=t||{},this._private.renderer.png(t)},jpg:function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||"#fff",e.jpg(t)}};sc.jpeg=sc.jpg;var oc={layout:function(t){var e=this;if(null!=t)if(null!=t.name){var r=t.name,n=e.extension("layout",r);if(null!=n){var i;i=H(t.eles)?e.$(t.eles):null!=t.eles?t.eles:e.$();var a=new n(bt({},t,{cy:e,eles:i}));return a}ae("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else ae("A `name` must be specified to make a layout");else ae("Layout options must be specified to make a layout")}};oc.createLayout=oc.makeLayout=oc.layout;var lc={notify:function(t,e){var r=this._private;if(this.batching()){r.batchNotifications=r.batchNotifications||{};var n=r.batchNotifications[t]=r.batchNotifications[t]||this.collection();null!=e&&n.merge(e)}else if(r.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(t,e)}},notifications:function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return null==t.batchCount&&(t.batchCount=0),0===t.batchCount&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(0===t.batchCount)return this;if(t.batchCount--,0===t.batchCount){t.batchStyleEles.updateStyle();var e=this.renderer();Object.keys(t.batchNotifications).forEach(function(r){var n=t.batchNotifications[r];n.empty()?e.notify(r):e.notify(r,n)})}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var e=this;return this.batch(function(){for(var r=Object.keys(t),n=0;n0;)e.removeChild(e.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach(function(t){var e=t._private;e.rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]})},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};hc.invalidateDimensions=hc.resize;var uc={collection:function(t,e){return H(t)?this.$(t):tt(t)?t.collection():X(t)?(e||(e={}),new ql(this,t,e.unique,e.removed)):new ql(this)},nodes:function(t){var e=this.$(function(t){return t.isNode()});return t?e.filter(t):e},edges:function(t){var e=this.$(function(t){return t.isEdge()});return t?e.filter(t):e},$:function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()},mutableElements:function(){return this._private.elements}};uc.elements=uc.filter=uc.$;var dc={},pc="t";dc.apply=function(t){for(var e=this,r=e._private.cy.collection(),n=0;n0;if(d||u&&p){var f=void 0;d&&p||d?f=c.properties:p&&(f=c.mappedProperties);for(var g=0;g1&&(m=1),o.color){var w=i.valueMin[0],T=i.valueMax[0],k=i.valueMin[1],A=i.valueMax[1],_=i.valueMin[2],E=i.valueMax[2],C=null==i.valueMin[3]?1:i.valueMin[3],S=null==i.valueMax[3]?1:i.valueMax[3],R=[Math.round(w+(T-w)*m),Math.round(k+(A-k)*m),Math.round(_+(E-_)*m),Math.round(C+(S-C)*m)];r={bypass:i.bypass,name:i.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else{if(!o.number)return!1;var L=i.valueMin+(i.valueMax-i.valueMin)*m;r=this.parse(i.name,L,i.bypass,d)}if(!r)return g(),!1;r.mapping=i,i=r;break;case s.data:for(var D=i.field.split("."),N=u.data,I=0;I0&&a>0){for(var o={},l=!1,c=0;c0?t.delayAnimation(s).play().promise().then(e):e()}).then(function(){return t.animation({style:o,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1)},dc.checkTrigger=function(t,e,r,n,i,a){var s=this.properties[e],o=i(s);t.removed()||null!=o&&o(r,n,t)&&a(s)},dc.checkZOrderTrigger=function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,function(t){return t.triggersZOrder},function(){i._private.cy.notify("zorder",t)})},dc.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(t){return t.triggersBounds},function(e){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})},dc.checkConnectedEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(t){return t.triggersBoundsOfConnectedEdges},function(e){t.connectedEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},dc.checkParallelEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(t){return t.triggersBoundsOfParallelEdges},function(e){t.parallelEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},dc.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n),this.checkConnectedEdgesBoundsTrigger(t,e,r,n),this.checkParallelEdgesBoundsTrigger(t,e,r,n)};var fc={applyBypass:function(t,e,r,n){var i=[];if("*"===e||"**"===e){if(void 0!==r)for(var a=0;ae.length?a.substr(e.length):""}function o(){r=r.length>n.length?r.substr(n.length):""}for(a=a.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(a.match(/^\s*$/))break;var l=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){oe("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}e=l[0];var c=l[1];if("core"!==c)if(new oo(c).invalid){oe("Skipping parsing of block: Invalid selector found in string stylesheet: "+c),s();continue}var h=l[2],u=!1;r=h;for(var d=[];;){if(r.match(/^\s*$/))break;var p=r.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){oe("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),u=!0;break}n=p[0];var f=p[1],g=p[2];if(this.properties[f])i.parse(f,g)?(d.push({name:f,val:g}),o()):(oe("Skipping property: Invalid property definition in: "+n),o());else oe("Skipping property: Invalid property name in: "+n),o()}if(u){s();break}i.selector(c);for(var m=0;m=7&&"d"===e[0]&&(c=new RegExp(o.data.regex).exec(e))){if(r)return!1;var d=o.data;return{name:t,value:c,strValue:""+e,mapped:d,field:c[1],bypass:r}}if(e.length>=10&&"m"===e[0]&&(h=new RegExp(o.mapData.regex).exec(e))){if(r)return!1;if(u.multiple)return!1;var p=o.mapData;if(!u.color&&!u.number)return!1;var f=this.parse(t,h[4]);if(!f||f.mapped)return!1;var g=this.parse(t,h[5]);if(!g||g.mapped)return!1;if(f.pfValue===g.pfValue||f.strValue===g.strValue)return oe("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+f.strValue+"`"),this.parse(t,f.strValue);if(u.color){var m=f.value,y=g.value;if(!(m[0]!==y[0]||m[1]!==y[1]||m[2]!==y[2]||m[3]!==y[3]&&(null!=m[3]&&1!==m[3]||null!=y[3]&&1!==y[3])))return!1}return{name:t,value:h,strValue:""+e,mapped:p,field:h[1],fieldMin:parseFloat(h[2]),fieldMax:parseFloat(h[3]),valueMin:f.value,valueMax:g.value,bypass:r}}}if(u.multiple&&"multiple"!==n){var v;if(v=l?e.split(/\s+/):X(e)?e:[e],u.evenMultiple&&v.length%2!=0)return null;for(var b=[],x=[],w=[],T="",k=!1,A=0;A0?" ":"")+_.strValue}return u.validate&&!u.validate(b,x)?null:u.singleEnum&&k?1===b.length&&H(b[0])?{name:t,value:b[0],strValue:b[0],bypass:r}:null:{name:t,value:b,pfValue:w,strValue:T,bypass:r,units:x}}var E,C,S=function(){for(var n=0;nu.max||u.strictMax&&e===u.max))return null;var I={name:t,value:e,strValue:""+e+(R||""),units:R,bypass:r};return u.unitless||"px"!==R&&"em"!==R?I.pfValue=e:I.pfValue="px"!==R&&R?this.getEmSizeInPixels()*e:e,"ms"!==R&&"s"!==R||(I.pfValue="ms"===R?e:1e3*e),"deg"!==R&&"rad"!==R||(I.pfValue="rad"===R?e:(E=e,Math.PI*E/180)),"%"===R&&(I.pfValue=e/100),I}if(u.propList){var M=[],O=""+e;if("none"===O);else{for(var P=O.split(/\s*,\s*|\s+/),$=0;$0&&l>0&&!isNaN(r.w)&&!isNaN(r.h)&&r.w>0&&r.h>0)return{zoom:s=(s=(s=Math.min((o-2*e)/r.w,(l-2*e)/r.h))>this._private.maxZoom?this._private.maxZoom:s)=r.minZoom&&(r.maxZoom=e),this},minZoom:function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var e,r,n=this._private,i=n.pan,a=n.zoom,s=!1;if(n.zoomingEnabled||(s=!0),Q(t)?r=t:Z(t)&&(r=t.level,null!=t.position?e=je(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null==e||n.panningEnabled||(s=!0)),r=(r=r>n.maxZoom?n.maxZoom:r)e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=o,i.push("zoom"))}if(n&&(!a||!t.cancelOnFailedZoom)&&e.panningEnabled){var l=t.pan;Q(l.x)&&(e.pan.x=l.x,s=!1),Q(l.y)&&(e.pan.y=l.y,s=!1),s||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(t){var e=this.getCenterPan(t);return e&&(this._private.pan=e,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,e){if(this._private.panningEnabled){if(H(t)){var r=t;t=this.mutableElements().filter(r)}else tt(t)||(t=this.mutableElements());if(0!==t.length){var n=t.boundingBox(),i=this.width(),a=this.height();return{x:(i-(e=void 0===e?this._private.zoom:e)*(n.x1+n.x2))/2,y:(a-e*(n.y1+n.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 t,e,r=this._private,n=r.container,i=this;return r.sizeCache=r.sizeCache||(n?(t=i.window().getComputedStyle(n),e=function(e){return parseFloat(t.getPropertyValue(e))},{width:n.clientWidth-e("padding-left")-e("padding-right"),height:n.clientHeight-e("padding-top")-e("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,e=this._private.zoom,r=this.renderedExtent(),n={x1:(r.x1-t.x)/e,x2:(r.x2-t.x)/e,y1:(r.y1-t.y)/e,y2:(r.y2-t.y)/e};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}},multiClickDebounceTime:function(t){return t?(this._private.multiClickDebounceTime=t,this):this._private.multiClickDebounceTime}};Ac.centre=Ac.center,Ac.autolockNodes=Ac.autolock,Ac.autoungrabifyNodes=Ac.autoungrabify;var _c={data:ks.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:ks.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:ks.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ks.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};_c.attr=_c.data,_c.removeAttr=_c.removeData;var Ec=function(t){var e=this,r=(t=bt({},t)).container;r&&!J(r)&&J(r[0])&&(r=r[0]);var n=r?r._cyreg:null;(n=n||{})&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];r&&(r._cyreg=n),n.cy=e;var a=void 0!==p&&void 0!==r&&!t.headless,s=t;s.layout=bt({name:a?"grid":"null"},s.layout),s.renderer=bt({name:a?"canvas":"null"},s.renderer);var o=function(t,e,r){return void 0!==e?e:void 0!==r?r:t},l=this._private={container:r,ready:!1,options:s,elements:new ql(this),listeners:[],aniEles:new ql(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:o(!0,s.zoomingEnabled),userZoomingEnabled:o(!0,s.userZoomingEnabled),panningEnabled:o(!0,s.panningEnabled),userPanningEnabled:o(!0,s.userPanningEnabled),boxSelectionEnabled:o(!0,s.boxSelectionEnabled),autolock:o(!1,s.autolock,s.autolockNodes),autoungrabify:o(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:o(!1,s.autounselectify),styleEnabled:void 0===s.styleEnabled?a:s.styleEnabled,zoom:Q(s.zoom)?s.zoom:1,pan:{x:Z(s.pan)&&Q(s.pan.x)?s.pan.x:0,y:Z(s.pan)&&Q(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:o(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom});l.styleEnabled&&e.setStyle([]);var c=bt({},s,s.renderer);e.initRenderer(c);!function(t,e){if(t.some(st))return Zn.all(t).then(e);e(t)}([s.style,s.elements],function(t){var r=t[0],a=t[1];l.styleEnabled&&e.style().append(r),function(t,r,n){e.notifications(!1);var i=e.mutableElements();i.length>0&&i.remove(),null!=t&&(Z(t)||X(t))&&e.add(t),e.one("layoutready",function(t){e.notifications(!0),e.emit(t),e.one("load",r),e.emitAndNotify("load")}).one("layoutstop",function(){e.one("done",n),e.emit("done")});var a=bt({},e._private.options.layout);a.eles=e.elements(),e.layout(a).run()}(a,function(){e.startAnimationLoop(),l.ready=!0,V(s.ready)&&e.on("ready",s.ready);for(var t=0;t0,l=!!e.boundingBox,c=rr(l?e.boundingBox:structuredClone(r.extent()));if(tt(e.roots))t=e.roots;else if(X(e.roots)){for(var h=[],u=0;u0;){var R=S(),L=A(R,E);if(L)R.outgoers().filter(function(t){return t.isNode()&&n.has(t)}).forEach(C);else if(null===L){oe("Detected double maximal shift for node `"+R.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var D=0;if(e.avoidOverlap)for(var N=0;N0&&y[0].length<=3?a/2:0),o=2*Math.PI/y[n].length*i;return 0===n&&1===y[0].length&&(s=1),{x:G+s*Math.cos(o),y:Y+s*Math.sin(o)}}var h=y[n].length,u=Math.max(1===h?0:l?(c.w-2*e.padding-W.w)/((e.grid?Z:h)-1):(c.w-2*e.padding-W.w)/((e.grid?Z:h)+1),D);return{x:G+(i+1-(h+1)/2)*u,y:Y+(n+1-(F+1)/2)*V}}(t),c,Q[e.direction])}),this};var Ic={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(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Mc(t){this.options=bt({},Ic,t)}Mc.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var s,o=rr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l=o.x1+o.w/2,c=o.y1+o.h/2,h=(void 0===e.sweep?2*Math.PI-2*Math.PI/a.length:e.sweep)/Math.max(1,a.length-1),u=0,d=0;d1&&e.avoidOverlap){u*=1.75;var m=Math.cos(h)-Math.cos(0),y=Math.sin(h)-Math.sin(0),v=Math.sqrt(u*u/(m*m+y*y));s=Math.max(v,s)}return n.nodes().layoutPositions(this,e,function(t,r){var n=e.startAngle+r*h*(i?1:-1),a=s*Math.cos(n),o=s*Math.sin(n);return{x:l+a,y:c+o}}),this};var Oc,Pc={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(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function $c(t){this.options=bt({},Pc,t)}$c.prototype.run=function(){for(var t=this.options,e=t,r=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,n=t.cy,i=e.eles,a=i.nodes().not(":parent"),s=rr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),o=s.x1+s.w/2,l=s.y1+s.h/2,c=[],h=0,u=0;u0)Math.abs(v[0].value-x.value)>=m&&(v=[],y.push(v));v.push(x)}var w=h+e.minNodeSpacing;if(!e.avoidOverlap){var T=y.length>0&&y[0].length>1,k=(Math.min(s.w,s.h)/2-w)/(y.length+T?1:0);w=Math.min(w,k)}for(var A=0,_=0;_1&&e.avoidOverlap){var R=Math.cos(S)-Math.cos(0),L=Math.sin(S)-Math.sin(0),D=Math.sqrt(w*w/(R*R+L*L));A=Math.max(D,A)}E.r=A,A+=w}if(e.equidistant){for(var N=0,I=0,M=0;M=t.numIter)&&(Yc(n,t),n.temperature=n.temperature*t.coolingFactor,!(n.temperature=t.animationThreshold&&a(),$t(h)):(ih(n,t),o())};h()}else{for(;c;)c=s(l),l++;ih(n,t),o()}return this},Fc.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Fc.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var zc=function(t,e,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=rr(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),s={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=r.eles.components(),l={},c=0;c0){s.graphSet.push(w);for(c=0;cn.count?0:n.graph},qc=function(t,e,r,n){var i=n.graphSet[r];if(-10)var o=(c=n.nodeOverlap*s)*i/(g=Math.sqrt(i*i+a*a)),l=c*a/g;else{var c,h=Zc(t,i,a),u=Zc(e,-1*i,-1*a),d=u.x-h.x,p=u.y-h.y,f=d*d+p*p,g=Math.sqrt(f);o=(c=(t.nodeRepulsion+e.nodeRepulsion)/f)*d/g,l=c*p/g}t.isLocked||(t.offsetX-=o,t.offsetY-=l),e.isLocked||(e.offsetX+=o,e.offsetY+=l)}},Xc=function(t,e,r,n){if(r>0)var i=t.maxX-e.minX;else i=e.maxX-t.minX;if(n>0)var a=t.maxY-e.minY;else a=e.maxY-t.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},Zc=function(t,e,r){var n=t.positionX,i=t.positionY,a=t.height||1,s=t.width||1,o=r/e,l=a/s,c={};return 0===e&&0r?(c.x=n,c.y=i+a/2,c):0e&&-1*l<=o&&o<=l?(c.x=n-s/2,c.y=i-s*r/2/e,c):0=l)?(c.x=n+a*e/2/r,c.y=i+a/2,c):0>r&&(o<=-1*l||o>=l)?(c.x=n-a*e/2/r,c.y=i-a/2,c):c},Qc=function(t,e){for(var r=0;r1){var f=e.gravity*u/p,g=e.gravity*d/p;h.offsetX+=f,h.offsetY+=g}}}}},th=function(t,e){var r=[],n=0,i=-1;for(r.push.apply(r,t.graphSet[0]),i+=t.graphSet[0].length;n<=i;){var a=r[n++],s=t.idToIndex[a],o=t.layoutNodes[s],l=o.children;if(0r)var i={x:r*t/n,y:r*e/n};else i={x:t,y:e};return i},nh=function(t,e){var r=t.parentId;if(null!=r){var n=e.layoutNodes[e.idToIndex[r]],i=!1;return(null==n.maxX||t.maxX+n.padRight>n.maxX)&&(n.maxX=t.maxX+n.padRight,i=!0),(null==n.minX||t.minX-n.padLeftn.maxY)&&(n.maxY=t.maxY+n.padBottom,i=!0),(null==n.minY||t.minY-n.padTopf&&(u+=p+e.componentSpacing,h=0,d=0,p=0)}}},ah={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(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function sh(t){this.options=bt({},ah,t)}sh.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=rr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(0===a.h||0===a.w)n.nodes().layoutPositions(this,e,function(t){return{x:a.x1,y:a.y1}});else{var s=i.size(),o=Math.sqrt(s*a.h/a.w),l=Math.round(o),c=Math.round(a.w/a.h*o),h=function(t){if(null==t)return Math.min(l,c);Math.min(l,c)==l?l=t:c=t},u=function(t){if(null==t)return Math.max(l,c);Math.max(l,c)==l?l=t:c=t},d=e.rows,p=null!=e.cols?e.cols:e.columns;if(null!=d&&null!=p)l=d,c=p;else if(null!=d&&null==p)l=d,c=Math.ceil(s/l);else if(null==d&&null!=p)c=p,l=Math.ceil(s/c);else if(c*l>s){var f=h(),g=u();(f-1)*g>=s?h(f-1):(g-1)*f>=s&&u(g-1)}else for(;c*l=s?u(y+1):h(m+1)}var v=a.w/c,b=a.h/l;if(e.condense&&(v=0,b=0),e.avoidOverlap)for(var x=0;x=c&&(D=0,L++)},I={},M=0;M(n=vr(t,e,x[w],x[w+1],x[w+2],x[w+3])))return m(r,n),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(x=a.allpts,w=0;w+5(n=yr(t,e,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return m(r,n),!0;v=v||i.source,b=b||i.target;var T=s.getArrowWidth(l,h),k=[{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(v),y(b))}function b(t,e,r){return ge(t,e,r)}function x(r,n){var i,a=r._private,s=f;i=n?n+"-":"",r.boundingBox();var o=a.labelBounds[n||"main"],l=r.pstyle(i+"label").value;if("yes"===r.pstyle("text-events").strValue&&l){var c=b(a.rscratch,"labelX",n),h=b(a.rscratch,"labelY",n),u=b(a.rscratch,"labelAngle",n),d=r.pstyle(i+"text-margin-x").pfValue,p=r.pstyle(i+"text-margin-y").pfValue,g=o.x1-s-d,y=o.x2+s-d,v=o.y1-s-p,x=o.y2+s-p;if(u){var w=Math.cos(u),T=Math.sin(u),k=function(t,e){return{x:(t-=c)*w-(e-=h)*T+c,y:t*T+e*w+h}},A=k(g,v),_=k(g,x),E=k(y,v),C=k(y,x),S=[A.x+d,A.y+p,E.x+d,E.y+p,C.x+d,C.y+p,_.x+d,_.y+p];if(br(t,e,S))return m(r),!0}else if(cr(o,t,e))return m(r),!0}}r&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var T=l[w];T.isNode()?y(T)||x(T):v(T)||x(T)||x(T,"source")||x(T,"target")}return c},getAllInBox:function(t,e,r,n){var i=this.getCachedZSortedEles().interactive,a=2/this.cy.zoom(),s=[],o=Math.min(t,r),c=Math.max(t,r),h=Math.min(e,n),u=Math.max(e,n),d=rr({x1:t=o,y1:e=h,x2:r=c,y2:n=u}),p=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],f=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function g(t,e,r){return ge(t,e,r)}function m(t,e){var r=t._private,n=a;t.boundingBox();var i=r.labelBounds.main;if(!i)return null;var s=g(r.rscratch,"labelX",e),o=g(r.rscratch,"labelY",e),l=g(r.rscratch,"labelAngle",e),c=t.pstyle("text-margin-x").pfValue,h=t.pstyle("text-margin-y").pfValue,u=i.x1-n-c,d=i.x2+n-c,p=i.y1-n-h,f=i.y2+n-h;if(l){var m=Math.cos(l),y=Math.sin(l),v=function(t,e){return{x:(t-=s)*m-(e-=o)*y+s,y:t*y+e*m+o}};return[v(u,p),v(d,p),v(d,f),v(u,f)]}return[{x:u,y:p},{x:d,y:p},{x:d,y:f},{x:u,y:f}]}function y(t,e,r,n){function i(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}return i(t,r,n)!==i(e,r,n)&&i(t,e,r)!==i(t,e,n)}for(var v=0;v0?-(Math.PI-a.ang):Math.PI+a.ang),Fh(e,r,Bh),Th=$h.nx*Bh.ny-$h.ny*Bh.nx,kh=$h.nx*Bh.nx-$h.ny*-Bh.ny,Eh=Math.asin(Math.max(-1,Math.min(1,Th))),Math.abs(Eh)<1e-6)return xh=e.x,wh=e.y,void(Sh=Lh=0);Ah=1,_h=!1,kh<0?Eh<0?Eh=Math.PI+Eh:(Eh=Math.PI-Eh,Ah=-1,_h=!0):Eh>0&&(Ah=-1,_h=!0),Lh=void 0!==e.radius?e.radius:n,Ch=Eh/2,Dh=Math.min($h.len/2,Bh.len/2),i?(Rh=Math.abs(Math.cos(Ch)*Lh/Math.sin(Ch)))>Dh?(Rh=Dh,Sh=Math.abs(Rh*Math.sin(Ch)/Math.cos(Ch))):Sh=Lh:(Rh=Math.min(Dh,Lh),Sh=Math.abs(Rh*Math.sin(Ch)/Math.cos(Ch))),Mh=e.x+Bh.nx*Rh,Oh=e.y+Bh.ny*Rh,xh=Mh-Bh.ny*Sh*Ah,wh=Oh+Bh.nx*Sh*Ah,Nh=e.x+$h.nx*Rh,Ih=e.y+$h.ny*Rh,Ph=e};function Kh(t,e){0===e.radius?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function qh(t,e,r,n){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return 0===n||0===e.radius?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(zh(t,e,r,n,i),{cx:xh,cy:wh,radius:Sh,startX:Nh,startY:Ih,stopX:Mh,stopY:Oh,startAngle:$h.ang+Math.PI/2*Ah,endAngle:Bh.ang-Math.PI/2*Ah,counterClockwise:_h})}var Uh=.01,jh=Math.sqrt(.02),Gh={};function Yh(t){var e=[];if(null!=t){for(var r=0;r0?Math.max(t-e,0):Math.min(t+e,0)},C=E(A,T),S=E(_,k),R=!1;"auto"===m?g=Math.abs(C)>Math.abs(S)?i:n:m===l||m===o?(g=n,R=!0):m!==a&&m!==s||(g=i,R=!0);var L,D=g===n,N=D?S:C,I=D?_:A,M=Ve(I),O=!1;(R&&(v||x)||!(m===o&&I<0||m===l&&I>0||m===a&&I>0||m===s&&I<0)||(N=(M*=-1)*Math.abs(N),O=!0),v)?L=(b<0?1+b:b)*N:L=(b<0?N:0)+b*M;var P=function(t){return Math.abs(t)=Math.abs(N)},$=P(L),B=P(Math.abs(N)-Math.abs(L));if(($||B)&&!O)if(D){var F=Math.abs(I)<=u/2,z=Math.abs(A)<=d/2;if(F){var K=(c.x1+c.x2)/2,q=c.y1,U=c.y2;r.segpts=[K,q,K,U]}else if(z){var j=(c.y1+c.y2)/2,G=c.x1,Y=c.x2;r.segpts=[G,j,Y,j]}else r.segpts=[c.x1,c.y2]}else{var W=Math.abs(I)<=h/2,H=Math.abs(_)<=p/2;if(W){var V=(c.y1+c.y2)/2,X=c.x1,Z=c.x2;r.segpts=[X,V,Z,V]}else if(H){var Q=(c.x1+c.x2)/2,J=c.y1,tt=c.y2;r.segpts=[Q,J,Q,tt]}else r.segpts=[c.x2,c.y1]}else if(D){var et=c.y1+L+(f?u/2*M:0),rt=c.x1,nt=c.x2;r.segpts=[rt,et,nt,et]}else{var it=c.x1+L+(f?h/2*M:0),at=c.y1,st=c.y2;r.segpts=[it,at,it,st]}if(r.isRound){var ot=t.pstyle("taxi-radius").value,lt="arc-radius"===t.pstyle("radius-type").value[0];r.radii=new Array(r.segpts.length/2).fill(ot),r.isArcRadius=new Array(r.segpts.length/2).fill(lt)}},Gh.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if("bezier"===r.edgeType){var n=e.srcPos,i=e.tgtPos,a=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,c=e.srcShape,h=e.tgtShape,u=e.srcCornerRadius,d=e.tgtCornerRadius,p=e.srcRs,f=e.tgtRs,g=!Q(r.startX)||!Q(r.startY),m=!Q(r.arrowStartX)||!Q(r.arrowStartY),y=!Q(r.endX)||!Q(r.endY),v=!Q(r.arrowEndX)||!Q(r.arrowEndY),b=3*(this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth),x=Xe({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),w=xg.poolIndex()){var m=f;f=g,g=m}var y=u.srcPos=f.position(),v=u.tgtPos=g.position(),b=u.srcW=f.outerWidth(),x=u.srcH=f.outerHeight(),T=u.tgtW=g.outerWidth(),k=u.tgtH=g.outerHeight(),A=u.srcShape=r.nodeShapes[e.getNodeShape(f)],_=u.tgtShape=r.nodeShapes[e.getNodeShape(g)],E=u.srcCornerRadius="auto"===f.pstyle("corner-radius").value?"auto":f.pstyle("corner-radius").pfValue,C=u.tgtCornerRadius="auto"===g.pstyle("corner-radius").value?"auto":g.pstyle("corner-radius").pfValue,S=u.tgtRs=g._private.rscratch,R=u.srcRs=f._private.rscratch;u.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var L=0;L=jh||(j=Math.sqrt(Math.max(U*U,Uh)+Math.max(q*q,Uh)));var G=u.vector={x:U,y:q},Y=u.vectorNorm={x:G.x/j,y:G.y/j},W={x:-Y.y,y:Y.x};u.nodesOverlap=!Q(j)||_.checkPoint(P[0],P[1],0,T,k,v.x,v.y,C,S)||A.checkPoint(B[0],B[1],0,b,x,y.x,y.y,E,R),u.vectorNormInverse=W,t={nodesOverlap:u.nodesOverlap,dirCounts:u.dirCounts,calculatedIntersection:!0,hasBezier:u.hasBezier,hasUnbundled:u.hasUnbundled,eles:u.eles,srcPos:v,srcRs:S,tgtPos:y,tgtRs:R,srcW:T,srcH:k,tgtW:b,tgtH:x,srcIntn:F,tgtIntn:$,srcShape:_,tgtShape:A,posPts:{x1:K.x2,y1:K.y2,x2:K.x1,y2:K.y1},intersectionPts:{x1:z.x2,y1:z.y2,x2:z.x1,y2:z.y1},vector:{x:-G.x,y:-G.y},vectorNorm:{x:-Y.x,y:-Y.y},vectorNormInverse:{x:-W.x,y:-W.y}}}var H=O?t:u;N.nodesOverlap=H.nodesOverlap,N.srcIntn=H.srcIntn,N.tgtIntn=H.tgtIntn,N.isRound=I.startsWith("round"),n&&(f.isParent()||f.isChild()||g.isParent()||g.isChild())&&(f.parents().anySame(g)||g.parents().anySame(f)||f.same(g)&&f.isParent())?e.findCompoundLoopPoints(D,H,L,M):f===g?e.findLoopPoints(D,H,L,M):I.endsWith("segments")?e.findSegmentsPoints(D,H):I.endsWith("taxi")?e.findTaxiPoints(D,H):"straight"===I||!M&&u.eles.length%2==1&&L===Math.floor(u.eles.length/2)?e.findStraightEdgePoints(D):e.findBezierPoints(D,H,L,M,O),e.findEndpoints(D),e.tryToCorrectInvalidPoints(D,H),e.checkForInvalidEdgeWarning(D),e.storeAllpts(D),e.storeEdgeProjections(D),e.calculateArrowAngles(D),e.recalculateEdgeLabelProjections(D),e.calculateLabelAngles(D)}},w=0;w0){var J=p,tt=Ze(J,Ye(a)),et=Ze(J,Ye(Z)),rt=tt;if(et2)Ze(J,{x:Z[2],y:Z[3]})0){var mt=f,yt=Ze(mt,Ye(a)),vt=Ze(mt,Ye(gt)),bt=yt;if(vt2)Ze(mt,{x:gt[2],y:gt[3]})=c||v){h={cp:g,segment:y};break}}if(h)break}var b=h.cp,x=h.segment,w=(c-d)/x.length,T=x.t1-x.t0,k=o?x.t0+T*w:x.t1-T*w;k=er(0,k,1),e=tr(b.p0,b.p1,b.p2,k),i=function(t,e,r,n){var i=er(0,n-.001,1),a=er(0,n+.001,1),s=tr(t,e,r,i),o=tr(t,e,r,a);return Qh(s,o)}(b.p0,b.p1,b.p2,k);break;case"straight":case"segments":case"haystack":for(var A,_,E,C,S=0,R=n.allpts.length,L=0;L+3=c));L+=2);var D=(c-_)/A;D=er(0,D,1),e=function(t,e,r,n){var i=e.x-t.x,a=e.y-t.y,s=Xe(t,e),o=i/s,l=a/s;return r=null==r?0:r,n=null!=n?n:r*s,{x:t.x+o*n,y:t.y+l*n}}(E,C,D),i=Qh(E,C)}s("labelX",r,e.x),s("labelY",r,e.y),s("labelAutoAngle",r,i)}};c("source"),c("target"),this.applyLabelDimensions(t)}},Xh.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Xh.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),i=Wt(n,t._private.labelDimsKey);if(ge(r.rscratch,"prefixedLabelDimsKey",e)!==i){me(r.rscratch,"prefixedLabelDimsKey",e,i);var a=this.calculateLabelDimensions(t,n),s=t.pstyle("line-height").pfValue,o=t.pstyle("text-wrap").strValue,l=ge(r.rscratch,"labelWrapCachedLines",e)||[],c="wrap"!==o?1:Math.max(l.length,1),h=a.height/c,u=h*s,d=a.width,p=a.height+(c-1)*(s-1)*h;me(r.rstyle,"labelWidth",e,d),me(r.rscratch,"labelWidth",e,d),me(r.rstyle,"labelHeight",e,p),me(r.rscratch,"labelHeight",e,p),me(r.rscratch,"labelLineHeight",e,u)}},Xh.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",i=t.pstyle(n+"label").strValue,a=t.pstyle("text-transform").value,o=function(t,n){return n?(me(r.rscratch,t,e,n),n):ge(r.rscratch,t,e)};if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var l=t.pstyle("text-wrap").value;if("wrap"===l){var c=o("labelKey");if(null!=c&&o("labelWrapKey")===c)return o("labelWrapCachedText");for(var h=i.split("\n"),u=t.pstyle("text-max-width").pfValue,d="anywhere"===t.pstyle("text-overflow-wrap").value,p=[],f=/[\s\u200b]+|$/g,g=0;gu){var b,x="",w=0,T=s(m.matchAll(f));try{for(T.s();!(b=T.n()).done;){var k=b.value,A=k[0],_=m.substring(w,k.index);w=k.index+A.length;var E=0===x.length?_:x+_+A;this.calculateLabelDimensions(t,E).width<=u?x+=_+A:(x&&p.push(x),x=_+A)}}catch(D){T.e(D)}finally{T.f()}x.match(/^[\s\u200b]+$/)||p.push(x)}else p.push(m)}o("labelWrapCachedLines",p),i=o("labelWrapCachedText",p.join("\n")),o("labelWrapKey",c)}else if("ellipsis"===l){var C=t.pstyle("text-max-width").pfValue,S="",R=!1;if(this.calculateLabelDimensions(t,i).widthC)break;S+=i[L],L===i.length-1&&(R=!0)}return R||(S+="…"),S}return i},Xh.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(r){case"left":return"right";case"right":return"left";default:return"center"}},Xh.calculateLabelDimensions=function(t,e){var r=this.cy.window().document,n=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue,a=t.pstyle("font-family").strValue,s=t.pstyle("font-weight").strValue,o=this.labelCalcCanvas,l=this.labelCalcCanvasContext;if(!o){o=this.labelCalcCanvas=r.createElement("canvas"),l=this.labelCalcCanvasContext=o.getContext("2d");var c=o.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}l.font="".concat(n," ").concat(s," ").concat(i,"px ").concat(a);for(var h=0,u=0,d=e.split("\n"),p=0;p1&&void 0!==arguments[1])||arguments[1];if(e.merge(t),r)for(var n=0;n=t.desktopTapThreshold2}var E=i(e);m&&(t.hoverData.tapholdCancelled=!0);r=!0,n(g,["mousemove","vmousemove","tapdrag"],e,{x:h[0],y:h[1]});var C=function(t){return{originalEvent:e,type:t,position:{x:h[0],y:h[1]}}},S=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||s.emit(C("boxstart")),f[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(3===t.hoverData.which){if(m){var R=C("cxtdrag");b?b.emit(R):s.emit(R),t.hoverData.cxtDragged=!0,t.hoverData.cxtOver&&g===t.hoverData.cxtOver||(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(C("cxtdragout")),t.hoverData.cxtOver=g,g&&g.emit(C("cxtdragover")))}}else if(t.hoverData.dragging){if(r=!0,s.panningEnabled()&&s.userPanningEnabled()){var L;if(t.hoverData.justStartedPan){var D=t.hoverData.mdownPos;L={x:(h[0]-D[0])*o,y:(h[1]-D[1])*o},t.hoverData.justStartedPan=!1}else L={x:x[0]*o,y:x[1]*o};s.panBy(L),s.emit(C("dragpan")),t.hoverData.dragged=!0}h=t.projectIntoViewport(e.clientX,e.clientY)}else if(1!=f[4]||null!=b&&!b.pannable()){if(b&&b.pannable()&&b.active()&&b.unactivate(),b&&b.grabbed()||g==y||(y&&n(y,["mouseout","tapdragout"],e,{x:h[0],y:h[1]}),g&&n(g,["mouseover","tapdragover"],e,{x:h[0],y:h[1]}),t.hoverData.last=g),b)if(m){if(s.boxSelectionEnabled()&&E)b&&b.grabbed()&&(u(w),b.emit(C("freeon")),w.emit(C("free")),t.dragData.didDrag&&(b.emit(C("dragfreeon")),w.emit(C("dragfree")))),S();else if(b&&b.grabbed()&&t.nodeIsDraggable(b)){var N=!t.dragData.didDrag;N&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||c(w,{inDragLayer:!0});var I={x:0,y:0};if(Q(x[0])&&Q(x[1])&&(I.x+=x[0],I.y+=x[1],N)){var M=t.hoverData.dragDelta;M&&Q(M[0])&&Q(M[1])&&(I.x+=M[0],I.y+=M[1])}t.hoverData.draggingEles=!0,w.silentShift(I).emit(C("position")).emit(C("drag")),t.redrawHint("drag",!0),t.redraw()}}else!function(){var e=t.hoverData.dragDelta=t.hoverData.dragDelta||[];0===e.length?(e.push(x[0]),e.push(x[1])):(e[0]+=x[0],e[1]+=x[1])}();r=!0}else if(m){if(t.hoverData.dragging||!s.boxSelectionEnabled()||!E&&s.panningEnabled()&&s.userPanningEnabled()){if(!t.hoverData.selecting&&s.panningEnabled()&&s.userPanningEnabled()){a(b,t.hoverData.downs)&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,f[4]=0,t.data.bgActivePosistion=Ye(d),t.redrawHint("select",!0),t.redraw())}}else S();b&&b.pannable()&&b.active()&&b.unactivate()}return f[2]=h[0],f[3]=h[1],r?(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1):void 0}},!1),t.registerBinding(e,"mouseup",function(e){if((1!==t.hoverData.which||1===e.which||!t.hoverData.capture)&&t.hoverData.capture){t.hoverData.capture=!1;var a=t.cy,s=t.projectIntoViewport(e.clientX,e.clientY),o=t.selection,l=t.findNearestElement(s[0],s[1],!0,!1),c=t.dragData.possibleDragElements,h=t.hoverData.down,d=i(e);t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,h&&h.unactivate();var p=function(t){return{originalEvent:e,type:t,position:{x:s[0],y:s[1]}}};if(3===t.hoverData.which){var f=p("cxttapend");if(h?h.emit(f):a.emit(f),!t.hoverData.cxtDragged){var g=p("cxttap");h?h.emit(g):a.emit(g)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(1===t.hoverData.which){if(n(l,["mouseup","tapend","vmouseup"],e,{x:s[0],y:s[1]}),t.dragData.didDrag||t.hoverData.dragged||t.hoverData.selecting||t.hoverData.isOverThresholdDrag||(n(h,["click","tap","vclick"],e,{x:s[0],y:s[1]}),x=!1,e.timeStamp-w<=a.multiClickDebounceTime()?(b&&clearTimeout(b),x=!0,w=null,n(h,["dblclick","dbltap","vdblclick"],e,{x:s[0],y:s[1]})):(b=setTimeout(function(){x||n(h,["oneclick","onetap","voneclick"],e,{x:s[0],y:s[1]})},a.multiClickDebounceTime()),w=e.timeStamp)),null!=h||t.dragData.didDrag||t.hoverData.selecting||t.hoverData.dragged||i(e)||(a.$(r).unselect(["tapunselect"]),c.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=c=a.collection()),l!=h||t.dragData.didDrag||t.hoverData.selecting||null!=l&&l._private.selectable&&(t.hoverData.dragging||("additive"===a.selectionType()||d?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):d||(a.$(r).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var m=a.collection(t.getAllInBox(o[0],o[1],o[2],o[3]));t.redrawHint("select",!0),m.length>0&&t.redrawHint("eles",!0),a.emit(p("boxend"));var y=function(t){return t.selectable()&&!t.selected()};"additive"===a.selectionType()||d||a.$(r).unmerge(m).unselect(),m.emit(p("box")).stdFilter(y).select().emit(p("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!o[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var v=h&&h.grabbed();u(c),v&&(h.emit(p("freeon")),c.emit(p("free")),t.dragData.didDrag&&(h.emit(p("dragfreeon")),c.emit(p("dragfree"))))}}o[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}},!1);var k,A,_,E,C,S,R,L,D,N,I,M,O,P,$=[],B=1e5,F=function(e){var r=!1,n=e.deltaY;if(null==n&&(null!=e.wheelDeltaY?n=e.wheelDeltaY/4:null!=e.wheelDelta&&(n=e.wheelDelta/4)),0!==n){if(null==k)if($.length>=4){var i=$;if(k=function(t,e){for(var r=0;r5}if(k)for(var s=0;s5&&(n=5*Ve(n)),d=n/-250,k&&(d/=B,d*=3),d*=t.wheelSensitivity,1===e.deltaMode&&(d*=33);var p=o.zoom()*Math.pow(10,d);"gesturechange"===e.type&&(p=t.gestureStartZoom*e.scale),o.zoom({level:p,renderedPosition:{x:u[0],y:u[1]}}),o.emit({type:"gesturechange"===e.type?"pinchzoom":"scrollzoom",originalEvent:e,position:{x:h[0],y:h[1]}})}}}};t.registerBinding(t.container,"wheel",F,!0),t.registerBinding(e,"scroll",function(e){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(e){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||e.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(e){t.hasTouchStarted||F(e)},!0),t.registerBinding(t.container,"mouseout",function(e){var r=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseout",position:{x:r[0],y:r[1]}})},!1),t.registerBinding(t.container,"mouseover",function(e){var r=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseover",position:{x:r[0],y:r[1]}})},!1);var z,K,q,U,j,G,Y,W=function(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))},H=function(t,e,r,n){return(r-t)*(r-t)+(n-e)*(n-e)};if(t.registerBinding(t.container,"touchstart",z=function(e){if(t.hasTouchStarted=!0,v(e)){p(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var r=t.cy,i=t.touchData.now,a=t.touchData.earlier;if(e.touches[0]){var s=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);i[0]=s[0],i[1]=s[1]}if(e.touches[1]){s=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);i[2]=s[0],i[3]=s[1]}if(e.touches[2]){s=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);i[4]=s[0],i[5]=s[1]}var l=function(t){return{originalEvent:e,type:t,position:{x:i[0],y:i[1]}}};if(e.touches[1]){t.touchData.singleTouchMoved=!0,u(t.dragData.touchDragEles);var d=t.findContainerClientCoords();N=d[0],I=d[1],M=d[2],O=d[3],A=e.touches[0].clientX-N,_=e.touches[0].clientY-I,E=e.touches[1].clientX-N,C=e.touches[1].clientY-I,P=0<=A&&A<=M&&0<=E&&E<=M&&0<=_&&_<=O&&0<=C&&C<=O;var f=r.pan(),g=r.zoom();S=W(A,_,E,C),R=H(A,_,E,C),D=[((L=[(A+E)/2,(_+C)/2])[0]-f.x)/g,(L[1]-f.y)/g];if(R<4e4&&!e.touches[2]){var m=t.findNearestElement(i[0],i[1],!0,!0),y=t.findNearestElement(i[2],i[3],!0,!0);return m&&m.isNode()?(m.activate().emit(l("cxttapstart")),t.touchData.start=m):y&&y.isNode()?(y.activate().emit(l("cxttapstart")),t.touchData.start=y):r.emit(l("cxttapstart")),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,void t.redraw()}}if(e.touches[2])r.boxSelectionEnabled()&&e.preventDefault();else if(e.touches[1]);else if(e.touches[0]){var b=t.findNearestElements(i[0],i[1],!0,!0),x=b[0];if(null!=x&&(x.activate(),t.touchData.start=x,t.touchData.starts=b,t.nodeIsGrabbable(x))){var w=t.dragData.touchDragEles=r.collection(),T=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),x.selected()?(T=r.$(function(e){return e.selected()&&t.nodeIsGrabbable(e)}),c(T,{addToList:w})):h(x,{addToList:w}),o(x),x.emit(l("grabon")),T?T.forEach(function(t){t.emit(l("grab"))}):x.emit(l("grab"))}n(x,["touchstart","tapstart","vmousedown"],e,{x:i[0],y:i[1]}),null==x&&(t.data.bgActivePosistion={x:s[0],y:s[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){!1!==t.touchData.singleTouchMoved||t.pinching||t.touchData.selecting||n(t.touchData.start,["taphold"],e,{x:i[0],y:i[1]})},t.tapholdDuration)}if(e.touches.length>=1){for(var k=t.touchData.startPosition=[null,null,null,null,null,null],$=0;$=t.touchTapThreshold2}if(r&&t.touchData.cxt){e.preventDefault();var T=e.touches[0].clientX-N,k=e.touches[0].clientY-I,L=e.touches[1].clientX-N,M=e.touches[1].clientY-I,O=H(T,k,L,M);if(O/R>=2.25||O>=22500){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var $=f("cxttapend");t.touchData.start?(t.touchData.start.unactivate().emit($),t.touchData.start=null):s.emit($)}}if(r&&t.touchData.cxt){$=f("cxtdrag");t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit($):s.emit($),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var B=t.findNearestElement(o[0],o[1],!0,!0);t.touchData.cxtOver&&B===t.touchData.cxtOver||(t.touchData.cxtOver&&t.touchData.cxtOver.emit(f("cxtdragout")),t.touchData.cxtOver=B,B&&B.emit(f("cxtdragover")))}else if(r&&e.touches[2]&&s.boxSelectionEnabled())e.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||s.emit(f("boxstart")),t.touchData.selecting=!0,t.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(o[0]+o[2]+o[4])/3,i[3]=(o[1]+o[3]+o[5])/3):(i[0]=(o[0]+o[2]+o[4])/3,i[1]=(o[1]+o[3]+o[5])/3,i[2]=(o[0]+o[2]+o[4])/3+1,i[3]=(o[1]+o[3]+o[5])/3+1),t.redrawHint("select",!0),t.redraw();else if(r&&e.touches[1]&&!t.touchData.didSelect&&s.zoomingEnabled()&&s.panningEnabled()&&s.userZoomingEnabled()&&s.userPanningEnabled()){if(e.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),et=t.dragData.touchDragEles){t.redrawHint("drag",!0);for(var F=0;F0&&!t.hoverData.draggingEles&&!t.swipePanning&&null!=t.data.bgActivePosistion&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1),t.registerBinding(e,"touchcancel",q=function(e){var r=t.touchData.start;t.touchData.capture=!1,r&&r.unactivate()}),t.registerBinding(e,"touchend",U=function(e){var i=t.touchData.start;if(t.touchData.capture){0===e.touches.length&&(t.touchData.capture=!1),e.preventDefault();var a=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var s=t.cy,o=s.zoom(),l=t.touchData.now,c=t.touchData.earlier;if(e.touches[0]){var h=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);l[0]=h[0],l[1]=h[1]}if(e.touches[1]){h=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);l[2]=h[0],l[3]=h[1]}if(e.touches[2]){h=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);l[4]=h[0],l[5]=h[1]}var d,p=function(t){return{originalEvent:e,type:t,position:{x:l[0],y:l[1]}}};if(i&&i.unactivate(),t.touchData.cxt){if(d=p("cxttapend"),i?i.emit(d):s.emit(d),!t.touchData.cxtDragged){var f=p("cxttap");i?i.emit(f):s.emit(f)}return t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,void t.redraw()}if(!e.touches[2]&&s.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var g=s.collection(t.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,t.redrawHint("select",!0),s.emit(p("boxend"));g.emit(p("box")).stdFilter(function(t){return t.selectable()&&!t.selected()}).select().emit(p("boxselect")),g.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(null!=i&&i.unactivate(),e.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(e.touches[1]);else if(e.touches[0]);else if(!e.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var m=t.dragData.touchDragEles;if(null!=i){var y=i._private.grabbed;u(m),t.redrawHint("drag",!0),t.redrawHint("eles",!0),y&&(i.emit(p("freeon")),m.emit(p("free")),t.dragData.didDrag&&(i.emit(p("dragfreeon")),m.emit(p("dragfree")))),n(i,["touchend","tapend","vmouseup","tapdragout"],e,{x:l[0],y:l[1]}),i.unactivate(),t.touchData.start=null}else{var v=t.findNearestElement(l[0],l[1],!0,!0);n(v,["touchend","tapend","vmouseup","tapdragout"],e,{x:l[0],y:l[1]})}var b=t.touchData.startPosition[0]-l[0],x=b*b,w=t.touchData.startPosition[1]-l[1],T=(x+w*w)*o*o;t.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),n(i,["tap","vclick"],e,{x:l[0],y:l[1]}),j=!1,e.timeStamp-Y<=s.multiClickDebounceTime()?(G&&clearTimeout(G),j=!0,Y=null,n(i,["dbltap","vdblclick"],e,{x:l[0],y:l[1]})):(G=setTimeout(function(){j||n(i,["onetap","voneclick"],e,{x:l[0],y:l[1]})},s.multiClickDebounceTime()),Y=e.timeStamp)),null!=i&&!t.dragData.didDrag&&i._private.selectable&&T2){for(var p=[h[0],h[1]],f=Math.pow(p[0]-t,2)+Math.pow(p[1]-e,2),g=1;g0)return g[0]}return null},p=Object.keys(u),f=0;f0?c:fr(i,a,t,e,r,n,s,o)},checkPoint:function(t,e,r,n,i,a,s,o){var l=2*(o="auto"===o?Ir(n,i):o);if(xr(t,e,this.points,a,s,n,i-l,[0,-1],r))return!0;if(xr(t,e,this.points,a,s,n-l,i,[0,-1],r))return!0;var c=n/2+2*r,h=i/2+2*r;return!!br(t,e,[a-c,s-h,a-c,s,a+c,s,a+c,s-h])||(!!kr(t,e,l,l,a+n/2-o,s+i/2-o,r)||!!kr(t,e,l,l,a-n/2+o,s+i/2-o,r))}}},su.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Lr(3,0)),this.generateRoundPolygon("round-triangle",Lr(3,0)),this.generatePolygon("rectangle",Lr(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r),this.generatePolygon("pentagon",Lr(5,0)),this.generateRoundPolygon("round-pentagon",Lr(5,0)),this.generatePolygon("hexagon",Lr(6,0)),this.generateRoundPolygon("round-hexagon",Lr(6,0)),this.generatePolygon("heptagon",Lr(7,0)),this.generateRoundPolygon("round-heptagon",Lr(7,0)),this.generatePolygon("octagon",Lr(8,0)),this.generateRoundPolygon("round-octagon",Lr(8,0));var n=new Array(20),i=Nr(5,0),a=Nr(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=t.deqFastCost*g)break}else if(i){if(p>=t.deqCost*l||p>=t.deqAvgCost*o)break}else if(f>=t.deqNoDrawCost*uu)break;var m=t.deq(e,u,h);if(!(m.length>0))break;for(var y=0;y0&&(t.onDeqd(e,c),!i&&t.shouldRedraw(e,c,u,h)&&n())},i(e))}}},pu=function(){return a(function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:re;i(this,t),this.idsByKey=new ye,this.keyForId=new ye,this.cachesByLvl=new ye,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r},[{key:"getIdsFor",value:function(t){null==t&&ae("Can not get id list for null key");var e=this.idsByKey,r=this.idsByKey.get(t);return r||(r=new be,e.set(t,r)),r}},{key:"addIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).add(e)}},{key:"deleteIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).delete(e)}},{key:"getNumberOfIdsForKey",value:function(t){return null==t?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var e=t.id(),r=this.keyForId.get(e),n=this.getKey(t);this.deleteIdForKey(r,e),this.addIdForKey(n,e),this.keyForId.set(e,n)}},{key:"deleteKeyMappingFor",value:function(t){var e=t.id(),r=this.keyForId.get(e);this.deleteIdForKey(r,e),this.keyForId.delete(e)}},{key:"keyHasChangedFor",value:function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var e=this.cachesByLvl,r=this.lvls,n=e.get(t);return n||(n=new ye,e.set(t,n),r.push(t)),n}},{key:"getCache",value:function(t,e){return this.getCachesAt(e).get(t)}},{key:"get",value:function(t,e){var r=this.getKey(t),n=this.getCache(r,e);return null!=n&&this.updateKeyMappingFor(t),n}},{key:"getForCachedKey",value:function(t,e){var r=this.keyForId.get(t.id());return this.getCache(r,e)}},{key:"hasCache",value:function(t,e){return this.getCachesAt(e).has(t)}},{key:"has",value:function(t,e){var r=this.getKey(t);return this.hasCache(r,e)}},{key:"setCache",value:function(t,e,r){r.key=t,this.getCachesAt(e).set(t,r)}},{key:"set",value:function(t,e,r){var n=this.getKey(t);this.setCache(n,e,r),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,e){this.getCachesAt(e).delete(t)}},{key:"delete",value:function(t,e){var r=this.getKey(t);this.deleteCache(r,e)}},{key:"invalidateKey",value:function(t){var e=this;this.lvls.forEach(function(r){return e.deleteCache(t,r)})}},{key:"invalidate",value:function(t){var e=t.id(),r=this.keyForId.get(e);this.deleteKeyMappingFor(t);var n=this.doesEleInvalidateKey(t);return n&&this.invalidateKey(r),n||0===this.getNumberOfIdsForKey(r)}}])}(),fu=7.99,gu={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},mu=de({getKey:null,doesEleInvalidateKey:re,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ee,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),yu=function(t,e){var r=this;r.renderer=t,r.onDequeues=[];var n=mu(e);bt(r,n),r.lookup=new pu(n.getKey,n.doesEleInvalidateKey),r.setupDequeueing()},vu=yu.prototype;vu.reasons=gu,vu.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]},vu.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},vu.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new Le(function(t,e){return e.reqs-t.reqs})},vu.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},vu.getElement=function(t,e,r,n,i){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed())return null;if(!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(null==n&&(n=Math.ceil(He(o*r))),n<-4)n=-4;else if(o>=7.99||n>3)return null;var c=Math.pow(2,n),h=e.h*c,u=e.w*c,d=s.eleTextBiggerThanMin(t,c);if(!this.isVisible(t,d))return null;var p,f=l.get(t,n);if(f&&f.invalidated&&(f.invalidated=!1,f.texture.invalidatedWidth-=f.width),f)return f;if(p=h<=25?25:h<=50?50:50*Math.ceil(h/50),h>1024||u>1024)return null;var g=a.getTextureQueue(p),m=g[g.length-2],y=function(){return a.recycleTexture(p,u)||a.addTexture(p,u)};m||(m=g[g.length-1]),m||(m=y()),m.width-m.usedWidthn;C--)_=a.getElement(t,e,r,C,gu.downscale);E()}else{var S;if(!x&&!w&&!T)for(var R=n-1;R>=-4;R--){var L=l.get(t,R);if(L){S=L;break}}if(b(S))return a.queueElement(t,n),S;m.context.translate(m.usedWidth,0),m.context.scale(c,c),this.drawElement(m.context,t,e,d,!1),m.context.scale(1/c,1/c),m.context.translate(-m.usedWidth,0)}return f={x:m.usedWidth,texture:m,level:n,scale:c,width:u,height:h,scaledLabelShown:d},m.usedWidth+=Math.ceil(u+8),m.eleCaches.push(f),l.set(t,n,f),a.checkTextureFullness(m),f},vu.invalidateElements=function(t){for(var e=0;e=.2*t.width&&this.retireTexture(t)},vu.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);t.usedWidth/t.width>.8&&t.fullnessChecks>=10?pe(e,t):t.fullnessChecks++},vu.retireTexture=function(t){var e=t.height,r=this.getTextureQueue(e),n=this.lookup;pe(r,t),t.retired=!0;for(var i=t.eleCaches,a=0;a=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,fe(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),pe(n,a),r.push(a),a}},vu.queueElement=function(t,e){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(t),a=n[i];if(a)a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,r.updateItem(a);else{var s={eles:t.spawn().merge(t),level:e,reqs:1,key:i};r.push(s),n[i]=s}},vu.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,s=0;s<1&&r.size()>0;s++){var o=r.pop(),l=o.key,c=o.eles[0],h=a.hasCache(c,o.level);if(n[l]=null,!h){i.push(o);var u=e.getBoundingBox(c);e.getElement(c,u,t,o.level,gu.dequeue)}}return i},vu.removeFromQueue=function(t){var e=this.getElementQueue(),r=this.getElementKeyToQueue(),n=this.getKey(t),i=r[n];null!=i&&(1===i.eles.length?(i.reqs=te,e.updateItem(i),e.pop(),r[n]=null):i.eles.unmerge(t))},vu.onDequeue=function(t){this.onDequeues.push(t)},vu.offDequeue=function(t){pe(this.onDequeues,t)},vu.setupDequeueing=du({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(t,e,r){return t.dequeue(e,r)},onDeqd:function(t,e){for(var r=0;r=3.99||r>2)return null;n.validateLayersElesOrdering(r,t);var s,o,l=n.layersByLevel,c=Math.pow(2,r),h=l[r]=l[r]||[];if(n.levelIsComplete(r,t))return h;!function(){var e=function(e){if(n.validateLayersElesOrdering(e,t),n.levelIsComplete(e,t))return o=l[e],!0},i=function(t){if(!o)for(var n=r+t;-4<=n&&n<=2&&!e(n);n+=t);};i(1),i(-1);for(var a=h.length-1;a>=0;a--){var s=h[a];s.invalid&&pe(h,s)}}();var u=function(e){var i=(e=e||{}).after;!function(){if(!s){s=rr();for(var e=0;e32767||o>32767)return null;if(a*o>16e6)return null;var l=n.makeLayer(s,r);if(null!=i){var u=h.indexOf(i)+1;h.splice(u,0,l)}else(void 0===e.insert||e.insert)&&h.unshift(l);return l};if(n.skipping&&!a)return null;for(var d=null,p=t.length/1,f=!a,g=0;g=p||!ur(d.bb,m.boundingBox()))&&!(d=u({insert:!0,after:d})))return null;o||f?n.queueLayer(d,m):n.drawEleInLayer(d,m,r,e),d.eles.push(m),v[r]=d}}return o||(f?null:h)},xu.getEleLevelForLayerLevel=function(t,e){return t},xu.drawEleInLayer=function(t,e,r,n){var i=this.renderer,a=t.context,s=e.boundingBox();0!==s.w&&0!==s.h&&e.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(a,!1),i.drawCachedElement(a,e,null,null,r,true),i.setImgSmoothing(a,!0))},xu.levelIsComplete=function(t,e){var r=this.layersByLevel[t];if(!r||0===r.length)return!1;for(var n=0,i=0;i0)return!1;if(a.invalid)return!1;n+=a.eles.length}return n===e.length},xu.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n0){t=!0;break}}return t},xu.invalidateElements=function(t){var e=this;0!==t.length&&(e.lastInvalidationTime=Bt(),0!==t.length&&e.haveLayers()&&e.updateElementsInLayers(t,function(t,r,n){e.invalidateLayer(t)}))},xu.invalidateLayer=function(t){if(this.lastInvalidationTime=Bt(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];pe(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.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],s=this,o=e._private.rscratch;if((!a||e.visible())&&!o.badLine&&null!=o.allpts&&!isNaN(o.allpts[0])){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var c=a?e.pstyle("opacity").value:1,h=a?e.pstyle("line-opacity").value:1,u=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,f=e.pstyle("line-cap").value,g=e.pstyle("line-outline-width").value,m=e.pstyle("line-outline-color").value,y=c*h,v=c*h,b=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===u?(s.eleStrokeStyle(t,e,r),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=p,t.lineCap=f,s.eleStrokeStyle(t,e,r),s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},x=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;s.drawArrowheads(t,e,r)};if(t.lineJoin="round","yes"===e.pstyle("ghost").value){var w=e.pstyle("ghost-offset-x").pfValue,T=e.pstyle("ghost-offset-y").pfValue,k=e.pstyle("ghost-opacity").value,A=y*k;t.translate(w,T),b(A),x(A),t.translate(-w,-T)}else!function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;t.lineWidth=p+g,t.lineCap=f,g>0?(s.colorStrokeStyle(t,m[0],m[1],m[2],r),"straight-triangle"===u?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")):t.lineCap="butt"}();i&&s.drawEdgeUnderlay(t,e),b(),x(),i&&s.drawEdgeOverlay(t,e),s.drawElementText(t,e,null,n),r&&t.translate(l.x1,l.y1)}}},Bu=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(e,r){if(r.visible()){var n=r.pstyle("".concat(t,"-opacity")).value;if(0!==n){var i=this,a=i.usePaths(),s=r._private.rscratch,o=2*r.pstyle("".concat(t,"-padding")).pfValue,l=r.pstyle("".concat(t,"-color")).value;e.lineWidth=o,"self"!==s.edgeType||a?e.lineCap="round":e.lineCap="butt",i.colorStrokeStyle(e,l[0],l[1],l[2],n),i.drawEdgePath(r,e,s.allpts,"solid")}}}};$u.drawEdgeOverlay=Bu("overlay"),$u.drawEdgeUnderlay=Bu("underlay"),$u.drawEdgePath=function(t,e,r,n){var i,a=t._private.rscratch,o=e,l=!1,c=this.usePaths(),h=t.pstyle("line-dash-pattern").pfValue,u=t.pstyle("line-dash-offset").pfValue;if(c){var d=r.join("$");a.pathCacheKey&&a.pathCacheKey===d?(i=e=a.pathCache,l=!0):(i=e=new Path2D,a.pathCacheKey=d,a.pathCache=i)}if(o.setLineDash)switch(n){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(h),o.lineDashOffset=u;break;case"solid":o.setLineDash([])}if(!l&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&void 0!==arguments[5]?arguments[5]:5,s=Math.min(a,n/2,i/2);t.beginPath(),t.moveTo(e+s,r),t.lineTo(e+n-s,r),t.quadraticCurveTo(e+n,r,e+n,r+s),t.lineTo(e+n,r+i-s),t.quadraticCurveTo(e+n,r+i,e+n-s,r+i),t.lineTo(e+s,r+i),t.quadraticCurveTo(e,r+i,e,r+i-s),t.lineTo(e,r+s),t.quadraticCurveTo(e,r,e+s,r),t.closePath()}zu.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),n=this.getPixelRatio(),i=Math.ceil(He(r*n));e=Math.pow(2,i)}return!(t.pstyle("font-size").pfValue*e5&&void 0!==arguments[5])||arguments[5],s=this;if(null==n){if(a&&!s.eleTextBiggerThanMin(e))return}else if(!1===n)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var c=e.element()._private.rscratch.badLine,h=e.pstyle("label"),u=e.pstyle("source-label"),d=e.pstyle("target-label");if(c||(!h||!h.value)&&(!u||!u.value)&&(!d||!d.value))return;t.textAlign="center",t.textBaseline="bottom"}var p,f=!r;r&&(p=r,t.translate(-p.x1,-p.y1)),null==i?(s.drawText(t,e,null,f,a),e.isEdge()&&(s.drawText(t,e,"source",f,a),s.drawText(t,e,"target",f,a))):s.drawText(t,e,i,f,a),r&&t.translate(p.x1,p.y1)},zu.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&void 0!==arguments[2])||arguments[2],n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,c=e.pstyle("color").value,h=e.pstyle("text-outline-color").value;t.font=n+" "+s+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,c[0],c[1],c[2],o),this.colorStrokeStyle(t,h[0],h[1],h[2],l)},zu.getTextAngle=function(t,e){var r,n=t._private.rscratch,i=e?e+"-":"",a=t.pstyle(i+"text-rotation");if("autorotate"===a.strValue){var s=ge(n,"labelAngle",e);r=t.isEdge()?s:0}else r="none"===a.strValue?0:a.pfValue;return r},zu.drawText=function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=e._private.rscratch,s=i?e.effectiveOpacity():1;if(!i||0!==s&&0!==e.pstyle("text-opacity").value){"main"===r&&(r=null);var o,l,c=ge(a,"labelX",r),h=ge(a,"labelY",r),u=this.getLabelText(e,r);if(null!=u&&""!==u&&!isNaN(c)&&!isNaN(h)){this.setupTextStyle(t,e,i);var d,p=r?r+"-":"",f=ge(a,"labelWidth",r),g=ge(a,"labelHeight",r),m=e.pstyle(p+"text-margin-x").pfValue,y=e.pstyle(p+"text-margin-y").pfValue,v=e.isEdge(),b=e.pstyle("text-halign").value,x=e.pstyle("text-valign").value;switch(v&&(b="center",x="center"),c+=m,h+=y,0!==(d=n?this.getTextAngle(e,r):0)&&(o=c,l=h,t.translate(o,l),t.rotate(d),c=0,h=0),x){case"top":break;case"center":h+=g/2;break;case"bottom":h+=g}var w=e.pstyle("text-background-opacity").value,T=e.pstyle("text-border-opacity").value,k=e.pstyle("text-border-width").pfValue,A=e.pstyle("text-background-padding").pfValue,_=e.pstyle("text-background-shape").strValue,E="round-rectangle"===_||"roundrectangle"===_,C="circle"===_;if(w>0||k>0&&T>0){var S=t.fillStyle,R=t.strokeStyle,L=t.lineWidth,D=e.pstyle("text-background-color").value,N=e.pstyle("text-border-color").value,I=e.pstyle("text-border-style").value,M=w>0,O=k>0&&T>0,P=c-A;switch(b){case"left":P-=f;break;case"center":P-=f/2}var $=h-g-A,B=f+2*A,F=g+2*A;if(M&&(t.fillStyle="rgba(".concat(D[0],",").concat(D[1],",").concat(D[2],",").concat(w*s,")")),O&&(t.strokeStyle="rgba(".concat(N[0],",").concat(N[1],",").concat(N[2],",").concat(T*s,")"),t.lineWidth=k,t.setLineDash))switch(I){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=k/4,t.setLineDash([]);break;default:t.setLineDash([])}if(E?(t.beginPath(),Ku(t,P,$,B,F,2)):C?(t.beginPath(),function(t,e,r,n,i){var a=Math.min(n,i)/2,s=e+n/2,o=r+i/2;t.beginPath(),t.arc(s,o,a,0,2*Math.PI),t.closePath()}(t,P,$,B,F)):(t.beginPath(),t.rect(P,$,B,F)),M&&t.fill(),O&&t.stroke(),O&&"double"===I){var z=k/2;t.beginPath(),E?Ku(t,P+z,$+z,B-2*z,F-2*z,2):t.rect(P+z,$+z,B-2*z,F-2*z),t.stroke()}t.fillStyle=S,t.strokeStyle=R,t.lineWidth=L,t.setLineDash&&t.setLineDash([])}var K=2*e.pstyle("text-outline-width").pfValue;if(K>0&&(t.lineWidth=K),"wrap"===e.pstyle("text-wrap").value){var q=ge(a,"labelWrapCachedLines",r),U=ge(a,"labelLineHeight",r),j=f/2,G=this.getLabelJustification(e);switch("auto"===G||("left"===b?"left"===G?c+=-f:"center"===G&&(c+=-j):"center"===b?"left"===G?c+=-j:"right"===G&&(c+=j):"right"===b&&("center"===G?c+=j:"right"===G&&(c+=f))),x){case"top":case"center":case"bottom":h-=(q.length-1)*U}for(var Y=0;Y0&&t.strokeText(q[Y],c,h),t.fillText(q[Y],c,h),h+=U}else K>0&&t.strokeText(u,c,h),t.fillText(u,c,h);0!==d&&(t.rotate(-d),t.translate(-o,-l))}}};var qu={drawNode:function(t,e,r){var n,i,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,c=e._private,h=c.rscratch,u=e.position();if(Q(u.x)&&Q(u.y)&&(!o||e.visible())){var d,p,f=o?e.effectiveOpacity():1,g=l.usePaths(),m=!1,y=e.padding();n=e.width()+2*y,i=e.height()+2*y,r&&(p=r,t.translate(-p.x1,-p.y1));for(var v=e.pstyle("background-image").value,b=new Array(v.length),x=new Array(v.length),w=0,T=0;T0&&void 0!==arguments[0]?arguments[0]:C;l.eleFillStyle(t,e,r)},U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;l.colorStrokeStyle(t,S[0],S[1],S[2],e)},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F;l.colorStrokeStyle(t,$[0],$[1],$[2],e)},G=function(t,e,r,n){var i,a=l.nodePathCache=l.nodePathCache||[],s=Ht("polygon"===r?r+","+n.join(","):r,""+e,""+t,""+K),o=a[s],c=!1;return null!=o?(i=o,c=!0,h.pathCache=i):(i=new Path2D,a[s]=h.pathCache=i),{path:i,cacheHit:c}},Y=e.pstyle("shape").strValue,W=e.pstyle("shape-polygon-points").pfValue;if(g){t.translate(u.x,u.y);var H=G(n,i,Y,W);d=H.path,m=H.cacheHit}var V=function(){if(!m){var r=u;g&&(r={x:0,y:0}),l.nodeShapes[l.getNodeShape(e)].draw(d||t,r.x,r.y,n,i,K,h)}g?t.fill(d):t.fill()},X=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=c.backgrounding,a=0,s=0;s0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;l.hasPie(e)&&(l.drawPie(t,e,a),r&&(g||l.nodeShapes[l.getNodeShape(e)].draw(t,u.x,u.y,n,i,K,h)))},J=function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;l.hasStripe(e)&&(t.save(),g?t.clip(h.pathCache):(l.nodeShapes[l.getNodeShape(e)].draw(t,u.x,u.y,n,i,K,h),t.clip()),l.drawStripe(t,e,a),t.restore(),r&&(g||l.nodeShapes[l.getNodeShape(e)].draw(t,u.x,u.y,n,i,K,h)))},tt=function(){var e=(_>0?_:-_)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:f),r=_>0?0:255;0!==_&&(l.colorFillStyle(t,r,r,r,e),g?t.fill(d):t.fill())},et=function(){if(E>0){if(t.lineWidth=E,t.lineCap=D,t.lineJoin=L,t.setLineDash)switch(R){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(I),t.lineDashOffset=M;break;case"solid":case"double":t.setLineDash([])}if("center"!==N){if(t.save(),t.lineWidth*=2,"inside"===N)g?t.clip(d):t.clip();else{var e=new Path2D;e.rect(-n/2-E,-i/2-E,n+2*E,i+2*E),e.addPath(d),t.clip(e,"evenodd")}g?t.stroke(d):t.stroke(),t.restore()}else g?t.stroke(d):t.stroke();if("double"===R){t.lineWidth=E/3;var r=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",g?t.stroke(d):t.stroke(),t.globalCompositeOperation=r}t.setLineDash&&t.setLineDash([])}},rt=function(){if(P>0){if(t.lineWidth=P,t.lineCap="butt",t.setLineDash)switch(B){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([])}var r=u;g&&(r={x:0,y:0});var a=l.getNodeShape(e),s=E;"inside"===N&&(s=0),"outside"===N&&(s*=2);var o,c=(n+s+(P+z))/n,h=(i+s+(P+z))/i,d=n*c,p=i*h,f=l.nodeShapes[a].points;if(g)o=G(d,p,a,f).path;if("ellipse"===a)l.drawEllipsePath(o||t,r.x,r.y,d,p);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(a)){var m=0,y=0,v=0;"round-diamond"===a?m=1.4*(s+z+P):"round-heptagon"===a?(m=1.075*(s+z+P),v=-(s/2+z+P)/35):"round-hexagon"===a?m=1.12*(s+z+P):"round-pentagon"===a?(m=1.13*(s+z+P),v=-(s/2+z+P)/15):"round-tag"===a?(m=1.12*(s+z+P),y=.07*(s/2+P+z)):"round-triangle"===a&&(m=(s+z+P)*(Math.PI/2),v=-(s+z/2+P)/Math.PI),0!==m&&(d=n*(c=(n+m)/n),["round-hexagon","round-tag"].includes(a)||(p=i*(h=(i+m)/i)));for(var b=d/2,x=p/2,w=(K="auto"===K?Mr(d,p):K)+(s+P+z)/2,T=new Array(f.length/2),k=new Array(f.length/2),A=0;A0){if(n=n||r.position(),null==i||null==a){var u=r.padding();i=r.width()+2*u,a=r.height()+2*u}this.colorFillStyle(e,l[0],l[1],l[2],o),this.nodeShapes[c].draw(e,n.x,n.y,i+2*s,a+2*s,h),e.fill()}}}};qu.drawNodeOverlay=Uu("overlay"),qu.drawNodeUnderlay=Uu("underlay"),qu.hasPie=function(t){return(t=t[0])._private.hasPie},qu.hasStripe=function(t){return(t=t[0])._private.hasStripe},qu.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i,a=e.cy().style(),s=e.pstyle("pie-size"),o=e.pstyle("pie-hole"),l=e.pstyle("pie-start-angle").pfValue,c=n.x,h=n.y,u=e.width(),d=e.height(),p=Math.min(u,d)/2,f=0;if(this.usePaths()&&(c=0,h=0),"%"===s.units?p*=s.pfValue:void 0!==s.pfValue&&(p=s.pfValue/2),"%"===o.units?i=p*o.pfValue:void 0!==o.pfValue&&(i=o.pfValue/2),!(i>=p))for(var g=1;g<=a.pieBackgroundN;g++){var m=e.pstyle("pie-"+g+"-background-size").value,y=e.pstyle("pie-"+g+"-background-color").value,v=e.pstyle("pie-"+g+"-background-opacity").value*r,b=m/100;b+f>1&&(b=1-f);var x=1.5*Math.PI+2*Math.PI*f,w=(x+=l)+2*Math.PI*b;0===m||f>=1||f+b>1||(0===i?(t.beginPath(),t.moveTo(c,h),t.arc(c,h,p,x,w),t.closePath()):(t.beginPath(),t.arc(c,h,p,x,w),t.arc(c,h,i,w,x,!0),t.closePath()),this.colorFillStyle(t,y[0],y[1],y[2],v),t.fill(),f+=b)}},qu.drawStripe=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=n.x,s=n.y,o=e.width(),l=e.height(),c=0,h=this.usePaths();t.save();var u=e.pstyle("stripe-direction").value,d=e.pstyle("stripe-size");switch(u){case"vertical":break;case"righward":t.rotate(-Math.PI/2)}var p=o,f=l;"%"===d.units?(p*=d.pfValue,f*=d.pfValue):void 0!==d.pfValue&&(p=d.pfValue,f=d.pfValue),h&&(a=0,s=0),s-=p/2,a-=f/2;for(var g=1;g<=i.stripeBackgroundN;g++){var m=e.pstyle("stripe-"+g+"-background-size").value,y=e.pstyle("stripe-"+g+"-background-color").value,v=e.pstyle("stripe-"+g+"-background-opacity").value*r,b=m/100;b+c>1&&(b=1-c),0===m||c>=1||c+b>1||(t.beginPath(),t.rect(a,s+f*c,p,f*b),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],v),t.fill(),c+=b)}t.restore()};var ju,Gu={};function Yu(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(n));return n}function Wu(t,e,r){void 0===r&&(r=e);var n=t.makeOffscreenCanvas(e,r),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function Hu(t){var e=t.pixelRatio,r=t.cy.zoom(),n=t.cy.pan();return{zoom:r*e,pan:{x:n.x*e,y:n.y*e}}}function Vu(t){return"solid"===t.pstyle("background-fill").value&&("none"===t.pstyle("background-image").strValue&&(0===t.pstyle("border-width").value||(0===t.pstyle("border-opacity").value||"solid"===t.pstyle("border-style").value)))}function Xu(t,e){if(t.length!==e.length)return!1;for(var r=0;r>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}function Ju(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function td(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function ed(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function rd(t,e,r,n,i,a){switch(e){case t.FLOAT:return new Float32Array(r.buffer,a*n,i);case t.INT:return new Int32Array(r.buffer,a*n,i)}}function nd(t,e,r,n){var i=l(td(t,r),3),a=i[0],s=i[1],o=i[2],c=ed(t,s,e*a),h=a*o,u=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,e*h,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),s===t.FLOAT?t.vertexAttribPointer(n,a,s,!1,h,0):s===t.INT&&t.vertexAttribIPointer(n,a,s,h,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var d=new Array(e),p=0;pe.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!u&&(h[e.NODE]=!0,h[e.SELECT_BOX]=!0);var v=r.style(),b=r.zoom(),x=void 0!==s?s:b,w=r.pan(),T={x:w.x,y:w.y},k={zoom:b,pan:{x:w.x,y:w.y}},A=e.prevViewport;void 0===A||k.zoom!==A.zoom||k.pan.x!==A.pan.x||k.pan.y!==A.pan.y||g&&!f||(e.motionBlurPxRatio=1),o&&(T=o),x*=l,T.x*=l,T.y*=l;var _=e.getCachedZSortedEles();function E(t,r,n,i,a){var s=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",e.colorFillStyle(t,255,255,255,e.motionBlurTransparency),t.fillRect(r,n,i,a),t.globalCompositeOperation=s}function C(t,r){var a,l,h,u;e.clearingMotionBlur||t!==c.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]&&t!==c.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]?(a=T,l=x,h=e.canvasWidth,u=e.canvasHeight):(a={x:w.x*p,y:w.y*p},l=b*p,h=e.canvasWidth*p,u=e.canvasHeight*p),t.setTransform(1,0,0,1,0,0),"motionBlur"===r?E(t,0,0,h,u):n||void 0!==r&&!r||t.clearRect(0,0,h,u),i||(t.translate(a.x,a.y),t.scale(l,l)),o&&t.translate(o.x,o.y),s&&t.scale(s,s)}if(u||(e.textureDrawLastFrame=!1),u){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var S=e.data.bufferContexts[e.TEXTURE_BUFFER];S.setTransform(1,0,0,1,0,0),S.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:S,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult}),(k=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}h[e.DRAG]=!1,h[e.NODE]=!1;var R=c.contexts[e.NODE],L=e.textureCache.texture;k=e.textureCache.viewport;R.setTransform(1,0,0,1,0,0),d?E(R,0,0,k.width,k.height):R.clearRect(0,0,k.width,k.height);var D=v.core("outside-texture-bg-color").value,N=v.core("outside-texture-bg-opacity").value;e.colorFillStyle(R,D[0],D[1],D[2],N),R.fillRect(0,0,k.width,k.height);b=r.zoom();C(R,!1),R.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l),R.drawImage(L,k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l)}else e.textureOnViewport&&!n&&(e.textureCache=null);var I=r.extent(),M=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),O=e.hideEdgesOnViewport&&M,P=[];if(P[e.NODE]=!h[e.NODE]&&d&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,P[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),P[e.DRAG]=!h[e.DRAG]&&d&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,P[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),h[e.NODE]||i||a||P[e.NODE]){var $=d&&!P[e.NODE]&&1!==p;C(R=n||($?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:c.contexts[e.NODE]),d&&!$?"motionBlur":void 0),O?e.drawCachedNodes(R,_.nondrag,l,I):e.drawLayeredElements(R,_.nondrag,l,I),e.debug&&e.drawDebugPoints(R,_.nondrag),i||d||(h[e.NODE]=!1)}if(!a&&(h[e.DRAG]||i||P[e.DRAG])){$=d&&!P[e.DRAG]&&1!==p;C(R=n||($?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:c.contexts[e.DRAG]),d&&!$?"motionBlur":void 0),O?e.drawCachedNodes(R,_.drag,l,I):e.drawCachedElements(R,_.drag,l,I),e.debug&&e.drawDebugPoints(R,_.drag),i||d||(h[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,C),d&&1!==p){var B=c.contexts[e.NODE],F=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],z=c.contexts[e.DRAG],K=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],q=function(t,r,n){t.setTransform(1,0,0,1,0,0),n||!y?t.clearRect(0,0,e.canvasWidth,e.canvasHeight):E(t,0,0,e.canvasWidth,e.canvasHeight);var i=p;t.drawImage(r,0,0,e.canvasWidth*i,e.canvasHeight*i,0,0,e.canvasWidth,e.canvasHeight)};(h[e.NODE]||P[e.NODE])&&(q(B,F,P[e.NODE]),h[e.NODE]=!1),(h[e.DRAG]||P[e.DRAG])&&(q(z,K,P[e.DRAG]),h[e.DRAG]=!1)}e.prevViewport=k,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),d&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!u,e.mbFrames=0,h[e.NODE]=!0,h[e.DRAG]=!0,e.redraw()},100)),n||r.emit("render")},Gu.drawSelectionRectangle=function(t,e){var r=this,n=r.cy,i=r.data,a=n.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=i.canvasNeedsRedraw,c=t.forcedContext;if(r.showFps||!s&&l[r.SELECT_BOX]&&!o){var h=c||i.contexts[r.SELECT_BOX];if(e(h),1==r.selection[4]&&(r.hoverData.selecting||r.touchData.selecting)){var u=r.cy.zoom(),d=a.core("selection-box-border-width").value/u;h.lineWidth=d,h.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",h.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),d>0&&(h.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",h.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(i.bgActivePosistion&&!r.hoverData.selecting){u=r.cy.zoom();var p=i.bgActivePosistion;h.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",h.beginPath(),h.arc(p.x,p.y,a.core("active-bg-size").pfValue/u,0,2*Math.PI),h.fill()}var f=r.lastRedrawTime;if(r.showFps&&f){f=Math.round(f);var g=Math.round(1e3/f),m="1 frame = "+f+" ms = "+g+" fps";if(h.setTransform(1,0,0,1,0,0),h.fillStyle="rgba(255, 0, 0, 0.75)",h.strokeStyle="rgba(255, 0, 0, 0.75)",h.font="30px Arial",!ju){var y=h.measureText(m);ju=y.actualBoundingBoxAscent}h.fillText(m,0,ju);h.strokeRect(0,ju+10,250,20),h.fillRect(0,ju+10,250*Math.min(g/60,1),20)}o||(l[r.SELECT_BOX]=!1)}};var id="undefined"!=typeof Float32Array?Float32Array:Array;function ad(){var t=new id(9);return id!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function sd(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function od(t,e,r){var n=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],c=e[6],h=e[7],u=e[8],d=r[0],p=r[1];return t[0]=n,t[1]=i,t[2]=a,t[3]=s,t[4]=o,t[5]=l,t[6]=d*n+p*s+c,t[7]=d*i+p*o+h,t[8]=d*a+p*l+u,t}function ld(t,e,r){var n=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],c=e[6],h=e[7],u=e[8],d=Math.sin(r),p=Math.cos(r);return t[0]=p*n+d*s,t[1]=p*i+d*o,t[2]=p*a+d*l,t[3]=p*s-d*n,t[4]=p*o-d*i,t[5]=p*l-d*a,t[6]=c,t[7]=h,t[8]=u,t}function cd(t,e,r){var n=r[0],i=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var hd=function(){return a(function t(e,r,n,a){i(this,t),this.debugID=Math.floor(1e4*Math.random()),this.r=e,this.texSize=r,this.texRows=n,this.texHeight=Math.floor(r/n),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=a(e,r,r),this.scratch=a(e,r,this.texHeight,"scratch")},[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(t){var e=t.w,r=t.h,n=this.texHeight,i=this.texSize,a=n/r,s=e*a,o=r*a;return s>i&&(s=e*(a=i/e),o=r*a),{scale:a,texW:s,texH:o}}},{key:"draw",value:function(t,e,r){var n=this;if(this.locked)throw new Error("can't draw, atlas is locked");var i=this.texSize,a=this.texRows,s=this.texHeight,o=this.getScale(e),l=o.scale,c=o.texW,h=o.texH,u=function(t,n){if(r&&n){var i=n.context,a=t.x,o=t.row,c=a,h=s*o;i.save(),i.translate(c,h),i.scale(l,l),r(i,e),i.restore()}},d=[null,null],p=function(){u(n.freePointer,n.canvas),d[0]={x:n.freePointer.x,y:n.freePointer.row*s,w:c,h},d[1]={x:n.freePointer.x+c,y:n.freePointer.row*s,w:0,h},n.freePointer.x+=c,n.freePointer.x==i&&(n.freePointer.x=0,n.freePointer.row++)},f=function(){n.freePointer.x=0,n.freePointer.row++};if(this.freePointer.x+c<=i)p();else{if(this.freePointer.row>=a-1)return!1;this.freePointer.x===i?(f(),p()):this.enableWrapping?function(){var t=n.scratch,e=n.canvas;t.clear(),u({x:0,row:0},t);var r=i-n.freePointer.x,a=c-r,o=s,l=n.freePointer.x,p=n.freePointer.row*s,f=r;e.context.drawImage(t,0,0,f,o,l,p,f,o),d[0]={x:l,y:p,w:f,h};var g=r,m=(n.freePointer.row+1)*s,y=a;e&&e.context.drawImage(t,g,0,y,o,0,m,y,o),d[1]={x:0,y:m,w:y,h},n.freePointer.x=a,n.freePointer.row++}():(f(),p())}return this.keyToLocation.set(t,d),this.needsBuffer=!0,d}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return 0===this.freePointer.x&&0===this.freePointer.row}},{key:"canFit",value:function(t){if(this.locked)return!1;var e=this.texSize,r=this.texRows,n=this.getScale(t).texW;return!(this.freePointer.x+n>e)||this.freePointer.row1&&void 0!==arguments[1]?arguments[1]:{},i=n.forceRedraw,a=void 0!==i&&i,o=n.filterEle,l=void 0===o?function(){return!0}:o,c=n.filterType,h=void 0===c?function(){return!0}:c,u=!1,d=!1,p=s(t);try{for(p.s();!(e=p.n()).done;){var f=e.value;if(l(f)){var g,m=s(this.renderTypes.values());try{var y=function(){var t=g.value,e=t.type;if(h(e)){var n=r.collections.get(t.collection),i=t.getKey(f),s=Array.isArray(i)?i:[i];if(a)s.forEach(function(t){return n.markKeyForGC(t)}),d=!0;else{var o=t.getID?t.getID(f):f.id(),l=r._key(e,o),c=r.typeAndIdToKey.get(l);void 0===c||Xu(s,c)||(u=!0,r.typeAndIdToKey.delete(l),c.forEach(function(t){return n.markKeyForGC(t)}))}}};for(m.s();!(g=m.n()).done;)y()}catch(v){m.e(v)}finally{m.f()}}}}catch(v){p.e(v)}finally{p.f()}return d&&(this.gc(),u=!1),u}},{key:"gc",value:function(){var t,e=s(this.collections.values());try{for(e.s();!(t=e.n()).done;){t.value.gc()}}catch(r){e.e(r)}finally{e.f()}}},{key:"getOrCreateAtlas",value:function(t,e,r,n){var i=this.renderTypes.get(e),a=this.collections.get(i.collection),s=!1,o=a.draw(n,r,function(e){i.drawClipped?(e.save(),e.beginPath(),e.rect(0,0,r.w,r.h),e.clip(),i.drawElement(e,t,r,!0,!0),e.restore()):i.drawElement(e,t,r,!0,!0),s=!0});if(s){var l=i.getID?i.getID(t):t.id(),c=this._key(e,l);this.typeAndIdToKey.has(c)?this.typeAndIdToKey.get(c).push(n):this.typeAndIdToKey.set(c,[n])}return o}},{key:"getAtlasInfo",value:function(t,e){var r=this,n=this.renderTypes.get(e),i=n.getKey(t);return(Array.isArray(i)?i:[i]).map(function(i){var a=n.getBoundingBox(t,i),s=r.getOrCreateAtlas(t,e,a,i),o=l(s.getOffsets(i),2),c=o[0];return{atlas:s,tex:c,tex1:c,tex2:o[1],bb:a}})}},{key:"getDebugInfo",value:function(){var t,e=[],r=s(this.collections);try{for(r.s();!(t=r.n()).done;){var n=l(t.value,2),i=n[0],a=n[1].getCounts(),o=a.keyCount,c=a.atlasCount;e.push({type:i,keyCount:o,atlasCount:c})}}catch(h){r.e(h)}finally{r.f()}return e}}])}(),pd=function(){return a(function t(e){i(this,t),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]},[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,e){return e})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(t)}},{key:"getAtlasIndexForBatch",value:function(t){var e=this.batchAtlases.indexOf(t);if(e<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),e=this.batchAtlases.length-1}return e}}])}(),fd={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},gd=1,md=2,yd=function(){return a(function t(e,r,n){i(this,t),this.r=e,this.gl=r,this.maxInstances=n.webglBatchSize,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,this.debug=n.webglDebug,this.batchDebugInfo=[],n.enableWrapping=!0,n.createTextureCanvas=Wu,this.atlasManager=new dd(e,n),this.batchManager=new pd(n),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(fd.SCREEN),this.pickingProgram=this._createShaderProgram(fd.PICKING),this.vao=this._createVAO()},[{key:"addAtlasCollection",value:function(t,e){this.atlasManager.addAtlasCollection(t,e)}},{key:"addTextureAtlasRenderType",value:function(t,e){this.atlasManager.addRenderType(t,e)}},{key:"addSimpleShapeRenderType",value:function(t,e){this.simpleShapeOptions.set(t,e)}},{key:"invalidate",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,r=this.atlasManager;return e?r.invalidate(t,{filterType:function(t){return t===e},forceRedraw:!0}):r.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(t){var e=this.gl,r="#version 300 es\n precision highp float;\n\n uniform mat3 uPanZoomMatrix;\n uniform int uAtlasSize;\n \n // instanced\n in vec2 aPosition; // a vertex from the unit square\n \n in mat3 aTransform; // used to transform verticies, eg into a bounding box\n in int aVertType; // the type of thing we are rendering\n\n // the z-index that is output when using picking mode\n in vec4 aIndex;\n \n // For textures\n in int aAtlasId; // which shader unit/atlas to use\n in vec4 aTex; // x/y/w/h of texture in atlas\n\n // for edges\n in vec4 aPointAPointB;\n in vec4 aPointCPointD;\n in vec2 aLineWidth; // also used for node border width\n\n // simple shapes\n in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]\n in vec4 aColor; // also used for edges\n in vec4 aBorderColor; // aLineWidth is used for border width\n\n // output values passed to the fragment shader\n out vec2 vTexCoord;\n out vec4 vColor;\n out vec2 vPosition;\n // flat values are not interpolated\n flat out int vAtlasId; \n flat out int vVertType;\n flat out vec2 vTopRight;\n flat out vec2 vBotLeft;\n flat out vec4 vCornerRadius;\n flat out vec4 vBorderColor;\n flat out vec2 vBorderWidth;\n flat out vec4 vIndex;\n \n void main(void) {\n int vid = gl_VertexID;\n vec2 position = aPosition; // TODO make this a vec3, simplifies some code below\n\n if(aVertType == ".concat(0,") {\n float texX = aTex.x; // texture coordinates\n float texY = aTex.y;\n float texW = aTex.z;\n float texH = aTex.w;\n\n if(vid == 1 || vid == 2 || vid == 4) {\n texX += texW;\n }\n if(vid == 2 || vid == 4 || vid == 5) {\n texY += texH;\n }\n\n float d = float(uAtlasSize);\n vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(4," || aVertType == ").concat(7," \n || aVertType == ").concat(5," || aVertType == ").concat(6,") { // simple shapes\n\n // the bounding box is needed by the fragment shader\n vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat\n vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat\n vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated\n\n // calculations are done in the fragment shader, just pass these along\n vColor = aColor;\n vCornerRadius = aCornerRadius;\n vBorderColor = aBorderColor;\n vBorderWidth = aLineWidth;\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(1,") {\n vec2 source = aPointAPointB.xy;\n vec2 target = aPointAPointB.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n // stretch the unit square into a long skinny rectangle\n vec2 xBasis = target - source;\n vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));\n vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;\n\n gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);\n vColor = aColor;\n } \n else if(aVertType == ").concat(2,") {\n vec2 pointA = aPointAPointB.xy;\n vec2 pointB = aPointAPointB.zw;\n vec2 pointC = aPointCPointD.xy;\n vec2 pointD = aPointCPointD.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n vec2 p0, p1, p2, pos;\n if(position.x == 0.0) { // The left side of the unit square\n p0 = pointA;\n p1 = pointB;\n p2 = pointC;\n pos = position;\n } else { // The right side of the unit square, use same approach but flip the geometry upside down\n p0 = pointD;\n p1 = pointC;\n p2 = pointB;\n pos = vec2(0.0, -position.y);\n }\n\n vec2 p01 = p1 - p0;\n vec2 p12 = p2 - p1;\n vec2 p21 = p1 - p2;\n\n // Find the normal vector.\n vec2 tangent = normalize(normalize(p12) + normalize(p01));\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n // Find the vector perpendicular to p0 -> p1.\n vec2 p01Norm = normalize(vec2(-p01.y, p01.x));\n\n // Determine the bend direction.\n float sigma = sign(dot(p01 + p21, normal));\n float width = aLineWidth[0];\n\n if(sign(pos.y) == -sigma) {\n // This is an intersecting vertex. Adjust the position so that there's no overlap.\n vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n } else {\n // This is a non-intersecting vertex. Treat it like a mitre join.\n vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n }\n\n vColor = aColor;\n } \n else if(aVertType == ").concat(3," && vid < 3) {\n // massage the first triangle into an edge arrow\n if(vid == 0)\n position = vec2(-0.15, -0.3);\n if(vid == 1)\n position = vec2( 0.0, 0.0);\n if(vid == 2)\n position = vec2( 0.15, -0.3);\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n vColor = aColor;\n }\n else {\n gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space\n }\n\n vAtlasId = aAtlasId;\n vVertType = aVertType;\n vIndex = aIndex;\n }\n "),n=this.batchManager.getIndexArray(),i="#version 300 es\n precision highp float;\n\n // declare texture unit for each texture atlas in the batch\n ".concat(n.map(function(t){return"uniform sampler2D uTexture".concat(t,";")}).join("\n\t"),"\n\n uniform vec4 uBGColor;\n uniform float uZoom;\n\n in vec2 vTexCoord;\n in vec4 vColor;\n in vec2 vPosition; // model coordinates\n\n flat in int vAtlasId;\n flat in vec4 vIndex;\n flat in int vVertType;\n flat in vec2 vTopRight;\n flat in vec2 vBotLeft;\n flat in vec4 vCornerRadius;\n flat in vec4 vBorderColor;\n flat in vec2 vBorderWidth;\n\n out vec4 outColor;\n\n ").concat("\n float circleSD(vec2 p, float r) {\n return distance(vec2(0), p) - r; // signed distance\n }\n","\n ").concat("\n float rectangleSD(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);\n }\n","\n ").concat("\n float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {\n cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;\n cr.x = (p.y > 0.0) ? cr.x : cr.y;\n vec2 q = abs(p) - b + cr.x;\n return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;\n }\n","\n ").concat("\n float ellipseSD(vec2 p, vec2 ab) {\n p = abs( p ); // symmetry\n\n // find root with Newton solver\n vec2 q = ab*(p-ab);\n float w = (q.x1.0) ? d : -d;\n }\n","\n\n vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha\n return vec4( \n top.rgb + (bot.rgb * (1.0 - top.a)),\n top.a + (bot.a * (1.0 - top.a)) \n );\n }\n\n vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance\n // scale to the zoom level so that borders don't look blurry when zoomed in\n // note 1.5 is an aribitrary value chosen because it looks good\n return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); \n }\n\n void main(void) {\n if(vVertType == ").concat(0,") {\n // look up the texel from the texture unit\n ").concat(n.map(function(t){return"if(vAtlasId == ".concat(t,") outColor = texture(uTexture").concat(t,", vTexCoord);")}).join("\n\telse "),"\n } \n else if(vVertType == ").concat(3,") {\n // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';\n outColor = blend(vColor, uBGColor);\n outColor.a = 1.0; // make opaque, masks out line under arrow\n }\n else if(vVertType == ").concat(4," && vBorderWidth == vec2(0.0)) { // simple rectangle with no border\n outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done\n }\n else if(vVertType == ").concat(4," || vVertType == ").concat(7," \n || vVertType == ").concat(5," || vVertType == ").concat(6,") { // use SDF\n\n float outerBorder = vBorderWidth[0];\n float innerBorder = vBorderWidth[1];\n float borderPadding = outerBorder * 2.0;\n float w = vTopRight.x - vBotLeft.x - borderPadding;\n float h = vTopRight.y - vBotLeft.y - borderPadding;\n vec2 b = vec2(w/2.0, h/2.0); // half width, half height\n vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center\n\n float d; // signed distance\n if(vVertType == ").concat(4,") {\n d = rectangleSD(p, b);\n } else if(vVertType == ").concat(7," && w == h) {\n d = circleSD(p, b.x); // faster than ellipse\n } else if(vVertType == ").concat(7,") {\n d = ellipseSD(p, b);\n } else {\n d = roundRectangleSD(p, b, vCornerRadius.wzyx);\n }\n\n // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling\n // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box\n if(d > 0.0) {\n if(d > outerBorder) {\n discard;\n } else {\n outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);\n }\n } else {\n if(d > innerBorder) {\n vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;\n vec4 innerBorderColor = blend(vBorderColor, vColor);\n outColor = distInterp(innerBorderColor, outerColor, d);\n } \n else {\n vec4 outerColor;\n if(innerBorder == 0.0 && outerBorder == 0.0) {\n outerColor = vec4(0);\n } else if(innerBorder == 0.0) {\n outerColor = vBorderColor;\n } else {\n outerColor = blend(vBorderColor, vColor);\n }\n outColor = distInterp(vColor, outerColor, d - innerBorder);\n }\n }\n }\n else {\n outColor = vColor;\n }\n\n ").concat(t.picking?"if(outColor.a == 0.0) discard;\n else outColor = vIndex;":"","\n }\n "),a=function(t,e,r){var n=Yu(t,t.VERTEX_SHADER,e),i=Yu(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,n),t.attachShader(a,i),t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS))throw new Error("Could not initialize shaders");return a}(e,r,i);a.aPosition=e.getAttribLocation(a,"aPosition"),a.aIndex=e.getAttribLocation(a,"aIndex"),a.aVertType=e.getAttribLocation(a,"aVertType"),a.aTransform=e.getAttribLocation(a,"aTransform"),a.aAtlasId=e.getAttribLocation(a,"aAtlasId"),a.aTex=e.getAttribLocation(a,"aTex"),a.aPointAPointB=e.getAttribLocation(a,"aPointAPointB"),a.aPointCPointD=e.getAttribLocation(a,"aPointCPointD"),a.aLineWidth=e.getAttribLocation(a,"aLineWidth"),a.aColor=e.getAttribLocation(a,"aColor"),a.aCornerRadius=e.getAttribLocation(a,"aCornerRadius"),a.aBorderColor=e.getAttribLocation(a,"aBorderColor"),a.uPanZoomMatrix=e.getUniformLocation(a,"uPanZoomMatrix"),a.uAtlasSize=e.getUniformLocation(a,"uAtlasSize"),a.uBGColor=e.getUniformLocation(a,"uBGColor"),a.uZoom=e.getUniformLocation(a,"uZoom"),a.uTextures=[];for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:fd.SCREEN;this.panZoomMatrix=t,this.renderTarget=e,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,e){return!!t.visible()&&(!e||!e.isVisible||e.isVisible(t))}},{key:"drawTexture",value:function(t,e,r){var n=this.atlasManager,i=this.batchManager,a=n.getRenderTypeOpts(r);if(this._isVisible(t,a)&&(!t.isEdge()||this._isValidEdge(t))){if(this.renderTarget.picking&&a.getTexPickingMode){var o=a.getTexPickingMode(t);if(o===gd)return;if(o==md)return void this.drawPickingRectangle(t,e,r)}var c,h=s(n.getAtlasInfo(t,r));try{for(h.s();!(c=h.n()).done;){var u=c.value,d=u.atlas,p=u.tex1,f=u.tex2;i.canAddToCurrentBatch(d)||this.endBatch();for(var g=i.getAtlasIndexForBatch(d),m=0,y=[[p,!0],[f,!1]];m=this.maxInstances&&this.endBatch()}}}}catch(A){h.e(A)}finally{h.f()}}}},{key:"setTransformMatrix",value:function(t,e,r,n){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=0;if(r.shapeProps&&r.shapeProps.padding&&(a=t.pstyle(r.shapeProps.padding).pfValue),n){var s=n.bb,o=n.tex1,l=n.tex2,c=o.w/(o.w+l.w);i||(c=1-c);var h=this._getAdjustedBB(s,a,i,c);this._applyTransformMatrix(e,h,r,t)}else{var u=r.getBoundingBox(t),d=this._getAdjustedBB(u,a,!0,1);this._applyTransformMatrix(e,d,r,t)}}},{key:"_applyTransformMatrix",value:function(t,e,r,n){var i,a;sd(t);var s=r.getRotation?r.getRotation(n):0;if(0!==s){var o=r.getRotationPoint(n);od(t,t,[o.x,o.y]),ld(t,t,s);var l=r.getRotationOffset(n);i=l.x+(e.xOffset||0),a=l.y+(e.yOffset||0)}else i=e.x1,a=e.y1;od(t,t,[i,a]),cd(t,t,[e.w,e.h])}},{key:"_getAdjustedBB",value:function(t,e,r,n){var i=t.x1,a=t.y1,s=t.w,o=t.h;e&&(i-=e,a-=e,s+=2*e,o+=2*e);var l=0,c=s*n;return r&&n<1?s=c:!r&&n<1&&(i+=l=s-c,s=c),{x1:i,y1:a,w:s,h:o,xOffset:l,yOffset:t.yOffset}}},{key:"drawPickingRectangle",value:function(t,e,r){var n=this.atlasManager.getRenderTypeOpts(r),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=4,Qu(e,this.indexBuffer.getView(i)),Zu([0,0,0],1,this.colorBuffer.getView(i));var a=this.transformBuffer.getMatrixView(i);this.setTransformMatrix(t,a,n),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,e,r){var n=this.simpleShapeOptions.get(r);if(this._isVisible(t,n)){var i=n.shapeProps,a=this._getVertTypeForShape(t,i.shape);if(void 0===a||n.isSimple&&!n.isSimple(t))this.drawTexture(t,e,r);else{var s=this.instanceCount;if(this.vertTypeBuffer.getView(s)[0]=a,5===a||6===a){var o=n.getBoundingBox(t),l=this._getCornerRadius(t,i.radius,o),c=this.cornerRadiusBuffer.getView(s);c[0]=l,c[1]=l,c[2]=l,c[3]=l,6===a&&(c[0]=0,c[2]=0)}Qu(e,this.indexBuffer.getView(s)),Zu(t.pstyle(i.color).value,t.pstyle(i.opacity).value,this.colorBuffer.getView(s));var h=this.lineWidthBuffer.getView(s);if(h[0]=0,h[1]=0,i.border){var u=t.pstyle("border-width").value;if(u>0){Zu(t.pstyle("border-color").value,t.pstyle("border-opacity").value,this.borderColorBuffer.getView(s));var d=t.pstyle("border-position").value;if("inside"===d)h[0]=0,h[1]=-u;else if("outside"===d)h[0]=u,h[1]=0;else{var p=u/2;h[0]=p,h[1]=-p}}}var f=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(t,f,n),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"_getVertTypeForShape",value:function(t,e){switch(t.pstyle(e).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}}},{key:"_getCornerRadius",value:function(t,e,r){var n=r.w,i=r.h;if("auto"===t.pstyle(e).value)return Ir(n,i);var a=t.pstyle(e).pfValue,s=n/2,o=i/2;return Math.min(a,o,s)}},{key:"drawEdgeArrow",value:function(t,e,r){if(t.visible()){var n,i,a,s=t._private.rscratch;if("source"===r?(n=s.arrowStartX,i=s.arrowStartY,a=s.srcArrowAngle):(n=s.arrowEndX,i=s.arrowEndY,a=s.tgtArrowAngle),!(isNaN(n)||null==n||isNaN(i)||null==i||isNaN(a)||null==a))if("none"!==t.pstyle(r+"-arrow-shape").value){var o=t.pstyle(r+"-arrow-color").value,l=t.pstyle("opacity").value*t.pstyle("line-opacity").value,c=t.pstyle("width").pfValue,h=t.pstyle("arrow-scale").value,u=this.r.getArrowWidth(c,h),d=this.instanceCount,p=this.transformBuffer.getMatrixView(d);sd(p),od(p,p,[n,i]),cd(p,p,[u,u]),ld(p,p,a),this.vertTypeBuffer.getView(d)[0]=3,Qu(e,this.indexBuffer.getView(d)),Zu(o,l,this.colorBuffer.getView(d)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(t,e){if(t.visible()){var r=this._getEdgePoints(t);if(r){var n=t.pstyle("opacity").value,i=t.pstyle("line-opacity").value,a=t.pstyle("width").pfValue,s=t.pstyle("line-color").value,o=n*i;if(r.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==r.length){var l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=1,Qu(e,this.indexBuffer.getView(l)),Zu(s,o,this.colorBuffer.getView(l)),this.lineWidthBuffer.getView(l)[0]=a;var c=this.pointAPointBBuffer.getView(l);c[0]=r[0],c[1]=r[1],c[2]=r[2],c[3]=r[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var h=0;h=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(t){var e=t._private.rscratch;return!e.badLine&&null!=e.allpts&&!isNaN(e.allpts[0])}},{key:"_getEdgePoints",value:function(t){var e=t._private.rscratch;if(this._isValidEdge(t)){var r=e.allpts;if(4==r.length)return r;var n=this._getNumSegments(t);return this._getCurveSegmentPoints(r,n)}}},{key:"_getNumSegments",value:function(t){return Math.min(Math.max(15,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(t,e){if(4==t.length)return t;for(var r=Array(2*(e+1)),n=0;n<=e;n++)if(0==n)r[0]=t[0],r[1]=t[1];else if(n==e)r[2*n]=t[t.length-2],r[2*n+1]=t[t.length-1];else{var i=n/e;this._setCurvePoint(t,i,r,2*n)}return r}},{key:"_setCurvePoint",value:function(t,e,r,n){if(!(t.length<=2)){for(var i=Array(t.length-2),a=0;a0}},c=function(t){return"yes"===t.pstyle("text-events").strValue?md:gd},h=function(t){var e=t.position(),r=e.x,n=e.y,i=t.outerWidth(),a=t.outerHeight();return{w:i,h:a,x1:r-i/2,y1:n-a/2}};r.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:h,isSimple:Vu,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:h,isVisible:o("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:h,isVisible:o("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:c,getKey:xd(e.getLabelKey,null),getBoundingBox:wd(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:i(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:c,getKey:xd(e.getSourceLabelKey,"source"),getBoundingBox:wd(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:i("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:a("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:c,getKey:xd(e.getTargetLabelKey,"target"),getBoundingBox:wd(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:i("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:a("target-label")});var u=It(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(t,e){var n=!1;e&&e.length>0&&(n|=r.drawing.invalidate(e)),n&&u()}),function(t){var e=t.render;t.render=function(r){r=r||{};var n=t.cy;t.webgl&&(n.zoom()>fu?(!function(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}(t),e.call(t,r)):(!function(t){var e=function(e){e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.canvasWidth,t.canvasHeight),e.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}(t),Ad(t,r,fd.SCREEN)))};var r=t.matchCanvasSize;t.matchCanvasSize=function(e){r.call(t,e),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0},t.findNearestElements=function(e,r,n,i){return function(t,e,r){var n,i,a,o=function(t,e,r){var n,i,a,s,o=Hu(t),c=o.pan,h=o.zoom,u=function(t,e,r,n,i){var a=n*r+e.x,s=i*r+e.y;return[a,s=Math.round(t.canvasHeight-s)]}(t,c,h,e,r),d=l(u,2),p=d[0],f=d[1],g=6;if(n=p-g/2,i=f-g/2,s=g,0===(a=g)||0===s)return[];var m=t.data.contexts[t.WEBGL];m.bindFramebuffer(m.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(m.viewport(0,0,m.canvas.width,m.canvas.height),Ad(t,null,fd.PICKING),t.pickingFrameBuffer.needsDraw=!1);var y=a*s,v=new Uint8Array(4*y);m.readPixels(n,i,a,s,m.RGBA,m.UNSIGNED_BYTE,v),m.bindFramebuffer(m.FRAMEBUFFER,null);for(var b=new Set,x=0;x=0&&b.add(w)}return b}(t,e,r),c=t.getCachedZSortedEles(),h=s(o);try{for(h.s();!(a=h.n()).done;){var u=c[a.value];if(!n&&u.isNode()&&(n=u),!i&&u.isEdge()&&(i=u),n&&i)break}}catch(d){h.e(d)}finally{h.f()}return[n,i].filter(Boolean)}(t,e,r)};var n=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){n.call(t),t.pickingFrameBuffer.needsDraw=!0};var i=t.notify;t.notify=function(e,r){i.call(t,e,r),"viewport"===e||"bounds"===e?t.pickingFrameBuffer.needsDraw=!0:"background"===e&&t.drawing.invalidate(r,{type:"node-body"})}}(r)};var xd=function(t,e){return function(r){var n=t(r),i=bd(r,e);return i.length>1?i.map(function(t,e){return"".concat(n,"_").concat(e)}):n}},wd=function(t,e){return function(r,n){var i=t(r);if("string"==typeof n){var a=n.indexOf("_");if(a>0){var s=Number(n.substring(a+1)),o=bd(r,e),l=i.h/o.length,c=l*s,h=i.y1+c;return{x1:i.x1,w:i.w,y1:h,h:l,yOffset:c}}}return i}};function Td(t,e){var r=t.canvasWidth,n=t.canvasHeight,i=Hu(t),a=i.pan,s=i.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,n),e.translate(a.x,a.y),e.scale(s,s)}function kd(t,e,r){var n=t.drawing;e+=1,r.isNode()?(n.drawNode(r,e,"node-underlay"),n.drawNode(r,e,"node-body"),n.drawTexture(r,e,"label"),n.drawNode(r,e,"node-overlay")):(n.drawEdgeLine(r,e),n.drawEdgeArrow(r,e,"source"),n.drawEdgeArrow(r,e,"target"),n.drawTexture(r,e,"label"),n.drawTexture(r,e,"edge-source-label"),n.drawTexture(r,e,"edge-target-label"))}function Ad(t,e,r){var n;t.webglDebug&&(n=performance.now());var i=t.drawing,a=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&function(t,e){t.drawSelectionRectangle(e,function(e){return Td(t,e)})}(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var o=t.data.contexts[t.WEBGL];r.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var l=function(t){var e=t.canvasWidth,r=t.canvasHeight,n=Hu(t),i=n.pan,a=n.zoom,s=ad();od(s,s,[i.x,i.y]),cd(s,s,[a,a]);var o=ad();!function(t,e,r){t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1}(o,e,r);var l,c,h,u,d,p,f,g,m,y,v,b,x,w,T,k,A,_,E,C,S,R=ad();return l=R,h=s,u=(c=o)[0],d=c[1],p=c[2],f=c[3],g=c[4],m=c[5],y=c[6],v=c[7],b=c[8],x=h[0],w=h[1],T=h[2],k=h[3],A=h[4],_=h[5],E=h[6],C=h[7],S=h[8],l[0]=x*u+w*f+T*y,l[1]=x*d+w*g+T*v,l[2]=x*p+w*m+T*b,l[3]=k*u+A*f+_*y,l[4]=k*d+A*g+_*v,l[5]=k*p+A*m+_*b,l[6]=E*u+C*f+S*y,l[7]=E*d+C*g+S*v,l[8]=E*p+C*m+S*b,R}(t),c=t.getCachedZSortedEles();if(a=c.length,i.startFrame(l,r),r.screen){for(var h=0;h0&&a>0){d.clearRect(0,0,i,a),d.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(t.full)d.translate(-r.x1*l,-r.y1*l),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(r.x1*l,r.y1*l);else{var f=e.pan(),g={x:f.x*l,y:f.y*l};l*=e.zoom(),d.translate(g.x,g.y),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(-g.x,-g.y)}t.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=t.bg,d.rect(0,0,i,a),d.fill())}return u},Nd.png=function(t){return Md(t,this.bufferCanvasImage(t),"image/png")},Nd.jpg=function(t){return Md(t,this.bufferCanvasImage(t),"image/jpeg")};var Od={nodeShapeImpl:function(t,e,r,n,i,a,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,o);case"barrel":return this.drawBarrelPath(e,r,n,i,a)}}},Pd=Bd,$d=Bd.prototype;function Bd(t){var e=this,r=e.cy.window().document;t.webgl&&($d.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array($d.CANVAS_LAYERS),contexts:new Array($d.CANVAS_LAYERS),canvasNeedsRedraw:new Array($d.CANVAS_LAYERS),bufferCanvases:new Array($d.BUFFER_COUNT),bufferContexts:new Array($d.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=r.createElement("div");var a=e.data.canvasContainer.style;e.data.canvasContainer.style[n]=i,a.position="relative",a.zIndex="0",a.overflow="hidden";var s=t.cy.container();s.appendChild(e.data.canvasContainer),s.style[n]=i;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"};f&&f.userAgent.match(/msie|trident|edge/i)&&(o["-ms-touch-action"]="none",o["touch-action"]="none");for(var l=0;l<$d.CANVAS_LAYERS;l++){var c=e.data.canvases[l]=r.createElement("canvas"),h=$d.CANVAS_TYPES[l];e.data.contexts[l]=c.getContext(h),e.data.contexts[l]||ae("Could not create canvas of type "+h),Object.keys(o).forEach(function(t){c.style[t]=o[t]}),c.style.position="absolute",c.setAttribute("data-id","layer"+l),c.style.zIndex=String($d.CANVAS_LAYERS-l),e.data.canvasContainer.appendChild(c),e.data.canvasNeedsRedraw[l]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[$d.NODE].setAttribute("data-id","layer"+$d.NODE+"-node"),e.data.canvases[$d.SELECT_BOX].setAttribute("data-id","layer"+$d.SELECT_BOX+"-selectbox"),e.data.canvases[$d.DRAG].setAttribute("data-id","layer"+$d.DRAG+"-drag"),e.data.canvases[$d.WEBGL]&&e.data.canvases[$d.WEBGL].setAttribute("data-id","layer"+$d.WEBGL+"-webgl");for(l=0;l<$d.BUFFER_COUNT;l++)e.data.bufferCanvases[l]=r.createElement("canvas"),e.data.bufferContexts[l]=e.data.bufferCanvases[l].getContext("2d"),e.data.bufferCanvases[l].style.position="absolute",e.data.bufferCanvases[l].setAttribute("data-id","buffer"+l),e.data.bufferCanvases[l].style.zIndex=String(-l-1),e.data.bufferCanvases[l].style.visibility="hidden";e.pathsEnabled=!0;var u=rr(),d=function(t){return{x:-t.w/2,y:-t.h/2}},p=function(t){return t[0]._private.nodeKey},g=function(t){return t[0]._private.labelStyleKey},m=function(t){return t[0]._private.sourceLabelStyleKey},y=function(t){return t[0]._private.targetLabelStyleKey},v=function(t,r,n,i,a){return e.drawElement(t,r,n,!1,!1,a)},b=function(t,r,n,i,a){return e.drawElementText(t,r,n,i,"main",a)},x=function(t,r,n,i,a){return e.drawElementText(t,r,n,i,"source",a)},w=function(t,r,n,i,a){return e.drawElementText(t,r,n,i,"target",a)},T=function(t){return t.boundingBox(),t[0]._private.bodyBounds},k=function(t){return t.boundingBox(),t[0]._private.labelBounds.main||u},A=function(t){return t.boundingBox(),t[0]._private.labelBounds.source||u},_=function(t){return t.boundingBox(),t[0]._private.labelBounds.target||u},E=function(t,e){return e},C=function(t){return{x:((e=T(t)).x1+e.x2)/2,y:(e.y1+e.y2)/2};var e},S=function(t,e,r){var n=t?t+"-":"";return{x:e.x+r.pstyle(n+"text-margin-x").pfValue,y:e.y+r.pstyle(n+"text-margin-y").pfValue}},R=function(t,e,r){var n=t[0]._private.rscratch;return{x:n[e],y:n[r]}},L=function(t){return S("",R(t,"labelX","labelY"),t)},D=function(t){return S("source",R(t,"sourceLabelX","sourceLabelY"),t)},N=function(t){return S("target",R(t,"targetLabelX","targetLabelY"),t)},I=function(t){return d(T(t))},M=function(t){return d(A(t))},O=function(t){return d(_(t))},P=function(t){var e=k(t),r=d(k(t));if(t.isNode()){switch(t.pstyle("text-halign").value){case"left":r.x=-e.w-(e.leftPad||0);break;case"right":r.x=-(e.rightPad||0)}switch(t.pstyle("text-valign").value){case"top":r.y=-e.h-(e.topPad||0);break;case"bottom":r.y=-(e.botPad||0)}}return r},$=e.data.eleTxrCache=new yu(e,{getKey:p,doesEleInvalidateKey:function(t){var e=t[0]._private;return!(e.oldBackgroundTimestamp===e.backgroundTimestamp)},drawElement:v,getBoundingBox:T,getRotationPoint:C,getRotationOffset:I,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),B=e.data.lblTxrCache=new yu(e,{getKey:g,drawElement:b,getBoundingBox:k,getRotationPoint:L,getRotationOffset:P,isVisible:E}),F=e.data.slbTxrCache=new yu(e,{getKey:m,drawElement:x,getBoundingBox:A,getRotationPoint:D,getRotationOffset:M,isVisible:E}),z=e.data.tlbTxrCache=new yu(e,{getKey:y,drawElement:w,getBoundingBox:_,getRotationPoint:N,getRotationOffset:O,isVisible:E}),K=e.data.lyrTxrCache=new bu(e);e.onUpdateEleCalcs(function(t,e){$.invalidateElements(e),B.invalidateElements(e),F.invalidateElements(e),z.invalidateElements(e),K.invalidateElements(e);for(var r=0;r=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r=i)&&(r=i)}return r}function i(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r>n||void 0===r&&n>=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function a(t){return t}r.d(e,{JLW:()=>so,l78:()=>f,tlR:()=>p,qrM:()=>xo,Yu4:()=>To,IA3:()=>Ao,Wi0:()=>Eo,PGM:()=>Co,OEq:()=>Ro,y8u:()=>No,olC:()=>Mo,IrU:()=>Po,oDi:()=>Fo,Q7f:()=>Ko,cVp:()=>Uo,lUB:()=>co,Lx9:()=>Go,nVG:()=>Jo,uxU:()=>tl,Xf2:()=>nl,GZz:()=>al,UPb:()=>ol,dyv:()=>sl,GPZ:()=>Ur,Sk5:()=>Vr,bEH:()=>Rn,n8j:()=>po,T9B:()=>n,jkA:()=>i,rLf:()=>mo,WH:()=>Bn,m4Y:()=>gi,UMr:()=>$n,w7C:()=>Ds,zt:()=>Ns,Ltv:()=>Is,UAC:()=>Ni,DCK:()=>ha,TUC:()=>Ki,Agd:()=>Li,t6C:()=>Ei,wXd:()=>Si,ABi:()=>$i,Ui6:()=>Zi,rGn:()=>qi,ucG:()=>Ci,YPH:()=>Pi,Mol:()=>zi,PGu:()=>Bi,GuW:()=>Fi,hkb:()=>cn});var s=1e-6;function o(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function c(t){return e=>+t(e)}function h(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function u(){return!this.__axis}function d(t,e){var r=[],n=null,i=null,d=6,p=6,f=3,g="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,m=1===t||4===t?-1:1,y=4===t||2===t?"x":"y",v=1===t||3===t?o:l;function b(o){var l=null==n?e.ticks?e.ticks.apply(e,r):e.domain():n,b=null==i?e.tickFormat?e.tickFormat.apply(e,r):a:i,x=Math.max(d,0)+f,w=e.range(),T=+w[0]+g,k=+w[w.length-1]+g,A=(e.bandwidth?h:c)(e.copy(),g),_=o.selection?o.selection():o,E=_.selectAll(".domain").data([null]),C=_.selectAll(".tick").data(l,e).order(),S=C.exit(),R=C.enter().append("g").attr("class","tick"),L=C.select("line"),D=C.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(R),L=L.merge(R.append("line").attr("stroke","currentColor").attr(y+"2",m*d)),D=D.merge(R.append("text").attr("fill","currentColor").attr(y,m*x).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),o!==_&&(E=E.transition(o),C=C.transition(o),L=L.transition(o),D=D.transition(o),S=S.transition(o).attr("opacity",s).attr("transform",function(t){return isFinite(t=A(t))?v(t+g):this.getAttribute("transform")}),R.attr("opacity",s).attr("transform",function(t){var e=this.parentNode.__axis;return v((e&&isFinite(e=e(t))?e:A(t))+g)})),S.remove(),E.attr("d",4===t||2===t?p?"M"+m*p+","+T+"H"+g+"V"+k+"H"+m*p:"M"+g+","+T+"V"+k:p?"M"+T+","+m*p+"V"+g+"H"+k+"V"+m*p:"M"+T+","+g+"H"+k),C.attr("opacity",1).attr("transform",function(t){return v(A(t)+g)}),L.attr(y+"2",m*d),D.attr(y,m*x).text(b),_.filter(u).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each(function(){this.__axis=A})}return b.scale=function(t){return arguments.length?(e=t,b):e},b.ticks=function(){return r=Array.from(arguments),b},b.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),b):r.slice()},b.tickValues=function(t){return arguments.length?(n=null==t?null:Array.from(t),b):n&&n.slice()},b.tickFormat=function(t){return arguments.length?(i=t,b):i},b.tickSize=function(t){return arguments.length?(d=p=+t,b):d},b.tickSizeInner=function(t){return arguments.length?(d=+t,b):d},b.tickSizeOuter=function(t){return arguments.length?(p=+t,b):p},b.tickPadding=function(t){return arguments.length?(f=+t,b):f},b.offset=function(t){return arguments.length?(g=+t,b):g},b}function p(t){return d(1,t)}function f(t){return d(3,t)}function g(){}function m(t){return null==t?g:function(){return this.querySelector(t)}}function y(){return[]}function v(t){return null==t?y:function(){return this.querySelectorAll(t)}}function b(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function x(t){return function(){return this.matches(t)}}function w(t){return function(e){return e.matches(t)}}var T=Array.prototype.find;function k(){return this.firstElementChild}var A=Array.prototype.filter;function _(){return Array.from(this.children)}function E(t){return new Array(t.length)}function C(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function S(t,e,r,n,i,a){for(var s,o=0,l=e.length,c=a.length;oe?1:t>=e?0:NaN}C.prototype={constructor:C,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 I="http://www.w3.org/1999/xhtml";const M={svg:"http://www.w3.org/2000/svg",xhtml:I,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function O(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),M.hasOwnProperty(e)?{space:M[e],local:t}:t}function P(t){return function(){this.removeAttribute(t)}}function $(t){return function(){this.removeAttributeNS(t.space,t.local)}}function B(t,e){return function(){this.setAttribute(t,e)}}function F(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function z(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function K(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function q(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function U(t){return function(){this.style.removeProperty(t)}}function j(t,e,r){return function(){this.style.setProperty(t,e,r)}}function G(t,e,r){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function Y(t,e){return t.style.getPropertyValue(e)||q(t).getComputedStyle(t,null).getPropertyValue(e)}function W(t){return function(){delete this[t]}}function H(t,e){return function(){this[t]=e}}function V(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function X(t){return t.trim().split(/^|\s+/)}function Z(t){return t.classList||new Q(t)}function Q(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function J(t,e){for(var r=Z(t),n=-1,i=e.length;++n=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 _t(t,e){this._groups=t,this._parents=e}function Et(){return new _t([[document.documentElement]],At)}_t.prototype=Et.prototype={constructor:_t,select:function(t){"function"!=typeof t&&(t=m(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=w&&(w=x+1);!(b=y[w])&&++w=0;)(n=i[a])&&(s&&4^n.compareDocumentPosition(s)&&s.parentNode.insertBefore(n,s),s=n);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=N);for(var r=this._groups,n=r.length,i=new Array(n),a=0;a1?this.each((null==e?U:"function"==typeof e?G:j)(t,e,null==r?"":r)):Y(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?W:"function"==typeof e?V:H)(t,e)):this.node()[t]},classed:function(t,e){var r=X(t+"");if(arguments.length<2){for(var n=Z(this.node()),i=-1,a=r.length;++i=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),s=a.length;if(!(arguments.length<2)){for(o=e?xt:bt,n=0;n{}};function Rt(){for(var t,e=0,r=arguments.length,n={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),s=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s0)for(var r,n,i=new Array(r),a=0;a=0&&e._call.call(void 0,t),e=e._next;--Pt}()}finally{Pt=0,function(){var t,e,r=Mt,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Mt=e);Ot=t,Xt(n)}(),zt=0}}function Vt(){var t=qt.now(),e=t-Ft;e>1e3&&(Kt-=e,Ft=t)}function Xt(t){Pt||($t&&($t=clearTimeout($t)),t-zt>24?(t<1/0&&($t=setTimeout(Ht,t-qt.now()-Kt)),Bt&&(Bt=clearInterval(Bt))):(Bt||(Ft=qt.now(),Bt=setInterval(Vt,1e3)),Pt=1,Ut(Ht)))}function Zt(t,e,r){var n=new Yt;return e=null==e?0:+e,n.restart(r=>{n.stop(),t(r+e)},e,r),n}Yt.prototype=Wt.prototype={constructor:Yt,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?jt():+r)+(null==e?0:+e),this._next||Ot===this||(Ot?Ot._next=this:Mt=this,Ot=this),this._call=t,this._time=r,Xt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xt())}};var Qt=It("start","end","cancel","interrupt"),Jt=[];function te(t,e,r,n,i,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};!function(t,e,r){var n,i=t.__transition;function a(t){r.state=1,r.timer.restart(s,r.delay,r.time),r.delay<=t&&s(t-r.delay)}function s(a){var c,h,u,d;if(1!==r.state)return l();for(c in i)if((d=i[c]).name===r.name){if(3===d.state)return Zt(s);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return r}function re(t,e){var r=ne(t,e);if(r.state>3)throw new Error("too late; already running");return r}function ne(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function ie(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ae,se=180/Math.PI,oe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function le(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:ie(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}(a.rotate,s.rotate,o,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:ie(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}(a.skewX,s.skewX,o,l),function(t,e,r,n,a,s){if(t!==r||e!==n){var o=a.push(i(a)+"scale(",null,",",null,")");s.push({i:o-4,x:ie(t,r)},{i:o-2,x:ie(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,s.scaleX,s.scaleY,o,l),a=s=null,function(t){for(var e,r=-1,n=l.length;++r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Oe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Oe(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=Ae.exec(t))?new Be(e[1],e[2],e[3],1):(e=_e.exec(t))?new Be(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ee.exec(t))?Oe(e[1],e[2],e[3],e[4]):(e=Ce.exec(t))?Oe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Se.exec(t))?je(e[1],e[2]/100,e[3]/100,1):(e=Re.exec(t))?je(e[1],e[2]/100,e[3]/100,e[4]):Le.hasOwnProperty(t)?Me(Le[t]):"transparent"===t?new Be(NaN,NaN,NaN,0):null}function Me(t){return new Be(t>>16&255,t>>8&255,255&t,1)}function Oe(t,e,r,n){return n<=0&&(t=e=r=NaN),new Be(t,e,r,n)}function Pe(t){return t instanceof ye||(t=Ie(t)),t?new Be((t=t.rgb()).r,t.g,t.b,t.opacity):new Be}function $e(t,e,r,n){return 1===arguments.length?Pe(t):new Be(t,e,r,null==n?1:n)}function Be(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Fe(){return`#${Ue(this.r)}${Ue(this.g)}${Ue(this.b)}`}function ze(){const t=Ke(this.opacity);return`${1===t?"rgb(":"rgba("}${qe(this.r)}, ${qe(this.g)}, ${qe(this.b)}${1===t?")":`, ${t})`}`}function Ke(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function qe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ue(t){return((t=qe(t))<16?"0":"")+t.toString(16)}function je(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Ye(t,e,r,n)}function Ge(t){if(t instanceof Ye)return new Ye(t.h,t.s,t.l,t.opacity);if(t instanceof ye||(t=Ie(t)),!t)return new Ye;if(t instanceof Ye)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(s=e===a?(r-n)/o+6*(r0&&l<1?0:s,new Ye(s,o,l,t.opacity)}function Ye(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function We(t){return(t=(t||0)%360)<0?t+360:t}function He(t){return Math.max(0,Math.min(1,t||0))}function Ve(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function Xe(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}ge(ye,Ie,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:De,formatHex:De,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ge(this).formatHsl()},formatRgb:Ne,toString:Ne}),ge(Be,$e,me(ye,{brighter(t){return t=null==t?be:Math.pow(be,t),new Be(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new Be(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Be(qe(this.r),qe(this.g),qe(this.b),Ke(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:Fe,formatHex:Fe,formatHex8:function(){return`#${Ue(this.r)}${Ue(this.g)}${Ue(this.b)}${Ue(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ze,toString:ze})),ge(Ye,function(t,e,r,n){return 1===arguments.length?Ge(t):new Ye(t,e,r,null==n?1:n)},me(ye,{brighter(t){return t=null==t?be:Math.pow(be,t),new Ye(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new Ye(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new Be(Ve(t>=240?t-240:t+120,i,n),Ve(t,i,n),Ve(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Ye(We(this.h),He(this.s),He(this.l),Ke(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=Ke(this.opacity);return`${1===t?"hsl(":"hsla("}${We(this.h)}, ${100*He(this.s)}%, ${100*He(this.l)}%${1===t?")":`, ${t})`}`}}));const Ze=t=>()=>t;function Qe(t,e){return function(r){return t+r*e}}function Je(t){return 1===(t=+t)?tr:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):Ze(isNaN(e)?r:e)}}function tr(t,e){var r=e-t;return r?Qe(t,r):Ze(isNaN(t)?e:t)}const er=function t(e){var r=Je(e);function n(t,e){var n=r((t=$e(t)).r,(e=$e(e)).r),i=r(t.g,e.g),a=r(t.b,e.b),s=tr(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=a(e),t.opacity=s(e),t+""}}return n.gamma=t,n}(1);function rr(t){return function(e){var r,n,i=e.length,a=new Array(i),s=new Array(i),o=new Array(i);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],s=n>0?t[n-1]:2*i-a,o=na&&(i=e.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:ie(r,n)})),a=ir.lastIndex;return a=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?ee:re;return function(){var s=a(this,t),o=s.on;o!==n&&(i=(n=o).copy()).on(e,r),s.on=i}}(r,t,e))},attr:function(t,e){var r=O(t),n="transform"===r?ue:sr;return this.attrTween(t,"function"==typeof e?(r.local?dr:ur)(r,n,fe(this,"attr."+t,e)):null==e?(r.local?lr:or)(r):(r.local?hr:cr)(r,n,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var n=O(t);return this.tween(r,(n.local?pr:fr)(n,e))},style:function(t,e,r){var n="transform"==(t+="")?he:sr;return null==e?this.styleTween(t,function(t,e){var r,n,i;return function(){var a=Y(this,t),s=(this.style.removeProperty(t),Y(this,t));return a===s?null:a===r&&s===n?i:i=e(r=a,n=s)}}(t,n)).on("end.style."+t,xr(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var n,i,a;return function(){var s=Y(this,t),o=r(this),l=o+"";return null==o&&(this.style.removeProperty(t),l=o=Y(this,t)),s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o))}}(t,n,fe(this,"style."+t,e))).each(function(t,e){var r,n,i,a,s="style."+e,o="end."+s;return function(){var l=re(this,t),c=l.on,h=null==l.value[s]?a||(a=xr(e)):void 0;c===r&&i===h||(n=(r=c).copy()).on(o,i=h),l.on=n}}(this._id,t)):this.styleTween(t,function(t,e,r){var n,i,a=r+"";return function(){var s=Y(this,t);return s===a?null:s===n?i:i=e(n=s,r)}}(t,n,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;return this.tween(n,function(t,e,r){var n,i;function a(){var a=e.apply(this,arguments);return a!==i&&(n=(i=a)&&function(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}(t,a,r)),n}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(fe(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,r;function n(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&function(t){return function(e){this.textContent=t.call(this,e)}}(n)),e}return n._value=t,n}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n,i=ne(this.node(),r).tween,a=0,s=i.length;a2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(n?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[i]):s=!1;s&&delete t.__transition}}(this,t)})},Ct.prototype.transition=function(t){var e,r;t instanceof Tr?(e=t._id,t=t._name):(e=kr(),(r=_r).time=jt(),t=null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;a1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Mr(t){return(t=Ir(Math.abs(t)))?t[1]:NaN}var Or,Pr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $r(t){if(!(e=Pr.exec(t)))throw new Error("invalid format: "+t);var e;return new Br({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 Br(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 Fr(t,e){var r=Ir(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}$r.prototype=Br.prototype,Br.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 zr={"%":(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)=>Fr(100*t,e),r:Fr,s:function(t,e){var r=Ir(t,e);if(!r)return Or=void 0,t.toPrecision(e);var n=r[0],i=r[1],a=i-(Or=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Ir(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Kr(t){return t}var qr,Ur,jr,Gr=Array.prototype.map,Yr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Wr(t){var e,r,n=void 0===t.grouping||void 0===t.thousands?Kr:(e=Gr.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,a=[],s=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(t.substring(i-=o,i+o)),!((l+=o+1)>n));)o=e[s=(s+1)%e.length];return a.reverse().join(r)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?Kr:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(Gr.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t,e){var r=(t=$r(t)).fill,u=t.align,d=t.sign,p=t.symbol,f=t.zero,g=t.width,m=t.comma,y=t.precision,v=t.trim,b=t.type;"n"===b?(m=!0,b="g"):zr[b]||(void 0===y&&(y=12),v=!0,b="g"),(f||"0"===r&&"="===u)&&(f=!0,r="0",u="=");var x=(e&&void 0!==e.prefix?e.prefix:"")+("$"===p?i:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===p?a:/[%p]/.test(b)?l:"")+(e&&void 0!==e.suffix?e.suffix:""),T=zr[b],k=/[defgprs%]/.test(b);function A(t){var e,i,a,l=x,p=w;if("c"===b)p=T(t)+p,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:T(Math.abs(t),y),v&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),A&&0===+t&&"+"!==d&&(A=!1),l=(A?"("===d?d:c:"-"===d||"("===d?"":d)+l,p=("s"!==b||isNaN(t)||void 0===Or?"":Yr[8+Or/3])+p+(A&&"("===d?")":""),k)for(e=-1,i=t.length;++e(a=t.charCodeAt(e))||a>57){p=(46===a?s+t.slice(e+1):t.slice(e))+p,t=t.slice(0,e);break}}m&&!f&&(t=n(t,1/0));var _=l.length+t.length+p.length,E=_>1)+l+t+p+E.slice(_);break;default:t=E+l+t+p}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)),A.toString=function(){return t+""},A}return{format:u,formatPrefix:function(t,e){var r=3*Math.max(-8,Math.min(8,Math.floor(Mr(e)/3))),n=Math.pow(10,-r),i=u(((t=$r(t)).type="f",t),{suffix:Yr[8+r/3]});return function(t){return i(n*t)}}}}function Hr(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;--n>=0;)e+=r[n].value;else e=1;t.value=e}function Vr(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Zr)):void 0===e&&(e=Xr);for(var r,n,i,a,s,o=new tn(t),l=[o];r=l.pop();)if((i=e(r.data))&&(s=(i=Array.from(i)).length))for(r.children=i,a=s-1;a>=0;--a)l.push(n=i[a]=new tn(i[a])),n.parent=r,n.depth=r.depth+1;return o.eachBefore(Jr)}function Xr(t){return t.children}function Zr(t){return Array.isArray(t)?t[1]:null}function Qr(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Jr(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function tn(t){this.data=t,this.depth=this.height=0,this.parent=null}function en(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function rn(t,e,r,n,i){for(var a,s=t.children,o=-1,l=s.length,c=t.value&&(n-e)/t.value;++o=0;--n)a.push(r[n]);return this},find:function(t,e){let r=-1;for(const n of this)if(t.call(e,n,++r,this))return n},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;t=r.pop(),e=n.pop();for(;t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e},copy:function(){return Vr(this).eachBefore(Qr)},[Symbol.iterator]:function*(){var t,e,r,n,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(r=0,n=e.length;rd&&(d=o),m=h*h*g,(p=Math.max(d/m,m/u))>f){h-=o;break}f=p}y.push(s={value:h,dice:l1?e:1)},r}((1+Math.sqrt(5))/2);function sn(t){if("function"!=typeof t)throw new Error;return t}function on(){return 0}function ln(t){return function(){return t}}function cn(){var t=an,e=!1,r=1,n=1,i=[0],a=on,s=on,o=on,l=on,c=on;function h(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(u),i=[0],e&&t.eachBefore(en),t}function u(e){var r=i[e.depth],n=e.x0+r,h=e.y0+r,u=e.x1-r,d=e.y1-r;uyn?Math.pow(t,1/3):t/mn+fn}function wn(t){return t>gn?t*t*t:mn*(t-fn)}function Tn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function kn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function An(t){if(t instanceof En)return new En(t.h,t.c,t.l,t.opacity);if(t instanceof bn||(t=vn(t)),0===t.a&&0===t.b)return new En(NaN,0180||r<-180?r-360*Math.round(r/360):r):Ze(isNaN(t)?e:t)});Sn(tr);function Ln(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class Dn extends Map{constructor(t,e=On){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[r,n]of t)this.set(r,n)}get(t){return super.get(Nn(this,t))}has(t){return super.has(Nn(this,t))}set(t,e){return super.set(In(this,t),e)}delete(t){return super.delete(Mn(this,t))}}Set;function Nn({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function In({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function Mn({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function On(t){return null!==t&&"object"==typeof t?t.valueOf():t}const Pn=Symbol("implicit");function $n(){var t=new Dn,e=[],r=[],n=Pn;function i(i){let a=t.get(i);if(void 0===a){if(n!==Pn)return n;t.set(i,a=e.push(i)-1)}return r[a%r.length]}return i.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new Dn;for(const n of r)t.has(n)||t.set(n,e.push(n)-1);return i},i.range=function(t){return arguments.length?(r=Array.from(t),i):r.slice()},i.unknown=function(t){return arguments.length?(n=t,i):n},i.copy=function(){return $n(e,r).unknown(n)},Ln.apply(i,arguments),i}function Bn(){var t,e,r=$n().unknown(void 0),n=r.domain,i=r.range,a=0,s=1,o=!1,l=0,c=0,h=.5;function u(){var r=n().length,u=s=Fn?10:a>=zn?5:a>=Kn?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(t*c),l=Math.round(e*c),o/ce&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(t/c),l=Math.round(e/c),o*ce&&--l),le?1:t>=e?0:NaN}function Yn(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Wn(t){let e,r,n;function i(t,n,i=0,a=t.length){if(i>>1;r(t[e],n)<0?i=e+1:a=e}while(iGn(t(e),r),n=(e,r)=>t(e)-r):(e=t===Gn||t===Yn?t:Hn,r=t,n=t),{left:i,center:function(t,e,r=0,a=t.length){const s=i(t,e,r,a-1);return s>r&&n(t[s-1],e)>-n(t[s],e)?s-1:s},right:function(t,n,i=0,a=t.length){if(i>>1;r(t[e],n)<=0?i=e+1:a=e}while(ie&&(r=t,t=e,e=r),c=function(r){return Math.max(t,Math.min(e,r))}),n=l>2?ci:li,i=a=null,u}function u(e){return null==e||isNaN(e=+e)?r:(i||(i=n(s.map(t),o,l)))(t(c(e)))}return u.invert=function(r){return c(e((a||(a=n(o,s.map(t),ie)))(r)))},u.domain=function(t){return arguments.length?(s=Array.from(t,ii),h()):s.slice()},u.range=function(t){return arguments.length?(o=Array.from(t),h()):o.slice()},u.rangeRound=function(t){return o=Array.from(t),l=ni,h()},u.clamp=function(t){return arguments.length?(c=!!t||si,h()):c!==si},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,n){return t=r,e=n,h()}}function di(){return ui()(si,si)}function pi(t,e,r,n){var i,a=jn(t,e,r);switch((n=$r(null==n?",f":n)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Mr(e)/3)))-Mr(Math.abs(t)))}(a,s))||(n.precision=i),jr(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Mr(e)-Mr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(t){return Math.max(0,-Mr(Math.abs(t)))}(a))||(n.precision=i-2*("%"===n.type))}return Ur(n)}function fi(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const n=e=i))return[];const o=a-i+1,l=new Array(o);if(n)if(s<0)for(let c=0;c0;){if((i=Un(l,c,r))===n)return a[s]=l,a[o]=c,e(a);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}n=i}return t},t}function gi(){var t=di();return t.copy=function(){return hi(t,gi())},Ln.apply(t,arguments),fi(t)}const mi=1e3,yi=6e4,vi=36e5,bi=864e5,xi=6048e5,wi=2592e6,Ti=31536e6,ki=new Date,Ai=new Date;function _i(t,e,r,n){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),i.round=t=>{const e=i(t),r=i.ceil(t);return t-e(e(t=new Date(+t),null==r?1:Math.floor(r)),t),i.range=(r,n,a)=>{const s=[];if(r=i.ceil(r),a=null==a?1:Math.floor(a),!(r0))return s;let o;do{s.push(o=new Date(+r)),e(r,a),t(r)}while(o_i(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,n)=>{if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}),r&&(i.count=(e,n)=>(ki.setTime(+e),Ai.setTime(+n),t(ki),t(Ai),Math.floor(r(ki,Ai))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(n?e=>n(e)%t===0:e=>i.count(0,e)%t===0):i:null)),i}const Ei=_i(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ei.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?_i(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Ei:null);Ei.range;const Ci=_i(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mi)},(t,e)=>(e-t)/mi,t=>t.getUTCSeconds()),Si=(Ci.range,_i(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mi)},(t,e)=>{t.setTime(+t+e*yi)},(t,e)=>(e-t)/yi,t=>t.getMinutes())),Ri=(Si.range,_i(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*yi)},(t,e)=>(e-t)/yi,t=>t.getUTCMinutes())),Li=(Ri.range,_i(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mi-t.getMinutes()*yi)},(t,e)=>{t.setTime(+t+e*vi)},(t,e)=>(e-t)/vi,t=>t.getHours())),Di=(Li.range,_i(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*vi)},(t,e)=>(e-t)/vi,t=>t.getUTCHours())),Ni=(Di.range,_i(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yi)/bi,t=>t.getDate()-1)),Ii=(Ni.range,_i(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/bi,t=>t.getUTCDate()-1)),Mi=(Ii.range,_i(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/bi,t=>Math.floor(t/bi)));Mi.range;function Oi(t){return _i(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())*yi)/xi)}const Pi=Oi(0),$i=Oi(1),Bi=Oi(2),Fi=Oi(3),zi=Oi(4),Ki=Oi(5),qi=Oi(6);Pi.range,$i.range,Bi.range,Fi.range,zi.range,Ki.range,qi.range;function Ui(t){return _i(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)/xi)}const ji=Ui(0),Gi=Ui(1),Yi=Ui(2),Wi=Ui(3),Hi=Ui(4),Vi=Ui(5),Xi=Ui(6),Zi=(ji.range,Gi.range,Yi.range,Wi.range,Hi.range,Vi.range,Xi.range,_i(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())),Qi=(Zi.range,_i(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())),Ji=(Qi.range,_i(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()));Ji.every=t=>isFinite(t=Math.floor(t))&&t>0?_i(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null;Ji.range;const ta=_i(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());ta.every=t=>isFinite(t=Math.floor(t))&&t>0?_i(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null;ta.range;function ea(t,e,r,n,i,a){const s=[[Ci,1,mi],[Ci,5,5e3],[Ci,15,15e3],[Ci,30,3e4],[a,1,yi],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,vi],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,bi],[n,2,1728e5],[r,1,xi],[e,1,wi],[e,3,7776e6],[t,1,Ti]];function o(e,r,n){const i=Math.abs(r-e)/n,a=Wn(([,,t])=>t).right(s,i);if(a===s.length)return t.every(jn(e/Ti,r/Ti,n));if(0===a)return Ei.every(Math.max(jn(e,r,n),1));const[o,l]=s[i/s[a-1][2][t.toLowerCase(),e]))}function ba(t,e,r){var n=da.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function xa(t,e,r){var n=da.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function wa(t,e,r){var n=da.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function Ta(t,e,r){var n=da.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function ka(t,e,r){var n=da.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function Aa(t,e,r){var n=da.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function _a(t,e,r){var n=da.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Ea(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Ca(t,e,r){var n=da.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function Sa(t,e,r){var n=da.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Ra(t,e,r){var n=da.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function La(t,e,r){var n=da.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Da(t,e,r){var n=da.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function Na(t,e,r){var n=da.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Ia(t,e,r){var n=da.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Ma(t,e,r){var n=da.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Oa(t,e,r){var n=da.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Pa(t,e,r){var n=pa.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function $a(t,e,r){var n=da.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Ba(t,e,r){var n=da.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Fa(t,e){return ga(t.getDate(),e,2)}function za(t,e){return ga(t.getHours(),e,2)}function Ka(t,e){return ga(t.getHours()%12||12,e,2)}function qa(t,e){return ga(1+Ni.count(Ji(t),t),e,3)}function Ua(t,e){return ga(t.getMilliseconds(),e,3)}function ja(t,e){return Ua(t,e)+"000"}function Ga(t,e){return ga(t.getMonth()+1,e,2)}function Ya(t,e){return ga(t.getMinutes(),e,2)}function Wa(t,e){return ga(t.getSeconds(),e,2)}function Ha(t){var e=t.getDay();return 0===e?7:e}function Va(t,e){return ga(Pi.count(Ji(t)-1,t),e,2)}function Xa(t){var e=t.getDay();return e>=4||0===e?zi(t):zi.ceil(t)}function Za(t,e){return t=Xa(t),ga(zi.count(Ji(t),t)+(4===Ji(t).getDay()),e,2)}function Qa(t){return t.getDay()}function Ja(t,e){return ga($i.count(Ji(t)-1,t),e,2)}function ts(t,e){return ga(t.getFullYear()%100,e,2)}function es(t,e){return ga((t=Xa(t)).getFullYear()%100,e,2)}function rs(t,e){return ga(t.getFullYear()%1e4,e,4)}function ns(t,e){var r=t.getDay();return ga((t=r>=4||0===r?zi(t):zi.ceil(t)).getFullYear()%1e4,e,4)}function is(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ga(e/60|0,"0",2)+ga(e%60,"0",2)}function as(t,e){return ga(t.getUTCDate(),e,2)}function ss(t,e){return ga(t.getUTCHours(),e,2)}function os(t,e){return ga(t.getUTCHours()%12||12,e,2)}function ls(t,e){return ga(1+Ii.count(ta(t),t),e,3)}function cs(t,e){return ga(t.getUTCMilliseconds(),e,3)}function hs(t,e){return cs(t,e)+"000"}function us(t,e){return ga(t.getUTCMonth()+1,e,2)}function ds(t,e){return ga(t.getUTCMinutes(),e,2)}function ps(t,e){return ga(t.getUTCSeconds(),e,2)}function fs(t){var e=t.getUTCDay();return 0===e?7:e}function gs(t,e){return ga(ji.count(ta(t)-1,t),e,2)}function ms(t){var e=t.getUTCDay();return e>=4||0===e?Hi(t):Hi.ceil(t)}function ys(t,e){return t=ms(t),ga(Hi.count(ta(t),t)+(4===ta(t).getUTCDay()),e,2)}function vs(t){return t.getUTCDay()}function bs(t,e){return ga(Gi.count(ta(t)-1,t),e,2)}function xs(t,e){return ga(t.getUTCFullYear()%100,e,2)}function ws(t,e){return ga((t=ms(t)).getUTCFullYear()%100,e,2)}function Ts(t,e){return ga(t.getUTCFullYear()%1e4,e,4)}function ks(t,e){var r=t.getUTCDay();return ga((t=r>=4||0===r?Hi(t):Hi.ceil(t)).getUTCFullYear()%1e4,e,4)}function As(){return"+0000"}function _s(){return"%"}function Es(t){return+t}function Cs(t){return Math.floor(+t/1e3)}function Ss(t){return new Date(t)}function Rs(t){return t instanceof Date?+t:+new Date(+t)}function Ls(t,e,r,n,i,a,s,o,l,c){var h=di(),u=h.invert,d=h.domain,p=c(".%L"),f=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),v=c("%b %d"),b=c("%B"),x=c("%Y");function w(t){return(l(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Es,s:Cs,S:Wa,u:Ha,U:Va,V:Za,w:Qa,W:Ja,x:null,X:null,y:ts,Y:rs,Z:is,"%":_s},x={a:function(t){return s[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return o[t.getUTCMonth()]},c:null,d:as,e:as,f:hs,g:ws,G:ks,H:ss,I:os,j:ls,L:cs,m:us,M:ds,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Es,s:Cs,S:ps,u:fs,U:gs,V:ys,w:vs,W:bs,x:null,X:null,y:xs,Y:Ts,Z:As,"%":_s},w={a:function(t,e,r){var n=p.exec(e.slice(r));return n?(t.w=f.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){var n=u.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.m=v.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){var n=g.exec(e.slice(r));return n?(t.m=m.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,r,n){return A(t,e,r,n)},d:Ra,e:Ra,f:Oa,g:_a,G:Aa,H:Da,I:Da,j:La,L:Ma,m:Sa,M:Na,p:function(t,e,r){var n=c.exec(e.slice(r));return n?(t.p=h.get(n[0].toLowerCase()),r+n[0].length):-1},q:Ca,Q:$a,s:Ba,S:Ia,u:xa,U:wa,V:Ta,w:ba,W:ka,x:function(t,e,n){return A(t,r,e,n)},X:function(t,e,r){return A(t,n,e,r)},y:_a,Y:Aa,Z:Ea,"%":Pa};function T(t,e){return function(r){var n,i,a,s=[],o=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++o53)return null;"w"in a||(a.w=1),"Z"in a?(i=(n=oa(la(a.y,0,1))).getUTCDay(),n=i>4||0===i?Gi.ceil(n):Gi(n),n=Ii.offset(n,7*(a.V-1)),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(i=(n=sa(la(a.y,0,1))).getDay(),n=i>4||0===i?$i.ceil(n):$i(n),n=Ni.offset(n,7*(a.V-1)),a.y=n.getFullYear(),a.m=n.getMonth(),a.d=n.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?oa(la(a.y,0,1)).getUTCDay():sa(la(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,oa(a)):sa(a)}}function A(t,e,r,n){for(var i,a,s=0,o=e.length,l=r.length;s=l)return-1;if(37===(i=e.charCodeAt(s++))){if(i=e.charAt(s++),!(a=w[i in ua?e.charAt(s++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return b.x=T(r,b),b.X=T(n,b),b.c=T(e,b),x.x=T(r,x),x.X=T(n,x),x.c=T(e,x),{format:function(t){var e=T(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=T(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}(t),ha=ca.format,ca.parse,ca.utcFormat,ca.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 Ns=function(t){for(var e=t.length/6|0,r=new Array(e),n=0;n=1?js:t<=-1?-js:Math.asin(t)}const Ws=Math.PI,Hs=2*Ws,Vs=1e-6,Xs=Hs-Vs;function Zs(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Zs;const r=10**e;return function(t){this._+=t[0];for(let e=1,n=t.length;eVs)if(Math.abs(h*o-l*c)>Vs&&i){let d=r-a,p=n-s,f=o*o+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(u),v=i*Math.tan((Ws-Math.acos((f+u-g)/(2*m*y)))/2),b=v/y,x=v/m;Math.abs(b-1)>Vs&&this._append`L${t+b*c},${e+b*h}`,this._append`A${i},${i},0,0,${+(h*d>c*p)},${this._x1=t+x*o},${this._y1=e+x*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,n,i,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(n),o=r*Math.sin(n),l=t+s,c=e+o,h=1^a,u=a?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Vs||Math.abs(this._y1-c)>Vs)&&this._append`L${l},${c}`,r&&(u<0&&(u=u%Hs+Hs),u>Xs?this._append`A${r},${r},0,1,${h},${t-s},${e-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:u>Vs&&this._append`A${r},${r},0,${+(u>=Ws)},${h},${this._x1=t+r*Math.cos(i)},${this._y1=e+r*Math.sin(i)}`)}rect(t,e,r,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}}function Js(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Qs(e)}function to(t){return t.innerRadius}function eo(t){return t.outerRadius}function ro(t){return t.startAngle}function no(t){return t.endAngle}function io(t){return t&&t.padAngle}function ao(t,e,r,n,i,a,s){var o=t-r,l=e-n,c=(s?a:-a)/Ks(o*o+l*l),h=c*l,u=-c*o,d=t+h,p=e+u,f=r+h,g=n+u,m=(d+f)/2,y=(p+g)/2,v=f-d,b=g-p,x=v*v+b*b,w=i-a,T=d*g-f*p,k=(b<0?-1:1)*Ks(Bs(0,w*w*x-T*T)),A=(T*b-v*k)/x,_=(-T*v-b*k)/x,E=(T*b+v*k)/x,C=(-T*v+b*k)/x,S=A-m,R=_-y,L=E-m,D=C-y;return S*S+R*R>L*L+D*D&&(A=E,_=C),{cx:A,cy:_,x01:-h,y01:-u,x11:A*(i/w-1),y11:_*(i/w-1)}}function so(){var t=to,e=eo,r=Ms(0),n=null,i=ro,a=no,s=io,o=null,l=Js(c);function c(){var c,h,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=i.apply(this,arguments)-js,g=a.apply(this,arguments)-js,m=Os(g-f),y=g>f;if(o||(o=c=l()),pqs)if(m>Gs-qs)o.moveTo(p*$s(f),p*zs(f)),o.arc(0,0,p,f,g,!y),d>qs&&(o.moveTo(d*$s(g),d*zs(g)),o.arc(0,0,d,g,f,y));else{var v,b,x=f,w=g,T=f,k=g,A=m,_=m,E=s.apply(this,arguments)/2,C=E>qs&&(n?+n.apply(this,arguments):Ks(d*d+p*p)),S=Fs(Os(p-d)/2,+r.apply(this,arguments)),R=S,L=S;if(C>qs){var D=Ys(C/d*zs(E)),N=Ys(C/p*zs(E));(A-=2*D)>qs?(T+=D*=y?1:-1,k-=D):(A=0,T=k=(f+g)/2),(_-=2*N)>qs?(x+=N*=y?1:-1,w-=N):(_=0,x=w=(f+g)/2)}var I=p*$s(x),M=p*zs(x),O=d*$s(k),P=d*zs(k);if(S>qs){var $,B=p*$s(w),F=p*zs(w),z=d*$s(T),K=d*zs(T);if(m1?0:u<-1?Us:Math.acos(u))/2),W=Ks($[0]*$[0]+$[1]*$[1]);R=Fs(S,(d-W)/(Y-1)),L=Fs(S,(p-W)/(Y+1))}else R=L=0}_>qs?L>qs?(v=ao(z,K,I,M,p,L,y),b=ao(B,F,O,P,p,L,y),o.moveTo(v.cx+v.x01,v.cy+v.y01),Lqs&&A>qs?R>qs?(v=ao(O,P,B,F,d,-R,y),b=ao(I,M,z,K,d,-R,y),o.lineTo(v.cx+v.x01,v.cy+v.y01),Rt?1:e>=t?0:NaN}function go(t){return t}function mo(){var t=go,e=fo,r=null,n=Ms(0),i=Ms(Gs),a=Ms(0);function s(s){var o,l,c,h,u,d=(s=oo(s)).length,p=0,f=new Array(d),g=new Array(d),m=+n.apply(this,arguments),y=Math.min(Gs,Math.max(-Gs,i.apply(this,arguments)-m)),v=Math.min(Math.abs(y)/d,a.apply(this,arguments)),b=v*(y<0?-1:1);for(o=0;o0&&(p+=u);for(null!=e?f.sort(function(t,r){return e(g[t],g[r])}):null!=r&&f.sort(function(t,e){return r(s[t],s[e])}),o=0,c=p?(y-d*b)/p:0;o0?u*c:0)+b,g[l]={data:s[l],index:o,value:u,startAngle:m,endAngle:h,padAngle:v};return g}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:Ms(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,r=null,s):e},s.sort=function(t){return arguments.length?(r=t,e=null,s):r},s.startAngle=function(t){return arguments.length?(n="function"==typeof t?t:Ms(+t),s):n},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ms(+t),s):i},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ms(+t),s):a},s}function yo(){}function vo(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function bo(t){this._context=t}function xo(t){return new bo(t)}function wo(t){this._context=t}function To(t){return new wo(t)}function ko(t){this._context=t}function Ao(t){return new ko(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)}}},bo.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:vo(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:vo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},wo.prototype={areaStart:yo,areaEnd:yo,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:vo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ko.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 r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:vo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class _o{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 Eo(t){return new _o(t,!0)}function Co(t){return new _o(t,!1)}function So(t,e){this._basis=new bo(t),this._beta=e}So.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],s=t[r]-i,o=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*s),this._beta*e[l]+(1-this._beta)*(a+n*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Ro=function t(e){function r(t){return 1===e?new bo(t):new So(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function Lo(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function 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:Lo(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:Lo(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 No=function t(e){function r(t){return new Do(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Io(t,e){this._context=t,this._k=(1-e)/6}Io.prototype={areaStart:yo,areaEnd:yo,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:Lo(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 r(t){return new Io(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Oo(t,e){this._context=t,this._k=(1-e)/6}Oo.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:Lo(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 Po=function t(e){function r(t){return new Oo(t,e)}return r.tension=function(e){return t(+e)},r}(0);function $o(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>qs){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>qs){var c=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);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2)}function Bo(t,e){this._context=t,this._alpha=e}Bo.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 r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:$o(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 Fo=function t(e){function r(t){return e?new Bo(t,e):new Do(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function zo(t,e){this._context=t,this._alpha=e}zo.prototype={areaStart:yo,areaEnd:yo,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 r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:$o(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 Ko=function t(e){function r(t){return e?new zo(t,e):new Io(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function qo(t,e){this._context=t,this._alpha=e}qo.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 r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:$o(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 r(t){return e?new qo(t,e):new Oo(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function jo(t){this._context=t}function Go(t){return new jo(t)}function Yo(t){return t<0?-1:1}function Wo(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(Yo(a)+Yo(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Ho(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Vo(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-n)/3;t._context.bezierCurveTo(n+o,i+o*e,a-o,s-o*r,a,s)}function Xo(t){this._context=t}function Zo(t){this._context=new Qo(t)}function Qo(t){this._context=t}function Jo(t){return new Xo(t)}function tl(t){return new Zo(t)}function el(t){this._context=t}function rl(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),s=new Array(n);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-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 r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},ll.prototype={constructor:ll,scale:function(t){return 1===t?this:new ll(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ll(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 ll(1,0,0);ll.prototype},567(t,e,r){"use strict";r.d(e,{Zp:()=>Me});var n=r(8058),i=r(3456),a=0;const s=function(t){var e=++a;return(0,i.A)(t)+e};var o=r(9142),l=r(4098),c=r(4722),h=Math.ceil,u=Math.max;const d=function(t,e,r,n){for(var i=-1,a=u(h((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s};var p=r(6832),f=r(3631);const g=function(t){return function(e,r,n){return n&&"number"!=typeof n&&(0,p.A)(e,r,n)&&(r=n=void 0),e=(0,f.A)(e),void 0===r?(r=e,e=0):r=(0,f.A)(r),n=void 0===n?e0;--o)if(n=e[o].dequeue()){i=i.concat(T(t,e,r,n,!0));break}}return i}(r.graph,r.buckets,r.zeroIdx);return l.A(c.A(i,function(e){return t.outEdges(e.v,e.w)}))}function T(t,e,r,i,a){var s=a?[]:void 0;return n.A(t.inEdges(i.v),function(n){var i=t.edge(n),o=t.node(n.v);a&&s.push({v:n.v,w:n.w}),o.out-=i,k(e,r,o)}),n.A(t.outEdges(i.v),function(n){var i=t.edge(n),a=n.w,s=t.node(a);s.in-=i,k(e,r,s)}),t.removeNode(i.v),s}function k(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}function A(t){var e="greedy"===t.graph().acyclicer?w(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],r={},i={};function a(s){Object.prototype.hasOwnProperty.call(i,s)||(i[s]=!0,r[s]=!0,n.A(t.outEdges(s),function(t){Object.prototype.hasOwnProperty.call(r,t.w)?e.push(t):a(t.w)}),delete r[s])}return n.A(t.nodes(),a),e}(t);n.A(e,function(e){var r=t.edge(e);t.removeEdge(e),r.forwardName=e.name,r.reversed=!0,t.setEdge(e.w,e.v,r,s("rev"))})}var _=r(7222),E=r(5507),C=r(6964);const S=function(t,e){return(0,E.A)(t,e,function(e,r){return(0,C.A)(t,r)})};var R=r(5255),L=r(7424);const D=function(t){return(0,L.A)((0,R.A)(t,void 0,l.A),t+"")}(function(t,e){return null==t?{}:S(t,e)});var N=r(3068),I=r(2559);const M=function(t,e){return t>e};var O=r(9008);const P=function(t){return t&&t.length?(0,I.A)(t,O.A,M):void 0};var $=r(6666),B=r(2528),F=r(9841),z=r(6307);const K=function(t,e){var r={};return e=(0,z.A)(e,3),(0,F.A)(t,function(t,n,i){(0,B.A)(r,n,e(t,n,i))}),r};var q=r(9592),U=r(6452),j=r(9622),G=r(1917);const Y=function(){return G.A.Date.now()};function W(t,e,r,n){var i;do{i=s(n)}while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function H(t){var e=new m.T({multigraph:t.isMultigraph()}).setGraph(t.graph());return n.A(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),n.A(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function V(t,e){var r,n,i=t.x,a=t.y,s=e.x-i,o=e.y-a,l=t.width/2,c=t.height/2;if(!s&&!o)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),r=c*s/o,n=c):(s<0&&(l=-l),r=l,n=l*o/s),{x:i+r,y:a+n}}function X(t){var e=c.A(g(Q(t)+1),function(){return[]});return n.A(t.nodes(),function(r){var n=t.node(r),i=n.rank;q.A(i)||(e[i][n.order]=r)}),e}function Z(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),W(t,"border",i,e)}function Q(t){return P(c.A(t.nodes(),function(e){var r=t.node(e).rank;if(!q.A(r))return r}))}function J(t,e){var r=Y();try{return e()}finally{console.log(t+" time: "+(Y()-r)+"ms")}}function tt(t,e){return e()}function et(t,e,r,n,i,a){var s={width:0,height:0,rank:a,borderType:e},o=i[e][a-1],l=W(t,"border",s,r);i[e][a]=l,t.setParent(l,n),o&&t.setEdge(o,l,{weight:1})}function rt(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){n.A(t.nodes(),function(e){at(t.node(e))}),n.A(t.edges(),function(e){var r=t.edge(e);n.A(r.points,at),Object.prototype.hasOwnProperty.call(r,"y")&&at(r)})}(t),"lr"!==e&&"rl"!==e||(!function(t){n.A(t.nodes(),function(e){st(t.node(e))}),n.A(t.edges(),function(e){var r=t.edge(e);n.A(r.points,st),Object.prototype.hasOwnProperty.call(r,"x")&&st(r)})}(t),nt(t))}function nt(t){n.A(t.nodes(),function(e){it(t.node(e))}),n.A(t.edges(),function(e){it(t.edge(e))})}function it(t){var e=t.width;t.width=t.height,t.height=e}function at(t){t.y=-t.y}function st(t){var e=t.x;t.x=t.y,t.y=e}function ot(t){t.graph().dummyChains=[],n.A(t.edges(),function(e){!function(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a===n+1)return;t.removeEdge(e);var c,h,u=void 0;for(h=0,++n;ns.lim&&(o=s,l=!0);var c=yt.A(e.edges(),function(e){return l===Kt(t,t.node(e.v),o)&&l!==Kt(t,t.node(e.w),o)});return ct(c,function(t){return ut(e,t)})}function zt(t,e,r,i){var a=r.v,s=r.w;t.removeEdge(a,s),t.setEdge(i.v,i.w,{}),Pt(t),Mt(t,e),function(t,e){var r=mt.A(t.nodes(),function(t){return!e.node(t).parent}),i=function(t,e){return Dt(t,e,"pre")}(t,r);i=i.slice(1),n.A(i,function(r){var n=t.node(r).parent,i=e.edge(r,n),a=!1;i||(i=e.edge(n,r),a=!0),e.node(r).rank=e.node(n).rank+(a?i.minlen:-i.minlen)})}(t,e)}function Kt(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function qt(t){switch(t.graph().ranker){case"network-simplex":default:jt(t);break;case"tight-tree":!function(t){ht(t),dt(t)}(t);break;case"longest-path":Ut(t)}}It.initLowLimValues=Pt,It.initCutValues=Mt,It.calcCutValue=Ot,It.leaveEdge=Bt,It.enterEdge=Ft,It.exchangeEdges=zt;var Ut=ht;function jt(t){It(t)}var Gt=r(2866),Yt=r(3130);function Wt(t){var e=W(t,"root",{},"_root"),r=function(t){var e={};function r(i,a){var s=t.children(i);s&&s.length&&n.A(s,function(t){r(t,a+1)}),e[i]=a}return n.A(t.children(),function(t){r(t,1)}),e}(t),i=P(Gt.A(r))-1,a=2*i+1;t.graph().nestingRoot=e,n.A(t.edges(),function(e){t.edge(e).minlen*=a});var s=function(t){return Yt.A(t.edges(),function(e,r){return e+t.edge(r).weight},0)}(t)+1;n.A(t.children(),function(n){Ht(t,e,a,s,i,r,n)}),t.graph().nodeRankFactor=a}function Ht(t,e,r,i,a,s,o){var l=t.children(o);if(l.length){var c=Z(t,"_bt"),h=Z(t,"_bb"),u=t.node(o);t.setParent(c,o),u.borderTop=c,t.setParent(h,o),u.borderBottom=h,n.A(l,function(n){Ht(t,e,r,i,a,s,n);var l=t.node(n),u=l.borderTop?l.borderTop:n,d=l.borderBottom?l.borderBottom:n,p=l.borderTop?i:2*i,f=u!==d?1:a-s[o]+1;t.setEdge(c,u,{weight:p,minlen:f,nestingEdge:!0}),t.setEdge(d,h,{weight:p,minlen:f,nestingEdge:!0})}),t.parent(o)||t.setEdge(e,c,{weight:0,minlen:a+s[o]})}else o!==e&&t.setEdge(e,o,{weight:0,minlen:r})}var Vt=r(4507);const Xt=function(t){return(0,Vt.A)(t,5)};function Zt(t,e,r){var i=function(t){var e;for(;t.hasNode(e=s("_root")););return e}(t),a=new m.T({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(e){return t.node(e)});return n.A(t.nodes(),function(s){var o=t.node(s),l=t.parent(s);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(a.setNode(s),a.setParent(s,l||i),n.A(t[r](s),function(e){var r=e.v===s?e.w:e.v,n=a.edge(r,s),i=q.A(n)?0:n.weight;a.setEdge(r,s,{weight:t.edge(e).weight+i})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&a.setNode(s,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),a}var Qt=r(2851);const Jt=function(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++ne||a&&s&&l&&!o&&!c||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!c&&t=o?l:l*("desc"==r[n]?-1:1)}return t.index-e.index};const he=function(t,e,r){e=e.length?(0,re.A)(e,function(t){return(0,Lt.A)(t)?function(e){return(0,ne.A)(e,1===t.length?t[0]:t)}:t}):[O.A];var n=-1;e=(0,re.A)(e,(0,se.A)(z.A));var i=(0,ie.A)(t,function(t,r,i){return{criteria:(0,re.A)(e,function(e){return e(t)}),index:++n,value:t}});return ae(i,function(t,e){return ce(t,e,r)})};const ue=(0,r(4326).A)(function(t,e){if(null==t)return[];var r=e.length;return r>1&&(0,p.A)(t,e[0],e[1])?e=[]:r>2&&(0,p.A)(e[0],e[1],e[2])&&(e=[e[0]]),he(t,(0,ee.A)(e,1),[])});function de(t,e){for(var r=0,n=1;n0;)e%2&&(r+=h[e+1]),h[e=e-1>>1]+=t.weight;u+=t.weight*r})),u}function fe(t,e){var r={};return n.A(t,function(t,e){var n=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};q.A(t.barycenter)||(n.barycenter=t.barycenter,n.weight=t.weight)}),n.A(e.edges(),function(t){var e=r[t.v],n=r[t.w];q.A(e)||q.A(n)||(n.indegree++,e.out.push(r[t.w]))}),function(t){var e=[];function r(t){return function(e){e.merged||(q.A(e.barycenter)||q.A(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight);e.weight&&(r+=e.barycenter*e.weight,n+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(r){r.in.push(e),0===--r.indegree&&t.push(r)}}for(;t.length;){var a=t.pop();e.push(a),n.A(a.in.reverse(),r(a)),n.A(a.out,i(a))}return c.A(yt.A(e,function(t){return!t.merged}),function(t){return D(t,["vs","i","barycenter","weight"])})}(yt.A(r,function(t){return!t.indegree}))}function ge(t,e){var r,i=function(t,e){var r={lhs:[],rhs:[]};return n.A(t,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r}(t,function(t){return Object.prototype.hasOwnProperty.call(t,"barycenter")}),a=i.lhs,s=ue(i.rhs,function(t){return-t.i}),o=[],c=0,h=0,u=0;a.sort((r=!!e,function(t,e){return t.barycentere.barycenter?1:r?e.i-t.i:t.i-e.i})),u=me(o,s,u),n.A(a,function(t){u+=t.vs.length,o.push(t.vs),c+=t.barycenter*t.weight,h+=t.weight,u=me(o,s,u)});var d={vs:l.A(o)};return h&&(d.barycenter=c/h,d.weight=h),d}function me(t,e,r){for(var n;e.length&&(n=$.A(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function ye(t,e,r,i){var a=t.children(e),s=t.node(e),o=s?s.borderLeft:void 0,h=s?s.borderRight:void 0,u={};o&&(a=yt.A(a,function(t){return t!==o&&t!==h}));var d=function(t,e){return c.A(e,function(e){var r=t.inEdges(e);if(r.length){var n=Yt.A(r,function(e,r){var n=t.edge(r),i=t.node(r.v);return{sum:e.sum+n.weight*i.order,weight:e.weight+n.weight}},{sum:0,weight:0});return{v:e,barycenter:n.sum/n.weight,weight:n.weight}}return{v:e}})}(t,a);n.A(d,function(e){if(t.children(e.v).length){var n=ye(t,e.v,r,i);u[e.v]=n,Object.prototype.hasOwnProperty.call(n,"barycenter")&&(a=e,s=n,q.A(a.barycenter)?(a.barycenter=s.barycenter,a.weight=s.weight):(a.barycenter=(a.barycenter*a.weight+s.barycenter*s.weight)/(a.weight+s.weight),a.weight+=s.weight))}var a,s});var p=fe(d,r);!function(t,e){n.A(t,function(t){t.vs=l.A(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}(p,u);var f=ge(p,i);if(o&&(f.vs=l.A([o,f.vs,h]),t.predecessors(o).length)){var g=t.node(t.predecessors(o)[0]),m=t.node(t.predecessors(h)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+g.order+m.order)/(f.weight+2),f.weight+=2}return f}function ve(t){var e=Q(t),r=be(t,g(1,e+1),"inEdges"),i=be(t,g(e-1,-1,-1),"outEdges"),a=function(t){var e={},r=yt.A(t.nodes(),function(e){return!t.children(e).length}),i=P(c.A(r,function(e){return t.node(e).rank})),a=c.A(g(i+1),function(){return[]}),s=ue(r,function(e){return t.node(e).rank});return n.A(s,function r(i){if(!j.A(e,i)){e[i]=!0;var s=t.node(i);a[s.rank].push(i),n.A(t.successors(i),r)}}),a}(t);we(t,a);for(var s,o=Number.POSITIVE_INFINITY,l=0,h=0;h<4;++l,++h){xe(l%2?r:i,l%4>=2);var u=de(t,a=X(t));ul||c>e[i].lim));a=i,i=n;for(;(i=t.parent(i))!==a;)o.push(i);return{path:s.concat(o.reverse()),lca:a}}(t,e,i.v,i.w),s=a.path,o=a.lca,l=0,c=s[l],h=!0;r!==i.w;){if(n=t.node(r),h){for(;(c=s[l])!==o&&t.node(c).maxRankr){var n=e;e=r,r=n}Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=t[e];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Le(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function De(t,e,r,i,a){var s={},o=function(t,e,r,i){var a=new m.T,s=t.graph(),o=function(t,e,r){return function(n,i,a){var s,o=n.node(i),l=n.node(a),c=0;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":s=-o.width/2;break;case"r":s=o.width/2}if(s&&(c+=r?s:-s),s=0,c+=(o.dummy?e:t)/2,c+=(l.dummy?e:t)/2,c+=l.width/2,Object.prototype.hasOwnProperty.call(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=l.width/2;break;case"r":s=-l.width/2}return s&&(c+=r?s:-s),s=0,c}}(s.nodesep,s.edgesep,i);return n.A(e,function(e){var i;n.A(e,function(e){var n=r[e];if(a.setNode(n),i){var s=r[i],l=a.edge(s,n);a.setEdge(s,n,Math.max(o(t,e,i),l||0))}i=e})}),a}(t,e,r,a),l=a?"borderLeft":"borderRight";function c(t,e){for(var r=o.nodes(),n=r.pop(),i={};n;)i[n]?t(n):(i[n]=!0,r.push(n),r=r.concat(e(n))),n=r.pop()}return c(function(t){s[t]=o.inEdges(t).reduce(function(t,e){return Math.max(t,s[e.v]+o.edge(e))},0)},o.predecessors.bind(o)),c(function(e){var r=o.outEdges(e).reduce(function(t,e){return Math.min(t,s[e.w]-o.edge(e))},Number.POSITIVE_INFINITY),n=t.node(e);r!==Number.POSITIVE_INFINITY&&n.borderType!==l&&(s[e]=Math.max(s[e],r))},o.successors.bind(o)),n.A(i,function(t){s[t]=s[r[t]]}),s}function Ne(t){var e,r=X(t),i=_.A(Se(t,r),function(t,e){var r={};function i(e,i,a,s,o){var l;n.A(g(i,a),function(i){l=e[i],t.node(l).dummy&&n.A(t.predecessors(l),function(e){var n=t.node(e);n.dummy&&(n.ordero)&&Re(r,e,l)})})}return Yt.A(e,function(e,r){var a,s=-1,o=0;return n.A(r,function(n,l){if("border"===t.node(n).dummy){var c=t.predecessors(n);c.length&&(a=t.node(c[0]).order,i(r,o,l,s,a),o=l,s=a)}i(r,o,r.length,a,e.length)}),r}),r}(t,r)),a={};n.A(["u","d"],function(s){e="u"===s?r:Gt.A(r).reverse(),n.A(["l","r"],function(r){"r"===r&&(e=c.A(e,function(t){return Gt.A(t).reverse()}));var o=("u"===s?t.predecessors:t.successors).bind(t),l=function(t,e,r,i){var a={},s={},o={};return n.A(e,function(t){n.A(t,function(t,e){a[t]=t,s[t]=t,o[t]=e})}),n.A(e,function(t){var e=-1;n.A(t,function(t){var n=i(t);if(n.length){n=ue(n,function(t){return o[t]});for(var l=(n.length-1)/2,c=Math.floor(l),h=Math.ceil(l);c<=h;++c){var u=n[c];s[t]===t&&e{var e=r(" buildLayoutGraph",()=>function(t){var e=new m.T({multigraph:!0,compound:!0}),r=je(t.graph());return e.setGraph(_.A({},Pe,Ue(r,Oe),D(r,$e))),n.A(t.nodes(),function(r){var n=je(t.node(r));e.setNode(r,N.A(Ue(n,Be),Fe)),e.setParent(r,t.parent(r))}),n.A(t.edges(),function(r){var n=je(t.edge(r));e.setEdge(r,_.A({},Ke,Ue(n,ze),D(n,qe)))}),e}(t));r(" runLayout",()=>function(t,e){e(" makeSpaceForEdgeLabels",()=>function(t){var e=t.graph();e.ranksep/=2,n.A(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)})}(t)),e(" removeSelfEdges",()=>function(t){n.A(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}(t)),e(" acyclic",()=>A(t)),e(" nestingGraph.run",()=>Wt(t)),e(" rank",()=>qt(H(t))),e(" injectEdgeLabelProxies",()=>function(t){n.A(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e};W(t,"edge-proxy",i,"_ep")}})}(t)),e(" removeEmptyRanks",()=>function(t){var e=U.A(c.A(t.nodes(),function(e){return t.node(e).rank})),r=[];n.A(t.nodes(),function(n){var i=t.node(n).rank-e;r[i]||(r[i]=[]),r[i].push(n)});var i=0,a=t.graph().nodeRankFactor;n.A(r,function(e,r){q.A(e)&&r%a!==0?--i:i&&n.A(e,function(e){t.node(e).rank+=i})})}(t)),e(" nestingGraph.cleanup",()=>function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,n.A(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}(t)),e(" normalizeRanks",()=>function(t){var e=U.A(c.A(t.nodes(),function(e){return t.node(e).rank}));n.A(t.nodes(),function(r){var n=t.node(r);j.A(n,"rank")&&(n.rank-=e)})}(t)),e(" assignRankMinMax",()=>function(t){var e=0;n.A(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=P(e,n.maxRank))}),t.graph().maxRank=e}(t)),e(" removeEdgeLabelProxies",()=>function(t){n.A(t.nodes(),function(e){var r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}(t)),e(" normalize.run",()=>ot(t)),e(" parentDummyChains",()=>Te(t)),e(" addBorderSegments",()=>function(t){n.A(t.children(),function e(r){var i=t.children(r),a=t.node(r);if(i.length&&n.A(i,e),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,o=a.maxRank+1;sve(t)),e(" insertSelfEdges",()=>function(t){var e=X(t);n.A(e,function(e){var r=0;n.A(e,function(e,i){var a=t.node(e);a.order=i+r,n.A(a.selfEdges,function(e){W(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++r,e:e.e,label:e.label},"_se")}),delete a.selfEdges})})}(t)),e(" adjustCoordinateSystem",()=>function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||nt(t)}(t)),e(" position",()=>Ie(t)),e(" positionSelfEdges",()=>function(t){n.A(t.nodes(),function(e){var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,s=r.x-i,o=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{x:i+s,y:a},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],r.label.x=r.x,r.label.y=r.y}})}(t)),e(" removeBorderNodes",()=>function(t){n.A(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node($.A(r.borderLeft)),s=t.node($.A(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),n.A(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}(t)),e(" normalize.undo",()=>function(t){n.A(t.graph().dummyChains,function(e){var r,n=t.node(e),i=n.edgeLabel;for(t.setEdge(n.edgeObj,i);n.dummy;)r=t.successors(e)[0],t.removeNode(e),i.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),e=r,n=t.node(e)})}(t)),e(" fixupEdgeLabelCoords",()=>function(t){n.A(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(t)),e(" undoCoordinateSystem",()=>rt(t)),e(" translateGraph",()=>function(t){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,s=t.graph(),o=s.marginx||0,l=s.marginy||0;function c(t){var n=t.x,s=t.y,o=t.width,l=t.height;e=Math.min(e,n-o/2),r=Math.max(r,n+o/2),i=Math.min(i,s-l/2),a=Math.max(a,s+l/2)}n.A(t.nodes(),function(e){c(t.node(e))}),n.A(t.edges(),function(e){var r=t.edge(e);Object.prototype.hasOwnProperty.call(r,"x")&&c(r)}),e-=o,i-=l,n.A(t.nodes(),function(r){var n=t.node(r);n.x-=e,n.y-=i}),n.A(t.edges(),function(r){var a=t.edge(r);n.A(a.points,function(t){t.x-=e,t.y-=i}),Object.prototype.hasOwnProperty.call(a,"x")&&(a.x-=e),Object.prototype.hasOwnProperty.call(a,"y")&&(a.y-=i)}),s.width=r-e+o,s.height=a-i+l}(t)),e(" assignNodeIntersects",()=>function(t){n.A(t.edges(),function(e){var r,n,i=t.edge(e),a=t.node(e.v),s=t.node(e.w);i.points?(r=i.points[0],n=i.points[i.points.length-1]):(i.points=[],r=s,n=a),i.points.unshift(V(a,r)),i.points.push(V(s,n))})}(t)),e(" reversePoints",()=>function(t){n.A(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}(t)),e(" acyclic.undo",()=>function(t){n.A(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}(t))}(e,r)),r(" updateInputGraph",()=>function(t,e){n.A(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),n.A(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e))})}var Oe=["nodesep","edgesep","ranksep","marginx","marginy"],Pe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$e=["acyclicer","ranker","rankdir","align"],Be=["width","height"],Fe={width:0,height:0},ze=["minlen","weight","width","height","labeloffset"],Ke={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},qe=["labelpos"];function Ue(t,e){return K(D(t,e),Number)}function je(t){var e={};return n.A(t,function(t,r){e[r.toLowerCase()]=t}),e}},1471(t,e,r){"use strict";r.d(e,{T:()=>v});var n=r(9142),i=r(9610),a=r(7422),s=r(4092),o=r(6401),l=r(8058),c=r(9592),h=r(7671),u=r(4326),d=r(7371),p=r(3533);const f=(0,u.A)(function(t){return(0,d.A)((0,h.A)(t,1,p.A,!0))});var g=r(2866),m=r(3130),y="\0";class v{constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=n.A(void 0),this._defaultEdgeLabelFn=n.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[y]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return i.A(t)||(t=n.A(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return a.A(this._nodes)}sources(){var t=this;return s.A(this.nodes(),function(e){return o.A(t._in[e])})}sinks(){var t=this;return s.A(this.nodes(),function(e){return o.A(t._out[e])})}setNodes(t,e){var r=arguments,n=this;return l.A(t,function(t){r.length>1?n.setNode(t,e):n.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(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]=y,this._children[t]={},this._children[y][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],l.A(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),l.A(a.A(this._in[t]),e),delete this._in[t],delete this._preds[t],l.A(a.A(this._out[t]),e),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(c.A(e))e=y;else{for(var r=e+="";!c.A(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==y)return e}}children(t){if(c.A(t)&&(t=y),this._isCompound){var e=this._children[t];if(e)return a.A(e)}else{if(t===y)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return a.A(e)}successors(t){var e=this._sucs[t];if(e)return a.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return f(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 r=this;l.A(this._nodes,function(r,n){t(n)&&e.setNode(n,r)}),l.A(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))});var n={};function i(t){var a=r.parent(t);return void 0===a||e.hasNode(a)?(n[t]=a,a):a in n?n[a]:i(a)}return this._isCompound&&l.A(e.nodes(),function(t){e.setParent(t,i(t))}),e}setDefaultEdgeLabel(t){return i.A(t)||(t=n.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return g.A(this._edgeObjs)}setPath(t,e){var r=this,n=arguments;return m.A(t,function(t,i){return n.length>1?r.setEdge(t,i,e):r.setEdge(t,i),i}),this}setEdge(){var t,e,r,n,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,r=a.name,2===arguments.length&&(n=arguments[1],i=!0)):(t=a,e=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),t=""+t,e=""+e,c.A(r)||(r=""+r);var s=w(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,s))return i&&(this._edgeLabels[s]=n),this;if(!c.A(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=i?n:this._defaultEdgeLabelFn(t,e,r);var o=function(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}var o={v:i,w:a};n&&(o.name=n);return o}(this._isDirected,t,e,r);return t=o.v,e=o.w,Object.freeze(o),this._edgeObjs[s]=o,b(this._preds[e],t),b(this._sucs[t],e),this._in[e][s]=o,this._out[t][s]=o,this._edgeCount++,this}edge(t,e,r){var n=1===arguments.length?T(this._isDirected,arguments[0]):w(this._isDirected,t,e,r);return this._edgeLabels[n]}hasEdge(t,e,r){var n=1===arguments.length?T(this._isDirected,arguments[0]):w(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(t,e,r){var n=1===arguments.length?T(this._isDirected,arguments[0]):w(this._isDirected,t,e,r),i=this._edgeObjs[n];return i&&(t=i.v,e=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],x(this._preds[e],t),x(this._sucs[t],e),delete this._in[e][n],delete this._out[t][n],this._edgeCount--),this}inEdges(t,e){var r=this._in[t];if(r){var n=g.A(r);return e?s.A(n,function(t){return t.v===e}):n}}outEdges(t,e){var r=this._out[t];if(r){var n=g.A(r);return e?s.A(n,function(t){return t.w===e}):n}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}function b(t,e){t[e]?t[e]++:t[e]=1}function x(t,e){--t[e]||delete t[e]}function w(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+""+a+""+(c.A(n)?"\0":n)}function T(t,e){return w(t,e.v,e.w,e.name)}v.prototype._nodeCount=0,v.prototype._edgeCount=0},697(t,e,r){"use strict";r.d(e,{T:()=>n.T});var n=r(1471)},2130(t,e,r){"use strict";r.d(e,{default:()=>fi});class n{constructor(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}static range(t,e){return e?t&&t.loc&&e.loc&&t.loc.lexer===e.loc.lexer?new n(t.loc.lexer,t.loc.start,e.loc.end):null:t&&t.loc}}class i{constructor(t,e){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=e}range(t,e){return new i(e,n.range(this,t))}}class a{constructor(t,e){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,i="KaTeX parse error: "+t,s=e&&e.loc;if(s&&s.start<=s.end){var o=s.lexer.input;r=s.start,n=s.end,r===o.length?i+=" at end of input: ":i+=" at position "+(r+1)+": ";var l=o.slice(r,n).replace(/[^]/g,"$&̲");i+=(r>15?"…"+o.slice(r-15,r):o.slice(0,r))+l+(n+15t.replace(s,"-$1").toLowerCase(),l={"&":"&",">":">","<":"<",'"':""","'":"'"},c=/[&><"']/g,h=t=>String(t).replace(c,t=>l[t]),u=t=>"ordgroup"===t.type||"color"===t.type?1===t.body.length?u(t.body[0]):t:"font"===t.type?u(t.body):t,d=new Set(["mathord","textord","atom"]),p=t=>d.has(u(t).type),f={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>"Infinity"===t?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function g(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class m{constructor(t){for(var e in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{},f)if(f.hasOwnProperty(e)){var r=f[e];this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:g(r)}}reportNonstrict(t,e,r){var n=this.strict;if("function"==typeof n&&(n=n(t,e,r)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,r){var n=this.strict;if("function"==typeof n)try{n=n(t,e,r)}catch(i){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]"),!1)))}isTrusted(t){if(t.url&&!t.protocol){var e=(t=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return e?":"!==e[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"})(t.url);if(null==e)return!1;t.protocol=e}var r="function"==typeof this.trust?this.trust(t):this.trust;return Boolean(r)}}class y{constructor(t,e,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=r}sup(){return v[b[this.id]]}sub(){return v[x[this.id]]}fracNum(){return v[w[this.id]]}fracDen(){return v[T[this.id]]}cramp(){return v[k[this.id]]}text(){return v[A[this.id]]}isTight(){return this.size>=2}}var v=[new y(0,0,!1),new y(1,0,!0),new y(2,1,!1),new y(3,1,!0),new y(4,2,!1),new y(5,2,!0),new y(6,3,!1),new y(7,3,!0)],b=[4,5,4,5,6,7,6,7],x=[5,5,5,5,7,7,7,7],w=[2,3,4,5,6,7,6,7],T=[3,3,5,5,7,7,7,7],k=[1,1,3,3,5,5,7,7],A=[0,1,2,3,2,3,2,3],_={DISPLAY:v[0],TEXT:v[2],SCRIPT:v[4],SCRIPTSCRIPT:v[6]},E=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var C=[];function S(t){for(var e=0;e=C[e]&&t<=C[e+1])return!0;return!1}E.forEach(t=>t.blocks.forEach(t=>C.push(...t)));var R=80,L={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class D{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),e=0;et.toText()).join("")}}var N={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},I={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},M={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function O(t,e,r){if(!N[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=N[e][n];if(!i&&t[0]in M&&(n=M[t[0]].charCodeAt(0),i=N[e][n]),i||"text"!==r||S(n)&&(i=N[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var P={};var $=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],B=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],F=function(t,e){return e.size<2?t:$[t-1][e.size-1]};class z{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||z.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=B[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var e={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return new z(e)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:F(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:B[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=F(z.BASESIZE,t);return this.size===e&&this.textSize===z.BASESIZE&&this.style===t?this:this.extend({style:t,size:e})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==z.BASESIZE?["sizing","reset-size"+this.size,"size"+z.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(t){var e;if(!P[e=t>=5?0:t>=3?1:2]){var r=P[e]={cssEmPerMu:I.quad[e]/18};for(var n in I)I.hasOwnProperty(n)&&(r[n]=I[n][e])}return P[e]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}z.BASESIZE=6;var K={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},q={ex:!0,em:!0,mu:!0},U=function(t){return"string"!=typeof t&&(t=t.unit),t in K||t in q||"ex"===t},j=function(t,e){var r;if(t.unit in K)r=K[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var n;if(n=e.style.isTight()?e.havingStyle(e.style.text()):e,"ex"===t.unit)r=n.fontMetrics().xHeight;else{if("em"!==t.unit)throw new a("Invalid unit: '"+t.unit+"'");r=n.fontMetrics().quad}n!==e&&(r*=n.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},G=function(t){return+t.toFixed(4)+"em"},Y=function(t){return t.filter(t=>t).join(" ")},W=function(t,e,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},e){e.style.isTight()&&this.classes.push("mtight");var n=e.getColor();n&&(this.style.color=n)}},H=function(t){var e=document.createElement(t);for(var r in e.className=Y(this.classes),this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&e.setAttribute(n,this.attributes[n]);for(var i=0;i/=\x00-\x1f]/,X=function(t){var e="<"+t;this.classes.length&&(e+=' class="'+h(Y(this.classes))+'"');var r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=o(n)+":"+this.style[n]+";");for(var i in r&&(e+=' style="'+h(r)+'"'),this.attributes)if(this.attributes.hasOwnProperty(i)){if(V.test(i))throw new a("Invalid attribute name '"+i+"'");e+=" "+i+'="'+h(this.attributes[i])+'"'}e+=">";for(var s=0;s"};class Z{constructor(t,e,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,W.call(this,t,r,n),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return this.classes.includes(t)}toNode(){return H.call(this,"span")}toMarkup(){return X.call(this,"span")}}class Q{constructor(t,e,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,W.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return this.classes.includes(t)}toNode(){return H.call(this,"a")}toMarkup(){return X.call(this,"a")}}class J{constructor(t,e,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=e,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");for(var e in t.src=this.src,t.alt=this.alt,t.className="mord",this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);return t}toMarkup(){var t=''+h(this.alt)+'=i[0]&&t<=i[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=tt[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),e=null;for(var r in this.italic>0&&((e=document.createElement("span")).style.marginRight=G(this.italic)),this.classes.length>0&&((e=e||document.createElement("span")).className=Y(this.classes)),this.style)this.style.hasOwnProperty(r)&&((e=e||document.createElement("span")).style[r]=this.style[r]);return e?(e.appendChild(t),e):t}toMarkup(){var t=!1,e="0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=o(n)+":"+this.style[n]+";");r&&(t=!0,e+=' style="'+h(r)+'"');var i=h(this.text);return t?(e+=">",e+=i,e+=""):i}}class rt{constructor(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(var r=0;r':''}}class it{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","line");for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t}toMarkup(){var t="","\\gt",!0),ct(ht,dt,Tt,"∈","\\in",!0),ct(ht,dt,Tt,"","\\@not"),ct(ht,dt,Tt,"⊂","\\subset",!0),ct(ht,dt,Tt,"⊃","\\supset",!0),ct(ht,dt,Tt,"⊆","\\subseteq",!0),ct(ht,dt,Tt,"⊇","\\supseteq",!0),ct(ht,pt,Tt,"⊈","\\nsubseteq",!0),ct(ht,pt,Tt,"⊉","\\nsupseteq",!0),ct(ht,dt,Tt,"⊨","\\models"),ct(ht,dt,Tt,"←","\\leftarrow",!0),ct(ht,dt,Tt,"≤","\\le"),ct(ht,dt,Tt,"≤","\\leq",!0),ct(ht,dt,Tt,"<","\\lt",!0),ct(ht,dt,Tt,"→","\\rightarrow",!0),ct(ht,dt,Tt,"→","\\to"),ct(ht,pt,Tt,"≱","\\ngeq",!0),ct(ht,pt,Tt,"≰","\\nleq",!0),ct(ht,dt,kt," ","\\ "),ct(ht,dt,kt," ","\\space"),ct(ht,dt,kt," ","\\nobreakspace"),ct(ut,dt,kt," ","\\ "),ct(ut,dt,kt," "," "),ct(ut,dt,kt," ","\\space"),ct(ut,dt,kt," ","\\nobreakspace"),ct(ht,dt,kt,null,"\\nobreak"),ct(ht,dt,kt,null,"\\allowbreak"),ct(ht,dt,wt,",",","),ct(ht,dt,wt,";",";"),ct(ht,pt,gt,"⊼","\\barwedge",!0),ct(ht,pt,gt,"⊻","\\veebar",!0),ct(ht,dt,gt,"⊙","\\odot",!0),ct(ht,dt,gt,"⊕","\\oplus",!0),ct(ht,dt,gt,"⊗","\\otimes",!0),ct(ht,dt,At,"∂","\\partial",!0),ct(ht,dt,gt,"⊘","\\oslash",!0),ct(ht,pt,gt,"⊚","\\circledcirc",!0),ct(ht,pt,gt,"⊡","\\boxdot",!0),ct(ht,dt,gt,"△","\\bigtriangleup"),ct(ht,dt,gt,"▽","\\bigtriangledown"),ct(ht,dt,gt,"†","\\dagger"),ct(ht,dt,gt,"⋄","\\diamond"),ct(ht,dt,gt,"⋆","\\star"),ct(ht,dt,gt,"◃","\\triangleleft"),ct(ht,dt,gt,"▹","\\triangleright"),ct(ht,dt,xt,"{","\\{"),ct(ut,dt,At,"{","\\{"),ct(ut,dt,At,"{","\\textbraceleft"),ct(ht,dt,mt,"}","\\}"),ct(ut,dt,At,"}","\\}"),ct(ut,dt,At,"}","\\textbraceright"),ct(ht,dt,xt,"{","\\lbrace"),ct(ht,dt,mt,"}","\\rbrace"),ct(ht,dt,xt,"[","\\lbrack",!0),ct(ut,dt,At,"[","\\lbrack",!0),ct(ht,dt,mt,"]","\\rbrack",!0),ct(ut,dt,At,"]","\\rbrack",!0),ct(ht,dt,xt,"(","\\lparen",!0),ct(ht,dt,mt,")","\\rparen",!0),ct(ut,dt,At,"<","\\textless",!0),ct(ut,dt,At,">","\\textgreater",!0),ct(ht,dt,xt,"⌊","\\lfloor",!0),ct(ht,dt,mt,"⌋","\\rfloor",!0),ct(ht,dt,xt,"⌈","\\lceil",!0),ct(ht,dt,mt,"⌉","\\rceil",!0),ct(ht,dt,At,"\\","\\backslash"),ct(ht,dt,At,"∣","|"),ct(ht,dt,At,"∣","\\vert"),ct(ut,dt,At,"|","\\textbar",!0),ct(ht,dt,At,"∥","\\|"),ct(ht,dt,At,"∥","\\Vert"),ct(ut,dt,At,"∥","\\textbardbl"),ct(ut,dt,At,"~","\\textasciitilde"),ct(ut,dt,At,"\\","\\textbackslash"),ct(ut,dt,At,"^","\\textasciicircum"),ct(ht,dt,Tt,"↑","\\uparrow",!0),ct(ht,dt,Tt,"⇑","\\Uparrow",!0),ct(ht,dt,Tt,"↓","\\downarrow",!0),ct(ht,dt,Tt,"⇓","\\Downarrow",!0),ct(ht,dt,Tt,"↕","\\updownarrow",!0),ct(ht,dt,Tt,"⇕","\\Updownarrow",!0),ct(ht,dt,bt,"∐","\\coprod"),ct(ht,dt,bt,"⋁","\\bigvee"),ct(ht,dt,bt,"⋀","\\bigwedge"),ct(ht,dt,bt,"⨄","\\biguplus"),ct(ht,dt,bt,"⋂","\\bigcap"),ct(ht,dt,bt,"⋃","\\bigcup"),ct(ht,dt,bt,"∫","\\int"),ct(ht,dt,bt,"∫","\\intop"),ct(ht,dt,bt,"∬","\\iint"),ct(ht,dt,bt,"∭","\\iiint"),ct(ht,dt,bt,"∏","\\prod"),ct(ht,dt,bt,"∑","\\sum"),ct(ht,dt,bt,"⨂","\\bigotimes"),ct(ht,dt,bt,"⨁","\\bigoplus"),ct(ht,dt,bt,"⨀","\\bigodot"),ct(ht,dt,bt,"∮","\\oint"),ct(ht,dt,bt,"∯","\\oiint"),ct(ht,dt,bt,"∰","\\oiiint"),ct(ht,dt,bt,"⨆","\\bigsqcup"),ct(ht,dt,bt,"∫","\\smallint"),ct(ut,dt,yt,"…","\\textellipsis"),ct(ht,dt,yt,"…","\\mathellipsis"),ct(ut,dt,yt,"…","\\ldots",!0),ct(ht,dt,yt,"…","\\ldots",!0),ct(ht,dt,yt,"⋯","\\@cdots",!0),ct(ht,dt,yt,"⋱","\\ddots",!0),ct(ht,dt,At,"⋮","\\varvdots"),ct(ut,dt,At,"⋮","\\varvdots"),ct(ht,dt,ft,"ˊ","\\acute"),ct(ht,dt,ft,"ˋ","\\grave"),ct(ht,dt,ft,"¨","\\ddot"),ct(ht,dt,ft,"~","\\tilde"),ct(ht,dt,ft,"ˉ","\\bar"),ct(ht,dt,ft,"˘","\\breve"),ct(ht,dt,ft,"ˇ","\\check"),ct(ht,dt,ft,"^","\\hat"),ct(ht,dt,ft,"⃗","\\vec"),ct(ht,dt,ft,"˙","\\dot"),ct(ht,dt,ft,"˚","\\mathring"),ct(ht,dt,vt,"","\\@imath"),ct(ht,dt,vt,"","\\@jmath"),ct(ht,dt,At,"ı","ı"),ct(ht,dt,At,"ȷ","ȷ"),ct(ut,dt,At,"ı","\\i",!0),ct(ut,dt,At,"ȷ","\\j",!0),ct(ut,dt,At,"ß","\\ss",!0),ct(ut,dt,At,"æ","\\ae",!0),ct(ut,dt,At,"œ","\\oe",!0),ct(ut,dt,At,"ø","\\o",!0),ct(ut,dt,At,"Æ","\\AE",!0),ct(ut,dt,At,"Œ","\\OE",!0),ct(ut,dt,At,"Ø","\\O",!0),ct(ut,dt,ft,"ˊ","\\'"),ct(ut,dt,ft,"ˋ","\\`"),ct(ut,dt,ft,"ˆ","\\^"),ct(ut,dt,ft,"˜","\\~"),ct(ut,dt,ft,"ˉ","\\="),ct(ut,dt,ft,"˘","\\u"),ct(ut,dt,ft,"˙","\\."),ct(ut,dt,ft,"¸","\\c"),ct(ut,dt,ft,"˚","\\r"),ct(ut,dt,ft,"ˇ","\\v"),ct(ut,dt,ft,"¨",'\\"'),ct(ut,dt,ft,"˝","\\H"),ct(ut,dt,ft,"◯","\\textcircled");var _t={"--":!0,"---":!0,"``":!0,"''":!0};ct(ut,dt,At,"–","--",!0),ct(ut,dt,At,"–","\\textendash"),ct(ut,dt,At,"—","---",!0),ct(ut,dt,At,"—","\\textemdash"),ct(ut,dt,At,"‘","`",!0),ct(ut,dt,At,"‘","\\textquoteleft"),ct(ut,dt,At,"’","'",!0),ct(ut,dt,At,"’","\\textquoteright"),ct(ut,dt,At,"“","``",!0),ct(ut,dt,At,"“","\\textquotedblleft"),ct(ut,dt,At,"”","''",!0),ct(ut,dt,At,"”","\\textquotedblright"),ct(ht,dt,At,"°","\\degree",!0),ct(ut,dt,At,"°","\\degree"),ct(ut,dt,At,"°","\\textdegree",!0),ct(ht,dt,At,"£","\\pounds"),ct(ht,dt,At,"£","\\mathsterling",!0),ct(ut,dt,At,"£","\\pounds"),ct(ut,dt,At,"£","\\textsterling",!0),ct(ht,pt,At,"✠","\\maltese"),ct(ut,pt,At,"✠","\\maltese");for(var Et='0123456789/@."',Ct=0;Ct<14;Ct++){var St=Et.charAt(Ct);ct(ht,dt,At,St,St)}for(var Rt='0123456789!@*()-=+";:?/.,',Lt=0;Lt<25;Lt++){var Dt=Rt.charAt(Lt);ct(ut,dt,At,Dt,Dt)}for(var Nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",It=0;It<52;It++){var Mt=Nt.charAt(It);ct(ht,dt,vt,Mt,Mt),ct(ut,dt,At,Mt,Mt)}ct(ht,pt,At,"C","ℂ"),ct(ut,pt,At,"C","ℂ"),ct(ht,pt,At,"H","ℍ"),ct(ut,pt,At,"H","ℍ"),ct(ht,pt,At,"N","ℕ"),ct(ut,pt,At,"N","ℕ"),ct(ht,pt,At,"P","ℙ"),ct(ut,pt,At,"P","ℙ"),ct(ht,pt,At,"Q","ℚ"),ct(ut,pt,At,"Q","ℚ"),ct(ht,pt,At,"R","ℝ"),ct(ut,pt,At,"R","ℝ"),ct(ht,pt,At,"Z","ℤ"),ct(ut,pt,At,"Z","ℤ"),ct(ht,dt,vt,"h","ℎ"),ct(ut,dt,vt,"h","ℎ");for(var Ot="",Pt=0;Pt<52;Pt++){var $t=Nt.charAt(Pt);ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56320+Pt)),ct(ut,dt,At,$t,Ot),ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56372+Pt)),ct(ut,dt,At,$t,Ot),ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56424+Pt)),ct(ut,dt,At,$t,Ot),ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56580+Pt)),ct(ut,dt,At,$t,Ot),ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56684+Pt)),ct(ut,dt,At,$t,Ot),ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56736+Pt)),ct(ut,dt,At,$t,Ot),ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56788+Pt)),ct(ut,dt,At,$t,Ot),ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56840+Pt)),ct(ut,dt,At,$t,Ot),ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56944+Pt)),ct(ut,dt,At,$t,Ot),Pt<26&&(ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56632+Pt)),ct(ut,dt,At,$t,Ot),ct(ht,dt,vt,$t,Ot=String.fromCharCode(55349,56476+Pt)),ct(ut,dt,At,$t,Ot))}ct(ht,dt,vt,"k",Ot=String.fromCharCode(55349,56668)),ct(ut,dt,At,"k",Ot);for(var Bt=0;Bt<10;Bt++){var Ft=Bt.toString();ct(ht,dt,vt,Ft,Ot=String.fromCharCode(55349,57294+Bt)),ct(ut,dt,At,Ft,Ot),ct(ht,dt,vt,Ft,Ot=String.fromCharCode(55349,57314+Bt)),ct(ut,dt,At,Ft,Ot),ct(ht,dt,vt,Ft,Ot=String.fromCharCode(55349,57324+Bt)),ct(ut,dt,At,Ft,Ot),ct(ht,dt,vt,Ft,Ot=String.fromCharCode(55349,57334+Bt)),ct(ut,dt,At,Ft,Ot)}for(var zt="ÐÞþ",Kt=0;Kt<3;Kt++){var qt=zt.charAt(Kt);ct(ht,dt,vt,qt,qt),ct(ut,dt,At,qt,qt)}var Ut=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],jt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Gt=function(t,e,r){return lt[r][t]&<[r][t].replace&&(t=lt[r][t].replace),{value:t,metrics:O(t,e,r)}},Yt=function(t,e,r,n,i){var a,s=Gt(t,e,r),o=s.metrics;if(t=s.value,o){var l=o.italic;("text"===r||n&&"mathit"===n.font)&&(l=0),a=new et(t,o.height,o.depth,l,o.skew,o.width,i)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+r+"'"),a=new et(t,0,0,0,0,0,i);if(n){a.maxFontSize=n.sizeMultiplier,n.style.isTight()&&a.classes.push("mtight");var c=n.getColor();c&&(a.style.color=c)}return a},Wt=function(t,e,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Gt(t,"Main-Bold",e).metrics?Yt(t,"Main-Bold",e,r,n.concat(["mathbf"])):"\\"===t||"main"===lt[e][t].font?Yt(t,"Main-Regular",e,r,n):Yt(t,"AMS-Regular",e,r,n.concat(["amsrm"]))},Ht=function(t,e,r){var n=t.mode,i=t.text,s=["mord"],o="math"===n||"text"===n&&e.font,l=o?e.font:e.fontFamily,c="",h="";if(55349===i.charCodeAt(0)&&([c,h]=function(t,e){var r=1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536,n="math"===e?0:1;if(119808<=r&&r<120484){var i=Math.floor((r-119808)/26);return[Ut[i][2],Ut[i][n]]}if(120782<=r&&r<=120831){var s=Math.floor((r-120782)/10);return[jt[s][2],jt[s][n]]}if(120485===r||120486===r)return[Ut[0][2],Ut[0][n]];if(1204860)return Yt(i,c,n,e,s.concat(h));if(l){var u,d;if("boldsymbol"===l){var p=function(t,e,r,n,i){return"textord"!==i&&Gt(t,"Math-BoldItalic",e).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,n,0,0,r);u=p.fontName,d=[p.fontClass]}else o?(u=se[l].fontName,d=[l]):(u=ae(l,e.fontWeight,e.fontShape),d=[l,e.fontWeight,e.fontShape]);if(Gt(i,u,n).metrics)return Yt(i,u,n,e,s.concat(d));if(_t.hasOwnProperty(i)&&"Typewriter"===u.slice(0,10)){for(var f=[],g=0;g{if(Y(t.classes)!==Y(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize||0!==t.italic&&t.hasClass("mathnormal"))return!1;if(1===t.classes.length){var r=t.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},Xt=t=>{for(var e=0;ee&&(e=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>n&&(n=a.maxFontSize)}t.height=e,t.depth=r,t.maxFontSize=n},Qt=function(t,e,r,n){var i=new Z(t,e,r,n);return Zt(i),i},Jt=(t,e,r,n)=>new Z(t,e,r,n),te=function(t,e,r){var n=Qt([t],[],e);return n.height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),n.style.borderBottomWidth=G(n.height),n.maxFontSize=1,n},ee=function(t){var e=new D(t);return Zt(e),e},re=function(t,e){return t instanceof D?Qt([],[t],e):t},ne=function(t,e){for(var{children:r,depth:n}=function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],n=-e[0].shift-e[0].elem.depth,i=n,a=1;a{var r=Qt(["mspace"],[],e),n=j(t,e);return r.style.marginRight=G(n),r},ae=function(t,e,r){var n="";switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return n+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},se={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},oe={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},le=function(t,e){var[r,n,i]=oe[t],a=new nt(r),s=new rt([a],{width:G(n),height:G(i),style:"width:"+G(n),viewBox:"0 0 "+1e3*n+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),o=Jt(["overlay"],[s],e);return o.height=i,o.style.height=G(i),o.style.width=G(n),o},ce={number:3,unit:"mu"},he={number:4,unit:"mu"},ue={number:5,unit:"mu"},de={mord:{mop:ce,mbin:he,mrel:ue,minner:ce},mop:{mord:ce,mop:ce,mrel:ue,minner:ce},mbin:{mord:he,mop:he,mopen:he,minner:he},mrel:{mord:ue,mop:ue,mopen:ue,minner:ue},mopen:{},mclose:{mop:ce,mbin:he,mrel:ue,minner:ce},mpunct:{mord:ce,mop:ce,mrel:ue,mopen:ce,mclose:ce,mpunct:ce,minner:ce},minner:{mord:ce,mop:ce,mbin:he,mrel:ue,mopen:ce,mpunct:ce,minner:ce}},pe={mord:{mop:ce},mop:{mord:ce,mop:ce},mbin:{},mrel:{},mopen:{},mclose:{mop:ce},mpunct:{},minner:{mop:ce}},fe={},ge={},me={};function ye(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l{var r=e.classes[0],n=t.classes[0];"mbin"===r&&Te.has(n)?e.classes[0]="mord":"mbin"===n&&we.has(r)&&(t.classes[0]="mord")},{node:h},u,d),Ee(i,(t,e)=>{var r=Re(e),n=Re(t),i=r&&n?t.hasClass("mtight")?pe[r][n]:de[r][n]:null;if(i)return ie(i,l)},{node:h},u,d),i},Ee=function t(e,r,n,i,a){i&&e.push(i);for(var s=0;sr=>{e.splice(t+1,0,r),s++})(s)}}i&&e.pop()},Ce=function(t){return t instanceof D||t instanceof Q||t instanceof Z&&t.hasClass("enclosing")?t:null},Se=function t(e,r){var n=Ce(e);if(n){var i=n.children;if(i.length){if("right"===r)return t(i[i.length-1],"right");if("left"===r)return t(i[0],"left")}}return e},Re=function(t,e){return t?(e&&(t=Se(t,e)),Ae[t.classes[0]]||null):null},Le=function(t,e){var r=["nulldelimiter"].concat(t.baseSizingClasses());return Qt(e.concat(r))},De=function(t,e,r){if(!t)return Qt();if(ge[t.type]){var n=ge[t.type](t,e);if(r&&e.size!==r.size){n=Qt(e.sizingClasses(r),[n],e);var i=e.sizeMultiplier/r.sizeMultiplier;n.height*=i,n.depth*=i}return n}throw new a("Got group of unknown type: '"+t.type+"'")};function Ne(t,e){var r=Qt(["base"],t,e),n=Qt(["strut"]);return n.style.height=G(r.height+r.depth),r.depth&&(n.style.verticalAlign=G(-r.depth)),r.children.unshift(n),r}function Ie(t,e){var r=null;1===t.length&&"tag"===t[0].type&&(r=t[0].tag,t=t[0].body);var n,i=_e(t,e,"root");2===i.length&&i[1].hasClass("tag")&&(n=i.pop());for(var a,s=[],o=[],l=0;l0&&(s.push(Ne(o,e)),o=[]),s.push(i[l]));o.length>0&&s.push(Ne(o,e)),r?((a=Ne(_e(r,e,!0))).classes=["tag"],s.push(a)):n&&s.push(n);var h=Qt(["katex-html"],s);if(h.setAttribute("aria-hidden","true"),a){var u=a.children[0];u.style.height=G(h.height+h.depth),h.depth&&(u.style.verticalAlign=G(-h.depth))}return h}function Me(t){return new D(t)}class Oe{constructor(t,e,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=r||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);this.classes.length>0&&(t.className=Y(this.classes));for(var r=0;r0&&(t+=' class ="'+h(Y(this.classes))+'"'),t+=">";for(var r=0;r"}toText(){return this.children.map(t=>t.toText()).join("")}}class Pe{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return h(this.toText())}toText(){return this.text}}class $e{constructor(t){this.width=void 0,this.character=void 0,this.width=t,this.character=t>=.05555&&t<=.05556?" ":t>=.1666&&t<=.1667?" ":t>=.2222&&t<=.2223?" ":t>=.2777&&t<=.2778?"  ":t>=-.05556&&t<=-.05555?" ⁣":t>=-.1667&&t<=-.1666?" ⁣":t>=-.2223&&t<=-.2222?" ⁣":t>=-.2778&&t<=-.2777?" ⁣":null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",G(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Be=new Set(["\\imath","\\jmath"]),Fe=new Set(["mrow","mtable"]),ze=function(t,e,r){return!lt[e][t]||!lt[e][t].replace||55349===t.charCodeAt(0)||_t.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=lt[e][t].replace),new Pe(t)},Ke=function(t){return 1===t.length?t[0]:new Oe("mrow",t)},qe=function(t,e){if("texttt"===e.fontFamily)return"monospace";if("textsf"===e.fontFamily)return"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===e.fontShape&&"textbf"===e.fontWeight)return"bold-italic";if("textit"===e.fontShape)return"italic";if("textbf"===e.fontWeight)return"bold";var r=e.font;if(!r||"mathnormal"===r)return null;var n=t.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===t.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathsfit"===r)return"sans-serif-italic";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var i=t.text;return Be.has(i)?null:(lt[n][i]&<[n][i].replace&&(i=lt[n][i].replace),O(i,se[r].fontName,n)?se[r].variant:null)};function Ue(t){if(!t)return!1;if("mi"===t.type&&1===t.children.length){var e=t.children[0];return e instanceof Pe&&"."===e.text}if("mo"===t.type&&1===t.children.length&&"true"===t.getAttribute("separator")&&"0em"===t.getAttribute("lspace")&&"0em"===t.getAttribute("rspace")){var r=t.children[0];return r instanceof Pe&&","===r.text}return!1}var je=function(t,e,r){if(1===t.length){var n=Ye(t[0],e);return r&&n instanceof Oe&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var i,a=[],s=0;s=1&&("mn"===i.type||Ue(i))){var l=o.children[0];l instanceof Oe&&"mn"===l.type&&(l.children=[...i.children,...l.children],a.pop())}else if("mi"===i.type&&1===i.children.length){var c=i.children[0];if(c instanceof Pe&&"̸"===c.text&&("mo"===o.type||"mi"===o.type||"mn"===o.type)){var h=o.children[0];h instanceof Pe&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(o),i=o}return a},Ge=function(t,e,r){return Ke(je(t,e,r))},Ye=function(t,e){if(!t)return new Oe("mrow");if(me[t.type])return me[t.type](t,e);throw new a("Got group of unknown type: '"+t.type+"'")};function We(t,e,r,n,i){var a,s=je(t,r);a=1===s.length&&s[0]instanceof Oe&&Fe.has(s[0].type)?s[0]:new Oe("mrow",s);var o=new Oe("annotation",[new Pe(e)]);o.setAttribute("encoding","application/x-tex");var l=new Oe("semantics",[a,o]),c=new Oe("math",[l]);return c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block"),Qt([i?"katex":"katex-mathml"],[c])}var He=function(t){return new z({style:t.displayMode?_.DISPLAY:_.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},Ve=function(t,e){if(e.displayMode){var r=["katex-display"];e.leqno&&r.push("leqno"),e.fleqn&&r.push("fleqn"),t=Qt(r,[t])}return t},Xe={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Ze=function(t){var e=new Oe("mo",[new Pe(Xe[t.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},Qe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Je=new Set(["widehat","widecheck","widetilde","utilde"]),tr=function(t,e){var{span:r,minWidth:n,height:i}=function(){var r=4e5,n=t.label.slice(1);if(Je.has(n)){var i,a,s,o=t,l="ordgroup"===o.base.type?o.base.body.length:1;if(l>5)"widehat"===n||"widecheck"===n?(i=420,r=2364,s=.42,a=n+"4"):(i=312,r=2340,s=.34,a="tilde4");else{var c=[1,1,2,2,3,3][l];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][c],i=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],a=n+c):(r=[0,600,1033,2339,2340][c],i=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],a="tilde"+c)}var h=new nt(a),u=new rt([h],{width:"100%",height:G(s),viewBox:"0 0 "+r+" "+i,preserveAspectRatio:"none"});return{span:Jt([],[u],e),minWidth:0,height:s}}var d,p,f=[],g=Qe[n],[m,y,v]=g,b=v/1e3,x=m.length;if(1===x)d=["hide-tail"],p=[g[3]];else if(2===x)d=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");d=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w0&&(r.style.minWidth=G(n)),r};function er(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function rr(t){var e=nr(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function nr(t){return t&&("atom"===t.type||ot.hasOwnProperty(t.type))?t:null}var ir=(t,e)=>{var r,n,i;t&&"supsub"===t.type?(r=(n=er(t.base,"accent")).base,t.base=r,i=function(t){if(t instanceof Z)return t;throw new Error("Expected span but got "+String(t)+".")}(De(t,e)),t.base=n):r=(n=er(t,"accent")).base;var a=De(r,e.havingCrampedStyle()),s=0;if(n.isShifty&&p(r)){var o=u(r);s=at(De(o,e.havingCrampedStyle())).skew}var l,c="\\c"===n.label,h=c?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight);if(n.isStretchy)l=tr(n,e),l=ne({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+G(2*s)+")",marginLeft:G(2*s)}:void 0}]});else{var d,f;"\\vec"===n.label?(d=le("vec",e),f=oe.vec[1]):((d=at(d=Ht({mode:n.mode,text:n.label},e,"textord"))).italic=0,f=d.width,c&&(h+=d.depth)),l=Qt(["accent-body"],[d]);var g="\\textcircled"===n.label;g&&(l.classes.push("accent-full"),h=a.height);var m=s;g||(m-=f/2),l.style.left=G(m),"\\textcircled"===n.label&&(l.style.top=".2em"),l=ne({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:l}]})}var y=Qt(["mord","accent"],[l],e);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},ar=(t,e)=>{var r=t.isStretchy?Ze(t.label):new Oe("mo",[ze(t.label,t.mode)]),n=new Oe("mover",[Ye(t.base,e),r]);return n.setAttribute("accent","true"),n},sr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));ye({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=be(e[0]),n=!sr.test(t.funcName),i=!n||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:ir,mathmlBuilder:ar}),ye({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return"math"===n&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:ir,mathmlBuilder:ar}),ye({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=De(t.base,e),n=tr(t,e),i="\\utilde"===t.label?.12:0,a=ne({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]});return Qt(["mord","accentunder"],[a],e)},mathmlBuilder:(t,e)=>{var r=Ze(t.label),n=new Oe("munder",[Ye(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});var or=t=>{var e=new Oe("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};function lr(t,e){var r=_e(t.body,e,!0);return Qt([t.mclass],r,e)}function cr(t,e){var r,n=je(t.body,e);return"minner"===t.mclass?r=new Oe("mpadded",n):"mord"===t.mclass?t.isCharacterBox?(r=n[0]).type="mi":r=new Oe("mi",n):(t.isCharacterBox?(r=n[0]).type="mo":r=new Oe("mo",n),"mbin"===t.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===t.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===t.mclass||"mclose"===t.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===t.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ye({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r,n=e.style,i=e.havingStyle(n.sup()),a=re(De(t.body,i,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd";a.classes.push(s+"-arrow-pad"),t.below&&(i=e.havingStyle(n.sub()),(r=re(De(t.below,i,e),e)).classes.push(s+"-arrow-pad"));var o,l=tr(t,e),c=-e.fontMetrics().axisHeight+.5*l.height,h=-e.fontMetrics().axisHeight-.5*l.height-.111;if((a.depth>.25||"\\xleftequilibrium"===t.label)&&(h-=a.depth),r){var u=-e.fontMetrics().axisHeight+r.height+.5*l.height+.111;o=ne({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h},{type:"elem",elem:l,shift:c},{type:"elem",elem:r,shift:u}]})}else o=ne({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h},{type:"elem",elem:l,shift:c}]});return o.children[0].children[0].children[1].classes.push("svg-align"),Qt(["mrel","x-arrow"],[o],e)},mathmlBuilder(t,e){var r,n=Ze(t.label);if(n.setAttribute("minsize","x"===t.label.charAt(0)?"1.75em":"3.0em"),t.body){var i=or(Ye(t.body,e));if(t.below){var a=or(Ye(t.below,e));r=new Oe("munderover",[n,a,i])}else r=new Oe("mover",[n,i])}else if(t.below){var s=or(Ye(t.below,e));r=new Oe("munder",[n,s])}else r=or(),r=new Oe("mover",[n,r]);return r}}),ye({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:xe(i),isCharacterBox:p(i)}},htmlBuilder:lr,mathmlBuilder:cr});var hr=t=>{var e="ordgroup"===t.type&&t.body.length?t.body[0]:t;return"atom"!==e.type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family};ye({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:hr(e[0]),body:xe(e[1]),isCharacterBox:p(e[1])}}}),ye({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var r,{parser:n,funcName:i}=t,a=e[1],s=e[0];r="\\stackrel"!==i?hr(a):"mrel";var o={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:xe(a)},l={type:"supsub",mode:s.mode,base:o,sup:"\\underset"===i?null:s,sub:"\\underset"===i?s:null};return{type:"mclass",mode:n.mode,mclass:r,body:[l],isCharacterBox:p(l)}},htmlBuilder:lr,mathmlBuilder:cr}),ye({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:hr(e[0]),body:xe(e[0])}},htmlBuilder(t,e){var r=_e(t.body,e,!0),n=Qt([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=je(t.body,e),n=new Oe("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var ur={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},dr=()=>({type:"styling",body:[],mode:"math",style:"display"}),pr=t=>"textord"===t.type&&"@"===t.text,fr=(t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e;function gr(t,e,r){var n=ur[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:n,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[e[0]],[]),r.callFunction("\\Big",[i],[]),r.callFunction("\\\\cdright",[e[1]],[])]};return r.callFunction("\\\\cdparent",[a],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}ye({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=re(De(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=G(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new Oe("mrow",[Ye(t.label,e)]);return(r=new Oe("mpadded",[r])).setAttribute("width","0"),"left"===t.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Oe("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),ye({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=re(De(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(t,e)=>new Oe("mrow",[Ye(t.fragment,e)])}),ye({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=er(e[0],"ordgroup").body,i="",s=0;s=1114111)throw new a("\\@char with invalid code point "+i);return l<=65535?o=String.fromCharCode(l):(l-=65536,o=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:o}}});var mr=(t,e)=>{var r=_e(t.body,e.withColor(t.color),!1);return ee(r)},yr=(t,e)=>{var r=je(t.body,e.withColor(t.color)),n=new Oe("mstyle",r);return n.setAttribute("mathcolor",t.color),n};ye({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=er(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:xe(i)}},htmlBuilder:mr,mathmlBuilder:yr}),ye({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=er(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:mr,mathmlBuilder:yr}),ye({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i="["===n.gullet.future().text?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&er(i,"size").value}},htmlBuilder(t,e){var r=Qt(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=G(j(t.size,e)))),r},mathmlBuilder(t,e){var r=new Oe("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",G(j(t.size,e)))),r}});var vr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},br=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new a("Expected a control sequence",t);return e},xr=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};ye({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(vr[n.text])return"\\global"!==r&&"\\\\globallong"!==r||(n.text=vr[n.text]),er(e.parseFunction(),"internal");throw new a("Invalid token after macro prefix",n)}}),ye({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new a("Expected a control sequence",n);for(var s,o=0,l=[[]];"{"!==e.gullet.future().text;)if("#"===(n=e.gullet.popToken()).text){if("{"===e.gullet.future().text){s=e.gullet.future(),l[o].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new a('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new a('Argument number "'+n.text+'" out of order');o++,l.push([])}else{if("EOF"===n.text)throw new a("Expected a macro definition");l[o].push(n.text)}var{tokens:c}=e.gullet.consumeArg();return s&&c.unshift(s),"\\edef"!==r&&"\\xdef"!==r||(c=e.gullet.expandTokens(c)).reverse(),e.gullet.macros.set(i,{tokens:c,numArgs:o,delimiters:l},r===vr[r]),{type:"internal",mode:e.mode}}}),ye({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=br(e.gullet.popToken());e.gullet.consumeSpaces();var i=(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text&&(e=t.gullet.popToken()),e})(e);return xr(e,n,i,"\\\\globallet"===r),{type:"internal",mode:e.mode}}}),ye({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=br(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return xr(e,n,a,"\\\\globalfuture"===r),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var wr=function(t,e,r){var n=O(lt.math[t]&<.math[t].replace||t,e,r);if(!n)throw new Error("Unsupported symbol "+t+" and font size "+e+".");return n},Tr=function(t,e,r,n){var i=r.havingBaseStyle(e),a=Qt(n.concat(i.sizingClasses(r)),[t],r),s=i.sizeMultiplier/r.sizeMultiplier;return a.height*=s,a.depth*=s,a.maxFontSize=i.sizeMultiplier,a},kr=function(t,e,r){var n=e.havingBaseStyle(r),i=(1-e.sizeMultiplier/n.sizeMultiplier)*e.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=G(i),t.height-=i,t.depth+=i},Ar=function(t,e,r,n,i,a){var s=function(t,e,r,n){return Yt(t,"Size"+e+"-Regular",r,n)}(t,e,i,n),o=Tr(Qt(["delimsizing","size"+e],[s],n),_.TEXT,n,a);return r&&kr(o,n,_.TEXT),o},_r=function(t,e,r){return{type:"elem",elem:Qt(["delimsizinginner","Size1-Regular"===e?"delim-size1":"delim-size4"],[Qt([],[Yt(t,e,r)])])}},Er=function(t,e,r){var n=N["Size4-Regular"][t.charCodeAt(0)]?N["Size4-Regular"][t.charCodeAt(0)][4]:N["Size1-Regular"][t.charCodeAt(0)][4],i=new nt("inner",function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}}(t,Math.round(1e3*e))),a=new rt([i],{width:G(n),height:G(e),style:"width:"+G(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),s=Jt([],[a],r);return s.height=e,s.style.height=G(e),s.style.width=G(n),{type:"elem",elem:s}},Cr={type:"kern",size:-.008},Sr=new Set(["|","\\lvert","\\rvert","\\vert"]),Rr=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Lr=function(t,e,r,n,i,a){var s,o,l,c,h="",u=0;s=l=c=t,o=null;var d="Size1-Regular";"\\uparrow"===t?l=c="⏐":"\\Uparrow"===t?l=c="‖":"\\downarrow"===t?s=l="⏐":"\\Downarrow"===t?s=l="‖":"\\updownarrow"===t?(s="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===t?(s="\\Uparrow",l="‖",c="\\Downarrow"):Sr.has(t)?(l="∣",h="vert",u=333):Rr.has(t)?(l="∥",h="doublevert",u=556):"["===t||"\\lbrack"===t?(s="⎡",l="⎢",c="⎣",d="Size4-Regular",h="lbrack",u=667):"]"===t||"\\rbrack"===t?(s="⎤",l="⎥",c="⎦",d="Size4-Regular",h="rbrack",u=667):"\\lfloor"===t||"⌊"===t?(l=s="⎢",c="⎣",d="Size4-Regular",h="lfloor",u=667):"\\lceil"===t||"⌈"===t?(s="⎡",l=c="⎢",d="Size4-Regular",h="lceil",u=667):"\\rfloor"===t||"⌋"===t?(l=s="⎥",c="⎦",d="Size4-Regular",h="rfloor",u=667):"\\rceil"===t||"⌉"===t?(s="⎤",l=c="⎥",d="Size4-Regular",h="rceil",u=667):"("===t||"\\lparen"===t?(s="⎛",l="⎜",c="⎝",d="Size4-Regular",h="lparen",u=875):")"===t||"\\rparen"===t?(s="⎞",l="⎟",c="⎠",d="Size4-Regular",h="rparen",u=875):"\\{"===t||"\\lbrace"===t?(s="⎧",o="⎨",c="⎩",l="⎪",d="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(s="⎫",o="⎬",c="⎭",l="⎪",d="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(s="⎧",c="⎩",l="⎪",d="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(s="⎫",c="⎭",l="⎪",d="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(s="⎧",c="⎭",l="⎪",d="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(s="⎫",c="⎩",l="⎪",d="Size4-Regular");var p=wr(s,d,i),f=p.height+p.depth,g=wr(l,d,i),m=g.height+g.depth,y=wr(c,d,i),v=y.height+y.depth,b=0,x=1;if(null!==o){var w=wr(o,d,i);b=w.height+w.depth,x=2}var T=f+v+b,k=T+Math.max(0,Math.ceil((e-T)/(x*m)))*x*m,A=n.fontMetrics().axisHeight;r&&(A*=n.sizeMultiplier);var E=k/2-A,C=[];if(h.length>0){var S=k-f-v,R=Math.round(1e3*k),L=function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+e+" v585 h43z\nM367 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+" v602 h84z\nM403 1759 V0 H319 V1759 v"+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+e+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(e+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(e+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(e+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(e+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(h,Math.round(1e3*S)),D=new nt(h,L),N=(u/1e3).toFixed(3)+"em",I=(R/1e3).toFixed(3)+"em",M=new rt([D],{width:N,height:I,viewBox:"0 0 "+u+" "+R}),O=Jt([],[M],n);O.height=R/1e3,O.style.width=N,O.style.height=I,C.push({type:"elem",elem:O})}else{if(C.push(_r(c,d,i)),C.push(Cr),null===o){var P=k-f-v+.016;C.push(Er(l,P,n))}else{var $=(k-f-v-b)/2+.016;C.push(Er(l,$,n)),C.push(Cr),C.push(_r(o,d,i)),C.push(Cr),C.push(Er(l,$,n))}C.push(Cr),C.push(_r(s,d,i))}var B=n.havingBaseStyle(_.TEXT),F=ne({positionType:"bottom",positionData:E,children:C});return Tr(Qt(["delimsizing","mult"],[F],B),_.TEXT,n,a)},Dr=.08,Nr=function(t,e,r,n,i){var a=function(t,e,r){e*=1e3;var n="";switch(t){case"sqrtMain":n=function(t,e){return"M95,"+(622+t+e)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+t/2.075+" -"+t+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+t)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,R);break;case"sqrtSize1":n=function(t,e){return"M263,"+(601+t+e)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+t/2.084+" -"+t+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+t)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,R);break;case"sqrtSize2":n=function(t,e){return"M983 "+(10+t+e)+"\nl"+t/3.13+" -"+t+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+t)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,R);break;case"sqrtSize3":n=function(t,e){return"M424,"+(2398+t+e)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+t/4.223+" -"+t+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+t)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+t)+" "+e+"\nh400000v"+(40+t)+"h-400000z"}(e,R);break;case"sqrtSize4":n=function(t,e){return"M473,"+(2713+t+e)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+t/5.298+" -"+t+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+t)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"}(e,R);break;case"sqrtTall":n=function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+"\nH742v"+(r-54-e-t)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+e+"H400000v"+(40+t)+"H742z"}(e,R,r)}return n}(t,n,r),s=new nt(t,a),o=new rt([s],{width:"400em",height:G(e),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Jt(["hide-tail"],[o],i)},Ir=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Mr=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),Or=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Pr=[0,1.2,1.8,2.4,3],$r=function(t,e,r,n,i){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),Ir.has(t)||Or.has(t))return Ar(t,e,!1,r,n,i);if(Mr.has(t))return Lr(t,Pr[e],!1,r,n,i);throw new a("Illegal delimiter: '"+t+"'")},Br=[{type:"small",style:_.SCRIPTSCRIPT},{type:"small",style:_.SCRIPT},{type:"small",style:_.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Fr=[{type:"small",style:_.SCRIPTSCRIPT},{type:"small",style:_.SCRIPT},{type:"small",style:_.TEXT},{type:"stack"}],zr=[{type:"small",style:_.SCRIPTSCRIPT},{type:"small",style:_.SCRIPT},{type:"small",style:_.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Kr=function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},qr=function(t,e,r,n){for(var i=Math.min(2,3-n.style.size);ie)return r[i]}return r[r.length-1]},Ur=function(t,e,r,n,i,a){var s;"<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),s=Or.has(t)?Br:Ir.has(t)?zr:Fr;var o=qr(t,e,s,n);return"small"===o.type?function(t,e,r,n,i,a){var s=Yt(t,"Main-Regular",i,n),o=Tr(s,e,n,a);return r&&kr(o,n,e),o}(t,o.style,r,n,i,a):"large"===o.type?Ar(t,o.size,r,n,i,a):Lr(t,e,r,n,i,a)},jr=function(t,e,r,n,i,a){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,o=5/n.fontMetrics().ptPerEm,l=Math.max(e-s,r+s),c=Math.max(l/500*901,2*l-o);return Ur(t,c,!0,n,i,a)},Gr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Yr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function Wr(t,e){var r=nr(t);if(r&&Yr.has(r.text))return r;throw new a(r?"Invalid delimiter '"+r.text+"' after '"+e.funcName+"'":"Invalid delimiter type '"+t.type+"'",t)}function Hr(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ye({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var r=Wr(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:Gr[t.funcName].size,mclass:Gr[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>"."===t.delim?Qt([t.mclass]):$r(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];"."!==t.delim&&e.push(ze(t.delim,t.mode));var r=new Oe("mo",e);"mopen"===t.mclass||"mclose"===t.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=G(Pr[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),ye({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Wr(e[0],t).text,color:r}}}),ye({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=Wr(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=er(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,e)=>{Hr(t);for(var r,n,i=_e(t.body,e,!0,["mopen","mclose"]),a=0,s=0,o=!1,l=0;l{Hr(t);var r=je(t.body,e);if("."!==t.left){var n=new Oe("mo",[ze(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if("."!==t.right){var i=new Oe("mo",[ze(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return Ke(r)}}),ye({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=Wr(e[0],t);if(!t.parser.leftrightDepth)throw new a("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if("."===t.delim)r=Le(e,[]);else{r=$r(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r="\\vert"===t.delim||"|"===t.delim?ze("|","text"):ze(t.delim,t.mode),n=new Oe("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Vr=(t,e)=>{var r,n,i,a=re(De(t.body,e),e),s=t.label.slice(1),o=e.sizeMultiplier,l=0,c=p(t.body);if("sout"===s)(r=Qt(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/o,l=-.5*e.fontMetrics().xHeight;else if("phase"===s){var h=j({number:.6,unit:"pt"},e),u=j({number:.35,unit:"ex"},e);o/=e.havingBaseSizing().sizeMultiplier;var d=a.height+a.depth+h+u;a.style.paddingLeft=G(d/2+h);var f=Math.floor(1e3*d*o),g="M400000 "+(n=f)+" H0 L"+n/2+" 0 l65 45 L145 "+(n-80)+" H400000z",m=new rt([new nt("phase",g)],{width:"400em",height:G(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});(r=Jt(["hide-tail"],[m],e)).style.height=G(d),l=a.depth+h+u}else{/cancel/.test(s)?c||a.classes.push("cancel-pad"):"angl"===s?a.classes.push("anglpad"):a.classes.push("boxpad");var y=0,v=0,b=0;/box/.test(s)?(b=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),v=y=e.fontMetrics().fboxsep+("colorbox"===s?0:b)):"angl"===s?(y=4*(b=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),v=Math.max(0,.25-a.depth)):v=y=c?.2:0,r=function(t,e,r,n,i){var a,s=t.height+t.depth+r+n;if(/fbox|color|angl/.test(e)){if(a=Qt(["stretchy",e],[],i),"fbox"===e){var o=i.color&&i.getColor();o&&(a.style.borderColor=o)}}else{var l=[];/^[bx]cancel$/.test(e)&&l.push(new it({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&l.push(new it({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new rt(l,{width:"100%",height:G(s)});a=Jt([],[c],i)}return a.height=s,a.style.height=G(s),a}(a,s,y,v,e),/fbox|boxed|fcolorbox/.test(s)?(r.style.borderStyle="solid",r.style.borderWidth=G(b)):"angl"===s&&.049!==b&&(r.style.borderTopWidth=G(b),r.style.borderRightWidth=G(b)),l=a.depth+v,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor&&(r.style.borderColor=t.borderColor))}if(t.backgroundColor)i=ne({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:a,shift:0}]});else{var x=/cancel|phase/.test(s)?["svg-align"]:[];i=ne({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:r,shift:l,wrapperClasses:x}]})}return/cancel/.test(s)&&(i.height=a.height,i.depth=a.depth),/cancel/.test(s)&&!c?Qt(["mord","cancel-lap"],[i],e):Qt(["mord"],[i],e)},Xr=(t,e)=>{var r=0,n=new Oe(t.label.includes("colorbox")?"mpadded":"menclose",[Ye(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===t.label){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};ye({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=er(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:Vr,mathmlBuilder:Xr}),ye({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=er(e[0],"color-token").color,s=er(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:Vr,mathmlBuilder:Xr}),ye({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}}),ye({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:Vr,mathmlBuilder:Xr}),ye({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var Zr={};function Qr(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{if(!t.parser.settings.displayMode)throw new a("{"+t.envName+"} can be used only in display mode.")},nn=new Set(["gather","gather*"]);function an(t){if(!t.includes("ed"))return!t.includes("*")}function sn(t,e,r){var{hskipBeforeAndAfter:n,addJot:s,cols:o,arraystretch:l,colSeparationType:c,autoTag:h,singleRow:u,emptySingleRow:d,maxNumCols:p,leqno:f}=e;if(t.gullet.beginGroup(),u||t.gullet.macros.set("\\cr","\\\\\\relax"),!l){var g=t.gullet.expandMacroAsText("\\arraystretch");if(null==g)l=1;else if(!(l=parseFloat(g))||l<0)throw new a("Invalid \\arraystretch: "+g)}t.gullet.beginGroup();var m=[],y=[m],v=[],b=[],x=null!=h?[]:void 0;function w(){h&&t.gullet.macros.set("\\@eqnsw","1",!0)}function T(){x&&(t.gullet.macros.get("\\df@tag")?(x.push(t.subparse([new i("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):x.push(Boolean(h)&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(w(),b.push(en(t));;){var k=t.parseExpression(!1,u?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),k={type:"ordgroup",mode:t.mode,body:k},r&&(k={type:"styling",mode:t.mode,style:r,body:[k]}),m.push(k);var A=t.fetch().text;if("&"===A){if(p&&m.length===p){if(u||c)throw new a("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===A){T(),1===m.length&&"styling"===k.type&&0===k.body[0].body.length&&(y.length>1||!d)&&y.pop(),b.length0&&(v+=.25),c.push({pos:v,isDashed:t[e]})}for(b(s[0]),r=0;r0&&(T<(C+=y)&&(T=C),C=0),t.addJot&&(T+=f),k.height=w,k.depth=T,v+=w,k.pos=v,v+=T+C,l[r]=k,b(s[r+1])}var S,R,L=v/2+e.fontMetrics().axisHeight,D=t.cols||[],N=[],I=[];if(t.tags&&t.tags.some(t=>t))for(r=0;r=o)){var U,Y=void 0;if(n>0||t.hskipBeforeAndAfter)0!==(Y=null!=(U=B.pregap)?U:d)&&((S=Qt(["arraycolsep"],[])).style.width=G(Y),N.push(S));var W,H=[];for(r=0;r0){for(var Q=te("hline",e,h),J=te("hdashline",e,h),tt=[{type:"elem",elem:l,shift:0}];c.length>0;){var et=c.pop(),rt=et.pos-L;et.isDashed?tt.push({type:"elem",elem:J,shift:rt}):tt.push({type:"elem",elem:Q,shift:rt})}l=ne({positionType:"individualShift",children:tt})}if(0===I.length)return Qt(["mord"],[l],e);var nt=ne({positionType:"individualShift",children:I});return nt=Qt(["tag"],[nt],e),ee([l,nt])},cn={c:"center ",l:"left ",r:"right "},hn=function(t,e){for(var r=[],n=new Oe("mtd",[],["mtr-glue"]),i=new Oe("mtd",[],["mml-eqn-num"]),a=0;a0){var p=t.cols,f="",g=!1,m=0,y=p.length;"separator"===p[0].type&&(u+="top ",m=1),"separator"===p[p.length-1].type&&(u+="bottom ",y-=1);for(var v=m;v0?"left ":"",u+=k[k.length-1].length>0?"right ":"";for(var A=1;A0&&d&&(g=1),n[p]={type:"align",align:f,pregap:g,postgap:0}}return o.colSeparationType=d?"align":"alignat",o};Qr({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=(nr(e[0])?[e[0]]:er(e[0],"ordgroup").body).map(function(t){var e=rr(t).text;if("lcr".includes(e))return{type:"align",align:e};if("|"===e)return{type:"separator",separator:"|"};if(":"===e)return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+e,t)}),n={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return sn(t.parser,n,on(t.envName))},htmlBuilder:ln,mathmlBuilder:hn}),Qr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===t.envName.charAt(t.envName.length-1)){var i=t.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,!"lcr".includes(r))throw new a("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var s=sn(t.parser,n,on(t.envName)),o=Math.max(0,...s.body.map(t=>t.length));return s.cols=new Array(o).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:ln,mathmlBuilder:hn}),Qr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e=sn(t.parser,{arraystretch:.5},"script");return e.colSeparationType="small",e},htmlBuilder:ln,mathmlBuilder:hn}),Qr({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=(nr(e[0])?[e[0]]:er(e[0],"ordgroup").body).map(function(t){var e=rr(t).text;if("lc".includes(e))return{type:"align",align:e};throw new a("Unknown column alignment: "+e,t)});if(r.length>1)throw new a("{subarray} can contain only one column");var n={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((n=sn(t.parser,n,"script")).body.length>0&&n.body[0].length>1)throw new a("{subarray} can contain only one column");return n},htmlBuilder:ln,mathmlBuilder:hn}),Qr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e=sn(t.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},on(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:t.envName.includes("r")?".":"\\{",right:t.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ln,mathmlBuilder:hn}),Qr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:un,htmlBuilder:ln,mathmlBuilder:hn}),Qr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){nn.has(t.envName)&&rn(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:an(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return sn(t.parser,e,"display")},htmlBuilder:ln,mathmlBuilder:hn}),Qr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:un,htmlBuilder:ln,mathmlBuilder:hn}),Qr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){rn(t);var e={autoTag:an(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return sn(t.parser,e,"display")},htmlBuilder:ln,mathmlBuilder:hn}),Qr({type:"array",names:["CD"],props:{numArgs:0},handler:t=>(rn(t),function(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===e[e.length-1].length&&e.pop();break}throw new a("Expected \\\\ or \\cr or \\end",t.nextToken)}t.consume()}for(var n=[],i=[n],s=0;sAV".includes(h))throw new a('Expected one of "<>AV=|." after @',o[c]);for(var d=0;d<2;d++){for(var p=!0,f=c+1;f{var r=t.font,n=e.withFont(r);return De(t.body,n)},fn=(t,e)=>{var r=t.font,n=e.withFont(r);return Ye(t.body,n)},gn={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ye({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=be(e[0]),a=n;return a in gn&&(a=gn[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:pn,mathmlBuilder:fn}),ye({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"mclass",mode:r.mode,mclass:hr(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:p(n)}}}),ye({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,s=r.parseExpression(!0,i);return{type:"font",mode:a,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:pn,mathmlBuilder:fn});var mn=(t,e)=>e?{type:"styling",mode:t.mode,style:e,body:[t]}:t;ye({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var r,{parser:n,funcName:i}=t,a=e[0],s=e[1],o=null,l=null;switch(i){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,o="(",l=")";break;case"\\\\bracefrac":r=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var c="\\cfrac"===i,h=null;return c||i.startsWith("\\d")?h="display":i.startsWith("\\t")&&(h="text"),mn({type:"genfrac",mode:n.mode,numer:a,denom:s,continued:c,hasBarLine:r,leftDelim:o,rightDelim:l,barSize:null},h)},htmlBuilder:(t,e)=>{var r,n=e.style,i=n.fracNum(),a=n.fracDen();r=e.havingStyle(i);var s=De(t.numer,r,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height0?3*u:7*u,f=e.fontMetrics().denom1):(h>0?(d=e.fontMetrics().num2,p=u):(d=e.fontMetrics().num3,p=3*u),f=e.fontMetrics().denom2),c){var x=e.fontMetrics().axisHeight;d-s.depth-(x+.5*h){var r=new Oe("mfrac",[Ye(t.numer,e),Ye(t.denom,e)]);if(t.hasBarLine){if(t.barSize){var n=j(t.barSize,e);r.setAttribute("linethickness",G(n))}}else r.setAttribute("linethickness","0px");if(null!=t.leftDelim||null!=t.rightDelim){var i=[];if(null!=t.leftDelim){var a=new Oe("mo",[new Pe(t.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),i.push(a)}if(i.push(r),null!=t.rightDelim){var s=new Oe("mo",[new Pe(t.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}return Ke(i)}return r}}),ye({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:r,funcName:n,token:i}=t;switch(n){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:e,token:i}}});var yn=["display","text","script","scriptscript"],vn=function(t){var e=null;return t.length>0&&(e="."===(e=t)?null:e),e};ye({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var r,{parser:n}=t,i=e[4],a=e[5],s=be(e[0]),o="atom"===s.type&&"open"===s.family?vn(s.text):null,l=be(e[1]),c="atom"===l.type&&"close"===l.family?vn(l.text):null,h=er(e[2],"size"),u=null;r=!!h.isBlank||(u=h.value).number>0;var d=null,p=e[3];if("ordgroup"===p.type){if(p.body.length>0){var f=er(p.body[0],"textord");d=yn[Number(f.text)]}}else p=er(p,"textord"),d=yn[Number(p.text)];return mn({type:"genfrac",mode:n.mode,numer:i,denom:a,continued:!1,hasBarLine:r,barSize:u,leftDelim:o,rightDelim:c},d)}}),ye({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:er(e[0],"size").value,token:i}}}),ye({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=er(e[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var s=e[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null}}});var bn=(t,e)=>{var r,n,i=e.style;"supsub"===t.type?(r=t.sup?De(t.sup,e.havingStyle(i.sup()),e):De(t.sub,e.havingStyle(i.sub()),e),n=er(t.base,"horizBrace")):n=er(t,"horizBrace");var a,s=De(n.base,e.havingBaseStyle(_.DISPLAY)),o=tr(n,e);if(n.isOver?(a=ne({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]})).children[0].children[0].children[1].classes.push("svg-align"):(a=ne({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]})).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Qt(["mord",n.isOver?"mover":"munder"],[a],e);a=n.isOver?ne({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):ne({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Qt(["mord",n.isOver?"mover":"munder"],[a],e)};ye({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:bn,mathmlBuilder:(t,e)=>{var r=Ze(t.label);return new Oe(t.isOver?"mover":"munder",[Ye(t.base,e),r])}}),ye({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=er(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:xe(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=_e(t.body,e,!1);return function(t,e,r,n){var i=new Q(t,e,r,n);return Zt(i),i}(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=Ge(t.body,e);return r instanceof Oe||(r=new Oe("mrow",[r])),r.setAttribute("href",t.href),r}}),ye({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=er(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;anew Oe("mrow",je(t.body,e))}),ye({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var r,{parser:n,funcName:i,token:s}=t,o=er(e[0],"raw").string,l=e[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c={};switch(i){case"\\htmlClass":c.class=o,r={command:"\\htmlClass",class:o};break;case"\\htmlId":c.id=o,r={command:"\\htmlId",id:o};break;case"\\htmlStyle":c.style=o,r={command:"\\htmlStyle",style:o};break;case"\\htmlData":for(var h=o.split(","),u=0;u{var r=_e(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=Qt(n,r,e);for(var a in t.attributes)"class"!==a&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,e)=>Ge(t.body,e)}),ye({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:xe(e[0]),mathml:xe(e[1])}},htmlBuilder:(t,e)=>{var r=_e(t.html,e,!1);return ee(r)},mathmlBuilder:(t,e)=>Ge(t.mathml,e)});var xn=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new a("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(e[1]+e[2]),unit:e[3]};if(!U(r))throw new a("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ye({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(r[0])for(var c=er(r[0],"raw").string.split(","),h=0;h{var r=j(t.height,e),n=0;t.totalheight.number>0&&(n=j(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=j(t.width,e));var a={height:G(r+n)};i>0&&(a.width=G(i)),n>0&&(a.verticalAlign=G(-n));var s=new J(t.src,t.alt,a);return s.height=r,s.depth=n,s},mathmlBuilder:(t,e)=>{var r=new Oe("mglyph",[]);r.setAttribute("alt",t.alt);var n=j(t.height,e),i=0;if(t.totalheight.number>0&&(i=j(t.totalheight,e)-n,r.setAttribute("valign",G(-i))),r.setAttribute("height",G(n+i)),t.width.number>0){var a=j(t.width,e);r.setAttribute("width",G(a))}return r.setAttribute("src",t.src),r}}),ye({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=er(e[0],"size");if(r.settings.strict){var a="m"===n[1],s="mu"===i.value.unit;a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+i.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder:(t,e)=>ie(t.dimension,e),mathmlBuilder(t,e){var r=j(t.dimension,e);return new $e(r)}}),ye({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;"clap"===t.alignment?(r=Qt([],[De(t.body,e)]),r=Qt(["inner"],[r],e)):r=Qt(["inner"],[De(t.body,e)]);var n=Qt(["fix"],[]),i=Qt([t.alignment],[r,n],e),a=Qt(["strut"]);return a.style.height=G(i.height+i.depth),i.depth&&(a.style.verticalAlign=G(-i.depth)),i.children.unshift(a),i=Qt(["thinbox"],[i],e),Qt(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new Oe("mpadded",[Ye(t.body,e)]);if("rlap"!==t.alignment){var n="llap"===t.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),ye({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a="\\("===r?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s}}}),ye({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new a("Mismatched "+t.funcName)}});var wn=(t,e)=>{switch(e.style.size){case _.DISPLAY.size:return t.display;case _.TEXT.size:return t.text;case _.SCRIPT.size:return t.script;case _.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};ye({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:xe(e[0]),text:xe(e[1]),script:xe(e[2]),scriptscript:xe(e[3])}},htmlBuilder:(t,e)=>{var r=wn(t,e),n=_e(r,e,!1);return ee(n)},mathmlBuilder:(t,e)=>{var r=wn(t,e);return Ge(r,e)}});var Tn=(t,e,r,n,i,a,s)=>{t=Qt([],[t]);var o,l,c,h=r&&p(r);if(e){var u=De(e,n.havingStyle(i.sup()),n);l={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var d=De(r,n.havingStyle(i.sub()),n);o={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-d.height)}}if(l&&o){var f=n.fontMetrics().bigOpSpacing5+o.elem.height+o.elem.depth+o.kern+t.depth+s;c=ne({positionType:"bottom",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:G(-a)},{type:"kern",size:o.kern},{type:"elem",elem:t},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:G(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(o){var g=t.height-s;c=ne({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:G(-a)},{type:"kern",size:o.kern},{type:"elem",elem:t}]})}else{if(!l)return t;var m=t.depth+s;c=ne({positionType:"bottom",positionData:m,children:[{type:"elem",elem:t},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:G(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}var y=[c];if(o&&0!==a&&!h){var v=Qt(["mspace"],[],n);v.style.marginRight=G(a),y.unshift(v)}return Qt(["mop","op-limits"],y,n)},kn=new Set(["\\smallint"]),An=(t,e)=>{var r,n,i,a=!1;"supsub"===t.type?(r=t.sup,n=t.sub,i=er(t.base,"op"),a=!0):i=er(t,"op");var s,o=e.style,l=!1;if(o.size===_.DISPLAY.size&&i.symbol&&!kn.has(i.name)&&(l=!0),i.symbol){var c=l?"Size2-Regular":"Size1-Regular",h="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(h=i.name.slice(1),i.name="oiint"===h?"\\iint":"\\iiint"),s=Yt(i.name,c,"math",e,["mop","op-symbol",l?"large-op":"small-op"]),h.length>0){var u=s.italic,d=le(h+"Size"+(l?"2":"1"),e);s=ne({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:d,shift:l?.08:0}]}),i.name="\\"+h,s.classes.unshift("mop"),s.italic=u}}else if(i.body){var p=_e(i.body,e,!0);1===p.length&&p[0]instanceof et?(s=p[0]).classes[0]="mop":s=Qt(["mop"],p,e)}else{for(var f=[],g=1;g{var r;if(t.symbol)r=new Oe("mo",[ze(t.name,t.mode)]),kn.has(t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new Oe("mo",je(t.body,e));else{r=new Oe("mi",[new Pe(t.name.slice(1))]);var n=new Oe("mo",[ze("⁡","text")]);r=t.parentIsSupSub?new Oe("mrow",[r,n]):Me([r,n])}return r},En={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ye({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return 1===i.length&&(i=En[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:An,mathmlBuilder:_n}),ye({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:xe(n)}},htmlBuilder:An,mathmlBuilder:_n});var Cn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ye({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:An,mathmlBuilder:_n}),ye({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:An,mathmlBuilder:_n}),ye({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(t){var{parser:e,funcName:r}=t,n=r;return 1===n.length&&(n=Cn[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:An,mathmlBuilder:_n});var Sn=(t,e)=>{var r,n,i,a,s=!1;if("supsub"===t.type?(r=t.sup,n=t.sub,i=er(t.base,"operatorname"),s=!0):i=er(t,"operatorname"),i.body.length>0){for(var o=i.body.map(t=>{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),l=_e(o,e.withFont("mathrm"),!0),c=0;c{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:xe(i),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:Sn,mathmlBuilder:(t,e)=>{for(var r=je(t.body,e.withFont("mathrm")),n=!0,i=0;it.toText()).join("");r=[new Pe(o)]}var l=new Oe("mi",r);l.setAttribute("mathvariant","normal");var c=new Oe("mo",[ze("⁡","text")]);return t.parentIsSupSub?new Oe("mrow",[l,c]):Me([l,c])}}),tn("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),ve({type:"ordgroup",htmlBuilder:(t,e)=>t.semisimple?ee(_e(t.body,e,!1)):Qt(["mord"],_e(t.body,e,!0),e),mathmlBuilder:(t,e)=>Ge(t.body,e,!0)}),ye({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=De(t.body,e.havingCrampedStyle()),n=te("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=ne({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]});return Qt(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new Oe("mo",[new Pe("‾")]);r.setAttribute("stretchy","true");var n=new Oe("mover",[Ye(t.body,e),r]);return n.setAttribute("accent","true"),n}}),ye({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:xe(n)}},htmlBuilder:(t,e)=>{var r=_e(t.body,e.withPhantom(),!1);return ee(r)},mathmlBuilder:(t,e)=>{var r=je(t.body,e);return new Oe("mphantom",r)}}),ye({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=Qt([],[De(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=je(xe(t.body),e),n=new Oe("mphantom",r),i=new Oe("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}}),ye({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=Qt(["inner"],[De(t.body,e.withPhantom())]),n=Qt(["fix"],[]);return Qt(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=je(xe(t.body),e),n=new Oe("mphantom",r),i=new Oe("mpadded",[n]);return i.setAttribute("width","0px"),i}}),ye({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=er(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=De(t.body,e),n=j(t.dy,e);return ne({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(t,e){var r=new Oe("mpadded",[Ye(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}}),ye({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}}),ye({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=er(e[0],"size"),s=er(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&er(i,"size").value,width:a.value,height:s.value}},htmlBuilder(t,e){var r=Qt(["mord","rule"],[],e),n=j(t.width,e),i=j(t.height,e),a=t.shift?j(t.shift,e):0;return r.style.borderRightWidth=G(n),r.style.borderTopWidth=G(i),r.style.bottom=G(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=1.125*i*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=j(t.width,e),n=j(t.height,e),i=t.shift?j(t.shift,e):0,a=e.color&&e.getColor()||"black",s=new Oe("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",G(r)),s.setAttribute("height",G(n));var o=new Oe("mpadded",[s]);return i>=0?o.setAttribute("height",G(i)):(o.setAttribute("height",G(i)),o.setAttribute("depth",G(-i))),o.setAttribute("voffset",G(i)),o}});var Ln=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ye({type:"sizing",names:Ln,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:Ln.indexOf(n)+1,body:a}},htmlBuilder:(t,e)=>{var r=e.havingSize(t.size);return Rn(t.body,r,e)},mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=je(t.body,r),i=new Oe("mstyle",n);return i.setAttribute("mathsize",G(r.sizeMultiplier)),i}}),ye({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,a=!1,s=r[0]&&er(r[0],"ordgroup");if(s)for(var o="",l=0;l{var r=Qt([],[De(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new Oe("mpadded",[Ye(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}}),ye({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,e){var r=De(t.body,e.havingCrampedStyle());0===r.height&&(r.height=e.fontMetrics().xHeight),r=re(r,e);var n=e.fontMetrics().defaultRuleThickness,i=n;e.style.id<_.TEXT.id&&(i=e.fontMetrics().xHeight);var a=n+i/4,s=r.height+r.depth+a+n,{span:o,ruleWidth:l,advanceWidth:c}=function(t,e){var r,n,i=e.havingBaseSizing(),a=qr("\\surd",t*i.sizeMultiplier,zr,i),s=i.sizeMultiplier,o=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),l=0,c=0,h=0;return"small"===a.type?(t<1?s=1:t<1.4&&(s=.7),c=(1+o)/s,(r=Nr("sqrtMain",l=(1+o+Dr)/s,h=1e3+1e3*o+80,o,e)).style.minWidth="0.853em",n=.833/s):"large"===a.type?(h=1080*Pr[a.size],c=(Pr[a.size]+o)/s,l=(Pr[a.size]+o+Dr)/s,(r=Nr("sqrtSize"+a.size,l,h,o,e)).style.minWidth="1.02em",n=1/s):(l=t+o+Dr,c=t+o,h=Math.floor(1e3*t+o)+80,(r=Nr("sqrtTall",l,h,o,e)).style.minWidth="0.742em",n=1.056),r.height=c,r.style.height=G(l),{span:r,advanceWidth:n,ruleWidth:(e.fontMetrics().sqrtRuleThickness+o)*s}}(s,e),h=o.height-l;h>r.height+r.depth+a&&(a=(a+h-r.height-r.depth)/2);var u=o.height-r.height-a-l;r.style.paddingLeft=G(c);var d=ne({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:o},{type:"kern",size:l}]});if(t.index){var p=e.havingStyle(_.SCRIPTSCRIPT),f=De(t.index,p,e),g=.6*(d.height-d.depth),m=ne({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]}),y=Qt(["root"],[m]);return Qt(["mord","sqrt"],[y,d],e)}return Qt(["mord","sqrt"],[d],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new Oe("mroot",[Ye(r,e),Ye(n,e)]):new Oe("msqrt",[Ye(r,e)])}});var Dn={display:_.DISPLAY,text:_.TEXT,script:_.SCRIPT,scriptscript:_.SCRIPTSCRIPT};ye({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(t,e){var r=Dn[t.style],n=e.havingStyle(r).withFont("");return Rn(t.body,n,e)},mathmlBuilder(t,e){var r=Dn[t.style],n=e.havingStyle(r),i=je(t.body,n),a=new Oe("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});ve({type:"supsub",htmlBuilder(t,e){var r=function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===_.DISPLAY.size||r.alwaysHandleSupSub)?An:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===_.DISPLAY.size||r.limits)?Sn:null:"accent"===r.type?p(r.base)?ir:null:"horizBrace"===r.type&&!t.sub===r.isOver?bn:null:null}(t,e);if(r)return r(t,e);var n,i,a,{base:s,sup:o,sub:l}=t,c=De(s,e),h=e.fontMetrics(),u=0,d=0,f=s&&p(s);if(o){var g=e.havingStyle(e.style.sup());n=De(o,g,e),f||(u=c.height-g.fontMetrics().supDrop*g.sizeMultiplier/e.sizeMultiplier)}if(l){var m=e.havingStyle(e.style.sub());i=De(l,m,e),f||(d=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}a=e.style===_.DISPLAY?h.sup1:e.style.cramped?h.sup3:h.sup2;var y,v=e.sizeMultiplier,b=G(.5/h.ptPerEm/v),x=null;if(i){var w=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name);(c instanceof et||w)&&(x=G(-c.italic))}if(n&&i){u=Math.max(u,a,n.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var T=4*h.defaultRuleThickness;if(u-n.depth-(i.height-d)0&&(u+=k,d-=k)}y=ne({positionType:"individualShift",children:[{type:"elem",elem:i,shift:d,marginRight:b,marginLeft:x},{type:"elem",elem:n,shift:-u,marginRight:b}]})}else if(i){d=Math.max(d,h.sub1,i.height-.8*h.xHeight),y=ne({positionType:"shift",positionData:d,children:[{type:"elem",elem:i,marginLeft:x,marginRight:b}]})}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,a,n.depth+.25*h.xHeight),y=ne({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:b}]})}var A=Re(c,"right")||"mord";return Qt([A],[c,Qt(["msupsub"],[y])],e)},mathmlBuilder(t,e){var r,n=!1;t.base&&"horizBrace"===t.base.type&&!!t.sup===t.base.isOver&&(n=!0,r=t.base.isOver),!t.base||"op"!==t.base.type&&"operatorname"!==t.base.type||(t.base.parentIsSupSub=!0);var i,a=[Ye(t.base,e)];if(t.sub&&a.push(Ye(t.sub,e)),t.sup&&a.push(Ye(t.sup,e)),n)i=r?"mover":"munder";else if(t.sub)if(t.sup){var s=t.base;i=s&&"op"===s.type&&s.limits&&e.style===_.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(e.style===_.DISPLAY||s.limits)?"munderover":"msubsup"}else{var o=t.base;i=o&&"op"===o.type&&o.limits&&(e.style===_.DISPLAY||o.alwaysHandleSupSub)||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(o.limits||e.style===_.DISPLAY)?"munder":"msub"}else{var l=t.base;i=l&&"op"===l.type&&l.limits&&(e.style===_.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||e.style===_.DISPLAY)?"mover":"msup"}return new Oe(i,a)}}),ve({type:"atom",htmlBuilder:(t,e)=>Wt(t.text,t.mode,e,["m"+t.family]),mathmlBuilder(t,e){var r=new Oe("mo",[ze(t.text,t.mode)]);if("bin"===t.family){var n=qe(t,e);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===t.family?r.setAttribute("separator","true"):"open"!==t.family&&"close"!==t.family||r.setAttribute("stretchy","false");return r}});var Nn={mi:"italic",mn:"normal",mtext:"normal"};ve({type:"mathord",htmlBuilder:(t,e)=>Ht(t,e,"mathord"),mathmlBuilder(t,e){var r=new Oe("mi",[ze(t.text,t.mode,e)]),n=qe(t,e)||"italic";return n!==Nn[r.type]&&r.setAttribute("mathvariant",n),r}}),ve({type:"textord",htmlBuilder:(t,e)=>Ht(t,e,"textord"),mathmlBuilder(t,e){var r,n=ze(t.text,t.mode,e),i=qe(t,e)||"normal";return r="text"===t.mode?new Oe("mtext",[n]):/[0-9]/.test(t.text)?new Oe("mn",[n]):"\\prime"===t.text?new Oe("mo",[n]):new Oe("mi",[n]),i!==Nn[r.type]&&r.setAttribute("mathvariant",i),r}});var In={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Mn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ve({type:"spacing",htmlBuilder(t,e){if(Mn.hasOwnProperty(t.text)){var r=Mn[t.text].className||"";if("text"===t.mode){var n=Ht(t,e,"textord");return n.classes.push(r),n}return Qt(["mspace",r],[Wt(t.text,t.mode,e)],e)}if(In.hasOwnProperty(t.text))return Qt(["mspace",In[t.text]],[],e);throw new a('Unknown type of space "'+t.text+'"')},mathmlBuilder(t,e){if(!Mn.hasOwnProperty(t.text)){if(In.hasOwnProperty(t.text))return new Oe("mspace");throw new a('Unknown type of space "'+t.text+'"')}return new Oe("mtext",[new Pe(" ")])}});var On=()=>{var t=new Oe("mtd",[]);return t.setAttribute("width","50%"),t};ve({type:"tag",mathmlBuilder(t,e){var r=new Oe("mtable",[new Oe("mtr",[On(),new Oe("mtd",[Ge(t.body,e)]),On(),new Oe("mtd",[Ge(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var Pn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},$n={"\\textbf":"textbf","\\textmd":"textmd"},Bn={"\\textit":"textit","\\textup":"textup"},Fn=(t,e)=>{var r=t.font;return r?Pn[r]?e.withTextFontFamily(Pn[r]):$n[r]?e.withTextFontWeight($n[r]):"\\emph"===r?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(Bn[r]):e};ye({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:xe(i),font:n}},htmlBuilder(t,e){var r=Fn(t,e),n=_e(t.body,r,!0);return Qt(["mord","text"],n,r)},mathmlBuilder(t,e){var r=Fn(t,e);return Ge(t.body,r)}}),ye({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=De(t.body,e),n=te("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=ne({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]});return Qt(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new Oe("mo",[new Pe("‾")]);r.setAttribute("stretchy","true");var n=new Oe("munder",[Ye(t.body,e),r]);return n.setAttribute("accentunder","true"),n}}),ye({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=De(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return ne({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]})},mathmlBuilder:(t,e)=>new Oe("mpadded",[Ye(t.body,e)],["vcenter"])}),ye({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=zn(t),n=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" "),Kn=fe,qn="[ \r\n\t]",Un="(\\\\[a-zA-Z@]+)"+qn+"*",jn="[̀-ͯ]",Gn=new RegExp(jn+"+$"),Yn="("+qn+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+jn+"*|[\ud800-\udbff][\udc00-\udfff]"+jn+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Un+"|\\\\[^\ud800-\udfff])";class Wn{constructor(t,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=e,this.tokenRegex=new RegExp(Yn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new i("EOF",new n(this,e,e));var r=this.tokenRegex.exec(t);if(null===r||r.index!==e)throw new a("Unexpected character: '"+t[e]+"'",new i(t[e],new n(this,e,e+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[s]){var o=t.indexOf("\n",this.tokenRegex.lastIndex);return-1===o?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new i(s,new n(this,e,this.tokenRegex.lastIndex))}}class Hn{constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new a("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,e,r){if(void 0===r&&(r=!1),r){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][t]=e)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(t)&&(i[t]=this.current[t])}null==e?delete this.current[t]:this.current[t]=e}}var Vn=Jr;tn("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}}),tn("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}}),tn("\\@firstoftwo",function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}}),tn("\\@secondoftwo",function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}}),tn("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return 1===e[0].length&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}}),tn("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),tn("\\TextOrMath",function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Xn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};tn("\\char",function(t){var e,r=t.popToken(),n="";if("'"===r.text)e=8,r=t.popToken();else if('"'===r.text)e=16,r=t.popToken();else if("`"===r.text)if("\\"===(r=t.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new a("\\char` missing argument");n=r.text.charCodeAt(0)}else e=10;if(e){if(null==(n=Xn[r.text])||n>=e)throw new a("Invalid base-"+e+" digit "+r.text);for(var i;null!=(i=Xn[t.future().text])&&i{var i=t.consumeArg().tokens;if(1!==i.length)throw new a("\\newcommand's first argument must be a macro name");var s=i[0].text,o=t.isDefined(s);if(o&&!e)throw new a("\\newcommand{"+s+"} attempting to redefine "+s+"; use \\renewcommand");if(!o&&!r)throw new a("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var l=0;if(1===(i=t.consumeArg().tokens).length&&"["===i[0].text){for(var c="",h=t.expandNextToken();"]"!==h.text&&"EOF"!==h.text;)c+=h.text,h=t.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new a("Invalid number of arguments: "+c);l=parseInt(c),i=t.consumeArg().tokens}return o&&n||t.macros.set(s,{tokens:i,numArgs:l}),""};tn("\\newcommand",t=>Zn(t,!1,!0,!1)),tn("\\renewcommand",t=>Zn(t,!0,!1,!1)),tn("\\providecommand",t=>Zn(t,!0,!0,!0)),tn("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""}),tn("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""}),tn("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Kn[r],lt.math[r],lt.text[r]),""}),tn("\\bgroup","{"),tn("\\egroup","}"),tn("~","\\nobreakspace"),tn("\\lq","`"),tn("\\rq","'"),tn("\\aa","\\r a"),tn("\\AA","\\r A"),tn("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),tn("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),tn("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),tn("ℬ","\\mathscr{B}"),tn("ℰ","\\mathscr{E}"),tn("ℱ","\\mathscr{F}"),tn("ℋ","\\mathscr{H}"),tn("ℐ","\\mathscr{I}"),tn("ℒ","\\mathscr{L}"),tn("ℳ","\\mathscr{M}"),tn("ℛ","\\mathscr{R}"),tn("ℭ","\\mathfrak{C}"),tn("ℌ","\\mathfrak{H}"),tn("ℨ","\\mathfrak{Z}"),tn("\\Bbbk","\\Bbb{k}"),tn("·","\\cdotp"),tn("\\llap","\\mathllap{\\textrm{#1}}"),tn("\\rlap","\\mathrlap{\\textrm{#1}}"),tn("\\clap","\\mathclap{\\textrm{#1}}"),tn("\\mathstrut","\\vphantom{(}"),tn("\\underbar","\\underline{\\text{#1}}"),tn("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),tn("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),tn("\\ne","\\neq"),tn("≠","\\neq"),tn("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),tn("∉","\\notin"),tn("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),tn("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),tn("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),tn("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),tn("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),tn("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),tn("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),tn("⟂","\\perp"),tn("‼","\\mathclose{!\\mkern-0.8mu!}"),tn("∌","\\notni"),tn("⌜","\\ulcorner"),tn("⌝","\\urcorner"),tn("⌞","\\llcorner"),tn("⌟","\\lrcorner"),tn("©","\\copyright"),tn("®","\\textregistered"),tn("️","\\textregistered"),tn("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),tn("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),tn("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),tn("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),tn("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),tn("⋮","\\vdots"),tn("\\varGamma","\\mathit{\\Gamma}"),tn("\\varDelta","\\mathit{\\Delta}"),tn("\\varTheta","\\mathit{\\Theta}"),tn("\\varLambda","\\mathit{\\Lambda}"),tn("\\varXi","\\mathit{\\Xi}"),tn("\\varPi","\\mathit{\\Pi}"),tn("\\varSigma","\\mathit{\\Sigma}"),tn("\\varUpsilon","\\mathit{\\Upsilon}"),tn("\\varPhi","\\mathit{\\Phi}"),tn("\\varPsi","\\mathit{\\Psi}"),tn("\\varOmega","\\mathit{\\Omega}"),tn("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),tn("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),tn("\\boxed","\\fbox{$\\displaystyle{#1}$}"),tn("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),tn("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),tn("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),tn("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),tn("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Qn={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},Jn=new Set(["bin","rel"]);tn("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in Qn?e=Qn[r]:("\\not"===r.slice(0,4)||r in lt.math&&Jn.has(lt.math[r].group))&&(e="\\dotsb"),e});var ti={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};tn("\\dotso",function(t){return t.future().text in ti?"\\ldots\\,":"\\ldots"}),tn("\\dotsc",function(t){var e=t.future().text;return e in ti&&","!==e?"\\ldots\\,":"\\ldots"}),tn("\\cdots",function(t){return t.future().text in ti?"\\@cdots\\,":"\\@cdots"}),tn("\\dotsb","\\cdots"),tn("\\dotsm","\\cdots"),tn("\\dotsi","\\!\\cdots"),tn("\\dotsx","\\ldots\\,"),tn("\\DOTSI","\\relax"),tn("\\DOTSB","\\relax"),tn("\\DOTSX","\\relax"),tn("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),tn("\\,","\\tmspace+{3mu}{.1667em}"),tn("\\thinspace","\\,"),tn("\\>","\\mskip{4mu}"),tn("\\:","\\tmspace+{4mu}{.2222em}"),tn("\\medspace","\\:"),tn("\\;","\\tmspace+{5mu}{.2777em}"),tn("\\thickspace","\\;"),tn("\\!","\\tmspace-{3mu}{.1667em}"),tn("\\negthinspace","\\!"),tn("\\negmedspace","\\tmspace-{4mu}{.2222em}"),tn("\\negthickspace","\\tmspace-{5mu}{.277em}"),tn("\\enspace","\\kern.5em "),tn("\\enskip","\\hskip.5em\\relax"),tn("\\quad","\\hskip1em\\relax"),tn("\\qquad","\\hskip2em\\relax"),tn("\\tag","\\@ifstar\\tag@literal\\tag@paren"),tn("\\tag@paren","\\tag@literal{({#1})}"),tn("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),tn("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),tn("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),tn("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),tn("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),tn("\\newline","\\\\\\relax"),tn("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ei=G(N["Main-Regular"]["T".charCodeAt(0)][1]-.7*N["Main-Regular"]["A".charCodeAt(0)][1]);tn("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+ei+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),tn("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ei+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),tn("\\hspace","\\@ifstar\\@hspacer\\@hspace"),tn("\\@hspace","\\hskip #1\\relax"),tn("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),tn("\\ordinarycolon",":"),tn("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),tn("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),tn("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),tn("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),tn("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),tn("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),tn("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),tn("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),tn("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),tn("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),tn("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),tn("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),tn("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),tn("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),tn("∷","\\dblcolon"),tn("∹","\\eqcolon"),tn("≔","\\coloneqq"),tn("≕","\\eqqcolon"),tn("⩴","\\Coloneqq"),tn("\\ratio","\\vcentcolon"),tn("\\coloncolon","\\dblcolon"),tn("\\colonequals","\\coloneqq"),tn("\\coloncolonequals","\\Coloneqq"),tn("\\equalscolon","\\eqqcolon"),tn("\\equalscoloncolon","\\Eqqcolon"),tn("\\colonminus","\\coloneq"),tn("\\coloncolonminus","\\Coloneq"),tn("\\minuscolon","\\eqcolon"),tn("\\minuscoloncolon","\\Eqcolon"),tn("\\coloncolonapprox","\\Colonapprox"),tn("\\coloncolonsim","\\Colonsim"),tn("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),tn("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),tn("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),tn("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),tn("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),tn("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),tn("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),tn("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),tn("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),tn("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),tn("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),tn("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),tn("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),tn("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),tn("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),tn("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),tn("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),tn("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),tn("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),tn("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),tn("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),tn("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),tn("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),tn("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),tn("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),tn("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),tn("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),tn("\\imath","\\html@mathml{\\@imath}{ı}"),tn("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),tn("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),tn("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),tn("⟦","\\llbracket"),tn("⟧","\\rrbracket"),tn("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),tn("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),tn("⦃","\\lBrace"),tn("⦄","\\rBrace"),tn("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),tn("⦵","\\minuso"),tn("\\darr","\\downarrow"),tn("\\dArr","\\Downarrow"),tn("\\Darr","\\Downarrow"),tn("\\lang","\\langle"),tn("\\rang","\\rangle"),tn("\\uarr","\\uparrow"),tn("\\uArr","\\Uparrow"),tn("\\Uarr","\\Uparrow"),tn("\\N","\\mathbb{N}"),tn("\\R","\\mathbb{R}"),tn("\\Z","\\mathbb{Z}"),tn("\\alef","\\aleph"),tn("\\alefsym","\\aleph"),tn("\\Alpha","\\mathrm{A}"),tn("\\Beta","\\mathrm{B}"),tn("\\bull","\\bullet"),tn("\\Chi","\\mathrm{X}"),tn("\\clubs","\\clubsuit"),tn("\\cnums","\\mathbb{C}"),tn("\\Complex","\\mathbb{C}"),tn("\\Dagger","\\ddagger"),tn("\\diamonds","\\diamondsuit"),tn("\\empty","\\emptyset"),tn("\\Epsilon","\\mathrm{E}"),tn("\\Eta","\\mathrm{H}"),tn("\\exist","\\exists"),tn("\\harr","\\leftrightarrow"),tn("\\hArr","\\Leftrightarrow"),tn("\\Harr","\\Leftrightarrow"),tn("\\hearts","\\heartsuit"),tn("\\image","\\Im"),tn("\\infin","\\infty"),tn("\\Iota","\\mathrm{I}"),tn("\\isin","\\in"),tn("\\Kappa","\\mathrm{K}"),tn("\\larr","\\leftarrow"),tn("\\lArr","\\Leftarrow"),tn("\\Larr","\\Leftarrow"),tn("\\lrarr","\\leftrightarrow"),tn("\\lrArr","\\Leftrightarrow"),tn("\\Lrarr","\\Leftrightarrow"),tn("\\Mu","\\mathrm{M}"),tn("\\natnums","\\mathbb{N}"),tn("\\Nu","\\mathrm{N}"),tn("\\Omicron","\\mathrm{O}"),tn("\\plusmn","\\pm"),tn("\\rarr","\\rightarrow"),tn("\\rArr","\\Rightarrow"),tn("\\Rarr","\\Rightarrow"),tn("\\real","\\Re"),tn("\\reals","\\mathbb{R}"),tn("\\Reals","\\mathbb{R}"),tn("\\Rho","\\mathrm{P}"),tn("\\sdot","\\cdot"),tn("\\sect","\\S"),tn("\\spades","\\spadesuit"),tn("\\sub","\\subset"),tn("\\sube","\\subseteq"),tn("\\supe","\\supseteq"),tn("\\Tau","\\mathrm{T}"),tn("\\thetasym","\\vartheta"),tn("\\weierp","\\wp"),tn("\\Zeta","\\mathrm{Z}"),tn("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),tn("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),tn("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),tn("\\bra","\\mathinner{\\langle{#1}|}"),tn("\\ket","\\mathinner{|{#1}\\rangle}"),tn("\\braket","\\mathinner{\\langle{#1}\\rangle}"),tn("\\Bra","\\left\\langle#1\\right|"),tn("\\Ket","\\left|#1\\right\\rangle");var ri=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=e=>r=>{t&&(r.macros.set("|",s),i.length&&r.macros.set("\\|",o));var a=e;!e&&i.length&&("|"===r.future().text&&(r.popToken(),a=!0));return{tokens:a?i:n,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,h=e.expandTokens([...a,...c,...r]);return e.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};tn("\\bra@ket",ri(!1)),tn("\\bra@set",ri(!0)),tn("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),tn("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),tn("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),tn("\\angln","{\\angl n}"),tn("\\blue","\\textcolor{##6495ed}{#1}"),tn("\\orange","\\textcolor{##ffa500}{#1}"),tn("\\pink","\\textcolor{##ff00af}{#1}"),tn("\\red","\\textcolor{##df0030}{#1}"),tn("\\green","\\textcolor{##28ae7b}{#1}"),tn("\\gray","\\textcolor{gray}{#1}"),tn("\\purple","\\textcolor{##9d38bd}{#1}"),tn("\\blueA","\\textcolor{##ccfaff}{#1}"),tn("\\blueB","\\textcolor{##80f6ff}{#1}"),tn("\\blueC","\\textcolor{##63d9ea}{#1}"),tn("\\blueD","\\textcolor{##11accd}{#1}"),tn("\\blueE","\\textcolor{##0c7f99}{#1}"),tn("\\tealA","\\textcolor{##94fff5}{#1}"),tn("\\tealB","\\textcolor{##26edd5}{#1}"),tn("\\tealC","\\textcolor{##01d1c1}{#1}"),tn("\\tealD","\\textcolor{##01a995}{#1}"),tn("\\tealE","\\textcolor{##208170}{#1}"),tn("\\greenA","\\textcolor{##b6ffb0}{#1}"),tn("\\greenB","\\textcolor{##8af281}{#1}"),tn("\\greenC","\\textcolor{##74cf70}{#1}"),tn("\\greenD","\\textcolor{##1fab54}{#1}"),tn("\\greenE","\\textcolor{##0d923f}{#1}"),tn("\\goldA","\\textcolor{##ffd0a9}{#1}"),tn("\\goldB","\\textcolor{##ffbb71}{#1}"),tn("\\goldC","\\textcolor{##ff9c39}{#1}"),tn("\\goldD","\\textcolor{##e07d10}{#1}"),tn("\\goldE","\\textcolor{##a75a05}{#1}"),tn("\\redA","\\textcolor{##fca9a9}{#1}"),tn("\\redB","\\textcolor{##ff8482}{#1}"),tn("\\redC","\\textcolor{##f9685d}{#1}"),tn("\\redD","\\textcolor{##e84d39}{#1}"),tn("\\redE","\\textcolor{##bc2612}{#1}"),tn("\\maroonA","\\textcolor{##ffbde0}{#1}"),tn("\\maroonB","\\textcolor{##ff92c6}{#1}"),tn("\\maroonC","\\textcolor{##ed5fa6}{#1}"),tn("\\maroonD","\\textcolor{##ca337c}{#1}"),tn("\\maroonE","\\textcolor{##9e034e}{#1}"),tn("\\purpleA","\\textcolor{##ddd7ff}{#1}"),tn("\\purpleB","\\textcolor{##c6b9fc}{#1}"),tn("\\purpleC","\\textcolor{##aa87ff}{#1}"),tn("\\purpleD","\\textcolor{##7854ab}{#1}"),tn("\\purpleE","\\textcolor{##543b78}{#1}"),tn("\\mintA","\\textcolor{##f5f9e8}{#1}"),tn("\\mintB","\\textcolor{##edf2df}{#1}"),tn("\\mintC","\\textcolor{##e0e5cc}{#1}"),tn("\\grayA","\\textcolor{##f6f7f7}{#1}"),tn("\\grayB","\\textcolor{##f0f1f2}{#1}"),tn("\\grayC","\\textcolor{##e3e5e6}{#1}"),tn("\\grayD","\\textcolor{##d6d8da}{#1}"),tn("\\grayE","\\textcolor{##babec2}{#1}"),tn("\\grayF","\\textcolor{##888d93}{#1}"),tn("\\grayG","\\textcolor{##626569}{#1}"),tn("\\grayH","\\textcolor{##3b3e40}{#1}"),tn("\\grayI","\\textcolor{##21242c}{#1}"),tn("\\kaBlue","\\textcolor{##314453}{#1}"),tn("\\kaGreen","\\textcolor{##71B307}{#1}");var ni={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class ii{constructor(t,e,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=e,this.expansionCount=0,this.feed(t),this.macros=new Hn(Vn,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Wn(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,r,a;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),({tokens:a,end:r}=this.consumeArg(["]"]))}else({tokens:a,start:e,end:r}=this.consumeArg());return this.pushToken(new i("EOF",r.loc)),this.pushTokens(a),new i("",n.range(e,r))}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(t){var e=[],r=t&&t.length>0;r||this.consumeSpaces();var n,i=this.future(),s=0,o=0;do{if(n=this.popToken(),e.push(n),"{"===n.text)++s;else if("}"===n.text){if(-1===--s)throw new a("Extra }",n)}else if("EOF"===n.text)throw new a("Unexpected end of input in a macro argument, expected '"+(t&&r?t[o]:"}")+"'",n);if(t&&r)if((0===s||1===s&&"{"===t[o])&&n.text===t[o]){if(++o===t.length){e.splice(-o,o);break}}else o=0}while(0!==s||r);return"{"===i.text&&"}"===e[e.length-1].text&&(e.pop(),e.shift()),e.reverse(),{tokens:e,start:i,end:n}}consumeArgs(t,e){if(e){if(e.length!==t+1)throw new a("The length of delimiters doesn't match the number of args!");for(var r=e[0],n=0;nthis.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),r=e.text,n=e.noexpand?null:this._getExpansion(r);if(null==n||t&&n.unexpandable){if(t&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new a("Undefined control sequence: "+r);return this.pushToken(e),!1}this.countExpansion(1);var i=n.tokens,s=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var o=(i=i.slice()).length-1;o>=0;--o){var l=i[o];if("#"===l.text){if(0===o)throw new a("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--o]).text)i.splice(o+1,1);else{if(!/^[1-9]$/.test(l.text))throw new a("Not a valid argument number",l);i.splice(o,2,...s[+l.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new i(t)]):void 0}expandTokens(t){var e=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(!1===this.expandOnce(!0)){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),e.push(n)}return this.countExpansion(e.length),e}expandMacroAsText(t){var e=this.expandMacro(t);return e?e.map(t=>t.text).join(""):e}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1===t.length){var r=this.lexer.catcodes[t];if(null!=r&&13!==r)return}var n="function"==typeof e?e(this):e;if("string"==typeof n){var i=0;if(n.includes("#"))for(var a=n.replace(/##/g,"");a.includes("#"+(i+1));)++i;for(var s=new Wn(n,this.settings),o=[],l=s.lex();"EOF"!==l.text;)o.push(l),l=s.lex();return o.reverse(),{tokens:o,numArgs:i}}return n}isDefined(t){return this.macros.has(t)||Kn.hasOwnProperty(t)||lt.math.hasOwnProperty(t)||lt.text.hasOwnProperty(t)||ni.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:Kn.hasOwnProperty(t)&&!Kn[t].primitive}}var ai=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,si=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9",ₐ:"a",ₑ:"e",ₕ:"h",ᵢ:"i",ⱼ:"j",ₖ:"k",ₗ:"l",ₘ:"m",ₙ:"n",ₒ:"o",ₚ:"p",ᵣ:"r",ₛ:"s",ₜ:"t",ᵤ:"u",ᵥ:"v",ₓ:"x",ᵦ:"β",ᵧ:"γ",ᵨ:"ρ",ᵩ:"ϕ",ᵪ:"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9",ᴬ:"A",ᴮ:"B",ᴰ:"D",ᴱ:"E",ᴳ:"G",ᴴ:"H",ᴵ:"I",ᴶ:"J",ᴷ:"K",ᴸ:"L",ᴹ:"M",ᴺ:"N",ᴼ:"O",ᴾ:"P",ᴿ:"R",ᵀ:"T",ᵁ:"U",ⱽ:"V",ᵂ:"W",ᵃ:"a",ᵇ:"b",ᶜ:"c",ᵈ:"d",ᵉ:"e",ᶠ:"f",ᵍ:"g",ʰ:"h",ⁱ:"i",ʲ:"j",ᵏ:"k",ˡ:"l",ᵐ:"m",ⁿ:"n",ᵒ:"o",ᵖ:"p",ʳ:"r",ˢ:"s",ᵗ:"t",ᵘ:"u",ᵛ:"v",ʷ:"w",ˣ:"x",ʸ:"y",ᶻ:"z",ᵝ:"β",ᵞ:"γ",ᵟ:"δ",ᵠ:"ϕ",ᵡ:"χ",ᶿ:"θ"}),oi={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},li={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class ci{constructor(t,e){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new ii(t,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new a("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken;this.consume(),this.gullet.pushToken(new i("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=e,r}parseExpression(t,e){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(ci.endOfExpression.has(n.text))break;if(e&&n.text===e)break;if(t&&Kn[n.text]&&Kn[n.text].infix)break;var i=this.parseAtom(e);if(!i)break;"internal"!==i.type&&r.push(i)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,r=-1,n=0;n=128))return null;this.settings.strict&&(S(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),s={type:"textord",mode:"text",loc:n.range(t),text:e}}if(this.consume(),o)for(var d=0;ds});var n=r(6309),i=r(3122);const a=class{constructor(){this.type=i.Z.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=i.Z.ALL}is(t){return this.type===t}};const s=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=n.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=n.A.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=n.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=n.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=n.A.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=n.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),n.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),n.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),n.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),n.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),n.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),n.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(i.Z.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")},1931(t,e,r){"use strict";r.d(e,{A:()=>g});var n=r(7266),i=r(3122);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const r=e[1],i=parseInt(r,16),s=r.length,o=s%4==0,l=s>4,c=l?1:17,h=l?8:4,u=o?0:-1,d=l?255:15;return n.A.set({r:(i>>h*(u+3)&d)*c,g:(i>>h*(u+2)&d)*c,b:(i>>h*(u+1)&d)*c,a:o?(i&d)*c/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a}=t;return a<1?`#${i.Y[Math.round(e)]}${i.Y[Math.round(r)]}${i.Y[Math.round(n)]}${i.Y[Math.round(255*a)]}`:`#${i.Y[Math.round(e)]}${i.Y[Math.round(r)]}${i.Y[Math.round(n)]}`}},s=a;var o=r(6309);const l={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(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return o.A.channel.clamp.h(.9*parseFloat(t));case"rad":return o.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return o.A.channel.clamp.h(360*parseFloat(t))}}return o.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,i,a,s,c,h]=r;return n.A.set({h:l._hue2deg(i),s:o.A.channel.clamp.s(parseFloat(a)),l:o.A.channel.clamp.l(parseFloat(s)),a:c?o.A.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${o.A.lang.round(e)}, ${o.A.lang.round(r)}%, ${o.A.lang.round(n)}%, ${i})`:`hsl(${o.A.lang.round(e)}, ${o.A.lang.round(r)}%, ${o.A.lang.round(n)}%)`}},c=l,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 s.parse(e)},stringify:t=>{const e=s.stringify(t);for(const r in h.colors)if(h.colors[r]===e)return r}},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 r=t.match(d.re);if(!r)return;const[,i,a,s,l,c,h,u,p]=r;return n.A.set({r:o.A.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:o.A.channel.clamp.g(l?2.55*parseFloat(s):parseFloat(s)),b:o.A.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?o.A.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${o.A.lang.round(e)}, ${o.A.lang.round(r)}, ${o.A.lang.round(n)}, ${o.A.lang.round(i)})`:`rgb(${o.A.lang.round(e)}, ${o.A.lang.round(r)}, ${o.A.lang.round(n)})`}},p=d,f={format:{keyword:h,hex:s,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=s.parse(t)||p.parse(t)||c.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(i.Z.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):s.stringify(t)},g=f},3122(t,e,r){"use strict";r.d(e,{Y:()=>i,Z:()=>a});var n=r(6309);const i={};for(let s=0;s<=255;s++)i[s]=n.A.unit.dec2hex(s);const a={ALL:0,RGB:1,HSL:2}},5635(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(6309),i=r(1931);const a=(t,e,r)=>{const a=i.A.parse(t),s=a[e],o=n.A.channel.clamp[e](s+r);return s!==o&&(a[e]=o),i.A.stringify(a)}},8232(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(6309),i=r(1931);const a=(t,e)=>{const r=i.A.parse(t);for(const i in e)r[i]=n.A.channel.clamp[i](e[i]);return i.A.stringify(r)}},5937(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(6309),i=r(1931);const a=(t,e)=>n.A.lang.round(i.A.parse(t)[e])},5263(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(5635);const i=(t,e)=>(0,n.A)(t,"l",-e)},5097(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(6309),i=r(1931);const a=t=>{const{r:e,g:r,b:a}=i.A.parse(t),s=.2126*n.A.channel.toLinear(e)+.7152*n.A.channel.toLinear(r)+.0722*n.A.channel.toLinear(a);return n.A.lang.round(s)},s=t=>a(t)>=.5,o=t=>!s(t)},8041(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(5635);const i=(t,e)=>(0,n.A)(t,"l",e)},5582(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(6309),i=r(7266),a=r(1931),s=r(8232);const o=(t,e,r=0,o=1)=>{if("number"!=typeof t)return(0,s.A)(t,{a:e});const l=i.A.set({r:n.A.channel.clamp.r(t),g:n.A.channel.clamp.g(e),b:n.A.channel.clamp.b(r),a:n.A.channel.clamp.a(o)});return a.A.stringify(l)}},6309(t,e,r){"use strict";r.d(e,{A:()=>i});const n={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,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,s=2*r-a;switch(i){case"r":return 255*n.hue2rgb(s,a,t+1/3);case"g":return 255*n.hue2rgb(s,a,t);case"b":return 255*n.hue2rgb(s,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if("l"===n)return 100*s;if(i===a)return 0;const o=i-a;if("s"===n)return 100*(s>.5?o/(2-i-a):o/(i+a));switch(i){case t:return 60*((e-r)/o+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,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}`}}}},4628(t,e,r){"use strict";r.d(e,{t:()=>yr,u:()=>vr});var n=r(6373),i=r(418),a=r(2806),s=r(2151);var o=r(724),l=r(4722),c=r(4092);function h(t,e,r){return`${t.name}_${e}_${r}`}class u{constructor(t){this.target=t}isEpsilon(){return!1}}class d extends u{constructor(t,e){super(t),this.tokenType=e}}class p extends u{constructor(t){super(t)}isEpsilon(){return!0}}class f extends u{constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}}function g(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(t,e){const r=e.length;for(let n=0;nm(t,e,r)),a=w(t,e,n,r,...i);return a}(t,e,r):r instanceof o.c$?function(t,e,r){const n=_(t,e,r,{type:1});x(t,n);const i=w(t,e,n,r,y(t,e,r));return function(t,e,r,n){const i=n.left,a=n.right;return A(i,a),t.decisionMap[h(e,"Option",r.idx)]=i,n}(t,e,r,i)}(t,e,r):r instanceof o.Y2?function(t,e,r){const n=_(t,e,r,{type:5});x(t,n);const i=w(t,e,n,r,y(t,e,r));return b(t,e,r,i)}(t,e,r):r instanceof o.Pp?function(t,e,r){const n=_(t,e,r,{type:5});x(t,n);const i=w(t,e,n,r,y(t,e,r)),a=T(t,e,r.separator,r);return b(t,e,r,i,a)}(t,e,r):r instanceof o.$P?function(t,e,r){const n=_(t,e,r,{type:4});x(t,n);const i=w(t,e,n,r,y(t,e,r));return v(t,e,r,i)}(t,e,r):r instanceof o.Cy?function(t,e,r){const n=_(t,e,r,{type:4});x(t,n);const i=w(t,e,n,r,y(t,e,r)),a=T(t,e,r.separator,r);return v(t,e,r,i,a)}(t,e,r):y(t,e,r)}function y(t,e,r){const n=(0,c.A)((0,l.A)(r.definition,r=>m(t,e,r)),t=>void 0!==t);return 1===n.length?n[0]:0===n.length?void 0:function(t,e){const r=e.length;for(let a=0;at.alt)}get key(){let t="";for(const e in this.map)t+=e+":";return t}}function L(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(t=>t.stateNumber.toString()).join("_")}`}var D=r(6452),N=r(8139),I=r(6307),M=r(7371);const O=function(t,e){return t&&t.length?(0,M.A)(t,(0,I.A)(e,2)):[]};var P=r(4098),$=r(8058),B=r(6401),F=r(3130);function z(t,e){const r={};return n=>{const i=n.toString();let a=r[i];return void 0!==a||(a={atnStartState:t,decision:e,states:{}},r[i]=a),a}}class K{constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let t="";const e=this.predicates.length;for(let r=0;rconsole.log(t)}initialize(t){this.atn=g(t.rules),this.dfas=function(t){const e=t.decisionStates.length,r=Array(e);for(let n=0;n(0,l.A)(t,t=>t[0]));if(j(d,!1)&&!i){const t=(0,F.A)(d,(t,e,r)=>((0,$.A)(e,e=>{e&&(t[e.tokenTypeIdx]=r,(0,$.A)(e.categoryMatches,e=>{t[e]=r}))}),t),{});return n?function(e){var r;const n=this.LA(1),i=t[n.tokenTypeIdx];if(void 0!==e&&void 0!==i){const t=null===(r=e[i])||void 0===r?void 0:r.GATE;if(void 0!==t&&!1===t.call(this))return}return i}:function(){const e=this.LA(1);return t[e.tokenTypeIdx]}}return n?function(t){const e=new K,r=void 0===t?0:t.length;for(let i=0;i(0,l.A)(t,t=>t[0]));if(j(d)&&d[0][0]&&!i){const t=d[0],e=(0,P.A)(t);if(1===e.length&&(0,B.A)(e[0].categoryMatches)){const t=e[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{const t=(0,F.A)(e,(t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,(0,$.A)(e.categoryMatches,e=>{t[e]=!0})),t),{});return function(){const e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){const t=G.call(this,a,u,q,s);return"object"!=typeof t&&0===t}}}function j(t,e=!0){const r=new Set;for(const n of t){const t=new Set;for(const i of n){if(void 0===i){if(e)break;return!1}const n=[i.tokenTypeIdx].concat(i.categoryMatches);for(const e of n)if(r.has(e)){if(!t.has(e))return!1}else r.add(e),t.add(e)}}return!0}function G(t,e,r,n){const i=t[e](r);let a=i.start;if(void 0===a){a=tt(i,Q(et(i.atnStartState))),i.start=a}return Y.apply(this,[i,a,r,n])}function Y(t,e,r,n){let i=e,a=1;const s=[];let o=this.LA(a++);for(;;){let e=X(i,o);if(void 0===e&&(e=W.apply(this,[t,i,o,a,r,n])),e===S)return V(s,i,o);if(!0===e.isAcceptState)return e.prediction;i=e,s.push(o),o=this.LA(a++)}}function W(t,e,r,n,i,a){const s=function(t,e,r){const n=new R,i=[];for(const s of t.elements){if(!1===r.is(s.alt))continue;if(7===s.state.type){i.push(s);continue}const t=s.state.transitions.length;for(let r=0;r0&&!function(t){for(const e of t.elements)if(7===e.state.type)return!0;return!1}(a))for(const s of i)a.add(s);return a}(e.configs,r,i);if(0===s.size)return J(t,e,r,S),S;let o=Q(s);const l=function(t,e){let r;for(const n of t.elements)if(!0===e.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}(s,i);if(void 0!==l)o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l;else if(function(t){if(function(t){for(const e of t.elements)if(7!==e.state.type)return!1;return!0}(t))return!0;const e=function(t){const e=new Map;for(const r of t){const t=L(r,!1);let n=e.get(t);void 0===n&&(n={},e.set(t,n)),n[r.alt]=!0}return e}(t.elements);return function(t){for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}(e)&&!function(t){for(const e of Array.from(t.values()))if(1===Object.keys(e).length)return!0;return!1}(e)}(s)){const e=(0,D.A)(s.alts);o.isAcceptState=!0,o.prediction=e,o.configs.uniqueAlt=e,H.apply(this,[t,n,s.alts,a])}return o=J(t,e,r,o),o}function H(t,e,r,n){const i=[];for(let s=1;s<=e;s++)i.push(this.LA(s).tokenType);const a=t.atnStartState;n(function(t){const e=(0,l.A)(t.prefixPath,t=>(0,o.Sk)(t)).join(", "),r=0===t.production.idx?"":t.production.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${function(t){if(t instanceof o.wL)return"SUBRULE";if(t instanceof o.c$)return"OPTION";if(t instanceof o.ak)return"OR";if(t instanceof o.$P)return"AT_LEAST_ONE";if(t instanceof o.Cy)return"AT_LEAST_ONE_SEP";if(t instanceof o.Pp)return"MANY_SEP";if(t instanceof o.Y2)return"MANY";if(t instanceof o.BK)return"CONSUME";throw Error("non exhaustive match")}(t.production)}${r}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n}({topLevelRule:a.rule,ambiguityIndices:r,production:a.production,prefixPath:i}))}function V(t,e,r){const n=(0,N.A)(e.configs.elements,t=>t.state.transitions);return{actualToken:r,possibleTokenTypes:O(n.filter(t=>t instanceof d).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function X(t,e){return t.edges[e.tokenTypeIdx]}function Z(t,e){if(t instanceof d&&(0,o.G)(e,t.tokenType))return t.target}function Q(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function J(t,e,r,n){return n=tt(t,n),e.edges[r.tokenTypeIdx]=n,n}function tt(t,e){if(e===S)return e;const r=e.configs.key,n=t.states[r];return void 0!==n?n:(e.configs.finalize(),t.states[r]=e,e)}function et(t){const e=new R,r=t.transitions.length;for(let n=0;n0){const r=[...t.stack];rt({state:r.pop(),alt:t.alt,stack:r},e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);const n=r.transitions.length;for(let i=0;i=0&&e.content.splice(r,1)}}addHiddenNodes(t){const e=[];for(const a of t){const t=new lt(a.startOffset,a.image.length,(0,n.wf)(a),a.tokenType,!0);t.root=this.rootNode,e.push(t)}let r=this.current,i=!1;if(r.content.length>0)r.content.push(...e);else{for(;r.container;){const t=r.container.content.indexOf(r);if(t>0){r.container.content.splice(t,0,...e),i=!0;break}r=r.container}i||this.rootNode.content.unshift(...e)}}construct(t){const e=this.current;"string"!=typeof t.$type||t.$infixName||(this.current.astNode=t),t.$cstNode=e;const r=this.nodeStack.pop();0===r?.content.length&&this.removeNode(r)}}class ot{get hidden(){return!1}get astNode(){const t="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(!t)throw new Error("This node has no associated AST element");return t}set astNode(t){this._astNode=t}get text(){return this.root.fullText.substring(this.offset,this.end)}}class lt extends ot{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(t,e,r,n,i=!1){super(),this._hidden=i,this._offset=t,this._tokenType=n,this._length=e,this._range=r}}class ct extends ot{constructor(){super(...arguments),this.content=new ht(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const t=this.firstNonHiddenNode,e=this.lastNonHiddenNode;if(t&&e){if(void 0===this._rangeCache){const{range:r}=t,{range:n}=e;this._rangeCache={start:r.start,end:n.end.line=0;t--){const e=this.content[t];if(!e.hidden)return e}return this.content[this.content.length-1]}}class ht extends Array{constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,ht.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,e,...r){return this.addParents(r),super.splice(t,e,...r)}addParents(t){for(const e of t)e.container=this.parent}}class ut extends ct{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(t){super(),this._text="",this._text=t??""}}const dt=Symbol("Datatype");function pt(t){return t.$type===dt}const ft=t=>t.endsWith("​")?t:t+"​";class gt{constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;const e=this.lexer.definition,r="production"===t.LanguageMetaData.mode;t.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new Tt(e,{...t.parser.ParserConfig,skipValidations:r,errorMessageProvider:t.parser.ParserErrorMessageProvider},t.shared.profilers.LangiumProfiler.createTask("parsing",t.LanguageMetaData.languageId)):this.wrapper=new wt(e,{...t.parser.ParserConfig,skipValidations:r,errorMessageProvider:t.parser.ParserErrorMessageProvider})}alternatives(t,e){this.wrapper.wrapOr(t,e)}optional(t,e){this.wrapper.wrapOption(t,e)}many(t,e){this.wrapper.wrapMany(t,e)}atLeastOne(t,e){this.wrapper.wrapAtLeastOne(t,e)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class mt extends gt{get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new st,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,e){const r=this.computeRuleType(t);let n;(0,s.NT)(t)&&(n=t.name,this.registerPrecedenceMap(t));const i=this.wrapper.DEFINE_RULE(ft(t.name),this.startImplementation(r,n,e).bind(this));return this.allRules.set(t.name,i),(0,s.s7)(t)&&t.entry&&(this.mainRule=i),i}registerPrecedenceMap(t){const e=t.name,r=new Map;for(let n=0;n0&&(e=this.construct()),void 0===e)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return e}startImplementation(t,e,r){return n=>{const i=!this.isRecording()&&void 0!==t;if(i){const r={$type:t};this.stack.push(r),t===dt?r.value="":void 0!==e&&(r.$infixName=e)}return r(n),i?this.construct():void 0}}extractHiddenTokens(t){const e=this.lexerResult.hidden;if(!e.length)return[];const r=t.startOffset;for(let n=0;nr)return e.splice(0,n)}return e.splice(0,e.length)}consume(t,e,r){const n=this.wrapper.wrapConsume(t,e);if(!this.isRecording()&&this.isValidToken(n)){const t=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(t);const e=this.nodeBuilder.buildLeafNode(n,r),{assignment:i,crossRef:a}=this.getAssignment(r),o=this.current;if(i){const t=(0,s.wb)(r)?n.image:this.converter.convert(n.image,e);this.assign(i.operator,i.feature,t,e,a)}else if(pt(o)){let t=n.image;(0,s.wb)(r)||(t=this.converter.convert(t,e).toString()),o.value+=t}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&"number"==typeof t.endOffset&&!isNaN(t.endOffset)}subrule(t,e,r,n,i){let a,s;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(n));try{s=this.wrapper.wrapSubrule(t,e,i)}finally{this.isRecording()||(void 0!==s||r||(s=this.construct()),void 0!==s&&a&&a.length>0&&this.performSubruleAssignment(s,n,a))}}performSubruleAssignment(t,e,r){const{assignment:n,crossRef:i}=this.getAssignment(e);if(n)this.assign(n.operator,n.feature,t,r,i);else if(!n){const e=this.current;if(pt(e))e.value+=t.toString();else if("object"==typeof t&&t){const r=this.assignWithoutOverride(t,e);this.stack.pop(),this.stack.push(r)}}}action(t,e){if(!this.isRecording()){let r=this.current;if(e.feature&&e.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode);this.nodeBuilder.buildCompositeNode(e).content.push(r.$cstNode);const n={$type:t};this.stack.push(n),this.assign(e.operator,e.feature,r,r.$cstNode)}else r.$type=t}}construct(){if(this.isRecording())return;const t=this.stack.pop();return this.nodeBuilder.construct(t),"$infixName"in t?this.constructInfix(t,this.operatorPrecedence.get(t.$infixName)):pt(t)?this.converter.convert(t.value,t.$cstNode):((0,it.OP)(this.astReflection,t),t)}constructInfix(t,e){const r=t.parts;if(!Array.isArray(r)||0===r.length)return;const n=t.operators;if(!Array.isArray(n)||r.length<2)return r[0];let i=0,a=-1;for(let f=0;fa?(a=r.precedence,i=f):r.precedence===a&&(r.rightAssoc||(i=f))}const s=n.slice(0,i),o=n.slice(i+1),l=r.slice(0,i+1),c=r.slice(i+1),h={$infixName:t.$infixName,$type:t.$type,$cstNode:t.$cstNode,parts:l,operators:s},u={$infixName:t.$infixName,$type:t.$type,$cstNode:t.$cstNode,parts:c,operators:o},d=this.constructInfix(h,e),p=this.constructInfix(u,e);return{$type:t.$type,$cstNode:t.$cstNode,left:d,operator:n[i],right:p}}getAssignment(t){if(!this.assignmentMap.has(t)){const e=(0,it.XG)(t,s.wh);this.assignmentMap.set(t,{assignment:e,crossRef:e&&(0,s._c)(e.terminal)?e.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(t)}assign(t,e,r,n,i){const a=this.current;let s;switch(s="single"===i&&"string"==typeof r?this.linker.buildReference(a,e,n,r):"multi"===i&&"string"==typeof r?this.linker.buildMultiReference(a,e,n,r):r,t){case"=":a[e]=s;break;case"?=":a[e]=!0;break;case"+=":Array.isArray(a[e])||(a[e]=[]),a[e].push(s)}}assignWithoutOverride(t,e){for(const[n,i]of Object.entries(e)){const e=t[n];void 0===e?t[n]=i:Array.isArray(e)&&Array.isArray(i)&&(i.push(...e),t[n]=i)}const r=t.$cstNode;return r&&(r.astNode=void 0,t.$cstNode=void 0),t}get definitionErrors(){return this.wrapper.definitionErrors}}class yt{buildMismatchTokenMessage(t){return o.my.buildMismatchTokenMessage(t)}buildNotAllInputParsedMessage(t){return o.my.buildNotAllInputParsedMessage(t)}buildNoViableAltMessage(t){return o.my.buildNoViableAltMessage(t)}buildEarlyExitMessage(t){return o.my.buildEarlyExitMessage(t)}}class vt extends yt{buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${t.LABEL?"`"+t.LABEL+"`":t.name.endsWith(":KW")?`keyword '${t.name.substring(0,t.name.length-3)}'`:`token of type '${t.name}'`} but found \`${e.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:t}){return`Expecting end of file but found \`${t.image}\`.`}}class bt extends gt{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(t){this.resetState();const e=this.lexer.tokenize(t,{mode:"partial"});return this.tokens=e.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(t,e){const r=this.wrapper.DEFINE_RULE(ft(t.name),this.startImplementation(e).bind(this));return this.allRules.set(t.name,r),t.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(t){return e=>{const r=this.keepStackSize();try{t(e)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const t=this.elementStack.length;return this.stackSize=t,t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,e,r){this.wrapper.wrapConsume(t,e),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(t,e,r,n,i){this.before(n),this.wrapper.wrapSubrule(t,e,i),this.after(n)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){if(!this.isRecording()){const e=this.elementStack.lastIndexOf(t);e>=0&&this.elementStack.splice(e)}}get currIdx(){return this.wrapper.currIdx}}const xt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new vt};class wt extends o.jr{constructor(t,e){super(t,{...xt,lookaheadStrategy:e&&"maxLookahead"in e?new o.T6({maxLookahead:e.maxLookahead}):new U({logging:e.skipValidations?()=>{}:void 0}),...e})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,e,r){return this.RULE(t,e,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,e){return this.consume(t,e,void 0)}wrapSubrule(t,e,r){return this.subrule(t,e,{ARGS:[r]})}wrapOr(t,e){this.or(t,e)}wrapOption(t,e){this.option(t,e)}wrapMany(t,e){this.many(t,e)}wrapAtLeastOne(t,e){this.atLeastOne(t,e)}rule(t){return t.call(this,{})}}class Tt extends wt{constructor(t,e,r){super(t,e),this.task=r}rule(t){this.task.start(),this.task.startSubTask(this.ruleName(t));try{return super.rule(t)}finally{this.task.stopSubTask(this.ruleName(t)),this.task.stop()}}ruleName(t){return t.ruleName}subrule(t,e,r){this.task.startSubTask(this.ruleName(e));try{return super.subrule(t,e,r)}finally{this.task.stopSubTask(this.ruleName(e))}}}var kt=r(1564),At=r(1719);function _t(t,e,r){return function(t,e){const r=(0,i.YV)(e,!1),n=(0,At.Td)(e.rules).filter(s.s7).filter(t=>r.has(t));for(const i of n){const e={...t,consume:1,optional:1,subrule:1,many:1,or:1};t.parser.rule(i,Ct(e,i.definition))}const a=(0,At.Td)(e.rules).filter(s.NT).filter(t=>r.has(t));for(const i of a)t.parser.rule(i,Et(t,i))}({parser:e,tokens:r,ruleNames:new Map},t),e}function Et(t,e){const r=e.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if((0,s.rE)(r))throw new Error("Cannot use terminal rule in infix expression");const n=e.operators.precedences.flatMap(t=>t.operators),i={$type:"Group",elements:[]},a={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},o={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(a,o);const l={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},c={...a,$container:o};o.elements.push(l,c);const h=n.map(e=>t.tokens[e.value]).map((e,r)=>({ALT:()=>t.parser.consume(r,e,l)}));let u;return e=>{u??(u=Nt(t,r)),t.parser.subrule(0,u,!1,a,e),t.parser.many(0,{DEF:()=>{t.parser.alternatives(0,h),t.parser.subrule(1,u,!1,c,e)}})}}function Ct(t,e,r=!1){let n;if((0,s.wb)(e))n=function(t,e){const r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}(t,e);else if((0,s.ve)(e))n=function(t,e){const r=(0,i.Uz)(e);return()=>t.parser.action(r,e)}(t,e);else if((0,s.wh)(e))n=Ct(t,e.terminal);else if((0,s._c)(e))n=Lt(t,e);else if((0,s.$g)(e))n=function(t,e){const r=e.rule.ref;if((0,s.cM)(r)){const n=t.subrule++,i=(0,s.s7)(r)&&r.fragment,a=e.arguments.length>0?function(t,e){if(e.some(t=>t.calledByName)){const t=e.map(t=>({parameterName:t.parameter?.ref?.name,predicate:St(t.value)}));return e=>{const r={};for(const{parameterName:n,predicate:i}of t)n&&(r[n]=i(e));return r}}{const r=e.map(t=>St(t.value));return e=>{const n={};for(let i=0;i({});let o;return s=>{o??(o=Nt(t,r)),t.parser.subrule(n,o,i,e,a(s))}}if((0,s.rE)(r)){const n=t.consume++,i=It(t,r.name);return()=>t.parser.consume(n,i,e)}if(!r)throw new kt.WB(e.$cstNode,`Undefined rule: ${e.rule.$refText}`);(0,kt.dr)(r)}(t,e);else if((0,s.jp)(e))n=function(t,e){if(1===e.elements.length)return Ct(t,e.elements[0]);{const r=[];for(const i of e.elements){const e={ALT:Ct(t,i,!0)},n=Rt(i);n&&(e.GATE=St(n)),r.push(e)}const n=t.or++;return e=>t.parser.alternatives(n,r.map(t=>{const r={ALT:()=>t.ALT(e)},n=t.GATE;return n&&(r.GATE=()=>n(e)),r}))}}(t,e);else if((0,s.cY)(e))n=function(t,e){if(1===e.elements.length)return Ct(t,e.elements[0]);const r=[];for(const o of e.elements){const e={ALT:Ct(t,o,!0)},n=Rt(o);n&&(e.GATE=St(n)),r.push(e)}const n=t.or++,i=(t,e)=>`uGroup_${t}_${e.getRuleStack().join("-")}`,a=e=>t.parser.alternatives(n,r.map((r,a)=>{const s={ALT:()=>!0},o=t.parser;s.ALT=()=>{if(r.ALT(e),!o.isRecording()){const t=i(n,o);o.unorderedGroups.get(t)||o.unorderedGroups.set(t,[]);const e=o.unorderedGroups.get(t);void 0===e?.[a]&&(e[a]=!0)}};const l=r.GATE;return s.GATE=l?()=>l(e):()=>{const t=o.unorderedGroups.get(i(n,o));return!t?.[a]},s})),s=Dt(t,Rt(e),a,"*");return e=>{s(e),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(n,t.parser))}}(t,e);else if((0,s.IZ)(e))n=function(t,e){const r=e.elements.map(e=>Ct(t,e));return t=>r.forEach(e=>e(t))}(t,e);else{if(!(0,s.FO)(e))throw new kt.WB(e.$cstNode,`Unexpected element type: ${e.$type}`);{const r=t.consume++;n=()=>t.parser.consume(r,o.LT,e)}}return Dt(t,r?void 0:Rt(e),n,e.cardinality)}function St(t){if((0,s.RP)(t)){const e=St(t.left),r=St(t.right);return t=>e(t)||r(t)}if((0,s.Tu)(t)){const e=St(t.left),r=St(t.right);return t=>e(t)&&r(t)}if((0,s.Ct)(t)){const e=St(t.value);return t=>!e(t)}if((0,s.TF)(t)){const e=t.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if((0,s.Cz)(t)){const e=Boolean(t.true);return()=>e}(0,kt.dr)(t)}function Rt(t){if((0,s.IZ)(t))return t.guardCondition}function Lt(t,e,r=e.terminal){if(r){if((0,s.$g)(r)&&(0,s.s7)(r.rule.ref)){const n=r.rule.ref,i=t.subrule++;let a;return r=>{a??(a=Nt(t,n)),t.parser.subrule(i,a,!1,e,r)}}if((0,s.$g)(r)&&(0,s.rE)(r.rule.ref)){const n=t.consume++,i=It(t,r.rule.ref.name);return()=>t.parser.consume(n,i,e)}if((0,s.wb)(r)){const n=t.consume++,i=It(t,r.value);return()=>t.parser.consume(n,i,e)}throw new Error("Could not build cross reference parser")}{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const r=(0,i.U5)(e.type.ref),n=r?.terminal;if(!n)throw new Error("Could not find name assignment for type: "+(0,i.Uz)(e.type.ref));return Lt(t,e,n)}}function Dt(t,e,r,n){const i=e&&St(e);if(!n){if(i){const e=t.or++;return n=>t.parser.alternatives(e,[{ALT:()=>r(n),GATE:()=>i(n)},{ALT:(0,o.mT)(),GATE:()=>!i(n)}])}return r}if("*"===n){const e=t.many++;return n=>t.parser.many(e,{DEF:()=>r(n),GATE:i?()=>i(n):void 0})}if("+"===n){const e=t.many++;if(i){const n=t.or++;return a=>t.parser.alternatives(n,[{ALT:()=>t.parser.atLeastOne(e,{DEF:()=>r(a)}),GATE:()=>i(a)},{ALT:(0,o.mT)(),GATE:()=>!i(a)}])}return n=>t.parser.atLeastOne(e,{DEF:()=>r(n)})}if("?"===n){const e=t.optional++;return n=>t.parser.optional(e,{DEF:()=>r(n),GATE:i?()=>i(n):void 0})}(0,kt.dr)(n)}function Nt(t,e){const r=function(t,e){if((0,s.cM)(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,i=e.$type;for(;!(0,s.s7)(n);){if((0,s.IZ)(n)||(0,s.jp)(n)||(0,s.cY)(n)){i=n.elements.indexOf(r).toString()+":"+i}r=n,n=n.$container}return i=n.name+":"+i,t.ruleNames.set(e,i),i}}(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function It(t,e){const r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}function Mt(t){const e=function(t){const e=t.Grammar,r=t.parser.Lexer,n=new mt(t);return _t(e,n,r.definition)}(t);return e.finalize(),e}var Ot=r(1945),Pt=r(5033),$t=r(9850),Bt=r(2479);let Ft=0,zt=10;const Kt=Symbol("OperationCancelled");function qt(t){return t===Kt}async function Ut(t){if(t===$t.CancellationToken.None)return;const e=performance.now();if(e-Ft>=zt&&(Ft=e,await new Promise(t=>{"undefined"==typeof setImmediate?setTimeout(t,0):setImmediate(t)}),Ft=performance.now()),t.isCancellationRequested)throw Kt}class jt{constructor(){this.promise=new Promise((t,e)=>{this.resolve=e=>(t(e),this),this.reject=t=>(e(t),this)})}}class Gt{constructor(t,e,r,n){this._uri=t,this._languageId=e,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const e=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(e,r)}return this._content}update(t,e){for(const r of t)if(Gt.isIncremental(r)){const t=Xt(r.range),e=this.offsetAt(t.start),n=this.offsetAt(t.end);this._content=this._content.substring(0,e)+r.text+this._content.substring(n,this._content.length);const i=Math.max(t.start.line,0),a=Math.max(t.end.line,0);let s=this._lineOffsets;const o=Ht(r.text,!1,e);if(a-i===o.length)for(let r=0,c=o.length;rt?n=i:r=i+1}const i=r-1;return{line:i,character:(t=this.ensureBeforeEOL(t,e[i]))-e[i]}}offsetAt(t){const e=this.getLineOffsets();if(t.line>=e.length)return this._content.length;if(t.line<0)return 0;const r=e[t.line];if(t.character<=0)return r;const n=t.line+1e&&Vt(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){const e=t;return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}static isFull(t){const e=t;return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}}var Yt;function Wt(t,e){if(t.length<=1)return t;const r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);Wt(n,e),Wt(i,e);let a=0,s=0,o=0;for(;ar.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function Zt(t){const e=Xt(t.range);return e!==t.range?{newText:t.newText,range:e}:t}!function(t){t.create=function(t,e,r,n){return new Gt(t,e,r,n)},t.update=function(t,e,r){if(t instanceof Gt)return t.update(e,r),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")},t.applyEdits=function(t,e){const r=t.getText(),n=Wt(e.map(Zt),(t,e)=>{const r=t.range.start.line-e.range.start.line;return 0===r?t.range.start.character-e.range.start.character:r});let i=0;const a=[];for(const s of n){const e=t.offsetAt(s.range.start);if(ei&&a.push(r.substring(i,e)),s.newText.length&&a.push(s.newText),i=t.offsetAt(s.range.end)}return a.push(r.substr(i)),a.join("")}}(Yt||(Yt={}));var Qt,Jt,te=r(7608);!function(t){t.basename=te.A.basename,t.dirname=te.A.dirname,t.extname=te.A.extname,t.joinPath=te.A.joinPath,t.resolvePath=te.A.resolvePath;const e="object"==typeof process&&"win32"===process?.platform;t.equals=function(t,e){return t?.toString()===e?.toString()},t.relative=function(t,r){const n="string"==typeof t?te.r.parse(t).path:t.path,i="string"==typeof r?te.r.parse(r).path:r.path,a=n.split("/").filter(t=>t.length>0),s=i.split("/").filter(t=>t.length>0);if(e){const t=/^[A-Z]:$/;if(a[0]&&t.test(a[0])&&(a[0]=a[0].toLowerCase()),s[0]&&t.test(s[0])&&(s[0]=s[0].toLowerCase()),a[0]!==s[0])return i.substring(1)}let o=0;for(;o({name:t.name,uri:Qt.joinPath(te.r.parse(e),t.name).toString(),element:t.element})):[]}all(){return this.collectValues(this.root)}findAll(t){const e=this.getNode(Qt.normalize(t),!1);return e?this.collectValues(e):[]}getNode(t,e){const r=t.split("/");"/"===t.charAt(t.length-1)&&r.pop();let n=this.root;for(const i of r){let t=n.children.get(i);if(!t){if(!e)return;t={name:i,children:new Map,parent:n},n.children.set(i,t)}n=t}return n}collectValues(t){const e=[];t.element&&e.push(t.element);for(const r of t.children.values())e.push(...this.collectValues(r));return e}}!function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"}(Jt||(Jt={}));class re{constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,e=$t.CancellationToken.None){const r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??te.r.parse(t.uri),$t.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromString(t,e,r){return $t.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromModel(t,e){return this.create(e,{$model:t})}create(t,e,r){if("string"==typeof e){const n=this.parse(t,e,r);return this.createLangiumDocument(n,t,void 0,e)}if("$model"in e){const r={value:e.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(r,t)}{const n=this.parse(t,e.getText(),r);return this.createLangiumDocument(n,t,e)}}async createAsync(t,e,r){if("string"==typeof e){const n=await this.parseAsync(t,e,r);return this.createLangiumDocument(n,t,void 0,e)}{const n=await this.parseAsync(t,e.getText(),r);return this.createLangiumDocument(n,t,e)}}createLangiumDocument(t,e,r,n){let i;if(r)i={parseResult:t,uri:e,state:Jt.Parsed,references:[],textDocument:r};else{const r=this.createTextDocumentGetter(e,n);i={parseResult:t,uri:e,state:Jt.Parsed,references:[],get textDocument(){return r()}}}return t.value.$document=i,i}async update(t,e){const r=t.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(t.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(t.uri);if(n)Object.defineProperty(t,"textDocument",{value:n});else{const e=this.createTextDocumentGetter(t.uri,i);Object.defineProperty(t,"textDocument",{get:e})}return r!==i&&(t.parseResult=await this.parseAsync(t.uri,i,e),t.parseResult.value.$document=t),t.state=Jt.Parsed,t}parse(t,e,r){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(e,r)}parseAsync(t,e,r){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(e,r)}createTextDocumentGetter(t,e){const r=this.serviceRegistry;let n;return()=>n??(n=Yt.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??""))}}class ne{constructor(t){this.documentTrie=new ee,this.services=t,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.documentBuilder=()=>t.workspace.DocumentBuilder}get all(){return(0,At.Td)(this.documentTrie.all())}addDocument(t){const e=t.uri.toString();if(this.documentTrie.has(e))throw new Error(`A document with the URI '${e}' is already present.`);this.documentTrie.insert(e,t)}getDocument(t){const e=t.toString();return this.documentTrie.find(e)}getDocuments(t){const e=t.toString();return this.documentTrie.findAll(e)}async getOrCreateDocument(t,e){let r=this.getDocument(t);return r||(r=await this.langiumDocumentFactory.fromUri(t,e),this.addDocument(r),r)}createDocument(t,e,r){if(r)return this.langiumDocumentFactory.fromString(e,t,r).then(t=>(this.addDocument(t),t));{const r=this.langiumDocumentFactory.fromString(e,t);return this.addDocument(r),r}}hasDocument(t){return this.documentTrie.has(t.toString())}invalidateDocument(t){const e=t.toString(),r=this.documentTrie.find(e);return r&&this.documentBuilder().resetToState(r,Jt.Changed),r}deleteDocument(t){const e=t.toString(),r=this.documentTrie.find(e);return r&&(r.state=Jt.Changed,this.documentTrie.delete(e)),r}deleteDocuments(t){const e=t.toString(),r=this.documentTrie.findAll(e);for(const n of r)n.state=Jt.Changed;return this.documentTrie.delete(e),r}}const ie=Symbol("RefResolving");class ae{constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator,this.profiler=t.shared.profilers.LangiumProfiler,this.languageId=t.LanguageMetaData.languageId}async link(t,e=$t.CancellationToken.None){if(this.profiler?.isActive("linking")){const r=this.profiler.createTask("linking",this.languageId);r.start();try{for(const n of(0,it.jm)(t.parseResult.value))await Ut(e),(0,it.DM)(n).forEach(e=>{const i=`${n.$type}:${e.property}`;r.startSubTask(i);try{this.doLink(e,t)}finally{r.stopSubTask(i)}})}finally{r.stop()}}else for(const r of(0,it.jm)(t.parseResult.value))await Ut(e),(0,it.DM)(r).forEach(e=>this.doLink(e,t))}doLink(t,e){const r=t.reference;if("_ref"in r&&void 0===r._ref){r._ref=ie;try{const e=this.getCandidate(t);if((0,Bt.Zl)(e))r._ref=e;else{r._nodeDescription=e;const n=this.loadAstNode(e);r._ref=n??this.createLinkingError(t,e)}}catch(n){console.error(`An error occurred while resolving reference to '${r.$refText}':`,n);const e=n.message??String(n);r._ref={info:t,message:`An error occurred while resolving reference to '${r.$refText}': ${e}`}}e.references.push(r)}else if("_items"in r&&void 0===r._items){r._items=ie;try{const e=this.getCandidates(t),n=[];if((0,Bt.Zl)(e))r._linkingError=e;else for(const t of e){const e=this.loadAstNode(t);e&&n.push({ref:e,$nodeDescription:t})}r._items=n}catch(n){r._linkingError={info:t,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`},r._items=[]}e.references.push(r)}}unlink(t){for(const e of t.references)"_ref"in e?(e._ref=void 0,delete e._nodeDescription):"_items"in e&&(e._items=void 0,delete e._linkingError);t.references=[]}getCandidate(t){return this.scopeProvider.getScope(t).getElement(t.reference.$refText)??this.createLinkingError(t)}getCandidates(t){const e=this.scopeProvider.getScope(t).getElements(t.reference.$refText).distinct(t=>`${t.documentUri}#${t.path}`).toArray();return e.length>0?e:this.createLinkingError(t)}buildReference(t,e,r,n){const i=this,a={$refNode:r,$refText:n,_ref:void 0,get ref(){if((0,Bt.ng)(this._ref))return this._ref;if((0,Bt.Nr)(this._nodeDescription)){const r=i.loadAstNode(this._nodeDescription);this._ref=r??i.createLinkingError({reference:a,container:t,property:e},this._nodeDescription)}else if(void 0===this._ref){this._ref=ie;const r=(0,it.cQ)(t).$document,n=i.getLinkedNode({reference:a,container:t,property:e});if(n.error&&r&&r.state0?void 0:this._linkingError=i.createLinkingError({reference:a,container:t,property:e})}};return a}throwCyclicReferenceError(t,e,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(t)}/${e} (symbol '${r}')`)}getLinkedNode(t){try{const e=this.getCandidate(t);if((0,Bt.Zl)(e))return{error:e};const r=this.loadAstNode(e);return r?{node:r,descr:e}:{descr:e,error:this.createLinkingError(t,e)}}catch(e){console.error(`An error occurred while resolving reference to '${t.reference.$refText}':`,e);const r=e.message??String(e);return{error:{info:t,message:`An error occurred while resolving reference to '${t.reference.$refText}': ${r}`}}}}loadAstNode(t){if(t.node)return t.node;const e=this.langiumDocuments().getDocument(t.documentUri);return e?this.astNodeLocator.getAstNode(e.parseResult.value,t.path):void 0}createLinkingError(t,e){const r=(0,it.cQ)(t.container).$document;r&&r.state(0,s._c)(t)&&t.isMulti)}findDeclarations(t){if(t){const e=(0,i.Rp)(t),r=t.astNode;if(e&&r){const n=r[e.feature];if((0,Bt.A_)(n)||(0,Bt.Dm)(n))return(0,it.tC)(n);if(Array.isArray(n))for(const e of n)if(((0,Bt.A_)(e)||(0,Bt.Dm)(e))&&e.$refNode&&e.$refNode.offset<=t.offset&&e.$refNode.end>=t.end)return(0,it.tC)(e)}if(r){const e=this.nameProvider.getNameNode(r);if(e&&(e===t||(0,n.pO)(t,e)))return this.getSelfNodes(r)}}return[]}getSelfNodes(t){if(this.hasMultiReference){const e=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t)),r=this.getNodeFromReferenceDescription(e.head());if(r)for(const n of(0,it.DM)(r))if((0,Bt.Dm)(n.reference)&&n.reference.items.some(e=>e.ref===t))return n.reference.items.map(t=>t.ref);return[t]}return[t]}getNodeFromReferenceDescription(t){if(!t)return;const e=this.documents.getDocument(t.sourceUri);return e?this.nodeLocator.getAstNode(e.parseResult.value,t.sourcePath):void 0}findDeclarationNodes(t){const e=this.findDeclarations(t),r=[];for(const n of e){const t=this.nameProvider.getNameNode(n)??n.$cstNode;t&&r.push(t)}return r}findReferences(t,e){const r=[];e.includeDeclaration&&r.push(...this.getSelfReferences(t));let n=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(n=n.filter(t=>Qt.equals(t.sourceUri,e.documentUri))),r.push(...n),(0,At.Td)(r)}getSelfReferences(t){const e=this.getSelfNodes(t),r=[];for(const i of e){const t=this.nameProvider.getNameNode(i);if(t){const e=(0,it.YE)(i),a=this.nodeLocator.getAstNodePath(i);r.push({sourceUri:e.uri,sourcePath:a,targetUri:e.uri,targetPath:a,segment:(0,n.SX)(t),local:!0})}}return r}}class le{constructor(t){if(this.map=new Map,t)for(const[e,r]of t)this.add(e,r)}get size(){return At.iD.sum((0,At.Td)(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,e){if(void 0===e)return this.map.delete(t);{const r=this.map.get(t);if(r){const n=r.indexOf(e);if(n>=0)return 1===r.length?this.map.delete(t):r.splice(n,1),!0}return!1}}get(t){return this.map.get(t)??[]}getStream(t){const e=this.map.get(t);return e?(0,At.Td)(e):At.B5}has(t,e){if(void 0===e)return this.map.has(t);{const r=this.map.get(t);return!!r&&r.indexOf(e)>=0}}add(t,e){return this.map.has(t)?this.map.get(t).push(e):this.map.set(t,[e]),this}addAll(t,e){return this.map.has(t)?this.map.get(t).push(...e):this.map.set(t,Array.from(e)),this}forEach(t){this.map.forEach((e,r)=>e.forEach(e=>t(e,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return(0,At.Td)(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return(0,At.Td)(this.map.keys())}values(){return(0,At.Td)(this.map.values()).flat()}entriesGroupedByKey(){return(0,At.Td)(this.map.entries())}}class ce{get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(const[e,r]of t)this.set(e,r)}clear(){this.map.clear(),this.inverse.clear()}set(t,e){return this.map.set(t,e),this.inverse.set(e,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){const e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.inverse.delete(e),!0)}}class he{constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(t,e=$t.CancellationToken.None){return this.collectExportedSymbolsForNode(t.parseResult.value,t,void 0,e)}async collectExportedSymbolsForNode(t,e,r=it.VN,n=$t.CancellationToken.None){const i=[];this.addExportedSymbol(t,i,e);for(const a of r(t))await Ut(n),this.addExportedSymbol(a,i,e);return i}addExportedSymbol(t,e,r){const n=this.nameProvider.getName(t);n&&e.push(this.descriptions.createDescription(t,n,r))}async collectLocalSymbols(t,e=$t.CancellationToken.None){const r=t.parseResult.value,n=new le;for(const i of(0,it.Uo)(r))await Ut(e),this.addLocalSymbol(i,t,n);return n}addLocalSymbol(t,e,r){const n=t.$container;if(n){const i=this.nameProvider.getName(t);i&&r.add(n,this.descriptions.createDescription(t,i,e))}}}class ue{constructor(t,e,r){this.elements=t,this.outerScope=e,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){const e=this.caseInsensitive?t.toLowerCase():t,r=this.caseInsensitive?this.elements.find(t=>t.name.toLowerCase()===e):this.elements.find(e=>e.name===t);return r||(this.outerScope?this.outerScope.getElement(t):void 0)}getElements(t){const e=this.caseInsensitive?t.toLowerCase():t,r=this.caseInsensitive?this.elements.filter(t=>t.name.toLowerCase()===e):this.elements.filter(e=>e.name===t);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(t)):r}}class de{constructor(t,e,r){this.elements=new le,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(const n of t){const t=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(t,n)}this.outerScope=e}getElement(t){const e=this.caseInsensitive?t.toLowerCase():t,r=this.elements.get(e)[0];return r||(this.outerScope?this.outerScope.getElement(t):void 0)}getElements(t){const e=this.caseInsensitive?t.toLowerCase():t,r=this.elements.get(e);return(this.concatOuterScope||0===r.length)&&this.outerScope?(0,At.Td)(r).concat(this.outerScope.getElements(t)):(0,At.Td)(r)}getAllElements(){let t=(0,At.Td)(this.elements.values());return this.outerScope&&(t=t.concat(this.outerScope.getAllElements())),t}}class pe{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(t){this.toDispose.push(t)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(t=>t.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class fe extends pe{constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,e){this.throwIfDisposed(),this.cache.set(t,e)}get(t,e){if(this.throwIfDisposed(),this.cache.has(t))return this.cache.get(t);if(e){const r=e();return this.cache.set(t,r),r}}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}}class ge extends pe{constructor(t){super(),this.cache=new Map,this.converter=t??(t=>t)}has(t,e){return this.throwIfDisposed(),this.cacheForContext(t).has(e)}set(t,e,r){this.throwIfDisposed(),this.cacheForContext(t).set(e,r)}get(t,e,r){this.throwIfDisposed();const n=this.cacheForContext(t);if(n.has(e))return n.get(e);if(r){const t=r();return n.set(e,t),t}}delete(t,e){return this.throwIfDisposed(),this.cacheForContext(t).delete(e)}clear(t){if(this.throwIfDisposed(),t){const e=this.converter(t);this.cache.delete(e)}else this.cache.clear()}cacheForContext(t){const e=this.converter(t);let r=this.cache.get(e);return r||(r=new Map,this.cache.set(e,r)),r}}class me extends fe{constructor(t,e){super(),e?(this.toDispose.push(t.workspace.DocumentBuilder.onBuildPhase(e,()=>{this.clear()})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{e.length>0&&this.clear()}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class ye{constructor(t){this.reflection=t.shared.AstReflection,this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider,this.indexManager=t.shared.workspace.IndexManager,this.globalScopeCache=new me(t.shared)}getScope(t){const e=[],r=this.reflection.getReferenceType(t),n=(0,it.YE)(t.container).localSymbols;if(n){let i=t.container;do{n.has(i)&&e.push(n.getStream(i).filter(t=>this.reflection.isSubtype(t.type,r))),i=i.$container}while(i)}let i=this.getGlobalScope(r,t);for(let a=e.length-1;a>=0;a--)i=this.createScope(e[a],i);return i}createScope(t,e,r){return new ue((0,At.Td)(t),e,r)}createScopeForNodes(t,e,r){const n=(0,At.Td)(t).map(t=>{const e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable();return new ue(n,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new de(this.indexManager.allElements(t)))}}function ve(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}class be{constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,e){const r=e??{},n=e?.replacer,i=(t,e)=>this.replacer(t,e,r),a=n?(t,e)=>n(t,e,i):i;try{return this.currentDocument=(0,it.YE)(t),JSON.stringify(t,a,e?.space)}finally{this.currentDocument=void 0}}deserialize(t,e){const r=e??{},n=JSON.parse(t);return this.linkNode(n,n,r),n}replacer(t,e,{refText:r,sourceText:n,textRegions:i,comments:a,uriConverter:s}){if(!this.ignoreProperties.has(t)){if((0,Bt.A_)(e)){const t=e.ref,n=r?e.$refText:void 0;if(t){const e=(0,it.YE)(t);let r="";this.currentDocument&&this.currentDocument!==e&&(r=s?s(e.uri,t):e.uri.toString());return{$ref:`${r}#${this.astNodeLocator.getAstNodePath(t)}`,$refText:n}}return{$error:e.error?.message??"Could not resolve reference",$refText:n}}if((0,Bt.Dm)(e)){const t=r?e.$refText:void 0,n=[];for(const r of e.items){const t=r.ref,e=(0,it.YE)(r.ref);let i="";this.currentDocument&&this.currentDocument!==e&&(i=s?s(e.uri,t):e.uri.toString());const a=this.astNodeLocator.getAstNodePath(t);n.push(`${i}#${a}`)}return{$refs:n,$refText:t}}if((0,Bt.ng)(e)){let r;if(i&&(r=this.addAstNodeRegionWithAssignmentsTo({...e}),t&&!e.$document||!r?.$textRegion||(r.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!t&&(r??(r={...e}),r.$sourceText=e.$cstNode?.text),a){r??(r={...e});const t=this.commentProvider.getComment(e);t&&(r.$comment=t.replace(/\r/g,""))}return r??e}return e}}addAstNodeRegionWithAssignmentsTo(t){const e=t=>({offset:t.offset,end:t.end,length:t.length,range:t.range});if(t.$cstNode){const r=(t.$textRegion=e(t.$cstNode)).assignments={};return Object.keys(t).filter(t=>!t.startsWith("$")).forEach(n=>{const a=(0,i.Bd)(t.$cstNode,n).map(e);0!==a.length&&(r[n]=a)}),t}}linkNode(t,e,r,n,i,a){for(const[o,l]of Object.entries(t))if(Array.isArray(l))for(let n=0;n{await this.handleException(()=>t.call(e,r,n,i),"An error occurred during validation",n,r)}}async handleException(t,e,r,n){try{await t()}catch(i){if(qt(i))throw i;console.error(`${e}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);r("error",`${e}: ${i instanceof Error?i.message:String(i)}`,{node:n})}}addEntry(t,e){if("AstNode"!==t)for(const r of this.reflection.getAllSubTypes(t))this.entries.add(r,e);else this.entries.add("AstNode",e)}getChecks(t,e){let r=(0,At.Td)(this.entries.get(t)).concat(this.entries.get("AstNode"));return e&&(r=r.filter(t=>e.includes(t.category))),r.map(t=>t.check)}registerBeforeDocument(t,e=this){this.entriesBefore.push(this.wrapPreparationException(t,"An error occurred during set-up of the validation",e))}registerAfterDocument(t,e=this){this.entriesAfter.push(this.wrapPreparationException(t,"An error occurred during tear-down of the validation",e))}wrapPreparationException(t,e,r){return async(n,i,a,s)=>{await this.handleException(()=>t.call(r,n,i,a,s),e,i,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(t){return this.knownCategories}}const Ae=Object.freeze({validateNode:!0,validateChildren:!0});class _e{constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData,this.profiler=t.shared.profilers.LangiumProfiler,this.languageId=t.LanguageMetaData.languageId}async validateDocument(t,e={},r=$t.CancellationToken.None){const n=t.parseResult,i=[];if(await Ut(r),!e.categories||e.categories.includes("built-in")){if(this.processLexingErrors(n,i,e),e.stopAfterLexingErrors&&i.some(t=>t.data?.code===Re.LexingError))return i;if(this.processParsingErrors(n,i,e),e.stopAfterParsingErrors&&i.some(t=>t.data?.code===Re.ParsingError))return i;if(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some(t=>t.data?.code===Re.LinkingError))return i}try{i.push(...await this.validateAst(n.value,e,r))}catch(a){if(qt(a))throw a;console.error("An error occurred during validation:",a)}return await Ut(r),i}processLexingErrors(t,e,r){const n=[...t.lexerErrors,...t.lexerReport?.diagnostics??[]];for(const i of n){const t=i.severity??"error",r={severity:Ce(t),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:Se(t),source:this.getSource()};e.push(r)}}processParsingErrors(t,e,r){for(const i of t.parserErrors){let t;if(isNaN(i.token.startOffset)){if("previousToken"in i){const e=i.previousToken;if(isNaN(e.startOffset)){const e={line:0,character:0};t={start:e,end:e}}else{const r={line:e.endLine-1,character:e.endColumn};t={start:r,end:r}}}}else t=(0,n.wf)(i.token);if(t){const r={severity:Ce("error"),range:t,message:i.message,data:we(Re.ParsingError),source:this.getSource()};e.push(r)}}}processLinkingErrors(t,e,r){for(const n of t.references){const t=n.error;if(t){const r={node:t.info.container,range:n.$refNode?.range,property:t.info.property,index:t.info.index,data:{code:Re.LinkingError,containerType:t.info.container.$type,property:t.info.property,refText:t.info.reference.$refText}};e.push(this.toDiagnostic("error",t.message,r))}}}async validateAst(t,e,r=$t.CancellationToken.None){const n=[],i=(t,e,r)=>{n.push(this.toDiagnostic(t,e,r))};return await this.validateAstBefore(t,e,i,r),await this.validateAstNodes(t,e,i,r),await this.validateAstAfter(t,e,i,r),n}async validateAstBefore(t,e,r,n=$t.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const a of i)await Ut(n),await a(t,r,e.categories??[],n)}async validateAstNodes(t,e,r,n=$t.CancellationToken.None){if(this.profiler?.isActive("validating")){const i=this.profiler.createTask("validating",this.languageId);i.start();try{const a=(0,it.jm)(t).iterator();for(const t of a){i.startSubTask(t.$type);const s=this.validateSingleNodeOptions(t,e);if(s.validateNode)try{const i=this.validationRegistry.getChecks(t.$type,e.categories);for(const e of i)await e(t,r,n)}finally{i.stopSubTask(t.$type)}s.validateChildren||a.prune()}}finally{i.stop()}}else{const i=(0,it.jm)(t).iterator();for(const t of i){await Ut(n);const a=this.validateSingleNodeOptions(t,e);if(a.validateNode){const i=this.validationRegistry.getChecks(t.$type,e.categories);for(const e of i)await e(t,r,n)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(t,e){return Ae}async validateAstAfter(t,e,r,n=$t.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const a of i)await Ut(n),await a(t,r,e.categories??[],n)}toDiagnostic(t,e,r){return{message:e,range:Ee(r),severity:Ce(t),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function Ee(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=(0,i.qO)(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=(0,i.SS)(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Ce(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function Se(t){switch(t){case"error":return we(Re.LexingError);case"warning":return we(Re.LexingWarning);case"info":return we(Re.LexingInfo);case"hint":return we(Re.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var Re;!function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"}(Re||(Re={}));class Le{constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(t,e,r){const i=r??(0,it.YE)(t);e??(e=this.nameProvider.getName(t));const a=this.astNodeLocator.getAstNodePath(t);if(!e)throw new Error(`Node at path ${a} has no name.`);let s;const o=()=>s??(s=(0,n.SX)(this.nameProvider.getNameNode(t)??t.$cstNode));return{node:t,name:e,get nameSegment(){return o()},selectionSegment:(0,n.SX)(t.$cstNode),type:t.$type,documentUri:i.uri,path:a}}}class De{constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=$t.CancellationToken.None){const r=[],n=t.parseResult.value;for(const i of(0,it.jm)(n))await Ut(e),(0,it.DM)(i).forEach(t=>{t.reference.error||r.push(...this.createInfoDescriptions(t))});return r}createInfoDescriptions(t){const e=t.reference;if(e.error||!e.$refNode)return[];let r=[];(0,Bt.A_)(e)&&e.$nodeDescription?r=[e.$nodeDescription]:(0,Bt.Dm)(e)&&(r=e.items.map(t=>t.$nodeDescription).filter(t=>void 0!==t));const i=(0,it.YE)(t.container).uri,a=this.nodeLocator.getAstNodePath(t.container),s=[],o=(0,n.SX)(e.$refNode);for(const n of r)s.push({sourceUri:i,sourcePath:a,targetUri:n.documentUri,targetPath:n.path,segment:o,local:Qt.equals(n.documentUri,i)});return s}}class Ne{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){if(t.$container){const e=this.getAstNodePath(t.$container),r=this.getPathSegment(t);return e+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:t,$containerIndex:e}){if(!t)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==e?t+this.indexSeparator+e:t}getAstNode(t,e){return e.split(this.segmentSeparator).reduce((t,e)=>{if(!t||0===e.length)return t;const r=e.indexOf(this.indexSeparator);if(r>0){const n=e.substring(0,r),i=parseInt(e.substring(r+1)),a=t[n];return a?.[i]}return t[e]},t)}}var Ie=r(2676);class Me{constructor(t){this._ready=new jt,this.onConfigurationSectionUpdateEmitter=new Ie.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){this.workspaceConfig=t.capabilities.workspace?.configuration??!1}async initialized(t){if(this.workspaceConfig){if(t.register){const e=this.serviceRegistry.all;t.register({section:e.map(t=>this.toSectionName(t.LanguageMetaData.languageId))})}if(t.fetchConfiguration){const e=this.serviceRegistry.all.map(t=>({section:this.toSectionName(t.LanguageMetaData.languageId)})),r=await t.fetchConfiguration(e);e.forEach((t,e)=>{this.updateSectionConfiguration(t.section,r[e])})}}this._ready.resolve()}updateConfiguration(t){"object"==typeof t.settings&&null!==t.settings&&Object.entries(t.settings).forEach(([t,e])=>{this.updateSectionConfiguration(t,e),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:e})})}updateSectionConfiguration(t,e){this.settings[t]=e}async getConfiguration(t,e){await this.ready;const r=this.toSectionName(t);if(this.settings[r])return this.settings[r][e]}toSectionName(t){return`${t}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}var Oe,Pe=r(4512);!function(t){t.create=function(t){return{dispose:async()=>await t()}}}(Oe||(Oe={}));class $e{constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new le,this.documentPhaseListeners=new le,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Jt.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.textDocuments=t.workspace.TextDocuments,this.indexManager=t.workspace.IndexManager,this.fileSystemProvider=t.workspace.FileSystemProvider,this.workspaceManager=()=>t.workspace.WorkspaceManager,this.serviceRegistry=t.ServiceRegistry}async build(t,e={},r=$t.CancellationToken.None){for(const n of t){const t=n.uri.toString();if(n.state===Jt.Validated){if("boolean"==typeof e.validation&&e.validation)this.resetToState(n,Jt.IndexedReferences);else if("object"==typeof e.validation){const r=this.findMissingValidationCategories(n,e);r.length>0&&(this.buildState.set(t,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(t)?.result}),n.state=Jt.IndexedReferences)}}else this.buildState.delete(t)}this.currentState=Jt.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,e,r)}async update(t,e,r=$t.CancellationToken.None){this.currentState=Jt.Changed;const n=[];for(const o of e){const t=this.langiumDocuments.deleteDocuments(o);for(const e of t)n.push(e.uri),this.cleanUpDeleted(e)}const i=(await Promise.all(t.map(t=>this.findChangedUris(t)))).flat();for(const o of i){let t=this.langiumDocuments.getDocument(o);void 0===t&&(t=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o),t.state=Jt.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,Jt.Changed)}const a=(0,At.Td)(i).concat(n).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!a.has(t.uri.toString())&&this.shouldRelink(t,a)).forEach(t=>this.resetToState(t,Jt.ComputedScopes)),await this.emitUpdate(i,n),await Ut(r);const s=this.sortDocuments(this.langiumDocuments.all.filter(t=>t.state=1}findMissingValidationCategories(t,e){const r=this.buildState.get(t.uri.toString()),n=this.serviceRegistry.getServices(t.uri).validation.ValidationRegistry.getAllValidationCategories(t),i=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?n:new Set,a=void 0===e||!0===e.validation?n:"object"==typeof e.validation?e.validation.categories??n:[];return(0,At.Td)(a).filter(t=>!i.has(t)).toArray()}async findChangedUris(t){if(this.langiumDocuments.getDocument(t)??this.textDocuments?.get(t))return[t];try{const e=await this.fileSystemProvider.stat(t);if(e.isDirectory){return await this.workspaceManager().searchFolder(t)}if(this.workspaceManager().shouldIncludeEntry(e))return[t]}catch{}return[]}async emitUpdate(t,e){await Promise.all(this.updateListeners.map(r=>r(t,e)))}sortDocuments(t){let e=0,r=t.length-1;for(;e=0&&!this.hasTextDocument(t[r]);)r--;evoid 0!==t.error)||this.indexManager.isAffected(t,e)}onUpdate(t){return this.updateListeners.push(t),Oe.create(()=>{const e=this.updateListeners.indexOf(t);e>=0&&this.updateListeners.splice(e,1)})}resetToState(t,e){switch(e){case Jt.Changed:case Jt.Parsed:this.indexManager.removeContent(t.uri);case Jt.IndexedContent:t.localSymbols=void 0;case Jt.ComputedScopes:this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t);case Jt.Linked:this.indexManager.removeReferences(t.uri);case Jt.IndexedReferences:t.diagnostics=void 0,this.buildState.delete(t.uri.toString());case Jt.Validated:}t.state>e&&(t.state=e)}cleanUpDeleted(t){this.buildState.delete(t.uri.toString()),this.indexManager.remove(t.uri),t.state=Jt.Changed}async buildDocuments(t,e,r){this.prepareBuild(t,e),await this.runCancelable(t,Jt.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,Jt.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,Jt.ComputedScopes,r,async t=>{const e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.localSymbols=await e.collectLocalSymbols(t,r)});const n=t.filter(t=>this.shouldLink(t));await this.runCancelable(n,Jt.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(n,Jt.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));const i=t.filter(t=>!!this.shouldValidate(t)||(this.markAsCompleted(t),!1));await this.runCancelable(i,Jt.Validated,r,async t=>{await this.validate(t,r),this.markAsCompleted(t)})}markAsCompleted(t){const e=this.buildState.get(t.uri.toString());e&&(e.completed=!0)}prepareBuild(t,e){for(const r of t){const t=r.uri.toString(),n=this.buildState.get(t);n&&!n.completed||this.buildState.set(t,{completed:!1,options:e,result:n?.result})}}async runCancelable(t,e,r,n){for(const a of t)a.statet.state===e);await this.notifyBuildPhase(i,e,r),this.currentState=e}onBuildPhase(t,e){return this.buildPhaseListeners.add(t,e),Oe.create(()=>{this.buildPhaseListeners.delete(t,e)})}onDocumentPhase(t,e){return this.documentPhaseListeners.add(t,e),Oe.create(()=>{this.documentPhaseListeners.delete(t,e)})}waitUntil(t,e,r){let n;return e&&"path"in e?n=e:r=e,r??(r=$t.CancellationToken.None),n?this.awaitDocumentState(t,n,r):this.awaitBuilderState(t,r)}awaitDocumentState(t,e,r){const n=this.langiumDocuments.getDocument(e);return n?n.state>=t?Promise.resolve(e):r.isCancellationRequested?Promise.reject(Kt):this.currentState>=t&&t>n.state?Promise.reject(new Pe.ResponseError(Pe.LSPErrorCodes.RequestFailed,`Document state of ${e.toString()} is ${Jt[n.state]}, requiring ${Jt[t]}, but workspace state is already ${Jt[this.currentState]}. Returning undefined.`)):new Promise((n,i)=>{const a=this.onDocumentPhase(t,t=>{Qt.equals(t.uri,e)&&(a.dispose(),s.dispose(),n(t.uri))}),s=r.onCancellationRequested(()=>{a.dispose(),s.dispose(),i(Kt)})}):Promise.reject(new Pe.ResponseError(Pe.LSPErrorCodes.ServerCancelled,`No document found for URI: ${e.toString()}`))}awaitBuilderState(t,e){return this.currentState>=t?Promise.resolve():e.isCancellationRequested?Promise.reject(Kt):new Promise((r,n)=>{const i=this.onBuildPhase(t,()=>{i.dispose(),a.dispose(),r()}),a=e.onCancellationRequested(()=>{i.dispose(),a.dispose(),n(Kt)})})}async notifyDocumentPhase(t,e,r){const n=this.documentPhaseListeners.get(e).slice();for(const a of n)try{await Ut(r),await a(t,r)}catch(i){if(!qt(i))throw i}}async notifyBuildPhase(t,e,r){if(0===t.length)return;const n=this.buildPhaseListeners.get(e).slice();for(const i of n)await Ut(r),await i(t,r)}shouldLink(t){return this.getBuildOptions(t).eagerLinking??!0}shouldValidate(t){return Boolean(this.getBuildOptions(t).validation)}async validate(t,e){const r=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,n=this.getBuildOptions(t),i="object"==typeof n.validation?{...n.validation}:{};i.categories=this.findMissingValidationCategories(t,n);const a=await r.validateDocument(t,i,e);t.diagnostics?t.diagnostics.push(...a):t.diagnostics=a;const s=this.buildState.get(t.uri.toString());s&&(s.result??(s.result={}),s.result.validationChecks?s.result.validationChecks=(0,At.Td)(s.result.validationChecks).concat(i.categories).distinct().toArray():s.result.validationChecks=[...i.categories])}getBuildOptions(t){return this.buildState.get(t.uri.toString())?.options??{}}}class Be{constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new ge,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){const r=(0,it.YE)(t).uri,n=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{Qt.equals(t.targetUri,r)&&t.targetPath===e&&n.push(t)})}),(0,At.Td)(n)}allElements(t,e){let r=(0,At.Td)(this.symbolIndex.keys());return e&&(r=r.filter(t=>!e||e.has(t))),r.map(e=>this.getFileDescriptions(e,t)).flat()}getFileDescriptions(t,e){if(!e)return this.symbolIndex.get(t)??[];return this.symbolByTypeIndex.get(t,e,()=>(this.symbolIndex.get(t)??[]).filter(t=>this.astReflection.isSubtype(t.type,e)))}remove(t){this.removeContent(t),this.removeReferences(t)}removeContent(t){const e=t.toString();this.symbolIndex.delete(e),this.symbolByTypeIndex.clear(e)}removeReferences(t){const e=t.toString();this.referenceIndex.delete(e)}async updateContent(t,e=$t.CancellationToken.None){const r=this.serviceRegistry.getServices(t.uri),n=await r.references.ScopeComputation.collectExportedSymbols(t,e),i=t.uri.toString();this.symbolIndex.set(i,n),this.symbolByTypeIndex.clear(i)}async updateReferences(t,e=$t.CancellationToken.None){const r=this.serviceRegistry.getServices(t.uri),n=await r.workspace.ReferenceDescriptionProvider.createDescriptions(t,e);this.referenceIndex.set(t.uri.toString(),n)}isAffected(t,e){const r=this.referenceIndex.get(t.uri.toString());return!!r&&r.some(t=>!t.local&&e.has(t.targetUri.toString()))}}class Fe{constructor(t){this.initialBuildOptions={},this._ready=new jt,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(t){this.folders=t.workspaceFolders??void 0}initialized(t){return this.mutex.write(t=>this.initializeWorkspace(this.folders??[],t))}async initializeWorkspace(t,e=$t.CancellationToken.None){const r=await this.performStartup(t);await Ut(e),await this.documentBuilder.build(r,this.initialBuildOptions,e)}async performStartup(t){const e=[],r=t=>{e.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)};await this.loadAdditionalDocuments(t,r);const n=[];await Promise.all(t.map(t=>this.getRootFolder(t)).map(async t=>this.traverseFolder(t,n)));const i=(0,At.Td)(n).distinct(t=>t.toString()).filter(t=>!this.langiumDocuments.hasDocument(t));return await this.loadWorkspaceDocuments(i,r),this._ready.resolve(),e}async loadWorkspaceDocuments(t,e){await Promise.all(t.map(async t=>{const r=await this.langiumDocuments.getOrCreateDocument(t);e(r)}))}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return te.r.parse(t.uri)}async traverseFolder(t,e){try{const r=await this.fileSystemProvider.readDirectory(t);await Promise.all(r.map(async t=>{this.shouldIncludeEntry(t)&&(t.isDirectory?await this.traverseFolder(t.uri,e):t.isFile&&e.push(t.uri))}))}catch(r){console.error("Failure to read directory content of "+t.toString(!0),r)}}async searchFolder(t){const e=[];return await this.traverseFolder(t,e),e}shouldIncludeEntry(t){const e=Qt.basename(t.uri);return!e.startsWith(".")&&(t.isDirectory?"node_modules"!==e&&"out"!==e:!!t.isFile&&this.serviceRegistry.hasServices(t.uri))}}class ze{buildUnexpectedCharactersMessage(t,e,r,n,i){return o.PW.buildUnexpectedCharactersMessage(t,e,r,n,i)}buildUnableToPopLexerModeMessage(t){return o.PW.buildUnableToPopLexerModeMessage(t)}}const Ke={mode:"full"};class qe{constructor(t){this.errorMessageProvider=t.parser.LexerErrorMessageProvider,this.tokenBuilder=t.parser.TokenBuilder;const e=this.tokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(e);const r=je(e)?Object.values(e):e,n="production"===t.LanguageMetaData.mode;this.chevrotainLexer=new o.JG(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(t,e=Ke){const r=this.chevrotainLexer.tokenize(t);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(t)}}toTokenTypeDictionary(t){if(je(t))return t;const e=Ue(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}}function Ue(t){return t&&"modes"in t&&"defaultMode"in t}function je(t){return!function(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}(t)&&!Ue(t)}function Ge(t,e,r){let n,i;"string"==typeof t?(i=e,n=r):(i=t.range.start,n=e),i||(i=at.Position.create(0,0));const a=function(t){const e=[];let r=t.position.line,n=t.position.character;for(let i=0;i=o.length){if(e.length>0){const t=at.Position.create(r,n);e.push({type:"break",content:"",range:at.Range.create(t,t)})}}else{We.lastIndex=l;const t=We.exec(o);if(t){const i=t[0],a=t[1],s=at.Position.create(r,n+l),c=at.Position.create(r,n+l+i.length);e.push({type:"tag",content:a,range:at.Range.create(s,c)}),l+=i.length,l=Qe(o,l)}if(l0&&"break"===e[e.length-1].type)return e.slice(0,-1);return e}({lines:Ye(t),position:i,options:ar(n)});return function(t){const e=at.Position.create(t.position.line,t.position.character);if(0===t.tokens.length)return new or([],at.Range.create(e,e));const r=[];for(;t.index0&&i.push({type:"text",content:e.substring(a,t),range:at.Range.create(at.Position.create(r,a+n),at.Position.create(r,t+n))});let l=s.length+1;const c=o[1];if(i.push({type:"inline-tag",content:c,range:at.Range.create(at.Position.create(r,a+l+n),at.Position.create(r,a+l+c.length+n))}),l+=c.length,4===o.length){l+=o[2].length;const t=o[3];i.push({type:"text",content:t,range:at.Range.create(at.Position.create(r,a+l+n),at.Position.create(r,a+l+t.length+n))})}else i.push({type:"text",content:"",range:at.Range.create(at.Position.create(r,a+l+n),at.Position.create(r,a+l+n))});a=t+o[0].length}const s=e.substring(a);s.length>0&&i.push({type:"text",content:s,range:at.Range.create(at.Position.create(r,a+n),at.Position.create(r,a+n+s.length))})}return i}const Xe=/\S/,Ze=/\s*$/;function Qe(t,e){const r=t.substring(e).match(Xe);return r?e+r.index:t.length}function Je(t){const e=t.match(Ze);if(e&&"number"==typeof e.index)return e.index}function tr(t,e){const r=t.tokens[t.index];return"tag"===r.type?nr(t,!1):"text"===r.type||"inline-tag"===r.type?er(t):(function(t,e){if(e){const r=new hr("",t.range);"inlines"in e?e.inlines.push(r):e.content.inlines.push(r)}}(r,e),void t.index++)}function er(t){let e=t.tokens[t.index];const r=e;let n=e;const i=[];for(;e&&"break"!==e.type&&"tag"!==e.type;)i.push(rr(t)),n=e,e=t.tokens[t.index];return new cr(i,at.Range.create(r.range.start,n.range.end))}function rr(t){return"inline-tag"===t.tokens[t.index].type?nr(t,!0):ir(t)}function nr(t,e){const r=t.tokens[t.index++],n=r.content.substring(1),i=t.tokens[t.index];if("text"===i?.type){if(e){const i=ir(t);return new lr(n,new cr([i],i.range),e,at.Range.create(r.range.start,i.range.end))}{const i=er(t);return new lr(n,i,e,at.Range.create(r.range.start,i.range.end))}}{const t=r.range;return new lr(n,new cr([],t),e,t)}}function ir(t){const e=t.tokens[t.index++];return new hr(e.content,e.range)}function ar(t){if(!t)return ar({start:"/**",end:"*/",line:"*"});const{start:e,end:r,line:n}=t;return{start:sr(e,!0),end:sr(r,!1),line:sr(n,!0)}}function sr(t,e){if("string"==typeof t||"object"==typeof t){const r="string"==typeof t?(0,a.Nt)(t):t.source;return e?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}return t}class or{constructor(t,e){this.elements=t,this.range=e}getTag(t){return this.getAllTags().find(e=>e.name===t)}getTags(t){return this.getAllTags().filter(e=>e.name===t)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(const e of this.elements)if(0===t.length)t=e.toString();else{const r=e.toString();t+=ur(t)+r}return t.trim()}toMarkdown(t){let e="";for(const r of this.elements)if(0===e.length)e=r.toMarkdown(t);else{const n=r.toMarkdown(t);e+=ur(e)+n}return e.trim()}}class lr{constructor(t,e,r,n){this.name=t,this.content=e,this.inline=r,this.range=n}toString(){let t=`@${this.name}`;const e=this.content.toString();return 1===this.content.inlines.length?t=`${t} ${e}`:this.content.inlines.length>1&&(t=`${t}\n${e}`),this.inline?`{${t}}`:t}toMarkdown(t){return t?.renderTag?.(this)??this.toMarkdownDefault(t)}toMarkdownDefault(t){const e=this.content.toMarkdown(t);if(this.inline){const r=function(t,e,r){if("linkplain"===t||"linkcode"===t||"link"===t){const n=e.indexOf(" ");let i=e;if(n>0){const t=Qe(e,n);i=e.substring(t),e=e.substring(0,n)}("linkcode"===t||"link"===t&&"code"===r.link)&&(i=`\`${i}\``);const a=r.renderLink?.(e,i)??function(t,e){try{return te.r.parse(t,!0),`[${e}](${t})`}catch{return t}}(e,i);return a}return}(this.name,e,t??{});if("string"==typeof r)return r}let r="";"italic"===t?.tag||void 0===t?.tag?r="*":"bold"===t?.tag?r="**":"bold-italic"===t?.tag&&(r="***");let n=`${r}@${this.name}${r}`;return 1===this.content.inlines.length?n=`${n} — ${e}`:this.content.inlines.length>1&&(n=`${n}\n${e}`),this.inline?`{${n}}`:n}}class cr{constructor(t,e){this.inlines=t,this.range=e}toString(){let t="";for(let e=0;er.range.start.line&&(t+="\n")}return t}toMarkdown(t){let e="";for(let r=0;rn.range.start.line&&(e+="\n")}return e}}class hr{constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}}function ur(t){return t.endsWith("\n")?"\n":"\n\n"}class dr{constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(t){const e=this.commentProvider.getComment(t);if(e&&function(t,e){const r=ar(e),n=Ye(t);if(0===n.length)return!1;const i=n[0],a=n[n.length-1],s=r.start,o=r.end;return Boolean(s?.exec(i))&&Boolean(o?.exec(a))}(e)){return Ge(e).toMarkdown({renderLink:(e,r)=>this.documentationLinkRenderer(t,e,r),renderTag:e=>this.documentationTagRenderer(t,e)})}}documentationLinkRenderer(t,e,r){const n=this.findNameInLocalSymbols(t,e)??this.findNameInGlobalScope(t,e);if(n&&n.nameSegment){const t=n.nameSegment.range.start.line+1,e=n.nameSegment.range.start.character+1;return`[${r}](${n.documentUri.with({fragment:`L${t},${e}`}).toString()})`}}documentationTagRenderer(t,e){}findNameInLocalSymbols(t,e){const r=(0,it.YE)(t).localSymbols;if(!r)return;let n=t;do{const t=r.getStream(n).find(t=>t.name===e);if(t)return t;n=n.$container}while(n)}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}}class pr{constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return function(t){return"string"==typeof t.$comment}(t)?t.$comment:(0,n.v)(t.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}class fr{constructor(t){this.syncParser=t.parser.LangiumParser}parse(t,e){return Promise.resolve(this.syncParser.parse(t))}}class gr{constructor(){this.previousTokenSource=new $t.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();const e=(Ft=performance.now(),new $t.CancellationTokenSource);return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,r=$t.CancellationToken.None){const n=new jt,i={action:e,deferred:n,cancellationToken:r};return t.push(i),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;const t=[];if(this.writeQueue.length>0)t.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;t.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(t.map(async({action:t,deferred:e,cancellationToken:r})=>{try{const n=await Promise.resolve().then(()=>t(r));e.resolve(n)}catch(n){qt(n)?e.resolve(void 0):e.reject(n)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class mr{constructor(t){this.grammarElementIdMap=new ce,this.tokenTypeIdMap=new ce,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport?this.dehydrateLexerReport(t.lexerReport):void 0,parserErrors:t.parserErrors.map(t=>({...t,message:t.message})),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}dehydrateLexerReport(t){return t}createDehyrationContext(t){const e=new Map,r=new Map;for(const n of(0,it.jm)(t))e.set(n,{});if(t.$cstNode)for(const i of(0,n.NS)(t.$cstNode))r.set(i,{});return{astNodes:e,cstNodes:r}}dehydrateAstNode(t,e){const r=e.astNodes.get(t);r.$type=t.$type,r.$containerIndex=t.$containerIndex,r.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(r.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for(const[n,i]of Object.entries(t))if(!n.startsWith("$"))if(Array.isArray(i)){const t=[];r[n]=t;for(const r of i)(0,Bt.ng)(r)?t.push(this.dehydrateAstNode(r,e)):(0,Bt.A_)(r)?t.push(this.dehydrateReference(r,e)):t.push(r)}else(0,Bt.ng)(i)?r[n]=this.dehydrateAstNode(i,e):(0,Bt.A_)(i)?r[n]=this.dehydrateReference(i,e):void 0!==i&&(r[n]=i);return r}dehydrateReference(t,e){const r={};return r.$refText=t.$refText,t.$refNode&&(r.$refNode=e.cstNodes.get(t.$refNode)),r}dehydrateCstNode(t,e){const r=e.cstNodes.get(t);return(0,Bt.br)(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),(0,Bt.mD)(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):(0,Bt.FC)(t)&&(r.tokenType=t.tokenType.name,r.offset=t.offset,r.length=t.length,r.startLine=t.range.start.line,r.startColumn=t.range.start.character,r.endLine=t.range.end.line,r.endColumn=t.range.end.character),r}hydrate(t){const e=t.value,r=this.createHydrationContext(e);return"$cstNode"in e&&this.hydrateCstNode(e.$cstNode,r),{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,r)}}createHydrationContext(t){const e=new Map,r=new Map;for(const n of(0,it.jm)(t))e.set(n,{});let i;if(t.$cstNode)for(const a of(0,n.NS)(t.$cstNode)){let t;"fullText"in a?(t=new ut(a.fullText),i=t):"content"in a?t=new ct:"tokenType"in a&&(t=this.hydrateCstLeafNode(a)),t&&(r.set(a,t),t.root=i)}return{astNodes:e,cstNodes:r}}hydrateAstNode(t,e){const r=e.astNodes.get(t);r.$type=t.$type,r.$containerIndex=t.$containerIndex,r.$containerProperty=t.$containerProperty,t.$cstNode&&(r.$cstNode=e.cstNodes.get(t.$cstNode));for(const[n,i]of Object.entries(t))if(!n.startsWith("$"))if(Array.isArray(i)){const t=[];r[n]=t;for(const a of i)(0,Bt.ng)(a)?t.push(this.setParent(this.hydrateAstNode(a,e),r)):(0,Bt.A_)(a)?t.push(this.hydrateReference(a,r,n,e)):t.push(a)}else(0,Bt.ng)(i)?r[n]=this.setParent(this.hydrateAstNode(i,e),r):(0,Bt.A_)(i)?r[n]=this.hydrateReference(i,r,n,e):void 0!==i&&(r[n]=i);return r}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,r,n){return this.linker.buildReference(e,r,n.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,r=0){const n=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(n.grammarSource=this.getGrammarElement(t.grammarSource)),n.astNode=e.astNodes.get(t.astNode),(0,Bt.mD)(n))for(const i of t.content){const t=this.hydrateCstNode(i,e,r++);n.content.push(t)}return n}hydrateCstLeafNode(t){const e=this.getTokenType(t.tokenType),r=t.offset,n=t.length,i=t.startLine,a=t.startColumn,s=t.endLine,o=t.endColumn,l=t.hidden;return new lt(r,n,{start:{line:i,character:a},end:{line:s,character:o}},e,l)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){if(t)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();return this.grammarElementIdMap.getKey(t)}createGrammarElementIdMap(){let t=0;for(const e of(0,it.jm)(this.grammar))(0,s.r1)(e)&&this.grammarElementIdMap.set(e,t++)}}function yr(t){return{documentation:{CommentProvider:t=>new pr(t),DocumentationProvider:t=>new dr(t)},parser:{AsyncParser:t=>new fr(t),GrammarConfig:t=>function(t){const e=[],r=t.Grammar;for(const n of r.rules)(0,s.rE)(n)&&(0,i.eb)(n)&&(0,a.lU)((0,i.S)(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:n.El}}(t),LangiumParser:t=>Mt(t),CompletionParser:t=>function(t){const e=t.Grammar,r=t.parser.Lexer,n=new bt(t);return _t(e,n,r.definition),n.finalize(),n}(t),ValueConverter:()=>new Pt.d,TokenBuilder:()=>new Ot.Q,Lexer:t=>new qe(t),ParserErrorMessageProvider:()=>new vt,LexerErrorMessageProvider:()=>new ze},workspace:{AstNodeLocator:()=>new Ne,AstNodeDescriptionProvider:t=>new Le(t),ReferenceDescriptionProvider:t=>new De(t)},references:{Linker:t=>new ae(t),NameProvider:()=>new se,ScopeProvider:t=>new ye(t),ScopeComputation:t=>new he(t),References:t=>new oe(t)},serializer:{Hydrator:t=>new mr(t),JsonSerializer:t=>new be(t)},validation:{DocumentValidator:t=>new _e(t),ValidationRegistry:t=>new ke(t)},shared:()=>t.shared}}function vr(t){return{ServiceRegistry:t=>new xe(t),workspace:{LangiumDocuments:t=>new ne(t),LangiumDocumentFactory:t=>new re(t),DocumentBuilder:t=>new $e(t),IndexManager:t=>new Be(t),WorkspaceManager:t=>new Fe(t),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new gr,ConfigurationProvider:t=>new Me(t)},profilers:{}}}},9364(t,e,r){"use strict";var n;function i(t,e,r,n,i,a,o,l,h){return s([t,e,r,n,i,a,o,l,h].reduce(c,{}))}r.d(e,{WQ:()=>i}),function(t){t.merge=(t,e)=>c(c({},t),e)}(n||(n={}));const a=Symbol("isProxy");function s(t,e){const r=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(n,i)=>i===a||l(n,i,t,e||r),getOwnPropertyDescriptor:(n,i)=>(l(n,i,t,e||r),Object.getOwnPropertyDescriptor(n,i)),has:(e,r)=>r in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return r}const o=Symbol();function l(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+t[e]);if(t[e]===o)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in r){const a=r[e];t[e]=o;try{t[e]="function"==typeof a?a(n):s(a,n)}catch(i){throw t[e]=i instanceof Error?i:void 0,i}return t[e]}}function c(t,e){if(e)for(const[r,n]of Object.entries(e))if(null!=n)if("object"==typeof n){const e=t[r];t[r]=c("object"==typeof e&&null!==e?e:{},n)}else t[r]=n;return t}},2151(t,e,r){"use strict";r.d(e,{$g:()=>Ue,Bg:()=>q,Ct:()=>le,Cz:()=>O,D8:()=>He,FO:()=>ot,Fy:()=>rr,GL:()=>ae,IZ:()=>Tt,Mz:()=>Wr,NT:()=>Mt,O4:()=>dr,QX:()=>tn,RP:()=>it,S2:()=>jt,SP:()=>_t,TF:()=>ge,Tu:()=>W,Xj:()=>Rr,_c:()=>tt,cM:()=>l,cY:()=>Kr,fG:()=>$e,jp:()=>w,lF:()=>_r,r1:()=>s,rE:()=>br,s7:()=>_e,vd:()=>Me,ve:()=>y,wb:()=>Vt,wh:()=>N,z2:()=>Jr});var n=r(2479);const i="AbstractElement",a="cardinality";function s(t){return en.isInstance(t,i)}const o="AbstractParserRule";function l(t){return en.isInstance(t,o)}const c="AbstractRule";const h="AbstractType";const u="Action",d="cardinality",p="feature",f="inferredType",g="operator",m="type";function y(t){return en.isInstance(t,u)}const v="Alternatives",b="cardinality",x="elements";function w(t){return en.isInstance(t,v)}const T="ArrayLiteral",k="elements";const A="ArrayType",_="elementType";const E="Assignment",C="cardinality",S="feature",R="operator",L="predicate",D="terminal";function N(t){return en.isInstance(t,E)}const I="BooleanLiteral",M="true";function O(t){return en.isInstance(t,I)}const P="CharacterRange",$="cardinality",B="left",F="lookahead",z="parenthesized",K="right";function q(t){return en.isInstance(t,P)}const U="Condition";const j="Conjunction",G="left",Y="right";function W(t){return en.isInstance(t,j)}const H="CrossReference",V="cardinality",X="deprecatedSyntax",Z="isMulti",Q="terminal",J="type";function tt(t){return en.isInstance(t,H)}const et="Disjunction",rt="left",nt="right";function it(t){return en.isInstance(t,et)}const at="EndOfFile",st="cardinality";function ot(t){return en.isInstance(t,at)}const lt="Grammar",ct="imports",ht="interfaces",ut="isDeclared",dt="name",pt="rules",ft="types";const gt="GrammarImport",mt="path";const yt="Group",vt="cardinality",bt="elements",xt="guardCondition",wt="predicate";function Tt(t){return en.isInstance(t,yt)}const kt="InferredType",At="name";function _t(t){return en.isInstance(t,kt)}const Et="InfixRule",Ct="call",St="dataType",Rt="inferredType",Lt="name",Dt="operators",Nt="parameters",It="returnType";function Mt(t){return en.isInstance(t,Et)}const Ot="InfixRuleOperatorList",Pt="associativity",$t="operators";const Bt="InfixRuleOperators",Ft="precedences";const zt="Interface",Kt="attributes",qt="name",Ut="superTypes";function jt(t){return en.isInstance(t,zt)}const Gt="Keyword",Yt="cardinality",Wt="predicate",Ht="value";function Vt(t){return en.isInstance(t,Gt)}const Xt="NamedArgument",Zt="calledByName",Qt="parameter",Jt="value";const te="NegatedToken",ee="cardinality",re="lookahead",ne="parenthesized",ie="terminal";function ae(t){return en.isInstance(t,te)}const se="Negation",oe="value";function le(t){return en.isInstance(t,se)}const ce="NumberLiteral",he="value";const ue="Parameter",de="name";const pe="ParameterReference",fe="parameter";function ge(t){return en.isInstance(t,pe)}const me="ParserRule",ye="dataType",ve="definition",be="entry",xe="fragment",we="inferredType",Te="name",ke="parameters",Ae="returnType";function _e(t){return en.isInstance(t,me)}const Ee="ReferenceType",Ce="isMulti",Se="referenceType";const Re="RegexToken",Le="cardinality",De="lookahead",Ne="parenthesized",Ie="regex";function Me(t){return en.isInstance(t,Re)}const Oe="ReturnType",Pe="name";function $e(t){return en.isInstance(t,Oe)}const Be="RuleCall",Fe="arguments",ze="cardinality",Ke="predicate",qe="rule";function Ue(t){return en.isInstance(t,Be)}const je="SimpleType",Ge="primitiveType",Ye="stringType",We="typeRef";function He(t){return en.isInstance(t,je)}const Ve="StringLiteral",Xe="value";const Ze="TerminalAlternatives",Qe="cardinality",Je="elements",tr="lookahead",er="parenthesized";function rr(t){return en.isInstance(t,Ze)}const nr="TerminalElement",ir="cardinality",ar="lookahead",sr="parenthesized";const or="TerminalGroup",lr="cardinality",cr="elements",hr="lookahead",ur="parenthesized";function dr(t){return en.isInstance(t,or)}const pr="TerminalRule",fr="definition",gr="fragment",mr="hidden",yr="name",vr="type";function br(t){return en.isInstance(t,pr)}const xr="TerminalRuleCall",wr="cardinality",Tr="lookahead",kr="parenthesized",Ar="rule";function _r(t){return en.isInstance(t,xr)}const Er="Type",Cr="name",Sr="type";function Rr(t){return en.isInstance(t,Er)}const Lr="TypeAttribute",Dr="defaultValue",Nr="isOptional",Ir="name",Mr="type";const Or="TypeDefinition";const Pr="UnionType",$r="types";const Br="UnorderedGroup",Fr="cardinality",zr="elements";function Kr(t){return en.isInstance(t,Br)}const qr="UntilToken",Ur="cardinality",jr="lookahead",Gr="parenthesized",Yr="terminal";function Wr(t){return en.isInstance(t,qr)}const Hr="ValueLiteral";const Vr="Wildcard",Xr="cardinality",Zr="lookahead",Qr="parenthesized";function Jr(t){return en.isInstance(t,Vr)}class tn extends n.kD{constructor(){super(...arguments),this.types={AbstractElement:{name:i,properties:{cardinality:{name:a}},superTypes:[]},AbstractParserRule:{name:o,properties:{},superTypes:[c,h]},AbstractRule:{name:c,properties:{},superTypes:[]},AbstractType:{name:h,properties:{},superTypes:[]},Action:{name:u,properties:{cardinality:{name:d},feature:{name:p},inferredType:{name:f},operator:{name:g},type:{name:m,referenceType:h}},superTypes:[i]},Alternatives:{name:v,properties:{cardinality:{name:b},elements:{name:x,defaultValue:[]}},superTypes:[i]},ArrayLiteral:{name:T,properties:{elements:{name:k,defaultValue:[]}},superTypes:[Hr]},ArrayType:{name:A,properties:{elementType:{name:_}},superTypes:[Or]},Assignment:{name:E,properties:{cardinality:{name:C},feature:{name:S},operator:{name:R},predicate:{name:L},terminal:{name:D}},superTypes:[i]},BooleanLiteral:{name:I,properties:{true:{name:M,defaultValue:!1}},superTypes:[U,Hr]},CharacterRange:{name:P,properties:{cardinality:{name:$},left:{name:B},lookahead:{name:F},parenthesized:{name:z,defaultValue:!1},right:{name:K}},superTypes:[nr]},Condition:{name:U,properties:{},superTypes:[]},Conjunction:{name:j,properties:{left:{name:G},right:{name:Y}},superTypes:[U]},CrossReference:{name:H,properties:{cardinality:{name:V},deprecatedSyntax:{name:X,defaultValue:!1},isMulti:{name:Z,defaultValue:!1},terminal:{name:Q},type:{name:J,referenceType:h}},superTypes:[i]},Disjunction:{name:et,properties:{left:{name:rt},right:{name:nt}},superTypes:[U]},EndOfFile:{name:at,properties:{cardinality:{name:st}},superTypes:[i]},Grammar:{name:lt,properties:{imports:{name:ct,defaultValue:[]},interfaces:{name:ht,defaultValue:[]},isDeclared:{name:ut,defaultValue:!1},name:{name:dt},rules:{name:pt,defaultValue:[]},types:{name:ft,defaultValue:[]}},superTypes:[]},GrammarImport:{name:gt,properties:{path:{name:mt}},superTypes:[]},Group:{name:yt,properties:{cardinality:{name:vt},elements:{name:bt,defaultValue:[]},guardCondition:{name:xt},predicate:{name:wt}},superTypes:[i]},InferredType:{name:kt,properties:{name:{name:At}},superTypes:[h]},InfixRule:{name:Et,properties:{call:{name:Ct},dataType:{name:St},inferredType:{name:Rt},name:{name:Lt},operators:{name:Dt},parameters:{name:Nt,defaultValue:[]},returnType:{name:It,referenceType:h}},superTypes:[o]},InfixRuleOperatorList:{name:Ot,properties:{associativity:{name:Pt},operators:{name:$t,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Bt,properties:{precedences:{name:Ft,defaultValue:[]}},superTypes:[]},Interface:{name:zt,properties:{attributes:{name:Kt,defaultValue:[]},name:{name:qt},superTypes:{name:Ut,defaultValue:[],referenceType:h}},superTypes:[h]},Keyword:{name:Gt,properties:{cardinality:{name:Yt},predicate:{name:Wt},value:{name:Ht}},superTypes:[i]},NamedArgument:{name:Xt,properties:{calledByName:{name:Zt,defaultValue:!1},parameter:{name:Qt,referenceType:ue},value:{name:Jt}},superTypes:[]},NegatedToken:{name:te,properties:{cardinality:{name:ee},lookahead:{name:re},parenthesized:{name:ne,defaultValue:!1},terminal:{name:ie}},superTypes:[nr]},Negation:{name:se,properties:{value:{name:oe}},superTypes:[U]},NumberLiteral:{name:ce,properties:{value:{name:he}},superTypes:[Hr]},Parameter:{name:ue,properties:{name:{name:de}},superTypes:[]},ParameterReference:{name:pe,properties:{parameter:{name:fe,referenceType:ue}},superTypes:[U]},ParserRule:{name:me,properties:{dataType:{name:ye},definition:{name:ve},entry:{name:be,defaultValue:!1},fragment:{name:xe,defaultValue:!1},inferredType:{name:we},name:{name:Te},parameters:{name:ke,defaultValue:[]},returnType:{name:Ae,referenceType:h}},superTypes:[o]},ReferenceType:{name:Ee,properties:{isMulti:{name:Ce,defaultValue:!1},referenceType:{name:Se}},superTypes:[Or]},RegexToken:{name:Re,properties:{cardinality:{name:Le},lookahead:{name:De},parenthesized:{name:Ne,defaultValue:!1},regex:{name:Ie}},superTypes:[nr]},ReturnType:{name:Oe,properties:{name:{name:Pe}},superTypes:[]},RuleCall:{name:Be,properties:{arguments:{name:Fe,defaultValue:[]},cardinality:{name:ze},predicate:{name:Ke},rule:{name:qe,referenceType:c}},superTypes:[i]},SimpleType:{name:je,properties:{primitiveType:{name:Ge},stringType:{name:Ye},typeRef:{name:We,referenceType:h}},superTypes:[Or]},StringLiteral:{name:Ve,properties:{value:{name:Xe}},superTypes:[Hr]},TerminalAlternatives:{name:Ze,properties:{cardinality:{name:Qe},elements:{name:Je,defaultValue:[]},lookahead:{name:tr},parenthesized:{name:er,defaultValue:!1}},superTypes:[nr]},TerminalElement:{name:nr,properties:{cardinality:{name:ir},lookahead:{name:ar},parenthesized:{name:sr,defaultValue:!1}},superTypes:[i]},TerminalGroup:{name:or,properties:{cardinality:{name:lr},elements:{name:cr,defaultValue:[]},lookahead:{name:hr},parenthesized:{name:ur,defaultValue:!1}},superTypes:[nr]},TerminalRule:{name:pr,properties:{definition:{name:fr},fragment:{name:gr,defaultValue:!1},hidden:{name:mr,defaultValue:!1},name:{name:yr},type:{name:vr}},superTypes:[c]},TerminalRuleCall:{name:xr,properties:{cardinality:{name:wr},lookahead:{name:Tr},parenthesized:{name:kr,defaultValue:!1},rule:{name:Ar,referenceType:pr}},superTypes:[nr]},Type:{name:Er,properties:{name:{name:Cr},type:{name:Sr}},superTypes:[h]},TypeAttribute:{name:Lr,properties:{defaultValue:{name:Dr},isOptional:{name:Nr,defaultValue:!1},name:{name:Ir},type:{name:Mr}},superTypes:[]},TypeDefinition:{name:Or,properties:{},superTypes:[]},UnionType:{name:Pr,properties:{types:{name:$r,defaultValue:[]}},superTypes:[Or]},UnorderedGroup:{name:Br,properties:{cardinality:{name:Fr},elements:{name:zr,defaultValue:[]}},superTypes:[i]},UntilToken:{name:qr,properties:{cardinality:{name:Ur},lookahead:{name:jr},parenthesized:{name:Gr,defaultValue:!1},terminal:{name:Yr}},superTypes:[nr]},ValueLiteral:{name:Hr,properties:{},superTypes:[]},Wildcard:{name:Vr,properties:{cardinality:{name:Xr},lookahead:{name:Zr},parenthesized:{name:Qr,defaultValue:!1}},superTypes:[nr]}}}}const en=new tn},1945(t,e,r){"use strict";r.d(e,{Q:()=>c});var n=r(724),i=r(2151),a=r(9683),s=r(418),o=r(2806),l=r(1719);class c{constructor(){this.diagnostics=[]}buildTokens(t,e){const r=(0,l.Td)((0,s.YV)(t,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,e);return i.push(...n),i}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(i.rE).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){const e=(0,s.S)(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,i={name:t.name,PATTERN:r};return"function"==typeof r&&(i.LINE_BREAKS=!0),t.hidden&&(i.GROUP=(0,o.Yv)(e)?n.JG.SKIPPED:"hidden"),i}requiresCustomPattern(t){return!(!t.flags.includes("u")&&!t.flags.includes("s"))}regexPatternFunction(t){const e=new RegExp(t,t.flags+"y");return(t,r)=>{e.lastIndex=r;return e.exec(t)}}buildKeywordTokens(t,e,r){return t.filter(i.cM).flatMap(t=>(0,a.Uo)(t).filter(i.wb)).distinct(t=>t.value).toArray().sort((t,e)=>e.value.length-t.value.length).map(t=>this.buildKeywordToken(t,e,Boolean(r?.caseInsensitive)))}buildKeywordToken(t,e,r){const n=this.buildKeywordPattern(t,r),i={name:t.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(t,e)};return"function"==typeof n&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(t,e){return e?new RegExp((0,o.Nt)(t.value),"i"):t.value}findLongerAlt(t,e){return e.reduce((e,r)=>{const n=r?.PATTERN;return n?.source&&(0,o.PC)("^"+n.source+"$",t.value)&&e.push(r),e},[])}}},5033(t,e,r){"use strict";r.d(e,{d:()=>s});var n,i=r(2151),a=r(418);class s{convert(t,e){let r=e.grammarSource;if((0,i._c)(r)&&(r=(0,a.g4)(r)),(0,i.$g)(r)){const n=r.rule.ref;if(!n)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(n,t,e)}return t}runConverter(t,e,r){switch(t.name.toUpperCase()){case"INT":return n.convertInt(e);case"STRING":return n.convertString(e);case"ID":return n.convertID(e)}switch((0,a.P3)(t)?.toLowerCase()){case"number":return n.convertNumber(e);case"boolean":return n.convertBoolean(e);case"bigint":return n.convertBigint(e);case"date":return n.convertDate(e);default:return e}}}!function(t){function e(t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return t}}t.convertString=function(t){let r="";for(let n=1;ni,Dm:()=>a,FC:()=>h,Nr:()=>s,Zl:()=>o,br:()=>u,kD:()=>l,mD:()=>c,ng:()=>n});class l{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(t){const e=this.types[t.container.$type];if(!e)throw new Error(`Type ${t.container.$type||"undefined"} not found.`);const r=e.properties[t.property]?.referenceType;if(!r)throw new Error(`Property ${t.property||"undefined"} of type ${t.container.$type} is not a reference.`);return r}getTypeMetaData(t){const e=this.types[t];return e||{name:t,properties:{},superTypes:[]}}isInstance(t,e){return n(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){if(t===e)return!0;let r=this.subtypes[t];r||(r=this.subtypes[t]={});const n=r[e];if(void 0!==n)return n;{const n=this.types[t],i=!!n&&n.superTypes.some(t=>this.isSubtype(t,e));return r[e]=i,i}}getAllSubTypes(t){const e=this.allSubtypes[t];if(e)return e;{const e=this.getAllTypes(),r=[];for(const n of e)this.isSubtype(n,t)&&r.push(n);return this.allSubtypes[t]=r,r}}}function c(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function h(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function u(t){return c(t)&&"string"==typeof t.fullText}},9683(t,e,r){"use strict";r.d(e,{DM:()=>g,OP:()=>m,SD:()=>s,Uo:()=>d,VN:()=>u,XG:()=>o,YE:()=>l,cQ:()=>c,jm:()=>p,tC:()=>h});var n=r(2479),i=r(1719),a=r(6373);function s(t,e={}){for(const[r,i]of Object.entries(t))r.startsWith("$")||(Array.isArray(i)?i.forEach((i,a)=>{(0,n.ng)(i)&&(i.$container=t,i.$containerProperty=r,i.$containerIndex=a,e.deep&&s(i,e))}):(0,n.ng)(i)&&(i.$container=t,i.$containerProperty=r,e.deep&&s(i,e)))}function o(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function l(t){const e=c(t).$document;if(!e)throw new Error("AST node has no document.");return e}function c(t){for(;t.$container;)t=t.$container;return t}function h(t){return(0,n.A_)(t)?t.ref?[t.ref]:[]:(0,n.Dm)(t)?t.items.map(t=>t.ref):[]}function u(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e?.range;return new i.fq(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndexu(t,e))}function p(t,e){if(!t)throw new Error("Root node must be an AstNode.");return e?.range&&!f(t,e.range)?new i.Vj(t,()=>[]):new i.Vj(t,t=>u(t,e),{includeRoot:!0})}function f(t,e){if(!e)return!0;const r=t.$cstNode?.range;return!!r&&(0,a.r4)(r,e)}function g(t){return new i.fq(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndexu,NS:()=>s,SX:()=>c,pO:()=>o,r4:()=>h,v:()=>d,wf:()=>l});var n,i=r(2479),a=r(1719);function s(t){return new a.Vj(t,t=>(0,i.mD)(t)?t.content:[],{includeRoot:!0})}function o(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function l(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function c(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}function h(t,e){const r=function(t,e){if(t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return n.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,i=t.end.linen.After}!function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"}(n||(n={}));const u=/^[\w\p{L}]$/u;function d(t,e){if(t){const r=function(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const t=r.content[n];if(e||!t.hidden)return t}t=r}return}(t,!0);if(r&&p(r,e))return r;if((0,i.br)(t)){for(let r=t.content.findIndex(t=>!t.hidden)-1;r>=0;r--){const n=t.content[r];if(p(n,e))return n}}}}function p(t,e){return(0,i.FC)(t)&&e.includes(t.tokenType.name)}},1564(t,e,r){"use strict";r.d(e,{WB:()=>n,dr:()=>i});class n extends Error{constructor(t,e){super(t?`${e} at ${t.range.start.line}:${t.range.start.character}`:e)}}function i(t,e="Error: Got unexpected value."){throw new Error(e)}},418(t,e,r){"use strict";r.d(e,{Bd:()=>p,P3:()=>_,Rp:()=>v,S:()=>E,SS:()=>m,U5:()=>b,Uz:()=>A,Xq:()=>w,YV:()=>c,eb:()=>d,g4:()=>u,qO:()=>f});var n=r(1564),i=r(2151),a=r(2479),s=r(9683),o=r(6373),l=r(2806);function c(t,e){const r=new Set,n=function(t){return t.rules.find(t=>i.s7(t)&&t.entry)}(t);if(!n)return new Set(t.rules);const a=[n].concat(function(t){return t.rules.filter(t=>i.rE(t)&&t.hidden)}(t));for(const i of a)h(i,r,e);const s=new Set;for(const o of t.rules)(r.has(o.name)||i.rE(o)&&o.hidden)&&s.add(o);return s}function h(t,e,r){e.add(t.name),(0,s.Uo)(t).forEach(t=>{if(i.$g(t)||r&&i.lF(t)){const n=t.rule.ref;n&&!e.has(n.name)&&h(n,e,r)}})}function u(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=b(t.type.ref);return e?.terminal}}function d(t){return t.hidden&&!(0,l.Yv)(E(t))}function p(t,e){return t&&e?g(t,e,t.astNode,!0):[]}function f(t,e,r){if(!t||!e)return;const n=g(t,e,t.astNode,!0);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function g(t,e,r,n){if(!n){const r=(0,s.XG)(t.grammarSource,i.wh);if(r&&r.feature===e)return[t]}return(0,a.mD)(t)&&t.astNode===r?t.content.flatMap(t=>g(t,e,r,!1)):[]}function m(t,e,r){if(!t)return;const n=y(t,e,t?.astNode);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function y(t,e,r){if(t.astNode!==r)return[];if(i.wb(t.grammarSource)&&t.grammarSource.value===e)return[t];const n=(0,o.NS)(t).iterator();let a;const s=[];do{if(a=n.next(),!a.done){const t=a.value;t.astNode===r?i.wb(t.grammarSource)&&t.grammarSource.value===e&&s.push(t):n.prune()}}while(!a.done);return s}function v(t){const e=t.astNode;for(;e===t.container?.astNode;){const e=(0,s.XG)(t.grammarSource,i.wh);if(e)return e;t=t.container}}function b(t){let e=t;return i.SP(e)&&(i.ve(e.$container)?e=e.$container.$container:i.cM(e.$container)?e=e.$container:(0,n.dr)(e.$container)),x(t,e,new Map)}function x(t,e,r){function n(e,n){let a;return(0,s.XG)(e,i.wh)||(a=x(n,n,r)),r.set(t,a),a}if(r.has(t))return r.get(t);r.set(t,void 0);for(const a of(0,s.Uo)(e)){if(i.wh(a)&&"name"===a.feature.toLowerCase())return r.set(t,a),a;if(i.$g(a)&&i.s7(a.rule.ref))return n(a,a.rule.ref);if(i.D8(a)&&a.typeRef?.ref)return n(a,a.typeRef.ref)}}function w(t){return T(t,new Set)}function T(t,e){if(e.has(t))return!0;e.add(t);for(const r of(0,s.Uo)(t))if(i.$g(r)){if(!r.rule.ref)return!1;if(i.s7(r.rule.ref)&&!T(r.rule.ref,e))return!1;if(i.NT(r.rule.ref))return!1}else{if(i.wh(r))return!1;if(i.ve(r))return!1}return Boolean(t.definition)}function k(t){if(!i.rE(t)){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e)return e.name}}}function A(t){if(i.cM(t))return i.s7(t)&&w(t)?t.name:k(t)??t.name;if(i.S2(t)||i.Xj(t)||i.fG(t))return t.name;if(i.ve(t)){const e=function(t){if(t.inferredType)return t.inferredType.name;if(t.type?.ref)return A(t.type.ref);return}(t);if(e)return e}else if(i.SP(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function _(t){return i.rE(t)?t.type?.name??"string":k(t)??t.name}function E(t){const e={s:!1,i:!1,u:!1},r=S(t.definition,e),n=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(r,n)}const C=/[\s\S]/.source;function S(t,e){if(i.Fy(t))return L((s=t).elements.map(t=>S(t)).join("|"),{cardinality:s.cardinality,lookahead:s.lookahead,parenthesized:s.parenthesized,wrap:!1});if(i.O4(t))return L((a=t).elements.map(t=>S(t)).join(""),{cardinality:a.cardinality,lookahead:a.lookahead,parenthesized:a.parenthesized,wrap:!1});if(i.Bg(t))return function(t){if(t.right)return L(`[${R(t.left)}-${R(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1});return L(R(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}(t);if(i.lF(t)){const e=t.rule.ref;if(!e)throw new Error("Missing rule reference.");return L(S(e.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}if(i.GL(t))return L(`(?!${S((n=t).terminal)})${C}*?`,{cardinality:n.cardinality,lookahead:n.lookahead,parenthesized:n.parenthesized});if(i.Mz(t))return L(`${C}*?${S((r=t).terminal)}`,{cardinality:r.cardinality,lookahead:r.lookahead,parenthesized:r.parenthesized});if(i.vd(t)){const r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),i=t.regex.substring(r+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),L(n,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}if(i.z2(t))return L(C,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t?.$type}, ${t?.$cstNode?.text}`);var r,n,a,s}function R(t){return(0,l.Nt)(t.value)}function L(t,e){if(e.parenthesized||e.lookahead||!1!==e.wrap){t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`}return e.cardinality?`${t}${e.cardinality}`:t}},2806(t,e,r){"use strict";r.d(e,{Nt:()=>u,PC:()=>d,TH:()=>i,Yv:()=>h,lU:()=>l});var n=r(2607);const i=/\r?\n/gm,a=new n.H;class s extends n.z{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(t){this.multiline=!1,this.regex=t,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){const e=String.fromCharCode(t.value);if(this.multiline||"\n"!==e||(this.multiline=!0),t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=u(e);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitSet(t){if(!this.multiline){const e=this.regex.substring(t.loc.begin,t.loc.end),r=new RegExp(e);this.multiline=Boolean("\n".match(r))}if(t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=this.regex.substring(t.loc.begin,t.loc.end);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitChildren(t){if("Group"===t.type){if(t.quantifier)return}super.visitChildren(t)}}const o=new s;function l(t){try{return"string"==typeof t&&(t=new RegExp(t)),t=t.toString(),o.reset(t),o.visit(a.pattern(t)),o.multiline}catch{return!1}}const c="\f\n\r\t\v              \u2028\u2029   \ufeff".split("");function h(t){const e="string"==typeof t?new RegExp(t):t;return c.some(t=>e.test(t))}function u(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function d(t,e){const r=function(t){"string"==typeof t&&(t=new RegExp(t));const e=t,r=t.source;let n=0;function i(){let t,a="";function s(t){a+=r.substr(n,t),n+=t}function o(t){a+="(?:"+r.substr(n,t)+"|$)",n+=t}for(;n",n)-n+1);break;default:o(2)}break;case"[":t=/\[(?:\\.|.)*?\]/g,t.lastIndex=n,t=t.exec(r)||[],o(t[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":s(1);break;case"{":t=/\{\d+,?\d*\}/g,t.lastIndex=n,t=t.exec(r),t?s(t[0].length):o(1);break;case"(":if("?"===r[n+1])switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":t=n,n+=3,i(),a+=r.substr(t,n-t);break;case"<":switch(r[n+3]){case"=":case"!":t=n,n+=4,i(),a+=r.substr(t,n-t);break;default:s(r.indexOf(">",n)-n+1),a+=i()+"|$)"}}else s(1),a+=i()+"|$)";break;case")":return++n,a;default:o(1)}return a}return new RegExp(i(),t.flags)}(t),n=e.match(r);return!!n&&n[0].length>0}},1719(t,e,r){"use strict";r.d(e,{B5:()=>s,Rf:()=>o,Td:()=>l,Vj:()=>c,fq:()=>n,iD:()=>h});class n{constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){const t={state:this.startFn(),next:()=>this.nextFn(t.state),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){const t=this.iterator();return Boolean(t.next().done)}count(){const t=this.iterator();let e=0,r=t.next();for(;!r.done;)e++,r=t.next();return e}toArray(){const t=[],e=this.iterator();let r;do{r=e.next(),void 0!==r.value&&t.push(r.value)}while(!r.done);return t}toSet(){return new Set(this)}toMap(t,e){const r=this.map(r=>[t?t(r):r,e?e(r):r]);return new Map(r)}toString(){return this.join()}concat(t){return new n(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),t=>{let e;if(!t.firstDone){do{if(e=this.nextFn(t.first),!e.done)return e}while(!e.done);t.firstDone=!0}do{if(e=t.iterator.next(),!e.done)return e}while(!e.done);return o})}join(t=","){const e=this.iterator();let r,n="",a=!1;do{r=e.next(),r.done||(a&&(n+=t),n+=i(r.value)),a=!0}while(!r.done);return n}indexOf(t,e=0){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(n>=e&&i.value===t)return n;i=r.next(),n++}return-1}every(t){const e=this.iterator();let r=e.next();for(;!r.done;){if(!t(r.value))return!1;r=e.next()}return!0}some(t){const e=this.iterator();let r=e.next();for(;!r.done;){if(t(r.value))return!0;r=e.next()}return!1}forEach(t){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)t(n.value,r),n=e.next(),r++}map(t){return new n(this.startFn,e=>{const{done:r,value:n}=this.nextFn(e);return r?o:{done:!1,value:t(n)}})}filter(t){return new n(this.startFn,e=>{let r;do{if(r=this.nextFn(e),!r.done&&t(r.value))return r}while(!r.done);return o})}nonNullable(){return this.filter(t=>null!=t)}reduce(t,e){const r=this.iterator();let n=e,i=r.next();for(;!i.done;)n=void 0===n?i.value:t(n,i.value),i=r.next();return n}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,r){const n=t.next();if(n.done)return r;const i=this.recursiveReduce(t,e,r);return void 0===i?n.value:e(i,n.value)}find(t){const e=this.iterator();let r=e.next();for(;!r.done;){if(t(r.value))return r.value;r=e.next()}}findIndex(t){const e=this.iterator();let r=0,n=e.next();for(;!n.done;){if(t(n.value))return r;n=e.next(),r++}return-1}includes(t){const e=this.iterator();let r=e.next();for(;!r.done;){if(r.value===t)return!0;r=e.next()}return!1}flatMap(t){return new n(()=>({this:this.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:r,value:n}=this.nextFn(e.this);if(!r){const r=t(n);if(!a(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return o})}flat(t){if(void 0===t&&(t=1),t<=0)return this;const e=t>1?this.flat(t-1):this;return new n(()=>({this:e.startFn()}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:r,value:n}=e.nextFn(t.this);if(!r){if(!a(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return o})}head(){const t=this.iterator().next();if(!t.done)return t.value}tail(t=1){return new n(()=>{const e=this.startFn();for(let r=0;r({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?o:this.nextFn(e.state)))}distinct(t){return new n(()=>({set:new Set,internalState:this.startFn()}),e=>{let r;do{if(r=this.nextFn(e.internalState),!r.done){const n=t?t(r.value):r.value;if(!e.set.has(n))return e.set.add(n),r}}while(!r.done);return o})}exclude(t,e){const r=new Set;for(const n of t){const t=e?e(n):n;r.add(t)}return this.filter(t=>{const n=e?e(t):t;return!r.has(n)})}}function i(t){return"string"==typeof t?t:void 0===t?"undefined":"function"==typeof t.toString?t.toString():Object.prototype.toString.call(t)}function a(t){return!!t&&"function"==typeof t[Symbol.iterator]}const s=new n(()=>{},()=>o),o=Object.freeze({done:!0,value:void 0});function l(...t){if(1===t.length){const e=t[0];if(e instanceof n)return e;if(a(e))return new n(()=>e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new n(()=>({index:0}),t=>t.index1?new n(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex({iterators:r?.includeRoot?[[t][Symbol.iterator]()]:[e(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&(t.iterators.pop(),t.pruned=!1);t.iterators.length>0;){const r=t.iterators[t.iterators.length-1].next();if(!r.done)return t.iterators.push(e(r.value)[Symbol.iterator]()),r;t.iterators.pop()}return o})}iterator(){const t={state:this.startFn(),next:()=>this.nextFn(t.state),prune:()=>{t.state.pruned=!0},[Symbol.iterator]:()=>t};return t}}var h;!function(t){t.sum=function(t){return t.reduce((t,e)=>t+e,0)},t.product=function(t){return t.reduce((t,e)=>t*e,0)},t.min=function(t){return t.reduce((t,e)=>Math.min(t,e))},t.max=function(t){return t.reduce((t,e)=>Math.max(t,e))}}(h||(h={}))},4298(t,e,r){"use strict";r.d(e,{D:()=>i});class n{stat(t){throw new Error("No file system is available.")}statSync(t){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}}const i={fileSystemProvider:()=>new n}},9469(t,e,r){"use strict";r.d(e,{A:()=>d});const n=function(){this.__data__=[],this.size=0};var i=r(6984);const a=function(t,e){for(var r=t.length;r--;)if((0,i.A)(t[r][0],e))return r;return-1};var s=Array.prototype.splice;const o=function(t){var e=this.__data__,r=a(e,t);return!(r<0)&&(r==e.length-1?e.pop():s.call(e,r,1),--this.size,!0)};const l=function(t){var e=this.__data__,r=a(e,t);return r<0?void 0:e[r][1]};const c=function(t){return a(this.__data__,t)>-1};const h=function(t,e){var r=this.__data__,n=a(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++ea});var n=r(8562),i=r(1917);const a=(0,n.A)(i.A,"Map")},2050(t,e,r){"use strict";r.d(e,{A:()=>k});const n=(0,r(8562).A)(Object,"create");const i=function(){this.__data__=n?n(null):{},this.size=0};const a=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var s=Object.prototype.hasOwnProperty;const o=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return s.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;return n?void 0!==e[t]:l.call(e,t)};const h=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++ea});var n=r(8562),i=r(1917);const a=(0,n.A)(i.A,"Set")},8300(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(2050);const i=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const a=function(t){return this.__data__.has(t)};function s(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n.A;++ed});var n=r(9469);const i=function(){this.__data__=new n.A,this.size=0};const a=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};const s=function(t){return this.__data__.get(t)};const o=function(t){return this.__data__.has(t)};var l=r(8335),c=r(2050);const h=function(t,e){var r=this.__data__;if(r instanceof n.A){var i=r.__data__;if(!l.A||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new c.A(i)}return r.set(t,e),this.size=r.size,this};function u(t){var e=this.__data__=new n.A(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=s,u.prototype.has=o,u.prototype.set=h;const d=u},241(t,e,r){"use strict";r.d(e,{A:()=>n});const n=r(1917).A.Symbol},3988(t,e,r){"use strict";r.d(e,{A:()=>n});const n=r(1917).A.Uint8Array},2641(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=null==t?0:t.length;++rn});const n=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++ri});var n=r(5205);const i=function(t,e){return!!(null==t?0:t.length)&&(0,n.A)(t,e,0)>-1}},7809(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e,r){for(var n=-1,i=null==t?0:t.length;++nh});const n=function(t,e){for(var r=-1,n=Array(t);++rn});const n=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++rn});const n=function(t,e){for(var r=-1,n=e.length,i=t.length;++rn});const n=function(t,e){for(var r=-1,n=null==t?0:t.length;++rs});var n=r(2528),i=r(6984),a=Object.prototype.hasOwnProperty;const s=function(t,e,r){var s=t[e];a.call(t,e)&&(0,i.A)(s,r)&&(void 0!==r||e in t)||(0,n.A)(t,e,r)}},2528(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(4171);const i=function(t,e,r){"__proto__"==e&&n.A?(0,n.A)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},4507(t,e,r){"use strict";r.d(e,{A:()=>V});var n=r(2080),i=r(2641),a=r(2851),s=r(2031),o=r(7422);const l=function(t,e){return t&&(0,s.A)(e,(0,o.A)(e),t)};var c=r(9999);const h=function(t,e){return t&&(0,s.A)(e,(0,c.A)(e),t)};var u=r(154),d=r(9759),p=r(4792);const f=function(t,e){return(0,s.A)(t,(0,p.A)(t),e)};var g=r(3511);const m=function(t,e){return(0,s.A)(t,(0,g.A)(t),e)};var y=r(9042),v=r(3973),b=r(9137),x=Object.prototype.hasOwnProperty;const w=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&x.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var T=r(565);const k=function(t,e){var r=e?(0,T.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var A=/\w*$/;const _=function(t){var e=new t.constructor(t.source,A.exec(t));return e.lastIndex=t.lastIndex,e};var E=r(241),C=E.A?E.A.prototype:void 0,S=C?C.valueOf:void 0;const R=function(t){return S?Object(S.call(t)):{}};var L=r(1801);const D=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return(0,T.A)(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return k(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,L.A)(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return _(t);case"[object Symbol]":return R(t)}};var N=r(407),I=r(2049),M=r(1200),O=r(3098);const P=function(t){return(0,O.A)(t)&&"[object Map]"==(0,b.A)(t)};var $=r(2789),B=r(4841),F=B.A&&B.A.isMap;const z=F?(0,$.A)(F):P;var K=r(3149);const q=function(t){return(0,O.A)(t)&&"[object Set]"==(0,b.A)(t)};var U=B.A&&B.A.isSet;const j=U?(0,$.A)(U):q;var G="[object Arguments]",Y="[object Function]",W="[object Object]",H={};H[G]=H["[object Array]"]=H["[object ArrayBuffer]"]=H["[object DataView]"]=H["[object Boolean]"]=H["[object Date]"]=H["[object Float32Array]"]=H["[object Float64Array]"]=H["[object Int8Array]"]=H["[object Int16Array]"]=H["[object Int32Array]"]=H["[object Map]"]=H["[object Number]"]=H[W]=H["[object RegExp]"]=H["[object Set]"]=H["[object String]"]=H["[object Symbol]"]=H["[object Uint8Array]"]=H["[object Uint8ClampedArray]"]=H["[object Uint16Array]"]=H["[object Uint32Array]"]=!0,H["[object Error]"]=H[Y]=H["[object WeakMap]"]=!1;const V=function t(e,r,s,p,g,x){var T,k=1&r,A=2&r,_=4&r;if(s&&(T=g?s(e,p,g,x):s(e)),void 0!==T)return T;if(!(0,K.A)(e))return e;var E=(0,I.A)(e);if(E){if(T=w(e),!k)return(0,d.A)(e,T)}else{var C=(0,b.A)(e),S=C==Y||"[object GeneratorFunction]"==C;if((0,M.A)(e))return(0,u.A)(e,k);if(C==W||C==G||S&&!g){if(T=A||S?{}:(0,N.A)(e),!k)return A?m(e,h(T,e)):f(e,l(T,e))}else{if(!H[C])return g?e:{};T=D(e,C,k)}}x||(x=new n.A);var R=x.get(e);if(R)return R;x.set(e,T),j(e)?e.forEach(function(n){T.add(t(n,r,s,n,e,x))}):z(e)&&e.forEach(function(n,i){T.set(i,t(n,r,s,i,e,x))});var L=_?A?v.A:y.A:A?c.A:o.A,O=E?void 0:L(e);return(0,i.A)(O||e,function(n,i){O&&(n=e[i=n]),(0,a.A)(T,i,t(n,r,s,i,e,x))}),T}},4288(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(9841),i=r(8446);const a=function(t,e){return function(r,n){if(null==r)return r;if(!(0,i.A)(r))return t(r,n);for(var a=r.length,s=e?a:-1,o=Object(r);(e?s--:++si});var n=r(1882);const i=function(t,e,r){for(var i=-1,a=t.length;++ii});var n=r(4288);const i=function(t,e){var r=[];return(0,n.A)(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r}},5707(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++ac});var n=r(6912),i=r(241),a=r(5175),s=r(2049),o=i.A?i.A.isConcatSpreadable:void 0;const l=function(t){return(0,s.A)(t)||(0,a.A)(t)||!!(o&&t&&t[o])};const c=function t(e,r,i,a,s){var o=-1,c=e.length;for(i||(i=l),s||(s=[]);++o0&&i(h)?r>1?t(h,r-1,i,a,s):(0,n.A)(s,h):a||(s[s.length]=h)}return s}},7132(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return function(e,r,n){for(var i=-1,a=Object(e),s=n(e),o=s.length;o--;){var l=s[t?o:++i];if(!1===r(a[l],l,a))break}return e}}()},9841(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(7132),i=r(7422);const a=function(t,e){return t&&(0,n.A)(t,e,i.A)}},6318(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(1521),i=r(901);const a=function(t,e){for(var r=0,a=(e=(0,n.A)(e,t)).length;null!=t&&ra});var n=r(6912),i=r(2049);const a=function(t,e,r){var a=e(t);return(0,i.A)(t)?a:(0,n.A)(a,r(t))}},9672(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(241),i=r(451),a=r(5606),s=n.A?n.A.toStringTag:void 0;const o=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?(0,i.A)(t):(0,a.A)(t)}},5205(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(5707);const i=function(t){return t!=t};const a=function(t,e,r){for(var n=r-1,i=t.length;++nW});var n=r(2080),i=r(8300),a=r(3736),s=r(4099);const o=function(t,e,r,n,o,l){var c=1&r,h=t.length,u=e.length;if(h!=u&&!(c&&u>h))return!1;var d=l.get(t),p=l.get(e);if(d&&p)return d==e&&p==t;var f=-1,g=!0,m=2&r?new i.A:void 0;for(l.set(t,e),l.set(e,t);++fs});var n=r(7271);const i=(0,r(367).A)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,n.A)(t))return i(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}},6224(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){return ta});var n=r(4288),i=r(8446);const a=function(t,e){var r=-1,a=(0,i.A)(t)?Array(t.length):[];return(0,n.A)(t,function(t,n,i){a[++r]=e(t,n,i)}),a}},5507(t,e,r){"use strict";r.d(e,{A:()=>h});var n=r(6318),i=r(2851),a=r(1521),s=r(5353),o=r(3149),l=r(901);const c=function(t,e,r,n){if(!(0,o.A)(t))return t;for(var c=-1,h=(e=(0,a.A)(e,t)).length,u=h-1,d=t;null!=d&&++cn});const n=function(t){return function(e){return null==e?void 0:e[t]}}},4326(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(9008),i=r(5255),a=r(7424);const s=function(t,e){return(0,a.A)((0,i.A)(t,e,n.A),t+"")}},2789(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return function(e){return t(e)}}},7371(t,e,r){"use strict";r.d(e,{A:()=>u});var n=r(8300),i=r(5530),a=r(7809),s=r(4099),o=r(9857),l=r(9921),c=r(9959);const h=o.A&&1/(0,c.A)(new o.A([,-0]))[1]==1/0?function(t){return new o.A(t)}:l.A;const u=function(t,e,r){var o=-1,l=i.A,u=t.length,d=!0,p=[],f=p;if(r)d=!1,l=a.A;else if(u>=200){var g=e?null:h(t);if(g)return(0,c.A)(g);d=!1,l=s.A,f=new n.A}else f=e?[]:p;t:for(;++on});const n=function(t,e){return t.has(e)}},9922(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(9008);const i=function(t){return"function"==typeof t?t:n.A}},1521(t,e,r){"use strict";r.d(e,{A:()=>h});var n=r(2049),i=r(6586),a=r(6632);var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;const l=function(t){var e=(0,a.A)(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(s,function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)}),e});var c=r(3456);const h=function(t,e){return(0,n.A)(t)?t:(0,i.A)(t,e)?[t]:l((0,c.A)(t))}},565(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(3988);const i=function(t){var e=new t.constructor(t.byteLength);return new n.A(e).set(new n.A(t)),e}},154(t,e,r){"use strict";r.d(e,{A:()=>l});var n=r(1917),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===i?n.A.Buffer:void 0,o=s?s.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var r=t.length,n=o?o(r):new t.constructor(r);return t.copy(n),n}},1801(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(565);const i=function(t,e){var r=e?(0,n.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},9759(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++ra});var n=r(2851),i=r(2528);const a=function(t,e,r,a){var s=!r;r||(r={});for(var o=-1,l=e.length;++oa});var n=r(4326),i=r(6832);const a=function(t){return(0,n.A)(function(e,r){var n=-1,a=r.length,s=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(a--,s):void 0,o&&(0,i.A)(r[0],r[1],o)&&(s=a<3?void 0:s,a=1),e=Object(e);++ni});var n=r(8562);const i=function(){try{var t=(0,n.A)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},2136(t,e,r){"use strict";r.d(e,{A:()=>n});const n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},9042(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(3831),i=r(4792),a=r(7422);const s=function(t){return(0,n.A)(t,a.A,i.A)}},3973(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(3831),i=r(3511),a=r(9999);const s=function(t){return(0,n.A)(t,a.A,i.A)}},8562(t,e,r){"use strict";r.d(e,{A:()=>v});var n=r(9610);const i=r(1917).A["__core-js_shared__"];var a,s=(a=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";const o=function(t){return!!s&&s in t};var l=r(3149),c=r(1121),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 m=function(t){return!(!(0,l.A)(t)||o(t))&&((0,n.A)(t)?g:h).test((0,c.A)(t))};const y=function(t,e){return null==t?void 0:t[e]};const v=function(t,e){var r=y(t,e);return m(r)?r:void 0}},5647(t,e,r){"use strict";r.d(e,{A:()=>n});const n=(0,r(367).A)(Object.getPrototypeOf,Object)},451(t,e,r){"use strict";r.d(e,{A:()=>l});var n=r(241),i=Object.prototype,a=i.hasOwnProperty,s=i.toString,o=n.A?n.A.toStringTag:void 0;const l=function(t){var e=a.call(t,o),r=t[o];try{t[o]=void 0;var n=!0}catch(l){}var i=s.call(t);return n&&(e?t[o]=r:delete t[o]),i}},4792(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(2634),i=r(3153),a=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;const o=s?function(t){return null==t?[]:(t=Object(t),(0,n.A)(s(t),function(e){return a.call(t,e)}))}:i.A},3511(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(6912),i=r(5647),a=r(4792),s=r(3153);const o=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,n.A)(e,(0,a.A)(t)),t=(0,i.A)(t);return e}:s.A},9137(t,e,r){"use strict";r.d(e,{A:()=>k});var n=r(8562),i=r(1917);const a=(0,n.A)(i.A,"DataView");var s=r(8335);const o=(0,n.A)(i.A,"Promise");var l=r(9857);const c=(0,n.A)(i.A,"WeakMap");var h=r(9672),u=r(1121),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",m="[object DataView]",y=(0,u.A)(a),v=(0,u.A)(s.A),b=(0,u.A)(o),x=(0,u.A)(l.A),w=(0,u.A)(c),T=h.A;(a&&T(new a(new ArrayBuffer(1)))!=m||s.A&&T(new s.A)!=d||o&&T(o.resolve())!=p||l.A&&T(new l.A)!=f||c&&T(new c)!=g)&&(T=function(t){var e=(0,h.A)(t),r="[object Object]"==e?t.constructor:void 0,n=r?(0,u.A)(r):"";if(n)switch(n){case y:return m;case v:return d;case b:return p;case x:return f;case w:return g}return e});const k=T},5054(t,e,r){"use strict";r.d(e,{A:()=>c});var n=r(1521),i=r(5175),a=r(2049),s=r(5353),o=r(5254),l=r(901);const c=function(t,e,r){for(var c=-1,h=(e=(0,n.A)(e,t)).length,u=!1;++cl});var n=r(3149),i=Object.create;const a=function(){function t(){}return function(e){if(!(0,n.A)(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var s=r(5647),o=r(7271);const l=function(t){return"function"!=typeof t.constructor||(0,o.A)(t)?{}:a((0,s.A)(t))}},5353(t,e,r){"use strict";r.d(e,{A:()=>i});var n=/^(?:0|[1-9]\d*)$/;const i=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&to});var n=r(6984),i=r(8446),a=r(5353),s=r(3149);const o=function(t,e,r){if(!(0,s.A)(r))return!1;var o=typeof e;return!!("number"==o?(0,i.A)(r)&&(0,a.A)(e,r.length):"string"==o&&e in r)&&(0,n.A)(r[e],t)}},6586(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(2049),i=r(1882),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;const o=function(t,e){if((0,n.A)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!(0,i.A)(t))||(s.test(t)||!a.test(t)||null!=e&&t in Object(e))}},7271(t,e,r){"use strict";r.d(e,{A:()=>i});var n=Object.prototype;const i=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},4841(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(2136),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===i&&n.A.process;const o=function(){try{var t=a&&a.require&&a.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(e){}}()},5606(t,e,r){"use strict";r.d(e,{A:()=>i});var n=Object.prototype.toString;const i=function(t){return n.call(t)}},367(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){return function(r){return t(e(r))}}},5255(t,e,r){"use strict";r.d(e,{A:()=>a});const n=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)};var i=Math.max;const a=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,s=-1,o=i(a.length-e,0),l=Array(o);++sa});var n=r(2136),i="object"==typeof self&&self&&self.Object===Object&&self;const a=n.A||i||Function("return this")()},9959(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},7424(t,e,r){"use strict";r.d(e,{A:()=>c});var n=r(9142),i=r(4171),a=r(9008);const s=i.A?function(t,e){return(0,i.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,n.A)(e),writable:!0})}:a.A;var o=Date.now;const l=function(t){var e=0,r=0;return function(){var n=o(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const c=l(s)},901(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(1882);const i=function(t){if("string"==typeof t||(0,n.A)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},1121(t,e,r){"use strict";r.d(e,{A:()=>i});var n=Function.prototype.toString;const i=function(t){if(null!=t){try{return n.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},53(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(4507);const i=function(t){return(0,n.A)(t,4)}},9142(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return function(){return t}}},3068(t,e,r){"use strict";r.d(e,{A:()=>c});var n=r(4326),i=r(6984),a=r(6832),s=r(9999),o=Object.prototype,l=o.hasOwnProperty;const c=(0,n.A)(function(t,e){t=Object(t);var r=-1,n=e.length,c=n>2?e[2]:void 0;for(c&&(0,a.A)(e[0],e[1],c)&&(n=1);++rn});const n=function(t,e){return t===e||t!=t&&e!=e}},4092(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(2634),i=r(1790),a=r(6307),s=r(2049);const o=function(t,e){return((0,s.A)(t)?n.A:i.A)(t,(0,a.A)(e,3))}},473(t,e,r){"use strict";r.d(e,{A:()=>h});var n=r(6307),i=r(8446),a=r(7422);const s=function(t){return function(e,r,s){var o=Object(e);if(!(0,i.A)(e)){var l=(0,n.A)(r,3);e=(0,a.A)(e),r=function(t){return l(o[t],t,o)}}var c=t(e,r,s);return c>-1?o[l?e[c]:c]:void 0}};var o=r(5707),l=r(8593),c=Math.max;const h=s(function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var a=null==r?0:(0,l.A)(r);return a<0&&(a=c(i+a,0)),(0,o.A)(t,(0,n.A)(e,3),a)})},8139(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(7671),i=r(4722);const a=function(t,e){return(0,n.A)((0,i.A)(t,e),1)}},4098(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(7671);const i=function(t){return(null==t?0:t.length)?(0,n.A)(t,1):[]}},8058(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(2641),i=r(4288),a=r(9922),s=r(2049);const o=function(t,e){return((0,s.A)(t)?n.A:i.A)(t,(0,a.A)(e))}},9622(t,e,r){"use strict";r.d(e,{A:()=>s});var n=Object.prototype.hasOwnProperty;const i=function(t,e){return null!=t&&n.call(t,e)};var a=r(5054);const s=function(t,e){return null!=t&&(0,a.A)(t,e,i)}},6964(t,e,r){"use strict";r.d(e,{A:()=>a});const n=function(t,e){return null!=t&&e in Object(t)};var i=r(5054);const a=function(t,e){return null!=t&&(0,i.A)(t,e,n)}},9008(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return t}},5175(t,e,r){"use strict";r.d(e,{A:()=>h});var n=r(9672),i=r(3098);const a=function(t){return(0,i.A)(t)&&"[object Arguments]"==(0,n.A)(t)};var s=Object.prototype,o=s.hasOwnProperty,l=s.propertyIsEnumerable,c=a(function(){return arguments}())?a:function(t){return(0,i.A)(t)&&o.call(t,"callee")&&!l.call(t,"callee")};const h=c},2049(t,e,r){"use strict";r.d(e,{A:()=>n});const n=Array.isArray},8446(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(9610),i=r(5254);const a=function(t){return null!=t&&(0,i.A)(t.length)&&!(0,n.A)(t)}},3533(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(8446),i=r(3098);const a=function(t){return(0,i.A)(t)&&(0,n.A)(t)}},1200(t,e,r){"use strict";r.d(e,{A:()=>l});var n=r(1917);const i=function(){return!1};var a="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=a&&"object"==typeof module&&module&&!module.nodeType&&module,o=s&&s.exports===a?n.A.Buffer:void 0;const l=(o?o.isBuffer:void 0)||i},6401(t,e,r){"use strict";r.d(e,{A:()=>d});var n=r(4453),i=r(9137),a=r(5175),s=r(2049),o=r(8446),l=r(1200),c=r(7271),h=r(4749),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,o.A)(t)&&((0,s.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,h.A)(t)||(0,a.A)(t)))return!t.length;var e=(0,i.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,c.A)(t))return!(0,n.A)(t).length;for(var r in t)if(u.call(t,r))return!1;return!0}},9610(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(9672),i=r(3149);const a=function(t){if(!(0,i.A)(t))return!1;var e=(0,n.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3149(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3098(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return null!=t&&"object"==typeof t}},9703(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(9672),i=r(2049),a=r(3098);const s=function(t){return"string"==typeof t||!(0,i.A)(t)&&(0,a.A)(t)&&"[object String]"==(0,n.A)(t)}},1882(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(9672),i=r(3098);const a=function(t){return"symbol"==typeof t||(0,i.A)(t)&&"[object Symbol]"==(0,n.A)(t)}},4749(t,e,r){"use strict";r.d(e,{A:()=>u});var n=r(9672),i=r(5254),a=r(3098),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;const o=function(t){return(0,a.A)(t)&&(0,i.A)(t.length)&&!!s[(0,n.A)(t)]};var l=r(2789),c=r(4841),h=c.A&&c.A.isTypedArray;const u=h?(0,l.A)(h):o},9592(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return void 0===t}},7422(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(2505),i=r(4453),a=r(8446);const s=function(t){return(0,a.A)(t)?(0,n.A)(t):(0,i.A)(t)}},9999(t,e,r){"use strict";r.d(e,{A:()=>h});var n=r(2505),i=r(3149),a=r(7271);const s=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e};var o=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,i.A)(t))return s(t);var e=(0,a.A)(t),r=[];for(var n in t)("constructor"!=n||!e&&o.call(t,n))&&r.push(n);return r};var c=r(8446);const h=function(t){return(0,c.A)(t)?(0,n.A)(t,!0):l(t)}},6666(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},4722(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(5572),i=r(6307),a=r(2568),s=r(2049);const o=function(t,e){return((0,s.A)(t)?n.A:a.A)(t,(0,i.A)(e,3))}},6632(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(2050);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(i.Cache||n.A),r}i.Cache=n.A;const a=i},7222(t,e,r){"use strict";r.d(e,{A:()=>M});var n=r(2080),i=r(2528),a=r(6984);const s=function(t,e,r){(void 0!==r&&!(0,a.A)(t[e],r)||void 0===r&&!(e in t))&&(0,i.A)(t,e,r)};var o=r(7132),l=r(154),c=r(1801),h=r(9759),u=r(407),d=r(5175),p=r(2049),f=r(3533),g=r(1200),m=r(9610),y=r(3149),v=r(9672),b=r(5647),x=r(3098),w=Function.prototype,T=Object.prototype,k=w.toString,A=T.hasOwnProperty,_=k.call(Object);const E=function(t){if(!(0,x.A)(t)||"[object Object]"!=(0,v.A)(t))return!1;var e=(0,b.A)(t);if(null===e)return!0;var r=A.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&k.call(r)==_};var C=r(4749);const S=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var R=r(2031),L=r(9999);const D=function(t){return(0,R.A)(t,(0,L.A)(t))};const N=function(t,e,r,n,i,a,o){var v=S(t,r),b=S(e,r),x=o.get(b);if(x)s(t,r,x);else{var w=a?a(v,b,r+"",t,e,o):void 0,T=void 0===w;if(T){var k=(0,p.A)(b),A=!k&&(0,g.A)(b),_=!k&&!A&&(0,C.A)(b);w=b,k||A||_?(0,p.A)(v)?w=v:(0,f.A)(v)?w=(0,h.A)(v):A?(T=!1,w=(0,l.A)(b,!0)):_?(T=!1,w=(0,c.A)(b,!0)):w=[]:E(b)||(0,d.A)(b)?(w=v,(0,d.A)(v)?w=D(v):(0,y.A)(v)&&!(0,m.A)(v)||(w=(0,u.A)(b))):T=!1}T&&(o.set(b,w),i(w,b,n,a,o),o.delete(b)),s(t,r,w)}};const I=function t(e,r,i,a,l){e!==r&&(0,o.A)(r,function(o,c){if(l||(l=new n.A),(0,y.A)(o))N(e,r,c,i,t,a,l);else{var h=a?a(S(e,c),o,c+"",e,r,l):void 0;void 0===h&&(h=o),s(e,c,h)}},L.A)};const M=(0,r(3767).A)(function(t,e,r){I(t,e,r)})},6452(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(2559),i=r(6224),a=r(9008);const s=function(t){return t&&t.length?(0,n.A)(t,a.A,i.A):void 0}},9921(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(){}},3130(t,e,r){"use strict";r.d(e,{A:()=>l});const n=function(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++in});const n=function(){return[]}},3631(t,e,r){"use strict";r.d(e,{A:()=>g});var n=/\s/;const i=function(t){for(var e=t.length;e--&&n.test(t.charAt(e)););return e};var a=/^\s+/;const s=function(t){return t?t.slice(0,i(t)+1).replace(a,""):t};var o=r(3149),l=r(1882),c=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;const p=function(t){if("number"==typeof t)return t;if((0,l.A)(t))return NaN;if((0,o.A)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=(0,o.A)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=s(t);var r=h.test(t);return r||u.test(t)?d(t.slice(2),r?2:8):c.test(t)?NaN:+t};var f=1/0;const g=function(t){return t?(t=p(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},8593(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(3631);const i=function(t){var e=(0,n.A)(t),r=e%1;return e==e?r?e-r:e:0}},3456(t,e,r){"use strict";r.d(e,{A:()=>h});var n=r(241),i=r(5572),a=r(2049),s=r(1882),o=n.A?n.A.prototype:void 0,l=o?o.toString:void 0;const c=function t(e){if("string"==typeof e)return e;if((0,a.A)(e))return(0,i.A)(e,t)+"";if((0,s.A)(e))return l?l.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};const h=function(t){return null==t?"":c(t)}},2866(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(5572);const i=function(t,e){return(0,n.A)(e,function(e){return t[e]})};var a=r(7422);const s=function(t){return null==t?[]:i(t,(0,a.A)(t))}},8249(t,e,r){"use strict";r.d(e,{diagram:()=>Z});var n=r(3590),i=r(607),a=r(5871),s=r(3226),o=r(144),l=r(797),c=r(8731),h=r(165),u=r(6527),d=r(1444),p={L:"left",R:"right",T:"top",B:"bottom"},f={L:(0,l.K2)(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:(0,l.K2)(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:(0,l.K2)(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:(0,l.K2)(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},g={L:(0,l.K2)((t,e)=>t-e+2,"L"),R:(0,l.K2)((t,e)=>t-2,"R"),T:(0,l.K2)((t,e)=>t-e+2,"T"),B:(0,l.K2)((t,e)=>t-2,"B")},m=(0,l.K2)(function(t){return v(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),y=(0,l.K2)(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),v=(0,l.K2)(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),b=(0,l.K2)(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),x=(0,l.K2)(function(t,e){const r=v(t)&&b(e),n=b(t)&&v(e);return r||n},"isArchitectureDirectionXY"),w=(0,l.K2)(function(t){const e=t[0],r=t[1],n=v(e)&&b(r),i=b(e)&&v(r);return n||i},"isArchitecturePairXY"),T=(0,l.K2)(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),k=(0,l.K2)(function(t,e){const r=`${t}${e}`;return T(r)?r:void 0},"getArchitectureDirectionPair"),A=(0,l.K2)(function([t,e],r){const n=r[0],i=r[1];return v(n)?b(i)?[t+("L"===n?-1:1),e+("T"===i?1:-1)]:[t+("L"===n?-1:1),e]:v(i)?[t+("L"===i?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),_=(0,l.K2)(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),E=(0,l.K2)(function(t,e){return x(t,e)?"bend":v(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),C=(0,l.K2)(function(t){return"service"===t.type},"isArchitectureService"),S=(0,l.K2)(function(t){return"junction"===t.type},"isArchitectureJunction"),R=(0,l.K2)(t=>t.data(),"edgeData"),L=(0,l.K2)(t=>t.data(),"nodeData"),D=o.UI.architecture,N=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI,this.clear()}static{(0,l.K2)(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},(0,o.IU)()}addService({id:t,icon:e,in:r,title:n,iconText:i}){if(void 0!==this.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==r){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[r])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[r])throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(C)}addJunction({id:t,in:e}){this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(S)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:r,title:n}){if(void 0!==this.registeredIds?.[t])throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==r){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===this.registeredIds?.[r])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[r])throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:n,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!y(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(r)}`);if(!y(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(n)}`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);const c=this.nodes[t].in,h=this.nodes[e].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const u={lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:o,title:l};this.edges.push(u),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){const t={},e=Object.entries(this.nodes).reduce((e,[r,n])=>(e[r]=n.edges.reduce((e,n)=>{const i=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(i&&a&&i!==a){const e=E(n.lhsDir,n.rhsDir);"bend"!==e&&(t[i]??={},t[i][a]=e,t[a]??={},t[a][i]=e)}if(n.lhsId===r){const t=k(n.lhsDir,n.rhsDir);t&&(e[t]=n.rhsId)}else{const t=k(n.rhsDir,n.lhsDir);t&&(e[t]=n.lhsId)}return e},{}),e),{}),r=Object.keys(e)[0],n={[r]:1},i=Object.keys(e).reduce((t,e)=>e===r?t:{...t,[e]:1},{}),a=(0,l.K2)(t=>{const r={[t]:[0,0]},a=[t];for(;a.length>0;){const t=a.shift();if(t){n[t]=1,delete i[t];const s=e[t],[o,l]=r[t];Object.entries(s).forEach(([t,e])=>{n[e]||(r[e]=A([o,l],t),a.push(e))})}}return r},"BFS"),s=[a(r)];for(;Object.keys(i).length>0;)s.push(a(Object.keys(i)[0]));this.dataStructures={adjList:e,spatialMaps:s,groupAlignments:t}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return(0,s.$t)({...D,...(0,o.zj)().architecture})}getConfigField(t){return this.getConfig()[t]}},I=(0,l.K2)((t,e)=>{(0,a.S)(t,e),t.groups.map(t=>e.addGroup(t)),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(t=>e.addEdge(t))},"populateDb"),M={parser:{yy:void 0},parse:(0,l.K2)(async t=>{const e=await(0,c.qg)("architecture",t);l.Rm.debug(e);const r=M.parser?.yy;if(!(r instanceof N))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");I(e,r)},"parse")},O=(0,l.K2)(t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles"),P=(0,l.K2)(t=>`${t}`,"wrapIcon"),$={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:P('')},server:{body:P('')},disk:{body:P('')},internet:{body:P('')},cloud:{body:P('')},unknown:i.Gc,blank:{body:P("")}}},B=(0,l.K2)(async function(t,e,r){const n=r.getConfigField("padding"),a=r.getConfigField("iconSize"),l=a/2,c=a/6,h=c/2;await Promise.all(e.edges().map(async e=>{const{source:a,sourceDir:u,sourceArrow:d,sourceGroup:p,target:m,targetDir:y,targetArrow:T,targetGroup:A,label:E}=R(e);let{x:C,y:S}=e[0].sourceEndpoint();const{x:L,y:D}=e[0].midpoint();let{x:N,y:I}=e[0].targetEndpoint();const M=n+4;if(p&&(v(u)?C+="L"===u?-M:M:S+="T"===u?-M:M+18),A&&(v(y)?N+="L"===y?-M:M:I+="T"===y?-M:M+18),p||"junction"!==r.getNode(a)?.type||(v(u)?C+="L"===u?l:-l:S+="T"===u?l:-l),A||"junction"!==r.getNode(m)?.type||(v(y)?N+="L"===y?l:-l:I+="T"===y?l:-l),e[0]._private.rscratch){const e=t.insert("g");if(e.insert("path").attr("d",`M ${C},${S} L ${L},${D} L${N},${I} `).attr("class","edge").attr("id",(0,s.rY)(a,m,{prefix:"L"})),d){const t=v(u)?g[u](C,c):C-h,r=b(u)?g[u](S,c):S-h;e.insert("polygon").attr("points",f[u](c)).attr("transform",`translate(${t},${r})`).attr("class","arrow")}if(T){const t=v(y)?g[y](N,c):N-h,r=b(y)?g[y](I,c):I-h;e.insert("polygon").attr("points",f[y](c)).attr("transform",`translate(${t},${r})`).attr("class","arrow")}if(E){const t=x(u,y)?"XY":v(u)?"X":"Y";let r=0;r="X"===t?Math.abs(C-N):"Y"===t?Math.abs(S-I)/1.5:Math.abs(C-N)/2;const n=e.append("g");if(await(0,i.GZ)(n,E,{useHtmlLabels:!1,width:r,classes:"architecture-service-label"},(0,o.D7)()),n.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===t)n.attr("transform","translate("+L+", "+D+")");else if("Y"===t)n.attr("transform","translate("+L+", "+D+") rotate(-90)");else if("XY"===t){const t=k(u,y);if(t&&w(t)){const e=n.node().getBoundingClientRect(),[r,i]=_(t);n.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*r*i*45})`);const a=n.node().getBoundingClientRect();n.attr("transform",`\n translate(${L}, ${D-e.height/2})\n translate(${r*a.width/2}, ${i*a.height/2})\n rotate(${-1*r*i*45}, 0, ${e.height/2})\n `)}}}}}))},"drawEdges"),F=(0,l.K2)(async function(t,e,r){const n=.75*r.getConfigField("padding"),a=r.getConfigField("fontSize"),s=r.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async e=>{const l=L(e);if("group"===l.type){const{h:c,w:h,x1:u,y1:d}=e.boundingBox(),p=t.append("rect");p.attr("id",`group-${l.id}`).attr("x",u+s).attr("y",d+s).attr("width",h).attr("height",c).attr("class","node-bkg");const f=t.append("g");let g=u,m=d;if(l.icon){const t=f.append("g");t.html(`${await(0,i.WY)(l.icon,{height:n,width:n,fallbackPrefix:$.prefix})}`),t.attr("transform","translate("+(g+s+1)+", "+(m+s+1)+")"),g+=n,m+=a/2-1-2}if(l.label){const t=f.append("g");await(0,i.GZ)(t,l.label,{useHtmlLabels:!1,width:h,classes:"architecture-service-label"},(0,o.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),t.attr("transform","translate("+(g+s+4)+", "+(m+s+2)+")")}r.setElementForId(l.id,p)}}))},"drawGroups"),z=(0,l.K2)(async function(t,e,r){const n=(0,o.D7)();for(const a of r){const r=e.append("g"),s=t.getConfigField("iconSize");if(a.title){const t=r.append("g");await(0,i.GZ)(t,a.title,{useHtmlLabels:!1,width:1.5*s,classes:"architecture-service-label"},n),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+s/2+", "+s+")")}const l=r.append("g");if(a.icon)l.html(`${await(0,i.WY)(a.icon,{height:s,width:s,fallbackPrefix:$.prefix})}`);else if(a.iconText){l.html(`${await(0,i.WY)("blank",{height:s,width:s,fallbackPrefix:$.prefix})}`);const t=l.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html((0,o.jZ)(a.iconText,n)),e=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/e)};`)}else l.append("path").attr("class","node-bkg").attr("id","node-"+a.id).attr("d",`M0 ${s} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 Z`);r.attr("id",`service-${a.id}`).attr("class","architecture-service");const{width:c,height:h}=r.node().getBBox();a.width=c,a.height=h,t.setElementForId(a.id,r)}return 0},"drawServices"),K=(0,l.K2)(function(t,e,r){r.forEach(r=>{const n=e.append("g"),i=t.getConfigField("iconSize");n.append("g").append("rect").attr("id","node-"+r.id).attr("fill-opacity","0").attr("width",i).attr("height",i),n.attr("class","architecture-junction");const{width:a,height:s}=n._groups[0][0].getBBox();n.width=a,n.height=s,t.setElementForId(r.id,n)})},"drawJunctions");function q(t,e,r){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function U(t,e,r){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function j(t,e){e.nodes().map(e=>{const r=L(e);if("group"===r.type)return;r.x=e.position().x,r.y=e.position().y;t.getElementById(r.id).attr("transform","translate("+(r.x||0)+","+(r.y||0)+")")})}function G(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function Y(t,e){t.forEach(t=>{const{lhsId:r,rhsId:n,lhsInto:i,lhsGroup:a,rhsInto:s,lhsDir:o,rhsDir:l,rhsGroup:c,title:h}=t,u=x(t.lhsDir,t.rhsDir)?"segments":"straight",d={id:`${r}-${n}`,label:h,source:r,sourceDir:o,sourceArrow:i,sourceGroup:a,sourceEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%",target:n,targetDir:l,targetArrow:s,targetGroup:c,targetEndpoint:"L"===l?"0 50%":"R"===l?"100% 50%":"T"===l?"50% 0":"50% 100%"};e.add({group:"edges",data:d,classes:u})})}function W(t,e,r){const n=(0,l.K2)((t,e)=>Object.entries(t).reduce((t,[n,i])=>{let a=0;const s=Object.entries(i);if(1===s.length)return t[n]=s[0][1],t;for(let o=0;o{const r={},i={};return Object.entries(e).forEach(([e,[n,a]])=>{const s=t.getNode(e)?.in??"default";r[a]??={},r[a][s]??=[],r[a][s].push(e),i[n]??={},i[n][s]??=[],i[n][s].push(e)}),{horiz:Object.values(n(r,"horizontal")).filter(t=>t.length>1),vert:Object.values(n(i,"vertical")).filter(t=>t.length>1)}}),[a,s]=i.reduce(([t,e],{horiz:r,vert:n})=>[[...t,...r],[...e,...n]],[[],[]]);return{horizontal:a,vertical:s}}function H(t,e){const r=[],n=(0,l.K2)(t=>`${t[0]},${t[1]}`,"posToStr"),i=(0,l.K2)(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{const a=Object.fromEntries(Object.entries(t).map(([t,e])=>[n(e),t])),s=[n([0,0])],o={},l={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){const t=s.shift();if(t){o[t]=1;const c=a[t];if(c){const h=i(t);Object.entries(l).forEach(([t,i])=>{const l=n([h[0]+i[0],h[1]+i[1]]),u=a[l];u&&!o[l]&&(s.push(l),r.push({[p[t]]:u,[p[m(t)]]:c,gap:1.5*e.getConfigField("iconSize")}))})}}}}),r}function V(t,e,r,n,i,{spatialMaps:a,groupAlignments:s}){return new Promise(o=>{const c=(0,d.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),u=(0,h.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${i.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${i.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});c.remove(),G(r,u),q(t,u,i),U(e,u,i),Y(n,u);const p=W(i,a,s),f=H(a,i),g=u.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[e,r]=t.connectedNodes(),{parent:n}=L(e),{parent:a}=L(r);return n===a?1.5*i.getConfigField("iconSize"):.5*i.getConfigField("iconSize")},edgeElasticity(t){const[e,r]=t.connectedNodes(),{parent:n}=L(e),{parent:i}=L(r);return n===i?.45:.001},alignmentConstraint:p,relativePlacementConstraint:f});g.one("layoutstop",()=>{function t(t,e,r,n){let i,a;const{x:s,y:o}=t,{x:l,y:c}=e;a=(n-o+(s-r)*(o-c)/(s-l))/Math.sqrt(1+Math.pow((o-c)/(s-l),2)),i=Math.sqrt(Math.pow(n-o,2)+Math.pow(r-s,2)-Math.pow(a,2));i/=Math.sqrt(Math.pow(l-s,2)+Math.pow(c-o,2));let h=(l-s)*(n-o)-(c-o)*(r-s);switch(!0){case h>=0:h=1;break;case h<0:h=-1}let u=(l-s)*(r-s)+(c-o)*(n-o);switch(!0){case u>=0:u=1;break;case u<0:u=-1}return a=Math.abs(a)*h,i*=u,{distances:a,weights:i}}(0,l.K2)(t,"getSegmentWeights"),u.startBatch();for(const e of Object.values(u.edges()))if(e.data?.()){const{x:r,y:n}=e.source().position(),{x:i,y:a}=e.target().position();if(r!==i&&n!==a){const r=e.sourceEndpoint(),n=e.targetEndpoint(),{sourceDir:i}=R(e),[a,s]=b(i)?[r.x,n.y]:[n.x,r.y],{weights:o,distances:l}=t(r,n,a,s);e.style("segment-distances",l),e.style("segment-weights",o)}}u.endBatch(),g.run()}),g.run(),u.ready(t=>{l.Rm.info("Ready",t),o(u)})})}(0,i.pC)([{name:$.prefix,icons:$}]),h.A.use(u),(0,l.K2)(q,"addServices"),(0,l.K2)(U,"addJunctions"),(0,l.K2)(j,"positionNodes"),(0,l.K2)(G,"addGroups"),(0,l.K2)(Y,"addEdges"),(0,l.K2)(W,"getAlignments"),(0,l.K2)(H,"getRelativeConstraints"),(0,l.K2)(V,"layoutArchitecture");var X={draw:(0,l.K2)(async(t,e,r,i)=>{const a=i.db,s=a.getServices(),l=a.getJunctions(),c=a.getGroups(),h=a.getEdges(),u=a.getDataStructures(),d=(0,n.D)(e),p=d.append("g");p.attr("class","architecture-edges");const f=d.append("g");f.attr("class","architecture-services");const g=d.append("g");g.attr("class","architecture-groups"),await z(a,f,s),K(a,f,l);const m=await V(s,l,c,h,a,u);await B(p,m,a),await F(g,m,a),j(a,m),(0,o.ot)(void 0,d,a.getConfigField("padding"),a.getConfigField("useMaxWidth"))},"draw")},Z={parser:M,get db(){return new N},renderer:X,styles:O}},5996(t,e,r){"use strict";r.d(e,{diagram:()=>xe});var n=r(2501),i=r(8698),a=r(3245),s=r(607),o=r(3226),l=r(144),c=r(797),h=r(53),u=r(5582),d=r(5937),p=r(1444),f=r(697),g=function(){var t=(0,c.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,15],r=[1,7],n=[1,13],i=[1,14],a=[1,19],s=[1,16],o=[1,17],l=[1,18],h=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],p=[1,24],f=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],y={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,c.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",a[o-1]),n.setHierarchy(a[o-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:n.getLogger().debug("Rule: link: ",a[o],t),this.$={edgeTypeStr:a[o],label:""};break;case 15:n.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:const e=parseInt(a[o]),r=n.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr);const i=n.edgeStrToEdgeData(a[o-1].edgeTypeStr);this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:i,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:n.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this?this:"na"),n.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]);n.generateId();this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]);const s=n.generateId();this.$={id:s,type:"composite",label:"",children:a[o-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:n.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:n.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:n.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:n.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:n.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:o,46:l},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:n,29:i,31:a,39:s,43:o,46:l}),t(u,[2,16],{14:22,15:d,16:p}),t(u,[2,17]),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,22]),t(f,[2,25],{27:[1,25]}),t(u,[2,26]),{19:26,26:12,31:a},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},t(f,[2,24]),{10:e,11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:s,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(f,[2,23]),{18:[1,45]},{30:[1,46]},t(u,[2,28]),t(u,[2,35]),t(u,[2,36]),t(u,[2,37]),t(u,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},t(u,[2,27]),t(g,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},t(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,o="",l=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,c.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=s[w]&&s[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],s[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,o=p.yytext,l=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,l,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(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})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(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,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.K2)(function(t,e,r,n){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function b(){this.yy={}}return y.lexer=v,(0,c.K2)(b,"Parser"),b.prototype=y,y.Parser=b,new b}();g.parser=g;var m=g,y=new Map,v=[],b=new Map,x="color",w="fill",T=(0,l.D7)(),k=new Map,A=(0,c.K2)(t=>l.Y2.sanitizeText(t,T),"sanitizeText"),_=(0,c.K2)(function(t,e=""){let r=k.get(t);r||(r={id:t,styles:[],textStyles:[]},k.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(x).exec(t)){const t=e.replace(w,"bgFill").replace(x,w);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),E=(0,c.K2)(function(t,e=""){const r=y.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),C=(0,c.K2)(function(t,e){t.split(",").forEach(function(t){let r=y.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},y.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),S=(0,c.K2)((t,e)=>{const r=t.flat(),n=[],i=r.find(t=>"column-setting"===t?.type),a=i?.columns??-1;for(const s of r)if("number"==typeof a&&a>0&&"column-setting"!==s.type&&"number"==typeof s.widthInColumns&&s.widthInColumns>a&&c.Rm.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${a}`),s.label&&(s.label=A(s.label)),"classDef"!==s.type)if("applyClass"!==s.type)if("applyStyles"!==s.type)if("column-setting"===s.type)e.columns=s.columns??-1;else if("edge"===s.type){const t=(b.get(s.id)??0)+1;b.set(s.id,t),s.id=t+"-"+s.id,v.push(s)}else{s.label||("composite"===s.type?s.label="":s.label=s.id);const t=y.get(s.id);if(void 0===t?y.set(s.id,s):("na"!==s.type&&(t.type=s.type),s.label!==s.id&&(t.label=s.label)),s.children&&S(s.children,s),"space"===s.type){const t=s.width??1;for(let e=0;e{c.Rm.debug("Clear called"),(0,l.IU)(),L={id:"root",type:"composite",children:[],columns:-1},y=new Map([["root",L]]),R=[],k=new Map,v=[],b=new Map},"clear");function N(t){switch(c.Rm.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.Rm.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function I(t){return c.Rm.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function M(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}(0,c.K2)(N,"typeStr2Type"),(0,c.K2)(I,"edgeTypeStr2Type"),(0,c.K2)(M,"edgeStrToEdgeData");var O=0,P=(0,c.K2)(()=>(O++,"id-"+Math.random().toString(36).substr(2,12)+"-"+O),"generateId"),$=(0,c.K2)(t=>{L.children=t,S(t,L),R=L.children},"setHierarchy"),B=(0,c.K2)(t=>{const e=y.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),F=(0,c.K2)(()=>[...y.values()],"getBlocksFlat"),z=(0,c.K2)(()=>R||[],"getBlocks"),K=(0,c.K2)(()=>v,"getEdges"),q=(0,c.K2)(t=>y.get(t),"getBlock"),U=(0,c.K2)(t=>{y.set(t.id,t)},"setBlock"),j=(0,c.K2)(()=>c.Rm,"getLogger"),G=(0,c.K2)(function(){return k},"getClasses"),Y={getConfig:(0,c.K2)(()=>(0,l.zj)().block,"getConfig"),typeStr2Type:N,edgeTypeStr2Type:I,edgeStrToEdgeData:M,getLogger:j,getBlocksFlat:F,getBlocks:z,getEdges:K,setHierarchy:$,getBlock:q,setBlock:U,getColumns:B,getClasses:G,clear:D,generateId:P},W=(0,c.K2)((t,e)=>{const r=d.A,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return u.A(n,i,a,e)},"fade"),H=(0,c.K2)(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,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\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 .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\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 /* For html labels only */\n .labelBkg {\n background-color: ${W(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${W(t.mainBkg,.5)};\n fill: ${W(t.clusterBkg,.5)};\n stroke: ${W(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\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 ${(0,n.o)()}\n`,"getStyles"),V=(0,c.K2)((t,e,r,n)=>{e.forEach(e=>{X[e](t,r,n)})},"insertMarkers"),X={extension:(0,c.K2)((t,e,r)=>{c.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},Z=V,Q=(0,l.D7)()?.block?.padding??8;function J(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}(0,c.K2)(J,"calculateBlockPosition");var tt=(0,c.K2)(t=>{let e=0,r=0;for(const n of t.children){const{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};c.Rm.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),"space"!==n.type&&(i>e&&(e=i/(t.widthInColumns??1)),a>r&&(r=a))}return{width:e,height:r}},"getMaxChildSize");function et(t,e,r=0,n=0){c.Rm.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(const r of t.children)et(r,e);const s=tt(t);i=s.width,a=s.height,c.Rm.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(const e of t.children)e.size&&(c.Rm.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${i} ${a} ${JSON.stringify(e.size)}`),e.size.width=i*(e.widthInColumns??1)+Q*((e.widthInColumns??1)-1),e.size.height=a,e.size.x=0,e.size.y=0,c.Rm.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${i} maxHeight:${a}`));for(const r of t.children)et(r,e,i,a);const o=t.columns??-1;let l=0;for(const e of t.children)l+=e.widthInColumns??1;let h=t.children.length;o>0&&o0?Math.min(t.children.length,o):t.children.length;if(e>0){const r=(d-e*Q-Q)/e;c.Rm.debug("abc95 (growing to fit) width",t.id,d,t.size?.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:d,height:p,x:0,y:0}}c.Rm.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function rt(t,e){c.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const r=t.columns??-1;if(c.Rm.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){const n=t?.children[0]?.size?.width??0,i=t.children.length*n+(t.children.length-1)*Q;c.Rm.debug("widthOfChildren 88",i,"posX");let a=0;c.Rm.debug("abc91 block?.size?.x",t.id,t?.size?.x);let s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-Q,o=0;for(const l of t.children){const n=t;if(!l.size)continue;const{width:i,height:h}=l.size,{px:u,py:d}=J(r,a);if(d!=o&&(o=d,s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-Q,c.Rm.debug("New row in layout for block",t.id," and child ",l.id,o)),c.Rm.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${a} (px, py) ${u},${d} (${n?.size?.x},${n?.size?.y}) parent: ${n.id} width: ${i}${Q}`),n.size){const t=i/2;l.size.x=s+Q+t,c.Rm.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${s} new startingPosX${l.size.x} ${t} padding=${Q} width=${i} halfWidth=${t} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${i*(l?.widthInColumns??1)/2}`),s=l.size.x+t,l.size.y=n.size.y-n.size.height/2+d*(h+Q)+h/2+Q,c.Rm.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${s}${Q}${t}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${i*(l?.widthInColumns??1)/2}`)}l.children&&rt(l,e);let p=l?.widthInColumns??1;r>0&&(p=Math.min(p,r-a%r)),a+=p,c.Rm.debug("abc88 columnsPos",l,a)}}c.Rm.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function nt(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:a,y:s,width:o,height:l}=t.size;a-o/2n&&(n=a+o/2),s+l/2>i&&(i=s+l/2)}if(t.children)for(const a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=nt(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function it(t){const e=t.getBlock("root");if(!e)return;et(e,t,0,0),rt(e,t),c.Rm.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:n,maxX:i,maxY:a}=nt(e);return{x:r,y:n,width:i-r,height:a-n}}function at(t,e){e&&t.attr("style",e)}function st(t,e){const r=(0,p.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=r.append("xhtml:div"),i=t.label,a=t.isNode?"nodeLabel":"edgeLabel",s=n.append("span");return s.html((0,l.jZ)(i,e)),at(s,t.labelStyle),s.attr("class",a),at(n,t.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}(0,c.K2)(et,"setBlockSizes"),(0,c.K2)(rt,"layoutBlocks"),(0,c.K2)(nt,"findBounds"),(0,c.K2)(it,"layout"),(0,c.K2)(at,"applyStyle"),(0,c.K2)(st,"addHtmlLabel");var ot=(0,c.K2)(async(t,e,r,n)=>{let i=t||"";"object"==typeof i&&(i=i[0]);const a=(0,l.D7)();if((0,l._3)(a.flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
"),c.Rm.debug("vertexText"+i);return st({isNode:n,label:await(0,s.hE)((0,o.Sm)(i)),labelStyle:e.replace("fill:","color:")},a)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let n=[];n="string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[];for(const e of n){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),r?n.setAttribute("class","title-row"):n.setAttribute("class","row"),n.textContent=e.trim(),t.appendChild(n)}return t}},"createLabel"),lt=(0,c.K2)((t,e,r,n,i)=>{e.arrowTypeStart&&ht(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&ht(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),ct={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ht=(0,c.K2)((t,e,r,n,i,a)=>{const s=ct[r];if(!s)return void c.Rm.warn(`Unknown arrow type: ${r}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${o})`)},"addEdgeMarker"),ut={},dt={},pt=(0,c.K2)(async(t,e)=>{const r=(0,l.D7)(),n=(0,l._3)(r.flowchart.htmlLabels),i="markdown"===e.labelType?(0,s.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):await ot(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label");o.node().appendChild(i);let c,h=i.getBBox();if(n){const t=i.children[0],e=(0,p.Ltv)(i);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}if(o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),ut[e.id]=a,e.width=h.width,e.height=h.height,e.startLabelLeft){const r=await ot(e.startLabelLeft,e.labelStyle),n=t.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");c=i.node().appendChild(r);const a=r.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),dt[e.id]||(dt[e.id]={}),dt[e.id].startLeft=n,ft(c,e.startLabelLeft)}if(e.startLabelRight){const r=await ot(e.startLabelRight,e.labelStyle),n=t.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");c=n.node().appendChild(r),i.node().appendChild(r);const a=r.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),dt[e.id]||(dt[e.id]={}),dt[e.id].startRight=n,ft(c,e.startLabelRight)}if(e.endLabelLeft){const r=await ot(e.endLabelLeft,e.labelStyle),n=t.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");c=i.node().appendChild(r);const a=r.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),n.node().appendChild(r),dt[e.id]||(dt[e.id]={}),dt[e.id].endLeft=n,ft(c,e.endLabelLeft)}if(e.endLabelRight){const r=await ot(e.endLabelRight,e.labelStyle),n=t.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");c=i.node().appendChild(r);const a=r.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),n.node().appendChild(r),dt[e.id]||(dt[e.id]={}),dt[e.id].endRight=n,ft(c,e.endLabelRight)}return i},"insertEdgeLabel");function ft(t,e){(0,l.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(ft,"setTerminalWidth");var gt=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,ut[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=(0,l.D7)(),{subGraphTitleTotalMargin:i}=(0,a.O)(n);if(t.label){const n=ut[t.id];let a=t.x,s=t.y;if(r){const n=o._K.calcLabelPosition(r);c.Rm.debug("Moving label "+t.label+" from (",a,",",s,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(a=n.x,s=n.y)}n.attr("transform",`translate(${a}, ${s+i/2})`)}if(t.startLabelLeft){const e=dt[t.id].startLeft;let n=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.startLabelRight){const e=dt[t.id].startRight;let n=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelLeft){const e=dt[t.id].endLeft;let n=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelRight){const e=dt[t.id].endRight;let n=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),mt=(0,c.K2)((t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),yt=(0,c.K2)((t,e,r)=>{c.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2;let o=r.xMath.abs(n-e.x)*l){let t=r.y{c.Rm.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(t=>{if(mt(e,t)||i)n=t,i||r.push(t);else{const a=yt(e,n,t);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)||r.push(a),i=!0}}),r},"cutPathAtIntersect"),bt=(0,c.K2)(function(t,e,r,n,a,s,o){let h=r.points;c.Rm.debug("abc88 InsertEdge: edge=",r,"e=",e);let u=!1;const d=s.node(e.v);var f=s.node(e.w);f?.intersect&&d?.intersect&&(h=h.slice(1,r.points.length-1),h.unshift(d.intersect(h[0])),h.push(f.intersect(h[h.length-1]))),r.toCluster&&(c.Rm.debug("to cluster abc88",n[r.toCluster]),h=vt(r.points,n[r.toCluster].node),u=!0),r.fromCluster&&(c.Rm.debug("from cluster abc88",n[r.fromCluster]),h=vt(h.reverse(),n[r.fromCluster].node).reverse(),u=!0);const g=h.filter(t=>!Number.isNaN(t.y));let m=p.qrM;!r.curve||"graph"!==a&&"flowchart"!==a||(m=r.curve);const{x:y,y:v}=(0,i.RI)(r),b=(0,p.n8j)().x(y).y(v).curve(m);let x;switch(r.thickness){case"normal":x="edge-thickness-normal";break;case"thick":case"invisible":x="edge-thickness-thick";break;default:x=""}switch(r.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}const w=t.append("path").attr("d",b(g)).attr("id",r.id).attr("class"," "+x+(r.classes?" "+r.classes:"")).attr("style",r.style);let T="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(T=(0,l.ID)(!0)),lt(w,r,T,o,a);let k={};return u&&(k.updatedPath=h),k.originalPath=r.points,k},"insertEdge"),xt=(0,c.K2)(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),wt=(0,c.K2)((t,e,r)=>{const n=xt(t),i=e.height+2*r.padding,a=i/2,s=e.width+2*a+r.padding,o=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:a,y:0},{x:s/2,y:2*o},{x:s-a,y:0},{x:s,y:0},{x:s,y:-i/3},{x:s+2*o,y:-i/2},{x:s,y:-2*i/3},{x:s,y:-i},{x:s-a,y:-i},{x:s/2,y:-i-2*o},{x:a,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*o,y:-i/2},{x:0,y:-i/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:a,y:-i},{x:s-a,y:-i},{x:s,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:s,y:-i+a},{x:0,y:-i}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:s,y:0},{x:0,y:-a},{x:0,y:-i+a},{x:s,y:-i}]:n.has("right")&&n.has("left")?[{x:a,y:0},{x:a,y:-o},{x:s-a,y:-o},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:s-a,y:-i+o},{x:a,y:-i+o},{x:a,y:-i},{x:0,y:-i/2}]:n.has("up")&&n.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:a,y:-o},{x:a,y:-i+o},{x:0,y:-i+o},{x:s/2,y:-i},{x:s,y:-i+o},{x:s-a,y:-i+o},{x:s-a,y:-o},{x:s,y:-o}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:s,y:-a},{x:0,y:-i}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-i}]:n.has("left")&&n.has("up")?[{x:s,y:0},{x:0,y:-a},{x:s,y:-i}]:n.has("left")&&n.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-i}]:n.has("right")?[{x:a,y:-o},{x:a,y:-o},{x:s-a,y:-o},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:s-a,y:-i+o},{x:a,y:-i+o},{x:a,y:-i+o}]:n.has("left")?[{x:a,y:0},{x:a,y:-o},{x:s-a,y:-o},{x:s-a,y:-i+o},{x:a,y:-i+o},{x:a,y:-i},{x:0,y:-i/2}]:n.has("up")?[{x:a,y:-o},{x:a,y:-i+o},{x:0,y:-i+o},{x:s/2,y:-i},{x:s,y:-i+o},{x:s-a,y:-i+o},{x:s-a,y:-o}]:n.has("down")?[{x:s/2,y:0},{x:0,y:-o},{x:a,y:-o},{x:a,y:-i+o},{x:s-a,y:-i+o},{x:s-a,y:-o},{x:s,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function Tt(t,e){return t.intersect(e)}(0,c.K2)(Tt,"intersectNode");var kt=Tt;function At(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),c=Math.abs(e*r*s/l);n.x0}(0,c.K2)(St,"intersectLine"),(0,c.K2)(Rt,"sameSign");var Lt=St,Dt=Nt;function Nt(t,e,r){var n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=n-t.width/2-s,c=i-t.height/2-o,h=0;h1&&a.sort(function(t,e){var n=t.x-r.x,i=t.y-r.y,a=Math.sqrt(n*n+i*i),s=e.x-r.x,o=e.y-r.y,l=Math.sqrt(s*s+o*o);return a{var r,n,i=t.x,a=t.y,s=e.x-i,o=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),r=0===o?0:c*s/o,n=c):(s<0&&(l=-l),r=l,n=0===s?0:l*o/s),{x:i+r,y:a+n}},"intersectRect")},Mt=(0,c.K2)(async(t,e,r,n)=>{const i=(0,l.D7)();let a;const h=e.useHtmlLabels||(0,l._3)(i.flowchart.htmlLabels);a=r||"node default";const u=t.insert("g").attr("class",a).attr("id",e.domId||e.id),d=u.insert("g").attr("class","label").attr("style",e.labelStyle);let f;f=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const g=d.node();let m;m="markdown"===e.labelType?(0,s.GZ)(d,(0,l.jZ)((0,o.Sm)(f),i),{useHtmlLabels:h,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):g.appendChild(await ot((0,l.jZ)((0,o.Sm)(f),i),e.labelStyle,!1,n));let y=m.getBBox();const v=e.padding/2;if((0,l._3)(i.flowchart.htmlLabels)){const t=m.children[0],e=(0,p.Ltv)(m),r=t.getElementsByTagName("img");if(r){const t=""===f.replace(/]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,r=5,n=parseInt(t,10)*r+"px";e.style.minWidth=n,e.style.maxWidth=n}else e.style.width="100%";r(e)}(0,c.K2)(n,"setupImage"),setTimeout(()=>{e.complete&&n()}),e.addEventListener("error",n),e.addEventListener("load",n)})))}y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return h?d.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):d.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&d.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),d.insert("rect",":first-child"),{shapeSvg:u,bbox:y,halfPadding:v,label:d}},"labelHelper"),Ot=(0,c.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function Pt(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,c.K2)(Pt,"insertPolygonShape");var $t=(0,c.K2)(async(t,e)=>{e.useHtmlLabels||(0,l.D7)().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:r,bbox:n,halfPadding:i}=await Mt(t,e,"node "+e.classes,!0);c.Rm.info("Classes = ",e.classes);const a=r.insert("rect",":first-child");return a.attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),Ot(e,a),e.intersect=function(t){return It.rect(e,t)},r},"note"),Bt=(0,c.K2)(t=>t?" "+t:"","formatClass"),Ft=(0,c.K2)((t,e)=>`${e||"node default"}${Bt(t.classes)} ${Bt(t.class)}`,"getClassesFromNode"),zt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e,void 0),!0),i=n.width+e.padding+(n.height+e.padding),a=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];c.Rm.info("Question main (Circle)");const s=Pt(r,i,i,a);return s.attr("style",e.style),Ot(e,s),e.intersect=function(t){return c.Rm.warn("Intersect called"),It.polygon(e,a,t)},r},"question"),Kt=(0,c.K2)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",n.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 It.circle(e,14,t)},r},"choice"),qt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e,void 0),!0),i=n.height+e.padding,a=i/4,s=n.width+2*a+e.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=Pt(r,s,i,o);return l.attr("style",e.style),Ot(e,l),e.intersect=function(t){return It.polygon(e,o,t)},r},"hexagon"),Ut=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,void 0,!0),i=n.height+2*e.padding,a=i/2,s=n.width+2*a+e.padding,o=wt(e.directions,n,e),l=Pt(r,s,i,o);return l.attr("style",e.style),Ot(e,l),e.intersect=function(t){return It.polygon(e,o,t)},r},"block_arrow"),jt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return Pt(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return It.polygon(e,s,t)},r},"rect_left_inv_arrow"),Gt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=Pt(r,i,a,s);return o.attr("style",e.style),Ot(e,o),e.intersect=function(t){return It.polygon(e,s,t)},r},"lean_right"),Yt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=Pt(r,i,a,s);return o.attr("style",e.style),Ot(e,o),e.intersect=function(t){return It.polygon(e,s,t)},r},"lean_left"),Wt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=Pt(r,i,a,s);return o.attr("style",e.style),Ot(e,o),e.intersect=function(t){return It.polygon(e,s,t)},r},"trapezoid"),Ht=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=Pt(r,i,a,s);return o.attr("style",e.style),Ot(e,o),e.intersect=function(t){return It.polygon(e,s,t)},r},"inv_trapezoid"),Vt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=Pt(r,i,a,s);return o.attr("style",e.style),Ot(e,o),e.intersect=function(t){return It.polygon(e,s,t)},r},"rect_right_inv_arrow"),Xt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e,void 0),!0),i=n.width+e.padding,a=i/2,s=a/(2.5+i/50),o=n.height+s+e.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,c=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return Ot(e,c),e.intersect=function(t){const r=It.rect(e,t),n=r.x-e.x;if(0!=a&&(Math.abs(n)e.height/2-s)){let i=s*s*(1-n*n/(a*a));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},r},"cylinder"),Zt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Mt(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,h=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",h).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(te(a,e.props.borders,s,o),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return Ot(e,a),e.intersect=function(t){return It.rect(e,t)},r},"rect"),Qt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Mt(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,h=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",h).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(te(a,e.props.borders,s,o),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return Ot(e,a),e.intersect=function(t){return It.rect(e,t)},r},"composite"),Jt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r}=await Mt(t,e,"label",!0);c.Rm.trace("Classes = ",e.class);const n=r.insert("rect",":first-child");if(n.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(te(n,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return Ot(e,n),e.intersect=function(t){return It.rect(e,t)},r},"labelRect");function te(t,e,r,n){const i=[],a=(0,c.K2)(t=>{i.push(t,0)},"addBorder"),s=(0,c.K2)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(c.Rm.debug("add top border"),a(r)):s(r),e.includes("r")?(c.Rm.debug("add right border"),a(n)):s(n),e.includes("b")?(c.Rm.debug("add bottom border"),a(r)):s(r),e.includes("l")?(c.Rm.debug("add left border"),a(n)):s(n),t.attr("stroke-dasharray",i.join(" "))}(0,c.K2)(te,"applyNodePropertyBorders");var ee=(0,c.K2)(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let h="";h="object"==typeof o?o[0]:o,c.Rm.info("Label text abc79",h,o,"object"==typeof o);const u=s.node().appendChild(await ot(h,e.labelStyle,!0,!0));let d={width:0,height:0};if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=u.children[0],e=(0,p.Ltv)(u);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}c.Rm.info("Text 2",o);const f=o.slice(1,o.length);let g=u.getBBox();const m=s.node().appendChild(await ot(f.join?f.join("
"):f,e.labelStyle,!0,!0));if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=m.children[0],e=(0,p.Ltv)(m);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}const y=e.padding/2;return(0,p.Ltv)(m).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+y+5)+")"),(0,p.Ltv)(u).attr("transform","translate( "+(d.width{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return Ot(e,s),e.intersect=function(t){return It.rect(e,t)},r},"stadium"),ne=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Mt(t,e,Ft(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),c.Rm.info("Circle main"),Ot(e,a),e.intersect=function(t){return c.Rm.info("Circle intersect",e,n.width/2+i,t),It.circle(e,n.width/2+i,t)},r},"circle"),ie=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await Mt(t,e,Ft(e,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),c.Rm.info("DoubleCircle main"),Ot(e,s),e.intersect=function(t){return c.Rm.info("DoubleCircle intersect",e,n.width/2+i+5,t),It.circle(e,n.width/2+i+5,t)},r},"doublecircle"),ae=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await Mt(t,e,Ft(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=Pt(r,i,a,s);return o.attr("style",e.style),Ot(e,o),e.intersect=function(t){return It.polygon(e,s,t)},r},"subroutine"),se=(0,c.K2)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ot(e,n),e.intersect=function(t){return It.circle(e,7,t)},r},"start"),oe=(0,c.K2)((t,e,r)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,a=10;"LR"===r&&(i=10,a=70);const s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return Ot(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return It.rect(e,t)},n},"forkJoin"),le={rhombus:zt,composite:Qt,question:zt,rect:Zt,labelRect:Jt,rectWithTitle:ee,choice:Kt,circle:ne,doublecircle:ie,stadium:re,hexagon:qt,block_arrow:Ut,rect_left_inv_arrow:jt,lean_right:Gt,lean_left:Yt,trapezoid:Wt,inv_trapezoid:Ht,rect_right_inv_arrow:Vt,cylinder:Xt,start:se,end:(0,c.K2)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ot(e,i),e.intersect=function(t){return It.circle(e,7,t)},r},"end"),note:$t,subroutine:ae,fork:oe,join:oe,class_box:(0,c.K2)(async(t,e)=>{const r=e.padding/2;let n;n=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),s=i.insert("line"),o=i.insert("line");let c=0,h=4;const u=i.insert("g").attr("class","label");let d=0;const f=e.classData.annotations?.[0],g=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",m=u.node().appendChild(await ot(g,e.labelStyle,!0,!0));let y=m.getBBox();if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=m.children[0],e=(0,p.Ltv)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}e.classData.annotations[0]&&(h+=y.height+4,c+=y.width);let v=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,l.D7)().flowchart.htmlLabels?v+="<"+e.classData.type+">":v+="<"+e.classData.type+">");const b=u.node().appendChild(await ot(v,e.labelStyle,!0,!0));(0,p.Ltv)(b).attr("class","classTitle");let x=b.getBBox();if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=b.children[0],e=(0,p.Ltv)(b);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h+=x.height+4,x.width>c&&(c=x.width);const w=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let n=r.displayText;(0,l.D7)().flowchart.htmlLabels&&(n=n.replace(//g,">"));const i=u.node().appendChild(await ot(n,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let a=i.getBBox();if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=i.children[0],e=(0,p.Ltv)(i);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>c&&(c=a.width),h+=a.height+4,w.push(i)}),h+=8;const T=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let n=r.displayText;(0,l.D7)().flowchart.htmlLabels&&(n=n.replace(//g,">"));const i=u.node().appendChild(await ot(n,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let a=i.getBBox();if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=i.children[0],e=(0,p.Ltv)(i);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>c&&(c=a.width),h+=a.height+4,T.push(i)}),h+=8,f){let t=(c-y.width)/2;(0,p.Ltv)(m).attr("transform","translate( "+(-1*c/2+t)+", "+-1*h/2+")"),d=y.height+4}let k=(c-x.width)/2;return(0,p.Ltv)(b).attr("transform","translate( "+(-1*c/2+k)+", "+(-1*h/2+d)+")"),d+=x.height+4,s.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-h/2-r+8+d).attr("y2",-h/2-r+8+d),d+=8,w.forEach(t=>{(0,p.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*h/2+d+4)+")");const e=t?.getBBox();d+=(e?.height??0)+4}),d+=8,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-h/2-r+8+d).attr("y2",-h/2-r+8+d),d+=8,T.forEach(t=>{(0,p.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*h/2+d)+")");const e=t?.getBBox();d+=(e?.height??0)+4}),a.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-r).attr("y",-h/2-r).attr("width",c+e.padding).attr("height",h+e.padding),Ot(e,a),e.intersect=function(t){return It.rect(e,t)},i},"class_box")},ce={},he=(0,c.K2)(async(t,e,r)=>{let n,i;if(e.link){let a;"sandbox"===(0,l.D7)().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await le[e.shape](n,e,r)}else i=await le[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),ce[e.id]=n,e.haveCallback&&ce[e.id].attr("class",ce[e.id].attr("class")+" clickable"),n},"insertNode"),ue=(0,c.K2)(t=>{const e=ce[t.id];c.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function de(t,e,r=!1){const n=t;let i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label";let a,s=0,c="";switch(n.type){case"round":s=5,c="rect";break;case"composite":s=0,c="composite",a=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const h=(0,o.sM)(n?.styles??[]),u=n.label,d=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:h.labelStyle,shape:c,labelText:u,rx:s,ry:s,class:i,style:h.style,id:n.id,directions:n.directions,width:d.width,height:d.height,x:d.x,y:d.y,positioned:r,intersect:void 0,type:n.type,padding:a??(0,l.zj)()?.block?.padding??0}}async function pe(t,e,r){const n=de(e,0,!1);if("group"===n.type)return;const i=(0,l.zj)(),a=await he(t,n,{config:i}),s=a.node().getBBox(),o=r.getBlock(n.id);o.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(o),a.remove()}async function fe(t,e,r){const n=de(e,0,!0);if("space"!==r.getBlock(n.id).type){const r=(0,l.zj)();await he(t,n,{config:r}),e.intersect=n?.intersect,ue(n)}}async function ge(t,e,r,n){for(const i of e)await n(t,i,r),i.children&&await ge(t,i.children,r,n)}async function me(t,e,r){await ge(t,e,r,pe)}async function ye(t,e,r){await ge(t,e,r,fe)}async function ve(t,e,r,n,i){const a=new f.T({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of e)if(s.start&&s.end){const e=n.getBlock(s.start),r=n.getBlock(s.end);if(e?.size&&r?.size){const n=e.size,o=r.size,l=[{x:n.x,y:n.y},{x:n.x+(o.x-n.x)/2,y:n.y+(o.y-n.y)/2},{x:o.x,y:o.y}];bt(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await pt(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),gt({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,c.K2)(de,"getNodeFromBlock"),(0,c.K2)(pe,"calculateBlockSize"),(0,c.K2)(fe,"insertBlockPositioned"),(0,c.K2)(ge,"performOperations"),(0,c.K2)(me,"calculateBlockSizes"),(0,c.K2)(ye,"insertBlocks"),(0,c.K2)(ve,"insertEdges");var be=(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),xe={parser:m,db:Y,renderer:{draw:(0,c.K2)(async function(t,e,r,n){const{securityLevel:i,block:a}=(0,l.zj)(),s=n.db;let o;"sandbox"===i&&(o=(0,p.Ltv)("#i"+e));const h="sandbox"===i?(0,p.Ltv)(o.nodes()[0].contentDocument.body):(0,p.Ltv)("body"),u="sandbox"===i?h.select(`[id="${e}"]`):(0,p.Ltv)(`[id="${e}"]`);Z(u,["point","circle","cross"],n.type,e);const d=s.getBlocks(),f=s.getBlocksFlat(),g=s.getEdges(),m=u.insert("g").attr("class","block");await me(m,d,s);const y=it(s);if(await ye(m,d,s),await ve(m,g,f,s,e),y){const t=y,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,n=t.width+10,{useMaxWidth:i}=a;(0,l.a$)(u,r,n,!!i),c.Rm.debug("Here Bounds",y,t),u.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:be},styles:H}},4981(t,e,r){"use strict";r.d(e,{diagram:()=>It});var n=r(2875),i=r(3226),a=r(144),s=r(797),o=r(1444),l=r(6750),h=function(){var t=(0,s.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],o=[1,63],l=[1,64],h=[1,65],u=[1,66],d=[1,67],p=[1,68],f=[1,69],g=[1,29],m=[1,30],y=[1,31],v=[1,32],b=[1,33],x=[1,34],w=[1,35],T=[1,36],k=[1,37],A=[1,38],_=[1,39],E=[1,40],C=[1,41],S=[1,42],R=[1,43],L=[1,44],D=[1,45],N=[1,46],I=[1,47],M=[1,48],O=[1,50],P=[1,51],$=[1,52],B=[1,53],F=[1,54],z=[1,55],K=[1,56],q=[1,57],U=[1,58],j=[1,59],G=[1,60],Y=[14,42],W=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],H=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],V=[1,82],X=[1,83],Z=[1,84],Q=[1,85],J=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],rt=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],it={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,s.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(a[o-3]);break;case 19:n.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:n.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),n.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:n.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:n.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:n.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:n.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:n.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:n.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:n.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:n.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:n.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:n.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:n.addContainer("container",...a[o]),this.$=a[o];break;case 48:n.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:n.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:n.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:n.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:n.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:n.addComponent("component",...a[o]),this.$=a[o];break;case 54:n.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:n.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:n.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:n.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:n.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:n.addRel("rel",...a[o]),this.$=a[o];break;case 61:n.addRel("birel",...a[o]),this.$=a[o];break;case 62:n.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:n.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:n.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:n.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:n.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),n.addRel("rel",...a[o]),this.$=a[o];break;case 68:n.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:n.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:n.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:let t={};t[a[o-1].trim()]=a[o].trim(),this.$=t;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:w,51:T,52:k,53:A,54:_,55:E,56:C,57:S,58:R,59:L,60:D,61:N,62:I,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:G},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:w,51:T,52:k,53:A,54:_,55:E,56:C,57:S,58:R,59:L,60:D,61:N,62:I,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:G},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:w,51:T,52:k,53:A,54:_,55:E,56:C,57:S,58:R,59:L,60:D,61:N,62:I,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:G},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:w,51:T,52:k,53:A,54:_,55:E,56:C,57:S,58:R,59:L,60:D,61:N,62:I,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:G},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:w,51:T,52:k,53:A,54:_,55:E,56:C,57:S,58:R,59:L,60:D,61:N,62:I,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:G},{14:[1,74]},t(Y,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:h,38:u,39:d,40:p,41:f,44:g,45:m,46:y,47:v,48:b,49:x,50:w,51:T,52:k,53:A,54:_,55:E,56:C,57:S,58:R,59:L,60:D,61:N,62:I,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:G}),t(Y,[2,14]),t(W,[2,16],{12:[1,76]}),t(Y,[2,36],{12:[1,77]}),t(H,[2,19]),t(H,[2,20]),{25:[1,78]},{27:[1,79]},t(H,[2,23]),{35:80,75:81,76:V,77:X,79:Z,80:Q},{35:86,75:81,76:V,77:X,79:Z,80:Q},{35:87,75:81,76:V,77:X,79:Z,80:Q},{35:88,75:81,76:V,77:X,79:Z,80:Q},{35:89,75:81,76:V,77:X,79:Z,80:Q},{35:90,75:81,76:V,77:X,79:Z,80:Q},{35:91,75:81,76:V,77:X,79:Z,80:Q},{35:92,75:81,76:V,77:X,79:Z,80:Q},{35:93,75:81,76:V,77:X,79:Z,80:Q},{35:94,75:81,76:V,77:X,79:Z,80:Q},{35:95,75:81,76:V,77:X,79:Z,80:Q},{35:96,75:81,76:V,77:X,79:Z,80:Q},{35:97,75:81,76:V,77:X,79:Z,80:Q},{35:98,75:81,76:V,77:X,79:Z,80:Q},{35:99,75:81,76:V,77:X,79:Z,80:Q},{35:100,75:81,76:V,77:X,79:Z,80:Q},{35:101,75:81,76:V,77:X,79:Z,80:Q},{35:102,75:81,76:V,77:X,79:Z,80:Q},{35:103,75:81,76:V,77:X,79:Z,80:Q},{35:104,75:81,76:V,77:X,79:Z,80:Q},t(J,[2,59]),{35:105,75:81,76:V,77:X,79:Z,80:Q},{35:106,75:81,76:V,77:X,79:Z,80:Q},{35:107,75:81,76:V,77:X,79:Z,80:Q},{35:108,75:81,76:V,77:X,79:Z,80:Q},{35:109,75:81,76:V,77:X,79:Z,80:Q},{35:110,75:81,76:V,77:X,79:Z,80:Q},{35:111,75:81,76:V,77:X,79:Z,80:Q},{35:112,75:81,76:V,77:X,79:Z,80:Q},{35:113,75:81,76:V,77:X,79:Z,80:Q},{35:114,75:81,76:V,77:X,79:Z,80:Q},{35:115,75:81,76:V,77:X,79:Z,80:Q},{20:116,29:49,30:61,32:62,34:o,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:w,51:T,52:k,53:A,54:_,55:E,56:C,57:S,58:R,59:L,60:D,61:N,62:I,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:V,77:X,79:Z,80:Q},{35:120,75:81,76:V,77:X,79:Z,80:Q},{35:121,75:81,76:V,77:X,79:Z,80:Q},{35:122,75:81,76:V,77:X,79:Z,80:Q},{35:123,75:81,76:V,77:X,79:Z,80:Q},{35:124,75:81,76:V,77:X,79:Z,80:Q},{35:125,75:81,76:V,77:X,79:Z,80:Q},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Y,[2,15]),t(W,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(Y,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:i,28:a,34:o,36:l,37:h,38:u,39:d,40:p,41:f,44:g,45:m,46:y,47:v,48:b,49:x,50:w,51:T,52:k,53:A,54:_,55:E,56:C,57:S,58:R,59:L,60:D,61:N,62:I,63:M,64:O,65:P,66:$,67:B,68:F,69:z,70:K,71:q,72:U,73:j,74:G}),t(H,[2,21]),t(H,[2,22]),t(J,[2,39]),t(tt,[2,71],{75:81,35:132,76:V,77:X,79:Z,80:Q}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(J,[2,40]),t(J,[2,41]),t(J,[2,42]),t(J,[2,43]),t(J,[2,44]),t(J,[2,45]),t(J,[2,46]),t(J,[2,47]),t(J,[2,48]),t(J,[2,49]),t(J,[2,50]),t(J,[2,51]),t(J,[2,52]),t(J,[2,53]),t(J,[2,54]),t(J,[2,55]),t(J,[2,56]),t(J,[2,57]),t(J,[2,58]),t(J,[2,60]),t(J,[2,61]),t(J,[2,62]),t(J,[2,63]),t(J,[2,64]),t(J,[2,65]),t(J,[2,66]),t(J,[2,67]),t(J,[2,68]),t(J,[2,69]),t(J,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(rt,[2,28]),t(rt,[2,29]),t(rt,[2,30]),t(rt,[2,31]),t(rt,[2,32]),t(rt,[2,33]),t(rt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(W,[2,18]),t(Y,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(J,[2,24]),t(J,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=o[w]&&o[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],o[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=o[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},at=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(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})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(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,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,s.K2)(function(t,e,r,n){switch(r){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function st(){this.yy={}}return it.lexer=at,(0,s.K2)(st,"Parser"),st.prototype=it,it.Parser=st,new st}();h.parser=h;var u,d=h,p=[],f=[""],g="global",m="",y=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],v=[],b="",x=!1,w=4,T=2,k=(0,s.K2)(function(){return u},"getC4Type"),A=(0,s.K2)(function(t){let e=(0,a.jZ)(t,(0,a.D7)());u=e},"setC4Type"),_=(0,s.K2)(function(t,e,r,n,i,a,s,o,l){if(null==t||null==e||null==r||null==n)return;let c={};const h=v.find(t=>t.from===e&&t.to===r);if(h?c=h:v.push(c),c.type=t,c.from=e,c.to=r,c.label={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==a)c.descr={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]={text:e}}else c.descr={text:a};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.sprite=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.tags=o;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.link=l;c.wrap=H()},"addRel"),E=(0,s.K2)(function(t,e,r,n,i,a,s){if(null===e||null===r)return;let o={};const l=p.find(t=>t.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,p.push(o)),o.label=null==r?{text:""}:{text:r},null==n)o.descr={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.descr={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]=e}else o.sprite=i;if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]=e}else o.tags=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=g,o.wrap=H()},"addPersonOrSystem"),C=(0,s.K2)(function(t,e,r,n,i,a,s,o){if(null===e||null===r)return;let l={};const c=p.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,p.push(l)),l.label=null==r?{text:""}:{text:r},null==n)l.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.techn={text:n};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.sprite=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.wrap=H(),l.typeC4Shape={text:t},l.parentBoundary=g},"addContainer"),S=(0,s.K2)(function(t,e,r,n,i,a,s,o){if(null===e||null===r)return;let l={};const c=p.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,p.push(l)),l.label=null==r?{text:""}:{text:r},null==n)l.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.techn={text:n};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.sprite=a;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.wrap=H(),l.typeC4Shape={text:t},l.parentBoundary=g},"addComponent"),R=(0,s.K2)(function(t,e,r,n,i){if(null===t||null===e)return;let a={};const s=y.find(e=>e.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,y.push(a)),a.label=null==e?{text:""}:{text:e},null==r)a.type={text:"system"};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]={text:e}}else a.type={text:r};if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]=e}else a.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.link=i;a.parentBoundary=g,a.wrap=H(),m=g,g=t,f.push(m)},"addPersonOrSystemBoundary"),L=(0,s.K2)(function(t,e,r,n,i){if(null===t||null===e)return;let a={};const s=y.find(e=>e.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,y.push(a)),a.label=null==e?{text:""}:{text:e},null==r)a.type={text:"container"};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]={text:e}}else a.type={text:r};if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]=e}else a.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.link=i;a.parentBoundary=g,a.wrap=H(),m=g,g=t,f.push(m)},"addContainerBoundary"),D=(0,s.K2)(function(t,e,r,n,i,a,s,o){if(null===e||null===r)return;let l={};const c=y.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,y.push(l)),l.label=null==r?{text:""}:{text:r},null==n)l.type={text:"node"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.type={text:n};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.link=o;l.nodeType=t,l.parentBoundary=g,l.wrap=H(),m=g,g=e,f.push(m)},"addDeploymentNode"),N=(0,s.K2)(function(){g=m,f.pop(),m=f.pop(),f.push(m)},"popBoundaryParseStack"),I=(0,s.K2)(function(t,e,r,n,i,a,s,o,l,c,h){let u=p.find(t=>t.alias===e);if(void 0!==u||(u=y.find(t=>t.alias===e),void 0!==u)){if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];u[t]=e}else u.bgColor=r;if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];u[t]=e}else u.fontColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];u[t]=e}else u.borderColor=i;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];u[t]=e}else u.shadowing=a;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];u[t]=e}else u.shape=s;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];u[t]=e}else u.sprite=o;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];u[t]=e}else u.techn=l;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];u[t]=e}else u.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];u[t]=e}else u.legendSprite=h}},"updateElStyle"),M=(0,s.K2)(function(t,e,r,n,i,a,s){const o=v.find(t=>t.from===e&&t.to===r);if(void 0!==o){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]=e}else o.textColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]=e}else o.lineColor=i;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]=parseInt(e)}else o.offsetX=parseInt(a);if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=parseInt(e)}else o.offsetY=parseInt(s)}},"updateRelStyle"),O=(0,s.K2)(function(t,e,r){let n=w,i=T;if("object"==typeof e){const t=Object.values(e)[0];n=parseInt(t)}else n=parseInt(e);if("object"==typeof r){const t=Object.values(r)[0];i=parseInt(t)}else i=parseInt(r);n>=1&&(w=n),i>=1&&(T=i)},"updateLayoutConfig"),P=(0,s.K2)(function(){return w},"getC4ShapeInRow"),$=(0,s.K2)(function(){return T},"getC4BoundaryInRow"),B=(0,s.K2)(function(){return g},"getCurrentBoundaryParse"),F=(0,s.K2)(function(){return m},"getParentBoundaryParse"),z=(0,s.K2)(function(t){return null==t?p:p.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),K=(0,s.K2)(function(t){return p.find(e=>e.alias===t)},"getC4Shape"),q=(0,s.K2)(function(t){return Object.keys(z(t))},"getC4ShapeKeys"),U=(0,s.K2)(function(t){return null==t?y:y.filter(e=>e.parentBoundary===t)},"getBoundaries"),j=U,G=(0,s.K2)(function(){return v},"getRels"),Y=(0,s.K2)(function(){return b},"getTitle"),W=(0,s.K2)(function(t){x=t},"setWrap"),H=(0,s.K2)(function(){return x},"autoWrap"),V=(0,s.K2)(function(){p=[],y=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],m="",g="global",f=[""],v=[],f=[""],b="",x=!1,w=4,T=2},"clear"),X=(0,s.K2)(function(t){let e=(0,a.jZ)(t,(0,a.D7)());b=e},"setTitle"),Z={addPersonOrSystem:E,addPersonOrSystemBoundary:R,addContainer:C,addContainerBoundary:L,addComponent:S,addDeploymentNode:D,popBoundaryParseStack:N,addRel:_,updateElStyle:I,updateRelStyle:M,updateLayoutConfig:O,autoWrap:H,setWrap:W,getC4ShapeArray:z,getC4Shape:K,getC4ShapeKeys:q,getBoundaries:U,getBoundarys:j,getCurrentBoundaryParse:B,getParentBoundaryParse:F,getRels:G,getTitle:Y,getC4Type:k,getC4ShapeInRow:P,getC4BoundaryInRow:$,setAccTitle:a.SV,getAccTitle:a.iN,getAccDescription:a.m7,setAccDescription:a.EI,getConfig:(0,s.K2)(()=>(0,a.D7)().c4,"getConfig"),clear:V,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:X,setC4Type:A},Q=(0,s.K2)(function(t,e){return(0,n.tk)(t,e)},"drawRect"),J=(0,s.K2)(function(t,e,r,n,i,a){const s=t.append("image");s.attr("width",e),s.attr("height",r),s.attr("x",n),s.attr("y",i);let o=a.startsWith("data:image/png;base64")?a:(0,l.J)(a);s.attr("xlink:href",o)},"drawImage"),tt=(0,s.K2)((t,e,r)=>{const n=t.append("g");let i=0;for(let a of e){let t=a.textColor?a.textColor:"#444444",e=a.lineColor?a.lineColor:"#444444",s=a.offsetX?parseInt(a.offsetX):0,o=a.offsetY?parseInt(a.offsetY):0,l="";if(0===i){let t=n.append("line");t.attr("x1",a.startPoint.x),t.attr("y1",a.startPoint.y),t.attr("x2",a.endPoint.x),t.attr("y2",a.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==a.type&&t.attr("marker-end","url("+l+"#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||t.attr("marker-start","url("+l+"#arrowend)"),i=-1}else{let t=n.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),"rel_b"!==a.type&&t.attr("marker-end","url("+l+"#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||t.attr("marker-start","url("+l+"#arrowend)")}let c=r.messageFont();dt(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+s,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+o,a.label.width,a.label.height,{fill:t},c),a.techn&&""!==a.techn.text&&(c=r.messageFont(),dt(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+s,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+o,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:t,"font-style":"italic"},c))}},"drawRels"),et=(0,s.K2)(function(t,e,r){const n=t.append("g");let i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};Q(n,l);let c=r.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=s,dt(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=r.boundaryFont(),c.fontColor=s,dt(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=r.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=s,dt(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))},"drawBoundary"),rt=(0,s.K2)(function(t,e,r){let i=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],a=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const l=t.append("g");l.attr("class","person-man");const c=(0,n.PB)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":c.x=e.x,c.y=e.y,c.fill=i,c.width=e.width,c.height=e.height,c.stroke=a,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},Q(l,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let h=ut(r,e.typeC4Shape.text);switch(l.append("text").attr("fill",s).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":J(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,o)}let u=r[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,dt(r)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},u),u=r[e.typeC4Shape.text+"Font"](),u.fontColor=s,e.techn&&""!==e.techn?.text?dt(r)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:s,"font-style":"italic"},u):e.type&&""!==e.type.text&&dt(r)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&(u=r.personFont(),u.fontColor=s,dt(r)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},u)),e.height},"drawC4Shape"),nt=(0,s.K2)(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),it=(0,s.K2)(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),at=(0,s.K2)(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),st=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),ot=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),lt=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),ct=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),ht=(0,s.K2)(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")},"insertArrowCrossHead"),ut=(0,s.K2)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),dt=function(){function t(t,e,r,i,a,s,o){n(e.append("text").attr("x",r+a/2).attr("y",i+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,r,i,s,o,l,c){const{fontSize:h,fontFamily:u,fontWeight:d}=c,p=t.split(a.Y2.lineBreakRegex);for(let a=0;a=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>mt)&&(e=this.nextData.startx+t.margin+vt.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},xt(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},xt=(0,s.K2)(function(t){(0,a.hH)(vt,t),t.fontFamily&&(vt.personFontFamily=vt.systemFontFamily=vt.messageFontFamily=t.fontFamily),t.fontSize&&(vt.personFontSize=vt.systemFontSize=vt.messageFontSize=t.fontSize),t.fontWeight&&(vt.personFontWeight=vt.systemFontWeight=vt.messageFontWeight=t.fontWeight)},"setConf"),wt=(0,s.K2)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),Tt=(0,s.K2)(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),kt=(0,s.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function At(t,e,r,n,s){if(!e[t].width)if(r)e[t].text=(0,i.bH)(e[t].text,s,n),e[t].textLines=e[t].text.split(a.Y2.lineBreakRegex).length,e[t].width=s,e[t].height=(0,i.ru)(e[t].text,n);else{let r=e[t].text.split(a.Y2.lineBreakRegex);e[t].textLines=r.length;let s=0;e[t].height=0,e[t].width=0;for(const a of r)e[t].width=Math.max((0,i.Un)(a,n),e[t].width),s=(0,i.ru)(a,n),e[t].height=e[t].height+s}}(0,s.K2)(At,"calcC4ShapeTextWH");var _t=(0,s.K2)(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=vt.c4ShapeMargin-35;let n=e.wrap&&vt.wrap,a=Tt(vt);a.fontSize=a.fontSize+2,a.fontWeight="bold",At("label",e,n,a,(0,i.Un)(e.label.text,a)),pt.drawBoundary(t,e,vt)},"drawBoundary"),Et=(0,s.K2)(function(t,e,r,n){let a=0;for(const s of n){a=0;const n=r[s];let o=wt(vt,n.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,n.typeC4Shape.width=(0,i.Un)("«"+n.typeC4Shape.text+"»",o),n.typeC4Shape.height=o.fontSize+2,n.typeC4Shape.Y=vt.c4ShapePadding,a=n.typeC4Shape.Y+n.typeC4Shape.height-4,n.image={width:0,height:0,Y:0},n.typeC4Shape.text){case"person":case"external_person":n.image.width=48,n.image.height=48,n.image.Y=a,a=n.image.Y+n.image.height}n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=a,a=n.image.Y+n.image.height);let l=n.wrap&&vt.wrap,c=vt.width-2*vt.c4ShapePadding,h=wt(vt,n.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",At("label",n,l,h,c),n.label.Y=a+8,a=n.label.Y+n.label.height,n.type&&""!==n.type.text){n.type.text="["+n.type.text+"]",At("type",n,l,wt(vt,n.typeC4Shape.text),c),n.type.Y=a+5,a=n.type.Y+n.type.height}else if(n.techn&&""!==n.techn.text){n.techn.text="["+n.techn.text+"]",At("techn",n,l,wt(vt,n.techn.text),c),n.techn.Y=a+5,a=n.techn.Y+n.techn.height}let u=a,d=n.label.width;if(n.descr&&""!==n.descr.text){At("descr",n,l,wt(vt,n.typeC4Shape.text),c),n.descr.Y=a+20,a=n.descr.Y+n.descr.height,d=Math.max(n.label.width,n.descr.width),u=a-5*n.descr.textLines}d+=vt.c4ShapePadding,n.width=Math.max(n.width||vt.width,d,vt.width),n.height=Math.max(n.height||vt.height,u,vt.height),n.margin=n.margin||vt.c4ShapeMargin,t.insert(n),pt.drawC4Shape(e,n,vt)}t.bumpLastMargin(vt.c4ShapeMargin)},"drawC4ShapeArray"),Ct=class{static{(0,s.K2)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},St=(0,s.K2)(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,o=n+t.height/2,l=Math.abs(r-i),c=Math.abs(n-a),h=c/l,u=t.height/t.width,d=null;return n==a&&ri?d=new Ct(r,o):r==i&&na&&(d=new Ct(s,n)),r>i&&n=h?new Ct(r,o+h*t.width/2):new Ct(s-l/c*t.height/2,n+t.height):r=h?new Ct(r+t.width,o+h*t.width/2):new Ct(s+l/c*t.height/2,n+t.height):ra?d=u>=h?new Ct(r+t.width,o-h*t.width/2):new Ct(s+t.height/2*l/c,n):r>i&&n>a&&(d=u>=h?new Ct(r,o-t.width/2*h):new Ct(s-t.height/2*l/c,n)),d},"getIntersectPoint"),Rt=(0,s.K2)(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=St(t,r);return r.x=t.x+t.width/2,r.y=t.y+t.height/2,{startPoint:n,endPoint:St(e,r)}},"getIntersectPoints"),Lt=(0,s.K2)(function(t,e,r,n){let a=0;for(let s of e){a+=1;let t=s.wrap&&vt.wrap,e=kt(vt);"C4Dynamic"===n.db.getC4Type()&&(s.label.text=a+": "+s.label.text);let o=(0,i.Un)(s.label.text,e);At("label",s,t,e,o),s.techn&&""!==s.techn.text&&(o=(0,i.Un)(s.techn.text,e),At("techn",s,t,e,o)),s.descr&&""!==s.descr.text&&(o=(0,i.Un)(s.descr.text,e),At("descr",s,t,e,o));let l=r(s.from),c=r(s.to),h=Rt(l,c);s.startPoint=h.startPoint,s.endPoint=h.endPoint}pt.drawRels(t,e,vt)},"drawRels");function Dt(t,e,r,n,i){let a=new bt(i);a.data.widthLimit=r.data.widthLimit/Math.min(yt,n.length);for(let[s,o]of n.entries()){let n=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=n,n=o.image.Y+o.image.height);let l=o.wrap&&vt.wrap,c=Tt(vt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",At("label",o,l,c,a.data.widthLimit),o.label.Y=n+8,n=o.label.Y+o.label.height,o.type&&""!==o.type.text){o.type.text="["+o.type.text+"]",At("type",o,l,Tt(vt),a.data.widthLimit),o.type.Y=n+5,n=o.type.Y+o.type.height}if(o.descr&&""!==o.descr.text){let t=Tt(vt);t.fontSize=t.fontSize-2,At("descr",o,l,t,a.data.widthLimit),o.descr.Y=n+20,n=o.descr.Y+o.descr.height}if(0==s||s%yt===0){let t=r.data.startx+vt.diagramMarginX,e=r.data.stopy+vt.diagramMarginY+n;a.setData(t,t,e,e)}else{let t=a.data.stopx!==a.data.startx?a.data.stopx+vt.diagramMarginX:a.data.startx,e=a.data.starty;a.setData(t,t,e,e)}a.name=o.alias;let h=i.db.getC4ShapeArray(o.alias),u=i.db.getC4ShapeKeys(o.alias);u.length>0&&Et(a,t,h,u),e=o.alias;let d=i.db.getBoundaries(e);d.length>0&&Dt(t,e,a,d,i),"global"!==o.alias&&_t(t,o,a),r.data.stopy=Math.max(a.data.stopy+vt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+vt.c4ShapeMargin,r.data.stopx),ft=Math.max(ft,r.data.stopx),gt=Math.max(gt,r.data.stopy)}}(0,s.K2)(Dt,"drawInsideBoundary");var Nt={drawPersonOrSystemArray:Et,drawBoundary:_t,setConf:xt,draw:(0,s.K2)(function(t,e,r,n){vt=(0,a.D7)().c4;const i=(0,a.D7)().securityLevel;let l;"sandbox"===i&&(l=(0,o.Ltv)("#i"+e));const c="sandbox"===i?(0,o.Ltv)(l.nodes()[0].contentDocument.body):(0,o.Ltv)("body");let h=n.db;n.db.setWrap(vt.wrap),mt=h.getC4ShapeInRow(),yt=h.getC4BoundaryInRow(),s.Rm.debug(`C:${JSON.stringify(vt,null,2)}`);const u="sandbox"===i?c.select(`[id="${e}"]`):(0,o.Ltv)(`[id="${e}"]`);pt.insertComputerIcon(u),pt.insertDatabaseIcon(u),pt.insertClockIcon(u);let d=new bt(n);d.setData(vt.diagramMarginX,vt.diagramMarginX,vt.diagramMarginY,vt.diagramMarginY),d.data.widthLimit=screen.availWidth,ft=vt.diagramMarginX,gt=vt.diagramMarginY;const p=n.db.getTitle();Dt(u,"",d,n.db.getBoundaries(""),n),pt.insertArrowHead(u),pt.insertArrowEnd(u),pt.insertArrowCrossHead(u),pt.insertArrowFilledHead(u),Lt(u,n.db.getRels(),n.db.getC4Shape,n),d.data.stopx=ft,d.data.stopy=gt;const f=d.data;let g=f.stopy-f.starty+2*vt.diagramMarginY;const m=f.stopx-f.startx+2*vt.diagramMarginX;p&&u.append("text").text(p).attr("x",(f.stopx-f.startx)/2-4*vt.diagramMarginX).attr("y",f.starty+vt.diagramMarginY),(0,a.a$)(u,g,m,vt.useMaxWidth);const y=p?60:0;u.attr("viewBox",f.startx-vt.diagramMarginX+" -"+(vt.diagramMarginY+y)+" "+m+" "+(g+y)),s.Rm.debug("models:",f)},"draw")},It={parser:d,db:Z,renderer:Nt,styles:(0,s.K2)(t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,"getStyles"),init:(0,s.K2)(({c4:t,wrap:e})=>{Nt.setConf(t),Z.setWrap(e)},"init")}},5871(t,e,r){"use strict";function n(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}r.d(e,{S:()=>n}),(0,r(797).K2)(n,"populateCommonDb")},9625(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(797),i=r(1444),a=(0,n.K2)((t,e)=>{let r;"sandbox"===e&&(r=(0,i.Ltv)("#i"+t));return("sandbox"===e?(0,i.Ltv)(r.nodes()[0].contentDocument.body):(0,i.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},144(t,e,r){"use strict";r.d(e,{C0:()=>v,xA:()=>it,hH:()=>_,Dl:()=>Mt,IU:()=>Zt,Wt:()=>Yt,Y2:()=>$t,a$:()=>zt,sb:()=>Y,ME:()=>le,UI:()=>U,Ch:()=>x,mW:()=>b,DB:()=>m,_3:()=>At,EJ:()=>g,m7:()=>ee,iN:()=>Jt,zj:()=>rt,D7:()=>se,Gs:()=>fe,J$:()=>k,ab:()=>ne,Q2:()=>tt,P$:()=>M,ID:()=>kt,TM:()=>ht,Wi:()=>It,H1:()=>ut,QO:()=>Ct,Js:()=>pe,Xd:()=>w,dj:()=>Pt,cL:()=>at,$i:()=>j,jZ:()=>yt,oB:()=>ce,wZ:()=>Q,EI:()=>te,SV:()=>Qt,Nk:()=>et,XV:()=>oe,ke:()=>re,UU:()=>Z,ot:()=>Kt,mj:()=>he,tM:()=>Gt,H$:()=>B,B6:()=>J});var n=r(797),i=r(1931),a=r(8232);const s=(t,e)=>{const r=i.A.parse(t),n={};for(const i in e)e[i]&&(n[i]=r[i]+e[i]);return(0,a.A)(t,n)};var o=r(5582);const l=(t,e,r=50)=>{const{r:n,g:a,b:s,a:l}=i.A.parse(t),{r:c,g:h,b:u,a:d}=i.A.parse(e),p=r/100,f=2*p-1,g=l-d,m=((f*g===-1?f:(f+g)/(1+f*g))+1)/2,y=1-m,v=n*m+c*y,b=a*m+h*y,x=s*m+u*y,w=l*p+d*(1-p);return(0,o.A)(v,b,x,w)},c=(t,e=100)=>{const r=i.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,l(r,t,e)};var h,u=r(5263),d=r(8041),p=r(5097),f=r(3047),g=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,m=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,y=/\s*%%.*\n/gm,v=class extends Error{static{(0,n.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},b={},x=(0,n.K2)(function(t,e){t=t.replace(g,"").replace(m,"").replace(y,"\n");for(const[r,{detector:n}]of Object.entries(b)){if(n(t,e))return r}throw new v(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),w=(0,n.K2)((...t)=>{for(const{id:e,detector:r,loader:n}of t)T(e,r,n)},"registerLazyLoadedDiagrams"),T=(0,n.K2)((t,e,r)=>{b[t]&&n.Rm.warn(`Detector with key ${t} already exists. Overwriting.`),b[t]={detector:e,loader:r},n.Rm.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),k=(0,n.K2)(t=>b[t].loader,"getDiagramLoader"),A=(0,n.K2)((t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>A(t,e,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=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(i=>{"object"!=typeof e[i]||void 0!==t[i]&&"object"!=typeof t[i]?(n||"object"!=typeof t[i]&&"object"!=typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=A(t[i],e[i],{depth:r-1,clobber:n}))}),t)},"assignWithDepth"),_=A,E="#ffffff",C="#f2f2f2",S=(0,n.K2)((t,e)=>s(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),R=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||S(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||S(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||S(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||S(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(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,d.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},L=(0,n.K2)(t=>{const e=new R;return e.calculate(t),e},"getThemeVariables"),D=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=S(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=S(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.A)(c("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,o.A)(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,u.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,u.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,o.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,o.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,d.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,d.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,d.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(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||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},N=(0,n.K2)(t=>{const e=new D;return e.calculate(t),e},"getThemeVariables"),I=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=s(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.primaryColor,this.darkMode),this.secondaryBorderColor=S(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=S(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=(0,o.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},M=(0,n.K2)(t=>{const e=new I;return e.calculate(t),e},"getThemeVariables"),O=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,d.A)("#cde498",10),this.primaryBorderColor=S(this.primaryColor,this.darkMode),this.secondaryBorderColor=S(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=S(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.primaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,u.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},P=(0,n.K2)(t=>{const e=new O;return e.calculate(t),e},"getThemeVariables"),$=class{static{(0,n.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,d.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.primaryColor,this.darkMode),this.secondaryBorderColor=S(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=S(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,d.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,d.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},B={base:{getThemeVariables:L},dark:{getThemeVariables:N},default:{getThemeVariables:M},forest:{getThemeVariables:P},neutral:{getThemeVariables:(0,n.K2)(t=>{const e=new $;return e.calculate(t),e},"getThemeVariables")}},F={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},z={...F,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:B.default.getThemeVariables(),sequence:{...F.sequence,messageFont:(0,n.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,n.K2)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,n.K2)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...F.gantt,tickInterval:void 0,useWidth:void 0},c4:{...F.c4,useWidth:void 0,personFont:(0,n.K2)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...F.flowchart,inheritDir:!1},external_personFont:(0,n.K2)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,n.K2)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,n.K2)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,n.K2)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,n.K2)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,n.K2)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,n.K2)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,n.K2)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,n.K2)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,n.K2)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,n.K2)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,n.K2)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,n.K2)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,n.K2)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,n.K2)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,n.K2)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,n.K2)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,n.K2)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,n.K2)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,n.K2)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,n.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...F.pie,useWidth:984},xyChart:{...F.xyChart,useWidth:void 0},requirement:{...F.requirement,useWidth:void 0},packet:{...F.packet},radar:{...F.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},K=(0,n.K2)((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:"object"==typeof t[n]&&null!==t[n]?[...r,e+n,...K(t[n],"")]:[...r,e+n],[]),"keyify"),q=new Set(K(z,"")),U=z,j=(0,n.K2)(t=>{if(n.Rm.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>j(t));else{for(const e of Object.keys(t)){if(n.Rm.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!q.has(e)||null==t[e]){n.Rm.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){n.Rm.debug("sanitizing object",e),j(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(n.Rm.debug("sanitizing css option",e),t[e]=G(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}n.Rm.debug("After sanitization",t)}},"sanitizeDirective"),G=(0,n.K2)(t=>{let e=0,r=0;for(const n of t){if(e{let r=_({},t),n={};for(const i of e)nt(i),n=_(n,i);if(r=_(r,n),n.theme&&n.theme in B){const t=_({},h),e=_(t.themeVariables||{},n.themeVariables);r.theme&&r.theme in B&&(r.themeVariables=B[r.theme].getThemeVariables(e))}return ct(V=r),V},"updateCurrentConfig"),Z=(0,n.K2)(t=>(W=_({},Y),W=_(W,t),t.theme&&B[t.theme]&&(W.themeVariables=B[t.theme].getThemeVariables(t.themeVariables)),X(W,H),W),"setSiteConfig"),Q=(0,n.K2)(t=>{h=_({},t)},"saveConfigFromInitialize"),J=(0,n.K2)(t=>(W=_(W,t),X(W,H),W),"updateSiteConfig"),tt=(0,n.K2)(()=>_({},W),"getSiteConfig"),et=(0,n.K2)(t=>(ct(t),_(V,t),rt()),"setConfig"),rt=(0,n.K2)(()=>_({},V),"getConfig"),nt=(0,n.K2)(t=>{t&&(["secure",...W.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(n.Rm.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&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]&&nt(t[e])}))},"sanitize"),it=(0,n.K2)(t=>{j(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),H.push(t),X(W,H)},"addDirective"),at=(0,n.K2)((t=W)=>{X(t,H=[])},"reset"),st={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ot={},lt=(0,n.K2)(t=>{ot[t]||(n.Rm.warn(st[t]),ot[t]=!0)},"issueWarning"),ct=(0,n.K2)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&<("LAZY_LOAD_DEPRECATED")},"checkConfig"),ht=(0,n.K2)(()=>{let t={};h&&(t=_(t,h));for(const e of H)t=_(t,e);return t},"getUserDefinedConfig"),ut=//gi,dt=(0,n.K2)(t=>{if(!t)return[""];return Tt(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),pt=(()=>{let t=!1;return()=>{t||(ft(),t=!0)}})();function ft(){const t="data-temp-href-target";f.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),f.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,n.K2)(ft,"setupDompurifyHooks");var gt=(0,n.K2)(t=>{pt();return f.A.sanitize(t)},"removeScript"),mt=(0,n.K2)((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=gt(t):"loose"!==r&&(t=(t=(t=Tt(t)).replace(//g,">")).replace(/=/g,"="),t=wt(t))}return t},"sanitizeMore"),yt=(0,n.K2)((t,e)=>t?t=e.dompurifyConfig?f.A.sanitize(mt(t,e),e.dompurifyConfig).toString():f.A.sanitize(mt(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),vt=(0,n.K2)((t,e)=>"string"==typeof t?yt(t,e):t.flat().map(t=>yt(t,e)),"sanitizeTextOrArray"),bt=(0,n.K2)(t=>ut.test(t),"hasBreaks"),xt=(0,n.K2)(t=>t.split(ut),"splitBreaks"),wt=(0,n.K2)(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Tt=(0,n.K2)(t=>t.replace(ut,"#br#"),"breakToPlaceholder"),kt=(0,n.K2)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),At=(0,n.K2)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),_t=(0,n.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Et=(0,n.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),Ct=(0,n.K2)(function(t){const e=t.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,t.split(e).length-1),"countOccurrence"),Rt=(0,n.K2)((t,e)=>{const r=St(t,"~"),n=St(e,"~");return 1===r&&1===n},"shouldCombineSets"),Lt=(0,n.K2)(t=>{const e=St(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const n=[...t];let i=n.indexOf("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Dt=(0,n.K2)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Nt=/\$\$(.*)\$\$/g,It=(0,n.K2)(t=>(t.match(Nt)?.length??0)>0,"hasKatex"),Mt=(0,n.K2)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Pt(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n?.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),Ot=(0,n.K2)(async(t,e)=>{if(!It(t))return t;if(!(Dt()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Nt,"MathML is unsupported in this environment.");{const{default:n}=await Promise.resolve().then(r.bind(r,2130)),i=e.forceLegacyMathML||!Dt()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ut).map(t=>It(t)?`
${t}
`:`
${t}
`).join("").replace(Nt,(t,e)=>n.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),Pt=(0,n.K2)(async(t,e)=>yt(await Ot(t,e),e),"renderKatexSanitized"),$t={getRows:dt,sanitizeText:yt,sanitizeTextOrArray:vt,hasBreaks:bt,splitBreaks:xt,lineBreakRegex:ut,removeScript:gt,getUrl:kt,evaluate:At,getMax:_t,getMin:Et},Bt=(0,n.K2)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),Ft=(0,n.K2)(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),zt=(0,n.K2)(function(t,e,r,n){const i=Ft(e,r,n);Bt(t,i)},"configureSvgSize"),Kt=(0,n.K2)(function(t,e,r,i){const a=e.node().getBBox(),s=a.width,o=a.height;n.Rm.info(`SVG bounds: ${s}x${o}`,a);let l=0,c=0;n.Rm.info(`Graph bounds: ${l}x${c}`,t),l=s+2*r,c=o+2*r,n.Rm.info(`Calculated bounds: ${l}x${c}`),zt(e,c,l,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),qt={},Ut=(0,n.K2)((t,e,r)=>{let i="";return t in qt&&qt[t]?i=qt[t](r):n.Rm.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${i}\n\n ${e}\n`},"getStyles"),jt=(0,n.K2)((t,e)=>{void 0!==e&&(qt[t]=e)},"addStylesForDiagram"),Gt=Ut,Yt={};(0,n.VA)(Yt,{clear:()=>Zt,getAccDescription:()=>ee,getAccTitle:()=>Jt,getDiagramTitle:()=>ne,setAccDescription:()=>te,setAccTitle:()=>Qt,setDiagramTitle:()=>re});var Wt="",Ht="",Vt="",Xt=(0,n.K2)(t=>yt(t,rt()),"sanitizeText"),Zt=(0,n.K2)(()=>{Wt="",Vt="",Ht=""},"clear"),Qt=(0,n.K2)(t=>{Wt=Xt(t).replace(/^\s+/g,"")},"setAccTitle"),Jt=(0,n.K2)(()=>Wt,"getAccTitle"),te=(0,n.K2)(t=>{Vt=Xt(t).replace(/\n\s+/g,"\n")},"setAccDescription"),ee=(0,n.K2)(()=>Vt,"getAccDescription"),re=(0,n.K2)(t=>{Ht=Xt(t)},"setDiagramTitle"),ne=(0,n.K2)(()=>Ht,"getDiagramTitle"),ie=n.Rm,ae=n.He,se=rt,oe=et,le=Y,ce=(0,n.K2)(t=>yt(t,se()),"sanitizeText"),he=Kt,ue=(0,n.K2)(()=>Yt,"getCommonDb"),de={},pe=(0,n.K2)((t,e,r)=>{de[t]&&ie.warn(`Diagram with id ${t} already registered. Overwriting.`),de[t]=e,r&&T(t,r),jt(t,e.styles),e.injectUtils?.(ie,ae,se,ce,he,ue(),()=>{})},"registerDiagram"),fe=(0,n.K2)(t=>{if(t in de)return de[t];throw new ge(t)},"getDiagram"),ge=class extends Error{static{(0,n.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},797(t,e,r){"use strict";r.d(e,{He:()=>c,K2:()=>a,Rm:()=>l,VA:()=>s});var n=r(4353),i=Object.defineProperty,a=(t,e)=>i(t,"name",{value:e,configurable:!0}),s=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},o={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:a((...t)=>{},"trace"),debug:a((...t)=>{},"debug"),info:a((...t)=>{},"info"),warn:a((...t)=>{},"warn"),error:a((...t)=>{},"error"),fatal:a((...t)=>{},"fatal")},c=a(function(t="fatal"){let e=o.fatal;"string"==typeof t?t.toLowerCase()in o&&(e=o[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=o.fatal&&(l.fatal=console.error?console.error.bind(console,h("FATAL"),"color: orange"):console.log.bind(console,"",h("FATAL"))),e<=o.error&&(l.error=console.error?console.error.bind(console,h("ERROR"),"color: orange"):console.log.bind(console,"",h("ERROR"))),e<=o.warn&&(l.warn=console.warn?console.warn.bind(console,h("WARN"),"color: orange"):console.log.bind(console,"",h("WARN"))),e<=o.info&&(l.info=console.info?console.info.bind(console,h("INFO"),"color: lightblue"):console.log.bind(console,"",h("INFO"))),e<=o.debug&&(l.debug=console.debug?console.debug.bind(console,h("DEBUG"),"color: lightgreen"):console.log.bind(console,"",h("DEBUG"))),e<=o.trace&&(l.trace=console.debug?console.debug.bind(console,h("TRACE"),"color: lightgreen"):console.log.bind(console,"",h("TRACE")))},"setLogLevel"),h=a(t=>`%c${n().format("ss.SSS")} : ${t} : `,"format")},2387(t,e,r){"use strict";r.d(e,{Fr:()=>h,GX:()=>c,KX:()=>l,WW:()=>s,ue:()=>a});var n=r(144),i=r(797),a=(0,i.K2)(t=>{const{handDrawnSeed:e}=(0,n.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),s=(0,i.K2)(t=>{const e=o([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),o=(0,i.K2)(t=>{const e=new Map;return t.forEach(t=>{const[r,n]=t.split(":");e.set(r.trim(),n?.trim())}),e},"styles2Map"),l=(0,i.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,i.K2)(t=>{const{stylesArray:e}=s(t),r=[],n=[],i=[],a=[];return e.forEach(t=>{const e=t[0];l(e)?r.push(t.join(":")+" !important"):(n.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),h=(0,i.K2)((t,e)=>{const{themeVariables:r,handDrawnSeed:i}=(0,n.D7)(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:l}=s(t);return Object.assign({roughness:.7,fill:l.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||a,seed:i,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,i.K2)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},1746(t,e,r){"use strict";r.d(e,{Lh:()=>w,NM:()=>v,_$:()=>d,tM:()=>b});var n=r(2501),i=r(9625),a=r(1152),s=r(45),o=r(3226),l=r(144),c=r(797),h=r(1444),u=function(){var t=(0,c.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,18],r=[1,19],n=[1,20],i=[1,41],a=[1,42],s=[1,26],o=[1,24],l=[1,25],h=[1,32],u=[1,33],d=[1,34],p=[1,45],f=[1,35],g=[1,36],m=[1,37],y=[1,38],v=[1,27],b=[1,28],x=[1,29],w=[1,30],T=[1,31],k=[1,44],A=[1,46],_=[1,43],E=[1,47],C=[1,9],S=[1,8,9],R=[1,58],L=[1,59],D=[1,60],N=[1,61],I=[1,62],M=[1,63],O=[1,64],P=[1,8,9,41],$=[1,76],B=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],F=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],z=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],q=[13,60,68,69,70,71,72,86,100,102,103],U=[1,100],j=[1,117],G=[1,113],Y=[1,109],W=[1,115],H=[1,110],V=[1,111],X=[1,112],Z=[1,114],Q=[1,116],J=[22,48,60,61,82,86,87,88,89,90],tt=[1,8,9,39,41,44],et=[1,8,9,22],rt=[1,145],nt=[1,8,9,61],it=[1,8,9,22,48,60,61,82,86,87,88,89,90],at={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:(0,c.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 8:this.$=a[o-1];break;case 9:case 10:case 13:case 15:this.$=a[o];break;case 11:case 14:this.$=a[o-2]+"."+a[o];break;case 12:case 16:case 100:this.$=a[o-1]+a[o];break;case 17:case 18:this.$=a[o-1]+"~"+a[o]+"~";break;case 19:n.addRelation(a[o]);break;case 20:a[o-1].title=n.cleanupLabel(a[o]),n.addRelation(a[o-1]);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:n.addClassesToNamespace(a[o-3],a[o-1]);break;case 35:n.addClassesToNamespace(a[o-4],a[o-1]);break;case 36:this.$=a[o],n.addNamespace(a[o]);break;case 37:case 51:case 64:case 97:this.$=[a[o]];break;case 38:this.$=[a[o-1]];break;case 39:a[o].unshift(a[o-2]),this.$=a[o];break;case 41:n.setCssClass(a[o-2],a[o]);break;case 42:n.addMembers(a[o-3],a[o-1]);break;case 44:n.setCssClass(a[o-5],a[o-3]),n.addMembers(a[o-5],a[o-1]);break;case 45:this.$=a[o],n.addClass(a[o]);break;case 46:this.$=a[o-1],n.addClass(a[o-1]),n.setClassLabel(a[o-1],a[o]);break;case 50:n.addAnnotation(a[o],a[o-2]);break;case 52:a[o].push(a[o-1]),this.$=a[o];break;case 53:case 55:case 56:break;case 54:n.addMember(a[o-1],n.cleanupLabel(a[o]));break;case 57:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 59:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 60:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 61:n.addNote(a[o],a[o-1]);break;case 62:n.addNote(a[o]);break;case 63:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 65:this.$=a[o-2].concat([a[o]]);break;case 66:n.setDirection("TB");break;case 67:n.setDirection("BT");break;case 68:n.setDirection("RL");break;case 69:n.setDirection("LR");break;case 70:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 71:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 72:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 73:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 74:this.$=n.relationType.AGGREGATION;break;case 75:this.$=n.relationType.EXTENSION;break;case 76:this.$=n.relationType.COMPOSITION;break;case 77:this.$=n.relationType.DEPENDENCY;break;case 78:this.$=n.relationType.LOLLIPOP;break;case 79:this.$=n.lineType.LINE;break;case 80:this.$=n.lineType.DOTTED_LINE;break;case 81:case 87:this.$=a[o-2],n.setClickEvent(a[o-1],a[o]);break;case 82:case 88:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 83:this.$=a[o-2],n.setLink(a[o-1],a[o]);break;case 84:this.$=a[o-3],n.setLink(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-3],n.setLink(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 86:this.$=a[o-4],n.setLink(a[o-3],a[o-2],a[o]),n.setTooltip(a[o-3],a[o-1]);break;case 89:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 90:this.$=a[o-4],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 91:this.$=a[o-3],n.setLink(a[o-2],a[o]);break;case 92:this.$=a[o-4],n.setLink(a[o-3],a[o-1],a[o]);break;case 93:this.$=a[o-4],n.setLink(a[o-3],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 94:this.$=a[o-5],n.setLink(a[o-4],a[o-2],a[o]),n.setTooltip(a[o-4],a[o-1]);break;case 95:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 96:n.setCssClass(a[o-1],a[o]);break;case 98:a[o-2].push(a[o]),this.$=a[o-2]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,49:s,51:o,52:l,54:h,56:u,57:d,60:p,62:f,63:g,64:m,65:y,75:v,76:b,78:x,82:w,83:T,86:k,100:A,102:_,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(C,[2,5],{8:[1,48]}),{8:[1,49]},t(S,[2,19],{22:[1,50]}),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),t(S,[2,26]),t(S,[2,27]),t(S,[2,28]),t(S,[2,29]),t(S,[2,30]),{34:[1,51]},{36:[1,52]},t(S,[2,33]),t(S,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:R,69:L,70:D,71:N,72:I,73:M,74:O}),{39:[1,65]},t(P,[2,40],{39:[1,67],44:[1,66]}),t(S,[2,55]),t(S,[2,56]),{16:68,60:p,86:k,100:A,102:_},{16:39,17:40,19:69,60:p,86:k,100:A,102:_,103:E},{16:39,17:40,19:70,60:p,86:k,100:A,102:_,103:E},{16:39,17:40,19:71,60:p,86:k,100:A,102:_,103:E},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:p,86:k,100:A,102:_,103:E},{13:$,55:75},{58:77,60:[1,78]},t(S,[2,66]),t(S,[2,67]),t(S,[2,68]),t(S,[2,69]),t(B,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:p,86:k,100:A,102:_,103:E}),t(B,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:p,86:k,100:A,102:_,103:E},{16:39,17:40,19:86,60:p,86:k,100:A,102:_,103:E},t(F,[2,123]),t(F,[2,124]),t(F,[2,125]),t(F,[2,126]),t([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),t(C,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:e,35:r,37:n,42:i,46:a,49:s,51:o,52:l,54:h,56:u,57:d,60:p,62:f,63:g,64:m,65:y,75:v,76:b,78:x,82:w,83:T,86:k,100:A,102:_,103:E}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,49:s,51:o,52:l,54:h,56:u,57:d,60:p,62:f,63:g,64:m,65:y,75:v,76:b,78:x,82:w,83:T,86:k,100:A,102:_,103:E},t(S,[2,20]),t(S,[2,31]),t(S,[2,32]),{13:[1,90],16:39,17:40,19:89,60:p,86:k,100:A,102:_,103:E},{53:91,66:56,67:57,68:R,69:L,70:D,71:N,72:I,73:M,74:O},t(S,[2,54]),{67:92,73:M,74:O},t(z,[2,73],{66:93,68:R,69:L,70:D,71:N,72:I}),t(K,[2,74]),t(K,[2,75]),t(K,[2,76]),t(K,[2,77]),t(K,[2,78]),t(q,[2,79]),t(q,[2,80]),{8:[1,95],24:96,40:94,43:23,46:a},{16:97,60:p,86:k,100:A,102:_},{41:[1,99],45:98,51:U},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:j,48:G,59:106,60:Y,82:W,84:107,85:108,86:H,87:V,88:X,89:Z,90:Q},{60:[1,118]},{13:$,55:119},t(S,[2,62]),t(S,[2,128]),{22:j,48:G,59:120,60:Y,61:[1,121],82:W,84:107,85:108,86:H,87:V,88:X,89:Z,90:Q},t(J,[2,64]),{16:39,17:40,19:122,60:p,86:k,100:A,102:_,103:E},t(B,[2,16]),t(B,[2,17]),t(B,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:p,86:k,100:A,102:_,103:E},{39:[2,10]},t(tt,[2,45],{11:125,12:[1,126]}),t(C,[2,7]),{9:[1,127]},t(et,[2,57]),{16:39,17:40,19:128,60:p,86:k,100:A,102:_,103:E},{13:[1,130],16:39,17:40,19:129,60:p,86:k,100:A,102:_,103:E},t(z,[2,72],{66:131,68:R,69:L,70:D,71:N,72:I}),t(z,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:a},{8:[1,134],41:[2,37]},t(P,[2,41],{39:[1,135]}),{41:[1,136]},t(P,[2,43]),{41:[2,51],45:137,51:U},{16:39,17:40,19:138,60:p,86:k,100:A,102:_,103:E},t(S,[2,81],{13:[1,139]}),t(S,[2,83],{13:[1,141],77:[1,140]}),t(S,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},t(S,[2,95],{61:rt}),t(nt,[2,97],{85:146,22:j,48:G,60:Y,82:W,86:H,87:V,88:X,89:Z,90:Q}),t(it,[2,99]),t(it,[2,101]),t(it,[2,102]),t(it,[2,103]),t(it,[2,104]),t(it,[2,105]),t(it,[2,106]),t(it,[2,107]),t(it,[2,108]),t(it,[2,109]),t(S,[2,96]),t(S,[2,61]),t(S,[2,63],{61:rt}),{60:[1,147]},t(B,[2,14]),{15:148,16:84,17:85,60:p,86:k,100:A,102:_,103:E},{39:[2,12]},t(tt,[2,46]),{13:[1,149]},{1:[2,4]},t(et,[2,59]),t(et,[2,58]),{16:39,17:40,19:150,60:p,86:k,100:A,102:_,103:E},t(z,[2,70]),t(S,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:a},{45:153,51:U},t(P,[2,42]),{41:[2,52]},t(S,[2,50]),t(S,[2,82]),t(S,[2,84]),t(S,[2,85],{77:[1,154]}),t(S,[2,88]),t(S,[2,89],{13:[1,155]}),t(S,[2,91],{13:[1,157],77:[1,156]}),{22:j,48:G,60:Y,82:W,84:158,85:108,86:H,87:V,88:X,89:Z,90:Q},t(it,[2,100]),t(J,[2,65]),{39:[2,11]},{14:[1,159]},t(et,[2,60]),t(S,[2,35]),{41:[2,39]},{41:[1,160]},t(S,[2,86]),t(S,[2,90]),t(S,[2,92]),t(S,[2,93],{77:[1,161]}),t(nt,[2,98],{85:146,22:j,48:G,60:Y,82:W,86:H,87:V,88:X,89:Z,90:Q}),t(tt,[2,8]),t(P,[2,44]),t(S,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,o="",l=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,c.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=s[w]&&s[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],s[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,o=p.yytext,l=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,l,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},st=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(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})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(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,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.K2)(function(t,e,r,n){switch(r){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:case 14:case 31:case 36:case 40:case 47:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 58:case 61:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 35:return 8;case 15:case 16:return 7;case 17:case 37:case 45:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 23:return 80;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:case 39:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:case 43:return this.popState(),41;case 34:case 44:return"EOF_IN_STRUCT";case 38:return this.begin("class"),46;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 46:return"OPEN_IN_STRUCT";case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 77;case 68:case 69:return 69;case 70:case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:case 85:return 89;case 86:return 90;case 87:case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:case 96:return 48;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}}}();function ot(){this.yy={}}return at.lexer=st,(0,c.K2)(ot,"Parser"),ot.prototype=at,at.Parser=ot,new ot}();u.parser=u;var d=u,p=["#","+","~","-",""],f=class{static{(0,c.K2)(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const r=(0,l.jZ)(t,(0,l.D7)());this.parseMember(r)}getDisplayDetails(){let t=this.visibility+(0,l.QO)(this.id);"method"===this.memberType&&(t+=`(${(0,l.QO)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,l.QO)(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(r){const t=r[1]?r[1].trim():"";if(p.includes(t)&&(this.visibility=t),this.id=r[2],this.parameters=r[3]?r[3].trim():"",e=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const r=t.length,n=t.substring(0,1),i=t.substring(r-1);p.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?r:r-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const r=`${this.visibility?"\\"+this.visibility:""}${(0,l.QO)(this.id)}${"method"===this.memberType?`(${(0,l.QO)(this.parameters)})${this.returnType?" : "+(0,l.QO)(this.returnType):""}`:""}`;this.text=r.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},g="classId-",m=0,y=(0,c.K2)(t=>l.Y2.sanitizeText(t,(0,l.D7)()),"sanitizeText"),v=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=(0,c.K2)(t=>{let e=(0,h.Ltv)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,h.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0));(0,h.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",t=>{const r=(0,h.Ltv)(t.currentTarget);if(null===r.attr("title"))return;const n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(r.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"
")),r.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);(0,h.Ltv)(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=l.SV,this.getAccTitle=l.iN,this.setAccDescription=l.EI,this.getAccDescription=l.m7,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.getConfig=(0,c.K2)(()=>(0,l.D7)().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{(0,c.K2)(this,"ClassDB")}splitClassNameAndType(t){const e=l.Y2.sanitizeText(t,(0,l.D7)());let r="",n=e;if(e.indexOf("~")>0){const t=e.split("~");n=y(t[0]),r=y(t[1])}return{className:n,type:r}}setClassLabel(t,e){const r=l.Y2.sanitizeText(t,(0,l.D7)());e&&(e=y(e));const{className:n}=this.splitClassNameAndType(r);this.classes.get(n).label=e,this.classes.get(n).text=`${e}${this.classes.get(n).type?`<${this.classes.get(n).type}>`:""}`}addClass(t){const e=l.Y2.sanitizeText(t,(0,l.D7)()),{className:r,type:n}=this.splitClassNameAndType(e);if(this.classes.has(r))return;const i=l.Y2.sanitizeText(r,(0,l.D7)());this.classes.set(i,{id:i,type:n,label:i,text:`${i}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:g+i+"-"+m}),m++}addInterface(t,e){const r={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(r)}lookUpDomId(t){const e=l.Y2.sanitizeText(t,(0,l.D7)());if(this.classes.has(e))return this.classes.get(e).domId;throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",(0,l.IU)()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){c.Rm.debug("Adding relation: "+JSON.stringify(t));const e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=l.Y2.sanitizeText(t.relationTitle1.trim(),(0,l.D7)()),t.relationTitle2=l.Y2.sanitizeText(t.relationTitle2.trim(),(0,l.D7)()),this.relations.push(t)}addAnnotation(t,e){const r=this.splitClassNameAndType(t).className;this.classes.get(r).annotations.push(e)}addMember(t,e){this.addClass(t);const r=this.splitClassNameAndType(t).className,n=this.classes.get(r);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?n.annotations.push(y(t.substring(2,t.length-2))):t.indexOf(")")>0?n.methods.push(new f(t,"method")):t&&n.members.push(new f(t,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(t,e){const r={id:`note${this.notes.length}`,class:e,text:t};this.notes.push(r)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),y(t.trim())}setCssClass(t,e){t.split(",").forEach(t=>{let r=t;/\d/.exec(t[0])&&(r=g+r);const n=this.classes.get(r);n&&(n.cssClasses+=" "+e)})}defineClass(t,e){for(const r of t){let t=this.styleClasses.get(r);void 0===t&&(t={id:r,styles:[],textStyles:[]},this.styleClasses.set(r,t)),e&&e.forEach(e=>{if(/color/.exec(e)){const r=e.replace("fill","bgFill");t.textStyles.push(r)}t.styles.push(e)}),this.classes.forEach(t=>{t.cssClasses.includes(r)&&t.styles.push(...e.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{void 0!==e&&(this.classes.get(t).tooltip=y(e))})}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,r){const n=(0,l.D7)();t.split(",").forEach(t=>{let i=t;/\d/.exec(t[0])&&(i=g+i);const a=this.classes.get(i);a&&(a.link=o._K.formatUrl(e,n),"sandbox"===n.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof r?y(r):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFunc(t,e,r),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,e,r){const n=l.Y2.sanitizeText(t,(0,l.D7)());if("loose"!==(0,l.D7)().securityLevel)return;if(void 0===e)return;const i=n;if(this.classes.has(i)){const t=this.lookUpDomId(i);let n=[];if("string"==typeof r){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{const r=document.querySelector(`[id="${t}"]`);null!==r&&r.addEventListener("click",()=>{o._K.runFunc(e,...n)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,children:{},domId:g+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e){if(this.namespaces.has(t))for(const r of e){const{className:e}=this.splitClassNameAndType(r);this.classes.get(e).parent=t,this.namespaces.get(t).classes.set(e,this.classes.get(e))}}setCssStyle(t,e){const r=this.classes.get(t);if(e&&r)for(const n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}getData(){const t=[],e=[],r=(0,l.D7)();for(const i of this.namespaces.keys()){const e=this.namespaces.get(i);if(e){const n={id:e.id,label:e.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:r.look};t.push(n)}}for(const i of this.classes.keys()){const e=this.classes.get(i);if(e){const n=e;n.parentId=e.parent,n.look=r.look,t.push(n)}}let n=0;for(const i of this.notes){n++;const a={id:i.id,label:i.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look};t.push(a);const s=this.classes.get(i.class)?.id??"";if(s){const t={id:`edgeNote${n}`,start:i.id,end:s,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};e.push(t)}}for(const i of this.interfaces){const e={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};t.push(e)}n=0;for(const i of this.relations){n++;const t={id:(0,o.rY)(i.id1,i.id2,{prefix:"id",counter:n}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(i.relation.type1),arrowTypeEnd:this.getArrowMarker(i.relation.type2),startLabelRight:"none"===i.relationTitle1?"":i.relationTitle1,endLabelLeft:"none"===i.relationTitle2?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:1==i.relation.lineType?"dashed":"solid",look:r.look};e.push(t)}return{nodes:t,edges:e,other:{},config:r,direction:this.getDirection()}}},b=(0,c.K2)(t=>`g.classGroup text {\n fill: ${t.nodeBorder||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\n.labelBkg {\n background: ${t.mainBkg};\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-width: 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: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !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 line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n ${(0,n.o)()}\n`,"getStyles"),x=(0,c.K2)((t,e="TB")=>{if(!t.doc)return e;let r=e;for(const n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),w={getClasses:(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,c.K2)(async function(t,e,r,n){c.Rm.info("REF0:"),c.Rm.info("Drawing class diagram (v3)",e);const{securityLevel:h,state:u,layout:d}=(0,l.D7)(),p=n.db.getData(),f=(0,i.A)(e,h);p.type=n.type,p.layoutAlgorithm=(0,s.q7)(d),p.nodeSpacing=u?.nodeSpacing||50,p.rankSpacing=u?.rankSpacing||50,p.markers=["aggregation","extension","composition","dependency","lollipop"],p.diagramId=e,await(0,s.XX)(p,f);o._K.insertTitle(f,"classDiagramTitleText",u?.titleTopMargin??25,n.db.getDiagramTitle()),(0,a.P)(f,8,"classDiagram",u?.useMaxWidth??!0)},"draw"),getDir:x}},3245(t,e,r){"use strict";r.d(e,{O:()=>n});var n=(0,r(797).K2)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins")},4616(t,e,r){"use strict";r.d(e,{Zk:()=>h,q7:()=>$,tM:()=>st,u4:()=>at});var n=r(9625),i=r(1152),a=r(45),s=r(3226),o=r(144),l=r(797),c=function(){var t=(0,l.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,33],p=[1,20],f=[1,21],g=[1,22],m=[1,23],y=[1,24],v=[1,26],b=[1,27],x=[1,28],w=[1,29],T=[1,30],k=[1,31],A=[1,32],_=[1,35],E=[1,36],C=[1,37],S=[1,38],R=[1,34],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],D=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],N=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],I={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,l.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:case 12:this.$=a[o];break;case 8:this.$="nl";break;case 13:const t=a[o-1];t.description=n.trimColon(a[o]),this.$=t;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:const e=n.trimColon(a[o]);this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:e};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l=a[o],c=a[o-2].trim();if(a[o].match(":")){var h=a[o].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:n.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:n.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:n.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:n.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:n.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:c,19:h,22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:b,37:x,38:w,41:T,45:k,48:A,51:_,52:E,53:C,54:S,57:R},t(L,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:c,19:h,22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:b,37:x,38:w,41:T,45:k,48:A,51:_,52:E,53:C,54:S,57:R},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,40],15:[1,41]}),t(L,[2,16]),{18:[1,42]},t(L,[2,18],{20:[1,43]}),{23:[1,44]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(L,[2,28]),{34:[1,49]},{36:[1,50]},t(L,[2,31]),{13:51,24:d,57:R},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(D,[2,44],{58:[1,56]}),t(D,[2,45],{58:[1,57]}),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),t(L,[2,41]),t(L,[2,6]),t(L,[2,13]),{13:58,24:d,57:R},t(L,[2,17]),t(N,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(L,[2,29]),t(L,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(L,[2,14],{14:[1,71]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:c,19:h,21:[1,72],22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:b,37:x,38:w,41:T,45:k,48:A,51:_,52:E,53:C,54:S,57:R},t(L,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(L,[2,34]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(D,[2,46]),t(D,[2,47]),t(L,[2,15]),t(L,[2,19]),t(N,i,{7:78}),t(L,[2,26]),t(L,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:c,19:h,21:[1,81],22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:b,37:x,38:w,41:T,45:k,48:A,51:_,52:E,53:C,54:S,57:R},t(L,[2,32]),t(L,[2,33]),t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,o="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=s[w]&&s[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],s[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,c,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},M=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(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})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(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,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,r,n){switch(r){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 45:return 51;case 5:case 46:return 52;case 6:case 47:return 53;case 7:case 48:return 54;case 8:case 9:case 11:case 12:case 13:case 14:case 57:case 59:case 65:break;case 10:case 80:return 5;case 15:case 35:return this.pushState("SCALE"),17;case 16:case 36:return 18;case 17:case 23:case 37:case 52:case 55:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 38:this.pushState("STATE");break;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 40:case 43:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 41:case 44:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:case 67:return this.popState(),"ID";case 53:return"STATE_DESCR";case 54:return 19;case 56:return this.popState(),this.pushState("struct"),20;case 58:return this.popState(),21;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 66:return"NOTE_TEXT";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 70:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return e.yytext=e.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/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:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}}}();function O(){this.yy={}}return I.lexer=M,(0,l.K2)(O,"Parser"),O.prototype=I,I.Parser=O,new O}();c.parser=c;var h=c,u="state",d="root",p="relation",f="default",g="divider",m="fill:none",y="fill: #333",v="text",b="normal",x="rect",w="rectWithTitle",T="divider",k="roundedWithTitle",A="statediagram",_=`${A}-state`,E="transition",C=`${E} note-edge`,S=`${A}-note`,R=`${A}-cluster`,L=`${A}-cluster-alt`,D="parent",N="note",I="----",M=`${I}${N}`,O=`${I}${D}`,P=(0,l.K2)((t,e="TB")=>{if(!t.doc)return e;let r=e;for(const n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),$={getClasses:(0,l.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,l.K2)(async function(t,e,r,c){l.Rm.info("REF0:"),l.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:h,state:u,layout:d}=(0,o.D7)();c.db.extract(c.db.getRootDocV2());const p=c.db.getData(),f=(0,n.A)(e,h);p.type=c.type,p.layoutAlgorithm=d,p.nodeSpacing=u?.nodeSpacing||50,p.rankSpacing=u?.rankSpacing||50,p.markers=["barb"],p.diagramId=e,await(0,a.XX)(p,f);try{("function"==typeof c.db.getLinks?c.db.getLinks():new Map).forEach((t,e)=>{const r="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(!r)return void l.Rm.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));const n=f.node()?.querySelectorAll("g");let i;if(n?.forEach(t=>{const e=t.textContent?.trim();e===r&&(i=t)}),!i)return void l.Rm.warn("⚠️ Could not find node matching text:",r);const a=i.parentNode;if(!a)return void l.Rm.warn("⚠️ Node has no parent, cannot wrap:",r);const s=document.createElementNS("http://www.w3.org/2000/svg","a"),o=t.url.replace(/^"+|"+$/g,"");if(s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o),s.setAttribute("target","_blank"),t.tooltip){const e=t.tooltip.replace(/^"+|"+$/g,"");s.setAttribute("title",e)}a.replaceChild(s,i),s.appendChild(i),l.Rm.info("🔗 Wrapped node in tag for:",r,t.url)})}catch(g){l.Rm.error("❌ Error injecting clickable links:",g)}s._K.insertTitle(f,"statediagramTitleText",u?.titleTopMargin??25,c.db.getDiagramTitle()),(0,i.P)(f,8,A,u?.useMaxWidth??!0)},"draw"),getDir:P},B=new Map,F=0;function z(t="",e=0,r="",n=I){return`state-${t}${null!==r&&r.length>0?`${n}${r}`:""}-${e}`}(0,l.K2)(z,"stateDomId");var K=(0,l.K2)((t,e,r,n,i,a,s,c)=>{l.Rm.trace("items",e),e.forEach(e=>{switch(e.stmt){case u:case f:Y(t,e,r,n,i,a,s,c);break;case p:{Y(t,e.state1,r,n,i,a,s,c),Y(t,e.state2,r,n,i,a,s,c);const l={id:"edge"+F,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:m,labelStyle:"",label:o.Y2.sanitizeText(e.description??"",(0,o.D7)()),arrowheadStyle:y,labelpos:"c",labelType:v,thickness:b,classes:E,look:s};i.push(l),F++}}})},"setupDoc"),q=(0,l.K2)((t,e="TB")=>{let r=e;if(t.doc)for(const n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir");function U(t,e,r){if(!e.id||""===e.id||""===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{const n=r.get(t);n&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...n.styles])}));const n=t.find(t=>t.id===e.id);n?Object.assign(n,e):t.push(e)}function j(t){return t?.classes?.join(" ")??""}function G(t){return t?.styles??[]}(0,l.K2)(U,"insertOrUpdateNode"),(0,l.K2)(j,"getClassesFromDbInfo"),(0,l.K2)(G,"getStylesFromDbInfo");var Y=(0,l.K2)((t,e,r,n,i,a,s,c)=>{const h=e.id,u=r.get(h),d=j(u),p=G(u),A=(0,o.D7)();if(l.Rm.info("dataFetcher parsedItem",e,u,p),"root"!==h){let r=x;!0===e.start?r="stateStart":!1===e.start&&(r="stateEnd"),e.type!==f&&(r=e.type),B.get(h)||B.set(h,{id:h,shape:r,description:o.Y2.sanitizeText(h,A),cssClasses:`${d} ${_}`,cssStyles:p});const u=B.get(h);e.description&&(Array.isArray(u.description)?(u.shape=w,u.description.push(e.description)):u.description?.length&&u.description.length>0?(u.shape=w,u.description===h?u.description=[e.description]:u.description=[u.description,e.description]):(u.shape=x,u.description=e.description),u.description=o.Y2.sanitizeTextOrArray(u.description,A)),1===u.description?.length&&u.shape===w&&("group"===u.type?u.shape=k:u.shape=x),!u.type&&e.doc&&(l.Rm.info("Setting cluster for XCX",h,q(e)),u.type="group",u.isGroup=!0,u.dir=q(e),u.shape=e.type===g?T:k,u.cssClasses=`${u.cssClasses} ${R} ${a?L:""}`);const E={labelStyle:"",shape:u.shape,label:u.description,cssClasses:u.cssClasses,cssCompiledStyles:[],cssStyles:u.cssStyles,id:h,dir:u.dir,domId:z(h,F),type:u.type,isGroup:"group"===u.type,padding:8,rx:10,ry:10,look:s};if(E.shape===T&&(E.label=""),t&&"root"!==t.id&&(l.Rm.trace("Setting node ",h," to be child of its parent ",t.id),E.parentId=t.id),E.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,cssClasses:S,cssStyles:[],cssCompiledStyles:[],id:h+M+"-"+F,domId:z(h,F,N),type:u.type,isGroup:"group"===u.type,padding:A.flowchart?.padding,look:s,position:e.note.position},r=h+O,a={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:u.cssClasses,cssStyles:[],id:h+O,domId:z(h,F,D),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};F++,a.id=r,t.parentId=r,U(n,a,c),U(n,t,c),U(n,E,c);let o=h,l=t.id;"left of"===e.note.position&&(o=t.id,l=h),i.push({id:o+"-"+l,start:o,end:l,arrowhead:"none",arrowTypeEnd:"",style:m,labelStyle:"",classes:C,arrowheadStyle:y,labelpos:"c",labelType:v,thickness:b,look:s})}else U(n,E,c)}e.doc&&(l.Rm.trace("Adding nodes children "),K(e,e.doc,r,n,i,!a,s,c))},"dataFetcher"),W=(0,l.K2)(()=>{B.clear(),F=0},"reset"),H="[*]",V="start",X="[*]",Z="end",Q="color",J="fill",tt="bgFill",et=",",rt=(0,l.K2)(()=>new Map,"newClassesList"),nt=(0,l.K2)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),it=(0,l.K2)(t=>JSON.parse(JSON.stringify(t)),"clone"),at=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=rt(),this.documents={root:nt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=o.iN,this.setAccTitle=o.SV,this.getAccDescription=o.m7,this.setAccDescription=o.EI,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{(0,l.K2)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(const n of Array.isArray(t)?t:t.doc)switch(n.stmt){case u:this.addState(n.id.trim(),n.type,n.doc,n.description,n.note);break;case p:this.addRelation(n.state1,n.state2,n.description);break;case"classDef":this.addStyleClass(n.id.trim(),n.classes);break;case"style":this.handleStyleDef(n);break;case"applyClass":this.setCssClass(n.id.trim(),n.styleClass);break;case"click":this.addLink(n.id,n.url,n.tooltip)}const e=this.getStates(),r=(0,o.D7)();W(),Y(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,r.look,this.classes);for(const n of this.nodes)if(Array.isArray(n.label)){if(n.description=n.label.slice(1),n.isGroup&&n.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${n.id}]`);n.label=n.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),r=t.styleClass.split(",");for(const n of e){let t=this.getState(n);if(!t){const e=n.trim();this.addState(e),t=this.getState(e)}t&&(t.styles=r.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){l.Rm.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,r){if(e.stmt===p)return this.docTranslator(t,e.state1,!0),void this.docTranslator(t,e.state2,!1);if(e.stmt===u&&(e.id===H?(e.id=t.id+(r?"_start":"_end"),e.start=r):e.id=e.id.trim()),e.stmt!==d&&e.stmt!==u||!e.doc)return;const n=[];let i=[];for(const a of e.doc)if(a.type===g){const t=it(a);t.doc=it(i),n.push(t),i=[]}else i.push(a);if(n.length>0&&i.length>0){const t={stmt:u,id:(0,s.$C)(),type:"divider",doc:it(i)};n.push(it(t)),e.doc=n}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:d,stmt:d},{id:d,stmt:d,doc:this.rootDoc},!0),{id:d,doc:this.rootDoc}}addState(t,e=f,r=void 0,n=void 0,i=void 0,a=void 0,s=void 0,c=void 0){const h=t?.trim();if(this.currentDocument.states.has(h)){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.doc||(t.doc=r),t.type||(t.type=e)}else l.Rm.info("Adding state ",h,n),this.currentDocument.states.set(h,{stmt:u,id:h,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]});if(n){l.Rm.info("Setting state description",h,n);(Array.isArray(n)?n:[n]).forEach(t=>this.addDescription(h,t.trim()))}if(i){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.note=i,t.note.text=o.Y2.sanitizeText(t.note.text,(0,o.D7)())}if(a){l.Rm.info("Setting state classes",h,a);(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(h,t.trim()))}if(s){l.Rm.info("Setting state styles",h,s);(Array.isArray(s)?s:[s]).forEach(t=>this.setStyle(h,t.trim()))}if(c){l.Rm.info("Setting state styles",h,s);(Array.isArray(c)?c:[c]).forEach(t=>this.setTextStyle(h,t.trim()))}}clear(t){this.nodes=[],this.edges=[],this.documents={root:nt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=rt(),t||(this.links=new Map,(0,o.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){l.Rm.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,r){this.links.set(t,{url:e,tooltip:r}),l.Rm.warn("Adding link",t,e,r)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===H?(this.startEndCount++,`${V}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=f){return t===H?V:e}endIdIfNeeded(t=""){return t===X?(this.startEndCount++,`${Z}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=f){return t===X?Z:e}addRelationObjs(t,e,r=""){const n=this.startIdIfNeeded(t.id.trim()),i=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),s=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:o.Y2.sanitizeText(r,(0,o.D7)())})}addRelation(t,e,r){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,r);else if("string"==typeof t&&"string"==typeof e){const n=this.startIdIfNeeded(t.trim()),i=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),s=this.endTypeIfNeeded(e);this.addState(n,i),this.addState(a,s),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:r?o.Y2.sanitizeText(r,(0,o.D7)()):void 0})}}addDescription(t,e){const r=this.currentDocument.states.get(t),n=e.startsWith(":")?e.replace(":","").trim():e;r?.descriptions?.push(o.Y2.sanitizeText(n,(0,o.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const r=this.classes.get(t);e&&r&&e.split(et).forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(Q).exec(t)){const t=e.replace(J,tt).replace(Q,J);r.textStyles.push(t)}r.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,e){t.split(",").forEach(t=>{let r=this.getState(t);if(!r){const e=t.trim();this.addState(e),r=this.getState(e)}r?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=(0,o.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:P(this.getRootDocV2())}}getConfig(){return(0,o.D7)().state}},st=(0,l.K2)(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 {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\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 // line-height: 1;\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`,"getStyles")},5553(t,e,r){"use strict";r.d(e,{n:()=>n});var n={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}},3590(t,e,r){"use strict";r.d(e,{D:()=>s});var n=r(144),i=r(797),a=r(1444),s=(0,i.K2)(t=>{const{securityLevel:e}=(0,n.D7)();let r=(0,a.Ltv)("body");if("sandbox"===e){const e=(0,a.Ltv)(`#i${t}`),n=e.node()?.contentDocument??document;r=(0,a.Ltv)(n.body)}return r.select(`#${t}`)},"selectSvgElement")},2501(t,e,r){"use strict";r.d(e,{o:()=>n});var n=(0,r(797).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},8698(t,e,r){"use strict";r.d(e,{Nq:()=>a,RI:()=>l,hq:()=>i});var n=r(797),i={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},a={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function s(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=o(t),e=o(e);const[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,l=a-n;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}(0,n.K2)(s,"calculateDeltaAndAngle");var o=(0,n.K2)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),l=(0,n.K2)(t=>({x:(0,n.K2)(function(e,r,n){let a=0;const l=o(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(i,t.arrowTypeEnd)){const{angle:e,deltaX:r}=s(n[n.length-1],n[n.length-2]);a=i[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const c=Math.abs(o(e).x-o(n[n.length-1]).x),h=Math.abs(o(e).y-o(n[n.length-1]).y),u=Math.abs(o(e).x-o(n[0]).x),d=Math.abs(o(e).y-o(n[0]).y),p=i[t.arrowTypeStart],f=i[t.arrowTypeEnd];if(c0&&h0&&d=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(i,t.arrowTypeEnd)){const{angle:e,deltaY:r}=s(n[n.length-1],n[n.length-2]);a=i[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const c=Math.abs(o(e).y-o(n[n.length-1]).y),h=Math.abs(o(e).x-o(n[n.length-1]).x),u=Math.abs(o(e).y-o(n[0]).y),d=Math.abs(o(e).x-o(n[0]).x),p=i[t.arrowTypeStart],f=i[t.arrowTypeEnd];if(c0&&h0&&dne,GZ:()=>oe,WY:()=>jt,pC:()=>Kt,hE:()=>se,Gc:()=>Bt});var n=r(3226),i=r(144),a=r(797);const s=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),o=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c=Object.freeze({...o,...l}),h=Object.freeze({...c,body:"",hidden:!1});function u(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}(t,e);for(const n in h)n in l?n in t&&!(n in r)&&(r[n]=l[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function d(t,e,r){const n=t.icons,i=t.aliases||Object.create(null);let a={};function s(t){a=u(n[t]||i[t],a)}return s(e),r.forEach(s),u(t,a)}function p(t,e){if(t.icons[e])return d(t,e,[]);const r=function(t,e){const r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);return(e||Object.keys(r).concat(Object.keys(n))).forEach(function t(e){if(r[e])return i[e]=[];if(!(e in i)){i[e]=null;const r=n[e]&&n[e].parent,a=r&&t(r);a&&(i[e]=[r].concat(a))}return i[e]}),i}(t,[e])[e];return r?d(t,e,r):null}const f=Object.freeze({width:null,height:null}),g=Object.freeze({...f,...l}),m=/(-?[0-9.]*[0-9]+[0-9.]*)/g,y=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function v(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const n=t.split(m);if(null===n||!n.length)return t;const i=[];let a=n.shift(),s=y.test(a);for(;;){if(s){const t=parseFloat(a);isNaN(t)?i.push(a):i.push(Math.ceil(t*e*r)/r)}else i.push(a);if(a=n.shift(),void 0===a)return i.join("");s=!s}}const b=/\sid="(\S+)"/g,x=new Map;function w(t){const e=[];let r;for(;r=b.exec(t);)e.push(r[1]);if(!e.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=x.get(t)||0;return x.set(t,e+1),e?`${t}${e}`:t}(e),i=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),t=t.replace(new RegExp(n,"g"),"")}var T=r(1444);function k(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function _(t){A=t}var E={exec:()=>null};function C(t,e=""){let r="string"==typeof t?t:t.source,n={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(R.caret,"$1"),r=r.replace(t,i),n},getRegex:()=>new RegExp(r,e)};return n}var S=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,D=/(?:[*+-]|\d{1,9}[.)])/,N=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,I=C(N).replace(/bull/g,D).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),M=C(N).replace(/bull/g,D).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),O=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,P=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$=C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",P).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),B=C(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,D).getRegex(),F="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",z=/|$))/,K=C("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",z).replace("tag",F).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),q=C(O).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),U={blockquote:C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",q).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:$,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:L,html:K,lheading:I,list:B,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:q,table:E,text:/^[^\n]+/},j=C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),G={...U,lheading:M,table:j,paragraph:C(O).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",j).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",F).getRegex()},Y={...U,html:C("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z).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:E,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:C(O).replace("hr",L).replace("heading"," *#{1,6} *[^\n]").replace("lheading",I).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},W=/^( {2,}|\\)\n(?!\s*$)/,H=/[\p{P}\p{S}]/u,V=/[\s\p{P}\p{S}]/u,X=/[^\s\p{P}\p{S}]/u,Z=C(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,V).getRegex(),Q=/(?!~)[\p{P}\p{S}]/u,J=C(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",S?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),tt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,et=C(tt,"u").replace(/punct/g,H).getRegex(),rt=C(tt,"u").replace(/punct/g,Q).getRegex(),nt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",it=C(nt,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,V).replace(/punct/g,H).getRegex(),at=C(nt,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Q).getRegex(),st=C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,V).replace(/punct/g,H).getRegex(),ot=C(/\\(punct)/,"gu").replace(/punct/g,H).getRegex(),lt=C(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ct=C(z).replace("(?:--\x3e|$)","--\x3e").getRegex(),ht=C("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ct).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ut=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,dt=C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ut).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pt=C(/^!?\[(label)\]\[(ref)\]/).replace("label",ut).replace("ref",P).getRegex(),ft=C(/^!?\[(ref)\](?:\[\])?/).replace("ref",P).getRegex(),gt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mt={_backpedal:E,anyPunctuation:ot,autolink:lt,blockSkip:J,br:W,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:E,emStrongLDelim:et,emStrongRDelimAst:it,emStrongRDelimUnd:st,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:dt,nolink:ft,punctuation:Z,reflink:pt,reflinkSearch:C("reflink|nolink(?!\\()","g").replace("reflink",pt).replace("nolink",ft).getRegex(),tag:ht,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},kt=t=>Tt[t];function At(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,kt)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,kt);return t}function _t(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function Et(t,e){let r=t.replace(R.findPipe,(t,e,r)=>{let n=!1,i=e;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(R.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Ct(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(null===n)return e;let i=n[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[n]=e;return n.length>=i.length?t.slice(i.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=Ct(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Ct(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=Ct(e[0],"\n").split("\n"),r="",n="",i=[];for(;t.length>0;){let e,a=!1,s=[];for(e=0;e1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let r=!1,n="",o="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;n=e[0],t=t.substring(n.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),c=t.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,o=l.trimStart()):h?u=e[1].length+1:(u=e[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,o=l.slice(u),u+=e[1].length),h&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",t=t.substring(c.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(u),r=this.rules.other.hrRegex(u),i=this.rules.other.fencesBeginRegex(u),a=this.rules.other.headingBeginRegex(u),s=this.rules.other.htmlBeginRegex(u);for(;t;){let d,p=t.split("\n",1)[0];if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),d=c):d=c.replace(this.rules.other.tabCharGlobal," "),i.test(c)||a.test(c)||s.test(c)||e.test(c)||r.test(c))break;if(d.search(this.rules.other.nonSpaceChar)>=u||!c.trim())o+="\n"+d.slice(u);else{if(h||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||a.test(l)||r.test(l))break;o+="\n"+c}!h&&!c.trim()&&(h=!0),n+=p+"\n",t=t.substring(p.length+1),l=d.slice(u)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(s=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(o),p&&(d="[ ] "!==p[0],o=o.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:n,task:!!p,checked:d,loose:!1,text:o,tokens:[]}),i.raw+=n}let o=i.items.at(-1);if(!o)return;o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));i.loose=r}if(i.loose)for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=Ct(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let n=0;n0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],n=t[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),St(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return St(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){let r,i,a=[...n[0]].length-1,s=a,o=0,l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(n=l.exec(e));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(i=[...r].length,n[3]||n[4]){s+=i;continue}if((n[5]||n[6])&&a%3&&!((a+i)%3)){o+=i;continue}if(s-=i,s>0)continue;i=Math.min(i,i+s+o);let e=[...n[0]][0].length,l=t.slice(0,a+n.index+e+i);if(Math.min(a,i)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let n;do{n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(n!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Lt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||A,this.options.tokenizer=this.options.tokenizer||new Rt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:R,block:xt.normal,inline:wt.normal};this.options.pedantic?(e.block=xt.pedantic,e.inline=wt.pedantic):this.options.gfm&&(e.block=xt.gfm,this.options.breaks?e.inline=wt.breaks:e.inline=wt.gfm),this.tokenizer.rules=e}static get rules(){return{block:xt,inline:wt}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(R.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let r=e.at(-1);1===n.raw.length&&void 0!==r?r.raw+="\n":e.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+n.raw,r.text+="\n"+n.text,this.inlineQueue.at(-1).src=r.text):e.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+n.raw,r.text+="\n"+n.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},e.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),e.push(n);continue}let i=t;if(this.options.extensions?.startBlock){let e,r=1/0,n=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},n),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(i=t.substring(0,r+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){let a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+n.raw,a.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(n),r=i.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(n);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,n=t,i=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(n));)t.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(n));)r=i[2]?i[2].length:0,n=n.slice(0,i.index+r)+"["+"a".repeat(i[0].length-r-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,s="";for(;t;){let r;if(a||(s=""),a=!1,this.options.extensions?.inline?.some(n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let n=e.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,n,s)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let i=t;if(this.options.extensions?.startInline){let e,r=1/0,n=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},n),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(i=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),a=!0;let n=e.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Dt=class{options;parser;constructor(t){this.options=t||A}space(t){return""}code({text:t,lang:e,escaped:r}){let n=(e||"").match(R.notSpaceStart)?.[0],i=t.replace(R.endingNewline,"")+"\n";return n?'
'+(r?i:At(i,!0))+"
\n":"
"+(r?i:At(i,!0))+"
\n"}blockquote({tokens:t}){return`
\n${this.parser.parse(t)}
\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
\n"}list(t){let e=t.ordered,r=t.start,n="";for(let a=0;a\n"+n+"\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+At(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    \n`}table(t){let e="",r="";for(let i=0;i${n}`),"\n\n"+e+"\n"+n+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${At(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),i=_t(t);if(null===i)return n;let a='
    ",a}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=_t(t);if(null===i)return At(r);let a=`${r}{let i=t[n].flat(1/0);r=r.concat(this.walkTokens(i,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let n=t.renderer.apply(this,e);return!1===n&&(n=r.apply(this,e)),n}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new Dt(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let n=r,i=t.renderer[n],a=e[n];e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Rt(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let n=r,i=t.tokenizer[n],a=e[n];e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Mt;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let n=r,i=t.hooks[n],a=e[n];Mt.passThroughHooks.has(r)?e[n]=t=>{if(this.defaults.async&&Mt.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await i.call(e,t);return a.call(e,r)})();let n=i.call(e,t);return a.call(e,n)}:e[n]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await i.apply(e,t);return!1===r&&(r=await a.apply(e,t)),r})();let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,n=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(n.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Lt.lex(t,e??this.defaults)}parser(t,e){return It.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let r=i.hooks?await i.hooks.preprocess(e):e,n=await(i.hooks?await i.hooks.provideLexer():t?Lt.lex:Lt.lexInline)(r,i),a=i.hooks?await i.hooks.processAllTokens(n):n;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let s=await(i.hooks?await i.hooks.provideParser():t?It.parse:It.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(s):s})().catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let r=(i.hooks?i.hooks.provideLexer():t?Lt.lex:Lt.lexInline)(e,i);i.hooks&&(r=i.hooks.processAllTokens(r)),i.walkTokens&&this.walkTokens(r,i.walkTokens);let n=(i.hooks?i.hooks.provideParser():t?It.parse:It.parseInline)(r,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(s){return a(s)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="

    An error occurred:

    "+At(r.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Pt(t,e){return Ot.parse(t,e)}Pt.options=Pt.setOptions=function(t){return Ot.setOptions(t),Pt.defaults=Ot.defaults,_(Pt.defaults),Pt},Pt.getDefaults=k,Pt.defaults=A,Pt.use=function(...t){return Ot.use(...t),Pt.defaults=Ot.defaults,_(Pt.defaults),Pt},Pt.walkTokens=function(t,e){return Ot.walkTokens(t,e)},Pt.parseInline=Ot.parseInline,Pt.Parser=It,Pt.parser=It.parse,Pt.Renderer=Dt,Pt.TextRenderer=Nt,Pt.Lexer=Lt,Pt.lexer=Lt.lex,Pt.Tokenizer=Rt,Pt.Hooks=Mt,Pt.parse=Pt;Pt.options,Pt.setOptions,Pt.use,Pt.walkTokens,Pt.parseInline,It.parse,Lt.lex;var $t=r(513),Bt={body:'?',height:80,width:80},Ft=new Map,zt=new Map,Kt=(0,a.K2)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.Rm.debug("Registering icon pack:",e.name),"loader"in e)zt.set(e.name,e.loader);else{if(!("icons"in e))throw a.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Ft.set(e.name,e.icons)}}},"registerIconPacks"),qt=(0,a.K2)(async(t,e)=>{const r=((t,e,r,n="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),r=i.pop(),a={provider:i.length>0?i[0]:n,prefix:r,name:t};return e&&!s(a)?null:a}const a=i[0],o=a.split("-");if(o.length>1){const t={provider:n,prefix:o.shift(),name:o.join("-")};return e&&!s(t)?null:t}if(r&&""===n){const t={provider:n,prefix:"",name:a};return e&&!s(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=Ft.get(n);if(!i){const t=zt.get(n);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await t(),prefix:n},Ft.set(n,i)}catch(l){throw a.Rm.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=p(i,r.name);if(!o)throw new Error(`Icon not found: ${t}`);return o},"getRegisteredIconData"),Ut=(0,a.K2)(async t=>{try{return await qt(t),!0}catch{return!1}},"isIconAvailable"),jt=(0,a.K2)(async(t,e,r)=>{let n;try{n=await qt(t,e?.fallbackPrefix)}catch(l){a.Rm.error(l),n=Bt}const s=function(t,e){const r={...c,...t},n={...g,...e},i={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,n].forEach(t=>{const e=[],r=t.hFlip,n=t.vFlip;let s,o=t.rotate;switch(r?n?o+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):n&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),o<0&&(o-=4*Math.floor(o/4)),o%=4,o){case 1:s=i.height/2+i.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:s=i.width/2+i.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),e.length&&(a=function(t,e,r){const n=function(t,e="defs"){let r="";const n=t.indexOf("<"+e);for(;n>=0;){const i=t.indexOf(">",n),a=t.indexOf("",a);if(-1===s)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}(t);return i=n.defs,a=e+n.content+r,i?""+i+""+a:a;var i,a}(a,'',""))});const s=n.width,o=n.height,l=i.width,h=i.height;let u,d;null===s?(d=null===o?"1em":"auto"===o?h:o,u=v(d,l/h)):(u="auto"===s?l:s,d=null===o?v(u,h/l):"auto"===o?h:o);const p={},f=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};f("width",u),f("height",d);const m=[i.left,i.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}(n,e),o=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'"+t+""}(w(s.body),{...s.attributes,...r});return(0,i.jZ)(o,(0,i.zj)())},"getIconSVG");function Gt(t,{markdownAutoWrap:e}){const r=t.replace(//g,"\n").replace(/\n{2,}/g,"\n"),n=(0,$t.T)(r);return!1===e?n.replace(/ /g," "):n}function Yt(t,e={}){const r=Gt(t,e),n=Pt.lexer(r),i=[[]];let s=0;function o(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(s++,i.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&i[s].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{o(e,t.type)}):"html"===t.type&&i[s].push({content:t.text,type:"normal"})}return(0,a.K2)(o,"processNode"),n.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{o(t)}):"html"===t.type?i[s].push({content:t.text,type:"normal"}):i[s].push({content:t.raw,type:"normal"})}),i}function Wt(t,{markdownAutoWrap:e}={}){const r=Pt.lexer(t);function n(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    "):"strong"===t.type?`${t.tokens?.map(n).join("")}`:"em"===t.type?`${t.tokens?.map(n).join("")}`:"paragraph"===t.type?`

    ${t.tokens?.map(n).join("")}

    `:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.Rm.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.K2)(n,"output"),r.map(n).join("")}function Ht(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Vt(t,e){return Xt(t,[],Ht(e.content),e.type)}function Xt(t,e,r,n){if(0===r.length)return[{content:e.join(""),type:n},{content:"",type:n}];const[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?Xt(t,s,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function Zt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return Qt(t,e)}function Qt(t,e,r=[],n=[]){if(0===t.length)return n.length>0&&r.push(n),r.length>0?r:[];let i="";" "===t[0].content&&(i=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...n];if(""!==i&&s.push({content:i,type:"normal"}),s.push(a),e(s))return Qt(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){const[n,i]=Vt(e,a);r.push([n]),i.content&&t.unshift(i)}return Qt(t,e,r)}function Jt(t,e){e&&t.attr("style",e)}async function te(t,e,r,n,a=!1,s=(0,i.zj)()){const o=t.append("foreignObject");o.attr("width",10*r+"px"),o.attr("height",10*r+"px");const l=o.append("xhtml:div"),c=(0,i.Wi)(e.label)?await(0,i.dj)(e.label.replace(i.Y2.lineBreakRegex,"\n"),s):(0,i.jZ)(e.label,s),h=e.isNode?"nodeLabel":"edgeLabel",u=l.append("span");u.html(c),Jt(u,e.labelStyle),u.attr("class",`${h} ${n}`),Jt(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",r+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),o.node()}function ee(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function re(t,e,r){const n=t.append("text"),i=ee(n,1,e);ae(i,r);const a=i.node().getComputedTextLength();return n.remove(),a}function ne(t,e,r){const n=t.append("text"),i=ee(n,1,e);ae(i,[{content:r,type:"normal"}]);const a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function ie(t,e,r,n=!1){const i=e.append("g"),s=i.insert("rect").attr("class","background").attr("style","stroke: none"),o=i.append("text").attr("y","-10.1");let l=0;for(const c of r){const e=(0,a.K2)(e=>re(i,1.1,e)<=t,"checkWidth"),r=e(c)?[c]:Zt(c,e);for(const t of r){ae(ee(o,l,1.1),t),l++}}if(n){const t=o.node().getBBox(),e=2;return s.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),i.node()}return o.node()}function ae(t,e){t.text(""),e.forEach((e,r)=>{const n=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?n.text(e.content):n.text(" "+e.content)})}async function se(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,n,a)=>(r.push((async()=>{const r=`${n}:${a}`;return await Ut(r)?await jt(r,void 0,{class:"label-icon"}):``})()),t));const n=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}(0,a.K2)(Gt,"preprocessMarkdown"),(0,a.K2)(Yt,"markdownToLines"),(0,a.K2)(Wt,"markdownToHTML"),(0,a.K2)(Ht,"splitTextToChars"),(0,a.K2)(Vt,"splitWordToFitWidth"),(0,a.K2)(Xt,"splitWordToFitWidthRecursion"),(0,a.K2)(Zt,"splitLineToFitWidth"),(0,a.K2)(Qt,"splitLineToFitWidthRecursion"),(0,a.K2)(Jt,"applyStyle"),(0,a.K2)(te,"addHtmlSpan"),(0,a.K2)(ee,"createTspan"),(0,a.K2)(re,"computeWidthOfText"),(0,a.K2)(ne,"computeDimensionOfText"),(0,a.K2)(ie,"createFormattedText"),(0,a.K2)(ae,"updateTextContentAndStyles"),(0,a.K2)(se,"replaceIconSubstring");var oe=(0,a.K2)(async(t,e="",{style:r="",isTitle:s=!1,classes:o="",useHtmlLabels:l=!0,isNode:c=!0,width:h=200,addSvgBackground:u=!1}={},d)=>{if(a.Rm.debug("XYZ createText",e,r,s,o,l,c,"addSvgBackground: ",u),l){const a=Wt(e,d),s=await se((0,n.Sm)(a),d),l=e.replace(/\\\\/g,"\\"),p={isNode:c,label:(0,i.Wi)(e)?l:s,labelStyle:r.replace("fill:","color:")};return await te(t,p,h,o,u,d)}{const n=ie(h,t,Yt(e.replace(//g,"
    ").replace("
    ","
    "),d),!!e&&u);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,T.Ltv)(n).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,T.Ltv)(n).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,T.Ltv)(n).select("text").attr("style",e)}return n}},"createText")},5894(t,e,r){"use strict";r.d(e,{DA:()=>w,IU:()=>L,U:()=>R,U7:()=>Ee,U_:()=>Se,Zk:()=>u,aP:()=>ke,gh:()=>Ce,lC:()=>p,on:()=>_e});var n=r(3245),i=r(2387),a=r(607),s=r(3226),o=r(144),l=r(797),c=r(1444),h=r(2274),u=(0,l.K2)(async(t,e,r)=>{let n;const i=e.useHtmlLabels||(0,o._3)((0,o.D7)()?.htmlLabels);n=r||"node default";const h=t.insert("g").attr("class",n).attr("id",e.domId||e.id),u=h.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle));let d;d=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=await(0,a.GZ)(u,(0,o.jZ)((0,s.Sm)(d),(0,o.D7)()),{useHtmlLabels:i,width:e.width||(0,o.D7)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let f=p.getBBox();const g=(e?.padding??0)/2;if(i){const t=p.children[0],e=(0,c.Ltv)(p),r=t.getElementsByTagName("img");if(r){const t=""===d.replace(/]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,o.D7)().fontSize?(0,o.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[n=o.UI.fontSize]=(0,s.I5)(t),i=n*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,l.K2)(n,"setupImage"),setTimeout(()=>{e.complete&&n()}),e.addEventListener("error",n),e.addEventListener("load",n)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}return i?u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):u.attr("transform","translate(0, "+-f.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:h,bbox:f,halfPadding:g,label:u}},"labelHelper"),d=(0,l.K2)(async(t,e,r)=>{const n=r.useHtmlLabels||(0,o._3)((0,o.D7)()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await(0,a.GZ)(i,(0,o.jZ)((0,s.Sm)(e),(0,o.D7)()),{useHtmlLabels:n,width:r.width||(0,o.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let h=l.getBBox();const u=r.padding/2;if((0,o._3)((0,o.D7)()?.flowchart?.htmlLabels)){const t=l.children[0],e=(0,c.Ltv)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return n?i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):i.attr("transform","translate(0, "+-h.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:h,halfPadding:u,label:i}},"insertLabel"),p=(0,l.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),f=(0,l.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function g(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function m(t,e,r,n,i,a){const s=[],o=r-t,l=n-e,c=o/a,h=2*Math.PI/c,u=e+l/2;for(let d=0;d<=50;d++){const e=t+d/50*o,r=u+i*Math.sin(h*(e-t));s.push({x:e,y:r})}return s}function y(t,e,r,n,i,a){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let c=0;c{var r,n,i=t.x,a=t.y,s=e.x-i,o=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),r=0===o?0:c*s/o,n=c):(s<0&&(l=-l),r=l,n=0===s?0:l*o/s),{x:i+r,y:a+n}},"intersectRect");function b(t,e){e&&t.attr("style",e)}async function x(t){const e=(0,c.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=(0,o.D7)();let i=t.label;t.label&&(0,o.Wi)(t.label)&&(i=await(0,o.dj)(t.label.replace(o.Y2.lineBreakRegex,"\n"),n));const a='"+i+"";return r.html((0,o.jZ)(a,n)),b(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,l.K2)(b,"applyStyle"),(0,l.K2)(x,"addHtmlLabel");var w=(0,l.K2)(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),(0,o._3)((0,o.D7)().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),l.Rm.info("vertexText"+i);const t={isNode:n,label:(0,s.Sm)(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),labelStyle:e?e.replace("fill:","color:"):e};return await x(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let n=[];n="string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[];for(const e of n){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),r?n.setAttribute("class","title-row"):n.setAttribute("class","row"),n.textContent=e.trim(),t.appendChild(n)}return t}},"createLabel"),T=(0,l.K2)((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),k=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,o.D7)(),{themeVariables:s,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=s,{labelStyles:f,nodeStyles:g,borderStyles:m,backgroundStyles:y}=(0,i.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),x=(0,o._3)(r.flowchart.htmlLabels),w=b.insert("g").attr("class","cluster-label "),k=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0});let A=k.getBBox();if((0,o._3)(r.flowchart.htmlLabels)){const t=k.children[0],e=(0,c.Ltv)(k);A=t.getBoundingClientRect(),e.attr("width",A.width),e.attr("height",A.height)}const _=e.width<=A.width+e.padding?A.width+e.padding:e.width;e.width<=A.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const E=e.height,C=e.x-_/2,S=e.y-E/2;let R;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(b),r=(0,i.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:3,seed:u}),n=t.path(T(C,S,_,E,0),r);R=b.insert(()=>(l.Rm.debug("Rough node insert CXC",n),n),":first-child"),R.select("path:nth-child(2)").attr("style",m.join(";")),R.select("path").attr("style",y.join(";").replace("fill","stroke"))}else R=b.insert("rect",":first-child"),R.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",S).attr("width",_).attr("height",E);const{subGraphTitleTopMargin:L}=(0,n.O)(r);if(w.attr("transform",`translate(${e.x-A.width/2}, ${e.y-e.height/2+L})`),f){const t=w.select("span");t&&t.attr("style",f)}const D=R.node().getBBox();return e.offsetX=0,e.width=D.width,e.height=D.height,e.offsetY=A.height-e.padding/2,e.intersect=function(t){return v(e,t)},{cluster:b,labelBBox:A}},"rect"),A=(0,l.K2)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return v(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),_=(0,l.K2)(async(t,e)=>{const r=(0,o.D7)(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:l,nodeBorder:u}=n,d=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),p=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label");let g=d.append("rect");const m=f.node().appendChild(await w(e.label,e.labelStyle,void 0,!0));let y=m.getBBox();if((0,o._3)(r.flowchart.htmlLabels)){const t=m.children[0],e=(0,c.Ltv)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const b=0*e.padding,x=b/2,k=(e.width<=y.width+e.padding?y.width+e.padding:e.width)+b;e.width<=y.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const A=e.height+b,_=e.height+b-y.height-6,E=e.x-k/2,C=e.y-A/2;e.width=k;const S=e.y-e.height/2-x+y.height+2;let R;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=h.A.svg(d),n=e.rx||e.ry?r.path(T(E,C,k,A,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):r.rectangle(E,C,k,A,{seed:i});R=d.insert(()=>n,":first-child");const o=r.rectangle(E,S,k,_,{fill:t?a:s,fillStyle:t?"hachure":"solid",stroke:u,seed:i});R=d.insert(()=>n,":first-child"),g=d.insert(()=>o)}else{R=p.insert("rect",":first-child");const t="outer";R.attr("class",t).attr("x",E).attr("y",C).attr("width",k).attr("height",A).attr("data-look",e.look),g.attr("class","inner").attr("x",E).attr("y",S).attr("width",k).attr("height",_)}f.attr("transform",`translate(${e.x-y.width/2}, ${C+1-((0,o._3)(r.flowchart.htmlLabels)?0:3)})`);const L=R.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=y.height-e.padding/2,e.labelBBox=y,e.intersect=function(t){return v(e,t)},{cluster:d,labelBBox:y}},"roundedWithTitle"),E=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,o.D7)(),{themeVariables:s,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=s,{labelStyles:f,nodeStyles:g,borderStyles:m,backgroundStyles:y}=(0,i.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),x=(0,o._3)(r.flowchart.htmlLabels),w=b.insert("g").attr("class","cluster-label "),k=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width});let A=k.getBBox();if((0,o._3)(r.flowchart.htmlLabels)){const t=k.children[0],e=(0,c.Ltv)(k);A=t.getBoundingClientRect(),e.attr("width",A.width),e.attr("height",A.height)}const _=e.width<=A.width+e.padding?A.width+e.padding:e.width;e.width<=A.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const E=e.height,C=e.x-_/2,S=e.y-E/2;let R;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(b),r=(0,i.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:4,seed:u}),n=t.path(T(C,S,_,E,e.rx),r);R=b.insert(()=>(l.Rm.debug("Rough node insert CXC",n),n),":first-child"),R.select("path:nth-child(2)").attr("style",m.join(";")),R.select("path").attr("style",y.join(";").replace("fill","stroke"))}else R=b.insert("rect",":first-child"),R.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",S).attr("width",_).attr("height",E);const{subGraphTitleTopMargin:L}=(0,n.O)(r);if(w.attr("transform",`translate(${e.x-A.width/2}, ${e.y-e.height/2+L})`),f){const t=w.select("span");t&&t.attr("style",f)}const D=R.node().getBBox();return e.offsetX=0,e.width=D.width,e.height=D.height,e.offsetY=A.height-e.padding/2,e.intersect=function(t){return v(e,t)},{cluster:b,labelBBox:A}},"kanbanSection"),C={rect:k,squareRect:k,roundedWithTitle:_,noteGroup:A,divider:(0,l.K2)((t,e)=>{const r=(0,o.D7)(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=s.insert("g",":first-child"),c=0*e.padding,u=e.width+c;e.diff=-e.padding;const d=e.height+c,p=e.x-u/2,f=e.y-d/2;let g;if(e.width=u,"handDrawn"===e.look){const t=h.A.svg(s).rectangle(p,f,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});g=s.insert(()=>t,":first-child")}else{g=l.insert("rect",":first-child");const t="divider";g.attr("class",t).attr("x",p).attr("y",f).attr("width",u).attr("height",d).attr("data-look",e.look)}const m=g.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return v(e,t)},{cluster:s,labelBBox:{}}},"divider"),kanbanSection:E},S=new Map,R=(0,l.K2)(async(t,e)=>{const r=e.shape||"rect",n=await C[r](t,e);return S.set(e.id,n),n},"insertCluster"),L=(0,l.K2)(()=>{S=new Map},"clear");function D(t,e){return t.intersect(e)}(0,l.K2)(D,"intersectNode");var N=D;function I(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),c=Math.abs(e*r*s/l);n.x0}(0,l.K2)($,"intersectLine"),(0,l.K2)(B,"sameSign");var F=$;function z(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=n-t.width/2-s,c=i-t.height/2-o;for(let h=0;h1&&a.sort(function(t,e){let n=t.x-r.x,i=t.y-r.y,a=Math.sqrt(n*n+i*i),s=e.x-r.x,o=e.y-r.y,l=Math.sqrt(s*s+o*o);return ag,":first-child");return m.attr("class","anchor").attr("style",(0,s.KL)(c)),p(e,m),e.intersect=function(t){return l.Rm.info("Circle intersect",e,1,t),K.circle(e,1,t)},o}function U(t,e,r,n,i,a,s){const o=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=(r-t)/2/i,u=(n-e)/2/a,d=Math.sqrt(h**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=o+p*a*Math.sin(c)*(s?-1:1),g=l-p*i*Math.cos(c)*(s?-1:1),m=Math.atan2((e-g)/a,(t-f)/i);let y=Math.atan2((n-g)/a,(r-f)/i)-m;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const v=[];for(let b=0;b<20;b++){const t=m+b/19*y,e=f+i*Math.cos(t),r=g+a*Math.sin(t);v.push({x:e,y:r})}return v}async function j(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.width+e.padding+20,l=s.height+e.padding,c=l/2,d=c/(2.5+l/50),{cssStyles:m}=e,y=[{x:o/2,y:-l/2},{x:-o/2,y:-l/2},...U(-o/2,-l/2,-o/2,l/2,d,c,!1),{x:o/2,y:l/2},...U(o/2,l/2,o/2,-l/2,d,c,!0)],v=h.A.svg(a),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=g(y),w=v.path(x,b),T=a.insert(()=>w,":first-child");return T.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),T.attr("transform",`translate(${d/2}, 0)`),p(e,T),e.intersect=function(t){return K.polygon(e,y,t)},a}function G(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function Y(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.height+e.padding,l=s.width+e.padding+12,c=-o,d=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:c+12},{x:12,y:c}];let m;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=g(d),s=t.path(n,r);m=a.insert(()=>s,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),y&&m.attr("style",y)}else m=G(a,l,o,d);return n&&m.attr("style",n),p(e,m),e.intersect=function(t){return K.polygon(e,d,t)},a}function W(t,e){const{nodeStyles:r}=(0,i.GX)(e);e.label="";const n=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(28,e.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],l=h.A.svg(n),c=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=g(o),d=l.path(u,c),p=n.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return K.polygon(e,o,t)},n}async function H(t,e,r){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:o,bbox:c,halfPadding:d}=await u(t,e,f(e)),g=r?.padding??d,m=c.width/2+g;let y;const{cssStyles:v}=e;if("handDrawn"===e.look){const t=h.A.svg(o),r=(0,i.Fr)(e,{}),n=t.circle(0,0,2*m,r);y=o.insert(()=>n,":first-child"),y.attr("class","basic label-container").attr("style",(0,s.KL)(v))}else y=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",m).attr("cx",0).attr("cy",0);return p(e,y),e.calcIntersect=function(t,e){const r=t.width/2;return K.circle(t,r,e)},e.intersect=function(t){return l.Rm.info("Circle intersect",e,m,t),K.circle(e,m,t)},o}function V(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=2*t;return`M ${-n/2*e},${n/2*r} L ${n/2*e},${-n/2*r}\n M ${n/2*e},${n/2*r} L ${-n/2*e},${-n/2*r}`}function X(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),s=Math.max(30,e?.width??0),{cssStyles:o}=e,c=h.A.svg(a),u=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=c.circle(0,0,2*s,u),g=V(s),m=c.path(g,u),y=a.insert(()=>d,":first-child");return y.insert(()=>m),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),p(e,y),e.intersect=function(t){l.Rm.info("crossedCircle intersect",e,{radius:s,point:t});return K.circle(e,s,t)},a}function Z(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let c=0;cA,":first-child").attr("stroke-opacity",0),_.insert(()=>T,":first-child"),_.attr("class","text"),m&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${d}, 0)`),o.attr("transform",`translate(${-l/2+d-(s.x-(s.left??0))},${-c/2+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,_),e.intersect=function(t){return K.polygon(e,v,t)},a}function J(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let c=0;cA,":first-child").attr("stroke-opacity",0),_.insert(()=>T,":first-child"),_.attr("class","text"),m&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${-d}, 0)`),o.attr("transform",`translate(${-l/2+(e.padding??0)/2-(s.x-(s.left??0))},${-c/2+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,_),e.intersect=function(t){return K.polygon(e,v,t)},a}function et(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let c=0;cC,":first-child").attr("stroke-opacity",0),S.insert(()=>k,":first-child"),S.insert(()=>_,":first-child"),S.attr("class","text"),m&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${d-d/4}, 0)`),o.attr("transform",`translate(${-l/2+(e.padding??0)/2-(s.x-(s.left??0))},${-c/2+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,S),e.intersect=function(t){return K.polygon(e,b,t)},a}async function nt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(80,1.25*(s.width+2*(e.padding??0)),e?.width??0),l=Math.max(20,s.height+2*(e.padding??0),e?.height??0),c=l/2,{cssStyles:d}=e,m=h.A.svg(a),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const b=o-c,x=l/4,w=[{x:b,y:0},{x,y:0},{x:0,y:l/2},{x,y:l},{x:b,y:l},...y(-b,-l/2,c,50,270,90)],T=g(w),k=m.path(T,v),A=a.insert(()=>k,":first-child");return A.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",d),n&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",n),A.attr("transform",`translate(${-o/2}, ${-l/2})`),p(e,A),e.intersect=function(t){return K.polygon(e,w,t)},a}(0,l.K2)(q,"anchor"),(0,l.K2)(U,"generateArcPoints"),(0,l.K2)(j,"bowTieRect"),(0,l.K2)(G,"insertPolygonShape"),(0,l.K2)(Y,"card"),(0,l.K2)(W,"choice"),(0,l.K2)(H,"circle"),(0,l.K2)(V,"createLine"),(0,l.K2)(X,"crossedCircle"),(0,l.K2)(Z,"generateCirclePoints"),(0,l.K2)(Q,"curlyBraceLeft"),(0,l.K2)(J,"generateCirclePoints"),(0,l.K2)(tt,"curlyBraceRight"),(0,l.K2)(et,"generateCirclePoints"),(0,l.K2)(rt,"curlyBraces"),(0,l.K2)(nt,"curvedTrapezoid");var it=(0,l.K2)((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),at=(0,l.K2)((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),st=(0,l.K2)((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function ot(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:l}=await u(t,e,f(e)),c=Math.max(o.width+e.padding,e.width??0),d=c/2,g=d/(2.5+c/50),m=Math.max(o.height+g+e.padding,e.height??0);let y;const{cssStyles:v}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=at(0,0,c,m,d,g),n=st(0,g,c,m,d,g),s=t.path(r,(0,i.Fr)(e,{})),o=t.path(n,(0,i.Fr)(e,{fill:"none"}));y=a.insert(()=>o,":first-child"),y=a.insert(()=>s,":first-child"),y.attr("class","basic label-container"),v&&y.attr("style",v)}else{const t=it(0,0,c,m,d,g);y=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)(v)).attr("style",n)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-c/2}, ${-(m/2+g)})`),p(e,y),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+(e.padding??0)/1.5-(o.y-(o.top??0))})`),e.intersect=function(t){const r=K.rect(e,t),n=r.x-(e.x??0);if(0!=d&&(Math.abs(n)<(e.width??0)/2||Math.abs(n)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-g)){let i=g*g*(1-n*n/(d*d));i>0&&(i=Math.sqrt(i)),i=g-i,t.y-(e.y??0)>0&&(i=-i),r.y+=i}return r},a}async function lt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=s.width+e.padding,c=s.height+e.padding,d=.2*c,g=-l/2,m=-c/2-d/2,{cssStyles:y}=e,v=h.A.svg(a),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=[{x:g,y:m+d},{x:-g,y:m+d},{x:-g,y:-m},{x:g,y:-m},{x:g,y:m},{x:-g,y:m},{x:-g,y:m+d}],w=v.polygon(x.map(t=>[t.x,t.y]),b),T=a.insert(()=>w,":first-child");return T.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),o.attr("transform",`translate(${g+(e.padding??0)/2-(s.x-(s.left??0))}, ${m+d+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,T),e.intersect=function(t){return K.rect(e,t)},a}async function ct(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c}=await u(t,e,f(e)),d=o.width/2+c+5,g=o.width/2+c;let m;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{roughness:.2,strokeWidth:2.5}),n=(0,i.Fr)(e,{roughness:.2,strokeWidth:1.5}),o=t.circle(0,0,2*d,r),l=t.circle(0,0,2*g,n);m=a.insert("g",":first-child"),m.attr("class",(0,s.KL)(e.cssClasses)).attr("style",(0,s.KL)(y)),m.node()?.appendChild(o),m.node()?.appendChild(l)}else{m=a.insert("g",":first-child");const t=m.insert("circle",":first-child"),e=m.insert("circle");m.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",g).attr("cx",0).attr("cy",0)}return p(e,m),e.intersect=function(t){return l.Rm.info("DoubleCircle intersect",e,d,t),K.circle(e,d,t)},a}function ht(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.label="",e.labelStyle=n;const s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,c=h.A.svg(s),{nodeBorder:u}=r,d=(0,i.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const g=c.circle(0,0,14,d),m=s.insert(()=>g,":first-child");return m.selectAll("path").attr("style",`fill: ${u} !important;`),o&&o.length>0&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",a),p(e,m),e.intersect=function(t){l.Rm.info("filledCircle intersect",e,{radius:7,point:t});return K.circle(e,7,t)},s}async function ut(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),c=s.width+(e.padding??0),d=c+s.height,m=c+s.height,y=[{x:0,y:-d},{x:m,y:-d},{x:m/2,y:0}],{cssStyles:v}=e,b=h.A.svg(a),x=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const w=g(y),T=b.path(w,x),k=a.insert(()=>T,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`);return v&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",v),n&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",n),e.width=c,e.height=d,p(e,k),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-d/2+(e.padding??0)/2+(s.y-(s.top??0))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,y,t),K.polygon(e,y,t)},a}function dt(t,e,{dir:r,config:{state:n,themeVariables:a}}){const{nodeStyles:s}=(0,i.GX)(e);e.label="";const o=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let c=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);"LR"===r&&(c=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));const d=-1*c/2,g=-1*u/2,m=h.A.svg(o),y=(0,i.Fr)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const v=m.rectangle(d,g,c,u,y),b=o.insert(()=>v,":first-child");l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),s&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",s),p(e,b);const x=n?.padding??0;return e.width&&e.height&&(e.width+=x/2||0,e.height+=x/2||0),e.intersect=function(t){return K.rect(e,t)},o}async function pt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(80,s.width+2*(e.padding??0),e?.width??0),c=Math.max(50,s.height+2*(e.padding??0),e?.height??0),d=c/2,{cssStyles:m}=e,v=h.A.svg(a),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=[{x:-o/2,y:-c/2},{x:o/2-d,y:-c/2},...y(-o/2+d,0,d,50,90,270),{x:o/2-d,y:c/2},{x:-o/2,y:c/2}],w=g(x),T=v.path(w,b),k=a.insert(()=>T,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",m),n&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",n),p(e,k),e.intersect=function(t){l.Rm.info("Pill intersect",e,{radius:d,point:t});return K.polygon(e,x,t)},a}async function ft(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.height+(e.padding??0),l=s.width+2.5*(e.padding??0),{cssStyles:c}=e,d=h.A.svg(a),m=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let y=l/2;y+=y/6;const v=o/2,b=y-v/2,x=[{x:-b,y:-v},{x:0,y:-v},{x:b,y:-v},{x:y,y:0},{x:b,y:v},{x:0,y:v},{x:-b,y:v},{x:-y,y:0}],w=g(x),T=d.path(w,m),k=a.insert(()=>T,":first-child");return k.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",n),e.width=l,e.height=o,p(e,k),e.intersect=function(t){return K.polygon(e,x,t)},a}async function gt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await u(t,e,f(e)),s=Math.max(30,e?.width??0),o=Math.max(30,e?.height??0),{cssStyles:c}=e,d=h.A.svg(a),m=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],v=g(y),b=d.path(v,m),x=a.insert(()=>b,":first-child");return x.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",n),x.attr("transform",`translate(${-s/2}, ${-o/2})`),p(e,x),e.intersect=function(t){l.Rm.info("Pill intersect",e,{points:y});return K.polygon(e,y,t)},a}async function mt(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const o=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(o,c),f=n?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,label:y}=await u(t,e,"icon-shape default"),v="t"===e.pos,b=d,x=d,{nodeBorder:w}=r,{stylesMap:T}=(0,i.WW)(e),k=-x/2,A=-b/2,_=e.label?8:0,E=h.A.svg(g),C=(0,i.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const S=E.rectangle(k,A,x,b,C),R=Math.max(x,m.width),L=b+m.height+_,D=E.rectangle(-R/2,-L/2,R,L,{...C,fill:"transparent",stroke:"none"}),N=g.insert(()=>S,":first-child"),I=g.insert(()=>D);if(e.icon){const t=g.append("g");t.html(`${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}`);const r=t.node().getBBox(),n=r.width,i=r.height,s=r.x,o=r.y;t.attr("transform",`translate(${-n/2-s},${v?m.height/2+_/2-i/2-o:-m.height/2-_/2-i/2-o})`),t.attr("style",`color: ${T.get("stroke")??w};`)}return y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${v?-L/2:L/2-m.height})`),N.attr("transform",`translate(0,${v?m.height/2+_/2:-m.height/2-_/2})`),p(e,I),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return K.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=v?[{x:r-m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2+m.height+_},{x:r+x/2,y:n-i/2+m.height+_},{x:r+x/2,y:n+i/2},{x:r-x/2,y:n+i/2},{x:r-x/2,y:n-i/2+m.height+_},{x:r-m.width/2,y:n-i/2+m.height+_}]:[{x:r-x/2,y:n-i/2},{x:r+x/2,y:n-i/2},{x:r+x/2,y:n-i/2+b},{x:r+m.width/2,y:n-i/2+b},{x:r+m.width/2/2,y:n+i/2},{x:r-m.width/2,y:n+i/2},{x:r-m.width/2,y:n-i/2+b},{x:r-x/2,y:n-i/2+b}];return K.polygon(e,a,t)},g}async function yt(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const o=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(o,c),f=n?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,label:y}=await u(t,e,"icon-shape default"),v=e.label?8:0,b="t"===e.pos,{nodeBorder:x,mainBkg:w}=r,{stylesMap:T}=(0,i.WW)(e),k=h.A.svg(g),A=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const _=T.get("fill");A.stroke=_??w;const E=g.append("g");e.icon&&E.html(`${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}`);const C=E.node().getBBox(),S=C.width,R=C.height,L=C.x,D=C.y,N=Math.max(S,R)*Math.SQRT2+40,I=k.circle(0,0,N,A),M=Math.max(N,m.width),O=N+m.height+v,P=k.rectangle(-M/2,-O/2,M,O,{...A,fill:"transparent",stroke:"none"}),$=g.insert(()=>I,":first-child"),B=g.insert(()=>P);return E.attr("transform",`translate(${-S/2-L},${b?m.height/2+v/2-R/2-D:-m.height/2-v/2-R/2-D})`),E.attr("style",`color: ${T.get("stroke")??x};`),y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-O/2:O/2-m.height})`),$.attr("transform",`translate(0,${b?m.height/2+v/2:-m.height/2-v/2})`),p(e,B),e.intersect=function(t){l.Rm.info("iconSquare intersect",e,t);return K.rect(e,t)},g}async function vt(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const o=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(o,c),f=n?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,halfPadding:y,label:v}=await u(t,e,"icon-shape default"),b="t"===e.pos,x=d+2*y,w=d+2*y,{nodeBorder:k,mainBkg:A}=r,{stylesMap:_}=(0,i.WW)(e),E=-w/2,C=-x/2,S=e.label?8:0,R=h.A.svg(g),L=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const D=_.get("fill");L.stroke=D??A;const N=R.path(T(E,C,w,x,5),L),I=Math.max(w,m.width),M=x+m.height+S,O=R.rectangle(-I/2,-M/2,I,M,{...L,fill:"transparent",stroke:"none"}),P=g.insert(()=>N,":first-child").attr("class","icon-shape2"),$=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}`);const r=t.node().getBBox(),n=r.width,i=r.height,s=r.x,o=r.y;t.attr("transform",`translate(${-n/2-s},${b?m.height/2+S/2-i/2-o:-m.height/2-S/2-i/2-o})`),t.attr("style",`color: ${_.get("stroke")??k};`)}return v.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-M/2:M/2-m.height})`),P.attr("transform",`translate(0,${b?m.height/2+S/2:-m.height/2-S/2})`),p(e,$),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return K.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=b?[{x:r-m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2+m.height+S},{x:r+w/2,y:n-i/2+m.height+S},{x:r+w/2,y:n+i/2},{x:r-w/2,y:n+i/2},{x:r-w/2,y:n-i/2+m.height+S},{x:r-m.width/2,y:n-i/2+m.height+S}]:[{x:r-w/2,y:n-i/2},{x:r+w/2,y:n-i/2},{x:r+w/2,y:n-i/2+x},{x:r+m.width/2,y:n-i/2+x},{x:r+m.width/2/2,y:n+i/2},{x:r-m.width/2,y:n+i/2},{x:r-m.width/2,y:n-i/2+x},{x:r-w/2,y:n-i/2+x}];return K.polygon(e,a,t)},g}async function bt(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const o=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(o,c),f=n?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,halfPadding:y,label:v}=await u(t,e,"icon-shape default"),b="t"===e.pos,x=d+2*y,w=d+2*y,{nodeBorder:k,mainBkg:A}=r,{stylesMap:_}=(0,i.WW)(e),E=-w/2,C=-x/2,S=e.label?8:0,R=h.A.svg(g),L=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const D=_.get("fill");L.stroke=D??A;const N=R.path(T(E,C,w,x,.1),L),I=Math.max(w,m.width),M=x+m.height+S,O=R.rectangle(-I/2,-M/2,I,M,{...L,fill:"transparent",stroke:"none"}),P=g.insert(()=>N,":first-child"),$=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}`);const r=t.node().getBBox(),n=r.width,i=r.height,s=r.x,o=r.y;t.attr("transform",`translate(${-n/2-s},${b?m.height/2+S/2-i/2-o:-m.height/2-S/2-i/2-o})`),t.attr("style",`color: ${_.get("stroke")??k};`)}return v.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-M/2:M/2-m.height})`),P.attr("transform",`translate(0,${b?m.height/2+S/2:-m.height/2-S/2})`),p(e,$),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return K.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=b?[{x:r-m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2+m.height+S},{x:r+w/2,y:n-i/2+m.height+S},{x:r+w/2,y:n+i/2},{x:r-w/2,y:n+i/2},{x:r-w/2,y:n-i/2+m.height+S},{x:r-m.width/2,y:n-i/2+m.height+S}]:[{x:r-w/2,y:n-i/2},{x:r+w/2,y:n-i/2},{x:r+w/2,y:n-i/2+x},{x:r+m.width/2,y:n-i/2+x},{x:r+m.width/2/2,y:n+i/2},{x:r-m.width/2,y:n+i/2},{x:r-m.width/2,y:n-i/2+x},{x:r-w/2,y:n-i/2+x}];return K.polygon(e,a,t)},g}async function xt(t,e,{config:{flowchart:r}}){const n=new Image;n.src=e?.img??"",await n.decode();const a=Number(n.naturalWidth.toString().replace("px","")),s=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/s;const{labelStyles:o}=(0,i.GX)(e);e.labelStyle=o;const c=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const d=Math.max(e.label?c??0:0,e?.assetWidth??a),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:d,g="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??s;e.width=Math.max(f,c??0);const{shapeSvg:m,bbox:y,label:v}=await u(t,e,"image-shape default"),b="t"===e.pos,x=-f/2,w=-g/2,T=e.label?8:0,k=h.A.svg(m),A=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const _=k.rectangle(x,w,f,g,A),E=Math.max(f,y.width),C=g+y.height+T,S=k.rectangle(-E/2,-C/2,E,C,{...A,fill:"none",stroke:"none"}),R=m.insert(()=>_,":first-child"),L=m.insert(()=>S);if(e.img){const t=m.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${b?C/2-g:-C/2})`)}return v.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-g/2-y.height/2-T/2:g/2-y.height/2+T/2})`),R.attr("transform",`translate(0,${b?y.height/2+T/2:-y.height/2-T/2})`),p(e,L),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return K.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=b?[{x:r-y.width/2,y:n-i/2},{x:r+y.width/2,y:n-i/2},{x:r+y.width/2,y:n-i/2+y.height+T},{x:r+f/2,y:n-i/2+y.height+T},{x:r+f/2,y:n+i/2},{x:r-f/2,y:n+i/2},{x:r-f/2,y:n-i/2+y.height+T},{x:r-y.width/2,y:n-i/2+y.height+T}]:[{x:r-f/2,y:n-i/2},{x:r+f/2,y:n-i/2},{x:r+f/2,y:n-i/2+g},{x:r+y.width/2,y:n-i/2+g},{x:r+y.width/2/2,y:n+i/2},{x:r-y.width/2,y:n+i/2},{x:r-y.width/2,y:n-i/2+g},{x:r-f/2,y:n-i/2+g}];return K.polygon(e,a,t)},m}async function wt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+2*(e.padding??0),e?.width??0),l=Math.max(s.height+2*(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:o,y:0},{x:o+3*l/6,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=g(c),s=t.path(n,r);d=a.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),m&&d.attr("style",m)}else d=G(a,o,l,c);return n&&d.attr("style",n),e.width=o,e.height=l,p(e,d),e.intersect=function(t){return K.polygon(e,c,t)},a}async function Tt(t,e,r){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:o,bbox:l}=await u(t,e,f(e)),c=Math.max(l.width+2*r.labelPaddingX,e?.width||0),d=Math.max(l.height+2*r.labelPaddingY,e?.height||0),g=-c/2,m=-d/2;let y,{rx:v,ry:b}=e;const{cssStyles:x}=e;if(r?.rx&&r.ry&&(v=r.rx,b=r.ry),"handDrawn"===e.look){const t=h.A.svg(o),r=(0,i.Fr)(e,{}),n=v||b?t.path(T(g,m,c,d,v||0),r):t.rectangle(g,m,c,d,r);y=o.insert(()=>n,":first-child"),y.attr("class","basic label-container").attr("style",(0,s.KL)(x))}else y=o.insert("rect",":first-child"),y.attr("class","basic label-container").attr("style",a).attr("rx",(0,s.KL)(v)).attr("ry",(0,s.KL)(b)).attr("x",g).attr("y",m).attr("width",c).attr("height",d);return p(e,y),e.calcIntersect=function(t,e){return K.rect(t,e)},e.intersect=function(t){return K.rect(e,t)},o}async function kt(t,e){const{shapeSvg:r,bbox:n,label:i}=await u(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),p(e,a),e.intersect=function(t){return K.rect(e,t)},r}async function At(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+(e.padding??0),e?.width??0),l=Math.max(s.height+(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:o+3*l/6,y:0},{x:o,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=g(c),s=t.path(n,r);d=a.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),m&&d.attr("style",m)}else d=G(a,o,l,c);return n&&d.attr("style",n),e.width=o,e.height=l,p(e,d),e.intersect=function(t){return K.polygon(e,c,t)},a}async function _t(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+(e.padding??0),e?.width??0),l=Math.max(s.height+(e.padding??0),e?.height??0),c=[{x:-3*l/6,y:0},{x:o,y:0},{x:o+3*l/6,y:-l},{x:0,y:-l}];let d;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=g(c),s=t.path(n,r);d=a.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),m&&d.attr("style",m)}else d=G(a,o,l,c);return n&&d.attr("style",n),e.width=o,e.height=l,p(e,d),e.intersect=function(t){return K.polygon(e,c,t)},a}function Et(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=Math.max(35,e?.width??0),c=Math.max(35,e?.height??0),u=[{x:o,y:0},{x:0,y:c+3.5},{x:o-14,y:c+3.5},{x:0,y:2*c},{x:o,y:c-3.5},{x:14,y:c-3.5}],d=h.A.svg(a),m=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=g(u),v=d.path(y,m),b=a.insert(()=>v,":first-child");return s&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(-${o/2},${-c})`),p(e,b),e.intersect=function(t){l.Rm.info("lightningBolt intersect",e,t);return K.polygon(e,u,t)},a}(0,l.K2)(ot,"cylinder"),(0,l.K2)(lt,"dividedRectangle"),(0,l.K2)(ct,"doublecircle"),(0,l.K2)(ht,"filledCircle"),(0,l.K2)(ut,"flippedTriangle"),(0,l.K2)(dt,"forkJoin"),(0,l.K2)(pt,"halfRoundedRectangle"),(0,l.K2)(ft,"hexagon"),(0,l.K2)(gt,"hourglass"),(0,l.K2)(mt,"icon"),(0,l.K2)(yt,"iconCircle"),(0,l.K2)(vt,"iconRounded"),(0,l.K2)(bt,"iconSquare"),(0,l.K2)(xt,"imageSquare"),(0,l.K2)(wt,"inv_trapezoid"),(0,l.K2)(Tt,"drawRect"),(0,l.K2)(kt,"labelRect"),(0,l.K2)(At,"lean_left"),(0,l.K2)(_t,"lean_right"),(0,l.K2)(Et,"lightningBolt");var Ct=(0,l.K2)((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),St=(0,l.K2)((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Rt=(0,l.K2)((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Lt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:l}=await u(t,e,f(e)),c=Math.max(o.width+(e.padding??0),e.width??0),d=c/2,g=d/(2.5+c/50),m=Math.max(o.height+g+(e.padding??0),e.height??0),y=.1*m;let v;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=St(0,0,c,m,d,g,y),n=Rt(0,g,c,m,d,g),s=(0,i.Fr)(e,{}),o=t.path(r,s),l=t.path(n,s);a.insert(()=>l,":first-child").attr("class","line"),v=a.insert(()=>o,":first-child"),v.attr("class","basic label-container"),b&&v.attr("style",b)}else{const t=Ct(0,0,c,m,d,g,y);v=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)(b)).attr("style",n)}return v.attr("label-offset-y",g),v.attr("transform",`translate(${-c/2}, ${-(m/2+g)})`),p(e,v),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+g-(o.y-(o.top??0))})`),e.intersect=function(t){const r=K.rect(e,t),n=r.x-(e.x??0);if(0!=d&&(Math.abs(n)<(e.width??0)/2||Math.abs(n)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-g)){let i=g*g*(1-n*n/(d*d));i>0&&(i=Math.sqrt(i)),i=g-i,t.y-(e.y??0)>0&&(i=-i),r.y+=i}return r},a}async function Dt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=c/4,g=c+d,{cssStyles:y}=e,v=h.A.svg(a),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=[{x:-l/2-l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:g/2},...m(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,d,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2},{x:-l/2,y:-g/2},{x:-l/2,y:g/2*1.1},{x:-l/2,y:-g/2}],w=v.polygon(x.map(t=>[t.x,t.y]),b),T=a.insert(()=>w,":first-child");return T.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),T.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(s.x-(s.left??0))},${-c/2+(e.padding??0)-d/2-(s.y-(s.top??0))})`),p(e,T),e.intersect=function(t){return K.polygon(e,x,t)},a}async function Nt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=-l/2,m=-c/2,{cssStyles:y}=e,v=h.A.svg(a),b=(0,i.Fr)(e,{}),x=[{x:d-5,y:m+5},{x:d-5,y:m+c+5},{x:d+l-5,y:m+c+5},{x:d+l-5,y:m+c},{x:d+l,y:m+c},{x:d+l,y:m+c-5},{x:d+l+5,y:m+c-5},{x:d+l+5,y:m-5},{x:d+5,y:m-5},{x:d+5,y:m},{x:d,y:m},{x:d,y:m+5}],w=[{x:d,y:m+5},{x:d+l-5,y:m+5},{x:d+l-5,y:m+c},{x:d+l,y:m+c},{x:d+l,y:m},{x:d,y:m}];"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const T=g(x),k=v.path(T,b),A=g(w),_=v.path(A,{...b,fill:"none"}),E=a.insert(()=>_,":first-child");return E.insert(()=>k,":first-child"),E.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",n),o.attr("transform",`translate(${-s.width/2-5-(s.x-(s.left??0))}, ${-s.height/2+5-(s.y-(s.top??0))})`),p(e,E),e.intersect=function(t){return K.polygon(e,x,t)},a}async function It(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=c/4,y=c+d,v=-l/2,b=-y/2,{cssStyles:x}=e,w=m(v-5,b+y+5,v+l-5,b+y+5,d,.8),T=w?.[w.length-1],k=[{x:v-5,y:b+5},{x:v-5,y:b+y+5},...w,{x:v+l-5,y:T.y-5},{x:v+l,y:T.y-5},{x:v+l,y:T.y-10},{x:v+l+5,y:T.y-10},{x:v+l+5,y:b-5},{x:v+5,y:b-5},{x:v+5,y:b},{x:v,y:b},{x:v,y:b+5}],A=[{x:v,y:b+5},{x:v+l-5,y:b+5},{x:v+l-5,y:T.y-5},{x:v+l,y:T.y-5},{x:v+l,y:b},{x:v,y:b}],_=h.A.svg(a),E=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(E.roughness=0,E.fillStyle="solid");const C=g(k),S=_.path(C,E),R=g(A),L=_.path(R,E),D=a.insert(()=>S,":first-child");return D.insert(()=>L),D.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-s.width/2-5-(s.x-(s.left??0))}, ${-s.height/2+5-d/2-(s.y-(s.top??0))})`),p(e,D),e.intersect=function(t){return K.polygon(e,k,t)},a}async function Mt(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=n;e.useHtmlLabels||!1!==(0,o.zj)().flowchart?.htmlLabels||(e.centerLabel=!0);const{shapeSvg:s,bbox:l,label:c}=await u(t,e,f(e)),d=Math.max(l.width+2*(e.padding??0),e?.width??0),g=Math.max(l.height+2*(e.padding??0),e?.height??0),m=-d/2,y=-g/2,{cssStyles:v}=e,b=h.A.svg(s),x=(0,i.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const w=b.rectangle(m,y,d,g,x),T=s.insert(()=>w,":first-child");return T.attr("class","basic label-container"),v&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",v),a&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",a),c.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),p(e,T),e.intersect=function(t){return K.rect(e,t)},s}(0,l.K2)(Lt,"linedCylinder"),(0,l.K2)(Dt,"linedWaveEdgedRect"),(0,l.K2)(Nt,"multiRect"),(0,l.K2)(It,"multiWaveEdgedRectangle"),(0,l.K2)(Mt,"note");var Ot=(0,l.K2)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Pt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.width+e.padding+(s.height+e.padding),l=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=Ot(0,0,o),s=t.path(n,r);c=a.insert(()=>s,":first-child").attr("transform",`translate(${-o/2+.5}, ${o/2})`),d&&c.attr("style",d)}else c=G(a,o,o,l),c.attr("transform",`translate(${-o/2+.5}, ${o/2})`);return n&&c.attr("style",n),p(e,c),e.calcIntersect=function(t,e){const r=t.width,n=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],i=K.polygon(t,n,e);return{x:i.x-.5,y:i.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},a}async function $t(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=-Math.max(s.width+(e.padding??0),e?.width??0)/2,c=-Math.max(s.height+(e.padding??0),e?.height??0)/2,d=c/2,m=[{x:l+d,y:c},{x:l,y:0},{x:l+d,y:-c},{x:-l,y:-c},{x:-l,y:c}],{cssStyles:y}=e,v=h.A.svg(a),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=g(m),w=v.path(x,b),T=a.insert(()=>w,":first-child");return T.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),T.attr("transform",`translate(${-d/2},0)`),o.attr("transform",`translate(${-d/2-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),p(e,T),e.intersect=function(t){return K.polygon(e,m,t)},a}async function Bt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);let a;e.labelStyle=r,a=e.cssClasses?"node "+e.cssClasses:"node default";const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=s.insert("g"),d=s.insert("g").attr("class","label").attr("style",n),f=e.description,g=e.label,m=d.node().appendChild(await w(g,e.labelStyle,!0,!0));let y={width:0,height:0};if((0,o._3)((0,o.D7)()?.flowchart?.htmlLabels)){const t=m.children[0],e=(0,c.Ltv)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}l.Rm.info("Text 2",f);const v=f||[],b=m.getBBox(),x=d.node().appendChild(await w(v.join?v.join("
    "):v,e.labelStyle,!0,!0)),k=x.children[0],A=(0,c.Ltv)(x);y=k.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height);const _=(e.padding||0)/2;(0,c.Ltv)(x).attr("transform","translate( "+(y.width>b.width?0:(b.width-y.width)/2)+", "+(b.height+_+5)+")"),(0,c.Ltv)(m).attr("transform","translate( "+(y.width(l.Rm.debug("Rough node insert CXC",n),a),":first-child"),L=s.insert(()=>(l.Rm.debug("Rough node insert CXC",n),n),":first-child")}else L=u.insert("rect",":first-child"),D=u.insert("line"),L.attr("class","outer title-state").attr("style",n).attr("x",-y.width/2-_).attr("y",-y.height/2-_).attr("width",y.width+(e.padding||0)).attr("height",y.height+(e.padding||0)),D.attr("class","divider").attr("x1",-y.width/2-_).attr("x2",y.width/2+_).attr("y1",-y.height/2-_+b.height+_).attr("y2",-y.height/2-_+b.height+_);return p(e,L),e.intersect=function(t){return K.rect(e,t)},s}function Ft(t,e,r,n,i,a,s){const o=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=(r-t)/2/i,u=(n-e)/2/a,d=Math.sqrt(h**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=o+p*a*Math.sin(c)*(s?-1:1),g=l-p*i*Math.cos(c)*(s?-1:1),m=Math.atan2((e-g)/a,(t-f)/i);let y=Math.atan2((n-g)/a,(r-f)/i)-m;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const v=[];for(let b=0;b<20;b++){const t=m+b/19*y,e=f+i*Math.cos(t),r=g+a*Math.sin(t);v.push({x:e,y:r})}return v}async function zt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=e?.padding??0,l=e?.padding??0,c=(e?.width?e?.width:s.width)+2*o,d=(e?.height?e?.height:s.height)+2*l,m=e.radius||5,y=e.taper||5,{cssStyles:v}=e,b=h.A.svg(a),x=(0,i.Fr)(e,{});e.stroke&&(x.stroke=e.stroke),"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const w=[{x:-c/2+y,y:-d/2},{x:c/2-y,y:-d/2},...Ft(c/2-y,-d/2,c/2,-d/2+y,m,m,!0),{x:c/2,y:-d/2+y},{x:c/2,y:d/2-y},...Ft(c/2,d/2-y,c/2-y,d/2,m,m,!0),{x:c/2-y,y:d/2},{x:-c/2+y,y:d/2},...Ft(-c/2+y,d/2,-c/2,d/2-y,m,m,!0),{x:-c/2,y:d/2-y},{x:-c/2,y:-d/2+y},...Ft(-c/2,-d/2+y,-c/2+y,-d/2,m,m,!0)],T=g(w),k=b.path(T,x),A=a.insert(()=>k,":first-child");return A.attr("class","basic label-container outer-path"),v&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",v),n&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",n),p(e,A),e.intersect=function(t){return K.polygon(e,w,t)},a}async function Kt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:l}=await u(t,e,f(e)),c=e?.padding??0,d=Math.max(o.width+2*(e.padding??0),e?.width??0),g=Math.max(o.height+2*(e.padding??0),e?.height??0),m=-o.width/2-c,y=-o.height/2-c,{cssStyles:v}=e,b=h.A.svg(a),x=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const w=[{x:m,y},{x:m+d+8,y},{x:m+d+8,y:y+g},{x:m-8,y:y+g},{x:m-8,y},{x:m,y},{x:m,y:y+g}],T=b.polygon(w.map(t=>[t.x,t.y]),x),k=a.insert(()=>T,":first-child");return k.attr("class","basic label-container").attr("style",(0,s.KL)(v)),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),v&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),l.attr("transform",`translate(${-d/2+4+(e.padding??0)-(o.x-(o.left??0))},${-g/2+(e.padding??0)-(o.y-(o.top??0))})`),p(e,k),e.intersect=function(t){return K.rect(e,t)},a}async function qt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=-l/2,m=-c/2,{cssStyles:y}=e,v=h.A.svg(a),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=[{x:d,y:m},{x:d,y:m+c},{x:d+l,y:m+c},{x:d+l,y:m-c/2}],w=g(x),T=v.path(w,b),k=a.insert(()=>T,":first-child");return k.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",y),n&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",n),k.attr("transform",`translate(0, ${c/4})`),o.attr("transform",`translate(${-l/2+(e.padding??0)-(s.x-(s.left??0))}, ${-c/4+(e.padding??0)-(s.y-(s.top??0))})`),p(e,k),e.intersect=function(t){return K.polygon(e,x,t)},a}async function Ut(t,e){return Tt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function jt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.height+e.padding,l=s.width+o/4+e.padding,c=o/2,{cssStyles:d}=e,m=h.A.svg(a),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const b=[{x:-l/2+c,y:-o/2},{x:l/2-c,y:-o/2},...y(-l/2+c,0,c,50,90,270),{x:l/2-c,y:o/2},...y(l/2-c,0,c,50,270,450)],x=g(b),w=m.path(x,v),T=a.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",d),n&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",n),p(e,T),e.intersect=function(t){return K.polygon(e,b,t)},a}async function Gt(t,e){return Tt(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function Yt(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=n;const{cssStyles:s}=e,{lineColor:o,stateBorder:l,nodeBorder:c}=r,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),d=h.A.svg(u),f=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const g=d.circle(0,0,14,{...f,stroke:o,strokeWidth:2}),m=l??c,y=d.circle(0,0,5,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),v=u.insert(()=>g,":first-child");return v.insert(()=>y),s&&v.selectAll("path").attr("style",s),a&&v.selectAll("path").attr("style",a),p(e,v),e.intersect=function(t){return K.circle(e,7,t)},u}function Wt(t,e,{config:{themeVariables:r}}){const{lineColor:n}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if("handDrawn"===e.look){const t=h.A.svg(a).circle(0,0,14,(0,i.ue)(n));s=a.insert(()=>t),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return p(e,s),e.intersect=function(t){return K.circle(e,7,t)},a}async function Ht(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),l=(e?.padding||0)/2,c=o.width+e.padding,d=o.height+e.padding,g=-o.width/2-l,m=-o.height/2-l,y=[{x:0,y:0},{x:c,y:0},{x:c,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=t.rectangle(g-8,m,c+16,d,r),o=t.line(g,m,g,m+d,r),l=t.line(g+c,m,g+c,m+d,r);a.insert(()=>o,":first-child"),a.insert(()=>l,":first-child");const u=a.insert(()=>n,":first-child"),{cssStyles:f}=e;u.attr("class","basic label-container").attr("style",(0,s.KL)(f)),p(e,u)}else{const t=G(a,c,d,y);n&&t.attr("style",n),p(e,t)}return e.intersect=function(t){return K.polygon(e,y,t)},a}async function Vt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+2*(e.padding??0),e?.width??0),l=Math.max(s.height+2*(e.padding??0),e?.height??0),c=-o/2,d=-l/2,m=.2*l,y=.2*l,{cssStyles:v}=e,b=h.A.svg(a),x=(0,i.Fr)(e,{}),w=[{x:c-m/2,y:d},{x:c+o+m/2,y:d},{x:c+o+m/2,y:d+l},{x:c-m/2,y:d+l}],T=[{x:c+o-m/2,y:d+l},{x:c+o+m/2,y:d+l},{x:c+o+m/2,y:d+l-y}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const k=g(w),A=b.path(k,x),_=g(T),E=b.path(_,{...x,fillStyle:"solid"}),C=a.insert(()=>E,":first-child");return C.insert(()=>A,":first-child"),C.attr("class","basic label-container"),v&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",v),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),p(e,C),e.intersect=function(t){return K.polygon(e,w,t)},a}async function Xt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=c/4,y=.2*l,v=.2*c,b=c+d,{cssStyles:x}=e,w=h.A.svg(a),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const k=[{x:-l/2-l/2*.1,y:b/2},...m(-l/2-l/2*.1,b/2,l/2+l/2*.1,b/2,d,.8),{x:l/2+l/2*.1,y:-b/2},{x:-l/2-l/2*.1,y:-b/2}],A=-l/2+l/2*.1,_=-b/2-.4*v,E=[{x:A+l-y,y:1.4*(_+c)},{x:A+l,y:_+c-v},{x:A+l,y:.9*(_+c)},...m(A+l,1.3*(_+c),A+l-y,1.5*(_+c),.03*-c,.5)],C=g(k),S=w.path(C,T),R=g(E),L=w.path(R,{...T,fillStyle:"solid"}),D=a.insert(()=>L,":first-child");return D.insert(()=>S,":first-child"),D.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-l/2+(e.padding??0)-(s.x-(s.left??0))},${-c/2+(e.padding??0)-d/2-(s.y-(s.top??0))})`),p(e,D),e.intersect=function(t){return K.polygon(e,k,t)},a}async function Zt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+e.padding,e?.width||0),l=Math.max(s.height+e.padding,e?.height||0),c=-o/2,h=-l/2,d=a.insert("rect",":first-child");return d.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",o).attr("height",l),p(e,d),e.intersect=function(t){return K.rect(e,t)},a}(0,l.K2)(Pt,"question"),(0,l.K2)($t,"rect_left_inv_arrow"),(0,l.K2)(Bt,"rectWithTitle"),(0,l.K2)(Ft,"generateArcPoints"),(0,l.K2)(zt,"roundedRect"),(0,l.K2)(Kt,"shadedProcess"),(0,l.K2)(qt,"slopedRect"),(0,l.K2)(Ut,"squareRect"),(0,l.K2)(jt,"stadium"),(0,l.K2)(Gt,"state"),(0,l.K2)(Yt,"stateEnd"),(0,l.K2)(Wt,"stateStart"),(0,l.K2)(Ht,"subroutine"),(0,l.K2)(Vt,"taggedRect"),(0,l.K2)(Xt,"taggedWaveEdgedRectangle"),(0,l.K2)(Zt,"text");var Qt=(0,l.K2)((t,e,r,n,i,a)=>`M${t},${e}\n a${i},${a} 0,0,1 0,${-n}\n l${r},0\n a${i},${a} 0,0,1 0,${n}\n M${r},${-n}\n a${i},${a} 0,0,0 0,${n}\n l${-r},0`,"createCylinderPathD"),Jt=(0,l.K2)((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),te=(0,l.K2)((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function ee(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:l,halfPadding:c}=await u(t,e,f(e)),d="neo"===e.look?2*c:c,g=o.height+d,m=g/2,y=m/(2.5+g/50),v=o.width+y+d,{cssStyles:b}=e;let x;if("handDrawn"===e.look){const t=h.A.svg(a),r=Jt(0,0,v,g,y,m),n=te(0,0,v,g,y,m),s=t.path(r,(0,i.Fr)(e,{})),o=t.path(n,(0,i.Fr)(e,{fill:"none"}));x=a.insert(()=>o,":first-child"),x=a.insert(()=>s,":first-child"),x.attr("class","basic label-container"),b&&x.attr("style",b)}else{const t=Qt(0,0,v,g,y,m);x=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)(b)).attr("style",n),x.attr("class","basic label-container"),b&&x.selectAll("path").attr("style",b),n&&x.selectAll("path").attr("style",n)}return x.attr("label-offset-x",y),x.attr("transform",`translate(${-v/2}, ${g/2} )`),l.attr("transform",`translate(${-o.width/2-y-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),p(e,x),e.intersect=function(t){const r=K.rect(e,t),n=r.y-(e.y??0);if(0!=m&&(Math.abs(n)<(e.height??0)/2||Math.abs(n)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-y)){let i=y*y*(1-n*n/(m*m));0!=i&&(i=Math.sqrt(Math.abs(i))),i=y-i,t.x-(e.x??0)>0&&(i=-i),r.x+=i}return r},a}async function re(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=s.width+e.padding,l=s.height+e.padding,c=[{x:-3*l/6,y:0},{x:o+3*l/6,y:0},{x:o,y:-l},{x:0,y:-l}];let d;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=g(c),s=t.path(n,r);d=a.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),m&&d.attr("style",m)}else d=G(a,o,l,c);return n&&d.attr("style",n),e.width=o,e.height=l,p(e,d),e.intersect=function(t){return K.polygon(e,c,t)},a}async function ne(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(60,s.width+2*(e.padding??0),e?.width??0),l=Math.max(20,s.height+2*(e.padding??0),e?.height??0),{cssStyles:c}=e,d=h.A.svg(a),m=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-o/2*.8,y:-l/2},{x:o/2*.8,y:-l/2},{x:o/2,y:-l/2*.6},{x:o/2,y:l/2},{x:-o/2,y:l/2},{x:-o/2,y:-l/2*.6}],v=g(y),b=d.path(v,m),x=a.insert(()=>b,":first-child");return x.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",n),p(e,x),e.intersect=function(t){return K.polygon(e,y,t)},a}async function ie(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:c}=await u(t,e,f(e)),d=(0,o._3)((0,o.D7)().flowchart?.htmlLabels),m=s.width+(e.padding??0),y=m+s.height,v=m+s.height,b=[{x:0,y:0},{x:v,y:0},{x:v/2,y:-y}],{cssStyles:x}=e,w=h.A.svg(a),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const k=g(b),A=w.path(k,T),_=a.insert(()=>A,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`);return x&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",x),n&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",n),e.width=m,e.height=y,p(e,_),c.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${y/2-(s.height+(e.padding??0)/(d?2:1)-(s.y-(s.top??0)))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,b,t),K.polygon(e,b,t)},a}async function ae(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=c/8,y=c+d,{cssStyles:v}=e,b=70-l,x=b>0?b/2:0,w=h.A.svg(a),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const k=[{x:-l/2-x,y:y/2},...m(-l/2-x,y/2,l/2+x,y/2,d,.8),{x:l/2+x,y:-y/2},{x:-l/2-x,y:-y/2}],A=g(k),_=w.path(A,T),E=a.insert(()=>_,":first-child");return E.attr("class","basic label-container"),v&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",v),n&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-l/2+(e.padding??0)-(s.x-(s.left??0))},${-c/2+(e.padding??0)-d-(s.y-(s.top??0))})`),p(e,E),e.intersect=function(t){return K.polygon(e,k,t)},a}async function se(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),o=Math.max(s.width+2*(e.padding??0),e?.width??0),l=Math.max(s.height+2*(e.padding??0),e?.height??0),c=o/l;let d=o,y=l;d>y*c?y=d/c:d=y*c,d=Math.max(d,100),y=Math.max(y,50);const v=Math.min(.2*y,y/4),b=y+2*v,{cssStyles:x}=e,w=h.A.svg(a),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const k=[{x:-d/2,y:b/2},...m(-d/2,b/2,d/2,b/2,v,1),{x:d/2,y:-b/2},...m(d/2,-b/2,-d/2,-b/2,v,-1)],A=g(k),_=w.path(A,T),E=a.insert(()=>_,":first-child");return E.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",n),p(e,E),e.intersect=function(t){return K.polygon(e,k,t)},a}async function oe(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await u(t,e,f(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),c=Math.max(s.height+2*(e.padding??0),e?.height??0),d=-l/2,g=-c/2,{cssStyles:m}=e,y=h.A.svg(a),v=(0,i.Fr)(e,{}),b=[{x:d-5,y:g-5},{x:d-5,y:g+c},{x:d+l,y:g+c},{x:d+l,y:g-5}],x=`M${d-5},${g-5} L${d+l},${g-5} L${d+l},${g+c} L${d-5},${g+c} L${d-5},${g-5}\n M${d-5},${g} L${d+l},${g}\n M${d},${g-5} L${d},${g+c}`;"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const w=y.path(x,v),T=a.insert(()=>w,":first-child");return T.attr("transform","translate(2.5, 2.5)"),T.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),o.attr("transform",`translate(${-s.width/2+2.5-(s.x-(s.left??0))}, ${-s.height/2+2.5-(s.y-(s.top??0))})`),p(e,T),e.intersect=function(t){return K.polygon(e,b,t)},a}async function le(t,e){const r=e;if(r.alias&&(e.label=r.alias),"handDrawn"===e.look){const{themeVariables:r}=(0,o.zj)(),{background:n}=r,i={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${n}`]};await le(t,i)}const n=(0,o.zj)();e.useHtmlLabels=n.htmlLabels;let a=n.er?.diagramPadding??10,l=n.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:d,nodeStyles:g}=(0,i.GX)(e);if(0===r.attributes.length&&e.label){const r={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a,classes:""};(0,s.Un)(e.label,n)+2*r.labelPaddingX0){const t=v.width+2*a-(T+k+A+_);T+=t/S,k+=t/S,A>0&&(A+=t/S),_>0&&(_+=t/S)}const L=T+k+A+_,D=h.A.svg(y),N=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let I=0;w.length>0&&(I=w.reduce((t,e)=>t+(e?.rowHeight??0),0));const M=Math.max(R.width+2*a,e?.width||0,L),O=Math.max((I??0)+v.height,e?.height||0),P=-M/2,$=-O/2;y.selectAll("g:not(:first-child)").each((t,e,r)=>{const n=(0,c.Ltv)(r[e]),i=n.attr("transform");let s=0,o=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(s=parseFloat(t[1]),o=parseFloat(t[2]),n.attr("class").includes("attribute-name")?s+=T:n.attr("class").includes("attribute-keys")?s+=T+k:n.attr("class").includes("attribute-comment")&&(s+=T+k+A))}n.attr("transform",`translate(${P+a/2+s}, ${o+$+v.height+l/2})`)}),y.select(".name").attr("transform","translate("+-v.width/2+", "+($+l/2)+")");const B=D.rectangle(P,$,M,O,N),F=y.insert(()=>B,":first-child").attr("style",u.join("")),{themeVariables:z}=(0,o.zj)(),{rowEven:q,rowOdd:U,nodeBorder:j}=z;x.push(0);for(const[i,s]of w.entries()){const t=(i+1)%2==0&&0!==s.yOffset,e=D.rectangle(P,v.height+$+s?.yOffset,M,s?.rowHeight,{...N,fill:t?q:U,stroke:j});y.insert(()=>e,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(t?"even":"odd"))}let G=D.line(P,v.height+$,M+P,v.height+$,N);y.insert(()=>G).attr("class","divider"),G=D.line(T+P,v.height+$,T+P,O+$,N),y.insert(()=>G).attr("class","divider"),E&&(G=D.line(T+k+P,v.height+$,T+k+P,O+$,N),y.insert(()=>G).attr("class","divider")),C&&(G=D.line(T+k+A+P,v.height+$,T+k+A+P,O+$,N),y.insert(()=>G).attr("class","divider"));for(const i of x)G=D.line(P,v.height+$+i,M+P,v.height+$+i,N),y.insert(()=>G).attr("class","divider");if(p(e,F),g&&"handDrawn"!==e.look){const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");y.selectAll("path").attr("style",e??""),y.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return K.rect(e,t)},y}async function ce(t,e,r,n=0,i=0,l=[],h=""){const u=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",h);e!==(0,o.QO)(e)&&(e=(e=(0,o.QO)(e)).replaceAll("<","<").replaceAll(">",">"));const d=u.node().appendChild(await(0,a.GZ)(u,e,{width:(0,s.Un)(e,r)+100,style:h,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=d.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let p=d.getBBox();if((0,o._3)(r.htmlLabels)){const t=d.children[0];t.style.textAlign="start";const e=(0,c.Ltv)(d);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}async function he(t,e,r,n,i=r.class.padding??12){const a=n?0:3,s=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id);let o=null,l=null,c=null,h=null,u=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await ue(o,{text:`«${t}»`},0);u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await ue(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const f of e.members){m+=await ue(c,f,m,[f.parseClassifier()])+a}p=c.node().getBBox().height,p<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(const f of e.methods){y+=await ue(h,f,y,[f.parseClassifier()])+a}let v=s.node().getBBox();if(null!==o){const t=o.node().getBBox();o.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),v=s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*i})`),v=s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*i:2*i)})`),v=s.node().getBBox(),{shapeSvg:s,bbox:v}}async function ue(t,e,r,n=[]){const i=t.insert("g").attr("class","label").attr("style",n.join("; ")),h=(0,o.zj)();let u="useHtmlLabels"in e?e.useHtmlLabels:(0,o._3)(h.htmlLabels)??!0,d="";d="text"in e?e.text:e.label,!u&&d.startsWith("\\")&&(d=d.substring(1)),(0,o.Wi)(d)&&(u=!0);const p=await(0,a.GZ)(i,(0,o.oB)((0,s.Sm)(d)),{width:(0,s.Un)(d,h)+50,classes:"markdown-node-label",useHtmlLabels:u},h);let f,g=1;if(u){const t=p.children[0],e=(0,c.Ltv)(p);g=t.innerHTML.split("
    ").length,t.innerHTML.includes("")&&(g+=t.innerHTML.split("").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===d.replace(/]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=h.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,n=parseInt(t,10)*r+"px";e.style.minWidth=n,e.style.maxWidth=n}else e.style.width="100%";r(e)}(0,l.K2)(n,"setupImage"),setTimeout(()=>{e.complete&&n()}),e.addEventListener("error",n),e.addEventListener("load",n)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}else{n.includes("font-weight: bolder")&&(0,c.Ltv)(p).selectAll("tspan").attr("font-weight",""),g=p.children.length;const t=p.children[0];if(""===p.textContent||p.textContent.includes(">")){t.textContent=d[0]+d.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===d[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),f=p.getBBox()}return i.attr("transform","translate(0,"+(-f.height/(2*g)+r)+")"),f.height}async function de(t,e){const r=(0,o.D7)(),n=r.class.padding??12,a=n,s=e.useHtmlLabels??(0,o._3)(r.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:d}=await he(t,e,r,s,a),{labelStyles:f,nodeStyles:g}=(0,i.GX)(e);e.labelStyle=f,e.cssStyles=l.styles||"";const m=l.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=m.replaceAll("!important","").split(";"));const y=0===l.members.length&&0===l.methods.length&&!r.class?.hideEmptyMembersBox,v=h.A.svg(u),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=d.width;let w=d.height;0===l.members.length&&0===l.methods.length?w+=a:l.members.length>0&&0===l.methods.length&&(w+=2*a);const T=-x/2,k=-w/2,A=v.rectangle(T-n,k-n-(y?n:0===l.members.length&&0===l.methods.length?-n/2:0),x+2*n,w+2*n+(y?2*n:0===l.members.length&&0===l.methods.length?-n:0),b),_=u.insert(()=>A,":first-child");_.attr("class","basic label-container");const E=_.node().getBBox();u.selectAll(".text").each((t,e,r)=>{const i=(0,c.Ltv)(r[e]),a=i.attr("transform");let o=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(o=parseFloat(t[2]))}let h=o+k+n-(y?n:0===l.members.length&&0===l.methods.length?-n/2:0);s||(h-=4);let d=T;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(d=-i.node()?.getBBox().width/2||0,u.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(d=0)})),i.attr("transform",`translate(${d}, ${h})`)});const C=u.select(".annotation-group").node().getBBox().height-(y?n/2:0)||0,S=u.select(".label-group").node().getBBox().height-(y?n/2:0)||0,R=u.select(".members-group").node().getBBox().height-(y?n/2:0)||0;if(l.members.length>0||l.methods.length>0||y){const t=v.line(E.x,C+S+k+n,E.x+E.width,C+S+k+n,b);u.insert(()=>t).attr("class","divider").attr("style",m)}if(y||l.members.length>0||l.methods.length>0){const t=v.line(E.x,C+S+R+k+2*a+n,E.x+E.width,C+S+R+k+n+2*a,b);u.insert(()=>t).attr("class","divider").attr("style",m)}if("handDrawn"!==l.look&&u.selectAll("path").attr("style",m),_.select(":nth-child(2)").attr("style",m),u.selectAll(".divider").select("path").attr("style",m),e.labelStyle?u.selectAll("span").attr("style",e.labelStyle):u.selectAll("span").attr("style",m),!s){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(m);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}else if(f){const e=t.exec(f);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}}}return p(e,_),e.intersect=function(t){return K.rect(e,t)},u}async function pe(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e,s=e,o="verifyMethod"in e,l=f(e),u=t.insert("g").attr("class",l).attr("id",e.domId??e.id);let d;d=o?await fe(u,`<<${a.type}>>`,0,e.labelStyle):await fe(u,"<<Element>>",0,e.labelStyle);let g=d;const m=await fe(u,a.name,g,e.labelStyle+"; font-weight: bold;");if(g+=m+20,o){g+=await fe(u,""+(a.requirementId?`ID: ${a.requirementId}`:""),g,e.labelStyle);g+=await fe(u,""+(a.text?`Text: ${a.text}`:""),g,e.labelStyle);g+=await fe(u,""+(a.risk?`Risk: ${a.risk}`:""),g,e.labelStyle),await fe(u,""+(a.verifyMethod?`Verification: ${a.verifyMethod}`:""),g,e.labelStyle)}else{g+=await fe(u,""+(s.type?`Type: ${s.type}`:""),g,e.labelStyle),await fe(u,""+(s.docRef?`Doc Ref: ${s.docRef}`:""),g,e.labelStyle)}const y=(u.node()?.getBBox().width??200)+20,v=(u.node()?.getBBox().height??200)+20,b=-y/2,x=-v/2,w=h.A.svg(u),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const k=w.rectangle(b,x,y,v,T),A=u.insert(()=>k,":first-child");if(A.attr("class","basic label-container").attr("style",n),u.selectAll(".label").each((t,e,r)=>{const n=(0,c.Ltv)(r[e]),i=n.attr("transform");let a=0,s=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]))}const o=s-v/2;let l=b+10;0!==e&&1!==e||(l=a),n.attr("transform",`translate(${l}, ${o+20})`)}),g>d+m+20){const t=w.line(b,x+d+m+20,b+y,x+d+m+20,T);u.insert(()=>t).attr("style",n)}return p(e,A),e.intersect=function(t){return K.rect(e,t)},u}async function fe(t,e,r,n=""){if(""===e)return 0;const i=t.insert("g").attr("class","label").attr("style",n),l=(0,o.D7)(),h=l.htmlLabels??!0,u=await(0,a.GZ)(i,(0,o.oB)((0,s.Sm)(e)),{width:(0,s.Un)(e,l)+50,classes:"markdown-node-label",useHtmlLabels:h,style:n},l);let d;if(h){const t=u.children[0],e=(0,c.Ltv)(u);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}else{const t=u.children[0];for(const e of t.children)e.textContent=e.textContent.replaceAll(">",">").replaceAll("<","<"),n&&e.setAttribute("style",n);d=u.getBBox(),d.height+=6}return i.attr("transform",`translate(${-d.width/2},${-d.height/2+r})`),d.height}(0,l.K2)(ee,"tiltedCylinder"),(0,l.K2)(re,"trapezoid"),(0,l.K2)(ne,"trapezoidalPentagon"),(0,l.K2)(ie,"triangle"),(0,l.K2)(ae,"waveEdgedRectangle"),(0,l.K2)(se,"waveRectangle"),(0,l.K2)(oe,"windowPane"),(0,l.K2)(le,"erBox"),(0,l.K2)(ce,"addText"),(0,l.K2)(he,"textHelper"),(0,l.K2)(ue,"addText"),(0,l.K2)(de,"classBox"),(0,l.K2)(pe,"requirementBox"),(0,l.K2)(fe,"addText");var ge=(0,l.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function me(t,e,{config:r}){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=n||"";const s=e.width;e.width=(e.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await u(t,e,f(e)),g=e.padding||10;let m,y="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(y=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),m=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",y).attr("target","_blank"));const v={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let b,x;({label:b,bbox:x}=m?await d(m,"ticket"in e&&e.ticket||"",v):await d(o,"ticket"in e&&e.ticket||"",v));const{label:w,bbox:k}=await d(o,"assigned"in e&&e.assigned||"",v);e.width=s;const A=e?.width||0,_=Math.max(x.height,k.height)/2,E=Math.max(l.height+20,e?.height||0)+_,C=-A/2,S=-E/2;let R;c.attr("transform","translate("+(g-A/2)+", "+(-_-l.height/2)+")"),b.attr("transform","translate("+(g-A/2)+", "+(-_+l.height/2)+")"),w.attr("transform","translate("+(g+A/2-k.width-20)+", "+(-_+l.height/2)+")");const{rx:L,ry:D}=e,{cssStyles:N}=e;if("handDrawn"===e.look){const t=h.A.svg(o),r=(0,i.Fr)(e,{}),n=L||D?t.path(T(C,S,A,E,L||0),r):t.rectangle(C,S,A,E,r);R=o.insert(()=>n,":first-child"),R.attr("class","basic label-container").attr("style",N||null)}else{R=o.insert("rect",":first-child"),R.attr("class","basic label-container __APA__").attr("style",a).attr("rx",L??5).attr("ry",D??5).attr("x",C).attr("y",S).attr("width",A).attr("height",E);const t="priority"in e&&e.priority;if(t){const e=o.append("line"),r=C+2,n=S+Math.floor((L??0)/2),i=S+E-Math.floor((L??0)/2);e.attr("x1",r).attr("y1",n).attr("x2",r).attr("y2",i).attr("stroke-width","4").attr("stroke",ge(t))}}return p(e,R),e.height=E,e.intersect=function(t){return K.rect(e,t)},o}async function ye(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:d}=await u(t,e,f(e)),g=o.width+10*c,m=o.height+8*c,y=.15*g,{cssStyles:v}=e,b=o.width+20,x=o.height+20,w=Math.max(g,b),T=Math.max(m,x);let k;d.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);const A=`M0 0 \n a${y},${y} 1 0,0 ${.25*w},${-1*T*.1}\n a${y},${y} 1 0,0 ${.25*w},0\n a${y},${y} 1 0,0 ${.25*w},0\n a${y},${y} 1 0,0 ${.25*w},${.1*T}\n\n a${y},${y} 1 0,0 ${.15*w},${.33*T}\n a${.8*y},${.8*y} 1 0,0 0,${.34*T}\n a${y},${y} 1 0,0 ${-1*w*.15},${.33*T}\n\n a${y},${y} 1 0,0 ${-1*w*.25},${.15*T}\n a${y},${y} 1 0,0 ${-1*w*.25},0\n a${y},${y} 1 0,0 ${-1*w*.25},0\n a${y},${y} 1 0,0 ${-1*w*.25},${-1*T*.15}\n\n a${y},${y} 1 0,0 ${-1*w*.1},${-1*T*.33}\n a${.8*y},${.8*y} 1 0,0 0,${-1*T*.34}\n a${y},${y} 1 0,0 ${.1*w},${-1*T*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=t.path(A,r);k=a.insert(()=>n,":first-child"),k.attr("class","basic label-container").attr("style",(0,s.KL)(v))}else k=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",A);return k.attr("transform",`translate(${-w/2}, ${-T/2})`),p(e,k),e.calcIntersect=function(t,e){return K.rect(t,e)},e.intersect=function(t){return l.Rm.info("Bang intersect",e,t),K.rect(e,t)},a}async function ve(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:d}=await u(t,e,f(e)),g=o.width+2*c,m=o.height+2*c,y=.15*g,v=.25*g,b=.35*g,x=.2*g,{cssStyles:w}=e;let T;const k=`M0 0 \n a${y},${y} 0 0,1 ${.25*g},${-1*g*.1}\n a${b},${b} 1 0,1 ${.4*g},${-1*g*.1}\n a${v},${v} 1 0,1 ${.35*g},${.2*g}\n\n a${y},${y} 1 0,1 ${.15*g},${.35*m}\n a${x},${x} 1 0,1 ${-1*g*.15},${.65*m}\n\n a${v},${y} 1 0,1 ${-1*g*.25},${.15*g}\n a${b},${b} 1 0,1 ${-1*g*.5},0\n a${y},${y} 1 0,1 ${-1*g*.25},${-1*g*.15}\n\n a${y},${y} 1 0,1 ${-1*g*.1},${-1*m*.35}\n a${x},${x} 1 0,1 ${.1*g},${-1*m*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=t.path(k,r);T=a.insert(()=>n,":first-child"),T.attr("class","basic label-container").attr("style",(0,s.KL)(w))}else T=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",k);return d.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),T.attr("transform",`translate(${-g/2}, ${-m/2})`),p(e,T),e.calcIntersect=function(t,e){return K.rect(t,e)},e.intersect=function(t){return l.Rm.info("Cloud intersect",e,t),K.rect(e,t)},a}async function be(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await u(t,e,f(e)),c=s.width+8*o,h=s.height+2*o,d=`\n M${-c/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${c-10}\n q5,0 5,5\n v${h-10}\n q0,5 -5,5\n h${10-c}\n q-5,0 -5,-5\n Z\n `,g=a.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>l.node()),p(e,g),e.calcIntersect=function(t,e){return K.rect(t,e)},e.intersect=function(t){return K.rect(e,t)},a}async function xe(t,e){return H(t,e,{padding:e.padding??0})}(0,l.K2)(me,"kanbanItem"),(0,l.K2)(ye,"bang"),(0,l.K2)(ve,"cloud"),(0,l.K2)(be,"defaultMindmapNode"),(0,l.K2)(xe,"mindmapCircle");var we=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Ut},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:zt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:jt},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ht},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ot},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:H},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ye},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ve},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Pt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ft},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:_t},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:At},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:re},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:wt},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ct},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Zt},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Y},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Kt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Wt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Yt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:dt},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:gt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Q},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Et},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ae},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:pt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ee},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Lt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:nt},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:lt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ie},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:oe},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ht},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ne},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ut},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:qt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:It},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Nt},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:j},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:X},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Xt},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Vt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:se},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:$t},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Dt}],Te=(0,l.K2)(()=>{const t={state:Gt,choice:W,note:Mt,rectWithTitle:Bt,labelRect:kt,iconSquare:bt,iconCircle:yt,icon:mt,iconRounded:vt,imageSquare:xt,anchor:q,kanbanItem:me,mindmapCircle:xe,defaultMindmapNode:be,classBox:de,erBox:le,requirementBox:pe},e=[...Object.entries(t),...we.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function ke(t){return t in Te}(0,l.K2)(ke,"isValidShape");var Ae=new Map;async function _e(t,e,r){let n,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?Te[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;"sandbox"===r.config.securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),Ae.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}(0,l.K2)(_e,"insertNode");var Ee=(0,l.K2)((t,e)=>{Ae.set(e.id,t)},"setNodeElem"),Ce=(0,l.K2)(()=>{Ae.clear()},"clear"),Se=(0,l.K2)(t=>{const e=Ae.get(t.id);l.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},3981(t,e,r){"use strict";r.d(e,{H:()=>rr,r:()=>er});var n=r(797);function i(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function s(t){return Array.isArray(t)?t:i(t)?[]:[t]}function o(t,e){var r,n,i,a;if(e)for(r=0,n=(a=Object.keys(e)).length;ro&&(e=n-o+(a=" ... ").length),r-n>o&&(r=n+o-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:n-e+a.length}}function g(t,e){return h.repeat(" ",e-t.length)+t}function m(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],s=-1;r=n.exec(t.buffer);)a.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o,l,c="",u=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+u+3);for(o=1;o<=e.linesBefore&&!(s-o<0);o++)l=f(t.buffer,i[s-o],a[s-o],t.position-(i[s]-i[s-o]),d),c=h.repeat(" ",e.indent)+g((t.line-o+1).toString(),u)+" | "+l.str+"\n"+c;for(l=f(t.buffer,i[s],a[s],t.position,d),c+=h.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",c+=h.repeat("-",e.indent+u+3+l.pos)+"^\n",o=1;o<=e.linesAfter&&!(s+o>=a.length);o++)l=f(t.buffer,i[s+o],a[s+o],t.position-(i[s]-i[s+o]),d),c+=h.repeat(" ",e.indent)+g((t.line+o+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}(0,n.K2)(f,"getLine"),(0,n.K2)(g,"padStart"),(0,n.K2)(m,"makeSnippet");var y=m,v=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],b=["scalar","sequence","mapping"];function x(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function w(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===v.indexOf(e))throw new p('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=x(e.styleAliases||null),-1===b.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,n.K2)(x,"compileStyleAliases"),(0,n.K2)(w,"Type$1");var T=w;function k(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,n){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=n)}),r[e]=t}),r}function A(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,n.K2)(i,"collectType"),t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,n.K2)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,n.K2)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,n.K2)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),q=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function U(t){return null!==t&&!(!q.test(t)||"_"===t[t.length-1])}function j(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,n.K2)(U,"resolveYamlFloat"),(0,n.K2)(j,"constructYamlFloat");var G=/^[-+]?[0-9]+e/;function Y(t,e){var r;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(h.isNegativeZero(t))return"-0.0";return r=t.toString(10),G.test(r)?r.replace("e",".e"):r}function W(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||h.isNegativeZero(t))}(0,n.K2)(Y,"representYamlFloat"),(0,n.K2)(W,"isFloat");var H=new T("tag:yaml.org,2002:float",{kind:"scalar",resolve:U,construct:j,predicate:W,represent:Y,defaultStyle:"lowercase"}),V=E.extend({implicit:[L,M,K,H]}),X=V,Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=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]))?))?$");function J(t){return null!==t&&(null!==Z.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,n,i,a,s,o,l,c=0,h=null;if(null===(e=Z.exec(t))&&(e=Q.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(r,n,i,a,s,o,c)),h&&l.setTime(l.getTime()-h),l}function et(t){return t.toISOString()}(0,n.K2)(J,"resolveYamlTimestamp"),(0,n.K2)(tt,"constructYamlTimestamp"),(0,n.K2)(et,"representYamlTimestamp");var rt=new T("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function nt(t){return"<<"===t||null===t}(0,n.K2)(nt,"resolveYamlMerge");var it=new T("tag:yaml.org,2002:merge",{kind:"scalar",resolve:nt}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function st(t){if(null===t)return!1;var e,r,n=0,i=t.length,a=at;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8==0}function ot(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=at,s=0,o=[];for(e=0;e>16&255),o.push(s>>8&255),o.push(255&s)),s=s<<6|a.indexOf(n.charAt(e));return 0===(r=i%4*6)?(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)):18===r?(o.push(s>>10&255),o.push(s>>2&255)):12===r&&o.push(s>>4&255),new Uint8Array(o)}function lt(t){var e,r,n="",i=0,a=t.length,s=at;for(e=0;e>18&63],n+=s[i>>12&63],n+=s[i>>6&63],n+=s[63&i]),i=(i<<8)+t[e];return 0===(r=a%3)?(n+=s[i>>18&63],n+=s[i>>12&63],n+=s[i>>6&63],n+=s[63&i]):2===r?(n+=s[i>>10&63],n+=s[i>>4&63],n+=s[i<<2&63],n+=s[64]):1===r&&(n+=s[i>>2&63],n+=s[i<<4&63],n+=s[64],n+=s[64]),n}function ct(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,n.K2)(st,"resolveYamlBinary"),(0,n.K2)(ot,"constructYamlBinary"),(0,n.K2)(lt,"representYamlBinary"),(0,n.K2)(ct,"isBinary");var ht=new T("tag:yaml.org,2002:binary",{kind:"scalar",resolve:st,construct:ot,predicate:ct,represent:lt}),ut=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,n,i,a,s=[],o=t;for(e=0,r=o.length;e>10),56320+(t-65536&1023))}(0,n.K2)(Dt,"_class"),(0,n.K2)(Nt,"is_EOL"),(0,n.K2)(It,"is_WHITE_SPACE"),(0,n.K2)(Mt,"is_WS_OR_EOL"),(0,n.K2)(Ot,"is_FLOW_INDICATOR"),(0,n.K2)(Pt,"fromHexCode"),(0,n.K2)($t,"escapedHexLen"),(0,n.K2)(Bt,"fromDecimalCode"),(0,n.K2)(Ft,"simpleEscapeSequence"),(0,n.K2)(zt,"charFromCodepoint");var Kt,qt=new Array(256),Ut=new Array(256);for(Kt=0;Kt<256;Kt++)qt[Kt]=Ft(Kt)?1:0,Ut[Kt]=Ft(Kt);function jt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||At,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 Gt(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=y(r),new p(e,r)}function Yt(t,e){throw Gt(t,e)}function Wt(t,e){t.onWarning&&t.onWarning.call(null,Gt(t,e))}(0,n.K2)(jt,"State$1"),(0,n.K2)(Gt,"generateError"),(0,n.K2)(Yt,"throwError"),(0,n.K2)(Wt,"throwWarning");var Ht={YAML:(0,n.K2)(function(t,e,r){var n,i,a;null!==t.version&&Yt(t,"duplication of %YAML directive"),1!==r.length&&Yt(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Yt(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&Yt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Wt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,n.K2)(function(t,e,r){var n,i;2!==r.length&&Yt(t,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],Rt.test(n)||Yt(t,"ill-formed tag handle (first argument) of the TAG directive"),_t.call(t.tagMap,n)&&Yt(t,'there is a previously declared suffix for "'+n+'" tag handle'),Lt.test(i)||Yt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(a){Yt(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i},"handleTagDirective")};function Vt(t,e,r,n){var i,a,s,o;if(e1&&(t.result+=h.repeat("\n",e-1))}function re(t,e,r){var n,i,a,s,o,l,c,h,u=t.kind,d=t.result;if(Mt(h=t.input.charCodeAt(t.position))||Ot(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)&&(Mt(n=t.input.charCodeAt(t.position+1))||r&&Ot(n)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,s=!1;0!==h;){if(58===h){if(Mt(n=t.input.charCodeAt(t.position+1))||r&&Ot(n))break}else if(35===h){if(Mt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&te(t)||r&&Ot(h))break;if(Nt(h)){if(o=t.line,l=t.lineStart,c=t.lineIndent,Jt(t,!1,-1),t.lineIndent>=e){s=!0,h=t.input.charCodeAt(t.position);continue}t.position=a,t.line=o,t.lineStart=l,t.lineIndent=c;break}}s&&(Vt(t,i,a,!1),ee(t,t.line-o),i=a=t.position,s=!1),It(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return Vt(t,i,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}function ne(t,e){var r,n,i;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Vt(t,n,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;n=t.position,t.position++,i=t.position}else Nt(r)?(Vt(t,n,i,!0),ee(t,Jt(t,!1,e)),n=i=t.position):t.position===t.lineStart&&te(t)?Yt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Yt(t,"unexpected end of the stream within a single quoted scalar")}function ie(t,e){var r,n,i,a,s,o;if(34!==(o=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return Vt(t,r,t.position,!0),t.position++,!0;if(92===o){if(Vt(t,r,t.position,!0),Nt(o=t.input.charCodeAt(++t.position)))Jt(t,!1,e);else if(o<256&&qt[o])t.result+=Ut[o],t.position++;else if((s=$t(o))>0){for(i=s,a=0;i>0;i--)(s=Pt(o=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:Yt(t,"expected hexadecimal character");t.result+=zt(a),t.position++}else Yt(t,"unknown escape sequence");r=n=t.position}else Nt(o)?(Vt(t,r,n,!0),ee(t,Jt(t,!1,e)),r=n=t.position):t.position===t.lineStart&&te(t)?Yt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Yt(t,"unexpected end of the stream within a double quoted scalar")}function ae(t,e){var r,n,i,a,s,o,l,c,h,u,d,p,f=!0,g=t.tag,m=t.anchor,y=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))s=93,c=!1,a=[];else{if(123!==p)return!1;s=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(Jt(t,!0,e),(p=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=g,t.anchor=m,t.kind=c?"mapping":"sequence",t.result=a,!0;f?44===p&&Yt(t,"expected the node content, but found ','"):Yt(t,"missed comma between flow collection entries"),d=null,o=l=!1,63===p&&Mt(t.input.charCodeAt(t.position+1))&&(o=l=!0,t.position++,Jt(t,!0,e)),r=t.line,n=t.lineStart,i=t.position,de(t,e,1,!1,!0),u=t.tag,h=t.result,Jt(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(o=!0,p=t.input.charCodeAt(++t.position),Jt(t,!0,e),de(t,e,1,!1,!0),d=t.result),c?Zt(t,a,y,u,h,d,r,n,i):o?a.push(Zt(t,null,y,u,h,d,r,n,i)):a.push(h),Jt(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}Yt(t,"unexpected end of the stream within a flow collection")}function se(t,e){var r,n,i,a,s=1,o=!1,l=!1,c=e,u=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))n=!1;else{if(62!==a)return!1;n=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===s?s=43===a?3:2:Yt(t,"repeat of a chomping mode identifier");else{if(!((i=Bt(a))>=0))break;0===i?Yt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Yt(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if(It(a)){do{a=t.input.charCodeAt(++t.position)}while(It(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Nt(a)&&0!==a)}for(;0!==a;){for(Qt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndentc&&(c=t.lineIndent),Nt(a))u++;else{if(t.lineIndente)&&0!==n)Yt(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(s=t.line,o=t.lineStart,l=t.position),de(t,e,4,!0,i)&&(y?g=t.result:m=t.result),y||(Zt(t,d,p,f,g,m,s,o,l),f=g=m=null),Jt(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)Yt(t,"bad indentation of a mapping entry");else if(t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&Yt(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)):Yt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function pe(t){var e,r,n,i,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(Jt(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(s=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Mt(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&Yt(t,"directive name must not be less than one character in length");0!==i;){for(;It(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!Nt(i));break}if(Nt(i))break;for(e=t.position;0!==i&&!Mt(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&Qt(t),_t.call(Ht,r)?Ht[r](t,r,n):Wt(t,'unknown document directive "'+r+'"')}Jt(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,Jt(t,!0,-1)):s&&Yt(t,"directives end mark is expected"),de(t,t.lineIndent-1,4,!1,!0),Jt(t,!0,-1),t.checkLineBreaks&&Ct.test(t.input.slice(a,t.position))&&Wt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&te(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Jt(t,!0,-1)):t.position=55296&&n<=56319&&e+1=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function $e(t){return/^\n* /.test(t)}(0,n.K2)(Ee,"State"),(0,n.K2)(Ce,"indentString"),(0,n.K2)(Se,"generateNextLine"),(0,n.K2)(Re,"testImplicitResolving"),(0,n.K2)(Le,"isWhitespace"),(0,n.K2)(De,"isPrintable"),(0,n.K2)(Ne,"isNsCharOrWhitespace"),(0,n.K2)(Ie,"isPlainSafe"),(0,n.K2)(Me,"isPlainSafeFirst"),(0,n.K2)(Oe,"isPlainSafeLast"),(0,n.K2)(Pe,"codePointAt"),(0,n.K2)($e,"needIndentIndicator");function Be(t,e,r,n,i,a,s,o){var l,c=0,h=null,u=!1,d=!1,p=-1!==n,f=-1,g=Me(Pe(t,0))&&Oe(Pe(t,t.length-1));if(e||s)for(l=0;l=65536?l+=2:l++){if(!De(c=Pe(t,l)))return 5;g=g&&Ie(c,h,o),h=c}else{for(l=0;l=65536?l+=2:l++){if(10===(c=Pe(t,l)))u=!0,p&&(d=d||l-f-1>n&&" "!==t[f+1],f=l);else if(!De(c))return 5;g=g&&Ie(c,h,o),h=c}d=d||p&&l-f-1>n&&" "!==t[f+1]}return u||d?r>9&&$e(t)?5:s?2===a?5:2:d?4:3:!g||s||i(t)?2===a?5:2:1}function Fe(t,e,r,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Te.indexOf(e)||ke.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),o=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),l=i||t.flowLevel>-1&&r>=t.flowLevel;function c(e){return Re(t,e)}switch((0,n.K2)(c,"testAmbiguity"),Be(e,l,t.indent,o,c,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+ze(e,t.indent)+Ke(Ce(e,s));case 4:return">"+ze(e,t.indent)+Ke(Ce(qe(e,o),s));case 5:return'"'+je(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function ze(t,e){var r=$e(t)?String(e):"",n="\n"===t[t.length-1];return r+(n&&("\n"===t[t.length-2]||"\n"===t)?"+":n?"":"-")+"\n"}function Ke(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function qe(t,e){for(var r,n,i,a=/(\n+)([^\n]*)/g,s=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,Ue(t.slice(0,r),e)),o="\n"===t[0]||" "===t[0];i=a.exec(t);){var l=i[1],c=i[2];n=" "===c[0],s+=l+(o||n||""===c?"":"\n")+Ue(c,e),o=n}return s}function Ue(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,s=0,o=0,l="";r=i.exec(t);)(o=r.index)-a>e&&(n=s>a?s:o,l+="\n"+t.slice(a,n),a=n+1),s=o;return l+="\n",t.length-a>e&&s>a?l+=t.slice(a,s)+"\n"+t.slice(s+1):l+=t.slice(a),l.slice(1)}function je(t){for(var e,r="",n=0,i=0;i=65536?i+=2:i++)n=Pe(t,i),!(e=we[n])&&De(n)?(r+=t[i],n>=65536&&(r+=t[i+1])):r+=e||_e(n);return r}function Ge(t,e,r){var n,i,a,s="",o=t.tag;for(n=0,i=r.length;n1024&&(o+="? "),o+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Xe(t,e,s,!1,!1)&&(l+=o+=t.dump));t.tag=c,t.dump="{"+l+"}"}function He(t,e,r,n){var i,a,s,o,l,c,h="",u=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(i=0,a=d.length;i1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Se(t,e)),Xe(t,e+1,o,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=u,t.dump=h||"{}"}function Ve(t,e,r){var n,i,a,s,o,l;for(a=0,s=(i=r?t.explicitTypes:t.implicitTypes).length;a tag resolver accepts not "'+l+'" style');n=o.represent[l](e,l)}t.dump=n}return!0}return!1}function Xe(t,e,r,n,i,a,s){t.tag=null,t.dump=r,Ve(t,r,!1)||Ve(t,r,!0);var o,l=ve.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var h,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(h=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(d&&u&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)n&&0!==Object.keys(t.dump).length?(He(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(We(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)n&&0!==t.dump.length?(t.noArrayIndent&&!s&&e>0?Ye(t,e-1,t.dump,i):Ye(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Ge(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Fe(t,t.dump,e,a,c)}null!==t.tag&&"?"!==t.tag&&(o=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),o="!"===t.tag[0]?"!"+o:"tag:yaml.org,2002:"===o.slice(0,18)?"!!"+o.slice(18):"!<"+o+">",t.dump=o+" "+t.dump)}return!0}function Ze(t,e){var r,n,i=[],a=[];for(Qe(t,i,a),r=0,n=a.length;ru,q7:()=>d,sO:()=>h});var n=r(5164),i=r(5894),a=r(3226),s=r(144),o=r(797),l={common:s.Y2,getConfig:s.zj,insertCluster:i.U,insertEdge:n.Jo,insertEdgeLabel:n.jP,insertMarkers:n.g0,insertNode:i.on,interpolateToCurve:a.Ib,labelHelper:i.Zk,log:o.Rm,positionEdgeLabel:n.T_},c={},h=(0,o.K2)(t=>{for(const e of t)c[e.name]=e},"registerLayoutLoaders");(0,o.K2)(()=>{h([{name:"dagre",loader:(0,o.K2)(async()=>await Promise.resolve().then(r.bind(r,1127)),"loader")},{name:"cose-bilkent",loader:(0,o.K2)(async()=>await Promise.resolve().then(r.bind(r,7928)),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,o.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in c))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=c[t.layoutAlgorithm];return(await r.loader()).render(t,e,l,{algorithm:r.algorithm})},"render"),d=(0,o.K2)((t="",{fallback:e="dagre"}={})=>{if(t in c)return t;if(e in c)return o.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},1152(t,e,r){"use strict";r.d(e,{P:()=>a});var n=r(144),i=r(797),a=(0,i.K2)((t,e,r,a)=>{t.attr("class",r);const{width:l,height:c,x:h,y:u}=s(t,e);(0,n.a$)(t,c,l,a);const d=o(h,u,l,c,e);t.attr("viewBox",d),i.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),s=(0,i.K2)((t,e)=>{const r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+2*e,height:r.height+2*e,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),o=(0,i.K2)((t,e,r,n,i)=>`${t-i} ${e-i} ${r} ${n}`,"createViewBox")},5164(t,e,r){"use strict";r.d(e,{IU:()=>v,Jo:()=>L,T_:()=>T,g0:()=>P,jP:()=>x});var n=r(8698),i=r(5894),a=r(3245),s=r(2387),o=r(607),l=r(3226),c=r(144),h=r(797),u=r(1444),d=r(2274),p=(0,h.K2)((t,e,r,n,i,a)=>{e.arrowTypeStart&&g(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&g(t,"end",e.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),f={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},g=(0,h.K2)((t,e,r,n,i,a,s)=>{const o=f[r];if(!o)return void h.Rm.warn(`Unknown arrow type: ${r}`);const l=`${i}_${a}-${o.type}${"start"===e?"Start":"End"}`;if(s&&""!==s.trim()){const r=`${l}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(l);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),o.fill&&t.setAttribute("fill",s)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${n}#${r})`)}else t.attr(`marker-${e}`,`url(${n}#${l})`)},"addEdgeMarker"),m=new Map,y=new Map,v=(0,h.K2)(()=>{m.clear(),y.clear()},"clear"),b=(0,h.K2)(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),x=(0,h.K2)(async(t,e)=>{let r=(0,c._3)((0,c.D7)().flowchart.htmlLabels);const{labelStyles:n}=(0,s.GX)(e);e.labelStyle=n;const a=await(0,o.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});h.Rm.info("abc82",e,e.labelType);const l=t.insert("g").attr("class","edgeLabel"),d=l.insert("g").attr("class","label").attr("data-id",e.id);d.node().appendChild(a);let p,f=a.getBBox();if(r){const t=a.children[0],e=(0,u.Ltv)(a);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}if(d.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),m.set(e.id,l),e.width=f.width,e.height=f.height,e.startLabelLeft){const r=await(0,i.DA)(e.startLabelLeft,b(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner");p=a.node().appendChild(r);const s=r.getBBox();a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),y.get(e.id)||y.set(e.id,{}),y.get(e.id).startLeft=n,w(p,e.startLabelLeft)}if(e.startLabelRight){const r=await(0,i.DA)(e.startLabelRight,b(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner");p=n.node().appendChild(r),a.node().appendChild(r);const s=r.getBBox();a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),y.get(e.id)||y.set(e.id,{}),y.get(e.id).startRight=n,w(p,e.startLabelRight)}if(e.endLabelLeft){const r=await(0,i.DA)(e.endLabelLeft,b(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner");p=a.node().appendChild(r);const s=r.getBBox();a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.node().appendChild(r),y.get(e.id)||y.set(e.id,{}),y.get(e.id).endLeft=n,w(p,e.endLabelLeft)}if(e.endLabelRight){const r=await(0,i.DA)(e.endLabelRight,b(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner");p=a.node().appendChild(r);const s=r.getBBox();a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.node().appendChild(r),y.get(e.id)||y.set(e.id,{}),y.get(e.id).endRight=n,w(p,e.endLabelRight)}return a},"insertEdgeLabel");function w(t,e){(0,c.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,h.K2)(w,"setTerminalWidth");var T=(0,h.K2)((t,e)=>{h.Rm.debug("Moving label abc88 ",t.id,t.label,m.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=(0,c.D7)(),{subGraphTitleTotalMargin:i}=(0,a.O)(n);if(t.label){const n=m.get(t.id);let a=t.x,s=t.y;if(r){const n=l._K.calcLabelPosition(r);h.Rm.debug("Moving label "+t.label+" from (",a,",",s,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(a=n.x,s=n.y)}n.attr("transform",`translate(${a}, ${s+i/2})`)}if(t.startLabelLeft){const e=y.get(t.id).startLeft;let n=t.x,i=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.startLabelRight){const e=y.get(t.id).startRight;let n=t.x,i=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelLeft){const e=y.get(t.id).endLeft;let n=t.x,i=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelRight){const e=y.get(t.id).endRight;let n=t.x,i=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),k=(0,h.K2)((t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),A=(0,h.K2)((t,e,r)=>{h.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2;let o=r.xMath.abs(n-e.x)*l){let t=r.y{h.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(t=>{if(h.Rm.info("abc88 checking point",t,e),k(e,t)||i)h.Rm.warn("abc88 outside",t,n),n=t,i||r.push(t);else{const a=A(e,n,t);h.Rm.debug("abc88 inside",t,n,a),h.Rm.debug("abc88 intersection",a,e);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?h.Rm.warn("abc88 no intersect",a,r):r.push(a),i=!0}}),h.Rm.debug("returning points",r),r},"cutPathAtIntersect");function E(t){const e=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}(0,h.K2)(E,"extractCornerPoints");var C=(0,h.K2)(function(t,e,r){const n=e.x-t.x,i=e.y-t.y,a=r/Math.sqrt(n*n+i*i);return{x:e.x-a*n,y:e.y-a*i}},"findAdjacentPoint"),S=(0,h.K2)(function(t){const{cornerPointPositions:e}=E(t),r=[];for(let n=0;n10&&Math.abs(i.y-e.y)>=10){h.Rm.debug("Corner point fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));const t=5;d=a.x===s.x?{x:l<0?s.x-t+u:s.x+t-u,y:c<0?s.y-u:s.y+u}:{x:l<0?s.x-u:s.x+u,y:c<0?s.y-t+u:s.y+t-u}}else h.Rm.debug("Corner point skipping fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));r.push(d,o)}else r.push(t[n]);return r},"fixCorners"),R=(0,h.K2)((t,e,r)=>{const n=t-e-r,i=Math.floor(n/4);return`0 ${e} ${Array(i).fill("2 2").join(" ")} ${r}`},"generateDashArray"),L=(0,h.K2)(function(t,e,r,i,a,o,f,g=!1){const{handDrawnSeed:m}=(0,c.D7)();let y=e.points,v=!1;const b=a;var x=o;const w=[];for(const n in e.cssCompiledStyles)(0,s.KX)(n)||w.push(e.cssCompiledStyles[n]);h.Rm.debug("UIO intersect check",e.points,x.x,b.x),x.intersect&&b.intersect&&!g&&(y=y.slice(1,e.points.length-1),y.unshift(b.intersect(y[0])),h.Rm.debug("Last point UIO",e.start,"--\x3e",e.end,y[y.length-1],x,x.intersect(y[y.length-1])),y.push(x.intersect(y[y.length-1])));const T=btoa(JSON.stringify(y));e.toCluster&&(h.Rm.info("to cluster abc88",r.get(e.toCluster)),y=_(e.points,r.get(e.toCluster).node),v=!0),e.fromCluster&&(h.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(y,null,2)),y=_(y.reverse(),r.get(e.fromCluster).node).reverse(),v=!0);let k=y.filter(t=>!Number.isNaN(t.y));k=S(k);let A=u.qrM;switch(A=u.lUB,e.curve){case"linear":A=u.lUB;break;case"basis":default:A=u.qrM;break;case"cardinal":A=u.y8u;break;case"bumpX":A=u.Wi0;break;case"bumpY":A=u.PGM;break;case"catmullRom":A=u.oDi;break;case"monotoneX":A=u.nVG;break;case"monotoneY":A=u.uxU;break;case"natural":A=u.Xf2;break;case"step":A=u.GZz;break;case"stepAfter":A=u.UPb;break;case"stepBefore":A=u.dyv}const{x:E,y:C}=(0,n.RI)(e),L=(0,u.n8j)().x(E).y(C).curve(A);let N,M;switch(e.thickness){case"normal":default:N="edge-thickness-normal";break;case"thick":N="edge-thickness-thick";break;case"invisible":N="edge-thickness-invisible"}switch(e.pattern){case"solid":default:N+=" edge-pattern-solid";break;case"dotted":N+=" edge-pattern-dotted";break;case"dashed":N+=" edge-pattern-dashed"}let O="rounded"===e.curve?D(I(k,e),5):L(k);const P=Array.isArray(e.style)?e.style:[e.style];let $=P.find(t=>t?.startsWith("stroke:")),B=!1;if("handDrawn"===e.look){const r=d.A.svg(t);Object.assign([],k);const n=r.path(O,{roughness:.3,seed:m});N+=" transition",M=(0,u.Ltv)(n).select("path").attr("id",e.id).attr("class"," "+N+(e.classes?" "+e.classes:"")).attr("style",P?P.reduce((t,e)=>t+";"+e,""):"");let i=M.attr("d");M.attr("d",i),t.node().appendChild(M.node())}else{const r=w.join(";"),i=P?P.reduce((t,e)=>t+e+";",""):"";let a="";e.animate&&(a=" edge-animation-fast"),e.animation&&(a=" edge-animation-"+e.animation);const s=(r?r+";"+i+";":i)+";"+(P?P.reduce((t,e)=>t+";"+e,""):"");M=t.append("path").attr("d",O).attr("id",e.id).attr("class"," "+N+(e.classes?" "+e.classes:"")+(a??"")).attr("style",s),$=s.match(/stroke:([^;]+)/)?.[1],B=!0===e.animate||!!e.animation||r.includes("animation");const o=M.node(),l="function"==typeof o.getTotalLength?o.getTotalLength():0,c=n.Nq[e.arrowTypeStart]||0,h=n.Nq[e.arrowTypeEnd]||0;if("neo"===e.look&&!B){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?R(l,c,h):`0 ${c} ${l-c-h} ${h}`}; stroke-dashoffset: 0;`;M.attr("style",t+M.attr("style"))}}M.attr("data-edge",!0),M.attr("data-et","edge"),M.attr("data-id",e.id),M.attr("data-points",T),e.showPoints&&k.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let F="";((0,c.D7)().flowchart.arrowMarkerAbsolute||(0,c.D7)().state.arrowMarkerAbsolute)&&(F=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,F=F.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.Rm.info("arrowTypeStart",e.arrowTypeStart),h.Rm.info("arrowTypeEnd",e.arrowTypeEnd),p(M,e,F,f,i,$);const z=y[Math.floor(y.length/2)];l._K.isLabelCoordinateInPath(z,M.attr("d"))||(v=!0);let K={};return v&&(K.updatedPath=y),K.originalPath=e.points,K},"insertEdge");function D(t,e){if(t.length<2)return"";let r="";const n=t.length,i=1e-5;for(let a=0;a({...t}));if(t.length>=2&&n.hq[e.arrowTypeStart]){const i=n.hq[e.arrowTypeStart],a=t[0],s=t[1],{angle:o}=N(a,s),l=i*Math.cos(o),c=i*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const i=t.length;if(i>=2&&n.hq[e.arrowTypeEnd]){const a=n.hq[e.arrowTypeEnd],s=t[i-1],o=t[i-2],{angle:l}=N(o,s),c=a*Math.cos(l),h=a*Math.sin(l);r[i-1].x=s.x-c,r[i-1].y=s.y-h}return r}(0,h.K2)(D,"generateRoundedPath"),(0,h.K2)(N,"calculateDeltaAndAngle"),(0,h.K2)(I,"applyMarkerOffsetsToPoints");var M=(0,h.K2)((t,e,r,n)=>{e.forEach(e=>{O[e](t,r,n)})},"insertMarkers"),O={extension:(0,h.K2)((t,e,r)=>{h.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,h.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,h.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,h.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:(0,h.K2)((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:(0,h.K2)((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),requirement_contains:(0,h.K2)((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},P=M},2938(t,e,r){"use strict";r.d(e,{m:()=>i});var n=r(797),i=class{constructor(t){this.init=t,this.records=this.init()}static{(0,n.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},3226(t,e,r){"use strict";r.d(e,{$C:()=>S,$t:()=>j,C4:()=>Y,I5:()=>U,Ib:()=>m,KL:()=>V,Sm:()=>W,Un:()=>P,_K:()=>G,bH:()=>I,dq:()=>K,pe:()=>c,rY:()=>H,ru:()=>O,sM:()=>E,vU:()=>f,yT:()=>L});var n=r(144),i=r(797),a=r(6750),s=r(1444),o=r(6632),l=r(7222),c="​",h={curveBasis:s.qrM,curveBasisClosed:s.Yu4,curveBasisOpen:s.IA3,curveBumpX:s.Wi0,curveBumpY:s.PGM,curveBundle:s.OEq,curveCardinalClosed:s.olC,curveCardinalOpen:s.IrU,curveCardinal:s.y8u,curveCatmullRomClosed:s.Q7f,curveCatmullRomOpen:s.cVp,curveCatmullRom:s.oDi,curveLinear:s.lUB,curveLinearClosed:s.Lx9,curveMonotoneX:s.nVG,curveMonotoneY:s.uxU,curveNatural:s.Xf2,curveStep:s.GZz,curveStepAfter:s.UPb,curveStepBefore:s.dyv},u=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,d=(0,i.K2)(function(t,e){const r=p(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,n.$i)(t),i=(0,n.hH)(i,[...t])}else i=r.args;if(!i)return;let a=(0,n.Ch)(t,e);const s="config";return void 0!==i[s]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),p=(0,i.K2)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${u.source})(?=[}][%]{2}).*\n`,"ig");let a;t=t.trim().replace(r,"").replace(/'/gm,'"'),i.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const s=[];for(;null!==(a=n.DB.exec(t));)if(a.index===n.DB.lastIndex&&n.DB.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const t=a[1]?a[1]:a[2],e=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;s.push({type:t,args:e})}return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}catch(r){return i.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),f=(0,i.K2)(function(t){return t.replace(n.DB,"")},"removeDirectives"),g=(0,i.K2)(function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");function m(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return h[r]??e}function y(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,a.J)(r):r}(0,i.K2)(m,"interpolateToCurve"),(0,i.K2)(y,"formatUrl");var v=(0,i.K2)((t,...e)=>{const r=t.split("."),n=r.length-1,a=r[n];let s=window;for(let o=0;o{r+=b(t,e),e=t});return k(t,r/2)}function w(t){return 1===t.length?t[0]:x(t)}(0,i.K2)(b,"distance"),(0,i.K2)(x,"traverseEdge"),(0,i.K2)(w,"calcLabelPosition");var T=(0,i.K2)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),k=(0,i.K2)((t,e)=>{let r,n=e;for(const i of t){if(r){const t=b(i,r);if(0===t)return r;if(t=1)return{x:i.x,y:i.y};if(e>0&&e<1)return{x:T((1-e)*r.x+e*i.x,5),y:T((1-e)*r.y+e*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),A=(0,i.K2)((t,e,r)=>{i.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=k(e,25),a=t?10:5,s=Math.atan2(e[0].y-n.y,e[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(e[0].x+n.x)/2,o.y=-Math.cos(s)*a+(e[0].y+n.y)/2,o},"calcCardinalityPosition");function _(t,e,r){const n=structuredClone(r);i.Rm.info("our points",n),"start_left"!==e&&"start_right"!==e&&n.reverse();const a=k(n,25+t),s=10+.5*t,o=Math.atan2(n[0].y-a.y,n[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(o+Math.PI)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(n[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(o-Math.PI)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(n[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(o)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2),l}function E(t){let e="",r="";for(const n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}(0,i.K2)(_,"calcTerminalLabelPosition"),(0,i.K2)(E,"getStylesFromArray");var C=0,S=(0,i.K2)(()=>(C++,"id-"+Math.random().toString(36).substr(2,12)+"-"+C),"generateId");function R(t){let e="";const r="0123456789abcdef";for(let n=0;nR(t.length),"random"),D=(0,i.K2)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),N=(0,i.K2)(function(t,e){const r=e.text.replace(n.Y2.lineBreakRegex," "),[,i]=U(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const s=a.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.attr("fill",e.fill),s.text(r),a},"drawSimpleText"),I=(0,o.A)((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
    "},r),n.Y2.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),a=[];let s="";return i.forEach((t,n)=>{const o=P(`${t} `,r),l=P(s,r);if(o>e){const{hyphenatedStrings:n,remainingWord:i}=M(t,e,"-",r);a.push(s,...n),s=i}else l+o>=e?(a.push(s),s=t):s=[s,t].filter(Boolean).join(" ");n+1===i.length&&a.push(s)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),M=(0,o.A)((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],a=[];let s="";return i.forEach((t,o)=>{const l=`${s}${t}`;if(P(l,n)>=e){const t=o+1,e=i.length===t,n=`${l}${r}`;a.push(e?l:n),s=""}else s=l}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function O(t,e){return B(t,e).height}function P(t,e){return B(t,e).width}(0,i.K2)(O,"calculateTextHeight"),(0,i.K2)(P,"calculateTextWidth");var $,B=(0,o.A)((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,o]=U(r),l=["sans-serif",i],h=t.split(n.Y2.lineBreakRegex),u=[],d=(0,s.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const n of l){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of h){const i=D();i.text=r||c;const s=N(p,i).style("font-size",o).style("font-weight",a).style("font-family",n),l=(s._groups||s)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}u.push(e)}p.remove();return u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),F=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,i.K2)(this,"InitIDGenerator")}},z=(0,i.K2)(function(t){return $=$||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$.innerHTML=t,unescape($.textContent)},"entityDecode");function K(t){return"str"in t}(0,i.K2)(K,"isDetailedError");var q=(0,i.K2)((t,e,r,n)=>{if(!n)return;const i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),U=(0,i.K2)(t=>{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]},"parseFontSize");function j(t,e){return(0,l.A)({},t,e)}(0,i.K2)(j,"cleanAndMerge");var G={assignWithDepth:n.hH,wrapLabel:I,calculateTextHeight:O,calculateTextWidth:P,calculateTextDimensions:B,cleanAndMerge:j,detectInit:d,detectDirective:p,isSubstringInArray:g,interpolateToCurve:m,calcLabelPosition:w,calcCardinalityPosition:A,calcTerminalLabelPosition:_,formatUrl:y,getStylesFromArray:E,generateId:S,random:L,runFunc:v,entityDecode:z,insertTitle:q,isLabelCoordinateInPath:X,parseFontSize:U,InitIDGenerator:F},Y=(0,i.K2)(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)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),W=(0,i.K2)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),H=(0,i.K2)((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");function V(t){return t??null}function X(t,e){const r=Math.round(t.x),n=Math.round(t.y),i=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return i.includes(r.toString())||i.includes(n.toString())}(0,i.K2)(V,"handleUndefinedAttr"),(0,i.K2)(X,"isLabelCoordinateInPath")},2875(t,e,r){"use strict";r.d(e,{CP:()=>h,HT:()=>d,PB:()=>u,aC:()=>c,lC:()=>o,m:()=>l,tk:()=>s});var n=r(144),i=r(797),a=r(6750),s=(0,i.K2)((t,e)=>{const r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(const n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),o=(0,i.K2)((t,e)=>{const r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};s(t,r).lower()},"drawBackgroundRect"),l=(0,i.K2)((t,e)=>{const r=e.text.replace(n.H1," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class&&i.attr("class",e.class);const a=i.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(r),i},"drawText"),c=(0,i.K2)((t,e,r,n)=>{const i=t.append("image");i.attr("x",e),i.attr("y",r);const s=(0,a.J)(n);i.attr("xlink:href",s)},"drawImage"),h=(0,i.K2)((t,e,r,n)=>{const i=t.append("use");i.attr("x",e),i.attr("y",r);const s=(0,a.J)(n);i.attr("xlink:href",`#${s}`)},"drawEmbeddedImage"),u=(0,i.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),d=(0,i.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")},9510(t,e,r){"use strict";r.d(e,{diagram:()=>a});var n=r(1746),i=(r(2501),r(9625),r(1152),r(45),r(5164),r(8698),r(5894),r(3245),r(2387),r(607),r(3226),r(144),r(797)),a={parser:n._$,get db(){return new n.NM},renderer:n.Lh,styles:n.tM,init:(0,i.K2)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},3815(t,e,r){"use strict";r.d(e,{diagram:()=>a});var n=r(1746),i=(r(2501),r(9625),r(1152),r(45),r(5164),r(8698),r(5894),r(3245),r(2387),r(607),r(3226),r(144),r(797)),a={parser:n._$,get db(){return new n.NM},renderer:n.Lh,styles:n.tM,init:(0,i.K2)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},7928(t,e,r){"use strict";r.r(e),r.d(e,{render:()=>f});var n=r(797),i=r(165),a=r(3457),s=r(1444);function o(t,e){t.forEach(t=>{const r={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(r[e]=t[e])}),e.add({group:"nodes",data:r,position:{x:t.x??0,y:t.y??0}})})}function l(t,e){t.forEach(t=>{const r={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(r[e]=t[e])}),e.add({group:"edges",data:r})})}function c(t){return new Promise(e=>{const r=(0,s.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),a=(0,i.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),o(t.nodes,a),l(t.edges,a),a.nodes().forEach(function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}});a.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),a.ready(t=>{n.Rm.info("Cytoscape ready",t),e(a)})})}function h(t){return t.nodes().map(t=>{const e=t.data(),r=t.position(),n={id:e.id,x:r.x,y:r.y};return Object.keys(e).forEach(t=>{"id"!==t&&(n[t]=e[t])}),n})}function u(t){return t.edges().map(t=>{const e=t.data(),r=t._private.rscratch,n={id:e.id,source:e.source,target:e.target,startX:r.startX,startY:r.startY,midX:r.midX,midY:r.midY,endX:r.endX,endY:r.endY};return Object.keys(e).forEach(t=>{["id","source","target"].includes(t)||(n[t]=e[t])}),n})}async function d(t,e){n.Rm.debug("Starting cose-bilkent layout algorithm");try{p(t);const e=await c(t),r=h(e),i=u(e);return n.Rm.debug(`Layout completed: ${r.length} nodes, ${i.length} edges`),{nodes:r,edges:i}}catch(r){throw n.Rm.error("Error in cose-bilkent layout algorithm:",r),r}}function p(t){if(!t)throw new Error("Layout data is required");if(!t.config)throw new Error("Configuration is required in layout data");if(!t.rootNode)throw new Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw new Error("Edges array is required in layout data");return!0}i.A.use(a),(0,n.K2)(o,"addNodes"),(0,n.K2)(l,"addEdges"),(0,n.K2)(c,"createCytoscapeInstance"),(0,n.K2)(h,"extractPositionedNodes"),(0,n.K2)(u,"extractPositionedEdges"),(0,n.K2)(d,"executeCoseBilkentLayout"),(0,n.K2)(p,"validateLayoutData");var f=(0,n.K2)(async(t,e,{insertCluster:r,insertEdge:n,insertEdgeLabel:i,insertMarkers:a,insertNode:s,log:o,positionEdgeLabel:l},{algorithm:c})=>{const h={},u={},p=e.select("g");a(p,t.markers,t.type,t.diagramId);const f=p.insert("g").attr("class","subgraphs"),g=p.insert("g").attr("class","edgePaths"),m=p.insert("g").attr("class","edgeLabels"),y=p.insert("g").attr("class","nodes");o.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(t.nodes.map(async e=>{if(e.isGroup){const t={...e};u[e.id]=t,h[e.id]=t,await r(f,e)}else{const r={...e};h[e.id]=r;const n=await s(y,e,{config:t.config,dir:t.direction||"TB"}),i=n.node().getBBox();r.width=i.width,r.height=i.height,r.domId=n,o.debug(`Node ${e.id} dimensions: ${i.width}x${i.height}`)}})),o.debug("Running cose-bilkent layout algorithm");const v={...t,nodes:t.nodes.map(t=>{const e=h[t.id];return{...t,width:e.width,height:e.height}})},b=await d(v,t.config);o.debug("Positioning nodes based on layout results"),b.nodes.forEach(t=>{const e=h[t.id];e?.domId&&(e.domId.attr("transform",`translate(${t.x}, ${t.y})`),e.x=t.x,e.y=t.y,o.debug(`Positioned node ${e.id} at center (${t.x}, ${t.y})`))}),b.edges.forEach(e=>{const r=t.edges.find(t=>t.id===e.id);r&&(r.points=[{x:e.startX,y:e.startY},{x:e.midX,y:e.midY},{x:e.endX,y:e.endY}])}),o.debug("Inserting and positioning edges"),await Promise.all(t.edges.map(async e=>{await i(m,e);const r=h[e.start??""],a=h[e.end??""];if(r&&a){const i=b.edges.find(t=>t.id===e.id);if(i){o.debug("APA01 positionedEdge",i);const s={...e},c=n(g,s,u,t.type,r,a,t.diagramId);l(s,c)}else{const i={...e,points:[{x:r.x||0,y:r.y||0},{x:a.x||0,y:a.y||0}]},s=n(g,i,u,t.type,r,a,t.diagramId);l(i,s)}}})),o.debug("Cose-bilkent rendering completed")},"render")},1127(t,e,r){"use strict";r.r(e),r.d(e,{render:()=>N});var n=r(5164),i=(r(8698),r(5894)),a=r(3245),s=(r(2387),r(607),r(3226),r(144)),o=r(797),l=r(567),c=r(9592),h=r(53),u=r(4722);r(1471);function d(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:p(t),edges:f(t)};return c.A(t.graph())||(e.value=h.A(t.graph())),e}function p(t){return u.A(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return c.A(r)||(i.value=r),c.A(n)||(i.parent=n),i})}function f(t){return u.A(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return c.A(e.name)||(n.name=e.name),c.A(r)||(n.value=r),n})}var g=r(697),m=new Map,y=new Map,v=new Map,b=(0,o.K2)(()=>{y.clear(),v.clear(),m.clear()},"clear"),x=(0,o.K2)((t,e)=>{const r=y.get(e)||[];return o.Rm.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),w=(0,o.K2)((t,e)=>{const r=y.get(e)||[];return o.Rm.info("Descendants of ",e," is ",r),o.Rm.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||x(t.v,e)||x(t.w,e)||r.includes(t.w):(o.Rm.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),T=(0,o.K2)((t,e,r,n)=>{o.Rm.warn("Copying children of ",t,"root",n,"data",e.node(t),n);const i=e.children(t)||[];t!==n&&i.push(t),o.Rm.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(i=>{if(e.children(i).length>0)T(i,e,r,n);else{const a=e.node(i);o.Rm.info("cp ",i," to ",n," with parent ",t),r.setNode(i,a),n!==e.parent(i)&&(o.Rm.warn("Setting parent",i,e.parent(i)),r.setParent(i,e.parent(i))),t!==n&&i!==t?(o.Rm.debug("Setting parent",i,t),r.setParent(i,t)):(o.Rm.info("In copy ",t,"root",n,"data",e.node(t),n),o.Rm.debug("Not Setting parent for node=",i,"cluster!==rootId",t!==n,"node!==clusterId",i!==t));const s=e.edges(i);o.Rm.debug("Copying Edges",s),s.forEach(i=>{o.Rm.info("Edge",i);const a=e.edge(i.v,i.w,i.name);o.Rm.info("Edge data",a,n);try{w(i,n)?(o.Rm.info("Copying as ",i.v,i.w,a,i.name),r.setEdge(i.v,i.w,a,i.name),o.Rm.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):o.Rm.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",n," clusterId:",t)}catch(s){o.Rm.error(s)}})}o.Rm.debug("Removing node",i),e.removeNode(i)})},"copy"),k=(0,o.K2)((t,e)=>{const r=e.children(t);let n=[...r];for(const i of r)v.set(i,t),n=[...n,...k(i,e)];return n},"extractDescendants"),A=(0,o.K2)((t,e,r)=>{const n=t.edges().filter(t=>t.v===e||t.w===e),i=t.edges().filter(t=>t.v===r||t.w===r),a=n.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),s=i.map(t=>({v:t.v,w:t.w}));return a.filter(t=>s.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),_=(0,o.K2)((t,e,r)=>{const n=e.children(t);if(o.Rm.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(const a of n){const t=_(a,e,r),n=A(e,r,t);if(t){if(!(n.length>0))return t;i=t}}return i},"findNonClusterChild"),E=(0,o.K2)(t=>m.has(t)&&m.get(t).externalConnections&&m.has(t)?m.get(t).id:t,"getAnchorId"),C=(0,o.K2)((t,e)=>{if(!t||e>10)o.Rm.debug("Opting out, no graph ");else{o.Rm.debug("Opting in, graph "),t.nodes().forEach(function(e){t.children(e).length>0&&(o.Rm.warn("Cluster identified",e," Replacement id in edges: ",_(e,t,e)),y.set(e,k(e,t)),m.set(e,{id:_(e,t,e),clusterData:t.node(e)}))}),t.nodes().forEach(function(e){const r=t.children(e),n=t.edges();r.length>0?(o.Rm.debug("Cluster identified",e,y),n.forEach(t=>{x(t.v,e)^x(t.w,e)&&(o.Rm.warn("Edge: ",t," leaves cluster ",e),o.Rm.warn("Descendants of XXX ",e,": ",y.get(e)),m.get(e).externalConnections=!0)})):o.Rm.debug("Not a cluster ",e,y)});for(let e of m.keys()){const r=m.get(e).id,n=t.parent(r);n!==e&&m.has(n)&&!m.get(n).externalConnections&&(m.get(e).id=n)}t.edges().forEach(function(e){const r=t.edge(e);o.Rm.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),o.Rm.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let n=e.v,i=e.w;if(o.Rm.warn("Fix XXX",m,"ids:",e.v,e.w,"Translating: ",m.get(e.v)," --- ",m.get(e.w)),m.get(e.v)||m.get(e.w)){if(o.Rm.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),n=E(e.v),i=E(e.w),t.removeEdge(e.v,e.w,e.name),n!==e.v){const i=t.parent(n);m.get(i).externalConnections=!0,r.fromCluster=e.v}if(i!==e.w){const n=t.parent(i);m.get(n).externalConnections=!0,r.toCluster=e.w}o.Rm.warn("Fix Replacing with XXX",n,i,e.name),t.setEdge(n,i,r,e.name)}}),o.Rm.warn("Adjusted Graph",d(t)),S(t,0),o.Rm.trace(m)}},"adjustClustersAndEdges"),S=(0,o.K2)((t,e)=>{if(o.Rm.warn("extractor - ",e,d(t),t.children("D")),e>10)return void o.Rm.error("Bailing out");let r=t.nodes(),n=!1;for(const i of r){const e=t.children(i);n=n||e.length>0}if(n){o.Rm.debug("Nodes = ",r,e);for(const n of r)if(o.Rm.debug("Extracting node",n,m,m.has(n)&&!m.get(n).externalConnections,!t.parent(n),t.node(n),t.children("D")," Depth ",e),m.has(n))if(!m.get(n).externalConnections&&t.children(n)&&t.children(n).length>0){o.Rm.warn("Cluster without external connections, without a parent and with children",n,e);let r="TB"===t.graph().rankdir?"LR":"TB";m.get(n)?.clusterData?.dir&&(r=m.get(n).clusterData.dir,o.Rm.warn("Fixing dir",m.get(n).clusterData.dir,r));const i=new g.T({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});o.Rm.warn("Old graph before copy",d(t)),T(n,t,i,n),t.setNode(n,{clusterNode:!0,id:n,clusterData:m.get(n).clusterData,label:m.get(n).label,graph:i}),o.Rm.warn("New graph after copy node: (",n,")",d(i)),o.Rm.debug("Old graph after copy",d(t))}else o.Rm.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!m.get(n).externalConnections," no parent: ",!t.parent(n)," children ",t.children(n)&&t.children(n).length>0,t.children("D"),e),o.Rm.debug(m);else o.Rm.debug("Not a cluster",n,e);r=t.nodes(),o.Rm.warn("New list of nodes",r);for(const n of r){const r=t.node(n);o.Rm.warn(" Now next level",n,r),r?.clusterNode&&S(r.graph,e+1)}}else o.Rm.debug("Done, no node has children",t.nodes())},"extractor"),R=(0,o.K2)((t,e)=>{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{const n=t.children(e),i=R(t,n);r=[...r,...i]}),r},"sorter"),L=(0,o.K2)(t=>R(t,t.children()),"sortNodesByHierarchy"),D=(0,o.K2)(async(t,e,r,s,c,h)=>{o.Rm.warn("Graph in recursive render:XAX",d(e),c);const u=e.graph().rankdir;o.Rm.trace("Dir in recursive render - dir:",u);const p=t.insert("g").attr("class","root");e.nodes()?o.Rm.info("Recursive render XXX",e.nodes()):o.Rm.info("No nodes found for",e),e.edges().length>0&&o.Rm.info("Recursive edges",e.edge(e.edges()[0]));const f=p.insert("g").attr("class","clusters"),g=p.insert("g").attr("class","edgePaths"),y=p.insert("g").attr("class","edgeLabels"),v=p.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(t){const n=e.node(t);if(void 0!==c){const r=JSON.parse(JSON.stringify(c.clusterData));o.Rm.trace("Setting data for parent cluster XXX\n Node.id = ",t,"\n data=",r.height,"\nParent cluster",c.height),e.setNode(c.id,r),e.parent(t)||(o.Rm.trace("Setting parent",t,c.id),e.setParent(t,c.id,r))}if(o.Rm.info("(Insert) Node XXX"+t+": "+JSON.stringify(e.node(t))),n?.clusterNode){o.Rm.info("Cluster identified XBX",t,n.width,e.node(t));const{ranksep:a,nodesep:l}=e.graph();n.graph.setGraph({...n.graph.graph(),ranksep:a+25,nodesep:l});const c=await D(v,n.graph,r,s,e.node(t),h),u=c.elem;(0,i.lC)(n,u),n.diff=c.diff||0,o.Rm.info("New compound node after recursive render XAX",t,"width",n.width,"height",n.height),(0,i.U7)(u,n)}else e.children(t).length>0?(o.Rm.trace("Cluster - the non recursive path XBX",t,n.id,n,n.width,"Graph:",e),o.Rm.trace(_(n.id,e)),m.set(n.id,{id:_(n.id,e),node:n})):(o.Rm.trace("Node - the non recursive path XAX",t,v,e.node(t),u),await(0,i.on)(v,e.node(t),{config:h,dir:u}))}));const b=(0,o.K2)(async()=>{const t=e.edges().map(async function(t){const r=e.edge(t.v,t.w,t.name);o.Rm.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.Rm.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(e.edge(t))),o.Rm.info("Fix",m,"ids:",t.v,t.w,"Translating: ",m.get(t.v),m.get(t.w)),await(0,n.jP)(y,r)});await Promise.all(t)},"processEdges");await b(),o.Rm.info("Graph before layout:",JSON.stringify(d(e))),o.Rm.info("############################################# XXX"),o.Rm.info("### Layout ### XXX"),o.Rm.info("############################################# XXX"),(0,l.Zp)(e),o.Rm.info("Graph after layout:",JSON.stringify(d(e)));let x=0,{subGraphTitleTotalMargin:w}=(0,a.O)(h);return await Promise.all(L(e).map(async function(t){const r=e.node(t);if(o.Rm.info("Position XBX => "+t+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode)r.y+=w,o.Rm.info("A tainted cluster node XBX1",t,r.id,r.width,r.height,r.x,r.y,e.parent(t)),m.get(r.id).node=r,(0,i.U_)(r);else if(e.children(t).length>0){o.Rm.info("A pure cluster node XBX1",t,r.id,r.x,r.y,r.width,r.height,e.parent(t)),r.height+=w,e.node(r.parentId);const n=r?.padding/2||0,a=r?.labelBBox?.height||0,s=a-n||0;o.Rm.debug("OffsetY",s,"labelHeight",a,"halfPadding",n),await(0,i.U)(f,r),m.get(r.id).node=r}else{const t=e.node(r.parentId);r.y+=w/2,o.Rm.info("A regular node XBX1 - using the padding",r.id,"parent",r.parentId,r.width,r.height,r.x,r.y,"offsetY",r.offsetY,"parent",t,t?.offsetY,r),(0,i.U_)(r)}})),e.edges().forEach(function(t){const i=e.edge(t);o.Rm.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i),i),i.points.forEach(t=>t.y+=w/2);const a=e.node(t.v);var l=e.node(t.w);const c=(0,n.Jo)(g,i,m,r,a,l,s);(0,n.T_)(i,c)}),e.nodes().forEach(function(t){const r=e.node(t);o.Rm.info(t,r.type,r.diff),r.isGroup&&(x=r.diff)}),o.Rm.warn("Returning from recursive render XAX",p,x),{elem:p,diff:x}},"recursiveRender"),N=(0,o.K2)(async(t,e)=>{const r=new g.T({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=e.select("g");(0,n.g0)(a,t.markers,t.type,t.diagramId),(0,i.gh)(),(0,n.IU)(),(0,i.IU)(),b(),t.nodes.forEach(t=>{r.setNode(t.id,{...t}),t.parentId&&r.setParent(t.id,t.parentId)}),o.Rm.debug("Edges:",t.edges),t.edges.forEach(t=>{if(t.start===t.end){const e=t.start,n=e+"---"+e+"---1",i=e+"---"+e+"---2",a=r.node(e);r.setNode(n,{domId:n,id:n,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(n,a.parentId),r.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(i,a.parentId);const s=structuredClone(t),o=structuredClone(t),l=structuredClone(t);s.label="",s.arrowTypeEnd="none",s.id=e+"-cyclic-special-1",o.arrowTypeStart="none",o.arrowTypeEnd="none",o.id=e+"-cyclic-special-mid",l.label="",a.isGroup&&(s.fromCluster=e,l.toCluster=e),l.id=e+"-cyclic-special-2",l.arrowTypeStart="none",r.setEdge(e,n,s,e+"-cyclic-special-0"),r.setEdge(n,i,o,e+"-cyclic-special-1"),r.setEdge(i,e,l,e+"-cycw});var n=r(3590),i=r(1152),a=r(2387),s=r(5871),o=r(3226),l=r(144),c=r(797),h=r(8731),u=r(1444),d=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=l.SV,this.getAccTitle=l.iN,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.getAccDescription=l.m7,this.setAccDescription=l.EI}static{(0,c.K2)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const t=l.UI,e=(0,l.zj)();return(0,o.$t)({...t.treemap,...e.treemap??{}})}addNode(t,e){this.nodes.push(t),this.levels.set(t,e),0===e&&(this.outerNodes.push(t),this.root??=t)}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,e){const r=this.classes.get(t)??{id:t,styles:[],textStyles:[]},n=e.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(t=>{(0,a.KX)(t)&&(r?.textStyles?r.textStyles.push(t):r.textStyles=[t]),r?.styles?r.styles.push(t):r.styles=[t]}),this.classes.set(t,r)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){(0,l.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function p(t){if(!t.length)return[];const e=[],r=[];return t.forEach(t=>{const n={name:t.name,children:"Leaf"===t.type?void 0:[]};for(n.classSelector=t?.classSelector,t?.cssCompiledStyles&&(n.cssCompiledStyles=[t.cssCompiledStyles]),"Leaf"===t.type&&void 0!==t.value&&(n.value=t.value);r.length>0&&r[r.length-1].level>=t.level;)r.pop();if(0===r.length)e.push(n);else{const t=r[r.length-1].node;t.children?t.children.push(n):t.children=[n]}"Leaf"!==t.type&&r.push({node:n,level:t.level})}),e}(0,c.K2)(p,"buildHierarchy");var f=(0,c.K2)((t,e)=>{(0,s.S)(t,e);const r=[];for(const a of t.TreemapRows??[])"ClassDefStatement"===a.$type&&e.addClass(a.className??"",a.styleText??"");for(const a of t.TreemapRows??[]){const t=a.item;if(!t)continue;const n=a.indent?parseInt(a.indent):0,i=g(t),s=t.classSelector?e.getStylesForClass(t.classSelector):[],o=s.length>0?s.join(";"):void 0,l={level:n,name:i,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:o};r.push(l)}const n=p(r),i=(0,c.K2)((t,r)=>{for(const n of t)e.addNode(n,r),n.children&&n.children.length>0&&i(n.children,r+1)},"addNodesRecursively");i(n,0)},"populate"),g=(0,c.K2)(t=>t.name?String(t.name):"","getItemName"),m={parser:{yy:void 0},parse:(0,c.K2)(async t=>{try{const e=h.qg,r=await e("treemap",t);c.Rm.debug("Treemap AST:",r);const n=m.parser?.yy;if(!(n instanceof d))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(r,n)}catch(e){throw c.Rm.error("Error parsing treemap:",e),e}},"parse")},y=10,v={draw:(0,c.K2)((t,e,r,s)=>{const o=s.db,h=o.getConfig(),d=h.padding??10,p=o.getDiagramTitle(),f=o.getRoot(),{themeVariables:g}=(0,l.zj)();if(!f)return;const m=p?30:0,v=(0,n.D)(e),b=h.nodeWidth?h.nodeWidth*y:960,x=h.nodeHeight?h.nodeHeight*y:500,w=b,T=x+m;let k;v.attr("viewBox",`0 0 ${w} ${T}`),(0,l.a$)(v,T,w,h.useMaxWidth);try{const t=h.valueFormat||",";if("$0,0"===t)k=(0,c.K2)(t=>"$"+(0,u.GPZ)(",")(t),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const e=/\.\d+/.exec(t),r=e?e[0]:"";k=(0,c.K2)(t=>"$"+(0,u.GPZ)(","+r)(t),"valueFormat")}else if(t.startsWith("$")){const e=t.substring(1);k=(0,c.K2)(t=>"$"+(0,u.GPZ)(e||"")(t),"valueFormat")}else k=(0,u.GPZ)(t)}catch(O){c.Rm.error("Error creating format function:",O),k=(0,u.GPZ)(",")}const A=(0,u.UMr)().range(["transparent",g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),_=(0,u.UMr)().range(["transparent",g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),E=(0,u.UMr)().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);p&&v.append("text").attr("x",w/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(p);const C=v.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),S=(0,u.Sk5)(f).sum(t=>t.value??0).sort((t,e)=>(e.value??0)-(t.value??0)),R=(0,u.hkb)().size([b,x]).paddingTop(t=>t.children&&t.children.length>0?35:0).paddingInner(d).paddingLeft(t=>t.children&&t.children.length>0?y:0).paddingRight(t=>t.children&&t.children.length>0?y:0).paddingBottom(t=>t.children&&t.children.length>0?y:0).round(!0)(S),L=R.descendants().filter(t=>t.children&&t.children.length>0),D=C.selectAll(".treemapSection").data(L).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);D.append("rect").attr("width",t=>t.x1-t.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>0===t.depth?"display: none;":""),D.append("clipPath").attr("id",(t,r)=>`clip-section-${e}-${r}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",25),D.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,e)=>`treemapSection section${e}`).attr("fill",t=>A(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>_(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(0===t.depth)return"display: none;";const e=(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles});return e.nodeStyles+";"+e.borderStyles.join(";")}),D.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(t=>0===t.depth?"":t.data.name).attr("font-weight","bold").attr("style",t=>{if(0===t.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+E(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(t){if(0===t.depth)return;const e=(0,u.Ltv)(this),r=t.data.name;e.text(r);const n=t.x1-t.x0;let i;if(!1!==h.showValues&&t.value){i=n-10-30-10-6}else{i=n-6-6}const a=Math.max(15,i),s=e.node();if(s.getComputedTextLength()>a){const t="...";let n=r;for(;n.length>0;){if(n=r.substring(0,n.length-1),0===n.length){e.text(t),s.getComputedTextLength()>a&&e.text("");break}if(e.text(n+t),s.getComputedTextLength()<=a)break}}}),!1!==h.showValues&&D.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?k(t.value):"").attr("font-style","italic").attr("style",t=>{if(0===t.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+E(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const N=R.leaves(),I=C.selectAll(".treemapLeafGroup").data(N).enter().append("g").attr("class",(t,e)=>`treemapNode treemapLeafGroup leaf${e}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);I.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?A(t.parent.data.name):A(t.data.name)).attr("style",t=>(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?A(t.parent.data.name):A(t.data.name)).attr("stroke-width",3),I.append("clipPath").attr("id",(t,r)=>`clip-${e}-${r}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4));if(I.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+E(t.data.name)+";"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,r)=>`url(#clip-${e}-${r})`).text(t=>t.data.name).each(function(t){const e=(0,u.Ltv)(this),r=t.x1-t.x0,n=t.y1-t.y0,i=e.node(),a=r-8,s=n-8;if(a<10||s<10)return void e.style("display","none");let o=parseInt(e.style("font-size"),10);for(;i.getComputedTextLength()>a&&o>8;)o--,e.style("font-size",`${o}px`);let l=Math.max(6,Math.min(28,Math.round(.6*o))),c=o+2+l;for(;c>s&&o>8&&(o--,l=Math.max(6,Math.min(28,Math.round(.6*o))),!(l<6&&8===o));)e.style("font-size",`${o}px`),c=o+2+l;e.style("font-size",`${o}px`),(i.getComputedTextLength()>a||o<8||s(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+E(t.data.name)+";"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,r)=>`url(#clip-${e}-${r})`).text(t=>t.value?k(t.value):"").each(function(t){const e=(0,u.Ltv)(this),r=this.parentNode;if(!r)return void e.style("display","none");const n=(0,u.Ltv)(r).select(".treemapLabel");if(n.empty()||"none"===n.style("display"))return void e.style("display","none");const i=parseFloat(n.style("font-size")),a=Math.max(6,Math.min(28,Math.round(.6*i)));e.style("font-size",`${a}px`);const s=(t.y1-t.y0)/2+i/2+2;e.attr("y",s);const o=t.x1-t.x0,l=t.y1-t.y0-4,c=o-8;e.node().getComputedTextLength()>c||s+a>l||a<6?e.style("display","none"):e.style("display",null)})}const M=h.diagramPadding??8;(0,i.P)(v,M,"flowchart",h?.useMaxWidth||!1)},"draw"),getClasses:(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses")},b={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},x=(0,c.K2)(({treemap:t}={})=>{const e=(0,o.$t)(b,t);return`\n .treemapNode.section {\n stroke: ${e.sectionStrokeColor};\n stroke-width: ${e.sectionStrokeWidth};\n fill: ${e.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${e.leafStrokeColor};\n stroke-width: ${e.leafStrokeWidth};\n fill: ${e.leafFillColor};\n }\n .treemapLabel {\n fill: ${e.labelColor};\n font-size: ${e.labelFontSize};\n }\n .treemapValue {\n fill: ${e.valueColor};\n font-size: ${e.valueFontSize};\n }\n .treemapTitle {\n fill: ${e.titleColor};\n font-size: ${e.titleFontSize};\n }\n `},"getStyles"),w={parser:m,get db(){return new d},renderer:v,styles:x}},6992(t,e,r){"use strict";r.d(e,{diagram:()=>M});var n=r(3590),i=r(5871),a=r(3226),s=r(144),o=r(797),l=r(8731),c={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},h={axes:[],curves:[],options:c},u=structuredClone(h),d=s.UI.radar,p=(0,o.K2)(()=>(0,a.$t)({...d,...(0,s.zj)().radar}),"getConfig"),f=(0,o.K2)(()=>u.axes,"getAxes"),g=(0,o.K2)(()=>u.curves,"getCurves"),m=(0,o.K2)(()=>u.options,"getOptions"),y=(0,o.K2)(t=>{u.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),v=(0,o.K2)(t=>{u.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:b(t.entries)}))},"setCurves"),b=(0,o.K2)(t=>{if(null==t[0].axis)return t.map(t=>t.value);const e=f();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(e=>{const r=t.find(t=>t.axis?.$refText===e.name);if(void 0===r)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),x={getAxes:f,getCurves:g,getOptions:m,setAxes:y,setCurves:v,setOptions:(0,o.K2)(t=>{const e=t.reduce((t,e)=>(t[e.name]=e,t),{});u.options={showLegend:e.showLegend?.value??c.showLegend,ticks:e.ticks?.value??c.ticks,max:e.max?.value??c.max,min:e.min?.value??c.min,graticule:e.graticule?.value??c.graticule}},"setOptions"),getConfig:p,clear:(0,o.K2)(()=>{(0,s.IU)(),u=structuredClone(h)},"clear"),setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,getAccDescription:s.m7,setAccDescription:s.EI},w=(0,o.K2)(t=>{(0,i.S)(t,x);const{axes:e,curves:r,options:n}=t;x.setAxes(e),x.setCurves(r),x.setOptions(n)},"populate"),T={parse:(0,o.K2)(async t=>{const e=await(0,l.qg)("radar",t);o.Rm.debug(e),w(e)},"parse")},k=(0,o.K2)((t,e,r,i)=>{const a=i.db,s=a.getAxes(),o=a.getCurves(),l=a.getOptions(),c=a.getConfig(),h=a.getDiagramTitle(),u=(0,n.D)(e),d=A(u,c),p=l.max??Math.max(...o.map(t=>Math.max(...t.entries))),f=l.min,g=Math.min(c.width,c.height)/2;_(d,s,g,l.ticks,l.graticule),E(d,s,g,c),C(d,s,o,f,p,l.graticule,c),L(d,o,l.showLegend,c),d.append("text").attr("class","radarTitle").text(h).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),A=(0,o.K2)((t,e)=>{const r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,i=e.marginLeft+e.width/2,a=e.marginTop+e.height/2;return t.attr("viewbox",`0 0 ${r} ${n}`).attr("width",r).attr("height",n),t.append("g").attr("transform",`translate(${i}, ${a})`)},"drawFrame"),_=(0,o.K2)((t,e,r,n,i)=>{if("circle"===i)for(let a=0;a{const r=2*e*Math.PI/i-Math.PI/2;return`${s*Math.cos(r)},${s*Math.sin(r)}`}).join(" ");t.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),E=(0,o.K2)((t,e,r,n)=>{const i=e.length;for(let a=0;a{if(e.entries.length!==o)return;const c=e.entries.map((t,e)=>{const r=2*Math.PI*e/o-Math.PI/2,a=S(t,n,i,l);return{x:a*Math.cos(r),y:a*Math.sin(r)}});"circle"===a?t.append("path").attr("d",R(c,s.curveTension)).attr("class",`radarCurve-${r}`):"polygon"===a&&t.append("polygon").attr("points",c.map(t=>`${t.x},${t.y}`).join(" ")).attr("class",`radarCurve-${r}`)})}function S(t,e,r,n){return n*(Math.min(Math.max(t,e),r)-e)/(r-e)}function R(t,e){const r=t.length;let n=`M${t[0].x},${t[0].y}`;for(let i=0;i{const n=t.append("g").attr("transform",`translate(${i}, ${a+20*r})`);n.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${r}`),n.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}(0,o.K2)(C,"drawCurves"),(0,o.K2)(S,"relativeRadius"),(0,o.K2)(R,"closedRoundCurve"),(0,o.K2)(L,"drawLegend");var D={draw:k},N=(0,o.K2)((t,e)=>{let r="";for(let n=0;n{const e=(0,s.P$)(),r=(0,s.zj)(),n=(0,a.$t)(e,r.themeVariables);return{themeVariables:n,radarOptions:(0,a.$t)(n.radar,t)}},"buildRadarStyleOptions"),M={parser:T,db:x,renderer:D,styles:(0,o.K2)(({radar:t}={})=>{const{themeVariables:e,radarOptions:r}=I(t);return`\n\t.radarTitle {\n\t\tfont-size: ${e.fontSize};\n\t\tcolor: ${e.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${r.axisColor};\n\t\tstroke-width: ${r.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${r.axisLabelFontSize}px;\n\t\tcolor: ${r.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${r.graticuleColor};\n\t\tfill-opacity: ${r.graticuleOpacity};\n\t\tstroke: ${r.graticuleColor};\n\t\tstroke-width: ${r.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${r.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${N(e,r)}\n\t`},"styles")}},6567(t,e,r){"use strict";r.d(e,{diagram:()=>b});var n=r(3590),i=r(5871),a=r(3226),s=r(144),o=r(797),l=r(8731),c=s.UI.packet,h=class{constructor(){this.packet=[],this.setAccTitle=s.SV,this.getAccTitle=s.iN,this.setDiagramTitle=s.ke,this.getDiagramTitle=s.ab,this.getAccDescription=s.m7,this.setAccDescription=s.EI}static{(0,o.K2)(this,"PacketDB")}getConfig(){const t=(0,a.$t)({...c,...(0,s.zj)().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){(0,s.IU)(),this.packet=[]}},u=(0,o.K2)((t,e)=>{(0,i.S)(t,e);let r=-1,n=[],a=1;const{bitsPerRow:s}=e.getConfig();for(let{start:i,end:l,bits:c,label:h}of t.blocks){if(void 0!==i&&void 0!==l&&l{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const n=e*r-1,i=e*r;return[{start:t.start,end:n,label:t.label,bits:n-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),p={parser:{yy:void 0},parse:(0,o.K2)(async t=>{const e=await(0,l.qg)("packet",t),r=p.parser?.yy;if(!(r instanceof h))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");o.Rm.debug(e),u(e,r)},"parse")},f=(0,o.K2)((t,e,r,i)=>{const a=i.db,o=a.getConfig(),{rowHeight:l,paddingY:c,bitWidth:h,bitsPerRow:u}=o,d=a.getPacket(),p=a.getDiagramTitle(),f=l+c,m=f*(d.length+1)-(p?0:l),y=h*u+2,v=(0,n.D)(e);v.attr("viewbox",`0 0 ${y} ${m}`),(0,s.a$)(v,m,y,o.useMaxWidth);for(const[n,s]of d.entries())g(v,s,n,o);v.append("text").text(p).attr("x",y/2).attr("y",m-f/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),g=(0,o.K2)((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{const c=t.append("g"),h=r*(n+a)+a;for(const u of e){const t=u.start%o*s+1,e=(u.end-u.start+1)*s-i;if(c.append("rect").attr("x",t).attr("y",h).attr("width",e).attr("height",n).attr("class","packetBlock"),c.append("text").attr("x",t+e/2).attr("y",h+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(u.label),!l)continue;const r=u.end===u.start,a=h-2;c.append("text").attr("x",t+(r?e/2:0)).attr("y",a).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",r?"middle":"start").text(u.start),r||c.append("text").attr("x",t+e).attr("y",a).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(u.end)}},"drawWord"),m={draw:f},y={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},v=(0,o.K2)(({packet:t}={})=>{const e=(0,a.$t)(y,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`},"styles"),b={parser:p,get db(){return new h},renderer:m,styles:v}},8756(t,e,r){"use strict";r.d(e,{diagram:()=>b});var n=r(9625),i=r(1152),a=r(45),s=(r(5164),r(8698),r(5894),r(3245),r(2387),r(607),r(3226)),o=r(144),l=r(797),c=r(1444),h=r(5582),u=r(5937),d=function(){var t=(0,l.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],r=[1,10],n=[1,11],i=[1,12],a=[1,13],s=[1,20],o=[1,21],c=[1,22],h=[1,23],u=[1,24],d=[1,19],p=[1,25],f=[1,26],g=[1,18],m=[1,33],y=[1,34],v=[1,35],b=[1,36],x=[1,37],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],T=[1,42],k=[1,43],A=[1,52],_=[40,50,68,69],E=[1,63],C=[1,61],S=[1,58],R=[1,62],L=[1,64],D=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],N=[63,64,65,66,67],I=[1,81],M=[1,80],O=[1,78],P=[1,79],$=[6,10,42,47],B=[6,10,13,41,42,47,48,49],F=[1,89],z=[1,88],K=[1,87],q=[19,56],U=[1,98],j=[1,97],G=[19,56,58,60],Y={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:(0,l.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:case 55:case 78:case 62:case 63:case 66:this.$=a[o];break;case 8:n.addEntity(a[o-4]),n.addEntity(a[o-2]),n.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:n.addEntity(a[o-8]),n.addEntity(a[o-4]),n.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),n.setClass([a[o-8]],a[o-6]),n.setClass([a[o-4]],a[o-2]);break;case 10:n.addEntity(a[o-6]),n.addEntity(a[o-2]),n.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),n.setClass([a[o-6]],a[o-4]);break;case 11:n.addEntity(a[o-6]),n.addEntity(a[o-4]),n.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),n.setClass([a[o-4]],a[o-2]);break;case 12:n.addEntity(a[o-3]),n.addAttributes(a[o-3],a[o-1]);break;case 13:n.addEntity(a[o-5]),n.addAttributes(a[o-5],a[o-1]),n.setClass([a[o-5]],a[o-3]);break;case 14:n.addEntity(a[o-2]);break;case 15:n.addEntity(a[o-4]),n.setClass([a[o-4]],a[o-2]);break;case 16:n.addEntity(a[o]);break;case 17:n.addEntity(a[o-2]),n.setClass([a[o-2]],a[o]);break;case 18:n.addEntity(a[o-6],a[o-4]),n.addAttributes(a[o-6],a[o-1]);break;case 19:n.addEntity(a[o-8],a[o-6]),n.addAttributes(a[o-8],a[o-1]),n.setClass([a[o-8]],a[o-3]);break;case 20:n.addEntity(a[o-5],a[o-3]);break;case 21:n.addEntity(a[o-7],a[o-5]),n.setClass([a[o-7]],a[o-2]);break;case 22:n.addEntity(a[o-3],a[o-1]);break;case 23:n.addEntity(a[o-5],a[o-3]),n.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:n.setDirection("TB");break;case 33:n.setDirection("BT");break;case 34:n.setDirection("RL");break;case 35:n.setDirection("LR");break;case 36:this.$=a[o-3],n.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 56:case 64:case 43:this.$=[a[o]];break;case 39:case 40:this.$=a[o-2].concat([a[o]]);break;case 41:this.$=a[o-2],n.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],n.addCssStyles(a[o-2],a[o-1]);break;case 44:case 65:a[o-2].push(a[o]),this.$=a[o-2];break;case 46:this.$=a[o-1]+a[o];break;case 54:case 76:case 77:case 67:this.$=a[o].replace(/"/g,"");break;case 57:a[o].push(a[o-1]),this.$=a[o];break;case 58:this.$={type:a[o-1],name:a[o]};break;case 59:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 60:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 61:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 68:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 69:this.$=n.Cardinality.ZERO_OR_ONE;break;case 70:this.$=n.Cardinality.ZERO_OR_MORE;break;case 71:this.$=n.Cardinality.ONE_OR_MORE;break;case 72:this.$=n.Cardinality.ONLY_ONE;break;case 73:this.$=n.Cardinality.MD_PARENT;break;case 74:this.$=n.Identification.NON_IDENTIFYING;break;case 75:this.$=n.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:n,26:i,28:a,29:14,30:15,31:16,32:17,33:s,34:o,35:c,36:h,37:u,40:d,43:p,44:f,50:g},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:r,24:n,26:i,28:a,29:14,30:15,31:16,32:17,33:s,34:o,35:c,36:h,37:u,40:d,43:p,44:f,50:g},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:m,64:y,65:v,66:b,67:x}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(w,[2,54]),t(w,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:T,41:k},{16:44,40:T,41:k},{16:45,40:T,41:k},t(e,[2,4]),{11:46,40:d,50:g},{16:47,40:T,41:k},{18:48,19:[1,49],51:50,52:51,56:A},{11:53,40:d,50:g},{62:54,68:[1,55],69:[1,56]},t(_,[2,69]),t(_,[2,70]),t(_,[2,71]),t(_,[2,72]),t(_,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:E,38:57,41:C,42:S,45:59,46:60,48:R,49:L},t(D,[2,37]),t(D,[2,38]),{16:65,40:T,41:k,42:S},{13:E,38:66,41:C,42:S,45:59,46:60,48:R,49:L},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:S,63:m,64:y,65:v,66:b,67:x}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:A},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:m,64:y,65:v,66:b,67:x},t(N,[2,74]),t(N,[2,75]),{6:I,10:M,39:77,42:O,47:P},{40:[1,82],41:[1,83]},t($,[2,43],{46:84,13:E,41:C,48:R,49:L}),t(B,[2,45]),t(B,[2,50]),t(B,[2,51]),t(B,[2,52]),t(B,[2,53]),t(e,[2,41],{42:S}),{6:I,10:M,39:85,42:O,47:P},{14:86,40:F,50:z,70:K},{16:90,40:T,41:k},{11:91,40:d,50:g},{18:92,19:[1,93],51:50,52:51,56:A},t(e,[2,12]),{19:[2,57]},t(q,[2,58],{54:94,55:95,57:96,59:U,60:j}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:E,41:C,45:101,46:60,48:R,49:L},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(D,[2,39]),t(D,[2,40]),t(B,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:S},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(q,[2,59],{55:106,58:[1,107],60:j}),t(q,[2,60]),t(G,[2,64]),t(q,[2,67]),t(G,[2,66]),{18:108,19:[1,109],51:50,52:51,56:A},{16:110,40:T,41:k},t($,[2,44],{46:84,13:E,41:C,48:R,49:L}),{14:111,40:F,50:z,70:K},{16:112,40:T,41:k},{14:113,40:F,50:z,70:K},t(e,[2,13]),t(q,[2,61]),{57:114,59:U},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:S}),t(e,[2,11]),{13:[1,117],42:S},t(e,[2,10]),t(G,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:A},{14:120,40:F,50:z,70:K},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,o="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=s[w]&&s[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],s[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,c,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},W=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(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})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(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,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,r,n){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 59;case 25:case 26:return 56;case 27:return 60;case 29:return this.popState(),19;case 30:case 73:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 59:return 63;case 42:case 43:case 44:case 52:case 54:case 61:return 65;case 47:case 48:case 49:case 50:case 51:case 53:case 60:return 64;case 55:case 56:case 57:case 58:return 66;case 62:return 67;case 63:case 66:case 67:case 68:return 68;case 64:case 65:return 69;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}}}();function H(){this.yy={}}return Y.lexer=W,(0,l.K2)(H,"Parser"),H.prototype=Y,Y.Parser=H,new H}();d.parser=d;var p=d,f=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setAccDescription=o.EI,this.getAccDescription=o.m7,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getConfig=(0,l.K2)(()=>(0,o.D7)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,l.K2)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,l.Rm.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,o.D7)().look??"default",cssClasses:"default",cssStyles:[]}),l.Rm.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){const r=this.addEntity(t);let n;for(n=e.length-1;n>=0;n--)e[n].keys||(e[n].keys=[]),e[n].comment||(e[n].comment=""),r.attributes.push(e[n]),l.Rm.debug("Added attribute ",e[n].name)}addRelationship(t,e,r,n){const i=this.entities.get(t),a=this.entities.get(r);if(!i||!a)return;const s={entityA:i.id,roleA:e,entityB:a.id,relSpec:n};this.relationships.push(s),l.Rm.debug("Added new relationship :",s)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const r of t){const t=this.classes.get(r);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(const r of t){const t=this.entities.get(r);if(!e||!t)return;for(const r of e)t.cssStyles.push(r)}}addClass(t,e){t.forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),e&&e.forEach(function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");r.textStyles.push(e)}r.styles.push(t)})})}setClass(t,e){for(const r of t){const t=this.entities.get(r);if(t)for(const r of e)t.cssClasses+=" "+r}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,o.IU)()}getData(){const t=[],e=[],r=(0,o.D7)();for(const i of this.entities.keys()){const e=this.entities.get(i);e&&(e.cssCompiledStyles=this.getCompiledStyles(e.cssClasses.split(" ")),t.push(e))}let n=0;for(const i of this.relationships){const t={id:(0,s.rY)(i.entityA,i.entityB,{prefix:"id",counter:n++}),type:"normal",curve:"basis",start:i.entityA,end:i.entityB,label:i.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:i.relSpec.cardB.toLowerCase(),arrowTypeEnd:i.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==i.relSpec.relType?"solid":"dashed",look:r.look};e.push(t)}return{nodes:t,edges:e,other:{},config:r,direction:"TB"}}},g={};(0,l.VA)(g,{draw:()=>m});var m=(0,l.K2)(async function(t,e,r,h){l.Rm.info("REF0:"),l.Rm.info("Drawing er diagram (unified)",e);const{securityLevel:u,er:d,layout:p}=(0,o.D7)(),f=h.db.getData(),g=(0,n.A)(e,u);f.type=h.type,f.layoutAlgorithm=(0,a.q7)(p),f.config.flowchart.nodeSpacing=d?.nodeSpacing||140,f.config.flowchart.rankSpacing=d?.rankSpacing||80,f.direction=h.db.getDirection(),f.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],f.diagramId=e,await(0,a.XX)(f,g),"elk"===f.layoutAlgorithm&&g.select(".edges").lower();const m=g.selectAll('[id*="-background"]');Array.from(m).length>0&&m.each(function(){const t=(0,c.Ltv)(this),e=t.attr("id").replace("-background",""),r=g.select(`#${CSS.escape(e)}`);if(!r.empty()){const e=r.attr("transform");t.attr("transform",e)}});s._K.insertTitle(g,"erDiagramTitleText",d?.titleTopMargin??25,h.db.getDiagramTitle()),(0,i.P)(g,8,"erDiagram",d?.useMaxWidth??!0)},"draw"),y=(0,l.K2)((t,e)=>{const r=u.A,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return h.A(n,i,a,e)},"fade"),v=(0,l.K2)(t=>`\n .entityBox {\n fill: ${t.mainBkg};\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 .labelBkg {\n background-color: ${y(t.tertiaryColor,.5)};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .edge-pattern-dashed {\n stroke-dasharray: 8,8;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon\n {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n`,"getStyles"),b={parser:p,get db(){return new f},renderer:g,styles:v}},2291(t,e,r){"use strict";r.d(e,{diagram:()=>k});var n=r(2501),i=r(3981),a=r(9625),s=r(1152),o=r(45),l=(r(5164),r(8698),r(5894)),c=(r(3245),r(2387),r(607),r(3226)),h=r(144),u=r(797),d=r(1444),p=r(5582),f=r(5937),g=class{constructor(){this.vertexCounter=0,this.config=(0,h.D7)(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=h.SV,this.setAccDescription=h.EI,this.setDiagramTitle=h.ke,this.getAccTitle=h.iN,this.getAccDescription=h.m7,this.getDiagramTitle=h.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,u.K2)(this,"FlowDB")}sanitizeText(t){return h.Y2.sanitizeText(t,this.config)}lookUpDomId(t){for(const e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(t,e,r,n,a,s,o={},c){if(!t||0===t.trim().length)return;let u;if(void 0!==c){let t;t=c.includes("\n")?c+"\n":"{\n"+c+"\n}",u=(0,i.H)(t,{schema:i.r})}const d=this.edges.find(e=>e.id===t);if(d){const t=u;return void 0!==t?.animate&&(d.animate=t.animate),void 0!==t?.animation&&(d.animation=t.animation),void(void 0!==t?.curve&&(d.interpolate=t.curve))}let p,f=this.vertices.get(t);if(void 0===f&&(f={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,f)),this.vertexCounter++,void 0!==e?(this.config=(0,h.D7)(),p=this.sanitizeText(e.text.trim()),f.labelType=e.type,p.startsWith('"')&&p.endsWith('"')&&(p=p.substring(1,p.length-1)),f.text=p):void 0===f.text&&(f.text=t),void 0!==r&&(f.type=r),null!=n&&n.forEach(t=>{f.styles.push(t)}),null!=a&&a.forEach(t=>{f.classes.push(t)}),void 0!==s&&(f.dir=s),void 0===f.props?f.props=o:void 0!==o&&Object.assign(f.props,o),void 0!==u){if(u.shape){if(u.shape!==u.shape.toLowerCase()||u.shape.includes("_"))throw new Error(`No such shape: ${u.shape}. Shape names should be lowercase.`);if(!(0,l.aP)(u.shape))throw new Error(`No such shape: ${u.shape}.`);f.type=u?.shape}u?.label&&(f.text=u?.label),u?.icon&&(f.icon=u?.icon,u.label?.trim()||f.text!==t||(f.text="")),u?.form&&(f.form=u?.form),u?.pos&&(f.pos=u?.pos),u?.img&&(f.img=u?.img,u.label?.trim()||f.text!==t||(f.text="")),u?.constraint&&(f.constraint=u.constraint),u.w&&(f.assetWidth=Number(u.w)),u.h&&(f.assetHeight=Number(u.h))}}addSingleLink(t,e,r,n){const i={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};u.Rm.info("abc78 Got edge...",i);const a=r.text;if(void 0!==a&&(i.text=this.sanitizeText(a.text.trim()),i.text.startsWith('"')&&i.text.endsWith('"')&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=a.type),void 0!==r&&(i.type=r.type,i.stroke=r.stroke,i.length=r.length>10?10:r.length),n&&!this.edges.some(t=>t.id===n))i.id=n,i.isUserDefinedId=!0;else{const t=this.edges.filter(t=>t.start===i.start&&t.end===i.end);0===t.length?i.id=(0,c.rY)(i.start,i.end,{counter:0,prefix:"L"}):i.id=(0,c.rY)(i.start,i.end,{counter:t.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);u.Rm.info("Pushing edge..."),this.edges.push(i)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,r){const n=this.isLinkData(r)?r.id.replace("@",""):void 0;u.Rm.info("addLink",t,e,n);for(const i of t)for(const a of e){const s=i===t[t.length-1],o=a===e[0];s&&o?this.addSingleLink(i,a,r,n):this.addSingleLink(i,a,r,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){const r=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=r&&r.forEach(t=>{if(/color/.exec(t)){const r=t.replace("fill","bgFill");e.textStyles.push(r)}e.styles.push(t)})})}setDirection(t){this.direction=t.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(const r of t.split(",")){const t=this.vertices.get(r);t&&t.classes.push(e);const n=this.edges.find(t=>t.id===r);n&&n.classes.push(e);const i=this.subGraphLookup.get(r);i&&i.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const r of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,e)}}setClickFun(t,e,r){const n=this.lookUpDomId(t);if("loose"!==(0,h.D7)().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof r){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{const t=document.querySelector(`[id="${n}"]`);null!==t&&t.addEventListener("click",()=>{c._K.runFunc(e,...i)},!1)}))}setLink(t,e,r){t.split(",").forEach(t=>{const n=this.vertices.get(t);void 0!==n&&(n.link=c._K.formatUrl(e,this.config),n.linkTarget=r)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFun(t,e,r)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let e=(0,d.Ltv)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,d.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0));(0,d.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",t=>{const r=(0,d.Ltv)(t.currentTarget);if(null===r.attr("title"))return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(r.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(e.html().replace(/<br\/>/g,"
    ")),r.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);(0,d.Ltv)(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=(0,h.D7)(),(0,h.IU)()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\s/.exec(r.text)&&(n=void 0);const a=(0,u.K2)(t=>{const e={boolean:{},number:{},string:{}},r=[];let n;return{nodeList:t.filter(function(t){const i=typeof t;return t.stmt&&"dir"===t.stmt?(n=t.value,!1):""!==t.trim()&&(i in e?!e[i].hasOwnProperty(t)&&(e[i][t]=!0):!r.includes(t)&&r.push(t))}),dir:n}},"uniq")(e.flat()),s=a.nodeList;let o=a.dir;const l=(0,h.D7)().flowchart??{};if(o=o??(l.inheritDir?this.getDirection()??(0,h.D7)().direction??void 0:void 0),"gen-1"===this.version)for(let h=0;h2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n=0){const r=this.indexNodes2(t,e);if(r.result)return{result:!0,count:i+r.count};i+=r.count}n+=1}return{result:!1,count:i}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}destructStartLink(t){let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1)}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}}countChar(t,e){const r=e.length;let n=0;for(let i=0;i":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1))}let i="normal",a=r.length-1;r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible");const s=this.countChar(".",r);return s&&(i="dotted",a=s),{type:n,stroke:i,length:a}}destructLink(t,e){const r=this.destructEndLink(t);let n;if(e){if(n=this.destructStartLink(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=r.length,n}return r}exists(t,e){for(const r of t)if(r.nodes.includes(e))return!0;return!1}makeUniq(t,e){const r=[];return t.nodes.forEach((n,i)=>{this.exists(e,n)||r.push(t.nodes[i])}),{nodes:r}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e}return{arrowTypeStart:e,arrowTypeEnd:r}}addNodeFromVertex(t,e,r,n,i,a){const s=r.get(t.id),o=n.get(t.id)??!1,l=this.findNode(e,t.id);if(l)l.cssStyles=t.styles,l.cssCompiledStyles=this.getCompiledStyles(t.classes),l.cssClasses=t.classes.join(" ");else{const r={id:t.id,label:t.text,labelStyle:"",parentId:s,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};o?e.push({...r,isGroup:!0,shape:"rect"}):e.push({...r,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let e=[];for(const r of t){const t=this.classes.get(r);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}getData(){const t=(0,h.D7)(),e=[],r=[],n=this.getSubGraphs(),i=new Map,a=new Map;for(let o=n.length-1;o>=0;o--){const t=n[o];t.nodes.length>0&&a.set(t.id,!0);for(const e of t.nodes)i.set(e,t.id)}for(let o=n.length-1;o>=0;o--){const r=n[o];e.push({id:r.id,label:r.title,labelStyle:"",parentId:i.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(" "),shape:"rect",dir:r.dir,isGroup:!0,look:t.look})}this.getVertices().forEach(r=>{this.addNodeFromVertex(r,e,i,a,t,t.look||"classic")});const s=this.getEdges();return s.forEach((e,n)=>{const{arrowTypeStart:i,arrowTypeEnd:a}=this.destructEdgeType(e.type),o=[...s.defaultStyle??[]];e.style&&o.push(...e.style);const l={id:(0,c.rY)(e.start,e.end,{counter:n,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":i,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":a,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:o,style:o,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};r.push(l)}),{nodes:e,edges:r,other:{},config:t}}defaultConfig(){return h.ME.flowchart}},m={getClasses:(0,u.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,u.K2)(async function(t,e,r,n){u.Rm.info("REF0:"),u.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:i,flowchart:l,layout:p}=(0,h.D7)();let f;"sandbox"===i&&(f=(0,d.Ltv)("#i"+e));const g="sandbox"===i?f.nodes()[0].contentDocument:document;u.Rm.debug("Before getData: ");const m=n.db.getData();u.Rm.debug("Data: ",m);const y=(0,a.A)(e,i),v=n.db.getDirection();m.type=n.type,m.layoutAlgorithm=(0,o.q7)(p),"dagre"===m.layoutAlgorithm&&"elk"===p&&u.Rm.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),m.direction=v,m.nodeSpacing=l?.nodeSpacing||50,m.rankSpacing=l?.rankSpacing||50,m.markers=["point","circle","cross"],m.diagramId=e,u.Rm.debug("REF1:",m),await(0,o.XX)(m,y);const b=m.config.flowchart?.diagramPadding??8;c._K.insertTitle(y,"flowchartTitleText",l?.titleTopMargin||0,n.db.getDiagramTitle()),(0,s.P)(y,b,"flowchart",l?.useMaxWidth||!1);for(const a of m.nodes){const t=(0,d.Ltv)(`#${e} [id="${a.id}"]`);if(!t||!a.link)continue;const r=g.createElementNS("http://www.w3.org/2000/svg","a");r.setAttributeNS("http://www.w3.org/2000/svg","class",a.cssClasses),r.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?r.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):a.linkTarget&&r.setAttributeNS("http://www.w3.org/2000/svg","target",a.linkTarget);const n=t.insert(function(){return r},":first-child"),s=t.select(".label-container");s&&n.append(function(){return s.node()});const o=t.select(".label");o&&n.append(function(){return o.node()})}},"draw")},y=function(){var t=(0,u.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],a=[2,2],s=[1,13],o=[1,14],l=[1,15],c=[1,16],h=[1,23],d=[1,25],p=[1,26],f=[1,27],g=[1,49],m=[1,48],y=[1,29],v=[1,30],b=[1,31],x=[1,32],w=[1,33],T=[1,44],k=[1,46],A=[1,42],_=[1,47],E=[1,43],C=[1,50],S=[1,45],R=[1,51],L=[1,52],D=[1,34],N=[1,35],I=[1,36],M=[1,37],O=[1,57],P=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],$=[1,61],B=[1,60],F=[1,62],z=[8,9,11,75,77,78],K=[1,78],q=[1,91],U=[1,96],j=[1,95],G=[1,92],Y=[1,88],W=[1,94],H=[1,90],V=[1,97],X=[1,93],Z=[1,98],Q=[1,89],J=[8,9,10,11,40,75,77,78],tt=[8,9,10,11,40,46,75,77,78],et=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],rt=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],nt=[44,60,89,102,105,106,109,111,114,115,116],it=[1,121],at=[1,122],st=[1,124],ot=[1,123],lt=[44,60,62,74,89,102,105,106,109,111,114,115,116],ct=[1,133],ht=[1,147],ut=[1,148],dt=[1,149],pt=[1,150],ft=[1,135],gt=[1,137],mt=[1,141],yt=[1,142],vt=[1,143],bt=[1,144],xt=[1,145],wt=[1,146],Tt=[1,151],kt=[1,152],At=[1,131],_t=[1,132],Et=[1,139],Ct=[1,134],St=[1,138],Rt=[1,136],Lt=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],Dt=[1,154],Nt=[1,156],It=[8,9,11],Mt=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Ot=[1,176],Pt=[1,172],$t=[1,173],Bt=[1,177],Ft=[1,174],zt=[1,175],Kt=[77,116,119],qt=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Ut=[10,106],jt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Gt=[1,247],Yt=[1,245],Wt=[1,249],Ht=[1,243],Vt=[1,244],Xt=[1,246],Zt=[1,248],Qt=[1,250],Jt=[1,268],te=[8,9,11,106],ee=[8,9,10,11,60,84,105,106,109,110,111,112],re={trace:(0,u.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:(0,u.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(a[o])||a[o].length>0)&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=a[o];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(a[o-1]),this.$=a[o-1];break;case 27:this.$=a[o-1].nodes;break;case 33:this.$=n.addSubGraph(a[o-6],a[o-1],a[o-4]);break;case 34:this.$=n.addSubGraph(a[o-3],a[o-1],a[o-3]);break;case 35:this.$=n.addSubGraph(void 0,a[o-1],void 0);break;case 37:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 43:case 133:this.$=a[o-1]+a[o];break;case 45:n.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),n.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 46:n.addLink(a[o-2].stmt,a[o],a[o-1]),this.$={stmt:a[o],nodes:a[o].concat(a[o-2].nodes)};break;case 47:n.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 48:this.$={stmt:a[o-1],nodes:a[o-1]};break;case 49:n.addVertex(a[o-1][a[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o]),this.$={stmt:a[o-1],nodes:a[o-1],shapeData:a[o]};break;case 50:this.$={stmt:a[o],nodes:a[o]};break;case 51:case 128:case 130:this.$=[a[o]];break;case 52:n.addVertex(a[o-5][a[o-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[o-4]),this.$=a[o-5].concat(a[o]);break;case 53:this.$=a[o-4].concat(a[o]);break;case 55:this.$=a[o-2],n.setClass(a[o-2],a[o]);break;case 56:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"square");break;case 57:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"doublecircle");break;case 58:this.$=a[o-5],n.addVertex(a[o-5],a[o-2],"circle");break;case 59:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"ellipse");break;case 60:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"stadium");break;case 61:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"subroutine");break;case 62:this.$=a[o-7],n.addVertex(a[o-7],a[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[o-5],a[o-3]]]));break;case 63:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"cylinder");break;case 64:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"round");break;case 65:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"diamond");break;case 66:this.$=a[o-5],n.addVertex(a[o-5],a[o-2],"hexagon");break;case 67:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"odd");break;case 68:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"trapezoid");break;case 69:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"inv_trapezoid");break;case 70:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"lean_right");break;case 71:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"lean_left");break;case 72:this.$=a[o],n.addVertex(a[o]);break;case 73:a[o-1].text=a[o],this.$=a[o-1];break;case 74:case 75:a[o-2].text=a[o-1],this.$=a[o-2];break;case 77:var l=n.destructLink(a[o],a[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1]};break;case 78:l=n.destructLink(a[o],a[o-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[o-1],id:a[o-3]};break;case 79:case 86:case 101:case 103:this.$={text:a[o],type:"text"};break;case 80:case 87:case 102:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 81:case 88:this.$={text:a[o],type:"string"};break;case 82:case 89:case 104:this.$={text:a[o],type:"markdown"};break;case 83:l=n.destructLink(a[o]);this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:l=n.destructLink(a[o]);this.$={type:l.type,stroke:l.stroke,length:l.length,id:a[o-1]};break;case 85:this.$=a[o-1];break;case 105:this.$=a[o-4],n.addClass(a[o-2],a[o]);break;case 106:this.$=a[o-4],n.setClass(a[o-2],a[o]);break;case 107:case 115:this.$=a[o-1],n.setClickEvent(a[o-1],a[o]);break;case 108:case 116:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2]),n.setTooltip(a[o-3],a[o]);break;case 109:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 110:this.$=a[o-4],n.setClickEvent(a[o-4],a[o-3],a[o-2]),n.setTooltip(a[o-4],a[o]);break;case 111:this.$=a[o-2],n.setLink(a[o-2],a[o]);break;case 112:this.$=a[o-4],n.setLink(a[o-4],a[o-2]),n.setTooltip(a[o-4],a[o]);break;case 113:this.$=a[o-4],n.setLink(a[o-4],a[o-2],a[o]);break;case 114:this.$=a[o-6],n.setLink(a[o-6],a[o-4],a[o]),n.setTooltip(a[o-6],a[o-2]);break;case 117:this.$=a[o-1],n.setLink(a[o-1],a[o]);break;case 118:this.$=a[o-3],n.setLink(a[o-3],a[o-2]),n.setTooltip(a[o-3],a[o]);break;case 119:this.$=a[o-3],n.setLink(a[o-3],a[o-2],a[o]);break;case 120:this.$=a[o-5],n.setLink(a[o-5],a[o-4],a[o]),n.setTooltip(a[o-5],a[o-2]);break;case 121:this.$=a[o-4],n.addVertex(a[o-2],void 0,void 0,a[o]);break;case 122:this.$=a[o-4],n.updateLink([a[o-2]],a[o]);break;case 123:this.$=a[o-4],n.updateLink(a[o-2],a[o]);break;case 124:this.$=a[o-8],n.updateLinkInterpolate([a[o-6]],a[o-2]),n.updateLink([a[o-6]],a[o]);break;case 125:this.$=a[o-8],n.updateLinkInterpolate(a[o-6],a[o-2]),n.updateLink(a[o-6],a[o]);break;case 126:this.$=a[o-6],n.updateLinkInterpolate([a[o-4]],a[o]);break;case 127:this.$=a[o-6],n.updateLinkInterpolate(a[o-4],a[o]);break;case 129:case 131:a[o-2].push(a[o]),this.$=a[o-2];break;case 182:case 184:this.$=a[o-1]+""+a[o];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"}}},"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:d,36:p,38:f,42:28,43:38,44:g,45:39,47:40,60:m,84:y,85:v,86:b,87:x,88:w,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L,121:D,122:N,123:I,124:M},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:O,15:53,18:56},t(P,[2,3]),t(P,[2,4]),t(P,[2,5]),t(P,[2,6]),t(P,[2,7]),t(P,[2,8]),{8:$,9:B,11:F,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:$,9:B,11:F,21:67},{8:$,9:B,11:F,21:68},{8:$,9:B,11:F,21:69},{8:$,9:B,11:F,21:70},{8:$,9:B,11:F,21:71},{8:$,9:B,10:[1,72],11:F,21:73},t(P,[2,36]),{35:[1,74]},{37:[1,75]},t(P,[2,39]),t(z,[2,50],{18:76,39:77,10:O,40:K}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:q,44:U,60:j,80:[1,86],89:G,95:[1,83],97:[1,84],101:85,105:Y,106:W,109:H,111:V,114:X,115:Z,116:Q,120:87},t(P,[2,185]),t(P,[2,186]),t(P,[2,187]),t(P,[2,188]),t(J,[2,51]),t(J,[2,54],{46:[1,99]}),t(tt,[2,72],{113:112,29:[1,100],44:g,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:m,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:T,102:k,105:A,106:_,109:E,111:C,114:S,115:R,116:L}),t(et,[2,181]),t(et,[2,142]),t(et,[2,143]),t(et,[2,144]),t(et,[2,145]),t(et,[2,146]),t(et,[2,147]),t(et,[2,148]),t(et,[2,149]),t(et,[2,150]),t(et,[2,151]),t(et,[2,152]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,113]},t(rt,[2,26],{18:114,10:O}),t(P,[2,27]),{42:115,43:38,44:g,45:39,47:40,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L},t(P,[2,40]),t(P,[2,41]),t(P,[2,42]),t(nt,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:it,81:at,116:st,119:ot},{75:[1,125],77:[1,126]},t(lt,[2,83]),t(P,[2,28]),t(P,[2,29]),t(P,[2,30]),t(P,[2,31]),t(P,[2,32]),{10:ct,12:ht,14:ut,27:dt,28:127,32:pt,44:ft,60:gt,75:mt,80:[1,129],81:[1,130],83:140,84:yt,85:vt,86:bt,87:xt,88:wt,89:Tt,90:kt,91:128,105:At,109:_t,111:Et,114:Ct,115:St,116:Rt},t(Lt,a,{5:153}),t(P,[2,37]),t(P,[2,38]),t(z,[2,48],{44:Dt}),t(z,[2,49],{18:155,10:O,40:Nt}),t(J,[2,44]),{44:g,47:157,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L},{102:[1,158],103:159,105:[1,160]},{44:g,47:161,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L},{44:g,47:162,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L},t(It,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},t(It,[2,115],{120:167,10:[1,166],14:q,44:U,60:j,89:G,105:Y,106:W,109:H,111:V,114:X,115:Z,116:Q}),t(It,[2,117],{10:[1,168]}),t(Mt,[2,183]),t(Mt,[2,170]),t(Mt,[2,171]),t(Mt,[2,172]),t(Mt,[2,173]),t(Mt,[2,174]),t(Mt,[2,175]),t(Mt,[2,176]),t(Mt,[2,177]),t(Mt,[2,178]),t(Mt,[2,179]),t(Mt,[2,180]),{44:g,47:169,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L},{30:170,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{30:178,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{30:180,50:[1,179],67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{30:181,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{30:182,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{30:183,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{109:[1,184]},{30:185,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{30:186,65:[1,187],67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{30:188,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{30:189,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{30:190,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},t(et,[2,182]),t(i,[2,20]),t(rt,[2,25]),t(z,[2,46],{39:191,18:192,10:O,40:K}),t(nt,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{77:[1,196],79:197,116:st,119:ot},t(Kt,[2,79]),t(Kt,[2,81]),t(Kt,[2,82]),t(Kt,[2,168]),t(Kt,[2,169]),{76:198,79:120,80:it,81:at,116:st,119:ot},t(lt,[2,84]),{8:$,9:B,10:ct,11:F,12:ht,14:ut,21:200,27:dt,29:[1,199],32:pt,44:ft,60:gt,75:mt,83:140,84:yt,85:vt,86:bt,87:xt,88:wt,89:Tt,90:kt,91:201,105:At,109:_t,111:Et,114:Ct,115:St,116:Rt},t(qt,[2,101]),t(qt,[2,103]),t(qt,[2,104]),t(qt,[2,157]),t(qt,[2,158]),t(qt,[2,159]),t(qt,[2,160]),t(qt,[2,161]),t(qt,[2,162]),t(qt,[2,163]),t(qt,[2,164]),t(qt,[2,165]),t(qt,[2,166]),t(qt,[2,167]),t(qt,[2,90]),t(qt,[2,91]),t(qt,[2,92]),t(qt,[2,93]),t(qt,[2,94]),t(qt,[2,95]),t(qt,[2,96]),t(qt,[2,97]),t(qt,[2,98]),t(qt,[2,99]),t(qt,[2,100]),{6:11,7:12,8:s,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,202],33:24,34:d,36:p,38:f,42:28,43:38,44:g,45:39,47:40,60:m,84:y,85:v,86:b,87:x,88:w,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L,121:D,122:N,123:I,124:M},{10:O,18:203},{44:[1,204]},t(J,[2,43]),{10:[1,205],44:g,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:112,114:S,115:R,116:L},{10:[1,206]},{10:[1,207],106:[1,208]},t(Ut,[2,128]),{10:[1,209],44:g,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:112,114:S,115:R,116:L},{10:[1,210],44:g,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:112,114:S,115:R,116:L},{80:[1,211]},t(It,[2,109],{10:[1,212]}),t(It,[2,111],{10:[1,213]}),{80:[1,214]},t(Mt,[2,184]),{80:[1,215],98:[1,216]},t(J,[2,55],{113:112,44:g,60:m,89:T,102:k,105:A,106:_,109:E,111:C,114:S,115:R,116:L}),{31:[1,217],67:Ot,82:218,116:Bt,117:Ft,118:zt},t(jt,[2,86]),t(jt,[2,88]),t(jt,[2,89]),t(jt,[2,153]),t(jt,[2,154]),t(jt,[2,155]),t(jt,[2,156]),{49:[1,219],67:Ot,82:218,116:Bt,117:Ft,118:zt},{30:220,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{51:[1,221],67:Ot,82:218,116:Bt,117:Ft,118:zt},{53:[1,222],67:Ot,82:218,116:Bt,117:Ft,118:zt},{55:[1,223],67:Ot,82:218,116:Bt,117:Ft,118:zt},{57:[1,224],67:Ot,82:218,116:Bt,117:Ft,118:zt},{60:[1,225]},{64:[1,226],67:Ot,82:218,116:Bt,117:Ft,118:zt},{66:[1,227],67:Ot,82:218,116:Bt,117:Ft,118:zt},{30:228,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},{31:[1,229],67:Ot,82:218,116:Bt,117:Ft,118:zt},{67:Ot,69:[1,230],71:[1,231],82:218,116:Bt,117:Ft,118:zt},{67:Ot,69:[1,233],71:[1,232],82:218,116:Bt,117:Ft,118:zt},t(z,[2,45],{18:155,10:O,40:Nt}),t(z,[2,47],{44:Dt}),t(nt,[2,75]),t(nt,[2,74]),{62:[1,234],67:Ot,82:218,116:Bt,117:Ft,118:zt},t(nt,[2,77]),t(Kt,[2,80]),{77:[1,235],79:197,116:st,119:ot},{30:236,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},t(Lt,a,{5:237}),t(qt,[2,102]),t(P,[2,35]),{43:238,44:g,45:39,47:40,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L},{10:O,18:239},{10:Gt,60:Yt,84:Wt,92:240,105:Ht,107:241,108:242,109:Vt,110:Xt,111:Zt,112:Qt},{10:Gt,60:Yt,84:Wt,92:251,104:[1,252],105:Ht,107:241,108:242,109:Vt,110:Xt,111:Zt,112:Qt},{10:Gt,60:Yt,84:Wt,92:253,104:[1,254],105:Ht,107:241,108:242,109:Vt,110:Xt,111:Zt,112:Qt},{105:[1,255]},{10:Gt,60:Yt,84:Wt,92:256,105:Ht,107:241,108:242,109:Vt,110:Xt,111:Zt,112:Qt},{44:g,47:257,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L},t(It,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},t(It,[2,116]),t(It,[2,118],{10:[1,261]}),t(It,[2,119]),t(tt,[2,56]),t(jt,[2,87]),t(tt,[2,57]),{51:[1,262],67:Ot,82:218,116:Bt,117:Ft,118:zt},t(tt,[2,64]),t(tt,[2,59]),t(tt,[2,60]),t(tt,[2,61]),{109:[1,263]},t(tt,[2,63]),t(tt,[2,65]),{66:[1,264],67:Ot,82:218,116:Bt,117:Ft,118:zt},t(tt,[2,67]),t(tt,[2,68]),t(tt,[2,70]),t(tt,[2,69]),t(tt,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(nt,[2,78]),{31:[1,265],67:Ot,82:218,116:Bt,117:Ft,118:zt},{6:11,7:12,8:s,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,266],33:24,34:d,36:p,38:f,42:28,43:38,44:g,45:39,47:40,60:m,84:y,85:v,86:b,87:x,88:w,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L,121:D,122:N,123:I,124:M},t(J,[2,53]),{43:267,44:g,45:39,47:40,60:m,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L},t(It,[2,121],{106:Jt}),t(te,[2,130],{108:269,10:Gt,60:Yt,84:Wt,105:Ht,109:Vt,110:Xt,111:Zt,112:Qt}),t(ee,[2,132]),t(ee,[2,134]),t(ee,[2,135]),t(ee,[2,136]),t(ee,[2,137]),t(ee,[2,138]),t(ee,[2,139]),t(ee,[2,140]),t(ee,[2,141]),t(It,[2,122],{106:Jt}),{10:[1,270]},t(It,[2,123],{106:Jt}),{10:[1,271]},t(Ut,[2,129]),t(It,[2,105],{106:Jt}),t(It,[2,106],{113:112,44:g,60:m,89:T,102:k,105:A,106:_,109:E,111:C,114:S,115:R,116:L}),t(It,[2,110]),t(It,[2,112],{10:[1,272]}),t(It,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:$,9:B,11:F,21:277},t(P,[2,34]),t(J,[2,52]),{10:Gt,60:Yt,84:Wt,105:Ht,107:278,108:242,109:Vt,110:Xt,111:Zt,112:Qt},t(ee,[2,133]),{14:q,44:U,60:j,89:G,101:279,105:Y,106:W,109:H,111:V,114:X,115:Z,116:Q,120:87},{14:q,44:U,60:j,89:G,101:280,105:Y,106:W,109:H,111:V,114:X,115:Z,116:Q,120:87},{98:[1,281]},t(It,[2,120]),t(tt,[2,58]),{30:282,67:Ot,80:Pt,81:$t,82:171,116:Bt,117:Ft,118:zt},t(tt,[2,66]),t(Lt,a,{5:283}),t(te,[2,131],{108:269,10:Gt,60:Yt,84:Wt,105:Ht,109:Vt,110:Xt,111:Zt,112:Qt}),t(It,[2,126],{120:167,10:[1,284],14:q,44:U,60:j,89:G,105:Y,106:W,109:H,111:V,114:X,115:Z,116:Q}),t(It,[2,127],{120:167,10:[1,285],14:q,44:U,60:j,89:G,105:Y,106:W,109:H,111:V,114:X,115:Z,116:Q}),t(It,[2,114]),{31:[1,286],67:Ot,82:218,116:Bt,117:Ft,118:zt},{6:11,7:12,8:s,9:o,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,287],33:24,34:d,36:p,38:f,42:28,43:38,44:g,45:39,47:40,60:m,84:y,85:v,86:b,87:x,88:w,89:T,102:k,105:A,106:_,109:E,111:C,113:41,114:S,115:R,116:L,121:D,122:N,123:I,124:M},{10:Gt,60:Yt,84:Wt,92:288,105:Ht,107:241,108:242,109:Vt,110:Xt,111:Zt,112:Qt},{10:Gt,60:Yt,84:Wt,92:289,105:Ht,107:241,108:242,109:Vt,110:Xt,111:Zt,112:Qt},t(tt,[2,62]),t(P,[2,33]),t(It,[2,124],{106:Jt}),t(It,[2,125],{106:Jt})],defaultActions:{},parseError:(0,u.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,u.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,o="",l=0,c=0,h=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,u.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,u.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=s[w]&&s[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],s[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(c=p.yyleng,o=p.yytext,l=p.yylineno,m=p.yylloc,h>0&&h--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,c,l,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},ne=function(){return{EOF:1,parseError:(0,u.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,u.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,u.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,u.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,u.K2)(function(){return this._more=!0,this},"more"),reject:(0,u.K2)(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})},"reject"),less:(0,u.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,u.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,u.K2)(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,"")},"upcomingInput"),showPosition:(0,u.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,u.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,u.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,u.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,u.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,u.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,u.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,u.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,u.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,u.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,u.K2)(function(t,e,r,n){switch(r){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const r=/\n\s*/g;return e.yytext=e.yytext.replace(r,"
    "),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 18:return 96;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 34:return 88;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:case 102:return 111;case 62:return 46;case 63:return 60;case 64:case 103:return 44;case 65:return 8;case 66:return 106;case 67:case 101:return 115;case 68:case 71:case 74:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:case 73:case 76:return 119;case 72:return this.pushState("thickEdgeText"),75;case 75:return this.pushState("dottedEdgeText"),75;case 77:return 77;case 78:return this.popState(),53;case 79:case 115:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}}}();function ie(){this.yy={}}return re.lexer=ne,(0,u.K2)(ie,"Parser"),ie.prototype=re,re.Parser=ie,new ie}();y.parser=y;var v=y,b=Object.assign({},v);b.parse=t=>{const e=t.replace(/}\s*\n/g,"}\n");return v.parse(e)};var x=b,w=(0,u.K2)((t,e)=>{const r=f.A,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return p.A(n,i,a,e)},"fade"),T=(0,u.K2)(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 .cluster-label span p {\n background-color: transparent;\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 .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${t.lineColor} !important;\n stroke-width: 0;\n stroke: ${t.lineColor};\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 p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${w(t.edgeLabelBackground,.5)};\n // background-color:\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\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n padding: 2px;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n ${(0,n.o)()}\n`,"getStyles"),k={parser:x,get db(){return new g},renderer:m,styles:T,init:(0,u.K2)(t=>{t.flowchart||(t.flowchart={}),t.layout&&(0,h.XV)({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,(0,h.XV)({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}},2492(t,e,r){"use strict";r.d(e,{diagram:()=>$t});var n=r(3226),i=r(144),a=r(797),s=r(6750),o=r(4353),l=r(8313),c=r(445),h=r(7375),u=r(3522),d=r(1444),p=function(){var t=(0,a.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],s=[1,29],o=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],f=[1,11],g=[1,12],m=[1,13],y=[1,14],v=[1,15],b=[1,16],x=[1,19],w=[1,20],T=[1,21],k=[1,22],A=[1,23],_=[1,25],E=[1,35],C={trace:(0,a.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,a.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:n.setWeekday("monday");break;case 9:n.setWeekday("tuesday");break;case 10:n.setWeekday("wednesday");break;case 11:n.setWeekday("thursday");break;case 12:n.setWeekday("friday");break;case 13:n.setWeekday("saturday");break;case 14:n.setWeekday("sunday");break;case 15:n.setWeekend("friday");break;case 16:n.setWeekend("saturday");break;case 17:n.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:n.TopAxis(),this.$=a[o].substr(8);break;case 20:n.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:n.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:n.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:n.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:n.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:n.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],n.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],null),n.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],n.setClickEvent(a[o-2],a[o],null),n.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-1],a[o]),n.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],n.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:f,25:g,26:m,27:y,28:v,29:b,30:x,31:w,33:T,35:k,36:A,37:24,38:_,40:E},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:f,25:g,26:m,27:y,28:v,29:b,30:x,31:w,33:T,35:k,36:A,37:24,38:_,40:E},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:(0,a.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,a.K2)(function(t){var e=this,r=[0],n=[],i=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=s.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;s.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,a.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=o[w]&&o[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],o[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),s.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:s[s.length-(_||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(_||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(_||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,s].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),s=s.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),s.push(S._$),E=o[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:(0,a.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,a.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,a.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K2)(function(){return this._more=!0,this},"more"),reject:(0,a.K2)(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})},"reject"),less:(0,a.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K2)(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,"")},"upcomingInput"),showPosition:(0,a.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,a.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,a.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)(function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function R(){this.yy={}}return C.lexer=S,(0,a.K2)(R,"Parser"),R.prototype=C,C.Parser=R,new R}();p.parser=p;var f=p;o.extend(l),o.extend(c),o.extend(h);var g,m,y={friday:5,saturday:6},v="",b="",x=void 0,w="",T=[],k=[],A=new Map,_=[],E=[],C="",S="",R=["active","done","crit","milestone","vert"],L=[],D=!1,N=!1,I="sunday",M="saturday",O=0,P=(0,a.K2)(function(){_=[],E=[],C="",L=[],ft=0,g=void 0,m=void 0,vt=[],v="",b="",S="",x=void 0,w="",T=[],k=[],D=!1,N=!1,O=0,A=new Map,(0,i.IU)(),I="sunday",M="saturday"},"clear"),$=(0,a.K2)(function(t){b=t},"setAxisFormat"),B=(0,a.K2)(function(){return b},"getAxisFormat"),F=(0,a.K2)(function(t){x=t},"setTickInterval"),z=(0,a.K2)(function(){return x},"getTickInterval"),K=(0,a.K2)(function(t){w=t},"setTodayMarker"),q=(0,a.K2)(function(){return w},"getTodayMarker"),U=(0,a.K2)(function(t){v=t},"setDateFormat"),j=(0,a.K2)(function(){D=!0},"enableInclusiveEndDates"),G=(0,a.K2)(function(){return D},"endDatesAreInclusive"),Y=(0,a.K2)(function(){N=!0},"enableTopAxis"),W=(0,a.K2)(function(){return N},"topAxisEnabled"),H=(0,a.K2)(function(t){S=t},"setDisplayMode"),V=(0,a.K2)(function(){return S},"getDisplayMode"),X=(0,a.K2)(function(){return v},"getDateFormat"),Z=(0,a.K2)(function(t){T=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),Q=(0,a.K2)(function(){return T},"getIncludes"),J=(0,a.K2)(function(t){k=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),tt=(0,a.K2)(function(){return k},"getExcludes"),et=(0,a.K2)(function(){return A},"getLinks"),rt=(0,a.K2)(function(t){C=t,_.push(t)},"addSection"),nt=(0,a.K2)(function(){return _},"getSections"),it=(0,a.K2)(function(){let t=kt();let e=0;for(;!t&&e<10;)t=kt(),e++;return E=vt},"getTasks"),at=(0,a.K2)(function(t,e,r,n){const i=t.format(e.trim()),a=t.format("YYYY-MM-DD");return!n.includes(i)&&!n.includes(a)&&(!(!r.includes("weekends")||t.isoWeekday()!==y[M]&&t.isoWeekday()!==y[M]+1)||(!!r.includes(t.format("dddd").toLowerCase())||(r.includes(i)||r.includes(a))))},"isInvalidDate"),st=(0,a.K2)(function(t){I=t},"setWeekday"),ot=(0,a.K2)(function(){return I},"getWeekday"),lt=(0,a.K2)(function(t){M=t},"setWeekend"),ct=(0,a.K2)(function(t,e,r,n){if(!r.length||t.manualEndTime)return;let i,a;i=t.startTime instanceof Date?o(t.startTime):o(t.startTime,e,!0),i=i.add(1,"d"),a=t.endTime instanceof Date?o(t.endTime):o(t.endTime,e,!0);const[s,l]=ht(i,a,e,r,n);t.endTime=s.toDate(),t.renderEndTime=l},"checkTaskDates"),ht=(0,a.K2)(function(t,e,r,n,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),a=at(t,r,n,i),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),ut=(0,a.K2)(function(t,e,r){r=r.trim();if((0,a.K2)(t=>{const e=t.trim();return"x"===e||"X"===e},"isTimestampFormat")(e)&&/^\d+$/.test(r))return new Date(Number(r));const n=/^after\s+(?[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(const r of n.groups.ids.split(" ")){let e=wt(r);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let i=o(r,e.trim(),!0);if(i.isValid())return i.toDate();{a.Rm.debug("Invalid date:"+r),a.Rm.debug("With date format:"+e.trim());const t=new Date(r);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+r);return t}},"getStartDate"),dt=(0,a.K2)(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),pt=(0,a.K2)(function(t,e,r,n=!1){r=r.trim();const i=/^until\s+(?[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(const r of i.groups.ids.split(" ")){let e=wt(r);void 0!==e&&(!t||e.startTime{window.open(r,"_self")}),A.set(t,r))}),_t(t,"clickable")},"setLink"),_t=(0,a.K2)(function(t,e){t.split(",").forEach(function(t){let r=wt(t);void 0!==r&&r.classes.push(e)})},"setClass"),Et=(0,a.K2)(function(t,e,r){if("loose"!==(0,i.D7)().securityLevel)return;if(void 0===e)return;let a=[];if("string"==typeof r){a=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{n._K.runFunc(e,...a)})},"setClickFun"),Ct=(0,a.K2)(function(t,e){L.push(function(){const r=document.querySelector(`[id="${t}"]`);null!==r&&r.addEventListener("click",function(){e()})},function(){const r=document.querySelector(`[id="${t}-text"]`);null!==r&&r.addEventListener("click",function(){e()})})},"pushFun"),St=(0,a.K2)(function(t,e,r){t.split(",").forEach(function(t){Et(t,e,r)}),_t(t,"clickable")},"setClickEvent"),Rt=(0,a.K2)(function(t){L.forEach(function(e){e(t)})},"bindFunctions"),Lt={getConfig:(0,a.K2)(()=>(0,i.D7)().gantt,"getConfig"),clear:P,setDateFormat:U,getDateFormat:X,enableInclusiveEndDates:j,endDatesAreInclusive:G,enableTopAxis:Y,topAxisEnabled:W,setAxisFormat:$,getAxisFormat:B,setTickInterval:F,getTickInterval:z,setTodayMarker:K,getTodayMarker:q,setAccTitle:i.SV,getAccTitle:i.iN,setDiagramTitle:i.ke,getDiagramTitle:i.ab,setDisplayMode:H,getDisplayMode:V,setAccDescription:i.EI,getAccDescription:i.m7,addSection:rt,getSections:nt,getTasks:it,addTask:xt,findTaskById:wt,addTaskOrg:Tt,setIncludes:Z,getIncludes:Q,setExcludes:J,getExcludes:tt,setClickEvent:St,setLink:At,getLinks:et,bindFunctions:Rt,parseDuration:dt,isInvalidDate:at,setWeekday:st,getWeekday:ot,setWeekend:lt};function Dt(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(r){const i=new RegExp("^\\s*"+r+"\\s*$");t[0].match(i)&&(e[r]=!0,t.shift(1),n=!0)})}(0,a.K2)(Dt,"getTaskTags"),o.extend(u);var Nt,It=(0,a.K2)(function(){a.Rm.debug("Something is calling, setConf, remove the call")},"setConf"),Mt={monday:d.ABi,tuesday:d.PGu,wednesday:d.GuW,thursday:d.Mol,friday:d.TUC,saturday:d.rGn,sunday:d.YPH},Ot=(0,a.K2)((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),i=0;for(const a of n)for(let t=0;t=r[t]){r[t]=a.endTime,a.order=t+e,t>i&&(i=t);break}return i},"getMaxIntersections"),Pt=1e4,$t={parser:f,db:Lt,renderer:{setConf:It,draw:(0,a.K2)(function(t,e,r,n){const s=(0,i.D7)().gantt,l=(0,i.D7)().securityLevel;let c;"sandbox"===l&&(c=(0,d.Ltv)("#i"+e));const h="sandbox"===l?(0,d.Ltv)(c.nodes()[0].contentDocument.body):(0,d.Ltv)("body"),u="sandbox"===l?c.nodes()[0].contentDocument:document,p=u.getElementById(e);void 0===(Nt=p.parentElement.offsetWidth)&&(Nt=1200),void 0!==s.useWidth&&(Nt=s.useWidth);const f=n.db.getTasks();let g=[];for(const i of f)g.push(i.type);g=S(g);const m={};let y=2*s.topPadding;if("compact"===n.db.getDisplayMode()||"compact"===s.displayMode){const t={};for(const r of f)void 0===t[r.section]?t[r.section]=[r]:t[r.section].push(r);let e=0;for(const r of Object.keys(t)){const n=Ot(t[r],e)+1;e+=n,y+=n*(s.barHeight+s.barGap),m[r]=n}}else{y+=f.length*(s.barHeight+s.barGap);for(const t of g)m[t]=f.filter(e=>e.type===t).length}p.setAttribute("viewBox","0 0 "+Nt+" "+y);const v=h.select(`[id="${e}"]`),b=(0,d.w7C)().domain([(0,d.jkA)(f,function(t){return t.startTime}),(0,d.T9B)(f,function(t){return t.endTime})]).rangeRound([0,Nt-s.leftPadding-s.rightPadding]);function x(t,e){const r=t.startTime,n=e.startTime;let i=0;return r>n?i=1:rt.vert===e.vert?0:t.vert?1:-1);const u=[...new Set(t.map(t=>t.order))].map(e=>t.find(t=>t.order===e));v.append("g").selectAll("rect").data(u).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*r+a-2}).attr("width",function(){return h-s.rightPadding/2}).attr("height",r).attr("class",function(t){for(const[e,r]of g.entries())if(t.type===r)return"section section"+e%s.numberSectionStyles;return"section section0"}).enter();const p=v.append("g").selectAll("rect").data(t).enter(),m=n.db.getLinks();p.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?b(t.startTime)+o+.5*(b(t.endTime)-b(t.startTime))-.5*l:b(t.startTime)+o}).attr("y",function(t,e){return e=t.order,t.vert?s.gridLineStartPadding:e*r+a}).attr("width",function(t){return t.milestone?l:t.vert?.08*l:b(t.renderEndTime||t.endTime)-b(t.startTime)}).attr("height",function(t){return t.vert?f.length*(s.barHeight+s.barGap)+2*s.barHeight:l}).attr("transform-origin",function(t,e){return e=t.order,(b(t.startTime)+o+.5*(b(t.endTime)-b(t.startTime))).toString()+"px "+(e*r+a+.5*l).toString()+"px"}).attr("class",function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let r=0;for(const[i,a]of g.entries())t.type===a&&(r=i%s.numberSectionStyles);let n="";return t.active?t.crit?n+=" activeCrit":n=" active":t.done?n=t.crit?" doneCrit":" done":t.crit&&(n+=" crit"),0===n.length&&(n=" task"),t.milestone&&(n=" milestone "+n),t.vert&&(n=" vert "+n),n+=r,n+=" "+e,"task"+n}),p.append("text").attr("id",function(t){return t.id+"-text"}).text(function(t){return t.task}).attr("font-size",s.fontSize).attr("x",function(t){let e=b(t.startTime),r=b(t.renderEndTime||t.endTime);if(t.milestone&&(e+=.5*(b(t.endTime)-b(t.startTime))-.5*l,r=e+l),t.vert)return b(t.startTime)+o;const n=this.getBBox().width;return n>r-e?r+n+1.5*s.leftPadding>h?e+o-5:r+o+5:(r-e)/2+e+o}).attr("y",function(t,e){return t.vert?s.gridLineStartPadding+f.length*(s.barHeight+s.barGap)+60:t.order*r+s.barHeight/2+(s.fontSize/2-2)+a}).attr("text-height",l).attr("class",function(t){const e=b(t.startTime);let r=b(t.endTime);t.milestone&&(r=e+l);const n=this.getBBox().width;let i="";t.classes.length>0&&(i=t.classes.join(" "));let a=0;for(const[l,c]of g.entries())t.type===c&&(a=l%s.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"),t.vert&&(o+=" vertText"),n>r-e?r+n+1.5*s.leftPadding>h?i+" taskTextOutsideLeft taskTextOutside"+a+" "+o:i+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+n:i+" taskText taskText"+a+" "+o+" width-"+n});if("sandbox"===(0,i.D7)().securityLevel){let t;t=(0,d.Ltv)("#i"+e);const r=t.nodes()[0].contentDocument;p.filter(function(t){return m.has(t.id)}).each(function(t){var e=r.querySelector("#"+t.id),n=r.querySelector("#"+t.id+"-text");const i=e.parentNode;var a=r.createElement("a");a.setAttribute("xlink:href",m.get(t.id)),a.setAttribute("target","_top"),i.appendChild(a),a.appendChild(e),a.appendChild(n)})}}function k(t,e,r,i,l,c,h,u){if(0===h.length&&0===u.length)return;let d,p;for(const{startTime:n,endTime:a}of c)(void 0===d||np)&&(p=a);if(!d||!p)return;if(o(p).diff(o(d),"year")>5)return void a.Rm.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const f=n.db.getDateFormat(),g=[];let m=null,y=o(d);for(;y.valueOf()<=p;)n.db.isInvalidDate(y,f,h,u)?m?m.end=y:m={start:y,end:y}:m&&(g.push(m),m=null),y=y.add(1,"d");v.append("g").selectAll("rect").data(g).enter().append("rect").attr("id",t=>"exclude-"+t.start.format("YYYY-MM-DD")).attr("x",t=>b(t.start.startOf("day"))+r).attr("y",s.gridLineStartPadding).attr("width",t=>b(t.end.endOf("day"))-b(t.start.startOf("day"))).attr("height",l-e-s.gridLineStartPadding).attr("transform-origin",function(e,n){return(b(e.start)+r+.5*(b(e.end)-b(e.start))).toString()+"px "+(n*t+.5*l).toString()+"px"}).attr("class","exclude-range")}function A(t,e,r,n){if(r<=0||t>e)return 1/0;const i=e-t,a=o.duration({[n??"day"]:r}).asMilliseconds();return a<=0?1/0:Math.ceil(i/a)}function _(t,e,r,i){const o=n.db.getDateFormat(),l=n.db.getAxisFormat();let c;c=l||("D"===o?"%d":s.axisFormat??"%Y-%m-%d");let h=(0,d.l78)(b).tickSize(-i+e+s.gridLineStartPadding).tickFormat((0,d.DCK)(c));const u=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||s.tickInterval);if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)a.Rm.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],r=n.db.getWeekday()||s.weekday,i=b.domain(),o=A(i[0],i[1],t,e);if(o>Pt)a.Rm.warn(`The tick interval "${t}${e}" would generate ${o} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(e){case"millisecond":h.ticks(d.t6C.every(t));break;case"second":h.ticks(d.ucG.every(t));break;case"minute":h.ticks(d.wXd.every(t));break;case"hour":h.ticks(d.Agd.every(t));break;case"day":h.ticks(d.UAC.every(t));break;case"week":h.ticks(Mt[r].every(t));break;case"month":h.ticks(d.Ui6.every(t))}}}if(v.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||s.topAxis){let r=(0,d.tlR)(b).tickSize(-i+e+s.gridLineStartPadding).tickFormat((0,d.DCK)(c));if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)a.Rm.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],i=n.db.getWeekday()||s.weekday,a=b.domain();if(A(a[0],a[1],t,e)<=Pt)switch(e){case"millisecond":r.ticks(d.t6C.every(t));break;case"second":r.ticks(d.ucG.every(t));break;case"minute":r.ticks(d.wXd.every(t));break;case"hour":r.ticks(d.Agd.every(t));break;case"day":r.ticks(d.UAC.every(t));break;case"week":r.ticks(Mt[i].every(t));break;case"month":r.ticks(d.Ui6.every(t))}}}v.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(r).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function E(t,e){let r=0;const n=Object.keys(m).map(t=>[t,m[t]]);v.append("g").selectAll("text").data(n).enter().append(function(t){const e=t[0].split(i.Y2.lineBreakRegex),r=-(e.length-1)/2,n=u.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("dy",r+"em");for(const[i,a]of e.entries()){const t=u.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),i>0&&t.setAttribute("dy","1em"),t.textContent=a,n.appendChild(t)}return n}).attr("x",10).attr("y",function(i,a){if(!(a>0))return i[1]*t/2+e;for(let s=0;s`\n .mermaid-main-font {\n font-family: ${t.fontFamily};\n }\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-family: ${t.fontFamily};\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\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: ${t.fontFamily};\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\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\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 .vert {\n stroke: ${t.vertLineColor};\n }\n\n .vertText {\n font-size: 15px;\n text-anchor: middle;\n fill: ${t.vertLineColor} !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.titleColor||t.textColor};\n font-family: ${t.fontFamily};\n }\n`,"getStyles")}},4312(t,e,r){"use strict";r.d(e,{diagram:()=>bt});var n=r(5871),i=r(2938),a=r(3226),s=r(144),o=r(797),l=r(8731),c=r(1444),h={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},u=s.UI.gitGraph,d=(0,o.K2)(()=>(0,a.$t)({...u,...(0,s.zj)().gitGraph}),"getConfig"),p=new i.m(()=>{const t=d(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function f(){return(0,a.yT)({length:7})}function g(t,e){const r=Object.create(null);return t.reduce((t,n)=>{const i=e(n);return r[i]||(r[i]=!0,t.push(n)),t},[])}(0,o.K2)(f,"getID"),(0,o.K2)(g,"uniqBy");var m=(0,o.K2)(function(t){p.records.direction=t},"setDirection"),y=(0,o.K2)(function(t){o.Rm.debug("options str",t),t=t?.trim(),t=t||"{}";try{p.records.options=JSON.parse(t)}catch(e){o.Rm.error("error while parsing gitGraph options",e.message)}},"setOptions"),v=(0,o.K2)(function(){return p.records.options},"getOptions"),b=(0,o.K2)(function(t){let e=t.msg,r=t.id;const n=t.type;let i=t.tags;o.Rm.info("commit",e,r,n,i),o.Rm.debug("Entering commit:",e,r,n,i);const a=d();r=s.Y2.sanitizeText(r,a),e=s.Y2.sanitizeText(e,a),i=i?.map(t=>s.Y2.sanitizeText(t,a));const l={id:r||p.records.seq+"-"+f(),message:e,seq:p.records.seq++,type:n??h.NORMAL,tags:i??[],parents:null==p.records.head?[]:[p.records.head.id],branch:p.records.currBranch};p.records.head=l,o.Rm.info("main branch",a.mainBranchName),p.records.commits.has(l.id)&&o.Rm.warn(`Commit ID ${l.id} already exists`),p.records.commits.set(l.id,l),p.records.branches.set(p.records.currBranch,l.id),o.Rm.debug("in pushCommit "+l.id)},"commit"),x=(0,o.K2)(function(t){let e=t.name;const r=t.order;if(e=s.Y2.sanitizeText(e,d()),p.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);p.records.branches.set(e,null!=p.records.head?p.records.head.id:null),p.records.branchConfig.set(e,{name:e,order:r}),k(e),o.Rm.debug("in createBranch")},"branch"),w=(0,o.K2)(t=>{let e=t.branch,r=t.id;const n=t.type,i=t.tags,a=d();e=s.Y2.sanitizeText(e,a),r&&(r=s.Y2.sanitizeText(r,a));const l=p.records.branches.get(p.records.currBranch),c=p.records.branches.get(e),u=l?p.records.commits.get(l):void 0,g=c?p.records.commits.get(c):void 0;if(u&&g&&u.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(p.records.currBranch===e){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},t}if(void 0===u||!u){const t=new Error(`Incorrect usage of "merge". Current branch (${p.records.currBranch})has no commits`);throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},t}if(!p.records.branches.has(e)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},t}if(void 0===g||!g){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},t}if(u===g){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},t}if(r&&p.records.commits.has(r)){const t=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw t.hash={text:`merge ${e} ${r} ${n} ${i?.join(" ")}`,token:`merge ${e} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},t}const m=c||"",y={id:r||`${p.records.seq}-${f()}`,message:`merged branch ${e} into ${p.records.currBranch}`,seq:p.records.seq++,parents:null==p.records.head?[]:[p.records.head.id,m],branch:p.records.currBranch,type:h.MERGE,customType:n,customId:!!r,tags:i??[]};p.records.head=y,p.records.commits.set(y.id,y),p.records.branches.set(p.records.currBranch,y.id),o.Rm.debug(p.records.branches),o.Rm.debug("in mergeBranch")},"merge"),T=(0,o.K2)(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent;o.Rm.debug("Entering cherryPick:",e,r,n);const a=d();if(e=s.Y2.sanitizeText(e,a),r=s.Y2.sanitizeText(r,a),n=n?.map(t=>s.Y2.sanitizeText(t,a)),i=s.Y2.sanitizeText(i,a),!e||!p.records.commits.has(e)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},t}const l=p.records.commits.get(e);if(void 0===l||!l)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(l.parents)||!l.parents.includes(i))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const c=l.branch;if(l.type===h.MERGE&&!i){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!r||!p.records.commits.has(r)){if(c===p.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},t}const t=p.records.branches.get(p.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${p.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},t}const a=p.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${p.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},t}const s={id:p.records.seq+"-"+f(),message:`cherry-picked ${l?.message} into ${p.records.currBranch}`,seq:p.records.seq++,parents:null==p.records.head?[]:[p.records.head.id,l.id],branch:p.records.currBranch,type:h.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${l.id}${l.type===h.MERGE?`|parent:${i}`:""}`]};p.records.head=s,p.records.commits.set(s.id,s),p.records.branches.set(p.records.currBranch,s.id),o.Rm.debug(p.records.branches),o.Rm.debug("in cherryPick")}},"cherryPick"),k=(0,o.K2)(function(t){if(t=s.Y2.sanitizeText(t,d()),!p.records.branches.has(t)){const 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}`,expected:[`branch ${t}`]},e}{p.records.currBranch=t;const e=p.records.branches.get(p.records.currBranch);p.records.head=void 0!==e&&e?p.records.commits.get(e)??null:null}},"checkout");function A(t,e,r){const n=t.indexOf(e);-1===n?t.push(r):t.splice(n,1,r)}function _(t){const e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]);let r="";t.forEach(function(t){r+=t===e?"\t*":"\t|"});const n=[r,e.id,e.seq];for(const i in p.records.branches)p.records.branches.get(i)===e.id&&n.push(i);if(o.Rm.debug(n.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){const r=p.records.commits.get(e.parents[0]);A(t,e,r),e.parents[1]&&t.push(p.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;if(e.parents[0]){const r=p.records.commits.get(e.parents[0]);A(t,e,r)}}_(t=g(t,t=>t.id))}(0,o.K2)(A,"upsert"),(0,o.K2)(_,"prettyPrintCommitHistory");var E=(0,o.K2)(function(){o.Rm.debug(p.records.commits);_([D()[0]])},"prettyPrint"),C=(0,o.K2)(function(){p.reset(),(0,s.IU)()},"clear"),S=(0,o.K2)(function(){return[...p.records.branchConfig.values()].map((t,e)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${e}`)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),R=(0,o.K2)(function(){return p.records.branches},"getBranches"),L=(0,o.K2)(function(){return p.records.commits},"getCommits"),D=(0,o.K2)(function(){const t=[...p.records.commits.values()];return t.forEach(function(t){o.Rm.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),N={commitType:h,getConfig:d,setDirection:m,setOptions:y,getOptions:v,commit:b,branch:x,merge:w,cherryPick:T,checkout:k,prettyPrint:E,clear:C,getBranchesAsObjArray:S,getBranches:R,getCommits:L,getCommitsArray:D,getCurrentBranch:(0,o.K2)(function(){return p.records.currBranch},"getCurrentBranch"),getDirection:(0,o.K2)(function(){return p.records.direction},"getDirection"),getHead:(0,o.K2)(function(){return p.records.head},"getHead"),setAccTitle:s.SV,getAccTitle:s.iN,getAccDescription:s.m7,setAccDescription:s.EI,setDiagramTitle:s.ke,getDiagramTitle:s.ab},I=(0,o.K2)((t,e)=>{(0,n.S)(t,e),t.dir&&e.setDirection(t.dir);for(const r of t.statements)M(r,e)},"populate"),M=(0,o.K2)((t,e)=>{const r={Commit:(0,o.K2)(t=>e.commit(O(t)),"Commit"),Branch:(0,o.K2)(t=>e.branch(P(t)),"Branch"),Merge:(0,o.K2)(t=>e.merge($(t)),"Merge"),Checkout:(0,o.K2)(t=>e.checkout(B(t)),"Checkout"),CherryPicking:(0,o.K2)(t=>e.cherryPick(F(t)),"CherryPicking")}[t.$type];r?r(t):o.Rm.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),O=(0,o.K2)(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?h[t.type]:h.NORMAL,tags:t.tags??void 0}),"parseCommit"),P=(0,o.K2)(t=>({name:t.name,order:t.order??0}),"parseBranch"),$=(0,o.K2)(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?h[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),B=(0,o.K2)(t=>t.branch,"parseCheckout"),F=(0,o.K2)(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),z={parse:(0,o.K2)(async t=>{const e=await(0,l.qg)("gitGraph",t);o.Rm.debug(e),I(e,N)},"parse")};var K=(0,s.D7)(),q=K?.gitGraph,U=10,j=40,G=new Map,Y=new Map,W=new Map,H=[],V=0,X="LR",Z=(0,o.K2)(()=>{G.clear(),Y.clear(),W.clear(),V=0,H=[],X="LR"},"clear"),Q=(0,o.K2)(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),r.setAttribute("class","row"),r.textContent=t.trim(),e.appendChild(r)}),e},"drawText"),J=(0,o.K2)(t=>{let e,r,n;return"BT"===X?(r=(0,o.K2)((t,e)=>t<=e,"comparisonFunc"),n=1/0):(r=(0,o.K2)((t,e)=>t>=e,"comparisonFunc"),n=0),t.forEach(t=>{const i="TB"===X||"BT"==X?Y.get(t)?.y:Y.get(t)?.x;void 0!==i&&r(i,n)&&(e=t,n=i)}),e},"findClosestParent"),tt=(0,o.K2)(t=>{let e="",r=1/0;return t.forEach(t=>{const n=Y.get(t).y;n<=r&&(e=t,r=n)}),e||void 0},"findClosestParentBT"),et=(0,o.K2)((t,e,r)=>{let n=r,i=r;const a=[];t.forEach(t=>{const r=e.get(t);if(!r)throw new Error(`Commit not found for key ${t}`);r.parents.length?(n=nt(r),i=Math.max(n,i)):a.push(r),it(r,n)}),n=i,a.forEach(t=>{at(t,n,r)}),t.forEach(t=>{const r=e.get(t);if(r?.parents.length){const t=tt(r.parents);n=Y.get(t).y-j,n<=i&&(i=n);const e=G.get(r.branch).pos,a=n-U;Y.set(r.id,{x:e,y:a})}})},"setParallelBTPos"),rt=(0,o.K2)(t=>{const e=J(t.parents.filter(t=>null!==t));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const r=Y.get(e)?.y;if(void 0===r)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),nt=(0,o.K2)(t=>rt(t)+j,"calculateCommitPosition"),it=(0,o.K2)((t,e)=>{const r=G.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);const n=r.pos,i=e+U;return Y.set(t.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),at=(0,o.K2)((t,e,r)=>{const n=G.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const i=e+r,a=n.pos;Y.set(t.id,{x:a,y:i})},"setRootPosition"),st=(0,o.K2)((t,e,r,n,i,a)=>{if(a===h.HIGHLIGHT)t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%8} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%8} ${n}-inner`);else if(a===h.CHERRY_PICK)t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`);else{const s=t.append("circle");if(s.attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===h.MERGE?9:10),s.attr("class",`commit ${e.id} commit${i%8}`),a===h.MERGE){const a=t.append("circle");a.attr("cx",r.x),a.attr("cy",r.y),a.attr("r",6),a.attr("class",`commit ${n} ${e.id} commit${i%8}`)}if(a===h.REVERSE){t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},${r.y-5}`).attr("class",`commit ${n} ${e.id} commit${i%8}`)}}},"drawCommitBullet"),ot=(0,o.K2)((t,e,r,n)=>{if(e.type!==h.CHERRY_PICK&&(e.customId&&e.type===h.MERGE||e.type!==h.MERGE)&&q?.showCommitLabel){const i=t.append("g"),a=i.insert("rect").attr("class","commit-label-bkg"),s=i.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),o=s.node()?.getBBox();if(o&&(a.attr("x",r.posWithOffset-o.width/2-2).attr("y",r.y+13.5).attr("width",o.width+4).attr("height",o.height+4),"TB"===X||"BT"===X?(a.attr("x",r.x-(o.width+16+5)).attr("y",r.y-12),s.attr("x",r.x-(o.width+16)).attr("y",r.y+o.height-12)):s.attr("x",r.posWithOffset-o.width/2),q.rotateCommitLabel))if("TB"===X||"BT"===X)s.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{const t=-7.5-(o.width+10)/25*9.5,e=10+o.width/25*8.5;i.attr("transform","translate("+t+", "+e+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),lt=(0,o.K2)((t,e,r,n)=>{if(e.tags.length>0){let i=0,a=0,s=0;const o=[];for(const n of e.tags.reverse()){const e=t.insert("polygon"),l=t.append("circle"),c=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(n),h=c.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),s=Math.max(s,h.height),c.attr("x",r.posWithOffset-h.width/2),o.push({tag:c,hole:l,rect:e,yOffset:i}),i+=20}for(const{tag:t,hole:e,rect:l,yOffset:c}of o){const i=s/2,o=r.y-19.2-c;if(l.attr("class","tag-label-bkg").attr("points",`\n ${n-a/2-2},${o+2} \n ${n-a/2-2},${o-2}\n ${r.posWithOffset-a/2-4},${o-i-2}\n ${r.posWithOffset+a/2+4},${o-i-2}\n ${r.posWithOffset+a/2+4},${o+i+2}\n ${r.posWithOffset-a/2-4},${o+i+2}`),e.attr("cy",o).attr("cx",n-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===X||"BT"===X){const s=n+c;l.attr("class","tag-label-bkg").attr("points",`\n ${r.x},${s+2}\n ${r.x},${s-2}\n ${r.x+U},${s-i-2}\n ${r.x+U+a+4},${s-i-2}\n ${r.x+U+a+4},${s+i+2}\n ${r.x+U},${s+i+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),e.attr("cx",r.x+2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),t.attr("x",r.x+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),ct=(0,o.K2)(t=>{switch(t.customType??t.type){case h.NORMAL:return"commit-normal";case h.REVERSE:return"commit-reverse";case h.HIGHLIGHT:return"commit-highlight";case h.MERGE:return"commit-merge";case h.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),ht=(0,o.K2)((t,e,r,n)=>{const i={x:0,y:0};if(!(t.parents.length>0)){if("TB"===e)return 30;if("BT"===e){return(n.get(t.id)??i).y-j}return 0}{const r=J(t.parents);if(r){const a=n.get(r)??i;if("TB"===e)return a.y+j;if("BT"===e){return(n.get(t.id)??i).y-j}return a.x+j}}return 0},"calculatePosition"),ut=(0,o.K2)((t,e,r)=>{const n="BT"===X&&r?e:e+U,i="TB"===X||"BT"===X?n:G.get(t.branch)?.pos,a="TB"===X||"BT"===X?G.get(t.branch)?.pos:n;if(void 0===a||void 0===i)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:i,posWithOffset:n}},"getCommitPosition"),dt=(0,o.K2)((t,e,r)=>{if(!q)throw new Error("GitGraph config not found");const n=t.append("g").attr("class","commit-bullets"),i=t.append("g").attr("class","commit-labels");let a="TB"===X||"BT"===X?30:0;const s=[...e.keys()],l=q?.parallelCommits??!1,c=(0,o.K2)((t,r)=>{const n=e.get(t)?.seq,i=e.get(r)?.seq;return void 0!==n&&void 0!==i?n-i:0},"sortKeys");let h=s.sort(c);"BT"===X&&(l&&et(h,e,a),h=h.reverse()),h.forEach(t=>{const s=e.get(t);if(!s)throw new Error(`Commit not found for key ${t}`);l&&(a=ht(s,X,a,Y));const o=ut(s,a,l);if(r){const t=ct(s),e=s.customType??s.type,r=G.get(s.branch)?.index??0;st(n,s,o,t,r,e),ot(i,s,o,a),lt(i,s,o,a)}"TB"===X||"BT"===X?Y.set(s.id,{x:o.x,y:o.posWithOffset}):Y.set(s.id,{x:o.posWithOffset,y:o.y}),a="BT"===X&&l?a+j:a+j+U,a>V&&(V=a)})},"drawCommits"),pt=(0,o.K2)((t,e,r,n,i)=>{const a=("TB"===X||"BT"===X?r.xt.branch===a,"isOnBranchToGetCurve"),l=(0,o.K2)(r=>r.seq>t.seq&&r.seql(t)&&s(t))},"shouldRerouteArrow"),ft=(0,o.K2)((t,e,r=0)=>{const n=t+Math.abs(t-e)/2;if(r>5)return n;if(H.every(t=>Math.abs(t-n)>=10))return H.push(n),n;const i=Math.abs(t-e);return ft(t,e-i/5,r+1)},"findLane"),gt=(0,o.K2)((t,e,r,n)=>{const i=Y.get(e.id),a=Y.get(r.id);if(void 0===i||void 0===a)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);const s=pt(e,r,i,a,n);let o,l="",c="",u=0,d=0,p=G.get(r.branch)?.index;if(r.type===h.MERGE&&e.id!==r.parents[0]&&(p=G.get(e.branch)?.index),s){l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",u=10,d=10;const t=i.ya.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",u=20,d=20,o=r.type===h.MERGE&&e.id!==r.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${c} ${i.x-d} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x+u} ${i.y} ${l} ${a.x} ${i.y+d} L ${a.x} ${a.y}`),i.x===a.x&&(o=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):"BT"===X?(i.xa.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",u=20,d=20,o=r.type===h.MERGE&&e.id!==r.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${l} ${i.x-d} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${l} ${a.x} ${i.y-d} L ${a.x} ${a.y}`),i.x===a.x&&(o=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.ya.y&&(o=r.type===h.MERGE&&e.id!==r.parents[0]?`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${l} ${a.x} ${i.y-d} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${c} ${i.x+d} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(o=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(void 0===o)throw new Error("Line definition not found");t.append("path").attr("d",o).attr("class","arrow arrow"+p%8)},"drawArrow"),mt=(0,o.K2)((t,e)=>{const r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(t=>{const n=e.get(t);n.parents&&n.parents.length>0&&n.parents.forEach(t=>{gt(r,e.get(t),n,e)})})},"drawArrows"),yt=(0,o.K2)((t,e)=>{const r=t.append("g");e.forEach((t,e)=>{const n=e%8,i=G.get(t.name)?.pos;if(void 0===i)throw new Error(`Position not found for branch ${t.name}`);const a=r.append("line");a.attr("x1",0),a.attr("y1",i),a.attr("x2",V),a.attr("y2",i),a.attr("class","branch branch"+n),"TB"===X?(a.attr("y1",30),a.attr("x1",i),a.attr("y2",V),a.attr("x2",i)):"BT"===X&&(a.attr("y1",V),a.attr("x1",i),a.attr("y2",30),a.attr("x2",i)),H.push(i);const s=t.name,o=Q(s),l=r.insert("rect"),c=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);c.node().appendChild(o);const h=o.getBBox();l.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-h.width-4-(!0===q?.rotateCommitLabel?30:0)).attr("y",-h.height/2+8).attr("width",h.width+18).attr("height",h.height+4),c.attr("transform","translate("+(-h.width-14-(!0===q?.rotateCommitLabel?30:0))+", "+(i-h.height/2-1)+")"),"TB"===X?(l.attr("x",i-h.width/2-10).attr("y",0),c.attr("transform","translate("+(i-h.width/2-5)+", 0)")):"BT"===X?(l.attr("x",i-h.width/2-10).attr("y",V),c.attr("transform","translate("+(i-h.width/2-5)+", "+V+")")):l.attr("transform","translate(-19, "+(i-h.height/2)+")")})},"drawBranches"),vt=(0,o.K2)(function(t,e,r,n,i){return G.set(t,{pos:e,index:r}),e+=50+(i?40:0)+("TB"===X||"BT"===X?n.width/2:0)},"setBranchPosition");var bt={parser:z,db:N,renderer:{draw:(0,o.K2)(function(t,e,r,n){if(Z(),o.Rm.debug("in gitgraph renderer",t+"\n","id:",e,r),!q)throw new Error("GitGraph config not found");const i=q.rotateCommitLabel??!1,l=n.db;W=l.getCommits();const h=l.getBranchesAsObjArray();X=l.getDirection();const u=(0,c.Ltv)(`[id="${e}"]`);let d=0;h.forEach((t,e)=>{const r=Q(t.name),n=u.append("g"),a=n.insert("g").attr("class","branchLabel"),s=a.insert("g").attr("class","label branch-label");s.node()?.appendChild(r);const o=r.getBBox();d=vt(t.name,d,e,o,i),s.remove(),a.remove(),n.remove()}),dt(u,W,!1),q.showBranches&&yt(u,h),mt(u,W),dt(u,W,!0),a._K.insertTitle(u,"gitTitleText",q.titleTopMargin??0,l.getDiagramTitle()),(0,s.mj)(void 0,u,q.diagramPadding,q.useMaxWidth)},"draw")},styles:(0,o.K2)(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`,"getStyles")}},9620(t,e,r){"use strict";r.d(e,{diagram:()=>h});var n=r(5553),i=r(3590),a=r(144),s=r(797),o=r(8731),l={parse:(0,s.K2)(async t=>{const e=await(0,o.qg)("info",t);s.Rm.debug(e)},"parse")},c={version:n.n.version+""},h={parser:l,db:{getVersion:(0,s.K2)(()=>c.version,"getVersion")},renderer:{draw:(0,s.K2)((t,e,r)=>{s.Rm.debug("rendering info diagram\n"+t);const n=(0,i.D)(e);(0,a.a$)(n,100,400,!0);n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw")}}},5480(t,e,r){"use strict";r.d(e,{diagram:()=>H});var n=r(2875),i=r(2501),a=r(144),s=r(797),o=r(1444),l=function(){var t=(0,s.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],o=[1,13],l=[1,14],c={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:(0,s.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:n.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:o,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=o[w]&&o[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],o[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=o[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},h=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(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})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(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,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,e,r,n){switch(r){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return c.lexer=h,(0,s.K2)(u,"Parser"),u.prototype=c,c.Parser=u,new u}();l.parser=l;var c=l,h="",u=[],d=[],p=[],f=(0,s.K2)(function(){u.length=0,d.length=0,h="",p.length=0,(0,a.IU)()},"clear"),g=(0,s.K2)(function(t){h=t,u.push(t)},"addSection"),m=(0,s.K2)(function(){return u},"getSections"),y=(0,s.K2)(function(){let t=w();let e=0;for(;!t&&e<100;)t=w(),e++;return d.push(...p),d},"getTasks"),v=(0,s.K2)(function(){const t=[];d.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),b=(0,s.K2)(function(t,e){const r=e.substr(1).split(":");let n=0,i=[];1===r.length?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));const a=i.map(t=>t.trim()),s={section:h,type:h,people:a,task:t,score:n};p.push(s)},"addTask"),x=(0,s.K2)(function(t){const e={section:h,type:h,description:t,task:t,classes:[]};d.push(e)},"addTaskOrg"),w=(0,s.K2)(function(){const t=(0,s.K2)(function(t){return p[t].processed},"compileTask");let e=!0;for(const[r,n]of p.entries())t(r),e=e&&n.processed;return e},"compileTasks"),T=(0,s.K2)(function(){return v()},"getActors"),k={getConfig:(0,s.K2)(()=>(0,a.D7)().journey,"getConfig"),clear:f,setDiagramTitle:a.ke,getDiagramTitle:a.ab,setAccTitle:a.SV,getAccTitle:a.iN,setAccDescription:a.EI,getAccDescription:a.m7,addSection:g,getSections:m,getTasks:y,addTask:b,addTaskOrg:x,getActors:T},A=(0,s.K2)(t=>`.label {\n font-family: ${t.fontFamily};\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 font-family: ${t.fontFamily};\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: ${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 .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 ${(0,i.o)()}\n`,"getStyles"),_=(0,s.K2)(function(t,e){return(0,n.tk)(t,e)},"drawRect"),E=(0,s.K2)(function(t,e){const r=15,n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",r).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function a(t){const n=(0,o.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(r/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(t){const n=(0,o.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(r/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.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")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.K2)(a,"smile"),(0,s.K2)(l,"sad"),(0,s.K2)(c,"ambivalent"),e.score>3?a(i):e.score<3?l(i):c(i),n},"drawFace"),C=(0,s.K2)(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),void 0!==r.class&&r.attr("class",r.class),void 0!==e.title&&r.append("title").text(e.title),r},"drawCircle"),S=(0,s.K2)(function(t,e){return(0,n.m)(t,e)},"drawText"),R=(0,s.K2)(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}(0,s.K2)(r,"genPoints");const n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,S(t,e)},"drawLabel"),L=(0,s.K2)(function(t,e,r){const i=t.append("g"),a=(0,n.PB)();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),a.height=r.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,_(i,a),M(r)(e.text,i,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),D=-1,N=(0,s.K2)(function(t,e,r){const i=e.x+r.width/2,a=t.append("g");D++;a.append("line").attr("id","task"+D).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),E(a,{cx:i,cy:300+30*(5-e.score),score:e.score});const s=(0,n.PB)();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,_(a,s);let o=e.x+14;e.people.forEach(t=>{const r=e.actors[t].color,n={cx:o,cy:e.y,r:7,fill:r,stroke:"#000",title:t,pos:e.actors[t].position};C(a,n),o+=10}),M(r)(e.task,a,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),I=(0,s.K2)(function(t,e){(0,n.lC)(t,e)},"drawBackgroundRect"),M=function(){function t(t,e,r,i,a,s,o,l){n(e.append("text").attr("x",r+a/2).attr("y",i+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,r,i,a,s,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,d=t.split(//gi);for(let p=0;p{const a=$[i].color,s={cx:20,cy:n,r:7,fill:a,stroke:"#000",pos:$[i].position};O.drawCircle(t,s);let o=t.append("text").attr("visibility","hidden").text(i);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=r)c=[i];else{const e=i.split(" ");let n="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=n?`${n} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>r){if(n&&c.push(n),n=t,o.text(t),o.node().getBoundingClientRect().width>r){let e="";for(const n of t)e+=n,o.text(e+"-"),o.node().getBoundingClientRect().width>r&&(c.push(e.slice(0,-1)+"-"),e=n);n=e}}else n=e}),n&&c.push(n),o.remove()}c.forEach((r,i)=>{const a={x:40,y:n+7+20*i,fill:"#666",text:r,textMargin:e.boxTextMargin??5},s=O.drawText(t,a).node().getBoundingClientRect().width;s>B&&s>e.leftMargin-s&&(B=s)}),n+=Math.max(20,20*c.length)})}(0,s.K2)(F,"drawActorLegend");var z=(0,a.D7)().journey,K=0,q=(0,s.K2)(function(t,e,r,n){const i=(0,a.D7)(),s=i.journey.titleColor,l=i.journey.titleFontSize,c=i.journey.titleFontFamily,h=i.securityLevel;let u;"sandbox"===h&&(u=(0,o.Ltv)("#i"+e));const d="sandbox"===h?(0,o.Ltv)(u.nodes()[0].contentDocument.body):(0,o.Ltv)("body");U.init();const p=d.select("#"+e);O.initGraphics(p);const f=n.db.getTasks(),g=n.db.getDiagramTitle(),m=n.db.getActors();for(const a in $)delete $[a];let y=0;m.forEach(t=>{$[t]={color:z.actorColours[y%z.actorColours.length],position:y},y++}),F(p),K=z.leftMargin+B,U.insert(0,0,K,50*Object.keys($).length),Y(p,f,0);const v=U.getBounds();g&&p.append("text").text(g).attr("x",K).attr("font-size",l).attr("font-weight","bold").attr("y",25).attr("fill",s).attr("font-family",c);const b=v.stopy-v.starty+2*z.diagramMarginY,x=K+v.stopx+2*z.diagramMarginX;(0,a.a$)(p,b,x,z.useMaxWidth),p.append("line").attr("x1",K).attr("y1",4*z.height).attr("x2",x-K-4).attr("y2",4*z.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const w=g?70:0;p.attr("viewBox",`${v.startx} -25 ${x} ${b+w}`),p.attr("preserveAspectRatio","xMinYMin meet"),p.attr("height",b+w+25)},"draw"),U={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,s.K2)(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:(0,s.K2)(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:(0,s.K2)(function(t,e,r,n){const i=(0,a.D7)().journey,o=this;let l=0;function c(a){return(0,s.K2)(function(s){l++;const c=o.sequenceItems.length-l+1;o.updateVal(s,"starty",e-c*i.boxMargin,Math.min),o.updateVal(s,"stopy",n+c*i.boxMargin,Math.max),o.updateVal(U.data,"startx",t-c*i.boxMargin,Math.min),o.updateVal(U.data,"stopx",r+c*i.boxMargin,Math.max),"activation"!==a&&(o.updateVal(s,"startx",t-c*i.boxMargin,Math.min),o.updateVal(s,"stopx",r+c*i.boxMargin,Math.max),o.updateVal(U.data,"starty",e-c*i.boxMargin,Math.min),o.updateVal(U.data,"stopy",n+c*i.boxMargin,Math.max))},"updateItemBounds")}(0,s.K2)(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:(0,s.K2)(function(t,e,r,n){const i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(U.data,"startx",i,Math.min),this.updateVal(U.data,"starty",s,Math.min),this.updateVal(U.data,"stopx",a,Math.max),this.updateVal(U.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),bumpVerticalPos:(0,s.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:(0,s.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,s.K2)(function(){return this.data},"getBounds")},j=z.sectionFills,G=z.sectionColours,Y=(0,s.K2)(function(t,e,r){const n=(0,a.D7)().journey;let i="";const s=r+(2*n.height+n.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[a,u]of e.entries()){if(i!==u.section){l=j[o%j.length],h=o%j.length,c=G[o%G.length];let r=0;const s=u.section;for(let t=a;t($[e]&&(t[e]=$[e]),t),{});u.x=a*n.taskMargin+a*n.width+K,u.y=s,u.width=n.diagramMarginX,u.height=n.diagramMarginY,u.colour=c,u.fill=l,u.num=h,u.actors=r,O.drawTask(t,u,n),U.insert(u.x,u.y,u.x+u.width+n.taskMargin,450)}},"drawTasks"),W={setConf:P,draw:q},H={parser:c,db:k,renderer:W,styles:A,init:(0,s.K2)(t=>{W.setConf(t.journey),k.clear()},"init")}},6241(t,e,r){"use strict";r.d(e,{diagram:()=>C});var n=r(3590),i=r(2501),a=r(3981),s=r(5894),o=(r(3245),r(2387),r(607),r(3226),r(144)),l=r(797),c=r(5097),h=r(8041),u=r(5263),d=function(){var t=(0,l.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],f=[1,31],g=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],b=[1,6,7,11,13,16,17,20,23],x=[1,38],w={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,l.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o-1].id),n.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 18:case 23:n.decorateNode({class:a[o]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",a[o-1].id),n.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:n.decorateNode({icon:a[o]});break;case 27:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 30:this.$=a[o-1]+a[o];break;case 31:this.$=a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:r,9:22,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:h,7:u,10:23,11:d},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),t(p,[2,19]),t(p,[2,21],{15:30,24:f}),t(p,[2,22]),t(p,[2,23]),t(g,[2,25]),t(g,[2,26]),t(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(m,[2,14],{7:y,11:v}),t(b,[2,8]),t(b,[2,9]),t(b,[2,10]),t(p,[2,16],{15:37,24:f}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:x}),t(g,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(b,[2,11]),t(b,[2,12]),t(p,[2,15],{24:x}),t(g,[2,30]),{22:[1,41]},t(g,[2,27]),t(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,o="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=s[w]&&s[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],s[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,c,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},T=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(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})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(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,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,r,n){switch(r){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const r=/\n\s*/g;return e.yytext=e.yytext.replace(r,"
    "),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function k(){this.yy={}}return w.lexer=T,(0,l.K2)(k,"Parser"),k.prototype=w,w.Parser=k,new k}();d.parser=d;var p=d,f=[],g=[],m=0,y={},v=(0,l.K2)(()=>{f=[],g=[],m=0,y={}},"clear"),b=(0,l.K2)(t=>{if(0===f.length)return null;const e=f[0].level;let r=null;for(let n=f.length-1;n>=0;n--)if(f[n].level!==e||r||(r=f[n]),f[n].levelt.parentId===n.id);for(const a of i){const e={id:a.id,parentId:n.id,label:(0,o.jZ)(a.label??"",r),isGroup:!1,ticket:a?.ticket,priority:a?.priority,assigned:a?.assigned,icon:a?.icon,shape:"kanbanItem",level:a.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,o.D7)()}},"getData"),T=(0,l.K2)((t,e,r,n,i)=>{const s=(0,o.D7)();let l=s.mindmap?.padding??o.UI.mindmap.padding;switch(n){case k.ROUNDED_RECT:case k.RECT:case k.HEXAGON:l*=2}const c={id:(0,o.jZ)(e,s)||"kbn"+m++,level:t,label:(0,o.jZ)(r,s),width:s.mindmap?.maxNodeWidth??o.UI.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}";const e=(0,a.H)(t,{schema:a.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(c.shape=e?.shape),e?.label&&(c.label=e?.label),e?.icon&&(c.icon=e?.icon.toString()),e?.assigned&&(c.assigned=e?.assigned.toString()),e?.ticket&&(c.ticket=e?.ticket.toString()),e?.priority&&(c.priority=e?.priority)}const h=b(t);h?c.parentId=h.id||"kbn"+m++:g.push(c),f.push(c)},"addNode"),k={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},A={clear:v,addNode:T,getSections:x,getData:w,nodeType:k,getType:(0,l.K2)((t,e)=>{switch(l.Rm.debug("In get type",t,e),t){case"[":return k.RECT;case"(":return")"===e?k.ROUNDED_RECT:k.CLOUD;case"((":return k.CIRCLE;case")":return k.CLOUD;case"))":return k.BANG;case"{{":return k.HEXAGON;default:return k.DEFAULT}},"getType"),setElementForId:(0,l.K2)((t,e)=>{y[t]=e},"setElementForId"),decorateNode:(0,l.K2)(t=>{if(!t)return;const e=(0,o.D7)(),r=f[f.length-1];t.icon&&(r.icon=(0,o.jZ)(t.icon,e)),t.class&&(r.cssClasses=(0,o.jZ)(t.class,e))},"decorateNode"),type2Str:(0,l.K2)(t=>{switch(t){case k.DEFAULT:return"no-border";case k.RECT:return"rect";case k.ROUNDED_RECT:return"rounded-rect";case k.CIRCLE:return"circle";case k.CLOUD:return"cloud";case k.BANG:return"bang";case k.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:(0,l.K2)(()=>l.Rm,"getLogger"),getElementById:(0,l.K2)(t=>y[t],"getElementById")},_={draw:(0,l.K2)(async(t,e,r,i)=>{l.Rm.debug("Rendering kanban diagram\n"+t);const a=i.db.getData(),c=(0,o.D7)();c.htmlLabels=!1;const h=(0,n.D)(e),u=h.append("g");u.attr("class","sections");const d=h.append("g");d.attr("class","items");const p=a.nodes.filter(t=>t.isGroup);let f=0;const g=[];let m=25;for(const n of p){const t=c?.kanban?.sectionWidth||200;f+=1,n.x=t*f+10*(f-1)/2,n.width=t,n.y=0,n.height=3*t,n.rx=5,n.ry=5,n.cssClasses=n.cssClasses+" section-"+f;const e=await(0,s.U)(u,n);m=Math.max(m,e?.labelBBox?.height),g.push(e)}let y=0;for(const n of p){const t=g[y];y+=1;const e=c?.kanban?.sectionWidth||200,r=3*-e/2+m;let i=r;const o=a.nodes.filter(t=>t.parentId===n.id);for(const a of o){if(a.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");a.x=n.x,a.width=e-15;const t=(await(0,s.on)(d,a,{config:c})).node().getBBox();a.y=i+t.height/2,await(0,s.U_)(a),i=a.y+t.height/2+5}const l=t.cluster.select("rect"),h=Math.max(i-r+30,50)+(m-25);l.attr("height",h)}(0,o.ot)(void 0,h,c.mindmap?.padding??o.UI.kanban.padding,c.mindmap?.useMaxWidth??o.UI.kanban.useMaxWidth)},"draw")},E=(0,l.K2)(t=>{let e="";for(let n=0;nt.darkMode?(0,u.A)(e,r):(0,h.A)(e,r),"adjuster");for(let n=0;n`\n .edge {\n stroke-width: 3;\n }\n ${E(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${(0,i.o)()}\n`,"getStyles")}},5822(t,e,r){"use strict";r.d(e,{diagram:()=>A});var n=r(9625),i=r(1152),a=r(45),s=(r(5164),r(8698),r(5894),r(3245),r(2387),r(607),r(3226),r(144)),o=r(797);const l={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let c;const h=new Uint8Array(16);const u=[];for(let _=0;_<256;++_)u.push((_+256).toString(16).slice(1));function d(t,e=0){return(u[t[e+0]]+u[t[e+1]]+u[t[e+2]]+u[t[e+3]]+"-"+u[t[e+4]]+u[t[e+5]]+"-"+u[t[e+6]]+u[t[e+7]]+"-"+u[t[e+8]]+u[t[e+9]]+"-"+u[t[e+10]]+u[t[e+11]]+u[t[e+12]]+u[t[e+13]]+u[t[e+14]]+u[t[e+15]]).toLowerCase()}const p=function(t,e,r){if(l.randomUUID&&!e&&!t)return l.randomUUID();const n=(t=t||{}).random??t.rng?.()??function(){if(!c){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");c=crypto.getRandomValues.bind(crypto)}return c(h)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){if((r=r||0)<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[r+t]=n[t];return e}return d(n)};var f=r(5097),g=r(8041),m=r(5263),y=function(){var t=(0,o.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],f=[1,6,13,15,16,19,22],g=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],v={trace:(0,o.K2)(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:(0,o.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 17:case 21:n.decorateNode({class:a[o]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:n.decorateNode({icon:a[o]});break;case 25:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.getType(a[o-2],a[o])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:l},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:l},{6:h,7:u,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:l},t(f,[2,14],{7:g,11:m}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(f,[2,13],{7:g,11:m}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,o.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=s[w]&&s[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],s[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},b=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(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})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(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,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,e,r,n){switch(r){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function x(){this.yy={}}return v.lexer=b,(0,o.K2)(x,"Parser"),x.prototype=v,v.Parser=x,new x}();y.parser=y;var v=y,b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},x=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=b,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,o.K2)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level0?this.nodes[0]:null}addNode(t,e,r,n){o.Rm.info("addNode",t,e,r,n);let i=!1;0===this.nodes.length?(this.baseLevel=t,t=0,i=!0):void 0!==this.baseLevel&&(t-=this.baseLevel,i=!1);const a=(0,s.D7)();let l=a.mindmap?.padding??s.UI.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:l*=2}const c={id:this.count++,nodeId:(0,s.jZ)(e,a),level:t,descr:(0,s.jZ)(r,a),type:n,children:[],width:a.mindmap?.maxNodeWidth??s.UI.mindmap.maxNodeWidth,padding:l,isRoot:i},h=this.getParent(t);if(h)h.children.push(c),this.nodes.push(c);else{if(!i)throw new Error(`There can be only one root. No parent could be found for ("${c.descr}")`);this.nodes.push(c)}}getType(t,e){switch(o.Rm.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return")"===e?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;const e=(0,s.D7)(),r=this.nodes[this.nodes.length-1];t.icon&&(r.icon=(0,s.jZ)(t.icon,e)),t.class&&(r.class=(0,s.jZ)(t.class,e))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,e){if(0===t.level?t.section=void 0:t.section=e,t.children)for(const[r,n]of t.children.entries()){const i=0===t.level?r:e;this.assignSections(n,i)}}flattenNodes(t,e){const r=["mindmap-node"];!0===t.isRoot?r.push("section-root","section--1"):void 0!==t.section&&r.push(`section-${t.section}`),t.class&&r.push(t.class);const n=r.join(" "),i=(0,o.K2)(t=>{switch(t){case b.CIRCLE:return"mindmapCircle";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexagon";case b.DEFAULT:return"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),a={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,isGroup:!1,shape:i(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:n,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(a),t.children)for(const s of t.children)this.flattenNodes(s,e)}generateEdges(t,e){if(t.children)for(const r of t.children){let n="edge";void 0!==r.section&&(n+=` section-edge-${r.section}`);n+=` edge-depth-${t.level+1}`;const i={id:`edge_${t.id}_${r.id}`,start:t.id.toString(),end:r.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:n,depth:t.level,section:r.section};e.push(i),this.generateEdges(r,e)}}getData(){const t=this.getMindmap(),e=(0,s.D7)(),r=e;if(void 0!==(0,s.TM)().layout||(r.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:r};o.Rm.debug("getData: mindmapRoot",t,e),this.assignSections(t);const n=[],i=[];this.flattenNodes(t,n),this.generateEdges(t,i),o.Rm.debug(`getData: processed ${n.length} nodes and ${i.length} edges`);const a=new Map;for(const s of n)a.set(s.id,{shape:s.shape,width:s.width,height:s.height,padding:s.padding});return{nodes:n,edges:i,config:r,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(a),type:"mindmap",diagramId:"mindmap-"+p()}}getLogger(){return o.Rm}},w={draw:(0,o.K2)(async(t,e,r,l)=>{o.Rm.debug("Rendering mindmap diagram\n"+t);const c=l.db,h=c.getData(),u=(0,n.A)(e,h.config.securityLevel);h.type=l.type,h.layoutAlgorithm=(0,a.q7)(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e;c.getMindmap()&&(h.nodes.forEach(t=>{"rounded"===t.shape?(t.radius=15,t.taper=15,t.stroke="none",t.width=0,t.padding=15):"circle"===t.shape?t.padding=10:"rect"===t.shape&&(t.width=0,t.padding=10)}),await(0,a.XX)(h,u),(0,i.P)(u,h.config.mindmap?.padding??s.UI.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??s.UI.mindmap.useMaxWidth))},"draw")},T=(0,o.K2)(t=>{let e="";for(let r=0;r`\n .edge {\n stroke-width: 3;\n }\n ${T(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .section-root span {\n color: ${t.gitBranchLabel0};\n }\n .section-2 span {\n color: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`,"getStyles"),A={get db(){return new x},renderer:w,parser:v,styles:k}},9412(t,e,r){"use strict";r.d(e,{diagram:()=>E});var n=r(3590),i=r(5871),a=r(3226),s=r(144),o=r(797),l=r(8731),c=r(1444),h=s.UI.pie,u={sections:new Map,showData:!1,config:h},d=u.sections,p=u.showData,f=structuredClone(h),g=(0,o.K2)(()=>structuredClone(f),"getConfig"),m=(0,o.K2)(()=>{d=new Map,p=u.showData,(0,s.IU)()},"clear"),y=(0,o.K2)(({label:t,value:e})=>{if(e<0)throw new Error(`"${t}" has invalid value: ${e}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);d.has(t)||(d.set(t,e),o.Rm.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),v=(0,o.K2)(()=>d,"getSections"),b=(0,o.K2)(t=>{p=t},"setShowData"),x=(0,o.K2)(()=>p,"getShowData"),w={getConfig:g,clear:m,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setAccTitle:s.SV,getAccTitle:s.iN,setAccDescription:s.EI,getAccDescription:s.m7,addSection:y,getSections:v,setShowData:b,getShowData:x},T=(0,o.K2)((t,e)=>{(0,i.S)(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),k={parse:(0,o.K2)(async t=>{const e=await(0,l.qg)("pie",t);o.Rm.debug(e),T(e,w)},"parse")},A=(0,o.K2)(t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\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`,"getStyles"),_=(0,o.K2)(t=>{const e=[...t.values()].reduce((t,e)=>t+e,0),r=[...t.entries()].map(([t,e])=>({label:t,value:e})).filter(t=>t.value/e*100>=1).sort((t,e)=>e.value-t.value);return(0,c.rLf)().value(t=>t.value)(r)},"createPieArcs"),E={parser:k,db:w,renderer:{draw:(0,o.K2)((t,e,r,i)=>{o.Rm.debug("rendering pie chart\n"+t);const l=i.db,h=(0,s.D7)(),u=(0,a.$t)(l.getConfig(),h.pie),d=18,p=450,f=p,g=(0,n.D)(e),m=g.append("g");m.attr("transform","translate(225,225)");const{themeVariables:y}=h;let[v]=(0,a.I5)(y.pieOuterStrokeWidth);v??=2;const b=u.textPosition,x=Math.min(f,p)/2-40,w=(0,c.JLW)().innerRadius(0).outerRadius(x),T=(0,c.JLW)().innerRadius(x*b).outerRadius(x*b);m.append("circle").attr("cx",0).attr("cy",0).attr("r",x+v/2).attr("class","pieOuterCircle");const k=l.getSections(),A=_(k),E=[y.pie1,y.pie2,y.pie3,y.pie4,y.pie5,y.pie6,y.pie7,y.pie8,y.pie9,y.pie10,y.pie11,y.pie12];let C=0;k.forEach(t=>{C+=t});const S=A.filter(t=>"0"!==(t.data.value/C*100).toFixed(0)),R=(0,c.UMr)(E);m.selectAll("mySlices").data(S).enter().append("path").attr("d",w).attr("fill",t=>R(t.data.label)).attr("class","pieCircle"),m.selectAll("mySlices").data(S).enter().append("text").text(t=>(t.data.value/C*100).toFixed(0)+"%").attr("transform",t=>"translate("+T.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),m.append("text").text(l.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const L=[...k.entries()].map(([t,e])=>({label:t,value:e})),D=m.selectAll(".legend").data(L).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*L.length/2)+")");D.append("rect").attr("width",d).attr("height",d).style("fill",t=>R(t.label)).style("stroke",t=>R(t.label)),D.append("text").attr("x",22).attr("y",14).text(t=>l.getShowData()?`${t.label} [${t.value}]`:t.label);const N=512+Math.max(...D.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0));g.attr("viewBox",`0 0 ${N} 450`),(0,s.a$)(g,p,N,u.useMaxWidth)},"draw")},styles:A}},1203(t,e,r){"use strict";r.d(e,{diagram:()=>D});var n=r(144),i=r(797),a=r(1444),s=function(){var t=(0,i.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,3],r=[1,4],n=[1,5],a=[1,6],s=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],h=[2,36],u=[1,37],d=[1,36],p=[1,38],f=[1,35],g=[1,43],m=[1,41],y=[1,14],v=[1,23],b=[1,18],x=[1,19],w=[1,20],T=[1,21],k=[1,22],A=[1,24],_=[1,25],E=[1,26],C=[1,27],S=[1,28],R=[1,29],L=[1,32],D=[1,33],N=[1,34],I=[1,39],M=[1,40],O=[1,42],P=[1,44],$=[1,62],B=[1,61],F=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],z=[1,65],K=[1,66],q=[1,67],U=[1,68],j=[1,69],G=[1,70],Y=[1,71],W=[1,72],H=[1,73],V=[1,74],X=[1,75],Z=[1,76],Q=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],rt=[1,99],nt=[1,93],it=[1,96],at=[1,94],st=[1,95],ot=[1,97],lt=[1,98],ct=[1,102],ht=[10,55,56,57],ut=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],dt={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,i.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 23:case 68:this.$=a[o];break;case 24:case 69:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],n.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),n.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 46:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:n.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:n.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:n.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:n.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:n.setXAxisLeftText(a[o-2]),n.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",n.setXAxisLeftText(a[o-1]);break;case 53:n.setXAxisLeftText(a[o]);break;case 54:n.setYAxisBottomText(a[o-2]),n.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",n.setYAxisBottomText(a[o-1]);break;case 56:n.setYAxisBottomText(a[o]);break;case 57:n.setQuadrant1Text(a[o]);break;case 58:n.setQuadrant2Text(a[o]);break;case 59:n.setQuadrant3Text(a[o]);break;case 60:n.setQuadrant4Text(a[o]);break;case 64:case 66:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 67:this.$={text:a[o],type:"markdown"}}},"anonymous"),table:[{18:e,26:1,27:2,28:r,55:n,56:a,57:s},{1:[3]},{18:e,26:8,27:2,28:r,55:n,56:a,57:s},{18:e,26:9,27:2,28:r,55:n,56:a,57:s},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(c,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:d,10:p,12:f,13:g,14:m,18:y,25:v,35:b,37:x,39:w,41:T,42:k,48:A,50:_,51:E,52:C,53:S,54:R,60:L,61:D,63:N,64:I,65:M,66:O,67:P}),t(o,[2,34]),{27:45,55:n,56:a,57:s},t(c,[2,37]),t(c,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:u,5:d,10:p,12:f,13:g,14:m,18:y,25:v,35:b,37:x,39:w,41:T,42:k,48:A,50:_,51:E,52:C,53:S,54:R,60:L,61:D,63:N,64:I,65:M,66:O,67:P}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(c,[2,45]),t(c,[2,46]),{18:[1,50]},{4:u,5:d,10:p,12:f,13:g,14:m,43:51,58:31,60:L,61:D,63:N,64:I,65:M,66:O,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,43:52,58:31,60:L,61:D,63:N,64:I,65:M,66:O,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,43:53,58:31,60:L,61:D,63:N,64:I,65:M,66:O,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,43:54,58:31,60:L,61:D,63:N,64:I,65:M,66:O,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,43:55,58:31,60:L,61:D,63:N,64:I,65:M,66:O,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,43:56,58:31,60:L,61:D,63:N,64:I,65:M,66:O,67:P},{4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,44:[1,57],47:[1,58],58:60,59:59,63:N,64:I,65:M,66:O,67:P},t(F,[2,64]),t(F,[2,66]),t(F,[2,67]),t(F,[2,70]),t(F,[2,71]),t(F,[2,72]),t(F,[2,73]),t(F,[2,74]),t(F,[2,75]),t(F,[2,76]),t(F,[2,77]),t(F,[2,78]),t(F,[2,79]),t(F,[2,80]),t(o,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:64,4:z,5:K,6:q,7:U,8:j,9:G,10:Y,11:W,12:H,13:V,14:X,15:Z,21:63},t(c,[2,53],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,49:[1,77],63:N,64:I,65:M,66:O,67:P}),t(c,[2,56],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,49:[1,78],63:N,64:I,65:M,66:O,67:P}),t(c,[2,57],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:N,64:I,65:M,66:O,67:P}),t(c,[2,58],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:N,64:I,65:M,66:O,67:P}),t(c,[2,59],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:N,64:I,65:M,66:O,67:P}),t(c,[2,60],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:N,64:I,65:M,66:O,67:P}),{45:[1,79]},{44:[1,80]},t(F,[2,65]),t(F,[2,81]),t(F,[2,82]),t(F,[2,83]),{3:82,4:z,5:K,6:q,7:U,8:j,9:G,10:Y,11:W,12:H,13:V,14:X,15:Z,18:[1,81]},t(Q,[2,23]),t(Q,[2,1]),t(Q,[2,2]),t(Q,[2,3]),t(Q,[2,4]),t(Q,[2,5]),t(Q,[2,6]),t(Q,[2,7]),t(Q,[2,8]),t(Q,[2,9]),t(Q,[2,10]),t(Q,[2,11]),t(Q,[2,12]),t(c,[2,52],{58:31,43:83,4:u,5:d,10:p,12:f,13:g,14:m,60:L,61:D,63:N,64:I,65:M,66:O,67:P}),t(c,[2,55],{58:31,43:84,4:u,5:d,10:p,12:f,13:g,14:m,60:L,61:D,63:N,64:I,65:M,66:O,67:P}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:rt,11:nt,13:it,16:89,17:at,18:st,19:ot,20:lt,22:88,23:87},t(Q,[2,24]),t(c,[2,51],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:N,64:I,65:M,66:O,67:P}),t(c,[2,54],{59:59,58:60,4:u,5:d,8:$,10:p,12:f,13:g,14:m,18:B,63:N,64:I,65:M,66:O,67:P}),t(c,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:rt,11:nt,13:it,17:at,18:st,19:ot,20:lt}),{46:[1,101]},t(c,[2,29],{10:ct}),t(ht,[2,27],{16:103,4:J,5:tt,6:et,8:rt,11:nt,13:it,17:at,18:st,19:ot,20:lt}),t(ut,[2,25]),t(ut,[2,13]),t(ut,[2,14]),t(ut,[2,15]),t(ut,[2,16]),t(ut,[2,17]),t(ut,[2,18]),t(ut,[2,19]),t(ut,[2,20]),t(ut,[2,21]),t(ut,[2,22]),t(c,[2,49],{10:ct}),t(c,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:rt,11:nt,13:it,17:at,18:st,19:ot,20:lt}),{4:J,5:tt,6:et,8:rt,11:nt,13:it,16:89,17:at,18:st,19:ot,20:lt,22:105},t(ut,[2,26]),t(c,[2,50],{10:ct}),t(ht,[2,28],{16:103,4:J,5:tt,6:et,8:rt,11:nt,13:it,17:at,18:st,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,i.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,i.K2)(function(t){var e=this,r=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=s.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;s.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(t){r.length=r.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),(0,i.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=o[w]&&o[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],o[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),a.push(p.yytext),s.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=a[a.length-_],S._$={first_line:s[s.length-(_||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(_||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(_||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],a,s].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),a=a.slice(0,-1*_),s=s.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),a.push(S.$),s.push(S._$),E=o[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},pt=function(){return{EOF:1,parseError:(0,i.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,i.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,i.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,i.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(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})},"reject"),less:(0,i.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,i.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(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,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,i.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,i.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(t,e,r,n){switch(r){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function ft(){this.yy={}}return dt.lexer=pt,(0,i.K2)(ft,"Parser"),ft.prototype=dt,dt.Parser=ft,new ft}();s.parser=s;var o=s,l=(0,n.P$)(),c=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,i.K2)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:n.UI.quadrantChart?.chartWidth||500,chartWidth:n.UI.quadrantChart?.chartHeight||500,titlePadding:n.UI.quadrantChart?.titlePadding||10,titleFontSize:n.UI.quadrantChart?.titleFontSize||20,quadrantPadding:n.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:n.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:n.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:n.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:n.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:n.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:n.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:n.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:n.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:n.UI.quadrantChart?.pointRadius||5,xAxisPosition:n.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:n.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:n.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:n.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:l.quadrant1Fill,quadrant2Fill:l.quadrant2Fill,quadrant3Fill:l.quadrant3Fill,quadrant4Fill:l.quadrant4Fill,quadrant1TextFill:l.quadrant1TextFill,quadrant2TextFill:l.quadrant2TextFill,quadrant3TextFill:l.quadrant3TextFill,quadrant4TextFill:l.quadrant4TextFill,quadrantPointFill:l.quadrantPointFill,quadrantPointTextFill:l.quadrantPointTextFill,quadrantXAxisTextFill:l.quadrantXAxisTextFill,quadrantYAxisTextFill:l.quadrantYAxisTextFill,quadrantTitleFill:l.quadrantTitleFill,quadrantInternalBorderStrokeFill:l.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:l.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,i.Rm.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){i.Rm.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){i.Rm.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,n){const i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,a={top:"top"===t&&e?i:0,bottom:"bottom"===t&&e?i:0},s=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&r?s:0,right:"right"===this.config.yAxisPosition&&r?s:0},l=this.config.titleFontSize+2*this.config.titlePadding,c={top:n?l:0},h=this.config.quadrantPadding+o.left,u=this.config.quadrantPadding+a.top+c.top,d=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,p=this.config.chartHeight-2*this.config.quadrantPadding-a.top-a.bottom-c.top;return{xAxisSpace:a,yAxisSpace:o,titleSpace:c,quadrantSpace:{quadrantLeft:h,quadrantTop:u,quadrantWidth:d,quadrantHalfWidth:d/2,quadrantHeight:p,quadrantHalfHeight:p/2}}}getAxisLabels(t,e,r,n){const{quadrantSpace:i,titleSpace:a}=n,{quadrantHalfHeight:s,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:c,quadrantTop:h,quadrantWidth:u}=i,d=Boolean(this.data.xAxisRightText),p=Boolean(this.data.yAxisTopText),f=[];return this.data.xAxisLeftText&&e&&f.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(d?c/2:0),y:"top"===t?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&f.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+c+(d?c/2:0),y:"top"===t?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&f.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+u+this.config.quadrantPadding,y:h+o-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&f.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+u+this.config.quadrantPadding,y:h+s-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),f}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a}=e,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a,width:i,height:r,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a,width:i,height:r,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant4Fill}];for(const o of s)o.text.x=o.x+o.width/2,0===this.data.points.length?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return s}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:s}=e,o=(0,a.m4Y)().domain([0,1]).range([n,s+n]),l=(0,a.m4Y)().domain([0,1]).range([r+i,i]);return this.data.points.map(t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:o(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:r}=t,{quadrantHalfHeight:n,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:s,quadrantTop:o,quadrantWidth:l}=r;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o,x2:a+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:o+e,x2:a+l,y2:o+i-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o+i,x2:a+l+e,y2:o+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:o+e,x2:a,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+s,y1:o+e,x2:a+s,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+e,y1:o+n,x2:a+l-e,y2:o+n}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=this.data.points.length>0?"bottom":this.config.xAxisPosition,i=this.calculateSpace(n,t,e,r);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(n,t,e,i),borderLines:this.getBorders(i),title:this.getTitle(r)}}},h=class extends Error{static{(0,i.K2)(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid ${r}`),this.name="InvalidStyleError"}};function u(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function d(t){return!/^\d+$/.test(t)}function p(t){return!/^\d+px$/.test(t)}(0,i.K2)(u,"validateHexCode"),(0,i.K2)(d,"validateNumber"),(0,i.K2)(p,"validateSizeInPixels");var f=(0,n.D7)();function g(t){return(0,n.jZ)(t.trim(),f)}(0,i.K2)(g,"textSanitizer");var m=new c;function y(t){m.setData({quadrant1Text:g(t.text)})}function v(t){m.setData({quadrant2Text:g(t.text)})}function b(t){m.setData({quadrant3Text:g(t.text)})}function x(t){m.setData({quadrant4Text:g(t.text)})}function w(t){m.setData({xAxisLeftText:g(t.text)})}function T(t){m.setData({xAxisRightText:g(t.text)})}function k(t){m.setData({yAxisTopText:g(t.text)})}function A(t){m.setData({yAxisBottomText:g(t.text)})}function _(t){const e={};for(const r of t){const[t,n]=r.trim().split(/\s*:\s*/);if("radius"===t){if(d(n))throw new h(t,n,"number");e.radius=parseInt(n)}else if("color"===t){if(u(n))throw new h(t,n,"hex code");e.color=n}else if("stroke-color"===t){if(u(n))throw new h(t,n,"hex code");e.strokeColor=n}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(p(n))throw new h(t,n,"number of pixels (eg. 10px)");e.strokeWidth=n}}return e}function E(t,e,r,n,i){const a=_(i);m.addPoints([{x:r,y:n,text:g(t.text),className:e,...a}])}function C(t,e){m.addClass(t,_(e))}function S(t){m.setConfig({chartWidth:t})}function R(t){m.setConfig({chartHeight:t})}function L(){const t=(0,n.D7)(),{themeVariables:e,quadrantChart:r}=t;return r&&m.setConfig(r),m.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),m.setData({titleText:(0,n.ab)()}),m.build()}(0,i.K2)(y,"setQuadrant1Text"),(0,i.K2)(v,"setQuadrant2Text"),(0,i.K2)(b,"setQuadrant3Text"),(0,i.K2)(x,"setQuadrant4Text"),(0,i.K2)(w,"setXAxisLeftText"),(0,i.K2)(T,"setXAxisRightText"),(0,i.K2)(k,"setYAxisTopText"),(0,i.K2)(A,"setYAxisBottomText"),(0,i.K2)(_,"parseStyles"),(0,i.K2)(E,"addPoint"),(0,i.K2)(C,"addClass"),(0,i.K2)(S,"setWidth"),(0,i.K2)(R,"setHeight"),(0,i.K2)(L,"getQuadrantData");var D={parser:o,db:{setWidth:S,setHeight:R,setQuadrant1Text:y,setQuadrant2Text:v,setQuadrant3Text:b,setQuadrant4Text:x,setXAxisLeftText:w,setXAxisRightText:T,setYAxisTopText:k,setYAxisBottomText:A,parseStyles:_,addPoint:E,addClass:C,getQuadrantData:L,clear:(0,i.K2)(function(){m.clear(),(0,n.IU)()},"clear"),setAccTitle:n.SV,getAccTitle:n.iN,setDiagramTitle:n.ke,getDiagramTitle:n.ab,getAccDescription:n.m7,setAccDescription:n.EI},renderer:{draw:(0,i.K2)((t,e,r,s)=>{function o(t){return"top"===t?"hanging":"middle"}function l(t){return"left"===t?"start":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,i.K2)(o,"getDominantBaseLine"),(0,i.K2)(l,"getTextAnchor"),(0,i.K2)(c,"getTransformation");const h=(0,n.D7)();i.Rm.debug("Rendering quadrant chart\n"+t);const u=h.securityLevel;let d;"sandbox"===u&&(d=(0,a.Ltv)("#i"+e));const p=("sandbox"===u?(0,a.Ltv)(d.nodes()[0].contentDocument.body):(0,a.Ltv)("body")).select(`[id="${e}"]`),f=p.append("g").attr("class","main"),g=h.quadrantChart?.chartWidth??500,m=h.quadrantChart?.chartHeight??500;(0,n.a$)(p,m,g,h.quadrantChart?.useMaxWidth??!0),p.attr("viewBox","0 0 "+g+" "+m),s.db.setHeight(m),s.db.setWidth(g);const y=s.db.getQuadrantData(),v=f.append("g").attr("class","quadrants"),b=f.append("g").attr("class","border"),x=f.append("g").attr("class","data-points"),w=f.append("g").attr("class","labels"),T=f.append("g").attr("class","title");y.title&&T.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",o(y.title.horizontalPos)).attr("text-anchor",l(y.title.verticalPos)).attr("transform",c(y.title)).text(y.title.text),y.borderLines&&b.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth);const k=v.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),k.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>o(t.text.horizontalPos)).attr("text-anchor",t=>l(t.text.verticalPos)).attr("transform",t=>c(t.text)).text(t=>t.text.text);w.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>o(t.horizontalPos)).attr("text-anchor",t=>l(t.verticalPos)).attr("transform",t=>c(t));const A=x.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");A.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),A.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>o(t.text.horizontalPos)).attr("text-anchor",t=>l(t.text.verticalPos)).attr("transform",t=>c(t.text))},"draw")},styles:(0,i.K2)(()=>"","styles")}},9032(t,e,r){"use strict";r.d(e,{diagram:()=>g});var n=r(9625),i=r(1152),a=r(45),s=(r(5164),r(8698),r(5894),r(3245),r(2387),r(607),r(3226)),o=r(144),l=r(797),c=function(){var t=(0,l.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],o=[2,7],c=[1,26],h=[1,27],u=[1,28],d=[1,29],p=[1,33],f=[1,34],g=[1,35],m=[1,36],y=[1,37],v=[1,38],b=[1,24],x=[1,31],w=[1,32],T=[1,30],k=[1,39],A=[1,40],_=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],C=[89,90],S=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],R=[27,29],L=[1,70],D=[1,71],N=[1,72],I=[1,73],M=[1,74],O=[1,75],P=[1,76],$=[1,83],B=[1,80],F=[1,84],z=[1,85],K=[1,86],q=[1,87],U=[1,88],j=[1,89],G=[1,90],Y=[1,91],W=[1,92],H=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],V=[63,64],X=[1,101],Z=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Q=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],J=[1,110],tt=[1,106],et=[1,107],rt=[1,108],nt=[1,109],it=[1,111],at=[1,116],st=[1,117],ot=[1,114],lt=[1,115],ct={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:(0,l.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 4:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(a[o-3],a[o-4]);break;case 22:n.addRequirement(a[o-5],a[o-6]),n.setClass([a[o-5]],a[o-3]);break;case 23:n.setNewReqId(a[o-2]);break;case 24:n.setNewReqText(a[o-2]);break;case 25:n.setNewReqRisk(a[o-2]);break;case 26:n.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(a[o-3]);break;case 43:n.addElement(a[o-5]),n.setClass([a[o-5]],a[o-3]);break;case 44:n.setNewElementType(a[o-2]);break;case 45:n.setNewElementDocRef(a[o-2]);break;case 48:n.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:n.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 58:n.setClass(a[o-1],a[o]);break;case 59:n.setClass([a[o-2]],a[o]);break;case 60:case 62:case 65:this.$=[a[o]];break;case 61:case 63:this.$=a[o-2].concat([a[o]]);break;case 64:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 66:a[o-2].push(a[o]),this.$=a[o-2];break;case 68:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,6:e,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:i},{1:[2,2]},{4:17,5:s,7:13,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:w,77:T,89:k,90:A},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:w,77:T,89:k,90:A},{4:17,5:s,7:43,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:w,77:T,89:k,90:A},{4:17,5:s,7:44,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:w,77:T,89:k,90:A},{4:17,5:s,7:45,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:w,77:T,89:k,90:A},{4:17,5:s,7:46,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:w,77:T,89:k,90:A},{4:17,5:s,7:47,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:w,77:T,89:k,90:A},{4:17,5:s,7:48,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:w,77:T,89:k,90:A},{4:17,5:s,7:49,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:w,77:T,89:k,90:A},{4:17,5:s,7:50,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:w,77:T,89:k,90:A},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(_,[2,17]),t(_,[2,18]),t(_,[2,19]),t(_,[2,20]),{30:60,33:62,75:E,89:k,90:A},{30:63,33:62,75:E,89:k,90:A},{30:64,33:62,75:E,89:k,90:A},t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),t(S,[2,81]),t(S,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(R,[2,79]),t(R,[2,80]),{27:[1,67],29:[1,68]},t(R,[2,85]),t(R,[2,86]),{62:69,65:L,66:D,67:N,68:I,69:M,70:O,71:P},{62:77,65:L,66:D,67:N,68:I,69:M,70:O,71:P},{30:78,33:62,75:E,89:k,90:A},{73:79,75:$,76:B,78:81,79:82,80:F,81:z,82:K,83:q,84:U,85:j,86:G,87:Y,88:W},t(H,[2,60]),t(H,[2,62]),{73:93,75:$,76:B,78:81,79:82,80:F,81:z,82:K,83:q,84:U,85:j,86:G,87:Y,88:W},{30:94,33:62,75:E,76:B,89:k,90:A},{5:[1,95]},{30:96,33:62,75:E,89:k,90:A},{5:[1,97]},{30:98,33:62,75:E,89:k,90:A},{63:[1,99]},t(V,[2,50]),t(V,[2,51]),t(V,[2,52]),t(V,[2,53]),t(V,[2,54]),t(V,[2,55]),t(V,[2,56]),{64:[1,100]},t(_,[2,59],{76:B}),t(_,[2,64],{76:X}),{33:103,75:[1,102],89:k,90:A},t(Z,[2,65],{79:104,75:$,80:F,81:z,82:K,83:q,84:U,85:j,86:G,87:Y,88:W}),t(Q,[2,67]),t(Q,[2,69]),t(Q,[2,70]),t(Q,[2,71]),t(Q,[2,72]),t(Q,[2,73]),t(Q,[2,74]),t(Q,[2,75]),t(Q,[2,76]),t(Q,[2,77]),t(Q,[2,78]),t(_,[2,57],{76:X}),t(_,[2,58],{76:B}),{5:J,28:105,31:tt,34:et,36:rt,38:nt,40:it},{27:[1,112],76:B},{5:at,40:st,56:113,57:ot,59:lt},{27:[1,118],76:B},{33:119,89:k,90:A},{33:120,89:k,90:A},{75:$,78:121,79:82,80:F,81:z,82:K,83:q,84:U,85:j,86:G,87:Y,88:W},t(H,[2,61]),t(H,[2,63]),t(Q,[2,68]),t(_,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:J,28:126,31:tt,34:et,36:rt,38:nt,40:it},t(_,[2,28]),{5:[1,127]},t(_,[2,42]),{32:[1,128]},{32:[1,129]},{5:at,40:st,56:130,57:ot,59:lt},t(_,[2,47]),{5:[1,131]},t(_,[2,48]),t(_,[2,49]),t(Z,[2,66],{79:104,75:$,80:F,81:z,82:K,83:q,84:U,85:j,86:G,87:Y,88:W}),{33:132,89:k,90:A},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(_,[2,27]),{5:J,28:145,31:tt,34:et,36:rt,38:nt,40:it},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(_,[2,46]),{5:at,40:st,56:152,57:ot,59:lt},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(_,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(_,[2,43]),{5:J,28:159,31:tt,34:et,36:rt,38:nt,40:it},{5:J,28:160,31:tt,34:et,36:rt,38:nt,40:it},{5:J,28:161,31:tt,34:et,36:rt,38:nt,40:it},{5:J,28:162,31:tt,34:et,36:rt,38:nt,40:it},{5:at,40:st,56:163,57:ot,59:lt},{5:at,40:st,56:164,57:ot,59:lt},t(_,[2,23]),t(_,[2,24]),t(_,[2,25]),t(_,[2,26]),t(_,[2,44]),t(_,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,o="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=s[w]&&s[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],s[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,c,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},ht=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(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})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(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,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,r,n){switch(r){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return e.yytext=e.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function ut(){this.yy={}}return ct.lexer=ht,(0,l.K2)(ut,"Parser"),ut.prototype=ct,ct.Parser=ut,new ut}();c.parser=c;var h=c,u=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setAccDescription=o.EI,this.getAccDescription=o.m7,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getConfig=(0,l.K2)(()=>(0,o.D7)().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,l.K2)(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,e){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:e,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=t)}setNewReqText(t){void 0!==this.latestRequirement&&(this.latestRequirement.text=t)}setNewReqRisk(t){void 0!==this.latestRequirement&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),l.Rm.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){void 0!==this.latestElement&&(this.latestElement.type=t)}setNewElementDocRef(t){void 0!==this.latestElement&&(this.latestElement.docRef=t)}addRelationship(t,e,r){this.relations.push({type:t,src:e,dst:r})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,(0,o.IU)()}setCssStyle(t,e){for(const r of t){const t=this.requirements.get(r)??this.elements.get(r);if(!e||!t)return;for(const r of e)r.includes(",")?t.cssStyles.push(...r.split(",")):t.cssStyles.push(r)}}setClass(t,e){for(const r of t){const t=this.requirements.get(r)??this.elements.get(r);if(t)for(const r of e){t.classes.push(r);const e=this.classes.get(r)?.styles;e&&t.cssStyles.push(...e)}}}defineClass(t,e){for(const r of t){let t=this.classes.get(r);void 0===t&&(t={id:r,styles:[],textStyles:[]},this.classes.set(r,t)),e&&e.forEach(function(e){if(/color/.exec(e)){const r=e.replace("fill","bgFill");t.textStyles.push(r)}t.styles.push(e)}),this.requirements.forEach(t=>{t.classes.includes(r)&&t.cssStyles.push(...e.flatMap(t=>t.split(",")))}),this.elements.forEach(t=>{t.classes.includes(r)&&t.cssStyles.push(...e.flatMap(t=>t.split(",")))})}}getClasses(){return this.classes}getData(){const t=(0,o.D7)(),e=[],r=[];for(const n of this.requirements.values()){const r=n;r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(" "),r.shape="requirementBox",r.look=t.look,e.push(r)}for(const n of this.elements.values()){const r=n;r.shape="requirementBox",r.look=t.look,r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(" "),e.push(r)}for(const n of this.relations){let e=0;const i=n.type===this.Relationships.CONTAINS,a={id:`${n.src}-${n.dst}-${e}`,start:this.requirements.get(n.src)?.name??this.elements.get(n.src)?.name,end:this.requirements.get(n.dst)?.name??this.elements.get(n.dst)?.name,label:`<<${n.type}>>`,classes:"relationshipLine",style:["fill:none",i?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:i?"normal":"dashed",arrowTypeStart:i?"requirement_contains":"",arrowTypeEnd:i?"":"requirement_arrow",look:t.look};r.push(a),e++}return{nodes:e,edges:r,other:{},config:t,direction:this.getDirection()}}},d=(0,l.K2)(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: 1.0;\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: 1.0;\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 .divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n`,"getStyles"),p={};(0,l.VA)(p,{draw:()=>f});var f=(0,l.K2)(async function(t,e,r,c){l.Rm.info("REF0:"),l.Rm.info("Drawing requirement diagram (unified)",e);const{securityLevel:h,state:u,layout:d}=(0,o.D7)(),p=c.db.getData(),f=(0,n.A)(e,h);p.type=c.type,p.layoutAlgorithm=(0,a.q7)(d),p.nodeSpacing=u?.nodeSpacing??50,p.rankSpacing=u?.rankSpacing??50,p.markers=["requirement_contains","requirement_arrow"],p.diagramId=e,await(0,a.XX)(p,f);s._K.insertTitle(f,"requirementDiagramTitleText",u?.titleTopMargin??25,c.db.getDiagramTitle()),(0,i.P)(f,8,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),g={parser:h,get db(){return new u},renderer:p,styles:d}},2009(t,e,r){"use strict";r.d(e,{diagram:()=>ot});var n=r(144),i=r(797),a=r(1444);function s(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r>n||void 0===r&&n>=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function o(t){return t.target.depth}function l(t,e){return t.sourceLinks.length?t.depth:e-1}function c(t,e){let r=0;if(void 0===e)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i)}return r}function h(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r=i)&&(r=i)}return r}function u(t){return function(){return t}}function d(t,e){return f(t.source,e.source)||t.index-e.index}function p(t,e){return f(t.target,e.target)||t.index-e.index}function f(t,e){return t.y0-e.y0}function g(t){return t.value}function m(t){return t.index}function y(t){return t.nodes}function v(t){return t.links}function b(t,e){const r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function x({nodes:t}){for(const e of t){let t=e.y0,r=t;for(const n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(const n of e.targetLinks)n.y1=r+n.width/2,r+=n.width}}function w(){let t,e,r,n=0,i=0,a=1,o=1,w=24,T=8,k=m,A=l,_=y,E=v,C=6;function S(){const l={nodes:_.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:e}){for(const[r,i]of t.entries())i.index=r,i.sourceLinks=[],i.targetLinks=[];const n=new Map(t.map((e,r)=>[k(e,r,t),e]));for(const[r,i]of e.entries()){i.index=r;let{source:t,target:e}=i;"object"!=typeof t&&(t=i.source=b(n,t)),"object"!=typeof e&&(e=i.target=b(n,e)),t.sourceLinks.push(i),e.targetLinks.push(i)}if(null!=r)for(const{sourceLinks:i,targetLinks:a}of t)i.sort(r),a.sort(r)}(l),function({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(c(e.sourceLinks,g),c(e.targetLinks,g)):e.fixedValue}(l),function({nodes:t}){const e=t.length;let r=new Set(t),n=new Set,i=0;for(;r.size;){for(const t of r){t.depth=i;for(const{target:e}of t.sourceLinks)n.add(e)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}(l),function({nodes:t}){const e=t.length;let r=new Set(t),n=new Set,i=0;for(;r.size;){for(const t of r){t.height=i;for(const{source:e}of t.targetLinks)n.add(e)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}(l),function(r){const l=function({nodes:t}){const r=h(t,t=>t.depth)+1,i=(a-n-w)/(r-1),s=new Array(r);for(const e of t){const t=Math.max(0,Math.min(r-1,Math.floor(A.call(null,e,r))));e.layer=t,e.x0=n+t*i,e.x1=e.x0+w,s[t]?s[t].push(e):s[t]=[e]}if(e)for(const n of s)n.sort(e);return s}(r);t=Math.min(T,(o-i)/(h(l,t=>t.length)-1)),function(e){const r=s(e,e=>(o-i-(e.length-1)*t)/c(e,g));for(const n of e){let e=i;for(const i of n){i.y0=e,i.y1=e+i.value*r,e=i.y1+t;for(const t of i.sourceLinks)t.width=t.value*r}e=(o-e+t)/(n.length+1);for(let t=0;t0))continue;let i=(e/n-t.y0)*r;t.y0+=i,t.y1+=i,M(t)}void 0===e&&a.sort(f),D(a,n)}}function L(t,r,n){for(let i=t.length-2;i>=0;--i){const a=t[i];for(const t of a){let e=0,n=0;for(const{target:r,value:a}of t.sourceLinks){let i=a*(r.layer-t.layer);e+=$(t,r)*i,n+=i}if(!(n>0))continue;let i=(e/n-t.y0)*r;t.y0+=i,t.y1+=i,M(t)}void 0===e&&a.sort(f),D(a,n)}}function D(e,r){const n=e.length>>1,a=e[n];I(e,a.y0-t,n-1,r),N(e,a.y1+t,n+1,r),I(e,o,e.length-1,r),N(e,i,0,r)}function N(e,r,n,i){for(;n1e-6&&(a.y0+=s,a.y1+=s),r=a.y1+t}}function I(e,r,n,i){for(;n>=0;--n){const a=e[n],s=(a.y1-r)*i;s>1e-6&&(a.y0-=s,a.y1-=s),r=a.y0-t}}function M({sourceLinks:t,targetLinks:e}){if(void 0===r){for(const{source:{sourceLinks:t}}of e)t.sort(p);for(const{target:{targetLinks:e}}of t)e.sort(d)}}function O(t){if(void 0===r)for(const{sourceLinks:e,targetLinks:r}of t)e.sort(p),r.sort(d)}function P(e,r){let n=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:i,width:a}of e.sourceLinks){if(i===r)break;n+=a+t}for(const{source:t,width:i}of r.targetLinks){if(t===e)break;n-=i}return n}function $(e,r){let n=r.y0-(r.targetLinks.length-1)*t/2;for(const{source:i,width:a}of r.targetLinks){if(i===e)break;n+=a+t}for(const{target:t,width:i}of e.sourceLinks){if(t===r)break;n-=i}return n}return S.update=function(t){return x(t),t},S.nodeId=function(t){return arguments.length?(k="function"==typeof t?t:u(t),S):k},S.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:u(t),S):A},S.nodeSort=function(t){return arguments.length?(e=t,S):e},S.nodeWidth=function(t){return arguments.length?(w=+t,S):w},S.nodePadding=function(e){return arguments.length?(T=t=+e,S):T},S.nodes=function(t){return arguments.length?(_="function"==typeof t?t:u(t),S):_},S.links=function(t){return arguments.length?(E="function"==typeof t?t:u(t),S):E},S.linkSort=function(t){return arguments.length?(r=t,S):r},S.size=function(t){return arguments.length?(n=i=0,a=+t[0],o=+t[1],S):[a-n,o-i]},S.extent=function(t){return arguments.length?(n=+t[0][0],a=+t[1][0],i=+t[0][1],o=+t[1][1],S):[[n,i],[a,o]]},S.iterations=function(t){return arguments.length?(C=+t,S):C},S}var T=Math.PI,k=2*T,A=1e-6,_=k-A;function E(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function C(){return new E}E.prototype=C.prototype={constructor:E,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,s=this._y1,o=r-t,l=n-e,c=a-t,h=s-e,u=c*c+h*h;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(u>A)if(Math.abs(h*o-l*c)>A&&i){var d=r-a,p=n-s,f=o*o+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(u),v=i*Math.tan((T-Math.acos((f+u-g)/(2*m*y)))/2),b=v/y,x=v/m;Math.abs(b-1)>A&&(this._+="L"+(t+b*c)+","+(e+b*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>c*p)+","+(this._x1=t+x*o)+","+(this._y1=e+x*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,r,n,i,a){t=+t,e=+e,a=!!a;var s=(r=+r)*Math.cos(n),o=r*Math.sin(n),l=t+s,c=e+o,h=1^a,u=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>A||Math.abs(this._y1-c)>A)&&(this._+="L"+l+","+c),r&&(u<0&&(u=u%k+k),u>_?this._+="A"+r+","+r+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):u>A&&(this._+="A"+r+","+r+",0,"+ +(u>=T)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};const S=C;var R=Array.prototype.slice;function L(t){return function(){return t}}function D(t){return t[0]}function N(t){return t[1]}function I(t){return t.source}function M(t){return t.target}function O(t){var e=I,r=M,n=D,i=N,a=null;function s(){var s,o=R.call(arguments),l=e.apply(this,o),c=r.apply(this,o);if(a||(a=s=S()),t(a,+n.apply(this,(o[0]=l,o)),+i.apply(this,o),+n.apply(this,(o[0]=c,o)),+i.apply(this,o)),s)return a=null,s+""||null}return s.source=function(t){return arguments.length?(e=t,s):e},s.target=function(t){return arguments.length?(r=t,s):r},s.x=function(t){return arguments.length?(n="function"==typeof t?t:L(+t),s):n},s.y=function(t){return arguments.length?(i="function"==typeof t?t:L(+t),s):i},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}function P(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function $(t){return[t.source.x1,t.y0]}function B(t){return[t.target.x0,t.y1]}function F(){return O(P).source($).target(B)}var z=function(){var t=(0,i.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],a={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,i.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 7:const t=n.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),e=n.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),r=parseFloat(a[o].trim());n.addLink(t,e,r);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,i.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,i.K2)(function(t){var e=this,r=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=s.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;s.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(t){r.length=r.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),(0,i.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=o[w]&&o[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],o[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),a.push(p.yytext),s.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=a[a.length-_],S._$={first_line:s[s.length-(_||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(_||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(_||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],a,s].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),a=a.slice(0,-1*_),s=s.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),a.push(S.$),s.push(S._$),E=o[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},s=function(){return{EOF:1,parseError:(0,i.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,i.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,i.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,i.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(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})},"reject"),less:(0,i.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,i.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(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,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,i.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,i.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(t,e,r,n){switch(r){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}}();function o(){this.yy={}}return a.lexer=s,(0,i.K2)(o,"Parser"),o.prototype=a,a.Parser=o,new o}();z.parser=z;var K=z,q=[],U=[],j=new Map,G=(0,i.K2)(()=>{q=[],U=[],j=new Map,(0,n.IU)()},"clear"),Y=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{(0,i.K2)(this,"SankeyLink")}},W=(0,i.K2)((t,e,r)=>{q.push(new Y(t,e,r))},"addLink"),H=class{constructor(t){this.ID=t}static{(0,i.K2)(this,"SankeyNode")}},V=(0,i.K2)(t=>{t=n.Y2.sanitizeText(t,(0,n.D7)());let e=j.get(t);return void 0===e&&(e=new H(t),j.set(t,e),U.push(e)),e},"findOrCreateNode"),X=(0,i.K2)(()=>U,"getNodes"),Z=(0,i.K2)(()=>q,"getLinks"),Q=(0,i.K2)(()=>({nodes:U.map(t=>({id:t.ID})),links:q.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),J={nodesMap:j,getConfig:(0,i.K2)(()=>(0,n.D7)().sankey,"getConfig"),getNodes:X,getLinks:Z,getGraph:Q,addLink:W,findOrCreateNode:V,getAccTitle:n.iN,setAccTitle:n.SV,getAccDescription:n.m7,setAccDescription:n.EI,getDiagramTitle:n.ab,setDiagramTitle:n.ke,clear:G},tt=class t{static{(0,i.K2)(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},et={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?s(t.sourceLinks,o)-1:0},justify:l},rt=(0,i.K2)(function(t,e,r,s){const{securityLevel:o,sankey:l}=(0,n.D7)(),c=n.ME.sankey;let h;"sandbox"===o&&(h=(0,a.Ltv)("#i"+e));const u="sandbox"===o?(0,a.Ltv)(h.nodes()[0].contentDocument.body):(0,a.Ltv)("body"),d="sandbox"===o?u.select(`[id="${e}"]`):(0,a.Ltv)(`[id="${e}"]`),p=l?.width??c.width,f=l?.height??c.width,g=l?.useMaxWidth??c.useMaxWidth,m=l?.nodeAlignment??c.nodeAlignment,y=l?.prefix??c.prefix,v=l?.suffix??c.suffix,b=l?.showValues??c.showValues,x=s.db.getGraph(),T=et[m];w().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(b?15:0)).nodeAlign(T).extent([[0,0],[p,f]])(x);const k=(0,a.UMr)(a.zt);d.append("g").attr("class","nodes").selectAll(".node").data(x.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=tt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>k(t.id));const A=(0,i.K2)(({id:t,value:e})=>b?`${t}\n${y}${Math.round(100*e)/100}${v}`:t,"getText");d.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(x.nodes).join("text").attr("x",t=>t.x0

    (t.y1+t.y0)/2).attr("dy",(b?"0":"0.35")+"em").attr("text-anchor",t=>t.x0

    (t.uid=tt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0);t.append("stop").attr("offset","0%").attr("stop-color",t=>k(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>k(t.target.id))}let C;switch(E){case"gradient":C=(0,i.K2)(t=>t.uid,"coloring");break;case"source":C=(0,i.K2)(t=>k(t.source.id),"coloring");break;case"target":C=(0,i.K2)(t=>k(t.target.id),"coloring");break;default:C=E}_.append("path").attr("d",F()).attr("stroke",C).attr("stroke-width",t=>Math.max(1,t.width)),(0,n.ot)(void 0,d,0,g)},"draw"),nt={draw:rt},it=(0,i.K2)(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),"prepareTextForParsing"),at=(0,i.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n }`,"getStyles"),st=K.parse.bind(K);K.parse=t=>st(it(t));var ot={styles:at,parser:K,db:J,renderer:nt}},7592(t,e,r){"use strict";r.d(e,{diagram:()=>Lt});var n=r(2875),i=r(3981),a=r(2938),s=r(3226),o=r(144),l=r(797),c=r(1444),h=r(6750),u=function(){var t=(0,l.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,13],c=[1,14],h=[1,16],u=[1,17],d=[1,18],p=[1,24],f=[1,25],g=[1,26],m=[1,27],y=[1,28],v=[1,29],b=[1,30],x=[1,31],w=[1,32],T=[1,33],k=[1,34],A=[1,35],_=[1,36],E=[1,37],C=[1,38],S=[1,39],R=[1,41],L=[1,42],D=[1,43],N=[1,44],I=[1,45],M=[1,46],O=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],P=[2,71],$=[4,5,16,50,52,53],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],F=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],K=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],q=[69,70,71],U=[1,127],j={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:(0,l.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.apply(a[o]),a[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 11:case 12:case 63:this.$=a[o];break;case 15:a[o].type="createParticipant",this.$=a[o];break;case 16:a[o-1].unshift({type:"boxStart",boxData:n.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:n.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:n.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:n.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:a[o-1].unshift({type:"loopStart",loopText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"rectStart",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"optStart",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"altStart",altText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"criticalStart",criticalText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:n.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"breakStart",breakText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 43:this.$=a[o-3].concat([{type:"option",optionText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.ALT_ELSE},a[o]]);break;case 48:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 49:case 53:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 50:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 51:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 54:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 55:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:n.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 59:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 62:this.$=[a[o-2],a[o]];break;case 64:this.$=n.PLACEMENT.LEFTOF;break;case 65:this.$=n.PLACEMENT.RIGHTOF;break;case 66:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0},{type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 67:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 68:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 69:this.$={type:"addParticipant",actor:a[o-1],config:a[o]};break;case 70:this.$=a[o-1].trim();break;case 71:this.$={type:"addParticipant",actor:a[o]};break;case 72:this.$=n.LINETYPE.SOLID_OPEN;break;case 73:this.$=n.LINETYPE.DOTTED_OPEN;break;case 74:this.$=n.LINETYPE.SOLID;break;case 75:this.$=n.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=n.LINETYPE.DOTTED;break;case 77:this.$=n.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=n.LINETYPE.SOLID_CROSS;break;case 79:this.$=n.LINETYPE.DOTTED_CROSS;break;case 80:this.$=n.LINETYPE.SOLID_POINT;break;case 81:this.$=n.LINETYPE.DOTTED_POINT;break;case 82:this.$=n.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,12:12,13:o,14:c,17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:f,31:g,33:m,35:y,36:v,37:b,38:x,39:w,41:T,43:k,44:A,46:_,50:E,52:C,53:S,55:R,60:L,61:D,62:N,63:I,71:M},t(O,[2,5]),{9:47,12:12,13:o,14:c,17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:f,31:g,33:m,35:y,36:v,37:b,38:x,39:w,41:T,43:k,44:A,46:_,50:E,52:C,53:S,55:R,60:L,61:D,62:N,63:I,71:M},t(O,[2,7]),t(O,[2,8]),t(O,[2,14]),{12:48,50:E,52:C,53:S},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:M},{22:55,71:M},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(O,[2,29]),t(O,[2,30]),{32:[1,61]},{34:[1,62]},t(O,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:M},{22:75,71:M},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:M},{22:92,71:M},{22:93,71:M},{22:94,71:M},t([5,51,65,76,77,78,79,80,81,82,83,84,85,86],P),t(O,[2,6]),t(O,[2,15]),t($,[2,9],{10:95}),t(O,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},t(O,[2,21]),{5:[1,99]},{5:[1,100]},t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,31]),t(O,[2,32]),t(B,i,{7:101}),t(B,i,{7:102}),t(B,i,{7:103}),t(F,i,{40:104,7:105}),t(z,i,{42:106,7:107}),t(z,i,{7:107,42:108}),t(K,i,{45:109,7:110}),t(B,i,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},t([5,51],P,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:M},t(q,[2,72]),t(q,[2,73]),t(q,[2,74]),t(q,[2,75]),t(q,[2,76]),t(q,[2,77]),t(q,[2,78]),t(q,[2,79]),t(q,[2,80]),t(q,[2,81]),{22:123,71:M},{22:125,59:124,71:M},{71:[2,64]},{71:[2,65]},{57:126,86:U},{57:128,86:U},{57:129,86:U},{57:130,86:U},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:E,52:C,53:S},{5:[1,136]},t(O,[2,19]),t(O,[2,20]),t(O,[2,22]),t(O,[2,23]),{4:a,5:s,8:8,9:10,12:12,13:o,14:c,16:[1,137],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:f,31:g,33:m,35:y,36:v,37:b,38:x,39:w,41:T,43:k,44:A,46:_,50:E,52:C,53:S,55:R,60:L,61:D,62:N,63:I,71:M},{4:a,5:s,8:8,9:10,12:12,13:o,14:c,16:[1,138],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:f,31:g,33:m,35:y,36:v,37:b,38:x,39:w,41:T,43:k,44:A,46:_,50:E,52:C,53:S,55:R,60:L,61:D,62:N,63:I,71:M},{4:a,5:s,8:8,9:10,12:12,13:o,14:c,16:[1,139],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:f,31:g,33:m,35:y,36:v,37:b,38:x,39:w,41:T,43:k,44:A,46:_,50:E,52:C,53:S,55:R,60:L,61:D,62:N,63:I,71:M},{16:[1,140]},{4:a,5:s,8:8,9:10,12:12,13:o,14:c,16:[2,46],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:f,31:g,33:m,35:y,36:v,37:b,38:x,39:w,41:T,43:k,44:A,46:_,49:[1,141],50:E,52:C,53:S,55:R,60:L,61:D,62:N,63:I,71:M},{16:[1,142]},{4:a,5:s,8:8,9:10,12:12,13:o,14:c,16:[2,44],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:f,31:g,33:m,35:y,36:v,37:b,38:x,39:w,41:T,43:k,44:A,46:_,48:[1,143],50:E,52:C,53:S,55:R,60:L,61:D,62:N,63:I,71:M},{16:[1,144]},{16:[1,145]},{4:a,5:s,8:8,9:10,12:12,13:o,14:c,16:[2,42],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:f,31:g,33:m,35:y,36:v,37:b,38:x,39:w,41:T,43:k,44:A,46:_,47:[1,146],50:E,52:C,53:S,55:R,60:L,61:D,62:N,63:I,71:M},{4:a,5:s,8:8,9:10,12:12,13:o,14:c,16:[1,147],17:15,18:h,21:u,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:f,31:g,33:m,35:y,36:v,37:b,38:x,39:w,41:T,43:k,44:A,46:_,50:E,52:C,53:S,55:R,60:L,61:D,62:N,63:I,71:M},{15:[1,148]},t(O,[2,49]),t(O,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},t(O,[2,51]),t(O,[2,52]),{22:151,71:M},{22:152,71:M},{57:153,86:U},{57:154,86:U},{57:155,86:U},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},t(O,[2,16]),t($,[2,10]),{12:157,50:E,52:C,53:S},t($,[2,12]),t($,[2,13]),t(O,[2,18]),t(O,[2,34]),t(O,[2,35]),t(O,[2,36]),t(O,[2,37]),{15:[1,158]},t(O,[2,38]),{15:[1,159]},t(O,[2,39]),t(O,[2,40]),{15:[1,160]},t(O,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:U},{57:165,86:U},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:M},t($,[2,11]),t(F,i,{7:105,40:167}),t(z,i,{7:107,42:168}),t(K,i,{7:110,45:169}),t(O,[2,48]),{5:[2,70]},t(O,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,o="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=s[w]&&s[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],s[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,h,c,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},G=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(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})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(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,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,r,n){switch(r){case 0:case 56:case 72:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:case 57:return e.yytext=e.yytext.trim(),71;case 11:case 17:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:case 69:return 86;case 70:return 69;case 71:return 70;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}}}();function Y(){this.yy={}}return j.lexer=G,(0,l.K2)(Y,"Parser"),Y.prototype=j,j.Parser=Y,new Y}();u.parser=u;var d=u,p={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},f={FILLED:0,OPEN:1},g={LEFTOF:0,RIGHTOF:1,OVER:2},m="actor",y="control",v="database",b="entity",x=class{constructor(){this.state=new a.m(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=o.SV,this.setAccDescription=o.EI,this.setDiagramTitle=o.ke,this.getAccTitle=o.iN,this.getAccDescription=o.m7,this.getDiagramTitle=o.ab,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,o.D7)().wrap),this.LINETYPE=p,this.ARROWTYPE=f,this.PLACEMENT=g}static{(0,l.K2)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,r,n,a){let s,o=this.state.records.currentBox;if(void 0!==a){let t;t=a.includes("\n")?a+"\n":"{\n"+a+"\n}",s=(0,i.H)(t,{schema:i.r})}n=s?.type??n;const l=this.state.records.actors.get(t);if(l){if(this.state.records.currentBox&&l.box&&this.state.records.currentBox!==l.box)throw new Error(`A same participant should only be defined in one Box: ${l.name} can't be in '${l.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=l.box?l.box:this.state.records.currentBox,l.box=o,l&&e===l.name&&null==r)return}if(null==r?.text&&(r={text:e,type:n}),null!=n&&null!=r.text||(r={text:e,type:n}),this.state.records.actors.set(t,{box:o,name:e,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,r=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:n,activate:i}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(0,o.D7)().sequence?.wrap??!1}clear(){this.state.reset(),(0,o.IU)()}parseMessage(t){const e=t.trim(),{wrap:r,cleanedText:n}=this.extractWrap(e),i={text:n,wrap:r};return l.Rm.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",n=t.trim());else{const e=(new Option).style;e.color=r,e.color!==r&&(r="transparent",n=t.trim())}const{wrap:i,cleanedText:a}=this.extractWrap(n);return{text:a?(0,o.jZ)(a,(0,o.D7)()):void 0,color:r,wrap:i}}addNote(t,e,r){const n={actor:t,placement:e,message:r.text,wrap:r.wrap??this.autoWrap()},i=[].concat(t,t);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const r=this.getActor(t);try{let t=(0,o.jZ)(e.text,(0,o.D7)());t=t.replace(/=/g,"="),t=t.replace(/&/g,"&");const n=JSON.parse(t);this.insertLinks(r,n)}catch(n){l.Rm.error("error while parsing actor link text",n)}}addALink(t,e){const r=this.getActor(t);try{const t={};let n=(0,o.jZ)(e.text,(0,o.D7)());const i=n.indexOf("@");n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");const a=n.slice(0,i-1).trim(),s=n.slice(i+1).trim();t[a]=s,this.insertLinks(r,t)}catch(n){l.Rm.error("error while parsing actor link text",n)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const r in e)t.links[r]=e[r]}addProperties(t,e){const r=this.getActor(t);try{const t=(0,o.jZ)(e.text,(0,o.D7)()),n=JSON.parse(t);this.insertProperties(r,n)}catch(n){l.Rm.error("error while parsing actor properties text",n)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const r in e)t.properties[r]=e[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const r=this.getActor(t),n=document.getElementById(e.text);try{const t=n.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(r,e.properties),e.links&&this.insertLinks(r,e.links)}catch(i){l.Rm.error("error while parsing actor details text",i)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,o.SV)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,o.D7)().sequence}},w=(0,l.K2)(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 .innerArc {\n stroke-width: 1.5;\n stroke-dasharray: none;\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\n`,"getStyles"),T="actor-top",k="actor-bottom",A="actor-box",_="actor-man",E=(0,l.K2)(function(t,e){return(0,n.tk)(t,e)},"drawRect"),C=(0,l.K2)(function(t,e,r,n,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const a=e.links,s=e.actorCnt,o=e.rectData;var l="none";i&&(l="block !important");const c=t.append("g");c.attr("id","actor"+s+"_popup"),c.attr("class","actorPopupMenu"),c.attr("display",l);var u="";void 0!==o.class&&(u=" "+o.class);let d=o.width>r?o.width:r;const p=c.append("rect");if(p.attr("class","actorPopupMenuPanel"+u),p.attr("x",o.x),p.attr("y",o.height),p.attr("fill",o.fill),p.attr("stroke",o.stroke),p.attr("width",d),p.attr("height",o.height),p.attr("rx",o.rx),p.attr("ry",o.ry),null!=a){var f=20;for(let t in a){var g=c.append("a"),m=(0,h.J)(a[t]);g.attr("xlink:href",m),g.attr("target","_blank"),it(n)(t,g,o.x+10,o.height+f,d,20,{class:"actor"},n),f+=30}}return p.attr("height",f),{height:o.height+f,width:d}},"drawPopup"),S=(0,l.K2)(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),R=(0,l.K2)(async function(t,e,r=null){let n=t.append("foreignObject");const i=await(0,o.dj)(e.text,(0,o.zj)()),a=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(a.height)).attr("width",Math.round(a.width)),"noteText"===e.class){const r=t.node().firstChild;r.setAttribute("height",a.height+2*e.textMargin);const i=r.getBBox();n.attr("x",Math.round(i.x+i.width/2-a.width/2)).attr("y",Math.round(i.y+i.height/2-a.height/2))}else if(r){let{startx:t,stopx:i,starty:s}=r;if(t>i){const e=t;t=i,i=e}n.attr("x",Math.round(t+Math.abs(t-i)/2-a.width/2)),"loopText"===e.class?n.attr("y",Math.round(s)):n.attr("y",Math.round(s-a.height))}return[n]},"drawKatex"),L=(0,l.K2)(function(t,e){let r=0,n=0;const i=e.text.split(o.Y2.lineBreakRegex),[a,c]=(0,s.I5)(e.fontSize);let h=[],u=0,d=(0,l.K2)(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=(0,l.K2)(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":d=(0,l.K2)(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":d=(0,l.K2)(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[o,l]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(u=o*a);const i=t.append("text");i.attr("x",e.x),i.attr("y",d()),void 0!==e.anchor&&i.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&i.style("font-family",e.fontFamily),void 0!==c&&i.style("font-size",c),void 0!==e.fontWeight&&i.style("font-weight",e.fontWeight),void 0!==e.fill&&i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class),void 0!==e.dy?i.attr("dy",e.dy):0!==u&&i.attr("dy",u);const p=l||s.pe;if(e.tspan){const t=i.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(p)}else i.text(p);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(n+=(i._groups||i)[0][0].getBBox().height,r=n),h.push(i)}return h},"drawText"),D=(0,l.K2)(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}(0,l.K2)(r,"genPoints");const n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,L(t,e),n},"drawLabel"),N=-1,I=(0,l.K2)((t,e,r,n)=>{t.select&&r.forEach(r=>{const i=e.get(r),a=t.select("#actor"+i.actorCnt);!n.mirrorActors&&i.stopy?a.attr("y2",i.stopy+i.height/2):n.mirrorActors&&a.attr("y2",i.stopy)})},"fixLifeLineHeights"),M=(0,l.K2)(function(t,e,r,i){const a=i?e.stopy:e.starty,s=e.x+e.width/2,l=a+e.height,c=t.append("g").lower();var h=c;i||(N++,Object.keys(e.links||{}).length&&!r.forceMenus&&h.attr("onclick",S(`actor${N}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+N).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=c.append("g"),e.actorCnt=N,null!=e.links&&h.attr("id","root-"+N));const u=(0,n.PB)();var d="actor";e.properties?.class?d=e.properties.class:u.fill="#eaeaea",d+=i?` ${k}`:` ${T}`,u.x=e.x,u.y=a,u.width=e.width,u.height=e.height,u.class=d,u.rx=3,u.ry=3,u.name=e.name;const p=E(h,u);if(e.rectData=u,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,n.CP)(h,u.x+u.width-20,u.y+10,t.substr(1)):(0,n.aC)(h,u.x+u.width-20,u.y+10,t)}nt(r,(0,o.Wi)(e.description))(e.description,h,u.x,u.y,u.width,u.height,{class:`actor ${A}`},r);let f=e.height;if(p.node){const t=p.node().getBBox();e.height=t.height,f=t.height}return f},"drawActorTypeParticipant"),O=(0,l.K2)(function(t,e,r,i){const a=i?e.stopy:e.starty,s=e.x+e.width/2,l=a+e.height,c=t.append("g").lower();var h=c;i||(N++,Object.keys(e.links||{}).length&&!r.forceMenus&&h.attr("onclick",S(`actor${N}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+N).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=c.append("g"),e.actorCnt=N,null!=e.links&&h.attr("id","root-"+N));const u=(0,n.PB)();var d="actor";e.properties?.class?d=e.properties.class:u.fill="#eaeaea",d+=i?` ${k}`:` ${T}`,u.x=e.x,u.y=a,u.width=e.width,u.height=e.height,u.class=d,u.name=e.name;const p={...u,x:u.x+-6,y:u.y+6,class:"actor"},f=E(h,u);if(E(h,p),e.rectData=u,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,n.CP)(h,u.x+u.width-20,u.y+10,t.substr(1)):(0,n.aC)(h,u.x+u.width-20,u.y+10,t)}nt(r,(0,o.Wi)(e.description))(e.description,h,u.x-6,u.y+6,u.width,u.height,{class:`actor ${A}`},r);let g=e.height;if(f.node){const t=f.node().getBBox();e.height=t.height,g=t.height}return g},"drawActorTypeCollections"),P=(0,l.K2)(function(t,e,r,i){const a=i?e.stopy:e.starty,s=e.x+e.width/2,l=a+e.height,c=t.append("g").lower();let h=c;i||(N++,Object.keys(e.links||{}).length&&!r.forceMenus&&h.attr("onclick",S(`actor${N}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+N).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=c.append("g"),e.actorCnt=N,null!=e.links&&h.attr("id","root-"+N));const u=(0,n.PB)();let d="actor";e.properties?.class?d=e.properties.class:u.fill="#eaeaea",d+=i?` ${k}`:` ${T}`,u.x=e.x,u.y=a,u.width=e.width,u.height=e.height,u.class=d,u.name=e.name;const p=u.height/2,f=p/(2.5+u.height/50),g=h.append("g"),m=h.append("g");if(g.append("path").attr("d",`M ${u.x},${u.y+p}\n a ${f},${p} 0 0 0 0,${u.height}\n h ${u.width-2*f}\n a ${f},${p} 0 0 0 0,-${u.height}\n Z\n `).attr("class",d),m.append("path").attr("d",`M ${u.x},${u.y+p}\n a ${f},${p} 0 0 0 0,${u.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",d),g.attr("transform",`translate(${f}, ${-u.height/2})`),m.attr("transform",`translate(${u.width-f}, ${-u.height/2})`),e.rectData=u,e.properties?.icon){const t=e.properties.icon.trim(),r=u.x+u.width-20,i=u.y+10;"@"===t.charAt(0)?(0,n.CP)(h,r,i,t.substr(1)):(0,n.aC)(h,r,i,t)}nt(r,(0,o.Wi)(e.description))(e.description,h,u.x,u.y,u.width,u.height,{class:`actor ${A}`},r);let y=e.height;const v=g.select("path:last-child");if(v.node()){const t=v.node().getBBox();e.height=t.height,y=t.height}return y},"drawActorTypeQueue"),$=(0,l.K2)(function(t,e,r,i){const a=i?e.stopy:e.starty,s=e.x+e.width/2,l=a+75,c=t.append("g").lower();i||(N++,c.append("line").attr("id","actor"+N).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=N);const h=t.append("g");let u=_;u+=i?` ${k}`:` ${T}`,h.attr("class",u),h.attr("name",e.name);const d=(0,n.PB)();d.x=e.x,d.y=a,d.fill="#eaeaea",d.width=e.width,d.height=e.height,d.class="actor";const p=e.x+e.width/2,f=a+30;h.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),h.append("circle").attr("cx",p).attr("cy",f).attr("r",18).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),h.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${p}, ${f-18})`);const g=h.node().getBBox();return e.height=g.height+2*(r?.sequence?.labelBoxHeight??0),nt(r,(0,o.Wi)(e.description))(e.description,h,d.x,d.y+18+(i?5:10),d.width,d.height,{class:`actor ${_}`},r),e.height},"drawActorTypeControl"),B=(0,l.K2)(function(t,e,r,i){const a=i?e.stopy:e.starty,s=e.x+e.width/2,l=a+75,c=t.append("g").lower(),h=t.append("g");let u=_;u+=i?` ${k}`:` ${T}`,h.attr("class",u),h.attr("name",e.name);const d=(0,n.PB)();d.x=e.x,d.y=a,d.fill="#eaeaea",d.width=e.width,d.height=e.height,d.class="actor";const p=e.x+e.width/2,f=a+(i?10:25),g=18;h.append("circle").attr("cx",p).attr("cy",f).attr("r",g).attr("width",e.width).attr("height",e.height),h.append("line").attr("x1",p-g).attr("x2",p+g).attr("y1",f+g).attr("y2",f+g).attr("stroke","#333").attr("stroke-width",2);const m=h.node().getBBox();return e.height=m.height+(r?.sequence?.labelBoxHeight??0),i||(N++,c.append("line").attr("id","actor"+N).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=N),nt(r,(0,o.Wi)(e.description))(e.description,h,d.x,d.y+(i?(f-a+g-5)/2:(f+g-a)/2),d.width,d.height,{class:`actor ${_}`},r),h.attr("transform","translate(0, 9)"),e.height},"drawActorTypeEntity"),F=(0,l.K2)(function(t,e,r,i){const a=i?e.stopy:e.starty,s=e.x+e.width/2,l=a+e.height+2*r.boxTextMargin,c=t.append("g").lower();let h=c;i||(N++,Object.keys(e.links||{}).length&&!r.forceMenus&&h.attr("onclick",S(`actor${N}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+N).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=c.append("g"),e.actorCnt=N,null!=e.links&&h.attr("id","root-"+N));const u=(0,n.PB)();let d="actor";e.properties?.class?d=e.properties.class:u.fill="#eaeaea",d+=i?` ${k}`:` ${T}`,u.x=e.x,u.y=a,u.width=e.width,u.height=e.height,u.class=d,u.name=e.name,u.x=e.x,u.y=a;const p=u.width/4,f=u.width/4,g=p/2,m=g/(2.5+p/50),y=h.append("g"),v=`\n M ${u.x},${u.y+m}\n a ${g},${m} 0 0 0 ${p},0\n a ${g},${m} 0 0 0 -${p},0\n l 0,${f-2*m}\n a ${g},${m} 0 0 0 ${p},0\n l 0,-${f-2*m}\n`;y.append("path").attr("d",v).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",d),i?y.attr("transform",`translate(${1.5*p}, ${u.height/4-2*m})`):y.attr("transform",`translate(${1.5*p}, ${(u.height+m)/4})`),e.rectData=u,nt(r,(0,o.Wi)(e.description))(e.description,h,u.x,u.y+(i?(u.height+f)/4:(u.height+m)/2),u.width,u.height,{class:`actor ${A}`},r);const b=y.select("path:last-child");if(b.node()){const t=b.node().getBBox();e.height=t.height+(r.sequence.labelBoxHeight??0)}return e.height},"drawActorTypeDatabase"),z=(0,l.K2)(function(t,e,r,i){const a=i?e.stopy:e.starty,s=e.x+e.width/2,l=a+80,c=30,h=t.append("g").lower();i||(N++,h.append("line").attr("id","actor"+N).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=N);const u=t.append("g");let d=_;d+=i?` ${k}`:` ${T}`,u.attr("class",d),u.attr("name",e.name);const p=(0,n.PB)();p.x=e.x,p.y=a,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor",u.append("line").attr("id","actor-man-torso"+N).attr("x1",e.x+e.width/2-75).attr("y1",a+10).attr("x2",e.x+e.width/2-15).attr("y2",a+10),u.append("line").attr("id","actor-man-arms"+N).attr("x1",e.x+e.width/2-75).attr("y1",a+0).attr("x2",e.x+e.width/2-75).attr("y2",a+20),u.append("circle").attr("cx",e.x+e.width/2).attr("cy",a+10).attr("r",c);const f=u.node().getBBox();return e.height=f.height+(r.sequence.labelBoxHeight??0),nt(r,(0,o.Wi)(e.description))(e.description,u,p.x,p.y+(i?11:18),p.width,p.height,{class:`actor ${_}`},r),u.attr("transform","translate(0,22)"),e.height},"drawActorTypeBoundary"),K=(0,l.K2)(function(t,e,r,i){const a=i?e.stopy:e.starty,s=e.x+e.width/2,l=a+80,c=t.append("g").lower();i||(N++,c.append("line").attr("id","actor"+N).attr("x1",s).attr("y1",l).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=N);const h=t.append("g");let u=_;u+=i?` ${k}`:` ${T}`,h.attr("class",u),h.attr("name",e.name);const d=(0,n.PB)();d.x=e.x,d.y=a,d.fill="#eaeaea",d.width=e.width,d.height=e.height,d.class="actor",d.rx=3,d.ry=3,h.append("line").attr("id","actor-man-torso"+N).attr("x1",s).attr("y1",a+25).attr("x2",s).attr("y2",a+45),h.append("line").attr("id","actor-man-arms"+N).attr("x1",s-18).attr("y1",a+33).attr("x2",s+18).attr("y2",a+33),h.append("line").attr("x1",s-18).attr("y1",a+60).attr("x2",s).attr("y2",a+45),h.append("line").attr("x1",s).attr("y1",a+45).attr("x2",s+18-2).attr("y2",a+60);const p=h.append("circle");p.attr("cx",e.x+e.width/2),p.attr("cy",a+10),p.attr("r",15),p.attr("width",e.width),p.attr("height",e.height);const f=h.node().getBBox();return e.height=f.height,nt(r,(0,o.Wi)(e.description))(e.description,h,d.x,d.y+35,d.width,d.height,{class:`actor ${_}`},r),e.height},"drawActorTypeActor"),q=(0,l.K2)(async function(t,e,r,n){switch(e.type){case"actor":return await K(t,e,r,n);case"participant":return await M(t,e,r,n);case"boundary":return await z(t,e,r,n);case"control":return await $(t,e,r,n);case"entity":return await B(t,e,r,n);case"database":return await F(t,e,r,n);case"collections":return await O(t,e,r,n);case"queue":return await P(t,e,r,n)}},"drawActor"),U=(0,l.K2)(function(t,e,r){const n=t.append("g");W(n,e),e.name&&nt(r)(e.name,n,e.x,e.y+r.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),n.lower()},"drawBox"),j=(0,l.K2)(function(t){return t.append("g")},"anchorElement"),G=(0,l.K2)(function(t,e,r,i,a){const s=(0,n.PB)(),o=e.anchored;s.x=e.startx,s.y=e.starty,s.class="activation"+a%3,s.width=e.stopx-e.startx,s.height=r-e.starty,E(o,s)},"drawActivation"),Y=(0,l.K2)(async function(t,e,r,i){const{boxMargin:a,boxTextMargin:s,labelBoxHeight:c,labelBoxWidth:h,messageFontFamily:u,messageFontSize:d,messageFontWeight:p}=i,f=t.append("g"),g=(0,l.K2)(function(t,e,r,n){return f.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",n).attr("class","loopLine")},"drawLoopLine");g(e.startx,e.starty,e.stopx,e.starty),g(e.stopx,e.starty,e.stopx,e.stopy),g(e.startx,e.stopy,e.stopx,e.stopy),g(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){g(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")});let m=(0,n.HT)();m.text=r,m.x=e.startx,m.y=e.starty,m.fontFamily=u,m.fontSize=d,m.fontWeight=p,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=h||50,m.height=c||20,m.textMargin=s,m.class="labelText",D(f,m),m=et(),m.text=e.title,m.x=e.startx+h/2+(e.stopx-e.startx)/2,m.y=e.starty+a+s,m.anchor="middle",m.valign="middle",m.textMargin=s,m.class="loopText",m.fontFamily=u,m.fontSize=d,m.fontWeight=p,m.wrap=!0;let y=(0,o.Wi)(m.text)?await R(f,m,e):L(f,m);if(void 0!==e.sectionTitles)for(const[n,l]of Object.entries(e.sectionTitles))if(l.message){m.text=l.message,m.x=e.startx+(e.stopx-e.startx)/2,m.y=e.sections[n].y+a+s,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=u,m.fontSize=d,m.fontWeight=p,m.wrap=e.wrap,(0,o.Wi)(m.text)?(e.starty=e.sections[n].y,await R(f,m,e)):L(f,m);let t=Math.round(y.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));e.sections[n].height+=t-(a+s)}return e.height=Math.round(e.stopy-e.starty),f},"drawLoop"),W=(0,l.K2)(function(t,e){(0,n.lC)(t,e)},"drawBackgroundRect"),H=(0,l.K2)(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),V=(0,l.K2)(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),X=(0,l.K2)(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Z=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Q=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),J=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),tt=(0,l.K2)(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),et=(0,l.K2)(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),rt=(0,l.K2)(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),nt=function(){function t(t,e,r,n,a,s,o){i(e.append("text").attr("x",r+a/2).attr("y",n+s/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,r,n,a,l,c,h){const{actorFontSize:u,actorFontFamily:d,actorFontWeight:p}=h,[f,g]=(0,s.I5)(u),m=t.split(o.Y2.lineBreakRegex);for(let s=0;st.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:(0,l.K2)(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:(0,l.K2)(function(t){this.boxes.push(t)},"addBox"),addActor:(0,l.K2)(function(t){this.actors.push(t)},"addActor"),addLoop:(0,l.K2)(function(t){this.loops.push(t)},"addLoop"),addMessage:(0,l.K2)(function(t){this.messages.push(t)},"addMessage"),addNote:(0,l.K2)(function(t){this.notes.push(t)},"addNote"),lastActor:(0,l.K2)(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:(0,l.K2)(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:(0,l.K2)(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:(0,l.K2)(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,l.K2)(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,yt((0,o.D7)())},"init"),updateVal:(0,l.K2)(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:(0,l.K2)(function(t,e,r,n){const i=this;let a=0;function s(s){return(0,l.K2)(function(o){a++;const l=i.sequenceItems.length-a+1;i.updateVal(o,"starty",e-l*st.boxMargin,Math.min),i.updateVal(o,"stopy",n+l*st.boxMargin,Math.max),i.updateVal(ot.data,"startx",t-l*st.boxMargin,Math.min),i.updateVal(ot.data,"stopx",r+l*st.boxMargin,Math.max),"activation"!==s&&(i.updateVal(o,"startx",t-l*st.boxMargin,Math.min),i.updateVal(o,"stopx",r+l*st.boxMargin,Math.max),i.updateVal(ot.data,"starty",e-l*st.boxMargin,Math.min),i.updateVal(ot.data,"stopy",n+l*st.boxMargin,Math.max))},"updateItemBounds")}(0,l.K2)(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:(0,l.K2)(function(t,e,r,n){const i=o.Y2.getMin(t,r),a=o.Y2.getMax(t,r),s=o.Y2.getMin(e,n),l=o.Y2.getMax(e,n);this.updateVal(ot.data,"startx",i,Math.min),this.updateVal(ot.data,"starty",s,Math.min),this.updateVal(ot.data,"stopx",a,Math.max),this.updateVal(ot.data,"stopy",l,Math.max),this.updateBounds(i,s,a,l)},"insert"),newActivation:(0,l.K2)(function(t,e,r){const n=r.get(t.from),i=vt(t.from).length||0,a=n.x+n.width/2+(i-1)*st.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+st.activationWidth,stopy:void 0,actor:t.from,anchored:at.anchorElement(e)})},"newActivation"),endActivation:(0,l.K2)(function(t){const e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:(0,l.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:(0,l.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:(0,l.K2)(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:(0,l.K2)(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:(0,l.K2)(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:ot.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:(0,l.K2)(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:(0,l.K2)(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:(0,l.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=o.Y2.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:(0,l.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,l.K2)(function(){return{bounds:this.data,models:this.models}},"getBounds")},lt=(0,l.K2)(async function(t,e){ot.bumpVerticalPos(st.boxMargin),e.height=st.boxMargin,e.starty=ot.getVerticalPos();const r=(0,n.PB)();r.x=e.startx,r.y=e.starty,r.width=e.width||st.width,r.class="note";const i=t.append("g"),a=at.drawRect(i,r),s=(0,n.HT)();s.x=e.startx,s.y=e.starty,s.width=r.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=st.noteFontFamily,s.fontSize=st.noteFontSize,s.fontWeight=st.noteFontWeight,s.anchor=st.noteAlign,s.textMargin=st.noteMargin,s.valign="center";const l=(0,o.Wi)(s.text)?await R(i,s):L(i,s),c=Math.round(l.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));a.attr("height",c+2*st.noteMargin),e.height+=c+2*st.noteMargin,ot.bumpVerticalPos(c+2*st.noteMargin),e.stopy=e.starty+c+2*st.noteMargin,e.stopx=e.startx+r.width,ot.insert(e.startx,e.starty,e.stopx,e.stopy),ot.models.addNote(e)},"drawNote"),ct=(0,l.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),ht=(0,l.K2)(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),ut=(0,l.K2)(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function dt(t,e){ot.bumpVerticalPos(10);const{startx:r,stopx:n,message:i}=e,a=o.Y2.splitBreaks(i).length,l=(0,o.Wi)(i),c=l?await(0,o.Dl)(i,(0,o.D7)()):s._K.calculateTextDimensions(i,ct(st));if(!l){const t=c.height/a;e.height+=t,ot.bumpVerticalPos(t)}let h,u=c.height-10;const d=c.width;if(r===n){h=ot.getVerticalPos()+u,st.rightAngles||(u+=st.boxMargin,h=ot.getVerticalPos()+u),u+=30;const t=o.Y2.getMax(d/2,st.width/2);ot.insert(r-t,ot.getVerticalPos()-10+u,n+t,ot.getVerticalPos()+30+u)}else u+=st.boxMargin,h=ot.getVerticalPos()+u,ot.insert(r,h-10,n,h);return ot.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,ot.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),h}(0,l.K2)(dt,"boundMessage");var pt=(0,l.K2)(async function(t,e,r,i){const{startx:a,stopx:l,starty:c,message:h,type:u,sequenceIndex:d,sequenceVisible:p}=e,f=s._K.calculateTextDimensions(h,ct(st)),g=(0,n.HT)();g.x=a,g.y=c+10,g.width=l-a,g.class="messageText",g.dy="1em",g.text=h,g.fontFamily=st.messageFontFamily,g.fontSize=st.messageFontSize,g.fontWeight=st.messageFontWeight,g.anchor=st.messageAlign,g.valign="center",g.textMargin=st.wrapPadding,g.tspan=!1,(0,o.Wi)(g.text)?await R(t,g,{startx:a,stopx:l,starty:r}):L(t,g);const m=f.width;let y;a===l?y=st.rightAngles?t.append("path").attr("d",`M ${a},${r} H ${a+o.Y2.getMax(st.width/2,m/2)} V ${r+25} H ${a}`):t.append("path").attr("d","M "+a+","+r+" C "+(a+60)+","+(r-10)+" "+(a+60)+","+(r+30)+" "+a+","+(r+20)):(y=t.append("line"),y.attr("x1",a),y.attr("y1",r),y.attr("x2",l),y.attr("y2",r)),u===i.db.LINETYPE.DOTTED||u===i.db.LINETYPE.DOTTED_CROSS||u===i.db.LINETYPE.DOTTED_POINT||u===i.db.LINETYPE.DOTTED_OPEN||u===i.db.LINETYPE.BIDIRECTIONAL_DOTTED?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0");let v="";if(st.arrowMarkerAbsolute&&(v=(0,o.ID)(!0)),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),u!==i.db.LINETYPE.SOLID&&u!==i.db.LINETYPE.DOTTED||y.attr("marker-end","url("+v+"#arrowhead)"),u!==i.db.LINETYPE.BIDIRECTIONAL_SOLID&&u!==i.db.LINETYPE.BIDIRECTIONAL_DOTTED||(y.attr("marker-start","url("+v+"#arrowhead)"),y.attr("marker-end","url("+v+"#arrowhead)")),u!==i.db.LINETYPE.SOLID_POINT&&u!==i.db.LINETYPE.DOTTED_POINT||y.attr("marker-end","url("+v+"#filled-head)"),u!==i.db.LINETYPE.SOLID_CROSS&&u!==i.db.LINETYPE.DOTTED_CROSS||y.attr("marker-end","url("+v+"#crosshead)"),p||st.showSequenceNumbers){if(u===i.db.LINETYPE.BIDIRECTIONAL_SOLID||u===i.db.LINETYPE.BIDIRECTIONAL_DOTTED){const t=6;ai&&(i=l.height),l.width+r.x>a&&(a=l.width+r.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),yt=(0,l.K2)(function(t){(0,o.hH)(st,t),t.fontFamily&&(st.actorFontFamily=st.noteFontFamily=st.messageFontFamily=t.fontFamily),t.fontSize&&(st.actorFontSize=st.noteFontSize=st.messageFontSize=t.fontSize),t.fontWeight&&(st.actorFontWeight=st.noteFontWeight=st.messageFontWeight=t.fontWeight)},"setConf"),vt=(0,l.K2)(function(t){return ot.activations.filter(function(e){return e.actor===t})},"actorActivations"),bt=(0,l.K2)(function(t,e){const r=e.get(t),n=vt(t);return[n.reduce(function(t,e){return o.Y2.getMin(t,e.startx)},r.x+r.width/2-1),n.reduce(function(t,e){return o.Y2.getMax(t,e.stopx)},r.x+r.width/2+1)]},"activationBounds");function xt(t,e,r,n,i){ot.bumpVerticalPos(r);let a=n;if(e.id&&e.message&&t[e.id]){const r=t[e.id].width,i=ct(st);e.message=s._K.wrapLabel(`[${e.message}]`,r-2*st.wrapPadding,i),e.width=r,e.wrap=!0;const c=s._K.calculateTextDimensions(e.message,i),h=o.Y2.getMax(c.height,st.labelBoxHeight);a=n+h,l.Rm.debug(`${h} - ${e.message}`)}i(e),ot.bumpVerticalPos(a)}function wt(t,e,r,n,i,a,s){function o(r,n){r.x{t.add(e.from),t.add(e.to)}),y=y.filter(e=>t.has(e))}ft(d,p,f,y,0,v,!1);const k=await St(v,p,T,n);function A(t,e){const r=ot.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),at.drawActivation(d,r,e,st,vt(t.from).length),ot.insert(r.startx,e-10,r.stopx,e)}at.insertArrowHead(d),at.insertArrowCrossHead(d),at.insertArrowFilledHead(d),at.insertSequenceNumber(d),(0,l.K2)(A,"activeEnd");let _=1,E=1;const C=[],S=[];let R=0;for(const o of v){let t,e,r;switch(o.type){case n.db.LINETYPE.NOTE:ot.resetVerticalPos(),e=o.noteModel,await lt(d,e);break;case n.db.LINETYPE.ACTIVE_START:ot.newActivation(o,d,p);break;case n.db.LINETYPE.ACTIVE_END:A(o,ot.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:xt(k,o,st.boxMargin,st.boxMargin+st.boxTextMargin,t=>ot.newLoop(t));break;case n.db.LINETYPE.LOOP_END:t=ot.endLoop(),await at.drawLoop(d,t,"loop",st),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;case n.db.LINETYPE.RECT_START:xt(k,o,st.boxMargin,st.boxMargin,t=>ot.newLoop(void 0,t.message));break;case n.db.LINETYPE.RECT_END:t=ot.endLoop(),S.push(t),ot.models.addLoop(t),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos());break;case n.db.LINETYPE.OPT_START:xt(k,o,st.boxMargin,st.boxMargin+st.boxTextMargin,t=>ot.newLoop(t));break;case n.db.LINETYPE.OPT_END:t=ot.endLoop(),await at.drawLoop(d,t,"opt",st),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;case n.db.LINETYPE.ALT_START:xt(k,o,st.boxMargin,st.boxMargin+st.boxTextMargin,t=>ot.newLoop(t));break;case n.db.LINETYPE.ALT_ELSE:xt(k,o,st.boxMargin+st.boxTextMargin,st.boxMargin,t=>ot.addSectionToLoop(t));break;case n.db.LINETYPE.ALT_END:t=ot.endLoop(),await at.drawLoop(d,t,"alt",st),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:xt(k,o,st.boxMargin,st.boxMargin+st.boxTextMargin,t=>ot.newLoop(t)),ot.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:xt(k,o,st.boxMargin+st.boxTextMargin,st.boxMargin,t=>ot.addSectionToLoop(t));break;case n.db.LINETYPE.PAR_END:t=ot.endLoop(),await at.drawLoop(d,t,"par",st),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;case n.db.LINETYPE.AUTONUMBER:_=o.message.start||_,E=o.message.step||E,o.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:xt(k,o,st.boxMargin,st.boxMargin+st.boxTextMargin,t=>ot.newLoop(t));break;case n.db.LINETYPE.CRITICAL_OPTION:xt(k,o,st.boxMargin+st.boxTextMargin,st.boxMargin,t=>ot.addSectionToLoop(t));break;case n.db.LINETYPE.CRITICAL_END:t=ot.endLoop(),await at.drawLoop(d,t,"critical",st),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;case n.db.LINETYPE.BREAK_START:xt(k,o,st.boxMargin,st.boxMargin+st.boxTextMargin,t=>ot.newLoop(t));break;case n.db.LINETYPE.BREAK_END:t=ot.endLoop(),await at.drawLoop(d,t,"break",st),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;default:try{r=o.msgModel,r.starty=ot.getVerticalPos(),r.sequenceIndex=_,r.sequenceVisible=n.db.showSequenceNumbers();const t=await dt(0,r);wt(o,r,t,R,p,f,g),C.push({messageModel:r,lineStartY:t}),ot.models.addMessage(r)}catch(B){l.Rm.error("error while drawing message",B)}}[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,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(o.type)&&(_+=E),R++}l.Rm.debug("createdActors",f),l.Rm.debug("destroyedActors",g),await gt(d,p,y,!1);for(const o of C)await pt(d,o.messageModel,o.lineStartY,n);st.mirrorActors&&await gt(d,p,y,!0),S.forEach(t=>at.drawBackgroundRect(d,t)),I(d,p,y,st);for(const o of ot.models.boxes){o.height=ot.getVerticalPos()-o.y,ot.insert(o.x,o.y,o.x+o.width,o.height);const t=2*st.boxMargin;o.startx=o.x-t,o.starty=o.y-.25*t,o.stopx=o.startx+o.width+2*t,o.stopy=o.starty+o.height+.75*t,o.stroke="rgb(0,0,0, 0.5)",at.drawBox(d,o,st)}x&&ot.bumpVerticalPos(st.boxMargin);const L=mt(d,p,y,u),{bounds:D}=ot.getBounds();void 0===D.startx&&(D.startx=0),void 0===D.starty&&(D.starty=0),void 0===D.stopx&&(D.stopx=0),void 0===D.stopy&&(D.stopy=0);let N=D.stopy-D.starty;N{const r=ct(st);let n=e.actorKeys.reduce((e,r)=>e+(t.get(r).width+(t.get(r).margin||0)),0);n+=8*st.boxMargin,n-=2*st.boxTextMargin,e.wrap&&(e.name=s._K.wrapLabel(e.name,n-2*st.wrapPadding,r));const a=s._K.calculateTextDimensions(e.name,r);i=o.Y2.getMax(a.height,i);const l=o.Y2.getMax(n,a.width+2*st.wrapPadding);if(e.margin=st.boxTextMargin,nt.textMaxHeight=i),o.Y2.getMax(n,st.height)}(0,l.K2)(_t,"calculateActorMargins");var Et=(0,l.K2)(async function(t,e,r){const n=e.get(t.from),i=e.get(t.to),a=n.x,c=i.x,h=t.wrap&&t.message;let u=(0,o.Wi)(t.message)?await(0,o.Dl)(t.message,(0,o.D7)()):s._K.calculateTextDimensions(h?s._K.wrapLabel(t.message,st.width,ht(st)):t.message,ht(st));const d={width:h?st.width:o.Y2.getMax(st.width,u.width+2*st.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(d.width=h?o.Y2.getMax(st.width,u.width):o.Y2.getMax(n.width/2+i.width/2,u.width+2*st.noteMargin),d.startx=a+(n.width+st.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(d.width=h?o.Y2.getMax(st.width,u.width+2*st.noteMargin):o.Y2.getMax(n.width/2+i.width/2,u.width+2*st.noteMargin),d.startx=a-d.width+(n.width-st.actorMargin)/2):t.to===t.from?(u=s._K.calculateTextDimensions(h?s._K.wrapLabel(t.message,o.Y2.getMax(st.width,n.width),ht(st)):t.message,ht(st)),d.width=h?o.Y2.getMax(st.width,n.width):o.Y2.getMax(n.width,st.width,u.width+2*st.noteMargin),d.startx=a+(n.width-d.width)/2):(d.width=Math.abs(a+n.width/2-(c+i.width/2))+st.actorMargin,d.startx=a2,f=(0,l.K2)(t=>h?-t:t,"adjustValue");t.from===t.to?d=u:(t.activate&&!p&&(d+=f(st.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(d+=f(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(u-=f(3)));const g=[n,i,a,c],m=Math.abs(u-d);t.wrap&&t.message&&(t.message=s._K.wrapLabel(t.message,o.Y2.getMax(m+2*st.wrapPadding,st.width),ct(st)));const y=s._K.calculateTextDimensions(t.message,ct(st));return{width:o.Y2.getMax(t.wrap?0:y.width+2*st.wrapPadding,m+2*st.wrapPadding,st.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},"buildMessageModel"),St=(0,l.K2)(async function(t,e,r,n){const i={},a=[];let s,c,h;for(const l of t){switch(l.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:l.id,msg:l.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:l.message&&(s=a.pop(),i[s.id]=s,i[l.id]=s,a.push(s));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:s=a.pop(),i[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{const t=e.get(l.from?l.from:l.to.actor),r=vt(l.from?l.from:l.to.actor).length,n=t.x+t.width/2+(r-1)*st.activationWidth/2,i={startx:n,stopx:n+st.activationWidth,actor:l.from,enabled:!0};ot.activations.push(i)}break;case n.db.LINETYPE.ACTIVE_END:{const t=ot.activations.map(t=>t.actor).lastIndexOf(l.from);ot.activations.splice(t,1).splice(0,1)}}void 0!==l.placement?(c=await Et(l,e,n),l.noteModel=c,a.forEach(t=>{s=t,s.from=o.Y2.getMin(s.from,c.startx),s.to=o.Y2.getMax(s.to,c.startx+c.width),s.width=o.Y2.getMax(s.width,Math.abs(s.from-s.to))-st.labelBoxWidth})):(h=Ct(l,e,n),l.msgModel=h,h.startx&&h.stopx&&a.length>0&&a.forEach(t=>{if(s=t,h.startx===h.stopx){const t=e.get(l.from),r=e.get(l.to);s.from=o.Y2.getMin(t.x-h.width/2,t.x-t.width/2,s.from),s.to=o.Y2.getMax(r.x+h.width/2,r.x+t.width/2,s.to),s.width=o.Y2.getMax(s.width,Math.abs(s.to-s.from))-st.labelBoxWidth}else s.from=o.Y2.getMin(h.startx,s.from),s.to=o.Y2.getMax(h.stopx,s.to),s.width=o.Y2.getMax(s.width,h.width)-st.labelBoxWidth}))}return ot.activations=[],l.Rm.debug("Loop type widths:",i),i},"calculateLoopBounds"),Rt={bounds:ot,drawActors:gt,drawActorsPopup:mt,setConf:yt,draw:Tt},Lt={parser:d,get db(){return new x},renderer:Rt,styles:w,init:(0,l.K2)(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,(0,o.XV)({sequence:{wrap:t.wrap}}))},"init")}},8142(t,e,r){"use strict";r.d(e,{diagram:()=>L});var n,i=r(4616),a=(r(9625),r(1152),r(45),r(5164),r(8698),r(5894),r(3245),r(2387),r(607),r(3226)),s=r(144),o=r(797),l=r(1444),c=r(567),h=r(697),u=(0,o.K2)(t=>t.append("circle").attr("class","start-state").attr("r",(0,s.D7)().state.sizeUnit).attr("cx",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit).attr("cy",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit),"drawStartState"),d=(0,o.K2)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,s.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,s.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),p=(0,o.K2)((t,e)=>{const r=t.append("text").attr("x",2*(0,s.D7)().state.padding).attr("y",(0,s.D7)().state.textHeight+2*(0,s.D7)().state.padding).attr("font-size",(0,s.D7)().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,s.D7)().state.padding).attr("y",(0,s.D7)().state.padding).attr("width",n.width+2*(0,s.D7)().state.padding).attr("height",n.height+2*(0,s.D7)().state.padding).attr("rx",(0,s.D7)().state.radius),r},"drawSimpleState"),f=(0,o.K2)((t,e)=>{const r=(0,o.K2)(function(t,e,r){const n=t.append("tspan").attr("x",2*(0,s.D7)().state.padding).text(e);r||n.attr("dy",(0,s.D7)().state.textHeight)},"addTspan"),n=t.append("text").attr("x",2*(0,s.D7)().state.padding).attr("y",(0,s.D7)().state.textHeight+1.3*(0,s.D7)().state.padding).attr("font-size",(0,s.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,a=t.append("text").attr("x",(0,s.D7)().state.padding).attr("y",i+.4*(0,s.D7)().state.padding+(0,s.D7)().state.dividerMargin+(0,s.D7)().state.textHeight).attr("class","state-description");let l=!0,c=!0;e.descriptions.forEach(function(t){l||(r(a,t,c),c=!1),l=!1});const h=t.append("line").attr("x1",(0,s.D7)().state.padding).attr("y1",(0,s.D7)().state.padding+i+(0,s.D7)().state.dividerMargin/2).attr("y2",(0,s.D7)().state.padding+i+(0,s.D7)().state.dividerMargin/2).attr("class","descr-divider"),u=a.node().getBBox(),d=Math.max(u.width,n.width);return h.attr("x2",d+3*(0,s.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,s.D7)().state.padding).attr("y",(0,s.D7)().state.padding).attr("width",d+2*(0,s.D7)().state.padding).attr("height",u.height+i+2*(0,s.D7)().state.padding).attr("rx",(0,s.D7)().state.radius),t},"drawDescrState"),g=(0,o.K2)((t,e,r)=>{const n=(0,s.D7)().state.padding,i=2*(0,s.D7)().state.padding,a=t.node().getBBox(),o=a.width,l=a.x,c=t.append("text").attr("x",0).attr("y",(0,s.D7)().state.titleShift).attr("font-size",(0,s.D7)().state.fontSize).attr("class","state-title").text(e.id),h=c.node().getBBox().width+i;let u,d=Math.max(h,o);d===o&&(d+=i);const p=t.node().getBBox();e.doc,u=l-n,h>o&&(u=(o-d)/2+n),Math.abs(l-p.x)o&&(u=l-(h-o)/2);const f=1-(0,s.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",u).attr("y",f).attr("class",r?"alt-composit":"composit").attr("width",d).attr("height",p.height+(0,s.D7)().state.textHeight+(0,s.D7)().state.titleShift+1).attr("rx","0"),c.attr("x",u+n),h<=o&&c.attr("x",l+(d-i)/2-h/2+n),t.insert("rect",":first-child").attr("x",u).attr("y",(0,s.D7)().state.titleShift-(0,s.D7)().state.textHeight-(0,s.D7)().state.padding).attr("width",d).attr("height",3*(0,s.D7)().state.textHeight).attr("rx",(0,s.D7)().state.radius),t.insert("rect",":first-child").attr("x",u).attr("y",(0,s.D7)().state.titleShift-(0,s.D7)().state.textHeight-(0,s.D7)().state.padding).attr("width",d).attr("height",p.height+3+2*(0,s.D7)().state.textHeight).attr("rx",(0,s.D7)().state.radius),t},"addTitleAndBox"),m=(0,o.K2)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,s.D7)().state.sizeUnit+(0,s.D7)().state.miniPadding).attr("cx",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit+(0,s.D7)().state.miniPadding).attr("cy",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit+(0,s.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,s.D7)().state.sizeUnit).attr("cx",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit+2).attr("cy",(0,s.D7)().state.padding+(0,s.D7)().state.sizeUnit+2)),"drawEndState"),y=(0,o.K2)((t,e)=>{let r=(0,s.D7)().state.forkWidth,n=(0,s.D7)().state.forkHeight;if(e.parentId){let t=r;r=n,n=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",(0,s.D7)().state.padding).attr("y",(0,s.D7)().state.padding)},"drawForkJoinState"),v=(0,o.K2)((t,e,r,n)=>{let i=0;const a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let o=t.replace(/\r\n/g,"
    ");o=o.replace(/\n/g,"
    ");const l=o.split(s.Y2.lineBreakRegex);let c=1.25*(0,s.D7)().state.noteMargin;for(const h of l){const t=h.trim();if(t.length>0){const n=a.append("tspan");if(n.text(t),0===c){c+=n.node().getBBox().height}i+=c,n.attr("x",e+(0,s.D7)().state.noteMargin),n.attr("y",r+i+1.25*(0,s.D7)().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),b=(0,o.K2)((t,e)=>{e.attr("class","state-note");const r=e.append("rect").attr("x",0).attr("y",(0,s.D7)().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=v(t,0,0,n);return r.attr("height",a+2*(0,s.D7)().state.noteMargin),r.attr("width",i+2*(0,s.D7)().state.noteMargin),r},"drawNote"),x=(0,o.K2)(function(t,e){const r=e.id,n={id:r,label:e.id,width:0,height:0},i=t.append("g").attr("id",r).attr("class","stateGroup");"start"===e.type&&u(i),"end"===e.type&&m(i),"fork"!==e.type&&"join"!==e.type||y(i,e),"note"===e.type&&b(e.note.text,i),"divider"===e.type&&d(i),"default"===e.type&&0===e.descriptions.length&&p(i,e),"default"===e.type&&e.descriptions.length>0&&f(i,e);const a=i.node().getBBox();return n.width=a.width+2*(0,s.D7)().state.padding,n.height=a.height+2*(0,s.D7)().state.padding,n},"drawState"),w=0,T=(0,o.K2)(function(t,e,r){const n=(0,o.K2)(function(t){switch(t){case i.u4.relationType.AGGREGATION:return"aggregation";case i.u4.relationType.EXTENSION:return"extension";case i.u4.relationType.COMPOSITION:return"composition";case i.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));const c=e.points,h=(0,l.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(l.qrM),u=t.append("path").attr("d",h(c)).attr("id","edge"+w).attr("class","transition");let d="";if((0,s.D7)().state.arrowMarkerAbsolute&&(d=(0,s.ID)(!0)),u.attr("marker-end","url("+d+"#"+n(i.u4.relationType.DEPENDENCY)+"End)"),void 0!==r.title){const n=t.append("g").attr("class","stateLabel"),{x:i,y:l}=a._K.calcLabelPosition(e.points),c=s.Y2.getRows(r.title);let h=0;const u=[];let d=0,p=0;for(let t=0;t<=c.length;t++){const e=n.append("text").attr("text-anchor","middle").text(c[t]).attr("x",i).attr("y",l+h),r=e.node().getBBox();if(d=Math.max(d,r.width),p=Math.min(p,r.x),o.Rm.info(r.x,i,l+h),0===h){const t=e.node().getBBox();h=t.height,o.Rm.info("Title height",h,l)}u.push(e)}let f=h*c.length;if(c.length>1){const t=(c.length-1)*h*.5;u.forEach((e,r)=>e.attr("y",l+r*h-t)),f=h*c.length}const g=n.node().getBBox();n.insert("rect",":first-child").attr("class","box").attr("x",i-d/2-(0,s.D7)().state.padding/2).attr("y",l-f/2-(0,s.D7)().state.padding/2-3.5).attr("width",d+(0,s.D7)().state.padding).attr("height",f+(0,s.D7)().state.padding),o.Rm.info(g)}w++},"drawEdge"),k={},A=(0,o.K2)(function(){},"setConf"),_=(0,o.K2)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),E=(0,o.K2)(function(t,e,r,i){n=(0,s.D7)().state;const a=(0,s.D7)().securityLevel;let c;"sandbox"===a&&(c=(0,l.Ltv)("#i"+e));const h="sandbox"===a?(0,l.Ltv)(c.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),u="sandbox"===a?c.nodes()[0].contentDocument:document;o.Rm.debug("Rendering diagram "+t);const d=h.select(`[id='${e}']`);_(d);const p=i.db.getRootDoc();S(p,d,void 0,!1,h,u,i);const f=n.padding,g=d.node().getBBox(),m=g.width+2*f,y=g.height+2*f,v=1.75*m;(0,s.a$)(d,y,v,n.useMaxWidth),d.attr("viewBox",`${g.x-n.padding} ${g.y-n.padding} `+m+" "+y)},"draw"),C=(0,o.K2)(t=>t?t.length*n.fontSizeFactor:1,"getLabelWidth"),S=(0,o.K2)((t,e,r,i,a,l,u)=>{const d=new h.T({compound:!0,multigraph:!0});let p,f=!0;for(p=0;p{const e=t.parentElement;let r=0,n=0;e&&(e.parentElement&&(r=e.parentElement.getBBox().width),n=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(n)&&(n=0)),t.setAttribute("x1",0-n+8),t.setAttribute("x2",r-n-8)})}else o.Rm.debug("No Node "+t+": "+JSON.stringify(d.node(t)))});let A=w.getBBox();d.edges().forEach(function(t){void 0!==t&&void 0!==d.edge(t)&&(o.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(d.edge(t))),T(e,d.edge(t),d.edge(t).relation))}),A=w.getBBox();const _={id:r||"root",label:r||"root",width:0,height:0};return _.width=A.width+2*n.padding,_.height=A.height+2*n.padding,o.Rm.debug("Doc rendered",_,d),_},"renderDoc"),R={setConf:A,draw:E},L={parser:i.Zk,get db(){return new i.u4(1)},renderer:R,styles:i.tM,init:(0,o.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},4802(t,e,r){"use strict";r.d(e,{diagram:()=>a});var n=r(4616),i=(r(9625),r(1152),r(45),r(5164),r(8698),r(5894),r(3245),r(2387),r(607),r(3226),r(144),r(797)),a={parser:n.Zk,get db(){return new n.u4(2)},renderer:n.q7,styles:n.tM,init:(0,i.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},291(t,e,r){"use strict";r.d(e,{diagram:()=>X});var n=r(144),i=r(797),a=r(1444),s=r(5097),o=r(8041),l=r(5263),c=function(){var t=(0,i.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17],h={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:(0,i.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:n.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:n.addTask(a[o],0,""),this.$=a[o];break;case 16:n.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:(0,i.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,i.K2)(function(t){var e=this,r=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=s.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;s.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(t){r.length=r.length-2*t,a.length=a.length-t,s.length=s.length-t},"popStack"),(0,i.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=o[w]&&o[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],o[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),a.push(p.yytext),s.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=a[a.length-_],S._$={first_line:s[s.length-(_||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(_||1)].first_column,last_column:s[s.length-1].last_column},y&&(S._$.range=[s[s.length-(_||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],a,s].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),a=a.slice(0,-1*_),s=s.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),a.push(S.$),s.push(S._$),E=o[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},u=function(){return{EOF:1,parseError:(0,i.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,i.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,i.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,i.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(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})},"reject"),less:(0,i.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,i.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(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,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,i.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,i.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(t,e,r,n){switch(r){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}}();function d(){this.yy={}}return h.lexer=u,(0,i.K2)(d,"Parser"),d.prototype=h,h.Parser=d,new d}();c.parser=c;var h=c,u={};(0,i.VA)(u,{addEvent:()=>k,addSection:()=>b,addTask:()=>T,addTaskOrg:()=>A,clear:()=>v,default:()=>E,getCommonDb:()=>y,getSections:()=>x,getTasks:()=>w});var d="",p=0,f=[],g=[],m=[],y=(0,i.K2)(()=>n.Wt,"getCommonDb"),v=(0,i.K2)(function(){f.length=0,g.length=0,d="",m.length=0,(0,n.IU)()},"clear"),b=(0,i.K2)(function(t){d=t,f.push(t)},"addSection"),x=(0,i.K2)(function(){return f},"getSections"),w=(0,i.K2)(function(){let t=_();let e=0;for(;!t&&e<100;)t=_(),e++;return g.push(...m),g},"getTasks"),T=(0,i.K2)(function(t,e,r){const n={id:p++,section:d,type:d,task:t,score:e||0,events:r?[r]:[]};m.push(n)},"addTask"),k=(0,i.K2)(function(t){m.find(t=>t.id===p-1).events.push(t)},"addEvent"),A=(0,i.K2)(function(t){const e={section:d,type:d,description:t,task:t,classes:[]};g.push(e)},"addTaskOrg"),_=(0,i.K2)(function(){const t=(0,i.K2)(function(t){return m[t].processed},"compileTask");let e=!0;for(const[r,n]of m.entries())t(r),e=e&&n.processed;return e},"compileTasks"),E={clear:v,getCommonDb:y,addSection:b,getSections:x,getTasks:w,addTask:T,addTaskOrg:A,addEvent:k},C=(0,i.K2)(function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),void 0!==e.class&&r.attr("class",e.class),r},"drawRect"),S=(0,i.K2)(function(t,e){const r=15,n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",r).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");function o(t){const n=(0,a.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(r/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(t){const n=(0,a.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(r/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.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")}return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,i.K2)(o,"smile"),(0,i.K2)(l,"sad"),(0,i.K2)(c,"ambivalent"),e.score>3?o(s):e.score<3?l(s):c(s),n},"drawFace"),R=(0,i.K2)(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),void 0!==r.class&&r.attr("class",r.class),void 0!==e.title&&r.append("title").text(e.title),r},"drawCircle"),L=(0,i.K2)(function(t,e){const r=e.text.replace(//gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),void 0!==e.class&&n.attr("class",e.class);const i=n.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(r),n},"drawText"),D=(0,i.K2)(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}(0,i.K2)(r,"genPoints");const n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,L(t,e)},"drawLabel"),N=(0,i.K2)(function(t,e,r){const n=t.append("g"),i=$();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,C(n,i),B(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),I=-1,M=(0,i.K2)(function(t,e,r){const n=e.x+r.width/2,i=t.append("g");I++;i.append("line").attr("id","task"+I).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),S(i,{cx:n,cy:300+30*(5-e.score),score:e.score});const a=$();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width,a.height=r.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,C(i,a),B(r)(e.task,i,a.x,a.y,a.width,a.height,{class:"task"},r,e.colour)},"drawTask"),O=(0,i.K2)(function(t,e){C(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),P=(0,i.K2)(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),$=(0,i.K2)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),B=function(){function t(t,e,r,i,a,s,o,l){n(e.append("text").attr("x",r+a/2).attr("y",i+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,r,i,a,s,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,d=t.split(//gi);for(let p=0;p)/).reverse(),i=[],s=r.attr("y"),o=parseFloat(r.attr("dy")),l=r.text(null).append("tspan").attr("x",0).attr("y",s).attr("dy",o+"em");for(let a=0;ae||"
    "===t)&&(i.pop(),l.text(i.join(" ").trim()),i="
    "===t?[""]:[t],l=r.append("tspan").attr("x",0).attr("y",s).attr("dy","1.1em").text(t))})}(0,i.K2)(z,"wrap");var K=(0,i.K2)(function(t,e,r,n){const i=r%12-1,a=t.append("g");e.section=i,a.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+i);const s=a.append("g"),o=a.append("g"),l=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(z,e.width).node().getBBox(),c=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=l.height+1.1*c*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),U(s,e,i,n),e},"drawNode"),q=(0,i.K2)(function(t,e,r){const n=t.append("g"),i=n.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(z,e.width).node().getBBox(),a=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return n.remove(),i.height+1.1*a*.5+e.padding},"getVirtualNodeHeight"),U=(0,i.K2)(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),j={drawRect:C,drawCircle:R,drawSection:N,drawText:L,drawLabel:D,drawTask:M,drawBackgroundRect:O,getTextObj:P,getNoteRect:$,initGraphics:F,drawNode:K,getVirtualNodeHeight:q},G=(0,i.K2)(function(t,e,r,s){const o=(0,n.D7)(),l=o.timeline?.leftMargin??50;i.Rm.debug("timeline",s.db);const c=o.securityLevel;let h;"sandbox"===c&&(h=(0,a.Ltv)("#i"+e));const u=("sandbox"===c?(0,a.Ltv)(h.nodes()[0].contentDocument.body):(0,a.Ltv)("body")).select("#"+e);u.append("g");const d=s.db.getTasks(),p=s.db.getCommonDb().getDiagramTitle();i.Rm.debug("task",d),j.initGraphics(u);const f=s.db.getSections();i.Rm.debug("sections",f);let g=0,m=0,y=0,v=0,b=50+l,x=50;v=50;let w=0,T=!0;f.forEach(function(t){const e={number:w,descr:t,section:w,width:150,padding:20,maxHeight:g},r=j.getVirtualNodeHeight(u,e,o);i.Rm.debug("sectionHeight before draw",r),g=Math.max(g,r+20)});let k=0,A=0;i.Rm.debug("tasks.length",d.length);for(const[n,a]of d.entries()){const t={number:n,descr:a,section:a.section,width:150,padding:20,maxHeight:m},e=j.getVirtualNodeHeight(u,t,o);i.Rm.debug("taskHeight before draw",e),m=Math.max(m,e+20),k=Math.max(k,a.events.length);let r=0;for(const n of a.events){const t={descr:n,section:a.section,number:a.section,width:150,padding:20,maxHeight:50};r+=j.getVirtualNodeHeight(u,t,o)}a.events.length>0&&(r+=10*(a.events.length-1)),A=Math.max(A,r)}i.Rm.debug("maxSectionHeight before draw",g),i.Rm.debug("maxTaskHeight before draw",m),f&&f.length>0?f.forEach(t=>{const e=d.filter(e=>e.section===t),r={number:w,descr:t,section:w,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:g};i.Rm.debug("sectionNode",r);const n=u.append("g"),a=j.drawNode(n,r,w,o);i.Rm.debug("sectionNode output",a),n.attr("transform",`translate(${b}, 50)`),x+=g+50,e.length>0&&Y(u,e,w,b,x,m,o,k,A,g,!1),b+=200*Math.max(e.length,1),x=50,w++}):(T=!1,Y(u,d,w,b,x,m,o,k,A,g,!0));const _=u.node().getBBox();i.Rm.debug("bounds",_),p&&u.append("text").text(p).attr("x",_.width/2-l).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),y=T?g+m+150:m+100;u.append("g").attr("class","lineWrapper").append("line").attr("x1",l).attr("y1",y).attr("x2",_.width+3*l).attr("y2",y).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,n.ot)(void 0,u,o.timeline?.padding??50,o.timeline?.useMaxWidth??!1)},"draw"),Y=(0,i.K2)(function(t,e,r,n,a,s,o,l,c,h,u){for(const d of e){const e={descr:d.task,section:r,number:r,width:150,padding:20,maxHeight:s};i.Rm.debug("taskNode",e);const l=t.append("g").attr("class","taskWrapper"),h=j.drawNode(l,e,r,o).height;if(i.Rm.debug("taskHeight after draw",h),l.attr("transform",`translate(${n}, ${a})`),s=Math.max(s,h),d.events){const e=t.append("g").attr("class","lineWrapper");let i=s;a+=100,i+=W(t,d.events,r,n,a,o),a-=100,e.append("line").attr("x1",n+95).attr("y1",a+s).attr("x2",n+95).attr("y2",a+s+100+c+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n+=200,u&&!o.timeline?.disableMulticolor&&r++}a-=10},"drawTasks"),W=(0,i.K2)(function(t,e,r,n,a,s){let o=0;const l=a;a+=100;for(const c of e){const e={descr:c,section:r,number:r,width:150,padding:20,maxHeight:50};i.Rm.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),h=j.drawNode(l,e,r,s).height;o+=h,l.attr("transform",`translate(${n}, ${a})`),a=a+10+h}return a=l,o},"drawEvents"),H={setConf:(0,i.K2)(()=>{},"setConf"),draw:G},V=(0,i.K2)(t=>{let e="";for(let r=0;r`\n .edge {\n stroke-width: 3;\n }\n ${V(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`,"getStyles")}},5955(t,e,r){"use strict";r.d(e,{diagram:()=>et});var n=r(3590),i=r(607),a=r(3226),s=r(144),o=r(797),l=r(1444),c=function(){var t=(0,o.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],a=[1,6],s=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],f=[1,31],g=[1,32],m=[1,33],y=[1,34],v=[1,35],b=[1,36],x=[1,37],w=[1,43],T=[1,42],k=[1,47],A=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],S=[1,64],R={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,o.K2)(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 5:n.setOrientation(a[o]);break;case 9:n.setDiagramTitle(a[o].text.trim());break;case 12:n.setLineData({text:"",type:"text"},a[o]);break;case 13:n.setLineData(a[o-1],a[o]);break;case 14:n.setBarData({text:"",type:"text"},a[o]);break;case 15:n.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 19:case 27:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:n.setXAxisTitle(a[o]);break;case 23:n.setXAxisTitle(a[o-1]);break;case 24:n.setXAxisTitle({type:"text",text:""});break;case 25:n.setXAxisBand(a[o]);break;case 26:n.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:n.setYAxisTitle(a[o]);break;case 31:n.setYAxisTitle(a[o-1]);break;case 32:n.setYAxisTitle({type:"text",text:""});break;case 33:n.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,34:i,35:a,36:s}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,34:i,35:a,36:s}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:i,35:a,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,34:i,35:a,36:s}),{1:[2,3]},t(l,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:s}),{11:23,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},{11:39,13:38,24:w,27:T,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},{11:45,15:44,27:k,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},{11:49,17:48,24:A,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},{11:52,17:51,24:A,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(E,[2,37],{40:55,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x}),t(E,[2,38]),t(E,[2,39]),t(C,[2,40]),t(C,[2,42]),t(C,[2,43]),t(C,[2,44]),t(C,[2,45]),t(C,[2,46]),t(C,[2,47]),t(C,[2,48]),t(C,[2,49]),t(C,[2,50]),t(C,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:w,27:T}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},t(_,[2,11]),t(_,[2,30],{33:60,27:k}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:A},{25:63,27:S},t(_,[2,14]),{17:65,24:A},t(_,[2,16]),t(_,[2,17]),t(C,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},t(_,[2,33]),t(_,[2,19]),{25:73,27:S},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,o.K2)(v,"lex");for(var b,x,w,T,k,A,_,E,C,S={};;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(null==b&&(b=v()),T=s[w]&&s[w][b]),void 0===T||!T.length||!T[0]){var R="";for(A in C=[],s[w])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(T[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[T[1]][1],S.$=i[i.length-_],S._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(S._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[l,h,c,f.yy,T[1],i,a].concat(d))))return k;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[T[1]][0]),i.push(S.$),a.push(S._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},L=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(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})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(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,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,e,r,n){switch(r){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function D(){this.yy={}}return R.lexer=L,(0,o.K2)(D,"Parser"),D.prototype=R,R.Parser=D,new D}();c.parser=c;var h=c;function u(t){return"bar"===t.type}function d(t){return"band"===t.type}function p(t){return"linear"===t.type}(0,o.K2)(u,"isBarPlot"),(0,o.K2)(d,"isBandAxisData"),(0,o.K2)(p,"isLinearAxisData");var f=class{constructor(t){this.parentGroup=t}static{(0,o.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((t,e)=>Math.max(e.length,t),0)*e,height:e};const r={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(const a of t){const t=(0,i.W6)(n,1,a),s=t?t.width:a.length*e,o=t?t.height:e;r.width=Math.max(r.width,s),r.height=Math.max(r.height,o)}return n.remove(),r}},g=class{constructor(t,e,r,n){this.axisConfig=t,this.title=e,this.textDimensionCalculator=r,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,o.K2)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const r=this.getLabelDimension(),n=.2*t.width;this.outerPadding=Math.min(r.width/2,n);const i=r.height+2*this.axisConfig.labelPadding;this.labelTextHeight=r.height,i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),r=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,r<=e&&(e-=r,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const r=this.getLabelDimension(),n=.2*t.height;this.outerPadding=Math.min(r.height/2,n);const i=r.width+2*this.axisConfig.labelPadding;i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),r=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,r<=e&&(e-=r,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${e},${this.getScaleValue(t)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e} L ${this.getScaleValue(t)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},m=class extends g{static{(0,o.K2)(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=(0,l.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,l.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),o.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},y=class extends g{static{(0,o.K2)(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=(0,l.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,l.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function v(t,e,r,n){const i=new f(n);return d(t)?new m(e,r,t.categories,t.title,i):new y(e,r,[t.min,t.max],t.title,i)}(0,o.K2)(v,"getAxis");var b=class{constructor(t,e,r,n){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,o.K2)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),r=Math.max(e.width,t.width),n=e.height+2*this.chartConfig.titlePadding;return e.width<=r&&e.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=r,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function x(t,e,r,n){const i=new f(n);return new b(i,t,e,r)}(0,o.K2)(x,"getChartTitleComponent");var w=class{constructor(t,e,r,n,i){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{(0,o.K2)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let e;return e="horizontal"===this.orientation?(0,l.n8j)().y(t=>t[0]).x(t=>t[1])(t):(0,l.n8j)().x(t=>t[0]).y(t=>t[1])(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},T=class{constructor(t,e,r,n,i,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{(0,o.K2)(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),e=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=e/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-r,height:e,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-r,y:t[1],width:e,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},k=class{constructor(t,e,r){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,o.K2)(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[e,r]of this.chartData.plots.entries())switch(r.type){case"line":{const n=new w(r,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break;case"bar":{const n=new T(r,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}}return t}};function A(t,e,r){return new k(t,e,r)}(0,o.K2)(A,"getPlotComponent");var _,E=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:x(t,e,r,n),plot:A(t,e,r),xAxis:v(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:v(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{(0,o.K2)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r=0,n=0,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});t-=s.width,e-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),n=s.height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),s=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=s.height,this.componentStore.yAxis.setAxisPosition("left"),s=this.componentStore.yAxis.calculateSpace({width:t,height:e}),r=s.width,t-=s.width,t>0&&(i+=t,t=0),e>0&&(a+=e,e=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([r,r+i]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:n+a}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r=0,n=0,i=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,e-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),r=o.height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=o.width,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=o.height,i=r+o.height,t>0&&(a+=t,t=0),e>0&&(s+=e,e=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},C=class{static{(0,o.K2)(this,"XYChartBuilder")}static build(t,e,r,n){return new E(t,e,r,n).getDrawableElement()}},S=0,R=P(),L=O(),D=$(),N=L.plotColorPalette.split(",").map(t=>t.trim()),I=!1,M=!1;function O(){const t=(0,s.P$)(),e=(0,s.zj)();return(0,a.$t)(t.xyChart,e.themeVariables.xyChart)}function P(){const t=(0,s.zj)();return(0,a.$t)(s.UI.xyChart,t.xyChart)}function $(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function B(t){const e=(0,s.zj)();return(0,s.jZ)(t.trim(),e)}function F(t){_=t}function z(t){R.chartOrientation="horizontal"===t?"horizontal":"vertical"}function K(t){D.xAxis.title=B(t.text)}function q(t,e){D.xAxis={type:"linear",title:D.xAxis.title,min:t,max:e},I=!0}function U(t){D.xAxis={type:"band",title:D.xAxis.title,categories:t.map(t=>B(t.text))},I=!0}function j(t){D.yAxis.title=B(t.text)}function G(t,e){D.yAxis={type:"linear",title:D.yAxis.title,min:t,max:e},M=!0}function Y(t){const e=Math.min(...t),r=Math.max(...t),n=p(D.yAxis)?D.yAxis.min:1/0,i=p(D.yAxis)?D.yAxis.max:-1/0;D.yAxis={type:"linear",title:D.yAxis.title,min:Math.min(n,e),max:Math.max(i,r)}}function W(t){let e=[];if(0===t.length)return e;if(!I){const e=p(D.xAxis)?D.xAxis.min:1/0,r=p(D.xAxis)?D.xAxis.max:-1/0;q(Math.min(e,1),Math.max(r,t.length))}if(M||Y(t),d(D.xAxis)&&(e=D.xAxis.categories.map((e,r)=>[e,t[r]])),p(D.xAxis)){const r=D.xAxis.min,n=D.xAxis.max,i=(n-r)/(t.length-1),a=[];for(let t=r;t<=n;t+=i)a.push(`${t}`);e=a.map((e,r)=>[e,t[r]])}return e}function H(t){return N[0===t?0:t%N.length]}function V(t,e){const r=W(e);D.plots.push({type:"line",strokeFill:H(S),strokeWidth:2,data:r}),S++}function X(t,e){const r=W(e);D.plots.push({type:"bar",fill:H(S),data:r}),S++}function Z(){if(0===D.plots.length)throw Error("No Plot to render, please provide a plot with some data");return D.title=(0,s.ab)(),C.build(R,D,L,_)}function Q(){return L}function J(){return R}function tt(){return D}(0,o.K2)(O,"getChartDefaultThemeConfig"),(0,o.K2)(P,"getChartDefaultConfig"),(0,o.K2)($,"getChartDefaultData"),(0,o.K2)(B,"textSanitizer"),(0,o.K2)(F,"setTmpSVGG"),(0,o.K2)(z,"setOrientation"),(0,o.K2)(K,"setXAxisTitle"),(0,o.K2)(q,"setXAxisRangeData"),(0,o.K2)(U,"setXAxisBand"),(0,o.K2)(j,"setYAxisTitle"),(0,o.K2)(G,"setYAxisRangeData"),(0,o.K2)(Y,"setYAxisRangeFromPlotData"),(0,o.K2)(W,"transformDataWithoutCategory"),(0,o.K2)(H,"getPlotColorFromPalette"),(0,o.K2)(V,"setLineData"),(0,o.K2)(X,"setBarData"),(0,o.K2)(Z,"getDrawableElem"),(0,o.K2)(Q,"getChartThemeConfig"),(0,o.K2)(J,"getChartConfig"),(0,o.K2)(tt,"getXYChartData");var et={parser:h,db:{getDrawableElem:Z,clear:(0,o.K2)(function(){(0,s.IU)(),S=0,R=P(),D={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},L=O(),N=L.plotColorPalette.split(",").map(t=>t.trim()),I=!1,M=!1},"clear"),setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,getAccDescription:s.m7,setAccDescription:s.EI,setOrientation:z,setXAxisTitle:K,setXAxisRangeData:q,setXAxisBand:U,setYAxisTitle:j,setYAxisRangeData:G,setLineData:V,setBarData:X,setTmpSVGG:F,getChartThemeConfig:Q,getChartConfig:J,getXYChartData:tt},renderer:{draw:(0,o.K2)((t,e,r,i)=>{const a=i.db,l=a.getChartThemeConfig(),c=a.getChartConfig(),h=a.getXYChartData().plots[0].data.map(t=>t[1]);function u(t){return"top"===t?"text-before-edge":"middle"}function d(t){return"left"===t?"start":"right"===t?"end":"middle"}function p(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,o.K2)(u,"getDominantBaseLine"),(0,o.K2)(d,"getTextAnchor"),(0,o.K2)(p,"getTextTransformation"),o.Rm.debug("Rendering xychart chart\n"+t);const f=(0,n.D)(e),g=f.append("g").attr("class","main"),m=g.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");(0,s.a$)(f,c.height,c.width,!0),f.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",l.backgroundColor),a.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));const y=a.getDrawableElem(),v={};function b(t){let e=g,r="";for(const[n]of t.entries()){let i=g;n>0&&v[r]&&(i=v[r]),r+=t[n],e=v[r],e||(e=v[r]=i.append("g").attr("class",t[n]))}return e}(0,o.K2)(b,"getGroup");for(const n of y){if(0===n.data.length)continue;const t=b(n.groupTexts);switch(n.type){case"rect":if(t.selectAll("rect").data(n.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),c.showDataLabel)if("horizontal"===c.chartOrientation){let e=function(t,e){const{data:n,label:i}=t;return e*i.length*r<=n.width-10};(0,o.K2)(e,"fitsHorizontally");const r=.7,i=n.data.map((t,e)=>({data:t,label:h[e].toString()})).filter(t=>t.data.width>0&&t.data.height>0),a=i.map(t=>{const{data:r}=t;let n=.7*r.height;for(;!e(t,n)&&n>0;)n-=1;return n}),s=Math.floor(Math.min(...a));t.selectAll("text").data(i).enter().append("text").attr("x",t=>t.data.x+t.data.width-10).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${s}px`).text(t=>t.label)}else{let e=function(t,e,r){const{data:n,label:i}=t,a=e*i.length*.7,s=n.x+n.width/2,o=s+a/2,l=s-a/2>=n.x&&o<=n.x+n.width,c=n.y+r+e<=n.y+n.height;return l&&c};(0,o.K2)(e,"fitsInBar");const r=10,i=n.data.map((t,e)=>({data:t,label:h[e].toString()})).filter(t=>t.data.width>0&&t.data.height>0),a=i.map(t=>{const{data:n,label:i}=t;let a=n.width/(.7*i.length);for(;!e(t,a,r)&&a>0;)a-=1;return a}),s=Math.floor(Math.min(...a));t.selectAll("text").data(i).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",t=>t.data.y+r).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${s}px`).text(t=>t.label)}break;case"text":t.selectAll("text").data(n.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>u(t.verticalPos)).attr("text-anchor",t=>d(t.horizontalPos)).attr("transform",t=>p(t)).text(t=>t.text);break;case"path":t.selectAll("path").data(n.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}}},3047(t,e,r){"use strict";r.d(e,{A:()=>ot});const{entries:n,setPrototypeOf:i,isFrozen:a,getPrototypeOf:s,getOwnPropertyDescriptor:o}=Object;let{freeze:l,seal:c,create:h}=Object,{apply:u,construct:d}="undefined"!=typeof Reflect&&Reflect;l||(l=function(t){return t}),c||(c=function(t){return t}),u||(u=function(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i1?e-1:0),n=1;n1?r-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:v;i&&i(t,null);let n=e.length;for(;n--;){let i=e[n];if("string"==typeof i){const t=r(i);t!==i&&(a(e)||(e[n]=t),i=t)}t[i]=!0}return t}function L(t){for(let e=0;e/gm),Y=c(/\$\{[\w\W]*/gm),W=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),H=c(/^aria-[\-\w]+$/),V=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=c(/^(?:\w+script|data):/i),Z=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,ARIA_ATTR:H,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:J,DATA_ATTR:W,DOCTYPE_NAME:Q,ERB_EXPR:G,IS_ALLOWED_URI:V,IS_SCRIPT_OR_DATA:X,MUSTACHE_EXPR:j,TMPLIT_EXPR:Y});const et=1,rt=3,nt=7,it=8,at=9,st=function(){return"undefined"==typeof window?null:window};var ot=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:st();const r=e=>t(e);if(r.version="3.3.1",r.removed=[],!e||!e.document||e.document.nodeType!==at||!e.Element)return r.isSupported=!1,r;let{document:i}=e;const a=i,s=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:c,Node:u,Element:d,NodeFilter:C,NamedNodeMap:S=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:L,DOMParser:j,trustedTypes:G}=e,Y=d.prototype,W=N(Y,"cloneNode"),H=N(Y,"remove"),X=N(Y,"nextSibling"),Z=N(Y,"childNodes"),J=N(Y,"parentNode");if("function"==typeof c){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let ot,lt="";const{implementation:ct,createNodeIterator:ht,createDocumentFragment:ut,getElementsByTagName:dt}=i,{importNode:pt}=a;let ft={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof n&&"function"==typeof J&&ct&&void 0!==ct.createHTMLDocument;const{MUSTACHE_EXPR:gt,ERB_EXPR:mt,TMPLIT_EXPR:yt,DATA_ATTR:vt,ARIA_ATTR:bt,IS_SCRIPT_OR_DATA:xt,ATTR_WHITESPACE:wt,CUSTOM_ELEMENT:Tt}=tt;let{IS_ALLOWED_URI:kt}=tt,At=null;const _t=R({},[...I,...M,...O,...$,...F]);let Et=null;const Ct=R({},[...z,...K,...q,...U]);let St=Object.seal(h(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}})),Rt=null,Lt=null;const Dt=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Nt=!0,It=!0,Mt=!1,Ot=!0,Pt=!1,$t=!0,Bt=!1,Ft=!1,zt=!1,Kt=!1,qt=!1,Ut=!1,jt=!0,Gt=!1,Yt=!0,Wt=!1,Ht={},Vt=null;const Xt=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Zt=null;const Qt=R({},["audio","video","img","source","image","track"]);let Jt=null;const te=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",ne="http://www.w3.org/1999/xhtml";let ie=ne,ae=!1,se=null;const oe=R({},[ee,re,ne],b);let le=R({},["mi","mo","mn","ms","mtext"]),ce=R({},["annotation-xml"]);const he=R({},["title","style","font","a","script"]);let ue=null;const de=["application/xhtml+xml","text/html"];let pe=null,fe=null;const ge=i.createElement("form"),me=function(t){return t instanceof RegExp||t instanceof Function},ye=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!fe||fe!==t){if(t&&"object"==typeof t||(t={}),t=D(t),ue=-1===de.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,pe="application/xhtml+xml"===ue?b:v,At=A(t,"ALLOWED_TAGS")?R({},t.ALLOWED_TAGS,pe):_t,Et=A(t,"ALLOWED_ATTR")?R({},t.ALLOWED_ATTR,pe):Ct,se=A(t,"ALLOWED_NAMESPACES")?R({},t.ALLOWED_NAMESPACES,b):oe,Jt=A(t,"ADD_URI_SAFE_ATTR")?R(D(te),t.ADD_URI_SAFE_ATTR,pe):te,Zt=A(t,"ADD_DATA_URI_TAGS")?R(D(Qt),t.ADD_DATA_URI_TAGS,pe):Qt,Vt=A(t,"FORBID_CONTENTS")?R({},t.FORBID_CONTENTS,pe):Xt,Rt=A(t,"FORBID_TAGS")?R({},t.FORBID_TAGS,pe):D({}),Lt=A(t,"FORBID_ATTR")?R({},t.FORBID_ATTR,pe):D({}),Ht=!!A(t,"USE_PROFILES")&&t.USE_PROFILES,Nt=!1!==t.ALLOW_ARIA_ATTR,It=!1!==t.ALLOW_DATA_ATTR,Mt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ot=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Pt=t.SAFE_FOR_TEMPLATES||!1,$t=!1!==t.SAFE_FOR_XML,Bt=t.WHOLE_DOCUMENT||!1,Kt=t.RETURN_DOM||!1,qt=t.RETURN_DOM_FRAGMENT||!1,Ut=t.RETURN_TRUSTED_TYPE||!1,zt=t.FORCE_BODY||!1,jt=!1!==t.SANITIZE_DOM,Gt=t.SANITIZE_NAMED_PROPS||!1,Yt=!1!==t.KEEP_CONTENT,Wt=t.IN_PLACE||!1,kt=t.ALLOWED_URI_REGEXP||V,ie=t.NAMESPACE||ne,le=t.MATHML_TEXT_INTEGRATION_POINTS||le,ce=t.HTML_INTEGRATION_POINTS||ce,St=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&me(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(St.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&me(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(St.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(St.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Pt&&(It=!1),qt&&(Kt=!0),Ht&&(At=R({},F),Et=[],!0===Ht.html&&(R(At,I),R(Et,z)),!0===Ht.svg&&(R(At,M),R(Et,K),R(Et,U)),!0===Ht.svgFilters&&(R(At,O),R(Et,K),R(Et,U)),!0===Ht.mathMl&&(R(At,$),R(Et,q),R(Et,U))),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?Dt.tagCheck=t.ADD_TAGS:(At===_t&&(At=D(At)),R(At,t.ADD_TAGS,pe))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?Dt.attributeCheck=t.ADD_ATTR:(Et===Ct&&(Et=D(Et)),R(Et,t.ADD_ATTR,pe))),t.ADD_URI_SAFE_ATTR&&R(Jt,t.ADD_URI_SAFE_ATTR,pe),t.FORBID_CONTENTS&&(Vt===Xt&&(Vt=D(Vt)),R(Vt,t.FORBID_CONTENTS,pe)),t.ADD_FORBID_CONTENTS&&(Vt===Xt&&(Vt=D(Vt)),R(Vt,t.ADD_FORBID_CONTENTS,pe)),Yt&&(At["#text"]=!0),Bt&&R(At,["html","head","body"]),At.table&&(R(At,["tbody"]),delete Rt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ot=t.TRUSTED_TYPES_POLICY,lt=ot.createHTML("")}else void 0===ot&&(ot=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(r=e.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(G,s)),null!==ot&&"string"==typeof lt&&(lt=ot.createHTML(""));l&&l(t),fe=t}},ve=R({},[...M,...O,...P]),be=R({},[...$,...B]),xe=function(t){m(r.removed,{element:t});try{J(t).removeChild(t)}catch(e){H(t)}},we=function(t,e){try{m(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(n){m(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Kt||qt)try{xe(e)}catch(n){}else try{e.setAttribute(t,"")}catch(n){}},Te=function(t){let e=null,r=null;if(zt)t=""+t;else{const e=x(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===ue&&ie===ne&&(t=''+t+"");const n=ot?ot.createHTML(t):t;if(ie===ne)try{e=(new j).parseFromString(n,ue)}catch(s){}if(!e||!e.documentElement){e=ct.createDocument(ie,"template",null);try{e.documentElement.innerHTML=ae?lt:n}catch(s){}}const a=e.body||e.documentElement;return t&&r&&a.insertBefore(i.createTextNode(r),a.childNodes[0]||null),ie===ne?dt.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:a},ke=function(t){return ht.call(t.ownerDocument||t,t,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT|C.SHOW_PROCESSING_INSTRUCTION|C.SHOW_CDATA_SECTION,null)},Ae=function(t){return t instanceof L&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof S)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},_e=function(t){return"function"==typeof u&&t instanceof u};function Ee(t,e,n){p(t,t=>{t.call(r,e,n,fe)})}const Ce=function(t){let e=null;if(Ee(ft.beforeSanitizeElements,t,null),Ae(t))return xe(t),!0;const n=pe(t.nodeName);if(Ee(ft.uponSanitizeElement,t,{tagName:n,allowedTags:At}),$t&&t.hasChildNodes()&&!_e(t.firstElementChild)&&_(/<[/\w!]/g,t.innerHTML)&&_(/<[/\w!]/g,t.textContent))return xe(t),!0;if(t.nodeType===nt)return xe(t),!0;if($t&&t.nodeType===it&&_(/<[/\w]/g,t.data))return xe(t),!0;if(!(Dt.tagCheck instanceof Function&&Dt.tagCheck(n))&&(!At[n]||Rt[n])){if(!Rt[n]&&Re(n)){if(St.tagNameCheck instanceof RegExp&&_(St.tagNameCheck,n))return!1;if(St.tagNameCheck instanceof Function&&St.tagNameCheck(n))return!1}if(Yt&&!Vt[n]){const e=J(t)||t.parentNode,r=Z(t)||t.childNodes;if(r&&e){for(let n=r.length-1;n>=0;--n){const i=W(r[n],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,X(t))}}}return xe(t),!0}return t instanceof d&&!function(t){let e=J(t);e&&e.tagName||(e={namespaceURI:ie,tagName:"template"});const r=v(t.tagName),n=v(e.tagName);return!!se[t.namespaceURI]&&(t.namespaceURI===re?e.namespaceURI===ne?"svg"===r:e.namespaceURI===ee?"svg"===r&&("annotation-xml"===n||le[n]):Boolean(ve[r]):t.namespaceURI===ee?e.namespaceURI===ne?"math"===r:e.namespaceURI===re?"math"===r&&ce[n]:Boolean(be[r]):t.namespaceURI===ne?!(e.namespaceURI===re&&!ce[n])&&!(e.namespaceURI===ee&&!le[n])&&!be[r]&&(he[r]||!ve[r]):!("application/xhtml+xml"!==ue||!se[t.namespaceURI]))}(t)?(xe(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!_(/<\/no(script|embed|frames)/i,t.innerHTML)?(Pt&&t.nodeType===rt&&(e=t.textContent,p([gt,mt,yt],t=>{e=w(e,t," ")}),t.textContent!==e&&(m(r.removed,{element:t.cloneNode()}),t.textContent=e)),Ee(ft.afterSanitizeElements,t,null),!1):(xe(t),!0)},Se=function(t,e,r){if(jt&&("id"===e||"name"===e)&&(r in i||r in ge))return!1;if(It&&!Lt[e]&&_(vt,e));else if(Nt&&_(bt,e));else if(Dt.attributeCheck instanceof Function&&Dt.attributeCheck(e,t));else if(!Et[e]||Lt[e]){if(!(Re(t)&&(St.tagNameCheck instanceof RegExp&&_(St.tagNameCheck,t)||St.tagNameCheck instanceof Function&&St.tagNameCheck(t))&&(St.attributeNameCheck instanceof RegExp&&_(St.attributeNameCheck,e)||St.attributeNameCheck instanceof Function&&St.attributeNameCheck(e,t))||"is"===e&&St.allowCustomizedBuiltInElements&&(St.tagNameCheck instanceof RegExp&&_(St.tagNameCheck,r)||St.tagNameCheck instanceof Function&&St.tagNameCheck(r))))return!1}else if(Jt[e]);else if(_(kt,w(r,wt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==T(r,"data:")||!Zt[t]){if(Mt&&!_(xt,w(r,wt,"")));else if(r)return!1}else;return!0},Re=function(t){return"annotation-xml"!==t&&x(t,Tt)},Le=function(t){Ee(ft.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Ae(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Et,forceKeepAttr:void 0};let i=e.length;for(;i--;){const s=e[i],{name:o,namespaceURI:l,value:c}=s,h=pe(o),u=c;let d="value"===o?u:k(u);if(n.attrName=h,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Ee(ft.uponSanitizeAttribute,t,n),d=n.attrValue,!Gt||"id"!==h&&"name"!==h||(we(o,t),d="user-content-"+d),$t&&_(/((--!?|])>)|<\/(style|title|textarea)/i,d)){we(o,t);continue}if("attributename"===h&&x(d,"href")){we(o,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){we(o,t);continue}if(!Ot&&_(/\/>/i,d)){we(o,t);continue}Pt&&p([gt,mt,yt],t=>{d=w(d,t," ")});const f=pe(t.nodeName);if(Se(f,h,d)){if(ot&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,h)){case"TrustedHTML":d=ot.createHTML(d);break;case"TrustedScriptURL":d=ot.createScriptURL(d)}if(d!==u)try{l?t.setAttributeNS(l,o,d):t.setAttribute(o,d),Ae(t)?xe(t):g(r.removed)}catch(a){we(o,t)}}else we(o,t)}Ee(ft.afterSanitizeAttributes,t,null)},De=function t(e){let r=null;const n=ke(e);for(Ee(ft.beforeSanitizeShadowDOM,e,null);r=n.nextNode();)Ee(ft.uponSanitizeShadowNode,r,null),Ce(r),Le(r),r.content instanceof o&&t(r.content);Ee(ft.afterSanitizeShadowDOM,e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,s=null,l=null;if(ae=!t,ae&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_e(t)){if("function"!=typeof t.toString)throw E("toString is not a function");if("string"!=typeof(t=t.toString()))throw E("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Ft||ye(e),r.removed=[],"string"==typeof t&&(Wt=!1),Wt){if(t.nodeName){const e=pe(t.nodeName);if(!At[e]||Rt[e])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)n=Te("\x3c!----\x3e"),i=n.ownerDocument.importNode(t,!0),i.nodeType===et&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!Kt&&!Pt&&!Bt&&-1===t.indexOf("<"))return ot&&Ut?ot.createHTML(t):t;if(n=Te(t),!n)return Kt?null:Ut?lt:""}n&&zt&&xe(n.firstChild);const c=ke(Wt?t:n);for(;s=c.nextNode();)Ce(s),Le(s),s.content instanceof o&&De(s.content);if(Wt)return t;if(Kt){if(qt)for(l=ut.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Et.shadowroot||Et.shadowrootmode)&&(l=pt.call(a,l,!0)),l}let h=Bt?n.outerHTML:n.innerHTML;return Bt&&At["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&_(Q,n.ownerDocument.doctype.name)&&(h="\n"+h),Pt&&p([gt,mt,yt],t=>{h=w(h,t," ")}),ot&&Ut?ot.createHTML(h):h},r.setConfig=function(){ye(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ft=!0},r.clearConfig=function(){fe=null,Ft=!1},r.isValidAttribute=function(t,e,r){fe||ye({});const n=pe(t),i=pe(e);return Se(n,i,r)},r.addHook=function(t,e){"function"==typeof e&&m(ft[t],e)},r.removeHook=function(t,e){if(void 0!==e){const r=f(ft[t],e);return-1===r?void 0:y(ft[t],r,1)[0]}return g(ft[t])},r.removeHooks=function(t){ft[t]=[]},r.removeAllHooks=function(){ft={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},6203(t,e,r){"use strict";var n,i,a,s,o,l,c,h,u,d,p,f,g,m,y,v,b,x,w,T,k,A,_,E,C,S,R,L,D,N,I,M,O,P,$,B,F,z,K,q,U,j,G,Y,W,H,V,X,Z,Q,J,tt,et,rt,nt,it,at,st,ot,lt,ct,ht,ut,dt,pt,ft,gt,mt,yt,vt,bt,xt,wt,Tt,kt,At,_t,Et;r.r(e),r.d(e,{AnnotatedTextEdit:()=>_,ChangeAnnotation:()=>k,ChangeAnnotationIdentifier:()=>A,CodeAction:()=>at,CodeActionContext:()=>it,CodeActionKind:()=>rt,CodeActionTriggerKind:()=>nt,CodeDescription:()=>b,CodeLens:()=>st,Color:()=>u,ColorInformation:()=>d,ColorPresentation:()=>p,Command:()=>w,CompletionItem:()=>U,CompletionItemKind:()=>$,CompletionItemLabelDetails:()=>q,CompletionItemTag:()=>F,CompletionList:()=>j,CreateFile:()=>C,DeleteFile:()=>R,Diagnostic:()=>x,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>y,DiagnosticTag:()=>v,DocumentHighlight:()=>X,DocumentHighlightKind:()=>V,DocumentLink:()=>lt,DocumentSymbol:()=>et,DocumentUri:()=>n,EOL:()=>Lt,FoldingRange:()=>g,FoldingRangeKind:()=>f,FormattingOptions:()=>ot,Hover:()=>Y,InlayHint:()=>bt,InlayHintKind:()=>yt,InlayHintLabelPart:()=>vt,InlineCompletionContext:()=>_t,InlineCompletionItem:()=>wt,InlineCompletionList:()=>Tt,InlineCompletionTriggerKind:()=>kt,InlineValueContext:()=>mt,InlineValueEvaluatableExpression:()=>gt,InlineValueText:()=>pt,InlineValueVariableLookup:()=>ft,InsertReplaceEdit:()=>z,InsertTextFormat:()=>B,InsertTextMode:()=>K,Location:()=>c,LocationLink:()=>h,MarkedString:()=>G,MarkupContent:()=>P,MarkupKind:()=>O,OptionalVersionedTextDocumentIdentifier:()=>I,ParameterInformation:()=>W,Position:()=>o,Range:()=>l,RenameFile:()=>S,SelectedCompletionInfo:()=>At,SelectionRange:()=>ct,SemanticTokenModifiers:()=>ut,SemanticTokenTypes:()=>ht,SemanticTokens:()=>dt,SignatureInformation:()=>H,StringValue:()=>xt,SymbolInformation:()=>J,SymbolKind:()=>Z,SymbolTag:()=>Q,TextDocument:()=>Dt,TextDocumentEdit:()=>E,TextDocumentIdentifier:()=>D,TextDocumentItem:()=>M,TextEdit:()=>T,URI:()=>i,VersionedTextDocumentIdentifier:()=>N,WorkspaceChange:()=>Rt,WorkspaceEdit:()=>L,WorkspaceFolder:()=>Et,WorkspaceSymbol:()=>tt,integer:()=>a,uinteger:()=>s}),function(t){t.is=function(t){return"string"==typeof t}}(n||(n={})),function(t){t.is=function(t){return"string"==typeof t}}(i||(i={})),function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647,t.is=function(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}}(a||(a={})),function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647,t.is=function(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}}(s||(s={})),function(t){t.create=function(t,e){return t===Number.MAX_VALUE&&(t=s.MAX_VALUE),e===Number.MAX_VALUE&&(e=s.MAX_VALUE),{line:t,character:e}},t.is=function(t){let e=t;return Nt.objectLiteral(e)&&Nt.uinteger(e.line)&&Nt.uinteger(e.character)}}(o||(o={})),function(t){t.create=function(t,e,r,n){if(Nt.uinteger(t)&&Nt.uinteger(e)&&Nt.uinteger(r)&&Nt.uinteger(n))return{start:o.create(t,e),end:o.create(r,n)};if(o.is(t)&&o.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${r}, ${n}]`)},t.is=function(t){let e=t;return Nt.objectLiteral(e)&&o.is(e.start)&&o.is(e.end)}}(l||(l={})),function(t){t.create=function(t,e){return{uri:t,range:e}},t.is=function(t){let e=t;return Nt.objectLiteral(e)&&l.is(e.range)&&(Nt.string(e.uri)||Nt.undefined(e.uri))}}(c||(c={})),function(t){t.create=function(t,e,r,n){return{targetUri:t,targetRange:e,targetSelectionRange:r,originSelectionRange:n}},t.is=function(t){let e=t;return Nt.objectLiteral(e)&&l.is(e.targetRange)&&Nt.string(e.targetUri)&&l.is(e.targetSelectionRange)&&(l.is(e.originSelectionRange)||Nt.undefined(e.originSelectionRange))}}(h||(h={})),function(t){t.create=function(t,e,r,n){return{red:t,green:e,blue:r,alpha:n}},t.is=function(t){const e=t;return Nt.objectLiteral(e)&&Nt.numberRange(e.red,0,1)&&Nt.numberRange(e.green,0,1)&&Nt.numberRange(e.blue,0,1)&&Nt.numberRange(e.alpha,0,1)}}(u||(u={})),function(t){t.create=function(t,e){return{range:t,color:e}},t.is=function(t){const e=t;return Nt.objectLiteral(e)&&l.is(e.range)&&u.is(e.color)}}(d||(d={})),function(t){t.create=function(t,e,r){return{label:t,textEdit:e,additionalTextEdits:r}},t.is=function(t){const e=t;return Nt.objectLiteral(e)&&Nt.string(e.label)&&(Nt.undefined(e.textEdit)||T.is(e))&&(Nt.undefined(e.additionalTextEdits)||Nt.typedArray(e.additionalTextEdits,T.is))}}(p||(p={})),function(t){t.Comment="comment",t.Imports="imports",t.Region="region"}(f||(f={})),function(t){t.create=function(t,e,r,n,i,a){const s={startLine:t,endLine:e};return Nt.defined(r)&&(s.startCharacter=r),Nt.defined(n)&&(s.endCharacter=n),Nt.defined(i)&&(s.kind=i),Nt.defined(a)&&(s.collapsedText=a),s},t.is=function(t){const e=t;return Nt.objectLiteral(e)&&Nt.uinteger(e.startLine)&&Nt.uinteger(e.startLine)&&(Nt.undefined(e.startCharacter)||Nt.uinteger(e.startCharacter))&&(Nt.undefined(e.endCharacter)||Nt.uinteger(e.endCharacter))&&(Nt.undefined(e.kind)||Nt.string(e.kind))}}(g||(g={})),function(t){t.create=function(t,e){return{location:t,message:e}},t.is=function(t){let e=t;return Nt.defined(e)&&c.is(e.location)&&Nt.string(e.message)}}(m||(m={})),function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4}(y||(y={})),function(t){t.Unnecessary=1,t.Deprecated=2}(v||(v={})),function(t){t.is=function(t){const e=t;return Nt.objectLiteral(e)&&Nt.string(e.href)}}(b||(b={})),function(t){t.create=function(t,e,r,n,i,a){let s={range:t,message:e};return Nt.defined(r)&&(s.severity=r),Nt.defined(n)&&(s.code=n),Nt.defined(i)&&(s.source=i),Nt.defined(a)&&(s.relatedInformation=a),s},t.is=function(t){var e;let r=t;return Nt.defined(r)&&l.is(r.range)&&Nt.string(r.message)&&(Nt.number(r.severity)||Nt.undefined(r.severity))&&(Nt.integer(r.code)||Nt.string(r.code)||Nt.undefined(r.code))&&(Nt.undefined(r.codeDescription)||Nt.string(null===(e=r.codeDescription)||void 0===e?void 0:e.href))&&(Nt.string(r.source)||Nt.undefined(r.source))&&(Nt.undefined(r.relatedInformation)||Nt.typedArray(r.relatedInformation,m.is))}}(x||(x={})),function(t){t.create=function(t,e,...r){let n={title:t,command:e};return Nt.defined(r)&&r.length>0&&(n.arguments=r),n},t.is=function(t){let e=t;return Nt.defined(e)&&Nt.string(e.title)&&Nt.string(e.command)}}(w||(w={})),function(t){t.replace=function(t,e){return{range:t,newText:e}},t.insert=function(t,e){return{range:{start:t,end:t},newText:e}},t.del=function(t){return{range:t,newText:""}},t.is=function(t){const e=t;return Nt.objectLiteral(e)&&Nt.string(e.newText)&&l.is(e.range)}}(T||(T={})),function(t){t.create=function(t,e,r){const n={label:t};return void 0!==e&&(n.needsConfirmation=e),void 0!==r&&(n.description=r),n},t.is=function(t){const e=t;return Nt.objectLiteral(e)&&Nt.string(e.label)&&(Nt.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(Nt.string(e.description)||void 0===e.description)}}(k||(k={})),function(t){t.is=function(t){const e=t;return Nt.string(e)}}(A||(A={})),function(t){t.replace=function(t,e,r){return{range:t,newText:e,annotationId:r}},t.insert=function(t,e,r){return{range:{start:t,end:t},newText:e,annotationId:r}},t.del=function(t,e){return{range:t,newText:"",annotationId:e}},t.is=function(t){const e=t;return T.is(e)&&(k.is(e.annotationId)||A.is(e.annotationId))}}(_||(_={})),function(t){t.create=function(t,e){return{textDocument:t,edits:e}},t.is=function(t){let e=t;return Nt.defined(e)&&I.is(e.textDocument)&&Array.isArray(e.edits)}}(E||(E={})),function(t){t.create=function(t,e,r){let n={kind:"create",uri:t};return void 0===e||void 0===e.overwrite&&void 0===e.ignoreIfExists||(n.options=e),void 0!==r&&(n.annotationId=r),n},t.is=function(t){let e=t;return e&&"create"===e.kind&&Nt.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||Nt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||Nt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||A.is(e.annotationId))}}(C||(C={})),function(t){t.create=function(t,e,r,n){let i={kind:"rename",oldUri:t,newUri:e};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(i.options=r),void 0!==n&&(i.annotationId=n),i},t.is=function(t){let e=t;return e&&"rename"===e.kind&&Nt.string(e.oldUri)&&Nt.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||Nt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||Nt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||A.is(e.annotationId))}}(S||(S={})),function(t){t.create=function(t,e,r){let n={kind:"delete",uri:t};return void 0===e||void 0===e.recursive&&void 0===e.ignoreIfNotExists||(n.options=e),void 0!==r&&(n.annotationId=r),n},t.is=function(t){let e=t;return e&&"delete"===e.kind&&Nt.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||Nt.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||Nt.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||A.is(e.annotationId))}}(R||(R={})),function(t){t.is=function(t){let e=t;return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every(t=>Nt.string(t.kind)?C.is(t)||S.is(t)||R.is(t):E.is(t)))}}(L||(L={}));class Ct{constructor(t,e){this.edits=t,this.changeAnnotations=e}insert(t,e,r){let n,i;if(void 0===r?n=T.insert(t,e):A.is(r)?(i=r,n=_.insert(t,e,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=_.insert(t,e,i)),this.edits.push(n),void 0!==i)return i}replace(t,e,r){let n,i;if(void 0===r?n=T.replace(t,e):A.is(r)?(i=r,n=_.replace(t,e,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=_.replace(t,e,i)),this.edits.push(n),void 0!==i)return i}delete(t,e){let r,n;if(void 0===e?r=T.del(t):A.is(e)?(n=e,r=_.del(t,e)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(e),r=_.del(t,n)),this.edits.push(r),void 0!==n)return n}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(void 0===t)throw new Error("Text edit change is not configured to manage change annotations.")}}class St{constructor(t){this._annotations=void 0===t?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,e){let r;if(A.is(t)?r=t:(r=this.nextId(),e=t),void 0!==this._annotations[r])throw new Error(`Id ${r} is already in use.`);if(void 0===e)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=e,this._size++,r}nextId(){return this._counter++,this._counter.toString()}}class Rt{constructor(t){this._textEditChanges=Object.create(null),void 0!==t?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new St(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(t=>{if(E.is(t)){const e=new Ct(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=e}})):t.changes&&Object.keys(t.changes).forEach(e=>{const r=new Ct(t.changes[e]);this._textEditChanges[e]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(I.is(t)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const e={uri:t.uri,version:t.version};let r=this._textEditChanges[e.uri];if(!r){const t=[],n={textDocument:e,edits:t};this._workspaceEdit.documentChanges.push(n),r=new Ct(t,this._changeAnnotations),this._textEditChanges[e.uri]=r}return r}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let e=this._textEditChanges[t];if(!e){let r=[];this._workspaceEdit.changes[t]=r,e=new Ct(r),this._textEditChanges[t]=e}return e}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new St,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,e,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,i,a;if(k.is(e)||A.is(e)?n=e:r=e,void 0===n?i=C.create(t,r):(a=A.is(n)?n:this._changeAnnotations.manage(n),i=C.create(t,r,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a}renameFile(t,e,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,a,s;if(k.is(r)||A.is(r)?i=r:n=r,void 0===i?a=S.create(t,e,n):(s=A.is(i)?i:this._changeAnnotations.manage(i),a=S.create(t,e,n,s)),this._workspaceEdit.documentChanges.push(a),void 0!==s)return s}deleteFile(t,e,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,i,a;if(k.is(e)||A.is(e)?n=e:r=e,void 0===n?i=R.create(t,r):(a=A.is(n)?n:this._changeAnnotations.manage(n),i=R.create(t,r,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a}}!function(t){t.create=function(t){return{uri:t}},t.is=function(t){let e=t;return Nt.defined(e)&&Nt.string(e.uri)}}(D||(D={})),function(t){t.create=function(t,e){return{uri:t,version:e}},t.is=function(t){let e=t;return Nt.defined(e)&&Nt.string(e.uri)&&Nt.integer(e.version)}}(N||(N={})),function(t){t.create=function(t,e){return{uri:t,version:e}},t.is=function(t){let e=t;return Nt.defined(e)&&Nt.string(e.uri)&&(null===e.version||Nt.integer(e.version))}}(I||(I={})),function(t){t.create=function(t,e,r,n){return{uri:t,languageId:e,version:r,text:n}},t.is=function(t){let e=t;return Nt.defined(e)&&Nt.string(e.uri)&&Nt.string(e.languageId)&&Nt.integer(e.version)&&Nt.string(e.text)}}(M||(M={})),function(t){t.PlainText="plaintext",t.Markdown="markdown",t.is=function(e){const r=e;return r===t.PlainText||r===t.Markdown}}(O||(O={})),function(t){t.is=function(t){const e=t;return Nt.objectLiteral(t)&&O.is(e.kind)&&Nt.string(e.value)}}(P||(P={})),function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25}($||($={})),function(t){t.PlainText=1,t.Snippet=2}(B||(B={})),function(t){t.Deprecated=1}(F||(F={})),function(t){t.create=function(t,e,r){return{newText:t,insert:e,replace:r}},t.is=function(t){const e=t;return e&&Nt.string(e.newText)&&l.is(e.insert)&&l.is(e.replace)}}(z||(z={})),function(t){t.asIs=1,t.adjustIndentation=2}(K||(K={})),function(t){t.is=function(t){const e=t;return e&&(Nt.string(e.detail)||void 0===e.detail)&&(Nt.string(e.description)||void 0===e.description)}}(q||(q={})),function(t){t.create=function(t){return{label:t}}}(U||(U={})),function(t){t.create=function(t,e){return{items:t||[],isIncomplete:!!e}}}(j||(j={})),function(t){t.fromPlainText=function(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},t.is=function(t){const e=t;return Nt.string(e)||Nt.objectLiteral(e)&&Nt.string(e.language)&&Nt.string(e.value)}}(G||(G={})),function(t){t.is=function(t){let e=t;return!!e&&Nt.objectLiteral(e)&&(P.is(e.contents)||G.is(e.contents)||Nt.typedArray(e.contents,G.is))&&(void 0===t.range||l.is(t.range))}}(Y||(Y={})),function(t){t.create=function(t,e){return e?{label:t,documentation:e}:{label:t}}}(W||(W={})),function(t){t.create=function(t,e,...r){let n={label:t};return Nt.defined(e)&&(n.documentation=e),Nt.defined(r)?n.parameters=r:n.parameters=[],n}}(H||(H={})),function(t){t.Text=1,t.Read=2,t.Write=3}(V||(V={})),function(t){t.create=function(t,e){let r={range:t};return Nt.number(e)&&(r.kind=e),r}}(X||(X={})),function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26}(Z||(Z={})),function(t){t.Deprecated=1}(Q||(Q={})),function(t){t.create=function(t,e,r,n,i){let a={name:t,kind:e,location:{uri:n,range:r}};return i&&(a.containerName=i),a}}(J||(J={})),function(t){t.create=function(t,e,r,n){return void 0!==n?{name:t,kind:e,location:{uri:r,range:n}}:{name:t,kind:e,location:{uri:r}}}}(tt||(tt={})),function(t){t.create=function(t,e,r,n,i,a){let s={name:t,detail:e,kind:r,range:n,selectionRange:i};return void 0!==a&&(s.children=a),s},t.is=function(t){let e=t;return e&&Nt.string(e.name)&&Nt.number(e.kind)&&l.is(e.range)&&l.is(e.selectionRange)&&(void 0===e.detail||Nt.string(e.detail))&&(void 0===e.deprecated||Nt.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}}(et||(et={})),function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"}(rt||(rt={})),function(t){t.Invoked=1,t.Automatic=2}(nt||(nt={})),function(t){t.create=function(t,e,r){let n={diagnostics:t};return null!=e&&(n.only=e),null!=r&&(n.triggerKind=r),n},t.is=function(t){let e=t;return Nt.defined(e)&&Nt.typedArray(e.diagnostics,x.is)&&(void 0===e.only||Nt.typedArray(e.only,Nt.string))&&(void 0===e.triggerKind||e.triggerKind===nt.Invoked||e.triggerKind===nt.Automatic)}}(it||(it={})),function(t){t.create=function(t,e,r){let n={title:t},i=!0;return"string"==typeof e?(i=!1,n.kind=e):w.is(e)?n.command=e:n.edit=e,i&&void 0!==r&&(n.kind=r),n},t.is=function(t){let e=t;return e&&Nt.string(e.title)&&(void 0===e.diagnostics||Nt.typedArray(e.diagnostics,x.is))&&(void 0===e.kind||Nt.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||w.is(e.command))&&(void 0===e.isPreferred||Nt.boolean(e.isPreferred))&&(void 0===e.edit||L.is(e.edit))}}(at||(at={})),function(t){t.create=function(t,e){let r={range:t};return Nt.defined(e)&&(r.data=e),r},t.is=function(t){let e=t;return Nt.defined(e)&&l.is(e.range)&&(Nt.undefined(e.command)||w.is(e.command))}}(st||(st={})),function(t){t.create=function(t,e){return{tabSize:t,insertSpaces:e}},t.is=function(t){let e=t;return Nt.defined(e)&&Nt.uinteger(e.tabSize)&&Nt.boolean(e.insertSpaces)}}(ot||(ot={})),function(t){t.create=function(t,e,r){return{range:t,target:e,data:r}},t.is=function(t){let e=t;return Nt.defined(e)&&l.is(e.range)&&(Nt.undefined(e.target)||Nt.string(e.target))}}(lt||(lt={})),function(t){t.create=function(t,e){return{range:t,parent:e}},t.is=function(e){let r=e;return Nt.objectLiteral(r)&&l.is(r.range)&&(void 0===r.parent||t.is(r.parent))}}(ct||(ct={})),function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"}(ht||(ht={})),function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"}(ut||(ut={})),function(t){t.is=function(t){const e=t;return Nt.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])}}(dt||(dt={})),function(t){t.create=function(t,e){return{range:t,text:e}},t.is=function(t){const e=t;return null!=e&&l.is(e.range)&&Nt.string(e.text)}}(pt||(pt={})),function(t){t.create=function(t,e,r){return{range:t,variableName:e,caseSensitiveLookup:r}},t.is=function(t){const e=t;return null!=e&&l.is(e.range)&&Nt.boolean(e.caseSensitiveLookup)&&(Nt.string(e.variableName)||void 0===e.variableName)}}(ft||(ft={})),function(t){t.create=function(t,e){return{range:t,expression:e}},t.is=function(t){const e=t;return null!=e&&l.is(e.range)&&(Nt.string(e.expression)||void 0===e.expression)}}(gt||(gt={})),function(t){t.create=function(t,e){return{frameId:t,stoppedLocation:e}},t.is=function(t){const e=t;return Nt.defined(e)&&l.is(t.stoppedLocation)}}(mt||(mt={})),function(t){t.Type=1,t.Parameter=2,t.is=function(t){return 1===t||2===t}}(yt||(yt={})),function(t){t.create=function(t){return{value:t}},t.is=function(t){const e=t;return Nt.objectLiteral(e)&&(void 0===e.tooltip||Nt.string(e.tooltip)||P.is(e.tooltip))&&(void 0===e.location||c.is(e.location))&&(void 0===e.command||w.is(e.command))}}(vt||(vt={})),function(t){t.create=function(t,e,r){const n={position:t,label:e};return void 0!==r&&(n.kind=r),n},t.is=function(t){const e=t;return Nt.objectLiteral(e)&&o.is(e.position)&&(Nt.string(e.label)||Nt.typedArray(e.label,vt.is))&&(void 0===e.kind||yt.is(e.kind))&&void 0===e.textEdits||Nt.typedArray(e.textEdits,T.is)&&(void 0===e.tooltip||Nt.string(e.tooltip)||P.is(e.tooltip))&&(void 0===e.paddingLeft||Nt.boolean(e.paddingLeft))&&(void 0===e.paddingRight||Nt.boolean(e.paddingRight))}}(bt||(bt={})),function(t){t.createSnippet=function(t){return{kind:"snippet",value:t}}}(xt||(xt={})),function(t){t.create=function(t,e,r,n){return{insertText:t,filterText:e,range:r,command:n}}}(wt||(wt={})),function(t){t.create=function(t){return{items:t}}}(Tt||(Tt={})),function(t){t.Invoked=0,t.Automatic=1}(kt||(kt={})),function(t){t.create=function(t,e){return{range:t,text:e}}}(At||(At={})),function(t){t.create=function(t,e){return{triggerKind:t,selectedCompletionInfo:e}}}(_t||(_t={})),function(t){t.is=function(t){const e=t;return Nt.objectLiteral(e)&&i.is(e.uri)&&Nt.string(e.name)}}(Et||(Et={}));const Lt=["\n","\r\n","\r"];var Dt,Nt;!function(t){function e(t,r){if(t.length<=1)return t;const n=t.length/2|0,i=t.slice(0,n),a=t.slice(n);e(i,r),e(a,r);let s=0,o=0,l=0;for(;s{let r=t.range.start.line-e.range.start.line;return 0===r?t.range.start.character-e.range.start.character:r}),a=n.length;for(let e=i.length-1;e>=0;e--){let r=i[e],s=t.offsetAt(r.range.start),o=t.offsetAt(r.range.end);if(!(o<=a))throw new Error("Overlapping edit");n=n.substring(0,s)+r.newText+n.substring(o,n.length),a=s}return n}}(Dt||(Dt={}));class It{constructor(t,e,r,n){this._uri=t,this._languageId=e,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let e=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(e,r)}return this._content}update(t,e){this._content=t.text,this._version=e,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let t=[],e=this._content,r=!0;for(let n=0;n0&&t.push(e.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),r=0,n=e.length;if(0===n)return o.create(0,t);for(;rt?n=i:r=i+1}let i=r-1;return o.create(i,t-e[i])}offsetAt(t){let e=this.getLineOffsets();if(t.line>=e.length)return this._content.length;if(t.line<0)return 0;let r=e[t.line],n=t.line+1a,r:()=>i}),(()=>{var t={975:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,a=-1,s=0,o=0;o<=t.length;++o){if(o2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),a=o,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,a=o,s=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(a+1,o):n=t.slice(a+1,o),i=o-a-1;a=o,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var t,n="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var s;a>=0?s=arguments[a]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;ic){if(47===r.charCodeAt(o+u))return r.slice(o+u+1);if(0===u)return r.slice(o+u)}else s>c&&(47===t.charCodeAt(i+u)?h=u:0===u&&(h=0));break}var d=t.charCodeAt(i+u);if(d!==r.charCodeAt(o+u))break;47===d&&(h=u)}var p="";for(u=i+h+1;u<=a;++u)u!==a&&47!==t.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(o+h):(o+=h,47===r.charCodeAt(o)&&++o,r.slice(o))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,a=!0,s=t.length-1;s>=1;--s)if(47===(r=t.charCodeAt(s))){if(!a){i=s;break}}else a=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,a=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var o=r.length-1,l=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===l&&(s=!1,l=n+1),o>=0&&(c===r.charCodeAt(o)?-1==--o&&(a=n):(o=-1,a=l))}return i===a?a=l:-1===a&&(a=t.length),t.slice(i,a)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1);return-1===a?"":t.slice(i,a)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,a=!0,s=0,o=t.length-1;o>=0;--o){var l=t.charCodeAt(o);if(47!==l)-1===i&&(a=!1,i=o+1),46===l?-1===r?r=o:1!==s&&(s=1):-1!==r&&(s=-1);else if(!a){n=o+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),a=47===i;a?(r.root="/",n=1):n=0;for(var s=-1,o=0,l=-1,c=!0,h=t.length-1,u=0;h>=n;--h)if(47!==(i=t.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===i?-1===s?s=h:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){o=h+1;break}return-1===s||-1===l||0===u||1===u&&s===l-1&&s===o+1?-1!==l&&(r.base=r.name=0===o&&a?t.slice(1,l):t.slice(o,l)):(0===o&&a?(r.name=t.slice(1,s),r.base=t.slice(1,l)):(r.name=t.slice(o,s),r.base=t.slice(o,l)),r.ext=t.slice(s,l)),o>0?r.dir=t.slice(0,o-1):a&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};let a;if(r.r(i),r.d(i,{URI:()=>p,Utils:()=>C}),"object"==typeof process)a="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;a=t.indexOf("Windows")>=0}const s=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function c(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!s.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!o.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const h="",u="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(t){return t instanceof p||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,a=!1){"object"==typeof t?(this.scheme=t.scheme||h,this.authority=t.authority||h,this.path=t.path||h,this.query=t.query||h,this.fragment=t.fragment||h):(this.scheme=function(t,e){return t||e?t:"file"}(t,a),this.authority=e||h,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==u&&(e=u+e):e=u}return e}(this.scheme,r||h),this.query=n||h,this.fragment=i||h,c(this,a))}get fsPath(){return b(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=h),void 0===r?r=this.authority:null===r&&(r=h),void 0===n?n=this.path:null===n&&(n=h),void 0===i?i=this.query:null===i&&(i=h),void 0===a?a=this.fragment:null===a&&(a=h),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new g(e,r,n,i,a)}static parse(t,e=!1){const r=d.exec(t);return r?new g(r[2]||h,k(r[4]||h),k(r[5]||h),k(r[7]||h),k(r[9]||h),e):new g(h,h,h,h,h)}static file(t){let e=h;if(a&&(t=t.replace(/\\/g,u)),t[0]===u&&t[1]===u){const r=t.indexOf(u,2);-1===r?(e=t.substring(2),t=u):(e=t.substring(2,r),t=t.substring(r)||u)}return new g("file",e,t,h,h)}static from(t){const e=new g(t.scheme,t.authority,t.path,t.query,t.fragment);return c(e,!0),e}toString(t=!1){return x(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof p)return t;{const e=new g(t);return e._formatted=t.external,e._fsPath=t._sep===f?t.fsPath:null,e}}return t}}const f=a?1:void 0;class g extends p{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(t=!1){return t?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=f),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(t,e,r){let n,i=-1;for(let a=0;a=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(t.substring(i,a)),i=-1),void 0!==n&&(n+=t.charAt(a));else{void 0===n&&(n=t.substr(0,a));const e=m[s];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,a)),i=-1),n+=e):-1===i&&(i=a)}}return-1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function v(t){let e;for(let r=0;r1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,a&&(r=r.replace(/\//g,"\\")),r}function x(t,e){const r=e?v:y;let n="",{scheme:i,authority:a,path:s,query:o,fragment:l}=t;if(i&&(n+=i,n+=":"),(a||"file"===i)&&(n+=u,n+=u),a){let t=a.indexOf("@");if(-1!==t){const e=a.substr(0,t);a=a.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@"}a=a.toLowerCase(),t=a.lastIndexOf(":"),-1===t?n+=r(a,!1,!0):(n+=r(a.substr(0,t),!1,!0),n+=a.substr(t))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return o&&(n+="?",n+=r(o,!1,!1)),l&&(n+="#",n+=e?l:y(l,!1,!1)),n}function w(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+w(t.substr(3)):t}}const T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(t){return t.match(T)?t.replace(T,t=>w(t)):t}var A=r(975);const _=A.posix||A,E="/";var C;!function(t){t.joinPath=function(t,...e){return t.with({path:_.join(t.path,...e)})},t.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==E&&(r=E+r,n=!0);let i=_.resolve(r,...e);return n&&i[0]===E&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===E)return t;let e=_.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return _.basename(t.path)},t.extname=function(t){return _.extname(t.path)}}(C||(C={})),n=i})();const{URI:i,Utils:a}=n}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{default:()=>Ve});var t=r(5553),e=r(3590),i=r(3981),a=r(45),s=(r(5164),r(8698),r(5894),r(3245),r(2387),r(607)),o=r(3226),l=r(144),c=r(797),h=r(513),u=r(1444),d="comm",p="rule",f="decl",g=Math.abs,m=String.fromCharCode;Object.assign;function y(t){return t.trim()}function v(t,e,r){return t.replace(e,r)}function b(t,e,r){return t.indexOf(e,r)}function x(t,e){return 0|t.charCodeAt(e)}function w(t,e,r){return t.slice(e,r)}function T(t){return t.length}function k(t,e){return e.push(t),t}function A(t,e){for(var r="",n=0;n0?x(D,--R):0,C--,10===L&&(C=1,E--),L}function M(){return L=R2||B(L)>3?"":" "}function U(t,e){for(;--e&&M()&&!(L<48||L>102||L>57&&L<65||L>70&&L<97););return $(t,P()+(e<6&&32==O()&&32==M()))}function j(t){for(;M();)switch(L){case t:return R;case 34:case 39:34!==t&&39!==t&&j(L);break;case 40:41===t&&j(t);break;case 92:M()}return R}function G(t,e){for(;M()&&t+L!==57&&(t+L!==84||47!==O()););return"/*"+$(e,R-1)+"*"+m(47===t?t:M())}function Y(t){for(;!B(O());)M();return $(t,R)}function W(t){return z(H("",null,null,null,[""],t=F(t),0,[0],t))}function H(t,e,r,n,i,a,s,o,l){for(var c=0,h=0,u=s,d=0,p=0,f=0,y=1,A=1,_=1,E=0,C="",S=i,R=a,L=n,D=C;A;)switch(f=E,E=M()){case 40:if(108!=f&&58==x(D,u-1)){-1!=b(D+=v(K(E),"&","&\f"),"&\f",g(c?o[c-1]:0))&&(_=-1);break}case 34:case 39:case 91:D+=K(E);break;case 9:case 10:case 13:case 32:D+=q(f);break;case 92:D+=U(P()-1,7);continue;case 47:switch(O()){case 42:case 47:k(X(G(M(),P()),e,r,l),l),5!=B(f||1)&&5!=B(O()||1)||!T(D)||" "===w(D,-1,void 0)||(D+=" ");break;default:D+="/"}break;case 123*y:o[c++]=T(D)*_;case 125*y:case 59:case 0:switch(E){case 0:case 125:A=0;case 59+h:-1==_&&(D=v(D,/\f/g,"")),p>0&&(T(D)-u||0===y&&47===f)&&k(p>32?Z(D+";",n,r,u-1,l):Z(v(D," ","")+";",n,r,u-2,l),l);break;case 59:D+=";";default:if(k(L=V(D,e,r,c,h,i,o,C,S=[],R=[],u,a),a),123===E)if(0===h)H(D,e,L,L,S,a,u,o,R);else{switch(d){case 99:if(110===x(D,3))break;case 108:if(97===x(D,2))break;default:h=0;case 100:case 109:case 115:}h?H(t,L,L,n&&k(V(t,L,L,0,0,i,o,C,i,S=[],u,R),R),i,R,u,o,n?S:R):H(D,L,L,L,[""],R,0,o,R)}}c=h=p=0,y=_=1,C=D="",u=s;break;case 58:u=1+T(D),p=f;default:if(y<1)if(123==E)--y;else if(125==E&&0==y++&&125==I())continue;switch(D+=m(E),E*y){case 38:_=h>0?1:(D+="\f",-1);break;case 44:o[c++]=(T(D)-1)*_,_=1;break;case 64:45===O()&&(D+=K(M())),d=O(),h=u=T(C=D+=Y(P())),E++;break;case 45:45===f&&2==T(D)&&(y=0)}}return a}function V(t,e,r,n,i,a,s,o,l,c,h,u){for(var d=i-1,f=0===i?a:[""],m=function(t){return t.length}(f),b=0,x=0,T=0;b0?f[k]+" "+A:v(A,/&\f/g,f[k])))&&(l[T++]=_);return N(t,e,r,0===i?p:o,l,c,h,u)}function X(t,e,r,n){return N(t,e,r,d,m(L),w(t,2,-2),0,n)}function Z(t,e,r,n,i){return N(t,e,r,f,w(t,0,n),w(t,n+1,-1),n,i)}var Q=r(3047),J=r(6401),tt={id:"c4",detector:(0,c.K2)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,4981));return{id:"c4",diagram:t}},"loader")},et="flowchart",rt={id:et,detector:(0,c.K2)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,2291));return{id:et,diagram:t}},"loader")},nt="flowchart-v2",it={id:nt,detector:(0,c.K2)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,2291));return{id:nt,diagram:t}},"loader")},at={id:"er",detector:(0,c.K2)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,8756));return{id:"er",diagram:t}},"loader")},st="gitGraph",ot={id:st,detector:(0,c.K2)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,4312));return{id:st,diagram:t}},"loader")},lt="gantt",ct={id:lt,detector:(0,c.K2)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,2492));return{id:lt,diagram:t}},"loader")},ht="info",ut={id:ht,detector:(0,c.K2)(t=>/^\s*info/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,9620));return{id:ht,diagram:t}},"loader")},dt={id:"pie",detector:(0,c.K2)(t=>/^\s*pie/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,9412));return{id:"pie",diagram:t}},"loader")},pt="quadrantChart",ft={id:pt,detector:(0,c.K2)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,1203));return{id:pt,diagram:t}},"loader")},gt="xychart",mt={id:gt,detector:(0,c.K2)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,5955));return{id:gt,diagram:t}},"loader")},yt="requirement",vt={id:yt,detector:(0,c.K2)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,9032));return{id:yt,diagram:t}},"loader")},bt="sequence",xt={id:bt,detector:(0,c.K2)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,7592));return{id:bt,diagram:t}},"loader")},wt="class",Tt={id:wt,detector:(0,c.K2)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,9510));return{id:wt,diagram:t}},"loader")},kt="classDiagram",At={id:kt,detector:(0,c.K2)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,3815));return{id:kt,diagram:t}},"loader")},_t="state",Et={id:_t,detector:(0,c.K2)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,8142));return{id:_t,diagram:t}},"loader")},Ct="stateDiagram",St={id:Ct,detector:(0,c.K2)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,4802));return{id:Ct,diagram:t}},"loader")},Rt="journey",Lt={id:Rt,detector:(0,c.K2)(t=>/^\s*journey/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,5480));return{id:Rt,diagram:t}},"loader")},Dt={draw:(0,c.K2)((t,r,n)=>{c.Rm.debug("rendering svg for syntax error\n");const i=(0,e.D)(r),a=i.append("g");i.attr("viewBox","0 0 2412 512"),(0,l.a$)(i,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw")},Nt=Dt,It={db:{},renderer:Dt,parser:{parse:(0,c.K2)(()=>{},"parse")}},Mt="flowchart-elk",Ot={id:Mt,detector:(0,c.K2)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,2291));return{id:Mt,diagram:t}},"loader")},Pt="timeline",$t={id:Pt,detector:(0,c.K2)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,291));return{id:Pt,diagram:t}},"loader")},Bt="mindmap",Ft={id:Bt,detector:(0,c.K2)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,5822));return{id:Bt,diagram:t}},"loader")},zt="kanban",Kt={id:zt,detector:(0,c.K2)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,6241));return{id:zt,diagram:t}},"loader")},qt="sankey",Ut={id:qt,detector:(0,c.K2)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,2009));return{id:qt,diagram:t}},"loader")},jt="packet",Gt={id:jt,detector:(0,c.K2)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,6567));return{id:jt,diagram:t}},"loader")},Yt="radar",Wt={id:Yt,detector:(0,c.K2)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,6992));return{id:Yt,diagram:t}},"loader")},Ht="block",Vt={id:Ht,detector:(0,c.K2)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,5996));return{id:Ht,diagram:t}},"loader")},Xt="architecture",Zt={id:Xt,detector:(0,c.K2)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,8249));return{id:Xt,diagram:t}},"loader")},Qt="treemap",Jt={id:Qt,detector:(0,c.K2)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,c.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,2821));return{id:Qt,diagram:t}},"loader")},te=!1,ee=(0,c.K2)(()=>{te||(te=!0,(0,l.Js)("error",It,t=>"error"===t.toLowerCase().trim()),(0,l.Js)("---",{db:{clear:(0,c.K2)(()=>{},"clear")},styles:{},renderer:{draw:(0,c.K2)(()=>{},"draw")},parser:{parse:(0,c.K2)(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,c.K2)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,l.Xd)(Ot,Ft,Zt),(0,l.Xd)(tt,Kt,At,Tt,at,ct,ut,dt,vt,xt,it,rt,$t,ot,St,Et,Lt,ft,Ut,Gt,mt,Vt,Wt,Jt))},"addDiagrams"),re=(0,c.K2)(async()=>{c.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(l.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,l.Gs)(t)}catch{try{const{diagram:t,id:n}=await r();(0,l.Js)(n,t,e)}catch(n){throw c.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete l.mW[t],n}}}))).filter(t=>"rejected"===t.status);if(t.length>0){c.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)c.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function ne(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function ie(t,e,r,n){if(void 0!==t.insert){if(r){const e=`chart-desc-${n}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${n}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,c.K2)(ne,"setA11yDiagramInfo"),(0,c.K2)(ie,"addSVGa11yTitleDescription");var ae=class t{constructor(t,e,r,n,i){this.type=t,this.text=e,this.db=r,this.parser=n,this.renderer=i}static{(0,c.K2)(this,"Diagram")}static async fromText(e,r={}){const n=(0,l.zj)(),i=(0,l.Ch)(e,n);e=(0,o.C4)(e)+"\n";try{(0,l.Gs)(i)}catch{const t=(0,l.J$)(i);if(!t)throw new l.C0(`Diagram ${i} not found.`);const{id:e,diagram:r}=await t();(0,l.Js)(e,r)}const{db:a,parser:s,renderer:c,init:h}=(0,l.Gs)(i);return s.parser&&(s.parser.yy=a),a.clear?.(),h?.(n),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new t(i,e,a,s,c)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},se=[],oe=(0,c.K2)(()=>{se.forEach(t=>{t()}),se=[]},"attachFunctions"),le=(0,c.K2)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ce(t){const e=t.match(l.EJ);if(!e)return{text:t,metadata:{}};let r=(0,i.H)(e[1],{schema:i.r})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}(0,c.K2)(ce,"extractFrontMatter");var he=(0,c.K2)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ue=(0,c.K2)(t=>{const{text:e,metadata:r}=ce(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}},"processFrontmatter"),de=(0,c.K2)(t=>{const e=o._K.detectInit(t)??{},r=o._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,o.vU)(t),directive:e}},"processDirectives");function pe(t){const e=he(t),r=ue(e),n=de(r.text),i=(0,o.$t)(r.config,n.directive);return{code:t=le(n.text),title:r.title,config:i}}function fe(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,c.K2)(pe,"preprocessDiagram"),(0,c.K2)(fe,"toBase64");var ge=["foreignobject"],me=["dominant-baseline"];function ye(t){const e=pe(t);return(0,l.cL)(),(0,l.xA)(e.config??{}),e}async function ve(t,e){ee();try{const{code:e,config:r}=ye(t);return{diagramType:(await Re(e)).type,config:r}}catch(r){if(e?.suppressErrors)return!1;throw r}}(0,c.K2)(ye,"processAndSetConfigs"),(0,c.K2)(ve,"parse");var be=(0,c.K2)((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),xe=(0,c.K2)((t,e=new Map)=>{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}}`),e instanceof Map){const n=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{(0,J.A)(t.styles)||n.forEach(e=>{r+=be(t.id,e,t.styles)}),(0,J.A)(t.textStyles)||(r+=be(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return r},"createCssStyles"),we=(0,c.K2)((t,e,r,n)=>{const i=xe(t,r);return A(W(`${n}{${(0,l.tM)(e,i,t.themeVariables)}}`),_)},"createUserStyles"),Te=(0,c.K2)((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(0,o.Sm)(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),ke=(0,c.K2)((t="",e)=>``,"putIntoIFrame"),Ae=(0,c.K2)((t,e,r,n,i)=>{const a=t.append("div");a.attr("id",r),n&&a.attr("style",n);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&s.attr("xmlns:xlink",i),s.append("g"),t},"appendDivSvgG");function _e(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,c.K2)(_e,"sandboxedIframe");var Ee=(0,c.K2)((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),Ce=(0,c.K2)(async function(e,r,n){ee();const i=ye(r);r=i.code;const a=(0,l.zj)();c.Rm.debug(a),r.length>(a?.maxTextSize??5e4)&&(r="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const s="#"+e,o="i"+e,h="#"+o,d="d"+e,p="#"+d,f=(0,c.K2)(()=>{const t=m?h:p,e=(0,u.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let g=(0,u.Ltv)("body");const m="sandbox"===a.securityLevel,y="loose"===a.securityLevel,v=a.fontFamily;if(void 0!==n){if(n&&(n.innerHTML=""),m){const t=_e((0,u.Ltv)(n),o);g=(0,u.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,u.Ltv)(n);Ae(g,e,d,`font-family: ${v}`,"http://www.w3.org/1999/xlink")}else{if(Ee(document,e,d,o),m){const t=_e((0,u.Ltv)("body"),o);g=(0,u.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,u.Ltv)("body");Ae(g,e,d)}let b,x;try{b=await ae.fromText(r,{title:i.title})}catch(N){if(a.suppressErrorRendering)throw f(),N;b=await ae.fromText("error"),x=N}const w=g.select(p).node(),T=b.type,k=w.firstChild,A=k.firstChild,_=b.renderer.getClasses?.(r,b),E=we(a,T,_,s),C=document.createElement("style");C.innerHTML=E,k.insertBefore(C,A);try{await b.renderer.draw(r,e,t.n.version,b)}catch(I){throw a.suppressErrorRendering?f():Nt.draw(r,e,t.n.version),I}const S=g.select(`${p} svg`),R=b.db.getAccTitle?.(),L=b.db.getAccDescription?.();Le(T,S,R,L),g.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let D=g.select(p).node().innerHTML;if(c.Rm.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),D=Te(D,m,(0,l._3)(a.arrowMarkerAbsolute)),m){const t=g.select(p+" svg").node();D=ke(D,t)}else y||(D=Q.A.sanitize(D,{ADD_TAGS:ge,ADD_ATTR:me,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(oe(),x)throw x;return f(),{diagramType:T,svg:D,bindFunctions:b.db.bindFunctions}},"render");function Se(t={}){const e=(0,l.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,l.wZ)(e),e?.theme&&e.theme in l.H$?e.themeVariables=l.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=l.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,l.UU)(e):(0,l.Q2)();(0,c.He)(r.logLevel),ee()}(0,c.K2)(Se,"initialize");var Re=(0,c.K2)((t,e={})=>{const{code:r}=pe(t);return ae.fromText(r,e)},"getDiagramFromText");function Le(t,e,r,n){ne(e,t),ie(e,r,n,e.attr("id"))}(0,c.K2)(Le,"addA11yInfo");var De=Object.freeze({render:Ce,parse:ve,getDiagramFromText:Re,initialize:Se,getConfig:l.zj,setConfig:l.Nk,getSiteConfig:l.Q2,updateSiteConfig:l.B6,reset:(0,c.K2)(()=>{(0,l.cL)()},"reset"),globalReset:(0,c.K2)(()=>{(0,l.cL)(l.sb)},"globalReset"),defaultConfig:l.sb});(0,c.He)((0,l.zj)().logLevel),(0,l.cL)((0,l.zj)());var Ne=(0,c.K2)((t,e,r)=>{c.Rm.warn(t),(0,o.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Ie=(0,c.K2)(async function(t={querySelector:".mermaid"}){try{await Me(t)}catch(e){if((0,o.dq)(e)&&c.Rm.error(e.str),Ye.parseError&&Ye.parseError(e),!t.suppressErrors)throw c.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),Me=(0,c.K2)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=De.getConfig();let i;if(c.Rm.debug((t?"":"No ")+"Callback function found"),r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}c.Rm.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(c.Rm.debug("Start On Load: "+n?.startOnLoad),De.updateSiteConfig({startOnLoad:n?.startOnLoad}));const a=new o._K.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let s;const l=[];for(const d of Array.from(i)){if(c.Rm.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;s=d.innerHTML,s=(0,h.T)(o._K.entityDecode(s)).trim().replace(//gi,"
    ");const r=o._K.detectInit(s);r&&c.Rm.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:n}=await je(e,s,d);d.innerHTML=r,t&&await t(e),n&&n(d)}catch(u){Ne(u,l,Ye.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),Oe=(0,c.K2)(function(t){De.initialize(t)},"initialize"),Pe=(0,c.K2)(async function(t,e,r){c.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Oe(t);const n={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await Ie(n)},"init"),$e=(0,c.K2)(async(t,{lazyLoad:e=!0}={})=>{ee(),(0,l.Xd)(...t),!1===e&&await re()},"registerExternalDiagrams"),Be=(0,c.K2)(function(){if(Ye.startOnLoad){const{startOnLoad:t}=De.getConfig();t&&Ye.run().catch(t=>c.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Be,!1);var Fe=(0,c.K2)(function(t){Ye.parseError=t},"setParseErrorHandler"),ze=[],Ke=!1,qe=(0,c.K2)(async()=>{if(!Ke){for(Ke=!0;ze.length>0;){const e=ze.shift();if(e)try{await e()}catch(t){c.Rm.error("Error executing queue",t)}}Ke=!1}},"executeQueue"),Ue=(0,c.K2)(async(t,e)=>new Promise((r,n)=>{const i=(0,c.K2)(()=>new Promise((i,a)=>{De.parse(t,e).then(t=>{i(t),r(t)},t=>{c.Rm.error("Error parsing",t),Ye.parseError?.(t),a(t),n(t)})}),"performCall");ze.push(i),qe().catch(n)}),"parse"),je=(0,c.K2)((t,e,r)=>new Promise((n,i)=>{const a=(0,c.K2)(()=>new Promise((a,s)=>{De.render(t,e,r).then(t=>{a(t),n(t)},t=>{c.Rm.error("Error parsing",t),Ye.parseError?.(t),s(t),i(t)})}),"performCall");ze.push(a),qe().catch(i)}),"render"),Ge=(0,c.K2)(()=>Object.keys(l.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Ye={startOnLoad:!0,mermaidAPI:De,parse:Ue,render:je,init:Pe,run:Ie,registerExternalDiagrams:$e,registerLayoutLoaders:a.sO,initialize:Oe,parseError:void 0,contentLoaded:Be,setParseErrorHandler:Fe,detectType:l.Ch,registerIconPacks:s.pC,getRegisteredDiagramsMetadata:Ge},We=Ye;function He(t){var e=t.querySelectorAll(".mermaid");We.init({},e),e.forEach(function(t){return t.classList.add("content-center")})}const Ve={initMermaid:function(){He(document),document.querySelectorAll(".pluggable").forEach(function(t){return t.addEventListener("onPluginReady",function(){He(t)})})}}})(),window.__DOCS_MERMAID__=n})(); \ No newline at end of file diff --git a/resources/js/prism.js b/resources/js/prism.js new file mode 100644 index 00000000..66fe00af --- /dev/null +++ b/resources/js/prism.js @@ -0,0 +1,4 @@ +/*! Retype v4.1.0 | retype.com | Copyright 2026. Retype, Inc. All rights reserved. */ + +window.Prism=window.Prism||{manual:true}; +(()=>{var e={9029(){"undefined"!=typeof Prism&&Prism.hooks.add("wrap",function(e){"keyword"===e.type&&e.classes.push("keyword-"+e.content)})},8848(e,t,n){var a=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,a={},r={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=g.reach);w+=k.value.length,k=k.next){var A=k.value;if(t.length>e.length)return;if(!(A instanceof i)){var S,$=1;if(y){if(!(S=s(F,w,e,v))||S.index>=e.length)break;var E=S.index,_=S.index+S[0].length,j=w;for(j+=k.value.length;E>=j;)j+=(k=k.next).value.length;if(w=j-=k.value.length,k.value instanceof i)continue;for(var P=k;P!==t.tail&&(j<_||"string"==typeof P.value);P=P.next)$++,j+=P.value.length;$--,A=e.slice(w,j),S.index-=w}else if(!(S=s(F,0,A,v)))continue;E=S.index;var C=S[0],T=A.slice(0,E),O=A.slice(E+C.length),L=w+A.length;g&&L>g.reach&&(g.reach=L);var z=k.prev;if(T&&(z=u(t,z,T),w+=T.length),c(t,z,$),k=u(t,z,new i(d,m?r.tokenize(C,m):C,b,C)),O&&u(t,k,O),$>1){var N={cause:d+","+h,reach:L};o(e,t,n,k.prev,w,N),g&&N.reach>g.reach&&(g.reach=N.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 u(e,t,n){var a=t.next,r={value:n,prev:t,next:a};return t.next=r,a.prev=r,e.length++,r}function c(e,t,n){for(var a=t.next,r=0;r"+i.content+""},!e.document)return e.addEventListener?(r.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),a=n.language,i=n.code,s=n.immediateClose;e.postMessage(r.highlight(i,r.languages[a],a)),s&&e.close()},!1),r):r;var g=r.util.currentScript();function d(){r.manual||r.highlightAll()}if(g&&(r.filename=g.src,g.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var p=document.readyState;"loading"===p||"interactive"===p&&g&&g.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return r}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=a),void 0!==n.g&&(n.g.Prism=a),a.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]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.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:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.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"))}(a),a.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:/[{}[\];(),.:]/},a.languages.javascript=a.languages.extend("clike",{"class-name":[a.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}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.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:a.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:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.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:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.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:a.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"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.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")),a.languages.js=a.languages.javascript,function(){if(void 0!==a&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",r="loaded",i="pre[data-src]:not(["+t+'="'+r+'"]):not(['+t+'="'+n+'"])';a.hooks.add("before-highlightall",function(e){e.selector+=", "+i}),a.hooks.add("before-sanity-check",function(s){var o=s.element;if(o.matches(i)){s.code="",o.setAttribute(t,n);var l=o.appendChild(document.createElement("CODE"));l.textContent="Loading…";var u=o.getAttribute("data-src"),c=s.language;if("none"===c){var g=(/\.(\w+)$/.exec(u)||[,"none"])[1];c=e[g]||g}a.util.setLanguage(l,c),a.util.setLanguage(o,c);var d=a.plugins.autoloader;d&&d.loadLanguages(c),function(e,t,n){var a=new XMLHttpRequest;a.open("GET",e,!0),a.onreadystatechange=function(){4==a.readyState&&(a.status<400&&a.responseText?t(a.responseText):a.status>=400?n("✖ Error "+a.status+" while fetching file: "+a.statusText):n("✖ Error: File does not exist or is empty"))},a.send(null)}(u,function(e){o.setAttribute(t,r);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),a=t[2],r=t[3];return a?r?[n,Number(r)]:[n,void 0]:[n,n]}}(o.getAttribute("data-range"));if(n){var i=e.split(/\r\n?|\n/g),s=n[0],u=null==n[1]?i.length:n[1];s<0&&(s+=i.length),s=Math.max(0,Math.min(s-1,i.length)),u<0&&(u+=i.length),u=Math.max(0,Math.min(u,i.length)),e=i.slice(s,u).join("\n"),o.hasAttribute("data-start")||o.setAttribute("data-start",String(s+1))}l.textContent=e,a.highlightElement(l)},function(e){o.setAttribute(t,"failed"),l.textContent=e})}}),a.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(i),r=0;t=n[r++];)a.highlightElement(t)}};var s=!1;a.fileHighlight=function(){s||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),s=!0),a.plugins.fileHighlight.highlight.apply(this,arguments)}}}()},7667(){!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var e,t=function(){if(void 0===e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding="0",t.style.border="0",t.innerHTML=" 
     ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e};Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentElement;if(r(t)){var a=0;n(".line-highlight",t).forEach(function(e){a+=e.textContent.length,e.parentNode.removeChild(e)}),a&&/^(?: \n)+$/.test(e.code.slice(-a))&&(e.code=e.code.slice(0,-a))}}),Prism.hooks.add("complete",function e(t){for(var n=t.element.parentElement;n&&/div/i.test(n.nodeName)&&n.className.indexOf("simplebar-")>=0;)n=n.parentElement;if(r(n)){var a,s=Prism.plugins.lineNumbers,o=t.plugins&&t.plugins.lineNumbers;if(a="line-numbers",n.classList.contains(a)&&s&&!o)Prism.hooks.add("line-numbers",e);else i(n)()}}),window.addEventListener("resize",function(){n("pre").filter(r).map(function(e){return i(e)}).forEach(a)})}function n(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function a(e){e()}function r(e){return!(!e||!/pre/i.test(e.nodeName))&&!!e.hasAttribute("data-line")}function i(e,n,r){var i=(n="string"==typeof n?n:e.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),s=+e.getAttribute("data-line-offset")||0,o=(t()?parseInt:parseFloat)(getComputedStyle(e).lineHeight),l=e.querySelector("code"),u=e,c=[],g=l&&u!=l?function(e,t){var n=getComputedStyle(e),a=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(a.borderTopWidth)+r(a.paddingTop)-r(n.paddingTop)}(e,l):0;return i.forEach(function(t){var n=t.split("-"),a=+n[0],i=+n[1]||a,l=e.querySelector('.line-highlight[data-range="'+t+'"]')||document.createElement("div");c.push(function(){l.setAttribute("aria-hidden","true"),l.setAttribute("data-range",t),l.className=(r||"")+" line-highlight"}),c.push(function(){l.style.top=(a-s-1)*o+g+"px",l.textContent=new Array(i-a+2).join(" \n")}),c.push(function(){l.style.width=e.scrollWidth+"px"}),c.push(function(){u.appendChild(l)})}),function(){c.forEach(a)}}}()}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";n.r(a),n.d(a,{default:()=>r});var e=n(8848),t=n.n(e);n(9029),n(7667);const r={initPrism:function(){t().highlightAllUnder(document),document.querySelectorAll(".pluggable").forEach(function(e){return e.addEventListener("onPluginReady",function(){setTimeout(function(){t().highlightAllUnder(e)},10)})})}}})(),window.__DOCS_PRISM__=a})();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:/[{}[\];(),.:]/};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;!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".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+".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+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".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);!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",a={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:a,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:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:a}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.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}},a.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,i=0;i}]|\$[<{]/};Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;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; \ No newline at end of file diff --git a/resources/js/retype.js b/resources/js/retype.js new file mode 100644 index 00000000..ba194746 --- /dev/null +++ b/resources/js/retype.js @@ -0,0 +1,26 @@ +/*! Retype v4.1.0 | retype.com | Copyright 2026. Retype, Inc. All rights reserved. */ + +(()=>{var e={89(e,t,n){"use strict";n.d(t,{Su:()=>Mt,YR:()=>Tt,dZ:()=>Et,gM:()=>_t});const r="eager",o="lazy";class i extends HTMLElement{static delegateConstructor=void 0;loaded=Promise.resolve();static get observedAttributes(){return["disabled","loading","src"]}constructor(){super(),this.delegate=new i.delegateConstructor(this)}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){return this.delegate.sourceURLReloaded()}attributeChangedCallback(e){"loading"==e?this.delegate.loadingStyleChanged():"src"==e?this.delegate.sourceURLChanged():"disabled"==e&&this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get refresh(){return this.getAttribute("refresh")}set refresh(e){e?this.setAttribute("refresh",e):this.removeAttribute("refresh")}get shouldReloadWithMorph(){return this.src&&"morph"===this.refresh}get loading(){return function(e){if("lazy"===e.toLowerCase())return o;return r}(this.getAttribute("loading")||"")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){return this.ownerDocument?.documentElement?.hasAttribute("data-turbo-preview")}}const s={enabled:!0,progressBarDelay:500,unvisitableExtensions:new Set([".7z",".aac",".apk",".avi",".bmp",".bz2",".css",".csv",".deb",".dmg",".doc",".docx",".exe",".gif",".gz",".heic",".heif",".ico",".iso",".jpeg",".jpg",".js",".json",".m4a",".mkv",".mov",".mp3",".mp4",".mpeg",".mpg",".msi",".ogg",".ogv",".pdf",".pkg",".png",".ppt",".pptx",".rar",".rtf",".svg",".tar",".tif",".tiff",".txt",".wav",".webm",".webp",".wma",".wmv",".xls",".xlsx",".xml",".zip"])};function a(e){if("false"==e.getAttribute("data-turbo-eval"))return e;{const t=document.createElement("script"),n=E();return n&&(t.nonce=n),t.textContent=e.textContent,t.async=!1,function(e,t){for(const{name:n,value:r}of t.attributes)e.setAttribute(n,r)}(t,e),t}}function l(e,{target:t,cancelable:n,detail:r}={}){const o=new CustomEvent(e,{cancelable:n,bubbles:!0,composed:!0,detail:r});return t&&t.isConnected?t.dispatchEvent(o):document.documentElement.dispatchEvent(o),o}function c(e){e.preventDefault(),e.stopImmediatePropagation()}function u(){return"hidden"===document.visibilityState?h():d()}function d(){return new Promise(e=>requestAnimationFrame(()=>e()))}function h(){return new Promise(e=>setTimeout(()=>e(),0))}function f(e=""){return(new DOMParser).parseFromString(e,"text/html")}function p(e,...t){const n=function(e,t){return e.reduce((e,n,r)=>e+n+(null==t[r]?"":t[r]),"")}(e,t).replace(/^\n/,"").split("\n"),r=n[0].match(/^\s+/),o=r?r[0].length:0;return n.map(e=>e.slice(o)).join("\n")}function m(){return Array.from({length:36}).map((e,t)=>8==t||13==t||18==t||23==t?"-":14==t?"4":19==t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(16*Math.random()).toString(16)).join("")}function v(e,...t){for(const n of t.map(t=>t?.getAttribute(e)))if("string"==typeof n)return n;return null}function g(...e){for(const t of e)"turbo-frame"==t.localName&&t.setAttribute("busy",""),t.setAttribute("aria-busy","true")}function b(...e){for(const t of e)"turbo-frame"==t.localName&&t.removeAttribute("busy"),t.removeAttribute("aria-busy")}function y(e,t=2e3){return new Promise(n=>{const r=()=>{e.removeEventListener("error",r),e.removeEventListener("load",r),n()};e.addEventListener("load",r,{once:!0}),e.addEventListener("error",r,{once:!0}),setTimeout(n,t)})}function w(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}function S(...e){const t=v("data-turbo-action",...e);return function(e){return"advance"==e||"replace"==e||"restore"==e}(t)?t:null}function k(e){return document.querySelector(`meta[name="${e}"]`)}function x(e){const t=k(e);return t&&t.content}function E(){const e=k("csp-nonce");if(e){const{nonce:t,content:n}=e;return""==t?n:t}}function C(e,t){if(e instanceof Element)return e.closest(t)||C(e.assignedSlot||e.getRootNode()?.host,t)}function _(e){return!!e&&null==e.closest("[inert], :disabled, [hidden], details:not([open]), dialog:not([open])")&&"function"==typeof e.focus}function A(e){return Array.from(e.querySelectorAll("[autofocus]")).find(_)}function T(e){if("_blank"===e)return!1;if(e){for(const t of document.getElementsByName(e))if(t instanceof HTMLIFrameElement)return!1;return!0}return!0}function L(e){const t=C(e,"a[href], a[xlink\\:href]");if(!t)return null;if(t.href.startsWith("#"))return null;if(t.hasAttribute("download"))return null;const n=t.getAttribute("target");return n&&"_self"!==n?null:t}const R={"aria-disabled":{beforeSubmit:e=>{e.setAttribute("aria-disabled","true"),e.addEventListener("click",c)},afterSubmit:e=>{e.removeAttribute("aria-disabled"),e.removeEventListener("click",c)}},disabled:{beforeSubmit:e=>e.disabled=!0,afterSubmit:e=>e.disabled=!1}};const M=new class{#e=null;constructor(e){Object.assign(this,e)}get submitter(){return this.#e}set submitter(e){this.#e=R[e]||e}}({mode:"on",submitter:"disabled"}),I={drive:s,forms:M};function O(e){return new URL(e.toString(),document.baseURI)}function D(e){let t;return e.hash?e.hash.slice(1):(t=e.href.match(/#(.*)$/))?t[1]:void 0}function P(e,t){return O(t?.getAttribute("formaction")||e.getAttribute("action")||e.action)}function N(e){return(function(e){return function(e){return e.pathname.split("/").slice(1)}(e).slice(-1)[0]}(e).match(/\.[^.]*$/)||[])[0]||""}function F(e,t){return function(e,t){const n=H(t.origin+t.pathname);return H(e.href)===n||e.href.startsWith(n)}(e,t)&&!I.drive.unvisitableExtensions.has(N(e))}function W(e){return O(e.getAttribute("href")||"")}function B(e){return function(e){const t=D(e);return null!=t?e.href.slice(0,-(t.length+1)):e.href}(e)}function V(e,t){return O(e).href==O(t).href}function H(e){return e.endsWith("/")?e:e+"/"}class q{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return O(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.clone().text()}get responseHTML(){return this.isHTML?this.response.clone().text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}}class j extends Set{constructor(e){super(),this.maxSize=e}add(e){if(this.size>=this.maxSize){const e=this.values().next().value;this.delete(e)}super.add(e)}}const z=new j(20);function $(e,t={}){const n=new Headers(t.headers||{}),r=m();return z.add(r),n.append("X-Turbo-Request-Id",r),window.fetch(e,{...t,headers:n})}function X(e){switch(e.toLowerCase()){case"get":return K.get;case"post":return K.post;case"put":return K.put;case"patch":return K.patch;case"delete":return K.delete}}const K={get:"get",post:"post",put:"put",patch:"patch",delete:"delete"};const U={urlEncoded:"application/x-www-form-urlencoded",multipart:"multipart/form-data",plain:"text/plain"};class G{abortController=new AbortController;#t=e=>{};constructor(e,t,n,r=new URLSearchParams,o=null,i=U.urlEncoded){const[s,a]=Y(O(n),t,r,i);this.delegate=e,this.url=s,this.target=o,this.fetchOptions={credentials:"same-origin",redirect:"follow",method:t.toUpperCase(),headers:{...this.defaultHeaders},body:a,signal:this.abortSignal,referrer:this.delegate.referrer?.href},this.enctype=i}get method(){return this.fetchOptions.method}set method(e){const t=this.isSafe?this.url.searchParams:this.fetchOptions.body||new FormData,n=X(e)||K.get;this.url.search="";const[r,o]=Y(this.url,n,t,this.enctype);this.url=r,this.fetchOptions.body=o,this.fetchOptions.method=n.toUpperCase()}get headers(){return this.fetchOptions.headers}set headers(e){this.fetchOptions.headers=e}get body(){return this.isSafe?this.url.searchParams:this.fetchOptions.body}set body(e){this.fetchOptions.body=e}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){const{fetchOptions:e}=this;this.delegate.prepareRequest(this);const t=await this.#n(e);try{this.delegate.requestStarted(this),t.detail.fetchRequest?this.response=t.detail.fetchRequest.response:this.response=$(this.url.href,e);const n=await this.response;return await this.receive(n)}catch(n){if("AbortError"!==n.name)throw this.#r(n)&&this.delegate.requestErrored(this,n),n}finally{this.delegate.requestFinished(this)}}async receive(e){const t=new q(e);return l("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:t},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,t):t.succeeded?this.delegate.requestSucceededWithResponse(this,t):this.delegate.requestFailedWithResponse(this,t),t}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}get isSafe(){return Q(this.method)}get abortSignal(){return this.abortController.signal}acceptResponseType(e){this.headers.Accept=[e,this.headers.Accept].join(", ")}async#n(e){const t=new Promise(e=>this.#t=e),n=l("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url,resume:this.#t},target:this.target});return this.url=n.detail.url,n.defaultPrevented&&await t,n}#r(e){return!l("turbo:fetch-request-error",{target:this.target,cancelable:!0,detail:{request:this,error:e}}).defaultPrevented}}function Q(e){return X(e)==K.get}function Y(e,t,n,r){const o=Array.from(n).length>0?new URLSearchParams(J(n)):e.searchParams;return Q(t)?[Z(e,o),null]:r==U.urlEncoded?[e,o]:[e,n]}function J(e){const t=[];for(const[n,r]of e)r instanceof File||t.push([n,r]);return t}function Z(e,t){const n=new URLSearchParams(J(t));return e.search=n.toString(),e}class ee{started=!1;constructor(e,t){this.delegate=e,this.element=t,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}intersect=e=>{const t=e.slice(-1)[0];t?.isIntersecting&&this.delegate.elementAppearedInViewport(this.element)}}class te{static contentType="text/vnd.turbo-stream.html";static wrap(e){return"string"==typeof e?new this(function(e){const t=document.createElement("template");return t.innerHTML=e,t.content}(e)):e}constructor(e){this.fragment=function(e){for(const t of e.querySelectorAll("turbo-stream")){const e=document.importNode(t,!0);for(const t of e.templateElement.content.querySelectorAll("script"))t.replaceWith(a(t));t.replaceWith(e)}return e}(e)}}const ne=e=>e;class re{keys=[];entries={};#o;constructor(e,t=ne){this.size=e,this.#o=t}has(e){return this.#o(e)in this.entries}get(e){if(this.has(e)){const t=this.read(e);return this.touch(e),t}}put(e,t){return this.write(e,t),this.touch(e),t}clear(){for(const e of Object.keys(this.entries))this.evict(e)}read(e){return this.entries[this.#o(e)]}write(e,t){this.entries[this.#o(e)]=t}touch(e){e=this.#o(e);const t=this.keys.indexOf(e);t>-1&&this.keys.splice(t,1),this.keys.unshift(e),this.trim()}trim(){for(const e of this.keys.splice(this.size))this.evict(e)}evict(e){delete this.entries[e]}}const oe=1e4,ie=new class extends re{#i=null;#s={};constructor(e=1,t=100){super(e,B),this.prefetchDelay=t}putLater(e,t,n){this.#i=setTimeout(()=>{t.perform(),this.put(e,t,n),this.#i=null},this.prefetchDelay)}put(e,t,n=oe){super.put(e,t),this.#s[B(e)]=new Date((new Date).getTime()+n)}clear(){super.clear(),this.#i&&clearTimeout(this.#i)}evict(e){super.evict(e),delete this.#s[e]}has(e){if(super.has(e)){const t=this.#s[B(e)];return t&&t>Date.now()}return!1}},se={initialized:"initialized",requesting:"requesting",waiting:"waiting",receiving:"receiving",stopping:"stopping",stopped:"stopped"};class ae{state=se.initialized;static confirmMethod(e){return Promise.resolve(confirm(e))}constructor(e,t,n,r=!1){const o=function(e,t){const n=t?.getAttribute("formmethod")||e.getAttribute("method")||"";return X(n.toLowerCase())||K.get}(t,n),i=function(e,t){const n=O(e);Q(t)&&(n.search="");return n}(function(e,t){const n="string"==typeof e.action?e.action:null;return t?.hasAttribute("formaction")?t.getAttribute("formaction")||"":e.getAttribute("action")||n||""}(t,n),o),s=function(e,t){const n=new FormData(e),r=t?.getAttribute("name"),o=t?.getAttribute("value");r&&n.append(r,o||"");return n}(t,n),a=function(e,t){return function(e){switch(e.toLowerCase()){case U.multipart:return U.multipart;case U.plain:return U.plain;default:return U.urlEncoded}}(t?.getAttribute("formenctype")||e.enctype)}(t,n);this.delegate=e,this.formElement=t,this.submitter=n,this.fetchRequest=new G(this,o,i,s,t,a),this.mustRedirect=r}get method(){return this.fetchRequest.method}set method(e){this.fetchRequest.method=e}get action(){return this.fetchRequest.url.toString()}set action(e){this.fetchRequest.url=O(e)}get body(){return this.fetchRequest.body}get enctype(){return this.fetchRequest.enctype}get isSafe(){return this.fetchRequest.isSafe}get location(){return this.fetchRequest.url}async start(){const{initialized:e,requesting:t}=se,n=v("data-turbo-confirm",this.submitter,this.formElement);if("string"==typeof n){const e="function"==typeof I.forms.confirm?I.forms.confirm:ae.confirmMethod;if(!await e(n,this.formElement,this.submitter))return}if(this.state==e)return this.state=t,this.fetchRequest.perform()}stop(){const{stopping:e,stopped:t}=se;if(this.state!=e&&this.state!=t)return this.state=e,this.fetchRequest.cancel(),!0}prepareRequest(e){if(!e.isSafe){const t=function(e){if(null!=e){const t=(document.cookie?document.cookie.split("; "):[]).find(t=>t.startsWith(e));if(t){const e=t.split("=").slice(1).join("=");return e?decodeURIComponent(e):void 0}}}(x("csrf-param"))||x("csrf-token");t&&(e.headers["X-CSRF-Token"]=t)}this.requestAcceptsTurboStreamResponse(e)&&e.acceptResponseType(te.contentType)}requestStarted(e){this.state=se.waiting,this.submitter&&I.forms.submitter.beforeSubmit(this.submitter),this.setSubmitsWith(),g(this.formElement),l("turbo:submit-start",{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,t){ie.clear(),this.result={success:t.succeeded,fetchResponse:t}}requestSucceededWithResponse(e,t){if(t.clientError||t.serverError)this.delegate.formSubmissionFailedWithResponse(this,t);else if(ie.clear(),this.requestMustRedirect(e)&&function(e){return 200==e.statusCode&&!e.redirected}(t)){const e=new Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,e)}else this.state=se.receiving,this.result={success:!0,fetchResponse:t},this.delegate.formSubmissionSucceededWithResponse(this,t)}requestFailedWithResponse(e,t){this.result={success:!1,fetchResponse:t},this.delegate.formSubmissionFailedWithResponse(this,t)}requestErrored(e,t){this.result={success:!1,error:t},this.delegate.formSubmissionErrored(this,t)}requestFinished(e){this.state=se.stopped,this.submitter&&I.forms.submitter.afterSubmit(this.submitter),this.resetSubmitterText(),b(this.formElement),l("turbo:submit-end",{target:this.formElement,detail:{formSubmission:this,...this.result}}),this.delegate.formSubmissionFinished(this)}setSubmitsWith(){if(this.submitter&&this.submitsWith)if(this.submitter.matches("button"))this.originalSubmitText=this.submitter.innerHTML,this.submitter.innerHTML=this.submitsWith;else if(this.submitter.matches("input")){const e=this.submitter;this.originalSubmitText=e.value,e.value=this.submitsWith}}resetSubmitterText(){if(this.submitter&&this.originalSubmitText)if(this.submitter.matches("button"))this.submitter.innerHTML=this.originalSubmitText;else if(this.submitter.matches("input")){this.submitter.value=this.originalSubmitText}}requestMustRedirect(e){return!e.isSafe&&this.mustRedirect}requestAcceptsTurboStreamResponse(e){return!e.isSafe||function(e,...t){return t.some(t=>t&&t.hasAttribute(e))}("data-turbo-stream",this.submitter,this.formElement)}get submitsWith(){return this.submitter?.getAttribute("data-turbo-submits-with")}}class le{constructor(e){this.element=e}get activeElement(){return this.element.ownerDocument.activeElement}get children(){return[...this.element.children]}hasAnchor(e){return null!=this.getElementForAnchor(e)}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){return A(this.element)}get permanentElements(){return ue(this.element)}getPermanentElementById(e){return ce(this.element,e)}getPermanentElementMapForSnapshot(e){const t={};for(const n of this.permanentElements){const{id:r}=n,o=e.getPermanentElementById(r);o&&(t[r]=[n,o])}return t}}function ce(e,t){return e.querySelector(`#${t}[data-turbo-permanent]`)}function ue(e){return e.querySelectorAll("[id][data-turbo-permanent]")}class de{started=!1;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}submitCaptured=()=>{this.eventTarget.removeEventListener("submit",this.submitBubbled,!1),this.eventTarget.addEventListener("submit",this.submitBubbled,!1)};submitBubbled=e=>{if(!e.defaultPrevented){const t=e.target instanceof HTMLFormElement?e.target:void 0,n=e.submitter||void 0;t&&function(e,t){const n=t?.getAttribute("formmethod")||e.getAttribute("method");return"dialog"!=n}(t,n)&&function(e,t){const n=t?.getAttribute("formtarget")||e.getAttribute("target");return T(n)}(t,n)&&this.delegate.willSubmitForm(t,n)&&(e.preventDefault(),e.stopImmediatePropagation(),this.delegate.formSubmitted(t,n))}}}class he{#a=e=>{};#l=e=>{};constructor(e,t){this.delegate=e,this.element=t}scrollToAnchor(e){const t=this.snapshot.getElementForAnchor(e);t?(this.focusElement(t),this.scrollToElement(t)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(D(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:t}){this.scrollRoot.scrollTo(e,t)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}async render(e){const{isPreview:t,shouldRender:n,willRender:r,newSnapshot:o}=e,i=r;if(n)try{this.renderPromise=new Promise(e=>this.#a=e),this.renderer=e,await this.prepareToRenderSnapshot(e);const n=new Promise(e=>this.#l=e),r={resume:this.#l,render:this.renderer.renderElement,renderMethod:this.renderer.renderMethod};this.delegate.allowsImmediateRender(o,r)||await n,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(o,t,this.renderer.renderMethod),this.delegate.preloadOnLoadLinksForView(this.element),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.#a(void 0),delete this.renderPromise}else i&&this.invalidate(e.reloadReason)}invalidate(e){this.delegate.viewInvalidated(e)}async prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),await e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}markVisitDirection(e){this.element.setAttribute("data-turbo-visit-direction",e)}unmarkVisitDirection(){this.element.removeAttribute("data-turbo-visit-direction")}async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}}class fe extends he{missing(){this.element.innerHTML='Content missing'}get snapshot(){return new le(this.element)}}class pe{constructor(e,t){this.delegate=e,this.element=t}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}clickBubbled=e=>{this.clickEventIsSignificant(e)?this.clickEvent=e:delete this.clickEvent};linkClicked=e=>{this.clickEvent&&this.clickEventIsSignificant(e)&&this.delegate.shouldInterceptLinkClick(e.target,e.detail.url,e.detail.originalEvent)&&(this.clickEvent.preventDefault(),e.preventDefault(),this.delegate.linkClickIntercepted(e.target,e.detail.url,e.detail.originalEvent)),delete this.clickEvent};willVisit=e=>{delete this.clickEvent};clickEventIsSignificant(e){const t=e.composed?e.target?.parentElement:e.target,n=L(t)||t;return n instanceof Element&&n.closest("turbo-frame, html")==this.element}}class me{started=!1;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickCaptured=()=>{this.eventTarget.removeEventListener("click",this.clickBubbled,!1),this.eventTarget.addEventListener("click",this.clickBubbled,!1)};clickBubbled=e=>{if(e instanceof MouseEvent&&this.clickEventIsSignificant(e)){const t=L(e.composedPath&&e.composedPath()[0]||e.target);if(t&&T(t.target)){const n=W(t);this.delegate.willFollowLinkToLocation(t,n,e)&&(e.preventDefault(),this.delegate.followedLinkToLocation(t,n))}}};clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}}class ve{constructor(e,t){this.delegate=e,this.linkInterceptor=new me(this,t)}start(){this.linkInterceptor.start()}stop(){this.linkInterceptor.stop()}canPrefetchRequestToLocation(e,t){return!1}prefetchAndCacheRequestToLocation(e,t){}willFollowLinkToLocation(e,t,n){return this.delegate.willSubmitFormLinkToLocation(e,t,n)&&(e.hasAttribute("data-turbo-method")||e.hasAttribute("data-turbo-stream"))}followedLinkToLocation(e,t){const n=document.createElement("form");for(const[l,c]of t.searchParams)n.append(Object.assign(document.createElement("input"),{type:"hidden",name:l,value:c}));const r=Object.assign(t,{search:""});n.setAttribute("data-turbo","true"),n.setAttribute("action",r.href),n.setAttribute("hidden","");const o=e.getAttribute("data-turbo-method");o&&n.setAttribute("method",o);const i=e.getAttribute("data-turbo-frame");i&&n.setAttribute("data-turbo-frame",i);const s=S(e);s&&n.setAttribute("data-turbo-action",s);const a=e.getAttribute("data-turbo-confirm");a&&n.setAttribute("data-turbo-confirm",a);e.hasAttribute("data-turbo-stream")&&n.setAttribute("data-turbo-stream",""),this.delegate.submittedFormLinkToLocation(e,t,n),document.body.appendChild(n),n.addEventListener("turbo:submit-end",()=>n.remove(),{once:!0}),requestAnimationFrame(()=>n.requestSubmit())}}class ge{static async preservingPermanentElements(e,t,n){const r=new this(e,t);r.enter(),await n(),r.leave()}constructor(e,t){this.delegate=e,this.permanentElementMap=t}enter(){for(const e in this.permanentElementMap){const[t,n]=this.permanentElementMap[e];this.delegate.enteringBardo(t,n),this.replaceNewPermanentElementWithPlaceholder(n)}}leave(){for(const e in this.permanentElementMap){const[t]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(t),this.replacePlaceholderWithPermanentElement(t),this.delegate.leavingBardo(t)}}replaceNewPermanentElementWithPlaceholder(e){const t=function(e){const t=document.createElement("meta");return t.setAttribute("name","turbo-permanent-placeholder"),t.setAttribute("content",e.id),t}(e);e.replaceWith(t)}replaceCurrentPermanentElementWithClone(e){const t=e.cloneNode(!0);e.replaceWith(t)}replacePlaceholderWithPermanentElement(e){const t=this.getPlaceholderById(e.id);t?.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find(t=>t.content==e)}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}}class be{#c=null;static renderElement(e,t){}constructor(e,t,n,r=!0){this.currentSnapshot=e,this.newSnapshot=t,this.isPreview=n,this.willRender=r,this.renderElement=this.constructor.renderElement,this.promise=new Promise((e,t)=>this.resolvingFunctions={resolve:e,reject:t})}get shouldRender(){return!0}get shouldAutofocus(){return!0}get reloadReason(){}prepareToRender(){}render(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}async preservingPermanentElements(e){await ge.preservingPermanentElements(this,this.permanentElementMap,e)}focusFirstAutofocusableElement(){if(this.shouldAutofocus){const e=this.connectedSnapshot.firstAutofocusableElement;e&&e.focus()}}enteringBardo(e){this.#c||e.contains(this.currentSnapshot.activeElement)&&(this.#c=this.currentSnapshot.activeElement)}leavingBardo(e){e.contains(this.#c)&&this.#c instanceof HTMLElement&&(this.#c.focus(),this.#c=null)}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}get renderMethod(){return"replace"}}class ye extends be{static renderElement(e,t){const n=document.createRange();n.selectNodeContents(e),n.deleteContents();const r=t,o=r.ownerDocument?.createRange();o&&(o.selectNodeContents(r),e.appendChild(o.extractContents()))}constructor(e,t,n,r,o,i=!0){super(t,n,r,o,i),this.delegate=e}get shouldRender(){return!0}async render(){await u(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),await u(),this.focusFirstAutofocusableElement(),await u(),this.activateScriptElements()}loadFrameElement(){this.delegate.willRenderFrame(this.currentElement,this.newElement),this.renderElement(this.currentElement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){const n=this.currentElement.firstElementChild,r=(e=this.currentElement.getAttribute("data-autoscroll-block"),t="end","end"==e||"start"==e||"center"==e||"nearest"==e?e:t),o=function(e,t){return"auto"==e||"smooth"==e?e:t}(this.currentElement.getAttribute("data-autoscroll-behavior"),"auto");if(n)return n.scrollIntoView({block:r,behavior:o}),!0}var e,t;return!1}activateScriptElements(){for(const e of this.newScriptElements){const t=a(e);e.replaceWith(t)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}}var we=function(){const e=()=>{},t={morphStyle:"outerHTML",callbacks:{beforeNodeAdded:e,afterNodeAdded:e,beforeNodeMorphed:e,afterNodeMorphed:e,beforeNodeRemoved:e,afterNodeRemoved:e,beforeAttributeUpdated:e},head:{style:"merge",shouldPreserve:e=>"true"===e.getAttribute("im-preserve"),shouldReAppend:e=>"true"===e.getAttribute("im-re-append"),shouldRemove:e,afterHeadMorphed:e},restoreFocus:!0};const n=function(){function e(e,t,n,o){if(!1===o.callbacks.beforeNodeAdded(t))return null;if(o.idMap.has(t)){const i=document.createElement(t.tagName);return e.insertBefore(i,n),r(i,t,o),o.callbacks.afterNodeAdded(i),i}{const r=document.importNode(t,!0);return e.insertBefore(r,n),o.callbacks.afterNodeAdded(r),r}}const t=function(){function e(e,t,n){let r=e.idMap.get(t),o=e.idMap.get(n);if(!o||!r)return!1;for(const i of r)if(o.has(i))return!0;return!1}function t(e,t){const n=e,r=t;return n.nodeType===r.nodeType&&n.tagName===r.tagName&&(!n.getAttribute?.("id")||n.getAttribute?.("id")===r.getAttribute?.("id"))}return function(n,r,o,i){let s=null,a=r.nextSibling,l=0,c=o;for(;c&&c!=i;){if(t(c,r)){if(e(n,c,r))return c;null===s&&(n.idMap.has(c)||(s=c))}if(null===s&&a&&t(c,a)&&(l++,a=a.nextSibling,l>=2&&(s=void 0)),n.activeElementAndParents.includes(c))break;c=c.nextSibling}return s||null}}();function n(e,t){if(e.idMap.has(t))s(e.pantry,t,null);else{if(!1===e.callbacks.beforeNodeRemoved(t))return;t.parentNode?.removeChild(t),e.callbacks.afterNodeRemoved(t)}}function o(e,t,r){let o=t;for(;o&&o!==r;){let t=o;o=o.nextSibling,n(e,t)}return o}function i(e,t,n,r){const o=r.target.getAttribute?.("id")===t&&r.target||r.target.querySelector(`[id="${t}"]`)||r.pantry.querySelector(`[id="${t}"]`);return function(e,t){const n=e.getAttribute("id");for(;e=e.parentNode;){let r=t.idMap.get(e);r&&(r.delete(n),r.size||t.idMap.delete(e))}}(o,r),s(e,o,n),o}function s(e,t,n){if(e.moveBefore)try{e.moveBefore(t,n)}catch(r){e.insertBefore(t,n)}else e.insertBefore(t,n)}return function(s,a,l,c=null,u=null){a instanceof HTMLTemplateElement&&l instanceof HTMLTemplateElement&&(a=a.content,l=l.content),c||=a.firstChild;for(const n of l.childNodes){if(c&&c!=u){const e=t(s,n,c,u);if(e){e!==c&&o(s,c,e),r(e,n,s),c=e.nextSibling;continue}}if(n instanceof Element){const e=n.getAttribute("id");if(s.persistentIds.has(e)){const t=i(a,e,c,s);r(t,n,s),c=t.nextSibling;continue}}const l=e(a,n,c,s);l&&(c=l.nextSibling)}for(;c&&c!=u;){const e=c;c=c.nextSibling,n(s,e)}}}(),r=function(){function e(e,n,r,o){const i=n[r];if(i!==e[r]){const s=t(r,e,"update",o);s||(e[r]=n[r]),i?s||e.setAttribute(r,""):t(r,e,"remove",o)||e.removeAttribute(r)}}function t(e,t,n,r){return!("value"!==e||!r.ignoreActiveValue||t!==document.activeElement)||!1===r.callbacks.beforeAttributeUpdated(e,t,n)}function r(e,t){return!!t.ignoreActiveValue&&e===document.activeElement&&e!==document.body}return function(i,s,a){return a.ignoreActive&&i===document.activeElement?null:(!1===a.callbacks.beforeNodeMorphed(i,s)||(i instanceof HTMLHeadElement&&a.head.ignore||(i instanceof HTMLHeadElement&&"morph"!==a.head.style?o(i,s,a):(!function(n,o,i){let s=o.nodeType;if(1===s){const s=n,a=o,l=s.attributes,c=a.attributes;for(const e of c)t(e.name,s,"update",i)||s.getAttribute(e.name)!==e.value&&s.setAttribute(e.name,e.value);for(let e=l.length-1;0<=e;e--){const n=l[e];if(n&&!a.hasAttribute(n.name)){if(t(n.name,s,"remove",i))continue;s.removeAttribute(n.name)}}r(s,i)||function(n,r,o){if(n instanceof HTMLInputElement&&r instanceof HTMLInputElement&&"file"!==r.type){let i=r.value,s=n.value;e(n,r,"checked",o),e(n,r,"disabled",o),r.hasAttribute("value")?s!==i&&(t("value",n,"update",o)||(n.setAttribute("value",i),n.value=i)):t("value",n,"remove",o)||(n.value="",n.removeAttribute("value"))}else if(n instanceof HTMLOptionElement&&r instanceof HTMLOptionElement)e(n,r,"selected",o);else if(n instanceof HTMLTextAreaElement&&r instanceof HTMLTextAreaElement){let e=r.value,i=n.value;if(t("value",n,"update",o))return;e!==i&&(n.value=e),n.firstChild&&n.firstChild.nodeValue!==e&&(n.firstChild.nodeValue=e)}}(s,a,i)}8!==s&&3!==s||n.nodeValue!==o.nodeValue&&(n.nodeValue=o.nodeValue)}(i,s,a),r(i,a)||n(a,i,s))),a.callbacks.afterNodeMorphed(i,s)),i)}}();function o(e,t,n){let r=[],o=[],i=[],s=[],a=new Map;for(const c of t.children)a.set(c.outerHTML,c);for(const c of e.children){let e=a.has(c.outerHTML),t=n.head.shouldReAppend(c),r=n.head.shouldPreserve(c);e||r?t?o.push(c):(a.delete(c.outerHTML),i.push(c)):"append"===n.head.style?t&&(o.push(c),s.push(c)):!1!==n.head.shouldRemove(c)&&o.push(c)}s.push(...a.values());let l=[];for(const c of s){let t=document.createRange().createContextualFragment(c.outerHTML).firstChild;if(!1!==n.callbacks.beforeNodeAdded(t)){if("href"in t&&t.href||"src"in t&&t.src){let e,n=new Promise(function(t){e=t});t.addEventListener("load",function(){e()}),l.push(n)}e.appendChild(t),n.callbacks.afterNodeAdded(t),r.push(t)}}for(const c of o)!1!==n.callbacks.beforeNodeRemoved(c)&&(e.removeChild(c),n.callbacks.afterNodeRemoved(c));return n.head.afterHeadMorphed(e,{added:r,kept:i,removed:o}),l}const i=function(){function e(){const e=document.createElement("div");return e.hidden=!0,document.body.insertAdjacentElement("afterend",e),e}function n(e){let t=[],n=document.activeElement;if("BODY"!==n?.tagName&&e.contains(n))for(;n&&(t.push(n),n!==e);)n=n.parentElement;return t}function r(e){let t=Array.from(e.querySelectorAll("[id]"));return e.getAttribute?.("id")&&t.push(e),t}function o(e,t,n,r){for(const o of r){const r=o.getAttribute("id");if(t.has(r)){let t=o;for(;t;){let o=e.get(t);if(null==o&&(o=new Set,e.set(t,o)),o.add(r),t===n)break;t=t.parentElement}}}}return function(i,s,a){const{persistentIds:l,idMap:c}=function(e,t){const n=r(e),i=r(t),s=function(e,t){let n=new Set,r=new Map;for(const{id:i,tagName:s}of e)r.has(i)?n.add(i):r.set(i,s);let o=new Set;for(const{id:i,tagName:s}of t)o.has(i)?n.add(i):r.get(i)===s&&o.add(i);for(const i of n)o.delete(i);return o}(n,i);let a=new Map;o(a,s,e,n);const l=t.__idiomorphRoot||t;return o(a,s,l,i),{persistentIds:s,idMap:a}}(i,s),u=function(e){let n=Object.assign({},t);return Object.assign(n,e),n.callbacks=Object.assign({},t.callbacks,e.callbacks),n.head=Object.assign({},t.head,e.head),n}(a),d=u.morphStyle||"outerHTML";if(!["innerHTML","outerHTML"].includes(d))throw`Do not understand how to morph style ${d}`;return{target:i,newContent:s,config:u,morphStyle:d,ignoreActive:u.ignoreActive,ignoreActiveValue:u.ignoreActiveValue,restoreFocus:u.restoreFocus,idMap:c,persistentIds:l,pantry:e(),activeElementAndParents:n(i),callbacks:u.callbacks,head:u.head}}}(),{normalizeElement:s,normalizeParent:a}=function(){const e=new WeakSet;class t{constructor(e){this.originalNode=e,this.realParentNode=e.parentNode,this.previousSibling=e.previousSibling,this.nextSibling=e.nextSibling}get childNodes(){const e=[];let t=this.previousSibling?this.previousSibling.nextSibling:this.realParentNode.firstChild;for(;t&&t!=this.nextSibling;)e.push(t),t=t.nextSibling;return e}querySelectorAll(e){return this.childNodes.reduce((t,n)=>{if(n instanceof Element){n.matches(e)&&t.push(n);const r=n.querySelectorAll(e);for(let e=0;e]*>|>)([\s\S]*?)<\/svg>/gim,"");if(r.match(/<\/html>/)||r.match(/<\/head>/)||r.match(/<\/body>/)){let o=n.parseFromString(t,"text/html");if(r.match(/<\/html>/))return e.add(o),o;{let t=o.firstChild;return t&&e.add(t),t}}{let r=n.parseFromString("","text/html").body.querySelector("template").content;return e.add(r),r}}(r));if(e.has(r))return r;if(r instanceof Node){if(r.parentNode)return new t(r);{const e=document.createElement("div");return e.append(r),e}}{const e=document.createElement("div");for(const t of[...r])e.append(t);return e}}}}();return{morph:function(e,t,r={}){e=s(e);const l=a(t),c=i(e,l,r),u=function(e,t){if(!e.config.restoreFocus)return t();let n=document.activeElement;if(!(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement))return t();const{id:r,selectionStart:o,selectionEnd:i}=n,s=t();r&&r!==document.activeElement?.getAttribute("id")&&(n=e.target.querySelector(`[id="${r}"]`),n?.focus());n&&!n.selectionEnd&&i&&n.setSelectionRange(o,i);return s}(c,()=>function(e,t,n,r){if(e.head.block){const i=t.querySelector("head"),s=n.querySelector("head");if(i&&s){const t=o(i,s,e);return Promise.all(t).then(()=>{const t=Object.assign(e,{head:{block:!1,ignore:!0}});return r(t)})}}return r(e)}(c,e,l,t=>"innerHTML"===t.morphStyle?(n(t,e,l),Array.from(e.childNodes)):function(e,t,r){const o=a(t);return n(e,o,r,t,t.nextSibling),Array.from(o.childNodes)}(t,e,l)));return c.pantry.remove(),u},defaults:t}}();function Se(e,t,{callbacks:n,...r}={}){we.morph(e,t,{...r,callbacks:new Ce(n)})}function ke(e,t,n={}){Se(e,t.childNodes,{...n,morphStyle:"innerHTML"})}function xe(e,t){return e instanceof i&&e.shouldReloadWithMorph&&(!t||function(e,t){return t instanceof Element&&"TURBO-FRAME"===t.nodeName&&e.id===t.id&&(!t.getAttribute("src")||V(e.src,t.getAttribute("src")))}(e,t))&&!e.closest("[data-turbo-permanent]")}function Ee(e){return e.parentElement.closest("turbo-frame[src][refresh=morph]")}class Ce{#u;constructor({beforeNodeMorphed:e}={}){this.#u=e||(()=>!0)}beforeNodeAdded=e=>!(e.id&&e.hasAttribute("data-turbo-permanent")&&document.getElementById(e.id));beforeNodeMorphed=(e,t)=>{if(e instanceof Element){if(!e.hasAttribute("data-turbo-permanent")&&this.#u(e,t)){return!l("turbo:before-morph-element",{cancelable:!0,target:e,detail:{currentElement:e,newElement:t}}).defaultPrevented}return!1}};beforeAttributeUpdated=(e,t,n)=>!l("turbo:before-morph-attribute",{cancelable:!0,target:t,detail:{attributeName:e,mutationType:n}}).defaultPrevented;beforeNodeRemoved=e=>this.beforeNodeMorphed(e);afterNodeMorphed=(e,t)=>{e instanceof Element&&l("turbo:morph-element",{target:e,detail:{currentElement:e,newElement:t}})}}class _e extends ye{static renderElement(e,t){l("turbo:before-frame-morph",{target:e,detail:{currentElement:e,newElement:t}}),ke(e,t,{callbacks:{beforeNodeMorphed:(t,n)=>!xe(t,n)||Ee(t)!==e||(t.reload(),!1)}})}async preservingPermanentElements(e){return await e()}}class Ae{static animationDuration=300;static get defaultCSS(){return p` + .turbo-progress-bar { + position: fixed; + display: block; + top: 0; + left: 0; + height: 3px; + background: #0076ff; + z-index: 2147483647; + transition: + width ${Ae.animationDuration}ms ease-out, + opacity ${Ae.animationDuration/2}ms ${Ae.animationDuration/2}ms ease-in; + transform: translate3d(0, 0, 0); + } + `}hiding=!1;value=0;visible=!1;constructor(){this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,1.5*Ae.animationDuration)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,Ae.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}trickle=()=>{this.setValue(this.value+Math.random()/100)};refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=10+90*this.value+"%"})}createStylesheetElement(){const e=document.createElement("style");e.type="text/css",e.textContent=Ae.defaultCSS;const t=E();return t&&(e.nonce=t),e}createProgressElement(){const e=document.createElement("div");return e.className="turbo-progress-bar",e}}class Te extends le{detailsByOuterHTML=this.children.filter(e=>!function(e){const t=e.localName;return"noscript"==t}(e)).map(e=>function(e){e.hasAttribute("nonce")&&e.setAttribute("nonce","");return e}(e)).reduce((e,t)=>{const{outerHTML:n}=t,r=n in e?e[n]:{type:Le(t),tracked:Re(t),elements:[]};return{...e,[n]:{...r,elements:[...r.elements,t]}}},{});get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(e=>this.detailsByOuterHTML[e].tracked).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,t){return Object.keys(this.detailsByOuterHTML).filter(e=>!(e in t.detailsByOuterHTML)).map(e=>this.detailsByOuterHTML[e]).filter(({type:t})=>t==e).map(({elements:[e]})=>e)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((e,t)=>{const{type:n,tracked:r,elements:o}=this.detailsByOuterHTML[t];return null!=n||r?o.length>1?[...e,...o.slice(1)]:e:[...e,...o]},[])}getMetaValue(e){const t=this.findMetaElementByName(e);return t?t.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce((t,n)=>{const{elements:[r]}=this.detailsByOuterHTML[n];return function(e,t){const n=e.localName;return"meta"==n&&e.getAttribute("name")==t}(r,e)?r:t},0)}}function Le(e){return function(e){const t=e.localName;return"script"==t}(e)?"script":function(e){const t=e.localName;return"style"==t||"link"==t&&"stylesheet"==e.getAttribute("rel")}(e)?"stylesheet":void 0}function Re(e){return"reload"==e.getAttribute("data-turbo-track")}class Me extends le{static fromHTMLString(e=""){return this.fromDocument(f(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({documentElement:e,body:t,head:n}){return new this(e,t,new Te(n))}constructor(e,t,n){super(t),this.documentElement=e,this.headSnapshot=n}clone(){const e=this.element.cloneNode(!0),t=this.element.querySelectorAll("select"),n=e.querySelectorAll("select");for(const[r,o]of t.entries()){const e=n[r];for(const t of e.selectedOptions)t.selected=!1;for(const t of o.selectedOptions)e.options[t.index].selected=!0}for(const r of e.querySelectorAll('input[type="password"]'))r.value="";for(const r of e.querySelectorAll("noscript"))r.remove();return new Me(this.documentElement,e,this.headSnapshot)}get lang(){return this.documentElement.getAttribute("lang")}get dir(){return this.documentElement.getAttribute("dir")}get headElement(){return this.headSnapshot.element}get rootLocation(){return O(this.getSetting("root")??"/")}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return"no-preview"!=this.cacheControlValue}get isCacheable(){return"no-cache"!=this.cacheControlValue}get isVisitable(){return"reload"!=this.getSetting("visit-control")}get prefersViewTransitions(){return("true"===this.getSetting("view-transition")||"same-origin"===this.headSnapshot.getMetaValue("view-transition"))&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches}get refreshMethod(){return this.getSetting("refresh-method")}get refreshScroll(){return this.getSetting("refresh-scroll")}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}}class Ie{#d=!1;#h=Promise.resolve();renderChange(e,t){return e&&this.viewTransitionsAvailable&&!this.#d?(this.#d=!0,this.#h=this.#h.then(async()=>{await document.startViewTransition(t).finished})):this.#h=this.#h.then(t),this.#h}get viewTransitionsAvailable(){return document.startViewTransition}}const Oe={action:"advance",historyChanged:!1,visitCachedSnapshot:()=>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acceptsStreamResponse:!1,refresh:{}},De="visitStart",Pe="requestStart",Ne="requestEnd",Fe="visitEnd",We="initialized",Be="started",Ve="canceled",He="failed",qe="completed",je=0,ze=-1,$e=-2,Xe={advance:"forward",restore:"back",replace:"none"};class Ke{identifier=m();timingMetrics={};followedRedirect=!1;historyChanged=!1;scrolled=!1;shouldCacheSnapshot=!0;acceptsStreamResponse=!1;snapshotCached=!1;state=We;viewTransitioner=new Ie;constructor(e,t,n,r={}){this.delegate=e,this.location=t,this.restorationIdentifier=n||m();const{action:o,historyChanged:i,referrer:s,snapshot:a,snapshotHTML:l,response:c,visitCachedSnapshot:u,willRender:d,updateHistory:h,shouldCacheSnapshot:f,acceptsStreamResponse:p,direction:v,refresh:g}={...Oe,...r};this.action=o,this.historyChanged=i,this.referrer=s,this.snapshot=a,this.snapshotHTML=l,this.response=c,this.isPageRefresh=this.view.isPageRefresh(this),this.visitCachedSnapshot=u,this.willRender=d,this.updateHistory=h,this.scrolled=!d,this.shouldCacheSnapshot=f,this.acceptsStreamResponse=p,this.direction=v||Xe[o],this.refresh=g}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}start(){this.state==We&&(this.recordTimingMetric(De),this.state=Be,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==Be&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=Ve)}complete(){this.state==Be&&(this.recordTimingMetric(Fe),this.adapter.visitCompleted(this),this.state=qe,this.followRedirect(),this.followedRedirect||this.delegate.visitCompleted(this))}fail(){this.state==Be&&(this.state=He,this.adapter.visitFailed(this),this.delegate.visitCompleted(this))}changeHistory(){if(!this.historyChanged&&this.updateHistory){const e=w(this.location.href===this.referrer?.href?"replace":this.action);this.history.update(e,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new G(this,K.get,this.location),this.request.perform())}simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(Pe),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){const{statusCode:t}=e;Ue(t)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,t)}}finishRequest(){this.recordTimingMetric(Ne),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){const{statusCode:e,responseHTML:t}=this.response;this.render(async()=>{if(this.shouldCacheSnapshot&&this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,Ue(e)&&null!=t){const e=Me.fromHTMLString(t);await this.renderPageSnapshot(e,!1),this.adapter.visitRendered(this),this.complete()}else await this.view.renderError(Me.fromHTMLString(t),this),this.adapter.visitRendered(this),this.fail()})}}getCachedSnapshot(){const e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!D(this.location)||e.hasAnchor(D(this.location)))&&("restore"==this.action||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return Me.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return null!=this.getCachedSnapshot()}loadCachedSnapshot(){const e=this.getCachedSnapshot();if(e){const t=this.shouldIssueRequest();this.render(async()=>{this.cacheSnapshot(),this.isPageRefresh?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.renderPageSnapshot(e,t),this.adapter.visitRendered(this),t||this.complete())})}}followRedirect(){this.redirectedToLocation&&!this.followedRedirect&&this.response?.redirected&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response,shouldCacheSnapshot:!1,willRender:!1}),this.followedRedirect=!0)}prepareRequest(e){this.acceptsStreamResponse&&e.acceptResponseType(te.contentType)}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,t){}async requestSucceededWithResponse(e,t){const n=await t.responseHTML,{redirected:r,statusCode:o}=t;null==n?this.recordResponse({statusCode:$e,redirected:r}):(this.redirectedToLocation=t.redirected?t.location:void 0,this.recordResponse({statusCode:o,responseHTML:n,redirected:r}))}async requestFailedWithResponse(e,t){const n=await t.responseHTML,{redirected:r,statusCode:o}=t;null==n?this.recordResponse({statusCode:$e,redirected:r}):this.recordResponse({statusCode:o,responseHTML:n,redirected:r})}requestErrored(e,t){this.recordResponse({statusCode:je,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){this.scrolled||this.view.forceReloaded||this.view.shouldPreserveScrollPosition(this)||("restore"==this.action?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.scrolled=!0)}scrollToRestoredPosition(){const{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){const e=D(this.location);if(null!=e)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=(new Date).getTime()}getTimingMetrics(){return{...this.timingMetrics}}hasPreloadedResponse(){return"object"==typeof this.response}shouldIssueRequest(){return"restore"==this.action?!this.hasCachedSnapshot():this.willRender}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(this.snapshot).then(e=>e&&this.visitCachedSnapshot(e)),this.snapshotCached=!0)}async render(e){this.cancelRender(),await new Promise(e=>{this.frame="hidden"===document.visibilityState?setTimeout(()=>e(),0):requestAnimationFrame(()=>e())}),await e(),delete this.frame}async renderPageSnapshot(e,t){await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(e),async()=>{await this.view.renderPage(e,t,this.willRender,this),this.performScroll()})}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}}function Ue(e){return e>=200&&e<300}class Ge{progressBar=new Ae;constructor(e){this.session=e}visitProposedToLocation(e,t){F(e,this.navigator.rootLocation)?this.navigator.startVisit(e,t?.restorationIdentifier||m(),t):window.location.href=e.toString()}visitStarted(e){this.location=e.location,this.redirectedToLocation=null,e.loadCachedSnapshot(),e.issueRequest()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||"restore"!=e.action?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse(),e.response.redirected&&(this.redirectedToLocation=e.redirectedToLocation)}visitRequestFailedWithStatusCode(e,t){switch(t){case je:case ze:case $e:return this.reload({reason:"request_failed",context:{statusCode:t}});default:return e.loadResponse()}}visitRequestFinished(e){}visitCompleted(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}pageInvalidated(e){this.reload(e)}visitFailed(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitRendered(e){}linkPrefetchingIsEnabledForLocation(e){return!0}formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),null!=this.visitProgressBarTimeout&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){null==this.formProgressBarTimeout&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),null!=this.formProgressBarTimeout&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}showProgressBar=()=>{this.progressBar.show()};reload(e){l("turbo:reload",{detail:e}),window.location.href=(this.redirectedToLocation||this.location)?.toString()||window.location.href}get navigator(){return this.session.navigator}}class Qe{selector="[data-turbo-temporary]";started=!1;start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}removeTemporaryElements=e=>{for(const t of this.temporaryElements)t.remove()};get temporaryElements(){return[...document.querySelectorAll(this.selector)]}}class Ye{constructor(e,t){this.session=e,this.element=t,this.linkInterceptor=new pe(this,t),this.formSubmitObserver=new de(this,t)}start(){this.linkInterceptor.start(),this.formSubmitObserver.start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}shouldInterceptLinkClick(e,t,n){return this.#f(e)}linkClickIntercepted(e,t,n){const r=this.#p(e);r&&r.delegate.linkClickIntercepted(e,t,n)}willSubmitForm(e,t){return null==e.closest("turbo-frame")&&this.#m(e,t)&&this.#f(e,t)}formSubmitted(e,t){const n=this.#p(e,t);n&&n.delegate.formSubmitted(e,t)}#m(e,t){const n=P(e,t),r=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),o=O(r?.content??"/");return this.#f(e,t)&&F(n,o)}#f(e,t){if(e instanceof HTMLFormElement?this.session.submissionIsNavigatable(e,t):this.session.elementIsNavigatable(e)){const n=this.#p(e,t);return!!n&&n!=e.closest("turbo-frame")}return!1}#p(e,t){const n=t?.getAttribute("data-turbo-frame")||e.getAttribute("data-turbo-frame");if(n&&"_top"!=n){const e=this.element.querySelector(`#${n}:not([disabled])`);if(e instanceof i)return e}}}class Je{location;restorationIdentifier=m();restorationData={};started=!1;currentIndex=0;constructor(e){this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),this.currentIndex=history.state?.turbo?.restorationIndex||0,this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),this.started=!1)}push(e,t){this.update(history.pushState,e,t)}replace(e,t){this.update(history.replaceState,e,t)}update(e,t,n=m()){e===history.pushState&&++this.currentIndex;const r={turbo:{restorationIdentifier:n,restorationIndex:this.currentIndex}};e.call(history,r,"",t.href),this.location=t,this.restorationIdentifier=n}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){const{restorationIdentifier:t}=this,n=this.restorationData[t];this.restorationData[t]={...n,...e}}assumeControlOfScrollRestoration(){this.previousScrollRestoration||(this.previousScrollRestoration=history.scrollRestoration??"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}onPopState=e=>{const{turbo:t}=e.state||{};if(this.location=new URL(window.location.href),t){const{restorationIdentifier:e,restorationIndex:n}=t;this.restorationIdentifier=e;const r=n>this.currentIndex?"forward":"back";this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location,e,r),this.currentIndex=n}else this.currentIndex++,this.delegate.historyPoppedWithEmptyState(this.location)}}class Ze{started=!1;#v=null;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||("loading"===this.eventTarget.readyState?this.eventTarget.addEventListener("DOMContentLoaded",this.#g,{once:!0}):this.#g())}stop(){this.started&&(this.eventTarget.removeEventListener("mouseenter",this.#b,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("mouseleave",this.#y,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("turbo:before-fetch-request",this.#w,!0),this.started=!1)}#g=()=>{this.eventTarget.addEventListener("mouseenter",this.#b,{capture:!0,passive:!0}),this.eventTarget.addEventListener("mouseleave",this.#y,{capture:!0,passive:!0}),this.eventTarget.addEventListener("turbo:before-fetch-request",this.#w,!0),this.started=!0};#b=e=>{if("false"===x("turbo-prefetch"))return;const t=e.target;if(t.matches&&t.matches("a[href]:not([target^=_]):not([download])")&&this.#S(t)){const e=t,n=W(e);if(this.delegate.canPrefetchRequestToLocation(e,n)){this.#v=e;const r=new G(this,K.get,n,new URLSearchParams,t);r.fetchOptions.priority="low",ie.putLater(n,r,this.#k)}}};#y=e=>{e.target===this.#v&&this.#x()};#x=()=>{ie.clear(),this.#v=null};#w=e=>{if("FORM"!==e.target.tagName&&"GET"===e.detail.fetchOptions.method){const t=ie.get(e.detail.url);t&&(e.detail.fetchRequest=t),ie.clear()}};prepareRequest(e){const t=e.target;e.headers["X-Sec-Purpose"]="prefetch";const n=t.closest("turbo-frame"),r=t.getAttribute("data-turbo-frame")||n?.getAttribute("target")||n?.id;r&&"_top"!==r&&(e.headers["Turbo-Frame"]=r)}requestSucceededWithResponse(){}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,t){}requestFailedWithResponse(e,t){}get#k(){return Number(x("turbo-prefetch-cache-time"))||oe}#S(e){return!!e.getAttribute("href")&&(!et(e)&&(!tt(e)&&(!nt(e)&&(!rt(e)&&!it(e)))))}}const et=e=>e.origin!==document.location.origin||!["http:","https:"].includes(e.protocol)||e.hasAttribute("target"),tt=e=>e.pathname+e.search===document.location.pathname+document.location.search||e.href.startsWith("#"),nt=e=>{if("false"===e.getAttribute("data-turbo-prefetch"))return!0;if("false"===e.getAttribute("data-turbo"))return!0;const t=C(e,"[data-turbo-prefetch]");return!(!t||"false"!==t.getAttribute("data-turbo-prefetch"))},rt=e=>{const t=e.getAttribute("data-turbo-method");return!(!t||"get"===t.toLowerCase())||(!!ot(e)||(!!e.hasAttribute("data-turbo-confirm")||!!e.hasAttribute("data-turbo-stream")))},ot=e=>e.hasAttribute("data-remote")||e.hasAttribute("data-behavior")||e.hasAttribute("data-confirm")||e.hasAttribute("data-method"),it=e=>l("turbo:before-prefetch",{target:e,cancelable:!0}).defaultPrevented;class st{constructor(e){this.delegate=e}proposeVisit(e,t={}){this.delegate.allowsVisitingLocationWithAction(e,t.action)&&this.delegate.visitProposedToLocation(e,t)}startVisit(e,t,n={}){this.stop(),this.currentVisit=new Ke(this,O(e),t,{referrer:this.location,...n}),this.currentVisit.start()}submitForm(e,t){this.stop(),this.formSubmission=new ae(this,e,t,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get rootLocation(){return this.view.snapshot.rootLocation}get history(){return this.delegate.history}formSubmissionStarted(e){"function"==typeof this.adapter.formSubmissionStarted&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,t){if(e==this.formSubmission){const n=await t.responseHTML;if(n){const r=e.isSafe;r||this.view.clearSnapshotCache();const{statusCode:o,redirected:i}=t,s={action:this.#E(e,t),shouldCacheSnapshot:r,response:{statusCode:o,responseHTML:n,redirected:i}};this.proposeVisit(t.location,s)}}}async formSubmissionFailedWithResponse(e,t){const n=await t.responseHTML;if(n){const e=Me.fromHTMLString(n);t.serverError?await this.view.renderError(e,this.currentVisit):await this.view.renderPage(e,!1,!0,this.currentVisit),"preserve"!==e.refreshScroll&&this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished(e){"function"==typeof this.adapter.formSubmissionFinished&&this.adapter.formSubmissionFinished(e)}linkPrefetchingIsEnabledForLocation(e){return"function"!=typeof this.adapter.linkPrefetchingIsEnabledForLocation||this.adapter.linkPrefetchingIsEnabledForLocation(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e),delete this.currentVisit}locationWithActionIsSamePage(e,t){return!1}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}#E(e,t){const{submitter:n,formElement:r}=e;return S(n,r)||this.#C(t)}#C(e){return e.redirected&&e.location.href===this.location?.href?"replace":"advance"}}const at=0,lt=1,ct=2,ut=3;class dt{stage=at;started=!1;constructor(e){this.delegate=e}start(){this.started||(this.stage==at&&(this.stage=lt),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}interpretReadyState=()=>{const{readyState:e}=this;"interactive"==e?this.pageIsInteractive():"complete"==e&&this.pageIsComplete()};pageIsInteractive(){this.stage==lt&&(this.stage=ct,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==ct&&(this.stage=ut,this.delegate.pageLoaded())}pageWillUnload=()=>{this.delegate.pageWillUnload()};get readyState(){return document.readyState}}class ht{started=!1;constructor(e){this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})};updatePosition(e){this.delegate.scrollPositionChanged(e)}}class ft{render({fragment:e}){ge.preservingPermanentElements(this,function(e){const t=ue(document.documentElement),n={};for(const r of t){const{id:t}=r;for(const o of e.querySelectorAll("turbo-stream")){const e=ce(o.templateElement.content,t);e&&(n[t]=[r,e])}}return n}(e),()=>{!async function(e,t){const n=`turbo-stream-autofocus-${m()}`,r=e.querySelectorAll("turbo-stream"),o=function(e){for(const t of e){const e=A(t.templateElement.content);if(e)return e}return null}(r);let i=null;o&&(i=o.id?o.id:n,o.id=i);t(),await u();if((null==document.activeElement||document.activeElement==document.body)&&i){const e=document.getElementById(i);_(e)&&e.focus(),e&&e.id==n&&e.removeAttribute("id")}}(e,()=>{!async function(e){const[t,n]=await async function(e,t){const n=t();return e(),await d(),[n,t()]}(e,()=>document.activeElement),r=t&&t.id;if(r){const e=document.getElementById(r);_(e)&&e!=n&&e.focus()}}(()=>{document.documentElement.appendChild(e)})})})}enteringBardo(e,t){t.replaceWith(e.cloneNode(!0))}leavingBardo(){}}class pt{sources=new Set;#_=!1;constructor(e){this.delegate=e}start(){this.#_||(this.#_=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.#_&&(this.#_=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}inspectFetchResponse=e=>{const t=function(e){const t=e.detail?.fetchResponse;if(t instanceof q)return t}(e);t&&function(e){const t=e.contentType??"";return t.startsWith(te.contentType)}(t)&&(e.preventDefault(),this.receiveMessageResponse(t))};receiveMessageEvent=e=>{this.#_&&"string"==typeof e.data&&this.receiveMessageHTML(e.data)};async receiveMessageResponse(e){const t=await e.responseHTML;t&&this.receiveMessageHTML(t)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(te.wrap(e))}}class mt extends be{static renderElement(e,t){const{documentElement:n,body:r}=document;n.replaceChild(t,r)}async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){const{documentElement:e,head:t}=document;e.replaceChild(this.newHead,t),this.renderElement(this.currentElement,this.newElement)}activateScriptElements(){for(const e of this.scriptElements){const t=e.parentNode;if(t){const n=a(e);t.replaceChild(n,e)}}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return document.documentElement.querySelectorAll("script")}}class vt extends be{static renderElement(e,t){document.body&&t instanceof HTMLBodyElement?document.body.replaceWith(t):document.documentElement.appendChild(t)}get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}get reloadReason(){return this.newSnapshot.isVisitable?this.trackedElementsAreIdentical?void 0:{reason:"tracked_element_mismatch"}:{reason:"turbo_visit_control_is_reload"}}async prepareToRender(){this.#A(),await this.mergeHead()}async render(){this.willRender&&await this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}#A(){const{documentElement:e}=this.currentSnapshot,{dir:t,lang:n}=this.newSnapshot;n?e.setAttribute("lang",n):e.removeAttribute("lang"),t?e.setAttribute("dir",t):e.removeAttribute("dir")}async mergeHead(){const e=this.mergeProvisionalElements(),t=this.copyNewHeadStylesheetElements();this.copyNewHeadScriptElements(),await e,await t,this.willRender&&this.removeUnusedDynamicStylesheetElements()}async replaceBody(){await this.preservingPermanentElements(async()=>{this.activateNewBody(),await this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}async copyNewHeadStylesheetElements(){const e=[];for(const t of this.newHeadStylesheetElements)e.push(y(t)),document.head.appendChild(t);await Promise.all(e)}copyNewHeadScriptElements(){for(const e of this.newHeadScriptElements)document.head.appendChild(a(e))}removeUnusedDynamicStylesheetElements(){for(const e of this.unusedDynamicStylesheetElements)document.head.removeChild(e)}async mergeProvisionalElements(){const e=[...this.newHeadProvisionalElements];for(const t of this.currentHeadProvisionalElements)this.isCurrentElementInElementList(t,e)||document.head.removeChild(t);for(const t of e)document.head.appendChild(t)}isCurrentElementInElementList(e,t){for(const[n,r]of t.entries()){if("TITLE"==e.tagName){if("TITLE"!=r.tagName)continue;if(e.innerHTML==r.innerHTML)return t.splice(n,1),!0}if(r.isEqualNode(e))return t.splice(n,1),!0}return!1}removeCurrentHeadProvisionalElements(){for(const e of this.currentHeadProvisionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(const e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.removeNoscriptElements(),this.activateNewBodyScriptElements()}removeNoscriptElements(){for(const e of this.newElement.querySelectorAll("noscript"))e.remove()}activateNewBodyScriptElements(){for(const e of this.newBodyScriptElements){const t=a(e);e.replaceWith(t)}}async assignNewBody(){await this.renderElement(this.currentElement,this.newElement)}get unusedDynamicStylesheetElements(){return this.oldHeadStylesheetElements.filter(e=>"dynamic"===e.getAttribute("data-turbo-track"))}get oldHeadStylesheetElements(){return this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}}class gt extends vt{static renderElement(e,t){Se(e,t,{callbacks:{beforeNodeMorphed:(e,t)=>!(xe(e,t)&&!Ee(e))||(e.reload(),!1)}}),l("turbo:morph",{detail:{currentElement:e,newElement:t}})}async preservingPermanentElements(e){return await e()}get renderMethod(){return"morph"}get shouldAutofocus(){return!1}}class bt extends re{constructor(e){super(e,B)}get snapshots(){return this.entries}}class yt extends he{snapshotCache=new bt(10);lastRenderedLocation=new URL(location.href);forceReloaded=!1;shouldTransitionTo(e){return this.snapshot.prefersViewTransitions&&e.prefersViewTransitions}renderPage(e,t=!1,n=!0,r){const o=new(this.isPageRefresh(r)&&"morph"===(r?.refresh?.method||this.snapshot.refreshMethod)?gt:vt)(this.snapshot,e,t,n);return o.shouldRender?r?.changeHistory():this.forceReloaded=!0,this.render(o)}renderError(e,t){t?.changeHistory();const n=new mt(this.snapshot,e,!1);return this.render(n)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(e=this.snapshot){if(e.isCacheable){this.delegate.viewWillCacheSnapshot();const{lastRenderedLocation:t}=this;await h();const n=e.clone();return this.snapshotCache.put(t,n),n}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}isPageRefresh(e){return!e||this.lastRenderedLocation.pathname===e.location.pathname&&"replace"===e.action}shouldPreserveScrollPosition(e){return this.isPageRefresh(e)&&"preserve"===(e?.refresh?.scroll||this.snapshot.refreshScroll)}get snapshot(){return Me.fromElement(this.element)}}class wt{selector="a[data-turbo-preload]";constructor(e,t){this.delegate=e,this.snapshotCache=t}start(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",this.#T):this.preloadOnLoadLinksForView(document.body)}stop(){document.removeEventListener("DOMContentLoaded",this.#T)}preloadOnLoadLinksForView(e){for(const t of e.querySelectorAll(this.selector))this.delegate.shouldPreloadLink(t)&&this.preloadURL(t)}async preloadURL(e){const t=new URL(e.href);if(this.snapshotCache.has(t))return;const n=new G(this,K.get,t,new URLSearchParams,e);await n.perform()}prepareRequest(e){e.headers["X-Sec-Purpose"]="prefetch"}async requestSucceededWithResponse(e,t){try{const n=await t.responseHTML,r=Me.fromHTMLString(n);this.snapshotCache.put(e.url,r)}catch(n){}}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,t){}requestFailedWithResponse(e,t){}#T=()=>{this.preloadOnLoadLinksForView(document.body)}}class St{constructor(e){this.session=e}clear(){this.session.clearCache()}resetCacheControl(){this.#L("")}exemptPageFromCache(){this.#L("no-cache")}exemptPageFromPreview(){this.#L("no-preview")}#L(e){!function(e,t){let n=k(e);n||(n=document.createElement("meta"),n.setAttribute("name",e),document.head.appendChild(n)),n.setAttribute("content",t)}("turbo-cache-control",e)}}function kt(e){Object.defineProperties(e,xt)}const xt={absoluteURL:{get(){return this.toString()}}},Et=new class{navigator=new st(this);history=new Je(this);view=new yt(this,document.documentElement);adapter=new Ge(this);pageObserver=new dt(this);cacheObserver=new Qe;linkPrefetchObserver=new Ze(this,document);linkClickObserver=new me(this,window);formSubmitObserver=new de(this,document);scrollObserver=new ht(this);streamObserver=new pt(this);formLinkClickObserver=new ve(this,document.documentElement);frameRedirector=new Ye(this,document.documentElement);streamMessageRenderer=new ft;cache=new St(this);enabled=!0;started=!1;#R=150;constructor(e){this.recentRequests=e,this.preloader=new wt(this,this.view.snapshotCache),this.debouncedRefresh=this.refresh,this.pageRefreshDebouncePeriod=this.pageRefreshDebouncePeriod}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.linkPrefetchObserver.start(),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.preloader.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.linkPrefetchObserver.stop(),this.formLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.preloader.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,t={}){const n=t.frame?document.getElementById(t.frame):null;if(n instanceof i){const r=t.action||S(n);n.delegate.proposeVisitIfNavigatedWithAction(n,r),n.src=e.toString()}else this.navigator.proposeVisit(O(e),t)}refresh(e,t={}){t="string"==typeof t?{requestId:t}:t;const{method:n,requestId:r,scroll:o}=t,i=r&&this.recentRequests.has(r),s=e===document.baseURI;i||this.navigator.currentVisit||!s||this.visit(e,{action:"replace",shouldCacheSnapshot:!1,refresh:{method:n,scroll:o}})}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){this.streamMessageRenderer.render(te.wrap(e))}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(e){console.warn("Please replace `session.setProgressBarDelay(delay)` with `session.progressBarDelay = delay`. The function is deprecated and will be removed in a future version of Turbo.`"),this.progressBarDelay=e}set progressBarDelay(e){I.drive.progressBarDelay=e}get progressBarDelay(){return I.drive.progressBarDelay}set drive(e){I.drive.enabled=e}get drive(){return I.drive.enabled}set formMode(e){I.forms.mode=e}get formMode(){return I.forms.mode}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}get pageRefreshDebouncePeriod(){return this.#R}set pageRefreshDebouncePeriod(e){this.refresh=function(e,t){let n=null;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}(this.debouncedRefresh.bind(this),e),this.#R=e}shouldPreloadLink(e){const t=e.hasAttribute("data-turbo-method"),n=e.hasAttribute("data-turbo-stream"),r=e.getAttribute("data-turbo-frame"),o="_top"==r?null:document.getElementById(r)||C(e,"turbo-frame:not([disabled])");if(t||n||o instanceof i)return!1;{const t=new URL(e.href);return this.elementIsNavigatable(e)&&F(t,this.snapshot.rootLocation)}}historyPoppedToLocationWithRestorationIdentifierAndDirection(e,t,n){this.enabled?this.navigator.startVisit(e,t,{action:"restore",historyChanged:!0,direction:n}):this.adapter.pageInvalidated({reason:"turbo_disabled"})}historyPoppedWithEmptyState(e){this.history.replace(e),this.view.lastRenderedLocation=e,this.view.cacheSnapshot()}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willSubmitFormLinkToLocation(e,t){return this.elementIsNavigatable(e)&&F(t,this.snapshot.rootLocation)}submittedFormLinkToLocation(){}canPrefetchRequestToLocation(e,t){return this.elementIsNavigatable(e)&&F(t,this.snapshot.rootLocation)&&this.navigator.linkPrefetchingIsEnabledForLocation(t)}willFollowLinkToLocation(e,t,n){return this.elementIsNavigatable(e)&&F(t,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(e,t,n)}followedLinkToLocation(e,t){const n=this.getActionForLink(e),r=e.hasAttribute("data-turbo-stream");this.visit(t.href,{action:n,acceptsStreamResponse:r})}allowsVisitingLocationWithAction(e,t){return this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,t){kt(e),this.adapter.visitProposedToLocation(e,t)}visitStarted(e){e.acceptsStreamResponse||(g(document.documentElement),this.view.markVisitDirection(e.direction)),kt(e.location),this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){this.view.unmarkVisitDirection(),b(document.documentElement),this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}willSubmitForm(e,t){const n=P(e,t);return this.submissionIsNavigatable(e,t)&&F(O(n),this.snapshot.rootLocation)}formSubmitted(e,t){this.navigator.submitForm(e,t)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},t){const n=this.notifyApplicationBeforeRender(e,t),{defaultPrevented:r,detail:{render:o}}=n;return this.view.renderer&&o&&(this.view.renderer.renderElement=o),!r}viewRenderedSnapshot(e,t,n){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender(n)}preloadOnLoadLinksForView(e){this.preloader.preloadOnLoadLinksForView(e)}viewInvalidated(e){this.adapter.pageInvalidated(e)}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,t){this.notifyApplicationAfterFrameRender(e,t)}applicationAllowsFollowingLinkToLocation(e,t,n){return!this.notifyApplicationAfterClickingLinkToLocation(e,t,n).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,t,n){return l("turbo:click",{target:e,detail:{url:t.href,originalEvent:n},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return l("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,t){return l("turbo:visit",{detail:{url:e.href,action:t}})}notifyApplicationBeforeCachingSnapshot(){return l("turbo:before-cache")}notifyApplicationBeforeRender(e,t){return l("turbo:before-render",{detail:{newBody:e,...t},cancelable:!0})}notifyApplicationAfterRender(e){return l("turbo:render",{detail:{renderMethod:e}})}notifyApplicationAfterPageLoad(e={}){return l("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterFrameLoad(e){return l("turbo:frame-load",{target:e})}notifyApplicationAfterFrameRender(e,t){return l("turbo:frame-render",{detail:{fetchResponse:e},target:t,cancelable:!0})}submissionIsNavigatable(e,t){if("off"==I.forms.mode)return!1;{const n=!t||this.elementIsNavigatable(t);return"optin"==I.forms.mode?n&&null!=e.closest('[data-turbo="true"]'):n&&this.elementIsNavigatable(e)}}elementIsNavigatable(e){const t=C(e,"[data-turbo]"),n=C(e,"turbo-frame");return I.drive.enabled||n?!t||"false"!=t.getAttribute("data-turbo"):!!t&&"true"==t.getAttribute("data-turbo")}getActionForLink(e){return S(e)||"advance"}get snapshot(){return this.view.snapshot}}(z),{cache:Ct,navigator:_t}=Et;function At(){Et.start()}function Tt(e,t){Et.visit(e,t)}function Lt(e){Et.connectStreamSource(e)}function Rt(e){Et.disconnectStreamSource(e)}function Mt(e,t){gt.renderElement(e,t)}var It=Object.freeze({__proto__:null,PageRenderer:vt,PageSnapshot:Me,FrameRenderer:ye,fetch:$,config:I,session:Et,cache:Ct,navigator:_t,start:At,registerAdapter:function(e){Et.registerAdapter(e)},visit:Tt,connectStreamSource:Lt,disconnectStreamSource:Rt,renderStreamMessage:function(e){Et.renderStreamMessage(e)},setProgressBarDelay:function(e){console.warn("Please replace `Turbo.setProgressBarDelay(delay)` with `Turbo.config.drive.progressBarDelay = delay`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),I.drive.progressBarDelay=e},setConfirmMethod:function(e){console.warn("Please replace `Turbo.setConfirmMethod(confirmMethod)` with `Turbo.config.forms.confirm = confirmMethod`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),I.forms.confirm=e},setFormMode:function(e){console.warn("Please replace `Turbo.setFormMode(mode)` with `Turbo.config.forms.mode = mode`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),I.forms.mode=e},morphBodyElements:Mt,morphTurboFrameElements:function(e,t){_e.renderElement(e,t)},morphChildren:ke,morphElements:Se});class Ot extends Error{}function Dt(e,t){if(e){const n=e.getAttribute("src");if(null!=n&&null!=t&&V(n,t))throw new Error(`Matching element has a source URL which references itself`);if(e.ownerDocument!==document&&(e=document.importNode(e,!0)),e instanceof i)return e.connectedCallback(),e.disconnectedCallback(),e}}const Pt={after(){this.removeDuplicateTargetSiblings(),this.targetElements.forEach(e=>e.parentElement?.insertBefore(this.templateContent,e.nextSibling))},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.append(this.templateContent))},before(){this.removeDuplicateTargetSiblings(),this.targetElements.forEach(e=>e.parentElement?.insertBefore(this.templateContent,e))},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.prepend(this.templateContent))},remove(){this.targetElements.forEach(e=>e.remove())},replace(){const e=this.getAttribute("method");this.targetElements.forEach(t=>{"morph"===e?Se(t,this.templateContent):t.replaceWith(this.templateContent)})},update(){const e=this.getAttribute("method");this.targetElements.forEach(t=>{"morph"===e?ke(t,this.templateContent):(t.innerHTML="",t.append(this.templateContent))})},refresh(){const e=this.getAttribute("method"),t=this.requestId,n=this.getAttribute("scroll");Et.refresh(this.baseURI,{method:e,requestId:t,scroll:n})}};class Nt extends HTMLElement{static async renderElement(e){await e.performAction()}async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){return this.renderPromise??=(async()=>{const e=this.beforeRenderEvent;this.dispatchEvent(e)&&(await u(),await e.detail.render(this))})()}disconnect(){try{this.remove()}catch{}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(e=>e.remove())}get duplicateChildren(){const e=this.targetElements.flatMap(e=>[...e.children]).filter(e=>!!e.getAttribute("id")),t=[...this.templateContent?.children||[]].filter(e=>!!e.getAttribute("id")).map(e=>e.getAttribute("id"));return e.filter(e=>t.includes(e.getAttribute("id")))}removeDuplicateTargetSiblings(){this.duplicateSiblings.forEach(e=>e.remove())}get duplicateSiblings(){const e=this.targetElements.flatMap(e=>[...e.parentElement.children]).filter(e=>!!e.id),t=[...this.templateContent?.children||[]].filter(e=>!!e.id).map(e=>e.id);return e.filter(e=>t.includes(e.id))}get performAction(){if(this.action){const e=Pt[this.action];if(e)return e;this.#M("unknown action")}this.#M("action attribute is missing")}get targetElements(){return this.target?this.targetElementsById:this.targets?this.targetElementsByQuery:void this.#M("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(null===this.firstElementChild){const e=this.ownerDocument.createElement("template");return this.appendChild(e),e}if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.#M("first child element must be a