diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml new file mode 100644 index 000000000..f546d1b5a --- /dev/null +++ b/.github/workflows/hugo.yaml @@ -0,0 +1,47 @@ +name: 'Release(hugo): GitHub Pages' + +on: + release: + types: [published] + +env: + HUGO_DIR: 'docs/hugo' + +jobs: + gh-pages: + runs-on: ubuntu-latest + timeout-minutes: 10 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + defaults: + run: + working-directory: ${{ env.HUGO_DIR }} + + steps: + - uses: actions/checkout@v4 + with: + lfs: true + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version: '^1.23' + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '0.143.1' + extended: true + + - name: Get hugo dependencies (theme) + run: hugo mod get + + - name: Build + run: hugo --minify + + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: gh-pages + publish_dir: docs/hugo/public \ No newline at end of file diff --git a/docs/hugo/.hugo_build.lock b/docs/hugo/.hugo_build.lock new file mode 100644 index 000000000..e69de29bb diff --git a/docs/hugo/content/__to_do__/_index.md b/docs/hugo/content/__to_do__/_index.md new file mode 100644 index 000000000..9f8d2bc65 --- /dev/null +++ b/docs/hugo/content/__to_do__/_index.md @@ -0,0 +1,7 @@ +--- +title: "How to use" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 320 +--- + diff --git a/docs/hugo/content/__to_do__/clone.md b/docs/hugo/content/__to_do__/clone.md new file mode 100644 index 000000000..451404ee6 --- /dev/null +++ b/docs/hugo/content/__to_do__/clone.md @@ -0,0 +1,116 @@ +--- +title: "Single Cluster" +date: 2023-12-28T14:26:51+01:00 +draft: true +--- + +Setting up a basic Cluster is pretty easy, we just need the minimum Definiton of a cluster-manifest which can also be find in the operator-tutorials repo on github. +We need the following Definitions for the basic cluster. +## minimal Single Cluster +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 +spec: + dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.1-6-dev" + numberOfInstances: 1 + postgresql: + version: "16" + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + volume: + size: 5Gi +``` +Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-16-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit. + +After some seconds we should see, that the operator creates our cluster based on the declared definitions. +``` +kubectl get pods +----------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cluster-1-0 | 1/1 | Running | 0 | 50s + +``` + +We can now starting to modify our cluster with some more Definitons. +### Use a specific Storageclass +``` +spec: + ... + volume: + size: 5Gi + storageClass: default-provisioner + ... +``` +Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod. + +### Expanding Volume +The Operator allows to you expand your volume if the storage-System is able to do this. +``` +spec: + ... + volume: + size: 10Gi + storageClass: default-provisioner + ... +``` +This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc. +``` +kubectl get pvc pgdata-cluster-1-0 -o yaml +------------------------------------------------------- +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + storageClassName: crc-csi-hostpath-provisioner + volumeMode: Filesystem + volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37 +status: + accessModes: + - ReadWriteOnce + capacity: + storage: 5Gi + phase: Bound + +``` + +### Creating additonal Volumes +The Operator allows you to modify your cluster with additonal Volumes. +``` +spec: + ... + additionalVolumes: + - name: empty + mountPath: /opt/empty + targetContainers: + - all + volumeSource: + emptyDir: {} +``` +This example will create an emptyDir and mount it to all Containers inside the Database-Pod. + + +### Specific Settings for aws gp3 Storage +For the gp3 Storage aws you can define more informations +``` + volume: + size: 1Gi + storageClass: gp3 + iops: 1000 # for EBS gp3 + throughput: 250 # in MB/s for EBS gp3 + +``` +The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput [AWS docs](https://aws.amazon.com/ebs/general-purpose/). + +To ensure that the settings are updates properly please define the Operator-Configuration 'storage_resize_mode' from default to 'mixed' diff --git a/docs/hugo/content/__to_do__/examples.md b/docs/hugo/content/__to_do__/examples.md new file mode 100644 index 000000000..451404ee6 --- /dev/null +++ b/docs/hugo/content/__to_do__/examples.md @@ -0,0 +1,116 @@ +--- +title: "Single Cluster" +date: 2023-12-28T14:26:51+01:00 +draft: true +--- + +Setting up a basic Cluster is pretty easy, we just need the minimum Definiton of a cluster-manifest which can also be find in the operator-tutorials repo on github. +We need the following Definitions for the basic cluster. +## minimal Single Cluster +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 +spec: + dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.1-6-dev" + numberOfInstances: 1 + postgresql: + version: "16" + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + volume: + size: 5Gi +``` +Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-16-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit. + +After some seconds we should see, that the operator creates our cluster based on the declared definitions. +``` +kubectl get pods +----------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cluster-1-0 | 1/1 | Running | 0 | 50s + +``` + +We can now starting to modify our cluster with some more Definitons. +### Use a specific Storageclass +``` +spec: + ... + volume: + size: 5Gi + storageClass: default-provisioner + ... +``` +Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod. + +### Expanding Volume +The Operator allows to you expand your volume if the storage-System is able to do this. +``` +spec: + ... + volume: + size: 10Gi + storageClass: default-provisioner + ... +``` +This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc. +``` +kubectl get pvc pgdata-cluster-1-0 -o yaml +------------------------------------------------------- +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + storageClassName: crc-csi-hostpath-provisioner + volumeMode: Filesystem + volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37 +status: + accessModes: + - ReadWriteOnce + capacity: + storage: 5Gi + phase: Bound + +``` + +### Creating additonal Volumes +The Operator allows you to modify your cluster with additonal Volumes. +``` +spec: + ... + additionalVolumes: + - name: empty + mountPath: /opt/empty + targetContainers: + - all + volumeSource: + emptyDir: {} +``` +This example will create an emptyDir and mount it to all Containers inside the Database-Pod. + + +### Specific Settings for aws gp3 Storage +For the gp3 Storage aws you can define more informations +``` + volume: + size: 1Gi + storageClass: gp3 + iops: 1000 # for EBS gp3 + throughput: 250 # in MB/s for EBS gp3 + +``` +The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput [AWS docs](https://aws.amazon.com/ebs/general-purpose/). + +To ensure that the settings are updates properly please define the Operator-Configuration 'storage_resize_mode' from default to 'mixed' diff --git a/docs/hugo/content/__to_do__/sidecars.md b/docs/hugo/content/__to_do__/sidecars.md new file mode 100644 index 000000000..451404ee6 --- /dev/null +++ b/docs/hugo/content/__to_do__/sidecars.md @@ -0,0 +1,116 @@ +--- +title: "Single Cluster" +date: 2023-12-28T14:26:51+01:00 +draft: true +--- + +Setting up a basic Cluster is pretty easy, we just need the minimum Definiton of a cluster-manifest which can also be find in the operator-tutorials repo on github. +We need the following Definitions for the basic cluster. +## minimal Single Cluster +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 +spec: + dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.1-6-dev" + numberOfInstances: 1 + postgresql: + version: "16" + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + volume: + size: 5Gi +``` +Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-16-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit. + +After some seconds we should see, that the operator creates our cluster based on the declared definitions. +``` +kubectl get pods +----------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cluster-1-0 | 1/1 | Running | 0 | 50s + +``` + +We can now starting to modify our cluster with some more Definitons. +### Use a specific Storageclass +``` +spec: + ... + volume: + size: 5Gi + storageClass: default-provisioner + ... +``` +Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod. + +### Expanding Volume +The Operator allows to you expand your volume if the storage-System is able to do this. +``` +spec: + ... + volume: + size: 10Gi + storageClass: default-provisioner + ... +``` +This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc. +``` +kubectl get pvc pgdata-cluster-1-0 -o yaml +------------------------------------------------------- +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + storageClassName: crc-csi-hostpath-provisioner + volumeMode: Filesystem + volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37 +status: + accessModes: + - ReadWriteOnce + capacity: + storage: 5Gi + phase: Bound + +``` + +### Creating additonal Volumes +The Operator allows you to modify your cluster with additonal Volumes. +``` +spec: + ... + additionalVolumes: + - name: empty + mountPath: /opt/empty + targetContainers: + - all + volumeSource: + emptyDir: {} +``` +This example will create an emptyDir and mount it to all Containers inside the Database-Pod. + + +### Specific Settings for aws gp3 Storage +For the gp3 Storage aws you can define more informations +``` + volume: + size: 1Gi + storageClass: gp3 + iops: 1000 # for EBS gp3 + throughput: 250 # in MB/s for EBS gp3 + +``` +The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput [AWS docs](https://aws.amazon.com/ebs/general-purpose/). + +To ensure that the settings are updates properly please define the Operator-Configuration 'storage_resize_mode' from default to 'mixed' diff --git a/docs/hugo/content/__to_do__/slots.md b/docs/hugo/content/__to_do__/slots.md new file mode 100644 index 000000000..451404ee6 --- /dev/null +++ b/docs/hugo/content/__to_do__/slots.md @@ -0,0 +1,116 @@ +--- +title: "Single Cluster" +date: 2023-12-28T14:26:51+01:00 +draft: true +--- + +Setting up a basic Cluster is pretty easy, we just need the minimum Definiton of a cluster-manifest which can also be find in the operator-tutorials repo on github. +We need the following Definitions for the basic cluster. +## minimal Single Cluster +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 +spec: + dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.1-6-dev" + numberOfInstances: 1 + postgresql: + version: "16" + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + volume: + size: 5Gi +``` +Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-16-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit. + +After some seconds we should see, that the operator creates our cluster based on the declared definitions. +``` +kubectl get pods +----------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cluster-1-0 | 1/1 | Running | 0 | 50s + +``` + +We can now starting to modify our cluster with some more Definitons. +### Use a specific Storageclass +``` +spec: + ... + volume: + size: 5Gi + storageClass: default-provisioner + ... +``` +Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod. + +### Expanding Volume +The Operator allows to you expand your volume if the storage-System is able to do this. +``` +spec: + ... + volume: + size: 10Gi + storageClass: default-provisioner + ... +``` +This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc. +``` +kubectl get pvc pgdata-cluster-1-0 -o yaml +------------------------------------------------------- +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + storageClassName: crc-csi-hostpath-provisioner + volumeMode: Filesystem + volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37 +status: + accessModes: + - ReadWriteOnce + capacity: + storage: 5Gi + phase: Bound + +``` + +### Creating additonal Volumes +The Operator allows you to modify your cluster with additonal Volumes. +``` +spec: + ... + additionalVolumes: + - name: empty + mountPath: /opt/empty + targetContainers: + - all + volumeSource: + emptyDir: {} +``` +This example will create an emptyDir and mount it to all Containers inside the Database-Pod. + + +### Specific Settings for aws gp3 Storage +For the gp3 Storage aws you can define more informations +``` + volume: + size: 1Gi + storageClass: gp3 + iops: 1000 # for EBS gp3 + throughput: 250 # in MB/s for EBS gp3 + +``` +The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput [AWS docs](https://aws.amazon.com/ebs/general-purpose/). + +To ensure that the settings are updates properly please define the Operator-Configuration 'storage_resize_mode' from default to 'mixed' diff --git a/docs/hugo/content/__to_do__/standby.md b/docs/hugo/content/__to_do__/standby.md new file mode 100644 index 000000000..451404ee6 --- /dev/null +++ b/docs/hugo/content/__to_do__/standby.md @@ -0,0 +1,116 @@ +--- +title: "Single Cluster" +date: 2023-12-28T14:26:51+01:00 +draft: true +--- + +Setting up a basic Cluster is pretty easy, we just need the minimum Definiton of a cluster-manifest which can also be find in the operator-tutorials repo on github. +We need the following Definitions for the basic cluster. +## minimal Single Cluster +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 +spec: + dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.1-6-dev" + numberOfInstances: 1 + postgresql: + version: "16" + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + volume: + size: 5Gi +``` +Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-16-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit. + +After some seconds we should see, that the operator creates our cluster based on the declared definitions. +``` +kubectl get pods +----------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cluster-1-0 | 1/1 | Running | 0 | 50s + +``` + +We can now starting to modify our cluster with some more Definitons. +### Use a specific Storageclass +``` +spec: + ... + volume: + size: 5Gi + storageClass: default-provisioner + ... +``` +Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod. + +### Expanding Volume +The Operator allows to you expand your volume if the storage-System is able to do this. +``` +spec: + ... + volume: + size: 10Gi + storageClass: default-provisioner + ... +``` +This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc. +``` +kubectl get pvc pgdata-cluster-1-0 -o yaml +------------------------------------------------------- +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + storageClassName: crc-csi-hostpath-provisioner + volumeMode: Filesystem + volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37 +status: + accessModes: + - ReadWriteOnce + capacity: + storage: 5Gi + phase: Bound + +``` + +### Creating additonal Volumes +The Operator allows you to modify your cluster with additonal Volumes. +``` +spec: + ... + additionalVolumes: + - name: empty + mountPath: /opt/empty + targetContainers: + - all + volumeSource: + emptyDir: {} +``` +This example will create an emptyDir and mount it to all Containers inside the Database-Pod. + + +### Specific Settings for aws gp3 Storage +For the gp3 Storage aws you can define more informations +``` + volume: + size: 1Gi + storageClass: gp3 + iops: 1000 # for EBS gp3 + throughput: 250 # in MB/s for EBS gp3 + +``` +The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput [AWS docs](https://aws.amazon.com/ebs/general-purpose/). + +To ensure that the settings are updates properly please define the Operator-Configuration 'storage_resize_mode' from default to 'mixed' diff --git a/docs/hugo/content/en/_index.md b/docs/hugo/content/en/_index.md new file mode 100644 index 000000000..9e88cf57a --- /dev/null +++ b/docs/hugo/content/en/_index.md @@ -0,0 +1,32 @@ +--- +title: "CPO (CYBERTEC-PG-Operator)" +date: 2024-03-11T14:26:51+01:00 +draft: false +weight: 1 +--- +Current Release: 0.8.3 (04.04.2025) [Release Notes](release_notes) + +drawing + +CPO (CYBERTEC PG Operator) allows you to create and run PostgreSQL clusters on Kubernetes. + +The operator reduces your efforts and simplifies the administration of your PostgreSQL clusters so that you can concentrate on other things. + +The following features characterise our operator: +- Declarative mode of operation +- Takes over all the necessary steps for setting up and managing the PG cluster. +- Integrated backup solution, automatic backups and very easy restore (snapshot & PITR) +- Rolling update procedure for adjustments to the pods and minor updates +- Major upgrade with minimum interruption time +- Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing + +CPO is tested on the following platforms: +- Kubernetes: 1.21 - 1.28 +- Openshift: 4.8 - 4.13 +- Rancher +- AWS EKS +- Azure AKS +- Google GKE + +Furthermore, CPO is basically executable on any [CSCF-certified](https://www.cncf.io/certification/software-conformance/) Kubernetes platform. + diff --git a/docs/hugo/content/en/architecture/_index.md b/docs/hugo/content/en/architecture/_index.md new file mode 100644 index 000000000..4d21d2560 --- /dev/null +++ b/docs/hugo/content/en/architecture/_index.md @@ -0,0 +1,7 @@ +--- +title: "Architecture" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 300 +--- + diff --git a/docs/hugo/content/en/architecture/architecture.md b/docs/hugo/content/en/architecture/architecture.md new file mode 100644 index 000000000..54e488e97 --- /dev/null +++ b/docs/hugo/content/en/architecture/architecture.md @@ -0,0 +1,40 @@ +--- +title: "Architecture" +date: 2023-03-07T14:26:51+01:00 +draft: true +weight: 1 +--- +This chapter covers all important aspects relating to the architecture of CPO and the associated components. In addition to the underlying Kubertnetes, the various components and their interaction for the operation of a PostgreSQL cluster are analysed. + +### Brief overview of the components +
+ drawing +
+ +### Network-Traffic + + +#### PG-Cluster-intern Traffic +With internal PG cluster-internal traffic, we are talking about all traffic that is necessary for the operation of the cluster itself. This includes +- Communication for the sync of the replicas: + - pg_basebackup & streaming replication +- Communication with pgBackRest (if configured) + - Backups + - WAL archiving + - replica-create for new replicas + +The figure below shows the internal traffic flows with pgBackRest based on block storage (left) or cloud storage (right) + +
+ drawing + drawing + +
+ +#### External Traffic + +External traffic, i.e. the connection to the database for the user or the application, takes place via defined Kubernetes services. A distinction must be made here between read/write and read only traffic. + +##### read/write + +##### read-only \ No newline at end of file diff --git a/docs/hugo/content/en/architecture/compontens.md b/docs/hugo/content/en/architecture/compontens.md new file mode 100644 index 000000000..0ae491233 --- /dev/null +++ b/docs/hugo/content/en/architecture/compontens.md @@ -0,0 +1,44 @@ +--- +title: "Software-Components" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 2 +--- + +Various software components are used to operate CPO. This chapter lists the most important components and their respective purposes. + +Basically, the CPO project focusses on the main tasks of each individual component. This means that each component does what it does best and only that. +In addition to reliable operation, this should also ensure efficient development and project management that utilises existing approaches rather than fighting against them. + +### 1. CYBERTEC-pg-operator +The CYBERTEC-pg-operator is a Kubernetes operator that automates the operation and management of PostgreSQL databases on Kubernetes clusters. It facilitates the provisioning, scaling, backup and recovery of PostgreSQL clusters and integrates tools such as Patroni and pgBackRest for high availability and backup management. + +The main focus of the operator is the creation of the necessary templates and objects for Kubernetes, the regular check whether the declarative description of the cluster is still up to date and for the implementation of various tasks in the cluster, which were commissioned by the user. + +### 2. Kubernetes + +Kubernetes is an open source platform for automating the deployment, scaling and management of containerised applications. It enables the management of container clusters in different environments and offers functions such as automatic load balancing, self-healing and rollouts. Kubernetes ensures that applications are always available and scalable and provides a framework for managing infrastructure in a cloud-native environment. + +The focus of Kubernetes in the context of CPO is the use of the operator's templates to create the required objects. +For example, the statefulset controller creates the desired pods based on the template. Kubernetes or the respective controllers monitor the generated objects independently and react if they are missing or do not correspond to the template. +This means, for example, that pods that have been removed are automatically regenerated even if the operator is not currently running. This avoids the operator as a single point of failure. + +### 3. Patroni +Patroni is an open source tool for managing PostgreSQL high availability clusters. It uses a distributed consensus mechanism, often based on Etcd, Consul or Zookeeper, to manage the role of the PostgreSQL primary node and perform automatic failovers. Patroni ensures that only one primary database server is active at a time, enabling consistency and availability of PostgreSQL databases in a cluster. + +The focus of Patroni is to build, configure and monitor the PostgreSQL cluster based on the configuration created by the operator. Patroni therefore takes over all tasks such as leader selection, cluster monitoring, auto-failover and much more independently. +Patroni is included in every PostgreSQL container and therefore pod and focussed on the individual cluster. +This means that cluster management is guaranteed even without a currently running operator and therefore runs independently of the operator. This avoids the operator as a single point of failure. + +### 4. PostgreSQL +PostgreSQL is a powerful, open source object-relational database management system (ORDBMS). It is known for its reliability, robustness and compliance with SQL standards. PostgreSQL supports advanced data types, functions and offers extensive customisation options. It is suitable for applications of any size and offers strong support for ACID transactions and Multi-Version Concurrency Control (MVCC). + +The main role of PostgreSQL in the context of CPO is quite clear. Controlled by Patroni, PostgreSQL takes care of its task as a DBMS. + +### 5. pgBackRest +pgBackRest is a reliable backup and restore tool for PostgreSQL databases. It offers features such as incremental backups, parallel backup and restore, compression and encryption. pgBackRest is designed for use in large databases and offers both local and remote backup options. It integrates well into Kubernetes environments and enables automated and efficient backup strategies. + +pgBackRest is configured based on the cluster manifest and therefore via the operator. Automatic backups, on the other hand, are based on Kubernetes cron jobs and are therefore independent of the operator, apart from the template generation by the operator. + +### 6. pgBouncer +PgBouncer is a lightweight connection pooler for PostgreSQL. It reduces the load on the database server by consolidating and efficiently managing incoming client connections. PgBouncer improves the performance and scalability of PostgreSQL-based applications by reducing the number of active connections while enabling fast switching times between different connections. \ No newline at end of file diff --git a/docs/hugo/content/en/architecture/rolling_update.md b/docs/hugo/content/en/architecture/rolling_update.md new file mode 100644 index 000000000..ee2a144ef --- /dev/null +++ b/docs/hugo/content/en/architecture/rolling_update.md @@ -0,0 +1,17 @@ +--- +title: "Rolling-Updates" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 3 +--- + +Whether updating the minor version, changing the hardware definitions of the cluster or other adjustments that require a pod restart, CPO ensures that the update is as uninterrupted as possible. + +This means that adjustments are carried out on the various pods of a particular cluster one after the other and in a sensible sequence. This happens as soon as a cluster consists of more than 1 PostgreSQL node. + +In the event of a necessary restart, the operator independently stops the pods and does not leave this to Kubernetes. The idea behind this is that all replica pods are restarted one after the other first. The operator recognises these by the label cpo.opensource.cybertec.at/role=replica set by Patroni + +As soon as all replicas are ready again, the operator checks whether one of the replicas is able to take over cluster operation and performs a switchover. Only then is the former leader pod stopped and restarted. + +This ensures that the only effect on the application is the switchover. +{{< hint type=info >}} A completely uninterrupted handover of operation is not possible due to the architecture and connection handling of PostgreSQL. {{< /hint >}} \ No newline at end of file diff --git a/docs/hugo/content/en/backup/_index.md b/docs/hugo/content/en/backup/_index.md new file mode 100644 index 000000000..e8e5a3db4 --- /dev/null +++ b/docs/hugo/content/en/backup/_index.md @@ -0,0 +1,6 @@ +--- +title: "Backup" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1300 +--- \ No newline at end of file diff --git a/docs/hugo/content/en/backup/aws.md b/docs/hugo/content/en/backup/aws.md new file mode 100644 index 000000000..88d693743 --- /dev/null +++ b/docs/hugo/content/en/backup/aws.md @@ -0,0 +1,74 @@ +--- +title: "via S3" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 2 +--- + +This chapter describes the use of pgBackRest in combination with with AWS S3 or S3-compatible storage such as MinIO, Cloudian HyperStore or SwiftStack. It is not absolutely necessary to operate a Kubernetes on the AWS Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection. + +This Chapter will use AWS S3 for the example, the usage of different s3-compatible Storage is similiar. + +{{< hint type=important >}} Precondition: a S3-bucket and a priviledged role with credentials is needed for this chapter. {{< /hint >}} + +### Create a s3-bucket on the AWS console + +### Create a priviledged service-role + +### Modifying the Cluster +As soon as all requirements are met: + +- A S3 bucket +- Access-Token and Secret-Access-Key for the service role with the required authorisations for the bucket + +the cluster can be modified. Firstly, a secret containing the Credentials is created and the cluster manifest is adapted accordingly. + +The first step is to create the required secret. This is most easily done storing the needed data in a file called s3.conf and using a `kubectl` command. + +``` +# Create a file with name s3.conf and add the following infos. Please replace the placeholder by the credentials +[global] +repo1-s3-key=YOUR_S3_ACCESS_KEY +repo1-s3-key-secret=YOUR_S3_KEY_SECRET +repo1-cipher-pass=YOUR_ENCRYPTION_PASSPHRASE + +# Create the secret with the credentials +kubectl create secret generic cluster-1-s3-credentials --from-file=s3.conf=s3.conf +``` + +In the next step, the secret name ais stored in the secret in the cluster manifest. In addition, global settings, such as the retention time of the backups in the global object, are defined, the image for `pgBackRest` is specified and the necessary information for the repository is added. This includes both the desired storage path in the bucket and the times for automatic backups based on the cron syntax. + +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster + namespace: cpo +spec: + backup: + pgbackrest: + image: 'docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1' + repos: + - endpoint: 'https://s3-zurich.cyberlink.cloud:443' + name: repo1 + region: zurich + resource: cpo-cluster-bucket + schedule: + full: 30 2 * * * + incr: '*/30 * * * *' + storage: s3 + configuration: + secret: cluster-1-s3-credential + global: + repo1-path: /cluster/repo1/ + repo1-retention-full: '7' + repo1-retention-full-type: count +``` + +This example creates a backup in the defined S3 bucket. In addition to the above configurations, a secret is also required which contains the access data for the S3 storage. The name of the secret must be stored in the `spec.backup.pgbackrest.configuration.secret` object and the secret must be located in the same namespace as the cluster. +Information required to address the S3 bucket: +- `Endpoint`: S3 api endpoint +- `Region`: Region of the bucket +- `resource`: Name of the bucket + +An [example](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/pgbackrest_with_s3) with a sercret generator is also available in the tutorials. Enter your access data in the s3.conf file and transfer the tutorial to your Kubernetes with kubectl apply -k cluster-tutorials/pgbackrest_with_s3/. diff --git a/docs/hugo/content/en/backup/azure_blob.md b/docs/hugo/content/en/backup/azure_blob.md new file mode 100644 index 000000000..110136f6e --- /dev/null +++ b/docs/hugo/content/en/backup/azure_blob.md @@ -0,0 +1,55 @@ +--- +title: "via Azure-Blob" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 4 +--- + +This chapter describes the use of pgBackRest in combination with Azure Blob Storage. It is not absolutely necessary to operate a Kubernetes on the Azure Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection. + +{{< hint type=important >}} Precondition: a blob-storage-volume and a priviledged role is needed for this chapter. {{< /hint >}} + +### Create a blob-storage-volume on the Azure console + +### Create a priviledged service-role + +### Modifying the Cluster +As soon as all requirements are met: + +- An Azure-Blob-Storage-Volume +- A JSON token for the service role with the required authorisations for the Volume + +the cluster can be modified. Firstly, a secret containing the JSON token is created and the cluster manifest is adapted accordingly. + +The first step is to create the required secret. This is most easily done using a `kubectl` command. + +``` +kubectl create secret generic cluster-1-gcs-credentials --from-file=gcs.json=fluent.json +``` + +In the next step, both the secret name and the file name of the JSON token are stored in the secret in the cluster manifest. In addition, global settings, such as the retention time of the backups in the global object, are defined, the image for `pgBackRest` is specified and the necessary information for the repository is added. This includes both the desired storage path in the bucket and the times for automatic backups based on the cron syntax. + +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 +spec: + backup: + pgbackrest: + configuration: + secret: cluster-1-gcs-credentials + global: + repo1-path: /cluster-1/repo1/ + repo1-retention-full: '7' + repo1-retention-full-type: count + image: docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1' + repos: + - name: repo1 + resource: postgresql-backup-bucket + key: gcs.json + keyType: service + schedule: + full: 30 2 * * * + storage: gcs +``` diff --git a/docs/hugo/content/en/backup/check_backups.md b/docs/hugo/content/en/backup/check_backups.md new file mode 100644 index 000000000..9b0cf31d2 --- /dev/null +++ b/docs/hugo/content/en/backup/check_backups.md @@ -0,0 +1,79 @@ +--- +title: "Check/Monitor Backups" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 7 +--- +There are several ways to gain an insight into the current status of pgBackRest. +One of these is to use pgBackRest within the container. This can be done both via the repo host and the Postgres pod. + +### pgbackrest via terminal (Repo-Host-Pod) +``` +kubectl exec cluster-5-pgbackrest-repo-host-0 --stdin --tty -- pgbackrest info +stanza: db + status: ok + cipher: none + + db (current) + wal archive min/max (16): 00000006000000000000005C/000000070000000000000092 + + full backup: 20240517-125730F + timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00 + wal start/stop: 00000007000000000000005E / 00000007000000000000005E + database size: 22.9MB, database backup size: 22.9MB + repo1: backup set size: 3MB, backup size: 3MB + + incr backup: 20240517-125730F_20240517-130003I + timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00 + wal start/stop: 000000070000000000000060 / 000000070000000000000060 + database size: 22.9MB, database backup size: 904.3KB + repo1: backup set size: 3MB, backup size: 149.4KB + backup reference list: 20240517-125730F + + incr backup: 20240517-125730F_20240517-131503I + timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00 + wal start/stop: 000000070000000000000062 / 000000070000000000000062 + database size: 22.9MB, database backup size: 24.3KB + repo1: backup set size: 3MB, backup size: 2.9KB + backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I +``` +### pgbackrest via terminal (Postgres-Pod) +``` +kubectl exec cluster-5-0 --stdin --tty -- pgbackrest info +Defaulted container "postgres" out of: postgres, postgres-exporter, pgbackrest-restore (init) +stanza: db + status: ok + cipher: none + + db (current) + wal archive min/max (16): 00000006000000000000005C/000000070000000000000092 + + full backup: 20240517-125730F + timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00 + wal start/stop: 00000007000000000000005E / 00000007000000000000005E + database size: 22.9MB, database backup size: 22.9MB + repo1: backup set size: 3MB, backup size: 3MB + + incr backup: 20240517-125730F_20240517-130003I + timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00 + wal start/stop: 000000070000000000000060 / 000000070000000000000060 + database size: 22.9MB, database backup size: 904.3KB + repo1: backup set size: 3MB, backup size: 149.4KB + backup reference list: 20240517-125730F + + incr backup: 20240517-125730F_20240517-131503I + timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00 + wal start/stop: 000000070000000000000062 / 000000070000000000000062 + database size: 22.9MB, database backup size: 24.3KB + repo1: backup set size: 3MB, backup size: 2.9KB + backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I +``` +There is the "normal" output, as well as the output format Json, which can be processed directly in the terminal. + +``` +kubectl exec cluster-5-0 --stdin --tty -- pgbackrest info --output=json +``` + +### Check pgBackrest via Monitoring + +In addition to reading the status via the containers, pgBackRest can also be analysed and monitored via the monitoring stack. You can find information on setting up the monitoring stack and further information [here](documentation/how-to-use/monitoring). \ No newline at end of file diff --git a/docs/hugo/content/en/backup/encryption.md b/docs/hugo/content/en/backup/encryption.md new file mode 100644 index 000000000..9d1a76541 --- /dev/null +++ b/docs/hugo/content/en/backup/encryption.md @@ -0,0 +1,52 @@ +--- +title: "Encrypted Backups" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 6 +--- +pgBackRest also allows you to encrypt your backups on the client side before uploading them. This is possible with any type of storage and is very easy to activate. + +Firstly, we need to define an encryption key. This must be specified separately for each repo and stored in the same secret that is defined in the `spec.backup.pgbackrest.configuration.secret` object. +``` +kind: Secret +apiVersion: v1 +metadata: + name: cluster-1-s3-credential + namespace: cpo +stringData: + s3.conf | + [global] + repo1-s3-key=YOUR_S3_KEY + repo1-s3-key-secret=YOUR_S3_KEY_SECRET + repo1-cipher-pass=YOUR_ENCRYPTION_KEY +``` + +We also need to configure the type of encryption for pgBackRest. This is done via the cipher-type parameter, which must also be specified for each repo. You can find the available values for the parameter [here](https://pgbackrest.org/configuration.html#section-repository/option-repo-cipher-type) + +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster + namespace: cpo +spec: + backup: + pgbackrest: + configuration: + secret: cluster-1-s3-credential + global: + repo1-path: /cluster/repo1/ + repo1-retention-full: '7' + repo1-retention-full-type: count + repo1-cipher-type: aes-256-cbc + image: 'docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1' + repos: + - endpoint: 'https://s3-zurich.cyberlink.cloud:443' + name: repo1 + region: zurich + resource: cpo-cluster-bucket + schedule: + full: 30 2 * * * + incr: '*/30 * * * *' + storage: s3 +``` \ No newline at end of file diff --git a/docs/hugo/content/en/backup/gcs.md b/docs/hugo/content/en/backup/gcs.md new file mode 100644 index 000000000..bd231df20 --- /dev/null +++ b/docs/hugo/content/en/backup/gcs.md @@ -0,0 +1,55 @@ +--- +title: "via GCS" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 3 +--- + +This chapter describes the use of pgBackRest in combination with Google Cloud Storage (gcs). It is not absolutely necessary to operate a Kubernetes on the Google Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection. + +{{< hint type=important >}} Precondition: a gcs-bucket and a priviledged role is needed for this chapter. {{< /hint >}} + +### Create a gcs-bucket on the google cloud console + +### Create a priviledged service-role + +### Modifying the Cluster +As soon as all requirements are met: + +- A GCS bucket +- A JSON token for the service role with the required authorisations for the bucket + +the cluster can be modified. Firstly, a secret containing the JSON token is created and the cluster manifest is adapted accordingly. + +The first step is to create the required secret. This is most easily done using a `kubectl` command. + +``` +kubectl create secret generic cluster-1-gcs-credentials --from-file=gcs.json=fluent.json +``` + +In the next step, both the secret name and the file name of the JSON token are stored in the secret in the cluster manifest. In addition, global settings, such as the retention time of the backups in the global object, are defined, the image for `pgBackRest` is specified and the necessary information for the repository is added. This includes both the desired storage path in the bucket and the times for automatic backups based on the cron syntax. + +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 +spec: + backup: + pgbackrest: + configuration: + secret: cluster-1-gcs-credentials + global: + repo1-path: /cluster-1/repo1/ + repo1-retention-full: '7' + repo1-retention-full-type: count + image: docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1' + repos: + - name: repo1 + resource: postgresql-backup-bucket + key: gcs.json + keyType: service + schedule: + full: 30 2 * * * + storage: gcs +``` diff --git a/docs/hugo/content/en/backup/introduction.md b/docs/hugo/content/en/backup/introduction.md new file mode 100644 index 000000000..162259b73 --- /dev/null +++ b/docs/hugo/content/en/backup/introduction.md @@ -0,0 +1,83 @@ +--- +title: "Introduction" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1 +--- +Backups are essential for databases. From broken storage to deployments gone wrong, backups often save the day. Starting with pg_dump, which was released in the late 1990s, to the archiving of WAL files (PostgreSQL 8.0 / 2005) and pg_basebackup (PostgreSQL 9.0 / 2010), PostgreSQL already offers built-in options for backups and restores based on logical and physical backups. + +### Backups with pgBackRest + +CPO relies on [pgBackRest](www.pgbackrest.org) as its backup solution, a tried-and-tested tool with extensive backup and restore options. +The backup is based on two elements: +- Snapshots in the form of physical backups +- WAL archive: Continuous archiving of the WAL files + +### Backups + +Backups represent a snapshot of the database in the form of pyhsical files. This contains all relevant information that PostgreSQL holds in its data folder. +With pgBackRest it is possible to create different types of Backups: +- full Snapshot: This captures and saves all files at the time of the backup +- Differential backup: Only captures all files that have been changed since the last full Backup +- Incremental backup: Only records the files that have been changed since the last backup (of any kind). + +When restoring using differential or incremental Backup, it is necessary to also use the previous Backup that provide the basis for the selected Backup. + +{{< hint type=Info >}}The choice of Backup types depends on factors such as the size of the database, the time available for backups and the restore.{{< /hint >}} + +### WAL-Archive + +The WAL (Write-Ahead-Log) refers to log files which record all changes to the database data before they are written to the actual files. The basic idea here is to guarantee the consistency and recoverability of the comitted data even in the event of failures. + +PostgreSQL normally cleans up or recycles the WAL files that are no longer required. By using WAL archiving, the WAL files are saved to a different location before this process so that they can be used for various activities in the future. +These activities include +- Providing the WAL files for replicas to keep them up to date +- Restoring instances that have lost parts of the WAL files in the event of a failure and cannot return to a consistent state without them without losing data +- Point-In-Time-Recovery (PITR): In contrast to Backups, which map a fixed point in time, WAL files make it possible to jump dynamically to a desired point in time and restore the database to the closest available consistent data point + +{{< hint type=Info >}}WAL archiving is an indispensable tool for data availability, recoverability and the continuous availability of PostgreSQL.{{< /hint >}} + +### Backup your Cluster + +With pgBackRest, backups can be stored on different types of storage: +- Block storage (PVC) +- S3 / S3-compatible storage +- Azure blob storage +- GCS + +### How a Backup works + +The operator creates a cronjob object on Kubernetes based on the defined times for automatic backups. This means that the Kubernetes core ([CronJob Controller](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/)) will take care of processing the automatic backups and create a job and thus a pod at the appropriate time. +The pod will send the backup command to the primary or, if block storage is used, to the repo host and monitor it. As soon as the backup is successfully completed, the pod stops with Completed and thus completes the job. + +``` +kubectl get cronjobs +--------------------------------------------------------------------------------------- +NAME | SCHEDULE | SUSPEND | ACTIVE | LAST SCHEDULE | AGE +pgbackrest-cluster-repo1-full | 30 2 * * * | False | 0 | 4h46m | 14h +pgbackrest-cluster-repo1-incr | */30 * * * * | False | 1 | 81s | 106m + +kubectl get jobs +----------------------------------------------------------------------- +NAME | COMPLETIONS | DURATION | AGE +pgbackrest-cluster-repo1-full-28597110 | 1/1 | 52s | 140m +pgbackrest-cluster-repo1-incr-28597365 | 1/1 | 2m37s | 32m +pgbackrest-cluster-repo1-incr-28597380 | 1/1 | 2m38s | 17m +pgbackrest-cluster-repo1-incr-28597395 | 0/1 | 2m3s | 2m3s + +``` + +If there are problems such as a timeout, the pod will stop with exit code 1 and thus indicate an error. In this case, a new pod will be created which will attempt to complete the backup. The maximum number of attempts is 6, so if the backup fails six times, the job is deemed to have failed and will not be attempted again until the next cronjob execution. The job pod log provides information about the problems. + +``` +kubectl get pods +----------------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cluster-0 | 2/2 | Running | 2 | 14h +cluster-pgbackrest-repo-host-0 | 1/1 | Running | 0 | 107m +pgbackrest-cluster-repo1-full-28597110-x8zpw | 0/1 | Completed | 0 | 143m +pgbackrest-cluster-repo1-incr-28597365-7bb5l | 0/1 | Completed | 0 | 34m +pgbackrest-cluster-repo1-incr-28597380-j76rr | 0/1 | Completed | 0 | 19m +pgbackrest-cluster-repo1-incr-28597395-rh86t | 0/1 | Completed | 0 | 4m27s +postgres-operator-66bbff5c54-5sjmk | 1/1 | Running | 0 | 47m +``` diff --git a/docs/hugo/content/en/backup/pvc.md b/docs/hugo/content/en/backup/pvc.md new file mode 100644 index 000000000..90d96ab9d --- /dev/null +++ b/docs/hugo/content/en/backup/pvc.md @@ -0,0 +1,40 @@ +--- +title: "via Blockstorage (pvc)" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1 +--- + +### Backups on PVC (PersistentVolumeClaim) + +When using block storage, the operator creates an additional pod that acts as a repo host. Based on a TLS connection, the repo host obtains the data for the Backup from the current primary of the cluster, which is compressed before being sent. +WAL archives are pushed from the primary pod to the repo host. + +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster + namespace: cpo +spec: + backup: + pgbackrest: + image: 'docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1' + repos: + - name: repo1 + schedule: + full: 30 2 * * * + storage: pvc + volume: + size: 15Gi + storageClass: default + global: + repo1-retention-full: '7' + repo1-retention-full-type: count +``` + +This example creates backups based on a repo host with a daily full Backup at 2:30 am. In addition, pgBackRest is instructed to keep a maximum of 7 full Backups. The oldest one is always removed when a new Backup is created. You can increase the pvc-size all time if needed. Therefore you just need to update the `size` value to a higher amount of Gi. Please be aware that shrinking the volume is not possible. + +{{< hint type=info >}} In addition, further configurations for pgBackRest can be defined in the global object. Information on possible configurations can be found in the [pgBackRest documentation](https://pgbackrest.org/configuration.html) {{< /hint >}} + + diff --git a/docs/hugo/content/en/certs/_index.md b/docs/hugo/content/en/certs/_index.md new file mode 100644 index 000000000..7fb8a1e9c --- /dev/null +++ b/docs/hugo/content/en/certs/_index.md @@ -0,0 +1,7 @@ +--- +title: "Certificates" +date: 2023-12-28T14:26:51+01:00 +draft: true +weight: 1500 +--- +tbd \ No newline at end of file diff --git a/docs/hugo/content/en/clone-cluster/_index.md b/docs/hugo/content/en/clone-cluster/_index.md new file mode 100644 index 000000000..6a6c1b220 --- /dev/null +++ b/docs/hugo/content/en/clone-cluster/_index.md @@ -0,0 +1,87 @@ +--- +title: "Clone Cluster" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 2050 +--- +The function of a cluster clone was implemented to create the possibility of duplicating the current status of a cluster in order to carry out tests such as a major upgrade. +It creates an autonomous and independent cluster based on an existing local cluster or from a cloud storage via pgBackRest (S3, gcs or Azure Blob) + +### Preconditions: +The primary cluster must either: +- be accessible from the standby cluster via streaming replication +- the backup storage used by the standby cluster (S3, GCS or Azure Blob) must be accessible for the standby cluster + +The passwords for the Postgres user, the replication user and the exporter user (if monitoring is active) must be created as a secret for the standby cluster. Otherwise connection problems will occur + +### Clone a cluster via pvc + +```yaml +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1-clone +spec: + dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1' + numberOfInstances: 1 + postgresql: + version: '17' + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + teamId: acid + volume: + size: 5Gi + clone: + cluster: cluster-1 + pgbackrest: + configuration: + secret: cluster-1-pvc-configuration + repo: + storage: pvc +``` + +### Clone a cluster via s3 + +```yaml +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1-clone +spec: + dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1' + numberOfInstances: 1 + postgresql: + version: '17' + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + teamId: acid + volume: + size: 5Gi + clone: + cluster: cluster-1 # A random cluster name can be used if the source cluster is not present on the k8s. + pgbackrest: + configuration: + secret: cluster-1-s3-credentials + options: + repo1-path: /YOUR_PATH_INSIDE_THE_BUCKET_TO_THE_SOURCE_STANZA/repo1/ + repo: + endpoint: YOUR_SOURCE_S3_ENDPOINT + name: repo1 + region: YOUR_SOURCE_S3_REGION + resource: YOUR_SOURCE_BUCKET_NAME + storage: s3 +``` + +### Limitations +A primary cluster cannot be demoted to a standby cluster. +If necessary, the recommendation is to create a new cluster as a standby cluster. \ No newline at end of file diff --git a/docs/hugo/content/en/config_cluster/_index.md b/docs/hugo/content/en/config_cluster/_index.md new file mode 100644 index 000000000..e196fc3bb --- /dev/null +++ b/docs/hugo/content/en/config_cluster/_index.md @@ -0,0 +1,84 @@ +--- +title: "PostgreSQL Configuration" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 1200 +--- + +Users who are already used to working with PostgreSQL from Baremetal or VMs are already familiar with the need for various files to configure PostgreSQL. These include +- postgresql.conf +- pg_hba.conf +- ... + +Although these files are available in the container, direct modification is not planned. As part of the declarative mode of operation of the operator, these files are defined via the operator. The modifying intervention within the container also represents a contradiction to the immutability of the container. + +For these reasons, the operator provides a way to make adjustments to the various files, from PostgreSQL to Patroni. + +We differentiate between two main objects in the cluster manifest: +- [`postgresql`](documentation/how-to-use/configuration/#postgresql) with the child objects `version` and `parameters` +- [`patroni`](documentation/how-to-use/configuration/#patroni) with objects for the `pg_hab`, `slots` and much more + +## postgresql + +The `postgresql `object consists of the following elements: +- `version` - allows you to select the major version of PostgreSQL used. +- `parameters`- enables the postgresql.conf to be changed + +``` +spec: + postgresql: + parameters: + shared_preload_libraries: 'pg_stat_statements,pgnodemx, timescaledb' + shared_buffers: '512MB' + version: '16' +``` + +Any known PostgreSQL parameter from postgresql.conf can be entered here and will be delivered by the operator to all nodes of the cluster accordingly. + +You can find more information about the parameters in the [PostgreSQL documentation](https://www.postgresql.org/docs/) + +## patroni + +The patroni object contains numerous options for customising the patroni-setu, and the pg_hba.conf is also configured here. A complete list of all available elements can be found here. + +The most important elements include +- `pg_hba` - pg_hba.conf +- `slots` +- `synchronous_mode` - enables synchronous mode in the cluster. The default is set to `false` +- `maximum_lag_on_failover` - Specifies the maximum lag so that the pod is still considered healthy in the event of a failover. +- `failsafe_mode` Allows you to cancel the downgrading of the leader if all cluster members can be reached via the Patroni Rest Api. +You can find more information on this in the [Patroni documentation](https://patroni-readthedocs-io.translate.goog/en/master/dcs_failsafe_mode.html?_x_tr_sl=auto&_x_tr_tl=de&_x_tr_hl=de&_x_tr_pto=wapp) + +### pg_hba + +The pg_hba.conf contains all defined authentication rules for PostgreSQL. + +When customising this configuration, it is important that the entire version of pg_hba is written to the manifest. +The current configuration can be read out in the database using table pg_hba_file_rules ;. + +Further information can be found in the [PostgreSQL documentation](https://www.postgresql.org/docs/current/auth-pg-hba-conf.html) + + +### slots + +When using user-defined slots, for example for the use of CDC using Debezium, there are problems when interacting with Patroni, as the slot and its current status are not automatically synchronised to the replicas. + +In the event of a failover, the client cannot start replication as both the entire slot and the information about the data that has already been synchronised are missing. + +To resolve this problem, slots must be defined in the cluster manifest rather than in PostgreSQL. + +``` +spec: + patroni: + slots: + cdc-example: + database: app_db + plugin: pgoutput + type: logical +``` +This example creates a logical replication slot with the name `cdc-example` within the `app_db` database and uses the `pgoutput` plugin for the slot. + + +{{< hint type=Info >}}Slots are only synchronised from the leader/standby leader to the replicas. This means that using the slots read-only on the replicas will cause a problem in the event of a failover.{{< /hint >}} + + diff --git a/docs/hugo/content/en/connection_pooler/_index.md b/docs/hugo/content/en/connection_pooler/_index.md new file mode 100644 index 000000000..f62488b20 --- /dev/null +++ b/docs/hugo/content/en/connection_pooler/_index.md @@ -0,0 +1,56 @@ +--- +title: "connection pooler" +date: 2024-05-31T14:26:51+01:00 +draft: false +weight: 1700 +--- + +A connection pooler is a tool that acts as a proxy between the application and the database and enables the performance of the application to be improved and the load on the database to be reduced. The reason for this lies in the connection handling of PostgreSQL. + +## How PostgreSQL handles connection +PostgreSQL use a new Process for every database-connection created by the postmaster. This process is handling the connection. On the positive side, this enables a stable connection and isolation, but it is not particularly efficient for short-lived connections due to the effort required to create them. + +## How Connection Pooling solves this problem + +With connection pooling, the application connects to the pooler, which in turn maintains a number of connections to the PostgreSQL database. +This makes it possible to use the connections from the pooler to the database for a long time instead of short-lived connections and to recycle them accordingly. + +In addition to utilising long-term connections, a ConnectionPooler also makes it possible to reduce the number of connections required to the database. For example, if you have 3 application nodes, each of which maintains 100 connections to the database at the same time, that would be 300 connections in total. The application usually does not even begin to utilise this number of connections. With the pgBouncer, this can be optimised so that the applications open the 300 connections to the pgBouncer, but the pgBouncer only generates 100 connections to PostgreSQL, for example, thus reducing the load by 2/3. + +{{< hint type=Info >}}It is important to correctly configure the bouncer and thus the connections to be created between pgBouncer and PostgreSQL so that enough connections are available for the workload. {{< /hint >}} + +## How does this work with CPO +CPO relies on pgBouncer, a popular and above all lightweight open source tool. pgBouncer manages individual user-database connections for each user used, which can be used immediately for incoming client connections. + +## How do I create a pooler for a cluster? + +- connection_pooler.number_of_instances - How many instances of connection pooler to create. Default is 2 which is also the required minimum. +- connection_pooler.schema - Database schema to create for credentials lookup function to be used by the connection pooler. Is is created in every database of the Postgres cluster. You can also choose an existing schema. Default schema is pooler. +- connection_pooler.user - User to create for connection pooler to be able to connect to a database. You can also choose an existing role, but make sure it has the LOGIN privilege. Default role is pooler. +- connection_pooler.image - Docker image to use for connection pooler deployment. Default: “registry.opensource.zalan.do/acid/pgbouncer” +- connection_poole.max_db_connections - How many connections the pooler can max hold. This value is divided among the pooler pods. Default is 60 which will make up 30 connections per pod for the default setup with two instances. +- connection_pooler.mode - Defines pooler mode. Available Value: `session`, `transaction` or `statement`. Default is `transaction`. +- connection_pooler.resources - Hardware definition for the pooler pods + +- enableConnectionPooler - Defines whether poolers for read/write access should be created based on the spec.connectionPooler definition. +- enableReplicaConnectionPooler- Defines whether poolers for read-only access should be created based on the spec.connectionPooler definition. + +``` +spec: + connectionPooler: + mode: transaction + numberOfInstances: 2 + resources: + limits: + cpu: '1' + memory: 100Mi + requests: + cpu: 500m + memory: 100Mi + schema: pooler + user: pooler + enableConnectionPooler: true + enableReplicaConnectionPooler: true +``` + + diff --git a/docs/hugo/content/en/crd/_index.md b/docs/hugo/content/en/crd/_index.md new file mode 100644 index 000000000..1dae5a992 --- /dev/null +++ b/docs/hugo/content/en/crd/_index.md @@ -0,0 +1,7 @@ +--- +title: "References" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 2400 +--- + diff --git a/docs/hugo/content/en/crd/crd-operator-configurator.md b/docs/hugo/content/en/crd/crd-operator-configurator.md new file mode 100644 index 000000000..21d6cca50 --- /dev/null +++ b/docs/hugo/content/en/crd/crd-operator-configurator.md @@ -0,0 +1,89 @@ +--- +title: "Operator-Configuration" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 332 +--- + +| Name | Type | default | Description | +| -------------------------------- |:-------:| --------:| ------------------:| +| enable_crd_registration | boolean | true | | +| crd_categories | string | all | | +| enable_lazy_spilo_upgrade | boolean | false | | +| enable_pgversion_env_var | boolean | true | | +| enable_spilo_wal_path_combat | boolean | false | | +| etcd_host | string | | | +| kubernetes_use_configmaps | boolean | false | | +| docker_image | string | | | +| sidecars | list | | | +| enable_shm_volume | boolean | true | | +| workers | int | 8 | | +| max_instances | int | -1 | | +| min_instances | int | -1 | | +| resync_period | string | 30m | | +| repair_period | string | 5m | | +| set_memory_request_to_limit | boolean | false | | +| debug_logging | boolean | true | | +| enable_db_access | boolean | true | | +| spilo_privileged | boolean | false | | +| spilo_allow_privilege_escalation | boolean | true | | +| watched_namespace | string | * | | + +#### major-upgrade-specific + +| Name | Type | default | Description | +| ------------------------------------- |:-------:| --------:| ------------------:| +| major_version_upgrade_mode | string | off | | +| major_version_upgrade_team_allow_list | string | | | +| minimal_major_version | string | 9.6 | | +| target_major_version | string | 14 | | + +#### aws-specific + +| Name | Type | default | Description | +| ------------------------------------- |:-------:| --------:| ------------------:| +| wal_s3_bucket | string | | | +| log_s3_bucket | string | | | +| kube_iam_role | string | | | +| aws_region | string | | | +| additional_secret_mount | string | | | +| additional_secret_mount_path | string | | | +| enable_ebs_gp3_migration | boolean | | | +| enable_ebs_gp3_migration_max_size | int | | | + +#### logical-backup-specific + +| Name | Type | default | Description | +| ------------------------------------- |:-------:| --------:| ------------------:| +| logical_backup_docker_image | string | | | +| logical_backup_google_application_credentials | string | | | +| logical_backup_job_prefix | string | | | +| logical_backup_provider | string | | | +| logical_backup_s3_access_key_id | string | | | +| logical_backup_s3_bucket | string | | | +| logical_backup_s3_endpoint | string | | | +| logical_backup_s3_region | string | | | +| logical_backup_s3_secret_access_key | string | | | +| logical_backup_s3_sse | string | | | +| logical_backup_s3_retention_time | string | | | +| logical_backup_schedule | string | | (Cron-Syntax) | + +#### team-api-specific + +| Name | Type | default | Description | +| ------------------------------------- |:-------:| --------:| ------------------:| +| enable_teams_api | string | | | +| teams_api_url | string | | | +| teams_api_role_configuration | string | | | +| enable_team_superuser | boolean | | | +| team_admin_role | boolean | | | +| enable_admin_role_for_users | boolean | | | +| pam_role_name | string | | | +| pam_configuration | string | | | +| protected_role_names | list | | | +| postgres_superuser_teams | string | | | +| role_deletion_suffix | string | | | +| enable_team_member_deprecation | boolean | | | +| enable_postgres_team_crd | boolean | | | +| enable_postgres_team_crd_superusers | boolean | | | +| enable_team_id_clustername_prefix | boolean | | | \ No newline at end of file diff --git a/docs/hugo/content/en/crd/crd-postgresql.md b/docs/hugo/content/en/crd/crd-postgresql.md new file mode 100644 index 000000000..97ba2544a --- /dev/null +++ b/docs/hugo/content/en/crd/crd-postgresql.md @@ -0,0 +1,467 @@ +--- +title: "PostgreSQL" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 331 +--- +#### CRD for kind postgresql + +| Name | Type | required | Description | +| ----------- |:--------------:| ---------:| ------------------:| +| apiVersion | string | true | acid.zalando.do/v1 | +| kind | string | true | | +| metadata | object | true | | +| [spec](#spec) | object | true | | +| [status](#status) | object | false | | + +--- + +#### spec + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| [additionalVolumes](#additionalvolumes) | array | false | List of additional volumes to mount in each container of the statefulset pod | +| allowedSourceRanges | array | false | The corresponding load balancer is accessible only to the networks defined by this parameter | +| [backup](#backup) | object | false | Enables the definition of a customised backup solution for the cluster | +| [clone](#clone) | object | false | Defines the clone-target for the Cluster | +| [connectionPooler](#connectionpooler) | object | false | Defines the configuration and settings for every type of a connectionPoolers (Primary and Replica). | +| databases | map | false | Defines the name of the database, they are created by the operator. See [tutorial](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/configure_users_and_databases) | +| dockerImage | string | true | Defines the used PostgreSQL-Container-Image for this cluster | +| enableLogicalBackup | boolean | false | Enable logical Backups for this Cluster (Stored on S3) - s3-configuration for Operator is needed (Not for pgBackRest) | +| enableConnectionPooler | boolean | false | creates a ConnectionPooler for the primary Pod | +| enableReplicaConnectionPooler | boolean | false | creates a ConnectionPooler for the replica Pods | +| enableMasterLoadBalancer | boolean | false | Define whether to enable the load balancer pointing to the Postgres primary | +| enableReplicaLoadBalancer | boolean | false | Define whether to enable the load balancer pointing to the Postgres replicas | +| enableMasterPoolerLoadBalancer | boolean | false | Define whether to enable the load balancer pointing to the primary ConnectionPooler | +| enableReplicaPoolerLoadBalancer| boolean | false | Define whether to enable the load balancer pointing to the Replica-ConnectionPooler | +| enableShmVolume | boolean | false | Start a database pod without limitations on shm memory. By default Docker limit /dev/shm to 64M (see e.g. the docker issue, which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is true, to the target database pod will be mounted a new tmpfs volume to remove this limitation. | +| [env](#env) | array | false | Allows to add own Envs to the PostgreSQL containers | +| [initContainers](#initcontainers) | array | false | Enables the definition of init-containers | +| logicalBackupSchedule | string | false | Enables the scheduling of logical backups based on cron-syntax. Example: `30 00 * * *` | +| maintenanceWindows | array | false | Enables the definition of maintenance windows for the cluster. Example: `Sat:00:00-04:00` | +| masterServiceAnnotations | map | false | Enables the definition of annotations for the Primary Service | +| [monitor](#monitor) | map | false | Enables monitoring on the basis of the defined image | +| nodeAffinity | map | false | Enables overwriting of the nodeAffinity | +| numberOfInstances | int | true | Number of nodes of the cluster | +| [patroni](#patroni) | map | false | Enables the customisation of patroni settings | +| podPriorityClassName | string | false | a name of the priority class that should be assigned to the cluster pods. If not set then the default priority class is taken. The priority class itself must be defined in advance | +| podAnnotations | map | false | A map of key value pairs that gets attached as annotations to each pod created for the database. | +| [postgresql](#postgresql) | map | false | Enables the customisation of PostgreSQL settings and parameters | +| [preparedDatabases](#prepareddatabases) | map | false | Allows you to define databases including owner, schemas and extension and have the operator generate them. item See [tutorial](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/prepared_databases) | +| replicaServiceAnnotations | map | false | Enables the definition of annotations for the Replica Service | +| [resources](#resources) | map | true | CPU & Memory (Limit & Request) definition for the Postgres container | +| ServiceAnnotations | map | false | A map of key value pairs that gets attached as annotations to each Service created for the database. | +| [sidecars](#sidecars) | array | false | Enables the definition of custom sidecars | +| spiloFSGroup | int | false | the Persistent Volumes for the Spilo pods in the StatefulSet will be owned and writable by the group ID specified. This will override the spilo_fsgroup operator parameter | +| spiloRunAsGroup | int | false | sets the group ID which should be used in the container to run the process. | +| spiloRunAsUser | int | false | Sets the user ID which should be used in the container to run the process. This must be set to run the container without root. | +| [standby](#standby) | map | false | Enables the creation of a standby cluster at the time of the creation of a new cluster | +| [streams](#streams) | array | false | Enables change data capture streams for defined database tables | +| [tde](#tde) | map | false | Enables the activation of TDE if a new cluster is created | +| teamId | string | true | name of the team the cluster belongs to. Will be removed soon | +| [tls](#tls) | map | false | Custom TLS certificate | +| [tolerations](#tolerations) | array | false | a list of tolerations that apply to the cluster pods. Each element of that list is a dictionary with the following fields: +key, operator, value, effect and tolerationSeconds | +| [topologySpreadConstraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) | map | false | Enables the definition of a topologySpreadConstraint. See [K8s-Documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) | +| users | map | false | a map of usernames to user flags for the users that should be created in the cluster by the operator. See [tutorial](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/configure_users_and_databases) | +| usersWithSecretRotation | list | false | list of users to enable credential rotation in K8s secrets. The rotation interval can only be configured globally. | +| usersWithInPlaceSecretRotation | list | false | list of users to enable in-place password rotation in K8s secrets. The rotation interval can only be configured globally. | +| [volume](#volume) | map | true | define the properties of the persistent storage that stores Postgres data | + + +{{< back >}} + +--- + +#### additionalVolumes + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| name | string | true | Enables the definition of a pgbackrest-setup for the cluster | +| mountPath | string | true | Enables the definition of a pgbackrest-setup for the cluster | +| targetContainers | array | true | Enables the definition of a pgbackrest-setup for the cluster | +| subPath | string | false | Enables the definition of a pgbackrest-setup for the cluster | +| isSubPathExpr | boolean | false | Enables the definition of a pgbackrest-setup for the cluster | +| [volumeSource](#volumeSource) | map | true | Enables the definition of a pgbackrest-setup for the cluster | + +{{< back >}} + +--- + +#### backup + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| [pgbackrest](#pgbackrest) | object | false | Enables the definition of a pgbackrest-setup for the cluster | + +{{< back >}} + +--- + +#### clone + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| cluster | string | true | Name of the cluster to be cloned. Random value if the cluster does not exist locally. | +| [pgbackrest](#pgbackrest) | object | false | Enables the definition of a pgbackrest-setup for the cluster | + +{{< back >}} + +--- + +#### connectionPooler + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| numberOfInstances | int | true | Number of Pods per Pooler | +| mode | string | true | pooling mode for pgBouncer (session, transaction, statement) | +| schema | string | true | Schema for Pooler (Default: pooler) | +| user | string | true | Username for Pooler (Default: pooler) | +| maxDBConnections | string | true | maxConnections to the DB-Pod(s) | +| [resources](#resources) | map | true | CPU & Memory (Limit & Request) definition for the Pooler | + +{{< back >}} +--- + +#### env + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| name | string | true | Keyfield for the ENV-Entry | +| value | string | true | Valuefield for the ENV-Entry | + +{{< back >}} + +--- + +#### initContainers + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| name | string | true | Name for the container | +| image | string | true | Docker-Image for container | +| command | string | false | to override CMD inside the container | +| [env](#env) | array | false | Allows to add own Envs to the container | +| [resources](#resources) | map | false | CPU & Memory (Limit & Request) definition for the container | +| [ports](ports) | array | false | Define open ports for the container | + +{{< back >}} + +--- + +#### monitor + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| image | string | true | Docker-Image for the metric exporter | + +{{< back >}} + +--- + +#### patroni + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| failsafe_mode | boolean | false | Patroni failsafe_mode parameter value. See the [Patroni documentation](https://patroni.readthedocs.io/en/master/dcs_failsafe_mode.html) for more details. | +| initdb | map | false | a map of key-value pairs describing initdb parameters | +| loop_wait | string | false | Patroni `loop_wait` parameter value, optional. The default is set by the PostgreSQL image. | +| maximum_lag_on_failover | string | false | Patroni `maximum_lag_on_failover` parameter value, optional. The default is set by the PostgreSQL image. | +| [multisite](#multisite) | map | false | Multisite configuration - Check the [Documentation](CYBERTEC-pg-operator/multisite/) first | +| pg_hba | array | false | list of custom pg_hba lines to replace default ones. One entry per item (example: - hostssl all all 0.0.0.0/0 scram-sha-256) | +| retry_timeout | int | false | Patroni `retry_timeout` parameter value, optional. The default is set by the PostgreSQL image. | +| [slots](#slots) | map | false | permanent replication slots that Patroni preserves after failover by re-creating them on the new primary immediately. after doing a promote. Use preferred slot-name as map-item | +| synchronous_mode | boolean | false | DPatroni `synchronous_mode` parameter value, optional. The default is false. | +| synchronous_mode_strict | boolean | false | Patroni `synchronous_mode_strict` parameter value, optional. The default is false. | +| synchronous_node_count | int | false | Patroni `synchronous_node_count` parameter value, optional. The default is set to 1. Only used if `synchronous_mode_strict` is true | +| ttl | int | false | Patroni `ttl` parameter value, optional. The default is set by the PostgreSQL image. | + +{{< back >}} + +--- + +#### PostgreSQL + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| parameters | map | false | PostgreSQL-Parameter as item (Example: max_connections: "100"). For help check out the [CYBERTEC PostgreSQL Configurator](https://pgconfigurator.cybertec.at) | +| version | string | false | a map of key-value pairs describing initdb parameters | + +{{< back >}} + +--- + +#### preparedDatabases + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| defaultUsers | boolean | false | Creates roles with `LOGIN` permission and `_user`suffix. Default: false | +| extensions | map | false | Includes the Extensions as items (key:value). Key is the Name of the Extension and value the schema. Example: pgcrypto: public | +| [schemas](#schemas) | map | false | Includes the schemanames as items. | + +{{< back >}} + +--- + +#### resources + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| [requests](#requests) | map | true | cpu and memory definitons (request.cpu / request.memory) | +| [limits](#limits) | map | true | cpu and memory definitons (limits.cpu / limits.memory) | + +{{< back >}} + +--- + +#### sidecars + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| name | string | true | Name for the container | +| image | string | true | Docker-Image for container | +| command | string | false | to override CMD inside the container | +| [env](#env) | array | false | Allows to add own Envs to the container | +| [resources](#resources) | map | false | CPU & Memory (Limit & Request) definition for the container | +| [ports](ports) | array | false | Define open ports for the container | + +{{< back >}} + +#### standby + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| standby_host | string | true | Endpoint of the primary cluster | +| standby_port | string | true | PostgreSQL port of the primary cluster | + +{{< back >}} + +--- + +#### streams + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| applicationId | string | true | The application name to which the database and CDC belongs to. | +| database | string | true | Name of the database from where events will be published via Postgres' logical decoding feature. | +| tables | map | true | Defines a map of table names and their properties (eventType, idColumn and payloadColumn). | +| batchSize | int | false | Defines the size of batches in which events are consumed. Defaults to 1 | +| enableRecovery | boolean | false | Flag to enable a dead letter queue recovery for all streams tables. | +| filter | string | false | Streamed events can be filtered by a jsonpath expression for each table. | +| standby_port | string | false | PostgreSQL port of the primary cluster | + +{{< back >}} + +--- + +#### tde + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| enable | boolean | true | enable TDE during initDB | + +{{< back >}} + +--- + +#### tolerations + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| key | string | false | Key for the taint attribute of the node | +| operator | string | false | Comparison operator (Equal or Exists). | +| value | string | false | Value of the taint (only relevant for ‘Equal’). | +| effect | string | false | Specifies how the node handles the pod (NoExecute, NoSchedule, PreferNoSchedule) | +| tolerationSeconds | int | false | Specifies how long the pod tolerates the taint (only for NoExecute). | + + +{{< back >}} + +--- + +#### volume + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| size | string | true | the size of the target volume. Usual Kubernetes size modifiers, i.e. Gi or Mi, apply | +| storageClass | string | false | the name of the Kubernetes storage class to draw the persistent volume from. If empty K8s will choose the default StorageClass | +| subPath | string | false | Subpath to use when mounting volume into PostgreSQL container. | +| iops | int | false | When running the operator on AWS the latest generation of EBS volumes (gp3) allows for configuring the number of IOPS. Maximum is 16000 | +| throughput | int | false | When running the operator on AWS the latest generation of EBS volumes (gp3) allows for configuring the throughput in MB/s. Maximum is 1000 | +| selector | map | false | A label query over PVs to consider for binding. See the [Kubernetes documentation](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) for details on using matchLabels and matchExpressions | + +{{< back >}} + +--- + +#### volumeSource + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| emptyDir | string | false | emptyDir: {} | +| [PersistentVolumeClaim](#volumeSource-PersistentVolumeClaim) | map | false | PersistentVolumeClaim-Objekt | +| [configMap](#volumeSource-configMap) | map | false | configMap-Objekt | + +{{< back >}} + +--- + +#### volumeSource-PersistentVolumeClaim + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| claimName | string | true | Name of the PersistentVolumeClaim | +| readyOnly | boolean | false | PersistentVolumeClaim-Objekt | + +{{< back >}} + +--- + +#### volumeSource-configMap + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| name | string | true | Name of the Configmap | + +{{< back >}} + +--- + +#### multisite + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| enable | boolean | true | Enable multisite-feature | +| [etcd](#etcd) | map | true | Enables the definition of a pgbackrest-setup for the cluster | +| retry_timeout | int | true | Patroni `retry_timeout` parameter value for the global etcd, optional. The default is set by the PostgreSQL image. | +| site | string | true | Name for the site of this cluster | +| ttl | int | true | Patroni `ttl` parameter value for the global etcd, optional. The default is set by the PostgreSQL image. | + +{{< back >}} + +--- + +#### slots + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| type | string | true | Slot-Type (`physical` or `logical`) | +| database | string | false | Databasename - for logical replication only | +| plugin | string | false | Plugin - for logical replication only | + +{{< back >}} +--- + +#### schemas + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| defaultRoles | boolean | false | Creates schema exclusiv roles with `NOLOGIN` permission and `_user`suffix Default: true | +| defaultUsers | boolean | false | Creates schema exclusiv roles with `LOGIN` permission and `_user`suffix Default: false | + +#### etcd + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| hosts | string | true | list of etcd hosts, including etcd-client-port (default: `2379`), comma separated like in the etcd config | +| password | string | false | Password for the global etcd | +| protocol | string | true | Protocol for the global etcd (http or https) | +| user | string | false | Username for the global etcd | + +{{< back >}} + +--- + +#### requests + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| cpu | string | true | cpu definitons Example: 1000m| +| memory | string | true | memory definitons Example: 1000Mi| + +{{< back >}} + +--- + +#### limits + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| cpu | string | true | cpu definitons Example: 1000m| +| memory | string | true | memory definitons Example: 1000Mi| + +{{< back >}} + +--- + +#### pgbackrest + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| [configuration](#configuration)| object | false | Enables the definition of a pgbackrest-setup for the cluster | +| global | object | false | | +| image | string | true | | +| [repos](#repos) | array | true | | +| [resources](#resources) | object | false | CPU & Memory (Limit & Request) definition for the pgBackRest container| + +{{< back >}} + +--- + +#### configuration + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| secret | object | false | Secretname with the contained S3 credentials (AccessKey & SecretAccessKey) (Note: must be placed in the same namespace as the cluster) | +| [protection](#protection) | object | false | Enable Protection-Options | + +{{< back >}} + +--- + + + +#### protection + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| restore | boolean | false | A restore is ignored as long as this option is set to true. | + +{{< back >}} + +--- + +#### repos + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| name | string | true | Name of the repository Required:Repo[1-4] | +| storage | string | true | Defines the used backup-storage (Choose from List: pvc,s3,blob,gcs) | +| resource | string | true | Bucket-/Instance-/Storage- or PVC-Name | +| endpoint | string | false | The Endpoint for the choosen Storage (Not required for local storage) | +| region | string | false | Region for the choosen Storage (S3 only) | +| [schedule](#schedule) | string | false | Object for defining automatic backups | + +{{< back >}} + +--- + +#### schedule + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| full | string | false | (Cron-Syntax) Define full backup | +| incr | string | false | (Cron-Syntax) Define incremental backup | +| diff | string | false | (Cron-Syntax) Define differential backup | + +{{< back >}} + +--- + +#### status + +| Name | Type | required | Description | +| ------------------------------ |:-------:| ---------:| ------------------:| +| PostgresClusterStatus | string | false | Shows the cluster status. Filled by the Operator | + +{{< back >}} diff --git a/docs/hugo/content/en/customize_cluster/_index.md b/docs/hugo/content/en/customize_cluster/_index.md new file mode 100644 index 000000000..c8329e684 --- /dev/null +++ b/docs/hugo/content/en/customize_cluster/_index.md @@ -0,0 +1,6 @@ +--- +title: "Customize Cluster" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1000 +--- \ No newline at end of file diff --git a/docs/hugo/content/en/customize_cluster/additional-volumes.md b/docs/hugo/content/en/customize_cluster/additional-volumes.md new file mode 100644 index 000000000..8127841e6 --- /dev/null +++ b/docs/hugo/content/en/customize_cluster/additional-volumes.md @@ -0,0 +1,32 @@ +--- +title: "Additional Volumes" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 3 +--- + +``` + additionalVolumes: + - name: empty + mountPath: /opt/empty + targetContainers: + - all + volumeSource: + emptyDir: {} +# - name: data +# mountPath: /home/postgres/pgdata/partitions +# targetContainers: +# - postgres +# volumeSource: +# PersistentVolumeClaim: +# claimName: pvc-postgresql-data-partitions +# readyOnly: false +# - name: conf +# mountPath: /etc/telegraf +# subPath: telegraf.conf +# targetContainers: +# - telegraf-sidecar +# volumeSource: +# configMap: +# name: my-config-map +``` \ No newline at end of file diff --git a/docs/hugo/content/en/customize_cluster/sidecars.md b/docs/hugo/content/en/customize_cluster/sidecars.md new file mode 100644 index 000000000..babbec38b --- /dev/null +++ b/docs/hugo/content/en/customize_cluster/sidecars.md @@ -0,0 +1,110 @@ +--- +title: "Sidecars" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1 +--- +Starting with the Single-Node-Cluster from the previous section, we want to modify the Instance a bit to see. +## CPU and Memory +``` +spec: + resources: + limits: + cpu: 1000m + memory: 500Mi + requests: + cpu: 500m + memory: 500mi +``` +Based on the ressources-Definiton we're able to modify the reserved Hardware (requests) and the limits, which allows use to consume more than the reserved definitons if the k8s-worker has this hardware available. There are some Restrictions when modifiying the limits-section. Because of the behaviour of Databases we should never define a diff between requests.memory and limits.memory. A Database is after some time using all available Memory, for Cache and other things. Limits are optional and the worker node can force them back. forcing back memory will create big problems inside a database like creating corruption, forcing OutOfMemory-Killer and so on. +CPU on the other side is a ressource we can use inside the limits definiton to allow our database using more cpu if needed and available. + +## Sidecars +Sidecars are further Containers running on the same Pod as the Database. We can use them for serveral different Jobs. +The Operator allows us to define them directly inside the Cluster-Manifest. +``` +spec: + sidecars: + - name: "telegraf-sidecar" + image: "telegraf:latest" + ports: + - name: metrics + containerPort: 8094 + protocol: TCP + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 100m + memory: 100Mi + env: + - name: "USEFUL_VAR" + value: "perhaps-true" +``` +This Example will add a second Container to our Pods. This will trigger a restart, which creates Downtime if you're not running a HA-Cluster. + +## Init-Containers +We can exactly the same as for sidecars also for Init-Containers. +The difference is, that a sidecar is running normally on a pod. +An Init-Container will just run as first container when the pod is created and it will ends after his job is done. +The "normal" Containers has to wait till all init-Containers finished their jobs and ended with a exit-status. +``` +spec: + initContainers: + - name: date + image: busybox + command: [ "/bin/date" ] +``` + +## TLS-Certificates +One Startup the Containers will create a custom TLS-Certificate which allows creating tls-secured-connections to the Database. +But this Certificates cannot verified, because the application has no information about the CA. Because of this the certificates are no protection against MITM-Attacks. +You're able to configure your own Certificates and CA to ensure, that you can use secured and verified connections between your application and your database. +``` +spec: + tls: + secretName: "" # should correspond to a Kubernetes Secret resource to load + certificateFile: "tls.crt" + privateKeyFile: "tls.key" + caFile: "" # optionally configure Postgres with a CA certificate + caSecretName: "" # optionally the ca.crt can come from this secret instead. +``` +You need to store the needed values from tls.crt, tls.key and ca.crt in a secret and define the secrtetname inside the tls-object. +if you want you can create a separate sercet just for the ca and use this secret for every cluster inside the Namespace. +To get Information about creating Certificates and the secrets check the Tutorial in the additonal-Section or click [here](additonal/tutorials/tls) + +## Node-Affinity +Node-Affinity will ensure that the Cluster-pods only deployed on Kubernetes-Nodes which has the defined Labelkey and -Value +``` +spec: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: cpo + operator: In + values: + - enabled +``` +This allowes you to use specific database-nodes in a mixed cluster for example. +In the Example above the Cluster-Pods are just deployed on Nodes with the Key: cpo and the value: enabled +So you're able to seperate your Workload. + +## PostgreSQL-Configuration +Every Cluster will start with the default PostgreSQL-Configuration. Every Parameter can be overriden based in definitions inside the Cluster-Manifest. +Therefore we just need a add the section parameters to the postgresql-Object +``` +spec: + postgresql: + version: 16 + parameters: + max_connections: "53" + log_statement: "all" + track_io_timing: "true" +``` +These Definitions will change the PostgreSQL-Configuration. Based on the needs of Parameter changes the Pods may needs a restart, which creates a Downtime if its not a HA-Cluster. +You can check Parameters and allowed Values on this Sources to ensure a correct Value. +- PostgreSQL Documentation +- [PostgreSQL.org](https://postgresql.org) +- [PostgreSQLco.nf](https://postgresqlco.nf/) diff --git a/docs/hugo/content/en/db_users/_index.md b/docs/hugo/content/en/db_users/_index.md new file mode 100644 index 000000000..8a7a54d9e --- /dev/null +++ b/docs/hugo/content/en/db_users/_index.md @@ -0,0 +1,153 @@ +--- +title: "Databases & Users" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 900 +--- + +CPO not only supports you in deploying your cluster, it also supports you in setting it up in terms of the database and users. +CPO offers you three different options for this: +- Create roles +- Create databases +- preapared databases + +## Create Roles +The creation of users is based on the definition of the user name and the definition of the required rights for this user. Available rights are +- `superuser` +- `inherit` +- `login` +- `nologin` +- `createrole` +- `createdb` +- `replication` +- `bypassrls` + +Unless explicitly defined via `NOLOGIN`, a created user automatically receives the `LOGIN` permission. + +``` +spec: + users: + db_owner: + - login + - createdb + appl_user: + - login +``` + +For each user created, CPO automatically creates a secret with `username` and `password` in the namespace of the cluster, which follows the following naming convention: +[USERNAME].[CLUSTERNAME].credentials.postgresql.cpo.opensource.cybertec.at + +If the secrets for an application are to be stored in a different namespace, for example, it is necessary to define the setting enable_cross_namespace_secret as true in the operator configuration. You can find more information about the operator configuration [here](documentation/how-to-use/operator_configuration/). + +The namespace must then be written before the user name. +``` +spec: + users: + db_owner: + - login + - createdb + app_namespace.appl_user: + - login +``` + +## Create Databases + +Databases are basically created in a very similar way to users. +The definition is based on the database name and the database owner. + +``` +spec: + users: + db_owner: + - login + - createdb + app_namespace.appl_user: + - login + databases; + app_db: app_namespace.appl_user +``` + +{{< hint type=Info >}}Be aware that the user name must be defined for the database owner in the same way as it is done in the users object. {{< /hint >}} + +## Prepared Databases + +The `preparedDatabases` object is available for a much more extensive setup of databases and users. +In addition to the creation of `databases` and `users`, this also enables the creation of `schemas` and `extensions`. A more detailed rights management is also available. + +### Databases and Schema + +Creating the preparedDatabases object already creates a database whose name is based on the cluster name. `preparedDatabases: {}` + +{{< hint type=Info >}}For the database name, `-` is replaced with `_` in the cluster name{{< /hint >}} + +To create your own database names and elements such as schemas and extensions within the database, an object must be created within preparedDatabases for each database. + +``` +spec: + preparedDatabases: + appl_db: + extensions: + dblink: public + schemas: + data: {} +``` + +This example creates a database with the name `appl_db` and creates a schema with the name `data` in it, as well as creating the `dblink` extension in the schema `public`. + +### Management of users and Permissions + +For rights management, we distinguish between `NOLOGIN` roles and `LOGIN` roles. `Users` have login rights and inherit the other rights from the `NOLOGIN` role. + +#### NoLogin roles (defaultRoles) + +The roles are created if `defaultroles` is not explicitly set to false. +``` +spec: + preparedDatabases: + appl_db: + extensions: + dblink: public + schemas: + data: {} +``` +This creates roles for the schema owner, writer and reader + +#### Login roles (defaultUsers) + +The roles described in the previous paragraph can be assigned to LOGIN roles via the users section in the manifest. Optionally, the Postgres operator can also create standard `LOGIN` roles for the database and each individual schema. These roles are given the suffix _user and inherit all rights from their NOLOGIN counterparts. Therefore, you cannot set defaultRoles to false and activate defaultUsers at the same time. + +``` +spec: + preparedDatabases: + appl_db: + defaultUsers: true + extensions: + dblink: public + schemas: + data: {} + history: + defaultRoles: true + defaultUsers: false +``` +This example creates the following users and inheritances + +Role name | Attributes | inherits from +------------------------|---------------------------|-------------------------------- + appl_db_owner | Cannot login | appl_db_reader,appl_db_owner,appl_data_owner,... + appl_db_owner_user | | appl_db_owner + appl_db_reader | Cannot login | + appl_db_reader_user | | appl_db_reader + appl_db_writer | Cannot login | appl_db_reader + appl_db_writer_user | | appl_db_writer + appl_db_data_owner | Cannot login | appl_db_data_reader,appl_db_data_writer + appl_db_data_reader | Cannot login | + appl_db_data_writer | Cannot login | appl_db_data_reader + appl_db_history_owner | Cannot login | appl_db_history_reader,appl_db_history_writer + appl_db_history_reader | Cannot login | + appl_db_history_writer | Cannot login | appl_db_history_reader + +Default access permissions are also defined for LOGIN roles when databases and schemas are created. This means that they are not currently set if defaultUsers (or defaultRoles for schemas) are activated at a later time. + +#### User Secrets + +For each user created by cpo with `LOGIN` permissions, the operator also creates a secret with username and password, as with the creation of roles via the `users` object. \ No newline at end of file diff --git a/docs/hugo/content/en/extensions/_index.md b/docs/hugo/content/en/extensions/_index.md new file mode 100644 index 000000000..cbe16db49 --- /dev/null +++ b/docs/hugo/content/en/extensions/_index.md @@ -0,0 +1,6 @@ +--- +title: "Extensions" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1900 +--- \ No newline at end of file diff --git a/docs/hugo/content/en/extensions/pg13.md b/docs/hugo/content/en/extensions/pg13.md new file mode 100644 index 000000000..9b57bb925 --- /dev/null +++ b/docs/hugo/content/en/extensions/pg13.md @@ -0,0 +1,86 @@ +--- +title: "PostgreSQL 13" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1813 +--- + +{{< hint type=info >}} The extensions listed are included in the standard images. This list refers to PostgreSQL 13. {{< /hint >}} + +| Name | Default Version | Comment | +|---------------------|-----------------|----------------------------------------------------------------------------| +| adminpack | 2.1 | Administrative functions for PostgreSQL | +| amcheck | 1.2 | Functions for verifying relation integrity | +| autoinc | 1.0 | Functions for autoincrementing fields | +| bloom | 1.0 | Bloom access method - signature file based index | +| btree_gin | 1.3 | Support for indexing common datatypes in GIN | +| btree_gist | 1.5 | Support for indexing common datatypes in GiST | +| citext | 1.6 | Data type for case-insensitive character strings | +| credcheck | 3.0.0 | credcheck - PostgreSQL plain text credential checker | +| cube | 1.4 | Data type for multidimensional cubes | +| dblink | 1.2 | Connect to other PostgreSQL databases from within a database | +| dict_int | 1.0 | Text search dictionary template for integers | +| dict_xsyn | 1.0 | Text search dictionary template for extended synonym processing | +| earthdistance | 1.1 | Calculate great-circle distances on the surface of the Earth | +| file_fdw | 1.0 | Foreign-data wrapper for flat file access | +| fuzzystrmatch | 1.1 | Determine similarities and distance between strings | +| hstore | 1.7 | Data type for storing sets of (key, value) pairs | +| hstore_plperl | 1.0 | Transform between hstore and plperl | +| hstore_plperlu | 1.0 | Transform between hstore and plperlu | +| hstore_plpython3u | 1.0 | Transform between hstore and plpython3u | +| insert_username | 1.0 | Functions for tracking who changed a table | +| intagg | 1.1 | Integer aggregator and enumerator (obsolete) | +| intarray | 1.3 | Functions, operators, and index support for 1-D arrays of integers | +| isn | 1.2 | Data types for international product numbering standards | +| jsonb_plperl | 1.0 | Transform between jsonb and plperl | +| jsonb_plperlu | 1.0 | Transform between jsonb and plperlu | +| jsonb_plpython3u | 1.0 | Transform between jsonb and plpython3u | +| lo | 1.1 | Large Object maintenance | +| ltree | 1.2 | Data type for hierarchical tree-like structures | +| ltree_plpython3u | 1.0 | Transform between ltree and plpython3u | +| moddatetime | 1.0 | Functions for tracking last modification time | +| pageinspect | 1.8 | Inspect the contents of database pages at a low level | +| pg_buffercache | 1.3 | Examine the shared buffer cache | +| pg_cron | 1.6 | Job scheduler for PostgreSQL | +| pg_freespacemap | 1.2 | Examine the free space map (FSM) | +| pg_permissions | 1.3 | View object permissions and compare them with the desired state | +| pg_prewarm | 1.2 | Prewarm relation data | +| pg_proctab | | Placeholder - see pg_proctab--0.0.10-compat.control | +| pg_stat_statements | 1.8 | Track planning and execution statistics of all SQL statements executed | +| pg_trgm | 1.5 | Text similarity measurement and index searching based on trigrams | +| pg_visibility | 1.2 | Examine the visibility map (VM) and page-level visibility info | +| pgaudit | 1.5.3 | Provides auditing functionality | +| pgauditlogtofile | 1.6 | pgAudit addon to redirect audit entries to an independent file | +| pgcrypto | 1.3 | Cryptographic functions | +| pgnodemx | 1.7 | SQL functions that allow capture of node OS metrics from PostgreSQL | +| pgrowlocks | 1.2 | Show row-level locking information | +| pgstattuple | 1.5 | Show tuple-level statistics | +| plpgsql | 1.0 | PL/pgSQL procedural language | +| plpython3u | 1.0 | PL/Python3U untrusted procedural language | +| pltcl | 1.0 | PL/Tcl procedural language | +| pltclu | 1.0 | PL/TclU untrusted procedural language | +| postgres_fdw | 1.0 | Foreign-data wrapper for remote PostgreSQL servers | +| refint | 1.0 | Functions for implementing referential integrity (obsolete) | +| seg | 1.3 | Data type for representing line segments or floating-point intervals | +| set_user | 4.1.0 | Similar to SET ROLE but with added logging | +| sslinfo | 1.2 | Information about SSL certificates | +| tablefunc | 1.0 | Functions that manipulate whole tables, including crosstab | +| tcn | 1.0 | Triggered change notifications | +| timescaledb | 2.15.3 | Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) | +| tsm_system_rows | 1.0 | TABLESAMPLE method which accepts number of rows as a limit | +| tsm_system_time | 1.0 | TABLESAMPLE method which accepts time in milliseconds as a limit | +| unaccent | 1.1 | Text search dictionary that removes accents | +| uuid-ossp | 1.1 | Generate universally unique identifiers (UUIDs) | +| xml2 | 1.1 | XPath querying and XSLT | + +{{< hint type=info >}} The following extensions are additionally included in the Postgis images. {{< /hint >}} + +| Name | Default Version | Comment | +|----------------------------|-----------------|-----------------------------------------------------------------------------------------------------| +| address_standardizer | 3.4.4 | Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. | +| address_standardizer_data_us | 3.4.4 | Address Standardizer US dataset example | +| postgis | 3.4.4 | PostGIS geometry and geography spatial types and functions | +| postgis_raster | 3.4.4 | PostGIS raster types and functions | +| postgis_sfcgal | 3.4.4 | PostGIS SFCGAL functions | +| postgis_tiger_geocoder | 3.4.4 | PostGIS tiger geocoder and reverse geocoder | +| postgis_topology | 3.4.4 | PostGIS topology spatial types and functions | diff --git a/docs/hugo/content/en/extensions/pg14.md b/docs/hugo/content/en/extensions/pg14.md new file mode 100644 index 000000000..857061e05 --- /dev/null +++ b/docs/hugo/content/en/extensions/pg14.md @@ -0,0 +1,88 @@ +--- +title: "PostgreSQL 14" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1814 +--- + +{{< hint type=info >}} The extensions listed are included in the standard images. This list refers to PostgreSQL 14. {{< /hint >}} + +| Name | Default Version | Comment | +|---------------------|-----------------|----------------------------------------------------------------------------| +| adminpack | 2.1 | Administrative functions for PostgreSQL | +| amcheck | 1.3 | Functions for verifying relation integrity | +| autoinc | 1.0 | Functions for autoincrementing fields | +| bloom | 1.0 | Bloom access method - signature file based index | +| btree_gin | 1.3 | Support for indexing common datatypes in GIN | +| btree_gist | 1.6 | Support for indexing common datatypes in GiST | +| citext | 1.6 | Data type for case-insensitive character strings | +| credcheck | 3.0.0 | credcheck - PostgreSQL plain text credential checker | +| cube | 1.5 | Data type for multidimensional cubes | +| dblink | 1.2 | Connect to other PostgreSQL databases from within a database | +| dict_int | 1.0 | Text search dictionary template for integers | +| dict_xsyn | 1.0 | Text search dictionary template for extended synonym processing | +| earthdistance | 1.1 | Calculate great-circle distances on the surface of the Earth | +| file_fdw | 1.0 | Foreign-data wrapper for flat file access | +| fuzzystrmatch | 1.1 | Determine similarities and distance between strings | +| hstore | 1.8 | Data type for storing sets of (key, value) pairs | +| hstore_plperl | 1.0 | Transform between hstore and plperl | +| hstore_plperlu | 1.0 | Transform between hstore and plperlu | +| hstore_plpython3u | 1.0 | Transform between hstore and plpython3u | +| insert_username | 1.0 | Functions for tracking who changed a table | +| intagg | 1.1 | Integer aggregator and enumerator (obsolete) | +| intarray | 1.5 | Functions, operators, and index support for 1-D arrays of integers | +| isn | 1.2 | Data types for international product numbering standards | +| jsonb_plperl | 1.0 | Transform between jsonb and plperl | +| jsonb_plperlu | 1.0 | Transform between jsonb and plperlu | +| jsonb_plpython3u | 1.0 | Transform between jsonb and plpython3u | +| lo | 1.1 | Large Object maintenance | +| ltree | 1.2 | Data type for hierarchical tree-like structures | +| ltree_plpython3u | 1.0 | Transform between ltree and plpython3u | +| moddatetime | 1.0 | Functions for tracking last modification time | +| old_snapshot | 1.0 | Utilities in support of old_snapshot_threshold | +| pageinspect | 1.9 | Inspect the contents of database pages at a low level | +| pg_buffercache | 1.3 | Examine the shared buffer cache | +| pg_cron | 1.6 | Job scheduler for PostgreSQL | +| pg_freespacemap | 1.2 | Examine the free space map (FSM) | +| pg_permissions | 1.3 | View object permissions and compare them with the desired state | +| pg_prewarm | 1.2 | Prewarm relation data | +| pg_proctab | | Placeholder - see pg_proctab--0.0.10-compat.control | +| pg_stat_statements| 1.9 | Track planning and execution statistics of all SQL statements executed | +| pg_surgery | 1.0 | Extension to perform surgery on a damaged relation | +| pg_trgm | 1.6 | Text similarity measurement and index searching based on trigrams | +| pg_visibility | 1.2 | Examine the visibility map (VM) and page-level visibility info | +| pgaudit | 1.6.3 | Provides auditing functionality | +| pgauditlogtofile | 1.6 | pgAudit addon to redirect audit entries to an independent file | +| pgcrypto | 1.3 | Cryptographic functions | +| pgnodemx | 1.7 | SQL functions that allow capture of node OS metrics from PostgreSQL | +| pgrowlocks | 1.2 | Show row-level locking information | +| pgstattuple | 1.5 | Show tuple-level statistics | +| plpgsql | 1.0 | PL/pgSQL procedural language | +| plpython3u | 1.0 | PL/Python3U untrusted procedural language | +| pltcl | 1.0 | PL/Tcl procedural language | +| pltclu | 1.0 | PL/TclU untrusted procedural language | +| postgres_fdw | 1.1 | Foreign-data wrapper for remote PostgreSQL servers | +| refint | 1.0 | Functions for implementing referential integrity (obsolete) | +| seg | 1.4 | Data type for representing line segments or floating-point intervals | +| set_user | 4.1.0 | Similar to SET ROLE but with added logging | +| sslinfo | 1.2 | Information about SSL certificates | +| tablefunc | 1.0 | Functions that manipulate whole tables, including crosstab | +| tcn | 1.0 | Triggered change notifications | +| timescaledb | 2.18.2 | Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) | +| tsm_system_rows | 1.0 | TABLESAMPLE method which accepts number of rows as a limit | +| tsm_system_time | 1.0 | TABLESAMPLE method which accepts time in milliseconds as a limit | +| unaccent | 1.1 | Text search dictionary that removes accents | +| uuid-ossp | 1.1 | Generate universally unique identifiers (UUIDs) | +| xml2 | 1.1 | XPath querying and XSLT | + +{{< hint type=info >}} The following extensions are additionally included in the Postgis images. {{< /hint >}} + +| Name | Default Version | Comment | +|----------------------------|-----------------|-----------------------------------------------------------------------------------------------------| +| address_standardizer | 3.4.4 | Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. | +| address_standardizer_data_us | 3.4.4 | Address Standardizer US dataset example | +| postgis | 3.4.4 | PostGIS geometry and geography spatial types and functions | +| postgis_raster | 3.4.4 | PostGIS raster types and functions | +| postgis_sfcgal | 3.4.4 | PostGIS SFCGAL functions | +| postgis_tiger_geocoder | 3.4.4 | PostGIS tiger geocoder and reverse geocoder | +| postgis_topology | 3.4.4 | PostGIS topology spatial types and functions | diff --git a/docs/hugo/content/en/extensions/pg15.md b/docs/hugo/content/en/extensions/pg15.md new file mode 100644 index 000000000..1bbd33a7b --- /dev/null +++ b/docs/hugo/content/en/extensions/pg15.md @@ -0,0 +1,89 @@ +--- +title: "PostgreSQL 15" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1815 +--- + +{{< hint type=info >}} The extensions listed are included in the standard images. This list refers to PostgreSQL 15. {{< /hint >}} + +| Name | Default Version | Comment | +|---------------------|-----------------|----------------------------------------------------------------------------| +| adminpack | 2.1 | Administrative functions for PostgreSQL | +| amcheck | 1.3 | Functions for verifying relation integrity | +| autoinc | 1.0 | Functions for autoincrementing fields | +| bloom | 1.0 | Bloom access method - signature file based index | +| btree_gin | 1.3 | Support for indexing common datatypes in GIN | +| btree_gist | 1.7 | Support for indexing common datatypes in GiST | +| citext | 1.6 | Data type for case-insensitive character strings | +| credcheck | 3.0.0 | credcheck - PostgreSQL plain text credential checker | +| cube | 1.5 | Data type for multidimensional cubes | +| dblink | 1.2 | Connect to other PostgreSQL databases from within a database | +| dict_int | 1.0 | Text search dictionary template for integers | +| dict_xsyn | 1.0 | Text search dictionary template for extended synonym processing | +| earthdistance | 1.1 | Calculate great-circle distances on the surface of the Earth | +| file_fdw | 1.0 | Foreign-data wrapper for flat file access | +| fuzzystrmatch | 1.1 | Determine similarities and distance between strings | +| hstore | 1.8 | Data type for storing sets of (key, value) pairs | +| hstore_plperl | 1.0 | Transform between hstore and plperl | +| hstore_plperlu | 1.0 | Transform between hstore and plperlu | +| hstore_plpython3u | 1.0 | Transform between hstore and plpython3u | +| insert_username | 1.0 | Functions for tracking who changed a table | +| intagg | 1.1 | Integer aggregator and enumerator (obsolete) | +| intarray | 1.5 | Functions, operators, and index support for 1-D arrays of integers | +| isn | 1.2 | Data types for international product numbering standards | +| jsonb_plperl | 1.0 | Transform between jsonb and plperl | +| jsonb_plperlu | 1.0 | Transform between jsonb and plperlu | +| jsonb_plpython3u | 1.0 | Transform between jsonb and plpython3u | +| lo | 1.1 | Large Object maintenance | +| ltree | 1.2 | Data type for hierarchical tree-like structures | +| ltree_plpython3u | 1.0 | Transform between ltree and plpython3u | +| moddatetime | 1.0 | Functions for tracking last modification time | +| old_snapshot | 1.0 | Utilities in support of old_snapshot_threshold | +| pageinspect | 1.11 | Inspect the contents of database pages at a low level | +| pg_buffercache | 1.3 | Examine the shared buffer cache | +| pg_cron | 1.6 | Job scheduler for PostgreSQL | +| pg_freespacemap | 1.2 | Examine the free space map (FSM) | +| pg_permissions | 1.3 | View object permissions and compare them with the desired state | +| pg_prewarm | 1.2 | Prewarm relation data | +| pg_proctab | | Placeholder - see pg_proctab--0.0.10-compat.control | +| pg_stat_statements| 1.10 | Track planning and execution statistics of all SQL statements executed | +| pg_surgery | 1.0 | Extension to perform surgery on a damaged relation | +| pg_trgm | 1.6 | Text similarity measurement and index searching based on trigrams | +| pg_visibility | 1.2 | Examine the visibility map (VM) and page-level visibility info | +| pg_walinspect | 1.0 | Functions to inspect contents of PostgreSQL Write-Ahead Log | +| pgaudit | 1.7 | Provides auditing functionality | +| pgauditlogtofile | 1.6 | pgAudit addon to redirect audit entries to an independent file | +| pgcrypto | 1.3 | Cryptographic functions | +| pgnodemx | 1.7 | SQL functions that allow capture of node OS metrics from PostgreSQL | +| pgrowlocks | 1.2 | Show row-level locking information | +| pgstattuple | 1.5 | Show tuple-level statistics | +| plpgsql | 1.0 | PL/pgSQL procedural language | +| plpython3u | 1.0 | PL/Python3U untrusted procedural language | +| pltcl | 1.0 | PL/Tcl procedural language | +| pltclu | 1.0 | PL/TclU untrusted procedural language | +| postgres_fdw | 1.1 | Foreign-data wrapper for remote PostgreSQL servers | +| refint | 1.0 | Functions for implementing referential integrity (obsolete) | +| seg | 1.4 | Data type for representing line segments or floating-point intervals | +| set_user | 4.1.0 | Similar to SET ROLE but with added logging | +| sslinfo | 1.2 | Information about SSL certificates | +| tablefunc | 1.0 | Functions that manipulate whole tables, including crosstab | +| tcn | 1.0 | Triggered change notifications | +| timescaledb | 2.18.2 | Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) | +| tsm_system_rows | 1.0 | TABLESAMPLE method which accepts number of rows as a limit | +| tsm_system_time | 1.0 | TABLESAMPLE method which accepts time in milliseconds as a limit | +| unaccent | 1.1 | Text search dictionary that removes accents | +| uuid-ossp | 1.1 | Generate universally unique identifiers (UUIDs) | +| xml2 | 1.1 | XPath querying and XSLT | + +{{< hint type=info >}} The following extensions are additionally included in the Postgis images. {{< /hint >}} + +| Name | Default Version | Comment | +|----------------------------|-----------------|-----------------------------------------------------------------------------------------------------| +| address_standardizer | 3.4.4 | Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. | +| address_standardizer_data_us | 3.4.4 | Address Standardizer US dataset example | +| postgis | 3.4.4 | PostGIS geometry and geography spatial types and functions | +| postgis_raster | 3.4.4 | PostGIS raster types and functions | +| postgis_sfcgal | 3.4.4 | PostGIS SFCGAL functions | +| postgis_tiger_geocoder | 3.4.4 | PostGIS tiger geocoder and reverse geocoder | +| postgis_topology | 3.4.4 | PostGIS topology spatial types and functions | diff --git a/docs/hugo/content/en/extensions/pg16.md b/docs/hugo/content/en/extensions/pg16.md new file mode 100644 index 000000000..1fa318580 --- /dev/null +++ b/docs/hugo/content/en/extensions/pg16.md @@ -0,0 +1,89 @@ +--- +title: "PostgreSQL 16" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1816 +--- + +{{< hint type=info >}} The extensions listed are included in the standard images. This list refers to PostgreSQL 16. {{< /hint >}} + +| Name | Default Version | Comment | +|---------------------|-----------------|----------------------------------------------------------------------------| +| adminpack | 2.1 | Administrative functions for PostgreSQL | +| amcheck | 1.3 | Functions for verifying relation integrity | +| autoinc | 1.0 | Functions for autoincrementing fields | +| bloom | 1.0 | Bloom access method - signature file based index | +| btree_gin | 1.3 | Support for indexing common datatypes in GIN | +| btree_gist | 1.7 | Support for indexing common datatypes in GiST | +| citext | 1.6 | Data type for case-insensitive character strings | +| credcheck | 3.0.0 | credcheck - PostgreSQL plain text credential checker | +| cube | 1.5 | Data type for multidimensional cubes | +| dblink | 1.2 | Connect to other PostgreSQL databases from within a database | +| dict_int | 1.0 | Text search dictionary template for integers | +| dict_xsyn | 1.0 | Text search dictionary template for extended synonym processing | +| earthdistance | 1.2 | Calculate great-circle distances on the surface of the Earth | +| file_fdw | 1.0 | Foreign-data wrapper for flat file access | +| fuzzystrmatch | 1.2 | Determine similarities and distance between strings | +| hstore | 1.8 | Data type for storing sets of (key, value) pairs | +| hstore_plperl | 1.0 | Transform between hstore and plperl | +| hstore_plperlu | 1.0 | Transform between hstore and plperlu | +| hstore_plpython3u | 1.0 | Transform between hstore and plpython3u | +| insert_username | 1.0 | Functions for tracking who changed a table | +| intagg | 1.1 | Integer aggregator and enumerator (obsolete) | +| intarray | 1.5 | Functions, operators, and index support for 1-D arrays of integers | +| isn | 1.2 | Data types for international product numbering standards | +| jsonb_plperl | 1.0 | Transform between jsonb and plperl | +| jsonb_plperlu | 1.0 | Transform between jsonb and plperlu | +| jsonb_plpython3u | 1.0 | Transform between jsonb and plpython3u | +| lo | 1.1 | Large Object maintenance | +| ltree | 1.2 | Data type for hierarchical tree-like structures | +| ltree_plpython3u | 1.0 | Transform between ltree and plpython3u | +| moddatetime | 1.0 | Functions for tracking last modification time | +| old_snapshot | 1.0 | Utilities in support of old_snapshot_threshold | +| pageinspect | 1.12 | Inspect the contents of database pages at a low level | +| pg_buffercache | 1.4 | Examine the shared buffer cache | +| pg_cron | 1.6 | Job scheduler for PostgreSQL | +| pg_freespacemap | 1.2 | Examine the free space map (FSM) | +| pg_permissions | 1.3 | View object permissions and compare them with the desired state | +| pg_prewarm | 1.2 | Prewarm relation data | +| pg_proctab | | Placeholder - see pg_proctab--0.0.10-compat.control | +| pg_stat_statements| 1.10 | Track planning and execution statistics of all SQL statements executed | +| pg_surgery | 1.0 | Extension to perform surgery on a damaged relation | +| pg_trgm | 1.6 | Text similarity measurement and index searching based on trigrams | +| pg_visibility | 1.2 | Examine the visibility map (VM) and page-level visibility info | +| pg_walinspect | 1.1 | Functions to inspect contents of PostgreSQL Write-Ahead Log | +| pgaudit | 16.1 | Provides auditing functionality | +| pgauditlogtofile | 1.6 | pgAudit addon to redirect audit entries to an independent file | +| pgcrypto | 1.3 | Cryptographic functions | +| pgnodemx | 1.7 | SQL functions that allow capture of node OS metrics from PostgreSQL | +| pgrowlocks | 1.2 | Show row-level locking information | +| pgstattuple | 1.5 | Show tuple-level statistics | +| plpgsql | 1.0 | PL/pgSQL procedural language | +| plpython3u | 1.0 | PL/Python3U untrusted procedural language | +| pltcl | 1.0 | PL/Tcl procedural language | +| pltclu | 1.0 | PL/TclU untrusted procedural language | +| postgres_fdw | 1.1 | Foreign-data wrapper for remote PostgreSQL servers | +| refint | 1.0 | Functions for implementing referential integrity (obsolete) | +| seg | 1.4 | Data type for representing line segments or floating-point intervals | +| set_user | 4.1.0 | Similar to SET ROLE but with added logging | +| sslinfo | 1.2 | Information about SSL certificates | +| tablefunc | 1.0 | Functions that manipulate whole tables, including crosstab | +| tcn | 1.0 | Triggered change notifications | +| timescaledb | 2.18.2 | Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) | +| tsm_system_rows | 1.0 | TABLESAMPLE method which accepts number of rows as a limit | +| tsm_system_time | 1.0 | TABLESAMPLE method which accepts time in milliseconds as a limit | +| unaccent | 1.1 | Text search dictionary that removes accents | +| uuid-ossp | 1.1 | Generate universally unique identifiers (UUIDs) | +| xml2 | 1.1 | XPath querying and XSLT | + +{{< hint type=info >}} The following extensions are additionally included in the Postgis images. {{< /hint >}} + +| Name | Default Version | Comment | +|----------------------------|-----------------|-----------------------------------------------------------------------------------------------------| +| address_standardizer | 3.4.4 | Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. | +| address_standardizer_data_us | 3.4.4 | Address Standardizer US dataset example | +| postgis | 3.4.4 | PostGIS geometry and geography spatial types and functions | +| postgis_raster | 3.4.4 | PostGIS raster types and functions | +| postgis_sfcgal | 3.4.4 | PostGIS SFCGAL functions | +| postgis_tiger_geocoder | 3.4.4 | PostGIS tiger geocoder and reverse geocoder | +| postgis_topology | 3.4.4 | PostGIS topology spatial types and functions | diff --git a/docs/hugo/content/en/extensions/pg17.md b/docs/hugo/content/en/extensions/pg17.md new file mode 100644 index 000000000..6de7df126 --- /dev/null +++ b/docs/hugo/content/en/extensions/pg17.md @@ -0,0 +1,87 @@ +--- +title: "PostgreSQL 17" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1817 +--- + +{{< hint type=info >}} The extensions listed are included in the standard images. This list refers to PostgreSQL 17. {{< /hint >}} + +| Name | Default Version | Comment | +|---------------------|-----------------|----------------------------------------------------------------------------| +| amcheck | 1.4 | Functions for verifying relation integrity | +| autoinc | 1.0 | Functions for autoincrementing fields | +| bloom | 1.0 | Bloom access method - signature file based index | +| btree_gin | 1.3 | Support for indexing common datatypes in GIN | +| btree_gist | 1.7 | Support for indexing common datatypes in GiST | +| citext | 1.6 | Data type for case-insensitive character strings | +| credcheck | 3.0.0 | credcheck - PostgreSQL plain text credential checker | +| cube | 1.5 | Data type for multidimensional cubes | +| dblink | 1.2 | Connect to other PostgreSQL databases from within a database | +| dict_int | 1.0 | Text search dictionary template for integers | +| dict_xsyn | 1.0 | Text search dictionary template for extended synonym processing | +| earthdistance | 1.2 | Calculate great-circle distances on the surface of the Earth | +| file_fdw | 1.0 | Foreign-data wrapper for flat file access | +| fuzzystrmatch | 1.2 | Determine similarities and distance between strings | +| hstore | 1.8 | Data type for storing sets of (key, value) pairs | +| hstore_plperl | 1.0 | Transform between hstore and plperl | +| hstore_plperlu | 1.0 | Transform between hstore and plperlu | +| hstore_plpython3u | 1.0 | Transform between hstore and plpython3u | +| insert_username | 1.0 | Functions for tracking who changed a table | +| intagg | 1.1 | Integer aggregator and enumerator (obsolete) | +| intarray | 1.5 | Functions, operators, and index support for 1-D arrays of integers | +| isn | 1.2 | Data types for international product numbering standards | +| jsonb_plperl | 1.0 | Transform between jsonb and plperl | +| jsonb_plperlu | 1.0 | Transform between jsonb and plperlu | +| jsonb_plpython3u | 1.0 | Transform between jsonb and plpython3u | +| lo | 1.1 | Large Object maintenance | +| ltree | 1.3 | Data type for hierarchical tree-like structures | +| ltree_plpython3u | 1.0 | Transform between ltree and plpython3u | +| moddatetime | 1.0 | Functions for tracking last modification time | +| pageinspect | 1.12 | Inspect the contents of database pages at a low level | +| pg_buffercache | 1.5 | Examine the shared buffer cache | +| pg_cron | 1.6 | Job scheduler for PostgreSQL | +| pg_freespacemap | 1.2 | Examine the free space map (FSM) | +| pg_permissions | 1.3 | View object permissions and compare them with the desired state | +| pg_prewarm | 1.2 | Prewarm relation data | +| pg_proctab | | Placeholder - see pg_proctab--0.0.10-compat.control | +| pg_stat_statements| 1.11 | Track planning and execution statistics of all SQL statements executed | +| pg_surgery | 1.0 | Extension to perform surgery on a damaged relation | +| pg_trgm | 1.6 | Text similarity measurement and index searching based on trigrams | +| pg_visibility | 1.2 | Examine the visibility map (VM) and page-level visibility info | +| pg_walinspect | 1.1 | Functions to inspect contents of PostgreSQL Write-Ahead Log | +| pgaudit | 17.1 | Provides auditing functionality | +| pgauditlogtofile | 1.6 | pgAudit addon to redirect audit entries to an independent file | +| pgcrypto | 1.3 | Cryptographic functions | +| pgnodemx | 1.7 | SQL functions that allow capture of node OS metrics from PostgreSQL | +| pgrowlocks | 1.2 | Show row-level locking information | +| pgstattuple | 1.5 | Show tuple-level statistics | +| plpgsql | 1.0 | PL/pgSQL procedural language | +| plpython3u | 1.0 | PL/Python3U untrusted procedural language | +| pltcl | 1.0 | PL/Tcl procedural language | +| pltclu | 1.0 | PL/TclU untrusted procedural language | +| postgres_fdw | 1.1 | Foreign-data wrapper for remote PostgreSQL servers | +| refint | 1.0 | Functions for implementing referential integrity (obsolete) | +| seg | 1.4 | Data type for representing line segments or floating-point intervals | +| set_user | 4.1.0 | Similar to SET ROLE but with added logging | +| sslinfo | 1.2 | Information about SSL certificates | +| tablefunc | 1.0 | Functions that manipulate whole tables, including crosstab | +| tcn | 1.0 | Triggered change notifications | +| timescaledb | 2.18.2 | Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) | +| tsm_system_rows | 1.0 | TABLESAMPLE method which accepts number of rows as a limit | +| tsm_system_time | 1.0 | TABLESAMPLE method which accepts time in milliseconds as a limit | +| unaccent | 1.1 | Text search dictionary that removes accents | +| uuid-ossp | 1.1 | Generate universally unique identifiers (UUIDs) | +| xml2 | 1.1 | XPath querying and XSLT | + +{{< hint type=info >}} The following extensions are additionally included in the Postgis images. {{< /hint >}} + +| Name | Default Version | Comment | +|----------------------------|-----------------|-----------------------------------------------------------------------------------------------------| +| address_standardizer | 3.4.4 | Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. | +| address_standardizer_data_us | 3.4.4 | Address Standardizer US dataset example | +| postgis | 3.4.4 | PostGIS geometry and geography spatial types and functions | +| postgis_raster | 3.4.4 | PostGIS raster types and functions | +| postgis_sfcgal | 3.4.4 | PostGIS SFCGAL functions | +| postgis_tiger_geocoder | 3.4.4 | PostGIS tiger geocoder and reverse geocoder | +| postgis_topology | 3.4.4 | PostGIS topology spatial types and functions | diff --git a/docs/hugo/content/en/first_cluster/_index.md b/docs/hugo/content/en/first_cluster/_index.md new file mode 100644 index 000000000..fdadc11a1 --- /dev/null +++ b/docs/hugo/content/en/first_cluster/_index.md @@ -0,0 +1,120 @@ +--- +title: "Create a Cluster" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 600 +--- + +To set up a cluster, the implementation is based on a description, as with the other Kubernetes deplyoments. To do this, the operator uses a document of type `postgresql`. + +You can also find the basic minimum specifications for a single-node cluster in our [tutorial project on Github](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/blob/main/cluster-tutorials/single-cluster/postgres.yaml) + +## minimal Single-Node Cluster +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 +spec: + dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1" + numberOfInstances: 1 + postgresql: + version: "17" + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + volume: + size: 5Gi +``` +Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-17-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit. + +After some seconds we should see, that the operator creates our cluster based on the declared definitions. +``` +kubectl get pods +----------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cluster-1-0 | 1/1 | Running | 0 | 50s + +``` + +{{< hint type=Info >}}[Here](documentation/crd/crd-postgresql/) you will find a complete overview of the available options within the cluster manifest.{{< /hint >}} + +### Use a specific Storageclass +``` +spec: + ... + volume: + size: 5Gi + storageClass: default-provisioner + ... +``` +Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod. + +### Expanding Volume +The Operator allows to you expand your volume if the storage-System is able to do this. +``` +spec: + ... + volume: + size: 10Gi + storageClass: default-provisioner + ... +``` +This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc. +``` +kubectl get pvc pgdata-cluster-1-0 -o yaml +------------------------------------------------------- +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + storageClassName: crc-csi-hostpath-provisioner + volumeMode: Filesystem + volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37 +status: + accessModes: + - ReadWriteOnce + capacity: + storage: 5Gi + phase: Bound + +``` + +### Creating additonal Volumes +The Operator allows you to modify your cluster with additonal Volumes. +``` +spec: + ... + additionalVolumes: + - name: empty + mountPath: /opt/empty + targetContainers: + - all + volumeSource: + emptyDir: {} +``` +This example will create an emptyDir and mount it to all Containers inside the Database-Pod. + + +### Specific Settings for aws gp3 Storage +For the gp3 Storage aws you can define more informations +``` + volume: + size: 1Gi + storageClass: gp3 + iops: 1000 # for EBS gp3 + throughput: 250 # in MB/s for EBS gp3 + +``` +The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput [AWS docs](https://aws.amazon.com/ebs/general-purpose/). + +To ensure that the settings are updates properly please define the Operator-Configuration 'storage_resize_mode' from default to 'mixed' diff --git a/docs/hugo/content/en/ha_cluster/_index.md b/docs/hugo/content/en/ha_cluster/_index.md new file mode 100644 index 000000000..ed2a1e6b0 --- /dev/null +++ b/docs/hugo/content/en/ha_cluster/_index.md @@ -0,0 +1,59 @@ +--- +title: "High Availability" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1100 +--- + +High availability (HA) is a critical aspect of running database systems, especially in mission-critical applications where downtime is unacceptable. This section explains why high availability is important for PostgreSQL and how Patroni acts as a solution to ensure HA. +Why High Availability (HA) for PostgreSQL? +1. To minimise downtime: In modern, data-driven applications, downtime can cause significant financial and reputational losses. High availability ensures that the database remains available even in the event of hardware failures or network problems. +2. Data integrity and security: A database failure can lead to data loss or data inconsistencies. High-availability solutions protect against such scenarios through continuous data replication and automatic failover. +3. Scalability and load balancing: HA setups make it possible to distribute the load across multiple nodes, resulting in better performance and faster response times. This is particularly important in environments with high data traffic. +4. Ease of maintenance: By setting up high availability, database maintenance can be performed without interrupting services. Nodes can be maintained incrementally while the database remains available. + +#### Patroni - the cluster manager +In our PostgreSQL environment, we use [Patroni](../../patroni) in the PG containers by default. This has the advantage that even single-node instances basically function as Patroni clusters. This configuration offers several important advantages: +- Easy scalability: by using Patroni in all PG containers, scaling pods up and down is possible at any time. You can easily add additional pods as needed to improve performance or increase capacity, or remove pods to free up resources. This flexibility is particularly useful in dynamic environments where requirements can change quickly. +- Automated cluster management: Patroni automatically takes over the management of the cluster. When a new pod is added to an existing cluster, Patroni takes care of setting up the new node itself, including initialising and starting replication. This means you don't have to perform any manual steps to configure or manage new nodes - Patroni does it all for you automatically. +- Seamless integration: As Patroni is active in every PG container by default, you don't have to worry about compatibility or manual configuration. This makes deployment and maintenance much easier, as all the necessary components are already preconfigured. +- Optimisation of resources: Even with a minimal setup (single-node instance), you benefit from the advantages of a Patroni cluster, including the possibility of easy expansion and automatic failover in the event of a failure. This ensures optimal resource utilisation and minimises downtime. + +#### Upgrade the cluster to high availability + +The necessary changes to a high-availability cluster are very limited. +Only the number of desired instances needs to be increased. + +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 +spec: + dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1" + numberOfInstances: 2 + postgresql: + version: "17" + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + volume: + size: 5Gi +``` + +You can either create a new cluster with the document or update an existing cluster with it. +This makes it possible to scale the cluster up and down during operation. + +The example above will create a HA-Cluster based on two Nodes. +``` +kubectl get pods +----------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cluster-1-0 | 1/1 | Running | 0 | 3d +cluster-1-1 | 1/1 | Running | 0 | 31s + +``` diff --git a/docs/hugo/content/en/images/architecture_cluster_backup_cloud_storage.png b/docs/hugo/content/en/images/architecture_cluster_backup_cloud_storage.png new file mode 100644 index 000000000..082032dc9 Binary files /dev/null and b/docs/hugo/content/en/images/architecture_cluster_backup_cloud_storage.png differ diff --git a/docs/hugo/content/en/images/architecture_cluster_backup_pvc.png b/docs/hugo/content/en/images/architecture_cluster_backup_pvc.png new file mode 100644 index 000000000..1cdbf5bad Binary files /dev/null and b/docs/hugo/content/en/images/architecture_cluster_backup_pvc.png differ diff --git a/docs/hugo/content/en/images/architecture_overview.png b/docs/hugo/content/en/images/architecture_overview.png new file mode 100644 index 000000000..d51e3c12d Binary files /dev/null and b/docs/hugo/content/en/images/architecture_overview.png differ diff --git a/docs/hugo/content/en/installation/_index.md b/docs/hugo/content/en/installation/_index.md new file mode 100644 index 000000000..685fe460a --- /dev/null +++ b/docs/hugo/content/en/installation/_index.md @@ -0,0 +1,6 @@ +--- +title: "Installation" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 500 +--- \ No newline at end of file diff --git a/docs/hugo/content/en/installation/configuration_operator.md b/docs/hugo/content/en/installation/configuration_operator.md new file mode 100644 index 000000000..189aea392 --- /dev/null +++ b/docs/hugo/content/en/installation/configuration_operator.md @@ -0,0 +1,84 @@ +--- +title: "Operator-Configuration" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 503 +--- + +Users who are already used to working with PostgreSQL from Baremetal or VMs are already familiar with the need for various files to configure PostgreSQL. These include +- postgresql.conf +- pg_hba.conf +- ... + +Although these files are available in the container, direct modification is not planned. As part of the declarative mode of operation of the operator, these files are defined via the operator. The modifying intervention within the container also represents a contradiction to the immutability of the container. + +For these reasons, the operator provides a way to make adjustments to the various files, from PostgreSQL to Patroni. + +We differentiate between two main objects in the cluster manifest: +- [`postgresql`](documentation/how-to-use/configuration/#postgresql) with the child objects `version` and `parameters` +- [`patroni`](documentation/how-to-use/configuration/#patroni) with objects for the `pg_hab`, `slots` and much more + +## postgresql + +The `postgresql `object consists of the following elements: +- `version` - allows you to select the major version of PostgreSQL used. +- `parameters`- enables the postgresql.conf to be changed + +``` +spec: + postgresql: + parameters: + shared_preload_libraries: 'pg_stat_statements,pgnodemx, timescaledb' + shared_buffers: '512MB' + version: '16' +``` + +Any known PostgreSQL parameter from postgresql.conf can be entered here and will be delivered by the operator to all nodes of the cluster accordingly. + +You can find more information about the parameters in the [PostgreSQL documentation](https://www.postgresql.org/docs/) + +## patroni + +The patroni object contains numerous options for customising the patroni-setu, and the pg_hba.conf is also configured here. A complete list of all available elements can be found here. + +The most important elements include +- `pg_hba` - pg_hba.conf +- `slots` +- `synchronous_mode` - enables synchronous mode in the cluster. The default is set to `false` +- `maximum_lag_on_failover` - Specifies the maximum lag so that the pod is still considered healthy in the event of a failover. +- `failsafe_mode` Allows you to cancel the downgrading of the leader if all cluster members can be reached via the Patroni Rest Api. +You can find more information on this in the [Patroni documentation](https://patroni-readthedocs-io.translate.goog/en/master/dcs_failsafe_mode.html?_x_tr_sl=auto&_x_tr_tl=de&_x_tr_hl=de&_x_tr_pto=wapp) + +### pg_hba + +The pg_hba.conf contains all defined authentication rules for PostgreSQL. + +When customising this configuration, it is important that the entire version of pg_hba is written to the manifest. +The current configuration can be read out in the database using table pg_hba_file_rules ;. + +Further information can be found in the [PostgreSQL documentation](https://www.postgresql.org/docs/current/auth-pg-hba-conf.html) + + +### slots + +When using user-defined slots, for example for the use of CDC using Debezium, there are problems when interacting with Patroni, as the slot and its current status are not automatically synchronised to the replicas. + +In the event of a failover, the client cannot start replication as both the entire slot and the information about the data that has already been synchronised are missing. + +To resolve this problem, slots must be defined in the cluster manifest rather than in PostgreSQL. + +``` +spec: + patroni: + slots: + cdc-example: + database: app_db + plugin: pgoutput + type: logical +``` +This example creates a logical replication slot with the name `cdc-example` within the `app_db` database and uses the `pgoutput` plugin for the slot. + + +{{< hint type=Info >}}Slots are only synchronised from the leader/standby leader to the replicas. This means that using the slots read-only on the replicas will cause a problem in the event of a failover.{{< /hint >}} + + diff --git a/docs/hugo/content/en/installation/dev-k8s.md b/docs/hugo/content/en/installation/dev-k8s.md new file mode 100644 index 000000000..54bd65266 --- /dev/null +++ b/docs/hugo/content/en/installation/dev-k8s.md @@ -0,0 +1,73 @@ +--- +title: "Setup local Kubernetes" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 501 +--- + +There are various options for setting up a local Kubernetes environment. This chapter deals with the following two variants: +- minikube +- crc (CodeReadyContainers from RedHat) + +### Minikube +Minikube is a tool that makes it possible to run Kubernetes locally on a single computer. It sets up a minimal but functional Kubernetes environment suitable for development and testing purposes. Minikube supports most Kubernetes features and provides an easy way to launch and manage Kubernetes clusters on local machines without the need for a complex cloud infrastructure. + +#### Install Kubectl & Minikube +To use Minikube, it is essential to install the Kubectl client. + +[Here](https://kubernetes.io/docs/tasks/tools/) you will find all the information you need to install kubectl on your Linux, Mac or Windows device. + +You can Install Minikube on your Linux-, Mac- or Windows-Devide using [this Documentation](https://minikube.sigs.k8s.io/docs/start/?arch=%2Flinux%2Fx86-64%2Fstable%2Fbinary+download). + +#### Use Minikube + +Before starting minikube, it is advisable to define a path for the kubeconfig. +```bash +export KUBECONFIG=/home/USERNAME/kubeconfig_minikube.conf +``` +You can then start minikube and all the necessary data is written directly to the conf. The definition of a user-defined path ensures that other configs are not inadvertently overwritten. +The path must be defined again via ENV in each new user session. Alternatively, this can also be permanently defined via .bashrc. +If the default path is not used for any other purpose, the ENV does not need to be set. +```bash +# Start minikube +minikube start + +# get pods from default namespace +kubectl get pods + +# change default namespace to cpo +kubectl config set-context --namespace=cpo +``` + +### CRC +CRC (CodeReady Containers) is a tool from Red Hat that provides a local OpenShift environment. It is specifically designed to run a compact version of OpenShift on a local machine to provide developers and testers with an easy way to develop and test applications optimised for use in OpenShift. CRC includes all the necessary OpenShift components and makes it possible to use Red Hat's container platform locally without building a full cloud infrastructure. + +#### Install oc-client & CRC +To use CRC, it is essential to install the oc-client or the kubectl-client. + +[Here](https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/getting-started-cli.html) you will find all the information you need to install kubectl on your Linux, Mac or Windows device. + +You can Download and install CRC on your Linux-, Mac- or Windows-Devide using [this informations](https://developers.redhat.com/products/openshift-local/overview). + +#### Use CRC + +Before installing crc, it is advisable to define a path for the kubeconfig. +```bash +export KUBECONFIG=/home/USERNAME/kubeconfig_crc.conf +``` +You can then install and start crc and all the necessary data is written directly to the conf. The definition of a user-defined path ensures that other configs are not inadvertently overwritten. +The path must be defined again via ENV in each new user session. Alternatively, this can also be permanently defined via .bashrc. +If the default path is not used for any other purpose, the ENV does not need to be set. +```bash +# Install crc +crc setup + +# Start crc +crc start + +# get pods from default namespace +oc get pods + +# change default namespace to cpo +oc project cpo +``` \ No newline at end of file diff --git a/docs/hugo/content/en/installation/install_operator.md b/docs/hugo/content/en/installation/install_operator.md new file mode 100644 index 000000000..c36f5d2ce --- /dev/null +++ b/docs/hugo/content/en/installation/install_operator.md @@ -0,0 +1,61 @@ +--- +title: "Install CPO" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 502 +--- + +## Prerequisites + +For the installation you either need our CPO tutorial repository or you install CPO directly from our registry.
+Exception: Installation via Operatorhub (Openshift only) + +### CPO-Tutorial-Repository + +To get started, you can fork our tutorial repository on Github and then download it. +[CYBERTEC-operator-tutorials](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/fork) + +``` +GITHUB_USER='[YOUR_USERNAME]' +git clone https://github.com/$GITHUB_USER/CYBERTEC-operator-tutorials.git +cd CYBERTEC-operator-tutorials +``` + +### Helm-Registry + +helm repo add cpo https://cybertec-postgresql.github.io/CYBERTEC-operator-tutorials +### Create Namespace + +``` +# kubectl +kubectl create namespace cpo + +# oc +oc create namespace cpo +``` + +## Install CPO + +There are several ways to install CPO: +- [Use Helm](#helm) +- [Use apply](#apply) +- [Use Operatorhub (On Openshift only)](#operatorhub) + +### Helm + +You can check and change the value.yaml of the helm diagram under the path helm/operator/values.yaml +By default, the operator is defined so that it is configured via crd-configuration. If you wish, you can change this to configmap. There are also some other default settings. + +``` +helm install -n cpo cpo helm/operator/. +``` + +The installation uses a standard configuration. On the following page you will find more information on how to [configure cpo](/documentation/how-to-use/configuration/) and thus adapt it to your requirements. + +### Apply + +The installation uses a standard configuration. On the following page you will find more information on how to [configure cpo](/documentation/how-to-use/configuration/) and thus adapt it to your requirements. + +### Operatorhub + +The installation uses a standard configuration. On the following page you will find more information on how to [configure cpo](/documentation/how-to-use/configuration/) and thus adapt it to your requirements. \ No newline at end of file diff --git a/docs/hugo/content/en/monitoring/_index.md b/docs/hugo/content/en/monitoring/_index.md new file mode 100644 index 000000000..48d1366df --- /dev/null +++ b/docs/hugo/content/en/monitoring/_index.md @@ -0,0 +1,143 @@ +--- +title: "Monitoring" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 2000 +--- +The CPO-Project has prepared severall Tools which allows to setup a Monitoring-Stack including Alerting and Metric-Viewer. +These Stack is based on: +- Prometheus +- Alertmanager +- Grafana +- exporter-container + +CPO has prepared an own Exporter for the PostgreSQl-Pod which can used as a sidecar. + +#### Setting up the Monitoring Stack +To setup the Monitoring-Stack we suggest that you create an own namespace and use the prepared kustomization file inside the Operator-Tutorials. +``` +$ kubectl create namespace cpo-monitoring +namespace/cpo-monitoring created +$ kubectl get pods -n cpo-monitoring +No resources found in cpo-monitoring namespace. + +git clone https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorial +cd CYBERTEC-operator-tutorial/setup/monitoring + +# Hint: Please check if youn want to use a specific storage-class the file pvcs.yaml and add your storageclass on the commented part. Please ensure that you removed the comment-char. + +$ kubectl apply -n cpo-monitoring -k . +serviceaccount/cpo-monitoring created +serviceaccount/cpo-monitoring-tools created +clusterrole.rbac.authorization.k8s.io/cpo-monitoring unchanged +clusterrolebinding.rbac.authorization.k8s.io/cpo-monitoring unchanged +configmap/alertmanager-config created +configmap/alertmanager-rules-config created +configmap/cpo-prometheus-cm created +configmap/grafana-dashboards created +configmap/grafana-datasources created +secret/grafana-secret created +service/cpo-monitoring-alertmanager created +service/cpo-monitoring-grafana created +service/cpo-monitoring-prometheus created +persistentvolumeclaim/alertmanager-pvc created +persistentvolumeclaim/grafana-pvc created +persistentvolumeclaim/prometheus-pvc created +deployment.apps/cpo-monitoring-alertmanager created +deployment.apps/cpo-monitoring-grafana created +deployment.apps/cpo-monitoring-prometheus created + +Hint: If you're not running Openshift you will get a error like this: +error: resource mapping not found for name: "grafana" namespace: "" from ".": +no matches for kind "Route" in version "route.openshift.io/v1" ensure CRDs are installed first + +You can ignore this, because it depends on an object with the type route which is part of Openshift. +It is not needed replaced by ingress-rules or an loadbalancer-service. +``` + +After installing the Monitoring-Stack we're able to check the created pods inside the namespace +``` +$ kubectl get pods -n cpo-monitoring +---------------------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cpo-monitoring-alertmanager-5bb8bc79f7-8pdv4 | 1/1 | Running | 0 | 3m35s +cpo-monitoring-grafana-7c7c4f787b-jbj2f | 1/1 | Running | 0 | 3m35s +cpo-monitoring-prometheus-67969b757f-k26jd | 1/1 | Running | 0 | 3m35s + +``` +The configuration of this monitoring-stack is based on severall configmaps which can be modified. + +#### Prometheus-Configuration + + +#### Alertmanager-Configuration + + +#### Grafana-Configuration + + +#### Configure a PostgreSQL-Cluster to allow Prometheus to gather metrics + +To allow Prometheus to gather metrics from your cluster you need to do some small modfications on the Cluster-Manifest. +We need to create the monitor-object for this: +``` +kubectl edit postgresqls.cpo.opensource.cybertec.at cluster-1 + +... +spec: + ... + monitor: + image: docker.io/cybertecpostgresql/cybertec-pg-container:exporter-16.2-1 +``` + +The Operator will add automatically the monitoring sidecar to your pods, create a new postgres-user and add some structure inside the postgres-database to enable everthing needed for the Monitoring. Also every Ressource of your Cluster will get a new label: cpo_monitoring_stack=true. This is needed for Prometheus to identify all clusters which should be added to the monitoring. +Removing this label will stop Prometheus to gather data from this cluster. + +After changing your Cluster-Manifest the Pods needs to be recreated which is done by a rolling update. +After this you can see that the pod has now more than just one container. + +``` +kubectl get pods +----------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cluster-1-0 | 2/2 | Running | 0 | 54s +cluster-1-1 | 2/2 | Running | 0 | 31s + +``` +You can check the logs to see that the exporter is working and with curl you can see the output of the exporter. + +``` +kubectl logs cluster-1-0 -c postgres-exporter +kubectl exec --stdin --tty cluster-1-0 -c postgres-exporter -- /bin/bash +[exporter@cluster-1-0 /]# curl http://127.0.0.1:9187/metrics + +``` +You can now setup a LoadBalancer-Service or create an Ingress-Rule to allow access von outside to the grafana. Alternativ you can use a port-forward. + +##### LoadBalancer or Nodeport + +##### Ingress-Rule + +##### Port-Forwarding +``` +$ kubectl get pods -n cpo-monitoring +---------------------------------------------------------------------------------------- +NAME | READY | STATUS | RESTARTS | AGE +cpo-monitoring-alertmanager-5bb8bc79f7-8pdv4 | 1/1 | Running | 0 | 6m42s +cpo-monitoring-grafana-7c7c4f787b-jbj2f | 1/1 | Running | 0 | 6m42s +cpo-monitoring-prometheus-67969b757f-k26jd | 1/1 | Running | 0 | 6m42s + +$ kubectl port-forward cpo-monitoring-grafana-7c7c4f787b-jbj2f -n cpo-monitoring 9000:9000 +Forwarding from 127.0.0.1:9000 -> 9000 +Forwarding from [::1]:9000 -> 9000 + +``` +Call http://localhost:9000 in the [Browser](http://localhost:9000) + +##### Use a Route (Openshift only) + +``` +kubectl get route -n cpo-monitoring + +``` +Use the Route-Adress to access Grafana \ No newline at end of file diff --git a/docs/hugo/content/en/multisite/_index.md b/docs/hugo/content/en/multisite/_index.md new file mode 100644 index 000000000..6fc188b96 --- /dev/null +++ b/docs/hugo/content/en/multisite/_index.md @@ -0,0 +1,613 @@ +--- +title: "Multisite" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 2200 +--- +Multisite is a function specially developed for Patroni that makes it possible to combine two separate Patroni clusters into a common cluster unit. ‘Separate’ in this context means that the clusters run independently of each other and can even be located on different Kubernetes clusters. +With Multisite, both clusters benefit from the well-known Patroni features such as automatic failover and demotion of members, resulting in a significant extension compared to a conventional standby cluster. +This feature significantly improves high availability and redundancy by managing multiple geographically or infrastructurally separated clusters as one logical unit. This allows one cluster to seamlessly transition to another in the event of a failure without having to rely on manual switchovers or third-party replication solutions. + +### Prerequisites + +In order to set up the multisite PostgreSQL operator you will need the following: + +- Two or more Kubernetes or OpenShift clusters (also possible with bare metal or VMs) + - Kubernetes version 1.25+, OpenShift version 4.12+. + - Support for defining LoadBalancer services with external IP addresses that are accessible from the other cluster(s). + - Persistent volumes with must be available (only ReadWriteOnce capability is needed). +- A separate VM or Kubernetes/OpenShift cluster to provide quorum (if using less then three Kubernetes or OpenShift clusters). + - For high availability there should not be a shared point of failure between the quorum and the two Kubernetes clusters. + - VM or a LoadBalancer IP must be accessible on ports 2379/2380 to the two other clusters. + - 2 vCPU and 2 GB of memory and 20GB of persistent storage is needed for the quorum site. +- Set up etcd cluster with 3 sites accessible from each of the sites. etcd needs to support API version 3. +- For backups an object storage system with S3 compatible API is needed. Minio, Ceph and major cloud provider object storages are known to work. + +{{< hint type=important >}} An additional etcd is set up for Multisite, which spans the Kubernetes or Openshift clusters and must contain the quorum. {{< /hint >}} + + +### Architecture +Helm based deployment of the multisite operator contains two helm charts, postgres-operator and postgres-cluster. The first is used to deploy the operator and associated objects to a single Kubernetes cluster. The operator is responsible for managing PostgreSQL clusters based on Custom Resource Definitions (CRDs) of type postgresqls/pg. + +![Kubernetes entities](/CYBERTEC-pg-operator/images/k8s-entities.png) + +The diagram contains in green the Helm charts that are used to deploy operator and clusters, in blue the objects +deployed by the operator helm chart and in gold the objects deployed by the cluster chart. + +Operator helm chart deployed objects have the following purposes: + +* `deployments/postgres-operator` - Deployment for the operator itself. +* `opconfig/postgres-operator` - Operator configuration parameters that are read on operator startup. These apply to + all clusters managed by this operator. +* `crd/operatorconfigurations.cpo.opensource.cybertec.at` - Schema for the operator configuration. +* `clusterrole/postgres-operator` - Defines the Kubernetes API resource access used by the operator. Assigned to + postgres-operator service account. +* `clusterrole/postgres-pod` - The Kubernetes API access needed by database pods. Access is needed to access leader + status, config and other things. This is assigned to postgres-pod service account used by database pods. +* `crd/postgresqls.cpo.opensource.cybertec.at` - Schema for PostgreSQL cluster definitions. +* `clusterrole/postgres-operator:users:{admin,edit,view}` - If `rbac.createAggregateClusterRoles` is set then user + facing roles are added for accessing the postgresqls CRDs. + +The cluster chart creates an instance of postgresqls CRD, which will be called cluster manifest from here on. When this +cluster manifest is created operator will create the needed resources for the cluster. These include: + +* `statefulset/$clustername` - StatefulSet is responsible for creating and managing database pods and their associated + PersistentVolumeClaims for storing the databases. Each database pod will run internally an instance of Patroni + process, which will coordinate over the Kubernetes API initialization of the database, startup, leader election + and other control plane actions. +* `service/$clustername`,`endpoints/$clustername` - The main access point for users accessing the database. When load + balancer is enabled in the CRD or multisite mode is enabled, this service will be set to be a LoadBalancer service and + accessible from outside the Kubernetes cluster. The service is created without a selector. Instead, for leader + elections database pods will update the IP address of this endpoint to point to the current leader. + + The endpoint also holds annotations that determine the duration of the leader lease. + + In multicluster operation mode the standby site leader will be in read-only mode. +* `service/$clustername-repl` - Service that points to non-leader (read-only) instances of the database cluster. +* `service/$clustername-config` - A headless service with an endpoint that holds Patroni configuration in annotations. +* `poddisruptionbudget/postgres-$clustername-pdb` - A pod disruption budget that does not allow Kubernetes to shut + down pods in leader role. On some Kubernetes clusters `kubernetes.enable_pod_disruption_budgets` may need to be + turned off to allow nodes to be drained for upgrades. + +### Multisite mode + +In multisite operation mode there are multiple independent Kubernetes clusters with operators capable of independent +operation. To coordinate which site has the current leader process the database pods use a shared etcd cluster to +store a leader lease. + +![Multisite interactions](/CYBERTEC-pg-operator/images/multisite-interaction.png) + + +During bootstrap the first site to acquire the leader lease gets to initialize the database contents. Secondary +sites are configured to replicate from primary site using Patroni's standby_cluster mechanism. + +To be able to communicate between Kubernetes clusters a LoadBalancer service is needed. For this the operator +automatically turns the primary service of the cluster to be of kind LoadBalancer. Operator will wait for an +external IP address to be assigned to this service and passes this information to the database pod. The leader of +each site, whether primary or standby site, will periodically advertise the externally visible IP address for their +site in etcd. Based on this the standby site can configure the standby cluster mechanism to replicate from primary +site. + +## Deployment + +In multisite mode postgres-operator can manage a replicated PostgreSQL cluster that is deployed across multiple +Kubernetes clusters. Multisite operation can be turned on on a cluster by cluster basis, or can be configured to +default to on for all cluster managed by a single operator. + +Setting up a GR deployment consists of the following steps: + +1. Creating a shared etcd cluster. +2. Configuring multisite operation parameters for the postgres-operator. +3. Creating a multisite enabled cluster. + +## Etcd deployment + +Multisite operation mode requires an etcd cluster to achieve consensus on which site gets to accept write +transactions. This functionality is critical to avoid situations where multiple site accept incompatible writes that +cannot be reconciliated, also known as a split brain scenario. + +A highly available etcd cluster consists of an odd number of nodes, at least 3. It is very important that a quorum +of etcd instances (for 3 node clusters, any two instances) do not share a single point of failure. Otherwise the +write availability of database clusters is limited to this single point of failure. Effectively this means that to +protect 3 node etcd clusters from whole site failure, any site can only contain 1 etcd node and there needs to be +at least 3 sites. + +Postgres-operator is agnostic to the exact method of etcd setup, but for ease of use there is a +[Helm chart packaged](https://github.com/cybertec-postgresql/ansible-hpe/tree/main/etcd-helm) that demonstrates the +setup. + +### Example etcd setup + +This example uses one etcd instance deployed outside Kubernetes cluster as quorum. This etcd needs to be started +with the following configuration. Note that IP address that is advertised must be routed to the host that runs this +etcd. + +``` +ETCD_NAME=quorum +ETCD_INITIAL_CLUSTER=quorum=http://10.100.1.100:2380 +ETCD_INITIAL_ADVERTISE_PEER_URLS=http://10.100.1.100:2380 +ETCD_INITIAL_CLUSTER_TOKEN=hpe_etcd +ETCD_ADVERTISE_CLIENT_URLS=http://10.100.1.100:2379 +ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 +ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 +``` + +Kubernetes clusters can then be joined to this node. This needs to be a two step process as typically the externally +visible IP address or port is not known before creating the LoadBalancer service. For this first create a free standing +loadbalancer service that will be overwritten by the Helm chart. + +``` +helm template global-etcd ./etcd-helm/ -f etcd-helm/site_a.yaml \ +| awk '/service.yaml/{flag=1;next}/---/{flag=0}flag' \ +| kubectl apply -f - +``` + +Then check what external IP address the load balancer service got assigned to it. + +``` +$ kubectl get svc -l app.kubernetes.io/instance=global-etcd +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +global-etcd-etcd-helm LoadBalancer 10.109.171.146 10.200.1.101 2379:32488/TCP,2380:30336/TCP 17h +``` + +And set in the values for the helm chart: + +1. Unique name of the site. +2. Externally visible IP address of this service +3. IP address of existing etcd service. +4. Peer list that includes both existing and to be added etcd instance. + +Example: + +``` +site: + name: site_a + host: 10.100.2.101 + +etcd: + existing_etcd_cluster_hostname: 10.100.1.100 + token: hpe_etcd + state: existing + peers: + #Peers should only include working peers and the current one + - quorum=http://10.100.1.100:2380 + - site_a_etcd0=http://10.100.2.101:2380 + client_port: 2379 + peer_port: 2380 +``` + +Then install the helm chart: + +``` +helm install global-etcd ./etcd-helm/ -f etcd-helm/site_a.yaml +``` + +This then needs to be repeated for the other site. + +## Configuring operator for multisite operations + +Multisite operation needs at a minimum the configuration options `multisite.etcd_host`, `multisite.site` +and `multisite.enabled`. All of them can be configured either in operator configuration or per cluster. + +`multisite.etcd_host` needs to point at the global etcd. The port is currently assumed to be 2379. Normally +all clusters under one operator would be using the same etcd clusters, so it makes sense to configure it +in the operator configuration. At runtime database pods will discover the whole etcd cluster member list +and will also take notice of any membership changes. It is enough to use local etcd instance service name +here. + +`multisite.site` is a unique identifier for this site. It will be prefixed to globally advertised database pod names +to distinguish them from pods in other sites. This also makes sense in the operator configuration. + +`multisite.enabled` turns of the multisite behavior. Typically it would make sense to control this at the +cluster level, but the default could be turned on globally. + +These parameters are exposed in Helm chart values file as `configMultisite.*`. + +Example config: + +``` +$ kubectl get opconfig/postgres-operator -o yaml | grep multisite -B1 -A3 + min_instances: -1 + multisite: + etcd_host: global-etcd-etcd-helm.default.svc.cluster.local + site: s1 + postgres_pod_resources: +``` + +This needs to be repeated with a different site name in the second Kubernetes cluster. + +## Creating a multisite enabled postgres cluster + +If the operator is configured for multisite operation then creating a multisite cluster only needs +enabling of the multisite mode. + +Here is an example values file to use for creating multisite enabled clusters: + +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: multisite-cluster + namespace: cpo + labels: + app.kubernetes.io/name: postgres-cluster + app.kubernetes.io/instance: multisite-cluster +spec: + dockerImage: docker.io/cybertecpostgresql/cybertec-pg-container:postgres-multisite-17.4-1 + numberOfInstances: 1 + postgresql: + version: '17' + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + teamId: acid + volume: + size: 5Gi + patroni: + ttl: 30 + loop_wait: 10 + retry_timeout: 10 + multisite: + enable: true +``` + +There is no coordination needed between creating the two or more sites and they can use identical +configuration. The clusters need to be in the same namespace and have the same name to be considered +the same cluster. The first cluster to boot up will acquire multisite leader status and will bootstrap +the database. The other clusters will automatically fetch a copy from the leader cluster and start +replicating. + +Multisite operation needs that the database cluster are capable of communicating with each other. +To do this a load balancer service is created in each cluster for the cluster leader. The operator +then waits for an external IP to be assigned and injects it into the database pods to be used for +advertising their identity. + +## Observing operations + +If database pods have not been created, the first place to check for information is operator logs. Operator logs can +be checked with the following command (add --follow if you want to observe in real-time): + +```shell +kubectl logs $(kubectl get po -l 'app.kubernetes.io/name=postgres-operator' -o name) +``` + +The logs for a successful cluster creation look like this + +``` +time="2023-02-22T15:24:12Z" level=info msg="ADD event has been queued" cluster-name=cpo/multisite-cluster pkg=controller worker=1 +time="2023-02-22T15:24:12Z" level=info msg="creating a new Postgres cluster" cluster-name=cpo/multisite-cluster pkg=controller worker=1 +time="2023-02-22T15:24:12Z" level=warning msg="master is not running, generated master endpoint does not contain any addresses" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:12Z" level=info msg="endpoint \"cpo/multisite-cluster\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:12Z" level=debug msg="final load balancer source ranges as seen in a service spec (not necessarily applied): [\"0.0.0.0/0\"]" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:12Z" level=info msg="master service \"cpo/multisite-cluster\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:12Z" level=info msg="replica service \"cpo/multisite-cluster-repl\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:12Z" level=debug msg="team API is disabled" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:12Z" level=debug msg="team API is disabled" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:12Z" level=info msg="users have been initialized" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:12Z" level=info msg="syncing secrets" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:12Z" level=debug msg="created new secret cpo/postgres.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at, namespace: default, uid: 75ded2eb-a2c9-4968-a1d7-50d2996baeb3" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:13Z" level=debug msg="created new secret cpo/standby.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at, namespace: default, uid: 45a2560a-65a8-4bd5-954f-34d80d8a1894" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:13Z" level=info msg="secrets have been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:13Z" level=info msg="pod disruption budget \"cpo/postgres-multisite-cluster-pdb\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:13Z" level=info msg="waiting for load balancer IP to be assigned" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:13Z" level=debug msg="created new statefulset \"cpo/multisite-cluster\", uid: \"b83647ea-17f6-40aa-aa0c-b1111e76cdc0\"" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:13Z" level=info msg="statefulset \"cpo/multisite-cluster\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:13Z" level=info msg="waiting for the cluster being ready" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:16Z" level=debug msg="Waiting for 1 pods to become ready" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="pods are ready" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="Create roles" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=debug msg="closing database connection" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="users have been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=debug msg="closing database connection" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="databases have been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="found pod disruption budget: \"cpo/postgres-multisite-cluster-pdb\" (uid: \"986a0118-83e7-4736-9843-ec80c0ea9270\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="found statefulset: \"cpo/multisite-cluster\" (uid: \"b83647ea-17f6-40aa-aa0c-b1111e76cdc0\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="found secret: \"cpo/postgres.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at\" (uid: \"75ded2eb-a2c9-4968-a1d7-50d2996baeb3\") namesapce: default" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="found secret: \"cpo/standby.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at\" (uid: \"45a2560a-65a8-4bd5-954f-34d80d8a1894\") namesapce: default" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="found master endpoint: \"cpo/multisite-cluster\" (uid: \"d9f7870e-dd51-4a88-a36a-1c2eb258a31c\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="found master service: \"cpo/multisite-cluster\" (uid: \"4b30df50-ca53-4def-8171-b792c4eefc17\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="found replica service: \"cpo/multisite-cluster-repl\" (uid: \"a77c3a49-3eea-4b6b-92b1-032e13d78f02\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="found pod: \"cpo/multisite-cluster-0\" (uid: \"9b31d378-c9eb-4c1a-8637-e78933187ed7\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="found PVC: \"cpo/pgdata-multisite-cluster-0\" (uid: \"03e66572-27ed-42b4-87bd-825d32131d36\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=debug msg="syncing connection pooler (master, replica) from (false, nil) to (false, false)" cluster-name=cpo/multisite-cluster pkg=cluster worker=1 +time="2023-02-22T15:24:28Z" level=info msg="cluster has been created" cluster-name=cpo/multisite-cluster pkg=controller worker=1 +``` + +When database pods have been created, then Patroni logs can be checked from the pod logs: + +``` +kubectl logs multisite-cluster-0 +``` + +Successful start of first database pod will have amongst other output the following lines: + +``` +. . . +# Kubernetes API access +2023-02-22 15:24:21,061 INFO: Selected new K8s API server endpoint https://192.168.49.2:8443 +. . . +# Set ourselves as multisite leader +2023-02-22 15:24:21,218 INFO: Selected new etcd server http://192.168.50.101:2379 +2023-02-22 15:24:21,348 INFO: Running multisite consensus. +2023-02-22 15:24:21,349 INFO: Touching member s1-multisite-cluster with {'host': '192.168.49.103', 'port': 5432} +2023-02-22 15:24:21,447 INFO: Became multisite leader +. . . +# Initializing a new empty database +2023-02-22 15:24:21,563 INFO: trying to bootstrap a new cluster +. . . +Success. You can now start the database server using: +. . . +# Database started +2023-02-22 15:24:23,934 INFO: postmaster pid=73 +. . . +# Running global database intitialization script +2023-02-22 15:24:25,061 INFO: running post_bootstrap +. . . +# Bootstrap done +2023-02-22 15:24:26,310 INFO: initialized a new cluster +. . . +# Repeated information about health every 10s +2023-02-22 15:24:26,313 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-0 +2023-02-22 15:24:26,361 INFO: Triggering multisite hearbeat +2023-02-22 15:24:26,364 INFO: Running multisite consensus. +2023-02-22 15:24:26,364 INFO: Multisite has leader and it is us +2023-02-22 15:24:26,409 INFO: Updated multisite leader lease +2023-02-22 15:24:26,409 INFO: Touching member s1-multisite-cluster with {'host': '192.168.49.103', 'port': 5432} +2023-02-22 15:24:26,422 INFO: no action. I am (multisite-cluster-0), the leader with the lock +. . . +``` + +Bootstrap of standby on primary site will have these lines: + +``` +. . . +# Determine leader +2023-02-22 15:47:04,552 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-1 +2023-02-22 15:47:04,677 INFO: trying to bootstrap from leader 'multisite-cluster-0' +. . . +# Data copied to replica successfully +2023-02-22 15:47:06,805 INFO: replica has been created using basebackup_fast_xlog +2023-02-22 15:47:06,807 INFO: bootstrapped from leader 'multisite-cluster-0' +# Postgres up +2023-02-22 15:47:07,205 INFO: postmaster pid=73 +. . . +# Normal operation +2023-02-22 15:47:08,380 INFO: no action. I am (multisite-cluster-1), a secondary, and following a leader (multisite-cluster-0) +``` + +Standby cluster will have the following information: + +``` +. . . +# Discovering multisite status +2023-02-22 15:49:58,406 INFO: Running multisite consensus. +2023-02-22 15:49:58,407 INFO: Touching member s2-multisite-cluster with {'host': '192.168.50.103', 'port': 5432} +2023-02-22 15:49:58,454 INFO: Multisite has leader and it is s1-multisite-cluster +2023-02-22 15:49:58,454 INFO: Multisite replicate from Member(index='118', name='s1-multisite-cluster', session='4113060022582527194', data={'host': '192.168.49.103', 'port': 5432}) +2023-02-22 15:49:58,454 INFO: Setting standby configuration to: {'host': '192.168.49.103', 'port': 5432} +2023-02-22 15:49:58,455 INFO: Touching member s2-multisite-cluster with {'host': '192.168.50.103', 'port': 5432} +. . . +# Acquiring standby site leader status and starting copy from primary site +2023-02-22 15:49:58,290 INFO: Lock owner: None; I am multisite-cluster-0 +2023-02-22 15:49:58,566 INFO: trying to bootstrap a new standby leader +. . . +# Replica creation successful +2023-02-22 15:50:00,326 INFO: replica has been created using basebackup +2023-02-22 15:50:00,327 INFO: bootstrapped clone from remote master postgresql://192.168.49.103:5432 +# Postgres started +2023-02-22 15:50:00,577 INFO: postmaster pid=58 +. . . +# Normal operation output of standby leader +2023-02-22 15:50:01,835 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-0 +2023-02-22 15:50:01,886 INFO: Triggering multisite hearbeat +2023-02-22 15:50:01,888 INFO: Running multisite consensus. +2023-02-22 15:50:01,888 INFO: Multisite has leader and it is s1-multisite-cluster +2023-02-22 15:50:01,888 INFO: Multisite replicate from Member(index='118', name='s1-multisite-cluster', session='4113060022582527194', data={'host': '192.168.49.103', 'port': 5432}) +2023-02-22 15:50:01,888 INFO: Touching member s2-multisite-cluster with {'host': '192.168.50.103', 'port': 5432} +2023-02-22 15:50:01,899 INFO: no action. I am (multisite-cluster-0), the standby leader with the lock +``` + +In case access to PostgreSQL logs is needed, the easiest way is to exec into a running database pod +with `kubectl exec -it multisite-cluster-0 -- bash` and view the files there. Logs are stored +as `/home/postgres/pgdata/pgroot/pg_log/postgresql-*.csv`, with one file per weekday. + +Replication state can be queried from PostgreSQL: + +``` +kubectl exec -it $(kubectl get -o name po -l 'spilo-role=master,cluster-name=multisite-cluster') -- su postgres -c \ + 'psql -xc "SELECT application_name, client_addr, backend_start, write_lag FROM pg_stat_replication"' +``` + +To check how multisite mode is doing one option is to check the etcd state. For example by executing +in any one of your database pods: + +``` +kubectl exec multisite-cluster-0 -- bash -c \ +'ETCDCTL_API=3 etcdctl --endpoints=http://${MULTISITE_ETCD_HOST}:2379 \ + get /multisite/${POD_NAMESPACE}/${SCOPE}/{leader,members0}' +``` + +This will output state stored in etcd. Example: + +``` +/multisite/cpo/multisite-cluster/leader +s1-multisite-cluster +/multisite/cpo/multisite-cluster/members/s1-multisite-cluster +{"host":"192.168.49.102","port":5432} +/multisite/cpo/multisite-cluster/members/s2-multisite-cluster +{"host":"192.168.50.102","port":5432} +``` + +Each cluster state is stored with the prefix `/multisite/$NAMESPACE/$CLUSTER_NAME`. In this state +there is `/leader` key storing current leader of the cluster and `/members/$SITE_$CLUSTER_NAME` for +each sites externally visible service. + +### Triggering switchover manually + +Sometimes it is necessary to move leader role from one site to another. For this the operator REST API has an endpoint +named `/clusters/$namespace/$cluster/multisite/`. This accepts a POST request with a request JSON. The document has the +following attributes: + +* **switchover_to**: name of the site that should become the new multisite leader. + +Example: + +```shell +curl --data-raw '{"switchover_to": "s1"}' -H "Content-type: application/json" \ + http://postgres-operator.default.svc.cluster.local:8080/clusters/cpo/multisite-cluster/multisite/ +``` + +The POST request to this endpoint will return immediately when the switchover request has been registered. The +actual switchover process will take some time to coordinate. + +### Observing multisite status + +Current multisite status is published to cluster CRD status subresource in `Multisite` field. The possible values +are `Leader` and `Standby`. When the role changes there will also be an event published. + +Example output from a kubectl describe on the cluster CRD resource: + +``` +Status: + Multisite: Leader + Postgres Cluster Status: Running +Events: + Type Reason Age From Message + ---- ------ ---- ---- ------- + Normal Promote 13s patroni Acquired multisite leader status +``` + +Ouptut from the standby side: + +``` +Status: +Multisite: Standby +Postgres Cluster Status: Running +Events: +Type Reason Age From Message + ---- ------ ---- ---- ------- +Normal Demote 62s patroni Lost leader lock to s1-multisite-cluster +Normal Multisite 97s postgres-operator Multisite switching over to "multisite-cluster" at site "s1" +Normal Multisite 97s postgres-operator Successfully started switchover to "multisite-cluster" at "s1" +``` + + +## Development environment tips + +### MetalLB based cross cluster communication with minikube + +Minikube is a useful distribution for deploying development Kubernetes clusters. With a bit of configuration it is +possible to set up 2 Minikube clusters with MetalLB deployed so that MetalLB assigned IP addresses are accessible +from the other cluster. + +Pre-requisite is to have 2 virtual machines that either are in the same L2 network, or that have a subnet routed to +them. + +This example is based on docker based deployment, same approach might work with other deployment options (e.g. +Virtualbox), but may require some extra configuration tuning. + +Start minikube's on the two hosts using different internal subnets, and configure and enable the metallb addon to +assign IP addresses from this subnet. The subnets chosen should not be in use for services needed by these two VMs, +but other hosts are not affected by the choice of the subnets. + +``` +# Host A +minikube start --subnet=192.168.49.2 +minikube addons configure metallb +-- Enter Load Balancer Start IP: 192.168.49.100 +-- Enter Load Balancer End IP: 192.168.49.200 + ▪ Using image docker.io/metallb/speaker:v0.9.6 + ▪ Using image docker.io/metallb/controller:v0.9.6 +✅ metallb was successfully configured +minikube addons enable metallb + +# Host B +minikube start --subnet=192.168.50.2 +minikube addons configure metallb +-- Enter Load Balancer Start IP: 192.168.50.100 +-- Enter Load Balancer End IP: 192.168.50.200 + ▪ Using image docker.io/metallb/speaker:v0.9.6 + ▪ Using image docker.io/metallb/controller:v0.9.6 +✅ metallb was successfully configured +minikube addons enable metallb +``` + +On both hosts turn on ip forwarding in sysctl.conf and reload it with `sysctl -p` + +``` +net.ipv4.ip_forward=1 +``` + +In IP tables allow forwarding: + +``` +sudo iptables -A FORWARD -j ACCEPT +``` + +Configure on each host routing to access the other clusters metallb IP range via the other VMs IP address (need to +replace IP addresses and network interfaces with actual ones from the VMs): + +``` +# Host A +sudo ip route add 192.168.50.0/24 via 192.168.2.12 dev eth1 +# Host B +sudo ip route add 192.168.49.0/24 via 192.168.2.11 dev eth1 +``` + +To check if load balancer works, here's an example HTTP service: + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: hello-blue-whale +spec: + replicas: 1 + selector: + matchLabels: + app: hello-blue-whale-app + template: + metadata: + name: hello-blue-whale-pod + labels: + app: hello-blue-whale-app + spec: + containers: + - name: hello-blue-whale-container + image: vamsijakkula/hello-blue-whale:v1 + ports: + - containerPort: 80 +--- +apiVersion: v1 +kind: Service +metadata: + name: hello-blue-whale-svc + labels: + app: hello-blue-whale-app +spec: + selector: + app: hello-blue-whale-app + type: LoadBalancer + ports: + - port: 80 + targetPort: 80 +``` + +Then check what external ip got assigned to the service (should be the first IP from the range given above). + +``` +kubectl get svc/hello-blue-whale-svc +``` + +And then from the other host use curl to see if the service can be accessed. + +``` +curl -v http://192.168.49.100/ +``` + +Other hosts on the same network can have the same routes added to access services in the clusters. If access from +other networks is needed, then the chosen subnets need to be routed to these VMs across your network. diff --git a/docs/hugo/content/en/pg_versioning/_index.md b/docs/hugo/content/en/pg_versioning/_index.md new file mode 100644 index 000000000..5abc8a950 --- /dev/null +++ b/docs/hugo/content/en/pg_versioning/_index.md @@ -0,0 +1,6 @@ +--- +title: "PG versioning" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 2100 +--- diff --git a/docs/hugo/content/en/pg_versioning/major_upgrades.md b/docs/hugo/content/en/pg_versioning/major_upgrades.md new file mode 100644 index 000000000..8d77b3712 --- /dev/null +++ b/docs/hugo/content/en/pg_versioning/major_upgrades.md @@ -0,0 +1,87 @@ +--- +title: "Major version upgrade" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 2120 +--- + +CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background. + +{{< hint type=info >}}Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.{{< /hint >}} + + +## How does the upgrade work? + +### Preconditions: +1. Pod restart - Use the rolling update strategy to replace all pods based on the new ENV `PGVERSION` with the version you want to update to. +2. Check - Check that the new `PGVERSION` is larger than the previously used one. +3. Check whether the new `PGVERSION` is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag. + +### Preliminary checks + +1. use initdb to prepare a new data_dir (`data_new`) based on the new `PGVERSION`. +2. check the upgrade possibility with `pg_upgrade --check` + +{{< hint type=info >}}If one of the steps is aborted, a cleanup is performed{{< /hint >}} + +### Prepare the Upgrade +1. remove dependencies that can cause problems. For example, the extensions `pg_stat_statements` and `pgaudit`. +2. activate the maintenance mode of the cluster +3. terminate PostgreSQL in an orderly manner +4. check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location +5. use port `5432` for rsyncd and start it + +### Start the Upgrade + +1. Call pg_upgrade -k to start the Upgrade +{{< hint type=Info >}}if the process failed, we need to rollback, if it was sucessful we're reaching the point of no return{{< /hint >}} +2. Rename the directories. `data -> data_old` and `data_new -> data` +3. Update the Patroni.config (`postgres.yml`) +4. Call Checkpoint on every replica and trigger rsync on the Replicas +5. Wait for Replicas to complete rsxnc. `Timeout: 300` +6. Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid +7. Start Patroni on the Primary and start the postgres locally +8. Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads +9. Wait for every Replica to become ready +10. Disable the maintenance mode for the Cluster +11. Restore custom statistics, analyze these tables and restore dropped objetcs from `Prepare the upgrade` + +### Completion of the upgrade +1. Drop directory `data_old` +2. Trigger new Backup + +### How a rollback is working? +1. Stop rsynd if its running +2. Disable the maintenance mode for the Cluster +3. Drop directory `data_new` + + +## How to trigger a In-Place-Upgrade with cpo? + +``` +spec: + postgresql: + version: "17" +``` +To trigger an In-Place-Upgrade you have just to increase the parameter `spec.postgresql.version`. If you choose a valid number the Operator will start with the prozedure, described above. + +```sh +kubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type='merge' -p \ +'{"spec":{"postgresql":{"version":"17"}}}' +``` + +## Upgrade on cloning + +When cloning, the new cluster manifest must have a higher version number than the source cluster and is created from a base backup. Depending on the cluster size, the downtime can be considerable in this case, as write operations in the database should be stopped and all WAL files should be archived first before cloning is started. Therefore, only use cloning to test major version upgrades and to check the compatibility of your app with the Postgres server of a higher version. + +## manual upgrade via the PostgreSQL container + +In this scenario the major version could then be run by a user from within the primary pod. Exec into the container and run: + +``` +python3 /scripts/inplace_upgrade.py N +``` + +where `N` is the number of members of your cluster (see `numberOfInstances`). The upgrade is usually fast, well under one minute for most DBs. + +{{< hint type=Info >}}Note, that changes become irrevertible once pg_upgrade is called.{{< /hint >}} diff --git a/docs/hugo/content/en/pg_versioning/minor_updates.md b/docs/hugo/content/en/pg_versioning/minor_updates.md new file mode 100644 index 000000000..b584be323 --- /dev/null +++ b/docs/hugo/content/en/pg_versioning/minor_updates.md @@ -0,0 +1,81 @@ +--- +title: "Minor version update" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 2110 +--- + +Minor version updates for PostgreSQL are performed by updating the PostgreSQL container image in use. +With the update object `spec.dockerImage` of the cluster manifest, the operator takes over the update based on the rolling update strategy. This means that the pods are replaced one after the other, with the replicas being updated first and then the old primary after a switchover. The operational interruption should generally last less than 5 seconds (switchover time), but the clients must still reconnect. + +If necessary, the operator also supports the downgrade of minor releases in the same way. + +To install minor version updates, PostgreSQL only requires the binaries to be replaced and the database to be restarted. For more information see [PostgreSQL - Versioning Policy](https://www.postgresql.org/support/versioning/) + +{{< hint type=info >}}This procedure can also be used for all other containers in a cluster. Whether sidecars, exporter, pooler or backup image{{< /hint >}} + + +### Preconditions: +1. Check if there is a newer image for the PostgreSQL container - [Check on Docker hub](https://hub.docker.com/repository/docker/cybertecpostgresql/cybertec-pg-container/general) +2. Check - Check that the new `PGVERSION` is larger than the previously used one. +3. Check whether the new `PGVERSION` is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag. + +### Updating PostgreSQL-Container-Image +Old-Manifest: +```yaml +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 + namespace: cpo +spec: + dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.3-1' +``` +New-Manifest: +```yaml +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 + namespace: cpo +spec: + dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1' +``` +#### Updating via kubectl/oc-client +```sh +kubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type='merge' -p \ +'{"spec":{"dockerImage":"docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1"}}' +``` + +### Updating Exporter-Container-Image + +#### Updating Cluster-Manifest: +Old-Manifest: +```yaml +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 + namespace: cpo +spec: + monitor: + image: 'docker.io/cybertecpostgresql/cybertec-pg-container:exporter-17.3-1' +``` +New-Manifest: +```yaml +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-1 + namespace: cpo +spec: + monitor: + image: 'docker.io/cybertecpostgresql/cybertec-pg-container:exporter-17.4-1' +``` + +#### Updating via kubectl/oc-client +```sh +kubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type='merge' -p \ +'{"spec":{"monitor":{"image":"docker.io/cybertecpostgresql/cybertec-pg-container:exporter-17.4-1"}}}' +``` + diff --git a/docs/hugo/content/en/postgis/_index.md b/docs/hugo/content/en/postgis/_index.md new file mode 100644 index 000000000..c5f1739d2 --- /dev/null +++ b/docs/hugo/content/en/postgis/_index.md @@ -0,0 +1,6 @@ +--- +title: "Postgis" +date: 2024-03-11T14:26:51+01:00 +draft: true +weight: 1800 +--- \ No newline at end of file diff --git a/docs/hugo/content/en/postgis/introduction.md b/docs/hugo/content/en/postgis/introduction.md new file mode 100644 index 000000000..45c588525 --- /dev/null +++ b/docs/hugo/content/en/postgis/introduction.md @@ -0,0 +1,7 @@ +--- +title: "Introduction" +date: 2024-03-11T14:26:51+01:00 +draft: true +weight: 1 +--- +asdasdasd \ No newline at end of file diff --git a/docs/hugo/content/en/project/_index.md b/docs/hugo/content/en/project/_index.md new file mode 100644 index 000000000..e3d86e9fd --- /dev/null +++ b/docs/hugo/content/en/project/_index.md @@ -0,0 +1,6 @@ +--- +title: "CPO" +date: 2024-03-11T14:26:51+01:00 +draft: false +weight: 200 +--- \ No newline at end of file diff --git a/docs/hugo/content/en/project/container_images.md b/docs/hugo/content/en/project/container_images.md new file mode 100644 index 000000000..28c5f2c57 --- /dev/null +++ b/docs/hugo/content/en/project/container_images.md @@ -0,0 +1,32 @@ +--- +title: "Container Images" +date: 2024-03-11T14:26:51+01:00 +draft: false +weight: 202 +--- + +For each version of the operator and the required PostgreSQL and other required containers, the corresponding image is provided on Dockerhub. + +#### Operator container images +The operator images are the central components that control the operation and administration of the PostgreSQL databases. These images are available in the following repository on DockerHub: + +[Operator Images](https://hub.docker.com/repository/docker/cybertecpostgresql/cybertec-pg-operator) + +The repository contains all the necessary images for running the Cybertec PG Operator in a Kubernetes environment. These images are updated regularly to ensure the latest features and security updates. + +#### Additional container images +In addition to the operator images, various container images are required to support a complete PostgreSQL environment. These images are available in the following repository: +[CYBERTEC-PG-Container Images](https://hub.docker.com/repository/docker/cybertecpostgresql/cybertec-pg-container/general) + +This repository contains images for the following components: + +- PostgreSQL: The main database image, which contains all supported major versions of PostgreSQL. The name of the tag always reflects the latest release, e.g. currently `17.4` for PostgreSQL `17.4`. For the other major versions, the corresponding minor versions released by the PostgreSQL community at the same time are included. +- Postgres-GIS: A specialised image that combines PostgreSQL with the PostGIS extension to support spatial data processing functions. You can find more information about Postgis [here](../../postgis). +The tag for Postgis also includes the included version of Postgis. Example: postgres-gis-17.4-34-1 Postgis: `3.4.x` +- PGBackRest: A backup and restore tool developed specifically for PostgreSQL and available as a separate container image. +- Exporter: Images for monitoring PostgreSQL databases that collect metrics and make them available for monitoring tools such as Prometheus. +- PgBouncer: A lightweight connection pooler for PostgreSQL that manages and optimises the number of concurrent connections. + + +#### Extensions +You can view the versions included in the [Extensions](../../extensions/pg17/) section. \ No newline at end of file diff --git a/docs/hugo/content/en/project/project.md b/docs/hugo/content/en/project/project.md new file mode 100644 index 000000000..19a227e6b --- /dev/null +++ b/docs/hugo/content/en/project/project.md @@ -0,0 +1,56 @@ +--- +title: "The Project" +date: 2024-03-11T14:26:51+01:00 +draft: false +weight: 201 +--- +The CYBERTEC PostgreSQL Operator (CPO) enables the simple provision and management of PostgreSQL clusters on Kubernetes. It reduces the administration effort and facilitates the management of single-node and HA clusters. +## Main components +- [CYBERTEC-pg-operator](https://github.com/cybertec-postgresql/CYBERTEC-pg-operator): Kubernetes operator for the automation of PostgreSQL clusters. +- [CYBERTEC-pg-container](https://github.com/cybertec-postgresql/CYBERTEC-pg-container): Docker container suite for PostgreSQL, Patroni and etcd for the provision of HA clusters. +- [CYBERTEC-operator-tutorials](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials): Tutorials and instructions for installing and using the operator. +## Features +- Cluster management: + - Single-node and HA (High Availability) clusters via [Patroni](https://patroni.readthedocs.io/en/latest/) + - Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing + - Automated failover + - Live volume resize without pod restarts + - Basic credential and user management on K8s, eases application deployments + - Compatible with OpenShift and Rancher +- PostgreSQL compatibility: + - Supports PostgreSQL versions 13 to 17 + - Inplace upgrades for smooth version changes and minimal downtime + - Extensive extension support, including pgAudit, TimescaleDB and PostGIS + - Standby-Cluster +- Backup & Restore: + - Integrated pgBackRest support + - Automatic backups + - Point-in-Time- and Snapshot-based Restores / Disaster Recovery +- Connection management: + - pgBouncer for connection pooling +- Monitoring & alerting stack + - Integrated metrics exporter + - Prometheus, alert manager for metrics collection and alerting + - Grafana for visual monitoring of the clusters +- Operator UI: + - Web interface for managing clusters + +## Installation +Detailed instructions on installation and configuration can be found in the CYBERTEC operator tutorials and in the following chapters +Example of installation via Helm: +``` +helm repo add cybertec https://cybertec-postgresql.github.io/helm-charts/ +helm install pg-operator cybertec/cybertec-pg-operator +``` + +More information: [Installation]({{< relref "installation/install_operator" >}}) + +## Contribution +This project is open source, and contributions to its further development are expressly encouraged. +Possible forms of contribution: +- Bug reports and feature requests +- Code contributions (pull requests welcome) +- Improvement of the documentation +Further details on contributions can be found in the respective GitHub repositories. +## Licence +The CYBERTEC PostgreSQL Operator is licensed under the Apache 2.0 licence. \ No newline at end of file diff --git a/docs/hugo/content/en/quickstart/_index.md b/docs/hugo/content/en/quickstart/_index.md new file mode 100644 index 000000000..4419cb715 --- /dev/null +++ b/docs/hugo/content/en/quickstart/_index.md @@ -0,0 +1,112 @@ +--- +title: "Quickstart" +date: 2023-03-07T14:26:51+01:00 +draft: false +weight: 400 +--- + +We can tell and document so much about our project but it seems you just want to get started. Let us show you the fastest way to use CPO. + +## Preconditions + +- git +- helm (optional) +- kubectl or oc + +## Let's start + +### Step 1 - Preparations +To get started, you can fork our tutorial repository on Github and then download it. +[CYBERTEC-operator-tutorials](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/fork) + +``` +git clone https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials.git +cd CYBERTEC-operator-tutorials +``` + +### Step 2 - Install the Operator +Two options are available for the installation: +- Installation via Helm-Chart (local or via helmn-repo) +- Installation via apply + +#### Installation via Helm-Chart + +If you want to use the helm-chart, YOU can decide for yourself whether you want to use the helm-cahrt from the operator-tutorials on github or directly connect the helm-repo for the cpo-project and install the helm-chart over it. + +``` +#add helm-repo (optional) + helm repo add cpo https://cybertec-postgresql.github.io/CYBERTEC-operator-tutorials + kubectl apply -n cpo -k setup/namespace/. + helm install -n cpo cpo cpo/postgres-operator + +or + +# use local helm-chart from git + kubectl apply -n cpo -k setup/namespace/. + helm install cpo -n cpo setup/helm/operator/ +``` + +#### Installation via apply +``` +kubectl apply -n cpo -k setup/namespace/. +kubectl apply -n cpo -k setup/helm/operator/. +``` + +You can check if the operator pod is in operation. +``` +kubectl get pods -n cpo --selector=cpo.cybertec.at/pod/type=postgres-operator +``` +The result should look like this: +``` +NAME READY STATUS RESTARTS AGE +postgres-operator-599688d948-fw8pw 1/1 Running 0 41s +``` + +The operator is ready and the setup is complete. The next step is the creation of a Postgres cluster + +### Step 3 - Create a Cluster +To create a simple cluster, the following command is sufficient +``` +kubectl apply -n cpo -f cluster-tutorials/single-cluster +``` + +``` +watch kubectl get pods -n cpo --selector cluster-name=cluster-1 +``` +The result should look like this: +``` +Alle 2.0s: kubectl get pods -n cpo --selector cluster-name=cluster-1 + +NAME READY STATUS RESTARTS AGE +cluster-1-0 2/2 Running 0 28s +cluster-1-1 0/2 PodInitializing 0 9s +``` + +### Step 4 - Connect to the Database +Get your login information from the secret. +``` +kubectl get secret -n cpo postgres.cluster-1.credentials.postgresql.cpo.opensource.cybertec.at -o jsonpath='{.data}' | jq '.|map_values(@base64d)' +``` +The result should look like this: +``` +{ + "password": "2rZG1Kx9asdHscswQGzff4Ru0xW6uasacy3GQ0sjdCH3wWr0kguUXUZek6dkemsf", + "username": "postgres" +} +``` +#### Connection via port-forward + +``` +kubectl port-forward -n cpo cluster-1-0 5432:5432 +``` + +``` +# using psql +PGPASSWORD=2rZG1Kx9asdHscswQGzffjdCH3wWr0kguUXUZek6dkemsf psql -h 127.0.0.1 -p 5432 -U postgres + +# using usql +PGPASSWORD=2rZG1Kx9asdHscswQGzffjdCH3wWr0kguUXUZek6dkemsf usql postgresql://postgres@127.0.0.1/postgres +``` + +## Next Steps +Congratulations, your first cluster is ready and you were able to connect to it. On the following pages we have put together an introduction with lots of information and details to show you the different possibilities and components of CPO. \ No newline at end of file diff --git a/docs/hugo/content/en/release_notes/_index.md b/docs/hugo/content/en/release_notes/_index.md new file mode 100644 index 000000000..b62aa7778 --- /dev/null +++ b/docs/hugo/content/en/release_notes/_index.md @@ -0,0 +1,200 @@ +--- +title: "Release-Notes" +date: 2024-03-11T14:26:51+01:00 +draft: false +weight: 2500 +--- + +### 0.8.3 + +#### Fixes +- Majorupgrade updated for Patroni 4.x.x +- Fixes for PGEE +- Fix for Monitoring-User +- Dependency updates and several small changes + +#### Supported Versions + +- PG: 13 - 17 +- Patroni: 4.0.5 +- pgBackRest: 2.54.2 +- Kubernetes: 1.21 - 1.32 +- Openshift: 4.8 - 4.18 + +### 0.8.2 + +#### Features +- Added Clone-Functionality with pgBackRest + +#### Supported Versions + +- PG: 13 - 17 +- Patroni: 3.3.2 +- pgBackRest: 2.54.0 +- Kubernetes: 1.21 - 1.32 +- Openshift: 4.8 - 4.18 + +### 0.8.1 + +#### Features +- Added pgbackrest to Monitoring + +#### Fixes +- Fixed role creation for monitoring + +#### Supported Versions + +- PG: 13 - 17 +- Patroni: 3.3.2 +- pgBackRest: 2.53 +- Kubernetes: 1.21 - 1.32 +- Openshift: 4.8 - 4.18 + +### 0.8.0 + +#### Features +- Multisite - Support +- use icu as default for pg > 14 + +#### Fixes +- Fixed role creation for monitoring. +- Fix for the use of gcs with pgBackRest + +#### Supported Versions + +- PG: 13 - 16 & 17Beta2 +- Patroni: 3.3.2 +- pgBackRest: 2.53 +- Kubernetes: 1.21 - 1.32 +- Openshift: 4.8 - 4.18 + +### 0.7.1 + +#### Fixes +- Fixed role creation for monitoring. +- Fix for the use of gcs with pgBackRest + +#### Supported Versions + +- PG: 13 - 16 & 17Beta2 +- Patroni: 3.3.2 +- pgBackRest: 2.53 +- Kubernetes: 1.21 - 1.28 +- Openshift: 4.8 - 4.13 + +### 0.7.0 + +#### Features +- Monitoring-Sidecar integrated via CRD [Start with Monitoring](documentation/cluster/monitoring) +- Password-Hash per default set to scram-sha-256 +- pgBackRest with blockstorage using RepoHost +- Internal Certification-Management for RepoHost-Certificates +- Compatible with PG17Beta2 + +#### Changes +- API Change acid.zalan.do is replaced by cpo.opensource.cybertec.at - If you're updating your Operator from previous Versions, please check this [HowTo Migrate to new API](documentation/operator/migrateToNewApi/) +- Patroni-Compatibility has increased to Version 3.3.2 +- pgBackRest-Compatbility has increased to Version 2.52.1 +- Revision of the restore process +- Revision of the backup jobs +- Operator now using Rocky9 as Baseimage +- Updates Go-Package to 1.22.5 + +#### Fixes +- PDB Bug fixed - Single-Node Clusters are not creating PDBs anymore which can break Kubernetes-Update +- Wrong Templates inside Cronjobs fixed + +#### Supported Versions + +- PG: 13 - 16 & 17Beta2 +- Patroni: 3.3.2 +- pgBackRest: 2.52.1 +- Kubernetes: 1.21 - 1.28 +- Openshift: 4.8 - 4.13 + +### 0.6.1 + +Release with fixes + +#### Fixes +- Backup-Pod now runs with "best-effort" resource definition +- Der Init-Container für die Wiederherstellung verwendet nun die gleiche Ressource-Definition wie der Datenbank-Container, wenn es keine spezifische Definition im Cluster-Manifest gibt (spec.backup.pgbackrest.resources) + +#### Software-Versions + +- PostgreSQL: 15.3 14.8, 13.11, 12.15 +- Patroni: 3.0.4 +- pgBackRest: 2.47 +- OS: Rocky-Linux 9.1 (4.18) +

+___ +

+### 0.6.0 + +Release with some improvements and stabilisation measuresm + +#### Features +- Added [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) +- Added support for TDE based on the CYBERTEC PostgreSQL Enterprise Images (Licensed Container Suite) + +#### Software-Versions + +- PostgreSQL: 15.3 14.8, 13.11, 12.15 +- Patroni: 3.0.4 +- pgBackRest: 2.47 +- OS: Rocky-Linux 9.1 (4.18) +

+___ +

+### 0.5.0 + +Release with new Software-Updates and some internal Improvements +### Features +- Updated to Zalando Operator 1.9 + +#### Fixes +- internal Problems with Cronjobs +- updates for some API-Definitions + +#### Software-Versions + +- PostgreSQL: 15.2 14.7, 13.10, 12.14 +- Patroni: 3.0.2 +- pgBackRest: 2.45 +- OS: Rocky-Linux 9.1 (4.18) +

+___ +

+### 0.3.0 + +Release with some improvements and stabilisation measuresm + +#### Fixes +- missing pgbackrest_restore configmap fixed + +#### Software-Versions + +- PostgreSQL: 15.1 14.7, 13.9, 12.13, 11.18 and 10.23 +- Patroni: 3.0.1 +- pgBackRest: 2.44 +- OS: Rocky-Linux 9.1 (4.18) +

+___ +

+### 0.1.0 + +Initial Release as a Fork of the Zalando-Operator + +#### Features + +- Added Support for pgBackRest (PoC-State) + - Stanza-create and Initial-Backup are executed automatically + - Schedule automatic updates (Full/Incremental/Differential-Backup) + - Securely store backups on AWS S3 and S3-compatible storage + +#### Software-Versions + +- PostgreSQL: 14.6, 13.9, 12.13, 11.18 and 10.23 +- Patroni: 2.4.1 +- pgBackRest: 2.42 +- OS: Rocky-Linux 9.0 (4.18) diff --git a/docs/hugo/content/en/resources/_index.md b/docs/hugo/content/en/resources/_index.md new file mode 100644 index 000000000..5f29fc12a --- /dev/null +++ b/docs/hugo/content/en/resources/_index.md @@ -0,0 +1,57 @@ +--- +title: "Apply Ressources" +date: 2024-04-28T14:26:51+01:00 +draft: false +weight: 700 +--- + +Kubernetes workloads are often deployed without a direct resource definition. This means that, apart from the limits specified by the administrators, the workloads can use the required resources of the worker node very dynamically. + +The cluster manifest is used to define the Postgres pod resources via the typical resources objects. + +There are basically two different definitions: +- `requests`: Basic requirement and guaranteed by the worker node +- `limits`: maximum availability, allocation is increased dynamically if the worker node can provide the resources. + +For the planning of the cluster, a proper definition should be carried out in terms of the required hardware, which is then defined as `requests`. These resources are thus guaranteed to the cluster and are taken into account when deploying the pod. Accordingly, a pod can only be deployed on a worker if it can provide these resources. Any limits beyond this are not taken into account when deploying. + +The unit of measurement should be taken into account when planning the necessary CPUs: +cpu specifications are based on millicores +- `1 cpu` corresponds to `1 core` +- `1 core `corresponds to `1000 millicores (m)` +- `1/2 core` corresponds to `500 m` + +``` + resources: + limits: + cpu: 500m + memory: 1Gi + requests: + cpu: 1000m + memory: 1Gi +``` + +This example corresponds to a guaranteed availability of half a core and 1 Gibibyte. However, if necessary and available, the container can use up to one core. The allocation takes place dynamically and for the required time. + +Pods can be categorised into three Quality of Services (QoS) based on the defined information on the resources. + +- `Best-Effort`: The containers of a pod have no resource information +- `Burstable`: A container of the pod has a memory or CPU `requests` or `limits`. +- `Guaranteed`: Each container of a pod has both cpu and memory `requests` and `limits`. In addition, the details of the respective `limits` correspond to the `requests` details + +If you would like more information and explanations, you can take a look at the [Kubernetes documentation on QoS](https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/#qos-classes). + +We generally recommend using the Guaranteed Status for PostgreSQL workloads. However, many users very successfully use the deviation of the CPU limit by factors such as 2. +For example: +``` + resources: + limits: + cpu: 1000m + memory: 1Gi + requests: + cpu: 2000m + memory: 1Gi +``` +This is intended to create the possibility of additional CPU resources for sudden load peaks. + +{{< hint type=Info >}}The use of burstable definitions does not release you from a correct resource calculation, as `limits` resources are not guaranteed and therefore an undersupply can occur if the requests are not properly defined.{{< /hint >}} diff --git a/docs/hugo/content/en/restore/_index.md b/docs/hugo/content/en/restore/_index.md new file mode 100644 index 000000000..da757e8f7 --- /dev/null +++ b/docs/hugo/content/en/restore/_index.md @@ -0,0 +1,83 @@ +--- +title: "Restore" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1400 +--- + +Restore or recovery is the process of starting a PostgreSQL instance or a cluster based on a defined and existing backup. This can be just a Backup or a combination of a Backup and additional WAL files. The difference is that a Backup represents a fixed point in time, whereas the combination with WAL enables a point-in-time recovery(PITR). + +You can find more information about backups [here](../backup/introduction/) + +### Rescue my cluster + +CPO enables the restore based on an existing backup using pgBackRest. To do this, it needs the relevant information about the point in time or snapBackupshot to which it should restore and where the data for this comes from. +As we have already provided the operator with all the information relating to the storage of backups in the previous chapter, it only needs the following information: +- `id`: Control variable, must be increased for each restore process +- `type`: What type of restore is required +- `repo`: Which repo the data should come from +- `set`: Specific Backup to restore - Check [backup](../backup/check_backups/) to see how to get the identifier + +{{< hint type=Info >}}To ensure that the operator does not repeat an already done restore, the defined object `id` in the restore section is saved by the operator, so the value of this `id` must be changed for a new restore.{{< /hint >}} + +#### Details for a Backup restore +With this information, we define a fixed Backup from `repo1` and that pgBackRest should stop at the end of the Backup +``` +restore: + id: '1' + options: + type: 'immediate' + set: '20240515-164100F' + repo: 'repo1' +``` + +{{< hint type=info >}} Without the specification `--type=immediate`, pgBackRest would then consume the entire WAL that is available and thus restore the last available consistent data point. {{< /hint >}} + +#### Details for a point-in-time recoery (PITR) +We use this information to define a point-in-time recovery (PITR) and define the end point using a timestamp and the start point using a Backup specification. The latter is optional. Without this information, pgBackRest would automatically start at the last previous full Backup. +``` +restore: + id: '1' + options: + type: 'time' + set: '20240515-164100F' + target: '2024-05-16 07:46:05.506817+00' + + repo: '1' +``` +{{< hint type=info >}}`--type=time` indicates that it is a point-in-time recovery (PITR). {{< /hint >}} + +## Example in a cluster manifest + +``` +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: cluster-5 + namespace: cpo +spec: + backup: + pgbackrest: + configuration: + secret: cluster-1-pvc-credentials + global: + repo1-retention-full: '7' + repo1-retention-full-type: count + image: 'docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1' + repos: + - name: repo1 + schedule: + full: 30 2 * * * + storage: pvc + volume: + size: 1Gi + restore: + id: '1' + options: + type: 'time' + set: '20240515-164100F' + target: '2024-05-16 07:46:05.506817+00' +``` +An example of this can also be found in our tutorials. For a point-in-time recovery (PITR) you can find it [here](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/restore_pitr). + +{{< hint type=warning >}} Incorrect information for the Backup or the timestamp can result in pgBackRest not being able to complete the restore successfully. In the event of an error, the information must be corrected and another restore must be started. {{< /hint >}} diff --git a/docs/hugo/content/en/standby-cluster/_index.md b/docs/hugo/content/en/standby-cluster/_index.md new file mode 100644 index 000000000..744793c57 --- /dev/null +++ b/docs/hugo/content/en/standby-cluster/_index.md @@ -0,0 +1,65 @@ +--- +title: "Standby Cluster" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 2080 +--- + +A standby cluster is an independent PostgreSQL cluster that consists of a standby leader and optionally further replicas (if `numberOfInstances` > 1). The standby leader runs in read-only mode and does not accept any write operations. A standby cluster can be promoted to a primary cluster if required, whereby the standby leader becomes a fully-fledged leader and allows write operations. + +### Preconditions: +The primary cluster must either: +- be accessible from the standby cluster via streaming replication +- the backup storage used by the standby cluster (S3, GCS or Azure Blob) must be accessible for the standby cluster + +The passwords for the Postgres user, the replication user and the exporter user (if monitoring is active) must be created as a secret for the standby cluster. Otherwise connection problems will occur + +### Create standby cluster + +The `standby` object in the cluster manifest is required to create a standby cluster. + +```yaml +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: standby-cluster-1 +spec: + standby: + standby_host: "cluster-1.cpo" + standby_port: "5432" + dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1' + numberOfInstances: 1 + postgresql: + version: '17' + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 500m + memory: 500Mi + teamId: acid + volume: + size: 5Gi +``` + +The primary cluster must be accessible from the standby cluster. It can be located in the same Kubernetes cluster or in a different one. + +- `standby_host`: Corresponds to the endpoint via which the primary pod can be reached. It can be a kubernetes-internal DNS name or an IP or DNS name that can be reached in the network. +- `standby_port`: Corresponds to the PostgreSQL port used (default 5432) + + +### Promoting cluster + +To promote a cluster, it is only necessary to remove the standby object. +The cluster is then promoted to a primary cluster. + +```sh +kubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type='merge' -p \ +'{"spec":{"standby":null}}' +``` + + +### Limitations +A primary cluster cannot be demoted to a standby cluster. +If necessary, the recommendation is to create a new cluster as a standby cluster. \ No newline at end of file diff --git a/docs/hugo/content/en/storage/_index.md b/docs/hugo/content/en/storage/_index.md new file mode 100644 index 000000000..f4e4b070b --- /dev/null +++ b/docs/hugo/content/en/storage/_index.md @@ -0,0 +1,98 @@ +--- +title: "Storage" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 800 +--- +Storage is crucial for the performance of a database and is therefore a central element. As with systems based on bare metal or virtual machines, the same requirements apply to Kubernetes workloads, such as constant availability, good performance, consistency and durability. + +A basic distinction is made between local storage, which is directly connected to the worker node, and network storage, which is mounted on the worker node and thus made available to the pod. + +In probably the vast majority of Kubernetes systems, network storage is used, for example from systems from hyperscalers or other cloud providers or own systems such as CEPH. + +With network storage in particular, attention must be paid to performance in terms of throughput (speed and guaranteed IOPS) and, above all, latency. It is also important to ensure that the different volumes do not compete with each other in terms of load. + +> **_PAY ATTENTION:_** Before using a CPO cluster, make sure that the storage is suitable for the intended use and provides the necessary performance. In addition, check the storage with benchmarks before use. We recommend the use of [pgbench](https://www.postgresql.org/docs/current/pgbench.html) for this purpose. + +## Define Storage-Volume + +The storage is defined via the volume object and enables the size and storage class for the storage to be defined, among other things. +``` +spec: + volume: + size: 5Gi + storageClass: default-provisioner + ... +``` + +The volume is currently used for both PG and WAL data. In future, there will be an optional option to create a separate WAL volume. +Please check our [roadmap](roadmap) + +{{< hint type=Info >}}Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod.{{< /hint >}} + +The volume is currently used for both PG and WAL data. In future, there will be an optional option to create a separate WAL volume. + +## Expanding Volume + +{{< hint type=Info >}}Kubernetes is able to forward requests to expand the storage to the storage system and enable the expand without the need to restart the container. However, this also requires the associated storage system and the driver used to support this. This information can be found in the storage class under the object: allowVolumeExpansion. A distinction must also be made between online and offline expand. The latter requires a restart of the pod. To do this, the pod must be deleted manually.{{< /hint >}} + +To Expand the Volume, the value of the object volume.size must be increased +``` +spec: + volume: + size: 10Gi + storageClass: default-provisioner + ... +``` +This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc. +``` +kubectl get pvc pgdata-cluster-1-0 -o yaml +------------------------------------------------------- +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + storageClassName: crc-csi-hostpath-provisioner + volumeMode: Filesystem + volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37 +status: + accessModes: + - ReadWriteOnce + capacity: + storage: 5Gi + phase: Bound +``` + +## Creating additonal Volumes +The Operator allows you to modify your cluster with additonal Volumes. +``` +spec: + ... + additionalVolumes: + - name: empty + mountPath: /opt/empty + targetContainers: + - all + volumeSource: + emptyDir: {} +``` +This example will create an emptyDir and mount it to all Containers inside the Database-Pod. + + +## Specific Settings for aws gp3 Storage +For the gp3 Storage aws you can define more informations +``` + volume: + size: 1Gi + storageClass: gp3 + iops: 1000 # for EBS gp3 + throughput: 250 # in MB/s for EBS gp3 + +``` +The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput [AWS docs](https://aws.amazon.com/ebs/general-purpose/). + +To ensure that the settings are updates properly please define the Operator-Configuration 'storage_resize_mode' from default to 'mixed' diff --git a/docs/hugo/content/en/tde/_index.md b/docs/hugo/content/en/tde/_index.md new file mode 100644 index 000000000..ce8a20e13 --- /dev/null +++ b/docs/hugo/content/en/tde/_index.md @@ -0,0 +1,88 @@ +--- +title: "TDE" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 2200 +--- +## What is Transparent Data Encryption (TDE)? + +Transparent Data Encryption (TDE) is a technology for encrypting databases at file level. The data is automatically encrypted before it is stored on the storage medium and decrypted transparently for authorised applications and users if required. This ensures that the data is protected at rest without the need for changes to existing applications. TDE is used by various database vendors such as Microsoft, Oracle and IBM to increase the security of database files. + +### Difference between hard disk encryption and TDE + +Hard disk encryption, also known as Full Disk Encryption (FDE), encrypts the entire hard disk or individual partitions to prevent unauthorised access to sensitive data. This method protects all data on a system, including the operating system, but only when the system is switched off. As soon as an authorised user logs on, the encryption is removed and the data is accessible to anyone who can access the computer while the user is logged on. + +In contrast, TDE specifically encrypts the database files at file level. Encryption is transparent to the applications accessing the database and protects the data at rest, regardless of the status of the operating system or hardware. This provides an additional protection mechanism, especially in scenarios where hard disk encryption is not sufficient or not implemented. + + +### Advantages of TDE + +- **Protection of data at rest**: Data on the storage medium is encrypted, reducing the risk of data leaks. +- **Transparency for applications**: Encryption is done directly at database level, so no changes to existing applications are required. +- **Integration with PGEE**: Full support in Kubernetes environments and other modern IT infrastructures. +- **Fulfilment of regulatory requirements**: Support for compliance requirements such as GDPR, HIPAA and other data protection standards. +- **Additional security features**: In combination with other PGEE features such as data masking and obfuscation, comprehensive protection of sensitive data is ensured. + +Further information on TDE and PGEE can be found here: [CYBERTEC TDE](https://www.cybertec-postgresql.com/en/products/postgresql-transparent-data-encryption/). + +## Securing clusters with TDE + +The CYBERTEC pg operator, together with Patroni, takes over the setup and administration of the TDE functionality in conjunction with the cost-effective PGEE containers + +### Preconditions +- CYBERTEC-pgee-container +- Valid licence agreement for PGEE + +### Deploy a TDE-Cluster + +Setting up a TDE cluster is basically the same as setting up a conventional cluster. +The only difference is the defined Postgres. container and the object TDE.enabled: true, which instructs the operator to initialise the database with the TDE functionality. + +```yaml +apiVersion: cpo.opensource.cybertec.at/v1 +kind: postgresql +metadata: + name: tde-cluster-1 + namespace: cpo +spec: + dockerImage: 'containers.cybertec.at/cybertec-pgee-container/postgres:rocky9-17.4-1' + numberOfInstances: 1 + postgresql: + version: '17' + resources: + limits: + cpu: 250m + memory: 500Mi + requests: + cpu: 250m + memory: 500Mi + tde: + enable: true + teamId: acid + volume: + size: 5Gi +``` +- `dockerImage` - Must contain a PostgreSQL image of the pgee container suite +- `tde.enabled`- initialises the DB with TDE + +{{< hint type=important >}} Please note that the activation of TDE is only possible when creating new clusters. Subsequent activation is not possible. {{< /hint >}} + +### Check TDE-Status + +```sh +[postgres@tde-cluster-1-0 ~]$ psql +psql (17.4 EE 1.4.1) + ____ ____ _____ _____ +| _ \ / ___| ____| ____| +| |_) | | _| _| | _| +| __/| |_| | |___| |___ +|_| \____|_____|_____| +PostgreSQL EE by CYBERTEC +Type "help" for help. + +postgres=# show data_encryption; + data_encryption +----------------- + on +(1 row) +``` \ No newline at end of file diff --git a/docs/hugo/content/en/tls/_index.md b/docs/hugo/content/en/tls/_index.md new file mode 100644 index 000000000..488ca9d03 --- /dev/null +++ b/docs/hugo/content/en/tls/_index.md @@ -0,0 +1,120 @@ +--- +title: "TLS/SSL connections" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 1600 +--- +Each cluster created is automatically equipped with a self-generated TLS certificate and is preconfigured for the use of TLS/SSL. However, this certificate is not based on a Certificate Authority (CA) that is known to the clients. This means that although communication between the client and server is encrypted, the certificate cannot be verified by the client. + +The following chapter deals with the creation of custom certificates and the steps required to integrate these certificates into the PostgreSQL cluster. In the example, a custom CA is created, on the basis of which the certificates are then generated and signed by this CA. This step can be skipped if certificates have already been obtained from another trusted organisation. + +### Create a custom CA and Certificates +{{< hint type=important >}} Precondition: This chapter requires openssl {{< /hint >}} +#### Create the CA +The first step is to create a custom CA. An organisation name is required for this. You can also add further details about the country, district and location. +The CA serves as the central authority that signs the certificates and thus guarantees the correctness of the certificate. In order to successfully complete the verification of a certificate, the CA's certificate must be stored on the client system. +``` +ORGANIZATION=MyCustomOrganization +CA=$ORGANIZATION-RootCA + +mkdir $CA +cd $CA + +# Creating the CA-Key +openssl genpkey -algorithm EC -out $CA.key -pkeyopt ec_paramgen_curve:secp384r1 -pkeyopt ec_param_enc:named_curve -aes256 + +# Creating the CA-Certificate +openssl req -x509 -new -nodes -key $CA.key -sha512 -days 1826 -out $CA.crt -subj "/CN=${ORGANIZATION} Root-CA/C=AT/ST=Lower Austria/L=Woellersdorf/O=${ORGANIZATION}" + +``` + +#### Create a custom Certificate +The server needs a certificate signed by a CA and a private key so that it can claim to be trustworthy. + +{{< hint type=important >}} It is important that the CA certificate is stored as trustworthy with the client. Otherwise, no certificate check is possible. {{< /hint >}} + + +``` +CN=cluster-1 +DNS2="${CN}-repl" +DNS3="${CN}-pooler" +DNS4="${CN}-pooler-repl" + +# Creating the private Key +openssl genpkey -algorithm EC -out $CN.key -pkeyopt ec_paramgen_curve:secp384r1 -pkeyopt ec_param_enc:named_curve + +# Creating Certificate Signing Request (CSR)) +openssl req -new -key $CN.key -out $CN.csr \ + -subj "/C=AT/ST=Lower Austria/L=Woellersdorf/O=${ORGANIZATION}/OU=OrgUnit/CN=${CN}" \ + -addext "subjectAltName=DNS:${CN},DNS:${DNS2},DNS:${DNS3},DNS:${DNS4}" + + +# Sign CSR with the CA +openssl x509 -req -in $CN.csr -CA $CA.crt -CAkey $CA.key -CAcreateserial -out $CN.crt -days 365 \ + -extfile <(echo -e "[ v3_req ]\nsubjectAltName=DNS:${CN},DNS:${DNS2},DNS:${DNS3},DNS:${DNS4}") -extensions v3_req + +``` + +#### Add Certicate to the Cluster + +For adding the Certificate to your cluster a secret on kubernetes is needed. +There are two different options here. +For the first option, a secret is created that contains all the necessary information. I.e. +- Server certificate +- Private server key +- CA certificate +In the second variant, the CA certificate is separated and written in a separate secret. The advantage of this is that the CA only needs to be saved once and changed in the event of an update. + +##### First Option: Using one secret for all three objects + +``` +kubectl create secret generic cluster-1-tls \ + --from-file=tls.crt=$CN.crt \ + --from-file=tls.key=$CN.key \ + --from-file=ca.crt=$CA.crt +``` + +Finally, the definition is made in the cluster manifest so that the operator adapts the cluster. + +```yaml +apiVersion: "cpo.opensource.cybertec.at/v1" +kind: postgresql +... +metadata: + name: cluster-1 +spec: + tls: + secretName: "cluster-1-tls" + caFile: "ca.crt" +``` + +##### Second Option: Using a separat Secret for the CA + +``` +kubectl create secret generic cpo-root-ca --from-file=ca.crt=ca.crt +``` + +``` +kubectl create secret generic cluster-1-tls \ + --from-file=tls.crt=$CN.crt \ + --from-file=tls.key=$CN.key \ +``` + +Finally, the definition is made in the cluster manifest so that the operator adapts the cluster. + +```yaml +apiVersion: "cpo.opensource.cybertec.at/v1" +kind: postgresql + +metadata: + name: cluster-1 +spec: + tls: + secretName: "cluster-1-tls" + caSecretName: "cpo-root-ca" + caFile: "ca.crt" +``` + +A regular check of the mounted certificates takes place automatically within the container. This check takes place every 5 minutes. If the certificates have been updated, the certificates are loaded automatically. + +{{< hint type=important >}} In addition to generating the certificates independently, [cert-manager](https://cert-manager.io/docs/) can also be used for this purpose. {{< /hint >}} diff --git a/docs/hugo/content/en/tutorials/_index.md b/docs/hugo/content/en/tutorials/_index.md new file mode 100644 index 000000000..1eb96870d --- /dev/null +++ b/docs/hugo/content/en/tutorials/_index.md @@ -0,0 +1,65 @@ +--- +title: "Tutorials" +date: 2023-12-28T14:26:51+01:00 +draft: false +weight: 2300 +--- +# Overview: CYBERTEC Operator Tutorials + +In this repository we provide various tutorials that demonstrate the use of the CYBERTEC operator. The tutorials contain cluster snippets that can be used directly with `kubectl`. + +## Using the tutorials + +The snippets provided can be deployed in two ways: + +- **With `kubectl apply -f`**: Use this method to apply a YAML file directly. +- With `kubectl apply -k`**: Use this method to execute kustomise-supported deployments. + +## Repository + +The repository with all tutorials can be found here: + +[CYBERTEC Operator Tutorials](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials) + +### Cluster tutorials + +The specific cluster tutorials are available under the following path + +🔗 [Operator Helm-Chart](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/setup/helm/operator) + +🔗 [Cluster Tutorials](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials) + +#### Overview + +🔗 [Single Cluster](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/single-cluster) + +🔗 [Cluster-configured users and databases](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/configure_users_and_databases) +🔗 [Cluster with prepared databases](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/prepared_databases) + +🔗 [HA-Cluster](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/high-availability-cluster) + +🔗 [Cluster with Backup via PVC](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/pgbackrest_with_pvc) +🔗 [Cluster with Backup via S3](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/pgbackrest_with_s3) +🔗 [Cluster with Backup via GCS](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/pgbackrest_with_gcs) + +🔗 [Restore Cluster](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/restore) + +🔗 [Cluster with Pooler](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/cluster-with-pooler) + +🔗 [Cluster with Monitoring](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/monitored_cluster) + +🔗 [Cluster-Clone via PVC](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/clone_with_pvc) +🔗 [Cluster-Clone via S3](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/clone_with_s3) + +🔗 [Standby Cluster](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/standby-cluster) + +🔗 [Multisite-Cluster](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/multisite) + +🔗 [TDE-Cluster](https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/tde-cluster) + + + + + + +Good luck trying it out! 🚀 \ No newline at end of file diff --git a/docs/hugo/go.mod b/docs/hugo/go.mod new file mode 100644 index 000000000..ad58e25dc --- /dev/null +++ b/docs/hugo/go.mod @@ -0,0 +1,5 @@ +module github.com/cybertec-postgresql/cybertec-pg-operator + +go 1.22.5 + +require github.com/cybertec-postgresql/hugo-geekdoc v0.0.0-20250130133505-d46e0dcc47c7 // indirect diff --git a/docs/hugo/go.sum b/docs/hugo/go.sum new file mode 100644 index 000000000..c36f9a4c3 --- /dev/null +++ b/docs/hugo/go.sum @@ -0,0 +1,2 @@ +github.com/cybertec-postgresql/hugo-geekdoc v0.0.0-20250130133505-d46e0dcc47c7 h1:l2xJB771iUIMN0zU1NKfFVqgnS0bQRFdCkVJhxVX7r4= +github.com/cybertec-postgresql/hugo-geekdoc v0.0.0-20250130133505-d46e0dcc47c7/go.mod h1:y+YYT9rdvbhqlFG8MvkmuP8A8Z2+WkraYEdLghEZLbs= diff --git a/docs/hugo/hugo.toml b/docs/hugo/hugo.toml new file mode 100644 index 000000000..600fa5515 --- /dev/null +++ b/docs/hugo/hugo.toml @@ -0,0 +1,13 @@ +baseURL = "https://cybertec-postgresql.github.io/CYBERTEC-pg-operator" +title = "CYBERTEC-PG-Operator" + +defaultContentLanguage = "en" + +[languages.en] +languageName = "English" +contentDir = "content/en" +weight = 10 + +[module] +[[module.imports]] +path = 'github.com/cybertec-postgresql/hugo-geekdoc' diff --git a/docs/hugo/layouts/shortcodes/back.html b/docs/hugo/layouts/shortcodes/back.html new file mode 100644 index 000000000..f9f10936a --- /dev/null +++ b/docs/hugo/layouts/shortcodes/back.html @@ -0,0 +1 @@ +⬅ Back to Parent \ No newline at end of file diff --git a/docs/hugo/public/404.html b/docs/hugo/public/404.html new file mode 100644 index 000000000..6e83a4a06 --- /dev/null +++ b/docs/hugo/public/404.html @@ -0,0 +1,566 @@ + + + + + + + + + + + + Lost? Don't worry + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+
+
+ +
+
+
Lost?
+
Error 404
+
+ Seems like what you are looking for can't be found. Don't worry, we can bring you back to the homepage. + +
+
+
+
+ + + + +
+ + diff --git a/docs/hugo/public/architecture/architecture/index.html b/docs/hugo/public/architecture/architecture/index.html new file mode 100644 index 000000000..3c8a35743 --- /dev/null +++ b/docs/hugo/public/architecture/architecture/index.html @@ -0,0 +1,5248 @@ + + + + + + + + + + + + + Architecture | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Architecture

+
+
+ +

This chapter covers all important aspects relating to the architecture of CPO and the associated components. In addition to the underlying Kubertnetes, the various components and their interaction for the operation of a PostgreSQL cluster are analysed.

+
+

+ Brief overview of the components +

+ + + +
+ +
+

+ Network-Traffic +

+ + + +
+
+

+ PG-Cluster-intern Traffic +

+ + + +
+

With internal PG cluster-internal traffic, we are talking about all traffic that is necessary for the operation of the cluster itself. This includes

+
    +
  • Communication for the sync of the replicas: +
      +
    • pg_basebackup & streaming replication
    • +
    +
  • +
  • Communication with pgBackRest (if configured) +
      +
    • Backups
    • +
    • WAL archiving
    • +
    • replica-create for new replicas
    • +
    +
  • +
+

The figure below shows the internal traffic flows with pgBackRest based on block storage (left) or cloud storage (right)

+ + +
+

+ External Traffic +

+ + + +
+

External traffic, i.e. the connection to the database for the user or the application, takes place via defined Kubernetes services. A distinction must be made here between read/write and read only traffic.

+
+
+ read/write +
+ + + +
+
+
+ read-only +
+ + + +
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/architecture/compontens/index.html b/docs/hugo/public/architecture/compontens/index.html new file mode 100644 index 000000000..43ac92215 --- /dev/null +++ b/docs/hugo/public/architecture/compontens/index.html @@ -0,0 +1,5171 @@ + + + + + + + + + + + + + Software-Components | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Software-Components

+
+
+ +

Various software components are used to operate CPO. This chapter lists the most important components and their respective purposes.

+

Basically, the CPO project focusses on the main tasks of each individual component. This means that each component does what it does best and only that. +In addition to reliable operation, this should also ensure efficient development and project management that utilises existing approaches rather than fighting against them.

+
+

+ 1. CYBERTEC-pg-operator +

+ + + +
+

The CYBERTEC-pg-operator is a Kubernetes operator that automates the operation and management of PostgreSQL databases on Kubernetes clusters. It facilitates the provisioning, scaling, backup and recovery of PostgreSQL clusters and integrates tools such as Patroni and pgBackRest for high availability and backup management.

+

The main focus of the operator is the creation of the necessary templates and objects for Kubernetes, the regular check whether the declarative description of the cluster is still up to date and for the implementation of various tasks in the cluster, which were commissioned by the user.

+
+

+ 2. Kubernetes +

+ + + +
+

Kubernetes is an open source platform for automating the deployment, scaling and management of containerised applications. It enables the management of container clusters in different environments and offers functions such as automatic load balancing, self-healing and rollouts. Kubernetes ensures that applications are always available and scalable and provides a framework for managing infrastructure in a cloud-native environment.

+

The focus of Kubernetes in the context of CPO is the use of the operator’s templates to create the required objects. +For example, the statefulset controller creates the desired pods based on the template. Kubernetes or the respective controllers monitor the generated objects independently and react if they are missing or do not correspond to the template. +This means, for example, that pods that have been removed are automatically regenerated even if the operator is not currently running. This avoids the operator as a single point of failure.

+
+

+ 3. Patroni +

+ + + +
+

Patroni is an open source tool for managing PostgreSQL high availability clusters. It uses a distributed consensus mechanism, often based on Etcd, Consul or Zookeeper, to manage the role of the PostgreSQL primary node and perform automatic failovers. Patroni ensures that only one primary database server is active at a time, enabling consistency and availability of PostgreSQL databases in a cluster.

+

The focus of Patroni is to build, configure and monitor the PostgreSQL cluster based on the configuration created by the operator. Patroni therefore takes over all tasks such as leader selection, cluster monitoring, auto-failover and much more independently. +Patroni is included in every PostgreSQL container and therefore pod and focussed on the individual cluster. +This means that cluster management is guaranteed even without a currently running operator and therefore runs independently of the operator. This avoids the operator as a single point of failure.

+
+

+ 4. PostgreSQL +

+ + + +
+

PostgreSQL is a powerful, open source object-relational database management system (ORDBMS). It is known for its reliability, robustness and compliance with SQL standards. PostgreSQL supports advanced data types, functions and offers extensive customisation options. It is suitable for applications of any size and offers strong support for ACID transactions and Multi-Version Concurrency Control (MVCC).

+

The main role of PostgreSQL in the context of CPO is quite clear. Controlled by Patroni, PostgreSQL takes care of its task as a DBMS.

+
+

+ 5. pgBackRest +

+ + + +
+

pgBackRest is a reliable backup and restore tool for PostgreSQL databases. It offers features such as incremental backups, parallel backup and restore, compression and encryption. pgBackRest is designed for use in large databases and offers both local and remote backup options. It integrates well into Kubernetes environments and enables automated and efficient backup strategies.

+

pgBackRest is configured based on the cluster manifest and therefore via the operator. Automatic backups, on the other hand, are based on Kubernetes cron jobs and are therefore independent of the operator, apart from the template generation by the operator.

+
+

+ 6. pgBouncer +

+ + + +
+

PgBouncer is a lightweight connection pooler for PostgreSQL. It reduces the load on the database server by consolidating and efficiently managing incoming client connections. PgBouncer improves the performance and scalability of PostgreSQL-based applications by reducing the number of active connections while enabling fast switching times between different connections.

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/architecture/index.html b/docs/hugo/public/architecture/index.html new file mode 100644 index 000000000..b6c732cd1 --- /dev/null +++ b/docs/hugo/public/architecture/index.html @@ -0,0 +1,5081 @@ + + + + + + + + + + + + Architecture | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Architecture

+
+ +
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/architecture/index.xml b/docs/hugo/public/architecture/index.xml new file mode 100644 index 000000000..55c1bb52d --- /dev/null +++ b/docs/hugo/public/architecture/index.xml @@ -0,0 +1,26 @@ + + + + Architecture on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/architecture/ + Recent content in Architecture on CYBERTEC-PG-Operator + Hugo + en + Tue, 07 Mar 2023 14:26:51 +0100 + + + Software-Components + http://localhost:1313/CYBERTEC-pg-operator/architecture/compontens/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/architecture/compontens/ + <p>Various software components are used to operate CPO. This chapter lists the most important components and their respective purposes.</p> <p>Basically, the CPO project focusses on the main tasks of each individual component. This means that each component does what it does best and only that. In addition to reliable operation, this should also ensure efficient development and project management that utilises existing approaches rather than fighting against them.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="1-cybertec-pg-operator" > 1. CYBERTEC-pg-operator </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/architecture/compontens/#1-cybertec-pg-operator" class="gdoc-page__anchor clip flex align-center" title="Anchor to: 1. CYBERTEC-pg-operator" aria-label="Anchor to: 1. CYBERTEC-pg-operator" href="#1-cybertec-pg-operator"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>The CYBERTEC-pg-operator is a Kubernetes operator that automates the operation and management of PostgreSQL databases on Kubernetes clusters. It facilitates the provisioning, scaling, backup and recovery of PostgreSQL clusters and integrates tools such as Patroni and pgBackRest for high availability and backup management.</p> + + + Rolling-Updates + http://localhost:1313/CYBERTEC-pg-operator/architecture/rolling_update/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/architecture/rolling_update/ + <p>Whether updating the minor version, changing the hardware definitions of the cluster or other adjustments that require a pod restart, CPO ensures that the update is as uninterrupted as possible.</p> <p>This means that adjustments are carried out on the various pods of a particular cluster one after the other and in a sensible sequence. This happens as soon as a cluster consists of more than 1 PostgreSQL node.</p> <p>In the event of a necessary restart, the operator independently stops the pods and does not leave this to Kubernetes. The idea behind this is that all replica pods are restarted one after the other first. The operator recognises these by the label cpo.opensource.cybertec.at/role=replica set by Patroni</p> + + + diff --git a/docs/hugo/public/architecture/rolling_update/index.html b/docs/hugo/public/architecture/rolling_update/index.html new file mode 100644 index 000000000..1ed798adf --- /dev/null +++ b/docs/hugo/public/architecture/rolling_update/index.html @@ -0,0 +1,5114 @@ + + + + + + + + + + + + + Rolling-Updates | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Rolling-Updates

+
+
+ +

Whether updating the minor version, changing the hardware definitions of the cluster or other adjustments that require a pod restart, CPO ensures that the update is as uninterrupted as possible.

+

This means that adjustments are carried out on the various pods of a particular cluster one after the other and in a sensible sequence. This happens as soon as a cluster consists of more than 1 PostgreSQL node.

+

In the event of a necessary restart, the operator independently stops the pods and does not leave this to Kubernetes. The idea behind this is that all replica pods are restarted one after the other first. The operator recognises these by the label cpo.opensource.cybertec.at/role=replica set by Patroni

+

As soon as all replicas are ready again, the operator checks whether one of the replicas is able to take over cluster operation and performs a switchover. Only then is the former leader pod stopped and restarted.

+

This ensures that the only effect on the application is the switchover. + + + + + +

+
+
A completely uninterrupted handover of operation is not possible due to the architecture and connection handling of PostgreSQL.
+
+

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/backup/aws/index.html b/docs/hugo/public/backup/aws/index.html new file mode 100644 index 000000000..42889c9b3 --- /dev/null +++ b/docs/hugo/public/backup/aws/index.html @@ -0,0 +1,5186 @@ + + + + + + + + + + + + + via S3 | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

via S3

+
+
+ +

This chapter describes the use of pgBackRest in combination with with AWS S3 or S3-compatible storage such as MinIO, Cloudian HyperStore or SwiftStack. It is not absolutely necessary to operate a Kubernetes on the AWS Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.

+

This Chapter will use AWS S3 for the example, the usage of different s3-compatible Storage is similiar.

+ + + + + +
+
+
Precondition: a S3-bucket and a priviledged role with credentials is needed for this chapter.
+
+ +
+

+ Create a s3-bucket on the AWS console +

+ + + +
+
+

+ Create a priviledged service-role +

+ + + +
+
+

+ Modifying the Cluster +

+ + + +
+

As soon as all requirements are met:

+
    +
  • A S3 bucket
  • +
  • Access-Token and Secret-Access-Key for the service role with the required authorisations for the bucket
  • +
+

the cluster can be modified. Firstly, a secret containing the Credentials is created and the cluster manifest is adapted accordingly.

+

The first step is to create the required secret. This is most easily done storing the needed data in a file called s3.conf and using a kubectl command.

+
# Create a file with name s3.conf and add the following infos. Please replace the placeholder by the credentials
+[global]
+repo1-s3-key=YOUR_S3_ACCESS_KEY
+repo1-s3-key-secret=YOUR_S3_KEY_SECRET
+repo1-cipher-pass=YOUR_ENCRYPTION_PASSPHRASE
+
+# Create the secret with the credentials
+kubectl create secret generic cluster-1-s3-credentials --from-file=s3.conf=s3.conf
+

In the next step, the secret name ais stored in the secret in the cluster manifest. In addition, global settings, such as the retention time of the backups in the global object, are defined, the image for pgBackRest is specified and the necessary information for the repository is added. This includes both the desired storage path in the bucket and the times for automatic backups based on the cron syntax.

+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster
+  namespace: cpo
+spec:
+  backup:
+    pgbackrest:
+      image: 'docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1'
+      repos:
+        - endpoint: 'https://s3-zurich.cyberlink.cloud:443'
+          name: repo1
+          region: zurich
+          resource: cpo-cluster-bucket
+          schedule:
+            full: 30 2 * * *
+            incr: '*/30 * * * *'
+          storage: s3
+      configuration:
+        secret: cluster-1-s3-credential
+      global:
+        repo1-path: /cluster/repo1/
+        repo1-retention-full: '7'
+        repo1-retention-full-type: count
+

This example creates a backup in the defined S3 bucket. In addition to the above configurations, a secret is also required which contains the access data for the S3 storage. The name of the secret must be stored in the spec.backup.pgbackrest.configuration.secret object and the secret must be located in the same namespace as the cluster. +Information required to address the S3 bucket:

+
    +
  • Endpoint: S3 api endpoint
  • +
  • Region: Region of the bucket
  • +
  • resource: Name of the bucket
  • +
+

An example with a sercret generator is also available in the tutorials. Enter your access data in the s3.conf file and transfer the tutorial to your Kubernetes with kubectl apply -k cluster-tutorials/pgbackrest_with_s3/.

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/backup/azure_blob/index.html b/docs/hugo/public/backup/azure_blob/index.html new file mode 100644 index 000000000..aeea90e7b --- /dev/null +++ b/docs/hugo/public/backup/azure_blob/index.html @@ -0,0 +1,5165 @@ + + + + + + + + + + + + + via Azure-Blob | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

via Azure-Blob

+
+
+ +

This chapter describes the use of pgBackRest in combination with Azure Blob Storage. It is not absolutely necessary to operate a Kubernetes on the Azure Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.

+ + + + + +
+
+
Precondition: a blob-storage-volume and a priviledged role is needed for this chapter.
+
+ +
+

+ Create a blob-storage-volume on the Azure console +

+ + + +
+
+

+ Create a priviledged service-role +

+ + + +
+
+

+ Modifying the Cluster +

+ + + +
+

As soon as all requirements are met:

+
    +
  • An Azure-Blob-Storage-Volume
  • +
  • A JSON token for the service role with the required authorisations for the Volume
  • +
+

the cluster can be modified. Firstly, a secret containing the JSON token is created and the cluster manifest is adapted accordingly.

+

The first step is to create the required secret. This is most easily done using a kubectl command.

+
kubectl create secret generic cluster-1-gcs-credentials --from-file=gcs.json=fluent.json
+

In the next step, both the secret name and the file name of the JSON token are stored in the secret in the cluster manifest. In addition, global settings, such as the retention time of the backups in the global object, are defined, the image for pgBackRest is specified and the necessary information for the repository is added. This includes both the desired storage path in the bucket and the times for automatic backups based on the cron syntax.

+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster-1
+spec:
+  backup:
+    pgbackrest:
+      configuration:
+        secret: cluster-1-gcs-credentials
+      global:
+        repo1-path: /cluster-1/repo1/
+        repo1-retention-full: '7'
+        repo1-retention-full-type: count
+      image: docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1'
+      repos:
+        - name: repo1
+          resource: postgresql-backup-bucket
+          key: gcs.json
+          keyType: service
+          schedule:
+            full: 30 2 * * *
+          storage: gcs
+
+
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/backup/check_backups/index.html b/docs/hugo/public/backup/check_backups/index.html new file mode 100644 index 000000000..6c95e022c --- /dev/null +++ b/docs/hugo/public/backup/check_backups/index.html @@ -0,0 +1,5186 @@ + + + + + + + + + + + + + Check/Monitor Backups | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Check/Monitor Backups

+
+
+ +

There are several ways to gain an insight into the current status of pgBackRest. +One of these is to use pgBackRest within the container. This can be done both via the repo host and the Postgres pod.

+
+

+ pgbackrest via terminal (Repo-Host-Pod) +

+ + + +
+
kubectl exec cluster-5-pgbackrest-repo-host-0 --stdin --tty -- pgbackrest info 
+stanza: db
+    status: ok
+    cipher: none
+
+    db (current)
+        wal archive min/max (16): 00000006000000000000005C/000000070000000000000092
+
+        full backup: 20240517-125730F
+            timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00
+            wal start/stop: 00000007000000000000005E / 00000007000000000000005E
+            database size: 22.9MB, database backup size: 22.9MB
+            repo1: backup set size: 3MB, backup size: 3MB
+
+        incr backup: 20240517-125730F_20240517-130003I
+            timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00
+            wal start/stop: 000000070000000000000060 / 000000070000000000000060
+            database size: 22.9MB, database backup size: 904.3KB
+            repo1: backup set size: 3MB, backup size: 149.4KB
+            backup reference list: 20240517-125730F
+
+        incr backup: 20240517-125730F_20240517-131503I
+            timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00
+            wal start/stop: 000000070000000000000062 / 000000070000000000000062
+            database size: 22.9MB, database backup size: 24.3KB
+            repo1: backup set size: 3MB, backup size: 2.9KB
+            backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I
+
+

+ pgbackrest via terminal (Postgres-Pod) +

+ + + +
+
kubectl exec cluster-5-0 --stdin --tty -- pgbackrest info 
+Defaulted container "postgres" out of: postgres, postgres-exporter, pgbackrest-restore (init)
+stanza: db
+    status: ok
+    cipher: none
+
+    db (current)
+        wal archive min/max (16): 00000006000000000000005C/000000070000000000000092
+
+        full backup: 20240517-125730F
+            timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00
+            wal start/stop: 00000007000000000000005E / 00000007000000000000005E
+            database size: 22.9MB, database backup size: 22.9MB
+            repo1: backup set size: 3MB, backup size: 3MB
+
+        incr backup: 20240517-125730F_20240517-130003I
+            timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00
+            wal start/stop: 000000070000000000000060 / 000000070000000000000060
+            database size: 22.9MB, database backup size: 904.3KB
+            repo1: backup set size: 3MB, backup size: 149.4KB
+            backup reference list: 20240517-125730F
+
+        incr backup: 20240517-125730F_20240517-131503I
+            timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00
+            wal start/stop: 000000070000000000000062 / 000000070000000000000062
+            database size: 22.9MB, database backup size: 24.3KB
+            repo1: backup set size: 3MB, backup size: 2.9KB
+            backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I
+

There is the “normal” output, as well as the output format Json, which can be processed directly in the terminal.

+
kubectl exec cluster-5-0 --stdin --tty -- pgbackrest info  --output=json
+
+

+ Check pgBackrest via Monitoring +

+ + + +
+

In addition to reading the status via the containers, pgBackRest can also be analysed and monitored via the monitoring stack. You can find information on setting up the monitoring stack and further information here.

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/backup/encryption/index.html b/docs/hugo/public/backup/encryption/index.html new file mode 100644 index 000000000..160ffccaa --- /dev/null +++ b/docs/hugo/public/backup/encryption/index.html @@ -0,0 +1,5141 @@ + + + + + + + + + + + + + Encrypted Backups | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Encrypted Backups

+
+
+ +

pgBackRest also allows you to encrypt your backups on the client side before uploading them. This is possible with any type of storage and is very easy to activate.

+

Firstly, we need to define an encryption key. This must be specified separately for each repo and stored in the same secret that is defined in the spec.backup.pgbackrest.configuration.secret object.

+
kind: Secret
+apiVersion: v1
+metadata:
+  name: cluster-1-s3-credential
+  namespace: cpo
+stringData:
+  s3.conf |
+    [global]
+    repo1-s3-key=YOUR_S3_KEY
+    repo1-s3-key-secret=YOUR_S3_KEY_SECRET
+    repo1-cipher-pass=YOUR_ENCRYPTION_KEY
+

We also need to configure the type of encryption for pgBackRest. This is done via the cipher-type parameter, which must also be specified for each repo. You can find the available values for the parameter here

+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster
+  namespace: cpo
+spec:
+  backup:
+    pgbackrest:
+      configuration:
+        secret: cluster-1-s3-credential
+      global:
+        repo1-path: /cluster/repo1/
+        repo1-retention-full: '7'
+        repo1-retention-full-type: count
+        repo1-cipher-type: aes-256-cbc
+      image: 'docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1'
+      repos:
+        - endpoint: 'https://s3-zurich.cyberlink.cloud:443'
+          name: repo1
+          region: zurich
+          resource: cpo-cluster-bucket
+          schedule:
+            full: 30 2 * * *
+            incr: '*/30 * * * *'
+          storage: s3
+
+
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/backup/gcs/index.html b/docs/hugo/public/backup/gcs/index.html new file mode 100644 index 000000000..c370b41f2 --- /dev/null +++ b/docs/hugo/public/backup/gcs/index.html @@ -0,0 +1,5165 @@ + + + + + + + + + + + + + via GCS | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

via GCS

+
+
+ +

This chapter describes the use of pgBackRest in combination with Google Cloud Storage (gcs). It is not absolutely necessary to operate a Kubernetes on the Google Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.

+ + + + + +
+
+
Precondition: a gcs-bucket and a priviledged role is needed for this chapter.
+
+ +
+

+ Create a gcs-bucket on the google cloud console +

+ + + +
+
+

+ Create a priviledged service-role +

+ + + +
+
+

+ Modifying the Cluster +

+ + + +
+

As soon as all requirements are met:

+
    +
  • A GCS bucket
  • +
  • A JSON token for the service role with the required authorisations for the bucket
  • +
+

the cluster can be modified. Firstly, a secret containing the JSON token is created and the cluster manifest is adapted accordingly.

+

The first step is to create the required secret. This is most easily done using a kubectl command.

+
kubectl create secret generic cluster-1-gcs-credentials --from-file=gcs.json=fluent.json
+

In the next step, both the secret name and the file name of the JSON token are stored in the secret in the cluster manifest. In addition, global settings, such as the retention time of the backups in the global object, are defined, the image for pgBackRest is specified and the necessary information for the repository is added. This includes both the desired storage path in the bucket and the times for automatic backups based on the cron syntax.

+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster-1
+spec:
+  backup:
+    pgbackrest:
+      configuration:
+        secret: cluster-1-gcs-credentials
+      global:
+        repo1-path: /cluster-1/repo1/
+        repo1-retention-full: '7'
+        repo1-retention-full-type: count
+      image: docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1'
+      repos:
+        - name: repo1
+          resource: postgresql-backup-bucket
+          key: gcs.json
+          keyType: service
+          schedule:
+            full: 30 2 * * *
+          storage: gcs
+
+
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/backup/index.html b/docs/hugo/public/backup/index.html new file mode 100644 index 000000000..f95bee995 --- /dev/null +++ b/docs/hugo/public/backup/index.html @@ -0,0 +1,5081 @@ + + + + + + + + + + + + Backup | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Backup

+
+ +
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/backup/index.xml b/docs/hugo/public/backup/index.xml new file mode 100644 index 000000000..67ec94dc6 --- /dev/null +++ b/docs/hugo/public/backup/index.xml @@ -0,0 +1,61 @@ + + + + Backup on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/backup/ + Recent content in Backup on CYBERTEC-PG-Operator + Hugo + en + Thu, 28 Dec 2023 14:26:51 +0100 + + + Introduction + http://localhost:1313/CYBERTEC-pg-operator/backup/introduction/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/introduction/ + <p>Backups are essential for databases. From broken storage to deployments gone wrong, backups often save the day. Starting with pg_dump, which was released in the late 1990s, to the archiving of WAL files (PostgreSQL 8.0 / 2005) and pg_basebackup (PostgreSQL 9.0 / 2010), PostgreSQL already offers built-in options for backups and restores based on logical and physical backups.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="backups-with-pgbackrest" > Backups with pgBackRest </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/introduction/#backups-with-pgbackrest" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Backups with pgBackRest" aria-label="Anchor to: Backups with pgBackRest" href="#backups-with-pgbackrest"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>CPO relies on <a class="gdoc-markdown__link" href="www.pgbackrest.org" >pgBackRest</a> as its backup solution, a tried-and-tested tool with extensive backup and restore options. The backup is based on two elements:</p> + + + via Blockstorage (pvc) + http://localhost:1313/CYBERTEC-pg-operator/backup/pvc/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/pvc/ + <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="backups-on-pvc-persistentvolumeclaim" > Backups on PVC (PersistentVolumeClaim) </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/pvc/#backups-on-pvc-persistentvolumeclaim" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Backups on PVC (PersistentVolumeClaim)" aria-label="Anchor to: Backups on PVC (PersistentVolumeClaim)" href="#backups-on-pvc-persistentvolumeclaim"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>When using block storage, the operator creates an additional pod that acts as a repo host. Based on a TLS connection, the repo host obtains the data for the Backup from the current primary of the cluster, which is compressed before being sent. WAL archives are pushed from the primary pod to the repo host.</p> + + + via S3 + http://localhost:1313/CYBERTEC-pg-operator/backup/aws/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/aws/ + <p>This chapter describes the use of pgBackRest in combination with with AWS S3 or S3-compatible storage such as MinIO, Cloudian HyperStore or SwiftStack. It is not absolutely necessary to operate a Kubernetes on the AWS Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.</p> <p>This Chapter will use AWS S3 for the example, the usage of different s3-compatible Storage is similiar.</p> + + + via GCS + http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/ + <p>This chapter describes the use of pgBackRest in combination with Google Cloud Storage (gcs). It is not absolutely necessary to operate a Kubernetes on the Google Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.</p> <blockquote class="gdoc-hint important"> <div class="gdoc-hint__title flex align-center"><i class="fa important" title="Important"></i></div> <div class="gdoc-hint__text">Precondition: a gcs-bucket and a priviledged role is needed for this chapter.</div> </blockquote> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="create-a-gcs-bucket-on-the-google-cloud-console" > Create a gcs-bucket on the google cloud console </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/#create-a-gcs-bucket-on-the-google-cloud-console" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Create a gcs-bucket on the google cloud console" aria-label="Anchor to: Create a gcs-bucket on the google cloud console" href="#create-a-gcs-bucket-on-the-google-cloud-console"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="create-a-priviledged-service-role" > Create a priviledged service-role </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/#create-a-priviledged-service-role" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Create a priviledged service-role" aria-label="Anchor to: Create a priviledged service-role" href="#create-a-priviledged-service-role"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="modifying-the-cluster" > Modifying the Cluster </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/#modifying-the-cluster" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Modifying the Cluster" aria-label="Anchor to: Modifying the Cluster" href="#modifying-the-cluster"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>As soon as all requirements are met:</p> + + + via Azure-Blob + http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/ + <p>This chapter describes the use of pgBackRest in combination with Azure Blob Storage. It is not absolutely necessary to operate a Kubernetes on the Azure Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.</p> <blockquote class="gdoc-hint important"> <div class="gdoc-hint__title flex align-center"><i class="fa important" title="Important"></i></div> <div class="gdoc-hint__text">Precondition: a blob-storage-volume and a priviledged role is needed for this chapter.</div> </blockquote> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="create-a-blob-storage-volume-on-the-azure-console" > Create a blob-storage-volume on the Azure console </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/#create-a-blob-storage-volume-on-the-azure-console" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Create a blob-storage-volume on the Azure console" aria-label="Anchor to: Create a blob-storage-volume on the Azure console" href="#create-a-blob-storage-volume-on-the-azure-console"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="create-a-priviledged-service-role" > Create a priviledged service-role </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/#create-a-priviledged-service-role" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Create a priviledged service-role" aria-label="Anchor to: Create a priviledged service-role" href="#create-a-priviledged-service-role"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="modifying-the-cluster" > Modifying the Cluster </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/#modifying-the-cluster" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Modifying the Cluster" aria-label="Anchor to: Modifying the Cluster" href="#modifying-the-cluster"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>As soon as all requirements are met:</p> + + + Encrypted Backups + http://localhost:1313/CYBERTEC-pg-operator/backup/encryption/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/encryption/ + <p>pgBackRest also allows you to encrypt your backups on the client side before uploading them. This is possible with any type of storage and is very easy to activate.</p> <p>Firstly, we need to define an encryption key. This must be specified separately for each repo and stored in the same secret that is defined in the <code>spec.backup.pgbackrest.configuration.secret</code> object.</p> <pre tabindex="0"><code>kind: Secret apiVersion: v1 metadata: name: cluster-1-s3-credential namespace: cpo stringData: s3.conf | [global] repo1-s3-key=YOUR_S3_KEY repo1-s3-key-secret=YOUR_S3_KEY_SECRET repo1-cipher-pass=YOUR_ENCRYPTION_KEY </code></pre><p>We also need to configure the type of encryption for pgBackRest. This is done via the cipher-type parameter, which must also be specified for each repo. You can find the available values for the parameter <a class="gdoc-markdown__link" href="https://pgbackrest.org/configuration.html#section-repository/option-repo-cipher-type" >here</a></p> + + + Check/Monitor Backups + http://localhost:1313/CYBERTEC-pg-operator/backup/check_backups/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/check_backups/ + <p>There are several ways to gain an insight into the current status of pgBackRest. One of these is to use pgBackRest within the container. This can be done both via the repo host and the Postgres pod.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="pgbackrest-via-terminal-repo-host-pod" > pgbackrest via terminal (Repo-Host-Pod) </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/check_backups/#pgbackrest-via-terminal-repo-host-pod" class="gdoc-page__anchor clip flex align-center" title="Anchor to: pgbackrest via terminal (Repo-Host-Pod)" aria-label="Anchor to: pgbackrest via terminal (Repo-Host-Pod)" href="#pgbackrest-via-terminal-repo-host-pod"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <pre tabindex="0"><code>kubectl exec cluster-5-pgbackrest-repo-host-0 --stdin --tty -- pgbackrest info stanza: db status: ok cipher: none db (current) wal archive min/max (16): 00000006000000000000005C/000000070000000000000092 full backup: 20240517-125730F timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00 wal start/stop: 00000007000000000000005E / 00000007000000000000005E database size: 22.9MB, database backup size: 22.9MB repo1: backup set size: 3MB, backup size: 3MB incr backup: 20240517-125730F_20240517-130003I timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00 wal start/stop: 000000070000000000000060 / 000000070000000000000060 database size: 22.9MB, database backup size: 904.3KB repo1: backup set size: 3MB, backup size: 149.4KB backup reference list: 20240517-125730F incr backup: 20240517-125730F_20240517-131503I timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00 wal start/stop: 000000070000000000000062 / 000000070000000000000062 database size: 22.9MB, database backup size: 24.3KB repo1: backup set size: 3MB, backup size: 2.9KB backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I </code></pre><div class="flex align-center gdoc-page__anchorwrap"> <h3 id="pgbackrest-via-terminal-postgres-pod" > pgbackrest via terminal (Postgres-Pod) </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/check_backups/#pgbackrest-via-terminal-postgres-pod" class="gdoc-page__anchor clip flex align-center" title="Anchor to: pgbackrest via terminal (Postgres-Pod)" aria-label="Anchor to: pgbackrest via terminal (Postgres-Pod)" href="#pgbackrest-via-terminal-postgres-pod"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <pre tabindex="0"><code>kubectl exec cluster-5-0 --stdin --tty -- pgbackrest info Defaulted container &#34;postgres&#34; out of: postgres, postgres-exporter, pgbackrest-restore (init) stanza: db status: ok cipher: none db (current) wal archive min/max (16): 00000006000000000000005C/000000070000000000000092 full backup: 20240517-125730F timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00 wal start/stop: 00000007000000000000005E / 00000007000000000000005E database size: 22.9MB, database backup size: 22.9MB repo1: backup set size: 3MB, backup size: 3MB incr backup: 20240517-125730F_20240517-130003I timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00 wal start/stop: 000000070000000000000060 / 000000070000000000000060 database size: 22.9MB, database backup size: 904.3KB repo1: backup set size: 3MB, backup size: 149.4KB backup reference list: 20240517-125730F incr backup: 20240517-125730F_20240517-131503I timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00 wal start/stop: 000000070000000000000062 / 000000070000000000000062 database size: 22.9MB, database backup size: 24.3KB repo1: backup set size: 3MB, backup size: 2.9KB backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I </code></pre><p>There is the &ldquo;normal&rdquo; output, as well as the output format Json, which can be processed directly in the terminal.</p> + + + diff --git a/docs/hugo/public/backup/introduction/index.html b/docs/hugo/public/backup/introduction/index.html new file mode 100644 index 000000000..f8cd17956 --- /dev/null +++ b/docs/hugo/public/backup/introduction/index.html @@ -0,0 +1,5223 @@ + + + + + + + + + + + + + Introduction | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Introduction

+
+
+ +

Backups are essential for databases. From broken storage to deployments gone wrong, backups often save the day. Starting with pg_dump, which was released in the late 1990s, to the archiving of WAL files (PostgreSQL 8.0 / 2005) and pg_basebackup (PostgreSQL 9.0 / 2010), PostgreSQL already offers built-in options for backups and restores based on logical and physical backups.

+
+

+ Backups with pgBackRest +

+ + + +
+

CPO relies on pgBackRest as its backup solution, a tried-and-tested tool with extensive backup and restore options. +The backup is based on two elements:

+
    +
  • Snapshots in the form of physical backups
  • +
  • WAL archive: Continuous archiving of the WAL files
  • +
+
+

+ Backups +

+ + + +
+

Backups represent a snapshot of the database in the form of pyhsical files. This contains all relevant information that PostgreSQL holds in its data folder. +With pgBackRest it is possible to create different types of Backups:

+
    +
  • full Snapshot: This captures and saves all files at the time of the backup
  • +
  • Differential backup: Only captures all files that have been changed since the last full Backup
  • +
  • Incremental backup: Only records the files that have been changed since the last backup (of any kind).
  • +
+

When restoring using differential or incremental Backup, it is necessary to also use the previous Backup that provide the basis for the selected Backup.

+ + + + + +
+
+
The choice of Backup types depends on factors such as the size of the database, the time available for backups and the restore.
+
+ +
+

+ WAL-Archive +

+ + + +
+

The WAL (Write-Ahead-Log) refers to log files which record all changes to the database data before they are written to the actual files. The basic idea here is to guarantee the consistency and recoverability of the comitted data even in the event of failures.

+

PostgreSQL normally cleans up or recycles the WAL files that are no longer required. By using WAL archiving, the WAL files are saved to a different location before this process so that they can be used for various activities in the future. +These activities include

+
    +
  • Providing the WAL files for replicas to keep them up to date
  • +
  • Restoring instances that have lost parts of the WAL files in the event of a failure and cannot return to a consistent state without them without losing data
  • +
  • Point-In-Time-Recovery (PITR): In contrast to Backups, which map a fixed point in time, WAL files make it possible to jump dynamically to a desired point in time and restore the database to the closest available consistent data point
  • +
+ + + + + +
+
+
WAL archiving is an indispensable tool for data availability, recoverability and the continuous availability of PostgreSQL.
+
+ +
+

+ Backup your Cluster +

+ + + +
+

With pgBackRest, backups can be stored on different types of storage:

+
    +
  • Block storage (PVC)
  • +
  • S3 / S3-compatible storage
  • +
  • Azure blob storage
  • +
  • GCS
  • +
+
+

+ How a Backup works +

+ + + +
+

The operator creates a cronjob object on Kubernetes based on the defined times for automatic backups. This means that the Kubernetes core (CronJob Controller) will take care of processing the automatic backups and create a job and thus a pod at the appropriate time. +The pod will send the backup command to the primary or, if block storage is used, to the repo host and monitor it. As soon as the backup is successfully completed, the pod stops with Completed and thus completes the job.

+
kubectl get cronjobs
+---------------------------------------------------------------------------------------
+NAME                          | SCHEDULE     | SUSPEND | ACTIVE | LAST SCHEDULE | AGE
+pgbackrest-cluster-repo1-full | 30 2 * * *   | False   | 0      | 4h46m         | 14h
+pgbackrest-cluster-repo1-incr | */30 * * * * | False   | 1      | 81s           | 106m
+
+kubectl get jobs
+-----------------------------------------------------------------------
+NAME                                   | COMPLETIONS | DURATION | AGE
+pgbackrest-cluster-repo1-full-28597110 | 1/1         | 52s      | 140m
+pgbackrest-cluster-repo1-incr-28597365 | 1/1         | 2m37s    | 32m
+pgbackrest-cluster-repo1-incr-28597380 | 1/1         | 2m38s    | 17m
+pgbackrest-cluster-repo1-incr-28597395 | 0/1         | 2m3s     | 2m3s
+

If there are problems such as a timeout, the pod will stop with exit code 1 and thus indicate an error. In this case, a new pod will be created which will attempt to complete the backup. The maximum number of attempts is 6, so if the backup fails six times, the job is deemed to have failed and will not be attempted again until the next cronjob execution. The job pod log provides information about the problems.

+
kubectl get pods
+-----------------------------------------------------------------------------------
+NAME                                         | READY | STATUS    | RESTARTS | AGE
+cluster-0                                    | 2/2   | Running   | 2        | 14h
+cluster-pgbackrest-repo-host-0               | 1/1   | Running   | 0        | 107m
+pgbackrest-cluster-repo1-full-28597110-x8zpw | 0/1   | Completed | 0        | 143m
+pgbackrest-cluster-repo1-incr-28597365-7bb5l | 0/1   | Completed | 0        | 34m
+pgbackrest-cluster-repo1-incr-28597380-j76rr | 0/1   | Completed | 0        | 19m
+pgbackrest-cluster-repo1-incr-28597395-rh86t | 0/1   | Completed | 0        | 4m27s
+postgres-operator-66bbff5c54-5sjmk           | 1/1   | Running   | 0        | 47m
+
+
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/backup/pvc/index.html b/docs/hugo/public/backup/pvc/index.html new file mode 100644 index 000000000..c1ee1b475 --- /dev/null +++ b/docs/hugo/public/backup/pvc/index.html @@ -0,0 +1,5138 @@ + + + + + + + + + + + + + via Blockstorage (pvc) | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

via Blockstorage (pvc)

+
+
+ +
+

+ Backups on PVC (PersistentVolumeClaim) +

+ + + +
+

When using block storage, the operator creates an additional pod that acts as a repo host. Based on a TLS connection, the repo host obtains the data for the Backup from the current primary of the cluster, which is compressed before being sent. +WAL archives are pushed from the primary pod to the repo host.

+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster
+  namespace: cpo
+spec:
+  backup:
+    pgbackrest:
+      image: 'docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1'
+      repos:
+        - name: repo1
+          schedule:
+            full: 30 2 * * *
+          storage: pvc
+          volume:
+            size: 15Gi
+            storageClass: default
+      global:
+        repo1-retention-full: '7'
+        repo1-retention-full-type: count
+

This example creates backups based on a repo host with a daily full Backup at 2:30 am. In addition, pgBackRest is instructed to keep a maximum of 7 full Backups. The oldest one is always removed when a new Backup is created. You can increase the pvc-size all time if needed. Therefore you just need to update the size value to a higher amount of Gi. Please be aware that shrinking the volume is not possible.

+ + + + + +
+
+
In addition, further configurations for pgBackRest can be defined in the global object. Information on possible configurations can be found in the pgBackRest documentation
+
+ + +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/brand.svg b/docs/hugo/public/brand.svg new file mode 100644 index 000000000..16a25aea6 --- /dev/null +++ b/docs/hugo/public/brand.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + diff --git a/docs/hugo/public/categories/index.html b/docs/hugo/public/categories/index.html new file mode 100644 index 000000000..46f21197e --- /dev/null +++ b/docs/hugo/public/categories/index.html @@ -0,0 +1,4972 @@ + + + + + + + + + + + + Categories | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/categories/index.xml b/docs/hugo/public/categories/index.xml new file mode 100644 index 000000000..a69d9eff8 --- /dev/null +++ b/docs/hugo/public/categories/index.xml @@ -0,0 +1,11 @@ + + + + Categories on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/categories/ + Recent content in Categories on CYBERTEC-PG-Operator + Hugo + en + + + diff --git a/docs/hugo/public/categories/page/1/index.html b/docs/hugo/public/categories/page/1/index.html new file mode 100644 index 000000000..fdeee7189 --- /dev/null +++ b/docs/hugo/public/categories/page/1/index.html @@ -0,0 +1,10 @@ + + + + http://localhost:1313/CYBERTEC-pg-operator/categories/ + + + + + + diff --git a/docs/hugo/public/certs/index.html b/docs/hugo/public/certs/index.html new file mode 100644 index 000000000..a280f56e2 --- /dev/null +++ b/docs/hugo/public/certs/index.html @@ -0,0 +1,4940 @@ + + + + + + + + + + + + + Certificates | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Certificates

+
+ +
+

tbd

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/certs/index.xml b/docs/hugo/public/certs/index.xml new file mode 100644 index 000000000..8b7986f68 --- /dev/null +++ b/docs/hugo/public/certs/index.xml @@ -0,0 +1,12 @@ + + + + Certificates on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/certs/ + Recent content in Certificates on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/clone-cluster/index.html b/docs/hugo/public/clone-cluster/index.html new file mode 100644 index 000000000..1eab20072 --- /dev/null +++ b/docs/hugo/public/clone-cluster/index.html @@ -0,0 +1,5192 @@ + + + + + + + + + + + + + Clone Cluster | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Clone Cluster

+
+ +
+

The function of a cluster clone was implemented to create the possibility of duplicating the current status of a cluster in order to carry out tests such as a major upgrade. +It creates an autonomous and independent cluster based on an existing local cluster or from a cloud storage via pgBackRest (S3, gcs or Azure Blob)

+
+

+ Preconditions: +

+ + + +
+

The primary cluster must either:

+
    +
  • be accessible from the standby cluster via streaming replication
  • +
  • the backup storage used by the standby cluster (S3, GCS or Azure Blob) must be accessible for the standby cluster
  • +
+

The passwords for the Postgres user, the replication user and the exporter user (if monitoring is active) must be created as a secret for the standby cluster. Otherwise connection problems will occur

+
+

+ Clone a cluster via pvc +

+ + + +
+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster-1-clone
+spec:
+  dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1'
+  numberOfInstances: 1
+  postgresql:
+    version: '17'
+  resources:
+    limits:
+      cpu: 500m
+      memory: 500Mi
+    requests:
+      cpu: 500m
+      memory: 500Mi
+  teamId: acid
+  volume:
+    size: 5Gi
+  clone:
+    cluster: cluster-1
+    pgbackrest:
+      configuration:
+        secret: cluster-1-pvc-configuration
+      repo:
+        storage: pvc
+
+

+ Clone a cluster via s3 +

+ + + +
+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster-1-clone
+spec:
+  dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1'
+  numberOfInstances: 1
+  postgresql:
+    version: '17'
+  resources:
+    limits:
+      cpu: 500m
+      memory: 500Mi
+    requests:
+      cpu: 500m
+      memory: 500Mi
+  teamId: acid
+  volume:
+    size: 5Gi
+  clone:
+    cluster: cluster-1 # A random cluster name can be used if the source cluster is not present on the k8s.
+    pgbackrest:
+      configuration:
+        secret: cluster-1-s3-credentials
+      options:
+        repo1-path: /YOUR_PATH_INSIDE_THE_BUCKET_TO_THE_SOURCE_STANZA/repo1/
+      repo:
+        endpoint: YOUR_SOURCE_S3_ENDPOINT
+        name: repo1
+        region: YOUR_SOURCE_S3_REGION
+        resource: YOUR_SOURCE_BUCKET_NAME
+        storage: s3
+
+

+ Limitations +

+ + + +
+

A primary cluster cannot be demoted to a standby cluster. +If necessary, the recommendation is to create a new cluster as a standby cluster.

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/clone-cluster/index.xml b/docs/hugo/public/clone-cluster/index.xml new file mode 100644 index 000000000..7f2f31a5f --- /dev/null +++ b/docs/hugo/public/clone-cluster/index.xml @@ -0,0 +1,12 @@ + + + + Clone Cluster on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/clone-cluster/ + Recent content in Clone Cluster on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/cluster_upgrade/index.html b/docs/hugo/public/cluster_upgrade/index.html new file mode 100644 index 000000000..346a02052 --- /dev/null +++ b/docs/hugo/public/cluster_upgrade/index.html @@ -0,0 +1,5102 @@ + + + + + + + + + + + + + Major-Upgrade | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Major-Upgrade

+
+ +
+

CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.

+
+

PAY ATTENTION: Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.

+
+

+ How does the upgrade work? +

+ + + +
+
+

+ Preconditions: +

+ + + +
+
    +
  1. Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to.
  2. +
  3. Check - Check that the new PGVERSION is larger than the previously used one.
  4. +
  5. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.
  6. +
+
+

+ Preliminary checks +

+ + + +
+
    +
  1. use initdb to prepare a new data_dir (data_new) based on the new PGVERSION.
  2. +
  3. check the upgrade possibility with pg_upgrade --check
  4. +
+
+

HINT: If one of the steps is aborted, a cleanup is performed

+
+

+ Prepare the Upgrade +

+ + + +
+
    +
  1. remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit.
  2. +
  3. activate the maintenance mode of the cluster
  4. +
  5. terminate PostgreSQL in an orderly manner
  6. +
  7. check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location
  8. +
  9. use port 5432 for rsyncd and start it
  10. +
+
+

+ Start the Upgrade +

+ + + +
+
    +
  1. Call pg_upgrade -k to start the Upgrade
  2. +
+
+

ATTENTION if the process failed, we need to rollback, if it was sucessful we’re reaching the point of no return

+
    +
  1. Rename the directories. data -> data_old and data_new -> data
  2. +
  3. Update the Patroni.config (postgres.yml)
  4. +
  5. Call Checkpoint on every replica and trigger rsync on the Replicas
  6. +
  7. Wait for Replicas to complete rsxnc. Timeout: 300
  8. +
  9. Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid
  10. +
  11. Start Patroni on the Primary and start the postgres locally
  12. +
  13. Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads
  14. +
  15. Wait for every Replica to become ready
  16. +
  17. Disable the maintenance mode for the Cluster
  18. +
  19. Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade
  20. +
+
+

+ Completion of the upgrade +

+ + + +
+
    +
  1. Drop directory data_old
  2. +
  3. Trigger new Backup
  4. +
+
+

+ How a rollback is working? +

+ + + +
+
    +
  1. Stop rsynd if its running
  2. +
  3. Disable the maintenance mode for the Cluster
  4. +
  5. Drop directory data_new
  6. +
+
+

+ How to trigger a In-Place-Upgrade with cpo? +

+ + + +
+
spec:
+  postgresql:
+    version: "17"
+

To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above. +If you choosse a not allowed value, you will give an error and if you decrease the value, the operator will just ignore it with the following log-Entry.

+
Operator-Log
+
+
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/cluster_upgrade/index.xml b/docs/hugo/public/cluster_upgrade/index.xml new file mode 100644 index 000000000..b2529fdcf --- /dev/null +++ b/docs/hugo/public/cluster_upgrade/index.xml @@ -0,0 +1,12 @@ + + + + Major-Upgrade on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/cluster_upgrade/ + Recent content in Major-Upgrade on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/config_cluster/index.html b/docs/hugo/public/config_cluster/index.html new file mode 100644 index 000000000..ffb0dda88 --- /dev/null +++ b/docs/hugo/public/config_cluster/index.html @@ -0,0 +1,5202 @@ + + + + + + + + + + + + + PostgreSQL Configuration | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

PostgreSQL Configuration

+
+ +
+

Users who are already used to working with PostgreSQL from Baremetal or VMs are already familiar with the need for various files to configure PostgreSQL. These include

+
    +
  • postgresql.conf
  • +
  • pg_hba.conf
  • +
  • +
+

Although these files are available in the container, direct modification is not planned. As part of the declarative mode of operation of the operator, these files are defined via the operator. The modifying intervention within the container also represents a contradiction to the immutability of the container.

+

For these reasons, the operator provides a way to make adjustments to the various files, from PostgreSQL to Patroni.

+

We differentiate between two main objects in the cluster manifest:

+
    +
  • postgresql with the child objects version and parameters
  • +
  • patroni with objects for the pg_hab, slots and much more
  • +
+
+

+ postgresql +

+ + + +
+

The postgresql object consists of the following elements:

+
    +
  • version - allows you to select the major version of PostgreSQL used.
  • +
  • parameters- enables the postgresql.conf to be changed
  • +
+
spec:
+  postgresql:
+    parameters:
+      shared_preload_libraries: 'pg_stat_statements,pgnodemx, timescaledb'
+      shared_buffers: '512MB'
+    version: '16'
+

Any known PostgreSQL parameter from postgresql.conf can be entered here and will be delivered by the operator to all nodes of the cluster accordingly.

+

You can find more information about the parameters in the PostgreSQL documentation

+
+

+ patroni +

+ + + +
+

The patroni object contains numerous options for customising the patroni-setu, and the pg_hba.conf is also configured here. A complete list of all available elements can be found here.

+

The most important elements include

+
    +
  • pg_hba - pg_hba.conf
  • +
  • slots
  • +
  • synchronous_mode - enables synchronous mode in the cluster. The default is set to false
  • +
  • maximum_lag_on_failover - Specifies the maximum lag so that the pod is still considered healthy in the event of a failover.
  • +
  • failsafe_mode Allows you to cancel the downgrading of the leader if all cluster members can be reached via the Patroni Rest Api. +You can find more information on this in the Patroni documentation
  • +
+
+

+ pg_hba +

+ + + +
+

The pg_hba.conf contains all defined authentication rules for PostgreSQL.

+

When customising this configuration, it is important that the entire version of pg_hba is written to the manifest. +The current configuration can be read out in the database using table pg_hba_file_rules ;.

+

Further information can be found in the PostgreSQL documentation

+
+

+ slots +

+ + + +
+

When using user-defined slots, for example for the use of CDC using Debezium, there are problems when interacting with Patroni, as the slot and its current status are not automatically synchronised to the replicas.

+

In the event of a failover, the client cannot start replication as both the entire slot and the information about the data that has already been synchronised are missing.

+

To resolve this problem, slots must be defined in the cluster manifest rather than in PostgreSQL.

+
spec:
+  patroni:
+    slots:
+      cdc-example:
+        database: app_db
+        plugin: pgoutput
+        type: logical
+

This example creates a logical replication slot with the name cdc-example within the app_db database and uses the pgoutput plugin for the slot.

+ + + + + +
+
+
Slots are only synchronised from the leader/standby leader to the replicas. This means that using the slots read-only on the replicas will cause a problem in the event of a failover.
+
+ + +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/config_cluster/index.xml b/docs/hugo/public/config_cluster/index.xml new file mode 100644 index 000000000..e6cea2ba4 --- /dev/null +++ b/docs/hugo/public/config_cluster/index.xml @@ -0,0 +1,12 @@ + + + + PostgreSQL Configuration on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/config_cluster/ + Recent content in PostgreSQL Configuration on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/connection_pooler/index.html b/docs/hugo/public/connection_pooler/index.html new file mode 100644 index 000000000..8084e33c4 --- /dev/null +++ b/docs/hugo/public/connection_pooler/index.html @@ -0,0 +1,5186 @@ + + + + + + + + + + + + + connection pooler | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

connection pooler

+
+ +
+

A connection pooler is a tool that acts as a proxy between the application and the database and enables the performance of the application to be improved and the load on the database to be reduced. The reason for this lies in the connection handling of PostgreSQL.

+
+

+ How PostgreSQL handles connection +

+ + + +
+

PostgreSQL use a new Process for every database-connection created by the postmaster. This process is handling the connection. On the positive side, this enables a stable connection and isolation, but it is not particularly efficient for short-lived connections due to the effort required to create them.

+
+

+ How Connection Pooling solves this problem +

+ + + +
+

With connection pooling, the application connects to the pooler, which in turn maintains a number of connections to the PostgreSQL database. +This makes it possible to use the connections from the pooler to the database for a long time instead of short-lived connections and to recycle them accordingly.

+

In addition to utilising long-term connections, a ConnectionPooler also makes it possible to reduce the number of connections required to the database. For example, if you have 3 application nodes, each of which maintains 100 connections to the database at the same time, that would be 300 connections in total. The application usually does not even begin to utilise this number of connections. With the pgBouncer, this can be optimised so that the applications open the 300 connections to the pgBouncer, but the pgBouncer only generates 100 connections to PostgreSQL, for example, thus reducing the load by 2/3.

+ + + + + +
+
+
It is important to correctly configure the bouncer and thus the connections to be created between pgBouncer and PostgreSQL so that enough connections are available for the workload.
+
+ +
+

+ How does this work with CPO +

+ + + +
+

CPO relies on pgBouncer, a popular and above all lightweight open source tool. pgBouncer manages individual user-database connections for each user used, which can be used immediately for incoming client connections.

+
+

+ How do I create a pooler for a cluster? +

+ + + +
+
    +
  • +

    connection_pooler.number_of_instances - How many instances of connection pooler to create. Default is 2 which is also the required minimum.

    +
  • +
  • +

    connection_pooler.schema - Database schema to create for credentials lookup function to be used by the connection pooler. Is is created in every database of the Postgres cluster. You can also choose an existing schema. Default schema is pooler.

    +
  • +
  • +

    connection_pooler.user - User to create for connection pooler to be able to connect to a database. You can also choose an existing role, but make sure it has the LOGIN privilege. Default role is pooler.

    +
  • +
  • +

    connection_pooler.image - Docker image to use for connection pooler deployment. Default: “registry.opensource.zalan.do/acid/pgbouncer”

    +
  • +
  • +

    connection_poole.max_db_connections - How many connections the pooler can max hold. This value is divided among the pooler pods. Default is 60 which will make up 30 connections per pod for the default setup with two instances.

    +
  • +
  • +

    connection_pooler.mode - Defines pooler mode. Available Value: session, transaction or statement. Default is transaction.

    +
  • +
  • +

    connection_pooler.resources - Hardware definition for the pooler pods

    +
  • +
  • +

    enableConnectionPooler - Defines whether poolers for read/write access should be created based on the spec.connectionPooler definition.

    +
  • +
  • +

    enableReplicaConnectionPooler- Defines whether poolers for read-only access should be created based on the spec.connectionPooler definition.

    +
  • +
+
spec:
+  connectionPooler:
+    mode: transaction
+    numberOfInstances: 2
+    resources:
+      limits:
+        cpu: '1'
+        memory: 100Mi
+      requests:
+        cpu: 500m
+        memory: 100Mi
+    schema: pooler
+    user: pooler
+  enableConnectionPooler: true
+  enableReplicaConnectionPooler: true
+
+
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/connection_pooler/index.xml b/docs/hugo/public/connection_pooler/index.xml new file mode 100644 index 000000000..dd4d6d87c --- /dev/null +++ b/docs/hugo/public/connection_pooler/index.xml @@ -0,0 +1,12 @@ + + + + connection pooler on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/connection_pooler/ + Recent content in connection pooler on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/crd/crd-operator-configurator/index.html b/docs/hugo/public/crd/crd-operator-configurator/index.html new file mode 100644 index 000000000..d259af095 --- /dev/null +++ b/docs/hugo/public/crd/crd-operator-configurator/index.html @@ -0,0 +1,5549 @@ + + + + + + + + + + + + + Operator-Configuration | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Operator-Configuration

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypedefaultDescription
enable_crd_registrationbooleantrue
crd_categoriesstringall
enable_lazy_spilo_upgradebooleanfalse
enable_pgversion_env_varbooleantrue
enable_spilo_wal_path_combatbooleanfalse
etcd_hoststring
kubernetes_use_configmapsbooleanfalse
docker_imagestring
sidecarslist
enable_shm_volumebooleantrue
workersint8
max_instancesint-1
min_instancesint-1
resync_periodstring30m
repair_periodstring5m
set_memory_request_to_limitbooleanfalse
debug_loggingbooleantrue
enable_db_accessbooleantrue
spilo_privilegedbooleanfalse
spilo_allow_privilege_escalationbooleantrue
watched_namespacestring*
+
+

+ major-upgrade-specific +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypedefaultDescription
major_version_upgrade_modestringoff
major_version_upgrade_team_allow_liststring
minimal_major_versionstring9.6
target_major_versionstring14
+
+

+ aws-specific +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypedefaultDescription
wal_s3_bucketstring
log_s3_bucketstring
kube_iam_rolestring
aws_regionstring
additional_secret_mountstring
additional_secret_mount_pathstring
enable_ebs_gp3_migrationboolean
enable_ebs_gp3_migration_max_sizeint
+
+

+ logical-backup-specific +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypedefaultDescription
logical_backup_docker_imagestring
logical_backup_google_application_credentialsstring
logical_backup_job_prefixstring
logical_backup_providerstring
logical_backup_s3_access_key_idstring
logical_backup_s3_bucketstring
logical_backup_s3_endpointstring
logical_backup_s3_regionstring
logical_backup_s3_secret_access_keystring
logical_backup_s3_ssestring
logical_backup_s3_retention_timestring
logical_backup_schedulestring(Cron-Syntax)
+
+

+ team-api-specific +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypedefaultDescription
enable_teams_apistring
teams_api_urlstring
teams_api_role_configurationstring
enable_team_superuserboolean
team_admin_roleboolean
enable_admin_role_for_usersboolean
pam_role_namestring
pam_configurationstring
protected_role_nameslist
postgres_superuser_teamsstring
role_deletion_suffixstring
enable_team_member_deprecationboolean
enable_postgres_team_crdboolean
enable_postgres_team_crd_superusersboolean
enable_team_id_clustername_prefixboolean
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/crd/crd-postgresql/index.html b/docs/hugo/public/crd/crd-postgresql/index.html new file mode 100644 index 000000000..e6aa7a0ab --- /dev/null +++ b/docs/hugo/public/crd/crd-postgresql/index.html @@ -0,0 +1,7024 @@ + + + + + + + + + + + + + PostgreSQL | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

PostgreSQL

+
+
+ +
+

+ CRD for kind postgresql +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
apiVersionstringtrueacid.zalando.do/v1
kindstringtrue
metadataobjecttrue
specobjecttrue
statusobjectfalse
+
+
+

+ spec +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
additionalVolumesarrayfalseList of additional volumes to mount in each container of the statefulset pod
allowedSourceRangesarrayfalseThe corresponding load balancer is accessible only to the networks defined by this parameter
backupobjectfalseEnables the definition of a customised backup solution for the cluster
cloneobjectfalseDefines the clone-target for the Cluster
connectionPoolerobjectfalseDefines the configuration and settings for every type of a connectionPoolers (Primary and Replica).
databasesmapfalseDefines the name of the database, they are created by the operator. See tutorial
dockerImagestringtrueDefines the used PostgreSQL-Container-Image for this cluster
enableLogicalBackupbooleanfalseEnable logical Backups for this Cluster (Stored on S3) - s3-configuration for Operator is needed (Not for pgBackRest)
enableConnectionPoolerbooleanfalsecreates a ConnectionPooler for the primary Pod
enableReplicaConnectionPoolerbooleanfalsecreates a ConnectionPooler for the replica Pods
enableMasterLoadBalancerbooleanfalseDefine whether to enable the load balancer pointing to the Postgres primary
enableReplicaLoadBalancerbooleanfalseDefine whether to enable the load balancer pointing to the Postgres replicas
enableMasterPoolerLoadBalancerbooleanfalseDefine whether to enable the load balancer pointing to the primary ConnectionPooler
enableReplicaPoolerLoadBalancerbooleanfalseDefine whether to enable the load balancer pointing to the Replica-ConnectionPooler
enableShmVolumebooleanfalseStart a database pod without limitations on shm memory. By default Docker limit /dev/shm to 64M (see e.g. the docker issue, which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is true, to the target database pod will be mounted a new tmpfs volume to remove this limitation.
envarrayfalseAllows to add own Envs to the PostgreSQL containers
initContainersarrayfalseEnables the definition of init-containers
logicalBackupSchedulestringfalseEnables the scheduling of logical backups based on cron-syntax. Example: 30 00 * * *
maintenanceWindowsarrayfalseEnables the definition of maintenance windows for the cluster. Example: Sat:00:00-04:00
masterServiceAnnotationsmapfalseEnables the definition of annotations for the Primary Service
monitormapfalseEnables monitoring on the basis of the defined image
nodeAffinitymapfalseEnables overwriting of the nodeAffinity
numberOfInstancesinttrueNumber of nodes of the cluster
patronimapfalseEnables the customisation of patroni settings
podPriorityClassNamestringfalsea name of the priority class that should be assigned to the cluster pods. If not set then the default priority class is taken. The priority class itself must be defined in advance
podAnnotationsmapfalseA map of key value pairs that gets attached as annotations to each pod created for the database.
postgresqlmapfalseEnables the customisation of PostgreSQL settings and parameters
preparedDatabasesmapfalseAllows you to define databases including owner, schemas and extension and have the operator generate them. item See tutorial
replicaServiceAnnotationsmapfalseEnables the definition of annotations for the Replica Service
resourcesmaptrueCPU & Memory (Limit & Request) definition for the Postgres container
ServiceAnnotationsmapfalseA map of key value pairs that gets attached as annotations to each Service created for the database.
sidecarsarrayfalseEnables the definition of custom sidecars
spiloFSGroupintfalsethe Persistent Volumes for the Spilo pods in the StatefulSet will be owned and writable by the group ID specified. This will override the spilo_fsgroup operator parameter
spiloRunAsGroupintfalsesets the group ID which should be used in the container to run the process.
spiloRunAsUserintfalseSets the user ID which should be used in the container to run the process. This must be set to run the container without root.
standbymapfalseEnables the creation of a standby cluster at the time of the creation of a new cluster
streamsarrayfalseEnables change data capture streams for defined database tables
tdemapfalseEnables the activation of TDE if a new cluster is created
teamIdstringtruename of the team the cluster belongs to. Will be removed soon
tlsmapfalseCustom TLS certificate
tolerationsarrayfalsea list of tolerations that apply to the cluster pods. Each element of that list is a dictionary with the following fields:
key, operator, value, effect and tolerationSeconds
topologySpreadConstraintsmapfalseEnables the definition of a topologySpreadConstraint. See K8s-Documentation
usersmapfalsea map of usernames to user flags for the users that should be created in the cluster by the operator. See tutorial
usersWithSecretRotationlistfalselist of users to enable credential rotation in K8s secrets. The rotation interval can only be configured globally.
usersWithInPlaceSecretRotationlistfalselist of users to enable in-place password rotation in K8s secrets. The rotation interval can only be configured globally.
volumemaptruedefine the properties of the persistent storage that stores Postgres data
+⬅ Back to Parent +
+
+

+ additionalVolumes +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
namestringtrueEnables the definition of a pgbackrest-setup for the cluster
mountPathstringtrueEnables the definition of a pgbackrest-setup for the cluster
targetContainersarraytrueEnables the definition of a pgbackrest-setup for the cluster
subPathstringfalseEnables the definition of a pgbackrest-setup for the cluster
isSubPathExprbooleanfalseEnables the definition of a pgbackrest-setup for the cluster
volumeSourcemaptrueEnables the definition of a pgbackrest-setup for the cluster
+⬅ Back to Parent +
+
+

+ backup +

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameTyperequiredDescription
pgbackrestobjectfalseEnables the definition of a pgbackrest-setup for the cluster
+⬅ Back to Parent +
+
+

+ clone +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
clusterstringtrueName of the cluster to be cloned. Random value if the cluster does not exist locally.
pgbackrestobjectfalseEnables the definition of a pgbackrest-setup for the cluster
+⬅ Back to Parent +
+
+

+ connectionPooler +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
numberOfInstancesinttrueNumber of Pods per Pooler
modestringtruepooling mode for pgBouncer (session, transaction, statement)
schemastringtrueSchema for Pooler (Default: pooler)
userstringtrueUsername for Pooler (Default: pooler)
maxDBConnectionsstringtruemaxConnections to the DB-Pod(s)
resourcesmaptrueCPU & Memory (Limit & Request) definition for the Pooler
+
+

+ ⬅ Back to Parent +

+ ⬅ Back to Parent" aria-label="Anchor to: ⬅ Back to Parent" href="#hahahugoshortcode50s4hbhb"> + + +
+
+

+ env +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
namestringtrueKeyfield for the ENV-Entry
valuestringtrueValuefield for the ENV-Entry
+⬅ Back to Parent +
+
+

+ initContainers +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
namestringtrueName for the container
imagestringtrueDocker-Image for container
commandstringfalseto override CMD inside the container
envarrayfalseAllows to add own Envs to the container
resourcesmapfalseCPU & Memory (Limit & Request) definition for the container
portsarrayfalseDefine open ports for the container
+⬅ Back to Parent +
+
+

+ monitor +

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameTyperequiredDescription
imagestringtrueDocker-Image for the metric exporter
+⬅ Back to Parent +
+
+

+ patroni +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
failsafe_modebooleanfalsePatroni failsafe_mode parameter value. See the Patroni documentation for more details.
initdbmapfalsea map of key-value pairs describing initdb parameters
loop_waitstringfalsePatroni loop_wait parameter value, optional. The default is set by the PostgreSQL image.
maximum_lag_on_failoverstringfalsePatroni maximum_lag_on_failover parameter value, optional. The default is set by the PostgreSQL image.
multisitemapfalseMultisite configuration - Check the Documentation first
pg_hbaarrayfalselist of custom pg_hba lines to replace default ones. One entry per item (example: - hostssl all all 0.0.0.0/0 scram-sha-256)
retry_timeoutintfalsePatroni retry_timeout parameter value, optional. The default is set by the PostgreSQL image.
slotsmapfalsepermanent replication slots that Patroni preserves after failover by re-creating them on the new primary immediately. after doing a promote. Use preferred slot-name as map-item
synchronous_modebooleanfalseDPatroni synchronous_mode parameter value, optional. The default is false.
synchronous_mode_strictbooleanfalsePatroni synchronous_mode_strict parameter value, optional. The default is false.
synchronous_node_countintfalsePatroni synchronous_node_count parameter value, optional. The default is set to 1. Only used if synchronous_mode_strict is true
ttlintfalsePatroni ttl parameter value, optional. The default is set by the PostgreSQL image.
+⬅ Back to Parent +
+
+

+ PostgreSQL +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
parametersmapfalsePostgreSQL-Parameter as item (Example: max_connections: “100”). For help check out the CYBERTEC PostgreSQL Configurator
versionstringfalsea map of key-value pairs describing initdb parameters
+⬅ Back to Parent +
+
+

+ preparedDatabases +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
defaultUsersbooleanfalseCreates roles with LOGIN permission and _usersuffix. Default: false
extensionsmapfalseIncludes the Extensions as items (key:value). Key is the Name of the Extension and value the schema. Example: pgcrypto: public
schemasmapfalseIncludes the schemanames as items.
+⬅ Back to Parent +
+
+

+ resources +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
requestsmaptruecpu and memory definitons (request.cpu / request.memory)
limitsmaptruecpu and memory definitons (limits.cpu / limits.memory)
+⬅ Back to Parent +
+
+

+ sidecars +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
namestringtrueName for the container
imagestringtrueDocker-Image for container
commandstringfalseto override CMD inside the container
envarrayfalseAllows to add own Envs to the container
resourcesmapfalseCPU & Memory (Limit & Request) definition for the container
portsarrayfalseDefine open ports for the container
+⬅ Back to Parent +
+

+ standby +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
standby_hoststringtrueEndpoint of the primary cluster
standby_portstringtruePostgreSQL port of the primary cluster
+⬅ Back to Parent +
+
+

+ streams +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
applicationIdstringtrueThe application name to which the database and CDC belongs to.
databasestringtrueName of the database from where events will be published via Postgres’ logical decoding feature.
tablesmaptrueDefines a map of table names and their properties (eventType, idColumn and payloadColumn).
batchSizeintfalseDefines the size of batches in which events are consumed. Defaults to 1
enableRecoverybooleanfalseFlag to enable a dead letter queue recovery for all streams tables.
filterstringfalseStreamed events can be filtered by a jsonpath expression for each table.
standby_portstringfalsePostgreSQL port of the primary cluster
+⬅ Back to Parent +
+
+

+ tde +

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameTyperequiredDescription
enablebooleantrueenable TDE during initDB
+⬅ Back to Parent +
+
+

+ tolerations +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
keystringfalseKey for the taint attribute of the node
operatorstringfalseComparison operator (Equal or Exists).
valuestringfalseValue of the taint (only relevant for ‘Equal’).
effectstringfalseSpecifies how the node handles the pod (NoExecute, NoSchedule, PreferNoSchedule)
tolerationSecondsintfalseSpecifies how long the pod tolerates the taint (only for NoExecute).
+⬅ Back to Parent +
+
+

+ volume +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
sizestringtruethe size of the target volume. Usual Kubernetes size modifiers, i.e. Gi or Mi, apply
storageClassstringfalsethe name of the Kubernetes storage class to draw the persistent volume from. If empty K8s will choose the default StorageClass
subPathstringfalseSubpath to use when mounting volume into PostgreSQL container.
iopsintfalseWhen running the operator on AWS the latest generation of EBS volumes (gp3) allows for configuring the number of IOPS. Maximum is 16000
throughputintfalseWhen running the operator on AWS the latest generation of EBS volumes (gp3) allows for configuring the throughput in MB/s. Maximum is 1000
selectormapfalseA label query over PVs to consider for binding. See the Kubernetes documentation for details on using matchLabels and matchExpressions
+⬅ Back to Parent +
+
+

+ volumeSource +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
emptyDirstringfalseemptyDir: {}
PersistentVolumeClaimmapfalsePersistentVolumeClaim-Objekt
configMapmapfalseconfigMap-Objekt
+⬅ Back to Parent +
+
+

+ volumeSource-PersistentVolumeClaim +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
claimNamestringtrueName of the PersistentVolumeClaim
readyOnlybooleanfalsePersistentVolumeClaim-Objekt
+⬅ Back to Parent +
+
+

+ volumeSource-configMap +

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameTyperequiredDescription
namestringtrueName of the Configmap
+⬅ Back to Parent +
+
+

+ multisite +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
enablebooleantrueEnable multisite-feature
etcdmaptrueEnables the definition of a pgbackrest-setup for the cluster
retry_timeoutinttruePatroni retry_timeout parameter value for the global etcd, optional. The default is set by the PostgreSQL image.
sitestringtrueName for the site of this cluster
ttlinttruePatroni ttl parameter value for the global etcd, optional. The default is set by the PostgreSQL image.
+⬅ Back to Parent +
+
+

+ slots +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
typestringtrueSlot-Type (physical or logical)
databasestringfalseDatabasename - for logical replication only
pluginstringfalsePlugin - for logical replication only
+
+

+ ⬅ Back to Parent +

+ ⬅ Back to Parent" aria-label="Anchor to: ⬅ Back to Parent" href="#hahahugoshortcode50s22hbhb"> + + +
+
+

+ schemas +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
defaultRolesbooleanfalseCreates schema exclusiv roles with NOLOGIN permission and _usersuffix Default: true
defaultUsersbooleanfalseCreates schema exclusiv roles with LOGIN permission and _usersuffix Default: false
+
+

+ etcd +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
hostsstringtruelist of etcd hosts, including etcd-client-port (default: 2379), comma separated like in the etcd config
passwordstringfalsePassword for the global etcd
protocolstringtrueProtocol for the global etcd (http or https)
userstringfalseUsername for the global etcd
+⬅ Back to Parent +
+
+

+ requests +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
cpustringtruecpu definitons Example: 1000m
memorystringtruememory definitons Example: 1000Mi
+⬅ Back to Parent +
+
+

+ limits +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
cpustringtruecpu definitons Example: 1000m
memorystringtruememory definitons Example: 1000Mi
+⬅ Back to Parent +
+
+

+ pgbackrest +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
configurationobjectfalseEnables the definition of a pgbackrest-setup for the cluster
globalobjectfalse
imagestringtrue
reposarraytrue
resourcesobjectfalseCPU & Memory (Limit & Request) definition for the pgBackRest container
+⬅ Back to Parent +
+
+

+ configuration +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
secretobjectfalseSecretname with the contained S3 credentials (AccessKey & SecretAccessKey) (Note: must be placed in the same namespace as the cluster)
protectionobjectfalseEnable Protection-Options
+⬅ Back to Parent +
+
+

+ protection +

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameTyperequiredDescription
restorebooleanfalseA restore is ignored as long as this option is set to true.
+⬅ Back to Parent +
+
+

+ repos +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
namestringtrueName of the repository Required:Repo[1-4]
storagestringtrueDefines the used backup-storage (Choose from List: pvc,s3,blob,gcs)
resourcestringtrueBucket-/Instance-/Storage- or PVC-Name
endpointstringfalseThe Endpoint for the choosen Storage (Not required for local storage)
regionstringfalseRegion for the choosen Storage (S3 only)
schedulestringfalseObject for defining automatic backups
+⬅ Back to Parent +
+
+

+ schedule +

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTyperequiredDescription
fullstringfalse(Cron-Syntax) Define full backup
incrstringfalse(Cron-Syntax) Define incremental backup
diffstringfalse(Cron-Syntax) Define differential backup
+⬅ Back to Parent +
+
+

+ status +

+ + + +
+
+ + + + + + + + + + + + + + + + +
NameTyperequiredDescription
PostgresClusterStatusstringfalseShows the cluster status. Filled by the Operator
+⬅ Back to Parent + +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/crd/index.html b/docs/hugo/public/crd/index.html new file mode 100644 index 000000000..966202e96 --- /dev/null +++ b/docs/hugo/public/crd/index.html @@ -0,0 +1,5081 @@ + + + + + + + + + + + + References | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

References

+
+ +
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/crd/index.xml b/docs/hugo/public/crd/index.xml new file mode 100644 index 000000000..d5f527950 --- /dev/null +++ b/docs/hugo/public/crd/index.xml @@ -0,0 +1,26 @@ + + + + References on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/crd/ + Recent content in References on CYBERTEC-PG-Operator + Hugo + en + Tue, 07 Mar 2023 14:26:51 +0100 + + + PostgreSQL + http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/ + <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="crd-for-kind-postgresql" > CRD for kind postgresql </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#crd-for-kind-postgresql" class="gdoc-page__anchor clip flex align-center" title="Anchor to: CRD for kind postgresql" aria-label="Anchor to: CRD for kind postgresql" href="#crd-for-kind-postgresql"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>apiVersion</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">acid.zalando.do/v1</td> </tr> <tr> <td>kind</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>metadata</td> <td style="text-align: center">object</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#spec" >spec</a></td> <td style="text-align: center">object</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#status" >status</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> </tbody> </table> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="spec" > spec </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#spec" class="gdoc-page__anchor clip flex align-center" title="Anchor to: spec" aria-label="Anchor to: spec" href="#spec"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td><a class="gdoc-markdown__link" href="#additionalvolumes" >additionalVolumes</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">List of additional volumes to mount in each container of the statefulset pod</td> </tr> <tr> <td>allowedSourceRanges</td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">The corresponding load balancer is accessible only to the networks defined by this parameter</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#backup" >backup</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a customised backup solution for the cluster</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#clone" >clone</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Defines the clone-target for the Cluster</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#connectionpooler" >connectionPooler</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Defines the configuration and settings for every type of a connectionPoolers (Primary and Replica).</td> </tr> <tr> <td>databases</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Defines the name of the database, they are created by the operator. See <a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/configure_users_and_databases" >tutorial</a></td> </tr> <tr> <td>dockerImage</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Defines the used PostgreSQL-Container-Image for this cluster</td> </tr> <tr> <td>enableLogicalBackup</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Enable logical Backups for this Cluster (Stored on S3) - s3-configuration for Operator is needed (Not for pgBackRest)</td> </tr> <tr> <td>enableConnectionPooler</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">creates a ConnectionPooler for the primary Pod</td> </tr> <tr> <td>enableReplicaConnectionPooler</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">creates a ConnectionPooler for the replica Pods</td> </tr> <tr> <td>enableMasterLoadBalancer</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Define whether to enable the load balancer pointing to the Postgres primary</td> </tr> <tr> <td>enableReplicaLoadBalancer</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Define whether to enable the load balancer pointing to the Postgres replicas</td> </tr> <tr> <td>enableMasterPoolerLoadBalancer</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Define whether to enable the load balancer pointing to the primary ConnectionPooler</td> </tr> <tr> <td>enableReplicaPoolerLoadBalancer</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Define whether to enable the load balancer pointing to the Replica-ConnectionPooler</td> </tr> <tr> <td>enableShmVolume</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Start a database pod without limitations on shm memory. By default Docker limit /dev/shm to 64M (see e.g. the docker issue, which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is true, to the target database pod will be mounted a new tmpfs volume to remove this limitation.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#env" >env</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Allows to add own Envs to the PostgreSQL containers</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#initcontainers" >initContainers</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of init-containers</td> </tr> <tr> <td>logicalBackupSchedule</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the scheduling of logical backups based on cron-syntax. Example: <code>30 00 * * *</code></td> </tr> <tr> <td>maintenanceWindows</td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of maintenance windows for the cluster. Example: <code>Sat:00:00-04:00</code></td> </tr> <tr> <td>masterServiceAnnotations</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of annotations for the Primary Service</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#monitor" >monitor</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables monitoring on the basis of the defined image</td> </tr> <tr> <td>nodeAffinity</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables overwriting of the nodeAffinity</td> </tr> <tr> <td>numberOfInstances</td> <td style="text-align: center">int</td> <td style="text-align: right">true</td> <td style="text-align: right">Number of nodes of the cluster</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#patroni" >patroni</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the customisation of patroni settings</td> </tr> <tr> <td>podPriorityClassName</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">a name of the priority class that should be assigned to the cluster pods. If not set then the default priority class is taken. The priority class itself must be defined in advance</td> </tr> <tr> <td>podAnnotations</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">A map of key value pairs that gets attached as annotations to each pod created for the database.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#postgresql" >postgresql</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the customisation of PostgreSQL settings and parameters</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#prepareddatabases" >preparedDatabases</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Allows you to define databases including owner, schemas and extension and have the operator generate them. item See <a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/prepared_databases" >tutorial</a></td> </tr> <tr> <td>replicaServiceAnnotations</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of annotations for the Replica Service</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#resources" >resources</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">CPU &amp; Memory (Limit &amp; Request) definition for the Postgres container</td> </tr> <tr> <td>ServiceAnnotations</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">A map of key value pairs that gets attached as annotations to each Service created for the database.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#sidecars" >sidecars</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of custom sidecars</td> </tr> <tr> <td>spiloFSGroup</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">the Persistent Volumes for the Spilo pods in the StatefulSet will be owned and writable by the group ID specified. This will override the spilo_fsgroup operator parameter</td> </tr> <tr> <td>spiloRunAsGroup</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">sets the group ID which should be used in the container to run the process.</td> </tr> <tr> <td>spiloRunAsUser</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Sets the user ID which should be used in the container to run the process. This must be set to run the container without root.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#standby" >standby</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the creation of a standby cluster at the time of the creation of a new cluster</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#streams" >streams</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables change data capture streams for defined database tables</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#tde" >tde</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the activation of TDE if a new cluster is created</td> </tr> <tr> <td>teamId</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">name of the team the cluster belongs to. Will be removed soon</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#tls" >tls</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Custom TLS certificate</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#tolerations" >tolerations</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">a list of tolerations that apply to the cluster pods. Each element of that list is a dictionary with the following fields:</td> </tr> <tr> <td>key, operator, value, effect and tolerationSeconds</td> <td></td> <td></td> <td></td> </tr> <tr> <td><a class="gdoc-markdown__link" href="https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/" >topologySpreadConstraints</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a topologySpreadConstraint. See <a class="gdoc-markdown__link" href="https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/" >K8s-Documentation</a></td> </tr> <tr> <td>users</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">a map of usernames to user flags for the users that should be created in the cluster by the operator. See <a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/configure_users_and_databases" >tutorial</a></td> </tr> <tr> <td>usersWithSecretRotation</td> <td style="text-align: center">list</td> <td style="text-align: right">false</td> <td style="text-align: right">list of users to enable credential rotation in K8s secrets. The rotation interval can only be configured globally.</td> </tr> <tr> <td>usersWithInPlaceSecretRotation</td> <td style="text-align: center">list</td> <td style="text-align: right">false</td> <td style="text-align: right">list of users to enable in-place password rotation in K8s secrets. The rotation interval can only be configured globally.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#volume" >volume</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">define the properties of the persistent storage that stores Postgres data</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="additionalvolumes" > additionalVolumes </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#additionalvolumes" class="gdoc-page__anchor clip flex align-center" title="Anchor to: additionalVolumes" aria-label="Anchor to: additionalVolumes" href="#additionalvolumes"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>mountPath</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>targetContainers</td> <td style="text-align: center">array</td> <td style="text-align: right">true</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>subPath</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>isSubPathExpr</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#volumeSource" >volumeSource</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="backup" > backup </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#backup" class="gdoc-page__anchor clip flex align-center" title="Anchor to: backup" aria-label="Anchor to: backup" href="#backup"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td><a class="gdoc-markdown__link" href="#pgbackrest" >pgbackrest</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="clone" > clone </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#clone" class="gdoc-page__anchor clip flex align-center" title="Anchor to: clone" aria-label="Anchor to: clone" href="#clone"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>cluster</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name of the cluster to be cloned. Random value if the cluster does not exist locally.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#pgbackrest" >pgbackrest</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="connectionpooler" > connectionPooler </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#connectionpooler" class="gdoc-page__anchor clip flex align-center" title="Anchor to: connectionPooler" aria-label="Anchor to: connectionPooler" href="#connectionpooler"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>numberOfInstances</td> <td style="text-align: center">int</td> <td style="text-align: right">true</td> <td style="text-align: right">Number of Pods per Pooler</td> </tr> <tr> <td>mode</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">pooling mode for pgBouncer (session, transaction, statement)</td> </tr> <tr> <td>schema</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Schema for Pooler (Default: pooler)</td> </tr> <tr> <td>user</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Username for Pooler (Default: pooler)</td> </tr> <tr> <td>maxDBConnections</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">maxConnections to the DB-Pod(s)</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#resources" >resources</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">CPU &amp; Memory (Limit &amp; Request) definition for the Pooler</td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="hahahugoshortcode50s4hbhb" > <a href="javascript:history.back()">⬅ Back to Parent</a> </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#hahahugoshortcode50s4hbhb" class="gdoc-page__anchor clip flex align-center" title="Anchor to: <a href="javascript:history.back()">⬅ Back to Parent</a>" aria-label="Anchor to: <a href="javascript:history.back()">⬅ Back to Parent</a>" href="#hahahugoshortcode50s4hbhb"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="env" > env </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#env" class="gdoc-page__anchor clip flex align-center" title="Anchor to: env" aria-label="Anchor to: env" href="#env"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Keyfield for the ENV-Entry</td> </tr> <tr> <td>value</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Valuefield for the ENV-Entry</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="initcontainers" > initContainers </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#initcontainers" class="gdoc-page__anchor clip flex align-center" title="Anchor to: initContainers" aria-label="Anchor to: initContainers" href="#initcontainers"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name for the container</td> </tr> <tr> <td>image</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Docker-Image for container</td> </tr> <tr> <td>command</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">to override CMD inside the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#env" >env</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Allows to add own Envs to the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#resources" >resources</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">CPU &amp; Memory (Limit &amp; Request) definition for the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="ports" >ports</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Define open ports for the container</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="monitor" > monitor </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#monitor" class="gdoc-page__anchor clip flex align-center" title="Anchor to: monitor" aria-label="Anchor to: monitor" href="#monitor"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>image</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Docker-Image for the metric exporter</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="patroni" > patroni </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#patroni" class="gdoc-page__anchor clip flex align-center" title="Anchor to: patroni" aria-label="Anchor to: patroni" href="#patroni"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>failsafe_mode</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni failsafe_mode parameter value. See the <a class="gdoc-markdown__link" href="https://patroni.readthedocs.io/en/master/dcs_failsafe_mode.html" >Patroni documentation</a> for more details.</td> </tr> <tr> <td>initdb</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">a map of key-value pairs describing initdb parameters</td> </tr> <tr> <td>loop_wait</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>loop_wait</code> parameter value, optional. The default is set by the PostgreSQL image.</td> </tr> <tr> <td>maximum_lag_on_failover</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>maximum_lag_on_failover</code> parameter value, optional. The default is set by the PostgreSQL image.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#multisite" >multisite</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Multisite configuration - Check the <a class="gdoc-markdown__link" href="CYBERTEC-pg-operator/multisite/" >Documentation</a> first</td> </tr> <tr> <td>pg_hba</td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">list of custom pg_hba lines to replace default ones. One entry per item (example: - hostssl all all 0.0.0.0/0 scram-sha-256)</td> </tr> <tr> <td>retry_timeout</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>retry_timeout</code> parameter value, optional. The default is set by the PostgreSQL image.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#slots" >slots</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">permanent replication slots that Patroni preserves after failover by re-creating them on the new primary immediately. after doing a promote. Use preferred slot-name as map-item</td> </tr> <tr> <td>synchronous_mode</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">DPatroni <code>synchronous_mode</code> parameter value, optional. The default is false.</td> </tr> <tr> <td>synchronous_mode_strict</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>synchronous_mode_strict</code> parameter value, optional. The default is false.</td> </tr> <tr> <td>synchronous_node_count</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>synchronous_node_count</code> parameter value, optional. The default is set to 1. Only used if <code>synchronous_mode_strict</code> is true</td> </tr> <tr> <td>ttl</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>ttl</code> parameter value, optional. The default is set by the PostgreSQL image.</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="postgresql" > PostgreSQL </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#postgresql" class="gdoc-page__anchor clip flex align-center" title="Anchor to: PostgreSQL" aria-label="Anchor to: PostgreSQL" href="#postgresql"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>parameters</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">PostgreSQL-Parameter as item (Example: max_connections: &ldquo;100&rdquo;). For help check out the <a class="gdoc-markdown__link" href="https://pgconfigurator.cybertec.at" >CYBERTEC PostgreSQL Configurator</a></td> </tr> <tr> <td>version</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">a map of key-value pairs describing initdb parameters</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="prepareddatabases" > preparedDatabases </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#prepareddatabases" class="gdoc-page__anchor clip flex align-center" title="Anchor to: preparedDatabases" aria-label="Anchor to: preparedDatabases" href="#prepareddatabases"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>defaultUsers</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Creates roles with <code>LOGIN</code> permission and <code>_user</code>suffix. Default: false</td> </tr> <tr> <td>extensions</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Includes the Extensions as items (key:value). Key is the Name of the Extension and value the schema. Example: pgcrypto: public</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#schemas" >schemas</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Includes the schemanames as items.</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="resources" > resources </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#resources" class="gdoc-page__anchor clip flex align-center" title="Anchor to: resources" aria-label="Anchor to: resources" href="#resources"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td><a class="gdoc-markdown__link" href="#requests" >requests</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">cpu and memory definitons (request.cpu / request.memory)</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#limits" >limits</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">cpu and memory definitons (limits.cpu / limits.memory)</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="sidecars" > sidecars </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#sidecars" class="gdoc-page__anchor clip flex align-center" title="Anchor to: sidecars" aria-label="Anchor to: sidecars" href="#sidecars"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name for the container</td> </tr> <tr> <td>image</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Docker-Image for container</td> </tr> <tr> <td>command</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">to override CMD inside the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#env" >env</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Allows to add own Envs to the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#resources" >resources</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">CPU &amp; Memory (Limit &amp; Request) definition for the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="ports" >ports</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Define open ports for the container</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="standby" > standby </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#standby" class="gdoc-page__anchor clip flex align-center" title="Anchor to: standby" aria-label="Anchor to: standby" href="#standby"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>standby_host</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Endpoint of the primary cluster</td> </tr> <tr> <td>standby_port</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">PostgreSQL port of the primary cluster</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="streams" > streams </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#streams" class="gdoc-page__anchor clip flex align-center" title="Anchor to: streams" aria-label="Anchor to: streams" href="#streams"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>applicationId</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">The application name to which the database and CDC belongs to.</td> </tr> <tr> <td>database</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name of the database from where events will be published via Postgres&rsquo; logical decoding feature.</td> </tr> <tr> <td>tables</td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">Defines a map of table names and their properties (eventType, idColumn and payloadColumn).</td> </tr> <tr> <td>batchSize</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Defines the size of batches in which events are consumed. Defaults to 1</td> </tr> <tr> <td>enableRecovery</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Flag to enable a dead letter queue recovery for all streams tables.</td> </tr> <tr> <td>filter</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Streamed events can be filtered by a jsonpath expression for each table.</td> </tr> <tr> <td>standby_port</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">PostgreSQL port of the primary cluster</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="tde" > tde </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#tde" class="gdoc-page__anchor clip flex align-center" title="Anchor to: tde" aria-label="Anchor to: tde" href="#tde"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>enable</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right">enable TDE during initDB</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="tolerations" > tolerations </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#tolerations" class="gdoc-page__anchor clip flex align-center" title="Anchor to: tolerations" aria-label="Anchor to: tolerations" href="#tolerations"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>key</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Key for the taint attribute of the node</td> </tr> <tr> <td>operator</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Comparison operator (Equal or Exists).</td> </tr> <tr> <td>value</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Value of the taint (only relevant for ‘Equal’).</td> </tr> <tr> <td>effect</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Specifies how the node handles the pod (NoExecute, NoSchedule, PreferNoSchedule)</td> </tr> <tr> <td>tolerationSeconds</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Specifies how long the pod tolerates the taint (only for NoExecute).</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="volume" > volume </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#volume" class="gdoc-page__anchor clip flex align-center" title="Anchor to: volume" aria-label="Anchor to: volume" href="#volume"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>size</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">the size of the target volume. Usual Kubernetes size modifiers, i.e. Gi or Mi, apply</td> </tr> <tr> <td>storageClass</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">the name of the Kubernetes storage class to draw the persistent volume from. If empty K8s will choose the default StorageClass</td> </tr> <tr> <td>subPath</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Subpath to use when mounting volume into PostgreSQL container.</td> </tr> <tr> <td>iops</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">When running the operator on AWS the latest generation of EBS volumes (gp3) allows for configuring the number of IOPS. Maximum is 16000</td> </tr> <tr> <td>throughput</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">When running the operator on AWS the latest generation of EBS volumes (gp3) allows for configuring the throughput in MB/s. Maximum is 1000</td> </tr> <tr> <td>selector</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">A label query over PVs to consider for binding. See the <a class="gdoc-markdown__link" href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" >Kubernetes documentation</a> for details on using matchLabels and matchExpressions</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="volumesource" > volumeSource </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#volumesource" class="gdoc-page__anchor clip flex align-center" title="Anchor to: volumeSource" aria-label="Anchor to: volumeSource" href="#volumesource"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>emptyDir</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">emptyDir: {}</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#volumeSource-PersistentVolumeClaim" >PersistentVolumeClaim</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">PersistentVolumeClaim-Objekt</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#volumeSource-configMap" >configMap</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">configMap-Objekt</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="volumesource-persistentvolumeclaim" > volumeSource-PersistentVolumeClaim </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#volumesource-persistentvolumeclaim" class="gdoc-page__anchor clip flex align-center" title="Anchor to: volumeSource-PersistentVolumeClaim" aria-label="Anchor to: volumeSource-PersistentVolumeClaim" href="#volumesource-persistentvolumeclaim"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>claimName</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name of the PersistentVolumeClaim</td> </tr> <tr> <td>readyOnly</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">PersistentVolumeClaim-Objekt</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="volumesource-configmap" > volumeSource-configMap </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#volumesource-configmap" class="gdoc-page__anchor clip flex align-center" title="Anchor to: volumeSource-configMap" aria-label="Anchor to: volumeSource-configMap" href="#volumesource-configmap"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name of the Configmap</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="multisite" > multisite </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#multisite" class="gdoc-page__anchor clip flex align-center" title="Anchor to: multisite" aria-label="Anchor to: multisite" href="#multisite"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>enable</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right">Enable multisite-feature</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#etcd" >etcd</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>retry_timeout</td> <td style="text-align: center">int</td> <td style="text-align: right">true</td> <td style="text-align: right">Patroni <code>retry_timeout</code> parameter value for the global etcd, optional. The default is set by the PostgreSQL image.</td> </tr> <tr> <td>site</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name for the site of this cluster</td> </tr> <tr> <td>ttl</td> <td style="text-align: center">int</td> <td style="text-align: right">true</td> <td style="text-align: right">Patroni <code>ttl</code> parameter value for the global etcd, optional. The default is set by the PostgreSQL image.</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="slots" > slots </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#slots" class="gdoc-page__anchor clip flex align-center" title="Anchor to: slots" aria-label="Anchor to: slots" href="#slots"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>type</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Slot-Type (<code>physical</code> or <code>logical</code>)</td> </tr> <tr> <td>database</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Databasename - for logical replication only</td> </tr> <tr> <td>plugin</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Plugin - for logical replication only</td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="hahahugoshortcode50s22hbhb" > <a href="javascript:history.back()">⬅ Back to Parent</a> </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#hahahugoshortcode50s22hbhb" class="gdoc-page__anchor clip flex align-center" title="Anchor to: <a href="javascript:history.back()">⬅ Back to Parent</a>" aria-label="Anchor to: <a href="javascript:history.back()">⬅ Back to Parent</a>" href="#hahahugoshortcode50s22hbhb"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="schemas" > schemas </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#schemas" class="gdoc-page__anchor clip flex align-center" title="Anchor to: schemas" aria-label="Anchor to: schemas" href="#schemas"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>defaultRoles</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Creates schema exclusiv roles with <code>NOLOGIN</code> permission and <code>_user</code>suffix Default: true</td> </tr> <tr> <td>defaultUsers</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Creates schema exclusiv roles with <code>LOGIN</code> permission and <code>_user</code>suffix Default: false</td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="etcd" > etcd </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#etcd" class="gdoc-page__anchor clip flex align-center" title="Anchor to: etcd" aria-label="Anchor to: etcd" href="#etcd"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>hosts</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">list of etcd hosts, including etcd-client-port (default: <code>2379</code>), comma separated like in the etcd config</td> </tr> <tr> <td>password</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Password for the global etcd</td> </tr> <tr> <td>protocol</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Protocol for the global etcd (http or https)</td> </tr> <tr> <td>user</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Username for the global etcd</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="requests" > requests </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#requests" class="gdoc-page__anchor clip flex align-center" title="Anchor to: requests" aria-label="Anchor to: requests" href="#requests"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>cpu</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">cpu definitons Example: 1000m</td> </tr> <tr> <td>memory</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">memory definitons Example: 1000Mi</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="limits" > limits </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#limits" class="gdoc-page__anchor clip flex align-center" title="Anchor to: limits" aria-label="Anchor to: limits" href="#limits"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>cpu</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">cpu definitons Example: 1000m</td> </tr> <tr> <td>memory</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">memory definitons Example: 1000Mi</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="pgbackrest" > pgbackrest </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#pgbackrest" class="gdoc-page__anchor clip flex align-center" title="Anchor to: pgbackrest" aria-label="Anchor to: pgbackrest" href="#pgbackrest"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td><a class="gdoc-markdown__link" href="#configuration" >configuration</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>global</td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>image</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#repos" >repos</a></td> <td style="text-align: center">array</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#resources" >resources</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">CPU &amp; Memory (Limit &amp; Request) definition for the pgBackRest container</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="configuration" > configuration </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#configuration" class="gdoc-page__anchor clip flex align-center" title="Anchor to: configuration" aria-label="Anchor to: configuration" href="#configuration"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>secret</td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Secretname with the contained S3 credentials (AccessKey &amp; SecretAccessKey) (Note: must be placed in the same namespace as the cluster)</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#protection" >protection</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Enable Protection-Options</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="protection" > protection </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#protection" class="gdoc-page__anchor clip flex align-center" title="Anchor to: protection" aria-label="Anchor to: protection" href="#protection"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>restore</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">A restore is ignored as long as this option is set to true.</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="repos" > repos </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#repos" class="gdoc-page__anchor clip flex align-center" title="Anchor to: repos" aria-label="Anchor to: repos" href="#repos"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name of the repository Required:Repo[1-4]</td> </tr> <tr> <td>storage</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Defines the used backup-storage (Choose from List: pvc,s3,blob,gcs)</td> </tr> <tr> <td>resource</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Bucket-/Instance-/Storage- or PVC-Name</td> </tr> <tr> <td>endpoint</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">The Endpoint for the choosen Storage (Not required for local storage)</td> </tr> <tr> <td>region</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Region for the choosen Storage (S3 only)</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#schedule" >schedule</a></td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Object for defining automatic backups</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="schedule" > schedule </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#schedule" class="gdoc-page__anchor clip flex align-center" title="Anchor to: schedule" aria-label="Anchor to: schedule" href="#schedule"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>full</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">(Cron-Syntax) Define full backup</td> </tr> <tr> <td>incr</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">(Cron-Syntax) Define incremental backup</td> </tr> <tr> <td>diff</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">(Cron-Syntax) Define differential backup</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="status" > status </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#status" class="gdoc-page__anchor clip flex align-center" title="Anchor to: status" aria-label="Anchor to: status" href="#status"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>PostgresClusterStatus</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Shows the cluster status. Filled by the Operator</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> + + + Operator-Configuration + http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/ + <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">default</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>enable_crd_registration</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>crd_categories</td> <td style="text-align: center">string</td> <td style="text-align: right">all</td> <td style="text-align: right"></td> </tr> <tr> <td>enable_lazy_spilo_upgrade</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>enable_pgversion_env_var</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>enable_spilo_wal_path_combat</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>etcd_host</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>kubernetes_use_configmaps</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>docker_image</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>sidecars</td> <td style="text-align: center">list</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_shm_volume</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>workers</td> <td style="text-align: center">int</td> <td style="text-align: right">8</td> <td style="text-align: right"></td> </tr> <tr> <td>max_instances</td> <td style="text-align: center">int</td> <td style="text-align: right">-1</td> <td style="text-align: right"></td> </tr> <tr> <td>min_instances</td> <td style="text-align: center">int</td> <td style="text-align: right">-1</td> <td style="text-align: right"></td> </tr> <tr> <td>resync_period</td> <td style="text-align: center">string</td> <td style="text-align: right">30m</td> <td style="text-align: right"></td> </tr> <tr> <td>repair_period</td> <td style="text-align: center">string</td> <td style="text-align: right">5m</td> <td style="text-align: right"></td> </tr> <tr> <td>set_memory_request_to_limit</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>debug_logging</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>enable_db_access</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>spilo_privileged</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>spilo_allow_privilege_escalation</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>watched_namespace</td> <td style="text-align: center">string</td> <td style="text-align: right">*</td> <td style="text-align: right"></td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="major-upgrade-specific" > major-upgrade-specific </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/#major-upgrade-specific" class="gdoc-page__anchor clip flex align-center" title="Anchor to: major-upgrade-specific" aria-label="Anchor to: major-upgrade-specific" href="#major-upgrade-specific"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">default</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>major_version_upgrade_mode</td> <td style="text-align: center">string</td> <td style="text-align: right">off</td> <td style="text-align: right"></td> </tr> <tr> <td>major_version_upgrade_team_allow_list</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>minimal_major_version</td> <td style="text-align: center">string</td> <td style="text-align: right">9.6</td> <td style="text-align: right"></td> </tr> <tr> <td>target_major_version</td> <td style="text-align: center">string</td> <td style="text-align: right">14</td> <td style="text-align: right"></td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="aws-specific" > aws-specific </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/#aws-specific" class="gdoc-page__anchor clip flex align-center" title="Anchor to: aws-specific" aria-label="Anchor to: aws-specific" href="#aws-specific"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">default</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>wal_s3_bucket</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>log_s3_bucket</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>kube_iam_role</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>aws_region</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>additional_secret_mount</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>additional_secret_mount_path</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_ebs_gp3_migration</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_ebs_gp3_migration_max_size</td> <td style="text-align: center">int</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="logical-backup-specific" > logical-backup-specific </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/#logical-backup-specific" class="gdoc-page__anchor clip flex align-center" title="Anchor to: logical-backup-specific" aria-label="Anchor to: logical-backup-specific" href="#logical-backup-specific"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">default</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>logical_backup_docker_image</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_google_application_credentials</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_job_prefix</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_provider</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_access_key_id</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_bucket</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_endpoint</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_region</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_secret_access_key</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_sse</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_retention_time</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_schedule</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right">(Cron-Syntax)</td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="team-api-specific" > team-api-specific </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/#team-api-specific" class="gdoc-page__anchor clip flex align-center" title="Anchor to: team-api-specific" aria-label="Anchor to: team-api-specific" href="#team-api-specific"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">default</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>enable_teams_api</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>teams_api_url</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>teams_api_role_configuration</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_team_superuser</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>team_admin_role</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_admin_role_for_users</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>pam_role_name</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>pam_configuration</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>protected_role_names</td> <td style="text-align: center">list</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>postgres_superuser_teams</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>role_deletion_suffix</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_team_member_deprecation</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_postgres_team_crd</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_postgres_team_crd_superusers</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_team_id_clustername_prefix</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> </tbody> </table> + + + diff --git a/docs/hugo/public/css/styles.css b/docs/hugo/public/css/styles.css new file mode 100644 index 000000000..d1f5fce85 --- /dev/null +++ b/docs/hugo/public/css/styles.css @@ -0,0 +1,3 @@ +thead { + background: var(--accent-color-lite); + } \ No newline at end of file diff --git a/docs/hugo/public/custom.css b/docs/hugo/public/custom.css new file mode 100644 index 000000000..799ddf111 --- /dev/null +++ b/docs/hugo/public/custom.css @@ -0,0 +1,342 @@ +/* Custom variables */ +:root { + --ci-color-primary: #153558; + --ci-color-secondary: #4ec1ec; + --ci-color-tertiary: #3880ad; + --ci-color-text: #40424a; + --ci-color-success: #006600; + --ci-color-error1: #cc3333; + --ci-color-error2: #f52222; + --ci-lightest-of-blues: #eaf4ff; + --ci-color-white: #ffffff; + + --custom-border-radius: 3px; + --custom-color-heading-color-alternative: var(--ci-color-tertiary); + --custom-color-heading-color: var(--ci-color-primary); + --custom-footer-link-color: var(--ci-color-white); + --custom-header-height: 80px; + --custom-header-margin: 2rem; + --custom-link-color: var(--ci-color-tertiary); + --custom-paper-color: #ffffff; +} + +/* Light mode (modify both object at the same time) */ +:root[color-theme="light"] { + --accent-color: unset; + --body-background: var(--ci-lightest-of-blues); + --body-font-color: var(--ci-color-text); + --code-copy-success-color: var(--ci-color-success); + --custom-color-heading-color-alternative: var(--ci-color-tertiary); + --custom-color-heading-color: var(--ci-color-primary); + --custom-paper-color: var(--ci-color-white); + --footer-background: var(--ci-color-primary); + --header-background: var(--ci-color-primary); +} + +@media (prefers-color-scheme: light) { + :root { + --accent-color: unset; + --body-background: var(--ci-lightest-of-blues); + --body-font-color: var(--ci-color-text); + --code-copy-success-color: var(--ci-color-success); + --custom-color-heading-color-alternative: var(--ci-color-tertiary); + --custom-color-heading-color: var(--ci-color-primary); + --custom-paper-color: var(--ci-color-white); + --footer-background: var(--ci-color-primary); + --header-background: var(--ci-color-primary); + } +} + + +/* Dark mode (modify both object at the same time) */ +:root[color-theme="dark"] { + --accent-color: unset; + --body-background: #0b223a; + --custom-color-heading-color-alternative: var(--ci-color-secondary); + --custom-color-heading-color: var(--ci-color-white); + --custom-paper-color: var(--ci-color-primary); + --header-background: var(--ci-color-primary); + /* Fix the $$ highlighting */ + .chroma .err { + color: inherit; + background-color: inherit; + } +} + +@media (prefers-color-scheme: dark) { + :root { + --accent-color: unset; + --body-background: #0b223a; + --custom-color-heading-color-alternative: var(--ci-color-secondary); + --custom-color-heading-color: var(--ci-color-white); + --custom-paper-color: var(--ci-color-primary); + --header-background: var(--ci-color-primary); + /* Fix the $$ highlighting */ + .chroma .err { + color: inherit; + background-color: inherit; + } + } +} + +/* Custom fonts */ +@font-face { + font-family: "Roboto"; + src: url("fonts/Roboto.ttf") format('truetype'); +} + +@font-face { + font-family: "Roboto"; + src: url("fonts/Roboto-Bold.ttf") format('truetype'); + font-weight: bold; +} + +@font-face { + font-family: "Roboto"; + src: url("fonts/Roboto-Italic.ttf") format('truetype'); + font-style: italic; +} + +@font-face { + font-family: "Source Code Pro"; + src: url("fonts/SourceCodePro.ttf") format('truetype'); +} + +html, body, .gdoc-header { + font-family: "Roboto", sans-serif; +} + +code { + font-family: "Source Code Pro", monospace; + overflow: auto; +} + +/* Make the logo a little bit bigger */ +.gdoc-brand__img { + width: auto; +} + +/* Make the arrows in the navigation look to the right if the menu entry is collapsed */ +.gdoc_keyboard_arrow_left { + transform: rotate(180deg); +} + +/* Use a solid underline for links within the navigation */ +.gdoc-nav__entry:hover, .gdoc-nav__entry.is-active { + text-decoration: underline !important; +} + +/* Fix the header to the top of the screen */ +.gdoc-header { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 1; + height: var(--custom-header-height); + display: flex; + align-items: center; +} + +/* Center items within header */ +.gdoc-menu-header__items { + align-items: center; +} + +/* Increase the margin between header items */ +.gdoc-menu-header__items > span { + margin-left: 0.75rem; +} + +.gdoc-language { + margin-right: 0.25rem; +} + +/* Style the support button */ +.gdoc-support__button { + background-color: var(--ci-color-secondary); + padding-left: 8px; + padding-right: 8px; + height: 40px; + display: flex; + align-items: center; + border-radius: var(--custom-border-radius); + + a { + color: var(--ci-color-white); + text-transform: uppercase; + font-weight: bold; + } +} + +/* Ensure the content is leaving enough space to the top so it's not hidden beneath the fixed header */ +main { + margin-top: var(--custom-header-margin) !important; +} + +/* Increase the height of the Search and Breadcrumbs while centering their content */ +.gdoc-search__input, .gdoc-page__header { + height: 40px; + align-items: center; +} + +/* Ensure a uniform distance between the main components */ +.gdoc-page__header { + margin-bottom: var(--custom-header-margin); +} + +.gdoc-nav--main { + margin-top: var(--custom-header-margin); +} + +/* Add a border radius and drop shadow to the main components */ +.gdoc-markdown, .gdoc-nav--main, .gdoc-nav--more { + padding: 0 2rem 0.5rem 2rem; + border-radius: var(--custom-border-radius); + border: 1px solid var(--custom-paper-color); + box-shadow: 0 2px 20px -10px rgba(64, 66, 74, 0.2); +} + +/* Ensure proper fit between markdown title and body */ +.gdoc-markdown { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +/* Add paper background to main components */ +.gdoc-markdown, .gdoc-nav--main, .gdoc-search__input, .gdoc-search__list, .gdoc-page__header, .gdoc-language__list, .gdoc-nav--more { + background-color: var(--custom-paper-color); +} + +/* Use custom CI colors for warning */ +.gdoc-hint.warning, .gdoc-hint__title i.fa.warning { + background-color: var(--ci-color-error1); + color: #fff; + filter: unset +} + +/* Style headings according to our CI */ +h1, h2, h3, h4, h5, h6 { + text-transform: uppercase; + letter-spacing: 0.75px; + font-weight: 600; + line-height: 1.2em; +} + +h1, h3, h5 { + color: var(--custom-color-heading-color); +} + +h2, h4, h6 { + color: var(--custom-color-heading-color-alternative); +} + +h1 { + font-size: 42px !important; +} + +h2 { + font-size: 27px !important; +} + +h3 { + font-size: 21px !important; +} + +h4 { + font-size: 20px !important; +} + +h5 { + font-size: 18px !important; +} + +h6 { + font-size: 16px !important; +} + +/* Format links according to CI */ +.gdoc-markdown__link:link { + color: var(--custom-link-color); +} + +/* Add a blue background and the big-data-circle to each page title */ +.gdoc-markdown__title { + padding-top: 0; + padding-bottom: 0; + margin-bottom: 0; + background-color: var(--ci-color-primary); + + background-image: linear-gradient(var(--ci-color-primary), var(--ci-color-primary)), url(img/big-data-circle.svg); + background-size: auto, 50% 650px; + background-repeat: no-repeat; + min-height: 150px; + background-position: 140% -300px; + border-top-left-radius: var(--custom-border-radius); + border-top-right-radius: var(--custom-border-radius); + + display: flex; + flex-direction: column; + justify-content: center; + + h1 { + color: var(--ci-color-white); + margin: 0 2rem 0 2rem; + } +} + + +/* Shade the `A product of CYBERTEC` */ +.gdoc-page__nav__product { + color: #888; +} + +/* Customize the footer */ +.gdoc-footer { + display: flex; + justify-content: center; + align-items: center; + min-height: var(--custom-header-height); + + .gdoc-footer__wrapper { + display: flex; + flex-direction: column; + gap: 1rem; + max-width: 82rem; + width: 100%; + } + + .gdoc-footer__line { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + gap: 1rem; + padding: 1.25rem; + width: 100%; + height: 100%; + + } + + .gdoc-footer__item { + align-items: center; + display: flex; + gap: 0.5rem; + } + + .gdoc-footer__item__icon { + height: 24px; + fill: var(--ci-color-secondary) + } + + .gdoc-footer__link { + color: var(--custom-footer-link-color); + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + +} diff --git a/docs/hugo/public/customize_cluster/additional-volumes/index.html b/docs/hugo/public/customize_cluster/additional-volumes/index.html new file mode 100644 index 000000000..1e19bc631 --- /dev/null +++ b/docs/hugo/public/customize_cluster/additional-volumes/index.html @@ -0,0 +1,5116 @@ + + + + + + + + + + + + + Additional Volumes | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Additional Volumes

+
+
+ +
  additionalVolumes:
+    - name: empty
+      mountPath: /opt/empty
+      targetContainers:
+        - all
+      volumeSource:
+        emptyDir: {}
+#    - name: data
+#      mountPath: /home/postgres/pgdata/partitions
+#      targetContainers:
+#        - postgres
+#      volumeSource:
+#        PersistentVolumeClaim:
+#          claimName: pvc-postgresql-data-partitions
+#          readyOnly: false
+#    - name: conf
+#      mountPath: /etc/telegraf
+#      subPath: telegraf.conf
+#      targetContainers:
+#        - telegraf-sidecar
+#      volumeSource:
+#        configMap:
+#          name: my-config-map
+
+
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/customize_cluster/index.html b/docs/hugo/public/customize_cluster/index.html new file mode 100644 index 000000000..40e4e8069 --- /dev/null +++ b/docs/hugo/public/customize_cluster/index.html @@ -0,0 +1,5081 @@ + + + + + + + + + + + + Customize Cluster | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Customize Cluster

+
+ +
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/customize_cluster/index.xml b/docs/hugo/public/customize_cluster/index.xml new file mode 100644 index 000000000..e814e2e74 --- /dev/null +++ b/docs/hugo/public/customize_cluster/index.xml @@ -0,0 +1,26 @@ + + + + Customize Cluster on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/ + Recent content in Customize Cluster on CYBERTEC-PG-Operator + Hugo + en + Thu, 28 Dec 2023 14:26:51 +0100 + + + Sidecars + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/sidecars/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/sidecars/ + <p>Starting with the Single-Node-Cluster from the previous section, we want to modify the Instance a bit to see.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="cpu-and-memory" > CPU and Memory </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/sidecars/#cpu-and-memory" class="gdoc-page__anchor clip flex align-center" title="Anchor to: CPU and Memory" aria-label="Anchor to: CPU and Memory" href="#cpu-and-memory"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <pre tabindex="0"><code>spec: resources: limits: cpu: 1000m memory: 500Mi requests: cpu: 500m memory: 500mi </code></pre><p>Based on the ressources-Definiton we&rsquo;re able to modify the reserved Hardware (requests) and the limits, which allows use to consume more than the reserved definitons if the k8s-worker has this hardware available. There are some Restrictions when modifiying the limits-section. Because of the behaviour of Databases we should never define a diff between requests.memory and limits.memory. A Database is after some time using all available Memory, for Cache and other things. Limits are optional and the worker node can force them back. forcing back memory will create big problems inside a database like creating corruption, forcing OutOfMemory-Killer and so on. CPU on the other side is a ressource we can use inside the limits definiton to allow our database using more cpu if needed and available.</p> + + + Additional Volumes + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/additional-volumes/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/additional-volumes/ + <pre tabindex="0"><code> additionalVolumes: - name: empty mountPath: /opt/empty targetContainers: - all volumeSource: emptyDir: {} # - name: data # mountPath: /home/postgres/pgdata/partitions # targetContainers: # - postgres # volumeSource: # PersistentVolumeClaim: # claimName: pvc-postgresql-data-partitions # readyOnly: false # - name: conf # mountPath: /etc/telegraf # subPath: telegraf.conf # targetContainers: # - telegraf-sidecar # volumeSource: # configMap: # name: my-config-map </code></pre> + + + diff --git a/docs/hugo/public/customize_cluster/sidecars/index.html b/docs/hugo/public/customize_cluster/sidecars/index.html new file mode 100644 index 000000000..86629d723 --- /dev/null +++ b/docs/hugo/public/customize_cluster/sidecars/index.html @@ -0,0 +1,5242 @@ + + + + + + + + + + + + + Sidecars | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Sidecars

+
+
+ +

Starting with the Single-Node-Cluster from the previous section, we want to modify the Instance a bit to see.

+
+

+ CPU and Memory +

+ + + +
+
spec:
+  resources:
+    limits:
+      cpu: 1000m
+      memory: 500Mi
+    requests:
+      cpu: 500m
+      memory: 500mi
+

Based on the ressources-Definiton we’re able to modify the reserved Hardware (requests) and the limits, which allows use to consume more than the reserved definitons if the k8s-worker has this hardware available. There are some Restrictions when modifiying the limits-section. Because of the behaviour of Databases we should never define a diff between requests.memory and limits.memory. A Database is after some time using all available Memory, for Cache and other things. Limits are optional and the worker node can force them back. forcing back memory will create big problems inside a database like creating corruption, forcing OutOfMemory-Killer and so on. +CPU on the other side is a ressource we can use inside the limits definiton to allow our database using more cpu if needed and available.

+
+

+ Sidecars +

+ + + +
+

Sidecars are further Containers running on the same Pod as the Database. We can use them for serveral different Jobs. +The Operator allows us to define them directly inside the Cluster-Manifest.

+
spec:
+  sidecars:
+   - name: "telegraf-sidecar"
+     image: "telegraf:latest"
+     ports:
+     - name: metrics
+       containerPort: 8094
+       protocol: TCP
+     resources:
+       limits:
+         cpu: 500m
+         memory: 500Mi
+       requests:
+         cpu: 100m
+         memory: 100Mi
+     env:
+       - name: "USEFUL_VAR"
+         value: "perhaps-true"
+

This Example will add a second Container to our Pods. This will trigger a restart, which creates Downtime if you’re not running a HA-Cluster.

+
+

+ Init-Containers +

+ + + +
+

We can exactly the same as for sidecars also for Init-Containers. +The difference is, that a sidecar is running normally on a pod. +An Init-Container will just run as first container when the pod is created and it will ends after his job is done. +The “normal” Containers has to wait till all init-Containers finished their jobs and ended with a exit-status.

+
spec:
+  initContainers:
+  - name: date
+    image: busybox
+    command: [ "/bin/date" ]
+
+

+ TLS-Certificates +

+ + + +
+

One Startup the Containers will create a custom TLS-Certificate which allows creating tls-secured-connections to the Database. +But this Certificates cannot verified, because the application has no information about the CA. Because of this the certificates are no protection against MITM-Attacks. +You’re able to configure your own Certificates and CA to ensure, that you can use secured and verified connections between your application and your database.

+
spec:
+  tls:
+    secretName: ""  # should correspond to a Kubernetes Secret resource to load
+    certificateFile: "tls.crt"
+    privateKeyFile: "tls.key"
+    caFile: ""  # optionally configure Postgres with a CA certificate
+    caSecretName: "" # optionally the ca.crt can come from this secret instead.
+

You need to store the needed values from tls.crt, tls.key and ca.crt in a secret and define the secrtetname inside the tls-object. +if you want you can create a separate sercet just for the ca and use this secret for every cluster inside the Namespace. +To get Information about creating Certificates and the secrets check the Tutorial in the additonal-Section or click here

+
+

+ Node-Affinity +

+ + + +
+

Node-Affinity will ensure that the Cluster-pods only deployed on Kubernetes-Nodes which has the defined Labelkey and -Value

+
spec:
+  nodeAffinity:
+    requiredDuringSchedulingIgnoredDuringExecution:
+      nodeSelectorTerms:
+        - matchExpressions:
+            - key: cpo
+              operator: In
+              values:
+                - enabled
+

This allowes you to use specific database-nodes in a mixed cluster for example. +In the Example above the Cluster-Pods are just deployed on Nodes with the Key: cpo and the value: enabled +So you’re able to seperate your Workload.

+
+

+ PostgreSQL-Configuration +

+ + + +
+

Every Cluster will start with the default PostgreSQL-Configuration. Every Parameter can be overriden based in definitions inside the Cluster-Manifest. +Therefore we just need a add the section parameters to the postgresql-Object

+
spec:
+  postgresql:
+    version: 16
+    parameters:
+      max_connections: "53"
+      log_statement: "all"
+      track_io_timing: "true"
+

These Definitions will change the PostgreSQL-Configuration. Based on the needs of Parameter changes the Pods may needs a restart, which creates a Downtime if its not a HA-Cluster. +You can check Parameters and allowed Values on this Sources to ensure a correct Value.

+ + +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/db_users/index.html b/docs/hugo/public/db_users/index.html new file mode 100644 index 000000000..09f0bae6e --- /dev/null +++ b/docs/hugo/public/db_users/index.html @@ -0,0 +1,5341 @@ + + + + + + + + + + + + + Databases & Users | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Databases & Users

+
+ +
+

CPO not only supports you in deploying your cluster, it also supports you in setting it up in terms of the database and users. +CPO offers you three different options for this:

+
    +
  • Create roles
  • +
  • Create databases
  • +
  • preapared databases
  • +
+
+

+ Create Roles +

+ + + +
+

The creation of users is based on the definition of the user name and the definition of the required rights for this user. Available rights are

+
    +
  • superuser
  • +
  • inherit
  • +
  • login
  • +
  • nologin
  • +
  • createrole
  • +
  • createdb
  • +
  • replication
  • +
  • bypassrls
  • +
+

Unless explicitly defined via NOLOGIN, a created user automatically receives the LOGIN permission.

+
spec:
+  users:
+    db_owner:
+    - login
+    - createdb
+    appl_user:
+    - login
+

For each user created, CPO automatically creates a secret with username and password in the namespace of the cluster, which follows the following naming convention: +[USERNAME].[CLUSTERNAME].credentials.postgresql.cpo.opensource.cybertec.at

+

If the secrets for an application are to be stored in a different namespace, for example, it is necessary to define the setting enable_cross_namespace_secret as true in the operator configuration. You can find more information about the operator configuration here.

+

The namespace must then be written before the user name.

+
spec:
+  users:
+    db_owner:
+    - login
+    - createdb
+    app_namespace.appl_user:
+    - login
+
+

+ Create Databases +

+ + + +
+

Databases are basically created in a very similar way to users. +The definition is based on the database name and the database owner.

+
spec:
+  users:
+    db_owner:
+    - login
+    - createdb
+    app_namespace.appl_user:
+    - login
+  databases;
+    app_db: app_namespace.appl_user
+
+ + + + +
+
+
Be aware that the user name must be defined for the database owner in the same way as it is done in the users object.
+
+ +
+

+ Prepared Databases +

+ + + +
+

The preparedDatabases object is available for a much more extensive setup of databases and users. +In addition to the creation of databases and users, this also enables the creation of schemas and extensions. A more detailed rights management is also available.

+
+

+ Databases and Schema +

+ + + +
+

Creating the preparedDatabases object already creates a database whose name is based on the cluster name. preparedDatabases: {}

+ + + + + +
+
+
For the database name, - is replaced with _ in the cluster name
+
+ +

To create your own database names and elements such as schemas and extensions within the database, an object must be created within preparedDatabases for each database.

+
spec:
+  preparedDatabases:
+    appl_db:
+      extensions:
+        dblink: public
+      schemas:
+        data: {}
+

This example creates a database with the name appl_db and creates a schema with the name data in it, as well as creating the dblink extension in the schema public.

+
+

+ Management of users and Permissions +

+ + + +
+

For rights management, we distinguish between NOLOGIN roles and LOGIN roles. Users have login rights and inherit the other rights from the NOLOGIN role.

+
+

+ NoLogin roles (defaultRoles) +

+ + + +
+

The roles are created if defaultroles is not explicitly set to false.

+
spec:
+  preparedDatabases:
+    appl_db:
+      extensions:
+        dblink: public
+      schemas:
+        data: {}
+

This creates roles for the schema owner, writer and reader

+
+

+ Login roles (defaultUsers) +

+ + + +
+

The roles described in the previous paragraph can be assigned to LOGIN roles via the users section in the manifest. Optionally, the Postgres operator can also create standard LOGIN roles for the database and each individual schema. These roles are given the suffix _user and inherit all rights from their NOLOGIN counterparts. Therefore, you cannot set defaultRoles to false and activate defaultUsers at the same time.

+
spec:
+  preparedDatabases:
+    appl_db:
+      defaultUsers: true
+      extensions:
+        dblink: public
+      schemas:
+        data: {}
+        history:
+          defaultRoles: true
+          defaultUsers: false
+

This example creates the following users and inheritances

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Role nameAttributesinherits from
appl_db_ownerCannot loginappl_db_reader,appl_db_owner,appl_data_owner,…
appl_db_owner_userappl_db_owner
appl_db_readerCannot login
appl_db_reader_userappl_db_reader
appl_db_writerCannot loginappl_db_reader
appl_db_writer_userappl_db_writer
appl_db_data_ownerCannot loginappl_db_data_reader,appl_db_data_writer
appl_db_data_readerCannot login
appl_db_data_writerCannot loginappl_db_data_reader
appl_db_history_ownerCannot loginappl_db_history_reader,appl_db_history_writer
appl_db_history_readerCannot login
appl_db_history_writerCannot loginappl_db_history_reader
+

Default access permissions are also defined for LOGIN roles when databases and schemas are created. This means that they are not currently set if defaultUsers (or defaultRoles for schemas) are activated at a later time.

+
+

+ User Secrets +

+ + + +
+

For each user created by cpo with LOGIN permissions, the operator also creates a secret with username and password, as with the creation of roles via the users object.

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/db_users/index.xml b/docs/hugo/public/db_users/index.xml new file mode 100644 index 000000000..a18ef1d9c --- /dev/null +++ b/docs/hugo/public/db_users/index.xml @@ -0,0 +1,12 @@ + + + + Databases & Users on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/db_users/ + Recent content in Databases & Users on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/documentation/examples/index.html b/docs/hugo/public/documentation/examples/index.html new file mode 100644 index 000000000..d73bfc490 --- /dev/null +++ b/docs/hugo/public/documentation/examples/index.html @@ -0,0 +1,5312 @@ + + + + + + + + + + + + + Single Cluster | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Single Cluster

+
+
+ +

Setting up a basic Cluster is pretty easy, we just need the minimum Definiton of a cluster-manifest which can also be find in the operator-tutorials repo on github. +We need the following Definitions for the basic cluster.

+
+

+ minimal Single Cluster +

+ + + +
+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster-1
+spec:
+  dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.4-1"
+  numberOfInstances: 1
+  postgresql:
+    version: "16"
+  resources:
+    limits:
+      cpu: 500m
+      memory: 500Mi
+    requests:
+      cpu: 500m
+      memory: 500Mi
+  volume:
+    size: 5Gi 
+

Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-16-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit.

+

After some seconds we should see, that the operator creates our cluster based on the declared definitions.

+
kubectl get pods
+-----------------------------------------------------------------------------
+NAME                             | READY  | STATUS           | RESTARTS | AGE
+cluster-1-0                      | 1/1    | Running          | 0        | 50s
+

We can now starting to modify our cluster with some more Definitons.

+
+

+ Use a specific Storageclass +

+ + + +
+
spec:
+  ...
+  volume:
+    size: 5Gi
+    storageClass: default-provisioner
+  ...
+

Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod.

+
+

+ Expanding Volume +

+ + + +
+

The Operator allows to you expand your volume if the storage-System is able to do this.

+
spec:
+  ...
+  volume:
+    size: 10Gi
+    storageClass: default-provisioner
+  ...
+

This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc.

+
kubectl get pvc pgdata-cluster-1-0 -o yaml
+-------------------------------------------------------
+spec:
+  accessModes:
+  - ReadWriteOnce
+  resources:
+    requests:
+      storage: 10Gi
+  storageClassName: crc-csi-hostpath-provisioner
+  volumeMode: Filesystem
+  volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37
+status:
+  accessModes:
+  - ReadWriteOnce
+  capacity:
+    storage: 5Gi
+  phase: Bound
+
+

+ Creating additonal Volumes +

+ + + +
+

The Operator allows you to modify your cluster with additonal Volumes.

+
spec:
+  ...
+  additionalVolumes:
+    - name: empty
+      mountPath: /opt/empty
+      targetContainers:
+        - all
+      volumeSource:
+        emptyDir: {}
+

This example will create an emptyDir and mount it to all Containers inside the Database-Pod.

+
+

+ Specific Settings for aws gp3 Storage +

+ + + +
+

For the gp3 Storage aws you can define more informations

+
  volume:
+    size: 1Gi
+    storageClass: gp3
+    iops: 1000  # for EBS gp3
+    throughput: 250  # in MB/s for EBS gp3
+

The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput AWS docs.

+

To ensure that the settings are updates properly please define the Operator-Configuration ‘storage_resize_mode’ from default to ‘mixed’

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/documentation/index.html b/docs/hugo/public/documentation/index.html new file mode 100644 index 000000000..84f7272dc --- /dev/null +++ b/docs/hugo/public/documentation/index.html @@ -0,0 +1,5168 @@ + + + + + + + + + + + + Documentation | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Documentation

+
+ +
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/documentation/index.xml b/docs/hugo/public/documentation/index.xml new file mode 100644 index 000000000..17b7e1c7e --- /dev/null +++ b/docs/hugo/public/documentation/index.xml @@ -0,0 +1,26 @@ + + + + Documentation on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/documentation/ + Recent content in Documentation on CYBERTEC-PG-Operator + Hugo + en + Thu, 28 Dec 2023 14:26:51 +0100 + + + Single Cluster + http://localhost:1313/CYBERTEC-pg-operator/documentation/examples/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/documentation/examples/ + <p>Setting up a basic Cluster is pretty easy, we just need the minimum Definiton of a cluster-manifest which can also be find in the operator-tutorials repo on github. We need the following Definitions for the basic cluster.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="minimal-single-cluster" > minimal Single Cluster </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/documentation/examples/#minimal-single-cluster" class="gdoc-page__anchor clip flex align-center" title="Anchor to: minimal Single Cluster" aria-label="Anchor to: minimal Single Cluster" href="#minimal-single-cluster"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <pre tabindex="0"><code>apiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1 spec: dockerImage: &#34;docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.4-1&#34; numberOfInstances: 1 postgresql: version: &#34;16&#34; resources: limits: cpu: 500m memory: 500Mi requests: cpu: 500m memory: 500Mi volume: size: 5Gi </code></pre><p>Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-16-Server. Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit.</p> + + + Update to new API from previous Operator-Version + http://localhost:1313/CYBERTEC-pg-operator/documentation/operator/migratetonewapi/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/documentation/operator/migratetonewapi/ + <p>khjls</p> + + + diff --git a/docs/hugo/public/documentation/operator/migratetonewapi/index.html b/docs/hugo/public/documentation/operator/migratetonewapi/index.html new file mode 100644 index 000000000..27758fd0c --- /dev/null +++ b/docs/hugo/public/documentation/operator/migratetonewapi/index.html @@ -0,0 +1,5181 @@ + + + + + + + + + + + + + Update to new API from previous Operator-Version | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Update to new API from previous Operator-Version

+
+
+ +

khjls

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/extensions/index.html b/docs/hugo/public/extensions/index.html new file mode 100644 index 000000000..940a15cb9 --- /dev/null +++ b/docs/hugo/public/extensions/index.html @@ -0,0 +1,5081 @@ + + + + + + + + + + + + Extensions | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Extensions

+
+ +
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/extensions/index.xml b/docs/hugo/public/extensions/index.xml new file mode 100644 index 000000000..cdf5ac2fc --- /dev/null +++ b/docs/hugo/public/extensions/index.xml @@ -0,0 +1,47 @@ + + + + Extensions on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/extensions/ + Recent content in Extensions on CYBERTEC-PG-Operator + Hugo + en + Thu, 28 Dec 2023 14:26:51 +0100 + + + PostgreSQL 13 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg13/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg13/ + <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The extensions listed are included in the standard images. This list refers to PostgreSQL 13.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>adminpack</td> <td>2.1</td> <td>Administrative functions for PostgreSQL</td> </tr> <tr> <td>amcheck</td> <td>1.2</td> <td>Functions for verifying relation integrity</td> </tr> <tr> <td>autoinc</td> <td>1.0</td> <td>Functions for autoincrementing fields</td> </tr> <tr> <td>bloom</td> <td>1.0</td> <td>Bloom access method - signature file based index</td> </tr> <tr> <td>btree_gin</td> <td>1.3</td> <td>Support for indexing common datatypes in GIN</td> </tr> <tr> <td>btree_gist</td> <td>1.5</td> <td>Support for indexing common datatypes in GiST</td> </tr> <tr> <td>citext</td> <td>1.6</td> <td>Data type for case-insensitive character strings</td> </tr> <tr> <td>credcheck</td> <td>3.0.0</td> <td>credcheck - PostgreSQL plain text credential checker</td> </tr> <tr> <td>cube</td> <td>1.4</td> <td>Data type for multidimensional cubes</td> </tr> <tr> <td>dblink</td> <td>1.2</td> <td>Connect to other PostgreSQL databases from within a database</td> </tr> <tr> <td>dict_int</td> <td>1.0</td> <td>Text search dictionary template for integers</td> </tr> <tr> <td>dict_xsyn</td> <td>1.0</td> <td>Text search dictionary template for extended synonym processing</td> </tr> <tr> <td>earthdistance</td> <td>1.1</td> <td>Calculate great-circle distances on the surface of the Earth</td> </tr> <tr> <td>file_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for flat file access</td> </tr> <tr> <td>fuzzystrmatch</td> <td>1.1</td> <td>Determine similarities and distance between strings</td> </tr> <tr> <td>hstore</td> <td>1.7</td> <td>Data type for storing sets of (key, value) pairs</td> </tr> <tr> <td>hstore_plperl</td> <td>1.0</td> <td>Transform between hstore and plperl</td> </tr> <tr> <td>hstore_plperlu</td> <td>1.0</td> <td>Transform between hstore and plperlu</td> </tr> <tr> <td>hstore_plpython3u</td> <td>1.0</td> <td>Transform between hstore and plpython3u</td> </tr> <tr> <td>insert_username</td> <td>1.0</td> <td>Functions for tracking who changed a table</td> </tr> <tr> <td>intagg</td> <td>1.1</td> <td>Integer aggregator and enumerator (obsolete)</td> </tr> <tr> <td>intarray</td> <td>1.3</td> <td>Functions, operators, and index support for 1-D arrays of integers</td> </tr> <tr> <td>isn</td> <td>1.2</td> <td>Data types for international product numbering standards</td> </tr> <tr> <td>jsonb_plperl</td> <td>1.0</td> <td>Transform between jsonb and plperl</td> </tr> <tr> <td>jsonb_plperlu</td> <td>1.0</td> <td>Transform between jsonb and plperlu</td> </tr> <tr> <td>jsonb_plpython3u</td> <td>1.0</td> <td>Transform between jsonb and plpython3u</td> </tr> <tr> <td>lo</td> <td>1.1</td> <td>Large Object maintenance</td> </tr> <tr> <td>ltree</td> <td>1.2</td> <td>Data type for hierarchical tree-like structures</td> </tr> <tr> <td>ltree_plpython3u</td> <td>1.0</td> <td>Transform between ltree and plpython3u</td> </tr> <tr> <td>moddatetime</td> <td>1.0</td> <td>Functions for tracking last modification time</td> </tr> <tr> <td>pageinspect</td> <td>1.8</td> <td>Inspect the contents of database pages at a low level</td> </tr> <tr> <td>pg_buffercache</td> <td>1.3</td> <td>Examine the shared buffer cache</td> </tr> <tr> <td>pg_cron</td> <td>1.6</td> <td>Job scheduler for PostgreSQL</td> </tr> <tr> <td>pg_freespacemap</td> <td>1.2</td> <td>Examine the free space map (FSM)</td> </tr> <tr> <td>pg_permissions</td> <td>1.3</td> <td>View object permissions and compare them with the desired state</td> </tr> <tr> <td>pg_prewarm</td> <td>1.2</td> <td>Prewarm relation data</td> </tr> <tr> <td>pg_proctab</td> <td></td> <td>Placeholder - see pg_proctab&ndash;0.0.10-compat.control</td> </tr> <tr> <td>pg_stat_statements</td> <td>1.8</td> <td>Track planning and execution statistics of all SQL statements executed</td> </tr> <tr> <td>pg_trgm</td> <td>1.5</td> <td>Text similarity measurement and index searching based on trigrams</td> </tr> <tr> <td>pg_visibility</td> <td>1.2</td> <td>Examine the visibility map (VM) and page-level visibility info</td> </tr> <tr> <td>pgaudit</td> <td>1.5.3</td> <td>Provides auditing functionality</td> </tr> <tr> <td>pgauditlogtofile</td> <td>1.6</td> <td>pgAudit addon to redirect audit entries to an independent file</td> </tr> <tr> <td>pgcrypto</td> <td>1.3</td> <td>Cryptographic functions</td> </tr> <tr> <td>pgnodemx</td> <td>1.7</td> <td>SQL functions that allow capture of node OS metrics from PostgreSQL</td> </tr> <tr> <td>pgrowlocks</td> <td>1.2</td> <td>Show row-level locking information</td> </tr> <tr> <td>pgstattuple</td> <td>1.5</td> <td>Show tuple-level statistics</td> </tr> <tr> <td>plpgsql</td> <td>1.0</td> <td>PL/pgSQL procedural language</td> </tr> <tr> <td>plpython3u</td> <td>1.0</td> <td>PL/Python3U untrusted procedural language</td> </tr> <tr> <td>pltcl</td> <td>1.0</td> <td>PL/Tcl procedural language</td> </tr> <tr> <td>pltclu</td> <td>1.0</td> <td>PL/TclU untrusted procedural language</td> </tr> <tr> <td>postgres_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for remote PostgreSQL servers</td> </tr> <tr> <td>refint</td> <td>1.0</td> <td>Functions for implementing referential integrity (obsolete)</td> </tr> <tr> <td>seg</td> <td>1.3</td> <td>Data type for representing line segments or floating-point intervals</td> </tr> <tr> <td>set_user</td> <td>4.1.0</td> <td>Similar to SET ROLE but with added logging</td> </tr> <tr> <td>sslinfo</td> <td>1.2</td> <td>Information about SSL certificates</td> </tr> <tr> <td>tablefunc</td> <td>1.0</td> <td>Functions that manipulate whole tables, including crosstab</td> </tr> <tr> <td>tcn</td> <td>1.0</td> <td>Triggered change notifications</td> </tr> <tr> <td>timescaledb</td> <td>2.15.3</td> <td>Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)</td> </tr> <tr> <td>tsm_system_rows</td> <td>1.0</td> <td>TABLESAMPLE method which accepts number of rows as a limit</td> </tr> <tr> <td>tsm_system_time</td> <td>1.0</td> <td>TABLESAMPLE method which accepts time in milliseconds as a limit</td> </tr> <tr> <td>unaccent</td> <td>1.1</td> <td>Text search dictionary that removes accents</td> </tr> <tr> <td>uuid-ossp</td> <td>1.1</td> <td>Generate universally unique identifiers (UUIDs)</td> </tr> <tr> <td>xml2</td> <td>1.1</td> <td>XPath querying and XSLT</td> </tr> </tbody> </table> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The following extensions are additionally included in the Postgis images.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>address_standardizer</td> <td>3.4.4</td> <td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.</td> </tr> <tr> <td>address_standardizer_data_us</td> <td>3.4.4</td> <td>Address Standardizer US dataset example</td> </tr> <tr> <td>postgis</td> <td>3.4.4</td> <td>PostGIS geometry and geography spatial types and functions</td> </tr> <tr> <td>postgis_raster</td> <td>3.4.4</td> <td>PostGIS raster types and functions</td> </tr> <tr> <td>postgis_sfcgal</td> <td>3.4.4</td> <td>PostGIS SFCGAL functions</td> </tr> <tr> <td>postgis_tiger_geocoder</td> <td>3.4.4</td> <td>PostGIS tiger geocoder and reverse geocoder</td> </tr> <tr> <td>postgis_topology</td> <td>3.4.4</td> <td>PostGIS topology spatial types and functions</td> </tr> </tbody> </table> + + + PostgreSQL 14 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg14/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg14/ + <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The extensions listed are included in the standard images. This list refers to PostgreSQL 14.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>adminpack</td> <td>2.1</td> <td>Administrative functions for PostgreSQL</td> </tr> <tr> <td>amcheck</td> <td>1.3</td> <td>Functions for verifying relation integrity</td> </tr> <tr> <td>autoinc</td> <td>1.0</td> <td>Functions for autoincrementing fields</td> </tr> <tr> <td>bloom</td> <td>1.0</td> <td>Bloom access method - signature file based index</td> </tr> <tr> <td>btree_gin</td> <td>1.3</td> <td>Support for indexing common datatypes in GIN</td> </tr> <tr> <td>btree_gist</td> <td>1.6</td> <td>Support for indexing common datatypes in GiST</td> </tr> <tr> <td>citext</td> <td>1.6</td> <td>Data type for case-insensitive character strings</td> </tr> <tr> <td>credcheck</td> <td>3.0.0</td> <td>credcheck - PostgreSQL plain text credential checker</td> </tr> <tr> <td>cube</td> <td>1.5</td> <td>Data type for multidimensional cubes</td> </tr> <tr> <td>dblink</td> <td>1.2</td> <td>Connect to other PostgreSQL databases from within a database</td> </tr> <tr> <td>dict_int</td> <td>1.0</td> <td>Text search dictionary template for integers</td> </tr> <tr> <td>dict_xsyn</td> <td>1.0</td> <td>Text search dictionary template for extended synonym processing</td> </tr> <tr> <td>earthdistance</td> <td>1.1</td> <td>Calculate great-circle distances on the surface of the Earth</td> </tr> <tr> <td>file_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for flat file access</td> </tr> <tr> <td>fuzzystrmatch</td> <td>1.1</td> <td>Determine similarities and distance between strings</td> </tr> <tr> <td>hstore</td> <td>1.8</td> <td>Data type for storing sets of (key, value) pairs</td> </tr> <tr> <td>hstore_plperl</td> <td>1.0</td> <td>Transform between hstore and plperl</td> </tr> <tr> <td>hstore_plperlu</td> <td>1.0</td> <td>Transform between hstore and plperlu</td> </tr> <tr> <td>hstore_plpython3u</td> <td>1.0</td> <td>Transform between hstore and plpython3u</td> </tr> <tr> <td>insert_username</td> <td>1.0</td> <td>Functions for tracking who changed a table</td> </tr> <tr> <td>intagg</td> <td>1.1</td> <td>Integer aggregator and enumerator (obsolete)</td> </tr> <tr> <td>intarray</td> <td>1.5</td> <td>Functions, operators, and index support for 1-D arrays of integers</td> </tr> <tr> <td>isn</td> <td>1.2</td> <td>Data types for international product numbering standards</td> </tr> <tr> <td>jsonb_plperl</td> <td>1.0</td> <td>Transform between jsonb and plperl</td> </tr> <tr> <td>jsonb_plperlu</td> <td>1.0</td> <td>Transform between jsonb and plperlu</td> </tr> <tr> <td>jsonb_plpython3u</td> <td>1.0</td> <td>Transform between jsonb and plpython3u</td> </tr> <tr> <td>lo</td> <td>1.1</td> <td>Large Object maintenance</td> </tr> <tr> <td>ltree</td> <td>1.2</td> <td>Data type for hierarchical tree-like structures</td> </tr> <tr> <td>ltree_plpython3u</td> <td>1.0</td> <td>Transform between ltree and plpython3u</td> </tr> <tr> <td>moddatetime</td> <td>1.0</td> <td>Functions for tracking last modification time</td> </tr> <tr> <td>old_snapshot</td> <td>1.0</td> <td>Utilities in support of old_snapshot_threshold</td> </tr> <tr> <td>pageinspect</td> <td>1.9</td> <td>Inspect the contents of database pages at a low level</td> </tr> <tr> <td>pg_buffercache</td> <td>1.3</td> <td>Examine the shared buffer cache</td> </tr> <tr> <td>pg_cron</td> <td>1.6</td> <td>Job scheduler for PostgreSQL</td> </tr> <tr> <td>pg_freespacemap</td> <td>1.2</td> <td>Examine the free space map (FSM)</td> </tr> <tr> <td>pg_permissions</td> <td>1.3</td> <td>View object permissions and compare them with the desired state</td> </tr> <tr> <td>pg_prewarm</td> <td>1.2</td> <td>Prewarm relation data</td> </tr> <tr> <td>pg_proctab</td> <td></td> <td>Placeholder - see pg_proctab&ndash;0.0.10-compat.control</td> </tr> <tr> <td>pg_stat_statements</td> <td>1.9</td> <td>Track planning and execution statistics of all SQL statements executed</td> </tr> <tr> <td>pg_surgery</td> <td>1.0</td> <td>Extension to perform surgery on a damaged relation</td> </tr> <tr> <td>pg_trgm</td> <td>1.6</td> <td>Text similarity measurement and index searching based on trigrams</td> </tr> <tr> <td>pg_visibility</td> <td>1.2</td> <td>Examine the visibility map (VM) and page-level visibility info</td> </tr> <tr> <td>pgaudit</td> <td>1.6.3</td> <td>Provides auditing functionality</td> </tr> <tr> <td>pgauditlogtofile</td> <td>1.6</td> <td>pgAudit addon to redirect audit entries to an independent file</td> </tr> <tr> <td>pgcrypto</td> <td>1.3</td> <td>Cryptographic functions</td> </tr> <tr> <td>pgnodemx</td> <td>1.7</td> <td>SQL functions that allow capture of node OS metrics from PostgreSQL</td> </tr> <tr> <td>pgrowlocks</td> <td>1.2</td> <td>Show row-level locking information</td> </tr> <tr> <td>pgstattuple</td> <td>1.5</td> <td>Show tuple-level statistics</td> </tr> <tr> <td>plpgsql</td> <td>1.0</td> <td>PL/pgSQL procedural language</td> </tr> <tr> <td>plpython3u</td> <td>1.0</td> <td>PL/Python3U untrusted procedural language</td> </tr> <tr> <td>pltcl</td> <td>1.0</td> <td>PL/Tcl procedural language</td> </tr> <tr> <td>pltclu</td> <td>1.0</td> <td>PL/TclU untrusted procedural language</td> </tr> <tr> <td>postgres_fdw</td> <td>1.1</td> <td>Foreign-data wrapper for remote PostgreSQL servers</td> </tr> <tr> <td>refint</td> <td>1.0</td> <td>Functions for implementing referential integrity (obsolete)</td> </tr> <tr> <td>seg</td> <td>1.4</td> <td>Data type for representing line segments or floating-point intervals</td> </tr> <tr> <td>set_user</td> <td>4.1.0</td> <td>Similar to SET ROLE but with added logging</td> </tr> <tr> <td>sslinfo</td> <td>1.2</td> <td>Information about SSL certificates</td> </tr> <tr> <td>tablefunc</td> <td>1.0</td> <td>Functions that manipulate whole tables, including crosstab</td> </tr> <tr> <td>tcn</td> <td>1.0</td> <td>Triggered change notifications</td> </tr> <tr> <td>timescaledb</td> <td>2.18.2</td> <td>Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)</td> </tr> <tr> <td>tsm_system_rows</td> <td>1.0</td> <td>TABLESAMPLE method which accepts number of rows as a limit</td> </tr> <tr> <td>tsm_system_time</td> <td>1.0</td> <td>TABLESAMPLE method which accepts time in milliseconds as a limit</td> </tr> <tr> <td>unaccent</td> <td>1.1</td> <td>Text search dictionary that removes accents</td> </tr> <tr> <td>uuid-ossp</td> <td>1.1</td> <td>Generate universally unique identifiers (UUIDs)</td> </tr> <tr> <td>xml2</td> <td>1.1</td> <td>XPath querying and XSLT</td> </tr> </tbody> </table> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The following extensions are additionally included in the Postgis images.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>address_standardizer</td> <td>3.4.4</td> <td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.</td> </tr> <tr> <td>address_standardizer_data_us</td> <td>3.4.4</td> <td>Address Standardizer US dataset example</td> </tr> <tr> <td>postgis</td> <td>3.4.4</td> <td>PostGIS geometry and geography spatial types and functions</td> </tr> <tr> <td>postgis_raster</td> <td>3.4.4</td> <td>PostGIS raster types and functions</td> </tr> <tr> <td>postgis_sfcgal</td> <td>3.4.4</td> <td>PostGIS SFCGAL functions</td> </tr> <tr> <td>postgis_tiger_geocoder</td> <td>3.4.4</td> <td>PostGIS tiger geocoder and reverse geocoder</td> </tr> <tr> <td>postgis_topology</td> <td>3.4.4</td> <td>PostGIS topology spatial types and functions</td> </tr> </tbody> </table> + + + PostgreSQL 15 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg15/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg15/ + <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The extensions listed are included in the standard images. This list refers to PostgreSQL 15.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>adminpack</td> <td>2.1</td> <td>Administrative functions for PostgreSQL</td> </tr> <tr> <td>amcheck</td> <td>1.3</td> <td>Functions for verifying relation integrity</td> </tr> <tr> <td>autoinc</td> <td>1.0</td> <td>Functions for autoincrementing fields</td> </tr> <tr> <td>bloom</td> <td>1.0</td> <td>Bloom access method - signature file based index</td> </tr> <tr> <td>btree_gin</td> <td>1.3</td> <td>Support for indexing common datatypes in GIN</td> </tr> <tr> <td>btree_gist</td> <td>1.7</td> <td>Support for indexing common datatypes in GiST</td> </tr> <tr> <td>citext</td> <td>1.6</td> <td>Data type for case-insensitive character strings</td> </tr> <tr> <td>credcheck</td> <td>3.0.0</td> <td>credcheck - PostgreSQL plain text credential checker</td> </tr> <tr> <td>cube</td> <td>1.5</td> <td>Data type for multidimensional cubes</td> </tr> <tr> <td>dblink</td> <td>1.2</td> <td>Connect to other PostgreSQL databases from within a database</td> </tr> <tr> <td>dict_int</td> <td>1.0</td> <td>Text search dictionary template for integers</td> </tr> <tr> <td>dict_xsyn</td> <td>1.0</td> <td>Text search dictionary template for extended synonym processing</td> </tr> <tr> <td>earthdistance</td> <td>1.1</td> <td>Calculate great-circle distances on the surface of the Earth</td> </tr> <tr> <td>file_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for flat file access</td> </tr> <tr> <td>fuzzystrmatch</td> <td>1.1</td> <td>Determine similarities and distance between strings</td> </tr> <tr> <td>hstore</td> <td>1.8</td> <td>Data type for storing sets of (key, value) pairs</td> </tr> <tr> <td>hstore_plperl</td> <td>1.0</td> <td>Transform between hstore and plperl</td> </tr> <tr> <td>hstore_plperlu</td> <td>1.0</td> <td>Transform between hstore and plperlu</td> </tr> <tr> <td>hstore_plpython3u</td> <td>1.0</td> <td>Transform between hstore and plpython3u</td> </tr> <tr> <td>insert_username</td> <td>1.0</td> <td>Functions for tracking who changed a table</td> </tr> <tr> <td>intagg</td> <td>1.1</td> <td>Integer aggregator and enumerator (obsolete)</td> </tr> <tr> <td>intarray</td> <td>1.5</td> <td>Functions, operators, and index support for 1-D arrays of integers</td> </tr> <tr> <td>isn</td> <td>1.2</td> <td>Data types for international product numbering standards</td> </tr> <tr> <td>jsonb_plperl</td> <td>1.0</td> <td>Transform between jsonb and plperl</td> </tr> <tr> <td>jsonb_plperlu</td> <td>1.0</td> <td>Transform between jsonb and plperlu</td> </tr> <tr> <td>jsonb_plpython3u</td> <td>1.0</td> <td>Transform between jsonb and plpython3u</td> </tr> <tr> <td>lo</td> <td>1.1</td> <td>Large Object maintenance</td> </tr> <tr> <td>ltree</td> <td>1.2</td> <td>Data type for hierarchical tree-like structures</td> </tr> <tr> <td>ltree_plpython3u</td> <td>1.0</td> <td>Transform between ltree and plpython3u</td> </tr> <tr> <td>moddatetime</td> <td>1.0</td> <td>Functions for tracking last modification time</td> </tr> <tr> <td>old_snapshot</td> <td>1.0</td> <td>Utilities in support of old_snapshot_threshold</td> </tr> <tr> <td>pageinspect</td> <td>1.11</td> <td>Inspect the contents of database pages at a low level</td> </tr> <tr> <td>pg_buffercache</td> <td>1.3</td> <td>Examine the shared buffer cache</td> </tr> <tr> <td>pg_cron</td> <td>1.6</td> <td>Job scheduler for PostgreSQL</td> </tr> <tr> <td>pg_freespacemap</td> <td>1.2</td> <td>Examine the free space map (FSM)</td> </tr> <tr> <td>pg_permissions</td> <td>1.3</td> <td>View object permissions and compare them with the desired state</td> </tr> <tr> <td>pg_prewarm</td> <td>1.2</td> <td>Prewarm relation data</td> </tr> <tr> <td>pg_proctab</td> <td></td> <td>Placeholder - see pg_proctab&ndash;0.0.10-compat.control</td> </tr> <tr> <td>pg_stat_statements</td> <td>1.10</td> <td>Track planning and execution statistics of all SQL statements executed</td> </tr> <tr> <td>pg_surgery</td> <td>1.0</td> <td>Extension to perform surgery on a damaged relation</td> </tr> <tr> <td>pg_trgm</td> <td>1.6</td> <td>Text similarity measurement and index searching based on trigrams</td> </tr> <tr> <td>pg_visibility</td> <td>1.2</td> <td>Examine the visibility map (VM) and page-level visibility info</td> </tr> <tr> <td>pg_walinspect</td> <td>1.0</td> <td>Functions to inspect contents of PostgreSQL Write-Ahead Log</td> </tr> <tr> <td>pgaudit</td> <td>1.7</td> <td>Provides auditing functionality</td> </tr> <tr> <td>pgauditlogtofile</td> <td>1.6</td> <td>pgAudit addon to redirect audit entries to an independent file</td> </tr> <tr> <td>pgcrypto</td> <td>1.3</td> <td>Cryptographic functions</td> </tr> <tr> <td>pgnodemx</td> <td>1.7</td> <td>SQL functions that allow capture of node OS metrics from PostgreSQL</td> </tr> <tr> <td>pgrowlocks</td> <td>1.2</td> <td>Show row-level locking information</td> </tr> <tr> <td>pgstattuple</td> <td>1.5</td> <td>Show tuple-level statistics</td> </tr> <tr> <td>plpgsql</td> <td>1.0</td> <td>PL/pgSQL procedural language</td> </tr> <tr> <td>plpython3u</td> <td>1.0</td> <td>PL/Python3U untrusted procedural language</td> </tr> <tr> <td>pltcl</td> <td>1.0</td> <td>PL/Tcl procedural language</td> </tr> <tr> <td>pltclu</td> <td>1.0</td> <td>PL/TclU untrusted procedural language</td> </tr> <tr> <td>postgres_fdw</td> <td>1.1</td> <td>Foreign-data wrapper for remote PostgreSQL servers</td> </tr> <tr> <td>refint</td> <td>1.0</td> <td>Functions for implementing referential integrity (obsolete)</td> </tr> <tr> <td>seg</td> <td>1.4</td> <td>Data type for representing line segments or floating-point intervals</td> </tr> <tr> <td>set_user</td> <td>4.1.0</td> <td>Similar to SET ROLE but with added logging</td> </tr> <tr> <td>sslinfo</td> <td>1.2</td> <td>Information about SSL certificates</td> </tr> <tr> <td>tablefunc</td> <td>1.0</td> <td>Functions that manipulate whole tables, including crosstab</td> </tr> <tr> <td>tcn</td> <td>1.0</td> <td>Triggered change notifications</td> </tr> <tr> <td>timescaledb</td> <td>2.18.2</td> <td>Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)</td> </tr> <tr> <td>tsm_system_rows</td> <td>1.0</td> <td>TABLESAMPLE method which accepts number of rows as a limit</td> </tr> <tr> <td>tsm_system_time</td> <td>1.0</td> <td>TABLESAMPLE method which accepts time in milliseconds as a limit</td> </tr> <tr> <td>unaccent</td> <td>1.1</td> <td>Text search dictionary that removes accents</td> </tr> <tr> <td>uuid-ossp</td> <td>1.1</td> <td>Generate universally unique identifiers (UUIDs)</td> </tr> <tr> <td>xml2</td> <td>1.1</td> <td>XPath querying and XSLT</td> </tr> </tbody> </table> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The following extensions are additionally included in the Postgis images.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>address_standardizer</td> <td>3.4.4</td> <td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.</td> </tr> <tr> <td>address_standardizer_data_us</td> <td>3.4.4</td> <td>Address Standardizer US dataset example</td> </tr> <tr> <td>postgis</td> <td>3.4.4</td> <td>PostGIS geometry and geography spatial types and functions</td> </tr> <tr> <td>postgis_raster</td> <td>3.4.4</td> <td>PostGIS raster types and functions</td> </tr> <tr> <td>postgis_sfcgal</td> <td>3.4.4</td> <td>PostGIS SFCGAL functions</td> </tr> <tr> <td>postgis_tiger_geocoder</td> <td>3.4.4</td> <td>PostGIS tiger geocoder and reverse geocoder</td> </tr> <tr> <td>postgis_topology</td> <td>3.4.4</td> <td>PostGIS topology spatial types and functions</td> </tr> </tbody> </table> + + + PostgreSQL 16 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg16/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg16/ + <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The extensions listed are included in the standard images. This list refers to PostgreSQL 16.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>adminpack</td> <td>2.1</td> <td>Administrative functions for PostgreSQL</td> </tr> <tr> <td>amcheck</td> <td>1.3</td> <td>Functions for verifying relation integrity</td> </tr> <tr> <td>autoinc</td> <td>1.0</td> <td>Functions for autoincrementing fields</td> </tr> <tr> <td>bloom</td> <td>1.0</td> <td>Bloom access method - signature file based index</td> </tr> <tr> <td>btree_gin</td> <td>1.3</td> <td>Support for indexing common datatypes in GIN</td> </tr> <tr> <td>btree_gist</td> <td>1.7</td> <td>Support for indexing common datatypes in GiST</td> </tr> <tr> <td>citext</td> <td>1.6</td> <td>Data type for case-insensitive character strings</td> </tr> <tr> <td>credcheck</td> <td>3.0.0</td> <td>credcheck - PostgreSQL plain text credential checker</td> </tr> <tr> <td>cube</td> <td>1.5</td> <td>Data type for multidimensional cubes</td> </tr> <tr> <td>dblink</td> <td>1.2</td> <td>Connect to other PostgreSQL databases from within a database</td> </tr> <tr> <td>dict_int</td> <td>1.0</td> <td>Text search dictionary template for integers</td> </tr> <tr> <td>dict_xsyn</td> <td>1.0</td> <td>Text search dictionary template for extended synonym processing</td> </tr> <tr> <td>earthdistance</td> <td>1.2</td> <td>Calculate great-circle distances on the surface of the Earth</td> </tr> <tr> <td>file_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for flat file access</td> </tr> <tr> <td>fuzzystrmatch</td> <td>1.2</td> <td>Determine similarities and distance between strings</td> </tr> <tr> <td>hstore</td> <td>1.8</td> <td>Data type for storing sets of (key, value) pairs</td> </tr> <tr> <td>hstore_plperl</td> <td>1.0</td> <td>Transform between hstore and plperl</td> </tr> <tr> <td>hstore_plperlu</td> <td>1.0</td> <td>Transform between hstore and plperlu</td> </tr> <tr> <td>hstore_plpython3u</td> <td>1.0</td> <td>Transform between hstore and plpython3u</td> </tr> <tr> <td>insert_username</td> <td>1.0</td> <td>Functions for tracking who changed a table</td> </tr> <tr> <td>intagg</td> <td>1.1</td> <td>Integer aggregator and enumerator (obsolete)</td> </tr> <tr> <td>intarray</td> <td>1.5</td> <td>Functions, operators, and index support for 1-D arrays of integers</td> </tr> <tr> <td>isn</td> <td>1.2</td> <td>Data types for international product numbering standards</td> </tr> <tr> <td>jsonb_plperl</td> <td>1.0</td> <td>Transform between jsonb and plperl</td> </tr> <tr> <td>jsonb_plperlu</td> <td>1.0</td> <td>Transform between jsonb and plperlu</td> </tr> <tr> <td>jsonb_plpython3u</td> <td>1.0</td> <td>Transform between jsonb and plpython3u</td> </tr> <tr> <td>lo</td> <td>1.1</td> <td>Large Object maintenance</td> </tr> <tr> <td>ltree</td> <td>1.2</td> <td>Data type for hierarchical tree-like structures</td> </tr> <tr> <td>ltree_plpython3u</td> <td>1.0</td> <td>Transform between ltree and plpython3u</td> </tr> <tr> <td>moddatetime</td> <td>1.0</td> <td>Functions for tracking last modification time</td> </tr> <tr> <td>old_snapshot</td> <td>1.0</td> <td>Utilities in support of old_snapshot_threshold</td> </tr> <tr> <td>pageinspect</td> <td>1.12</td> <td>Inspect the contents of database pages at a low level</td> </tr> <tr> <td>pg_buffercache</td> <td>1.4</td> <td>Examine the shared buffer cache</td> </tr> <tr> <td>pg_cron</td> <td>1.6</td> <td>Job scheduler for PostgreSQL</td> </tr> <tr> <td>pg_freespacemap</td> <td>1.2</td> <td>Examine the free space map (FSM)</td> </tr> <tr> <td>pg_permissions</td> <td>1.3</td> <td>View object permissions and compare them with the desired state</td> </tr> <tr> <td>pg_prewarm</td> <td>1.2</td> <td>Prewarm relation data</td> </tr> <tr> <td>pg_proctab</td> <td></td> <td>Placeholder - see pg_proctab&ndash;0.0.10-compat.control</td> </tr> <tr> <td>pg_stat_statements</td> <td>1.10</td> <td>Track planning and execution statistics of all SQL statements executed</td> </tr> <tr> <td>pg_surgery</td> <td>1.0</td> <td>Extension to perform surgery on a damaged relation</td> </tr> <tr> <td>pg_trgm</td> <td>1.6</td> <td>Text similarity measurement and index searching based on trigrams</td> </tr> <tr> <td>pg_visibility</td> <td>1.2</td> <td>Examine the visibility map (VM) and page-level visibility info</td> </tr> <tr> <td>pg_walinspect</td> <td>1.1</td> <td>Functions to inspect contents of PostgreSQL Write-Ahead Log</td> </tr> <tr> <td>pgaudit</td> <td>16.1</td> <td>Provides auditing functionality</td> </tr> <tr> <td>pgauditlogtofile</td> <td>1.6</td> <td>pgAudit addon to redirect audit entries to an independent file</td> </tr> <tr> <td>pgcrypto</td> <td>1.3</td> <td>Cryptographic functions</td> </tr> <tr> <td>pgnodemx</td> <td>1.7</td> <td>SQL functions that allow capture of node OS metrics from PostgreSQL</td> </tr> <tr> <td>pgrowlocks</td> <td>1.2</td> <td>Show row-level locking information</td> </tr> <tr> <td>pgstattuple</td> <td>1.5</td> <td>Show tuple-level statistics</td> </tr> <tr> <td>plpgsql</td> <td>1.0</td> <td>PL/pgSQL procedural language</td> </tr> <tr> <td>plpython3u</td> <td>1.0</td> <td>PL/Python3U untrusted procedural language</td> </tr> <tr> <td>pltcl</td> <td>1.0</td> <td>PL/Tcl procedural language</td> </tr> <tr> <td>pltclu</td> <td>1.0</td> <td>PL/TclU untrusted procedural language</td> </tr> <tr> <td>postgres_fdw</td> <td>1.1</td> <td>Foreign-data wrapper for remote PostgreSQL servers</td> </tr> <tr> <td>refint</td> <td>1.0</td> <td>Functions for implementing referential integrity (obsolete)</td> </tr> <tr> <td>seg</td> <td>1.4</td> <td>Data type for representing line segments or floating-point intervals</td> </tr> <tr> <td>set_user</td> <td>4.1.0</td> <td>Similar to SET ROLE but with added logging</td> </tr> <tr> <td>sslinfo</td> <td>1.2</td> <td>Information about SSL certificates</td> </tr> <tr> <td>tablefunc</td> <td>1.0</td> <td>Functions that manipulate whole tables, including crosstab</td> </tr> <tr> <td>tcn</td> <td>1.0</td> <td>Triggered change notifications</td> </tr> <tr> <td>timescaledb</td> <td>2.18.2</td> <td>Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)</td> </tr> <tr> <td>tsm_system_rows</td> <td>1.0</td> <td>TABLESAMPLE method which accepts number of rows as a limit</td> </tr> <tr> <td>tsm_system_time</td> <td>1.0</td> <td>TABLESAMPLE method which accepts time in milliseconds as a limit</td> </tr> <tr> <td>unaccent</td> <td>1.1</td> <td>Text search dictionary that removes accents</td> </tr> <tr> <td>uuid-ossp</td> <td>1.1</td> <td>Generate universally unique identifiers (UUIDs)</td> </tr> <tr> <td>xml2</td> <td>1.1</td> <td>XPath querying and XSLT</td> </tr> </tbody> </table> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The following extensions are additionally included in the Postgis images.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>address_standardizer</td> <td>3.4.4</td> <td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.</td> </tr> <tr> <td>address_standardizer_data_us</td> <td>3.4.4</td> <td>Address Standardizer US dataset example</td> </tr> <tr> <td>postgis</td> <td>3.4.4</td> <td>PostGIS geometry and geography spatial types and functions</td> </tr> <tr> <td>postgis_raster</td> <td>3.4.4</td> <td>PostGIS raster types and functions</td> </tr> <tr> <td>postgis_sfcgal</td> <td>3.4.4</td> <td>PostGIS SFCGAL functions</td> </tr> <tr> <td>postgis_tiger_geocoder</td> <td>3.4.4</td> <td>PostGIS tiger geocoder and reverse geocoder</td> </tr> <tr> <td>postgis_topology</td> <td>3.4.4</td> <td>PostGIS topology spatial types and functions</td> </tr> </tbody> </table> + + + PostgreSQL 17 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg17/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg17/ + <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The extensions listed are included in the standard images. This list refers to PostgreSQL 17.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>amcheck</td> <td>1.4</td> <td>Functions for verifying relation integrity</td> </tr> <tr> <td>autoinc</td> <td>1.0</td> <td>Functions for autoincrementing fields</td> </tr> <tr> <td>bloom</td> <td>1.0</td> <td>Bloom access method - signature file based index</td> </tr> <tr> <td>btree_gin</td> <td>1.3</td> <td>Support for indexing common datatypes in GIN</td> </tr> <tr> <td>btree_gist</td> <td>1.7</td> <td>Support for indexing common datatypes in GiST</td> </tr> <tr> <td>citext</td> <td>1.6</td> <td>Data type for case-insensitive character strings</td> </tr> <tr> <td>credcheck</td> <td>3.0.0</td> <td>credcheck - PostgreSQL plain text credential checker</td> </tr> <tr> <td>cube</td> <td>1.5</td> <td>Data type for multidimensional cubes</td> </tr> <tr> <td>dblink</td> <td>1.2</td> <td>Connect to other PostgreSQL databases from within a database</td> </tr> <tr> <td>dict_int</td> <td>1.0</td> <td>Text search dictionary template for integers</td> </tr> <tr> <td>dict_xsyn</td> <td>1.0</td> <td>Text search dictionary template for extended synonym processing</td> </tr> <tr> <td>earthdistance</td> <td>1.2</td> <td>Calculate great-circle distances on the surface of the Earth</td> </tr> <tr> <td>file_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for flat file access</td> </tr> <tr> <td>fuzzystrmatch</td> <td>1.2</td> <td>Determine similarities and distance between strings</td> </tr> <tr> <td>hstore</td> <td>1.8</td> <td>Data type for storing sets of (key, value) pairs</td> </tr> <tr> <td>hstore_plperl</td> <td>1.0</td> <td>Transform between hstore and plperl</td> </tr> <tr> <td>hstore_plperlu</td> <td>1.0</td> <td>Transform between hstore and plperlu</td> </tr> <tr> <td>hstore_plpython3u</td> <td>1.0</td> <td>Transform between hstore and plpython3u</td> </tr> <tr> <td>insert_username</td> <td>1.0</td> <td>Functions for tracking who changed a table</td> </tr> <tr> <td>intagg</td> <td>1.1</td> <td>Integer aggregator and enumerator (obsolete)</td> </tr> <tr> <td>intarray</td> <td>1.5</td> <td>Functions, operators, and index support for 1-D arrays of integers</td> </tr> <tr> <td>isn</td> <td>1.2</td> <td>Data types for international product numbering standards</td> </tr> <tr> <td>jsonb_plperl</td> <td>1.0</td> <td>Transform between jsonb and plperl</td> </tr> <tr> <td>jsonb_plperlu</td> <td>1.0</td> <td>Transform between jsonb and plperlu</td> </tr> <tr> <td>jsonb_plpython3u</td> <td>1.0</td> <td>Transform between jsonb and plpython3u</td> </tr> <tr> <td>lo</td> <td>1.1</td> <td>Large Object maintenance</td> </tr> <tr> <td>ltree</td> <td>1.3</td> <td>Data type for hierarchical tree-like structures</td> </tr> <tr> <td>ltree_plpython3u</td> <td>1.0</td> <td>Transform between ltree and plpython3u</td> </tr> <tr> <td>moddatetime</td> <td>1.0</td> <td>Functions for tracking last modification time</td> </tr> <tr> <td>pageinspect</td> <td>1.12</td> <td>Inspect the contents of database pages at a low level</td> </tr> <tr> <td>pg_buffercache</td> <td>1.5</td> <td>Examine the shared buffer cache</td> </tr> <tr> <td>pg_cron</td> <td>1.6</td> <td>Job scheduler for PostgreSQL</td> </tr> <tr> <td>pg_freespacemap</td> <td>1.2</td> <td>Examine the free space map (FSM)</td> </tr> <tr> <td>pg_permissions</td> <td>1.3</td> <td>View object permissions and compare them with the desired state</td> </tr> <tr> <td>pg_prewarm</td> <td>1.2</td> <td>Prewarm relation data</td> </tr> <tr> <td>pg_proctab</td> <td></td> <td>Placeholder - see pg_proctab&ndash;0.0.10-compat.control</td> </tr> <tr> <td>pg_stat_statements</td> <td>1.11</td> <td>Track planning and execution statistics of all SQL statements executed</td> </tr> <tr> <td>pg_surgery</td> <td>1.0</td> <td>Extension to perform surgery on a damaged relation</td> </tr> <tr> <td>pg_trgm</td> <td>1.6</td> <td>Text similarity measurement and index searching based on trigrams</td> </tr> <tr> <td>pg_visibility</td> <td>1.2</td> <td>Examine the visibility map (VM) and page-level visibility info</td> </tr> <tr> <td>pg_walinspect</td> <td>1.1</td> <td>Functions to inspect contents of PostgreSQL Write-Ahead Log</td> </tr> <tr> <td>pgaudit</td> <td>17.1</td> <td>Provides auditing functionality</td> </tr> <tr> <td>pgauditlogtofile</td> <td>1.6</td> <td>pgAudit addon to redirect audit entries to an independent file</td> </tr> <tr> <td>pgcrypto</td> <td>1.3</td> <td>Cryptographic functions</td> </tr> <tr> <td>pgnodemx</td> <td>1.7</td> <td>SQL functions that allow capture of node OS metrics from PostgreSQL</td> </tr> <tr> <td>pgrowlocks</td> <td>1.2</td> <td>Show row-level locking information</td> </tr> <tr> <td>pgstattuple</td> <td>1.5</td> <td>Show tuple-level statistics</td> </tr> <tr> <td>plpgsql</td> <td>1.0</td> <td>PL/pgSQL procedural language</td> </tr> <tr> <td>plpython3u</td> <td>1.0</td> <td>PL/Python3U untrusted procedural language</td> </tr> <tr> <td>pltcl</td> <td>1.0</td> <td>PL/Tcl procedural language</td> </tr> <tr> <td>pltclu</td> <td>1.0</td> <td>PL/TclU untrusted procedural language</td> </tr> <tr> <td>postgres_fdw</td> <td>1.1</td> <td>Foreign-data wrapper for remote PostgreSQL servers</td> </tr> <tr> <td>refint</td> <td>1.0</td> <td>Functions for implementing referential integrity (obsolete)</td> </tr> <tr> <td>seg</td> <td>1.4</td> <td>Data type for representing line segments or floating-point intervals</td> </tr> <tr> <td>set_user</td> <td>4.1.0</td> <td>Similar to SET ROLE but with added logging</td> </tr> <tr> <td>sslinfo</td> <td>1.2</td> <td>Information about SSL certificates</td> </tr> <tr> <td>tablefunc</td> <td>1.0</td> <td>Functions that manipulate whole tables, including crosstab</td> </tr> <tr> <td>tcn</td> <td>1.0</td> <td>Triggered change notifications</td> </tr> <tr> <td>timescaledb</td> <td>2.18.2</td> <td>Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)</td> </tr> <tr> <td>tsm_system_rows</td> <td>1.0</td> <td>TABLESAMPLE method which accepts number of rows as a limit</td> </tr> <tr> <td>tsm_system_time</td> <td>1.0</td> <td>TABLESAMPLE method which accepts time in milliseconds as a limit</td> </tr> <tr> <td>unaccent</td> <td>1.1</td> <td>Text search dictionary that removes accents</td> </tr> <tr> <td>uuid-ossp</td> <td>1.1</td> <td>Generate universally unique identifiers (UUIDs)</td> </tr> <tr> <td>xml2</td> <td>1.1</td> <td>XPath querying and XSLT</td> </tr> </tbody> </table> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The following extensions are additionally included in the Postgis images.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>address_standardizer</td> <td>3.4.4</td> <td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.</td> </tr> <tr> <td>address_standardizer_data_us</td> <td>3.4.4</td> <td>Address Standardizer US dataset example</td> </tr> <tr> <td>postgis</td> <td>3.4.4</td> <td>PostGIS geometry and geography spatial types and functions</td> </tr> <tr> <td>postgis_raster</td> <td>3.4.4</td> <td>PostGIS raster types and functions</td> </tr> <tr> <td>postgis_sfcgal</td> <td>3.4.4</td> <td>PostGIS SFCGAL functions</td> </tr> <tr> <td>postgis_tiger_geocoder</td> <td>3.4.4</td> <td>PostGIS tiger geocoder and reverse geocoder</td> </tr> <tr> <td>postgis_topology</td> <td>3.4.4</td> <td>PostGIS topology spatial types and functions</td> </tr> </tbody> </table> + + + diff --git a/docs/hugo/public/extensions/pg13/index.html b/docs/hugo/public/extensions/pg13/index.html new file mode 100644 index 000000000..4b7a36c06 --- /dev/null +++ b/docs/hugo/public/extensions/pg13/index.html @@ -0,0 +1,5485 @@ + + + + + + + + + + + + + PostgreSQL 13 | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

PostgreSQL 13

+
+
+ + + + + + +
+
+
The extensions listed are included in the standard images. This list refers to PostgreSQL 13.
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefault VersionComment
adminpack2.1Administrative functions for PostgreSQL
amcheck1.2Functions for verifying relation integrity
autoinc1.0Functions for autoincrementing fields
bloom1.0Bloom access method - signature file based index
btree_gin1.3Support for indexing common datatypes in GIN
btree_gist1.5Support for indexing common datatypes in GiST
citext1.6Data type for case-insensitive character strings
credcheck3.0.0credcheck - PostgreSQL plain text credential checker
cube1.4Data type for multidimensional cubes
dblink1.2Connect to other PostgreSQL databases from within a database
dict_int1.0Text search dictionary template for integers
dict_xsyn1.0Text search dictionary template for extended synonym processing
earthdistance1.1Calculate great-circle distances on the surface of the Earth
file_fdw1.0Foreign-data wrapper for flat file access
fuzzystrmatch1.1Determine similarities and distance between strings
hstore1.7Data type for storing sets of (key, value) pairs
hstore_plperl1.0Transform between hstore and plperl
hstore_plperlu1.0Transform between hstore and plperlu
hstore_plpython3u1.0Transform between hstore and plpython3u
insert_username1.0Functions for tracking who changed a table
intagg1.1Integer aggregator and enumerator (obsolete)
intarray1.3Functions, operators, and index support for 1-D arrays of integers
isn1.2Data types for international product numbering standards
jsonb_plperl1.0Transform between jsonb and plperl
jsonb_plperlu1.0Transform between jsonb and plperlu
jsonb_plpython3u1.0Transform between jsonb and plpython3u
lo1.1Large Object maintenance
ltree1.2Data type for hierarchical tree-like structures
ltree_plpython3u1.0Transform between ltree and plpython3u
moddatetime1.0Functions for tracking last modification time
pageinspect1.8Inspect the contents of database pages at a low level
pg_buffercache1.3Examine the shared buffer cache
pg_cron1.6Job scheduler for PostgreSQL
pg_freespacemap1.2Examine the free space map (FSM)
pg_permissions1.3View object permissions and compare them with the desired state
pg_prewarm1.2Prewarm relation data
pg_proctabPlaceholder - see pg_proctab–0.0.10-compat.control
pg_stat_statements1.8Track planning and execution statistics of all SQL statements executed
pg_trgm1.5Text similarity measurement and index searching based on trigrams
pg_visibility1.2Examine the visibility map (VM) and page-level visibility info
pgaudit1.5.3Provides auditing functionality
pgauditlogtofile1.6pgAudit addon to redirect audit entries to an independent file
pgcrypto1.3Cryptographic functions
pgnodemx1.7SQL functions that allow capture of node OS metrics from PostgreSQL
pgrowlocks1.2Show row-level locking information
pgstattuple1.5Show tuple-level statistics
plpgsql1.0PL/pgSQL procedural language
plpython3u1.0PL/Python3U untrusted procedural language
pltcl1.0PL/Tcl procedural language
pltclu1.0PL/TclU untrusted procedural language
postgres_fdw1.0Foreign-data wrapper for remote PostgreSQL servers
refint1.0Functions for implementing referential integrity (obsolete)
seg1.3Data type for representing line segments or floating-point intervals
set_user4.1.0Similar to SET ROLE but with added logging
sslinfo1.2Information about SSL certificates
tablefunc1.0Functions that manipulate whole tables, including crosstab
tcn1.0Triggered change notifications
timescaledb2.15.3Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)
tsm_system_rows1.0TABLESAMPLE method which accepts number of rows as a limit
tsm_system_time1.0TABLESAMPLE method which accepts time in milliseconds as a limit
unaccent1.1Text search dictionary that removes accents
uuid-ossp1.1Generate universally unique identifiers (UUIDs)
xml21.1XPath querying and XSLT
+ + + + + +
+
+
The following extensions are additionally included in the Postgis images.
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefault VersionComment
address_standardizer3.4.4Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.
address_standardizer_data_us3.4.4Address Standardizer US dataset example
postgis3.4.4PostGIS geometry and geography spatial types and functions
postgis_raster3.4.4PostGIS raster types and functions
postgis_sfcgal3.4.4PostGIS SFCGAL functions
postgis_tiger_geocoder3.4.4PostGIS tiger geocoder and reverse geocoder
postgis_topology3.4.4PostGIS topology spatial types and functions
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/extensions/pg14/index.html b/docs/hugo/public/extensions/pg14/index.html new file mode 100644 index 000000000..b8e2977a7 --- /dev/null +++ b/docs/hugo/public/extensions/pg14/index.html @@ -0,0 +1,5495 @@ + + + + + + + + + + + + + PostgreSQL 14 | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

PostgreSQL 14

+
+
+ + + + + + +
+
+
The extensions listed are included in the standard images. This list refers to PostgreSQL 14.
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefault VersionComment
adminpack2.1Administrative functions for PostgreSQL
amcheck1.3Functions for verifying relation integrity
autoinc1.0Functions for autoincrementing fields
bloom1.0Bloom access method - signature file based index
btree_gin1.3Support for indexing common datatypes in GIN
btree_gist1.6Support for indexing common datatypes in GiST
citext1.6Data type for case-insensitive character strings
credcheck3.0.0credcheck - PostgreSQL plain text credential checker
cube1.5Data type for multidimensional cubes
dblink1.2Connect to other PostgreSQL databases from within a database
dict_int1.0Text search dictionary template for integers
dict_xsyn1.0Text search dictionary template for extended synonym processing
earthdistance1.1Calculate great-circle distances on the surface of the Earth
file_fdw1.0Foreign-data wrapper for flat file access
fuzzystrmatch1.1Determine similarities and distance between strings
hstore1.8Data type for storing sets of (key, value) pairs
hstore_plperl1.0Transform between hstore and plperl
hstore_plperlu1.0Transform between hstore and plperlu
hstore_plpython3u1.0Transform between hstore and plpython3u
insert_username1.0Functions for tracking who changed a table
intagg1.1Integer aggregator and enumerator (obsolete)
intarray1.5Functions, operators, and index support for 1-D arrays of integers
isn1.2Data types for international product numbering standards
jsonb_plperl1.0Transform between jsonb and plperl
jsonb_plperlu1.0Transform between jsonb and plperlu
jsonb_plpython3u1.0Transform between jsonb and plpython3u
lo1.1Large Object maintenance
ltree1.2Data type for hierarchical tree-like structures
ltree_plpython3u1.0Transform between ltree and plpython3u
moddatetime1.0Functions for tracking last modification time
old_snapshot1.0Utilities in support of old_snapshot_threshold
pageinspect1.9Inspect the contents of database pages at a low level
pg_buffercache1.3Examine the shared buffer cache
pg_cron1.6Job scheduler for PostgreSQL
pg_freespacemap1.2Examine the free space map (FSM)
pg_permissions1.3View object permissions and compare them with the desired state
pg_prewarm1.2Prewarm relation data
pg_proctabPlaceholder - see pg_proctab–0.0.10-compat.control
pg_stat_statements1.9Track planning and execution statistics of all SQL statements executed
pg_surgery1.0Extension to perform surgery on a damaged relation
pg_trgm1.6Text similarity measurement and index searching based on trigrams
pg_visibility1.2Examine the visibility map (VM) and page-level visibility info
pgaudit1.6.3Provides auditing functionality
pgauditlogtofile1.6pgAudit addon to redirect audit entries to an independent file
pgcrypto1.3Cryptographic functions
pgnodemx1.7SQL functions that allow capture of node OS metrics from PostgreSQL
pgrowlocks1.2Show row-level locking information
pgstattuple1.5Show tuple-level statistics
plpgsql1.0PL/pgSQL procedural language
plpython3u1.0PL/Python3U untrusted procedural language
pltcl1.0PL/Tcl procedural language
pltclu1.0PL/TclU untrusted procedural language
postgres_fdw1.1Foreign-data wrapper for remote PostgreSQL servers
refint1.0Functions for implementing referential integrity (obsolete)
seg1.4Data type for representing line segments or floating-point intervals
set_user4.1.0Similar to SET ROLE but with added logging
sslinfo1.2Information about SSL certificates
tablefunc1.0Functions that manipulate whole tables, including crosstab
tcn1.0Triggered change notifications
timescaledb2.18.2Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)
tsm_system_rows1.0TABLESAMPLE method which accepts number of rows as a limit
tsm_system_time1.0TABLESAMPLE method which accepts time in milliseconds as a limit
unaccent1.1Text search dictionary that removes accents
uuid-ossp1.1Generate universally unique identifiers (UUIDs)
xml21.1XPath querying and XSLT
+ + + + + +
+
+
The following extensions are additionally included in the Postgis images.
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefault VersionComment
address_standardizer3.4.4Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.
address_standardizer_data_us3.4.4Address Standardizer US dataset example
postgis3.4.4PostGIS geometry and geography spatial types and functions
postgis_raster3.4.4PostGIS raster types and functions
postgis_sfcgal3.4.4PostGIS SFCGAL functions
postgis_tiger_geocoder3.4.4PostGIS tiger geocoder and reverse geocoder
postgis_topology3.4.4PostGIS topology spatial types and functions
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/extensions/pg15/index.html b/docs/hugo/public/extensions/pg15/index.html new file mode 100644 index 000000000..3eb4888dc --- /dev/null +++ b/docs/hugo/public/extensions/pg15/index.html @@ -0,0 +1,5500 @@ + + + + + + + + + + + + + PostgreSQL 15 | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

PostgreSQL 15

+
+
+ + + + + + +
+
+
The extensions listed are included in the standard images. This list refers to PostgreSQL 15.
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefault VersionComment
adminpack2.1Administrative functions for PostgreSQL
amcheck1.3Functions for verifying relation integrity
autoinc1.0Functions for autoincrementing fields
bloom1.0Bloom access method - signature file based index
btree_gin1.3Support for indexing common datatypes in GIN
btree_gist1.7Support for indexing common datatypes in GiST
citext1.6Data type for case-insensitive character strings
credcheck3.0.0credcheck - PostgreSQL plain text credential checker
cube1.5Data type for multidimensional cubes
dblink1.2Connect to other PostgreSQL databases from within a database
dict_int1.0Text search dictionary template for integers
dict_xsyn1.0Text search dictionary template for extended synonym processing
earthdistance1.1Calculate great-circle distances on the surface of the Earth
file_fdw1.0Foreign-data wrapper for flat file access
fuzzystrmatch1.1Determine similarities and distance between strings
hstore1.8Data type for storing sets of (key, value) pairs
hstore_plperl1.0Transform between hstore and plperl
hstore_plperlu1.0Transform between hstore and plperlu
hstore_plpython3u1.0Transform between hstore and plpython3u
insert_username1.0Functions for tracking who changed a table
intagg1.1Integer aggregator and enumerator (obsolete)
intarray1.5Functions, operators, and index support for 1-D arrays of integers
isn1.2Data types for international product numbering standards
jsonb_plperl1.0Transform between jsonb and plperl
jsonb_plperlu1.0Transform between jsonb and plperlu
jsonb_plpython3u1.0Transform between jsonb and plpython3u
lo1.1Large Object maintenance
ltree1.2Data type for hierarchical tree-like structures
ltree_plpython3u1.0Transform between ltree and plpython3u
moddatetime1.0Functions for tracking last modification time
old_snapshot1.0Utilities in support of old_snapshot_threshold
pageinspect1.11Inspect the contents of database pages at a low level
pg_buffercache1.3Examine the shared buffer cache
pg_cron1.6Job scheduler for PostgreSQL
pg_freespacemap1.2Examine the free space map (FSM)
pg_permissions1.3View object permissions and compare them with the desired state
pg_prewarm1.2Prewarm relation data
pg_proctabPlaceholder - see pg_proctab–0.0.10-compat.control
pg_stat_statements1.10Track planning and execution statistics of all SQL statements executed
pg_surgery1.0Extension to perform surgery on a damaged relation
pg_trgm1.6Text similarity measurement and index searching based on trigrams
pg_visibility1.2Examine the visibility map (VM) and page-level visibility info
pg_walinspect1.0Functions to inspect contents of PostgreSQL Write-Ahead Log
pgaudit1.7Provides auditing functionality
pgauditlogtofile1.6pgAudit addon to redirect audit entries to an independent file
pgcrypto1.3Cryptographic functions
pgnodemx1.7SQL functions that allow capture of node OS metrics from PostgreSQL
pgrowlocks1.2Show row-level locking information
pgstattuple1.5Show tuple-level statistics
plpgsql1.0PL/pgSQL procedural language
plpython3u1.0PL/Python3U untrusted procedural language
pltcl1.0PL/Tcl procedural language
pltclu1.0PL/TclU untrusted procedural language
postgres_fdw1.1Foreign-data wrapper for remote PostgreSQL servers
refint1.0Functions for implementing referential integrity (obsolete)
seg1.4Data type for representing line segments or floating-point intervals
set_user4.1.0Similar to SET ROLE but with added logging
sslinfo1.2Information about SSL certificates
tablefunc1.0Functions that manipulate whole tables, including crosstab
tcn1.0Triggered change notifications
timescaledb2.18.2Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)
tsm_system_rows1.0TABLESAMPLE method which accepts number of rows as a limit
tsm_system_time1.0TABLESAMPLE method which accepts time in milliseconds as a limit
unaccent1.1Text search dictionary that removes accents
uuid-ossp1.1Generate universally unique identifiers (UUIDs)
xml21.1XPath querying and XSLT
+ + + + + +
+
+
The following extensions are additionally included in the Postgis images.
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefault VersionComment
address_standardizer3.4.4Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.
address_standardizer_data_us3.4.4Address Standardizer US dataset example
postgis3.4.4PostGIS geometry and geography spatial types and functions
postgis_raster3.4.4PostGIS raster types and functions
postgis_sfcgal3.4.4PostGIS SFCGAL functions
postgis_tiger_geocoder3.4.4PostGIS tiger geocoder and reverse geocoder
postgis_topology3.4.4PostGIS topology spatial types and functions
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/extensions/pg16/index.html b/docs/hugo/public/extensions/pg16/index.html new file mode 100644 index 000000000..fb266bd36 --- /dev/null +++ b/docs/hugo/public/extensions/pg16/index.html @@ -0,0 +1,5500 @@ + + + + + + + + + + + + + PostgreSQL 16 | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

PostgreSQL 16

+
+
+ + + + + + +
+
+
The extensions listed are included in the standard images. This list refers to PostgreSQL 16.
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefault VersionComment
adminpack2.1Administrative functions for PostgreSQL
amcheck1.3Functions for verifying relation integrity
autoinc1.0Functions for autoincrementing fields
bloom1.0Bloom access method - signature file based index
btree_gin1.3Support for indexing common datatypes in GIN
btree_gist1.7Support for indexing common datatypes in GiST
citext1.6Data type for case-insensitive character strings
credcheck3.0.0credcheck - PostgreSQL plain text credential checker
cube1.5Data type for multidimensional cubes
dblink1.2Connect to other PostgreSQL databases from within a database
dict_int1.0Text search dictionary template for integers
dict_xsyn1.0Text search dictionary template for extended synonym processing
earthdistance1.2Calculate great-circle distances on the surface of the Earth
file_fdw1.0Foreign-data wrapper for flat file access
fuzzystrmatch1.2Determine similarities and distance between strings
hstore1.8Data type for storing sets of (key, value) pairs
hstore_plperl1.0Transform between hstore and plperl
hstore_plperlu1.0Transform between hstore and plperlu
hstore_plpython3u1.0Transform between hstore and plpython3u
insert_username1.0Functions for tracking who changed a table
intagg1.1Integer aggregator and enumerator (obsolete)
intarray1.5Functions, operators, and index support for 1-D arrays of integers
isn1.2Data types for international product numbering standards
jsonb_plperl1.0Transform between jsonb and plperl
jsonb_plperlu1.0Transform between jsonb and plperlu
jsonb_plpython3u1.0Transform between jsonb and plpython3u
lo1.1Large Object maintenance
ltree1.2Data type for hierarchical tree-like structures
ltree_plpython3u1.0Transform between ltree and plpython3u
moddatetime1.0Functions for tracking last modification time
old_snapshot1.0Utilities in support of old_snapshot_threshold
pageinspect1.12Inspect the contents of database pages at a low level
pg_buffercache1.4Examine the shared buffer cache
pg_cron1.6Job scheduler for PostgreSQL
pg_freespacemap1.2Examine the free space map (FSM)
pg_permissions1.3View object permissions and compare them with the desired state
pg_prewarm1.2Prewarm relation data
pg_proctabPlaceholder - see pg_proctab–0.0.10-compat.control
pg_stat_statements1.10Track planning and execution statistics of all SQL statements executed
pg_surgery1.0Extension to perform surgery on a damaged relation
pg_trgm1.6Text similarity measurement and index searching based on trigrams
pg_visibility1.2Examine the visibility map (VM) and page-level visibility info
pg_walinspect1.1Functions to inspect contents of PostgreSQL Write-Ahead Log
pgaudit16.1Provides auditing functionality
pgauditlogtofile1.6pgAudit addon to redirect audit entries to an independent file
pgcrypto1.3Cryptographic functions
pgnodemx1.7SQL functions that allow capture of node OS metrics from PostgreSQL
pgrowlocks1.2Show row-level locking information
pgstattuple1.5Show tuple-level statistics
plpgsql1.0PL/pgSQL procedural language
plpython3u1.0PL/Python3U untrusted procedural language
pltcl1.0PL/Tcl procedural language
pltclu1.0PL/TclU untrusted procedural language
postgres_fdw1.1Foreign-data wrapper for remote PostgreSQL servers
refint1.0Functions for implementing referential integrity (obsolete)
seg1.4Data type for representing line segments or floating-point intervals
set_user4.1.0Similar to SET ROLE but with added logging
sslinfo1.2Information about SSL certificates
tablefunc1.0Functions that manipulate whole tables, including crosstab
tcn1.0Triggered change notifications
timescaledb2.18.2Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)
tsm_system_rows1.0TABLESAMPLE method which accepts number of rows as a limit
tsm_system_time1.0TABLESAMPLE method which accepts time in milliseconds as a limit
unaccent1.1Text search dictionary that removes accents
uuid-ossp1.1Generate universally unique identifiers (UUIDs)
xml21.1XPath querying and XSLT
+ + + + + +
+
+
The following extensions are additionally included in the Postgis images.
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefault VersionComment
address_standardizer3.4.4Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.
address_standardizer_data_us3.4.4Address Standardizer US dataset example
postgis3.4.4PostGIS geometry and geography spatial types and functions
postgis_raster3.4.4PostGIS raster types and functions
postgis_sfcgal3.4.4PostGIS SFCGAL functions
postgis_tiger_geocoder3.4.4PostGIS tiger geocoder and reverse geocoder
postgis_topology3.4.4PostGIS topology spatial types and functions
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/extensions/pg17/index.html b/docs/hugo/public/extensions/pg17/index.html new file mode 100644 index 000000000..cd4c9be58 --- /dev/null +++ b/docs/hugo/public/extensions/pg17/index.html @@ -0,0 +1,5490 @@ + + + + + + + + + + + + + PostgreSQL 17 | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

PostgreSQL 17

+
+
+ + + + + + +
+
+
The extensions listed are included in the standard images. This list refers to PostgreSQL 17.
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefault VersionComment
amcheck1.4Functions for verifying relation integrity
autoinc1.0Functions for autoincrementing fields
bloom1.0Bloom access method - signature file based index
btree_gin1.3Support for indexing common datatypes in GIN
btree_gist1.7Support for indexing common datatypes in GiST
citext1.6Data type for case-insensitive character strings
credcheck3.0.0credcheck - PostgreSQL plain text credential checker
cube1.5Data type for multidimensional cubes
dblink1.2Connect to other PostgreSQL databases from within a database
dict_int1.0Text search dictionary template for integers
dict_xsyn1.0Text search dictionary template for extended synonym processing
earthdistance1.2Calculate great-circle distances on the surface of the Earth
file_fdw1.0Foreign-data wrapper for flat file access
fuzzystrmatch1.2Determine similarities and distance between strings
hstore1.8Data type for storing sets of (key, value) pairs
hstore_plperl1.0Transform between hstore and plperl
hstore_plperlu1.0Transform between hstore and plperlu
hstore_plpython3u1.0Transform between hstore and plpython3u
insert_username1.0Functions for tracking who changed a table
intagg1.1Integer aggregator and enumerator (obsolete)
intarray1.5Functions, operators, and index support for 1-D arrays of integers
isn1.2Data types for international product numbering standards
jsonb_plperl1.0Transform between jsonb and plperl
jsonb_plperlu1.0Transform between jsonb and plperlu
jsonb_plpython3u1.0Transform between jsonb and plpython3u
lo1.1Large Object maintenance
ltree1.3Data type for hierarchical tree-like structures
ltree_plpython3u1.0Transform between ltree and plpython3u
moddatetime1.0Functions for tracking last modification time
pageinspect1.12Inspect the contents of database pages at a low level
pg_buffercache1.5Examine the shared buffer cache
pg_cron1.6Job scheduler for PostgreSQL
pg_freespacemap1.2Examine the free space map (FSM)
pg_permissions1.3View object permissions and compare them with the desired state
pg_prewarm1.2Prewarm relation data
pg_proctabPlaceholder - see pg_proctab–0.0.10-compat.control
pg_stat_statements1.11Track planning and execution statistics of all SQL statements executed
pg_surgery1.0Extension to perform surgery on a damaged relation
pg_trgm1.6Text similarity measurement and index searching based on trigrams
pg_visibility1.2Examine the visibility map (VM) and page-level visibility info
pg_walinspect1.1Functions to inspect contents of PostgreSQL Write-Ahead Log
pgaudit17.1Provides auditing functionality
pgauditlogtofile1.6pgAudit addon to redirect audit entries to an independent file
pgcrypto1.3Cryptographic functions
pgnodemx1.7SQL functions that allow capture of node OS metrics from PostgreSQL
pgrowlocks1.2Show row-level locking information
pgstattuple1.5Show tuple-level statistics
plpgsql1.0PL/pgSQL procedural language
plpython3u1.0PL/Python3U untrusted procedural language
pltcl1.0PL/Tcl procedural language
pltclu1.0PL/TclU untrusted procedural language
postgres_fdw1.1Foreign-data wrapper for remote PostgreSQL servers
refint1.0Functions for implementing referential integrity (obsolete)
seg1.4Data type for representing line segments or floating-point intervals
set_user4.1.0Similar to SET ROLE but with added logging
sslinfo1.2Information about SSL certificates
tablefunc1.0Functions that manipulate whole tables, including crosstab
tcn1.0Triggered change notifications
timescaledb2.18.2Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)
tsm_system_rows1.0TABLESAMPLE method which accepts number of rows as a limit
tsm_system_time1.0TABLESAMPLE method which accepts time in milliseconds as a limit
unaccent1.1Text search dictionary that removes accents
uuid-ossp1.1Generate universally unique identifiers (UUIDs)
xml21.1XPath querying and XSLT
+ + + + + +
+
+
The following extensions are additionally included in the Postgis images.
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefault VersionComment
address_standardizer3.4.4Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.
address_standardizer_data_us3.4.4Address Standardizer US dataset example
postgis3.4.4PostGIS geometry and geography spatial types and functions
postgis_raster3.4.4PostGIS raster types and functions
postgis_sfcgal3.4.4PostGIS SFCGAL functions
postgis_tiger_geocoder3.4.4PostGIS tiger geocoder and reverse geocoder
postgis_topology3.4.4PostGIS topology spatial types and functions
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/favicon/android-chrome-144x144.png b/docs/hugo/public/favicon/android-chrome-144x144.png new file mode 100644 index 000000000..7cf7b679d Binary files /dev/null and b/docs/hugo/public/favicon/android-chrome-144x144.png differ diff --git a/docs/hugo/public/favicon/android-chrome-192x192.png b/docs/hugo/public/favicon/android-chrome-192x192.png new file mode 100644 index 000000000..15e95e242 Binary files /dev/null and b/docs/hugo/public/favicon/android-chrome-192x192.png differ diff --git a/docs/hugo/public/favicon/android-chrome-256x256.png b/docs/hugo/public/favicon/android-chrome-256x256.png new file mode 100644 index 000000000..efd6dc90c Binary files /dev/null and b/docs/hugo/public/favicon/android-chrome-256x256.png differ diff --git a/docs/hugo/public/favicon/android-chrome-36x36.png b/docs/hugo/public/favicon/android-chrome-36x36.png new file mode 100644 index 000000000..c9f7bf8ea Binary files /dev/null and b/docs/hugo/public/favicon/android-chrome-36x36.png differ diff --git a/docs/hugo/public/favicon/android-chrome-384x384.png b/docs/hugo/public/favicon/android-chrome-384x384.png new file mode 100644 index 000000000..09b4e07fa Binary files /dev/null and b/docs/hugo/public/favicon/android-chrome-384x384.png differ diff --git a/docs/hugo/public/favicon/android-chrome-48x48.png b/docs/hugo/public/favicon/android-chrome-48x48.png new file mode 100644 index 000000000..0dd0eb405 Binary files /dev/null and b/docs/hugo/public/favicon/android-chrome-48x48.png differ diff --git a/docs/hugo/public/favicon/android-chrome-512x512.png b/docs/hugo/public/favicon/android-chrome-512x512.png new file mode 100644 index 000000000..15b0eec9b Binary files /dev/null and b/docs/hugo/public/favicon/android-chrome-512x512.png differ diff --git a/docs/hugo/public/favicon/android-chrome-72x72.png b/docs/hugo/public/favicon/android-chrome-72x72.png new file mode 100644 index 000000000..d2ea4979f Binary files /dev/null and b/docs/hugo/public/favicon/android-chrome-72x72.png differ diff --git a/docs/hugo/public/favicon/android-chrome-96x96.png b/docs/hugo/public/favicon/android-chrome-96x96.png new file mode 100644 index 000000000..e8417a93f Binary files /dev/null and b/docs/hugo/public/favicon/android-chrome-96x96.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-1024x1024.png b/docs/hugo/public/favicon/apple-touch-icon-1024x1024.png new file mode 100644 index 000000000..b9e01c791 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-1024x1024.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-114x114.png b/docs/hugo/public/favicon/apple-touch-icon-114x114.png new file mode 100644 index 000000000..63a15fcfb Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-114x114.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-120x120.png b/docs/hugo/public/favicon/apple-touch-icon-120x120.png new file mode 100644 index 000000000..523bd06dd Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-120x120.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-144x144.png b/docs/hugo/public/favicon/apple-touch-icon-144x144.png new file mode 100644 index 000000000..95e756a8d Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-144x144.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-152x152.png b/docs/hugo/public/favicon/apple-touch-icon-152x152.png new file mode 100644 index 000000000..b32ded526 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-152x152.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-167x167.png b/docs/hugo/public/favicon/apple-touch-icon-167x167.png new file mode 100644 index 000000000..5ab8d228a Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-167x167.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-180x180.png b/docs/hugo/public/favicon/apple-touch-icon-180x180.png new file mode 100644 index 000000000..dc1d76b2b Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-180x180.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-57x57.png b/docs/hugo/public/favicon/apple-touch-icon-57x57.png new file mode 100644 index 000000000..3207683f9 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-57x57.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-60x60.png b/docs/hugo/public/favicon/apple-touch-icon-60x60.png new file mode 100644 index 000000000..bdd9fc136 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-60x60.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-72x72.png b/docs/hugo/public/favicon/apple-touch-icon-72x72.png new file mode 100644 index 000000000..0e3ff2981 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-72x72.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-76x76.png b/docs/hugo/public/favicon/apple-touch-icon-76x76.png new file mode 100644 index 000000000..50ae753f6 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-76x76.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon-precomposed.png b/docs/hugo/public/favicon/apple-touch-icon-precomposed.png new file mode 100644 index 000000000..dc1d76b2b Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon-precomposed.png differ diff --git a/docs/hugo/public/favicon/apple-touch-icon.png b/docs/hugo/public/favicon/apple-touch-icon.png new file mode 100644 index 000000000..dc1d76b2b Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-icon.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1125x2436.png b/docs/hugo/public/favicon/apple-touch-startup-image-1125x2436.png new file mode 100644 index 000000000..7e7f51837 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1125x2436.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1136x640.png b/docs/hugo/public/favicon/apple-touch-startup-image-1136x640.png new file mode 100644 index 000000000..4de99a6d6 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1136x640.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1170x2532.png b/docs/hugo/public/favicon/apple-touch-startup-image-1170x2532.png new file mode 100644 index 000000000..54d64c9f3 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1170x2532.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1179x2556.png b/docs/hugo/public/favicon/apple-touch-startup-image-1179x2556.png new file mode 100644 index 000000000..090c636a5 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1179x2556.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1242x2208.png b/docs/hugo/public/favicon/apple-touch-startup-image-1242x2208.png new file mode 100644 index 000000000..7bf9fd34b Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1242x2208.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1242x2688.png b/docs/hugo/public/favicon/apple-touch-startup-image-1242x2688.png new file mode 100644 index 000000000..1cb638d1b Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1242x2688.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1284x2778.png b/docs/hugo/public/favicon/apple-touch-startup-image-1284x2778.png new file mode 100644 index 000000000..dba32d713 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1284x2778.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1290x2796.png b/docs/hugo/public/favicon/apple-touch-startup-image-1290x2796.png new file mode 100644 index 000000000..637d5fbda Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1290x2796.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1334x750.png b/docs/hugo/public/favicon/apple-touch-startup-image-1334x750.png new file mode 100644 index 000000000..eca905051 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1334x750.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1488x2266.png b/docs/hugo/public/favicon/apple-touch-startup-image-1488x2266.png new file mode 100644 index 000000000..66a765cd3 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1488x2266.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1536x2048.png b/docs/hugo/public/favicon/apple-touch-startup-image-1536x2048.png new file mode 100644 index 000000000..fd1f29597 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1536x2048.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1620x2160.png b/docs/hugo/public/favicon/apple-touch-startup-image-1620x2160.png new file mode 100644 index 000000000..a16975405 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1620x2160.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1640x2160.png b/docs/hugo/public/favicon/apple-touch-startup-image-1640x2160.png new file mode 100644 index 000000000..842088f9b Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1640x2160.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1668x2224.png b/docs/hugo/public/favicon/apple-touch-startup-image-1668x2224.png new file mode 100644 index 000000000..7f941227e Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1668x2224.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1668x2388.png b/docs/hugo/public/favicon/apple-touch-startup-image-1668x2388.png new file mode 100644 index 000000000..f94a0b99b Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1668x2388.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-1792x828.png b/docs/hugo/public/favicon/apple-touch-startup-image-1792x828.png new file mode 100644 index 000000000..0f7aef7e2 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-1792x828.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2048x1536.png b/docs/hugo/public/favicon/apple-touch-startup-image-2048x1536.png new file mode 100644 index 000000000..b72b34475 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2048x1536.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2048x2732.png b/docs/hugo/public/favicon/apple-touch-startup-image-2048x2732.png new file mode 100644 index 000000000..67f734e1a Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2048x2732.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2160x1620.png b/docs/hugo/public/favicon/apple-touch-startup-image-2160x1620.png new file mode 100644 index 000000000..e4d33b6d6 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2160x1620.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2160x1640.png b/docs/hugo/public/favicon/apple-touch-startup-image-2160x1640.png new file mode 100644 index 000000000..0b9021b68 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2160x1640.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2208x1242.png b/docs/hugo/public/favicon/apple-touch-startup-image-2208x1242.png new file mode 100644 index 000000000..6d6f5629f Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2208x1242.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2224x1668.png b/docs/hugo/public/favicon/apple-touch-startup-image-2224x1668.png new file mode 100644 index 000000000..a60798c86 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2224x1668.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2266x1488.png b/docs/hugo/public/favicon/apple-touch-startup-image-2266x1488.png new file mode 100644 index 000000000..124af1a6c Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2266x1488.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2388x1668.png b/docs/hugo/public/favicon/apple-touch-startup-image-2388x1668.png new file mode 100644 index 000000000..8b48e518a Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2388x1668.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2436x1125.png b/docs/hugo/public/favicon/apple-touch-startup-image-2436x1125.png new file mode 100644 index 000000000..d702d9beb Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2436x1125.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2532x1170.png b/docs/hugo/public/favicon/apple-touch-startup-image-2532x1170.png new file mode 100644 index 000000000..51633de25 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2532x1170.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2556x1179.png b/docs/hugo/public/favicon/apple-touch-startup-image-2556x1179.png new file mode 100644 index 000000000..f208890f9 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2556x1179.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2688x1242.png b/docs/hugo/public/favicon/apple-touch-startup-image-2688x1242.png new file mode 100644 index 000000000..d6cb5cb4a Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2688x1242.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2732x2048.png b/docs/hugo/public/favicon/apple-touch-startup-image-2732x2048.png new file mode 100644 index 000000000..91edc5c1b Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2732x2048.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2778x1284.png b/docs/hugo/public/favicon/apple-touch-startup-image-2778x1284.png new file mode 100644 index 000000000..720caad86 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2778x1284.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-2796x1290.png b/docs/hugo/public/favicon/apple-touch-startup-image-2796x1290.png new file mode 100644 index 000000000..70d689b6c Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-2796x1290.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-640x1136.png b/docs/hugo/public/favicon/apple-touch-startup-image-640x1136.png new file mode 100644 index 000000000..07a85d53e Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-640x1136.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-750x1334.png b/docs/hugo/public/favicon/apple-touch-startup-image-750x1334.png new file mode 100644 index 000000000..f9cf67d9d Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-750x1334.png differ diff --git a/docs/hugo/public/favicon/apple-touch-startup-image-828x1792.png b/docs/hugo/public/favicon/apple-touch-startup-image-828x1792.png new file mode 100644 index 000000000..34f7ff1f2 Binary files /dev/null and b/docs/hugo/public/favicon/apple-touch-startup-image-828x1792.png differ diff --git a/docs/hugo/public/favicon/browserconfig.xml b/docs/hugo/public/favicon/browserconfig.xml new file mode 100644 index 000000000..09446183f --- /dev/null +++ b/docs/hugo/public/favicon/browserconfig.xml @@ -0,0 +1,12 @@ + + + + + + + + + #efefef + + + \ No newline at end of file diff --git a/docs/hugo/public/favicon/favicon-16x16.png b/docs/hugo/public/favicon/favicon-16x16.png new file mode 100644 index 000000000..45c0ba00c Binary files /dev/null and b/docs/hugo/public/favicon/favicon-16x16.png differ diff --git a/docs/hugo/public/favicon/favicon-32x32.png b/docs/hugo/public/favicon/favicon-32x32.png new file mode 100644 index 000000000..4141db3bd Binary files /dev/null and b/docs/hugo/public/favicon/favicon-32x32.png differ diff --git a/docs/hugo/public/favicon/favicon-48x48.png b/docs/hugo/public/favicon/favicon-48x48.png new file mode 100644 index 000000000..3e0b5d49e Binary files /dev/null and b/docs/hugo/public/favicon/favicon-48x48.png differ diff --git a/docs/hugo/public/favicon/favicon.ico b/docs/hugo/public/favicon/favicon.ico new file mode 100644 index 000000000..b9f5118a1 Binary files /dev/null and b/docs/hugo/public/favicon/favicon.ico differ diff --git a/docs/hugo/public/favicon/favicon.svg b/docs/hugo/public/favicon/favicon.svg new file mode 100644 index 000000000..580956369 --- /dev/null +++ b/docs/hugo/public/favicon/favicon.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + diff --git a/docs/hugo/public/favicon/manifest.webmanifest b/docs/hugo/public/favicon/manifest.webmanifest new file mode 100644 index 000000000..b12e07e5e --- /dev/null +++ b/docs/hugo/public/favicon/manifest.webmanifest @@ -0,0 +1,68 @@ +{ + "name": "geekdoc", + "short_name": "geekdoc", + "description": "Hugo theme made for documentation", + "dir": "auto", + "lang": "en-US", + "display": "standalone", + "orientation": "any", + "start_url": "/?homescreen=1", + "background_color": "#efefef", + "theme_color": "#efefef", + "icons": [ + { + "src": "android-chrome-36x36.png", + "sizes": "36x36", + "type": "image/png", + "purpose": "any" + }, + { + "src": "android-chrome-48x48.png", + "sizes": "48x48", + "type": "image/png", + "purpose": "any" + }, + { + "src": "android-chrome-72x72.png", + "sizes": "72x72", + "type": "image/png", + "purpose": "any" + }, + { + "src": "android-chrome-96x96.png", + "sizes": "96x96", + "type": "image/png", + "purpose": "any" + }, + { + "src": "android-chrome-144x144.png", + "sizes": "144x144", + "type": "image/png", + "purpose": "any" + }, + { + "src": "android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any" + }, + { + "src": "android-chrome-256x256.png", + "sizes": "256x256", + "type": "image/png", + "purpose": "any" + }, + { + "src": "android-chrome-384x384.png", + "sizes": "384x384", + "type": "image/png", + "purpose": "any" + }, + { + "src": "android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any" + } + ] +} \ No newline at end of file diff --git a/docs/hugo/public/favicon/mstile-144x144.png b/docs/hugo/public/favicon/mstile-144x144.png new file mode 100644 index 000000000..7cf7b679d Binary files /dev/null and b/docs/hugo/public/favicon/mstile-144x144.png differ diff --git a/docs/hugo/public/favicon/mstile-150x150.png b/docs/hugo/public/favicon/mstile-150x150.png new file mode 100644 index 000000000..fd7440da6 Binary files /dev/null and b/docs/hugo/public/favicon/mstile-150x150.png differ diff --git a/docs/hugo/public/favicon/mstile-310x150.png b/docs/hugo/public/favicon/mstile-310x150.png new file mode 100644 index 000000000..06f3ef955 Binary files /dev/null and b/docs/hugo/public/favicon/mstile-310x150.png differ diff --git a/docs/hugo/public/favicon/mstile-310x310.png b/docs/hugo/public/favicon/mstile-310x310.png new file mode 100644 index 000000000..cb9f77d3c Binary files /dev/null and b/docs/hugo/public/favicon/mstile-310x310.png differ diff --git a/docs/hugo/public/favicon/mstile-70x70.png b/docs/hugo/public/favicon/mstile-70x70.png new file mode 100644 index 000000000..834ee6c70 Binary files /dev/null and b/docs/hugo/public/favicon/mstile-70x70.png differ diff --git a/docs/hugo/public/first_cluster/_index-copy/index.html b/docs/hugo/public/first_cluster/_index-copy/index.html new file mode 100644 index 000000000..1977bbeba --- /dev/null +++ b/docs/hugo/public/first_cluster/_index-copy/index.html @@ -0,0 +1,5504 @@ + + + + + + + + + + + + + Create a Cluster | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Create a Cluster

+
+
+ +

To set up a cluster, the implementation is based on a description, as with the other Kubernetes deplyoments. To do this, the operator uses a document of type postgresql.

+

You can also find the basic minimum specifications for a single-node cluster in our tutorial project on Github

+
+

+ minimal Single-Node Cluster +

+ + + +
+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster-1
+spec:
+  dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.4-1"
+  numberOfInstances: 1
+  postgresql:
+    version: "16"
+  resources:
+    limits:
+      cpu: 500m
+      memory: 500Mi
+    requests:
+      cpu: 500m
+      memory: 500Mi
+  volume:
+    size: 5Gi 
+

Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-16-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit.

+

After some seconds we should see, that the operator creates our cluster based on the declared definitions.

+
kubectl get pods
+-----------------------------------------------------------------------------
+NAME                             | READY  | STATUS           | RESTARTS | AGE
+cluster-1-0                      | 1/1    | Running          | 0        | 50s
+
+

HINT: Here you will find a complete overview of the available options within the cluster manifest.

+
+

+ Use a specific Storageclass +

+ + + +
+
spec:
+  ...
+  volume:
+    size: 5Gi
+    storageClass: default-provisioner
+  ...
+

Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod.

+
+

+ Expanding Volume +

+ + + +
+

The Operator allows to you expand your volume if the storage-System is able to do this.

+
spec:
+  ...
+  volume:
+    size: 10Gi
+    storageClass: default-provisioner
+  ...
+

This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc.

+
kubectl get pvc pgdata-cluster-1-0 -o yaml
+-------------------------------------------------------
+spec:
+  accessModes:
+  - ReadWriteOnce
+  resources:
+    requests:
+      storage: 10Gi
+  storageClassName: crc-csi-hostpath-provisioner
+  volumeMode: Filesystem
+  volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37
+status:
+  accessModes:
+  - ReadWriteOnce
+  capacity:
+    storage: 5Gi
+  phase: Bound
+
+

+ Creating additonal Volumes +

+ + + +
+

The Operator allows you to modify your cluster with additonal Volumes.

+
spec:
+  ...
+  additionalVolumes:
+    - name: empty
+      mountPath: /opt/empty
+      targetContainers:
+        - all
+      volumeSource:
+        emptyDir: {}
+

This example will create an emptyDir and mount it to all Containers inside the Database-Pod.

+
+

+ Specific Settings for aws gp3 Storage +

+ + + +
+

For the gp3 Storage aws you can define more informations

+
  volume:
+    size: 1Gi
+    storageClass: gp3
+    iops: 1000  # for EBS gp3
+    throughput: 250  # in MB/s for EBS gp3
+

The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput AWS docs.

+

To ensure that the settings are updates properly please define the Operator-Configuration ‘storage_resize_mode’ from default to ‘mixed’

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/first_cluster/ha-cluster/index.html b/docs/hugo/public/first_cluster/ha-cluster/index.html new file mode 100644 index 000000000..e40d8ab8c --- /dev/null +++ b/docs/hugo/public/first_cluster/ha-cluster/index.html @@ -0,0 +1,5362 @@ + + + + + + + + + + + + + High-Availability Cluster | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

High-Availability Cluster

+
+
+ +

No more effort is required to create a High-Availablity cluster than for a Single-Node Cluster. Only the Cluster-Manifest needs to be modified slightly. +The difference lies in the object numberOfInstances, which must be set > 1.

+

You can also find the basic minimum specifications for a High-Availability-Cluster cluster in our tutorial project on Github

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/first_cluster/index.html b/docs/hugo/public/first_cluster/index.html new file mode 100644 index 000000000..40e511ea3 --- /dev/null +++ b/docs/hugo/public/first_cluster/index.html @@ -0,0 +1,5235 @@ + + + + + + + + + + + + + Create a Cluster | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Create a Cluster

+
+ +
+

To set up a cluster, the implementation is based on a description, as with the other Kubernetes deplyoments. To do this, the operator uses a document of type postgresql.

+

You can also find the basic minimum specifications for a single-node cluster in our tutorial project on Github

+
+

+ minimal Single-Node Cluster +

+ + + +
+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster-1
+spec:
+  dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1"
+  numberOfInstances: 1
+  postgresql:
+    version: "17"
+  resources:
+    limits:
+      cpu: 500m
+      memory: 500Mi
+    requests:
+      cpu: 500m
+      memory: 500Mi
+  volume:
+    size: 5Gi 
+

Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-17-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit.

+

After some seconds we should see, that the operator creates our cluster based on the declared definitions.

+
kubectl get pods
+-----------------------------------------------------------------------------
+NAME                             | READY  | STATUS           | RESTARTS | AGE
+cluster-1-0                      | 1/1    | Running          | 0        | 50s
+
+ + + + +
+
+
Here you will find a complete overview of the available options within the cluster manifest.
+
+ +
+

+ Use a specific Storageclass +

+ + + +
+
spec:
+  ...
+  volume:
+    size: 5Gi
+    storageClass: default-provisioner
+  ...
+

Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod.

+
+

+ Expanding Volume +

+ + + +
+

The Operator allows to you expand your volume if the storage-System is able to do this.

+
spec:
+  ...
+  volume:
+    size: 10Gi
+    storageClass: default-provisioner
+  ...
+

This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc.

+
kubectl get pvc pgdata-cluster-1-0 -o yaml
+-------------------------------------------------------
+spec:
+  accessModes:
+  - ReadWriteOnce
+  resources:
+    requests:
+      storage: 10Gi
+  storageClassName: crc-csi-hostpath-provisioner
+  volumeMode: Filesystem
+  volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37
+status:
+  accessModes:
+  - ReadWriteOnce
+  capacity:
+    storage: 5Gi
+  phase: Bound
+
+

+ Creating additonal Volumes +

+ + + +
+

The Operator allows you to modify your cluster with additonal Volumes.

+
spec:
+  ...
+  additionalVolumes:
+    - name: empty
+      mountPath: /opt/empty
+      targetContainers:
+        - all
+      volumeSource:
+        emptyDir: {}
+

This example will create an emptyDir and mount it to all Containers inside the Database-Pod.

+
+

+ Specific Settings for aws gp3 Storage +

+ + + +
+

For the gp3 Storage aws you can define more informations

+
  volume:
+    size: 1Gi
+    storageClass: gp3
+    iops: 1000  # for EBS gp3
+    throughput: 250  # in MB/s for EBS gp3
+

The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput AWS docs.

+

To ensure that the settings are updates properly please define the Operator-Configuration ‘storage_resize_mode’ from default to ‘mixed’

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/first_cluster/index.xml b/docs/hugo/public/first_cluster/index.xml new file mode 100644 index 000000000..0ab3329f3 --- /dev/null +++ b/docs/hugo/public/first_cluster/index.xml @@ -0,0 +1,12 @@ + + + + Create a Cluster on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/first_cluster/ + Recent content in Create a Cluster on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/first_cluster/singe-clluster/index.html b/docs/hugo/public/first_cluster/singe-clluster/index.html new file mode 100644 index 000000000..2ecb7d862 --- /dev/null +++ b/docs/hugo/public/first_cluster/singe-clluster/index.html @@ -0,0 +1,5495 @@ + + + + + + + + + + + + + Create a Cluster | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Create a Cluster

+
+
+ +

To set up a cluster, the implementation is based on a description, as with the other Kubernetes deplyoments. To do this, the operator uses a document of type postgresql.

+

You can also find the basic minimum specifications for a single-node cluster in our tutorial project on Github

+
+

+ minimal Single-Node Cluster +

+ + + +
+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster-1
+spec:
+  dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.4-1"
+  numberOfInstances: 1
+  postgresql:
+    version: "16"
+  resources:
+    limits:
+      cpu: 500m
+      memory: 500Mi
+    requests:
+      cpu: 500m
+      memory: 500Mi
+  volume:
+    size: 5Gi 
+

Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-16-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit.

+

After some seconds we should see, that the operator creates our cluster based on the declared definitions.

+
kubectl get pods
+-----------------------------------------------------------------------------
+NAME                             | READY  | STATUS           | RESTARTS | AGE
+cluster-1-0                      | 1/1    | Running          | 0        | 50s
+
+

HINT: Here you will find a complete overview of the available options within the cluster manifest.

+
+

+ Use a specific Storageclass +

+ + + +
+
spec:
+  ...
+  volume:
+    size: 5Gi
+    storageClass: default-provisioner
+  ...
+

Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod.

+
+

+ Expanding Volume +

+ + + +
+

The Operator allows to you expand your volume if the storage-System is able to do this.

+
spec:
+  ...
+  volume:
+    size: 10Gi
+    storageClass: default-provisioner
+  ...
+

This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc.

+
kubectl get pvc pgdata-cluster-1-0 -o yaml
+-------------------------------------------------------
+spec:
+  accessModes:
+  - ReadWriteOnce
+  resources:
+    requests:
+      storage: 10Gi
+  storageClassName: crc-csi-hostpath-provisioner
+  volumeMode: Filesystem
+  volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37
+status:
+  accessModes:
+  - ReadWriteOnce
+  capacity:
+    storage: 5Gi
+  phase: Bound
+
+

+ Creating additonal Volumes +

+ + + +
+

The Operator allows you to modify your cluster with additonal Volumes.

+
spec:
+  ...
+  additionalVolumes:
+    - name: empty
+      mountPath: /opt/empty
+      targetContainers:
+        - all
+      volumeSource:
+        emptyDir: {}
+

This example will create an emptyDir and mount it to all Containers inside the Database-Pod.

+
+

+ Specific Settings for aws gp3 Storage +

+ + + +
+

For the gp3 Storage aws you can define more informations

+
  volume:
+    size: 1Gi
+    storageClass: gp3
+    iops: 1000  # for EBS gp3
+    throughput: 250  # in MB/s for EBS gp3
+

The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput AWS docs.

+

To ensure that the settings are updates properly please define the Operator-Configuration ‘storage_resize_mode’ from default to ‘mixed’

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/first_cluster/singe-cluster/index.html b/docs/hugo/public/first_cluster/singe-cluster/index.html new file mode 100644 index 000000000..2af1d9b3a --- /dev/null +++ b/docs/hugo/public/first_cluster/singe-cluster/index.html @@ -0,0 +1,5427 @@ + + + + + + + + + + + + + Create a Cluster | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Create a Cluster

+
+
+ +

To set up a cluster, the implementation is based on a description, as with the other Kubernetes deplyoments. To do this, the operator uses a document of type postgresql.

+

You can also find the basic minimum specifications for a single-node cluster in our tutorial project on Github

+
+

+ minimal Single-Node Cluster +

+ + + +
+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster-1
+spec:
+  dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-16.4-1"
+  numberOfInstances: 1
+  postgresql:
+    version: "16"
+  resources:
+    limits:
+      cpu: 500m
+      memory: 500Mi
+    requests:
+      cpu: 500m
+      memory: 500Mi
+  volume:
+    size: 5Gi 
+

Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-16-Server. +Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit.

+

After some seconds we should see, that the operator creates our cluster based on the declared definitions.

+
kubectl get pods
+-----------------------------------------------------------------------------
+NAME                             | READY  | STATUS           | RESTARTS | AGE
+cluster-1-0                      | 1/1    | Running          | 0        | 50s
+
+

HINT: Here you will find a complete overview of the available options within the cluster manifest.

+
+

+ Use a specific Storageclass +

+ + + +
+
spec:
+  ...
+  volume:
+    size: 5Gi
+    storageClass: default-provisioner
+  ...
+

Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod.

+
+

+ Expanding Volume +

+ + + +
+

The Operator allows to you expand your volume if the storage-System is able to do this.

+
spec:
+  ...
+  volume:
+    size: 10Gi
+    storageClass: default-provisioner
+  ...
+

This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc.

+
kubectl get pvc pgdata-cluster-1-0 -o yaml
+-------------------------------------------------------
+spec:
+  accessModes:
+  - ReadWriteOnce
+  resources:
+    requests:
+      storage: 10Gi
+  storageClassName: crc-csi-hostpath-provisioner
+  volumeMode: Filesystem
+  volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37
+status:
+  accessModes:
+  - ReadWriteOnce
+  capacity:
+    storage: 5Gi
+  phase: Bound
+
+

+ Creating additonal Volumes +

+ + + +
+

The Operator allows you to modify your cluster with additonal Volumes.

+
spec:
+  ...
+  additionalVolumes:
+    - name: empty
+      mountPath: /opt/empty
+      targetContainers:
+        - all
+      volumeSource:
+        emptyDir: {}
+

This example will create an emptyDir and mount it to all Containers inside the Database-Pod.

+
+

+ Specific Settings for aws gp3 Storage +

+ + + +
+

For the gp3 Storage aws you can define more informations

+
  volume:
+    size: 1Gi
+    storageClass: gp3
+    iops: 1000  # for EBS gp3
+    throughput: 250  # in MB/s for EBS gp3
+

The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput AWS docs.

+

To ensure that the settings are updates properly please define the Operator-Configuration ‘storage_resize_mode’ from default to ‘mixed’

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/fonts/GeekdocIcons.woff b/docs/hugo/public/fonts/GeekdocIcons.woff new file mode 100644 index 000000000..eb6eacacf Binary files /dev/null and b/docs/hugo/public/fonts/GeekdocIcons.woff differ diff --git a/docs/hugo/public/fonts/GeekdocIcons.woff2 b/docs/hugo/public/fonts/GeekdocIcons.woff2 new file mode 100644 index 000000000..9a9d6050e Binary files /dev/null and b/docs/hugo/public/fonts/GeekdocIcons.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_AMS-Regular.woff b/docs/hugo/public/fonts/KaTeX_AMS-Regular.woff new file mode 100644 index 000000000..b804d7b33 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_AMS-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_AMS-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_AMS-Regular.woff2 new file mode 100644 index 000000000..0acaaff03 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_AMS-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Caligraphic-Bold.woff b/docs/hugo/public/fonts/KaTeX_Caligraphic-Bold.woff new file mode 100644 index 000000000..9759710d1 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Caligraphic-Bold.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Caligraphic-Bold.woff2 b/docs/hugo/public/fonts/KaTeX_Caligraphic-Bold.woff2 new file mode 100644 index 000000000..f390922ec Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Caligraphic-Bold.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Caligraphic-Regular.woff b/docs/hugo/public/fonts/KaTeX_Caligraphic-Regular.woff new file mode 100644 index 000000000..9bdd534fd Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Caligraphic-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Caligraphic-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_Caligraphic-Regular.woff2 new file mode 100644 index 000000000..75344a1f9 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Caligraphic-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Fraktur-Bold.woff b/docs/hugo/public/fonts/KaTeX_Fraktur-Bold.woff new file mode 100644 index 000000000..e7730f662 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Fraktur-Bold.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Fraktur-Bold.woff2 b/docs/hugo/public/fonts/KaTeX_Fraktur-Bold.woff2 new file mode 100644 index 000000000..395f28bea Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Fraktur-Bold.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Fraktur-Regular.woff b/docs/hugo/public/fonts/KaTeX_Fraktur-Regular.woff new file mode 100644 index 000000000..acab069f9 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Fraktur-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Fraktur-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_Fraktur-Regular.woff2 new file mode 100644 index 000000000..735f6948d Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Fraktur-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Main-Bold.woff b/docs/hugo/public/fonts/KaTeX_Main-Bold.woff new file mode 100644 index 000000000..f38136ac1 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Main-Bold.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Main-Bold.woff2 b/docs/hugo/public/fonts/KaTeX_Main-Bold.woff2 new file mode 100644 index 000000000..ab2ad21da Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Main-Bold.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Main-BoldItalic.woff b/docs/hugo/public/fonts/KaTeX_Main-BoldItalic.woff new file mode 100644 index 000000000..67807b0bd Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Main-BoldItalic.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Main-BoldItalic.woff2 b/docs/hugo/public/fonts/KaTeX_Main-BoldItalic.woff2 new file mode 100644 index 000000000..5931794de Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Main-BoldItalic.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Main-Italic.woff b/docs/hugo/public/fonts/KaTeX_Main-Italic.woff new file mode 100644 index 000000000..6f43b594b Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Main-Italic.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Main-Italic.woff2 b/docs/hugo/public/fonts/KaTeX_Main-Italic.woff2 new file mode 100644 index 000000000..b50920e13 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Main-Italic.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Main-Regular.woff b/docs/hugo/public/fonts/KaTeX_Main-Regular.woff new file mode 100644 index 000000000..21f581296 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Main-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Main-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_Main-Regular.woff2 new file mode 100644 index 000000000..eb24a7ba2 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Main-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Math-BoldItalic.woff b/docs/hugo/public/fonts/KaTeX_Math-BoldItalic.woff new file mode 100644 index 000000000..0ae390d74 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Math-BoldItalic.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Math-BoldItalic.woff2 b/docs/hugo/public/fonts/KaTeX_Math-BoldItalic.woff2 new file mode 100644 index 000000000..29657023a Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Math-BoldItalic.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Math-Italic.woff b/docs/hugo/public/fonts/KaTeX_Math-Italic.woff new file mode 100644 index 000000000..eb5159d4c Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Math-Italic.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Math-Italic.woff2 b/docs/hugo/public/fonts/KaTeX_Math-Italic.woff2 new file mode 100644 index 000000000..215c143fd Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Math-Italic.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_SansSerif-Bold.woff b/docs/hugo/public/fonts/KaTeX_SansSerif-Bold.woff new file mode 100644 index 000000000..8d47c02d9 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_SansSerif-Bold.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_SansSerif-Bold.woff2 b/docs/hugo/public/fonts/KaTeX_SansSerif-Bold.woff2 new file mode 100644 index 000000000..cfaa3bda5 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_SansSerif-Bold.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_SansSerif-Italic.woff b/docs/hugo/public/fonts/KaTeX_SansSerif-Italic.woff new file mode 100644 index 000000000..7e02df963 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_SansSerif-Italic.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_SansSerif-Italic.woff2 b/docs/hugo/public/fonts/KaTeX_SansSerif-Italic.woff2 new file mode 100644 index 000000000..349c06dc6 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_SansSerif-Italic.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_SansSerif-Regular.woff b/docs/hugo/public/fonts/KaTeX_SansSerif-Regular.woff new file mode 100644 index 000000000..31b84829b Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_SansSerif-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_SansSerif-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_SansSerif-Regular.woff2 new file mode 100644 index 000000000..a90eea85f Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_SansSerif-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Script-Regular.woff b/docs/hugo/public/fonts/KaTeX_Script-Regular.woff new file mode 100644 index 000000000..0e7da821e Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Script-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Script-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_Script-Regular.woff2 new file mode 100644 index 000000000..b3048fc11 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Script-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Size1-Regular.woff b/docs/hugo/public/fonts/KaTeX_Size1-Regular.woff new file mode 100644 index 000000000..7f292d911 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Size1-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Size1-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_Size1-Regular.woff2 new file mode 100644 index 000000000..c5a8462fb Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Size1-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Size2-Regular.woff b/docs/hugo/public/fonts/KaTeX_Size2-Regular.woff new file mode 100644 index 000000000..d241d9be2 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Size2-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Size2-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_Size2-Regular.woff2 new file mode 100644 index 000000000..e1bccfe24 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Size2-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Size3-Regular.woff b/docs/hugo/public/fonts/KaTeX_Size3-Regular.woff new file mode 100644 index 000000000..e6e9b658d Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Size3-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Size3-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_Size3-Regular.woff2 new file mode 100644 index 000000000..249a28662 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Size3-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Size4-Regular.woff b/docs/hugo/public/fonts/KaTeX_Size4-Regular.woff new file mode 100644 index 000000000..e1ec54576 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Size4-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Size4-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_Size4-Regular.woff2 new file mode 100644 index 000000000..680c13085 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Size4-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/KaTeX_Typewriter-Regular.woff b/docs/hugo/public/fonts/KaTeX_Typewriter-Regular.woff new file mode 100644 index 000000000..2432419f2 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Typewriter-Regular.woff differ diff --git a/docs/hugo/public/fonts/KaTeX_Typewriter-Regular.woff2 b/docs/hugo/public/fonts/KaTeX_Typewriter-Regular.woff2 new file mode 100644 index 000000000..771f1af70 Binary files /dev/null and b/docs/hugo/public/fonts/KaTeX_Typewriter-Regular.woff2 differ diff --git a/docs/hugo/public/fonts/LiberationMono.woff b/docs/hugo/public/fonts/LiberationMono.woff new file mode 100644 index 000000000..05f5bd236 Binary files /dev/null and b/docs/hugo/public/fonts/LiberationMono.woff differ diff --git a/docs/hugo/public/fonts/LiberationMono.woff2 b/docs/hugo/public/fonts/LiberationMono.woff2 new file mode 100644 index 000000000..3f4bb0637 Binary files /dev/null and b/docs/hugo/public/fonts/LiberationMono.woff2 differ diff --git a/docs/hugo/public/fonts/LiberationSans-Bold.woff b/docs/hugo/public/fonts/LiberationSans-Bold.woff new file mode 100644 index 000000000..145ed9f7b Binary files /dev/null and b/docs/hugo/public/fonts/LiberationSans-Bold.woff differ diff --git a/docs/hugo/public/fonts/LiberationSans-Bold.woff2 b/docs/hugo/public/fonts/LiberationSans-Bold.woff2 new file mode 100644 index 000000000..b16596740 Binary files /dev/null and b/docs/hugo/public/fonts/LiberationSans-Bold.woff2 differ diff --git a/docs/hugo/public/fonts/LiberationSans-BoldItalic.woff b/docs/hugo/public/fonts/LiberationSans-BoldItalic.woff new file mode 100644 index 000000000..aa4c0c1f5 Binary files /dev/null and b/docs/hugo/public/fonts/LiberationSans-BoldItalic.woff differ diff --git a/docs/hugo/public/fonts/LiberationSans-BoldItalic.woff2 b/docs/hugo/public/fonts/LiberationSans-BoldItalic.woff2 new file mode 100644 index 000000000..081c4d61d Binary files /dev/null and b/docs/hugo/public/fonts/LiberationSans-BoldItalic.woff2 differ diff --git a/docs/hugo/public/fonts/LiberationSans-Italic.woff b/docs/hugo/public/fonts/LiberationSans-Italic.woff new file mode 100644 index 000000000..ebe952e46 Binary files /dev/null and b/docs/hugo/public/fonts/LiberationSans-Italic.woff differ diff --git a/docs/hugo/public/fonts/LiberationSans-Italic.woff2 b/docs/hugo/public/fonts/LiberationSans-Italic.woff2 new file mode 100644 index 000000000..86f6521c0 Binary files /dev/null and b/docs/hugo/public/fonts/LiberationSans-Italic.woff2 differ diff --git a/docs/hugo/public/fonts/LiberationSans.woff b/docs/hugo/public/fonts/LiberationSans.woff new file mode 100644 index 000000000..bb582d51f Binary files /dev/null and b/docs/hugo/public/fonts/LiberationSans.woff differ diff --git a/docs/hugo/public/fonts/LiberationSans.woff2 b/docs/hugo/public/fonts/LiberationSans.woff2 new file mode 100644 index 000000000..796cb17b5 Binary files /dev/null and b/docs/hugo/public/fonts/LiberationSans.woff2 differ diff --git a/docs/hugo/public/fonts/Metropolis.woff b/docs/hugo/public/fonts/Metropolis.woff new file mode 100644 index 000000000..6b1342c2f Binary files /dev/null and b/docs/hugo/public/fonts/Metropolis.woff differ diff --git a/docs/hugo/public/fonts/Metropolis.woff2 b/docs/hugo/public/fonts/Metropolis.woff2 new file mode 100644 index 000000000..d79d50a77 Binary files /dev/null and b/docs/hugo/public/fonts/Metropolis.woff2 differ diff --git a/docs/hugo/public/fonts/Roboto-Bold.ttf b/docs/hugo/public/fonts/Roboto-Bold.ttf new file mode 100644 index 000000000..aaf374d2c Binary files /dev/null and b/docs/hugo/public/fonts/Roboto-Bold.ttf differ diff --git a/docs/hugo/public/fonts/Roboto-Italic.ttf b/docs/hugo/public/fonts/Roboto-Italic.ttf new file mode 100644 index 000000000..f382c6874 Binary files /dev/null and b/docs/hugo/public/fonts/Roboto-Italic.ttf differ diff --git a/docs/hugo/public/fonts/Roboto.ttf b/docs/hugo/public/fonts/Roboto.ttf new file mode 100644 index 000000000..2d116d920 Binary files /dev/null and b/docs/hugo/public/fonts/Roboto.ttf differ diff --git a/docs/hugo/public/fonts/SourceCodePro.ttf b/docs/hugo/public/fonts/SourceCodePro.ttf new file mode 100644 index 000000000..b1fa336cd Binary files /dev/null and b/docs/hugo/public/fonts/SourceCodePro.ttf differ diff --git a/docs/hugo/public/ha_cluster/index.html b/docs/hugo/public/ha_cluster/index.html new file mode 100644 index 000000000..48fbc9cbd --- /dev/null +++ b/docs/hugo/public/ha_cluster/index.html @@ -0,0 +1,5152 @@ + + + + + + + + + + + + + High Availability | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

High Availability

+
+ +
+

High availability (HA) is a critical aspect of running database systems, especially in mission-critical applications where downtime is unacceptable. This section explains why high availability is important for PostgreSQL and how Patroni acts as a solution to ensure HA. +Why High Availability (HA) for PostgreSQL?

+
    +
  1. To minimise downtime: In modern, data-driven applications, downtime can cause significant financial and reputational losses. High availability ensures that the database remains available even in the event of hardware failures or network problems.
  2. +
  3. Data integrity and security: A database failure can lead to data loss or data inconsistencies. High-availability solutions protect against such scenarios through continuous data replication and automatic failover.
  4. +
  5. Scalability and load balancing: HA setups make it possible to distribute the load across multiple nodes, resulting in better performance and faster response times. This is particularly important in environments with high data traffic.
  6. +
  7. Ease of maintenance: By setting up high availability, database maintenance can be performed without interrupting services. Nodes can be maintained incrementally while the database remains available.
  8. +
+
+

+ Patroni - the cluster manager +

+ + + +
+

In our PostgreSQL environment, we use Patroni in the PG containers by default. This has the advantage that even single-node instances basically function as Patroni clusters. This configuration offers several important advantages:

+
    +
  • Easy scalability: by using Patroni in all PG containers, scaling pods up and down is possible at any time. You can easily add additional pods as needed to improve performance or increase capacity, or remove pods to free up resources. This flexibility is particularly useful in dynamic environments where requirements can change quickly.
  • +
  • Automated cluster management: Patroni automatically takes over the management of the cluster. When a new pod is added to an existing cluster, Patroni takes care of setting up the new node itself, including initialising and starting replication. This means you don’t have to perform any manual steps to configure or manage new nodes - Patroni does it all for you automatically.
  • +
  • Seamless integration: As Patroni is active in every PG container by default, you don’t have to worry about compatibility or manual configuration. This makes deployment and maintenance much easier, as all the necessary components are already preconfigured.
  • +
  • Optimisation of resources: Even with a minimal setup (single-node instance), you benefit from the advantages of a Patroni cluster, including the possibility of easy expansion and automatic failover in the event of a failure. This ensures optimal resource utilisation and minimises downtime.
  • +
+
+

+ Upgrade the cluster to high availability +

+ + + +
+

The necessary changes to a high-availability cluster are very limited. +Only the number of desired instances needs to be increased.

+
apiVersion: cpo.opensource.cybertec.at/v1
+kind: postgresql
+metadata:
+  name: cluster-1
+spec:
+  dockerImage: "docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1"
+  numberOfInstances: 2
+  postgresql:
+    version: "17"
+  resources:
+    limits:
+      cpu: 500m
+      memory: 500Mi
+    requests:
+      cpu: 500m
+      memory: 500Mi
+  volume:
+    size: 5Gi 
+

You can either create a new cluster with the document or update an existing cluster with it. +This makes it possible to scale the cluster up and down during operation.

+

The example above will create a HA-Cluster based on two Nodes.

+
kubectl get pods
+-----------------------------------------------------------------------------
+NAME                             | READY  | STATUS           | RESTARTS | AGE
+cluster-1-0                      | 1/1    | Running          | 0        | 3d
+cluster-1-1                      | 1/1    | Running          | 0        | 31s
+
+
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/ha_cluster/index.xml b/docs/hugo/public/ha_cluster/index.xml new file mode 100644 index 000000000..ceaf1b1fa --- /dev/null +++ b/docs/hugo/public/ha_cluster/index.xml @@ -0,0 +1,12 @@ + + + + High Availability on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/ha_cluster/ + Recent content in High Availability on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/images/architecture_cluster_backup_cloud_storage.png b/docs/hugo/public/images/architecture_cluster_backup_cloud_storage.png new file mode 100644 index 000000000..082032dc9 Binary files /dev/null and b/docs/hugo/public/images/architecture_cluster_backup_cloud_storage.png differ diff --git a/docs/hugo/public/images/architecture_cluster_backup_pvc.png b/docs/hugo/public/images/architecture_cluster_backup_pvc.png new file mode 100644 index 000000000..1cdbf5bad Binary files /dev/null and b/docs/hugo/public/images/architecture_cluster_backup_pvc.png differ diff --git a/docs/hugo/public/images/architecture_overview.png b/docs/hugo/public/images/architecture_overview.png new file mode 100644 index 000000000..d51e3c12d Binary files /dev/null and b/docs/hugo/public/images/architecture_overview.png differ diff --git a/docs/hugo/public/images/css/custom.css b/docs/hugo/public/images/css/custom.css new file mode 100644 index 000000000..d1f5fce85 --- /dev/null +++ b/docs/hugo/public/images/css/custom.css @@ -0,0 +1,3 @@ +thead { + background: var(--accent-color-lite); + } \ No newline at end of file diff --git a/docs/hugo/public/images/css/styles.css b/docs/hugo/public/images/css/styles.css new file mode 100644 index 000000000..d1f5fce85 --- /dev/null +++ b/docs/hugo/public/images/css/styles.css @@ -0,0 +1,3 @@ +thead { + background: var(--accent-color-lite); + } \ No newline at end of file diff --git a/docs/hugo/public/images/k8s-entities.png b/docs/hugo/public/images/k8s-entities.png new file mode 100644 index 000000000..7f33924b4 Binary files /dev/null and b/docs/hugo/public/images/k8s-entities.png differ diff --git a/docs/hugo/public/images/multisite-interaction.png b/docs/hugo/public/images/multisite-interaction.png new file mode 100644 index 000000000..10b4c6f1e Binary files /dev/null and b/docs/hugo/public/images/multisite-interaction.png differ diff --git a/docs/hugo/public/img/big-data-circle.svg b/docs/hugo/public/img/big-data-circle.svg new file mode 100644 index 000000000..0a0d875da --- /dev/null +++ b/docs/hugo/public/img/big-data-circle.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/docs/hugo/public/img/geekdoc-stack.svg b/docs/hugo/public/img/geekdoc-stack.svg new file mode 100644 index 000000000..64aebb70c --- /dev/null +++ b/docs/hugo/public/img/geekdoc-stack.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/hugo/public/index.html b/docs/hugo/public/index.html new file mode 100644 index 000000000..e1c51483e --- /dev/null +++ b/docs/hugo/public/index.html @@ -0,0 +1,5040 @@ + + + + + + + + + + + + CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

CPO (CYBERTEC-PG-Operator)

+
+ +
+

Current Release: 0.8.3 (04.04.2025) Release Notes

+ +

CPO (CYBERTEC PG Operator) allows you to create and run PostgreSQL clusters on Kubernetes.

+

The operator reduces your efforts and simplifies the administration of your PostgreSQL clusters so that you can concentrate on other things.

+

The following features characterise our operator:

+
    +
  • Declarative mode of operation
  • +
  • Takes over all the necessary steps for setting up and managing the PG cluster.
  • +
  • Integrated backup solution, automatic backups and very easy restore (snapshot & PITR)
  • +
  • Rolling update procedure for adjustments to the pods and minor updates
  • +
  • Major upgrade with minimum interruption time
  • +
  • Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing
  • +
+

CPO is tested on the following platforms:

+
    +
  • Kubernetes: 1.21 - 1.28
  • +
  • Openshift: 4.8 - 4.13
  • +
  • Rancher
  • +
  • AWS EKS
  • +
  • Azure AKS
  • +
  • Google GKE
  • +
+

Furthermore, CPO is basically executable on any CSCF-certified Kubernetes platform.

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/index.xml b/docs/hugo/public/index.xml new file mode 100644 index 000000000..0f9a402a1 --- /dev/null +++ b/docs/hugo/public/index.xml @@ -0,0 +1,187 @@ + + + + CPO (CYBERTEC-PG-Operator) on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/ + Recent content in CPO (CYBERTEC-PG-Operator) on CYBERTEC-PG-Operator + Hugo + en + Mon, 11 Mar 2024 14:26:51 +0100 + + + Introduction + http://localhost:1313/CYBERTEC-pg-operator/backup/introduction/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/introduction/ + <p>Backups are essential for databases. From broken storage to deployments gone wrong, backups often save the day. Starting with pg_dump, which was released in the late 1990s, to the archiving of WAL files (PostgreSQL 8.0 / 2005) and pg_basebackup (PostgreSQL 9.0 / 2010), PostgreSQL already offers built-in options for backups and restores based on logical and physical backups.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="backups-with-pgbackrest" > Backups with pgBackRest </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/introduction/#backups-with-pgbackrest" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Backups with pgBackRest" aria-label="Anchor to: Backups with pgBackRest" href="#backups-with-pgbackrest"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>CPO relies on <a class="gdoc-markdown__link" href="www.pgbackrest.org" >pgBackRest</a> as its backup solution, a tried-and-tested tool with extensive backup and restore options. The backup is based on two elements:</p> + + + Sidecars + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/sidecars/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/sidecars/ + <p>Starting with the Single-Node-Cluster from the previous section, we want to modify the Instance a bit to see.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="cpu-and-memory" > CPU and Memory </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/sidecars/#cpu-and-memory" class="gdoc-page__anchor clip flex align-center" title="Anchor to: CPU and Memory" aria-label="Anchor to: CPU and Memory" href="#cpu-and-memory"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <pre tabindex="0"><code>spec: resources: limits: cpu: 1000m memory: 500Mi requests: cpu: 500m memory: 500mi </code></pre><p>Based on the ressources-Definiton we&rsquo;re able to modify the reserved Hardware (requests) and the limits, which allows use to consume more than the reserved definitons if the k8s-worker has this hardware available. There are some Restrictions when modifiying the limits-section. Because of the behaviour of Databases we should never define a diff between requests.memory and limits.memory. A Database is after some time using all available Memory, for Cache and other things. Limits are optional and the worker node can force them back. forcing back memory will create big problems inside a database like creating corruption, forcing OutOfMemory-Killer and so on. CPU on the other side is a ressource we can use inside the limits definiton to allow our database using more cpu if needed and available.</p> + + + via Blockstorage (pvc) + http://localhost:1313/CYBERTEC-pg-operator/backup/pvc/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/pvc/ + <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="backups-on-pvc-persistentvolumeclaim" > Backups on PVC (PersistentVolumeClaim) </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/pvc/#backups-on-pvc-persistentvolumeclaim" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Backups on PVC (PersistentVolumeClaim)" aria-label="Anchor to: Backups on PVC (PersistentVolumeClaim)" href="#backups-on-pvc-persistentvolumeclaim"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>When using block storage, the operator creates an additional pod that acts as a repo host. Based on a TLS connection, the repo host obtains the data for the Backup from the current primary of the cluster, which is compressed before being sent. WAL archives are pushed from the primary pod to the repo host.</p> + + + via S3 + http://localhost:1313/CYBERTEC-pg-operator/backup/aws/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/aws/ + <p>This chapter describes the use of pgBackRest in combination with with AWS S3 or S3-compatible storage such as MinIO, Cloudian HyperStore or SwiftStack. It is not absolutely necessary to operate a Kubernetes on the AWS Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.</p> <p>This Chapter will use AWS S3 for the example, the usage of different s3-compatible Storage is similiar.</p> + + + Software-Components + http://localhost:1313/CYBERTEC-pg-operator/architecture/compontens/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/architecture/compontens/ + <p>Various software components are used to operate CPO. This chapter lists the most important components and their respective purposes.</p> <p>Basically, the CPO project focusses on the main tasks of each individual component. This means that each component does what it does best and only that. In addition to reliable operation, this should also ensure efficient development and project management that utilises existing approaches rather than fighting against them.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="1-cybertec-pg-operator" > 1. CYBERTEC-pg-operator </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/architecture/compontens/#1-cybertec-pg-operator" class="gdoc-page__anchor clip flex align-center" title="Anchor to: 1. CYBERTEC-pg-operator" aria-label="Anchor to: 1. CYBERTEC-pg-operator" href="#1-cybertec-pg-operator"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>The CYBERTEC-pg-operator is a Kubernetes operator that automates the operation and management of PostgreSQL databases on Kubernetes clusters. It facilitates the provisioning, scaling, backup and recovery of PostgreSQL clusters and integrates tools such as Patroni and pgBackRest for high availability and backup management.</p> + + + Additional Volumes + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/additional-volumes/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/additional-volumes/ + <pre tabindex="0"><code> additionalVolumes: - name: empty mountPath: /opt/empty targetContainers: - all volumeSource: emptyDir: {} # - name: data # mountPath: /home/postgres/pgdata/partitions # targetContainers: # - postgres # volumeSource: # PersistentVolumeClaim: # claimName: pvc-postgresql-data-partitions # readyOnly: false # - name: conf # mountPath: /etc/telegraf # subPath: telegraf.conf # targetContainers: # - telegraf-sidecar # volumeSource: # configMap: # name: my-config-map </code></pre> + + + via GCS + http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/ + <p>This chapter describes the use of pgBackRest in combination with Google Cloud Storage (gcs). It is not absolutely necessary to operate a Kubernetes on the Google Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.</p> <blockquote class="gdoc-hint important"> <div class="gdoc-hint__title flex align-center"><i class="fa important" title="Important"></i></div> <div class="gdoc-hint__text">Precondition: a gcs-bucket and a priviledged role is needed for this chapter.</div> </blockquote> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="create-a-gcs-bucket-on-the-google-cloud-console" > Create a gcs-bucket on the google cloud console </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/#create-a-gcs-bucket-on-the-google-cloud-console" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Create a gcs-bucket on the google cloud console" aria-label="Anchor to: Create a gcs-bucket on the google cloud console" href="#create-a-gcs-bucket-on-the-google-cloud-console"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="create-a-priviledged-service-role" > Create a priviledged service-role </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/#create-a-priviledged-service-role" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Create a priviledged service-role" aria-label="Anchor to: Create a priviledged service-role" href="#create-a-priviledged-service-role"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="modifying-the-cluster" > Modifying the Cluster </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/#modifying-the-cluster" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Modifying the Cluster" aria-label="Anchor to: Modifying the Cluster" href="#modifying-the-cluster"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>As soon as all requirements are met:</p> + + + Rolling-Updates + http://localhost:1313/CYBERTEC-pg-operator/architecture/rolling_update/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/architecture/rolling_update/ + <p>Whether updating the minor version, changing the hardware definitions of the cluster or other adjustments that require a pod restart, CPO ensures that the update is as uninterrupted as possible.</p> <p>This means that adjustments are carried out on the various pods of a particular cluster one after the other and in a sensible sequence. This happens as soon as a cluster consists of more than 1 PostgreSQL node.</p> <p>In the event of a necessary restart, the operator independently stops the pods and does not leave this to Kubernetes. The idea behind this is that all replica pods are restarted one after the other first. The operator recognises these by the label cpo.opensource.cybertec.at/role=replica set by Patroni</p> + + + via Azure-Blob + http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/ + <p>This chapter describes the use of pgBackRest in combination with Azure Blob Storage. It is not absolutely necessary to operate a Kubernetes on the Azure Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.</p> <blockquote class="gdoc-hint important"> <div class="gdoc-hint__title flex align-center"><i class="fa important" title="Important"></i></div> <div class="gdoc-hint__text">Precondition: a blob-storage-volume and a priviledged role is needed for this chapter.</div> </blockquote> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="create-a-blob-storage-volume-on-the-azure-console" > Create a blob-storage-volume on the Azure console </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/#create-a-blob-storage-volume-on-the-azure-console" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Create a blob-storage-volume on the Azure console" aria-label="Anchor to: Create a blob-storage-volume on the Azure console" href="#create-a-blob-storage-volume-on-the-azure-console"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="create-a-priviledged-service-role" > Create a priviledged service-role </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/#create-a-priviledged-service-role" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Create a priviledged service-role" aria-label="Anchor to: Create a priviledged service-role" href="#create-a-priviledged-service-role"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="modifying-the-cluster" > Modifying the Cluster </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/#modifying-the-cluster" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Modifying the Cluster" aria-label="Anchor to: Modifying the Cluster" href="#modifying-the-cluster"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>As soon as all requirements are met:</p> + + + Encrypted Backups + http://localhost:1313/CYBERTEC-pg-operator/backup/encryption/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/encryption/ + <p>pgBackRest also allows you to encrypt your backups on the client side before uploading them. This is possible with any type of storage and is very easy to activate.</p> <p>Firstly, we need to define an encryption key. This must be specified separately for each repo and stored in the same secret that is defined in the <code>spec.backup.pgbackrest.configuration.secret</code> object.</p> <pre tabindex="0"><code>kind: Secret apiVersion: v1 metadata: name: cluster-1-s3-credential namespace: cpo stringData: s3.conf | [global] repo1-s3-key=YOUR_S3_KEY repo1-s3-key-secret=YOUR_S3_KEY_SECRET repo1-cipher-pass=YOUR_ENCRYPTION_KEY </code></pre><p>We also need to configure the type of encryption for pgBackRest. This is done via the cipher-type parameter, which must also be specified for each repo. You can find the available values for the parameter <a class="gdoc-markdown__link" href="https://pgbackrest.org/configuration.html#section-repository/option-repo-cipher-type" >here</a></p> + + + Check/Monitor Backups + http://localhost:1313/CYBERTEC-pg-operator/backup/check_backups/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/backup/check_backups/ + <p>There are several ways to gain an insight into the current status of pgBackRest. One of these is to use pgBackRest within the container. This can be done both via the repo host and the Postgres pod.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="pgbackrest-via-terminal-repo-host-pod" > pgbackrest via terminal (Repo-Host-Pod) </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/check_backups/#pgbackrest-via-terminal-repo-host-pod" class="gdoc-page__anchor clip flex align-center" title="Anchor to: pgbackrest via terminal (Repo-Host-Pod)" aria-label="Anchor to: pgbackrest via terminal (Repo-Host-Pod)" href="#pgbackrest-via-terminal-repo-host-pod"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <pre tabindex="0"><code>kubectl exec cluster-5-pgbackrest-repo-host-0 --stdin --tty -- pgbackrest info stanza: db status: ok cipher: none db (current) wal archive min/max (16): 00000006000000000000005C/000000070000000000000092 full backup: 20240517-125730F timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00 wal start/stop: 00000007000000000000005E / 00000007000000000000005E database size: 22.9MB, database backup size: 22.9MB repo1: backup set size: 3MB, backup size: 3MB incr backup: 20240517-125730F_20240517-130003I timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00 wal start/stop: 000000070000000000000060 / 000000070000000000000060 database size: 22.9MB, database backup size: 904.3KB repo1: backup set size: 3MB, backup size: 149.4KB backup reference list: 20240517-125730F incr backup: 20240517-125730F_20240517-131503I timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00 wal start/stop: 000000070000000000000062 / 000000070000000000000062 database size: 22.9MB, database backup size: 24.3KB repo1: backup set size: 3MB, backup size: 2.9KB backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I </code></pre><div class="flex align-center gdoc-page__anchorwrap"> <h3 id="pgbackrest-via-terminal-postgres-pod" > pgbackrest via terminal (Postgres-Pod) </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/backup/check_backups/#pgbackrest-via-terminal-postgres-pod" class="gdoc-page__anchor clip flex align-center" title="Anchor to: pgbackrest via terminal (Postgres-Pod)" aria-label="Anchor to: pgbackrest via terminal (Postgres-Pod)" href="#pgbackrest-via-terminal-postgres-pod"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <pre tabindex="0"><code>kubectl exec cluster-5-0 --stdin --tty -- pgbackrest info Defaulted container &#34;postgres&#34; out of: postgres, postgres-exporter, pgbackrest-restore (init) stanza: db status: ok cipher: none db (current) wal archive min/max (16): 00000006000000000000005C/000000070000000000000092 full backup: 20240517-125730F timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00 wal start/stop: 00000007000000000000005E / 00000007000000000000005E database size: 22.9MB, database backup size: 22.9MB repo1: backup set size: 3MB, backup size: 3MB incr backup: 20240517-125730F_20240517-130003I timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00 wal start/stop: 000000070000000000000060 / 000000070000000000000060 database size: 22.9MB, database backup size: 904.3KB repo1: backup set size: 3MB, backup size: 149.4KB backup reference list: 20240517-125730F incr backup: 20240517-125730F_20240517-131503I timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00 wal start/stop: 000000070000000000000062 / 000000070000000000000062 database size: 22.9MB, database backup size: 24.3KB repo1: backup set size: 3MB, backup size: 2.9KB backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I </code></pre><p>There is the &ldquo;normal&rdquo; output, as well as the output format Json, which can be processed directly in the terminal.</p> + + + The Project + http://localhost:1313/CYBERTEC-pg-operator/project/project/ + Mon, 11 Mar 2024 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/project/project/ + <p>The CYBERTEC PostgreSQL Operator (CPO) enables the simple provision and management of PostgreSQL clusters on Kubernetes. It reduces the administration effort and facilitates the management of single-node and HA clusters.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="main-components" > Main components </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/project/project/#main-components" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Main components" aria-label="Anchor to: Main components" href="#main-components"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ul> <li><a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-pg-operator" >CYBERTEC-pg-operator</a>: Kubernetes operator for the automation of PostgreSQL clusters.</li> <li><a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-pg-container" >CYBERTEC-pg-container</a>: Docker container suite for PostgreSQL, Patroni and etcd for the provision of HA clusters.</li> <li><a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials" >CYBERTEC-operator-tutorials</a>: Tutorials and instructions for installing and using the operator.</li> </ul> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="features" > Features </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/project/project/#features" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Features" aria-label="Anchor to: Features" href="#features"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ul> <li>Cluster management: <ul> <li>Single-node and HA (High Availability) clusters via <a class="gdoc-markdown__link" href="https://patroni.readthedocs.io/en/latest/" >Patroni</a></li> <li>Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing</li> <li>Automated failover</li> <li>Live volume resize without pod restarts</li> <li>Basic credential and user management on K8s, eases application deployments</li> <li>Compatible with OpenShift and Rancher</li> </ul> </li> <li>PostgreSQL compatibility: <ul> <li>Supports PostgreSQL versions 13 to 17</li> <li>Inplace upgrades for smooth version changes and minimal downtime</li> <li>Extensive extension support, including pgAudit, TimescaleDB and PostGIS</li> <li>Standby-Cluster</li> </ul> </li> <li>Backup &amp; Restore: <ul> <li>Integrated pgBackRest support</li> <li>Automatic backups</li> <li>Point-in-Time- and Snapshot-based Restores / Disaster Recovery</li> </ul> </li> <li>Connection management: <ul> <li>pgBouncer for connection pooling</li> </ul> </li> <li>Monitoring &amp; alerting stack <ul> <li>Integrated metrics exporter</li> <li>Prometheus, alert manager for metrics collection and alerting</li> <li>Grafana for visual monitoring of the clusters</li> </ul> </li> <li>Operator UI: <ul> <li>Web interface for managing clusters</li> </ul> </li> </ul> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="installation" > Installation </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/project/project/#installation" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Installation" aria-label="Anchor to: Installation" href="#installation"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>Detailed instructions on installation and configuration can be found in the CYBERTEC operator tutorials and in the following chapters Example of installation via Helm:</p> + + + Container Images + http://localhost:1313/CYBERTEC-pg-operator/project/container_images/ + Mon, 11 Mar 2024 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/project/container_images/ + <p>For each version of the operator and the required PostgreSQL and other required containers, the corresponding image is provided on Dockerhub.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="operator-container-images" > Operator container images </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/project/container_images/#operator-container-images" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Operator container images" aria-label="Anchor to: Operator container images" href="#operator-container-images"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>The operator images are the central components that control the operation and administration of the PostgreSQL databases. These images are available in the following repository on DockerHub:</p> + + + PostgreSQL + http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/ + <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="crd-for-kind-postgresql" > CRD for kind postgresql </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#crd-for-kind-postgresql" class="gdoc-page__anchor clip flex align-center" title="Anchor to: CRD for kind postgresql" aria-label="Anchor to: CRD for kind postgresql" href="#crd-for-kind-postgresql"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>apiVersion</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">acid.zalando.do/v1</td> </tr> <tr> <td>kind</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>metadata</td> <td style="text-align: center">object</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#spec" >spec</a></td> <td style="text-align: center">object</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#status" >status</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> </tbody> </table> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="spec" > spec </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#spec" class="gdoc-page__anchor clip flex align-center" title="Anchor to: spec" aria-label="Anchor to: spec" href="#spec"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td><a class="gdoc-markdown__link" href="#additionalvolumes" >additionalVolumes</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">List of additional volumes to mount in each container of the statefulset pod</td> </tr> <tr> <td>allowedSourceRanges</td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">The corresponding load balancer is accessible only to the networks defined by this parameter</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#backup" >backup</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a customised backup solution for the cluster</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#clone" >clone</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Defines the clone-target for the Cluster</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#connectionpooler" >connectionPooler</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Defines the configuration and settings for every type of a connectionPoolers (Primary and Replica).</td> </tr> <tr> <td>databases</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Defines the name of the database, they are created by the operator. See <a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/configure_users_and_databases" >tutorial</a></td> </tr> <tr> <td>dockerImage</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Defines the used PostgreSQL-Container-Image for this cluster</td> </tr> <tr> <td>enableLogicalBackup</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Enable logical Backups for this Cluster (Stored on S3) - s3-configuration for Operator is needed (Not for pgBackRest)</td> </tr> <tr> <td>enableConnectionPooler</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">creates a ConnectionPooler for the primary Pod</td> </tr> <tr> <td>enableReplicaConnectionPooler</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">creates a ConnectionPooler for the replica Pods</td> </tr> <tr> <td>enableMasterLoadBalancer</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Define whether to enable the load balancer pointing to the Postgres primary</td> </tr> <tr> <td>enableReplicaLoadBalancer</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Define whether to enable the load balancer pointing to the Postgres replicas</td> </tr> <tr> <td>enableMasterPoolerLoadBalancer</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Define whether to enable the load balancer pointing to the primary ConnectionPooler</td> </tr> <tr> <td>enableReplicaPoolerLoadBalancer</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Define whether to enable the load balancer pointing to the Replica-ConnectionPooler</td> </tr> <tr> <td>enableShmVolume</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Start a database pod without limitations on shm memory. By default Docker limit /dev/shm to 64M (see e.g. the docker issue, which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is true, to the target database pod will be mounted a new tmpfs volume to remove this limitation.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#env" >env</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Allows to add own Envs to the PostgreSQL containers</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#initcontainers" >initContainers</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of init-containers</td> </tr> <tr> <td>logicalBackupSchedule</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the scheduling of logical backups based on cron-syntax. Example: <code>30 00 * * *</code></td> </tr> <tr> <td>maintenanceWindows</td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of maintenance windows for the cluster. Example: <code>Sat:00:00-04:00</code></td> </tr> <tr> <td>masterServiceAnnotations</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of annotations for the Primary Service</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#monitor" >monitor</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables monitoring on the basis of the defined image</td> </tr> <tr> <td>nodeAffinity</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables overwriting of the nodeAffinity</td> </tr> <tr> <td>numberOfInstances</td> <td style="text-align: center">int</td> <td style="text-align: right">true</td> <td style="text-align: right">Number of nodes of the cluster</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#patroni" >patroni</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the customisation of patroni settings</td> </tr> <tr> <td>podPriorityClassName</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">a name of the priority class that should be assigned to the cluster pods. If not set then the default priority class is taken. The priority class itself must be defined in advance</td> </tr> <tr> <td>podAnnotations</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">A map of key value pairs that gets attached as annotations to each pod created for the database.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#postgresql" >postgresql</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the customisation of PostgreSQL settings and parameters</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#prepareddatabases" >preparedDatabases</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Allows you to define databases including owner, schemas and extension and have the operator generate them. item See <a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/prepared_databases" >tutorial</a></td> </tr> <tr> <td>replicaServiceAnnotations</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of annotations for the Replica Service</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#resources" >resources</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">CPU &amp; Memory (Limit &amp; Request) definition for the Postgres container</td> </tr> <tr> <td>ServiceAnnotations</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">A map of key value pairs that gets attached as annotations to each Service created for the database.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#sidecars" >sidecars</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of custom sidecars</td> </tr> <tr> <td>spiloFSGroup</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">the Persistent Volumes for the Spilo pods in the StatefulSet will be owned and writable by the group ID specified. This will override the spilo_fsgroup operator parameter</td> </tr> <tr> <td>spiloRunAsGroup</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">sets the group ID which should be used in the container to run the process.</td> </tr> <tr> <td>spiloRunAsUser</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Sets the user ID which should be used in the container to run the process. This must be set to run the container without root.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#standby" >standby</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the creation of a standby cluster at the time of the creation of a new cluster</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#streams" >streams</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables change data capture streams for defined database tables</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#tde" >tde</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the activation of TDE if a new cluster is created</td> </tr> <tr> <td>teamId</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">name of the team the cluster belongs to. Will be removed soon</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#tls" >tls</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Custom TLS certificate</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#tolerations" >tolerations</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">a list of tolerations that apply to the cluster pods. Each element of that list is a dictionary with the following fields:</td> </tr> <tr> <td>key, operator, value, effect and tolerationSeconds</td> <td></td> <td></td> <td></td> </tr> <tr> <td><a class="gdoc-markdown__link" href="https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/" >topologySpreadConstraints</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a topologySpreadConstraint. See <a class="gdoc-markdown__link" href="https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/" >K8s-Documentation</a></td> </tr> <tr> <td>users</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">a map of usernames to user flags for the users that should be created in the cluster by the operator. See <a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/tree/main/cluster-tutorials/configure_users_and_databases" >tutorial</a></td> </tr> <tr> <td>usersWithSecretRotation</td> <td style="text-align: center">list</td> <td style="text-align: right">false</td> <td style="text-align: right">list of users to enable credential rotation in K8s secrets. The rotation interval can only be configured globally.</td> </tr> <tr> <td>usersWithInPlaceSecretRotation</td> <td style="text-align: center">list</td> <td style="text-align: right">false</td> <td style="text-align: right">list of users to enable in-place password rotation in K8s secrets. The rotation interval can only be configured globally.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#volume" >volume</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">define the properties of the persistent storage that stores Postgres data</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="additionalvolumes" > additionalVolumes </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#additionalvolumes" class="gdoc-page__anchor clip flex align-center" title="Anchor to: additionalVolumes" aria-label="Anchor to: additionalVolumes" href="#additionalvolumes"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>mountPath</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>targetContainers</td> <td style="text-align: center">array</td> <td style="text-align: right">true</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>subPath</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>isSubPathExpr</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#volumeSource" >volumeSource</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="backup" > backup </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#backup" class="gdoc-page__anchor clip flex align-center" title="Anchor to: backup" aria-label="Anchor to: backup" href="#backup"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td><a class="gdoc-markdown__link" href="#pgbackrest" >pgbackrest</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="clone" > clone </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#clone" class="gdoc-page__anchor clip flex align-center" title="Anchor to: clone" aria-label="Anchor to: clone" href="#clone"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>cluster</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name of the cluster to be cloned. Random value if the cluster does not exist locally.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#pgbackrest" >pgbackrest</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="connectionpooler" > connectionPooler </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#connectionpooler" class="gdoc-page__anchor clip flex align-center" title="Anchor to: connectionPooler" aria-label="Anchor to: connectionPooler" href="#connectionpooler"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>numberOfInstances</td> <td style="text-align: center">int</td> <td style="text-align: right">true</td> <td style="text-align: right">Number of Pods per Pooler</td> </tr> <tr> <td>mode</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">pooling mode for pgBouncer (session, transaction, statement)</td> </tr> <tr> <td>schema</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Schema for Pooler (Default: pooler)</td> </tr> <tr> <td>user</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Username for Pooler (Default: pooler)</td> </tr> <tr> <td>maxDBConnections</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">maxConnections to the DB-Pod(s)</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#resources" >resources</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">CPU &amp; Memory (Limit &amp; Request) definition for the Pooler</td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="hahahugoshortcode50s4hbhb" > <a href="javascript:history.back()">⬅ Back to Parent</a> </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#hahahugoshortcode50s4hbhb" class="gdoc-page__anchor clip flex align-center" title="Anchor to: <a href="javascript:history.back()">⬅ Back to Parent</a>" aria-label="Anchor to: <a href="javascript:history.back()">⬅ Back to Parent</a>" href="#hahahugoshortcode50s4hbhb"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="env" > env </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#env" class="gdoc-page__anchor clip flex align-center" title="Anchor to: env" aria-label="Anchor to: env" href="#env"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Keyfield for the ENV-Entry</td> </tr> <tr> <td>value</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Valuefield for the ENV-Entry</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="initcontainers" > initContainers </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#initcontainers" class="gdoc-page__anchor clip flex align-center" title="Anchor to: initContainers" aria-label="Anchor to: initContainers" href="#initcontainers"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name for the container</td> </tr> <tr> <td>image</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Docker-Image for container</td> </tr> <tr> <td>command</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">to override CMD inside the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#env" >env</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Allows to add own Envs to the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#resources" >resources</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">CPU &amp; Memory (Limit &amp; Request) definition for the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="ports" >ports</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Define open ports for the container</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="monitor" > monitor </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#monitor" class="gdoc-page__anchor clip flex align-center" title="Anchor to: monitor" aria-label="Anchor to: monitor" href="#monitor"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>image</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Docker-Image for the metric exporter</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="patroni" > patroni </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#patroni" class="gdoc-page__anchor clip flex align-center" title="Anchor to: patroni" aria-label="Anchor to: patroni" href="#patroni"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>failsafe_mode</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni failsafe_mode parameter value. See the <a class="gdoc-markdown__link" href="https://patroni.readthedocs.io/en/master/dcs_failsafe_mode.html" >Patroni documentation</a> for more details.</td> </tr> <tr> <td>initdb</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">a map of key-value pairs describing initdb parameters</td> </tr> <tr> <td>loop_wait</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>loop_wait</code> parameter value, optional. The default is set by the PostgreSQL image.</td> </tr> <tr> <td>maximum_lag_on_failover</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>maximum_lag_on_failover</code> parameter value, optional. The default is set by the PostgreSQL image.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#multisite" >multisite</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Multisite configuration - Check the <a class="gdoc-markdown__link" href="CYBERTEC-pg-operator/multisite/" >Documentation</a> first</td> </tr> <tr> <td>pg_hba</td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">list of custom pg_hba lines to replace default ones. One entry per item (example: - hostssl all all 0.0.0.0/0 scram-sha-256)</td> </tr> <tr> <td>retry_timeout</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>retry_timeout</code> parameter value, optional. The default is set by the PostgreSQL image.</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#slots" >slots</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">permanent replication slots that Patroni preserves after failover by re-creating them on the new primary immediately. after doing a promote. Use preferred slot-name as map-item</td> </tr> <tr> <td>synchronous_mode</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">DPatroni <code>synchronous_mode</code> parameter value, optional. The default is false.</td> </tr> <tr> <td>synchronous_mode_strict</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>synchronous_mode_strict</code> parameter value, optional. The default is false.</td> </tr> <tr> <td>synchronous_node_count</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>synchronous_node_count</code> parameter value, optional. The default is set to 1. Only used if <code>synchronous_mode_strict</code> is true</td> </tr> <tr> <td>ttl</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Patroni <code>ttl</code> parameter value, optional. The default is set by the PostgreSQL image.</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="postgresql" > PostgreSQL </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#postgresql" class="gdoc-page__anchor clip flex align-center" title="Anchor to: PostgreSQL" aria-label="Anchor to: PostgreSQL" href="#postgresql"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>parameters</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">PostgreSQL-Parameter as item (Example: max_connections: &ldquo;100&rdquo;). For help check out the <a class="gdoc-markdown__link" href="https://pgconfigurator.cybertec.at" >CYBERTEC PostgreSQL Configurator</a></td> </tr> <tr> <td>version</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">a map of key-value pairs describing initdb parameters</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="prepareddatabases" > preparedDatabases </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#prepareddatabases" class="gdoc-page__anchor clip flex align-center" title="Anchor to: preparedDatabases" aria-label="Anchor to: preparedDatabases" href="#prepareddatabases"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>defaultUsers</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Creates roles with <code>LOGIN</code> permission and <code>_user</code>suffix. Default: false</td> </tr> <tr> <td>extensions</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Includes the Extensions as items (key:value). Key is the Name of the Extension and value the schema. Example: pgcrypto: public</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#schemas" >schemas</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">Includes the schemanames as items.</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="resources" > resources </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#resources" class="gdoc-page__anchor clip flex align-center" title="Anchor to: resources" aria-label="Anchor to: resources" href="#resources"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td><a class="gdoc-markdown__link" href="#requests" >requests</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">cpu and memory definitons (request.cpu / request.memory)</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#limits" >limits</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">cpu and memory definitons (limits.cpu / limits.memory)</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="sidecars" > sidecars </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#sidecars" class="gdoc-page__anchor clip flex align-center" title="Anchor to: sidecars" aria-label="Anchor to: sidecars" href="#sidecars"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name for the container</td> </tr> <tr> <td>image</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Docker-Image for container</td> </tr> <tr> <td>command</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">to override CMD inside the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#env" >env</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Allows to add own Envs to the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#resources" >resources</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">CPU &amp; Memory (Limit &amp; Request) definition for the container</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="ports" >ports</a></td> <td style="text-align: center">array</td> <td style="text-align: right">false</td> <td style="text-align: right">Define open ports for the container</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="standby" > standby </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#standby" class="gdoc-page__anchor clip flex align-center" title="Anchor to: standby" aria-label="Anchor to: standby" href="#standby"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>standby_host</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Endpoint of the primary cluster</td> </tr> <tr> <td>standby_port</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">PostgreSQL port of the primary cluster</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="streams" > streams </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#streams" class="gdoc-page__anchor clip flex align-center" title="Anchor to: streams" aria-label="Anchor to: streams" href="#streams"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>applicationId</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">The application name to which the database and CDC belongs to.</td> </tr> <tr> <td>database</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name of the database from where events will be published via Postgres&rsquo; logical decoding feature.</td> </tr> <tr> <td>tables</td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">Defines a map of table names and their properties (eventType, idColumn and payloadColumn).</td> </tr> <tr> <td>batchSize</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Defines the size of batches in which events are consumed. Defaults to 1</td> </tr> <tr> <td>enableRecovery</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Flag to enable a dead letter queue recovery for all streams tables.</td> </tr> <tr> <td>filter</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Streamed events can be filtered by a jsonpath expression for each table.</td> </tr> <tr> <td>standby_port</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">PostgreSQL port of the primary cluster</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="tde" > tde </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#tde" class="gdoc-page__anchor clip flex align-center" title="Anchor to: tde" aria-label="Anchor to: tde" href="#tde"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>enable</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right">enable TDE during initDB</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="tolerations" > tolerations </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#tolerations" class="gdoc-page__anchor clip flex align-center" title="Anchor to: tolerations" aria-label="Anchor to: tolerations" href="#tolerations"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>key</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Key for the taint attribute of the node</td> </tr> <tr> <td>operator</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Comparison operator (Equal or Exists).</td> </tr> <tr> <td>value</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Value of the taint (only relevant for ‘Equal’).</td> </tr> <tr> <td>effect</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Specifies how the node handles the pod (NoExecute, NoSchedule, PreferNoSchedule)</td> </tr> <tr> <td>tolerationSeconds</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">Specifies how long the pod tolerates the taint (only for NoExecute).</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="volume" > volume </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#volume" class="gdoc-page__anchor clip flex align-center" title="Anchor to: volume" aria-label="Anchor to: volume" href="#volume"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>size</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">the size of the target volume. Usual Kubernetes size modifiers, i.e. Gi or Mi, apply</td> </tr> <tr> <td>storageClass</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">the name of the Kubernetes storage class to draw the persistent volume from. If empty K8s will choose the default StorageClass</td> </tr> <tr> <td>subPath</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Subpath to use when mounting volume into PostgreSQL container.</td> </tr> <tr> <td>iops</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">When running the operator on AWS the latest generation of EBS volumes (gp3) allows for configuring the number of IOPS. Maximum is 16000</td> </tr> <tr> <td>throughput</td> <td style="text-align: center">int</td> <td style="text-align: right">false</td> <td style="text-align: right">When running the operator on AWS the latest generation of EBS volumes (gp3) allows for configuring the throughput in MB/s. Maximum is 1000</td> </tr> <tr> <td>selector</td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">A label query over PVs to consider for binding. See the <a class="gdoc-markdown__link" href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" >Kubernetes documentation</a> for details on using matchLabels and matchExpressions</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="volumesource" > volumeSource </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#volumesource" class="gdoc-page__anchor clip flex align-center" title="Anchor to: volumeSource" aria-label="Anchor to: volumeSource" href="#volumesource"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>emptyDir</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">emptyDir: {}</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#volumeSource-PersistentVolumeClaim" >PersistentVolumeClaim</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">PersistentVolumeClaim-Objekt</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#volumeSource-configMap" >configMap</a></td> <td style="text-align: center">map</td> <td style="text-align: right">false</td> <td style="text-align: right">configMap-Objekt</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="volumesource-persistentvolumeclaim" > volumeSource-PersistentVolumeClaim </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#volumesource-persistentvolumeclaim" class="gdoc-page__anchor clip flex align-center" title="Anchor to: volumeSource-PersistentVolumeClaim" aria-label="Anchor to: volumeSource-PersistentVolumeClaim" href="#volumesource-persistentvolumeclaim"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>claimName</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name of the PersistentVolumeClaim</td> </tr> <tr> <td>readyOnly</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">PersistentVolumeClaim-Objekt</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="volumesource-configmap" > volumeSource-configMap </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#volumesource-configmap" class="gdoc-page__anchor clip flex align-center" title="Anchor to: volumeSource-configMap" aria-label="Anchor to: volumeSource-configMap" href="#volumesource-configmap"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name of the Configmap</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="multisite" > multisite </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#multisite" class="gdoc-page__anchor clip flex align-center" title="Anchor to: multisite" aria-label="Anchor to: multisite" href="#multisite"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>enable</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right">Enable multisite-feature</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#etcd" >etcd</a></td> <td style="text-align: center">map</td> <td style="text-align: right">true</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>retry_timeout</td> <td style="text-align: center">int</td> <td style="text-align: right">true</td> <td style="text-align: right">Patroni <code>retry_timeout</code> parameter value for the global etcd, optional. The default is set by the PostgreSQL image.</td> </tr> <tr> <td>site</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name for the site of this cluster</td> </tr> <tr> <td>ttl</td> <td style="text-align: center">int</td> <td style="text-align: right">true</td> <td style="text-align: right">Patroni <code>ttl</code> parameter value for the global etcd, optional. The default is set by the PostgreSQL image.</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="slots" > slots </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#slots" class="gdoc-page__anchor clip flex align-center" title="Anchor to: slots" aria-label="Anchor to: slots" href="#slots"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>type</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Slot-Type (<code>physical</code> or <code>logical</code>)</td> </tr> <tr> <td>database</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Databasename - for logical replication only</td> </tr> <tr> <td>plugin</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Plugin - for logical replication only</td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="hahahugoshortcode50s22hbhb" > <a href="javascript:history.back()">⬅ Back to Parent</a> </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#hahahugoshortcode50s22hbhb" class="gdoc-page__anchor clip flex align-center" title="Anchor to: <a href="javascript:history.back()">⬅ Back to Parent</a>" aria-label="Anchor to: <a href="javascript:history.back()">⬅ Back to Parent</a>" href="#hahahugoshortcode50s22hbhb"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="schemas" > schemas </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#schemas" class="gdoc-page__anchor clip flex align-center" title="Anchor to: schemas" aria-label="Anchor to: schemas" href="#schemas"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>defaultRoles</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Creates schema exclusiv roles with <code>NOLOGIN</code> permission and <code>_user</code>suffix Default: true</td> </tr> <tr> <td>defaultUsers</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">Creates schema exclusiv roles with <code>LOGIN</code> permission and <code>_user</code>suffix Default: false</td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="etcd" > etcd </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#etcd" class="gdoc-page__anchor clip flex align-center" title="Anchor to: etcd" aria-label="Anchor to: etcd" href="#etcd"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>hosts</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">list of etcd hosts, including etcd-client-port (default: <code>2379</code>), comma separated like in the etcd config</td> </tr> <tr> <td>password</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Password for the global etcd</td> </tr> <tr> <td>protocol</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Protocol for the global etcd (http or https)</td> </tr> <tr> <td>user</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Username for the global etcd</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="requests" > requests </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#requests" class="gdoc-page__anchor clip flex align-center" title="Anchor to: requests" aria-label="Anchor to: requests" href="#requests"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>cpu</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">cpu definitons Example: 1000m</td> </tr> <tr> <td>memory</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">memory definitons Example: 1000Mi</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="limits" > limits </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#limits" class="gdoc-page__anchor clip flex align-center" title="Anchor to: limits" aria-label="Anchor to: limits" href="#limits"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>cpu</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">cpu definitons Example: 1000m</td> </tr> <tr> <td>memory</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">memory definitons Example: 1000Mi</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="pgbackrest" > pgbackrest </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#pgbackrest" class="gdoc-page__anchor clip flex align-center" title="Anchor to: pgbackrest" aria-label="Anchor to: pgbackrest" href="#pgbackrest"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td><a class="gdoc-markdown__link" href="#configuration" >configuration</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Enables the definition of a pgbackrest-setup for the cluster</td> </tr> <tr> <td>global</td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>image</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#repos" >repos</a></td> <td style="text-align: center">array</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#resources" >resources</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">CPU &amp; Memory (Limit &amp; Request) definition for the pgBackRest container</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="configuration" > configuration </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#configuration" class="gdoc-page__anchor clip flex align-center" title="Anchor to: configuration" aria-label="Anchor to: configuration" href="#configuration"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>secret</td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Secretname with the contained S3 credentials (AccessKey &amp; SecretAccessKey) (Note: must be placed in the same namespace as the cluster)</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#protection" >protection</a></td> <td style="text-align: center">object</td> <td style="text-align: right">false</td> <td style="text-align: right">Enable Protection-Options</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="protection" > protection </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#protection" class="gdoc-page__anchor clip flex align-center" title="Anchor to: protection" aria-label="Anchor to: protection" href="#protection"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>restore</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right">A restore is ignored as long as this option is set to true.</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="repos" > repos </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#repos" class="gdoc-page__anchor clip flex align-center" title="Anchor to: repos" aria-label="Anchor to: repos" href="#repos"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>name</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Name of the repository Required:Repo[1-4]</td> </tr> <tr> <td>storage</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Defines the used backup-storage (Choose from List: pvc,s3,blob,gcs)</td> </tr> <tr> <td>resource</td> <td style="text-align: center">string</td> <td style="text-align: right">true</td> <td style="text-align: right">Bucket-/Instance-/Storage- or PVC-Name</td> </tr> <tr> <td>endpoint</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">The Endpoint for the choosen Storage (Not required for local storage)</td> </tr> <tr> <td>region</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Region for the choosen Storage (S3 only)</td> </tr> <tr> <td><a class="gdoc-markdown__link" href="#schedule" >schedule</a></td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Object for defining automatic backups</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="schedule" > schedule </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#schedule" class="gdoc-page__anchor clip flex align-center" title="Anchor to: schedule" aria-label="Anchor to: schedule" href="#schedule"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>full</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">(Cron-Syntax) Define full backup</td> </tr> <tr> <td>incr</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">(Cron-Syntax) Define incremental backup</td> </tr> <tr> <td>diff</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">(Cron-Syntax) Define differential backup</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> <hr> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="status" > status </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/#status" class="gdoc-page__anchor clip flex align-center" title="Anchor to: status" aria-label="Anchor to: status" href="#status"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">required</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>PostgresClusterStatus</td> <td style="text-align: center">string</td> <td style="text-align: right">false</td> <td style="text-align: right">Shows the cluster status. Filled by the Operator</td> </tr> </tbody> </table> <a href="javascript:history.back()">⬅ Back to Parent</a> + + + Operator-Configuration + http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/ + <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">default</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>enable_crd_registration</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>crd_categories</td> <td style="text-align: center">string</td> <td style="text-align: right">all</td> <td style="text-align: right"></td> </tr> <tr> <td>enable_lazy_spilo_upgrade</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>enable_pgversion_env_var</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>enable_spilo_wal_path_combat</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>etcd_host</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>kubernetes_use_configmaps</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>docker_image</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>sidecars</td> <td style="text-align: center">list</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_shm_volume</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>workers</td> <td style="text-align: center">int</td> <td style="text-align: right">8</td> <td style="text-align: right"></td> </tr> <tr> <td>max_instances</td> <td style="text-align: center">int</td> <td style="text-align: right">-1</td> <td style="text-align: right"></td> </tr> <tr> <td>min_instances</td> <td style="text-align: center">int</td> <td style="text-align: right">-1</td> <td style="text-align: right"></td> </tr> <tr> <td>resync_period</td> <td style="text-align: center">string</td> <td style="text-align: right">30m</td> <td style="text-align: right"></td> </tr> <tr> <td>repair_period</td> <td style="text-align: center">string</td> <td style="text-align: right">5m</td> <td style="text-align: right"></td> </tr> <tr> <td>set_memory_request_to_limit</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>debug_logging</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>enable_db_access</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>spilo_privileged</td> <td style="text-align: center">boolean</td> <td style="text-align: right">false</td> <td style="text-align: right"></td> </tr> <tr> <td>spilo_allow_privilege_escalation</td> <td style="text-align: center">boolean</td> <td style="text-align: right">true</td> <td style="text-align: right"></td> </tr> <tr> <td>watched_namespace</td> <td style="text-align: center">string</td> <td style="text-align: right">*</td> <td style="text-align: right"></td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="major-upgrade-specific" > major-upgrade-specific </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/#major-upgrade-specific" class="gdoc-page__anchor clip flex align-center" title="Anchor to: major-upgrade-specific" aria-label="Anchor to: major-upgrade-specific" href="#major-upgrade-specific"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">default</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>major_version_upgrade_mode</td> <td style="text-align: center">string</td> <td style="text-align: right">off</td> <td style="text-align: right"></td> </tr> <tr> <td>major_version_upgrade_team_allow_list</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>minimal_major_version</td> <td style="text-align: center">string</td> <td style="text-align: right">9.6</td> <td style="text-align: right"></td> </tr> <tr> <td>target_major_version</td> <td style="text-align: center">string</td> <td style="text-align: right">14</td> <td style="text-align: right"></td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="aws-specific" > aws-specific </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/#aws-specific" class="gdoc-page__anchor clip flex align-center" title="Anchor to: aws-specific" aria-label="Anchor to: aws-specific" href="#aws-specific"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">default</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>wal_s3_bucket</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>log_s3_bucket</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>kube_iam_role</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>aws_region</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>additional_secret_mount</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>additional_secret_mount_path</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_ebs_gp3_migration</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_ebs_gp3_migration_max_size</td> <td style="text-align: center">int</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="logical-backup-specific" > logical-backup-specific </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/#logical-backup-specific" class="gdoc-page__anchor clip flex align-center" title="Anchor to: logical-backup-specific" aria-label="Anchor to: logical-backup-specific" href="#logical-backup-specific"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">default</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>logical_backup_docker_image</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_google_application_credentials</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_job_prefix</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_provider</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_access_key_id</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_bucket</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_endpoint</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_region</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_secret_access_key</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_sse</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_s3_retention_time</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>logical_backup_schedule</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right">(Cron-Syntax)</td> </tr> </tbody> </table> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="team-api-specific" > team-api-specific </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/#team-api-specific" class="gdoc-page__anchor clip flex align-center" title="Anchor to: team-api-specific" aria-label="Anchor to: team-api-specific" href="#team-api-specific"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <table> <thead> <tr> <th>Name</th> <th style="text-align: center">Type</th> <th style="text-align: right">default</th> <th style="text-align: right">Description</th> </tr> </thead> <tbody> <tr> <td>enable_teams_api</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>teams_api_url</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>teams_api_role_configuration</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_team_superuser</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>team_admin_role</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_admin_role_for_users</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>pam_role_name</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>pam_configuration</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>protected_role_names</td> <td style="text-align: center">list</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>postgres_superuser_teams</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>role_deletion_suffix</td> <td style="text-align: center">string</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_team_member_deprecation</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_postgres_team_crd</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_postgres_team_crd_superusers</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> <tr> <td>enable_team_id_clustername_prefix</td> <td style="text-align: center">boolean</td> <td style="text-align: right"></td> <td style="text-align: right"></td> </tr> </tbody> </table> + + + Setup local Kubernetes + http://localhost:1313/CYBERTEC-pg-operator/installation/dev-k8s/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/installation/dev-k8s/ + <p>There are various options for setting up a local Kubernetes environment. This chapter deals with the following two variants:</p> <ul> <li>minikube</li> <li>crc (CodeReadyContainers from RedHat)</li> </ul> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="minikube" > Minikube </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/installation/dev-k8s/#minikube" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Minikube" aria-label="Anchor to: Minikube" href="#minikube"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>Minikube is a tool that makes it possible to run Kubernetes locally on a single computer. It sets up a minimal but functional Kubernetes environment suitable for development and testing purposes. Minikube supports most Kubernetes features and provides an easy way to launch and manage Kubernetes clusters on local machines without the need for a complex cloud infrastructure.</p> + + + Install CPO + http://localhost:1313/CYBERTEC-pg-operator/installation/install_operator/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/installation/install_operator/ + <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="prerequisites" > Prerequisites </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/installation/install_operator/#prerequisites" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Prerequisites" aria-label="Anchor to: Prerequisites" href="#prerequisites"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>For the installation you either need our CPO tutorial repository or you install CPO directly from our registry.<!-- raw HTML omitted --> Exception: Installation via Operatorhub (Openshift only)</p> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="cpo-tutorial-repository" > CPO-Tutorial-Repository </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/installation/install_operator/#cpo-tutorial-repository" class="gdoc-page__anchor clip flex align-center" title="Anchor to: CPO-Tutorial-Repository" aria-label="Anchor to: CPO-Tutorial-Repository" href="#cpo-tutorial-repository"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>To get started, you can fork our tutorial repository on Github and then download it. <a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/fork" >CYBERTEC-operator-tutorials</a></p> + + + Operator-Configuration + http://localhost:1313/CYBERTEC-pg-operator/installation/configuration_operator/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/installation/configuration_operator/ + <p>Users who are already used to working with PostgreSQL from Baremetal or VMs are already familiar with the need for various files to configure PostgreSQL. These include</p> <ul> <li>postgresql.conf</li> <li>pg_hba.conf</li> <li>&hellip;</li> </ul> <p>Although these files are available in the container, direct modification is not planned. As part of the declarative mode of operation of the operator, these files are defined via the operator. The modifying intervention within the container also represents a contradiction to the immutability of the container.</p> + + + PostgreSQL 13 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg13/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg13/ + <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The extensions listed are included in the standard images. This list refers to PostgreSQL 13.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>adminpack</td> <td>2.1</td> <td>Administrative functions for PostgreSQL</td> </tr> <tr> <td>amcheck</td> <td>1.2</td> <td>Functions for verifying relation integrity</td> </tr> <tr> <td>autoinc</td> <td>1.0</td> <td>Functions for autoincrementing fields</td> </tr> <tr> <td>bloom</td> <td>1.0</td> <td>Bloom access method - signature file based index</td> </tr> <tr> <td>btree_gin</td> <td>1.3</td> <td>Support for indexing common datatypes in GIN</td> </tr> <tr> <td>btree_gist</td> <td>1.5</td> <td>Support for indexing common datatypes in GiST</td> </tr> <tr> <td>citext</td> <td>1.6</td> <td>Data type for case-insensitive character strings</td> </tr> <tr> <td>credcheck</td> <td>3.0.0</td> <td>credcheck - PostgreSQL plain text credential checker</td> </tr> <tr> <td>cube</td> <td>1.4</td> <td>Data type for multidimensional cubes</td> </tr> <tr> <td>dblink</td> <td>1.2</td> <td>Connect to other PostgreSQL databases from within a database</td> </tr> <tr> <td>dict_int</td> <td>1.0</td> <td>Text search dictionary template for integers</td> </tr> <tr> <td>dict_xsyn</td> <td>1.0</td> <td>Text search dictionary template for extended synonym processing</td> </tr> <tr> <td>earthdistance</td> <td>1.1</td> <td>Calculate great-circle distances on the surface of the Earth</td> </tr> <tr> <td>file_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for flat file access</td> </tr> <tr> <td>fuzzystrmatch</td> <td>1.1</td> <td>Determine similarities and distance between strings</td> </tr> <tr> <td>hstore</td> <td>1.7</td> <td>Data type for storing sets of (key, value) pairs</td> </tr> <tr> <td>hstore_plperl</td> <td>1.0</td> <td>Transform between hstore and plperl</td> </tr> <tr> <td>hstore_plperlu</td> <td>1.0</td> <td>Transform between hstore and plperlu</td> </tr> <tr> <td>hstore_plpython3u</td> <td>1.0</td> <td>Transform between hstore and plpython3u</td> </tr> <tr> <td>insert_username</td> <td>1.0</td> <td>Functions for tracking who changed a table</td> </tr> <tr> <td>intagg</td> <td>1.1</td> <td>Integer aggregator and enumerator (obsolete)</td> </tr> <tr> <td>intarray</td> <td>1.3</td> <td>Functions, operators, and index support for 1-D arrays of integers</td> </tr> <tr> <td>isn</td> <td>1.2</td> <td>Data types for international product numbering standards</td> </tr> <tr> <td>jsonb_plperl</td> <td>1.0</td> <td>Transform between jsonb and plperl</td> </tr> <tr> <td>jsonb_plperlu</td> <td>1.0</td> <td>Transform between jsonb and plperlu</td> </tr> <tr> <td>jsonb_plpython3u</td> <td>1.0</td> <td>Transform between jsonb and plpython3u</td> </tr> <tr> <td>lo</td> <td>1.1</td> <td>Large Object maintenance</td> </tr> <tr> <td>ltree</td> <td>1.2</td> <td>Data type for hierarchical tree-like structures</td> </tr> <tr> <td>ltree_plpython3u</td> <td>1.0</td> <td>Transform between ltree and plpython3u</td> </tr> <tr> <td>moddatetime</td> <td>1.0</td> <td>Functions for tracking last modification time</td> </tr> <tr> <td>pageinspect</td> <td>1.8</td> <td>Inspect the contents of database pages at a low level</td> </tr> <tr> <td>pg_buffercache</td> <td>1.3</td> <td>Examine the shared buffer cache</td> </tr> <tr> <td>pg_cron</td> <td>1.6</td> <td>Job scheduler for PostgreSQL</td> </tr> <tr> <td>pg_freespacemap</td> <td>1.2</td> <td>Examine the free space map (FSM)</td> </tr> <tr> <td>pg_permissions</td> <td>1.3</td> <td>View object permissions and compare them with the desired state</td> </tr> <tr> <td>pg_prewarm</td> <td>1.2</td> <td>Prewarm relation data</td> </tr> <tr> <td>pg_proctab</td> <td></td> <td>Placeholder - see pg_proctab&ndash;0.0.10-compat.control</td> </tr> <tr> <td>pg_stat_statements</td> <td>1.8</td> <td>Track planning and execution statistics of all SQL statements executed</td> </tr> <tr> <td>pg_trgm</td> <td>1.5</td> <td>Text similarity measurement and index searching based on trigrams</td> </tr> <tr> <td>pg_visibility</td> <td>1.2</td> <td>Examine the visibility map (VM) and page-level visibility info</td> </tr> <tr> <td>pgaudit</td> <td>1.5.3</td> <td>Provides auditing functionality</td> </tr> <tr> <td>pgauditlogtofile</td> <td>1.6</td> <td>pgAudit addon to redirect audit entries to an independent file</td> </tr> <tr> <td>pgcrypto</td> <td>1.3</td> <td>Cryptographic functions</td> </tr> <tr> <td>pgnodemx</td> <td>1.7</td> <td>SQL functions that allow capture of node OS metrics from PostgreSQL</td> </tr> <tr> <td>pgrowlocks</td> <td>1.2</td> <td>Show row-level locking information</td> </tr> <tr> <td>pgstattuple</td> <td>1.5</td> <td>Show tuple-level statistics</td> </tr> <tr> <td>plpgsql</td> <td>1.0</td> <td>PL/pgSQL procedural language</td> </tr> <tr> <td>plpython3u</td> <td>1.0</td> <td>PL/Python3U untrusted procedural language</td> </tr> <tr> <td>pltcl</td> <td>1.0</td> <td>PL/Tcl procedural language</td> </tr> <tr> <td>pltclu</td> <td>1.0</td> <td>PL/TclU untrusted procedural language</td> </tr> <tr> <td>postgres_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for remote PostgreSQL servers</td> </tr> <tr> <td>refint</td> <td>1.0</td> <td>Functions for implementing referential integrity (obsolete)</td> </tr> <tr> <td>seg</td> <td>1.3</td> <td>Data type for representing line segments or floating-point intervals</td> </tr> <tr> <td>set_user</td> <td>4.1.0</td> <td>Similar to SET ROLE but with added logging</td> </tr> <tr> <td>sslinfo</td> <td>1.2</td> <td>Information about SSL certificates</td> </tr> <tr> <td>tablefunc</td> <td>1.0</td> <td>Functions that manipulate whole tables, including crosstab</td> </tr> <tr> <td>tcn</td> <td>1.0</td> <td>Triggered change notifications</td> </tr> <tr> <td>timescaledb</td> <td>2.15.3</td> <td>Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)</td> </tr> <tr> <td>tsm_system_rows</td> <td>1.0</td> <td>TABLESAMPLE method which accepts number of rows as a limit</td> </tr> <tr> <td>tsm_system_time</td> <td>1.0</td> <td>TABLESAMPLE method which accepts time in milliseconds as a limit</td> </tr> <tr> <td>unaccent</td> <td>1.1</td> <td>Text search dictionary that removes accents</td> </tr> <tr> <td>uuid-ossp</td> <td>1.1</td> <td>Generate universally unique identifiers (UUIDs)</td> </tr> <tr> <td>xml2</td> <td>1.1</td> <td>XPath querying and XSLT</td> </tr> </tbody> </table> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The following extensions are additionally included in the Postgis images.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>address_standardizer</td> <td>3.4.4</td> <td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.</td> </tr> <tr> <td>address_standardizer_data_us</td> <td>3.4.4</td> <td>Address Standardizer US dataset example</td> </tr> <tr> <td>postgis</td> <td>3.4.4</td> <td>PostGIS geometry and geography spatial types and functions</td> </tr> <tr> <td>postgis_raster</td> <td>3.4.4</td> <td>PostGIS raster types and functions</td> </tr> <tr> <td>postgis_sfcgal</td> <td>3.4.4</td> <td>PostGIS SFCGAL functions</td> </tr> <tr> <td>postgis_tiger_geocoder</td> <td>3.4.4</td> <td>PostGIS tiger geocoder and reverse geocoder</td> </tr> <tr> <td>postgis_topology</td> <td>3.4.4</td> <td>PostGIS topology spatial types and functions</td> </tr> </tbody> </table> + + + PostgreSQL 14 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg14/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg14/ + <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The extensions listed are included in the standard images. This list refers to PostgreSQL 14.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>adminpack</td> <td>2.1</td> <td>Administrative functions for PostgreSQL</td> </tr> <tr> <td>amcheck</td> <td>1.3</td> <td>Functions for verifying relation integrity</td> </tr> <tr> <td>autoinc</td> <td>1.0</td> <td>Functions for autoincrementing fields</td> </tr> <tr> <td>bloom</td> <td>1.0</td> <td>Bloom access method - signature file based index</td> </tr> <tr> <td>btree_gin</td> <td>1.3</td> <td>Support for indexing common datatypes in GIN</td> </tr> <tr> <td>btree_gist</td> <td>1.6</td> <td>Support for indexing common datatypes in GiST</td> </tr> <tr> <td>citext</td> <td>1.6</td> <td>Data type for case-insensitive character strings</td> </tr> <tr> <td>credcheck</td> <td>3.0.0</td> <td>credcheck - PostgreSQL plain text credential checker</td> </tr> <tr> <td>cube</td> <td>1.5</td> <td>Data type for multidimensional cubes</td> </tr> <tr> <td>dblink</td> <td>1.2</td> <td>Connect to other PostgreSQL databases from within a database</td> </tr> <tr> <td>dict_int</td> <td>1.0</td> <td>Text search dictionary template for integers</td> </tr> <tr> <td>dict_xsyn</td> <td>1.0</td> <td>Text search dictionary template for extended synonym processing</td> </tr> <tr> <td>earthdistance</td> <td>1.1</td> <td>Calculate great-circle distances on the surface of the Earth</td> </tr> <tr> <td>file_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for flat file access</td> </tr> <tr> <td>fuzzystrmatch</td> <td>1.1</td> <td>Determine similarities and distance between strings</td> </tr> <tr> <td>hstore</td> <td>1.8</td> <td>Data type for storing sets of (key, value) pairs</td> </tr> <tr> <td>hstore_plperl</td> <td>1.0</td> <td>Transform between hstore and plperl</td> </tr> <tr> <td>hstore_plperlu</td> <td>1.0</td> <td>Transform between hstore and plperlu</td> </tr> <tr> <td>hstore_plpython3u</td> <td>1.0</td> <td>Transform between hstore and plpython3u</td> </tr> <tr> <td>insert_username</td> <td>1.0</td> <td>Functions for tracking who changed a table</td> </tr> <tr> <td>intagg</td> <td>1.1</td> <td>Integer aggregator and enumerator (obsolete)</td> </tr> <tr> <td>intarray</td> <td>1.5</td> <td>Functions, operators, and index support for 1-D arrays of integers</td> </tr> <tr> <td>isn</td> <td>1.2</td> <td>Data types for international product numbering standards</td> </tr> <tr> <td>jsonb_plperl</td> <td>1.0</td> <td>Transform between jsonb and plperl</td> </tr> <tr> <td>jsonb_plperlu</td> <td>1.0</td> <td>Transform between jsonb and plperlu</td> </tr> <tr> <td>jsonb_plpython3u</td> <td>1.0</td> <td>Transform between jsonb and plpython3u</td> </tr> <tr> <td>lo</td> <td>1.1</td> <td>Large Object maintenance</td> </tr> <tr> <td>ltree</td> <td>1.2</td> <td>Data type for hierarchical tree-like structures</td> </tr> <tr> <td>ltree_plpython3u</td> <td>1.0</td> <td>Transform between ltree and plpython3u</td> </tr> <tr> <td>moddatetime</td> <td>1.0</td> <td>Functions for tracking last modification time</td> </tr> <tr> <td>old_snapshot</td> <td>1.0</td> <td>Utilities in support of old_snapshot_threshold</td> </tr> <tr> <td>pageinspect</td> <td>1.9</td> <td>Inspect the contents of database pages at a low level</td> </tr> <tr> <td>pg_buffercache</td> <td>1.3</td> <td>Examine the shared buffer cache</td> </tr> <tr> <td>pg_cron</td> <td>1.6</td> <td>Job scheduler for PostgreSQL</td> </tr> <tr> <td>pg_freespacemap</td> <td>1.2</td> <td>Examine the free space map (FSM)</td> </tr> <tr> <td>pg_permissions</td> <td>1.3</td> <td>View object permissions and compare them with the desired state</td> </tr> <tr> <td>pg_prewarm</td> <td>1.2</td> <td>Prewarm relation data</td> </tr> <tr> <td>pg_proctab</td> <td></td> <td>Placeholder - see pg_proctab&ndash;0.0.10-compat.control</td> </tr> <tr> <td>pg_stat_statements</td> <td>1.9</td> <td>Track planning and execution statistics of all SQL statements executed</td> </tr> <tr> <td>pg_surgery</td> <td>1.0</td> <td>Extension to perform surgery on a damaged relation</td> </tr> <tr> <td>pg_trgm</td> <td>1.6</td> <td>Text similarity measurement and index searching based on trigrams</td> </tr> <tr> <td>pg_visibility</td> <td>1.2</td> <td>Examine the visibility map (VM) and page-level visibility info</td> </tr> <tr> <td>pgaudit</td> <td>1.6.3</td> <td>Provides auditing functionality</td> </tr> <tr> <td>pgauditlogtofile</td> <td>1.6</td> <td>pgAudit addon to redirect audit entries to an independent file</td> </tr> <tr> <td>pgcrypto</td> <td>1.3</td> <td>Cryptographic functions</td> </tr> <tr> <td>pgnodemx</td> <td>1.7</td> <td>SQL functions that allow capture of node OS metrics from PostgreSQL</td> </tr> <tr> <td>pgrowlocks</td> <td>1.2</td> <td>Show row-level locking information</td> </tr> <tr> <td>pgstattuple</td> <td>1.5</td> <td>Show tuple-level statistics</td> </tr> <tr> <td>plpgsql</td> <td>1.0</td> <td>PL/pgSQL procedural language</td> </tr> <tr> <td>plpython3u</td> <td>1.0</td> <td>PL/Python3U untrusted procedural language</td> </tr> <tr> <td>pltcl</td> <td>1.0</td> <td>PL/Tcl procedural language</td> </tr> <tr> <td>pltclu</td> <td>1.0</td> <td>PL/TclU untrusted procedural language</td> </tr> <tr> <td>postgres_fdw</td> <td>1.1</td> <td>Foreign-data wrapper for remote PostgreSQL servers</td> </tr> <tr> <td>refint</td> <td>1.0</td> <td>Functions for implementing referential integrity (obsolete)</td> </tr> <tr> <td>seg</td> <td>1.4</td> <td>Data type for representing line segments or floating-point intervals</td> </tr> <tr> <td>set_user</td> <td>4.1.0</td> <td>Similar to SET ROLE but with added logging</td> </tr> <tr> <td>sslinfo</td> <td>1.2</td> <td>Information about SSL certificates</td> </tr> <tr> <td>tablefunc</td> <td>1.0</td> <td>Functions that manipulate whole tables, including crosstab</td> </tr> <tr> <td>tcn</td> <td>1.0</td> <td>Triggered change notifications</td> </tr> <tr> <td>timescaledb</td> <td>2.18.2</td> <td>Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)</td> </tr> <tr> <td>tsm_system_rows</td> <td>1.0</td> <td>TABLESAMPLE method which accepts number of rows as a limit</td> </tr> <tr> <td>tsm_system_time</td> <td>1.0</td> <td>TABLESAMPLE method which accepts time in milliseconds as a limit</td> </tr> <tr> <td>unaccent</td> <td>1.1</td> <td>Text search dictionary that removes accents</td> </tr> <tr> <td>uuid-ossp</td> <td>1.1</td> <td>Generate universally unique identifiers (UUIDs)</td> </tr> <tr> <td>xml2</td> <td>1.1</td> <td>XPath querying and XSLT</td> </tr> </tbody> </table> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The following extensions are additionally included in the Postgis images.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>address_standardizer</td> <td>3.4.4</td> <td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.</td> </tr> <tr> <td>address_standardizer_data_us</td> <td>3.4.4</td> <td>Address Standardizer US dataset example</td> </tr> <tr> <td>postgis</td> <td>3.4.4</td> <td>PostGIS geometry and geography spatial types and functions</td> </tr> <tr> <td>postgis_raster</td> <td>3.4.4</td> <td>PostGIS raster types and functions</td> </tr> <tr> <td>postgis_sfcgal</td> <td>3.4.4</td> <td>PostGIS SFCGAL functions</td> </tr> <tr> <td>postgis_tiger_geocoder</td> <td>3.4.4</td> <td>PostGIS tiger geocoder and reverse geocoder</td> </tr> <tr> <td>postgis_topology</td> <td>3.4.4</td> <td>PostGIS topology spatial types and functions</td> </tr> </tbody> </table> + + + PostgreSQL 15 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg15/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg15/ + <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The extensions listed are included in the standard images. This list refers to PostgreSQL 15.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>adminpack</td> <td>2.1</td> <td>Administrative functions for PostgreSQL</td> </tr> <tr> <td>amcheck</td> <td>1.3</td> <td>Functions for verifying relation integrity</td> </tr> <tr> <td>autoinc</td> <td>1.0</td> <td>Functions for autoincrementing fields</td> </tr> <tr> <td>bloom</td> <td>1.0</td> <td>Bloom access method - signature file based index</td> </tr> <tr> <td>btree_gin</td> <td>1.3</td> <td>Support for indexing common datatypes in GIN</td> </tr> <tr> <td>btree_gist</td> <td>1.7</td> <td>Support for indexing common datatypes in GiST</td> </tr> <tr> <td>citext</td> <td>1.6</td> <td>Data type for case-insensitive character strings</td> </tr> <tr> <td>credcheck</td> <td>3.0.0</td> <td>credcheck - PostgreSQL plain text credential checker</td> </tr> <tr> <td>cube</td> <td>1.5</td> <td>Data type for multidimensional cubes</td> </tr> <tr> <td>dblink</td> <td>1.2</td> <td>Connect to other PostgreSQL databases from within a database</td> </tr> <tr> <td>dict_int</td> <td>1.0</td> <td>Text search dictionary template for integers</td> </tr> <tr> <td>dict_xsyn</td> <td>1.0</td> <td>Text search dictionary template for extended synonym processing</td> </tr> <tr> <td>earthdistance</td> <td>1.1</td> <td>Calculate great-circle distances on the surface of the Earth</td> </tr> <tr> <td>file_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for flat file access</td> </tr> <tr> <td>fuzzystrmatch</td> <td>1.1</td> <td>Determine similarities and distance between strings</td> </tr> <tr> <td>hstore</td> <td>1.8</td> <td>Data type for storing sets of (key, value) pairs</td> </tr> <tr> <td>hstore_plperl</td> <td>1.0</td> <td>Transform between hstore and plperl</td> </tr> <tr> <td>hstore_plperlu</td> <td>1.0</td> <td>Transform between hstore and plperlu</td> </tr> <tr> <td>hstore_plpython3u</td> <td>1.0</td> <td>Transform between hstore and plpython3u</td> </tr> <tr> <td>insert_username</td> <td>1.0</td> <td>Functions for tracking who changed a table</td> </tr> <tr> <td>intagg</td> <td>1.1</td> <td>Integer aggregator and enumerator (obsolete)</td> </tr> <tr> <td>intarray</td> <td>1.5</td> <td>Functions, operators, and index support for 1-D arrays of integers</td> </tr> <tr> <td>isn</td> <td>1.2</td> <td>Data types for international product numbering standards</td> </tr> <tr> <td>jsonb_plperl</td> <td>1.0</td> <td>Transform between jsonb and plperl</td> </tr> <tr> <td>jsonb_plperlu</td> <td>1.0</td> <td>Transform between jsonb and plperlu</td> </tr> <tr> <td>jsonb_plpython3u</td> <td>1.0</td> <td>Transform between jsonb and plpython3u</td> </tr> <tr> <td>lo</td> <td>1.1</td> <td>Large Object maintenance</td> </tr> <tr> <td>ltree</td> <td>1.2</td> <td>Data type for hierarchical tree-like structures</td> </tr> <tr> <td>ltree_plpython3u</td> <td>1.0</td> <td>Transform between ltree and plpython3u</td> </tr> <tr> <td>moddatetime</td> <td>1.0</td> <td>Functions for tracking last modification time</td> </tr> <tr> <td>old_snapshot</td> <td>1.0</td> <td>Utilities in support of old_snapshot_threshold</td> </tr> <tr> <td>pageinspect</td> <td>1.11</td> <td>Inspect the contents of database pages at a low level</td> </tr> <tr> <td>pg_buffercache</td> <td>1.3</td> <td>Examine the shared buffer cache</td> </tr> <tr> <td>pg_cron</td> <td>1.6</td> <td>Job scheduler for PostgreSQL</td> </tr> <tr> <td>pg_freespacemap</td> <td>1.2</td> <td>Examine the free space map (FSM)</td> </tr> <tr> <td>pg_permissions</td> <td>1.3</td> <td>View object permissions and compare them with the desired state</td> </tr> <tr> <td>pg_prewarm</td> <td>1.2</td> <td>Prewarm relation data</td> </tr> <tr> <td>pg_proctab</td> <td></td> <td>Placeholder - see pg_proctab&ndash;0.0.10-compat.control</td> </tr> <tr> <td>pg_stat_statements</td> <td>1.10</td> <td>Track planning and execution statistics of all SQL statements executed</td> </tr> <tr> <td>pg_surgery</td> <td>1.0</td> <td>Extension to perform surgery on a damaged relation</td> </tr> <tr> <td>pg_trgm</td> <td>1.6</td> <td>Text similarity measurement and index searching based on trigrams</td> </tr> <tr> <td>pg_visibility</td> <td>1.2</td> <td>Examine the visibility map (VM) and page-level visibility info</td> </tr> <tr> <td>pg_walinspect</td> <td>1.0</td> <td>Functions to inspect contents of PostgreSQL Write-Ahead Log</td> </tr> <tr> <td>pgaudit</td> <td>1.7</td> <td>Provides auditing functionality</td> </tr> <tr> <td>pgauditlogtofile</td> <td>1.6</td> <td>pgAudit addon to redirect audit entries to an independent file</td> </tr> <tr> <td>pgcrypto</td> <td>1.3</td> <td>Cryptographic functions</td> </tr> <tr> <td>pgnodemx</td> <td>1.7</td> <td>SQL functions that allow capture of node OS metrics from PostgreSQL</td> </tr> <tr> <td>pgrowlocks</td> <td>1.2</td> <td>Show row-level locking information</td> </tr> <tr> <td>pgstattuple</td> <td>1.5</td> <td>Show tuple-level statistics</td> </tr> <tr> <td>plpgsql</td> <td>1.0</td> <td>PL/pgSQL procedural language</td> </tr> <tr> <td>plpython3u</td> <td>1.0</td> <td>PL/Python3U untrusted procedural language</td> </tr> <tr> <td>pltcl</td> <td>1.0</td> <td>PL/Tcl procedural language</td> </tr> <tr> <td>pltclu</td> <td>1.0</td> <td>PL/TclU untrusted procedural language</td> </tr> <tr> <td>postgres_fdw</td> <td>1.1</td> <td>Foreign-data wrapper for remote PostgreSQL servers</td> </tr> <tr> <td>refint</td> <td>1.0</td> <td>Functions for implementing referential integrity (obsolete)</td> </tr> <tr> <td>seg</td> <td>1.4</td> <td>Data type for representing line segments or floating-point intervals</td> </tr> <tr> <td>set_user</td> <td>4.1.0</td> <td>Similar to SET ROLE but with added logging</td> </tr> <tr> <td>sslinfo</td> <td>1.2</td> <td>Information about SSL certificates</td> </tr> <tr> <td>tablefunc</td> <td>1.0</td> <td>Functions that manipulate whole tables, including crosstab</td> </tr> <tr> <td>tcn</td> <td>1.0</td> <td>Triggered change notifications</td> </tr> <tr> <td>timescaledb</td> <td>2.18.2</td> <td>Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)</td> </tr> <tr> <td>tsm_system_rows</td> <td>1.0</td> <td>TABLESAMPLE method which accepts number of rows as a limit</td> </tr> <tr> <td>tsm_system_time</td> <td>1.0</td> <td>TABLESAMPLE method which accepts time in milliseconds as a limit</td> </tr> <tr> <td>unaccent</td> <td>1.1</td> <td>Text search dictionary that removes accents</td> </tr> <tr> <td>uuid-ossp</td> <td>1.1</td> <td>Generate universally unique identifiers (UUIDs)</td> </tr> <tr> <td>xml2</td> <td>1.1</td> <td>XPath querying and XSLT</td> </tr> </tbody> </table> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The following extensions are additionally included in the Postgis images.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>address_standardizer</td> <td>3.4.4</td> <td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.</td> </tr> <tr> <td>address_standardizer_data_us</td> <td>3.4.4</td> <td>Address Standardizer US dataset example</td> </tr> <tr> <td>postgis</td> <td>3.4.4</td> <td>PostGIS geometry and geography spatial types and functions</td> </tr> <tr> <td>postgis_raster</td> <td>3.4.4</td> <td>PostGIS raster types and functions</td> </tr> <tr> <td>postgis_sfcgal</td> <td>3.4.4</td> <td>PostGIS SFCGAL functions</td> </tr> <tr> <td>postgis_tiger_geocoder</td> <td>3.4.4</td> <td>PostGIS tiger geocoder and reverse geocoder</td> </tr> <tr> <td>postgis_topology</td> <td>3.4.4</td> <td>PostGIS topology spatial types and functions</td> </tr> </tbody> </table> + + + PostgreSQL 16 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg16/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg16/ + <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The extensions listed are included in the standard images. This list refers to PostgreSQL 16.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>adminpack</td> <td>2.1</td> <td>Administrative functions for PostgreSQL</td> </tr> <tr> <td>amcheck</td> <td>1.3</td> <td>Functions for verifying relation integrity</td> </tr> <tr> <td>autoinc</td> <td>1.0</td> <td>Functions for autoincrementing fields</td> </tr> <tr> <td>bloom</td> <td>1.0</td> <td>Bloom access method - signature file based index</td> </tr> <tr> <td>btree_gin</td> <td>1.3</td> <td>Support for indexing common datatypes in GIN</td> </tr> <tr> <td>btree_gist</td> <td>1.7</td> <td>Support for indexing common datatypes in GiST</td> </tr> <tr> <td>citext</td> <td>1.6</td> <td>Data type for case-insensitive character strings</td> </tr> <tr> <td>credcheck</td> <td>3.0.0</td> <td>credcheck - PostgreSQL plain text credential checker</td> </tr> <tr> <td>cube</td> <td>1.5</td> <td>Data type for multidimensional cubes</td> </tr> <tr> <td>dblink</td> <td>1.2</td> <td>Connect to other PostgreSQL databases from within a database</td> </tr> <tr> <td>dict_int</td> <td>1.0</td> <td>Text search dictionary template for integers</td> </tr> <tr> <td>dict_xsyn</td> <td>1.0</td> <td>Text search dictionary template for extended synonym processing</td> </tr> <tr> <td>earthdistance</td> <td>1.2</td> <td>Calculate great-circle distances on the surface of the Earth</td> </tr> <tr> <td>file_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for flat file access</td> </tr> <tr> <td>fuzzystrmatch</td> <td>1.2</td> <td>Determine similarities and distance between strings</td> </tr> <tr> <td>hstore</td> <td>1.8</td> <td>Data type for storing sets of (key, value) pairs</td> </tr> <tr> <td>hstore_plperl</td> <td>1.0</td> <td>Transform between hstore and plperl</td> </tr> <tr> <td>hstore_plperlu</td> <td>1.0</td> <td>Transform between hstore and plperlu</td> </tr> <tr> <td>hstore_plpython3u</td> <td>1.0</td> <td>Transform between hstore and plpython3u</td> </tr> <tr> <td>insert_username</td> <td>1.0</td> <td>Functions for tracking who changed a table</td> </tr> <tr> <td>intagg</td> <td>1.1</td> <td>Integer aggregator and enumerator (obsolete)</td> </tr> <tr> <td>intarray</td> <td>1.5</td> <td>Functions, operators, and index support for 1-D arrays of integers</td> </tr> <tr> <td>isn</td> <td>1.2</td> <td>Data types for international product numbering standards</td> </tr> <tr> <td>jsonb_plperl</td> <td>1.0</td> <td>Transform between jsonb and plperl</td> </tr> <tr> <td>jsonb_plperlu</td> <td>1.0</td> <td>Transform between jsonb and plperlu</td> </tr> <tr> <td>jsonb_plpython3u</td> <td>1.0</td> <td>Transform between jsonb and plpython3u</td> </tr> <tr> <td>lo</td> <td>1.1</td> <td>Large Object maintenance</td> </tr> <tr> <td>ltree</td> <td>1.2</td> <td>Data type for hierarchical tree-like structures</td> </tr> <tr> <td>ltree_plpython3u</td> <td>1.0</td> <td>Transform between ltree and plpython3u</td> </tr> <tr> <td>moddatetime</td> <td>1.0</td> <td>Functions for tracking last modification time</td> </tr> <tr> <td>old_snapshot</td> <td>1.0</td> <td>Utilities in support of old_snapshot_threshold</td> </tr> <tr> <td>pageinspect</td> <td>1.12</td> <td>Inspect the contents of database pages at a low level</td> </tr> <tr> <td>pg_buffercache</td> <td>1.4</td> <td>Examine the shared buffer cache</td> </tr> <tr> <td>pg_cron</td> <td>1.6</td> <td>Job scheduler for PostgreSQL</td> </tr> <tr> <td>pg_freespacemap</td> <td>1.2</td> <td>Examine the free space map (FSM)</td> </tr> <tr> <td>pg_permissions</td> <td>1.3</td> <td>View object permissions and compare them with the desired state</td> </tr> <tr> <td>pg_prewarm</td> <td>1.2</td> <td>Prewarm relation data</td> </tr> <tr> <td>pg_proctab</td> <td></td> <td>Placeholder - see pg_proctab&ndash;0.0.10-compat.control</td> </tr> <tr> <td>pg_stat_statements</td> <td>1.10</td> <td>Track planning and execution statistics of all SQL statements executed</td> </tr> <tr> <td>pg_surgery</td> <td>1.0</td> <td>Extension to perform surgery on a damaged relation</td> </tr> <tr> <td>pg_trgm</td> <td>1.6</td> <td>Text similarity measurement and index searching based on trigrams</td> </tr> <tr> <td>pg_visibility</td> <td>1.2</td> <td>Examine the visibility map (VM) and page-level visibility info</td> </tr> <tr> <td>pg_walinspect</td> <td>1.1</td> <td>Functions to inspect contents of PostgreSQL Write-Ahead Log</td> </tr> <tr> <td>pgaudit</td> <td>16.1</td> <td>Provides auditing functionality</td> </tr> <tr> <td>pgauditlogtofile</td> <td>1.6</td> <td>pgAudit addon to redirect audit entries to an independent file</td> </tr> <tr> <td>pgcrypto</td> <td>1.3</td> <td>Cryptographic functions</td> </tr> <tr> <td>pgnodemx</td> <td>1.7</td> <td>SQL functions that allow capture of node OS metrics from PostgreSQL</td> </tr> <tr> <td>pgrowlocks</td> <td>1.2</td> <td>Show row-level locking information</td> </tr> <tr> <td>pgstattuple</td> <td>1.5</td> <td>Show tuple-level statistics</td> </tr> <tr> <td>plpgsql</td> <td>1.0</td> <td>PL/pgSQL procedural language</td> </tr> <tr> <td>plpython3u</td> <td>1.0</td> <td>PL/Python3U untrusted procedural language</td> </tr> <tr> <td>pltcl</td> <td>1.0</td> <td>PL/Tcl procedural language</td> </tr> <tr> <td>pltclu</td> <td>1.0</td> <td>PL/TclU untrusted procedural language</td> </tr> <tr> <td>postgres_fdw</td> <td>1.1</td> <td>Foreign-data wrapper for remote PostgreSQL servers</td> </tr> <tr> <td>refint</td> <td>1.0</td> <td>Functions for implementing referential integrity (obsolete)</td> </tr> <tr> <td>seg</td> <td>1.4</td> <td>Data type for representing line segments or floating-point intervals</td> </tr> <tr> <td>set_user</td> <td>4.1.0</td> <td>Similar to SET ROLE but with added logging</td> </tr> <tr> <td>sslinfo</td> <td>1.2</td> <td>Information about SSL certificates</td> </tr> <tr> <td>tablefunc</td> <td>1.0</td> <td>Functions that manipulate whole tables, including crosstab</td> </tr> <tr> <td>tcn</td> <td>1.0</td> <td>Triggered change notifications</td> </tr> <tr> <td>timescaledb</td> <td>2.18.2</td> <td>Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)</td> </tr> <tr> <td>tsm_system_rows</td> <td>1.0</td> <td>TABLESAMPLE method which accepts number of rows as a limit</td> </tr> <tr> <td>tsm_system_time</td> <td>1.0</td> <td>TABLESAMPLE method which accepts time in milliseconds as a limit</td> </tr> <tr> <td>unaccent</td> <td>1.1</td> <td>Text search dictionary that removes accents</td> </tr> <tr> <td>uuid-ossp</td> <td>1.1</td> <td>Generate universally unique identifiers (UUIDs)</td> </tr> <tr> <td>xml2</td> <td>1.1</td> <td>XPath querying and XSLT</td> </tr> </tbody> </table> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The following extensions are additionally included in the Postgis images.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>address_standardizer</td> <td>3.4.4</td> <td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.</td> </tr> <tr> <td>address_standardizer_data_us</td> <td>3.4.4</td> <td>Address Standardizer US dataset example</td> </tr> <tr> <td>postgis</td> <td>3.4.4</td> <td>PostGIS geometry and geography spatial types and functions</td> </tr> <tr> <td>postgis_raster</td> <td>3.4.4</td> <td>PostGIS raster types and functions</td> </tr> <tr> <td>postgis_sfcgal</td> <td>3.4.4</td> <td>PostGIS SFCGAL functions</td> </tr> <tr> <td>postgis_tiger_geocoder</td> <td>3.4.4</td> <td>PostGIS tiger geocoder and reverse geocoder</td> </tr> <tr> <td>postgis_topology</td> <td>3.4.4</td> <td>PostGIS topology spatial types and functions</td> </tr> </tbody> </table> + + + PostgreSQL 17 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg17/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg17/ + <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The extensions listed are included in the standard images. This list refers to PostgreSQL 17.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>amcheck</td> <td>1.4</td> <td>Functions for verifying relation integrity</td> </tr> <tr> <td>autoinc</td> <td>1.0</td> <td>Functions for autoincrementing fields</td> </tr> <tr> <td>bloom</td> <td>1.0</td> <td>Bloom access method - signature file based index</td> </tr> <tr> <td>btree_gin</td> <td>1.3</td> <td>Support for indexing common datatypes in GIN</td> </tr> <tr> <td>btree_gist</td> <td>1.7</td> <td>Support for indexing common datatypes in GiST</td> </tr> <tr> <td>citext</td> <td>1.6</td> <td>Data type for case-insensitive character strings</td> </tr> <tr> <td>credcheck</td> <td>3.0.0</td> <td>credcheck - PostgreSQL plain text credential checker</td> </tr> <tr> <td>cube</td> <td>1.5</td> <td>Data type for multidimensional cubes</td> </tr> <tr> <td>dblink</td> <td>1.2</td> <td>Connect to other PostgreSQL databases from within a database</td> </tr> <tr> <td>dict_int</td> <td>1.0</td> <td>Text search dictionary template for integers</td> </tr> <tr> <td>dict_xsyn</td> <td>1.0</td> <td>Text search dictionary template for extended synonym processing</td> </tr> <tr> <td>earthdistance</td> <td>1.2</td> <td>Calculate great-circle distances on the surface of the Earth</td> </tr> <tr> <td>file_fdw</td> <td>1.0</td> <td>Foreign-data wrapper for flat file access</td> </tr> <tr> <td>fuzzystrmatch</td> <td>1.2</td> <td>Determine similarities and distance between strings</td> </tr> <tr> <td>hstore</td> <td>1.8</td> <td>Data type for storing sets of (key, value) pairs</td> </tr> <tr> <td>hstore_plperl</td> <td>1.0</td> <td>Transform between hstore and plperl</td> </tr> <tr> <td>hstore_plperlu</td> <td>1.0</td> <td>Transform between hstore and plperlu</td> </tr> <tr> <td>hstore_plpython3u</td> <td>1.0</td> <td>Transform between hstore and plpython3u</td> </tr> <tr> <td>insert_username</td> <td>1.0</td> <td>Functions for tracking who changed a table</td> </tr> <tr> <td>intagg</td> <td>1.1</td> <td>Integer aggregator and enumerator (obsolete)</td> </tr> <tr> <td>intarray</td> <td>1.5</td> <td>Functions, operators, and index support for 1-D arrays of integers</td> </tr> <tr> <td>isn</td> <td>1.2</td> <td>Data types for international product numbering standards</td> </tr> <tr> <td>jsonb_plperl</td> <td>1.0</td> <td>Transform between jsonb and plperl</td> </tr> <tr> <td>jsonb_plperlu</td> <td>1.0</td> <td>Transform between jsonb and plperlu</td> </tr> <tr> <td>jsonb_plpython3u</td> <td>1.0</td> <td>Transform between jsonb and plpython3u</td> </tr> <tr> <td>lo</td> <td>1.1</td> <td>Large Object maintenance</td> </tr> <tr> <td>ltree</td> <td>1.3</td> <td>Data type for hierarchical tree-like structures</td> </tr> <tr> <td>ltree_plpython3u</td> <td>1.0</td> <td>Transform between ltree and plpython3u</td> </tr> <tr> <td>moddatetime</td> <td>1.0</td> <td>Functions for tracking last modification time</td> </tr> <tr> <td>pageinspect</td> <td>1.12</td> <td>Inspect the contents of database pages at a low level</td> </tr> <tr> <td>pg_buffercache</td> <td>1.5</td> <td>Examine the shared buffer cache</td> </tr> <tr> <td>pg_cron</td> <td>1.6</td> <td>Job scheduler for PostgreSQL</td> </tr> <tr> <td>pg_freespacemap</td> <td>1.2</td> <td>Examine the free space map (FSM)</td> </tr> <tr> <td>pg_permissions</td> <td>1.3</td> <td>View object permissions and compare them with the desired state</td> </tr> <tr> <td>pg_prewarm</td> <td>1.2</td> <td>Prewarm relation data</td> </tr> <tr> <td>pg_proctab</td> <td></td> <td>Placeholder - see pg_proctab&ndash;0.0.10-compat.control</td> </tr> <tr> <td>pg_stat_statements</td> <td>1.11</td> <td>Track planning and execution statistics of all SQL statements executed</td> </tr> <tr> <td>pg_surgery</td> <td>1.0</td> <td>Extension to perform surgery on a damaged relation</td> </tr> <tr> <td>pg_trgm</td> <td>1.6</td> <td>Text similarity measurement and index searching based on trigrams</td> </tr> <tr> <td>pg_visibility</td> <td>1.2</td> <td>Examine the visibility map (VM) and page-level visibility info</td> </tr> <tr> <td>pg_walinspect</td> <td>1.1</td> <td>Functions to inspect contents of PostgreSQL Write-Ahead Log</td> </tr> <tr> <td>pgaudit</td> <td>17.1</td> <td>Provides auditing functionality</td> </tr> <tr> <td>pgauditlogtofile</td> <td>1.6</td> <td>pgAudit addon to redirect audit entries to an independent file</td> </tr> <tr> <td>pgcrypto</td> <td>1.3</td> <td>Cryptographic functions</td> </tr> <tr> <td>pgnodemx</td> <td>1.7</td> <td>SQL functions that allow capture of node OS metrics from PostgreSQL</td> </tr> <tr> <td>pgrowlocks</td> <td>1.2</td> <td>Show row-level locking information</td> </tr> <tr> <td>pgstattuple</td> <td>1.5</td> <td>Show tuple-level statistics</td> </tr> <tr> <td>plpgsql</td> <td>1.0</td> <td>PL/pgSQL procedural language</td> </tr> <tr> <td>plpython3u</td> <td>1.0</td> <td>PL/Python3U untrusted procedural language</td> </tr> <tr> <td>pltcl</td> <td>1.0</td> <td>PL/Tcl procedural language</td> </tr> <tr> <td>pltclu</td> <td>1.0</td> <td>PL/TclU untrusted procedural language</td> </tr> <tr> <td>postgres_fdw</td> <td>1.1</td> <td>Foreign-data wrapper for remote PostgreSQL servers</td> </tr> <tr> <td>refint</td> <td>1.0</td> <td>Functions for implementing referential integrity (obsolete)</td> </tr> <tr> <td>seg</td> <td>1.4</td> <td>Data type for representing line segments or floating-point intervals</td> </tr> <tr> <td>set_user</td> <td>4.1.0</td> <td>Similar to SET ROLE but with added logging</td> </tr> <tr> <td>sslinfo</td> <td>1.2</td> <td>Information about SSL certificates</td> </tr> <tr> <td>tablefunc</td> <td>1.0</td> <td>Functions that manipulate whole tables, including crosstab</td> </tr> <tr> <td>tcn</td> <td>1.0</td> <td>Triggered change notifications</td> </tr> <tr> <td>timescaledb</td> <td>2.18.2</td> <td>Enables scalable inserts and complex queries for time-series data (Apache 2 Edition)</td> </tr> <tr> <td>tsm_system_rows</td> <td>1.0</td> <td>TABLESAMPLE method which accepts number of rows as a limit</td> </tr> <tr> <td>tsm_system_time</td> <td>1.0</td> <td>TABLESAMPLE method which accepts time in milliseconds as a limit</td> </tr> <tr> <td>unaccent</td> <td>1.1</td> <td>Text search dictionary that removes accents</td> </tr> <tr> <td>uuid-ossp</td> <td>1.1</td> <td>Generate universally unique identifiers (UUIDs)</td> </tr> <tr> <td>xml2</td> <td>1.1</td> <td>XPath querying and XSLT</td> </tr> </tbody> </table> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">The following extensions are additionally included in the Postgis images.</div> </blockquote> <table> <thead> <tr> <th>Name</th> <th>Default Version</th> <th>Comment</th> </tr> </thead> <tbody> <tr> <td>address_standardizer</td> <td>3.4.4</td> <td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.</td> </tr> <tr> <td>address_standardizer_data_us</td> <td>3.4.4</td> <td>Address Standardizer US dataset example</td> </tr> <tr> <td>postgis</td> <td>3.4.4</td> <td>PostGIS geometry and geography spatial types and functions</td> </tr> <tr> <td>postgis_raster</td> <td>3.4.4</td> <td>PostGIS raster types and functions</td> </tr> <tr> <td>postgis_sfcgal</td> <td>3.4.4</td> <td>PostGIS SFCGAL functions</td> </tr> <tr> <td>postgis_tiger_geocoder</td> <td>3.4.4</td> <td>PostGIS tiger geocoder and reverse geocoder</td> </tr> <tr> <td>postgis_topology</td> <td>3.4.4</td> <td>PostGIS topology spatial types and functions</td> </tr> </tbody> </table> + + + Minor version update + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/minor_updates/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/minor_updates/ + <p>Minor version updates for PostgreSQL are performed by updating the PostgreSQL container image in use. With the update object <code>spec.dockerImage</code> of the cluster manifest, the operator takes over the update based on the rolling update strategy. This means that the pods are replaced one after the other, with the replicas being updated first and then the old primary after a switchover. The operational interruption should generally last less than 5 seconds (switchover time), but the clients must still reconnect.</p> + + + Major version upgrade + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/ + <p>CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.</p> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.</div> </blockquote> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="how-does-the-upgrade-work" > How does the upgrade work? </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#how-does-the-upgrade-work" class="gdoc-page__anchor clip flex align-center" title="Anchor to: How does the upgrade work?" aria-label="Anchor to: How does the upgrade work?" href="#how-does-the-upgrade-work"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="preconditions" > Preconditions: </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#preconditions" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Preconditions:" aria-label="Anchor to: Preconditions:" href="#preconditions"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>Pod restart - Use the rolling update strategy to replace all pods based on the new ENV <code>PGVERSION</code> with the version you want to update to.</li> <li>Check - Check that the new <code>PGVERSION</code> is larger than the previously used one.</li> <li>Check whether the new <code>PGVERSION</code> is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.</li> </ol> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="preliminary-checks" > Preliminary checks </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#preliminary-checks" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Preliminary checks" aria-label="Anchor to: Preliminary checks" href="#preliminary-checks"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>use initdb to prepare a new data_dir (<code>data_new</code>) based on the new <code>PGVERSION</code>.</li> <li>check the upgrade possibility with <code>pg_upgrade --check</code></li> </ol> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">If one of the steps is aborted, a cleanup is performed</div> </blockquote> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="prepare-the-upgrade" > Prepare the Upgrade </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#prepare-the-upgrade" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Prepare the Upgrade" aria-label="Anchor to: Prepare the Upgrade" href="#prepare-the-upgrade"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>remove dependencies that can cause problems. For example, the extensions <code>pg_stat_statements</code> and <code>pgaudit</code>.</li> <li>activate the maintenance mode of the cluster</li> <li>terminate PostgreSQL in an orderly manner</li> <li>check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location</li> <li>use port <code>5432</code> for rsyncd and start it</li> </ol> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="start-the-upgrade" > Start the Upgrade </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#start-the-upgrade" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Start the Upgrade" aria-label="Anchor to: Start the Upgrade" href="#start-the-upgrade"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>Call pg_upgrade -k to start the Upgrade <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">if the process failed, we need to rollback, if it was sucessful we&rsquo;re reaching the point of no return</div> </blockquote> </li> <li>Rename the directories. <code>data -&gt; data_old</code> and <code>data_new -&gt; data</code></li> <li>Update the Patroni.config (<code>postgres.yml</code>)</li> <li>Call Checkpoint on every replica and trigger rsync on the Replicas</li> <li>Wait for Replicas to complete rsxnc. <code>Timeout: 300</code></li> <li>Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid</li> <li>Start Patroni on the Primary and start the postgres locally</li> <li>Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads</li> <li>Wait for every Replica to become ready</li> <li>Disable the maintenance mode for the Cluster</li> <li>Restore custom statistics, analyze these tables and restore dropped objetcs from <code>Prepare the upgrade</code></li> </ol> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="completion-of-the-upgrade" > Completion of the upgrade </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#completion-of-the-upgrade" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Completion of the upgrade" aria-label="Anchor to: Completion of the upgrade" href="#completion-of-the-upgrade"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>Drop directory <code>data_old</code></li> <li>Trigger new Backup</li> </ol> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="how-a-rollback-is-working" > How a rollback is working? </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#how-a-rollback-is-working" class="gdoc-page__anchor clip flex align-center" title="Anchor to: How a rollback is working?" aria-label="Anchor to: How a rollback is working?" href="#how-a-rollback-is-working"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>Stop rsynd if its running</li> <li>Disable the maintenance mode for the Cluster</li> <li>Drop directory <code>data_new</code></li> </ol> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="how-to-trigger-a-in-place-upgrade-with-cpo" > How to trigger a In-Place-Upgrade with cpo? </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#how-to-trigger-a-in-place-upgrade-with-cpo" class="gdoc-page__anchor clip flex align-center" title="Anchor to: How to trigger a In-Place-Upgrade with cpo?" aria-label="Anchor to: How to trigger a In-Place-Upgrade with cpo?" href="#how-to-trigger-a-in-place-upgrade-with-cpo"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <pre tabindex="0"><code>spec: postgresql: version: &#34;17&#34; </code></pre><p>To trigger an In-Place-Upgrade you have just to increase the parameter <code>spec.postgresql.version</code>. If you choose a valid number the Operator will start with the prozedure, described above.</p> + + + diff --git a/docs/hugo/public/installation/configuration_operator/index.html b/docs/hugo/public/installation/configuration_operator/index.html new file mode 100644 index 000000000..d8cd72501 --- /dev/null +++ b/docs/hugo/public/installation/configuration_operator/index.html @@ -0,0 +1,5208 @@ + + + + + + + + + + + + + Operator-Configuration | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Operator-Configuration

+
+
+ +

Users who are already used to working with PostgreSQL from Baremetal or VMs are already familiar with the need for various files to configure PostgreSQL. These include

+
    +
  • postgresql.conf
  • +
  • pg_hba.conf
  • +
  • +
+

Although these files are available in the container, direct modification is not planned. As part of the declarative mode of operation of the operator, these files are defined via the operator. The modifying intervention within the container also represents a contradiction to the immutability of the container.

+

For these reasons, the operator provides a way to make adjustments to the various files, from PostgreSQL to Patroni.

+

We differentiate between two main objects in the cluster manifest:

+
    +
  • postgresql with the child objects version and parameters
  • +
  • patroni with objects for the pg_hab, slots and much more
  • +
+
+

+ postgresql +

+ + + +
+

The postgresql object consists of the following elements:

+
    +
  • version - allows you to select the major version of PostgreSQL used.
  • +
  • parameters- enables the postgresql.conf to be changed
  • +
+
spec:
+  postgresql:
+    parameters:
+      shared_preload_libraries: 'pg_stat_statements,pgnodemx, timescaledb'
+      shared_buffers: '512MB'
+    version: '16'
+

Any known PostgreSQL parameter from postgresql.conf can be entered here and will be delivered by the operator to all nodes of the cluster accordingly.

+

You can find more information about the parameters in the PostgreSQL documentation

+
+

+ patroni +

+ + + +
+

The patroni object contains numerous options for customising the patroni-setu, and the pg_hba.conf is also configured here. A complete list of all available elements can be found here.

+

The most important elements include

+
    +
  • pg_hba - pg_hba.conf
  • +
  • slots
  • +
  • synchronous_mode - enables synchronous mode in the cluster. The default is set to false
  • +
  • maximum_lag_on_failover - Specifies the maximum lag so that the pod is still considered healthy in the event of a failover.
  • +
  • failsafe_mode Allows you to cancel the downgrading of the leader if all cluster members can be reached via the Patroni Rest Api. +You can find more information on this in the Patroni documentation
  • +
+
+

+ pg_hba +

+ + + +
+

The pg_hba.conf contains all defined authentication rules for PostgreSQL.

+

When customising this configuration, it is important that the entire version of pg_hba is written to the manifest. +The current configuration can be read out in the database using table pg_hba_file_rules ;.

+

Further information can be found in the PostgreSQL documentation

+
+

+ slots +

+ + + +
+

When using user-defined slots, for example for the use of CDC using Debezium, there are problems when interacting with Patroni, as the slot and its current status are not automatically synchronised to the replicas.

+

In the event of a failover, the client cannot start replication as both the entire slot and the information about the data that has already been synchronised are missing.

+

To resolve this problem, slots must be defined in the cluster manifest rather than in PostgreSQL.

+
spec:
+  patroni:
+    slots:
+      cdc-example:
+        database: app_db
+        plugin: pgoutput
+        type: logical
+

This example creates a logical replication slot with the name cdc-example within the app_db database and uses the pgoutput plugin for the slot.

+ + + + + +
+
+
Slots are only synchronised from the leader/standby leader to the replicas. This means that using the slots read-only on the replicas will cause a problem in the event of a failover.
+
+ + +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/installation/dev-k8s/index.html b/docs/hugo/public/installation/dev-k8s/index.html new file mode 100644 index 000000000..ec4fb6a9f --- /dev/null +++ b/docs/hugo/public/installation/dev-k8s/index.html @@ -0,0 +1,5204 @@ + + + + + + + + + + + + + Setup local Kubernetes | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Setup local Kubernetes

+
+
+ +

There are various options for setting up a local Kubernetes environment. This chapter deals with the following two variants:

+
    +
  • minikube
  • +
  • crc (CodeReadyContainers from RedHat)
  • +
+
+

+ Minikube +

+ + + +
+

Minikube is a tool that makes it possible to run Kubernetes locally on a single computer. It sets up a minimal but functional Kubernetes environment suitable for development and testing purposes. Minikube supports most Kubernetes features and provides an easy way to launch and manage Kubernetes clusters on local machines without the need for a complex cloud infrastructure.

+
+

+ Install Kubectl & Minikube +

+ + + +
+

To use Minikube, it is essential to install the Kubectl client.

+

Here you will find all the information you need to install kubectl on your Linux, Mac or Windows device.

+

You can Install Minikube on your Linux-, Mac- or Windows-Devide using this Documentation.

+
+

+ Use Minikube +

+ + + +
+

Before starting minikube, it is advisable to define a path for the kubeconfig.

+
export KUBECONFIG=/home/USERNAME/kubeconfig_minikube.conf
+

You can then start minikube and all the necessary data is written directly to the conf. The definition of a user-defined path ensures that other configs are not inadvertently overwritten. +The path must be defined again via ENV in each new user session. Alternatively, this can also be permanently defined via .bashrc. +If the default path is not used for any other purpose, the ENV does not need to be set.

+
# Start minikube
+minikube start
+
+# get pods from default namespace
+kubectl get pods
+
+# change default namespace to cpo
+kubectl config set-context --namespace=cpo
+
+

+ CRC +

+ + + +
+

CRC (CodeReady Containers) is a tool from Red Hat that provides a local OpenShift environment. It is specifically designed to run a compact version of OpenShift on a local machine to provide developers and testers with an easy way to develop and test applications optimised for use in OpenShift. CRC includes all the necessary OpenShift components and makes it possible to use Red Hat’s container platform locally without building a full cloud infrastructure.

+
+

+ Install oc-client & CRC +

+ + + +
+

To use CRC, it is essential to install the oc-client or the kubectl-client.

+

Here you will find all the information you need to install kubectl on your Linux, Mac or Windows device.

+

You can Download and install CRC on your Linux-, Mac- or Windows-Devide using this informations.

+
+

+ Use CRC +

+ + + +
+

Before installing crc, it is advisable to define a path for the kubeconfig.

+
export KUBECONFIG=/home/USERNAME/kubeconfig_crc.conf
+

You can then install and start crc and all the necessary data is written directly to the conf. The definition of a user-defined path ensures that other configs are not inadvertently overwritten. +The path must be defined again via ENV in each new user session. Alternatively, this can also be permanently defined via .bashrc. +If the default path is not used for any other purpose, the ENV does not need to be set.

+
# Install crc
+crc setup
+
+# Start crc
+crc start
+
+# get pods from default namespace
+oc get pods
+
+# change default namespace to cpo
+oc project cpo
+
+
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/installation/index.html b/docs/hugo/public/installation/index.html new file mode 100644 index 000000000..593c60eeb --- /dev/null +++ b/docs/hugo/public/installation/index.html @@ -0,0 +1,5081 @@ + + + + + + + + + + + + Installation | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Installation

+
+ +
+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/installation/index.xml b/docs/hugo/public/installation/index.xml new file mode 100644 index 000000000..ac9570723 --- /dev/null +++ b/docs/hugo/public/installation/index.xml @@ -0,0 +1,33 @@ + + + + Installation on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/installation/ + Recent content in Installation on CYBERTEC-PG-Operator + Hugo + en + Tue, 07 Mar 2023 14:26:51 +0100 + + + Setup local Kubernetes + http://localhost:1313/CYBERTEC-pg-operator/installation/dev-k8s/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/installation/dev-k8s/ + <p>There are various options for setting up a local Kubernetes environment. This chapter deals with the following two variants:</p> <ul> <li>minikube</li> <li>crc (CodeReadyContainers from RedHat)</li> </ul> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="minikube" > Minikube </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/installation/dev-k8s/#minikube" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Minikube" aria-label="Anchor to: Minikube" href="#minikube"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>Minikube is a tool that makes it possible to run Kubernetes locally on a single computer. It sets up a minimal but functional Kubernetes environment suitable for development and testing purposes. Minikube supports most Kubernetes features and provides an easy way to launch and manage Kubernetes clusters on local machines without the need for a complex cloud infrastructure.</p> + + + Install CPO + http://localhost:1313/CYBERTEC-pg-operator/installation/install_operator/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/installation/install_operator/ + <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="prerequisites" > Prerequisites </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/installation/install_operator/#prerequisites" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Prerequisites" aria-label="Anchor to: Prerequisites" href="#prerequisites"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>For the installation you either need our CPO tutorial repository or you install CPO directly from our registry.<!-- raw HTML omitted --> Exception: Installation via Operatorhub (Openshift only)</p> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="cpo-tutorial-repository" > CPO-Tutorial-Repository </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/installation/install_operator/#cpo-tutorial-repository" class="gdoc-page__anchor clip flex align-center" title="Anchor to: CPO-Tutorial-Repository" aria-label="Anchor to: CPO-Tutorial-Repository" href="#cpo-tutorial-repository"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>To get started, you can fork our tutorial repository on Github and then download it. <a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials/fork" >CYBERTEC-operator-tutorials</a></p> + + + Operator-Configuration + http://localhost:1313/CYBERTEC-pg-operator/installation/configuration_operator/ + Tue, 07 Mar 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/installation/configuration_operator/ + <p>Users who are already used to working with PostgreSQL from Baremetal or VMs are already familiar with the need for various files to configure PostgreSQL. These include</p> <ul> <li>postgresql.conf</li> <li>pg_hba.conf</li> <li>&hellip;</li> </ul> <p>Although these files are available in the container, direct modification is not planned. As part of the declarative mode of operation of the operator, these files are defined via the operator. The modifying intervention within the container also represents a contradiction to the immutability of the container.</p> + + + diff --git a/docs/hugo/public/installation/install_operator/index.html b/docs/hugo/public/installation/install_operator/index.html new file mode 100644 index 000000000..37ef81b1f --- /dev/null +++ b/docs/hugo/public/installation/install_operator/index.html @@ -0,0 +1,5217 @@ + + + + + + + + + + + + + Install CPO | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Install CPO

+
+
+ +
+

+ Prerequisites +

+ + + +
+

For the installation you either need our CPO tutorial repository or you install CPO directly from our registry. +Exception: Installation via Operatorhub (Openshift only)

+
+

+ CPO-Tutorial-Repository +

+ + + +
+

To get started, you can fork our tutorial repository on Github and then download it. +CYBERTEC-operator-tutorials

+
GITHUB_USER='[YOUR_USERNAME]'
+git clone https://github.com/$GITHUB_USER/CYBERTEC-operator-tutorials.git
+cd CYBERTEC-operator-tutorials
+
+

+ Helm-Registry +

+ + + +
+

helm repo add cpo https://cybertec-postgresql.github.io/CYBERTEC-operator-tutorials

+
+

+ Create Namespace +

+ + + +
+
# kubectl
+kubectl create namespace cpo
+
+# oc
+oc create namespace cpo
+
+

+ Install CPO +

+ + + +
+

There are several ways to install CPO:

+ +
+

+ Helm +

+ + + +
+

You can check and change the value.yaml of the helm diagram under the path helm/operator/values.yaml +By default, the operator is defined so that it is configured via crd-configuration. If you wish, you can change this to configmap. There are also some other default settings.

+
helm install -n cpo cpo helm/operator/.
+

The installation uses a standard configuration. On the following page you will find more information on how to configure cpo and thus adapt it to your requirements.

+
+

+ Apply +

+ + + +
+

The installation uses a standard configuration. On the following page you will find more information on how to configure cpo and thus adapt it to your requirements.

+
+

+ Operatorhub +

+ + + +
+

The installation uses a standard configuration. On the following page you will find more information on how to configure cpo and thus adapt it to your requirements.

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/installation/installation/index.html b/docs/hugo/public/installation/installation/index.html new file mode 100644 index 000000000..323d6cb18 --- /dev/null +++ b/docs/hugo/public/installation/installation/index.html @@ -0,0 +1,5300 @@ + + + + + + + + + + + + + Install CPO | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + CYBERTEC-PG-Operator + + +
+
+ + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
+
+
+ + + +
+ + + + + +
+ + + + + + + + + + + +
+ +
+ + +
+ + +
+ + +
+

Install CPO

+
+
+ +
+

+ Prerequisites +

+ + + +
+

For the installation you either need our CPO tutorial repository or you install CPO directly from our registry. +Exception: Installation via Operatorhub (Openshift only)

+
+

+ CPO-Tutorial-Repository +

+ + + +
+

To get started, you can fork our tutorial repository on Github and then download it. +CYBERTEC-operator-tutorials

+
GITHUB_USER='[YOUR_USERNAME]'
+git clone https://github.com/$GITHUB_USER/CYBERTEC-operator-tutorials.git
+cd CYBERTEC-operator-tutorials
+
+

+ CPO-Registry +

+ + + +
+
+

+ Create Namespace +

+ + + +
+
# kubectl
+kubectl create namespace cpo
+
+# oc
+oc create namespace cpo
+
+

+ Install CPO +

+ + + +
+

There are several ways to install CPO:

+ +
+

+ Helm +

+ + + +
+

You can check and change the value.yaml of the helm diagram under the path helm/operator/values.yaml +By default, the operator is defined so that it is configured via crd-configuration. If you wish, you can change this to configmap. There are also some other default settings.

+
helm install -n cpo cpo helm/operator/.
+

The installation uses a standard configuration. On the following page you will find more information on how to configure cpo and thus adapt it to your requirements.

+
+

+ Apply +

+ + + +
+

The installation uses a standard configuration. On the following page you will find more information on how to configure cpo and thus adapt it to your requirements.

+
+

+ Operatorhub +

+ + + +
+

The installation uses a standard configuration. On the following page you will find more information on how to configure cpo and thus adapt it to your requirements.

+ +
+ + + + + + + +
+
+ + + +
+ + + + + + diff --git a/docs/hugo/public/js/110-f4b990d9.chunk.min.js b/docs/hugo/public/js/110-f4b990d9.chunk.min.js new file mode 100644 index 000000000..a3d3612dd --- /dev/null +++ b/docs/hugo/public/js/110-f4b990d9.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[110],{5110:(e,r,a)=>{a.d(r,{diagram:()=>k});var t=a(758),s=(a(6474),a(7308),a(7938),a(1282),a(1099),a(7588),a(3115),a(6058),a(8159),a(9502)),k={parser:t.Zk,db:t.iP,renderer:t.q7,styles:t.tM,init:(0,s.K2)((e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,t.iP.clear()}),"init")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/12-0b8427d1.chunk.min.js b/docs/hugo/public/js/12-0b8427d1.chunk.min.js new file mode 100644 index 000000000..f025c5a68 --- /dev/null +++ b/docs/hugo/public/js/12-0b8427d1.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[12],{53:(e,n,t)=>{t.d(n,{A:()=>i});var r=t(4507);const i=function(e){return(0,r.A)(e,4)}},9012:(e,n,t)=>{t.r(n),t.d(n,{render:()=>k});var r=t(7938),i=t(1282),a=(t(1099),t(7588),t(3115)),o=(t(6058),t(8159),t(9502)),d=t(567),s=t(9592),c=t(53),g=t(4722);function l(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:f(e),edges:h(e)};return s.A(e.graph())||(n.value=c.A(e.graph())),n}function f(e){return g.A(e.nodes(),(function(n){var t=e.node(n),r=e.parent(n),i={v:n};return s.A(t)||(i.value=t),s.A(r)||(i.parent=r),i}))}function h(e){return g.A(e.edges(),(function(n){var t=e.edge(n),r={v:n.v,w:n.w};return s.A(n.name)||(r.name=n.name),s.A(t)||(r.value=t),r}))}t(1471);var u=t(697),p=new Map,m=new Map,w=new Map,R=(0,o.K2)((()=>{m.clear(),w.clear(),p.clear()}),"clear"),v=(0,o.K2)(((e,n)=>{const t=m.get(n)||[];return o.Rm.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)}),"isDescendant"),y=(0,o.K2)(((e,n)=>{const t=m.get(n)||[];return o.Rm.info("Descendants of ",n," is ",t),o.Rm.info("Edge is ",e),e.v!==n&&e.w!==n&&(t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.Rm.debug("Tilt, ",n,",not in descendants"),!1))}),"edgeInCluster"),X=(0,o.K2)(((e,n,t,r)=>{o.Rm.warn("Copying children of ",e,"root",r,"data",n.node(e),r);const i=n.children(e)||[];e!==r&&i.push(e),o.Rm.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach((i=>{if(n.children(i).length>0)X(i,n,t,r);else{const a=n.node(i);o.Rm.info("cp ",i," to ",r," with parent ",e),t.setNode(i,a),r!==n.parent(i)&&(o.Rm.warn("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.Rm.debug("Setting parent",i,e),t.setParent(i,e)):(o.Rm.info("In copy ",e,"root",r,"data",n.node(e),r),o.Rm.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const d=n.edges(i);o.Rm.debug("Copying Edges",d),d.forEach((i=>{o.Rm.info("Edge",i);const a=n.edge(i.v,i.w,i.name);o.Rm.info("Edge data",a,r);try{y(i,r)?(o.Rm.info("Copying as ",i.v,i.w,a,i.name),t.setEdge(i.v,i.w,a,i.name),o.Rm.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.Rm.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(e){o.Rm.error(e)}}))}o.Rm.debug("Removing node",i),n.removeNode(i)}))}),"copy"),b=(0,o.K2)(((e,n)=>{const t=n.children(e);let r=[...t];for(const i of t)w.set(i,e),r=[...r,...b(i,n)];return r}),"extractDescendants"),E=(0,o.K2)(((e,n,t)=>{const r=e.edges().filter((e=>e.v===n||e.w===n)),i=e.edges().filter((e=>e.v===t||e.w===t)),a=r.map((e=>({v:e.v===n?t:e.v,w:e.w===n?n:e.w}))),o=i.map((e=>({v:e.v,w:e.w})));return a.filter((e=>o.some((n=>e.v===n.v&&e.w===n.w))))}),"findCommonEdges"),N=(0,o.K2)(((e,n,t)=>{const r=n.children(e);if(o.Rm.trace("Searching children of id ",e,r),r.length<1)return e;let i;for(const e of r){const r=N(e,n,t),a=E(n,t,r);if(r){if(!(a.length>0))return r;i=r}}return i}),"findNonClusterChild"),C=(0,o.K2)((e=>p.has(e)&&p.get(e).externalConnections&&p.has(e)?p.get(e).id:e),"getAnchorId"),x=(0,o.K2)(((e,n)=>{if(!e||n>10)o.Rm.debug("Opting out, no graph ");else{o.Rm.debug("Opting in, graph "),e.nodes().forEach((function(n){e.children(n).length>0&&(o.Rm.warn("Cluster identified",n," Replacement id in edges: ",N(n,e,n)),m.set(n,b(n,e)),p.set(n,{id:N(n,e,n),clusterData:e.node(n)}))})),e.nodes().forEach((function(n){const t=e.children(n),r=e.edges();t.length>0?(o.Rm.debug("Cluster identified",n,m),r.forEach((e=>{v(e.v,n)^v(e.w,n)&&(o.Rm.warn("Edge: ",e," leaves cluster ",n),o.Rm.warn("Descendants of XXX ",n,": ",m.get(n)),p.get(n).externalConnections=!0)}))):o.Rm.debug("Not a cluster ",n,m)}));for(let n of p.keys()){const t=p.get(n).id,r=e.parent(t);r!==n&&p.has(r)&&!p.get(r).externalConnections&&(p.get(n).id=r)}e.edges().forEach((function(n){const t=e.edge(n);o.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),o.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,i=n.w;if(o.Rm.warn("Fix XXX",p,"ids:",n.v,n.w,"Translating: ",p.get(n.v)," --- ",p.get(n.w)),p.get(n.v)||p.get(n.w)){if(o.Rm.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=C(n.v),i=C(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const i=e.parent(r);p.get(i).externalConnections=!0,t.fromCluster=n.v}if(i!==n.w){const r=e.parent(i);p.get(r).externalConnections=!0,t.toCluster=n.w}o.Rm.warn("Fix Replacing with XXX",r,i,n.name),e.setEdge(r,i,t,n.name)}})),o.Rm.warn("Adjusted Graph",l(e)),I(e,0),o.Rm.trace(p)}}),"adjustClustersAndEdges"),I=(0,o.K2)(((e,n)=>{if(o.Rm.warn("extractor - ",n,l(e),e.children("D")),n>10)return void o.Rm.error("Bailing out");let t=e.nodes(),r=!1;for(const n of t){const t=e.children(n);r=r||t.length>0}if(r){o.Rm.debug("Nodes = ",t,n);for(const r of t)if(o.Rm.debug("Extracting node",r,p,p.has(r)&&!p.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),p.has(r))if(!p.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){o.Rm.warn("Cluster without external connections, without a parent and with children",r,n);let t="TB"===e.graph().rankdir?"LR":"TB";p.get(r)?.clusterData?.dir&&(t=p.get(r).clusterData.dir,o.Rm.warn("Fixing dir",p.get(r).clusterData.dir,t));const i=new u.T({multigraph:!0,compound:!0}).setGraph({rankdir:t,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));o.Rm.warn("Old graph before copy",l(e)),X(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:p.get(r).clusterData,label:p.get(r).label,graph:i}),o.Rm.warn("New graph after copy node: (",r,")",l(i)),o.Rm.debug("Old graph after copy",l(e))}else o.Rm.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!p.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),o.Rm.debug(p);else o.Rm.debug("Not a cluster",r,n);t=e.nodes(),o.Rm.warn("New list of nodes",t);for(const r of t){const t=e.node(r);o.Rm.warn(" Now next level",r,t),t?.clusterNode&&I(t.graph,n+1)}}else o.Rm.debug("Done, no node has children",e.nodes())}),"extractor"),S=(0,o.K2)(((e,n)=>{if(0===n.length)return[];let t=Object.assign([],n);return n.forEach((n=>{const r=e.children(n),i=S(e,r);t=[...t,...i]})),t}),"sorter"),D=(0,o.K2)((e=>S(e,e.children())),"sortNodesByHierarchy"),A=(0,o.K2)((async(e,n,t,s,c,g)=>{o.Rm.warn("Graph in recursive render:XAX",l(n),c);const f=n.graph().rankdir;o.Rm.trace("Dir in recursive render - dir:",f);const h=e.insert("g").attr("class","root");n.nodes()?o.Rm.info("Recursive render XXX",n.nodes()):o.Rm.info("No nodes found for",n),n.edges().length>0&&o.Rm.info("Recursive edges",n.edge(n.edges()[0]));const u=h.insert("g").attr("class","clusters"),m=h.insert("g").attr("class","edgePaths"),w=h.insert("g").attr("class","edgeLabels"),R=h.insert("g").attr("class","nodes");await Promise.all(n.nodes().map((async function(e){const r=n.node(e);if(void 0!==c){const t=JSON.parse(JSON.stringify(c.clusterData));o.Rm.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",t.height,"\nParent cluster",c.height),n.setNode(c.id,t),n.parent(e)||(o.Rm.trace("Setting parent",e,c.id),n.setParent(e,c.id,t))}if(o.Rm.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),r?.clusterNode){o.Rm.info("Cluster identified XBX",e,r.width,n.node(e));const{ranksep:a,nodesep:d}=n.graph();r.graph.setGraph({...r.graph.graph(),ranksep:a+25,nodesep:d});const c=await A(R,r.graph,t,s,n.node(e),g),l=c.elem;(0,i.lC)(r,l),r.diff=c.diff||0,o.Rm.info("New compound node after recursive render XAX",e,"width",r.width,"height",r.height),(0,i.U7)(l,r)}else n.children(e).length>0?(o.Rm.trace("Cluster - the non recursive path XBX",e,r.id,r,r.width,"Graph:",n),o.Rm.trace(N(r.id,n)),p.set(r.id,{id:N(r.id,n),node:r})):(o.Rm.trace("Node - the non recursive path XAX",e,R,n.node(e),f),await(0,i.on)(R,n.node(e),{config:g,dir:f}))})));const v=(0,o.K2)((async()=>{const e=n.edges().map((async function(e){const t=n.edge(e.v,e.w,e.name);o.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),o.Rm.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(n.edge(e))),o.Rm.info("Fix",p,"ids:",e.v,e.w,"Translating: ",p.get(e.v),p.get(e.w)),await(0,r.jP)(w,t)}));await Promise.all(e)}),"processEdges");await v(),o.Rm.info("Graph before layout:",JSON.stringify(l(n))),o.Rm.info("############################################# XXX"),o.Rm.info("### Layout ### XXX"),o.Rm.info("############################################# XXX"),(0,d.Zp)(n),o.Rm.info("Graph after layout:",JSON.stringify(l(n)));let y=0,{subGraphTitleTotalMargin:X}=(0,a.O)(g);return await Promise.all(D(n).map((async function(e){const t=n.node(e);if(o.Rm.info("Position XBX => "+e+": ("+t.x,","+t.y,") width: ",t.width," height: ",t.height),t?.clusterNode)t.y+=X,o.Rm.info("A tainted cluster node XBX1",e,t.id,t.width,t.height,t.x,t.y,n.parent(e)),p.get(t.id).node=t,(0,i.U_)(t);else if(n.children(e).length>0){o.Rm.info("A pure cluster node XBX1",e,t.id,t.x,t.y,t.width,t.height,n.parent(e)),t.height+=X,n.node(t.parentId);const r=t?.padding/2||0,a=t?.labelBBox?.height||0,d=a-r||0;o.Rm.debug("OffsetY",d,"labelHeight",a,"halfPadding",r),await(0,i.U)(u,t),p.get(t.id).node=t}else{const e=n.node(t.parentId);t.y+=X/2,o.Rm.info("A regular node XBX1 - using the padding",t.id,"parent",t.parentId,t.width,t.height,t.x,t.y,"offsetY",t.offsetY,"parent",e,e?.offsetY,t),(0,i.U_)(t)}}))),n.edges().forEach((function(e){const i=n.edge(e);o.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(i),i),i.points.forEach((e=>e.y+=X/2));const a=n.node(e.v);var d=n.node(e.w);const c=(0,r.Jo)(m,i,p,t,a,d,s);(0,r.T_)(i,c)})),n.nodes().forEach((function(e){const t=n.node(e);o.Rm.info(e,t.type,t.diff),t.isGroup&&(y=t.diff)})),o.Rm.warn("Returning from recursive render XAX",h,y),{elem:h,diff:y}}),"recursiveRender"),k=(0,o.K2)((async(e,n)=>{const t=new u.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),a=n.select("g");(0,r.g0)(a,e.markers,e.type,e.diagramId),(0,i.gh)(),(0,r.IU)(),(0,i.IU)(),R(),e.nodes.forEach((e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)})),o.Rm.debug("Edges:",e.edges),e.edges.forEach((e=>{if(e.start===e.end){const n=e.start,r=n+"---"+n+"---1",i=n+"---"+n+"---2",a=t.node(n);t.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(r,a.parentId),t.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(i,a.parentId);const o=structuredClone(e),d=structuredClone(e),s=structuredClone(e);o.label="",o.arrowTypeEnd="none",o.id=n+"-cyclic-special-1",d.arrowTypeEnd="none",d.id=n+"-cyclic-special-mid",s.label="",a.isGroup&&(o.fromCluster=n,s.toCluster=n),s.id=n+"-cyclic-special-2",t.setEdge(n,r,o,n+"-cyclic-special-0"),t.setEdge(r,i,d,n+"-cyclic-special-1"),t.setEdge(i,n,s,n+"-cyc{r.d(t,{default:()=>tn});class a{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new a(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class n{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new n(t,a.range(this,e))}}class i{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,a,n="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,a=o.end,r===s.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=s.slice(r,a).replace(/[^]/g,"$&̲");n+=(r>15?"…"+s.slice(r-15,r):s.slice(0,r))+l+(a+15":">","<":"<",'"':""","'":"'"},l=/[&><"']/g,h=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},m=function(e,t){return-1!==e.indexOf(t)},c=function(e,t){return void 0===e?t:e},p=function(e){return String(e).replace(l,(e=>s[e]))},u=function(e){return e.replace(o,"-$1").toLowerCase()},d=h,g=function(e){var t=h(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},f=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"},v={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:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function b(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;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 y{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},v)if(v.hasOwnProperty(t)){var r=v[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:b(r)}}reportNonstrict(e,t,r){var a=this.strict;if("function"==typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new i("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var a=this.strict;if("function"==typeof a)try{a=a(e,t,r)}catch(e){a="error"}return!(!a||"ignore"===a||!0!==a&&"error"!==a&&("warn"===a?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]"),1)))}isTrusted(e){if(e.url&&!e.protocol){var t=f(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class x{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return w[k[this.id]]}sub(){return w[S[this.id]]}fracNum(){return w[M[this.id]]}fracDen(){return w[z[this.id]]}cramp(){return w[A[this.id]]}text(){return w[T[this.id]]}isTight(){return this.size>=2}}var w=[new x(0,0,!1),new x(1,0,!0),new x(2,1,!1),new x(3,1,!0),new x(4,2,!1),new x(5,2,!0),new x(6,3,!1),new x(7,3,!0)],k=[4,5,4,5,6,7,6,7],S=[5,5,5,5,7,7,7,7],M=[2,3,4,5,6,7,6,7],z=[3,3,5,5,7,7,7,7],A=[1,1,3,3,5,5,7,7],T=[0,1,2,3,2,3,2,3],B={DISPLAY:w[0],TEXT:w[2],SCRIPT:w[4],SCRIPTSCRIPT:w[6]},N=[{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]]}],q=[];function C(e){for(var t=0;t=q[t]&&e<=q[t+1])return!0;return!1}N.forEach((e=>e.blocks.forEach((e=>q.push(...e)))));var I={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 R{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return m(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText())).join("")}}var H={"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]}},O={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]},E={Å:"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 L(e,t,r){if(!H[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),n=H[t][a];if(!n&&e[0]in E&&(a=E[e[0]].charCodeAt(0),n=H[t][a]),n||"text"!==r||C(a)&&(n=H[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var D={},V=[[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]],P=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],F=function(e,t){return t.size<2?e:V[e-1][t.size-1]};class G{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||G.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=P[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={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 e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new G(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:F(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:P[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=F(G.BASESIZE,e);return this.size===t&&this.textSize===G.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==G.BASESIZE?["sizing","reset-size"+this.size,"size"+G.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!D[t=e>=5?0:e>=3?1:2]){var r=D[t]={cssEmPerMu:O.quad[t]/18};for(var a in O)O.hasOwnProperty(a)&&(r[a]=O[a][t])}return D[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}G.BASESIZE=6;var U={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},Y={ex:!0,em:!0,mu:!0},X=function(e){return"string"!=typeof e&&(e=e.unit),e in U||e in Y||"ex"===e},W=function(e,t){var r;if(e.unit in U)r=U[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new i("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},_=function(e){return+e.toFixed(4)+"em"},j=function(e){return e.filter((e=>e)).join(" ")},$=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var a=t.getColor();a&&(this.style.color=a)}},Z=function(e){var t=document.createElement(e);for(var r in t.className=j(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n/=\x00-\x1f]/,J=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+p(j(this.classes))+'"');var r="";for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=u(a)+":"+this.style[a]+";");for(var n in r&&(t+=' style="'+p(r)+'"'),this.attributes)if(this.attributes.hasOwnProperty(n)){if(K.test(n))throw new i("Invalid attribute name '"+n+"'");t+=" "+n+'="'+p(this.attributes[n])+'"'}t+=">";for(var o=0;o"};class Q{constructor(e,t,r,a){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,$.call(this,e,r,a),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return m(this.classes,e)}toNode(){return Z.call(this,"span")}toMarkup(){return J.call(this,"span")}}class ee{constructor(e,t,r,a){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,$.call(this,t,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return m(this.classes,e)}toNode(){return Z.call(this,"a")}toMarkup(){return J.call(this,"a")}}class te{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return m(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+p(this.alt)+'"}}var re={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class ae{constructor(e,t,r,a,n,i,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=a||0,this.skew=n||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t=n[0]&&e<=n[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=re[this.text])}hasClass(e){return m(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=_(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=j(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(a)&&(r+=u(a)+":"+this.style[a]+";");r&&(e=!0,t+=' style="'+p(r)+'"');var n=p(this.text);return e?(t+=">",t+=n,t+=""):n}}class ne{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r"}}class ie{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",I[this.pathName]),e}toMarkup(){return this.alternate?'':''}}class oe{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=""}}function se(e){if(e instanceof ae)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var le={bin:1,close:1,inner:1,open:1,punct:1,rel:1},he={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},me={math:{},text:{}};function ce(e,t,r,a,n,i){me[e][n]={font:t,group:r,replace:a},i&&a&&(me[e][a]=me[e][n])}var pe="math",ue="text",de="main",ge="ams",fe="accent-token",ve="bin",be="close",ye="inner",xe="mathord",we="op-token",ke="open",Se="punct",Me="rel",ze="spacing",Ae="textord";ce(pe,de,Me,"≡","\\equiv",!0),ce(pe,de,Me,"≺","\\prec",!0),ce(pe,de,Me,"≻","\\succ",!0),ce(pe,de,Me,"∼","\\sim",!0),ce(pe,de,Me,"⊥","\\perp"),ce(pe,de,Me,"⪯","\\preceq",!0),ce(pe,de,Me,"⪰","\\succeq",!0),ce(pe,de,Me,"≃","\\simeq",!0),ce(pe,de,Me,"∣","\\mid",!0),ce(pe,de,Me,"≪","\\ll",!0),ce(pe,de,Me,"≫","\\gg",!0),ce(pe,de,Me,"≍","\\asymp",!0),ce(pe,de,Me,"∥","\\parallel"),ce(pe,de,Me,"⋈","\\bowtie",!0),ce(pe,de,Me,"⌣","\\smile",!0),ce(pe,de,Me,"⊑","\\sqsubseteq",!0),ce(pe,de,Me,"⊒","\\sqsupseteq",!0),ce(pe,de,Me,"≐","\\doteq",!0),ce(pe,de,Me,"⌢","\\frown",!0),ce(pe,de,Me,"∋","\\ni",!0),ce(pe,de,Me,"∝","\\propto",!0),ce(pe,de,Me,"⊢","\\vdash",!0),ce(pe,de,Me,"⊣","\\dashv",!0),ce(pe,de,Me,"∋","\\owns"),ce(pe,de,Se,".","\\ldotp"),ce(pe,de,Se,"⋅","\\cdotp"),ce(pe,de,Ae,"#","\\#"),ce(ue,de,Ae,"#","\\#"),ce(pe,de,Ae,"&","\\&"),ce(ue,de,Ae,"&","\\&"),ce(pe,de,Ae,"ℵ","\\aleph",!0),ce(pe,de,Ae,"∀","\\forall",!0),ce(pe,de,Ae,"ℏ","\\hbar",!0),ce(pe,de,Ae,"∃","\\exists",!0),ce(pe,de,Ae,"∇","\\nabla",!0),ce(pe,de,Ae,"♭","\\flat",!0),ce(pe,de,Ae,"ℓ","\\ell",!0),ce(pe,de,Ae,"♮","\\natural",!0),ce(pe,de,Ae,"♣","\\clubsuit",!0),ce(pe,de,Ae,"℘","\\wp",!0),ce(pe,de,Ae,"♯","\\sharp",!0),ce(pe,de,Ae,"♢","\\diamondsuit",!0),ce(pe,de,Ae,"ℜ","\\Re",!0),ce(pe,de,Ae,"♡","\\heartsuit",!0),ce(pe,de,Ae,"ℑ","\\Im",!0),ce(pe,de,Ae,"♠","\\spadesuit",!0),ce(pe,de,Ae,"§","\\S",!0),ce(ue,de,Ae,"§","\\S"),ce(pe,de,Ae,"¶","\\P",!0),ce(ue,de,Ae,"¶","\\P"),ce(pe,de,Ae,"†","\\dag"),ce(ue,de,Ae,"†","\\dag"),ce(ue,de,Ae,"†","\\textdagger"),ce(pe,de,Ae,"‡","\\ddag"),ce(ue,de,Ae,"‡","\\ddag"),ce(ue,de,Ae,"‡","\\textdaggerdbl"),ce(pe,de,be,"⎱","\\rmoustache",!0),ce(pe,de,ke,"⎰","\\lmoustache",!0),ce(pe,de,be,"⟯","\\rgroup",!0),ce(pe,de,ke,"⟮","\\lgroup",!0),ce(pe,de,ve,"∓","\\mp",!0),ce(pe,de,ve,"⊖","\\ominus",!0),ce(pe,de,ve,"⊎","\\uplus",!0),ce(pe,de,ve,"⊓","\\sqcap",!0),ce(pe,de,ve,"∗","\\ast"),ce(pe,de,ve,"⊔","\\sqcup",!0),ce(pe,de,ve,"◯","\\bigcirc",!0),ce(pe,de,ve,"∙","\\bullet",!0),ce(pe,de,ve,"‡","\\ddagger"),ce(pe,de,ve,"≀","\\wr",!0),ce(pe,de,ve,"⨿","\\amalg"),ce(pe,de,ve,"&","\\And"),ce(pe,de,Me,"⟵","\\longleftarrow",!0),ce(pe,de,Me,"⇐","\\Leftarrow",!0),ce(pe,de,Me,"⟸","\\Longleftarrow",!0),ce(pe,de,Me,"⟶","\\longrightarrow",!0),ce(pe,de,Me,"⇒","\\Rightarrow",!0),ce(pe,de,Me,"⟹","\\Longrightarrow",!0),ce(pe,de,Me,"↔","\\leftrightarrow",!0),ce(pe,de,Me,"⟷","\\longleftrightarrow",!0),ce(pe,de,Me,"⇔","\\Leftrightarrow",!0),ce(pe,de,Me,"⟺","\\Longleftrightarrow",!0),ce(pe,de,Me,"↦","\\mapsto",!0),ce(pe,de,Me,"⟼","\\longmapsto",!0),ce(pe,de,Me,"↗","\\nearrow",!0),ce(pe,de,Me,"↩","\\hookleftarrow",!0),ce(pe,de,Me,"↪","\\hookrightarrow",!0),ce(pe,de,Me,"↘","\\searrow",!0),ce(pe,de,Me,"↼","\\leftharpoonup",!0),ce(pe,de,Me,"⇀","\\rightharpoonup",!0),ce(pe,de,Me,"↙","\\swarrow",!0),ce(pe,de,Me,"↽","\\leftharpoondown",!0),ce(pe,de,Me,"⇁","\\rightharpoondown",!0),ce(pe,de,Me,"↖","\\nwarrow",!0),ce(pe,de,Me,"⇌","\\rightleftharpoons",!0),ce(pe,ge,Me,"≮","\\nless",!0),ce(pe,ge,Me,"","\\@nleqslant"),ce(pe,ge,Me,"","\\@nleqq"),ce(pe,ge,Me,"⪇","\\lneq",!0),ce(pe,ge,Me,"≨","\\lneqq",!0),ce(pe,ge,Me,"","\\@lvertneqq"),ce(pe,ge,Me,"⋦","\\lnsim",!0),ce(pe,ge,Me,"⪉","\\lnapprox",!0),ce(pe,ge,Me,"⊀","\\nprec",!0),ce(pe,ge,Me,"⋠","\\npreceq",!0),ce(pe,ge,Me,"⋨","\\precnsim",!0),ce(pe,ge,Me,"⪹","\\precnapprox",!0),ce(pe,ge,Me,"≁","\\nsim",!0),ce(pe,ge,Me,"","\\@nshortmid"),ce(pe,ge,Me,"∤","\\nmid",!0),ce(pe,ge,Me,"⊬","\\nvdash",!0),ce(pe,ge,Me,"⊭","\\nvDash",!0),ce(pe,ge,Me,"⋪","\\ntriangleleft"),ce(pe,ge,Me,"⋬","\\ntrianglelefteq",!0),ce(pe,ge,Me,"⊊","\\subsetneq",!0),ce(pe,ge,Me,"","\\@varsubsetneq"),ce(pe,ge,Me,"⫋","\\subsetneqq",!0),ce(pe,ge,Me,"","\\@varsubsetneqq"),ce(pe,ge,Me,"≯","\\ngtr",!0),ce(pe,ge,Me,"","\\@ngeqslant"),ce(pe,ge,Me,"","\\@ngeqq"),ce(pe,ge,Me,"⪈","\\gneq",!0),ce(pe,ge,Me,"≩","\\gneqq",!0),ce(pe,ge,Me,"","\\@gvertneqq"),ce(pe,ge,Me,"⋧","\\gnsim",!0),ce(pe,ge,Me,"⪊","\\gnapprox",!0),ce(pe,ge,Me,"⊁","\\nsucc",!0),ce(pe,ge,Me,"⋡","\\nsucceq",!0),ce(pe,ge,Me,"⋩","\\succnsim",!0),ce(pe,ge,Me,"⪺","\\succnapprox",!0),ce(pe,ge,Me,"≆","\\ncong",!0),ce(pe,ge,Me,"","\\@nshortparallel"),ce(pe,ge,Me,"∦","\\nparallel",!0),ce(pe,ge,Me,"⊯","\\nVDash",!0),ce(pe,ge,Me,"⋫","\\ntriangleright"),ce(pe,ge,Me,"⋭","\\ntrianglerighteq",!0),ce(pe,ge,Me,"","\\@nsupseteqq"),ce(pe,ge,Me,"⊋","\\supsetneq",!0),ce(pe,ge,Me,"","\\@varsupsetneq"),ce(pe,ge,Me,"⫌","\\supsetneqq",!0),ce(pe,ge,Me,"","\\@varsupsetneqq"),ce(pe,ge,Me,"⊮","\\nVdash",!0),ce(pe,ge,Me,"⪵","\\precneqq",!0),ce(pe,ge,Me,"⪶","\\succneqq",!0),ce(pe,ge,Me,"","\\@nsubseteqq"),ce(pe,ge,ve,"⊴","\\unlhd"),ce(pe,ge,ve,"⊵","\\unrhd"),ce(pe,ge,Me,"↚","\\nleftarrow",!0),ce(pe,ge,Me,"↛","\\nrightarrow",!0),ce(pe,ge,Me,"⇍","\\nLeftarrow",!0),ce(pe,ge,Me,"⇏","\\nRightarrow",!0),ce(pe,ge,Me,"↮","\\nleftrightarrow",!0),ce(pe,ge,Me,"⇎","\\nLeftrightarrow",!0),ce(pe,ge,Me,"△","\\vartriangle"),ce(pe,ge,Ae,"ℏ","\\hslash"),ce(pe,ge,Ae,"▽","\\triangledown"),ce(pe,ge,Ae,"◊","\\lozenge"),ce(pe,ge,Ae,"Ⓢ","\\circledS"),ce(pe,ge,Ae,"®","\\circledR"),ce(ue,ge,Ae,"®","\\circledR"),ce(pe,ge,Ae,"∡","\\measuredangle",!0),ce(pe,ge,Ae,"∄","\\nexists"),ce(pe,ge,Ae,"℧","\\mho"),ce(pe,ge,Ae,"Ⅎ","\\Finv",!0),ce(pe,ge,Ae,"⅁","\\Game",!0),ce(pe,ge,Ae,"‵","\\backprime"),ce(pe,ge,Ae,"▲","\\blacktriangle"),ce(pe,ge,Ae,"▼","\\blacktriangledown"),ce(pe,ge,Ae,"■","\\blacksquare"),ce(pe,ge,Ae,"⧫","\\blacklozenge"),ce(pe,ge,Ae,"★","\\bigstar"),ce(pe,ge,Ae,"∢","\\sphericalangle",!0),ce(pe,ge,Ae,"∁","\\complement",!0),ce(pe,ge,Ae,"ð","\\eth",!0),ce(ue,de,Ae,"ð","ð"),ce(pe,ge,Ae,"╱","\\diagup"),ce(pe,ge,Ae,"╲","\\diagdown"),ce(pe,ge,Ae,"□","\\square"),ce(pe,ge,Ae,"□","\\Box"),ce(pe,ge,Ae,"◊","\\Diamond"),ce(pe,ge,Ae,"¥","\\yen",!0),ce(ue,ge,Ae,"¥","\\yen",!0),ce(pe,ge,Ae,"✓","\\checkmark",!0),ce(ue,ge,Ae,"✓","\\checkmark"),ce(pe,ge,Ae,"ℶ","\\beth",!0),ce(pe,ge,Ae,"ℸ","\\daleth",!0),ce(pe,ge,Ae,"ℷ","\\gimel",!0),ce(pe,ge,Ae,"ϝ","\\digamma",!0),ce(pe,ge,Ae,"ϰ","\\varkappa"),ce(pe,ge,ke,"┌","\\@ulcorner",!0),ce(pe,ge,be,"┐","\\@urcorner",!0),ce(pe,ge,ke,"└","\\@llcorner",!0),ce(pe,ge,be,"┘","\\@lrcorner",!0),ce(pe,ge,Me,"≦","\\leqq",!0),ce(pe,ge,Me,"⩽","\\leqslant",!0),ce(pe,ge,Me,"⪕","\\eqslantless",!0),ce(pe,ge,Me,"≲","\\lesssim",!0),ce(pe,ge,Me,"⪅","\\lessapprox",!0),ce(pe,ge,Me,"≊","\\approxeq",!0),ce(pe,ge,ve,"⋖","\\lessdot"),ce(pe,ge,Me,"⋘","\\lll",!0),ce(pe,ge,Me,"≶","\\lessgtr",!0),ce(pe,ge,Me,"⋚","\\lesseqgtr",!0),ce(pe,ge,Me,"⪋","\\lesseqqgtr",!0),ce(pe,ge,Me,"≑","\\doteqdot"),ce(pe,ge,Me,"≓","\\risingdotseq",!0),ce(pe,ge,Me,"≒","\\fallingdotseq",!0),ce(pe,ge,Me,"∽","\\backsim",!0),ce(pe,ge,Me,"⋍","\\backsimeq",!0),ce(pe,ge,Me,"⫅","\\subseteqq",!0),ce(pe,ge,Me,"⋐","\\Subset",!0),ce(pe,ge,Me,"⊏","\\sqsubset",!0),ce(pe,ge,Me,"≼","\\preccurlyeq",!0),ce(pe,ge,Me,"⋞","\\curlyeqprec",!0),ce(pe,ge,Me,"≾","\\precsim",!0),ce(pe,ge,Me,"⪷","\\precapprox",!0),ce(pe,ge,Me,"⊲","\\vartriangleleft"),ce(pe,ge,Me,"⊴","\\trianglelefteq"),ce(pe,ge,Me,"⊨","\\vDash",!0),ce(pe,ge,Me,"⊪","\\Vvdash",!0),ce(pe,ge,Me,"⌣","\\smallsmile"),ce(pe,ge,Me,"⌢","\\smallfrown"),ce(pe,ge,Me,"≏","\\bumpeq",!0),ce(pe,ge,Me,"≎","\\Bumpeq",!0),ce(pe,ge,Me,"≧","\\geqq",!0),ce(pe,ge,Me,"⩾","\\geqslant",!0),ce(pe,ge,Me,"⪖","\\eqslantgtr",!0),ce(pe,ge,Me,"≳","\\gtrsim",!0),ce(pe,ge,Me,"⪆","\\gtrapprox",!0),ce(pe,ge,ve,"⋗","\\gtrdot"),ce(pe,ge,Me,"⋙","\\ggg",!0),ce(pe,ge,Me,"≷","\\gtrless",!0),ce(pe,ge,Me,"⋛","\\gtreqless",!0),ce(pe,ge,Me,"⪌","\\gtreqqless",!0),ce(pe,ge,Me,"≖","\\eqcirc",!0),ce(pe,ge,Me,"≗","\\circeq",!0),ce(pe,ge,Me,"≜","\\triangleq",!0),ce(pe,ge,Me,"∼","\\thicksim"),ce(pe,ge,Me,"≈","\\thickapprox"),ce(pe,ge,Me,"⫆","\\supseteqq",!0),ce(pe,ge,Me,"⋑","\\Supset",!0),ce(pe,ge,Me,"⊐","\\sqsupset",!0),ce(pe,ge,Me,"≽","\\succcurlyeq",!0),ce(pe,ge,Me,"⋟","\\curlyeqsucc",!0),ce(pe,ge,Me,"≿","\\succsim",!0),ce(pe,ge,Me,"⪸","\\succapprox",!0),ce(pe,ge,Me,"⊳","\\vartriangleright"),ce(pe,ge,Me,"⊵","\\trianglerighteq"),ce(pe,ge,Me,"⊩","\\Vdash",!0),ce(pe,ge,Me,"∣","\\shortmid"),ce(pe,ge,Me,"∥","\\shortparallel"),ce(pe,ge,Me,"≬","\\between",!0),ce(pe,ge,Me,"⋔","\\pitchfork",!0),ce(pe,ge,Me,"∝","\\varpropto"),ce(pe,ge,Me,"◀","\\blacktriangleleft"),ce(pe,ge,Me,"∴","\\therefore",!0),ce(pe,ge,Me,"∍","\\backepsilon"),ce(pe,ge,Me,"▶","\\blacktriangleright"),ce(pe,ge,Me,"∵","\\because",!0),ce(pe,ge,Me,"⋘","\\llless"),ce(pe,ge,Me,"⋙","\\gggtr"),ce(pe,ge,ve,"⊲","\\lhd"),ce(pe,ge,ve,"⊳","\\rhd"),ce(pe,ge,Me,"≂","\\eqsim",!0),ce(pe,de,Me,"⋈","\\Join"),ce(pe,ge,Me,"≑","\\Doteq",!0),ce(pe,ge,ve,"∔","\\dotplus",!0),ce(pe,ge,ve,"∖","\\smallsetminus"),ce(pe,ge,ve,"⋒","\\Cap",!0),ce(pe,ge,ve,"⋓","\\Cup",!0),ce(pe,ge,ve,"⩞","\\doublebarwedge",!0),ce(pe,ge,ve,"⊟","\\boxminus",!0),ce(pe,ge,ve,"⊞","\\boxplus",!0),ce(pe,ge,ve,"⋇","\\divideontimes",!0),ce(pe,ge,ve,"⋉","\\ltimes",!0),ce(pe,ge,ve,"⋊","\\rtimes",!0),ce(pe,ge,ve,"⋋","\\leftthreetimes",!0),ce(pe,ge,ve,"⋌","\\rightthreetimes",!0),ce(pe,ge,ve,"⋏","\\curlywedge",!0),ce(pe,ge,ve,"⋎","\\curlyvee",!0),ce(pe,ge,ve,"⊝","\\circleddash",!0),ce(pe,ge,ve,"⊛","\\circledast",!0),ce(pe,ge,ve,"⋅","\\centerdot"),ce(pe,ge,ve,"⊺","\\intercal",!0),ce(pe,ge,ve,"⋒","\\doublecap"),ce(pe,ge,ve,"⋓","\\doublecup"),ce(pe,ge,ve,"⊠","\\boxtimes",!0),ce(pe,ge,Me,"⇢","\\dashrightarrow",!0),ce(pe,ge,Me,"⇠","\\dashleftarrow",!0),ce(pe,ge,Me,"⇇","\\leftleftarrows",!0),ce(pe,ge,Me,"⇆","\\leftrightarrows",!0),ce(pe,ge,Me,"⇚","\\Lleftarrow",!0),ce(pe,ge,Me,"↞","\\twoheadleftarrow",!0),ce(pe,ge,Me,"↢","\\leftarrowtail",!0),ce(pe,ge,Me,"↫","\\looparrowleft",!0),ce(pe,ge,Me,"⇋","\\leftrightharpoons",!0),ce(pe,ge,Me,"↶","\\curvearrowleft",!0),ce(pe,ge,Me,"↺","\\circlearrowleft",!0),ce(pe,ge,Me,"↰","\\Lsh",!0),ce(pe,ge,Me,"⇈","\\upuparrows",!0),ce(pe,ge,Me,"↿","\\upharpoonleft",!0),ce(pe,ge,Me,"⇃","\\downharpoonleft",!0),ce(pe,de,Me,"⊶","\\origof",!0),ce(pe,de,Me,"⊷","\\imageof",!0),ce(pe,ge,Me,"⊸","\\multimap",!0),ce(pe,ge,Me,"↭","\\leftrightsquigarrow",!0),ce(pe,ge,Me,"⇉","\\rightrightarrows",!0),ce(pe,ge,Me,"⇄","\\rightleftarrows",!0),ce(pe,ge,Me,"↠","\\twoheadrightarrow",!0),ce(pe,ge,Me,"↣","\\rightarrowtail",!0),ce(pe,ge,Me,"↬","\\looparrowright",!0),ce(pe,ge,Me,"↷","\\curvearrowright",!0),ce(pe,ge,Me,"↻","\\circlearrowright",!0),ce(pe,ge,Me,"↱","\\Rsh",!0),ce(pe,ge,Me,"⇊","\\downdownarrows",!0),ce(pe,ge,Me,"↾","\\upharpoonright",!0),ce(pe,ge,Me,"⇂","\\downharpoonright",!0),ce(pe,ge,Me,"⇝","\\rightsquigarrow",!0),ce(pe,ge,Me,"⇝","\\leadsto"),ce(pe,ge,Me,"⇛","\\Rrightarrow",!0),ce(pe,ge,Me,"↾","\\restriction"),ce(pe,de,Ae,"‘","`"),ce(pe,de,Ae,"$","\\$"),ce(ue,de,Ae,"$","\\$"),ce(ue,de,Ae,"$","\\textdollar"),ce(pe,de,Ae,"%","\\%"),ce(ue,de,Ae,"%","\\%"),ce(pe,de,Ae,"_","\\_"),ce(ue,de,Ae,"_","\\_"),ce(ue,de,Ae,"_","\\textunderscore"),ce(pe,de,Ae,"∠","\\angle",!0),ce(pe,de,Ae,"∞","\\infty",!0),ce(pe,de,Ae,"′","\\prime"),ce(pe,de,Ae,"△","\\triangle"),ce(pe,de,Ae,"Γ","\\Gamma",!0),ce(pe,de,Ae,"Δ","\\Delta",!0),ce(pe,de,Ae,"Θ","\\Theta",!0),ce(pe,de,Ae,"Λ","\\Lambda",!0),ce(pe,de,Ae,"Ξ","\\Xi",!0),ce(pe,de,Ae,"Π","\\Pi",!0),ce(pe,de,Ae,"Σ","\\Sigma",!0),ce(pe,de,Ae,"Υ","\\Upsilon",!0),ce(pe,de,Ae,"Φ","\\Phi",!0),ce(pe,de,Ae,"Ψ","\\Psi",!0),ce(pe,de,Ae,"Ω","\\Omega",!0),ce(pe,de,Ae,"A","Α"),ce(pe,de,Ae,"B","Β"),ce(pe,de,Ae,"E","Ε"),ce(pe,de,Ae,"Z","Ζ"),ce(pe,de,Ae,"H","Η"),ce(pe,de,Ae,"I","Ι"),ce(pe,de,Ae,"K","Κ"),ce(pe,de,Ae,"M","Μ"),ce(pe,de,Ae,"N","Ν"),ce(pe,de,Ae,"O","Ο"),ce(pe,de,Ae,"P","Ρ"),ce(pe,de,Ae,"T","Τ"),ce(pe,de,Ae,"X","Χ"),ce(pe,de,Ae,"¬","\\neg",!0),ce(pe,de,Ae,"¬","\\lnot"),ce(pe,de,Ae,"⊤","\\top"),ce(pe,de,Ae,"⊥","\\bot"),ce(pe,de,Ae,"∅","\\emptyset"),ce(pe,ge,Ae,"∅","\\varnothing"),ce(pe,de,xe,"α","\\alpha",!0),ce(pe,de,xe,"β","\\beta",!0),ce(pe,de,xe,"γ","\\gamma",!0),ce(pe,de,xe,"δ","\\delta",!0),ce(pe,de,xe,"ϵ","\\epsilon",!0),ce(pe,de,xe,"ζ","\\zeta",!0),ce(pe,de,xe,"η","\\eta",!0),ce(pe,de,xe,"θ","\\theta",!0),ce(pe,de,xe,"ι","\\iota",!0),ce(pe,de,xe,"κ","\\kappa",!0),ce(pe,de,xe,"λ","\\lambda",!0),ce(pe,de,xe,"μ","\\mu",!0),ce(pe,de,xe,"ν","\\nu",!0),ce(pe,de,xe,"ξ","\\xi",!0),ce(pe,de,xe,"ο","\\omicron",!0),ce(pe,de,xe,"π","\\pi",!0),ce(pe,de,xe,"ρ","\\rho",!0),ce(pe,de,xe,"σ","\\sigma",!0),ce(pe,de,xe,"τ","\\tau",!0),ce(pe,de,xe,"υ","\\upsilon",!0),ce(pe,de,xe,"ϕ","\\phi",!0),ce(pe,de,xe,"χ","\\chi",!0),ce(pe,de,xe,"ψ","\\psi",!0),ce(pe,de,xe,"ω","\\omega",!0),ce(pe,de,xe,"ε","\\varepsilon",!0),ce(pe,de,xe,"ϑ","\\vartheta",!0),ce(pe,de,xe,"ϖ","\\varpi",!0),ce(pe,de,xe,"ϱ","\\varrho",!0),ce(pe,de,xe,"ς","\\varsigma",!0),ce(pe,de,xe,"φ","\\varphi",!0),ce(pe,de,ve,"∗","*",!0),ce(pe,de,ve,"+","+"),ce(pe,de,ve,"−","-",!0),ce(pe,de,ve,"⋅","\\cdot",!0),ce(pe,de,ve,"∘","\\circ",!0),ce(pe,de,ve,"÷","\\div",!0),ce(pe,de,ve,"±","\\pm",!0),ce(pe,de,ve,"×","\\times",!0),ce(pe,de,ve,"∩","\\cap",!0),ce(pe,de,ve,"∪","\\cup",!0),ce(pe,de,ve,"∖","\\setminus",!0),ce(pe,de,ve,"∧","\\land"),ce(pe,de,ve,"∨","\\lor"),ce(pe,de,ve,"∧","\\wedge",!0),ce(pe,de,ve,"∨","\\vee",!0),ce(pe,de,Ae,"√","\\surd"),ce(pe,de,ke,"⟨","\\langle",!0),ce(pe,de,ke,"∣","\\lvert"),ce(pe,de,ke,"∥","\\lVert"),ce(pe,de,be,"?","?"),ce(pe,de,be,"!","!"),ce(pe,de,be,"⟩","\\rangle",!0),ce(pe,de,be,"∣","\\rvert"),ce(pe,de,be,"∥","\\rVert"),ce(pe,de,Me,"=","="),ce(pe,de,Me,":",":"),ce(pe,de,Me,"≈","\\approx",!0),ce(pe,de,Me,"≅","\\cong",!0),ce(pe,de,Me,"≥","\\ge"),ce(pe,de,Me,"≥","\\geq",!0),ce(pe,de,Me,"←","\\gets"),ce(pe,de,Me,">","\\gt",!0),ce(pe,de,Me,"∈","\\in",!0),ce(pe,de,Me,"","\\@not"),ce(pe,de,Me,"⊂","\\subset",!0),ce(pe,de,Me,"⊃","\\supset",!0),ce(pe,de,Me,"⊆","\\subseteq",!0),ce(pe,de,Me,"⊇","\\supseteq",!0),ce(pe,ge,Me,"⊈","\\nsubseteq",!0),ce(pe,ge,Me,"⊉","\\nsupseteq",!0),ce(pe,de,Me,"⊨","\\models"),ce(pe,de,Me,"←","\\leftarrow",!0),ce(pe,de,Me,"≤","\\le"),ce(pe,de,Me,"≤","\\leq",!0),ce(pe,de,Me,"<","\\lt",!0),ce(pe,de,Me,"→","\\rightarrow",!0),ce(pe,de,Me,"→","\\to"),ce(pe,ge,Me,"≱","\\ngeq",!0),ce(pe,ge,Me,"≰","\\nleq",!0),ce(pe,de,ze," ","\\ "),ce(pe,de,ze," ","\\space"),ce(pe,de,ze," ","\\nobreakspace"),ce(ue,de,ze," ","\\ "),ce(ue,de,ze," "," "),ce(ue,de,ze," ","\\space"),ce(ue,de,ze," ","\\nobreakspace"),ce(pe,de,ze,null,"\\nobreak"),ce(pe,de,ze,null,"\\allowbreak"),ce(pe,de,Se,",",","),ce(pe,de,Se,";",";"),ce(pe,ge,ve,"⊼","\\barwedge",!0),ce(pe,ge,ve,"⊻","\\veebar",!0),ce(pe,de,ve,"⊙","\\odot",!0),ce(pe,de,ve,"⊕","\\oplus",!0),ce(pe,de,ve,"⊗","\\otimes",!0),ce(pe,de,Ae,"∂","\\partial",!0),ce(pe,de,ve,"⊘","\\oslash",!0),ce(pe,ge,ve,"⊚","\\circledcirc",!0),ce(pe,ge,ve,"⊡","\\boxdot",!0),ce(pe,de,ve,"△","\\bigtriangleup"),ce(pe,de,ve,"▽","\\bigtriangledown"),ce(pe,de,ve,"†","\\dagger"),ce(pe,de,ve,"⋄","\\diamond"),ce(pe,de,ve,"⋆","\\star"),ce(pe,de,ve,"◃","\\triangleleft"),ce(pe,de,ve,"▹","\\triangleright"),ce(pe,de,ke,"{","\\{"),ce(ue,de,Ae,"{","\\{"),ce(ue,de,Ae,"{","\\textbraceleft"),ce(pe,de,be,"}","\\}"),ce(ue,de,Ae,"}","\\}"),ce(ue,de,Ae,"}","\\textbraceright"),ce(pe,de,ke,"{","\\lbrace"),ce(pe,de,be,"}","\\rbrace"),ce(pe,de,ke,"[","\\lbrack",!0),ce(ue,de,Ae,"[","\\lbrack",!0),ce(pe,de,be,"]","\\rbrack",!0),ce(ue,de,Ae,"]","\\rbrack",!0),ce(pe,de,ke,"(","\\lparen",!0),ce(pe,de,be,")","\\rparen",!0),ce(ue,de,Ae,"<","\\textless",!0),ce(ue,de,Ae,">","\\textgreater",!0),ce(pe,de,ke,"⌊","\\lfloor",!0),ce(pe,de,be,"⌋","\\rfloor",!0),ce(pe,de,ke,"⌈","\\lceil",!0),ce(pe,de,be,"⌉","\\rceil",!0),ce(pe,de,Ae,"\\","\\backslash"),ce(pe,de,Ae,"∣","|"),ce(pe,de,Ae,"∣","\\vert"),ce(ue,de,Ae,"|","\\textbar",!0),ce(pe,de,Ae,"∥","\\|"),ce(pe,de,Ae,"∥","\\Vert"),ce(ue,de,Ae,"∥","\\textbardbl"),ce(ue,de,Ae,"~","\\textasciitilde"),ce(ue,de,Ae,"\\","\\textbackslash"),ce(ue,de,Ae,"^","\\textasciicircum"),ce(pe,de,Me,"↑","\\uparrow",!0),ce(pe,de,Me,"⇑","\\Uparrow",!0),ce(pe,de,Me,"↓","\\downarrow",!0),ce(pe,de,Me,"⇓","\\Downarrow",!0),ce(pe,de,Me,"↕","\\updownarrow",!0),ce(pe,de,Me,"⇕","\\Updownarrow",!0),ce(pe,de,we,"∐","\\coprod"),ce(pe,de,we,"⋁","\\bigvee"),ce(pe,de,we,"⋀","\\bigwedge"),ce(pe,de,we,"⨄","\\biguplus"),ce(pe,de,we,"⋂","\\bigcap"),ce(pe,de,we,"⋃","\\bigcup"),ce(pe,de,we,"∫","\\int"),ce(pe,de,we,"∫","\\intop"),ce(pe,de,we,"∬","\\iint"),ce(pe,de,we,"∭","\\iiint"),ce(pe,de,we,"∏","\\prod"),ce(pe,de,we,"∑","\\sum"),ce(pe,de,we,"⨂","\\bigotimes"),ce(pe,de,we,"⨁","\\bigoplus"),ce(pe,de,we,"⨀","\\bigodot"),ce(pe,de,we,"∮","\\oint"),ce(pe,de,we,"∯","\\oiint"),ce(pe,de,we,"∰","\\oiiint"),ce(pe,de,we,"⨆","\\bigsqcup"),ce(pe,de,we,"∫","\\smallint"),ce(ue,de,ye,"…","\\textellipsis"),ce(pe,de,ye,"…","\\mathellipsis"),ce(ue,de,ye,"…","\\ldots",!0),ce(pe,de,ye,"…","\\ldots",!0),ce(pe,de,ye,"⋯","\\@cdots",!0),ce(pe,de,ye,"⋱","\\ddots",!0),ce(pe,de,Ae,"⋮","\\varvdots"),ce(ue,de,Ae,"⋮","\\varvdots"),ce(pe,de,fe,"ˊ","\\acute"),ce(pe,de,fe,"ˋ","\\grave"),ce(pe,de,fe,"¨","\\ddot"),ce(pe,de,fe,"~","\\tilde"),ce(pe,de,fe,"ˉ","\\bar"),ce(pe,de,fe,"˘","\\breve"),ce(pe,de,fe,"ˇ","\\check"),ce(pe,de,fe,"^","\\hat"),ce(pe,de,fe,"⃗","\\vec"),ce(pe,de,fe,"˙","\\dot"),ce(pe,de,fe,"˚","\\mathring"),ce(pe,de,xe,"","\\@imath"),ce(pe,de,xe,"","\\@jmath"),ce(pe,de,Ae,"ı","ı"),ce(pe,de,Ae,"ȷ","ȷ"),ce(ue,de,Ae,"ı","\\i",!0),ce(ue,de,Ae,"ȷ","\\j",!0),ce(ue,de,Ae,"ß","\\ss",!0),ce(ue,de,Ae,"æ","\\ae",!0),ce(ue,de,Ae,"œ","\\oe",!0),ce(ue,de,Ae,"ø","\\o",!0),ce(ue,de,Ae,"Æ","\\AE",!0),ce(ue,de,Ae,"Œ","\\OE",!0),ce(ue,de,Ae,"Ø","\\O",!0),ce(ue,de,fe,"ˊ","\\'"),ce(ue,de,fe,"ˋ","\\`"),ce(ue,de,fe,"ˆ","\\^"),ce(ue,de,fe,"˜","\\~"),ce(ue,de,fe,"ˉ","\\="),ce(ue,de,fe,"˘","\\u"),ce(ue,de,fe,"˙","\\."),ce(ue,de,fe,"¸","\\c"),ce(ue,de,fe,"˚","\\r"),ce(ue,de,fe,"ˇ","\\v"),ce(ue,de,fe,"¨",'\\"'),ce(ue,de,fe,"˝","\\H"),ce(ue,de,fe,"◯","\\textcircled");var Te={"--":!0,"---":!0,"``":!0,"''":!0};ce(ue,de,Ae,"–","--",!0),ce(ue,de,Ae,"–","\\textendash"),ce(ue,de,Ae,"—","---",!0),ce(ue,de,Ae,"—","\\textemdash"),ce(ue,de,Ae,"‘","`",!0),ce(ue,de,Ae,"‘","\\textquoteleft"),ce(ue,de,Ae,"’","'",!0),ce(ue,de,Ae,"’","\\textquoteright"),ce(ue,de,Ae,"“","``",!0),ce(ue,de,Ae,"“","\\textquotedblleft"),ce(ue,de,Ae,"”","''",!0),ce(ue,de,Ae,"”","\\textquotedblright"),ce(pe,de,Ae,"°","\\degree",!0),ce(ue,de,Ae,"°","\\degree"),ce(ue,de,Ae,"°","\\textdegree",!0),ce(pe,de,Ae,"£","\\pounds"),ce(pe,de,Ae,"£","\\mathsterling",!0),ce(ue,de,Ae,"£","\\pounds"),ce(ue,de,Ae,"£","\\textsterling",!0),ce(pe,ge,Ae,"✠","\\maltese"),ce(ue,ge,Ae,"✠","\\maltese");for(var Be=0;Be<14;Be++){var Ne='0123456789/@."'.charAt(Be);ce(pe,de,Ae,Ne,Ne)}for(var qe=0;qe<25;qe++){var Ce='0123456789!@*()-=+";:?/.,'.charAt(qe);ce(ue,de,Ae,Ce,Ce)}for(var Ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Re=0;Re<52;Re++){var He=Ie.charAt(Re);ce(pe,de,xe,He,He),ce(ue,de,Ae,He,He)}ce(pe,ge,Ae,"C","ℂ"),ce(ue,ge,Ae,"C","ℂ"),ce(pe,ge,Ae,"H","ℍ"),ce(ue,ge,Ae,"H","ℍ"),ce(pe,ge,Ae,"N","ℕ"),ce(ue,ge,Ae,"N","ℕ"),ce(pe,ge,Ae,"P","ℙ"),ce(ue,ge,Ae,"P","ℙ"),ce(pe,ge,Ae,"Q","ℚ"),ce(ue,ge,Ae,"Q","ℚ"),ce(pe,ge,Ae,"R","ℝ"),ce(ue,ge,Ae,"R","ℝ"),ce(pe,ge,Ae,"Z","ℤ"),ce(ue,ge,Ae,"Z","ℤ"),ce(pe,de,xe,"h","ℎ"),ce(ue,de,xe,"h","ℎ");for(var Oe="",Ee=0;Ee<52;Ee++){var Le=Ie.charAt(Ee);ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56320+Ee)),ce(ue,de,Ae,Le,Oe),ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56372+Ee)),ce(ue,de,Ae,Le,Oe),ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56424+Ee)),ce(ue,de,Ae,Le,Oe),ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56580+Ee)),ce(ue,de,Ae,Le,Oe),ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56684+Ee)),ce(ue,de,Ae,Le,Oe),ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56736+Ee)),ce(ue,de,Ae,Le,Oe),ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56788+Ee)),ce(ue,de,Ae,Le,Oe),ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56840+Ee)),ce(ue,de,Ae,Le,Oe),ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56944+Ee)),ce(ue,de,Ae,Le,Oe),Ee<26&&(ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56632+Ee)),ce(ue,de,Ae,Le,Oe),ce(pe,de,xe,Le,Oe=String.fromCharCode(55349,56476+Ee)),ce(ue,de,Ae,Le,Oe))}ce(pe,de,xe,"k",Oe=String.fromCharCode(55349,56668)),ce(ue,de,Ae,"k",Oe);for(var De=0;De<10;De++){var Ve=De.toString();ce(pe,de,xe,Ve,Oe=String.fromCharCode(55349,57294+De)),ce(ue,de,Ae,Ve,Oe),ce(pe,de,xe,Ve,Oe=String.fromCharCode(55349,57314+De)),ce(ue,de,Ae,Ve,Oe),ce(pe,de,xe,Ve,Oe=String.fromCharCode(55349,57324+De)),ce(ue,de,Ae,Ve,Oe),ce(pe,de,xe,Ve,Oe=String.fromCharCode(55349,57334+De)),ce(ue,de,Ae,Ve,Oe)}for(var Pe=0;Pe<3;Pe++){var Fe="ÐÞþ".charAt(Pe);ce(pe,de,xe,Fe,Fe),ce(ue,de,Ae,Fe,Fe)}var Ge=[["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"]],Ue=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ye=function(e,t,r){return me[r][e]&&me[r][e].replace&&(e=me[r][e].replace),{value:e,metrics:L(e,t,r)}},Xe=function(e,t,r,a,n){var i,o=Ye(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||a&&"mathit"===a.font)&&(l=0),i=new ae(e,s.height,s.depth,l,s.skew,s.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new ae(e,0,0,0,0,0,n);if(a){i.maxFontSize=a.sizeMultiplier,a.style.isTight()&&i.classes.push("mtight");var h=a.getColor();h&&(i.style.color=h)}return i},We=(e,t)=>{if(j(e.classes)!==j(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var a in e.style)if(e.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},_e=function(e){for(var t=0,r=0,a=0,n=0;nt&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=a},je=function(e,t,r,a){var n=new Q(e,t,r,a);return _e(n),n},$e=(e,t,r,a)=>new Q(e,t,r,a),Ze=function(e){var t=new R(e);return _e(t),t},Ke=function(e,t,r){var a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return a+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Je={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"}},Qe={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},et={fontMap:Je,makeSymbol:Xe,mathsym:function(e,t,r,a){return void 0===a&&(a=[]),"boldsymbol"===r.font&&Ye(e,"Main-Bold",t).metrics?Xe(e,"Main-Bold",t,r,a.concat(["mathbf"])):"\\"===e||"main"===me[t][e].font?Xe(e,"Main-Regular",t,r,a):Xe(e,"AMS-Regular",t,r,a.concat(["amsrm"]))},makeSpan:je,makeSvgSpan:$e,makeLineSpan:function(e,t,r){var a=je([e],[],t);return a.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),a.style.borderBottomWidth=_(a.height),a.maxFontSize=1,a},makeAnchor:function(e,t,r,a){var n=new ee(e,t,r,a);return _e(n),n},makeFragment:Ze,wrapFragment:function(e,t){return e instanceof R?je([],[e],t):e},makeVList:function(e,t){for(var{children:r,depth:a}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],a=-t[0].shift-t[0].elem.depth,n=a,i=1;i0)return Xe(n,h,a,t,o.concat(m));if(l){var c,p;if("boldsymbol"===l){var u=function(e,t,r,a,n){return"textord"!==n&&Ye(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(n,a,0,0,r);c=u.fontName,p=[u.fontClass]}else s?(c=Je[l].fontName,p=[l]):(c=Ke(l,t.fontWeight,t.fontShape),p=[l,t.fontWeight,t.fontShape]);if(Ye(n,c,a).metrics)return Xe(n,c,a,t,o.concat(p));if(Te.hasOwnProperty(n)&&"Typewriter"===c.slice(0,10)){for(var d=[],g=0;g{var r=je(["mspace"],[],t),a=W(e,t);return r.style.marginRight=_(a),r},staticSvg:function(e,t){var[r,a,n]=Qe[e],i=new ie(r),o=new ne([i],{width:_(a),height:_(n),style:"width:"+_(a),viewBox:"0 0 "+1e3*a+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),s=$e(["overlay"],[o],t);return s.height=n,s.style.height=_(n),s.style.width=_(a),s},svgData:Qe,tryCombineChars:e=>{for(var t=0;t{var r=t.classes[0],a=e.classes[0];"mbin"===r&&m(gt,a)?t.classes[0]="mord":"mbin"===a&&m(dt,r)&&(e.classes[0]="mord")}),{node:c},p,u),yt(n,((e,t)=>{var r=kt(t),a=kt(e),n=r&&a?e.hasClass("mtight")?it[r][a]:nt[r][a]:null;if(n)return et.makeGlue(n,l)}),{node:c},p,u),n},yt=function e(t,r,a,n,i){n&&t.push(n);for(var o=0;or=>{t.splice(e+1,0,r),o++})(o)}}n&&t.pop()},xt=function(e){return e instanceof R||e instanceof ee||e instanceof Q&&e.hasClass("enclosing")?e:null},wt=function e(t,r){var a=xt(t);if(a){var n=a.children;if(n.length){if("right"===r)return e(n[n.length-1],"right");if("left"===r)return e(n[0],"left")}}return t},kt=function(e,t){return e?(t&&(e=wt(e,t)),vt[e.classes[0]]||null):null},St=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return ut(t.concat(r))},Mt=function(e,t,r){if(!e)return ut();if(st[e.type]){var a=st[e.type](e,t);if(r&&t.size!==r.size){a=ut(t.sizingClasses(r),[a],t);var n=t.sizeMultiplier/r.sizeMultiplier;a.height*=n,a.depth*=n}return a}throw new i("Got group of unknown type: '"+e.type+"'")};function zt(e,t){var r=ut(["base"],e,t),a=ut(["strut"]);return a.style.height=_(r.height+r.depth),r.depth&&(a.style.verticalAlign=_(-r.depth)),r.children.unshift(a),r}function At(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var a,n=bt(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(a=n.pop());for(var i,o=[],s=[],l=0;l0&&(o.push(zt(s,t)),s=[]),o.push(n[l]));s.length>0&&o.push(zt(s,t)),r?((i=zt(bt(r,t,!0))).classes=["tag"],o.push(i)):a&&o.push(a);var m=ut(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=_(m.height+m.depth),m.depth&&(c.style.verticalAlign=_(-m.depth))}return m}function Tt(e){return new R(e)}class Bt{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=j(this.classes));for(var r=0;r0&&(e+=' class ="'+p(j(this.classes))+'"'),e+=">";for(var r=0;r"}toText(){return this.children.map((e=>e.toText())).join("")}}class Nt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return p(this.toText())}toText(){return this.text}}var qt={MathNode:Bt,TextNode:Nt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",_(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},newDocumentFragment:Tt},Ct=function(e,t,r){return!me[t][e]||!me[t][e].replace||55349===e.charCodeAt(0)||Te.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=me[t][e].replace),new qt.TextNode(e)},It=function(e){return 1===e.length?e[0]:new qt.MathNode("mrow",e)},Rt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var a=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.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 n=e.text;return m(["\\imath","\\jmath"],n)?null:(me[a][n]&&me[a][n].replace&&(n=me[a][n].replace),L(n,et.fontMap[r].fontName,a)?et.fontMap[r].variant:null)};function Ht(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Nt&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var r=e.children[0];return r instanceof Nt&&","===r.text}return!1}var Ot=function(e,t,r){if(1===e.length){var a=Lt(e[0],t);return r&&a instanceof Bt&&"mo"===a.type&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var n,i=[],o=0;o=1&&("mn"===n.type||Ht(n))){var l=s.children[0];l instanceof Bt&&"mn"===l.type&&(l.children=[...n.children,...l.children],i.pop())}else if("mi"===n.type&&1===n.children.length){var h=n.children[0];if(h instanceof Nt&&"̸"===h.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var m=s.children[0];m instanceof Nt&&m.text.length>0&&(m.text=m.text.slice(0,1)+"̸"+m.text.slice(1),i.pop())}}}i.push(s),n=s}return i},Et=function(e,t,r){return It(Ot(e,t,r))},Lt=function(e,t){if(!e)return new qt.MathNode("mrow");if(lt[e.type])return lt[e.type](e,t);throw new i("Got group of unknown type: '"+e.type+"'")};function Dt(e,t,r,a,n){var i,o=Ot(e,r);i=1===o.length&&o[0]instanceof Bt&&m(["mrow","mtable"],o[0].type)?o[0]:new qt.MathNode("mrow",o);var s=new qt.MathNode("annotation",[new qt.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var l=new qt.MathNode("semantics",[i,s]),h=new qt.MathNode("math",[l]);return h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&h.setAttribute("display","block"),et.makeSpan([n?"katex":"katex-mathml"],[h])}var Vt=function(e){return new G({style:e.displayMode?B.DISPLAY:B.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Pt=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=et.makeSpan(r,[e])}return e},Ft={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":"="},Gt={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]},Ut=function(e){var t=new qt.MathNode("mo",[new qt.TextNode(Ft[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Yt=function(e,t){var{span:r,minWidth:a,height:n}=function(){var r=4e5,a=e.label.slice(1);if(m(["widehat","widecheck","widetilde","utilde"],a)){var n,i,o,s="ordgroup"===(d=e.base).type?d.body.length:1;if(s>5)"widehat"===a||"widecheck"===a?(n=420,r=2364,o=.42,i=a+"4"):(n=312,r=2340,o=.34,i="tilde4");else{var l=[1,1,2,2,3,3][s];"widehat"===a||"widecheck"===a?(r=[0,1062,2364,2364,2364][l],n=[0,239,300,360,420][l],o=[0,.24,.3,.3,.36,.42][l],i=a+l):(r=[0,600,1033,2339,2340][l],n=[0,260,286,306,312][l],o=[0,.26,.286,.3,.306,.34][l],i="tilde"+l)}var h=new ie(i),c=new ne([h],{width:"100%",height:_(o),viewBox:"0 0 "+r+" "+n,preserveAspectRatio:"none"});return{span:et.makeSvgSpan([],[c],t),minWidth:0,height:o}}var p,u,d,g=[],f=Gt[a],[v,b,y]=f,x=y/1e3,w=v.length;if(1===w)p=["hide-tail"],u=[f[3]];else if(2===w)p=["halfarrow-left","halfarrow-right"],u=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");p=["brace-left","brace-center","brace-right"],u=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k0&&(r.style.minWidth=_(a)),r};function Xt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Wt(e){var t=_t(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function _t(e){return e&&("atom"===e.type||he.hasOwnProperty(e.type))?e:null}var jt=(e,t)=>{var r,a,n;e&&"supsub"===e.type?(r=(a=Xt(e.base,"accent")).base,e.base=r,n=function(e){if(e instanceof Q)return e;throw new Error("Expected span but got "+String(e)+".")}(Mt(e,t)),e.base=a):r=(a=Xt(e,"accent")).base;var i=Mt(r,t.havingCrampedStyle()),o=0;if(a.isShifty&&g(r)){var s=d(r);o=se(Mt(s,t.havingCrampedStyle())).skew}var l,h="\\c"===a.label,m=h?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(a.isStretchy)l=Yt(a,t),l=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+_(2*o)+")",marginLeft:_(2*o)}:void 0}]},t);else{var c,p;"\\vec"===a.label?(c=et.staticSvg("vec",t),p=et.svgData.vec[1]):((c=se(c=et.makeOrd({mode:a.mode,text:a.label},t,"textord"))).italic=0,p=c.width,h&&(m+=c.depth)),l=et.makeSpan(["accent-body"],[c]);var u="\\textcircled"===a.label;u&&(l.classes.push("accent-full"),m=i.height);var f=o;u||(f-=p/2),l.style.left=_(f),"\\textcircled"===a.label&&(l.style.top=".2em"),l=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-m},{type:"elem",elem:l}]},t)}var v=et.makeSpan(["mord","accent"],[l],t);return n?(n.children[0]=v,n.height=Math.max(v.height,n.height),n.classes[0]="mord",n):v},$t=(e,t)=>{var r=e.isStretchy?Ut(e.label):new qt.MathNode("mo",[Ct(e.label,e.mode)]),a=new qt.MathNode("mover",[Lt(e.base,t),r]);return a.setAttribute("accent","true"),a},Zt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));ht({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=ct(t[0]),a=!Zt.test(e.funcName),n=!a||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:n,base:r}},htmlBuilder:jt,mathmlBuilder:$t}),ht({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],a=e.parser.mode;return"math"===a&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:jt,mathmlBuilder:$t}),ht({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:a,base:n}},htmlBuilder:(e,t)=>{var r=Mt(e.base,t),a=Yt(e,t),n="\\utilde"===e.label?.12:0,i=et.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]},t);return et.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=Ut(e.label),a=new qt.MathNode("munder",[Lt(e.base,t),r]);return a.setAttribute("accentunder","true"),a}});var Kt=e=>{var t=new qt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ht({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a,funcName:n}=e;return{type:"xArrow",mode:a.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,a=t.style,n=t.havingStyle(a.sup()),i=et.wrapFragment(Mt(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(a.sub()),(r=et.wrapFragment(Mt(e.below,n,t),t)).classes.push(o+"-arrow-pad"));var s,l=Yt(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]},t)}else s=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),et.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,a=Ut(e.label);if(a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=Kt(Lt(e.body,t));if(e.below){var i=Kt(Lt(e.below,t));r=new qt.MathNode("munderover",[a,i,n])}else r=new qt.MathNode("mover",[a,n])}else if(e.below){var o=Kt(Lt(e.below,t));r=new qt.MathNode("munder",[a,o])}else r=Kt(),r=new qt.MathNode("mover",[a,r]);return r}});var Jt=et.makeSpan;function Qt(e,t){var r=bt(e.body,t,!0);return Jt([e.mclass],r,t)}function er(e,t){var r,a=Ot(e.body,t);return"minner"===e.mclass?r=new qt.MathNode("mpadded",a):"mord"===e.mclass?e.isCharacterBox?(r=a[0]).type="mi":r=new qt.MathNode("mi",a):(e.isCharacterBox?(r=a[0]).type="mo":r=new qt.MathNode("mo",a),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ht({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+a.slice(5),body:pt(n),isCharacterBox:g(n)}},htmlBuilder:Qt,mathmlBuilder:er});var tr=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};ht({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:tr(t[0]),body:pt(t[1]),isCharacterBox:g(t[1])}}}),ht({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:a,funcName:n}=e,i=t[1],o=t[0];r="\\stackrel"!==n?tr(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:pt(i)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:a.mode,mclass:r,body:[l],isCharacterBox:g(l)}},htmlBuilder:Qt,mathmlBuilder:er}),ht({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:tr(t[0]),body:pt(t[0])}},htmlBuilder(e,t){var r=bt(e.body,t,!0),a=et.makeSpan([e.mclass],r,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var r=Ot(e.body,t),a=new qt.MathNode("mstyle",r);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var rr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ar=e=>"textord"===e.type&&"@"===e.text;function nr(e,t,r){var a=rr[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:a,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[n],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);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"}}}ht({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"cdlabel",mode:r.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),a=et.wrapFragment(Mt(e.label,r,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=_(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var r=new qt.MathNode("mrow",[Lt(e.label,t)]);return(r=new qt.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new qt.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),ht({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=et.wrapFragment(Mt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new qt.MathNode("mrow",[Lt(e.fragment,t)])}),ht({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,a=Xt(t[0],"ordgroup").body,n="",o=0;o=1114111)throw new i("\\@char with invalid code point "+n);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var ir=(e,t)=>{var r=bt(e.body,t.withColor(e.color),!1);return et.makeFragment(r)},or=(e,t)=>{var r=Ot(e.body,t.withColor(e.color)),a=new qt.MathNode("mstyle",r);return a.setAttribute("mathcolor",e.color),a};ht({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,a=Xt(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:a,body:pt(n)}},htmlBuilder:ir,mathmlBuilder:or}),ht({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:a}=e,n=Xt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var i=r.parseExpression(!0,a);return{type:"color",mode:r.mode,color:n,body:i}},htmlBuilder:ir,mathmlBuilder:or}),ht({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:a}=e,n="["===a.gullet.future().text?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&Xt(n,"size").value}},htmlBuilder(e,t){var r=et.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=_(W(e.size,t)))),r},mathmlBuilder(e,t){var r=new qt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",_(W(e.size,t)))),r}});var sr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},lr=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new i("Expected a control sequence",e);return t},hr=(e,t,r,a)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,a)};ht({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var a=t.fetch();if(sr[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=sr[a.text]),Xt(t.parseFunction(),"internal");throw new i("Invalid token after macro prefix",a)}}),ht({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=t.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new i("Expected a control sequence",a);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new i('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new i('Argument number "'+a.text+'" out of order');s++,l.push([])}else{if("EOF"===a.text)throw new i("Expected a macro definition");l[s].push(a.text)}var{tokens:h}=t.gullet.consumeArg();return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(n,{tokens:h,numArgs:s,delimiters:l},r===sr[r]),{type:"internal",mode:t.mode}}}),ht({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=lr(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return hr(t,a,n,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),ht({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=lr(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return hr(t,a,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var mr=function(e,t,r){var a=L(me.math[e]&&me.math[e].replace||e,t,r);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return a},cr=function(e,t,r,a){var n=r.havingBaseStyle(t),i=et.makeSpan(a.concat(n.sizingClasses(r)),[e],r),o=n.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=n.sizeMultiplier,i},pr=function(e,t,r){var a=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/a.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=_(n),e.height-=n,e.depth+=n},ur=function(e,t,r,a,n,i){var o=function(e,t,r,a){return et.makeSymbol(e,"Size"+t+"-Regular",r,a)}(e,t,n,a),s=cr(et.makeSpan(["delimsizing","size"+t],[o],a),B.TEXT,a,i);return r&&pr(s,a,B.TEXT),s},dr=function(e,t,r){return{type:"elem",elem:et.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[et.makeSpan([],[et.makeSymbol(e,t,r)])])}},gr=function(e,t,r){var a=H["Size4-Regular"][e.charCodeAt(0)]?H["Size4-Regular"][e.charCodeAt(0)][4]:H["Size1-Regular"][e.charCodeAt(0)][4],n=new ie("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new ne([n],{width:_(a),height:_(t),style:"width:"+_(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=et.makeSvgSpan([],[i],r);return o.height=t,o.style.height=_(t),o.style.width=_(a),{type:"elem",elem:o}},fr={type:"kern",size:-.008},vr=["|","\\lvert","\\rvert","\\vert"],br=["\\|","\\lVert","\\rVert","\\Vert"],yr=function(e,t,r,a,n,i){var o,s,l,h,c="",p=0;o=l=h=e,s=null;var u="Size1-Regular";"\\uparrow"===e?l=h="⏐":"\\Uparrow"===e?l=h="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",h="\\Downarrow"):m(vr,e)?(l="∣",c="vert",p=333):m(br,e)?(l="∥",c="doublevert",p=556):"["===e||"\\lbrack"===e?(o="⎡",l="⎢",h="⎣",u="Size4-Regular",c="lbrack",p=667):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",h="⎦",u="Size4-Regular",c="rbrack",p=667):"\\lfloor"===e||"⌊"===e?(l=o="⎢",h="⎣",u="Size4-Regular",c="lfloor",p=667):"\\lceil"===e||"⌈"===e?(o="⎡",l=h="⎢",u="Size4-Regular",c="lceil",p=667):"\\rfloor"===e||"⌋"===e?(l=o="⎥",h="⎦",u="Size4-Regular",c="rfloor",p=667):"\\rceil"===e||"⌉"===e?(o="⎤",l=h="⎥",u="Size4-Regular",c="rceil",p=667):"("===e||"\\lparen"===e?(o="⎛",l="⎜",h="⎝",u="Size4-Regular",c="lparen",p=875):")"===e||"\\rparen"===e?(o="⎞",l="⎟",h="⎠",u="Size4-Regular",c="rparen",p=875):"\\{"===e||"\\lbrace"===e?(o="⎧",s="⎨",h="⎩",l="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",s="⎬",h="⎭",l="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",h="⎩",l="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",h="⎭",l="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",h="⎭",l="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",h="⎩",l="⎪",u="Size4-Regular");var d=mr(o,u,n),g=d.height+d.depth,f=mr(l,u,n),v=f.height+f.depth,b=mr(h,u,n),y=b.height+b.depth,x=0,w=1;if(null!==s){var k=mr(s,u,n);x=k.height+k.depth,w=2}var S=g+y+x,M=S+Math.max(0,Math.ceil((t-S)/(w*v)))*w*v,z=a.fontMetrics().axisHeight;r&&(z*=a.sizeMultiplier);var A=M/2-z,T=[];if(c.length>0){var N=M-g-y,q=Math.round(1e3*M),C=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(c,Math.round(1e3*N)),I=new ie(c,C),R=(p/1e3).toFixed(3)+"em",H=(q/1e3).toFixed(3)+"em",O=new ne([I],{width:R,height:H,viewBox:"0 0 "+p+" "+q}),E=et.makeSvgSpan([],[O],a);E.height=q/1e3,E.style.width=R,E.style.height=H,T.push({type:"elem",elem:E})}else{if(T.push(dr(h,u,n)),T.push(fr),null===s){var L=M-g-y+.016;T.push(gr(l,L,a))}else{var D=(M-g-y-x)/2+.016;T.push(gr(l,D,a)),T.push(fr),T.push(dr(s,u,n)),T.push(fr),T.push(gr(l,D,a))}T.push(fr),T.push(dr(o,u,n))}var V=a.havingBaseStyle(B.TEXT),P=et.makeVList({positionType:"bottom",positionData:A,children:T},V);return cr(et.makeSpan(["delimsizing","mult"],[P],V),B.TEXT,a,i)},xr=.08,wr=function(e,t,r,a,n){var i=function(e,t,r){t*=1e3;var a="";switch(e){case"sqrtMain":a=function(e){return"M95,"+(622+e+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"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+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize1":a=function(e){return"M263,"+(601+e+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"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+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize2":a=function(e){return"M983 "+(10+e+80)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\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+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize3":a=function(e){return"M424,"+(2398+e+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"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+e)+" 80\nh400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize4":a=function(e){return"M473,"+(2713+e+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"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+e)+" 80h400000v"+(40+e)+"H1017.7z"}(t);break;case"sqrtTall":a=function(e,t,r){return"M702 "+(e+80)+"H400000"+(40+e)+"\nH742v"+(r-54-80-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+e)+"H742z"}(t,0,r)}return a}(e,a,r),o=new ie(e,i),s=new ne([o],{width:"400em",height:_(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return et.makeSvgSpan(["hide-tail"],[s],n)},kr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Sr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Mr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],zr=[0,1.2,1.8,2.4,3],Ar=[{type:"small",style:B.SCRIPTSCRIPT},{type:"small",style:B.SCRIPT},{type:"small",style:B.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Tr=[{type:"small",style:B.SCRIPTSCRIPT},{type:"small",style:B.SCRIPT},{type:"small",style:B.TEXT},{type:"stack"}],Br=[{type:"small",style:B.SCRIPTSCRIPT},{type:"small",style:B.SCRIPT},{type:"small",style:B.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Nr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},qr=function(e,t,r,a){for(var n=Math.min(2,3-a.style.size);nt)return r[n]}return r[r.length-1]},Cr=function(e,t,r,a,n,i){var o;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),o=m(Mr,e)?Ar:m(kr,e)?Br:Tr;var s=qr(e,t,o,a);return"small"===s.type?function(e,t,r,a,n,i){var o=et.makeSymbol(e,"Main-Regular",n,a),s=cr(o,t,a,i);return r&&pr(s,a,t),s}(e,s.style,r,a,n,i):"large"===s.type?ur(e,s.size,r,a,n,i):yr(e,t,r,a,n,i)},Ir={sqrtImage:function(e,t){var r,a,n=t.havingBaseSizing(),i=qr("\\surd",e*n.sizeMultiplier,Br,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),h=(1+s)/o,(r=wr("sqrtMain",l=(1+s+xr)/o,m=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",a=.833/o):"large"===i.type?(m=1080*zr[i.size],h=(zr[i.size]+s)/o,l=(zr[i.size]+s+xr)/o,(r=wr("sqrtSize"+i.size,l,m,s,t)).style.minWidth="1.02em",a=1/o):(l=e+s+xr,h=e+s,m=Math.floor(1e3*e+s)+80,(r=wr("sqrtTall",l,m,s,t)).style.minWidth="0.742em",a=1.056),r.height=h,r.style.height=_(l),{span:r,advanceWidth:a,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,a,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),m(kr,e)||m(Mr,e))return ur(e,t,!1,r,a,n);if(m(Sr,e))return yr(e,zr[t],!1,r,a,n);throw new i("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:zr,customSizedDelim:Cr,leftRightDelim:function(e,t,r,a,n,i){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,s=5/a.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return Cr(e,h,!0,a,n,i)}},Rr={"\\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}},Hr=["(","\\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 Or(e,t){var r=_t(e);if(r&&m(Hr,r.text))return r;throw new i(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Er(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ht({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=Or(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Rr[e.funcName].size,mclass:Rr[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?et.makeSpan([e.mclass]):Ir.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Ct(e.delim,e.mode));var r=new qt.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var a=_(Ir.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",a),r.setAttribute("maxsize",a),r}}),ht({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new i("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Or(t[0],e).text,color:r}}}),ht({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Or(t[0],e),a=e.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=Xt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{Er(e);for(var r,a,n=bt(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l{Er(e);var r=Ot(e.body,t);if("."!==e.left){var a=new qt.MathNode("mo",[Ct(e.left,e.mode)]);a.setAttribute("fence","true"),r.unshift(a)}if("."!==e.right){var n=new qt.MathNode("mo",[Ct(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return It(r)}}),ht({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Or(t[0],e);if(!e.parser.leftrightDepth)throw new i("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=St(t,[]);else{r=Ir.sizedDelim(e.delim,1,t,e.mode,[]);var a={delim:e.delim,options:t};r.isMiddle=a}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?Ct("|","text"):Ct(e.delim,e.mode),a=new qt.MathNode("mo",[r]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Lr=(e,t)=>{var r,a,n,i=et.wrapFragment(Mt(e.body,t),t),o=e.label.slice(1),s=t.sizeMultiplier,l=0,h=g(e.body);if("sout"===o)(r=et.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,l=-.5*t.fontMetrics().xHeight;else if("phase"===o){var m=W({number:.6,unit:"pt"},t),c=W({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var p=i.height+i.depth+m+c;i.style.paddingLeft=_(p/2+m);var u=Math.floor(1e3*p*s),d="M400000 "+(a=u)+" H0 L"+a/2+" 0 l65 45 L145 "+(a-80)+" H400000z",f=new ne([new ie("phase",d)],{width:"400em",height:_(u/1e3),viewBox:"0 0 400000 "+u,preserveAspectRatio:"xMinYMin slice"});(r=et.makeSvgSpan(["hide-tail"],[f],t)).style.height=_(p),l=i.depth+m+c}else{/cancel/.test(o)?h||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var v=0,b=0,y=0;/box/.test(o)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=v=t.fontMetrics().fboxsep+("colorbox"===o?0:y)):"angl"===o?(v=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-i.depth)):b=v=h?.2:0,r=function(e,t,r,a,n){var i,o=e.height+e.depth+r+a;if(/fbox|color|angl/.test(t)){if(i=et.makeSpan(["stretchy",t],[],n),"fbox"===t){var s=n.color&&n.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new oe({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new oe({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new ne(l,{width:"100%",height:_(o)});i=et.makeSvgSpan([],[h],n)}return i.height=o,i.style.height=_(o),i}(i,o,v,b,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=_(y)):"angl"===o&&.049!==y&&(r.style.borderTopWidth=_(y),r.style.borderRightWidth=_(y)),l=i.depth+b,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)n=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:i,shift:0}]},t);else{var x=/cancel|phase/.test(o)?["svg-align"]:[];n=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:l,wrapperClasses:x}]},t)}return/cancel/.test(o)&&(n.height=i.height,n.depth=i.depth),/cancel/.test(o)&&!h?et.makeSpan(["mord","cancel-lap"],[n],t):et.makeSpan(["mord"],[n],t)},Dr=(e,t)=>{var r=0,a=new qt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Lt(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*r+"pt"),a.setAttribute("height","+"+2*r+"pt"),a.setAttribute("lspace",r+"pt"),a.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};ht({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Xt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:o}},htmlBuilder:Lr,mathmlBuilder:Dr}),ht({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Xt(t[0],"color-token").color,o=Xt(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:Lr,mathmlBuilder:Dr}),ht({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),ht({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:Lr,mathmlBuilder:Dr}),ht({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Vr={};function Pr(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l{if(!e.parser.settings.displayMode)throw new i("{"+e.envName+"} can be used only in display mode.")};function Xr(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Wr(e,t,r){var{hskipBeforeAndAfter:a,addJot:o,cols:s,arraystretch:l,colSeparationType:h,autoTag:m,singleRow:c,emptySingleRow:p,maxNumCols:u,leqno:d}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){var g=e.gullet.expandMacroAsText("\\arraystretch");if(null==g)l=1;else if(!(l=parseFloat(g))||l<0)throw new i("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var f=[],v=[f],b=[],y=[],x=null!=m?[]:void 0;function w(){m&&e.gullet.macros.set("\\@eqnsw","1",!0)}function k(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new n("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(Boolean(m)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(w(),y.push(Ur(e));;){var S=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),S={type:"ordgroup",mode:e.mode,body:S},r&&(S={type:"styling",mode:e.mode,style:r,body:[S]}),f.push(S);var M=e.fetch().text;if("&"===M){if(u&&f.length===u){if(c||h)throw new i("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===M){k(),1===f.length&&"styling"===S.type&&0===S.body[0].body.length&&(v.length>1||!p)&&v.pop(),y.length0&&(y+=.25),h.push({pos:y,isDashed:e[t]})}for(x(o[0]),r=0;r0&&(S<(T+=b)&&(S=T),T=0),e.addJot&&(S+=g),M.height=k,M.depth=S,y+=k,M.pos=y,y+=S+T,l[r]=M,x(o[r+1])}var N,q,C=y/2+t.fontMetrics().axisHeight,I=e.cols||[],R=[],H=[];if(e.tags&&e.tags.some((e=>e)))for(r=0;r=s)){var Y=void 0;(a>0||e.hskipBeforeAndAfter)&&0!==(Y=c(V.pregap,u))&&((N=et.makeSpan(["arraycolsep"],[])).style.width=_(Y),R.push(N));var X=[];for(r=0;r0){for(var K=et.makeLineSpan("hline",t,m),J=et.makeLineSpan("hdashline",t,m),Q=[{type:"elem",elem:l,shift:0}];h.length>0;){var ee=h.pop(),te=ee.pos-C;ee.isDashed?Q.push({type:"elem",elem:J,shift:te}):Q.push({type:"elem",elem:K,shift:te})}l=et.makeVList({positionType:"individualShift",children:Q},t)}if(0===H.length)return et.makeSpan(["mord"],[l],t);var re=et.makeVList({positionType:"individualShift",children:H},t);return re=et.makeSpan(["tag"],[re],t),et.makeFragment([l,re])},$r={c:"center ",l:"left ",r:"right "},Zr=function(e,t){for(var r=[],a=new qt.MathNode("mtd",[],["mtr-glue"]),n=new qt.MathNode("mtd",[],["mml-eqn-num"]),i=0;i0){var u=e.cols,d="",g=!1,f=0,v=u.length;"separator"===u[0].type&&(c+="top ",f=1),"separator"===u[u.length-1].type&&(c+="bottom ",v-=1);for(var b=f;b0?"left ":"",c+=S[S.length-1].length>0?"right ":"";for(var M=1;M-1?"alignat":"align",o="split"===e.envName,s=Wr(e.parser,{cols:a,addJot:!0,autoTag:o?void 0:Xr(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var m="",c=0;c0&&p&&(g=1),a[u]={type:"align",align:d,pregap:g,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};Pr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(_t(t[0])?[t[0]]:Xt(t[0],"ordgroup").body).map((function(e){var t=Wt(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new i("Unknown column alignment: "+t,e)})),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Wr(e.parser,a,_r(e.envName))},htmlBuilder:jr,mathmlBuilder:Zr}),Pr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var n=e.parser;if(n.consumeSpaces(),"["===n.fetch().text){if(n.consume(),n.consumeSpaces(),r=n.fetch().text,-1==="lcr".indexOf(r))throw new i("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:r}]}}var o=Wr(e.parser,a,_r(e.envName)),s=Math.max(0,...o.body.map((e=>e.length)));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:jr,mathmlBuilder:Zr}),Pr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Wr(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:jr,mathmlBuilder:Zr}),Pr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(_t(t[0])?[t[0]]:Xt(t[0],"ordgroup").body).map((function(e){var t=Wt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new i("Unknown column alignment: "+t,e)}));if(r.length>1)throw new i("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=Wr(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new i("{subarray} can contain only one column");return a},htmlBuilder:jr,mathmlBuilder:Zr}),Pr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Wr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},_r(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:jr,mathmlBuilder:Zr}),Pr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Kr,htmlBuilder:jr,mathmlBuilder:Zr}),Pr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){m(["gather","gather*"],e.envName)&&Yr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Xr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Wr(e.parser,t,"display")},htmlBuilder:jr,mathmlBuilder:Zr}),Pr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Kr,htmlBuilder:jr,mathmlBuilder:Zr}),Pr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Yr(e);var t={autoTag:Xr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Wr(e.parser,t,"display")},htmlBuilder:jr,mathmlBuilder:Zr}),Pr({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Yr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new i("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a,n,o=[],s=[o],l=0;l-1);else{if(!("<>AV".indexOf(p)>-1))throw new i('Expected one of "<>AV=|." after @',h[c]);for(var d=0;d<2;d++){for(var g=!0,f=c+1;f{var r=e.font,a=t.withFont(r);return Mt(e.body,a)},ea=(e,t)=>{var r=e.font,a=t.withFont(r);return Lt(e.body,a)},ta={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ht({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=ct(t[0]),i=a;return i in ta&&(i=ta[i]),{type:"font",mode:r.mode,font:i.slice(1),body:n}},htmlBuilder:Qr,mathmlBuilder:ea}),ht({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,a=t[0],n=g(a);return{type:"mclass",mode:r.mode,mclass:tr(a),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}}),ht({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a,breakOnTokenText:n}=e,{mode:i}=r,o=r.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+a.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:Qr,mathmlBuilder:ea});var ra=(e,t)=>{var r=t;return"display"===e?r=r.id>=B.SCRIPT.id?r.text():B.DISPLAY:"text"===e&&r.size===B.DISPLAY.size?r=B.TEXT:"script"===e?r=B.SCRIPT:"scriptscript"===e&&(r=B.SCRIPTSCRIPT),r},aa=(e,t)=>{var r,a=ra(e.size,t.style),n=a.fracNum(),i=a.fracDen();r=t.havingStyle(n);var o=Mt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(p=t.fontMetrics().num2,u=c):(p=t.fontMetrics().num3,u=3*c),d=t.fontMetrics().denom2),h){var x=t.fontMetrics().axisHeight;p-o.depth-(x+.5*m){var r=new qt.MathNode("mfrac",[Lt(e.numer,t),Lt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var a=W(e.barSize,t);r.setAttribute("linethickness",_(a))}}else r.setAttribute("linethickness","0px");var n=ra(e.size,t.style);if(n.size!==t.style.size){r=new qt.MathNode("mstyle",[r]);var i=n.size===B.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var s=new qt.MathNode("mo",[new qt.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(r),null!=e.rightDelim){var l=new qt.MathNode("mo",[new qt.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return It(o)}return r};ht({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:a,funcName:n}=e,i=t[0],o=t[1],s=null,l=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:a.mode,continued:!1,numer:i,denom:o,hasBarLine:r,leftDelim:s,rightDelim:l,size:h,barSize:null}},htmlBuilder:aa,mathmlBuilder:na}),ht({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:n,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),ht({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:a,token:n}=e;switch(a){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:n}}});var ia=["display","text","script","scriptscript"],oa=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};ht({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:a}=e,n=t[4],i=t[5],o=ct(t[0]),s="atom"===o.type&&"open"===o.family?oa(o.text):null,l=ct(t[1]),h="atom"===l.type&&"close"===l.family?oa(l.text):null,m=Xt(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var p="auto",u=t[3];if("ordgroup"===u.type){if(u.body.length>0){var d=Xt(u.body[0],"textord");p=ia[Number(d.text)]}}else u=Xt(u,"textord"),p=ia[Number(u.text)];return{type:"genfrac",mode:a.mode,numer:n,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h,size:p}},htmlBuilder:aa,mathmlBuilder:na}),ht({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:a,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Xt(t[0],"size").value,token:n}}}),ht({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Xt(t[1],"infix").size),o=t[2],s=i.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:aa,mathmlBuilder:na});var sa=(e,t)=>{var r,a,n=t.style;"supsub"===e.type?(r=e.sup?Mt(e.sup,t.havingStyle(n.sup()),t):Mt(e.sub,t.havingStyle(n.sub()),t),a=Xt(e.base,"horizBrace")):a=Xt(e,"horizBrace");var i,o=Mt(a.base,t.havingBaseStyle(B.DISPLAY)),s=Yt(a,t);if(a.isOver?(i=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=et.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=et.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t);i=a.isOver?et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):et.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return et.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t)};ht({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"horizBrace",mode:r.mode,label:a,isOver:/^\\over/.test(a),base:t[0]}},htmlBuilder:sa,mathmlBuilder:(e,t)=>{var r=Ut(e.label);return new qt.MathNode(e.isOver?"mover":"munder",[Lt(e.base,t),r])}}),ht({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[1],n=Xt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:pt(a)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=bt(e.body,t,!1);return et.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Et(e.body,t);return r instanceof Bt||(r=new Bt("mrow",[r])),r.setAttribute("href",e.href),r}}),ht({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=Xt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:a}))return r.formatUnsupportedCmd("\\url");for(var n=[],i=0;inew qt.MathNode("mrow",Ot(e.body,t))}),ht({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:a,funcName:n,token:o}=e,s=Xt(t[0],"raw").string,l=t[1];a.settings.strict&&a.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h={};switch(n){case"\\htmlClass":h.class=s,r={command:"\\htmlClass",class:s};break;case"\\htmlId":h.id=s,r={command:"\\htmlId",id:s};break;case"\\htmlStyle":h.style=s,r={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var m=s.split(","),c=0;c{var r=bt(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var n=et.makeSpan(a,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&n.setAttribute(i,e.attributes[i]);return n},mathmlBuilder:(e,t)=>Et(e.body,t)}),ht({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:pt(t[0]),mathml:pt(t[1])}},htmlBuilder:(e,t)=>{var r=bt(e.html,t,!1);return et.makeFragment(r)},mathmlBuilder:(e,t)=>Et(e.mathml,t)});var la=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new i("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!X(r))throw new i("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ht({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:a}=e,n={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=Xt(r[0],"raw").string.split(","),m=0;m{var r=W(e.height,t),a=0;e.totalheight.number>0&&(a=W(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=W(e.width,t));var i={height:_(r+a)};n>0&&(i.width=_(n)),a>0&&(i.verticalAlign=_(-a));var o=new te(e.src,e.alt,i);return o.height=r,o.depth=a,o},mathmlBuilder:(e,t)=>{var r=new qt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var a=W(e.height,t),n=0;if(e.totalheight.number>0&&(n=W(e.totalheight,t)-a,r.setAttribute("valign",_(-n))),r.setAttribute("height",_(a+n)),e.width.number>0){var i=W(e.width,t);r.setAttribute("width",_(i))}return r.setAttribute("src",e.src),r}}),ht({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=Xt(t[0],"size");if(r.settings.strict){var i="m"===a[1],o="mu"===n.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+n.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder:(e,t)=>et.makeGlue(e.dimension,t),mathmlBuilder(e,t){var r=W(e.dimension,t);return new qt.SpaceNode(r)}}),ht({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:a.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=et.makeSpan([],[Mt(e.body,t)]),r=et.makeSpan(["inner"],[r],t)):r=et.makeSpan(["inner"],[Mt(e.body,t)]);var a=et.makeSpan(["fix"],[]),n=et.makeSpan([e.alignment],[r,a],t),i=et.makeSpan(["strut"]);return i.style.height=_(n.height+n.depth),n.depth&&(i.style.verticalAlign=_(-n.depth)),n.children.unshift(i),n=et.makeSpan(["thinbox"],[n],t),et.makeSpan(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new qt.MathNode("mpadded",[Lt(e.body,t)]);if("rlap"!==e.alignment){var a="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",a+"width")}return r.setAttribute("width","0px"),r}}),ht({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:a}=e,n=a.mode;a.switchMode("math");var i="\\("===r?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}}),ht({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new i("Mismatched "+e.funcName)}});var ha=(e,t)=>{switch(t.style.size){case B.DISPLAY.size:return e.display;case B.TEXT.size:return e.text;case B.SCRIPT.size:return e.script;case B.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ht({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:pt(t[0]),text:pt(t[1]),script:pt(t[2]),scriptscript:pt(t[3])}},htmlBuilder:(e,t)=>{var r=ha(e,t),a=bt(r,t,!1);return et.makeFragment(a)},mathmlBuilder:(e,t)=>{var r=ha(e,t);return Et(r,t)}});var ma=(e,t,r,a,n,i,o)=>{e=et.makeSpan([],[e]);var s,l,h,m=r&&g(r);if(t){var c=Mt(t,a.havingStyle(n.sup()),a);l={elem:c,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-c.depth)}}if(r){var p=Mt(r,a.havingStyle(n.sub()),a);s={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-p.height)}}if(l&&s){var u=a.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;h=et.makeVList({positionType:"bottom",positionData:u,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:_(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:_(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(s){var d=e.height-o;h=et.makeVList({positionType:"top",positionData:d,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:_(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},a)}else{if(!l)return e;var f=e.depth+o;h=et.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:_(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}var v=[h];if(s&&0!==i&&!m){var b=et.makeSpan(["mspace"],[],a);b.style.marginRight=_(i),v.unshift(b)}return et.makeSpan(["mop","op-limits"],v,a)},ca=["\\smallint"],pa=(e,t)=>{var r,a,n,i=!1;"supsub"===e.type?(r=e.sup,a=e.sub,n=Xt(e.base,"op"),i=!0):n=Xt(e,"op");var o,s=t.style,l=!1;if(s.size===B.DISPLAY.size&&n.symbol&&!m(ca,n.name)&&(l=!0),n.symbol){var h=l?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.slice(1),n.name="oiint"===c?"\\iint":"\\iiint"),o=et.makeSymbol(n.name,h,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),c.length>0){var p=o.italic,u=et.staticSvg(c+"Size"+(l?"2":"1"),t);o=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:u,shift:l?.08:0}]},t),n.name="\\"+c,o.classes.unshift("mop"),o.italic=p}}else if(n.body){var d=bt(n.body,t,!0);1===d.length&&d[0]instanceof ae?(o=d[0]).classes[0]="mop":o=et.makeSpan(["mop"],d,t)}else{for(var g=[],f=1;f{var r;if(e.symbol)r=new Bt("mo",[Ct(e.name,e.mode)]),m(ca,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Bt("mo",Ot(e.body,t));else{r=new Bt("mi",[new Nt(e.name.slice(1))]);var a=new Bt("mo",[Ct("⁡","text")]);r=e.parentIsSupSub?new Bt("mrow",[r,a]):Tt([r,a])}return r},da={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ht({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=a;return 1===n.length&&(n=da[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:pa,mathmlBuilder:ua}),ht({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:pt(a)}},htmlBuilder:pa,mathmlBuilder:ua});var ga={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ht({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:pa,mathmlBuilder:ua}),ht({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:pa,mathmlBuilder:ua}),ht({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,a=r;return 1===a.length&&(a=ga[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:pa,mathmlBuilder:ua});var fa=(e,t)=>{var r,a,n,i,o=!1;if("supsub"===e.type?(r=e.sup,a=e.sub,n=Xt(e.base,"operatorname"),o=!0):n=Xt(e,"operatorname"),n.body.length>0){for(var s=n.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=bt(s,t.withFont("mathrm"),!0),h=0;h{var{parser:r,funcName:a}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:pt(n),alwaysHandleSupSub:"\\operatornamewithlimits"===a,limits:!1,parentIsSupSub:!1}},htmlBuilder:fa,mathmlBuilder:(e,t)=>{for(var r=Ot(e.body,t.withFont("mathrm")),a=!0,n=0;ne.toText())).join("");r=[new qt.TextNode(s)]}var l=new qt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var h=new qt.MathNode("mo",[Ct("⁡","text")]);return e.parentIsSupSub?new qt.MathNode("mrow",[l,h]):qt.newDocumentFragment([l,h])}}),Gr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),mt({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?et.makeFragment(bt(e.body,t,!1)):et.makeSpan(["mord"],bt(e.body,t,!0),t),mathmlBuilder:(e,t)=>Et(e.body,t,!0)}),ht({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,a=t[0];return{type:"overline",mode:r.mode,body:a}},htmlBuilder(e,t){var r=Mt(e.body,t.havingCrampedStyle()),a=et.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,i=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},t);return et.makeSpan(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new qt.MathNode("mo",[new qt.TextNode("‾")]);r.setAttribute("stretchy","true");var a=new qt.MathNode("mover",[Lt(e.body,t),r]);return a.setAttribute("accent","true"),a}}),ht({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"phantom",mode:r.mode,body:pt(a)}},htmlBuilder:(e,t)=>{var r=bt(e.body,t.withPhantom(),!1);return et.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=Ot(e.body,t);return new qt.MathNode("mphantom",r)}}),ht({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"hphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=et.makeSpan([],[Mt(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var a=0;a{var r=Ot(pt(e.body),t),a=new qt.MathNode("mphantom",r),n=new qt.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}}),ht({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"vphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=et.makeSpan(["inner"],[Mt(e.body,t.withPhantom())]),a=et.makeSpan(["fix"],[]);return et.makeSpan(["mord","rlap"],[r,a],t)},mathmlBuilder:(e,t)=>{var r=Ot(pt(e.body),t),a=new qt.MathNode("mphantom",r),n=new qt.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}}),ht({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,a=Xt(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:a,body:n}},htmlBuilder(e,t){var r=Mt(e.body,t),a=W(e.dy,t);return et.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new qt.MathNode("mpadded",[Lt(e.body,t)]),a=e.dy.number+e.dy.unit;return r.setAttribute("voffset",a),r}}),ht({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),ht({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:a}=e,n=r[0],i=Xt(t[0],"size"),o=Xt(t[1],"size");return{type:"rule",mode:a.mode,shift:n&&Xt(n,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=et.makeSpan(["mord","rule"],[],t),a=W(e.width,t),n=W(e.height,t),i=e.shift?W(e.shift,t):0;return r.style.borderRightWidth=_(a),r.style.borderTopWidth=_(n),r.style.bottom=_(i),r.width=a,r.height=n+i,r.depth=-i,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=W(e.width,t),a=W(e.height,t),n=e.shift?W(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new qt.MathNode("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",_(r)),o.setAttribute("height",_(a));var s=new qt.MathNode("mpadded",[o]);return n>=0?s.setAttribute("height",_(n)):(s.setAttribute("height",_(n)),s.setAttribute("depth",_(-n))),s.setAttribute("voffset",_(n)),s}});var ba=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ht({type:"sizing",names:ba,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:ba.indexOf(a)+1,body:i}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return va(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),a=Ot(e.body,r),n=new qt.MathNode("mstyle",a);return n.setAttribute("mathsize",_(r.sizeMultiplier)),n}}),ht({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:a}=e,n=!1,i=!1,o=r[0]&&Xt(r[0],"ordgroup");if(o)for(var s="",l=0;l{var r=et.makeSpan([],[Mt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var a=0;a{var r=new qt.MathNode("mpadded",[Lt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),ht({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a}=e,n=r[0],i=t[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(e,t){var r=Mt(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=et.wrapFragment(r,t);var a=t.fontMetrics().defaultRuleThickness,n=a;t.style.idr.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var c=s.height-r.height-i-l;r.style.paddingLeft=_(h);var p=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+c)},{type:"elem",elem:s},{type:"kern",size:l}]},t);if(e.index){var u=t.havingStyle(B.SCRIPTSCRIPT),d=Mt(e.index,u,t),g=.6*(p.height-p.depth),f=et.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:d}]},t),v=et.makeSpan(["root"],[f]);return et.makeSpan(["mord","sqrt"],[v,p],t)}return et.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:r,index:a}=e;return a?new qt.MathNode("mroot",[Lt(r,t),Lt(a,t)]):new qt.MathNode("msqrt",[Lt(r,t)])}});var ya={display:B.DISPLAY,text:B.TEXT,script:B.SCRIPT,scriptscript:B.SCRIPTSCRIPT};ht({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!0,r),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:i}},htmlBuilder(e,t){var r=ya[e.style],a=t.havingStyle(r).withFont("");return va(e.body,a,t)},mathmlBuilder(e,t){var r=ya[e.style],a=t.havingStyle(r),n=Ot(e.body,a),i=new qt.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}}),mt({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===B.DISPLAY.size||r.alwaysHandleSupSub)?pa:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===B.DISPLAY.size||r.limits)?fa:null:"accent"===r.type?g(r.base)?jt:null:"horizBrace"===r.type&&!e.sub===r.isOver?sa:null:null}(e,t);if(r)return r(e,t);var a,n,i,{base:o,sup:s,sub:l}=e,h=Mt(o,t),m=t.fontMetrics(),c=0,p=0,u=o&&g(o);if(s){var d=t.havingStyle(t.style.sup());a=Mt(s,d,t),u||(c=h.height-d.fontMetrics().supDrop*d.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());n=Mt(l,f,t),u||(p=h.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===B.DISPLAY?m.sup1:t.style.cramped?m.sup3:m.sup2;var v,b=t.sizeMultiplier,y=_(.5/m.ptPerEm/b),x=null;if(n){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(h instanceof ae||w)&&(x=_(-h.italic))}if(a&&n){c=Math.max(c,i,a.depth+.25*m.xHeight),p=Math.max(p,m.sub2);var k=4*m.defaultRuleThickness;if(c-a.depth-(n.height-p)0&&(c+=S,p-=S)}v=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p,marginRight:y,marginLeft:x},{type:"elem",elem:a,shift:-c,marginRight:y}]},t)}else if(n){p=Math.max(p,m.sub1,n.height-.8*m.xHeight),v=et.makeVList({positionType:"shift",positionData:p,children:[{type:"elem",elem:n,marginLeft:x,marginRight:y}]},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");c=Math.max(c,i,a.depth+.25*m.xHeight),v=et.makeVList({positionType:"shift",positionData:-c,children:[{type:"elem",elem:a,marginRight:y}]},t)}var M=kt(h,"right")||"mord";return et.makeSpan([M],[h,et.makeSpan(["msupsub"],[v])],t)},mathmlBuilder(e,t){var r,a=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(a=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,i=[Lt(e.base,t)];if(e.sub&&i.push(Lt(e.sub,t)),e.sup&&i.push(Lt(e.sup,t)),a)n=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;n=o&&"op"===o.type&&o.limits&&t.style===B.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===B.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;n=s&&"op"===s.type&&s.limits&&(t.style===B.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===B.DISPLAY)?"munder":"msub"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===B.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===B.DISPLAY)?"mover":"msup"}return new qt.MathNode(n,i)}}),mt({type:"atom",htmlBuilder:(e,t)=>et.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new qt.MathNode("mo",[Ct(e.text,e.mode)]);if("bin"===e.family){var a=Rt(e,t);"bold-italic"===a&&r.setAttribute("mathvariant",a)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var xa={mi:"italic",mn:"normal",mtext:"normal"};mt({type:"mathord",htmlBuilder:(e,t)=>et.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var r=new qt.MathNode("mi",[Ct(e.text,e.mode,t)]),a=Rt(e,t)||"italic";return a!==xa[r.type]&&r.setAttribute("mathvariant",a),r}}),mt({type:"textord",htmlBuilder:(e,t)=>et.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var r,a=Ct(e.text,e.mode,t),n=Rt(e,t)||"normal";return r="text"===e.mode?new qt.MathNode("mtext",[a]):/[0-9]/.test(e.text)?new qt.MathNode("mn",[a]):"\\prime"===e.text?new qt.MathNode("mo",[a]):new qt.MathNode("mi",[a]),n!==xa[r.type]&&r.setAttribute("mathvariant",n),r}});var wa={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ka={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};mt({type:"spacing",htmlBuilder(e,t){if(ka.hasOwnProperty(e.text)){var r=ka[e.text].className||"";if("text"===e.mode){var a=et.makeOrd(e,t,"textord");return a.classes.push(r),a}return et.makeSpan(["mspace",r],[et.mathsym(e.text,e.mode,t)],t)}if(wa.hasOwnProperty(e.text))return et.makeSpan(["mspace",wa[e.text]],[],t);throw new i('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!ka.hasOwnProperty(e.text)){if(wa.hasOwnProperty(e.text))return new qt.MathNode("mspace");throw new i('Unknown type of space "'+e.text+'"')}return new qt.MathNode("mtext",[new qt.TextNode(" ")])}});var Sa=()=>{var e=new qt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};mt({type:"tag",mathmlBuilder(e,t){var r=new qt.MathNode("mtable",[new qt.MathNode("mtr",[Sa(),new qt.MathNode("mtd",[Et(e.body,t)]),Sa(),new qt.MathNode("mtd",[Et(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Ma={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},za={"\\textbf":"textbf","\\textmd":"textmd"},Aa={"\\textit":"textit","\\textup":"textup"},Ta=(e,t)=>{var r=e.font;return r?Ma[r]?t.withTextFontFamily(Ma[r]):za[r]?t.withTextFontWeight(za[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Aa[r]):t};ht({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"text",mode:r.mode,body:pt(n),font:a}},htmlBuilder(e,t){var r=Ta(e,t),a=bt(e.body,r,!0);return et.makeSpan(["mord","text"],a,r)},mathmlBuilder(e,t){var r=Ta(e,t);return Et(e.body,r)}}),ht({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Mt(e.body,t),a=et.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=et.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:r}]},t);return et.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new qt.MathNode("mo",[new qt.TextNode("‾")]);r.setAttribute("stretchy","true");var a=new qt.MathNode("munder",[Lt(e.body,t),r]);return a.setAttribute("accentunder","true"),a}}),ht({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Mt(e.body,t),a=t.fontMetrics().axisHeight,n=.5*(r.height-a-(r.depth+a));return et.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:(e,t)=>new qt.MathNode("mpadded",[Lt(e.body,t)],["vcenter"])}),ht({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new i("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Ba(e),a=[],n=t.havingStyle(t.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),Na=ot,qa="[ \r\n\t]",Ca="(\\\\[a-zA-Z@]+)"+qa+"*",Ia="[̀-ͯ]",Ra=new RegExp(Ia+"+$"),Ha="("+qa+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+Ia+"*|[\ud800-\udbff][\udc00-\udfff]"+Ia+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Ca+"|\\\\[^\ud800-\udfff])";class Oa{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Ha,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new n("EOF",new a(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new i("Unexpected character: '"+e[t]+"'",new n(e[t],new a(this,t,t+1)));var o=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[o]){var s=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===s?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new n(o,new a(this,t,this.tokenRegex.lastIndex))}}class Ea{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new i("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(var a=0;a0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var La=Fr;Gr("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Gr("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Gr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Gr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Gr("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Gr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Gr("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Da={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};Gr("\\char",(function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new i("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=Da[r.text])||a>=t)throw new i("Invalid base-"+t+" digit "+r.text);for(var n;null!=(n=Da[e.future().text])&&n{var n=e.consumeArg().tokens;if(1!==n.length)throw new i("\\newcommand's first argument must be a macro name");var o=n[0].text,s=e.isDefined(o);if(s&&!t)throw new i("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!s&&!r)throw new i("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var l=0;if(1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var h="",m=e.expandNextToken();"]"!==m.text&&"EOF"!==m.text;)h+=m.text,m=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new i("Invalid number of arguments: "+h);l=parseInt(h),n=e.consumeArg().tokens}return s&&a||e.macros.set(o,{tokens:n,numArgs:l}),""};Gr("\\newcommand",(e=>Va(e,!1,!0,!1))),Gr("\\renewcommand",(e=>Va(e,!0,!1,!1))),Gr("\\providecommand",(e=>Va(e,!0,!0,!0))),Gr("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Gr("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Gr("\\show",(e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Na[r],me.math[r],me.text[r]),""})),Gr("\\bgroup","{"),Gr("\\egroup","}"),Gr("~","\\nobreakspace"),Gr("\\lq","`"),Gr("\\rq","'"),Gr("\\aa","\\r a"),Gr("\\AA","\\r A"),Gr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Gr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Gr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Gr("ℬ","\\mathscr{B}"),Gr("ℰ","\\mathscr{E}"),Gr("ℱ","\\mathscr{F}"),Gr("ℋ","\\mathscr{H}"),Gr("ℐ","\\mathscr{I}"),Gr("ℒ","\\mathscr{L}"),Gr("ℳ","\\mathscr{M}"),Gr("ℛ","\\mathscr{R}"),Gr("ℭ","\\mathfrak{C}"),Gr("ℌ","\\mathfrak{H}"),Gr("ℨ","\\mathfrak{Z}"),Gr("\\Bbbk","\\Bbb{k}"),Gr("·","\\cdotp"),Gr("\\llap","\\mathllap{\\textrm{#1}}"),Gr("\\rlap","\\mathrlap{\\textrm{#1}}"),Gr("\\clap","\\mathclap{\\textrm{#1}}"),Gr("\\mathstrut","\\vphantom{(}"),Gr("\\underbar","\\underline{\\text{#1}}"),Gr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Gr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Gr("\\ne","\\neq"),Gr("≠","\\neq"),Gr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Gr("∉","\\notin"),Gr("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Gr("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Gr("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Gr("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Gr("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Gr("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Gr("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Gr("⟂","\\perp"),Gr("‼","\\mathclose{!\\mkern-0.8mu!}"),Gr("∌","\\notni"),Gr("⌜","\\ulcorner"),Gr("⌝","\\urcorner"),Gr("⌞","\\llcorner"),Gr("⌟","\\lrcorner"),Gr("©","\\copyright"),Gr("®","\\textregistered"),Gr("️","\\textregistered"),Gr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Gr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Gr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Gr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Gr("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Gr("⋮","\\vdots"),Gr("\\varGamma","\\mathit{\\Gamma}"),Gr("\\varDelta","\\mathit{\\Delta}"),Gr("\\varTheta","\\mathit{\\Theta}"),Gr("\\varLambda","\\mathit{\\Lambda}"),Gr("\\varXi","\\mathit{\\Xi}"),Gr("\\varPi","\\mathit{\\Pi}"),Gr("\\varSigma","\\mathit{\\Sigma}"),Gr("\\varUpsilon","\\mathit{\\Upsilon}"),Gr("\\varPhi","\\mathit{\\Phi}"),Gr("\\varPsi","\\mathit{\\Psi}"),Gr("\\varOmega","\\mathit{\\Omega}"),Gr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Gr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Gr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Gr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Gr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Gr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Gr("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Gr("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Pa={",":"\\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"};Gr("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Pa?t=Pa[r]:("\\not"===r.slice(0,4)||r in me.math&&m(["bin","rel"],me.math[r].group))&&(t="\\dotsb"),t}));var Fa={")":!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};Gr("\\dotso",(function(e){return e.future().text in Fa?"\\ldots\\,":"\\ldots"})),Gr("\\dotsc",(function(e){var t=e.future().text;return t in Fa&&","!==t?"\\ldots\\,":"\\ldots"})),Gr("\\cdots",(function(e){return e.future().text in Fa?"\\@cdots\\,":"\\@cdots"})),Gr("\\dotsb","\\cdots"),Gr("\\dotsm","\\cdots"),Gr("\\dotsi","\\!\\cdots"),Gr("\\dotsx","\\ldots\\,"),Gr("\\DOTSI","\\relax"),Gr("\\DOTSB","\\relax"),Gr("\\DOTSX","\\relax"),Gr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Gr("\\,","\\tmspace+{3mu}{.1667em}"),Gr("\\thinspace","\\,"),Gr("\\>","\\mskip{4mu}"),Gr("\\:","\\tmspace+{4mu}{.2222em}"),Gr("\\medspace","\\:"),Gr("\\;","\\tmspace+{5mu}{.2777em}"),Gr("\\thickspace","\\;"),Gr("\\!","\\tmspace-{3mu}{.1667em}"),Gr("\\negthinspace","\\!"),Gr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Gr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Gr("\\enspace","\\kern.5em "),Gr("\\enskip","\\hskip.5em\\relax"),Gr("\\quad","\\hskip1em\\relax"),Gr("\\qquad","\\hskip2em\\relax"),Gr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Gr("\\tag@paren","\\tag@literal{({#1})}"),Gr("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new i("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Gr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Gr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Gr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Gr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Gr("\\newline","\\\\\\relax"),Gr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Ga=_(H["Main-Regular"]["T".charCodeAt(0)][1]-.7*H["Main-Regular"]["A".charCodeAt(0)][1]);Gr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Ga+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Gr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Ga+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Gr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Gr("\\@hspace","\\hskip #1\\relax"),Gr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Gr("\\ordinarycolon",":"),Gr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Gr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Gr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Gr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Gr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Gr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Gr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Gr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Gr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Gr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Gr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Gr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Gr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Gr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Gr("∷","\\dblcolon"),Gr("∹","\\eqcolon"),Gr("≔","\\coloneqq"),Gr("≕","\\eqqcolon"),Gr("⩴","\\Coloneqq"),Gr("\\ratio","\\vcentcolon"),Gr("\\coloncolon","\\dblcolon"),Gr("\\colonequals","\\coloneqq"),Gr("\\coloncolonequals","\\Coloneqq"),Gr("\\equalscolon","\\eqqcolon"),Gr("\\equalscoloncolon","\\Eqqcolon"),Gr("\\colonminus","\\coloneq"),Gr("\\coloncolonminus","\\Coloneq"),Gr("\\minuscolon","\\eqcolon"),Gr("\\minuscoloncolon","\\Eqcolon"),Gr("\\coloncolonapprox","\\Colonapprox"),Gr("\\coloncolonsim","\\Colonsim"),Gr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Gr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Gr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Gr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Gr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Gr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Gr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Gr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Gr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Gr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Gr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Gr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Gr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Gr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Gr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Gr("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Gr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Gr("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Gr("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Gr("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Gr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Gr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Gr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Gr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Gr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Gr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Gr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Gr("\\imath","\\html@mathml{\\@imath}{ı}"),Gr("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Gr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Gr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Gr("⟦","\\llbracket"),Gr("⟧","\\rrbracket"),Gr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Gr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Gr("⦃","\\lBrace"),Gr("⦄","\\rBrace"),Gr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Gr("⦵","\\minuso"),Gr("\\darr","\\downarrow"),Gr("\\dArr","\\Downarrow"),Gr("\\Darr","\\Downarrow"),Gr("\\lang","\\langle"),Gr("\\rang","\\rangle"),Gr("\\uarr","\\uparrow"),Gr("\\uArr","\\Uparrow"),Gr("\\Uarr","\\Uparrow"),Gr("\\N","\\mathbb{N}"),Gr("\\R","\\mathbb{R}"),Gr("\\Z","\\mathbb{Z}"),Gr("\\alef","\\aleph"),Gr("\\alefsym","\\aleph"),Gr("\\Alpha","\\mathrm{A}"),Gr("\\Beta","\\mathrm{B}"),Gr("\\bull","\\bullet"),Gr("\\Chi","\\mathrm{X}"),Gr("\\clubs","\\clubsuit"),Gr("\\cnums","\\mathbb{C}"),Gr("\\Complex","\\mathbb{C}"),Gr("\\Dagger","\\ddagger"),Gr("\\diamonds","\\diamondsuit"),Gr("\\empty","\\emptyset"),Gr("\\Epsilon","\\mathrm{E}"),Gr("\\Eta","\\mathrm{H}"),Gr("\\exist","\\exists"),Gr("\\harr","\\leftrightarrow"),Gr("\\hArr","\\Leftrightarrow"),Gr("\\Harr","\\Leftrightarrow"),Gr("\\hearts","\\heartsuit"),Gr("\\image","\\Im"),Gr("\\infin","\\infty"),Gr("\\Iota","\\mathrm{I}"),Gr("\\isin","\\in"),Gr("\\Kappa","\\mathrm{K}"),Gr("\\larr","\\leftarrow"),Gr("\\lArr","\\Leftarrow"),Gr("\\Larr","\\Leftarrow"),Gr("\\lrarr","\\leftrightarrow"),Gr("\\lrArr","\\Leftrightarrow"),Gr("\\Lrarr","\\Leftrightarrow"),Gr("\\Mu","\\mathrm{M}"),Gr("\\natnums","\\mathbb{N}"),Gr("\\Nu","\\mathrm{N}"),Gr("\\Omicron","\\mathrm{O}"),Gr("\\plusmn","\\pm"),Gr("\\rarr","\\rightarrow"),Gr("\\rArr","\\Rightarrow"),Gr("\\Rarr","\\Rightarrow"),Gr("\\real","\\Re"),Gr("\\reals","\\mathbb{R}"),Gr("\\Reals","\\mathbb{R}"),Gr("\\Rho","\\mathrm{P}"),Gr("\\sdot","\\cdot"),Gr("\\sect","\\S"),Gr("\\spades","\\spadesuit"),Gr("\\sub","\\subset"),Gr("\\sube","\\subseteq"),Gr("\\supe","\\supseteq"),Gr("\\Tau","\\mathrm{T}"),Gr("\\thetasym","\\vartheta"),Gr("\\weierp","\\wp"),Gr("\\Zeta","\\mathrm{Z}"),Gr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Gr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Gr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Gr("\\bra","\\mathinner{\\langle{#1}|}"),Gr("\\ket","\\mathinner{|{#1}\\rangle}"),Gr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Gr("\\Bra","\\left\\langle#1\\right|"),Gr("\\Ket","\\left|#1\\right\\rangle");var Ua=e=>t=>{var r=t.consumeArg().tokens,a=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>r=>{e&&(r.macros.set("|",o),n.length&&r.macros.set("\\|",s));var i=t;return!t&&n.length&&"|"===r.future().text&&(r.popToken(),i=!0),{tokens:i?n:a,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,m=t.expandTokens([...i,...h,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};Gr("\\bra@ket",Ua(!1)),Gr("\\bra@set",Ua(!0)),Gr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Gr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Gr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Gr("\\angln","{\\angl n}"),Gr("\\blue","\\textcolor{##6495ed}{#1}"),Gr("\\orange","\\textcolor{##ffa500}{#1}"),Gr("\\pink","\\textcolor{##ff00af}{#1}"),Gr("\\red","\\textcolor{##df0030}{#1}"),Gr("\\green","\\textcolor{##28ae7b}{#1}"),Gr("\\gray","\\textcolor{gray}{#1}"),Gr("\\purple","\\textcolor{##9d38bd}{#1}"),Gr("\\blueA","\\textcolor{##ccfaff}{#1}"),Gr("\\blueB","\\textcolor{##80f6ff}{#1}"),Gr("\\blueC","\\textcolor{##63d9ea}{#1}"),Gr("\\blueD","\\textcolor{##11accd}{#1}"),Gr("\\blueE","\\textcolor{##0c7f99}{#1}"),Gr("\\tealA","\\textcolor{##94fff5}{#1}"),Gr("\\tealB","\\textcolor{##26edd5}{#1}"),Gr("\\tealC","\\textcolor{##01d1c1}{#1}"),Gr("\\tealD","\\textcolor{##01a995}{#1}"),Gr("\\tealE","\\textcolor{##208170}{#1}"),Gr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Gr("\\greenB","\\textcolor{##8af281}{#1}"),Gr("\\greenC","\\textcolor{##74cf70}{#1}"),Gr("\\greenD","\\textcolor{##1fab54}{#1}"),Gr("\\greenE","\\textcolor{##0d923f}{#1}"),Gr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Gr("\\goldB","\\textcolor{##ffbb71}{#1}"),Gr("\\goldC","\\textcolor{##ff9c39}{#1}"),Gr("\\goldD","\\textcolor{##e07d10}{#1}"),Gr("\\goldE","\\textcolor{##a75a05}{#1}"),Gr("\\redA","\\textcolor{##fca9a9}{#1}"),Gr("\\redB","\\textcolor{##ff8482}{#1}"),Gr("\\redC","\\textcolor{##f9685d}{#1}"),Gr("\\redD","\\textcolor{##e84d39}{#1}"),Gr("\\redE","\\textcolor{##bc2612}{#1}"),Gr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Gr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Gr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Gr("\\maroonD","\\textcolor{##ca337c}{#1}"),Gr("\\maroonE","\\textcolor{##9e034e}{#1}"),Gr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Gr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Gr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Gr("\\purpleD","\\textcolor{##7854ab}{#1}"),Gr("\\purpleE","\\textcolor{##543b78}{#1}"),Gr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Gr("\\mintB","\\textcolor{##edf2df}{#1}"),Gr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Gr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Gr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Gr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Gr("\\grayD","\\textcolor{##d6d8da}{#1}"),Gr("\\grayE","\\textcolor{##babec2}{#1}"),Gr("\\grayF","\\textcolor{##888d93}{#1}"),Gr("\\grayG","\\textcolor{##626569}{#1}"),Gr("\\grayH","\\textcolor{##3b3e40}{#1}"),Gr("\\grayI","\\textcolor{##21242c}{#1}"),Gr("\\kaBlue","\\textcolor{##314453}{#1}"),Gr("\\kaGreen","\\textcolor{##71B307}{#1}");var Ya={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Xa{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ea(La,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Oa(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,a;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:a,end:r}=this.consumeArg(["]"]))}else({tokens:a,start:t,end:r}=this.consumeArg());return this.pushToken(new n("EOF",r.loc)),this.pushTokens(a),t.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,n=this.future(),o=0,s=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1==--o)throw new i("Extra }",a)}else if("EOF"===a.text)throw new i("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[s])&&a.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:a}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new i("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;athis.settings.maxExpand)throw new i("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,a=t.noexpand?null:this._getExpansion(r);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===r[0]&&!this.isDefined(r))throw new i("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var n=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var s=(n=n.slice()).length-1;s>=0;--s){var l=n[s];if("#"===l.text){if(0===s)throw new i("Incomplete placeholder at end of macro body",l);if("#"===(l=n[--s]).text)n.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new i("Not a valid argument number",l);n.splice(s,2,...o[+l.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new n(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),t.push(a)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var a="function"==typeof t?t(this):t;if("string"==typeof a){var n=0;if(-1!==a.indexOf("#"))for(var i=a.replace(/##/g,"");-1!==i.indexOf("#"+(n+1));)++n;for(var o=new Oa(a,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:n}}return a}isDefined(e){return this.macros.has(e)||Na.hasOwnProperty(e)||me.math.hasOwnProperty(e)||me.text.hasOwnProperty(e)||Ya.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Na.hasOwnProperty(e)&&!Na[e].primitive}}var Wa=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,_a=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",ᵝ:"β",ᵞ:"γ",ᵟ:"δ",ᵠ:"ϕ",ᵡ:"χ",ᶿ:"θ"}),ja={"́":{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"}},$a={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Za{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Xa(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new i("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new n("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==Za.endOfExpression.indexOf(a.text))break;if(t&&a.text===t)break;if(e&&Na[a.text]&&Na[a.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,a=0;a=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var l,h=me[this.mode][t].group,m=a.range(e);if(le.hasOwnProperty(h)){var c=h;l={type:"atom",mode:this.mode,family:c,loc:m,text:t}}else l={type:h,mode:this.mode,loc:m,text:t};o=l}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(C(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:a.range(e),text:t}}if(this.consume(),s)for(var p=0;p{n.d(r,{A:()=>c});var e=n(2050);function o(t){var r=-1,n=null==t?0:t.length;for(this.__data__=new e.A;++r{n.d(r,{A:()=>e});const e=function(t,r){for(var n=-1,e=null==t?0:t.length;++n{n.d(r,{A:()=>e});const e=function(t,r){for(var n=-1,e=null==t?0:t.length,o=0,c=[];++n{n.d(r,{A:()=>o});var e=n(5205);const o=function(t,r){return!(null==t||!t.length)&&(0,e.A)(t,r,0)>-1}},7809:(t,r,n)=>{n.d(r,{A:()=>e});const e=function(t,r,n){for(var e=-1,o=null==t?0:t.length;++e{n.d(r,{A:()=>e});const e=function(t,r){for(var n=-1,e=null==t?0:t.length,o=Array(e);++n{n.d(r,{A:()=>e});const e=function(t,r){for(var n=-1,e=r.length,o=t.length;++n{n.d(r,{A:()=>e});const e=function(t,r){for(var n=-1,e=null==t?0:t.length;++n{n.d(r,{A:()=>$});var e=n(2080),o=n(2641),c=n(2851),u=n(2031),a=n(5041);var i=n(9999);var A=n(154),f=n(9759),s=n(4792);var v=n(3511);var l=n(9042),b=n(3973),d=n(9137),j=Object.prototype.hasOwnProperty;var p=n(565);var h=/\w*$/;var y=n(241),g=y.A?y.A.prototype:void 0,w=g?g.valueOf:void 0;var _=n(1801);const O=function(t,r,n){var e,o,c,u=t.constructor;switch(r){case"[object ArrayBuffer]":return(0,p.A)(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return function(t,r){var n=r?(0,p.A)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);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,_.A)(t,n);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return(c=new(o=t).constructor(o.source,h.exec(o))).lastIndex=o.lastIndex,c;case"[object Symbol]":return e=t,w?Object(w.call(e)):{}}};var m=n(407),S=n(2049),k=n(1200),E=n(3098);var x=n(2789),I=n(4841),U=I.A&&I.A.isMap;const B=U?(0,x.A)(U):function(t){return(0,E.A)(t)&&"[object Map]"==(0,d.A)(t)};var C=n(3149);var D=I.A&&I.A.isSet;const F=D?(0,x.A)(D):function(t){return(0,E.A)(t)&&"[object Set]"==(0,d.A)(t)};var M="[object Arguments]",z="[object Function]",L="[object Object]",P={};P[M]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[L]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[z]=P["[object WeakMap]"]=!1;const $=function t(r,n,p,h,y,g){var w,_=1&n,E=2&n,x=4&n;if(p&&(w=y?p(r,h,y,g):p(r)),void 0!==w)return w;if(!(0,C.A)(r))return r;var I=(0,S.A)(r);if(I){if(w=function(t){var r=t.length,n=new t.constructor(r);return r&&"string"==typeof t[0]&&j.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(r),!_)return(0,f.A)(r,w)}else{var U=(0,d.A)(r),D=U==z||"[object GeneratorFunction]"==U;if((0,k.A)(r))return(0,A.A)(r,_);if(U==L||U==M||D&&!y){if(w=E||D?{}:(0,m.A)(r),!_)return E?function(t,r){return(0,u.A)(t,(0,v.A)(t),r)}(r,function(t,r){return t&&(0,u.A)(r,(0,i.A)(r),t)}(w,r)):function(t,r){return(0,u.A)(t,(0,s.A)(t),r)}(r,function(t,r){return t&&(0,u.A)(r,(0,a.A)(r),t)}(w,r))}else{if(!P[U])return y?r:{};w=O(r,U,_)}}g||(g=new e.A);var $=g.get(r);if($)return $;g.set(r,w),F(r)?r.forEach((function(e){w.add(t(e,n,p,e,r,g))})):B(r)&&r.forEach((function(e,o){w.set(o,t(e,n,p,o,r,g))}));var N=x?E?b.A:l.A:E?i.A:a.A,R=I?void 0:N(r);return(0,o.A)(R||r,(function(e,o){R&&(e=r[o=e]),(0,c.A)(w,o,t(e,n,p,o,r,g))})),w}},4288:(t,r,n)=>{n.d(r,{A:()=>c});var e=n(9841),o=n(8446);const c=(u=e.A,function(t,r){if(null==t)return t;if(!(0,o.A)(t))return u(t,r);for(var n=t.length,e=-1,c=Object(t);++e{n.d(r,{A:()=>o});var e=n(4288);const o=function(t,r){var n=[];return(0,e.A)(t,(function(t,e,o){r(t,e,o)&&n.push(t)})),n}},5707:(t,r,n)=>{n.d(r,{A:()=>e});const e=function(t,r,n,e){for(var o=t.length,c=n+(e?1:-1);e?c--:++c{n.d(r,{A:()=>A});var e=n(6912),o=n(241),c=n(5175),u=n(2049),a=o.A?o.A.isConcatSpreadable:void 0;const i=function(t){return(0,u.A)(t)||(0,c.A)(t)||!!(a&&t&&t[a])},A=function t(r,n,o,c,u){var a=-1,A=r.length;for(o||(o=i),u||(u=[]);++a0&&o(f)?n>1?t(f,n-1,o,c,u):(0,e.A)(u,f):c||(u[u.length]=f)}return u}},9841:(t,r,n)=>{n.d(r,{A:()=>c});var e=n(7132),o=n(5041);const c=function(t,r){return t&&(0,e.A)(t,r,o.A)}},6318:(t,r,n)=>{n.d(r,{A:()=>c});var e=n(1521),o=n(901);const c=function(t,r){for(var n=0,c=(r=(0,e.A)(r,t)).length;null!=t&&n{n.d(r,{A:()=>c});var e=n(6912),o=n(2049);const c=function(t,r,n){var c=r(t);return(0,o.A)(t)?c:(0,e.A)(c,n(t))}},5205:(t,r,n)=>{n.d(r,{A:()=>c});var e=n(5707);const o=function(t){return t!=t},c=function(t,r,n){return r==r?function(t,r,n){for(var e=n-1,o=t.length;++e{n.d(r,{A:()=>R});var e=n(2080),o=n(8300),c=n(3736),u=n(4099);const a=function(t,r,n,e,a,i){var A=1&n,f=t.length,s=r.length;if(f!=s&&!(A&&s>f))return!1;var v=i.get(t),l=i.get(r);if(v&&l)return v==r&&l==t;var b=-1,d=!0,j=2&n?new o.A:void 0;for(i.set(t,r),i.set(r,t);++b{n.d(r,{A:()=>e});const e=function(t){return function(r){return null==r?void 0:r[t]}}},7371:(t,r,n)=>{n.d(r,{A:()=>s});var e=n(8300),o=n(5530),c=n(7809),u=n(4099),a=n(9857),i=n(2302),A=n(9959);const f=a.A&&1/(0,A.A)(new a.A([,-0]))[1]==1/0?function(t){return new a.A(t)}:i.A,s=function(t,r,n){var a=-1,i=o.A,s=t.length,v=!0,l=[],b=l;if(n)v=!1,i=c.A;else if(s>=200){var d=r?null:f(t);if(d)return(0,A.A)(d);v=!1,i=u.A,b=new e.A}else b=r?[]:l;t:for(;++a{n.d(r,{A:()=>e});const e=function(t,r){return t.has(r)}},9922:(t,r,n)=>{n.d(r,{A:()=>o});var e=n(9008);const o=function(t){return"function"==typeof t?t:e.A}},1521:(t,r,n)=>{n.d(r,{A:()=>v});var e=n(2049),o=n(6586),c=n(6632),u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const i=(A=(0,c.A)((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(u,(function(t,n,e,o){r.push(e?o.replace(a,"$1"):n||t)})),r}),(function(t){return 500===f.size&&f.clear(),t})),f=A.cache,A);var A,f,s=n(3456);const v=function(t,r){return(0,e.A)(t)?t:(0,o.A)(t,r)?[t]:i((0,s.A)(t))}},9042:(t,r,n)=>{n.d(r,{A:()=>u});var e=n(6212),o=n(4792),c=n(5041);const u=function(t){return(0,e.A)(t,c.A,o.A)}},3973:(t,r,n)=>{n.d(r,{A:()=>u});var e=n(6212),o=n(3511),c=n(9999);const u=function(t){return(0,e.A)(t,c.A,o.A)}},4792:(t,r,n)=>{n.d(r,{A:()=>a});var e=n(2634),o=n(3153),c=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols;const a=u?function(t){return null==t?[]:(t=Object(t),(0,e.A)(u(t),(function(r){return c.call(t,r)})))}:o.A},3511:(t,r,n)=>{n.d(r,{A:()=>a});var e=n(6912),o=n(5647),c=n(4792),u=n(3153);const a=Object.getOwnPropertySymbols?function(t){for(var r=[];t;)(0,e.A)(r,(0,c.A)(t)),t=(0,o.A)(t);return r}:u.A},5054:(t,r,n)=>{n.d(r,{A:()=>A});var e=n(1521),o=n(5175),c=n(2049),u=n(5353),a=n(5254),i=n(901);const A=function(t,r,n){for(var A=-1,f=(r=(0,e.A)(r,t)).length,s=!1;++A{n.d(r,{A:()=>a});var e=n(2049),o=n(9501),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;const a=function(t,r){if((0,e.A)(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!(0,o.A)(t))||u.test(t)||!c.test(t)||null!=r&&t in Object(r)}},9959:(t,r,n)=>{n.d(r,{A:()=>e});const e=function(t){var r=-1,n=Array(t.size);return t.forEach((function(t){n[++r]=t})),n}},901:(t,r,n)=>{n.d(r,{A:()=>o});var e=n(9501);const o=function(t){if("string"==typeof t||(0,e.A)(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},4092:(t,r,n)=>{n.d(r,{A:()=>a});var e=n(2634),o=n(1790),c=n(6307),u=n(2049);const a=function(t,r){return((0,u.A)(t)?e.A:o.A)(t,(0,c.A)(r,3))}},8058:(t,r,n)=>{n.d(r,{A:()=>a});var e=n(2641),o=n(4288),c=n(9922),u=n(2049);const a=function(t,r){return((0,u.A)(t)?e.A:o.A)(t,(0,c.A)(r))}},6964:(t,r,n)=>{n.d(r,{A:()=>c});const e=function(t,r){return null!=t&&r in Object(t)};var o=n(5054);const c=function(t,r){return null!=t&&(0,o.A)(t,r,e)}},9501:(t,r,n)=>{n.d(r,{A:()=>c});var e=n(2383),o=n(3098);const c=function(t){return"symbol"==typeof t||(0,o.A)(t)&&"[object Symbol]"==(0,e.A)(t)}},9592:(t,r,n)=>{n.d(r,{A:()=>e});const e=function(t){return void 0===t}},5041:(t,r,n)=>{n.d(r,{A:()=>u});var e=n(2505),o=n(4453),c=n(8446);const u=function(t){return(0,c.A)(t)?(0,e.A)(t):(0,o.A)(t)}},2302:(t,r,n)=>{n.d(r,{A:()=>e});const e=function(){}},3130:(t,r,n)=>{n.d(r,{A:()=>i});const e=function(t,r,n,e){var o=-1,c=null==t?0:t.length;for(e&&c&&(n=t[++o]);++o{n.d(r,{A:()=>e});const e=function(){return[]}},3456:(t,r,n)=>{n.d(r,{A:()=>f});var e=n(241),o=n(5572),c=n(2049),u=n(9501),a=e.A?e.A.prototype:void 0,i=a?a.toString:void 0;const A=function t(r){if("string"==typeof r)return r;if((0,c.A)(r))return(0,o.A)(r,t)+"";if((0,u.A)(r))return i?i.call(r):"";var n=r+"";return"0"==n&&1/r==-1/0?"-0":n},f=function(t){return null==t?"":A(t)}},2866:(t,r,n)=>{n.d(r,{A:()=>c});var e=n(5572);var o=n(5041);const c=function(t){return null==t?[]:function(t,r){return(0,e.A)(r,(function(r){return t[r]}))}(t,(0,o.A)(t))}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/165-06872da1.chunk.min.js b/docs/hugo/public/js/165-06872da1.chunk.min.js new file mode 100644 index 000000000..e2fd12b18 --- /dev/null +++ b/docs/hugo/public/js/165-06872da1.chunk.min.js @@ -0,0 +1,2 @@ +/*! For license information please see 165-06872da1.chunk.min.js.LICENSE.txt */ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[165],{165:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}n.d(t,{A:()=>ju});var h="undefined"==typeof window?null:window,p=h?h.navigator:null;h&&h.document;var f=r(""),g=r({}),v=r((function(){})),y="undefined"==typeof HTMLElement?"undefined":r(HTMLElement),m=function(e){return e&&e.instanceString&&x(e.instanceString)?e.instanceString():null},b=function(e){return null!=e&&r(e)==f},x=function(e){return null!=e&&r(e)===v},w=function(e){return!S(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},E=function(e){return null!=e&&r(e)===g&&!w(e)&&e.constructor===Object},k=function(e){return null!=e&&r(e)===r(1)&&!isNaN(e)},C=function(e){return"undefined"===y?void 0:null!=e&&e instanceof HTMLElement},S=function(e){return P(e)||D(e)},P=function(e){return"collection"===m(e)&&e._private.single},D=function(e){return"collection"===m(e)&&!e._private.single},T=function(e){return"core"===m(e)},_=function(e){return"stylesheet"===m(e)},M=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},B=function(e){return function(e){return null!=e&&r(e)===g}(e)&&x(e.then)},N=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;tt?1:0},Y=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n=t||n<0||d&&e-u>=i}function g(){var e=Q();if(f(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?ye(n,i-(e-u)):n}(e))}function v(e){return s=void 0,h&&r?p(e):(r=a=void 0,o)}function y(){var e=Q(),n=f(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),c?p(e):o}(l);if(d)return clearTimeout(s),s=setTimeout(g,t),p(l)}return void 0===s&&(s=setTimeout(g,t)),o}return t=ge(t)||0,K(n)&&(c=!!n.leading,i=(d="maxWait"in n)?ve(ge(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=a=s=void 0},y.flush=function(){return void 0===s?o:v(Q())},y},be=h?h.performance:null,xe=be&&be.now?function(){return be.now()}:function(){return Date.now()},we=function(){if(h){if(h.requestAnimationFrame)return function(e){h.requestAnimationFrame(e)};if(h.mozRequestAnimationFrame)return function(e){h.mozRequestAnimationFrame(e)};if(h.webkitRequestAnimationFrame)return function(e){h.webkitRequestAnimationFrame(e)};if(h.msRequestAnimationFrame)return function(e){h.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(xe())}),1e3/60)}}(),Ee=function(e){return we(e)},ke=xe,Ce=9261,Se=5381,Pe=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ce;!(t=e.next()).done;)n=65599*n+t.value|0;return n},De=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ce)+e|0},Te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Se;return(t<<5)+t+e|0},_e=function(e){return 2097152*e[0]+e[1]},Me=function(e,t){return[De(e[0],t[0]),Te(e[1],t[1])]},Be=function(e,t){var n={value:0,done:!1},r=0,a=e.length;return Pe({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},$e=function(e){e.splice(0,e.length)},Qe=function(e,t,n){return n&&(t=A(n,t)),e[t]},Je=function(e,t,n,r){n&&(t=A(n,t)),e[t]=r},et="undefined"!=typeof Map?Map:function(){function e(){a(this,e),this._obj={}}return o(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),tt=function(){function e(t){if(a(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&T(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new nt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition){var i=t.renderedPosition,o=e.pan(),s=e.zoom();a.position={x:(i.x-o.x)/s,y:(i.y-o.y)/s}}var l=[];w(t.classes)?l=t.classes:b(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;ut?1:0},u=function(e,t,a,i,o){var s;if(null==a&&(a=0),null==o&&(o=n),a<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);an;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;ig;0<=g?++h:--h)v.push(i(e,r));return v},f=function(e,t,r,a){var i,o,s;for(null==a&&(a=n),i=e[r];r>t&&a(i,o=e[s=r-1>>1])<0;)e[r]=o,r=s;return e[r]=i},g=function(e,t,r){var a,i,o,s,l;for(null==r&&(r=n),i=e.length,l=t,o=e[t],a=2*t+1;a0;){var k=y.pop(),C=g(k),S=k.id();if(d[S]=C,C!==1/0)for(var P=k.neighborhood().intersect(p),D=0;D0)for(n.unshift(t);c[a];){var i=c[a];n.unshift(i.edge),n.unshift(i.node),a=(r=i.node).id()}return o.spawn(n)}}}},dt={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,a=n.length,i=new Array(a),o=n,s=function(e){for(var t=0;t0;){if(u=(l=g.pop()).id(),v.delete(u),w++,u===d){for(var E=[],k=a,C=d,S=m[C];E.unshift(k),null!=S&&E.unshift(S),null!=(k=y[C]);)S=m[C=k.id()];return{found:!0,distance:h[u],path:this.spawn(E),steps:w}}f[u]=!0;for(var P=l._private.edges,D=0;DD&&(p[P]=D,y[P]=S,m[P]=w),!a){var T=S*u+C;!a&&p[T]>D&&(p[T]=D,y[T]=C,m[T]=w)}}}for(var _=0;_1&&void 0!==arguments[1]?arguments[1]:i,r=[],a=m(e);;){if(null==a)return t.spawn();var o=y(a),l=o.edge,u=o.pred;if(r.unshift(a[0]),a.same(n)&&r.length>0)break;null!=l&&r.unshift(l),a=u}return s.spawn(r)},hasNegativeWeightCycle:f,negativeWeightCycles:g}}},mt=Math.sqrt(2),bt=function(e,t,n){0===n.length&&qe("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],a=r[1],i=r[2],o=t[a],s=t[i],l=n,u=l.length-1;u>=0;u--){var c=l[u],d=c[1],h=c[2];(t[d]===o&&t[h]===s||t[d]===s&&t[h]===o)&&l.splice(u,1)}for(var p=0;pr;){var a=Math.floor(Math.random()*t.length);t=bt(a,e,t),n--}return t},wt={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var a=n.length,i=r.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),s=Math.floor(a/mt);if(!(a<2)){for(var l=[],u=0;u0?1:e<0?-1:0},Tt=function(e,t){return Math.sqrt(_t(e,t))},_t=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Mt=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},At=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},Lt=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},Ot=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Rt=function(e){var t,n,r,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===i.length)t=n=r=a=i[0];else if(2===i.length)t=r=i[0],a=n=i[1];else if(4===i.length){var o=l(i,4);t=o[0],n=o[1],r=o[2],a=o[3]}return e.x1-=a,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Vt=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Ft=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},jt=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},qt=function(e,t){return jt(e,t.x1,t.y1)&&jt(e,t.x2,t.y2)},Yt=function(e,t,n,r,a,i,o){var s,l,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",c="auto"===u?ln(a,i):u,d=a/2,h=i/2,p=(c=Math.min(c,d,h))!==d,f=c!==h;if(p){var g=r-h-o;if((s=tn(e,t,n,r,n-d+c-o,g,n+d-c+o,g,!1)).length>0)return s}if(f){var v=n+d+o;if((s=tn(e,t,n,r,v,r-h+c-o,v,r+h-c+o,!1)).length>0)return s}if(p){var y=r+h+o;if((s=tn(e,t,n,r,n-d+c-o,y,n+d-c+o,y,!1)).length>0)return s}if(f){var m=n-d-o;if((s=tn(e,t,n,r,m,r-h+c-o,m,r+h-c+o,!1)).length>0)return s}var b=n-d+c,x=r-h+c;if((l=Jt(e,t,n,r,b,x,c+o)).length>0&&l[0]<=b&&l[1]<=x)return[l[0],l[1]];var w=n+d-c,E=r-h+c;if((l=Jt(e,t,n,r,w,E,c+o)).length>0&&l[0]>=w&&l[1]<=E)return[l[0],l[1]];var k=n+d-c,C=r+h-c;if((l=Jt(e,t,n,r,k,C,c+o)).length>0&&l[0]>=k&&l[1]>=C)return[l[0],l[1]];var S=n-d+c,P=r+h-c;return(l=Jt(e,t,n,r,S,P,c+o)).length>0&&l[0]<=S&&l[1]>=P?[l[0],l[1]]:[]},Xt=function(e,t,n,r,a,i,o){var s=o,l=Math.min(n,a),u=Math.max(n,a),c=Math.min(r,i),d=Math.max(r,i);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},Wt=function(e,t,n,r,a,i,o,s,l){var u=Math.min(n,o,a)-l,c=Math.max(n,o,a)+l,d=Math.min(r,s,i)-l,h=Math.max(r,s,i)+l;return!(ec||th)},Ht=function(e,t,n,r,a,i,o,s){var l,u,c,d,h,p,f,g,v,y,m,b,x,w=[];u=9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*r*i-3*r*r-3*r*s-6*i*i+3*i*s,c=3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t,d=1*n*a-n*n+n*e-a*e+r*i-r*r+r*t-i*t,0===(l=1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s)&&(l=1e-5),g=-27*(d/=l)+(u/=l)*(9*(c/=l)-u*u*2),p=(f=(3*c-u*u)/9)*f*f+(g/=54)*g,(h=w)[1]=0,b=u/3,p>0?(y=(y=g+Math.sqrt(p))<0?-Math.pow(-y,1/3):Math.pow(y,1/3),m=(m=g-Math.sqrt(p))<0?-Math.pow(-m,1/3):Math.pow(m,1/3),h[0]=-b+y+m,b+=(y+m)/2,h[4]=h[2]=-b,b=Math.sqrt(3)*(-m+y)/2,h[3]=b,h[5]=-b):(h[5]=h[3]=0,0===p?(x=g<0?-Math.pow(-g,1/3):Math.pow(g,1/3),h[0]=2*x-b,h[4]=h[2]=-(x+b)):(v=(f=-f)*f*f,v=Math.acos(g/Math.sqrt(v)),x=2*Math.sqrt(f),h[0]=-b+x*Math.cos(v/3),h[2]=-b+x*Math.cos((v+2*Math.PI)/3),h[4]=-b+x*Math.cos((v+4*Math.PI)/3)));for(var E=[],k=0;k<6;k+=2)Math.abs(w[k+1])<1e-7&&w[k]>=0&&w[k]<=1&&E.push(w[k]);E.push(1),E.push(0);for(var C,S,P,D=-1,T=0;T=0?Pl?(e-a)*(e-a)+(t-i)*(t-i):u-d},Gt=function(e,t,n){for(var r,a,i,o,s=0,l=0;l=e&&e>=i||r<=e&&e<=i))continue;(e-r)/(i-r)*(o-a)+a>t&&s++}return s%2!=0},Ut=function(e,t,n,r,a,i,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var d,h=Math.cos(-u),p=Math.sin(-u),f=0;f0){var g=$t(c,-l);d=Zt(g)}else d=c;return Gt(e,t,d)},Zt=function(e){for(var t,n,r,a,i,o,s,l,u=new Array(e.length/2),c=0;c=0&&f<=1&&v.push(f),g>=0&&g<=1&&v.push(g),0===v.length)return[];var y=v[0]*s[0]+e,m=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,m]:[y,m,v[1]*s[0]+e,v[1]*s[1]+t]:[y,m]},en=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},tn=function(e,t,n,r,a,i,o,s,l){var u=e-a,c=n-e,d=o-a,h=t-i,p=r-t,f=s-i,g=d*h-f*u,v=c*h-p*u,y=f*c-d*p;if(0!==y){var m=g/y,b=v/y,x=-.001;return x<=m&&m<=1.001&&x<=b&&b<=1.001||l?[e+m*c,t+m*p]:[]}return 0===g||0===v?en(e,n,o)===o?[o,s]:en(e,n,a)===a?[a,i]:en(a,o,n)===n?[n,r]:[]:[]},nn=function(e,t,n,r,a,i,o,s){var l,u,c,d,h,p,f=[],g=new Array(n.length),v=!0;if(null==i&&(v=!1),v){for(var y=0;y0){var m=$t(g,-s);u=Zt(m)}else u=g}else u=n;for(var b=0;bu&&(u=t)},d=function(e){return l[e]},h=0;h0?x.edgesTo(b)[0]:b.edgesTo(x)[0];var w=r(m);b=b.id(),h[b]>h[v]+w&&(h[b]=h[v]+w,p.nodes.indexOf(b)<0?p.push(b):p.updateItem(b),u[b]=0,l[b]=[]),h[b]==h[v]+w&&(u[b]=u[b]+u[v],l[b].push(v))}else for(var E=0;E0;){for(var P=n.pop(),D=0;D0&&o.push(n[s]);0!==o.length&&a.push(r.collection(o))}return a}(c,l,t,r);return b=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:_n,o=r,s=0;s=2?An(e,t,n,0,Nn,In):An(e,t,n,0,Bn)},squaredEuclidean:function(e,t,n){return An(e,t,n,0,Nn)},manhattan:function(e,t,n){return An(e,t,n,0,Bn)},max:function(e,t,n){return An(e,t,n,-1/0,zn)}};function On(e,t,n,r,a,i){var o;return o=x(e)?e:Ln[e]||Ln.euclidean,0===t&&x(e)?o(a,i):o(t,n,r,a,i)}Ln["squared-euclidean"]=Ln.squaredEuclidean,Ln.squaredeuclidean=Ln.squaredEuclidean;var Rn=Ue({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Vn=function(e){return Rn(e)},Fn=function(e,t,n,r,a){var i="kMedoids"!==a?function(e){return n[e]}:function(e){return r[e](n)},o=n,s=t;return On(e,r.length,i,(function(e){return r[e](t)}),o,s)},jn=function(e,t,n){for(var r=n.length,a=new Array(r),i=new Array(r),o=new Array(t),s=null,l=0;ln)return!1;return!0},Hn=function(e,t,n){for(var r=0;ra&&(a=t[l][u],i=u);o[i].push(e[l])}for(var c=0;c=a.threshold||"dendrogram"===a.mode&&1===e.length)return!1;var p,f=t[o],g=t[r[o]];p="dendrogram"===a.mode?{left:f,right:g,key:f.key}:{value:f.value.concat(g.value),key:f.key},e[f.index]=p,e.splice(g.index,1),t[f.key]=p;for(var v=0;vn[g.key][y.key]&&(i=n[g.key][y.key])):"max"===a.linkage?(i=n[f.key][y.key],n[f.key][y.key]o&&(i=l,o=t[a*e+l])}i>0&&r.push(i)}for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var i=0,o=e.length-1;o>=0;o--){var s=e[o];a?isFinite(s)||(e[o]=-1/0,i++):e.splice(o,1)}r&&e.sort((function(e,t){return e-t}));var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+i]:(e[u-1+i]+e[u+i])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,a=0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,a=t;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,a=t;a=D?(T=D,D=M,_=B):M>T&&(T=M);for(var N=0;N0?1:0;C[E%u.minIterations*t+R]=V,O+=V}if(O>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var F=0,j=0;j0&&r.push(a);return r}(t,i,o),X=function(e,t,n){for(var r=ur(e,t,n),a=0;al&&(s=u,l=c)}n[a]=i[s]}return ur(e,t,n)}(t,r,Y),W={},H=0;H1)}}));var l=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(l),components:a}},fr=function(){var e=this,t={},n=0,r=[],a=[],i=e.spawn(e),o=function o(s){if(a.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var l=e.spawn();;){var u=a.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),d=l.merge(c);r.push(d),i=i.difference(d)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||o(n)}})),{cut:i,components:r}},gr={};[it,ct,dt,pt,gt,yt,wt,hn,fn,vn,mn,Tn,Qn,or,dr,{hierholzer:function(e){if(!E(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,a,i=hr(e),o=i.root,s=i.directed,l=this,u=!1;o&&(a=b(o)?this.filter(o)[0].id():o[0].id());var c={},d={};s?l.forEach((function(e){var t=e.id();if(e.isNode()){var a=e.indegree(!0),i=e.outdegree(!0),o=a-i,s=i-a;1==o?n?u=!0:n=t:1==s?r?u=!0:r=t:(s>1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else d[t]=[void 0,e.target().id()]})):l.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):d[t]=[e.source().id(),e.target().id()]}));var h={found:!1,trail:void 0};if(u)return h;if(r&&n)if(s){if(a&&r!=a)return h;a=r}else{if(a&&r!=a&&n!=a)return h;a||(a=r)}else a||(a=l[0].id());var p=function(e){for(var t,n,r,a=e,i=[e];c[a].length;)t=c[a].shift(),n=d[t][0],a!=(r=d[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),a=r):s||a==n||(c[n]=c[n].filter((function(e){return e!=t})),a=n),i.unshift(t),i.unshift(a);return i},f=[],g=[];for(g=p(a);1!=g.length;)0==c[g[0]].length?(f.unshift(l.getElementById(g.shift())),f.unshift(l.getElementById(g.shift()))):g=p(g.shift()).concat(g);for(var v in f.unshift(l.getElementById(g.shift())),c)if(c[v].length)return h;return h.found=!0,h.trail=this.spawn(f,!0),h}},{hopcroftTarjanBiconnected:pr,htbc:pr,htb:pr,hopcroftTarjanBiconnectedComponents:pr},{tarjanStronglyConnected:fr,tsc:fr,tscc:fr,tarjanStronglyConnectedComponents:fr}].forEach((function(e){Y(gr,e)}));var vr=function e(t){if(!(this instanceof e))return new e(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))};vr.prototype={fulfill:function(e){return yr(this,1,"fulfillValue",e)},reject:function(e){return yr(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new vr;return n.onFulfilled.push(xr(e,r,"fulfill")),n.onRejected.push(xr(t,r,"reject")),mr(n),r.proxy}};var yr=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,mr(e)),e},mr=function(e){1===e.state?br(e,"onFulfilled",e.fulfillValue):2===e.state&&br(e,"onRejected",e.rejectReason)},br=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var a=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1},Ur.prototype.set=function(e,t){var n=this.__data__,r=Kr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Zr=Ur,$r=Fr($,"Map"),Qr=function(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map};function Jr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){w(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,a=[],i=0,o=n.length;i0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};Pa.className=Pa.classNames=Pa.classes;var Da={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:O,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Da.variable="(?:[\\w-.]|(?:\\\\"+Da.metaChar+"))+",Da.className="(?:[\\w-]|(?:\\\\"+Da.metaChar+"))+",Da.value=Da.string+"|"+Da.number,Da.id=Da.variable,function(){var e,t,n;for(e=Da.comparatorOp.split("|"),n=0;n=0||"="!==t&&(Da.comparatorOp+="|\\!"+t)}();var Ta=20,_a=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*q(e,t)}(e.selector,t.selector)})),Ma=function(){for(var e,t={},n=0;n<_a.length;n++)t[(e=_a[n]).selector]=e.matches;return t}(),Ba="("+_a.map((function(e){return e.selector})).join("|")+")",Na=function(e){return e.replace(new RegExp("\\\\("+Da.metaChar+")","g"),(function(e,t){return t}))},Ia=function(e,t,n){e[e.length-1]=n},za=[{name:"group",query:!0,regex:"("+Da.group+")",populate:function(e,t,n){var r=l(n,1)[0];t.checks.push({type:0,value:"*"===r?r:r+"s"})}},{name:"state",query:!0,regex:Ba,populate:function(e,t,n){var r=l(n,1)[0];t.checks.push({type:7,value:r})}},{name:"id",query:!0,regex:"\\#("+Da.id+")",populate:function(e,t,n){var r=l(n,1)[0];t.checks.push({type:8,value:Na(r)})}},{name:"className",query:!0,regex:"\\.("+Da.className+")",populate:function(e,t,n){var r=l(n,1)[0];t.checks.push({type:9,value:Na(r)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+Da.variable+")\\s*\\]",populate:function(e,t,n){var r=l(n,1)[0];t.checks.push({type:4,field:Na(r)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Da.variable+")\\s*("+Da.comparatorOp+")\\s*("+Da.value+")\\s*\\]",populate:function(e,t,n){var r=l(n,3),a=r[0],i=r[1],o=r[2];o=null!=new RegExp("^"+Da.string+"$").exec(o)?o.substring(1,o.length-1):parseFloat(o),t.checks.push({type:3,field:Na(a),operator:i,value:o})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+Da.boolOp+")\\s*("+Da.variable+")\\s*\\]",populate:function(e,t,n){var r=l(n,2),a=r[0],i=r[1];t.checks.push({type:5,field:Na(i),operator:a})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Da.meta+")\\s*("+Da.comparatorOp+")\\s*("+Da.number+")\\s*\\]\\]",populate:function(e,t,n){var r=l(n,3),a=r[0],i=r[1],o=r[2];t.checks.push({type:6,field:Na(a),operator:i,value:parseFloat(o)})}},{name:"nextQuery",separator:!0,regex:Da.separator,populate:function(e,t){var n=e.currentSubject,r=e.edgeCount,a=e.compoundCount,i=e[e.length-1];return null!=n&&(i.subject=n,e.currentSubject=null),i.edgeCount=r,i.compoundCount=a,e.edgeCount=0,e.compoundCount=0,e[e.length++]={checks:[]}}},{name:"directedEdge",separator:!0,regex:Da.directedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,a={checks:[]};return n.checks.push({type:11,source:r,target:a}),Ia(e,0,n),e.edgeCount++,a}var i={checks:[]},o=t,s={checks:[]};return i.checks.push({type:12,source:o,target:s}),Ia(e,0,i),e.edgeCount++,s}},{name:"undirectedEdge",separator:!0,regex:Da.undirectedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,a={checks:[]};return n.checks.push({type:10,nodes:[r,a]}),Ia(e,0,n),e.edgeCount++,a}var i={checks:[]},o=t,s={checks:[]};return i.checks.push({type:14,node:o,neighbor:s}),Ia(e,0,i),s}},{name:"child",separator:!0,regex:Da.child,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},a=e[e.length-1];return n.checks.push({type:15,parent:a,child:r}),Ia(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var i={checks:[]},o=e[e.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return i.checks.push({type:19,left:o,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:Ta}],c.checks.push({type:Ta}),s.checks.push({type:17,parent:c,child:u}),Ia(e,0,i),e.currentSubject=l,e.compoundCount++,u}var d={checks:[]},h={checks:[]},p=[{type:17,parent:d,child:h}];return d.checks=t.checks,t.checks=p,e.compoundCount++,h}},{name:"descendant",separator:!0,regex:Da.descendant,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},a=e[e.length-1];return n.checks.push({type:16,ancestor:a,descendant:r}),Ia(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var i={checks:[]},o=e[e.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return i.checks.push({type:19,left:o,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:Ta}],c.checks.push({type:Ta}),s.checks.push({type:18,ancestor:c,descendant:u}),Ia(e,0,i),e.currentSubject=l,e.compoundCount++,u}var d={checks:[]},h={checks:[]},p=[{type:18,ancestor:d,descendant:h}];return d.checks=t.checks,t.checks=p,e.compoundCount++,h}},{name:"subject",modifier:!0,regex:Da.subject,populate:function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return Xe("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t;var n=e[e.length-1].checks[0],r=null==n?null:n.type;11===r?n.type=13:10===r&&(n.type=14,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)}}];za.forEach((function(e){return e.regexObj=new RegExp("^"+e.regex)}));var Aa=function(e){for(var t,n,r,a=0;a0&&u.edgeCount>0)return Xe("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return Xe("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&Xe("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return b(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(a,i){return a.checks.reduce((function(o,s,l){return o+(i===a&&0===l?"$":"")+function(a,i){var o=a.type,s=a.value;switch(o){case 0:var l=e(s);return l.substring(0,l.length-1);case 3:var u=a.field,c=a.operator;return"["+u+n(e(c))+t(s)+"]";case 5:var d=a.operator,h=a.field;return"["+e(d)+h+"]";case 4:return"["+a.field+"]";case 6:var p=a.operator;return"[["+a.field+n(e(p))+t(s)+"]]";case 7:return s;case 8:return"#"+s;case 9:return"."+s;case 17:case 15:return r(a.parent,i)+n(">")+r(a.child,i);case 18:case 16:return r(a.ancestor,i)+" "+r(a.descendant,i);case 19:var f=r(a.left,i),g=r(a.subject,i),v=r(a.right,i);return f+(f.length>0?" ":"")+g+v;case Ta:return""}}(s,i)}),"")},a="",i=0;i1&&i=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(a=o||s?""+e:"",i=""+n),u&&(e=a=a.toLowerCase(),n=i=i.toLowerCase()),t){case"*=":r=a.indexOf(i)>=0;break;case"$=":r=a.indexOf(i,a.length-i.length)>=0;break;case"^=":r=0===a.indexOf(i);break;case"=":r=e===n;break;case">":d=!0,r=e>n;break;case">=":d=!0,r=e>=n;break;case"<":d=!0,r=e0;){var u=a.shift();t(u),i.add(u.id()),o&&r(a,i,u)}return e}function Za(e,t,n){if(n.isParent())for(var r=n._private.children,a=0;a1&&void 0!==arguments[1])||arguments[1],Za)},Ga.forEachUp=function(e){return Ua(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],$a)},Ga.forEachUpAndDown=function(e){return Ua(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Qa)},Ga.ancestors=Ga.parents,(Wa=Ha={data:Ca.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:Ca.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Ca.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ca.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Ca.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Ca.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Wa.data,Wa.removeAttr=Wa.removeData;var Ja,ei,ti=Ha,ni={};function ri(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,a=n[0],i=a._private.edges,o=0;ot})),minIndegree:ai("indegree",(function(e,t){return et})),minOutdegree:ai("outdegree",(function(e,t){return et}))}),Y(ni,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=u;u&&(l=l[0]);var d=c?l.position():{x:0,y:0};return a={x:s.x-d.x,y:s.y-d.y},void 0===e?a:a[e]}for(var h=0;h0,v=g;g&&(f=f[0]);var y=v?f.position():{x:0,y:0};void 0!==t?p.position(e,t+y[e]):void 0!==a&&p.position({x:a.x+y.x,y:a.y+y.y})}}else if(!i)return;return this}},Ja.modelPosition=Ja.point=Ja.position,Ja.modelPositions=Ja.points=Ja.positions,Ja.renderedPoint=Ja.renderedPosition,Ja.relativePoint=Ja.relativePosition;var si,li,ui=ei;si=li={},li.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),a=n.pan(),i=t.x1*r+a.x,o=t.x2*r+a.x,s=t.y1*r+a.y,l=t.y2*r+a.y;return{x1:i,x2:o,y1:s,y2:l,w:o-i,h:l-s}},li.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},li.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,a={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-i.w/2,i.x2=o.x+i.w/2,i.y1=o.y-i.h/2,i.y2=o.y+i.h/2);var s=a.width.left.value;"px"===a.width.left.units&&a.width.val>0&&(s=100*s/a.width.val);var l=a.width.right.value;"px"===a.width.right.units&&a.width.val>0&&(l=100*l/a.width.val);var u=a.height.top.value;"px"===a.height.top.units&&a.height.val>0&&(u=100*u/a.height.val);var c=a.height.bottom.value;"px"===a.height.bottom.units&&a.height.val>0&&(c=100*c/a.height.val);var d=y(a.width.val-i.w,s,l),h=d.biasDiff,p=d.biasComplementDiff,f=y(a.height.val-i.h,u,c),g=f.biasDiff,v=f.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,a.width.val),o.x=(-h+i.x1+i.x2+p)/2,t.autoHeight=Math.max(i.h,a.height.val),o.y=(-g+i.y1+i.y2+v)/2}function y(e,t,n){var r=0,a=0,i=t+n;return e>0&&i>0&&(r=t/i*e,a=n/i*e),{biasDiff:r,biasComplementDiff:a}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},hi=function(e,t){return null==t?e:di(e,t.x1,t.y1,t.x2,t.y2)},pi=function(e,t,n){return Qe(e,t,n)},fi=function(e,t,n){if(!t.cy().headless()){var r,a,i=t._private,o=i.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,a=o.srcY):"target"===n?(r=o.tgtX,a=o.tgtY):(r=o.midX,a=o.midY);var l=i.arrowBounds=i.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=a-s,u.x2=r+s,u.y2=a+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,Ot(u,1),di(e,u.x1,u.y1,u.x2,u.y2)}}},gi=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var a=t._private,i=a.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),d=t.pstyle("text-valign"),h=pi(i,"labelWidth",n),p=pi(i,"labelHeight",n),f=pi(i,"labelX",n),g=pi(i,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,k=p,C=h,S=C/2,P=k/2;if(m)o=f-S,s=f+S,l=g-P,u=g+P;else{switch(c.value){case"left":o=f-C,s=f;break;case"center":o=f-S,s=f+S;break;case"right":o=f,s=f+C}switch(d.value){case"top":l=g-k,u=g;break;case"center":l=g-P,u=g+P;break;case"bottom":l=g,u=g+k}}var D=v-Math.max(x,w)-E-2,T=v+Math.max(x,w)+E+2,_=y-Math.max(x,w)-E-2,M=y+Math.max(x,w)+E+2;o+=D,s+=T,l+=_,u+=M;var B=n||"main",N=a.labelBounds,I=N[B]=N[B]||{};I.x1=o,I.y1=l,I.x2=s,I.y2=u,I.w=s-o,I.h=u-l,I.leftPad=D,I.rightPad=T,I.topPad=_,I.botPad=M;var z=m&&"autorotate"===b.strValue,A=null!=b.pfValue&&0!==b.pfValue;if(z||A){var L=z?pi(a.rstyle,"labelAngle",n):b.pfValue,O=Math.cos(L),R=Math.sin(L),V=(o+s)/2,F=(l+u)/2;if(!m){switch(c.value){case"left":V=s;break;case"right":V=o}switch(d.value){case"top":F=u;break;case"bottom":F=l}}var j=function(e,t){return{x:(e-=V)*O-(t-=F)*R+V,y:e*R+t*O+F}},q=j(o,l),Y=j(o,u),X=j(s,l),W=j(s,u);o=Math.min(q.x,Y.x,X.x,W.x),s=Math.max(q.x,Y.x,X.x,W.x),l=Math.min(q.y,Y.y,X.y,W.y),u=Math.max(q.y,Y.y,X.y,W.y)}var H=B+"Rot",K=N[H]=N[H]||{};K.x1=o,K.y1=l,K.x2=s,K.y2=u,K.w=s-o,K.h=u-l,di(e,o,l,s,u),di(a.labelBounds.all,o,l,s,u)}return e}},vi=function(e){var t=0,n=function(e){return(e?1:0)<0&&i>0){var o=t.pstyle("outline-offset").value,s=t.pstyle("shape").value,l=i+o,u=(e.w+2*l)/e.w,c=(e.h+2*l)/e.h,d=0;["diamond","pentagon","round-triangle"].includes(s)?(u=(e.w+2.4*l)/e.w,d=-l/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?u=(e.w+2.4*l)/e.w:"star"===s?(u=(e.w+2.8*l)/e.w,c=(e.h+2.6*l)/e.h,d=-l/3.8):"triangle"===s?(u=(e.w+2.8*l)/e.w,c=(e.h+2.4*l)/e.h,d=-l/1.4):"vee"===s&&(u=(e.w+4.4*l)/e.w,c=(e.h+3.8*l)/e.h,d=.5*-l);var h=e.h*c-e.h,p=e.w*u-e.w;if(Rt(e,[Math.ceil(h/2),Math.ceil(p/2)]),0!==d){var f=(r=d,{x1:(n=e).x1+0,x2:n.x2+0,y1:n.y1+r,y2:n.y2+r,w:n.w,h:n.h});At(e,f)}}}}(h,e)}else if(g&&t.includeEdges)if(c&&!d){var D=e.pstyle("curve-style").strValue;if(n=Math.min(v.srcX,v.midX,v.tgtX),r=Math.max(v.srcX,v.midX,v.tgtX),a=Math.min(v.srcY,v.midY,v.tgtY),i=Math.max(v.srcY,v.midY,v.tgtY),di(h,n-=k,a-=k,r+=k,i+=k),"haystack"===D){var T=v.haystackPts;if(T&&2===T.length){if(n=T[0].x,a=T[0].y,n>(r=T[1].x)){var _=n;n=r,r=_}if(a>(i=T[1].y)){var M=a;a=i,i=M}di(h,n-k,a-k,r+k,i+k)}}else if("bezier"===D||"unbundled-bezier"===D||D.endsWith("segments")||D.endsWith("taxi")){var B;switch(D){case"bezier":case"unbundled-bezier":B=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":B=v.linePts}if(null!=B)for(var N=0;N(r=A.x)){var L=n;n=r,r=L}if((a=z.y)>(i=A.y)){var O=a;a=i,i=O}di(h,n-=k,a-=k,r+=k,i+=k)}if(c&&t.includeEdges&&g&&(fi(h,e,"mid-source"),fi(h,e,"mid-target"),fi(h,e,"source"),fi(h,e,"target")),c&&"yes"===e.pstyle("ghost").value){var R=e.pstyle("ghost-offset-x").pfValue,V=e.pstyle("ghost-offset-y").pfValue;di(h,h.x1+R,h.y1+V,h.x2+R,h.y2+V)}var F=p.bodyBounds=p.bodyBounds||{};Vt(F,h),Rt(F,y),Ot(F,1),c&&(n=h.x1,r=h.x2,a=h.y1,i=h.y2,di(h,n-E,a-E,r+E,i+E));var j=p.overlayBounds=p.overlayBounds||{};Vt(j,h),Rt(j,y),Ot(j,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=zt(),c&&t.includeLabels&&(t.includeMainLabels&&gi(h,e,null),g&&(t.includeSourceLabels&&gi(h,e,"source"),t.includeTargetLabels&&gi(h,e,"target")))}return h.x1=ci(h.x1),h.y1=ci(h.y1),h.x2=ci(h.x2),h.y2=ci(h.y2),h.w=ci(h.x2-h.x1),h.h=ci(h.y2-h.y1),h.w>0&&h.h>0&&b&&(Rt(h,y),Ot(h,1)),h}(e,bi),r.bbCache=n,r.bbCachePosKey=o):n=r.bbCache,!i){var c=e.isNode();n=zt(),(t.includeNodes&&c||t.includeEdges&&!c)&&(t.includeOverlays?hi(n,r.overlayBounds):hi(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!a||t.includeSourceLabels&&t.includeTargetLabels)?hi(n,r.labelBounds.all):(t.includeMainLabels&&hi(n,r.labelBounds.mainRot),t.includeSourceLabels&&hi(n,r.labelBounds.sourceRot),t.includeTargetLabels&&hi(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},bi={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},xi=vi(bi),wi=Ue(bi);li.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=zt();var n=wi(e=e||bi),r=this;if(r.cy().styleEnabled())for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:Li,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},Ri.removeAllListeners=function(){return this.removeListener("*")},Ri.emit=Ri.trigger=function(e,t,n){var r=this.listeners,a=r.length;return this.emitting++,w(t)||(t=[t]),function(e,t,n){if("event"!==m(n))if(E(n))t(e,Fi(e,n));else for(var r=w(n)?n:n.split(/\s+/),a=0;a1&&!r){var a=this.length-1,i=this[a],o=i._private.data.id;this[a]=void 0,this[e]=i,n.set(o,{ele:i,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var a=r.index;return this.unmergeAt(a),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&b(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--)e(this[t])&&this.unmergeAt(t);return this},map:function(e,t){for(var n=[],r=this,a=0;ar&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,a=this,i=0;i=0&&a1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var a=n._private.style[e];return null!=a?a:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,a=n.style();if(E(e)){var i=e;a.applyBypass(this,i,r),this.emitAndNotify("style")}else if(b(e)){if(void 0===t){var o=this[0];return o?a.getStylePropertyValue(o,e):void 0}a.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?a.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),a=this;if(void 0===e)for(var i=0;i0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),ho.neighbourhood=ho.neighborhood,ho.closedNeighbourhood=ho.closedNeighborhood,ho.openNeighbourhood=ho.openNeighborhood,Y(ho,{source:Ka((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:Ka((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:vo({attr:"source"}),targets:vo({attr:"target"})}),Y(ho,{edgesWith:Ka(yo(),"edgesWith"),edgesTo:Ka(yo({thisIsSrc:!0}),"edgesTo")}),Y(ho,{connectedEdges:Ka((function(e){for(var t=[],n=0;n0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),ho.componentsOf=ho.components;var bo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var a=new et,i=!1;if(t){if(t.length>0&&E(t[0])&&!P(t[0])){i=!0;for(var o=[],s=new nt,l=0,u=t.length;l0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=this,i=a.cy(),o=i._private,s=[],l=[],u=0,c=a.length;u0){for(var O=e.length===a.length?a:new bo(i,e),R=0;R0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],a={},i=n._private.cy;function o(e){var n=a[e.id()];t&&e.removed()||n||(a[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n0&&(e?k.emitAndNotify("remove"):t&&k.emit("remove"));for(var C=0;C=.001?function(t,r){for(var a=0;a<4;++a){var i=h(r,e,n);if(0===i)return r;r-=(d(r,e,n)-t)/i}return r}(t,o):0===l?o:function(t,r,a){var i,o,s=0;do{(i=d(o=r+(a-r)/2,e,n)-t)>0?a=o:r=o}while(Math.abs(i)>1e-7&&++s<10);return o}(t,r,r+a)}(i),t,r)};f.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var g="generateBezier("+[e,t,n,r]+")";return f.toString=function(){return g},f}var ko=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var a={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:a.v,dv:e(a)}}function n(n,r){var a={dx:n.v,dv:e(n)},i=t(n,.5*r,a),o=t(n,.5*r,i),s=t(n,r,o),l=1/6*(a.dx+2*(i.dx+o.dx)+s.dx),u=1/6*(a.dv+2*(i.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,a){var i,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,a=a||null,l.tension=t,l.friction=r,o=(i=null!==a)?(c=e(t,r))/a*.016:.016;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return i?function(e){return u[e*(u.length-1)|0]}:c}}(),Co=function(e,t,n,r){var a=Eo(e,t,n,r);return function(e,t,n){return e+(t-e)*a(n)}},So={linear:function(e,t,n){return e+(t-e)*n},ease:Co(.25,.1,.25,1),"ease-in":Co(.42,0,1,1),"ease-out":Co(0,0,.58,1),"ease-in-out":Co(.42,0,.58,1),"ease-in-sine":Co(.47,0,.745,.715),"ease-out-sine":Co(.39,.575,.565,1),"ease-in-out-sine":Co(.445,.05,.55,.95),"ease-in-quad":Co(.55,.085,.68,.53),"ease-out-quad":Co(.25,.46,.45,.94),"ease-in-out-quad":Co(.455,.03,.515,.955),"ease-in-cubic":Co(.55,.055,.675,.19),"ease-out-cubic":Co(.215,.61,.355,1),"ease-in-out-cubic":Co(.645,.045,.355,1),"ease-in-quart":Co(.895,.03,.685,.22),"ease-out-quart":Co(.165,.84,.44,1),"ease-in-out-quart":Co(.77,0,.175,1),"ease-in-quint":Co(.755,.05,.855,.06),"ease-out-quint":Co(.23,1,.32,1),"ease-in-out-quint":Co(.86,0,.07,1),"ease-in-expo":Co(.95,.05,.795,.035),"ease-out-expo":Co(.19,1,.22,1),"ease-in-out-expo":Co(1,0,0,1),"ease-in-circ":Co(.6,.04,.98,.335),"ease-out-circ":Co(.075,.82,.165,1),"ease-in-out-circ":Co(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return So.linear;var r=ko(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":Co};function Po(e,t,n,r,a){if(1===r)return n;if(t===n)return n;var i=a(t,n,r);return null==e||((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max&&(i=Math.min(i,e.max))),i}function Do(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function To(e,t,n,r,a){var i=null!=a?a.type:null;n<0?n=0:n>1&&(n=1);var o=Do(e,a),s=Do(t,a);if(k(o)&&k(s))return Po(i,o,s,n,r);if(w(o)&&w(s)){for(var l=[],u=0;u0?("spring"===d&&h.push(o.duration),o.easingImpl=So[d].apply(null,h)):o.easingImpl=So[d]}var p,f=o.easingImpl;if(p=0===o.duration?1:(n-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var g=o.startPosition,v=o.position;if(v&&a&&!e.locked()){var y={};Mo(g.x,v.x)&&(y.x=To(g.x,v.x,p,f)),Mo(g.y,v.y)&&(y.y=To(g.y,v.y,p,f)),e.position(y)}var m=o.startPan,x=o.pan,w=i.pan,E=null!=x&&r;E&&(Mo(m.x,x.x)&&(w.x=To(m.x,x.x,p,f)),Mo(m.y,x.y)&&(w.y=To(m.y,x.y,p,f)),e.emit("pan"));var k=o.startZoom,C=o.zoom,S=null!=C&&r;S&&(Mo(k,C)&&(i.zoom=It(i.minZoom,To(k,C,p,f),i.maxZoom)),e.emit("zoom")),(E||S)&&e.emit("viewport");var P=o.style;if(P&&P.length>0&&a){for(var D=0;D=0;t--)(0,e[t])();e.splice(0,e.length)},c=i.length-1;c>=0;c--){var d=i[c],h=d._private;h.stopped?(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||Bo(0,d,e),_o(t,d,e,n),h.applying&&(h.applying=!1),u(h.frames),null!=h.step&&h.step(e),d.completed()&&(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.completes)),s=!0)}return n||0!==i.length||0!==o.length||r.push(t),s}for(var i=!1,o=0;o0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var Io={animate:Ca.animate(),animation:Ca.animation(),animated:Ca.animated(),clearQueue:Ca.clearQueue(),delay:Ca.delay(),delayAnimation:Ca.delayAnimation(),stop:Ca.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){No(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&Ee((function(n){No(n,e),t()}))}()}}},zo={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&P(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},Ao=function(e){return b(e)?new qa(e):e},Lo={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Oi(zo,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Ao(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Ao(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Ao(t),n),this},once:function(e,t,n){return this.emitter().one(e,Ao(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Ca.eventAliasesOn(Lo);var Oo={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};Oo.jpeg=Oo.jpg;var Ro={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,r=e.name,a=t.extension("layout",r);if(null!=a)return n=b(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new a(Y({},e,{cy:t,eles:n}));qe("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else qe("A `name` must be specified to make a layout");else qe("Layout options must be specified to make a layout")}};Ro.createLayout=Ro.makeLayout=Ro.layout;var Vo={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var a=this.renderer();!this.destroyed()&&a&&a.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};jo.invalidateDimensions=jo.resize;var qo={collection:function(e,t){return b(e)?this.$(e):S(e)?e.collection():w(e)?(t||(t={}),new bo(this,e,t.unique,t.removed)):new bo(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};qo.elements=qo.filter=qo.$;var Yo={},Xo="t";Yo.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(h||d&&p){var f=void 0;h&&p||h?f=u.properties:p&&(f=u.mappedProperties);for(var g=0;g1&&(v=1),s.color){var w=a.valueMin[0],E=a.valueMax[0],C=a.valueMin[1],S=a.valueMax[1],P=a.valueMin[2],D=a.valueMax[2],T=null==a.valueMin[3]?1:a.valueMin[3],_=null==a.valueMax[3]?1:a.valueMax[3],M=[Math.round(w+(E-w)*v),Math.round(C+(S-C)*v),Math.round(P+(D-P)*v),Math.round(T+(_-T)*v)];n={bypass:a.bypass,name:a.name,value:M,strValue:"rgb("+M[0]+", "+M[1]+", "+M[2]+")"}}else{if(!s.number)return!1;var B=a.valueMin+(a.valueMax-a.valueMin)*v;n=this.parse(a.name,B,a.bypass,h)}if(!n)return g(),!1;n.mapping=a,a=n;break;case o.data:for(var N=a.field.split("."),I=d.data,z=0;z0&&i>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:i,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1)},Yo.checkTrigger=function(e,t,n,r,a,i){var o=this.properties[t],s=a(o);null!=s&&s(n,r)&&i(o)},Yo.checkZOrderTrigger=function(e,t,n,r){var a=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){a._private.cy.notify("zorder",e)}))},Yo.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(a){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!a.triggersBoundsOfParallelBeziers||"curve-style"!==t||"bezier"!==n&&"bezier"!==r||e.parallelEdges().forEach((function(e){e.dirtyBoundingBoxCache()})),!a.triggersBoundsOfConnectedEdges||"display"!==t||"none"!==n&&"none"!==r||e.connectedEdges().forEach((function(e){e.dirtyBoundingBoxCache()}))}))},Yo.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Wo={applyBypass:function(e,t,n,r){var a=[];if("*"===t||"**"===t){if(void 0!==n)for(var i=0;it.length?i.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");!i.match(/^\s*$/);){var l=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){Xe("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}t=l[0];var u=l[1];if("core"!==u&&new qa(u).invalid)Xe("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();else{var c=l[2],d=!1;n=c;for(var h=[];!n.match(/^\s*$/);){var p=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Xe("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),d=!0;break}r=p[0];var f=p[1],g=p[2];this.properties[f]?a.parse(f,g)?(h.push({name:f,val:g}),s()):(Xe("Skipping property: Invalid property definition in: "+r),s()):(Xe("Skipping property: Invalid property name in: "+r),s())}if(d){o();break}a.selector(u);for(var v=0;v=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var h=s.data;return{name:e,value:u,strValue:""+t,mapped:h,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(d.multiple)return!1;var p=s.mapData;if(!d.color&&!d.number)return!1;var f=this.parse(e,c[4]);if(!f||f.mapped)return!1;var g=this.parse(e,c[5]);if(!g||g.mapped)return!1;if(f.pfValue===g.pfValue||f.strValue===g.strValue)return Xe("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+f.strValue+"`"),this.parse(e,f.strValue);if(d.color){var v=f.value,y=g.value;if(!(v[0]!==y[0]||v[1]!==y[1]||v[2]!==y[2]||v[3]!==y[3]&&(null!=v[3]&&1!==v[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:p,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:f.value,valueMax:g.value,bypass:n}}}if(d.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):w(t)?t:[t],d.evenMultiple&&m.length%2!=0)return null;for(var E=[],C=[],S=[],P="",D=!1,T=0;T0?" ":"")+_.strValue}return d.validate&&!d.validate(E,C)?null:d.singleEnum&&D?1===E.length&&b(E[0])?{name:e,value:E[0],strValue:E[0],bypass:n}:null:{name:e,value:E,pfValue:S,strValue:P,bypass:n,units:C}}var M,B,N,z=function(){for(var r=0;rd.max||d.strictMax&&t===d.max))return null;var q={name:e,value:t,strValue:""+t+(A||""),units:A,bypass:n};return d.unitless||"px"!==A&&"em"!==A?q.pfValue=t:q.pfValue="px"!==A&&A?this.getEmSizeInPixels()*t:t,"ms"!==A&&"s"!==A||(q.pfValue="ms"===A?t:1e3*t),"deg"!==A&&"rad"!==A||(q.pfValue="rad"===A?t:(M=t,Math.PI*M/180)),"%"===A&&(q.pfValue=t/100),q}if(d.propList){var Y=[],W=""+t;if("none"===W);else{for(var H=W.split(/\s*,\s*|\s+/),K=0;K255)return;t.push(Math.floor(i))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(N)||function(e){var t,n,r,a,i,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+F+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(a=parseFloat(c[3]))<0||a>100)return;if(a/=100,void 0!==(i=c[4])&&((i=parseFloat(i))<0||i>1))return;if(0===r)o=s=l=Math.round(255*a);else{var d=a<.5?a*(1+r):a+r-a*r,h=2*a-d;o=Math.round(255*u(h,d,n+1/3)),s=Math.round(255*u(h,d,n)),l=Math.round(255*u(h,d,n-1/3))}t=[o,s,l,i]}return t}(N);return U?{name:e,value:U,pfValue:U,strValue:"rgb("+U[0]+","+U[1]+","+U[2]+")",bypass:n}:null}if(d.regex||d.regexes){if(d.enums){var Z=z();if(Z)return Z}for(var $=d.regexes?d.regexes:[d.regex],Q=0;Q<$.length;Q++){var J=new RegExp($[Q]).exec(t);if(J)return{name:e,value:d.singleRegexMatchValue?J[1]:J,strValue:""+t,bypass:n}}return null}return d.string?{name:e,value:""+t,strValue:""+t,bypass:n}:d.enums?z():null};var Qo=function e(t){if(!(this instanceof e))return new e(t);T(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):qe("A style must have a core reference")},Jo=Qo.prototype;Jo.instanceString=function(){return"style"},Jo.clear=function(){for(var e=this._private,t=e.cy.elements(),n=0;n0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:o=(o=(o=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:o)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,a=r.pan,i=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),k(e)?n=e:E(e)&&(n=e.level,null!=e.position?t=Et(e.position,i,a):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?i=!0:(t.zoom=s,a.push("zoom"))}if(r&&(!i||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;k(l.x)&&(t.pan.x=l.x,o=!1),k(l.y)&&(t.pan.y=l.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(b(e)){var n=e;e=this.mutableElements().filter(n)}else S(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),a=this.width(),i=this.height();return{x:(a-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=this.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};ts.centre=ts.center,ts.autolockNodes=ts.autolock,ts.autoungrabifyNodes=ts.autoungrabify;var ns={data:Ca.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Ca.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Ca.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ca.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};ns.attr=ns.data,ns.removeAttr=ns.removeData;var rs=function(e){var t=this,n=(e=Y({},e)).container;n&&!C(n)&&C(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var a=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var i=void 0!==h&&void 0!==n&&!e.headless,o=e;o.layout=Y({name:i?"grid":"null"},o.layout),o.renderer=Y({name:i?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new bo(this),listeners:[],aniEles:new bo(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?i:o.styleEnabled,zoom:k(o.zoom)?o.zoom:1,pan:{x:E(o.pan)&&k(o.pan.x)?o.pan.x:0,y:E(o.pan)&&k(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom}),l.styleEnabled&&t.setStyle([]);var u=Y({},o,o.renderer);t.initRenderer(u),function(e,t){if(e.some(B))return Er.all(e).then(t);t(e)}([o.style,o.elements],(function(e){var n=e[0],i=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var a=t.mutableElements();a.length>0&&a.remove(),null!=e&&(E(e)||w(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var i=Y({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,(function(){t.startAnimationLoop(),l.ready=!0,x(o.ready)&&t.on("ready",o.ready);for(var e=0;e0,u=zt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(S(n.roots))e=n.roots;else if(w(n.roots)){for(var c=[],d=0;d0;){var N=_.shift(),I=T(N,M);if(I)N.outgoers().filter((function(e){return e.isNode()&&a.has(e)})).forEach(B);else if(null===I){Xe("Detected double maximal shift for node `"+N.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}D();var z=0;if(n.avoidOverlap)for(var A=0;A0&&y[0].length<=3?l/2:0),d=2*Math.PI/y[r].length*a;return 0===r&&1===y[0].length&&(c=1),{x:G+c*Math.cos(d),y:U+c*Math.sin(d)}}return{x:G+(a+1-(i+1)/2)*o,y:(r+1)*s}})),this};var cs={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function ds(e){this.options=Y({},cs,e)}ds.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));for(var o,s=zt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/i.length:t.sweep)/Math.max(1,i.length-1),d=0,h=0;h1&&t.avoidOverlap){d*=1.75;var v=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(d*d/(v*v+y*y));o=Math.max(m,o)}return r.nodes().layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*c*(a?1:-1),i=o*Math.cos(r),s=o*Math.sin(r);return{x:l+i,y:u+s}})),this};var hs,ps={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function fs(e){this.options=Y({},ps,e)}fs.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,a=t.eles,i=a.nodes().not(":parent"),o=zt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,d=0;d0&&Math.abs(m[0].value-x.value)>=v&&(m=[],y.push(m)),m.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var E=y.length>0&&y[0].length>1,k=(Math.min(o.w,o.h)/2-w)/(y.length+E?1:0);w=Math.min(w,k)}for(var C=0,S=0;S1&&t.avoidOverlap){var _=Math.cos(T)-Math.cos(0),M=Math.sin(T)-Math.sin(0),B=Math.sqrt(w*w/(_*_+M*M));C=Math.max(B,C)}P.r=C,C+=w}if(t.equidistant){for(var N=0,I=0,z=0;z=e.numIter||(ks(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&i(),Ee(t)):(As(r,e),s())}();else{for(;u;)u=o(l),l++;As(r,e),s()}return this},vs.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},vs.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var ys=function(e,t,n){for(var r=n.eles.edges(),a=n.eles.nodes(),i=zt(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:i.w,clientHeight:i.h,boundingBox:i},s=n.eles.components(),l={},u=0;u0)for(o.graphSet.push(E),u=0;ur.count?0:r.graph},bs=function e(t,n,r,a){var i=a.graphSet[r];if(-10)var s=(u=r.nodeOverlap*o)*a/(g=Math.sqrt(a*a+i*i)),l=u*i/g;else{var u,c=Ts(e,a,i),d=Ts(t,-1*a,-1*i),h=d.x-c.x,p=d.y-c.y,f=h*h+p*p,g=Math.sqrt(f);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/f)*h/g,l=u*p/g}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},Ds=function(e,t,n,r){if(n>0)var a=e.maxX-t.minX;else a=t.maxX-e.minX;if(r>0)var i=e.maxY-t.minY;else i=t.maxY-e.minY;return a>=0&&i>=0?Math.sqrt(a*a+i*i):0},Ts=function(e,t,n){var r=e.positionX,a=e.positionY,i=e.height||1,o=e.width||1,s=n/t,l=i/o,u={};return 0===t&&0n?(u.x=r,u.y=a+i/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=a-o*n/2/t,u):0=l)?(u.x=r+i*t/2/n,u.y=a+i/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-i*t/2/n,u.y=a-i/2,u):u},_s=function(e,t){for(var n=0;n1){var f=t.gravity*d/p,g=t.gravity*h/p;c.offsetX+=f,c.offsetY+=g}}}}},Bs=function(e,t){var n=[],r=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;r<=a;){var i=n[r++],o=e.idToIndex[i],s=e.layoutNodes[o],l=s.children;if(0n)var a={x:n*e/r,y:n*t/r};else a={x:e,y:t};return a},zs=function e(t,n){var r=t.parentId;if(null!=r){var a=n.layoutNodes[n.idToIndex[r]],i=!1;return(null==a.maxX||t.maxX+a.padRight>a.maxX)&&(a.maxX=t.maxX+a.padRight,i=!0),(null==a.minX||t.minX-a.padLefta.maxY)&&(a.maxY=t.maxY+a.padBottom,i=!0),(null==a.minY||t.minY-a.padTopf&&(d+=p+t.componentSpacing,c=0,h=0,p=0)}}},Ls={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Os(e){this.options=Y({},Ls,e)}Os.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));var i=zt(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.nodes().layoutPositions(this,t,(function(e){return{x:i.x1,y:i.y1}}));else{var o=a.size(),s=Math.sqrt(o*i.h/i.w),l=Math.round(s),u=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},d=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},h=t.rows,p=null!=t.cols?t.cols:t.columns;if(null!=h&&null!=p)l=h,u=p;else if(null!=h&&null==p)l=h,u=Math.ceil(o/l);else if(null==h&&null!=p)u=p,l=Math.ceil(o/u);else if(u*l>o){var f=c(),g=d();(f-1)*g>=o?c(f-1):(g-1)*f>=o&&d(g-1)}else for(;u*l=o?d(y+1):c(v+1)}var m=i.w/u,b=i.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(B=0,M++)},I={},z=0;z(r=Kt(e,t,x[w],x[w+1],x[w+2],x[w+3])))return v(n,r),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(x=i.allpts,w=0;w+5(r=Ht(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return v(n,r),!0;m=m||a.source,b=b||a.target;var E=o.getArrowWidth(l,c),k=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}];for(w=0;w0&&(y(m),y(b))}function b(e,t,n){return Qe(e,t,n)}function x(n,r){var a,i=n._private,o=f;a=r?r+"-":"",n.boundingBox();var s=i.labelBounds[r||"main"],l=n.pstyle(a+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(i.rscratch,"labelX",r),c=b(i.rscratch,"labelY",r),d=b(i.rscratch,"labelAngle",r),h=n.pstyle(a+"text-margin-x").pfValue,p=n.pstyle(a+"text-margin-y").pfValue,g=s.x1-o-h,y=s.x2+o-h,m=s.y1-o-p,x=s.y2+o-p;if(d){var w=Math.cos(d),E=Math.sin(d),k=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},C=k(g,m),S=k(g,x),P=k(y,m),D=k(y,x),T=[C.x+h,C.y+p,P.x+h,P.y+p,D.x+h,D.y+p,S.x+h,S.y+p];if(Gt(e,t,T))return v(n),!0}else if(jt(s,e,t))return v(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var a,i,o=this.getCachedZSortedEles().interactive,s=[],l=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),d=Math.max(t,r),h=zt({x1:e=l,y1:t=c,x2:n=u,y2:r=d}),p=0;p4&&void 0!==arguments[4])||arguments[4];return 0===r||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(function(e,t,n,r,a){var i,o;if(e!==pl?vl(t,e,fl):((o=fl).x=-1*(i=gl).x,o.y=-1*i.y,o.nx=-1*i.nx,o.ny=-1*i.ny,o.ang=i.ang>0?-(Math.PI-i.ang):Math.PI+i.ang),vl(t,n,gl),Js=fl.nx*gl.ny-fl.ny*gl.nx,el=fl.nx*gl.nx-fl.ny*-gl.ny,rl=Math.asin(Math.max(-1,Math.min(1,Js))),Math.abs(rl)<1e-6)return $s=t.x,Qs=t.y,void(il=sl=0);tl=1,nl=!1,el<0?rl<0?rl=Math.PI+rl:(rl=Math.PI-rl,tl=-1,nl=!0):rl>0&&(tl=-1,nl=!0),sl=void 0!==t.radius?t.radius:r,al=rl/2,ll=Math.min(fl.len/2,gl.len/2),a?(ol=Math.abs(Math.cos(al)*sl/Math.sin(al)))>ll?(ol=ll,il=Math.abs(ol*Math.sin(al)/Math.cos(al))):il=sl:(ol=Math.min(ll,sl),il=Math.abs(ol*Math.sin(al)/Math.cos(al))),dl=t.x+gl.nx*ol,hl=t.y+gl.ny*ol,$s=dl-gl.ny*il*tl,Qs=hl+gl.nx*il*tl,ul=t.x+fl.nx*ol,cl=t.y+fl.ny*ol,pl=t}(e,t,n,r,a),{cx:$s,cy:Qs,radius:il,startX:ul,startY:cl,stopX:dl,stopY:hl,startAngle:fl.ang+Math.PI/2*tl,endAngle:gl.ang-Math.PI/2*tl,counterClockwise:nl})}var bl={};function xl(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},D=P(C,E),T=P(S,k),_=!1;"auto"===v?g=Math.abs(D)>Math.abs(T)?a:r:v===l||v===s?(g=r,_=!0):v!==i&&v!==o||(g=a,_=!0);var M,B=g===r,N=B?T:D,I=B?S:C,z=Dt(I),A=!1;_&&(m||x)||!(v===s&&I<0||v===l&&I>0||v===i&&I>0||v===o&&I<0)||(N=(z*=-1)*Math.abs(N),A=!0);var L=function(e){return Math.abs(e)=Math.abs(N)},O=L(M=m?(b<0?1+b:b)*N:(b<0?N:0)+b*z),R=L(Math.abs(N)-Math.abs(M));if(!O&&!R||A)if(B){var V=u.y1+M+(f?d/2*z:0),F=u.x1,j=u.x2;n.segpts=[F,V,j,V]}else{var q=u.x1+M+(f?c/2*z:0),Y=u.y1,X=u.y2;n.segpts=[q,Y,q,X]}else if(B){var W=Math.abs(I)<=d/2,H=Math.abs(C)<=h/2;if(W){var K=(u.x1+u.x2)/2,G=u.y1,U=u.y2;n.segpts=[K,G,K,U]}else if(H){var Z=(u.y1+u.y2)/2,$=u.x1,Q=u.x2;n.segpts=[$,Z,Q,Z]}else n.segpts=[u.x1,u.y2]}else{var J=Math.abs(I)<=c/2,ee=Math.abs(S)<=p/2;if(J){var te=(u.y1+u.y2)/2,ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else if(ee){var ae=(u.x1+u.x2)/2,ie=u.y1,oe=u.y2;n.segpts=[ae,ie,ae,oe]}else n.segpts=[u.x2,u.y1]}if(n.isRound){var se=e.pstyle("taxi-radius").value,le="arc-radius"===e.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(se),n.isArcRadius=new Array(n.segpts.length/2).fill(le)}},bl.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,a=t.tgtPos,i=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,d=t.srcCornerRadius,h=t.tgtCornerRadius,p=t.srcRs,f=t.tgtRs,g=!k(n.startX)||!k(n.startY),v=!k(n.arrowStartX)||!k(n.arrowStartY),y=!k(n.endX)||!k(n.endY),m=!k(n.arrowEndX)||!k(n.arrowEndY),b=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,x=Tt({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=xh.poolIndex()){var p=d;d=h,h=p}var f=s.srcPos=d.position(),g=s.tgtPos=h.position(),v=s.srcW=d.outerWidth(),y=s.srcH=d.outerHeight(),m=s.tgtW=h.outerWidth(),b=s.tgtH=h.outerHeight(),x=s.srcShape=n.nodeShapes[t.getNodeShape(d)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(h)],E=s.srcCornerRadius="auto"===d.pstyle("corner-radius").value?"auto":d.pstyle("corner-radius").pfValue,C=s.tgtCornerRadius="auto"===h.pstyle("corner-radius").value?"auto":h.pstyle("corner-radius").pfValue,S=s.tgtRs=h._private.rscratch,P=s.srcRs=d._private.rscratch;s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var D=0;D0){var H=u,K=_t(H,Ct(t)),G=_t(H,Ct(W)),U=K;G2&&_t(H,{x:W[2],y:W[3]})0){var le=c,ue=_t(le,Ct(t)),ce=_t(le,Ct(se)),de=ue;ce2&&_t(le,{x:se[2],y:se[3]})=u||m){c={cp:g,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-h)/x.length,E=x.t1-x.t0,k=s?x.t0+E*w:x.t1-E*w;k=It(0,k,1),t=Nt(b.p0,b.p1,b.p2,k),a=function(e,t,n,r){var a=It(0,r-.001,1),i=It(0,r+.001,1),o=Nt(e,t,n,a),s=Nt(e,t,n,i);return Pl(o,s)}(b.p0,b.p1,b.p2,k);break;case"straight":case"segments":case"haystack":for(var C,S,P,D,T=0,_=r.allpts.length,M=0;M+3<_&&(s?(P={x:r.allpts[M],y:r.allpts[M+1]},D={x:r.allpts[M+2],y:r.allpts[M+3]}):(P={x:r.allpts[_-2-M],y:r.allpts[_-1-M]},D={x:r.allpts[_-4-M],y:r.allpts[_-3-M]}),S=T,!((T+=C=Tt(P,D))>=u));M+=2);var B=(u-S)/C;B=It(0,B,1),t=function(e,t,n,r){var a=t.x-e.x,i=t.y-e.y,o=Tt(e,t),s=a/o,l=i/o;return n=null==n?0:n,r=null!=r?r:n*o,{x:e.x+s*r,y:e.y+l*r}}(P,D,B),a=Pl(P,D)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,a)}};u("source"),u("target"),this.applyLabelDimensions(e)}},Cl.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Cl.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),a=this.calculateLabelDimensions(e,r),i=e.pstyle("line-height").pfValue,o=e.pstyle("text-wrap").strValue,s=Qe(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==o?1:Math.max(s.length,1),u=a.height/l,c=u*i,d=a.width,h=a.height+(l-1)*(i-1)*u;Je(n.rstyle,"labelWidth",t,d),Je(n.rscratch,"labelWidth",t,d),Je(n.rstyle,"labelHeight",t,h),Je(n.rscratch,"labelHeight",t,h),Je(n.rscratch,"labelLineHeight",t,c)},Cl.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",a=e.pstyle(r+"label").strValue,i=e.pstyle("text-transform").value,o=function(e,r){return r?(Je(n.rscratch,e,t,r),r):Qe(n.rscratch,e,t)};if(!a)return"";"none"==i||("uppercase"==i?a=a.toUpperCase():"lowercase"==i&&(a=a.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var l=o("labelKey");if(null!=l&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var u=a.split("\n"),c=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,p=[],f=/[\s\u200b]+|$/g,g=0;gc){var b,x="",w=0,E=d(v.matchAll(f));try{for(E.s();!(b=E.n()).done;){var k=b.value,C=k[0],S=v.substring(w,k.index);w=k.index+C.length;var P=0===x.length?S:x+S+C;this.calculateLabelDimensions(e,P).width<=c?x+=S+C:(x&&p.push(x),x=S+C)}}catch(e){E.e(e)}finally{E.f()}x.match(/^[\s\u200b]+$/)||p.push(x)}else p.push(v)}o("labelWrapCachedLines",p),a=o("labelWrapCachedText",p.join("\n")),o("labelWrapKey",l)}else if("ellipsis"===s){var D=e.pstyle("text-max-width").pfValue,T="",_=!1;if(this.calculateLabelDimensions(e,a).widthD);M++)T+=a[M],M===a.length-1&&(_=!0);return _||(T+="…"),T}return a},Cl.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Cl.calculateLabelDimensions=function(e,t){var n=this,r=n.cy.window().document,a=Be(t,e._private.labelDimsKey),i=n.labelDimCache||(n.labelDimCache=[]),o=i[a];if(null!=o)return o;var s=e.pstyle("font-style").strValue,l=e.pstyle("font-size").pfValue,u=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,d=this.labelCalcCanvas,h=this.labelCalcCanvasContext;if(!d){d=this.labelCalcCanvas=r.createElement("canvas"),h=this.labelCalcCanvasContext=d.getContext("2d");var p=d.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}h.font="".concat(s," ").concat(c," ").concat(l,"px ").concat(u);for(var f=0,g=0,v=t.split("\n"),y=0;y1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var D=a(t);v&&(e.hoverData.tapholdCancelled=!0),n=!0,r(g,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var T=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:c[0],y:c[1]}}),f[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(v){var _={originalEvent:t,type:"cxtdrag",position:{x:c[0],y:c[1]}};b?b.emit(_):o.emit(_),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&g===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:c[0],y:c[1]}}),e.hoverData.cxtOver=g,g&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:c[0],y:c[1]}}))}}else if(e.hoverData.dragging){if(n=!0,o.panningEnabled()&&o.userPanningEnabled()){var M;if(e.hoverData.justStartedPan){var B=e.hoverData.mdownPos;M={x:(c[0]-B[0])*s,y:(c[1]-B[1])*s},e.hoverData.justStartedPan=!1}else M={x:x[0]*s,y:x[1]*s};o.panBy(M),o.emit("dragpan"),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=f[4]||null!=b&&!b.pannable()){if(b&&b.pannable()&&b.active()&&b.unactivate(),b&&b.grabbed()||g==y||(y&&r(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),g&&r(g,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=g),b)if(v){if(o.boxSelectionEnabled()&&D)b&&b.grabbed()&&(d(w),b.emit("freeon"),w.emit("free"),e.dragData.didDrag&&(b.emit("dragfreeon"),w.emit("dragfree"))),T();else if(b&&b.grabbed()&&e.nodeIsDraggable(b)){var N=!e.dragData.didDrag;N&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||u(w,{inDragLayer:!0});var I={x:0,y:0};if(k(x[0])&&k(x[1])&&(I.x+=x[0],I.y+=x[1],N)){var z=e.hoverData.dragDelta;z&&k(z[0])&&k(z[1])&&(I.x+=z[0],I.y+=z[1])}e.hoverData.draggingEles=!0,w.silentShift(I).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(x[0]),t.push(x[1])):(t[0]+=x[0],t[1]+=x[1])}();n=!0}else v&&(e.hoverData.dragging||!o.boxSelectionEnabled()||!D&&o.panningEnabled()&&o.userPanningEnabled()?!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()&&i(b,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,f[4]=0,e.data.bgActivePosistion=Ct(h),e.redrawHint("select",!0),e.redraw()):T(),b&&b.pannable()&&b.active()&&b.unactivate());return f[2]=c[0],f[3]=c[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(t,"mouseup",(function(t){if((1!==e.hoverData.which||1===t.which||!e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,h=a(t);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var p={originalEvent:t,type:"cxttapend",position:{x:o[0],y:o[1]}};if(c?c.emit(p):i.emit(p),!e.hoverData.cxtDragged){var f={originalEvent:t,type:"cxttap",position:{x:o[0],y:o[1]}};c?c.emit(f):i.emit(f)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],t,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:o[0],y:o[1]}),x=!1,t.timeStamp-w<=i.multiClickDebounceTime()?(b&&clearTimeout(b),x=!0,w=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(b=setTimeout((function(){x||r(c,["oneclick","onetap","voneclick"],t,{x:o[0],y:o[1]})}),i.multiClickDebounceTime()),w=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||a(t)||(i.$(n).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=i.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||h?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):h||(i.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var g=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),g.length>0&&e.redrawHint("eles",!0),i.emit({type:"boxend",originalEvent:t,position:{x:o[0],y:o[1]}});"additive"===i.selectionType()||h||i.$(n).unmerge(g).unselect(),g.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var v=c&&c.grabbed();d(u),v&&(c.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}}),!1);var C,S,P,D,T,_,M,B,N,I,z,A,L,O=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),a=n.pan(),i=e.projectIntoViewport(t.clientX,t.clientY),o=[i[0]*r+a.x,i[1]*r+a.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var l=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(l=e.gestureStartZoom*t.scale),n.zoom({level:l,renderedPosition:{x:o[0],y:o[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",O,!0),e.registerBinding(t,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||O(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var R,V,F,j,q,Y,X,W=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},H=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",R=function(t){if(e.hasTouchStarted=!0,m(t)){p(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,a=e.touchData.now,i=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);a[0]=o[0],a[1]=o[1]}if(t.touches[1]&&(o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),a[2]=o[0],a[3]=o[1]),t.touches[2]&&(o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),a[4]=o[0],a[5]=o[1]),t.touches[1]){e.touchData.singleTouchMoved=!0,d(e.dragData.touchDragEles);var l=e.findContainerClientCoords();N=l[0],I=l[1],z=l[2],A=l[3],C=t.touches[0].clientX-N,S=t.touches[0].clientY-I,P=t.touches[1].clientX-N,D=t.touches[1].clientY-I,L=0<=C&&C<=z&&0<=P&&P<=z&&0<=S&&S<=A&&0<=D&&D<=A;var h=n.pan(),f=n.zoom();if(T=W(C,S,P,D),_=H(C,S,P,D),B=[((M=[(C+P)/2,(S+D)/2])[0]-h.x)/f,(M[1]-h.y)/f],_<4e4&&!t.touches[2]){var g=e.findNearestElement(a[0],a[1],!0,!0),v=e.findNearestElement(a[2],a[3],!0,!0);return g&&g.isNode()?(g.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start=g):v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start=v):n.emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var y=e.findNearestElements(a[0],a[1],!0,!0),b=y[0];if(null!=b&&(b.activate(),e.touchData.start=b,e.touchData.starts=y,e.nodeIsGrabbable(b))){var x=e.dragData.touchDragEles=n.collection(),w=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),b.selected()?(w=n.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),u(w,{addToList:x})):c(b,{addToList:x}),s(b);var E=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};b.emit(E("grabon")),w?w.forEach((function(e){e.emit(E("grab"))})):b.emit(E("grab"))}r(b,["touchstart","tapstart","vmousedown"],t,{x:a[0],y:a[1]}),null==b&&(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:a[0],y:a[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var k=e.touchData.startPosition=[null,null,null,null,null,null],O=0;O=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var w=t.touches[0].clientX-N,E=t.touches[0].clientY-I,M=t.touches[1].clientX-N,z=t.touches[1].clientY-I,A=H(w,E,M,z);if(A/_>=2.25||A>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var O={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(O),e.touchData.start=null):o.emit(O)}}if(n&&e.touchData.cxt){O={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}},e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(O):o.emit(O),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var R=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&R===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=R,R&&R.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,a[4]=1,a&&0!==a.length&&void 0!==a[0]?(a[2]=(s[0]+s[2]+s[4])/3,a[3]=(s[1]+s[3]+s[5])/3):(a[0]=(s[0]+s[2]+s[4])/3,a[1]=(s[1]+s[3]+s[5])/3,a[2]=(s[0]+s[2]+s[4])/3+1,a[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var V=0;V0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",F=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",j=function(t){var a=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(t.touches[0]){var h=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);u[0]=h[0],u[1]=h[1]}if(t.touches[1]&&(h=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),u[2]=h[0],u[3]=h[1]),t.touches[2]&&(h=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),u[4]=h[0],u[5]=h[1]),a&&a.unactivate(),e.touchData.cxt){if(o={originalEvent:t,type:"cxttapend",position:{x:u[0],y:u[1]}},a?a.emit(o):s.emit(o),!e.touchData.cxtDragged){var p={originalEvent:t,type:"cxttap",position:{x:u[0],y:u[1]}};a?a.emit(p):s.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var f=s.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:t,position:{x:u[0],y:u[1]}}),f.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),f.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=a&&a.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=a){var v=a._private.grabbed;d(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&(a.emit("freeon"),g.emit("free"),e.dragData.didDrag&&(a.emit("dragfreeon"),g.emit("dragfree"))),r(a,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]}),a.unactivate(),e.touchData.start=null}else{var y=e.findNearestElement(u[0],u[1],!0,!0);r(y,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]})}var m=e.touchData.startPosition[0]-u[0],b=m*m,x=e.touchData.startPosition[1]-u[1],w=(b+x*x)*l*l;e.touchData.singleTouchMoved||(a||s.$(":selected").unselect(["tapunselect"]),r(a,["tap","vclick"],t,{x:u[0],y:u[1]}),q=!1,t.timeStamp-X<=s.multiClickDebounceTime()?(Y&&clearTimeout(Y),q=!0,X=null,r(a,["dbltap","vdblclick"],t,{x:u[0],y:u[1]})):(Y=setTimeout((function(){q||r(a,["onetap","voneclick"],t,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),X=t.timeStamp)),null!=a&&!e.dragData.didDrag&&a._private.selectable&&w2){for(var p=[c[0],c[1]],f=Math.pow(p[0]-e,2)+Math.pow(p[1]-t,2),g=1;g0)return g[0]}return null},p=Object.keys(d),f=0;f0?u:Yt(a,i,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,a,i,o,s){var l=2*(s="auto"===s?ln(r,a):s);if(Ut(e,t,this.points,i,o,r,a-l,[0,-1],n))return!0;if(Ut(e,t,this.points,i,o,r-l,a,[0,-1],n))return!0;var u=r/2+2*n,c=a/2+2*n;return!!Gt(e,t,[i-u,o-c,i-u,o,i+u,o,i+u,o-c])||!!Qt(e,t,l,l,i+r/2-s,o+a/2-s,n)||!!Qt(e,t,l,l,i-r/2+s,o+a/2-s,n)}}},registerNodeShapes:function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",an(3,0)),this.generateRoundPolygon("round-triangle",an(3,0)),this.generatePolygon("rectangle",an(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",an(5,0)),this.generateRoundPolygon("round-pentagon",an(5,0)),this.generatePolygon("hexagon",an(6,0)),this.generateRoundPolygon("round-hexagon",an(6,0)),this.generatePolygon("heptagon",an(7,0)),this.generateRoundPolygon("round-heptagon",an(7,0)),this.generatePolygon("octagon",an(8,0)),this.generateRoundPolygon("round-octagon",an(8,0));var r=new Array(20),a=sn(5,0),i=sn(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*g)break}else if(a){if(p>=e.deqCost*l||p>=e.deqAvgCost*s)break}else if(f>=e.deqNoDrawCost*Rl)break;var v=e.deq(t,d,c);if(!(v.length>0))break;for(var y=0;y0&&(e.onDeqd(t,u),!a&&e.shouldRedraw(t,u,d,c)&&r())}),a(t))}}},Fl=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ve;a(this,e),this.idsByKey=new et,this.keyForId=new et,this.cachesByLvl=new et,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return o(e,[{key:"getIdsFor",value:function(e){null==e&&qe("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new nt,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new et,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),jl={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},ql=Ue({getKey:null,doesEleInvalidateKey:Ve,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Re,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Yl=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=ql(t);Y(n,r),n.lookup=new Fl(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},Xl=Yl.prototype;Xl.reasons=jl,Xl.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},Xl.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},Xl.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new lt((function(e,t){return t.reqs-e.reqs}))},Xl.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},Xl.getElement=function(e,t,n,r,a){var i=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!i.allowEdgeTxrCaching&&e.isEdge()||!i.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Pt(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,d=t.w*u,h=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,h))return null;var p,f=l.get(e,r);if(f&&f.invalidated&&(f.invalidated=!1,f.texture.invalidatedWidth-=f.width),f)return f;if(p=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||d>1024)return null;var g=i.getTextureQueue(p),v=g[g.length-2],y=function(){return i.recycleTexture(p,d)||i.addTexture(p,d)};v||(v=g[g.length-1]),v||(v=y()),v.width-v.usedWidthr;D--)S=i.getElement(e,t,n,D,jl.downscale);P()}else{var T;if(!x&&!w&&!E)for(var _=r-1;_>=-4;_--){var M=l.get(e,_);if(M){T=M;break}}if(b(T))return i.queueElement(e,r),T;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,h,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return f={x:v.usedWidth,texture:v,level:r,scale:u,width:d,height:c,scaledLabelShown:h},v.usedWidth+=Math.ceil(d+8),v.eleCaches.push(f),l.set(e,r,f),i.checkTextureFullness(v),f},Xl.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},Xl.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?Ze(t,e):e.fullnessChecks++},Xl.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;Ze(n,e),e.retired=!0;for(var a=e.eleCaches,i=0;i=t)return i.retired=!1,i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,$e(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),Ze(r,i),n.push(i),i}},Xl.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),a=this.getKey(e),i=r[a];if(i)i.level=Math.max(i.level,t),i.eles.merge(e),i.reqs++,n.updateItem(i);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:a};n.push(o),r[a]=o}},Xl.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),a=[],i=t.lookup,o=0;o<1&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=i.hasCache(u,s.level);if(r[l]=null,!c){a.push(s);var d=t.getBoundingBox(u);t.getElement(u,d,e,s.level,jl.dequeue)}}return a},Xl.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),a=n[r];null!=a&&(1===a.eles.length?(a.reqs=Oe,t.updateItem(a),t.pop(),n[r]=null):a.eles.unmerge(e))},Xl.onDequeue=function(e){this.onDequeues.push(e)},Xl.offDequeue=function(e){Ze(this.onDequeues,e)},Xl.setupDequeueing=Vl({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},a=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};a(1),a(-1);for(var i=c.length-1;i>=0;i--){var o=c[i];o.invalid&&Ze(c,o)}}();var d=function(t){var a=(t=t||{}).after;!function(){if(!o){o=zt();for(var t=0;t32767||s>32767)return null;if(i*s>16e6)return null;var l=r.makeLayer(o,n);if(null!=a){var d=c.indexOf(a)+1;c.splice(d,0,l)}else(void 0===t.insert||t.insert)&&c.unshift(l);return l};if(r.skipping&&!i)return null;for(var h=null,p=e.length/1,f=!i,g=0;g=p||!qt(h.bb,v.boundingBox()))&&!(h=d({insert:!0,after:h})))return null;s||f?r.queueLayer(h,v):r.drawEleInLayer(h,v,n,t),h.eles.push(v),m[n]=h}}return s||(f?null:c)},Hl.getEleLevelForLayerLevel=function(e,t){return e},Hl.drawEleInLayer=function(e,t,n,r){var a=this.renderer,i=e.context,o=t.boundingBox();0!==o.w&&0!==o.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(i,!1),a.drawCachedElement(i,t,null,null,n,!0),a.setImgSmoothing(i,!0))},Hl.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,a=0;a0)return!1;if(i.invalid)return!1;r+=i.eles.length}return r===t.length},Hl.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},Hl.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=ke(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},Hl.invalidateLayer=function(e){if(this.lastInvalidationTime=ke(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];Ze(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var a=0;a3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!i||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=i?t.pstyle("opacity").value:1,c=i?t.pstyle("line-opacity").value:1,d=t.pstyle("curve-style").value,h=t.pstyle("line-style").value,p=t.pstyle("width").pfValue,f=t.pstyle("line-cap").value,g=t.pstyle("line-outline-width").value,v=t.pstyle("line-outline-color").value,y=u*c,m=u*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===d?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=p,e.lineCap=f,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;o.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var w=t.pstyle("ghost-offset-x").pfValue,E=t.pstyle("ghost-offset-y").pfValue,k=t.pstyle("ghost-opacity").value,C=y*k;e.translate(w,E),b(C),x(C),e.translate(-w,-E)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;e.lineWidth=p+g,e.lineCap=f,g>0?(o.colorStrokeStyle(e,v[0],v[1],v[2],n),"straight-triangle"===d?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")):e.lineCap="butt"}();a&&o.drawEdgeUnderlay(e,t),b(),x(),a&&o.drawEdgeOverlay(e,t),o.drawElementText(e,t,null,r),n&&e.translate(l.x1,l.y1)}}},cu=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var a=this,i=a.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||i?t.lineCap="round":t.lineCap="butt",a.colorStrokeStyle(t,l[0],l[1],l[2],r),a.drawEdgePath(n,t,o.allpts,"solid")}}}};uu.drawEdgeOverlay=cu("overlay"),uu.drawEdgeUnderlay=cu("underlay"),uu.drawEdgePath=function(e,t,n,r){var a,i=e._private.rscratch,o=t,s=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l){var h=n.join("$");i.pathCacheKey&&i.pathCacheKey===h?(a=t=i.pathCache,s=!0):(a=t=new Path2D,i.pathCacheKey=h,i.pathCache=a)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(u),o.lineDashOffset=c;break;case"solid":o.setLineDash([])}if(!s&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&void 0!==arguments[5]?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+a-i),e.quadraticCurveTo(t+r,n+a,t+r-i,n+a),e.lineTo(t+i,n+a),e.quadraticCurveTo(t,n+a,t,n+a-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath(),o?e.stroke():e.fill()}hu.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),a=Math.ceil(Pt(n*r));t=Math.pow(2,a)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(i&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),d=t.pstyle("source-label"),h=t.pstyle("target-label");if(u||(!c||!c.value)&&(!d||!d.value)&&(!h||!h.value))return;e.textAlign="center",e.textBaseline="bottom"}var p,f=!n;n&&(p=n,e.translate(-p.x1,-p.y1)),null==a?(o.drawText(e,t,null,f,i),t.isEdge()&&(o.drawText(e,t,"source",f,i),o.drawText(e,t,"target",f,i))):o.drawText(e,t,a,f,i),n&&e.translate(p.x1,p.y1)},hu.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,a=t.pstyle("font-size").pfValue+"px",i=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+a+" "+i,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},hu.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",a=e.pstyle(r+"text-rotation"),i=Qe(n,"labelAngle",t);return"autorotate"===a.strValue?e.isEdge()?i:0:"none"===a.strValue?0:a.pfValue},hu.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=t._private.rscratch,o=a?t.effectiveOpacity():1;if(!a||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=Qe(i,"labelX",n),c=Qe(i,"labelY",n),d=this.getLabelText(t,n);if(null!=d&&""!==d&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,a);var h,p=n?n+"-":"",f=Qe(i,"labelWidth",n),g=Qe(i,"labelHeight",n),v=t.pstyle(p+"text-margin-x").pfValue,y=t.pstyle(p+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(m&&(b="center",x="center"),u+=v,c+=y,0!==(h=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(h),u=0,c=0),x){case"top":break;case"center":c+=g/2;break;case"bottom":c+=g}var w=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,k=t.pstyle("text-border-width").pfValue,C=t.pstyle("text-background-padding").pfValue,S=0===t.pstyle("text-background-shape").strValue.indexOf("round");if(w>0||k>0&&E>0){var P=u-C;switch(b){case"left":P-=f;break;case"center":P-=f/2}var D=c-g-C,T=f+2*C,_=g+2*C;if(w>0){var M=e.fillStyle,B=t.pstyle("text-background-color").value;e.fillStyle="rgba("+B[0]+","+B[1]+","+B[2]+","+w*o+")",S?pu(e,P,D,T,_,2):e.fillRect(P,D,T,_),e.fillStyle=M}if(k>0&&E>0){var N=e.strokeStyle,I=e.lineWidth,z=t.pstyle("text-border-color").value,A=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+z[0]+","+z[1]+","+z[2]+","+E*o+")",e.lineWidth=k,e.setLineDash)switch(A){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=k/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(S?pu(e,P,D,T,_,2,"stroke"):e.strokeRect(P,D,T,_),"double"===A){var L=k/2;S?pu(e,P+L,D+L,T-2*L,_-2*L,2,"stroke"):e.strokeRect(P+L,D+L,T-2*L,_-2*L)}e.setLineDash&&e.setLineDash([]),e.lineWidth=I,e.strokeStyle=N}}var O=2*t.pstyle("text-outline-width").pfValue;if(O>0&&(e.lineWidth=O),"wrap"===t.pstyle("text-wrap").value){var R=Qe(i,"labelWrapCachedLines",n),V=Qe(i,"labelLineHeight",n),F=f/2,j=this.getLabelJustification(t);switch("auto"===j||("left"===b?"left"===j?u+=-f:"center"===j&&(u+=-F):"center"===b?"left"===j?u+=-F:"right"===j&&(u+=F):"right"===b&&("center"===j?u+=F:"right"===j&&(u+=f))),x){case"top":case"center":case"bottom":c-=(R.length-1)*V}for(var q=0;q0&&e.strokeText(R[q],u,c),e.fillText(R[q],u,c),c+=V}else O>0&&e.strokeText(d,u,c),e.fillText(d,u,c);0!==h&&(e.rotate(-h),e.translate(-s,-l))}}};var fu={drawNode:function(e,t,n){var r,a,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,d=t.position();if(k(d.x)&&k(d.y)&&(!s||t.visible())){var h,p,f=s?t.effectiveOpacity():1,g=l.usePaths(),v=!1,y=t.padding();r=t.width()+2*y,a=t.height()+2*y,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:T;l.eleFillStyle(e,t,n)},X=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L;l.colorStrokeStyle(e,_[0],_[1],_[2],t)},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F;l.colorStrokeStyle(e,R[0],R[1],R[2],t)},H=function(e,t,n,r){var a,i=l.nodePathCache=l.nodePathCache||[],o=Ne("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+q),s=i[o],u=!1;return null!=s?(a=s,u=!0,c.pathCache=a):(a=new Path2D,i[o]=c.pathCache=a),{path:a,cacheHit:u}},K=t.pstyle("shape").strValue,G=t.pstyle("shape-polygon-points").pfValue;if(g){e.translate(d.x,d.y);var U=H(r,a,K,G);h=U.path,v=U.cacheHit}var Z=function(){if(!v){var n=d;g&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(h||e,n.x,n.y,r,a,q,c)}g?e.fill(h):e.fill()},$=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=u.backgrounding,i=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;l.hasPie(t)&&(l.drawPie(e,t,i),n&&(g||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,q,c)))},J=function(){var t=(P>0?P:-P)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:f),n=P>0?0:255;0!==P&&(l.colorFillStyle(e,n,n,n,t),g?e.fill(h):e.fill())},ee=function(){if(D>0){if(e.lineWidth=D,e.lineCap=N,e.lineJoin=B,e.setLineDash)switch(M){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(z),e.lineDashOffset=A;break;case"solid":case"double":e.setLineDash([])}if("center"!==I){if(e.save(),e.lineWidth*=2,"inside"===I)g?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-r/2-D,-a/2-D,r+2*D,a+2*D),t.addPath(h),e.clip(t,"evenodd")}g?e.stroke(h):e.stroke(),e.restore()}else g?e.stroke(h):e.stroke();if("double"===M){e.lineWidth=D/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",g?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},te=function(){if(O>0){if(e.lineWidth=O,e.lineCap="butt",e.setLineDash)switch(V){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=d;g&&(n={x:0,y:0});var i=l.getNodeShape(t),o=D;"inside"===I&&(o=0),"outside"===I&&(o*=2);var s,u=(r+o+(O+j))/r,c=(a+o+(O+j))/a,h=r*u,p=a*c,f=l.nodeShapes[i].points;if(g&&(s=H(h,p,i,f).path),"ellipse"===i)l.drawEllipsePath(s||e,n.x,n.y,h,p);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(i)){var v=0,y=0,m=0;"round-diamond"===i?v=1.4*(o+j+O):"round-heptagon"===i?(v=1.075*(o+j+O),m=-(o/2+j+O)/35):"round-hexagon"===i?v=1.12*(o+j+O):"round-pentagon"===i?(v=1.13*(o+j+O),m=-(o/2+j+O)/15):"round-tag"===i?(v=1.12*(o+j+O),y=.07*(o/2+O+j)):"round-triangle"===i&&(v=(o+j+O)*(Math.PI/2),m=-(o+j/2+O)/Math.PI),0!==v&&(h=r*(u=(r+v)/r),["round-hexagon","round-tag"].includes(i)||(p=a*(c=(a+v)/a)));for(var b=h/2,x=p/2,w=(q="auto"===q?un(h,p):q)+(o+O+j)/2,E=new Array(f.length/2),k=new Array(f.length/2),C=0;C0){if(r=r||n.position(),null==a||null==i){var d=n.padding();a=n.width()+2*d,i=n.height()+2*d}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,a+2*o,i+2*o,c),t.fill()}}}};fu.drawNodeOverlay=gu("overlay"),fu.drawNodeUnderlay=gu("underlay"),fu.hasPie=function(e){return(e=e[0])._private.hasPie},fu.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var a=t.cy().style(),i=t.pstyle("pie-size"),o=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,d=0;this.usePaths()&&(o=0,s=0),"%"===i.units?c*=i.pfValue:void 0!==i.pfValue&&(c=i.pfValue/2);for(var h=1;h<=a.pieBackgroundN;h++){var p=t.pstyle("pie-"+h+"-background-size").value,f=t.pstyle("pie-"+h+"-background-color").value,g=t.pstyle("pie-"+h+"-background-opacity").value*n,v=p/100;v+d>1&&(v=1-d);var y=1.5*Math.PI+2*Math.PI*d,m=y+2*Math.PI*v;0===p||d>=1||d+v>1||(e.beginPath(),e.moveTo(o,s),e.arc(o,s,c,y,m),e.closePath(),this.colorFillStyle(e,f[0],f[1],f[2],g),e.fill(),d+=v)}};for(var vu={getPixelRatio:function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},paintCache:function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,a=0;ao.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!d&&(c[o.NODE]=!0,c[o.SELECT_BOX]=!0);var m=l.style(),b=l.zoom(),x=void 0!==a?a:b,w=l.pan(),E={x:w.x,y:w.y},k={zoom:b,pan:{x:w.x,y:w.y}},C=o.prevViewport;void 0===C||k.zoom!==C.zoom||k.pan.x!==C.pan.x||k.pan.y!==C.pan.y||g&&!f||(o.motionBlurPxRatio=1),i&&(E=i),x*=s,E.x*=s,E.y*=s;var S=o.getCachedZSortedEles();function P(e,t,n,r,a){var i=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",o.colorFillStyle(e,255,255,255,o.motionBlurTransparency),e.fillRect(t,n,r,a),e.globalCompositeOperation=i}function D(e,r){var s,l,c,d;o.clearingMotionBlur||e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]?(s=E,l=x,c=o.canvasWidth,d=o.canvasHeight):(s={x:w.x*p,y:w.y*p},l=b*p,c=o.canvasWidth*p,d=o.canvasHeight*p),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?P(e,0,0,c,d):t||void 0!==r&&!r||e.clearRect(0,0,c,d),n||(e.translate(s.x,s.y),e.scale(l,l)),i&&e.translate(i.x,i.y),a&&e.scale(a,a)}if(d||(o.textureDrawLastFrame=!1),d){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=l.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var T=o.data.bufferContexts[o.TEXTURE_BUFFER];T.setTransform(1,0,0,1,0,0),T.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:T,drawOnlyNodeLayer:!0,forcedPxRatio:s*o.textureMult}),(k=o.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:o.canvasWidth,height:o.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}c[o.DRAG]=!1,c[o.NODE]=!1;var _=u.contexts[o.NODE],M=o.textureCache.texture;k=o.textureCache.viewport,_.setTransform(1,0,0,1,0,0),h?P(_,0,0,k.width,k.height):_.clearRect(0,0,k.width,k.height);var B=m.core("outside-texture-bg-color").value,N=m.core("outside-texture-bg-opacity").value;o.colorFillStyle(_,B[0],B[1],B[2],N),_.fillRect(0,0,k.width,k.height),b=l.zoom(),D(_,!1),_.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/s,k.height/k.zoom/s),_.drawImage(M,k.mpan.x,k.mpan.y,k.width/k.zoom/s,k.height/k.zoom/s)}else o.textureOnViewport&&!t&&(o.textureCache=null);var I=l.extent(),z=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),A=o.hideEdgesOnViewport&&z,L=[];if(L[o.NODE]=!c[o.NODE]&&h&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,L[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),L[o.DRAG]=!c[o.DRAG]&&h&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,L[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),c[o.NODE]||n||r||L[o.NODE]){var O=h&&!L[o.NODE]&&1!==p;D(_=t||(O?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:u.contexts[o.NODE]),h&&!O?"motionBlur":void 0),A?o.drawCachedNodes(_,S.nondrag,s,I):o.drawLayeredElements(_,S.nondrag,s,I),o.debug&&o.drawDebugPoints(_,S.nondrag),n||h||(c[o.NODE]=!1)}if(!r&&(c[o.DRAG]||n||L[o.DRAG])&&(O=h&&!L[o.DRAG]&&1!==p,D(_=t||(O?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:u.contexts[o.DRAG]),h&&!O?"motionBlur":void 0),A?o.drawCachedNodes(_,S.drag,s,I):o.drawCachedElements(_,S.drag,s,I),o.debug&&o.drawDebugPoints(_,S.drag),n||h||(c[o.DRAG]=!1)),o.showFps||!r&&c[o.SELECT_BOX]&&!n){if(D(_=t||u.contexts[o.SELECT_BOX]),1==o.selection[4]&&(o.hoverData.selecting||o.touchData.selecting)){b=o.cy.zoom();var R=m.core("selection-box-border-width").value/b;_.lineWidth=R,_.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",_.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),R>0&&(_.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",_.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(u.bgActivePosistion&&!o.hoverData.selecting){b=o.cy.zoom();var V=u.bgActivePosistion;_.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",_.beginPath(),_.arc(V.x,V.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),_.fill()}var F=o.lastRedrawTime;if(o.showFps&&F){F=Math.round(F);var j=Math.round(1e3/F);_.setTransform(1,0,0,1,0,0),_.fillStyle="rgba(255, 0, 0, 0.75)",_.strokeStyle="rgba(255, 0, 0, 0.75)",_.lineWidth=1,_.fillText("1 frame = "+F+" ms = "+j+" fps",0,20),_.strokeRect(0,30,250,20),_.fillRect(0,30,250*Math.min(j/60,1),20)}n||(c[o.SELECT_BOX]=!1)}if(h&&1!==p){var q=u.contexts[o.NODE],Y=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],X=u.contexts[o.DRAG],W=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],H=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!y?e.clearRect(0,0,o.canvasWidth,o.canvasHeight):P(e,0,0,o.canvasWidth,o.canvasHeight);var r=p;e.drawImage(t,0,0,o.canvasWidth*r,o.canvasHeight*r,0,0,o.canvasWidth,o.canvasHeight)};(c[o.NODE]||L[o.NODE])&&(H(q,Y,L[o.NODE]),c[o.NODE]=!1),(c[o.DRAG]||L[o.DRAG])&&(H(X,W,L[o.DRAG]),c[o.DRAG]=!1)}o.prevViewport=k,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),h&&(o.motionBlurTimeout=setTimeout((function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!d,o.mbFrames=0,c[o.NODE]=!0,c[o.DRAG]=!0,o.redraw()}),100)),t||l.emit("render")}},yu={drawPolygonPath:function(e,t,n,r,a,i){var o=r/2,s=a/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*i[0],n+s*i[1]);for(var l=1;l0&&i>0){h.clearRect(0,0,a,i),h.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(e.full)h.translate(-n.x1*l,-n.y1*l),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(n.x1*l,n.y1*l);else{var f=t.pan(),g={x:f.x*l,y:f.y*l};l*=t.zoom(),h.translate(g.x,g.y),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(-g.x,-g.y)}e.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=e.bg,h.rect(0,0,a,i),h.fill())}return d},Cu.png=function(e){return Pu(e,this.bufferCanvasImage(e),"image/png")},Cu.jpg=function(e){return Pu(e,this.bufferCanvasImage(e),"image/jpeg")};var Du=_u,Tu=_u.prototype;function _u(e){var t=this,n=t.cy.window().document;t.data={canvases:new Array(Tu.CANVAS_LAYERS),contexts:new Array(Tu.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Tu.CANVAS_LAYERS),bufferCanvases:new Array(Tu.BUFFER_COUNT),bufferContexts:new Array(Tu.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",a="rgba(0,0,0,0)";t.data.canvasContainer=n.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=a,i.position="relative",i.zIndex="0",i.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[r]=a;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};p&&p.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var l=0;l{"use strict";var e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),r=1;r{var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],r=!0,n=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);r=!0);}catch(t){n=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},n=i(140).layoutBase.LinkedList,o={getTopMostNodes:function(t){for(var e={},i=0;i0&&l.merge(t)}));for(var c=0;c1){l=a[0],c=l.connectedEdges().length,a.forEach((function(t){t.connectedEdges().length0&&r.set("dummy"+(r.size+1),u),p},relocateComponent:function(t,e,i){if(!i.fixedNodeConstraint){var n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if("draft"==i.quality){var h=!0,l=!1,c=void 0;try{for(var d,g=e.nodeIndexes[Symbol.iterator]();!(h=(d=g.next()).done);h=!0){var u=d.value,p=r(u,2),f=p[0],y=p[1],v=i.cy.getElementById(f);if(v){var m=v.boundingBox(),E=e.xCoords[y]-m.w/2,N=e.xCoords[y]+m.w/2,T=e.yCoords[y]-m.h/2,A=e.yCoords[y]+m.h/2;Eo&&(o=N),Ta&&(a=A)}}}catch(t){l=!0,c=t}finally{try{!h&&g.return&&g.return()}finally{if(l)throw c}}var w=t.x-(o+n)/2,L=t.y-(a+s)/2;e.xCoords=e.xCoords.map((function(t){return t+w})),e.yCoords=e.yCoords.map((function(t){return t+L}))}else{Object.keys(e).forEach((function(t){var i=e[t],r=i.getRect().x,h=i.getRect().x+i.getRect().width,l=i.getRect().y,c=i.getRect().y+i.getRect().height;ro&&(o=h),la&&(a=c)}));var I=t.x-(o+n)/2,_=t.y-(a+s)/2;Object.keys(e).forEach((function(t){var i=e[t];i.setCenter(i.getCenterX()+I,i.getCenterY()+_)}))}}},calcBoundingBox:function(t,e,i,r){for(var n=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,h=void 0,l=void 0,c=void 0,d=void 0,g=t.descendants().not(":parent"),u=g.length,p=0;p(h=e[r.get(f.id())]-f.width()/2)&&(n=h),o<(l=e[r.get(f.id())]+f.width()/2)&&(o=l),s>(c=i[r.get(f.id())]-f.height()/2)&&(s=c),a<(d=i[r.get(f.id())]+f.height()/2)&&(a=d)}var y={};return y.topLeftX=n,y.topLeftY=s,y.width=o-n,y.height=a-s,y},calcParentsWithoutChildren:function(t,e){var i=t.collection();return e.nodes(":parent").forEach((function(t){var e=!1;t.children().forEach((function(t){"none"!=t.css("display")&&(e=!0)})),e||i.merge(t)})),i}};t.exports=o},816:(t,e,i)=>{var r=i(548),n=i(140).CoSELayout,o=i(140).CoSENode,s=i(140).layoutBase.PointD,a=i(140).layoutBase.DimensionD,h=i(140).layoutBase.LayoutConstants,l=i(140).layoutBase.FDLayoutConstants,c=i(140).CoSEConstants;t.exports={coseLayout:function(t,e){var i=t.cy,d=t.eles,g=d.nodes(),u=d.edges(),p=void 0,f=void 0,y=void 0,v={};t.randomize&&(p=e.nodeIndexes,f=e.xCoords,y=e.yCoords);var m=function(t){return"function"==typeof t},E=function(t,e){return m(t)?t(e):t},N=r.calcParentsWithoutChildren(i,d);null!=t.nestingFactor&&(c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(c.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(c.MAX_ITERATIONS=l.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(c.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(c.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(c.TILING_COMPARE_BY=t.tilingCompareBy),"proof"==t.quality?h.QUALITY=2:h.QUALITY=0,c.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!t.randomize,c.ANIMATE=l.ANIMATE=h.ANIMATE=t.animate,c.TILE=t.tile,c.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,c.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,c.PURE_INCREMENTAL=!t.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!1),"enforced"==t.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!1),"cose"==t.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?c.TREE_REDUCTION_ON_INCREMENTAL=!1:c.TREE_REDUCTION_ON_INCREMENTAL=!0;var T=new n,A=T.newGraphManager();return function t(e,i,n,h){for(var l=i.length,c=0;c0&&t(n.getGraphManager().add(n.newGraph(),u),g,n,h)}}(A.addRoot(),r.getTopMostNodes(g),T,t),function(e,i,r){for(var n=0,o=0,s=0;s0?c.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=n/o:m(t.idealEdgeLength)?c.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:c.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,c.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,c.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)}(T,A,u),function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)}(T,t),T.runLayout(),v}}},212:(t,e,i)=>{var r=function(){function t(t,e){for(var i=0;i0)if(d){var g=o.getTopMostNodes(t.eles.nodes());if((h=o.connectComponents(e,t.eles,g)).forEach((function(t){var e=t.boundingBox();l.push({x:e.x1+e.w/2,y:e.y1+e.h/2})})),t.randomize&&h.forEach((function(e){t.eles=e,r.push(s(t))})),"default"==t.quality||"proof"==t.quality){var u=e.collection();if(t.tile){var p=new Map,f=0,y={nodeIndexes:p,xCoords:[],yCoords:[]},v=[];if(h.forEach((function(t,e){0==t.edges().length&&(t.nodes().forEach((function(e,i){u.merge(t.nodes()[i]),e.isParent()||(y.nodeIndexes.set(t.nodes()[i].id(),f++),y.xCoords.push(t.nodes()[0].position().x),y.yCoords.push(t.nodes()[0].position().y))})),v.push(e))})),u.length>1){var m=u.boundingBox();l.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),h.push(u),r.push(y);for(var E=v.length-1;E>=0;E--)h.splice(v[E],1),r.splice(v[E],1),l.splice(v[E],1)}}h.forEach((function(e,i){t.eles=e,n.push(a(t,r[i])),o.relocateComponent(l[i],n[i],t)}))}else h.forEach((function(e,i){o.relocateComponent(l[i],r[i],t)}));var N=new Set;if(h.length>1){var T=[],A=i.filter((function(t){return"none"==t.css("display")}));h.forEach((function(e,i){var s=void 0;if("draft"==t.quality&&(s=r[i].nodeIndexes),e.nodes().not(A).length>0){var a={edges:[],nodes:[]},h=void 0;e.nodes().not(A).forEach((function(e){if("draft"==t.quality)if(e.isParent()){var l=o.calcBoundingBox(e,r[i].xCoords,r[i].yCoords,s);a.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else h=s.get(e.id()),a.nodes.push({x:r[i].xCoords[h]-e.boundingbox().w/2,y:r[i].yCoords[h]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else n[i][e.id()]&&a.nodes.push({x:n[i][e.id()].getLeft(),y:n[i][e.id()].getTop(),width:n[i][e.id()].getWidth(),height:n[i][e.id()].getHeight()})})),e.edges().forEach((function(e){var h=e.source(),l=e.target();if("none"!=h.css("display")&&"none"!=l.css("display"))if("draft"==t.quality){var c=s.get(h.id()),d=s.get(l.id()),g=[],u=[];if(h.isParent()){var p=o.calcBoundingBox(h,r[i].xCoords,r[i].yCoords,s);g.push(p.topLeftX+p.width/2),g.push(p.topLeftY+p.height/2)}else g.push(r[i].xCoords[c]),g.push(r[i].yCoords[c]);if(l.isParent()){var f=o.calcBoundingBox(l,r[i].xCoords,r[i].yCoords,s);u.push(f.topLeftX+f.width/2),u.push(f.topLeftY+f.height/2)}else u.push(r[i].xCoords[d]),u.push(r[i].yCoords[d]);a.edges.push({startX:g[0],startY:g[1],endX:u[0],endY:u[1]})}else n[i][h.id()]&&n[i][l.id()]&&a.edges.push({startX:n[i][h.id()].getCenterX(),startY:n[i][h.id()].getCenterY(),endX:n[i][l.id()].getCenterX(),endY:n[i][l.id()].getCenterY()})})),a.nodes.length>0&&(T.push(a),N.add(i))}}));var w=c.packComponents(T,t.randomize).shifts;if("draft"==t.quality)r.forEach((function(t,e){var i=t.xCoords.map((function(t){return t+w[e].dx})),r=t.yCoords.map((function(t){return t+w[e].dy}));t.xCoords=i,t.yCoords=r}));else{var L=0;N.forEach((function(t){Object.keys(n[t]).forEach((function(e){var i=n[t][e];i.setCenter(i.getCenterX()+w[L].dx,i.getCenterY()+w[L].dy)})),L++}))}}}else{var I=t.eles.boundingBox();if(l.push({x:I.x1+I.w/2,y:I.y1+I.h/2}),t.randomize){var _=s(t);r.push(_)}"default"==t.quality||"proof"==t.quality?(n.push(a(t,r[0])),o.relocateComponent(l[0],n[0],t)):o.relocateComponent(l[0],r[0],t)}var C=function(e,i){if("default"==t.quality||"proof"==t.quality){"number"==typeof e&&(e=i);var o=void 0,s=void 0,a=e.data("id");return n.forEach((function(t){a in t&&(o={x:t[a].getRect().getCenterX(),y:t[a].getRect().getCenterY()},s=t[a])})),t.nodeDimensionsIncludeLabels&&(s.labelWidth&&("left"==s.labelPosHorizontal?o.x+=s.labelWidth/2:"right"==s.labelPosHorizontal&&(o.x-=s.labelWidth/2)),s.labelHeight&&("top"==s.labelPosVertical?o.y+=s.labelHeight/2:"bottom"==s.labelPosVertical&&(o.y-=s.labelHeight/2))),null==o&&(o={x:e.position("x"),y:e.position("y")}),{x:o.x,y:o.y}}var h=void 0;return r.forEach((function(t){var i=t.nodeIndexes.get(e.id());null!=i&&(h={x:t.xCoords[i],y:t.yCoords[i]})})),null==h&&(h={x:e.position("x"),y:e.position("y")}),{x:h.x,y:h.y}};if("default"==t.quality||"proof"==t.quality||t.randomize){var M=o.calcParentsWithoutChildren(e,i),x=i.filter((function(t){return"none"==t.css("display")}));t.eles=i.not(x),i.nodes().not(":parent").not(x).layoutPositions(this,t,C),M.length>0&&M.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=l},657:(t,e,i)=>{var r=i(548),n=i(140).layoutBase.Matrix,o=i(140).layoutBase.SVD;t.exports={spectralLayout:function(t){var e=t.cy,i=t.eles,s=i.nodes(),a=i.nodes(":parent"),h=new Map,l=new Map,c=new Map,d=[],g=[],u=[],p=[],f=[],y=[],v=[],m=[],E=void 0,N=1e8,T=1e-9,A=t.piTol,w=t.samplingType,L=t.nodeSeparation,I=void 0,_=function(t,e,i){for(var r=[],n=0,o=0,s=0,a=void 0,h=[],c=0,g=1,u=0;u=n;){s=r[n++];for(var p=d[s],v=0;vc&&(c=f[T],g=T)}return g};r.connectComponents(e,i,r.getTopMostNodes(s),h),a.forEach((function(t){r.connectComponents(e,i,r.getTopMostNodes(t.descendants().intersection(i)),h)}));for(var C=0,M=0;M0&&(r.isParent()?d[e].push(c.get(r.id())):d[e].push(r.id()))}))}));var S=function(t){var i=l.get(t),r=void 0;h.get(t).forEach((function(n){r=e.getElementById(n).isParent()?c.get(n):n,d[i].push(r),d[l.get(r)].push(t)}))},P=!0,U=!1,Y=void 0;try{for(var k,H=h.keys()[Symbol.iterator]();!(P=(k=H.next()).done);P=!0)S(k.value)}catch(t){U=!0,Y=t}finally{try{!P&&H.return&&H.return()}finally{if(U)throw Y}}var X=void 0;if((E=l.size)>2){I=E=1)break;l=h}for(var p=0;p=1)break;l=h}for(var v=0;v{var r=i(212),n=function(t){t&&t("layout","fcose",r)};"undefined"!=typeof cytoscape&&n(cytoscape),t.exports=n},140:e=>{e.exports=t}},i={},r=function t(r){var n=i[r];if(void 0!==n)return n.exports;var o=i[r]={exports:{}};return e[r](o,o.exports,t),o.exports}(579);return r})()},t.exports=r(i(1709))},1709:function(t,e,i){var r;r=function(t){return(()=>{"use strict";var e={45:(t,e,i)=>{var r={};r.layoutBase=i(551),r.CoSEConstants=i(806),r.CoSEEdge=i(767),r.CoSEGraph=i(880),r.CoSEGraphManager=i(578),r.CoSELayout=i(765),r.CoSENode=i(991),r.ConstraintHandler=i(902),t.exports=r},806:(t,e,i)=>{var r=i(551).FDLayoutConstants;function n(){}for(var o in r)n[o]=r[o];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,t.exports=n},767:(t,e,i)=>{var r=i(551).FDLayoutEdge;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},880:(t,e,i)=>{var r=i(551).LGraph;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},578:(t,e,i)=>{var r=i(551).LGraphManager;function n(t){r.call(this,t)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},765:(t,e,i)=>{var r=i(551).FDLayout,n=i(578),o=i(880),s=i(991),a=i(767),h=i(806),l=i(902),c=i(551).FDLayoutConstants,d=i(551).LayoutConstants,g=i(551).Point,u=i(551).PointD,p=i(551).DimensionD,f=i(551).Layout,y=i(551).Integer,v=i(551).IGeometry,m=i(551).LGraph,E=i(551).Transform,N=i(551).LinkedList;function T(){r.call(this),this.toBeTiled={},this.constraints={}}for(var A in T.prototype=Object.create(r.prototype),r)T[A]=r[A];T.prototype.newGraphManager=function(){var t=new n(this);return this.graphManager=t,t},T.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},T.prototype.newNode=function(t){return new s(this.graphManager,t)},T.prototype.newEdge=function(t){return new a(null,null,t)},T.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=c.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=c.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},T.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/c.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},T.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.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)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)})),this.graphManager.setAllNodesToApplyGravitation(i));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},T.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(),h.PURE_INCREMENTAL?this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL/2: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()),h.PURE_INCREMENTAL?this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i0&&this.updateDisplacements(),e=0;e0&&(r.fixedNodeWeight=o)}if(this.constraints.relativePlacementConstraint){var s=new Map,a=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 l=this.constraints.alignmentConstraint.vertical;for(i=0;i=2*t.length/3;r--)e=Math.floor(Math.random()*(r+1)),i=t[r],t[r]=t[e],t[e]=i;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 i=s.has(e.left)?s.get(e.left):e.left,r=s.has(e.right)?s.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(i)||(t.nodesInRelativeHorizontal.push(i),t.nodeToRelativeConstraintMapHorizontal.set(i,[]),t.dummyToNodeForVerticalAlignment.has(i)?t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(i).getCenterX())),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.nodeToRelativeConstraintMapHorizontal.get(i).push({right:r,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(r).push({left:i,gap:e.gap})}else{var n=a.has(e.top)?a.get(e.top):e.top,o=a.has(e.bottom)?a.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(n)||(t.nodesInRelativeVertical.push(n),t.nodeToRelativeConstraintMapVertical.set(n,[]),t.dummyToNodeForHorizontalAlignment.has(n)?t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(n)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(n).getCenterY())),t.nodesInRelativeVertical.includes(o)||(t.nodesInRelativeVertical.push(o),t.nodeToRelativeConstraintMapVertical.set(o,[]),t.dummyToNodeForHorizontalAlignment.has(o)?t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(o)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(o).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(n).push({bottom:o,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(o).push({top:n,gap:e.gap})}}));else{var d=new Map,g=new Map;this.constraints.relativePlacementConstraint.forEach((function(t){if(t.left){var e=s.has(t.left)?s.get(t.left):t.left,i=s.has(t.right)?s.get(t.right):t.right;d.has(e)?d.get(e).push(i):d.set(e,[i]),d.has(i)?d.get(i).push(e):d.set(i,[e])}else{var r=a.has(t.top)?a.get(t.top):t.top,n=a.has(t.bottom)?a.get(t.bottom):t.bottom;g.has(r)?g.get(r).push(n):g.set(r,[n]),g.has(n)?g.get(n).push(r):g.set(n,[r])}}));var u=function(t,e){var i=[],r=[],n=new N,o=new Set,s=0;return t.forEach((function(a,h){if(!o.has(h)){i[s]=[],r[s]=!1;var l=h;for(n.push(l),o.add(l),i[s].push(l);0!=n.length;)l=n.shift(),e.has(l)&&(r[s]=!0),t.get(l).forEach((function(t){o.has(t)||(n.push(t),o.add(t),i[s].push(t))}));s++}})),{components:i,isFixed:r}},p=u(d,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=p.components,this.fixedComponentsOnHorizontal=p.isFixed;var f=u(g,t.fixedNodesOnVertical);this.componentsOnVertical=f.components,this.fixedComponentsOnVertical=f.isFixed}}},T.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach((function(e){var i=t.idToNodeMap.get(e.nodeId);i.displacementX=0,i.displacementY=0})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,i=0;i1)for(a=0;ar&&(r=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},T.radialLayout=function(t,e,i){var r=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(e,null,0,359,0,r);var n=m.calculateBounds(t),o=new E;o.setDeviceOrgX(n.getMinX()),o.setDeviceOrgY(n.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var y=f[0];f.splice(0,1);var m=c.indexOf(y);m>=0&&c.splice(m,1),p--,d--}g=null!=e?(c.indexOf(f[0])+1)%p:0;for(var E=Math.abs(r-i)/d,N=g;u!=d;N=++N%p){var A=c[N].getOtherEnd(t);if(A!=e){var w=(i+u*E)%360,L=(w+E)%360;T.branchRadialLayout(A,t,w,L,n+o,o),u++}}},T.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,i=0;ie&&(e=r)}return e},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],r=this.graphManager.getAllNodes(),n=0;n1){var r="DummyCompound_"+i;t.memberGroups[r]=e[i];var n=e[i][0].getParent(),o=new s(t.graphManager);o.id=r,o.paddingLeft=n.paddingLeft||0,o.paddingRight=n.paddingRight||0,o.paddingBottom=n.paddingBottom||0,o.paddingTop=n.paddingTop||0,t.idToDummyNode[r]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=n.getChild();h.add(o);for(var l=0;ln?(r.rect.x-=(r.labelWidth-n)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-n)/2):"right"==r.labelPosHorizontal&&r.setWidth(n+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(o+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>o?(r.rect.y-=(r.labelHeight-o)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-o)/2):"bottom"==r.labelPosVertical&&r.setHeight(o+r.labelHeight))}}))},T.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,r=e.paddingLeft,n=e.paddingTop,o=e.labelMarginLeft,s=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,r,n,o,s)}},T.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(i){var r=t.idToDummyNode[i],n=r.paddingLeft,o=r.paddingTop,s=r.labelMarginLeft,a=r.labelMarginTop;t.adjustLocations(e[i],r.rect.x,r.rect.y,n,o,s,a)}))},T.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var r=i.getNodes(),n=0;n0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},T.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,r=0;rc&&(c=g.rect.height)}i+=c+t.verticalPadding}},T.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(r){var n=e[r];if(i.tiledMemberPack[r]=i.tileNodes(t[r],n.paddingLeft+n.paddingRight),n.rect.width=i.tiledMemberPack[r].width,n.rect.height=i.tiledMemberPack[r].height,n.setCenter(i.tiledMemberPack[r].centerX,i.tiledMemberPack[r].centerY),n.labelMarginLeft=0,n.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var o=n.rect.width,s=n.rect.height;n.labelWidth&&("left"==n.labelPosHorizontal?(n.rect.x-=n.labelWidth,n.setWidth(o+n.labelWidth),n.labelMarginLeft=n.labelWidth):"center"==n.labelPosHorizontal&&n.labelWidth>o?(n.rect.x-=(n.labelWidth-o)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-o)/2):"right"==n.labelPosHorizontal&&n.setWidth(o+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(s+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>s?(n.rect.y-=(n.labelHeight-s)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-s)/2):"bottom"==n.labelPosVertical&&n.setHeight(s+n.labelHeight))}}))},T.prototype.tileNodes=function(t,e){var i=this.tileNodesByFavoringDim(t,e,!0),r=this.tileNodesByFavoringDim(t,e,!1),n=this.getOrgRatio(i);return this.getOrgRatio(r)a&&(a=t.getWidth())}));var l,c=o/n,d=s/n,g=Math.pow(i-r,2)+4*(c+r)*(d+i)*n,u=(r-i+Math.sqrt(g))/(2*(c+r));e?(l=Math.ceil(u))==u&&l++:l=Math.floor(u);var p=l*(c+r)-r;return a>p&&(p=a),p+2*r},T.prototype.tileNodesByFavoringDim=function(t,e,i){var r=h.TILING_PADDING_VERTICAL,n=h.TILING_PADDING_HORIZONTAL,o=h.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:r,horizontalPadding:n,centerX:0,centerY:0};o&&(s.idealRowWidth=this.calcIdealRowWidth(t,i));var a=function(t){return t.rect.width*t.rect.height},l=function(t,e){return a(e)-a(t)};t.sort((function(t,e){var i=l;return s.idealRowWidth?(i=o)(t.id,e.id):i(t,e)}));for(var c=0,d=0,g=0;g0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},T.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,r=0;ri&&(e=r,i=t.rowWidth[r]);return e},T.prototype.canAddHorizontal=function(t,e,i){if(t.idealRowWidth){var r=t.rows.length-1;return t.rowWidth[r]+e+t.horizontalPadding<=t.idealRowWidth}var n=this.getShortestRowIndex(t);if(n<0)return!0;var o=t.rowWidth[n];if(o+t.horizontalPadding+e<=t.width)return!0;var s,a,h=0;return t.rowHeight[n]0&&(h=i+t.verticalPadding-t.rowHeight[n]),s=t.width-o>=e+t.horizontalPadding?(t.height+h)/(o+e+t.horizontalPadding):(t.height+h)/t.width,h=i+t.verticalPadding,(a=t.widtho&&e!=i){r.splice(-1,1),t.rows[i].push(n),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=r[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var d=n;d<=o;d++)l[0]+=this.grid[d][s-1].length+this.grid[d][s].length-1;if(o0)for(d=s;d<=a;d++)l[3]+=this.grid[n-1][d].length+this.grid[n][d].length-1;for(var g,u,p=y.MAX_VALUE,f=0;f{var r=i(551).FDLayoutNode,n=i(551).IMath;function o(t,e,i,n){r.call(this,t,e,i,n)}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.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*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,r=this.getChild().getNodes(),n=0;n{function r(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e0){var o=0;r.forEach((function(t){"horizontal"==e?(d.set(t,h.has(t)?l[h.get(t)]:n.get(t)),o+=d.get(t)):(d.set(t,h.has(t)?c[h.get(t)]:n.get(t)),o+=d.get(t))})),o/=r.length,t.forEach((function(t){i.has(t)||d.set(t,o)}))}else{var s=0;t.forEach((function(t){s+="horizontal"==e?h.has(t)?l[h.get(t)]:n.get(t):h.has(t)?c[h.get(t)]:n.get(t)})),s/=t.length,t.forEach((function(t){d.set(t,s)}))}}));for(var p=function(){var r=u.shift();t.get(r).forEach((function(t){if(d.get(t.id)s&&(s=v),Ea&&(a=E)}}catch(t){u=!0,p=t}finally{try{!g&&y.return&&y.return()}finally{if(u)throw p}}var N=(r+s)/2-(o+a)/2,T=!0,A=!1,w=void 0;try{for(var L,I=t[Symbol.iterator]();!(T=(L=I.next()).done);T=!0){var _=L.value;d.set(_,d.get(_)+N)}}catch(t){A=!0,w=t}finally{try{!T&&I.return&&I.return()}finally{if(A)throw w}}}))}return d},v=function(t){var e=0,i=0,r=0,n=0;if(t.forEach((function(t){t.left?l[h.get(t.left)]-l[h.get(t.right)]>=0?e++:i++:c[h.get(t.top)]-c[h.get(t.bottom)]>=0?r++:n++})),e>i&&r>n)for(var o=0;oi)for(var s=0;sn)for(var a=0;a1)e.fixedNodeConstraint.forEach((function(t,e){T[e]=[t.position.x,t.position.y],A[e]=[l[h.get(t.nodeId)],c[h.get(t.nodeId)]]})),w=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var i=e.alignmentConstraint.vertical,n=function(e){var n=new Set;i[e].forEach((function(t){n.add(t)}));var o,s=new Set([].concat(r(n)).filter((function(t){return I.has(t)})));o=s.size>0?l[h.get(s.values().next().value)]:f(n).x,i[e].forEach((function(e){T[t]=[o,c[h.get(e)]],A[t]=[l[h.get(e)],c[h.get(e)]],t++}))},o=0;o0?l[h.get(o.values().next().value)]:f(i).y,s[e].forEach((function(e){T[t]=[l[h.get(e)],n],A[t]=[l[h.get(e)],c[h.get(e)]],t++}))},d=0;dx&&(x=M[D].length,O=D);if(x0){var j={x:0,y:0};e.fixedNodeConstraint.forEach((function(t,e){var i,r,n=(r={x:l[h.get(t.nodeId)],y:c[h.get(t.nodeId)]},{x:(i=t.position).x-r.x,y:i.y-r.y});j.x+=n.x,j.y+=n.y})),j.x/=e.fixedNodeConstraint.length,j.y/=e.fixedNodeConstraint.length,l.forEach((function(t,e){l[e]+=j.x})),c.forEach((function(t,e){c[e]+=j.y})),e.fixedNodeConstraint.forEach((function(t){l[h.get(t.nodeId)]=t.position.x,c[h.get(t.nodeId)]=t.position.y}))}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var q=e.alignmentConstraint.vertical,$=function(t){var e=new Set;q[t].forEach((function(t){e.add(t)}));var i,n=new Set([].concat(r(e)).filter((function(t){return I.has(t)})));i=n.size>0?l[h.get(n.values().next().value)]:f(e).x,e.forEach((function(t){I.has(t)||(l[h.get(t)]=i)}))},K=0;K0?c[h.get(n.values().next().value)]:f(e).y,e.forEach((function(t){I.has(t)||(c[h.get(t)]=i)}))},J=0;J{e.exports=t}},i={},r=function t(r){var n=i[r];if(void 0!==n)return n.exports;var o=i[r]={exports:{}};return e[r](o,o.exports,t),o.exports}(45);return r})()},t.exports=r(i(4298))},4298:function(t){var e;e=function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28)}([function(t,e,i){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(8),o=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(r.prototype),r)s[a]=r[a];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 i=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==r)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=n.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(13),s=i(0),a=i(16),h=i(5);function l(t,e,i,s){null==i&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var c in l.prototype=Object.create(r.prototype),r)l[c]=r[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.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},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach((function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}})),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach((function(r){if(r.source!=i&&r.target!=i)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)})),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach((function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}})),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie?(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(i+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>i?(this.rect.y-=(this.labelHeight-i)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(i+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.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 i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var r=new h(e,i),n=t.inverseTransformPoint(r);this.setLocation(n.x,n.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";var r=i(0);function n(){}for(var o in r)n[o]=r[o];n.MAX_ITERATIONS=2500,n.DEFAULT_EDGE_LENGTH=50,n.DEFAULT_SPRING_STRENGTH=.45,n.DEFAULT_REPULSION_STRENGTH=4500,n.DEFAULT_GRAVITY_STRENGTH=.4,n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,n.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,n.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,n.COOLING_ADAPTATION_FACTOR=.33,n.ADAPTATION_LOWER_NODE_LIMIT=1e3,n.ADAPTATION_UPPER_NODE_LIMIT=5e3,n.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,n.MAX_NODE_DISPLACEMENT=3*n.MAX_NODE_DISPLACEMENT_INCREMENTAL,n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,n.CONVERGENCE_CHECK_PERIOD=100,n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,n.MIN_EDGE_LENGTH=1,n.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=n},function(t,e,i){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(0),s=i(7),a=i(3),h=i(1),l=i(13),c=i(12),d=i(11);function g(t,e,i){r.call(this,i),this.estimatedSize=n.MIN_VALUE,this.margin=o.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 u in g.prototype=Object.create(r.prototype),r)g[u]=r[u];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(t,e,i){if(null==e&&null==i){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var n=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(n.source=e,n.target=i,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),i!=e&&i.edges.push(n),n)},g.prototype.remove=function(t){var e=t;if(t instanceof a){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 i=e.edges.slice(),r=i.length,n=0;n-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(c,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},g.prototype.updateLeftTop=function(){for(var t,e,i,r=n.MAX_VALUE,o=n.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(r=t),o>(e=l.getLeft())&&(o=e)}return r==n.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=r-i,new c(this.left,this.top))},g.prototype.updateBounds=function(t){for(var e,i,r,o,s,a=n.MAX_VALUE,h=-n.MAX_VALUE,c=n.MAX_VALUE,d=-n.MAX_VALUE,g=this.nodes,u=g.length,p=0;p(e=f.getLeft())&&(a=e),h<(i=f.getRight())&&(h=i),c>(r=f.getTop())&&(c=r),d<(o=f.getBottom())&&(d=o)}var y=new l(a,c,h-a,d-c);a==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=g[0].getParent().paddingLeft?g[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},g.calculateBounds=function(t){for(var e,i,r,o,s=n.MAX_VALUE,a=-n.MAX_VALUE,h=n.MAX_VALUE,c=-n.MAX_VALUE,d=t.length,g=0;g(e=u.getLeft())&&(s=e),a<(i=u.getRight())&&(a=i),h>(r=u.getTop())&&(h=r),c<(o=u.getBottom())&&(c=o)}return new l(s,h,a-s,c-h)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,r=0;r=this.nodes.length){var h=0;n.forEach((function(e){e.owner==t&&h++})),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=g},function(t,e,i){"use strict";var r,n=i(1);function o(t){r=i(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,r,n){if(null==i&&null==r&&null==n){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}n=i,i=t;var o=(r=e).getOwner(),s=n.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,r,n);if(i.isInterGraph=!0,i.source=r,i.target=n,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof r){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 i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=r,i[1]=h,i[2]=o,i[3]=E,!1;if(no)return i[0]=a,i[1]=n,i[2]=v,i[3]=s,!1;if(ro?(i[0]=c,i[1]=d,w=!0):(i[0]=l,i[1]=h,w=!0):I===C&&(r>o?(i[0]=a,i[1]=h,w=!0):(i[0]=g,i[1]=d,w=!0)),-_===C?o>r?(i[2]=m,i[3]=E,L=!0):(i[2]=v,i[3]=y,L=!0):_===C&&(o>r?(i[2]=f,i[3]=y,L=!0):(i[2]=N,i[3]=E,L=!0)),w&&L)return!1;if(r>o?n>s?(M=this.getCardinalDirection(I,C,4),x=this.getCardinalDirection(_,C,2)):(M=this.getCardinalDirection(-I,C,3),x=this.getCardinalDirection(-_,C,1)):n>s?(M=this.getCardinalDirection(-I,C,1),x=this.getCardinalDirection(-_,C,3)):(M=this.getCardinalDirection(I,C,2),x=this.getCardinalDirection(_,C,4)),!w)switch(M){case 1:D=h,O=r+-p/C,i[0]=O,i[1]=D;break;case 2:O=g,D=n+u*C,i[0]=O,i[1]=D;break;case 3:D=d,O=r+p/C,i[0]=O,i[1]=D;break;case 4:O=c,D=n+-u*C,i[0]=O,i[1]=D}if(!L)switch(x){case 1:b=y,R=o+-A/C,i[2]=R,i[3]=b;break;case 2:R=N,b=s+T*C,i[2]=R,i[3]=b;break;case 3:b=E,R=o+A/C,i[2]=R,i[3]=b;break;case 4:R=m,b=s+-T*C,i[2]=R,i[3]=b}}return!1},n.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},n.getIntersection=function(t,e,i,n){if(null==n)return this.getIntersection2(t,e,i);var o,s,a,h,l,c,d,g=t.x,u=t.y,p=e.x,f=e.y,y=i.x,v=i.y,m=n.x,E=n.y;return 0==(d=(o=f-u)*(h=y-m)-(s=E-v)*(a=g-p))?null:new r((a*(c=m*v-y*E)-h*(l=p*u-g*f))/d,(s*l-o*c)/d)},n.angleOfVector=function(t,e,i,r){var n=void 0;return t!==i?(n=Math.atan((r-e)/(i-t)),i=0){var c=(-h+Math.sqrt(h*h-4*a*l))/(2*a),d=(-h-Math.sqrt(h*h-4*a*l))/(2*a);return c>=0&&c<=1?[c]:d>=0&&d<=1?[d]:null}return null},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,i){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,i){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var c=a[0];a.splice(0,1),s.add(c);var d=c.getEdges();for(o=0;o-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},g.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n0){for(var n=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(d,1),c.getNeighborsList().forEach((function(t){if(i.indexOf(t)<0){var e=r.get(t)-1;1==e&&h.push(t),r.set(t,e)}}))}i=i.concat(h),1!=e.length&&2!=e.length||(n=!0,o=e[0])}return o},g.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=g},function(t,e,i){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,i){"use strict";var r=i(5);function n(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}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},n.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},n.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},n.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},n.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,i){"use strict";var r=i(15),n=i(4),o=i(0),s=i(8),a=i(9);function h(){r.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var l in h.prototype=Object.create(r.prototype),r)h[l]=r[l];h.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,r,s,a,h,l=this.getGraphManager().getAllEdges(),c=0;cn.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var c=0;ct}}]),t}();t.exports=o},function(t,e,i){"use strict";function r(){}r.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 i=[],r=0;r0;)e.push(0);return e}(this.n),s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),a=Math.min(this.m-1,this.n),h=Math.max(0,Math.min(this.n-2,this.m)),l=0;l=0;x--)if(0!==this.s[x]){for(var O=x+1;O=0;P--){if(function(t,e){return t&&e}(P0;){var W=void 0,j=void 0;for(W=_-2;W>=-1&&-1!==W;W--)if(Math.abs(o[W])<=B+V*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){o[W]=0;break}if(W===_-2)j=4;else{var q=void 0;for(q=_-1;q>=W&&q!==W;q--){var $=(q!==_?Math.abs(o[q]):0)+(q!==W+1?Math.abs(o[q-1]):0);if(Math.abs(this.s[q])<=B+V*$){this.s[q]=0;break}}q===W?j=3:q===_-1?j=1:(j=2,W=q)}switch(W++,j){case 1:var K=o[_-2];o[_-2]=0;for(var Z=_-2;Z>=W;Z--){var Q=r.hypot(this.s[Z],K),J=this.s[Z]/Q,tt=K/Q;this.s[Z]=Q,Z!==W&&(K=-tt*o[Z-1],o[Z-1]=J*o[Z-1]);for(var et=0;et=this.s[W+1]);){var _t=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=_t,WMath.abs(e)?(i=e/t,i=Math.abs(t)*Math.sqrt(1+i*i)):0!=e?(i=t/e,i=Math.abs(e)*Math.sqrt(1+i*i)):i=0,i},t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=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=i,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var r=this.listeners[i];r.event===t&&r.callback===e&&this.listeners.splice(i,1)}},n.emit=function(t,e){for(var i=0;i{"use strict";i.d(e,{diagram:()=>dt});var r=i(1099),n=i(6058),o=i(3933),s=i(8160),a=(i(8159),i(7286)),h=i(9502),l=i(8731),c=i(165),d=i(6527),g=i(4852),u={L:"left",R:"right",T:"top",B:"bottom"},p={L:(0,h.K2)((t=>`${t},${t/2} 0,${t} 0,0`),"L"),R:(0,h.K2)((t=>`0,${t/2} ${t},0 ${t},${t}`),"R"),T:(0,h.K2)((t=>`0,0 ${t},0 ${t/2},${t}`),"T"),B:(0,h.K2)((t=>`${t/2},0 ${t},${t} 0,${t}`),"B")},f={L:(0,h.K2)(((t,e)=>t-e+2),"L"),R:(0,h.K2)(((t,e)=>t-2),"R"),T:(0,h.K2)(((t,e)=>t-e+2),"T"),B:(0,h.K2)(((t,e)=>t-2),"B")},y=(0,h.K2)((function(t){return m(t)?"L"===t?"R":"L":"T"===t?"B":"T"}),"getOppositeArchitectureDirection"),v=(0,h.K2)((function(t){return"L"===t||"R"===t||"T"===t||"B"===t}),"isArchitectureDirection"),m=(0,h.K2)((function(t){return"L"===t||"R"===t}),"isArchitectureDirectionX"),E=(0,h.K2)((function(t){return"T"===t||"B"===t}),"isArchitectureDirectionY"),N=(0,h.K2)((function(t,e){const i=m(t)&&E(e),r=E(t)&&m(e);return i||r}),"isArchitectureDirectionXY"),T=(0,h.K2)((function(t){const e=t[0],i=t[1],r=m(e)&&E(i),n=E(e)&&m(i);return r||n}),"isArchitecturePairXY"),A=(0,h.K2)((function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t}),"isValidArchitectureDirectionPair"),w=(0,h.K2)((function(t,e){const i=`${t}${e}`;return A(i)?i:void 0}),"getArchitectureDirectionPair"),L=(0,h.K2)((function([t,e],i){const r=i[0],n=i[1];return m(r)?E(n)?[t+("L"===r?-1:1),e+("T"===n?1:-1)]:[t+("L"===r?-1:1),e]:m(n)?[t+("L"===n?1:-1),e+("T"===r?1:-1)]:[t,e+("T"===r?1:-1)]}),"shiftPositionByArchitectureDirectionPair"),I=(0,h.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"),_=(0,h.K2)((function(t){return"service"===t.type}),"isArchitectureService"),C=(0,h.K2)((function(t){return"junction"===t.type}),"isArchitectureJunction"),M=(0,h.K2)((t=>t.data()),"edgeData"),x=(0,h.K2)((t=>t.data()),"nodeData"),O=h.UI.architecture,D=new s.m((()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:O,dataStructures:void 0,elements:{}}))),R=(0,h.K2)((()=>{D.reset(),(0,h.IU)()}),"clear"),b=(0,h.K2)((function({id:t,icon:e,in:i,title:r,iconText:n}){if(void 0!==D.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another ${D.records.registeredIds[t]}`);if(void 0!==i){if(t===i)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===D.records.registeredIds[i])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===D.records.registeredIds[i])throw new Error(`The service [${t}]'s parent is not a group`)}D.records.registeredIds[t]="node",D.records.nodes[t]={id:t,type:"service",icon:e,iconText:n,title:r,edges:[],in:i}}),"addService"),G=(0,h.K2)((()=>Object.values(D.records.nodes).filter(_)),"getServices"),F=(0,h.K2)((function({id:t,in:e}){D.records.registeredIds[t]="node",D.records.nodes[t]={id:t,type:"junction",edges:[],in:e}}),"addJunction"),S=(0,h.K2)((()=>Object.values(D.records.nodes).filter(C)),"getJunctions"),P=(0,h.K2)((()=>Object.values(D.records.nodes)),"getNodes"),U=(0,h.K2)((t=>D.records.nodes[t]),"getNode"),Y=(0,h.K2)((function({id:t,icon:e,in:i,title:r}){if(void 0!==D.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another ${D.records.registeredIds[t]}`);if(void 0!==i){if(t===i)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===D.records.registeredIds[i])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===D.records.registeredIds[i])throw new Error(`The group [${t}]'s parent is not a group`)}D.records.registeredIds[t]="group",D.records.groups[t]={id:t,icon:e,title:r,in:i}}),"addGroup"),k=(0,h.K2)((()=>Object.values(D.records.groups)),"getGroups"),H=(0,h.K2)((function({lhsId:t,rhsId:e,lhsDir:i,rhsDir:r,lhsInto:n,rhsInto:o,lhsGroup:s,rhsGroup:a,title:h}){if(!v(i))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${i}`);if(!v(r))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${r}`);if(void 0===D.records.nodes[t]&&void 0===D.records.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===D.records.nodes[e]&&void 0===D.records.groups[t])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);const l=D.records.nodes[t].in,c=D.records.nodes[e].in;if(s&&l&&c&&l==c)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(a&&l&&c&&l==c)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 d={lhsId:t,lhsDir:i,lhsInto:n,lhsGroup:s,rhsId:e,rhsDir:r,rhsInto:o,rhsGroup:a,title:h};D.records.edges.push(d),D.records.nodes[t]&&D.records.nodes[e]&&(D.records.nodes[t].edges.push(D.records.edges[D.records.edges.length-1]),D.records.nodes[e].edges.push(D.records.edges[D.records.edges.length-1]))}),"addEdge"),X=(0,h.K2)((()=>D.records.edges),"getEdges"),z=(0,h.K2)((()=>{if(void 0===D.records.dataStructures){const t=Object.entries(D.records.nodes).reduce(((t,[e,i])=>(t[e]=i.edges.reduce(((t,i)=>{if(i.lhsId===e){const e=w(i.lhsDir,i.rhsDir);e&&(t[e]=i.rhsId)}else{const e=w(i.rhsDir,i.lhsDir);e&&(t[e]=i.lhsId)}return t}),{}),t)),{}),e=Object.keys(t)[0],i={[e]:1},r=Object.keys(t).reduce(((t,i)=>i===e?t:{...t,[i]:1}),{}),n=(0,h.K2)((e=>{const n={[e]:[0,0]},o=[e];for(;o.length>0;){const e=o.shift();if(e){i[e]=1,delete r[e];const s=t[e],[a,h]=n[e];Object.entries(s).forEach((([t,e])=>{i[e]||(n[e]=L([a,h],t),o.push(e))}))}}return n}),"BFS"),o=[n(e)];for(;Object.keys(r).length>0;)o.push(n(Object.keys(r)[0]));D.records.dataStructures={adjList:t,spatialMaps:o}}return D.records.dataStructures}),"getDataStructures"),V=(0,h.K2)(((t,e)=>{D.records.elements[t]=e}),"setElementForId"),B=(0,h.K2)((t=>D.records.elements[t]),"getElementById"),W={clear:R,setDiagramTitle:h.ke,getDiagramTitle:h.ab,setAccTitle:h.SV,getAccTitle:h.iN,setAccDescription:h.EI,getAccDescription:h.m7,addService:b,getServices:G,addJunction:F,getJunctions:S,getNodes:P,getNode:U,addGroup:Y,getGroups:k,addEdge:H,getEdges:X,setElementForId:V,getElementById:B,getDataStructures:z};function j(t){const e=(0,h.D7)().architecture;return e?.[t]?e[t]:O[t]}(0,h.K2)(j,"getConfigField");var q=(0,h.K2)(((t,e)=>{(0,o.S)(t,e),t.groups.map(e.addGroup),t.services.map((t=>e.addService({...t,type:"service"}))),t.junctions.map((t=>e.addJunction({...t,type:"junction"}))),t.edges.map(e.addEdge)}),"populateDb"),$={parse:(0,h.K2)((async t=>{const e=await(0,l.qg)("architecture",t);h.Rm.debug(e),q(e,W)}),"parse")},K=(0,h.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"),Z=(0,h.K2)((t=>`${t}`),"wrapIcon"),Q={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Z('')},server:{body:Z('')},disk:{body:Z('')},internet:{body:Z('')},cloud:{body:Z('')},unknown:r.Gc,blank:{body:Z("")}}},J=(0,h.K2)((async function(t,e){const i=j("padding"),r=j("iconSize"),o=r/2,s=r/6,a=s/2;await Promise.all(e.edges().map((async e=>{const{source:r,sourceDir:l,sourceArrow:c,sourceGroup:d,target:g,targetDir:u,targetArrow:y,targetGroup:v,label:A}=M(e);let{x:L,y:_}=e[0].sourceEndpoint();const{x:C,y:x}=e[0].midpoint();let{x:O,y:D}=e[0].targetEndpoint();const R=i+4;if(d&&(m(l)?L+="L"===l?-R:R:_+="T"===l?-R:R+18),v&&(m(u)?O+="L"===u?-R:R:D+="T"===u?-R:R+18),d||"junction"!==W.getNode(r)?.type||(m(l)?L+="L"===l?o:-o:_+="T"===l?o:-o),v||"junction"!==W.getNode(g)?.type||(m(u)?O+="L"===u?o:-o:D+="T"===u?o:-o),e[0]._private.rscratch){const e=t.insert("g");if(e.insert("path").attr("d",`M ${L},${_} L ${C},${x} L${O},${D} `).attr("class","edge"),c){const t=m(l)?f[l](L,s):L-a,i=E(l)?f[l](_,s):_-a;e.insert("polygon").attr("points",p[l](s)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(y){const t=m(u)?f[u](O,s):O-a,i=E(u)?f[u](D,s):D-a;e.insert("polygon").attr("points",p[u](s)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(A){const t=N(l,u)?"XY":m(l)?"X":"Y";let i=0;i="X"===t?Math.abs(L-O):"Y"===t?Math.abs(_-D)/1.5:Math.abs(L-O)/2;const r=e.append("g");if(await(0,n.GZ)(r,A,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},(0,h.D7)()),r.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===t)r.attr("transform","translate("+C+", "+x+")");else if("Y"===t)r.attr("transform","translate("+C+", "+x+") rotate(-90)");else if("XY"===t){const t=w(l,u);if(t&&T(t)){const e=r.node().getBoundingClientRect(),[i,n]=I(t);r.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*i*n*45})`);const o=r.node().getBoundingClientRect();r.attr("transform",`\n translate(${C}, ${x-e.height/2})\n translate(${i*o.width/2}, ${n*o.height/2})\n rotate(${-1*i*n*45}, 0, ${e.height/2})\n `)}}}}})))}),"drawEdges"),tt=(0,h.K2)((async function(t,e){const i=.75*j("padding"),o=j("fontSize"),s=j("iconSize")/2;await Promise.all(e.nodes().map((async e=>{const a=x(e);if("group"===a.type){const{h:l,w:c,x1:d,y1:g}=e.boundingBox();t.append("rect").attr("x",d+s).attr("y",g+s).attr("width",c).attr("height",l).attr("class","node-bkg");const u=t.append("g");let p=d,f=g;if(a.icon){const t=u.append("g");t.html(`${await(0,r.WY)(a.icon,{height:i,width:i,fallbackPrefix:Q.prefix})}`),t.attr("transform","translate("+(p+s+1)+", "+(f+s+1)+")"),p+=i,f+=o/2-1-2}if(a.label){const t=u.append("g");await(0,n.GZ)(t,a.label,{useHtmlLabels:!1,width:c,classes:"architecture-service-label"},(0,h.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),t.attr("transform","translate("+(p+s+4)+", "+(f+s+2)+")")}}})))}),"drawGroups"),et=(0,h.K2)((async function(t,e,i){for(const o of i){const i=e.append("g"),s=j("iconSize");if(o.title){const t=i.append("g");await(0,n.GZ)(t,o.title,{useHtmlLabels:!1,width:1.5*s,classes:"architecture-service-label"},(0,h.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+s/2+", "+s+")")}const a=i.append("g");if(o.icon)a.html(`${await(0,r.WY)(o.icon,{height:s,width:s,fallbackPrefix:Q.prefix})}`);else if(o.iconText){a.html(`${await(0,r.WY)("blank",{height:s,width:s,fallbackPrefix:Q.prefix})}`);const t=a.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(o.iconText),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 a.append("path").attr("class","node-bkg").attr("id","node-"+o.id).attr("d",`M0 ${s} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 Z`);i.attr("class","architecture-service");const{width:l,height:c}=i._groups[0][0].getBBox();o.width=l,o.height=c,t.setElementForId(o.id,i)}return 0}),"drawServices"),it=(0,h.K2)((function(t,e,i){i.forEach((i=>{const r=e.append("g"),n=j("iconSize");r.append("g").append("rect").attr("id","node-"+i.id).attr("fill-opacity","0").attr("width",n).attr("height",n),r.attr("class","architecture-junction");const{width:o,height:s}=r._groups[0][0].getBBox();r.width=o,r.height=s,t.setElementForId(i.id,r)}))}),"drawJunctions");function rt(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:j("iconSize"),height:j("iconSize")},classes:"node-service"})}))}function nt(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:j("iconSize"),height:j("iconSize")},classes:"node-junction"})}))}function ot(t,e){e.nodes().map((e=>{const i=x(e);"group"!==i.type&&(i.x=e.position().x,i.y=e.position().y,t.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")"))}))}function st(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 at(t,e){t.forEach((t=>{const{lhsId:i,rhsId:r,lhsInto:n,lhsGroup:o,rhsInto:s,lhsDir:a,rhsDir:h,rhsGroup:l,title:c}=t,d=N(t.lhsDir,t.rhsDir)?"segments":"straight",g={id:`${i}-${r}`,label:c,source:i,sourceDir:a,sourceArrow:n,sourceGroup:o,sourceEndpoint:"L"===a?"0 50%":"R"===a?"100% 50%":"T"===a?"50% 0":"50% 100%",target:r,targetDir:h,targetArrow:s,targetGroup:l,targetEndpoint:"L"===h?"0 50%":"R"===h?"100% 50%":"T"===h?"50% 0":"50% 100%"};e.add({group:"edges",data:g,classes:d})}))}function ht(t){const e=t.map((t=>{const e={},i={};return Object.entries(t).forEach((([t,[r,n]])=>{e[n]||(e[n]=[]),i[r]||(i[r]=[]),e[n].push(t),i[r].push(t)})),{horiz:Object.values(e).filter((t=>t.length>1)),vert:Object.values(i).filter((t=>t.length>1))}})),[i,r]=e.reduce((([t,e],{horiz:i,vert:r})=>[[...t,...i],[...e,...r]]),[[],[]]);return{horizontal:i,vertical:r}}function lt(t){const e=[],i=(0,h.K2)((t=>`${t[0]},${t[1]}`),"posToStr"),r=(0,h.K2)((t=>t.split(",").map((t=>parseInt(t)))),"strToPos");return t.forEach((t=>{const n=Object.fromEntries(Object.entries(t).map((([t,e])=>[i(e),t]))),o=[i([0,0])],s={},a={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;o.length>0;){const t=o.shift();if(t){s[t]=1;const h=n[t];if(h){const l=r(t);Object.entries(a).forEach((([t,r])=>{const a=i([l[0]+r[0],l[1]+r[1]]),c=n[a];c&&!s[a]&&(o.push(a),e.push({[u[t]]:c,[u[y(t)]]:h,gap:1.5*j("iconSize")}))}))}}}})),e}function ct(t,e,i,r,{spatialMaps:n}){return new Promise((o=>{const s=(0,g.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),a=(0,c.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":`${j("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:`${j("padding")}px`}}]});s.remove(),st(i,a),rt(t,a),nt(e,a),at(r,a);const l=ht(n),d=lt(n),u=a.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[e,i]=t.connectedNodes(),{parent:r}=x(e),{parent:n}=x(i);return r===n?1.5*j("iconSize"):.5*j("iconSize")},edgeElasticity(t){const[e,i]=t.connectedNodes(),{parent:r}=x(e),{parent:n}=x(i);return r===n?.45:.001},alignmentConstraint:l,relativePlacementConstraint:d});u.one("layoutstop",(()=>{function t(t,e,i,r){let n,o;const{x:s,y:a}=t,{x:h,y:l}=e;o=(r-a+(s-i)*(a-l)/(s-h))/Math.sqrt(1+Math.pow((a-l)/(s-h),2)),n=Math.sqrt(Math.pow(r-a,2)+Math.pow(i-s,2)-Math.pow(o,2)),n/=Math.sqrt(Math.pow(h-s,2)+Math.pow(l-a,2));let c=(h-s)*(r-a)-(l-a)*(i-s);switch(!0){case c>=0:c=1;break;case c<0:c=-1}let d=(h-s)*(i-s)+(l-a)*(r-a);switch(!0){case d>=0:d=1;break;case d<0:d=-1}return o=Math.abs(o)*c,n*=d,{distances:o,weights:n}}(0,h.K2)(t,"getSegmentWeights"),a.startBatch();for(const e of Object.values(a.edges()))if(e.data?.()){const{x:i,y:r}=e.source().position(),{x:n,y:o}=e.target().position();if(i!==n&&r!==o){const i=e.sourceEndpoint(),r=e.targetEndpoint(),{sourceDir:n}=M(e),[o,s]=E(n)?[i.x,r.y]:[r.x,i.y],{weights:a,distances:h}=t(i,r,o,s);e.style("segment-distances",h),e.style("segment-weights",a)}}a.endBatch(),u.run()})),u.run(),a.ready((t=>{h.Rm.info("Ready",t),o(a)}))}))}(0,r.pC)([{name:Q.prefix,icons:Q}]),c.A.use(d),(0,h.K2)(rt,"addServices"),(0,h.K2)(nt,"addJunctions"),(0,h.K2)(ot,"positionNodes"),(0,h.K2)(st,"addGroups"),(0,h.K2)(at,"addEdges"),(0,h.K2)(ht,"getAlignments"),(0,h.K2)(lt,"getRelativeConstraints"),(0,h.K2)(ct,"layoutArchitecture");var dt={parser:$,db:W,renderer:{draw:(0,h.K2)((async(t,e,i,r)=>{const n=r.db,o=n.getServices(),s=n.getJunctions(),l=n.getGroups(),c=n.getEdges(),d=n.getDataStructures(),g=(0,a.D)(e),u=g.append("g");u.attr("class","architecture-edges");const p=g.append("g");p.attr("class","architecture-services");const f=g.append("g");f.attr("class","architecture-groups"),await et(n,p,o),it(n,p,s);const y=await ct(o,s,l,c,d);await J(u,y),await tt(f,y),ot(n,y),(0,h.ot)(void 0,g,j("padding"),j("useMaxWidth"))}),"draw")},styles:K}},8160:(t,e,i)=>{"use strict";i.d(e,{m:()=>n});var r=i(9502),n=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},3933:(t,e,i)=>{"use strict";function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}i.d(e,{S:()=>r}),(0,i(9502).K2)(r,"populateCommonDb")}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/237-c0a3f3fe.chunk.min.js b/docs/hugo/public/js/237-c0a3f3fe.chunk.min.js new file mode 100644 index 000000000..f7f2a3b30 --- /dev/null +++ b/docs/hugo/public/js/237-c0a3f3fe.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[237],{3814:(t,e,n)=>{n.d(e,{CP:()=>l,HT:()=>u,PB:()=>h,aC:()=>c,lC:()=>a,m:()=>o,tk:()=>r});var i=n(9502),s=n(6750),r=(0,i.K2)(((t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)n.attr(t,e.attrs[t]);return e.class&&n.attr("class",e.class),n}),"drawRect"),a=(0,i.K2)(((t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};r(t,n).lower()}),"drawBackgroundRect"),o=(0,i.K2)(((t,e)=>{const n=e.text.replace(i.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const r=s.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),s}),"drawText"),c=(0,i.K2)(((t,e,n,i)=>{const r=t.append("image");r.attr("x",e),r.attr("y",n);const a=(0,s.J)(i);r.attr("xlink:href",a)}),"drawImage"),l=(0,i.K2)(((t,e,n,i)=>{const r=t.append("use");r.attr("x",e),r.attr("y",n);const a=(0,s.J)(i);r.attr("xlink:href",`#${a}`)}),"drawEmbeddedImage"),h=(0,i.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),u=(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")},6237:(t,e,n)=>{n.d(e,{diagram:()=>Y});var i=n(3814),s=n(9502),r=n(4852),a=function(){var t=(0,s.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,14],l={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,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[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:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:r,16:a,17:o,18:c},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 n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,h=0,u=0,y=a.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;a.push(g);var x=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,s.K2)(m,"lex");for(var k,_,b,w,v,K,$,T,M,S={};;){if(b=n[n.length-1],this.defaultActions[b]?w=this.defaultActions[b]:(null==k&&(k=m()),w=o[b]&&o[b][k]),void 0===w||!w.length||!w[0]){var E;for(K in M=[],o[b])this.terminals_[K]&&K>2&&M.push("'"+this.terminals_[K]+"'");E=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(E,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:g,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+k);switch(w[0]){case 1:n.push(k),r.push(p.yytext),a.push(p.yylloc),n.push(w[1]),k=null,_?(k=_,_=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,g=p.yylloc,u>0&&u--);break;case 2:if($=this.productions_[w[1]][1],S.$=r[r.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},x&&(S._$.range=[a[a.length-($||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(S,[c,h,l,d.yy,w[1],r,a].concat(y))))return v;$&&(n=n.slice(0,-1*$*2),r=r.slice(0,-1*$),a=a.slice(0,-1*$)),n.push(this.productions_[w[1]][0]),r.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"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 n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,s.K2)((function(){return this.next()||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,n,i){switch(n){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 l.lexer=h,(0,s.K2)(u,"Parser"),u.prototype=l,l.Parser=u,new u}();a.parser=a;var o=a,c="",l=[],h=[],u=[],y=(0,s.K2)((function(){l.length=0,h.length=0,c="",u.length=0,(0,s.IU)()}),"clear"),p=(0,s.K2)((function(t){c=t,l.push(t)}),"addSection"),d=(0,s.K2)((function(){return l}),"getSections"),f=(0,s.K2)((function(){let t=k(),e=0;for(;!t&&e<100;)t=k(),e++;return h.push(...u),h}),"getTasks"),g=(0,s.K2)((function(){const t=[];return h.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}),"updateActors"),x=(0,s.K2)((function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:c,type:c,people:r,task:t,score:i};u.push(a)}),"addTask"),m=(0,s.K2)((function(t){const e={section:c,type:c,description:t,task:t,classes:[]};h.push(e)}),"addTaskOrg"),k=(0,s.K2)((function(){const t=(0,s.K2)((function(t){return u[t].processed}),"compileTask");let e=!0;for(const[n,i]of u.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),_=(0,s.K2)((function(){return g()}),"getActors"),b={getConfig:(0,s.K2)((()=>(0,s.D7)().journey),"getConfig"),clear:y,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setAccTitle:s.SV,getAccTitle:s.iN,setAccDescription:s.EI,getAccDescription:s.m7,addSection:p,getSections:d,getTasks:f,addTask:x,addTaskOrg:m,getActors:_},w=(0,s.K2)((t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`),"getStyles"),v=(0,s.K2)((function(t,e){return(0,i.tk)(t,e)}),"drawRect"),K=(0,s.K2)((function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function a(t){const n=(0,r.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(t){const n=(0,r.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/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)(o,"sad"),(0,s.K2)(c,"ambivalent"),e.score>3?a(i):e.score<3?o(i):c(i),n}),"drawFace"),$=(0,s.K2)((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),T=(0,s.K2)((function(t,e){return(0,i.m)(t,e)}),"drawText"),M=(0,s.K2)((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,s.K2)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,T(t,e)}),"drawLabel"),S=(0,s.K2)((function(t,e,n){const s=t.append("g"),r=(0,i.PB)();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,v(s,r),C(n)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),E=-1,I=(0,s.K2)((function(t,e,n){const s=e.x+n.width/2,r=t.append("g");E++,r.append("line").attr("id","task"+E).attr("x1",s).attr("y1",e.y).attr("x2",s).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),K(r,{cx:s,cy:300+30*(5-e.score),score:e.score});const a=(0,i.PB)();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,v(r,a);let o=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};$(r,i),o+=10})),C(n)(e.task,r,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)}),"drawTask"),P=(0,s.K2)((function(t,e){(0,i.lC)(t,e)}),"drawBackgroundRect"),C=function(){function t(t,e,n,s,r,a,o,c){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:u}=c,y=t.split(//gi);for(let t=0;t{const s=D[i].color,r={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:D[i].position};A.drawCircle(t,r);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};A.drawText(t,a),n+=20}))}(0,s.K2)(L,"drawActorLegend");var V=(0,s.D7)().journey,B=V.leftMargin,O=(0,s.K2)((function(t,e,n,i){const a=(0,s.D7)().journey,o=(0,s.D7)().securityLevel;let c;"sandbox"===o&&(c=(0,r.Ltv)("#i"+e));const l="sandbox"===o?(0,r.Ltv)(c.nodes()[0].contentDocument.body):(0,r.Ltv)("body");F.init();const h=l.select("#"+e);A.initGraphics(h);const u=i.db.getTasks(),y=i.db.getDiagramTitle(),p=i.db.getActors();for(const t in D)delete D[t];let d=0;p.forEach((t=>{D[t]={color:a.actorColours[d%a.actorColours.length],position:d},d++})),L(h),F.insert(0,0,B,50*Object.keys(D).length),z(h,u,0);const f=F.getBounds();y&&h.append("text").text(y).attr("x",B).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const g=f.stopy-f.starty+2*a.diagramMarginY,x=B+f.stopx+2*a.diagramMarginX;(0,s.a$)(h,g,x,a.useMaxWidth),h.append("line").attr("x1",B).attr("y1",4*a.height).attr("x2",x-B-4).attr("y2",4*a.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const m=y?70:0;h.attr("viewBox",`${f.startx} -25 ${x} ${g+m}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",g+m+25)}),"draw"),F={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,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}),"updateVal"),updateBounds:(0,s.K2)((function(t,e,n,i){const r=(0,s.D7)().journey,a=this;let o=0;function c(c){return(0,s.K2)((function(s){o++;const l=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-l*r.boxMargin,Math.min),a.updateVal(s,"stopy",i+l*r.boxMargin,Math.max),a.updateVal(F.data,"startx",t-l*r.boxMargin,Math.min),a.updateVal(F.data,"stopx",n+l*r.boxMargin,Math.max),"activation"!==c&&(a.updateVal(s,"startx",t-l*r.boxMargin,Math.min),a.updateVal(s,"stopx",n+l*r.boxMargin,Math.max),a.updateVal(F.data,"starty",e-l*r.boxMargin,Math.min),a.updateVal(F.data,"stopy",i+l*r.boxMargin,Math.max))}),"updateItemBounds")}(0,s.K2)(c,"updateFn"),this.sequenceItems.forEach(c())}),"updateBounds"),insert:(0,s.K2)((function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(F.data,"startx",s,Math.min),this.updateVal(F.data,"starty",a,Math.min),this.updateVal(F.data,"stopx",r,Math.max),this.updateVal(F.data,"stopy",o,Math.max),this.updateBounds(s,a,r,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")},N=V.sectionFills,R=V.sectionColours,z=(0,s.K2)((function(t,e,n){const i=(0,s.D7)().journey;let r="";const a=n+(2*i.height+i.diagramMarginY);let o=0,c="#CCC",l="black",h=0;for(const[n,s]of e.entries()){if(r!==s.section){c=N[o%N.length],h=o%N.length,l=R[o%R.length];let a=0;const u=s.section;for(let t=n;t(D[e]&&(t[e]=D[e]),t)),{});s.x=n*i.taskMargin+n*i.width+B,s.y=a,s.width=i.diagramMarginX,s.height=i.diagramMarginY,s.colour=l,s.fill=c,s.num=h,s.actors=u,A.drawTask(t,s,i),F.insert(s.x,s.y,s.x+s.width+i.taskMargin,450)}}),"drawTasks"),W={setConf:j,draw:O},Y={parser:o,db:b,renderer:W,styles:w,init:(0,s.K2)((t=>{W.setConf(t.journey),b.clear()}),"init")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/240-8ca3ada2.chunk.min.js b/docs/hugo/public/js/240-8ca3ada2.chunk.min.js new file mode 100644 index 000000000..3393b5a58 --- /dev/null +++ b/docs/hugo/public/js/240-8ca3ada2.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[240],{6474:(t,e,s)=>{s.d(e,{A:()=>u,P:()=>a});var n=s(9502),i=s(4852),u=(0,n.K2)(((t,e)=>{let s;return"sandbox"===e&&(s=(0,i.Ltv)("#i"+t)),("sandbox"===e?(0,i.Ltv)(s.nodes()[0].contentDocument.body):(0,i.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement"),a=(0,n.K2)(((t,e,s,i)=>{t.attr("class",s);const{width:u,height:a,x:l,y:c}=r(t,e);(0,n.a$)(t,a,u,i);const h=o(l,c,u,a,e);t.attr("viewBox",h),n.Rm.debug(`viewBox configured: ${h} with padding: ${e}`)}),"setupViewPortForSVG"),r=(0,n.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),o=(0,n.K2)(((t,e,s,n,i)=>`${t-i} ${e-i} ${s} ${n}`),"createViewBox")},6240:(t,e,s)=>{s.d(e,{Lh:()=>ot,_$:()=>l,tM:()=>at,z2:()=>ut});var n=s(6474),i=s(7308),u=s(8159),a=s(9502),r=s(4852),o=function(){var t=(0,a.K2)((function(t,e,s,n){for(s=s||{},n=t.length;n--;s[t[n]]=e);return s}),"o"),e=[1,18],s=[1,19],n=[1,20],i=[1,41],u=[1,42],r=[1,26],o=[1,24],l=[1,25],c=[1,32],h=[1,33],p=[1,34],d=[1,45],A=[1,35],y=[1,36],g=[1,37],m=[1,38],C=[1,27],f=[1,28],E=[1,29],b=[1,30],k=[1,31],T=[1,44],D=[1,46],F=[1,43],B=[1,47],_=[1,9],S=[1,8,9],N=[1,58],L=[1,59],$=[1,60],x=[1,61],O=[1,62],v=[1,63],I=[1,64],K=[1,8,9,41],w=[1,76],R=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],P=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],M=[13,58,84,99,101,102],G=[13,58,71,72,84,99,101,102],U=[13,58,66,67,68,69,70,84,99,101,102],Y=[1,98],z=[1,115],Q=[1,107],W=[1,113],X=[1,108],j=[1,109],V=[1,110],q=[1,111],H=[1,112],J=[1,114],Z=[22,58,59,80,84,85,86,87,88,89],tt=[1,8,9,39,41,44],et=[1,8,9,22],st=[1,143],nt=[1,8,9,59],it=[1,8,9,22,58,59,80,84,85,86,87,88,89],ut={trace:(0,a.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,DOT:17,className:18,classLiteralName: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,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"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",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,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,6],[43,2],[43,3],[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],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,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],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:(0,a.K2)((function(t,e,s,n,i,u,a){var r=u.length-1;switch(i){case 8:this.$=u[r-1];break;case 9:case 12:case 14:this.$=u[r];break;case 10:case 13:this.$=u[r-2]+"."+u[r];break;case 11:case 15:case 95:this.$=u[r-1]+u[r];break;case 16:case 17:this.$=u[r-1]+"~"+u[r]+"~";break;case 18:n.addRelation(u[r]);break;case 19:u[r-1].title=n.cleanupLabel(u[r]),n.addRelation(u[r-1]);break;case 30:this.$=u[r].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=u[r].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(u[r-3],u[r-1]);break;case 34:n.addClassesToNamespace(u[r-4],u[r-1]);break;case 35:this.$=u[r],n.addNamespace(u[r]);break;case 36:case 46:case 59:case 92:this.$=[u[r]];break;case 37:this.$=[u[r-1]];break;case 38:u[r].unshift(u[r-2]),this.$=u[r];break;case 40:n.setCssClass(u[r-2],u[r]);break;case 41:n.addMembers(u[r-3],u[r-1]);break;case 42:n.setCssClass(u[r-5],u[r-3]),n.addMembers(u[r-5],u[r-1]);break;case 43:this.$=u[r],n.addClass(u[r]);break;case 44:this.$=u[r-1],n.addClass(u[r-1]),n.setClassLabel(u[r-1],u[r]);break;case 45:n.addAnnotation(u[r],u[r-2]);break;case 47:u[r].push(u[r-1]),this.$=u[r];break;case 48:case 50:case 51:break;case 49:n.addMember(u[r-1],n.cleanupLabel(u[r]));break;case 52:this.$={id1:u[r-2],id2:u[r],relation:u[r-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:u[r-3],id2:u[r],relation:u[r-1],relationTitle1:u[r-2],relationTitle2:"none"};break;case 54:this.$={id1:u[r-3],id2:u[r],relation:u[r-2],relationTitle1:"none",relationTitle2:u[r-1]};break;case 55:this.$={id1:u[r-4],id2:u[r],relation:u[r-2],relationTitle1:u[r-3],relationTitle2:u[r-1]};break;case 56:n.addNote(u[r],u[r-1]);break;case 57:n.addNote(u[r]);break;case 58:this.$=u[r-2],n.defineClass(u[r-1],u[r]);break;case 60:this.$=u[r-2].concat([u[r]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:u[r-2],type2:u[r],lineType:u[r-1]};break;case 66:this.$={type1:"none",type2:u[r],lineType:u[r-1]};break;case 67:this.$={type1:u[r-1],type2:"none",lineType:u[r]};break;case 68:this.$={type1:"none",type2:"none",lineType:u[r]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=u[r-2],n.setClickEvent(u[r-1],u[r]);break;case 77:case 83:this.$=u[r-3],n.setClickEvent(u[r-2],u[r-1]),n.setTooltip(u[r-2],u[r]);break;case 78:this.$=u[r-2],n.setLink(u[r-1],u[r]);break;case 79:this.$=u[r-3],n.setLink(u[r-2],u[r-1],u[r]);break;case 80:this.$=u[r-3],n.setLink(u[r-2],u[r-1]),n.setTooltip(u[r-2],u[r]);break;case 81:this.$=u[r-4],n.setLink(u[r-3],u[r-2],u[r]),n.setTooltip(u[r-3],u[r-1]);break;case 84:this.$=u[r-3],n.setClickEvent(u[r-2],u[r-1],u[r]);break;case 85:this.$=u[r-4],n.setClickEvent(u[r-3],u[r-2],u[r-1]),n.setTooltip(u[r-3],u[r]);break;case 86:this.$=u[r-3],n.setLink(u[r-2],u[r]);break;case 87:this.$=u[r-4],n.setLink(u[r-3],u[r-1],u[r]);break;case 88:this.$=u[r-4],n.setLink(u[r-3],u[r-1]),n.setTooltip(u[r-3],u[r]);break;case 89:this.$=u[r-5],n.setLink(u[r-4],u[r-2],u[r]),n.setTooltip(u[r-4],u[r-1]);break;case 90:this.$=u[r-2],n.setCssStyle(u[r-1],u[r]);break;case 91:n.setCssClass(u[r-1],u[r]);break;case 93:u[r-2].push(u[r]),this.$=u[r-2]}}),"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,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:s,37:n,38:22,42:i,43:23,46:u,47:r,49:o,50:l,52:c,54:h,55:p,58:d,60:A,61:y,62:g,63:m,73:C,74:f,76:E,80:b,81:k,84:T,99:D,101:F,102:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(_,[2,5],{8:[1,48]}),{8:[1,49]},t(S,[2,18],{22:[1,50]}),t(S,[2,20]),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]),{34:[1,51]},{36:[1,52]},t(S,[2,32]),t(S,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:N,67:L,68:$,69:x,70:O,71:v,72:I}),{39:[1,65]},t(K,[2,39],{39:[1,67],44:[1,66]}),t(S,[2,50]),t(S,[2,51]),{16:68,58:d,84:T,99:D,101:F},{16:39,18:69,19:40,58:d,84:T,99:D,101:F,102:B},{16:39,18:70,19:40,58:d,84:T,99:D,101:F,102:B},{16:39,18:71,19:40,58:d,84:T,99:D,101:F,102:B},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:d,84:T,99:D,101:F,102:B},{13:w,53:75},{56:77,58:[1,78]},t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),t(S,[2,64]),t(R,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:d,84:T,99:D,101:F,102:B}),t(R,[2,14],{20:[1,82]}),{15:83,16:84,58:d,84:T,99:D,101:F},{16:39,18:85,19:40,58:d,84:T,99:D,101:F,102:B},t(P,[2,118]),t(P,[2,119]),t(P,[2,120]),t(P,[2,121]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),t(_,[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,18:21,38:22,43:23,16:39,19:40,5:86,33:e,35:s,37:n,42:i,46:u,47:r,49:o,50:l,52:c,54:h,55:p,58:d,60:A,61:y,62:g,63:m,73:C,74:f,76:E,80:b,81:k,84:T,99:D,101:F,102:B}),{5:87,10:5,16:39,18:21,19:40,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:s,37:n,38:22,42:i,43:23,46:u,47:r,49:o,50:l,52:c,54:h,55:p,58:d,60:A,61:y,62:g,63:m,73:C,74:f,76:E,80:b,81:k,84:T,99:D,101:F,102:B},t(S,[2,19]),t(S,[2,30]),t(S,[2,31]),{13:[1,89],16:39,18:88,19:40,58:d,84:T,99:D,101:F,102:B},{51:90,64:56,65:57,66:N,67:L,68:$,69:x,70:O,71:v,72:I},t(S,[2,49]),{65:91,71:v,72:I},t(M,[2,68],{64:92,66:N,67:L,68:$,69:x,70:O}),t(G,[2,69]),t(G,[2,70]),t(G,[2,71]),t(G,[2,72]),t(G,[2,73]),t(U,[2,74]),t(U,[2,75]),{8:[1,94],24:95,40:93,43:23,46:u},{16:96,58:d,84:T,99:D,101:F},{45:97,49:Y},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:z,57:104,58:Q,80:W,82:105,83:106,84:X,85:j,86:V,87:q,88:H,89:J},{58:[1,116]},{13:w,53:117},t(S,[2,57]),t(S,[2,123]),{22:z,57:118,58:Q,59:[1,119],80:W,82:105,83:106,84:X,85:j,86:V,87:q,88:H,89:J},t(Z,[2,59]),{16:39,18:120,19:40,58:d,84:T,99:D,101:F,102:B},t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:d,84:T,99:D,101:F},t(tt,[2,43],{11:123,12:[1,124]}),t(_,[2,7]),{9:[1,125]},t(et,[2,52]),{16:39,18:126,19:40,58:d,84:T,99:D,101:F,102:B},{13:[1,128],16:39,18:127,19:40,58:d,84:T,99:D,101:F,102:B},t(M,[2,67],{64:129,66:N,67:L,68:$,69:x,70:O}),t(M,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:u},{8:[1,132],41:[2,36]},t(K,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:Y},{16:39,18:136,19:40,58:d,84:T,99:D,101:F,102:B},t(S,[2,76],{13:[1,137]}),t(S,[2,78],{13:[1,139],75:[1,138]}),t(S,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},t(S,[2,90],{59:st}),t(nt,[2,92],{83:144,22:z,58:Q,80:W,84:X,85:j,86:V,87:q,88:H,89:J}),t(it,[2,94]),t(it,[2,96]),t(it,[2,97]),t(it,[2,98]),t(it,[2,99]),t(it,[2,100]),t(it,[2,101]),t(it,[2,102]),t(it,[2,103]),t(it,[2,104]),t(S,[2,91]),t(S,[2,56]),t(S,[2,58],{59:st}),{58:[1,145]},t(R,[2,13]),{15:146,16:84,58:d,84:T,99:D,101:F},{39:[2,11]},t(tt,[2,44]),{13:[1,147]},{1:[2,4]},t(et,[2,54]),t(et,[2,53]),{16:39,18:148,19:40,58:d,84:T,99:D,101:F,102:B},t(M,[2,65]),t(S,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:u},{45:151,49:Y},t(K,[2,41]),{41:[2,47]},t(S,[2,45]),t(S,[2,77]),t(S,[2,79]),t(S,[2,80],{75:[1,152]}),t(S,[2,83]),t(S,[2,84],{13:[1,153]}),t(S,[2,86],{13:[1,155],75:[1,154]}),{22:z,58:Q,80:W,82:156,83:106,84:X,85:j,86:V,87:q,88:H,89:J},t(it,[2,95]),t(Z,[2,60]),{39:[2,10]},{14:[1,157]},t(et,[2,55]),t(S,[2,34]),{41:[2,38]},{41:[1,158]},t(S,[2,81]),t(S,[2,85]),t(S,[2,87]),t(S,[2,88],{75:[1,159]}),t(nt,[2,93],{83:144,22:z,58:Q,80:W,84:X,85:j,86:V,87:q,88:H,89:J}),t(tt,[2,8]),t(K,[2,42]),t(S,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:(0,a.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,a.K2)((function(t){var e=this,s=[0],n=[],i=[null],u=[],r=this.table,o="",l=0,c=0,h=0,p=u.slice.call(arguments,1),d=Object.create(this.lexer),A={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(A.yy[y]=this.yy[y]);d.setInput(t,A.yy),A.yy.lexer=d,A.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;u.push(g);var m=d.options&&d.options.ranges;function C(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)((function(t){s.length=s.length-2*t,i.length=i.length-t,u.length=u.length-t}),"popStack"),(0,a.K2)(C,"lex");for(var f,E,b,k,T,D,F,B,_,S={};;){if(b=s[s.length-1],this.defaultActions[b]?k=this.defaultActions[b]:(null==f&&(f=C()),k=r[b]&&r[b][f]),void 0===k||!k.length||!k[0]){var N;for(D in _=[],r[b])this.terminals_[D]&&D>2&&_.push("'"+this.terminals_[D]+"'");N=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:g,expected:_})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+f);switch(k[0]){case 1:s.push(f),i.push(d.yytext),u.push(d.yylloc),s.push(k[1]),f=null,E?(f=E,E=null):(c=d.yyleng,o=d.yytext,l=d.yylineno,g=d.yylloc,h>0&&h--);break;case 2:if(F=this.productions_[k[1]][1],S.$=i[i.length-F],S._$={first_line:u[u.length-(F||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(F||1)].first_column,last_column:u[u.length-1].last_column},m&&(S._$.range=[u[u.length-(F||1)].range[0],u[u.length-1].range[1]]),void 0!==(T=this.performAction.apply(S,[o,c,l,A.yy,k[1],i,u].concat(p))))return T;F&&(s=s.slice(0,-1*F*2),i=i.slice(0,-1*F),u=u.slice(0,-1*F)),s.push(this.productions_[k[1]][0]),i.push(S.$),u.push(S._$),B=r[s[s.length-2]][s[s.length-1]],s.push(B);break;case 3:return!0}}return!0}),"parse")},at=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,s=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),s.length-1&&(this.yylineno-=s.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:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[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 s,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],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var u in i)this[u]=i[u];return!1}return!1}),"test_match"),next:(0,a.K2)((function(){if(this.done)return this.EOF;var t,e,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),u=0;ue[0].length)){if(e=s,n=u,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,i[u])))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(){return this.next()||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:{},performAction:(0,a.K2)((function(t,e,s,n){switch(s){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;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 77;case 23:return 78;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;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 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;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 75;case 68:case 69:return 67;case 70:case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:case 85:return 88;case 86:return 89;case 87:case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:case 96:return 87;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 rt(){this.yy={}}return ut.lexer=at,(0,a.K2)(rt,"Parser"),rt.prototype=ut,ut.Parser=rt,new rt}();o.parser=o;var l=o,c=["#","+","~","-",""],h=class{static{(0,a.K2)(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const s=(0,a.jZ)(t,(0,a.D7)());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+(0,a.QO)(this.id);return"method"===this.memberType&&(t+=`(${(0,a.QO)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,a.QO)(this.returnType))),t=t.trim(),{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(c.includes(t)&&(this.visibility=t),this.id=s[2],this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[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 s=t.length,n=t.substring(0,1),i=t.substring(s-1);c.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const s=`${this.visibility?"\\"+this.visibility:""}${(0,a.QO)(this.id)}${"method"===this.memberType?`(${(0,a.QO)(this.parameters)})${this.returnType?" : "+(0,a.QO)(this.returnType):""}`:""}`;this.text=s.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""}}},p="classId-",d=[],A=new Map,y=new Map,g=[],m=[],C=0,f=new Map,E=0,b=[],k=(0,a.K2)((t=>a.Y2.sanitizeText(t,(0,a.D7)())),"sanitizeText"),T=(0,a.K2)((function(t){const e=a.Y2.sanitizeText(t,(0,a.D7)());let s="",n=e;if(e.indexOf("~")>0){const t=e.split("~");n=k(t[0]),s=k(t[1])}return{className:n,type:s}}),"splitClassNameAndType"),D=(0,a.K2)((function(t,e){const s=a.Y2.sanitizeText(t,(0,a.D7)());e&&(e=k(e));const{className:n}=T(s);A.get(n).label=e,A.get(n).text=`${e}${A.get(n).type?`<${A.get(n).type}>`:""}`}),"setClassLabel"),F=(0,a.K2)((function(t){const e=a.Y2.sanitizeText(t,(0,a.D7)()),{className:s,type:n}=T(e);if(A.has(s))return;const i=a.Y2.sanitizeText(s,(0,a.D7)());A.set(i,{id:i,type:n,label:i,text:`${i}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:p+i+"-"+C}),C++}),"addClass"),B=(0,a.K2)((function(t,e){const s={id:`interface${m.length}`,label:t,classId:e};m.push(s)}),"addInterface"),_=(0,a.K2)((function(t){const e=a.Y2.sanitizeText(t,(0,a.D7)());if(A.has(e))return A.get(e).domId;throw new Error("Class not found: "+e)}),"lookUpDomId"),S=(0,a.K2)((function(){d=[],A=new Map,g=[],m=[],(b=[]).push(j),f=new Map,E=0,V="TB",(0,a.IU)()}),"clear"),N=(0,a.K2)((function(t){return A.get(t)}),"getClass"),L=(0,a.K2)((function(){return A}),"getClasses"),$=(0,a.K2)((function(){return d}),"getRelations"),x=(0,a.K2)((function(){return g}),"getNotes"),O=(0,a.K2)((function(t){a.Rm.debug("Adding relation: "+JSON.stringify(t));const e=[X.LOLLIPOP,X.AGGREGATION,X.COMPOSITION,X.DEPENDENCY,X.EXTENSION];t.relation.type1!==X.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==X.LOLLIPOP||e.includes(t.relation.type1)?(F(t.id1),F(t.id2)):(F(t.id1),B(t.id2,t.id1),t.id2="interface"+(m.length-1)):(F(t.id2),B(t.id1,t.id2),t.id1="interface"+(m.length-1)),t.id1=T(t.id1).className,t.id2=T(t.id2).className,t.relationTitle1=a.Y2.sanitizeText(t.relationTitle1.trim(),(0,a.D7)()),t.relationTitle2=a.Y2.sanitizeText(t.relationTitle2.trim(),(0,a.D7)()),d.push(t)}),"addRelation"),v=(0,a.K2)((function(t,e){const s=T(t).className;A.get(s).annotations.push(e)}),"addAnnotation"),I=(0,a.K2)((function(t,e){F(t);const s=T(t).className,n=A.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?n.annotations.push(k(t.substring(2,t.length-2))):t.indexOf(")")>0?n.methods.push(new h(t,"method")):t&&n.members.push(new h(t,"attribute"))}}),"addMember"),K=(0,a.K2)((function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>I(t,e))))}),"addMembers"),w=(0,a.K2)((function(t,e){const s={id:`note${g.length}`,class:e,text:t};g.push(s)}),"addNote"),R=(0,a.K2)((function(t){return t.startsWith(":")&&(t=t.substring(1)),k(t.trim())}),"cleanupLabel"),P=(0,a.K2)((function(t,e){t.split(",").forEach((function(t){let s=t;/\d/.exec(t[0])&&(s=p+s);const n=A.get(s);n&&(n.cssClasses+=" "+e)}))}),"setCssClass"),M=(0,a.K2)((function(t,e){for(const s of t){let t=y.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},y.set(s,t)),e&&e.forEach((function(e){if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)})),A.forEach((t=>{t.cssClasses.includes(s)&&t.styles.push(...e.flatMap((t=>t.split(","))))}))}}),"defineClass"),G=(0,a.K2)((function(t,e){t.split(",").forEach((function(t){void 0!==e&&(A.get(t).tooltip=k(e))}))}),"setTooltip"),U=(0,a.K2)((function(t,e){return e&&f.has(e)?f.get(e).classes.get(t).tooltip:A.get(t).tooltip}),"getTooltip"),Y=(0,a.K2)((function(t,e,s){const n=(0,a.D7)();t.split(",").forEach((function(t){let i=t;/\d/.exec(t[0])&&(i=p+i);const a=A.get(i);a&&(a.link=u._K.formatUrl(e,n),"sandbox"===n.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof s?k(s):"_blank")})),P(t,"clickable")}),"setLink"),z=(0,a.K2)((function(t,e,s){t.split(",").forEach((function(t){Q(t,e,s),A.get(t).haveCallback=!0})),P(t,"clickable")}),"setClickEvent"),Q=(0,a.K2)((function(t,e,s){const n=a.Y2.sanitizeText(t,(0,a.D7)());if("loose"!==(0,a.D7)().securityLevel)return;if(void 0===e)return;const i=n;if(A.has(i)){const t=_(i);let n=[];if("string"==typeof s){n=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),(0,r.Ltv)(this).classed("hover",!1)}))}),"setupToolTips");b.push(j);var V="TB",q=(0,a.K2)((()=>V),"getDirection"),H=(0,a.K2)((t=>{V=t}),"setDirection"),J=(0,a.K2)((function(t){f.has(t)||(f.set(t,{id:t,classes:new Map,children:{},domId:p+t+"-"+E}),E++)}),"addNamespace"),Z=(0,a.K2)((function(t){return f.get(t)}),"getNamespace"),tt=(0,a.K2)((function(){return f}),"getNamespaces"),et=(0,a.K2)((function(t,e){if(f.has(t))for(const s of e){const{className:e}=T(s);A.get(e).parent=t,f.get(t).classes.set(e,A.get(e))}}),"addClassesToNamespace"),st=(0,a.K2)((function(t,e){const s=A.get(t);if(e&&s)for(const t of e)t.includes(",")?s.styles.push(...t.split(",")):s.styles.push(t)}),"setCssStyle");function nt(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}(0,a.K2)(nt,"getArrowMarker");var it=(0,a.K2)((()=>{const t=[],e=[],s=(0,a.D7)();for(const e of f.keys()){const n=f.get(e);if(n){const e={id:n.id,label:n.id,isGroup:!0,padding:s.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:s.look};t.push(e)}}for(const e of A.keys()){const n=A.get(e);if(n){const e=n;e.parentId=n.parent,e.look=s.look,t.push(e)}}let n=0;for(const i of g){n++;const u={id:i.id,label:i.text,isGroup:!1,shape:"note",padding:s.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${s.themeVariables.noteBkgColor}`,`stroke: ${s.themeVariables.noteBorderColor}`],look:s.look};t.push(u);const a=A.get(i.class)?.id??"";if(a){const t={id:`edgeNote${n}`,start:i.id,end:a,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:s.look};e.push(t)}}for(const e of m){const n={id:e.id,label:e.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:s.look};t.push(n)}n=0;for(const t of d){n++;const i={id:(0,u.rY)(t.id1,t.id2,{prefix:"id",counter:n}),start:t.id1,end:t.id2,type:"normal",label:t.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:nt(t.relation.type1),arrowTypeEnd:nt(t.relation.type2),startLabelRight:"none"===t.relationTitle1?"":t.relationTitle1,endLabelLeft:"none"===t.relationTitle2?"":t.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:t.style||"",pattern:1==t.relation.lineType?"dashed":"solid",look:s.look};e.push(i)}return{nodes:t,edges:e,other:{},config:s,direction:q()}}),"getData"),ut={setAccTitle:a.SV,getAccTitle:a.iN,getAccDescription:a.m7,setAccDescription:a.EI,getConfig:(0,a.K2)((()=>(0,a.D7)().class),"getConfig"),addClass:F,bindFunctions:W,clear:S,getClass:N,getClasses:L,getNotes:x,addAnnotation:v,addNote:w,getRelations:$,addRelation:O,getDirection:q,setDirection:H,addMember:I,addMembers:K,cleanupLabel:R,lineType:{LINE:0,DOTTED_LINE:1},relationType:X,setClickEvent:z,setCssClass:P,defineClass:M,setLink:Y,getTooltip:U,setTooltip:G,lookUpDomId:_,setDiagramTitle:a.ke,getDiagramTitle:a.ab,setClassLabel:D,addNamespace:J,addClassesToNamespace:et,getNamespace:Z,getNamespaces:tt,setCssStyle:st,getData:it},at=(0,a.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`),"getStyles"),rt=(0,a.K2)(((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const e of t.doc)"dir"===e.stmt&&(s=e.value);return s}),"getDir"),ot={getClasses:(0,a.K2)((function(t,e){return e.db.getClasses()}),"getClasses"),draw:(0,a.K2)((async function(t,e,s,r){a.Rm.info("REF0:"),a.Rm.info("Drawing class diagram (v3)",e);const{securityLevel:o,state:l,layout:c}=(0,a.D7)(),h=r.db.getData(),p=(0,n.A)(e,o);h.type=r.type,h.layoutAlgorithm=(0,i.q7)(c),h.nodeSpacing=l?.nodeSpacing||50,h.rankSpacing=l?.rankSpacing||50,h.markers=["aggregation","extension","composition","dependency","lollipop"],h.diagramId=e,await(0,i.XX)(h,p),u._K.insertTitle(p,"classDiagramTitleText",l?.titleTopMargin??25,r.db.getDiagramTitle()),(0,n.P)(p,8,"classDiagram",l?.useMaxWidth??!0)}),"draw"),getDir:rt}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/244-45e1a422.chunk.min.js b/docs/hugo/public/js/244-45e1a422.chunk.min.js new file mode 100644 index 000000000..cf88bbb66 --- /dev/null +++ b/docs/hugo/public/js/244-45e1a422.chunk.min.js @@ -0,0 +1 @@ +(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[244],{7375:function(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return i.bind(this)(r)}}}()},445:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},o=function(t){return(t=+t)+(t>68?1900:2e3)},c=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],d=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,i=a.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},h={A:[r,function(t){this.afternoon=u(t,!1)}],a:[r,function(t){this.afternoon=u(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[i,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[r,function(t){var e=d("months"),n=(d("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=d("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:l,ZZ:l};function f(n){var i,s;i=n,s=a&&a.formats;for(var r=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=r.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),r=s.year,a=s.month,o=s.day,c=s.hours,l=s.minutes,d=s.seconds,u=s.milliseconds,h=s.zone,y=s.week,k=new Date,m=o||(r||a?1:k.getDate()),p=r||k.getFullYear(),g=0;r&&!a||(g=a>0?a-1:k.getMonth());var b,T=c||0,v=l||0,x=d||0,w=u||0;return h?new Date(Date.UTC(p,g,m,T,v,x,w+60*h.offset*1e3)):n?new Date(Date.UTC(p,g,m,T,v,x,w)):(b=new Date(p,g,m,T,v,x,w),y&&(b=i(b).week(y).toDate()),b)}catch(t){return new Date("")}}(e,o,i,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var h=o.length,y=1;y<=h;y+=1){r[1]=o[y-1];var k=n.apply(this,r);if(k.isValid()){this.$d=k.$d,this.$L=k.$L,this.init();break}y===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()},8313:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},6244:(t,e,n)=>{"use strict";n.d(e,{diagram:()=>Yt});var i=n(8159),s=n(9502),r=n(6750),a=n(4353),o=n(8313),c=n(445),l=n(7375),d=n(4852),u=function(){var t=(0,s.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"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],n=[1,26],i=[1,27],r=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],y=[1,11],k=[1,12],m=[1,13],p=[1,14],g=[1,15],b=[1,16],T=[1,19],v=[1,20],x=[1,21],w=[1,22],_=[1,23],D=[1,25],$=[1,35],C={trace:(0,s.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,s.K2)((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 19:i.TopAxis(),this.$=r[o].substr(8);break;case 20:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 21:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 22:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 23:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 24:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 27:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 28:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 33:i.addTask(r[o-1],r[o]),this.$="task";break;case 34:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 36:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 37:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 38:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 39:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 40:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 41:case 47:this.$=r[o-1]+" "+r[o];break;case 42:case 43:case 45:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 44:case 46:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[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:n,13:i,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:k,26:m,27:p,28:g,29:b,30:T,31:v,33:x,35:w,36:_,37:24,38:D,40:$},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:i,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:k,26:m,27:p,28:g,29:b,30:T,31:v,33:x,35:w,36:_,37:24,38:D,40:$},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,s.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,d=0,u=0,h=a.slice.call(arguments,1),f=Object.create(this.lexer),y={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(y.yy[k]=this.yy[k]);f.setInput(t,y.yy),y.yy.lexer=f,y.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var m=f.yylloc;a.push(m);var p=f.options&&f.options.ranges;function g(){var t;return"number"!=typeof(t=i.pop()||f.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,s.K2)(g,"lex");for(var b,T,v,x,w,_,D,$,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==b&&(b=g()),x=o[v]&&o[v][b]),void 0===x||!x.length||!x[0]){var K;for(_ in C=[],o[v])this.terminals_[_]&&_>2&&C.push("'"+this.terminals_[_]+"'");K=f.showPosition?"Parse error on line "+(l+1)+":\n"+f.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(K,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:m,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(f.yytext),a.push(f.yylloc),n.push(x[1]),b=null,T?(b=T,T=null):(d=f.yyleng,c=f.yytext,l=f.yylineno,m=f.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[x[1]][1],S.$=r[r.length-D],S._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},p&&(S._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(S,[c,d,l,y.yy,x[1],r,a].concat(h))))return w;D&&(n=n.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[x[1]][0]),r.push(S.$),a.push(S._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},S=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,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"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 n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,s.K2)((function(){return this.next()||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,n,i){switch(n){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 K(){this.yy={}}return C.lexer=S,(0,s.K2)(K,"Parser"),K.prototype=C,C.Parser=K,new K}();u.parser=u;var h=u;a.extend(o),a.extend(c),a.extend(l);var f,y,k={friday:5,saturday:6},m="",p="",g=void 0,b="",T=[],v=[],x=new Map,w=[],_=[],D="",$="",C=["active","done","crit","milestone"],S=[],K=!1,E=!1,M="sunday",A="saturday",L=0,Y=(0,s.K2)((function(){w=[],_=[],D="",S=[],ht=0,f=void 0,y=void 0,mt=[],m="",p="",$="",g=void 0,b="",T=[],v=[],K=!1,E=!1,L=0,x=new Map,(0,s.IU)(),M="sunday",A="saturday"}),"clear"),I=(0,s.K2)((function(t){p=t}),"setAxisFormat"),W=(0,s.K2)((function(){return p}),"getAxisFormat"),F=(0,s.K2)((function(t){g=t}),"setTickInterval"),O=(0,s.K2)((function(){return g}),"getTickInterval"),P=(0,s.K2)((function(t){b=t}),"setTodayMarker"),B=(0,s.K2)((function(){return b}),"getTodayMarker"),z=(0,s.K2)((function(t){m=t}),"setDateFormat"),N=(0,s.K2)((function(){K=!0}),"enableInclusiveEndDates"),G=(0,s.K2)((function(){return K}),"endDatesAreInclusive"),H=(0,s.K2)((function(){E=!0}),"enableTopAxis"),R=(0,s.K2)((function(){return E}),"topAxisEnabled"),j=(0,s.K2)((function(t){$=t}),"setDisplayMode"),U=(0,s.K2)((function(){return $}),"getDisplayMode"),V=(0,s.K2)((function(){return m}),"getDateFormat"),Z=(0,s.K2)((function(t){T=t.toLowerCase().split(/[\s,]+/)}),"setIncludes"),X=(0,s.K2)((function(){return T}),"getIncludes"),q=(0,s.K2)((function(t){v=t.toLowerCase().split(/[\s,]+/)}),"setExcludes"),Q=(0,s.K2)((function(){return v}),"getExcludes"),J=(0,s.K2)((function(){return x}),"getLinks"),tt=(0,s.K2)((function(t){D=t,w.push(t)}),"addSection"),et=(0,s.K2)((function(){return w}),"getSections"),nt=(0,s.K2)((function(){let t=vt(),e=0;for(;!t&&e<10;)t=vt(),e++;return _=mt}),"getTasks"),it=(0,s.K2)((function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!(!n.includes("weekends")||t.isoWeekday()!==k[A]&&t.isoWeekday()!==k[A]+1)||!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim())))}),"isInvalidDate"),st=(0,s.K2)((function(t){M=t}),"setWeekday"),rt=(0,s.K2)((function(){return M}),"getWeekday"),at=(0,s.K2)((function(t){A=t}),"setWeekend"),ot=(0,s.K2)((function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?a(t.startTime):a(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?a(t.endTime):a(t.endTime,e,!0);const[o,c]=ct(s,r,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c}),"checkTaskDates"),ct=(0,s.K2)((function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=it(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]}),"fixTaskDates"),lt=(0,s.K2)((function(t,e,n){n=n.trim();const i=/^after\s+(?[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const e of i.groups.ids.split(" ")){let n=bt(e);void 0!==n&&(!t||n.endTime>t.endTime)&&(t=n)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let r=a(n,e.trim(),!0);if(r.isValid())return r.toDate();{s.Rm.debug("Invalid date:"+n),s.Rm.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}}),"getStartDate"),dt=(0,s.K2)((function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]}),"parseDuration"),ut=(0,s.K2)((function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?[\d\w- ]+)/.exec(n);if(null!==s){let t=null;for(const e of s.groups.ids.split(" ")){let n=bt(e);void 0!==n&&(!t||n.startTime{window.open(n,"_self")})),x.set(t,n))})),wt(t,"clickable")}),"setLink"),wt=(0,s.K2)((function(t,e){t.split(",").forEach((function(t){let n=bt(t);void 0!==n&&n.classes.push(e)}))}),"setClass"),_t=(0,s.K2)((function(t,e,n){if("loose"!==(0,s.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{i._K.runFunc(e,...r)}))}),"setClickFun"),Dt=(0,s.K2)((function(t,e){S.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))}),"pushFun"),$t=(0,s.K2)((function(t,e,n){t.split(",").forEach((function(t){_t(t,e,n)})),wt(t,"clickable")}),"setClickEvent"),Ct=(0,s.K2)((function(t){S.forEach((function(e){e(t)}))}),"bindFunctions"),St={getConfig:(0,s.K2)((()=>(0,s.D7)().gantt),"getConfig"),clear:Y,setDateFormat:z,getDateFormat:V,enableInclusiveEndDates:N,endDatesAreInclusive:G,enableTopAxis:H,topAxisEnabled:R,setAxisFormat:I,getAxisFormat:W,setTickInterval:F,getTickInterval:O,setTodayMarker:P,getTodayMarker:B,setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setDisplayMode:j,getDisplayMode:U,setAccDescription:s.EI,getAccDescription:s.m7,addSection:tt,getSections:et,getTasks:nt,addTask:gt,findTaskById:bt,addTaskOrg:Tt,setIncludes:Z,getIncludes:X,setExcludes:q,getExcludes:Q,setClickEvent:$t,setLink:xt,getLinks:J,bindFunctions:Ct,parseDuration:dt,isInvalidDate:it,setWeekday:st,getWeekday:rt,setWeekend:at};function Kt(t,e,n){let i=!0;for(;i;)i=!1,n.forEach((function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)}))}(0,s.K2)(Kt,"getTaskTags");var Et,Mt=(0,s.K2)((function(){s.Rm.debug("Something is calling, setConf, remove the call")}),"setConf"),At={monday:d.ABi,tuesday:d.PGu,wednesday:d.GuW,thursday:d.Mol,friday:d.TUC,saturday:d.rGn,sunday:d.YPH},Lt=(0,s.K2)(((t,e)=>{let n=[...t].map((()=>-1/0)),i=[...t].sort(((t,e)=>t.startTime-e.startTime||t.order-e.order)),s=0;for(const t of i)for(let i=0;i=n[i]){n[i]=t.endTime,t.order=i+e,i>s&&(s=i);break}return s}),"getMaxIntersections"),Yt={parser:h,db:St,renderer:{setConf:Mt,draw:(0,s.K2)((function(t,e,n,i){const r=(0,s.D7)().gantt,o=(0,s.D7)().securityLevel;let c;"sandbox"===o&&(c=(0,d.Ltv)("#i"+e));const l="sandbox"===o?(0,d.Ltv)(c.nodes()[0].contentDocument.body):(0,d.Ltv)("body"),u="sandbox"===o?c.nodes()[0].contentDocument:document,h=u.getElementById(e);void 0===(Et=h.parentElement.offsetWidth)&&(Et=1200),void 0!==r.useWidth&&(Et=r.useWidth);const f=i.db.getTasks();let y=[];for(const t of f)y.push(t.type);y=$(y);const k={};let m=2*r.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===r.displayMode){const t={};for(const e of f)void 0===t[e.section]?t[e.section]=[e]:t[e.section].push(e);let e=0;for(const n of Object.keys(t)){const i=Lt(t[n],e)+1;e+=i,m+=i*(r.barHeight+r.barGap),k[n]=i}}else{m+=f.length*(r.barHeight+r.barGap);for(const t of y)k[t]=f.filter((e=>e.type===t)).length}h.setAttribute("viewBox","0 0 "+Et+" "+m);const p=l.select(`[id="${e}"]`),g=(0,d.w7C)().domain([(0,d.jkA)(f,(function(t){return t.startTime})),(0,d.T9B)(f,(function(t){return t.endTime}))]).rangeRound([0,Et-r.leftPadding-r.rightPadding]);function b(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:nt.order)))].map((e=>t.find((t=>t.order===e))));p.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+a-2})).attr("width",(function(){return u-r.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%r.numberSectionStyles;return"section section0"}));const f=p.append("g").selectAll("rect").data(t).enter(),k=i.db.getLinks();if(f.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?g(t.startTime)+o+.5*(g(t.endTime)-g(t.startTime))-.5*c:g(t.startTime)+o})).attr("y",(function(t,e){return t.order*n+a})).attr("width",(function(t){return t.milestone?c:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr("height",c).attr("transform-origin",(function(t,e){return e=t.order,(g(t.startTime)+o+.5*(g(t.endTime)-g(t.startTime))).toString()+"px "+(e*n+a+.5*c).toString()+"px"})).attr("class",(function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[e,i]of y.entries())t.type===i&&(n=e%r.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),i+=n,i+=" "+e,"task"+i})),f.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",r.fontSize).attr("x",(function(t){let e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*c),t.milestone&&(n=e+c);const i=this.getBBox().width;return i>n-e?n+i+1.5*r.leftPadding>u?e+o-5:n+o+5:(n-e)/2+e+o})).attr("y",(function(t,e){return t.order*n+r.barHeight/2+(r.fontSize/2-2)+a})).attr("text-height",c).attr("class",(function(t){const e=g(t.startTime);let n=g(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let a=0;for(const[e,n]of y.entries())t.type===n&&(a=e%r.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+a:"activeText"+a),t.done?o=t.crit?o+" doneCritText"+a:o+" doneText"+a:t.crit&&(o=o+" critText"+a),t.milestone&&(o+=" milestoneText"),i>n-e?n+i+1.5*r.leftPadding>u?s+" taskTextOutsideLeft taskTextOutside"+a+" "+o:s+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+i:s+" taskText taskText"+a+" "+o+" width-"+i})),"sandbox"===(0,s.D7)().securityLevel){let t;t=(0,d.Ltv)("#i"+e);const n=t.nodes()[0].contentDocument;f.filter((function(t){return k.has(t.id)})).each((function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const s=e.parentNode;var r=n.createElement("a");r.setAttribute("xlink:href",k.get(t.id)),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(e),r.appendChild(i)}))}}function x(t,e,n,o,c,l,d,u){if(0===d.length&&0===u.length)return;let h,f;for(const{startTime:t,endTime:e}of l)(void 0===h||tf)&&(f=e);if(!h||!f)return;if(a(f).diff(a(h),"year")>5)return void s.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 y=i.db.getDateFormat(),k=[];let m=null,b=a(h);for(;b.valueOf()<=f;)i.db.isInvalidDate(b,y,d,u)?m?m.end=b:m={start:b,end:b}:m&&(k.push(m),m=null),b=b.add(1,"d");p.append("g").selectAll("rect").data(k).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return g(t.start)+n})).attr("y",r.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return g(e)-g(t.start)})).attr("height",c-e-r.gridLineStartPadding).attr("transform-origin",(function(e,i){return(g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+"px "+(i*t+.5*c).toString()+"px"})).attr("class","exclude-range")}function w(t,e,n,s){let a=(0,d.l78)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,d.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));const o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||r.tickInterval);if(null!==o){const t=o[1],e=o[2],n=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":a.ticks(d.t6C.every(t));break;case"second":a.ticks(d.ucG.every(t));break;case"minute":a.ticks(d.wXd.every(t));break;case"hour":a.ticks(d.Agd.every(t));break;case"day":a.ticks(d.UAC.every(t));break;case"week":a.ticks(At[n].every(t));break;case"month":a.ticks(d.Ui6.every(t))}}if(p.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||r.topAxis){let n=(0,d.tlR)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,d.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));if(null!==o){const t=o[1],e=o[2],s=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":n.ticks(d.t6C.every(t));break;case"second":n.ticks(d.ucG.every(t));break;case"minute":n.ticks(d.wXd.every(t));break;case"hour":n.ticks(d.Agd.every(t));break;case"day":n.ticks(d.UAC.every(t));break;case"week":n.ticks(At[s].every(t));break;case"month":n.ticks(d.Ui6.every(t))}}p.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(t,e){let n=0;const i=Object.keys(k).map((t=>[t,k[t]]));p.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split(s.Y2.lineBreakRegex),n=-(e.length-1)/2,i=u.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[t,n]of e.entries()){const e=u.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttribute("alignment-baseline","central"),e.setAttribute("x","10"),t>0&&e.setAttribute("dy","1em"),e.textContent=n,i.appendChild(e)}return i})).attr("x",10).attr("y",(function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a`\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\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: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\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: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\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 .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: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/354-5c1850f7.chunk.min.js b/docs/hugo/public/js/354-5c1850f7.chunk.min.js new file mode 100644 index 000000000..0aec2588f --- /dev/null +++ b/docs/hugo/public/js/354-5c1850f7.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[354],{7354:(e,r,a)=>{a.d(r,{diagram:()=>g});var t=a(6144),n=a(7286),s=a(9502),d=a(8731),i={parse:(0,s.K2)((async e=>{const r=await(0,d.qg)("info",e);s.Rm.debug(r)}),"parse")},o={version:t.r},g={parser:i,db:{getVersion:(0,s.K2)((()=>o.version),"getVersion")},renderer:{draw:(0,s.K2)(((e,r,a)=>{s.Rm.debug("rendering info diagram\n"+e);const t=(0,n.D)(r);(0,s.a$)(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${a}`)}),"draw")}}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/355-ef4f96e9.chunk.min.js b/docs/hugo/public/js/355-ef4f96e9.chunk.min.js new file mode 100644 index 000000000..526f16547 --- /dev/null +++ b/docs/hugo/public/js/355-ef4f96e9.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[355],{6355:(t,e,n)=>{n.d(e,{diagram:()=>D});var i=n(9874),s=n(1282),r=(n(1099),n(3115),n(6058),n(8159),n(7286)),o=n(9502),a=n(5097),c=n(8041),l=n(5263),h=function(){var t=(0,o.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[1,4],n=[1,13],i=[1,12],s=[1,15],r=[1,16],a=[1,20],c=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:(0,o.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,o.K2)((function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}}),"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:n,7:[1,10],9:9,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:c},{6:n,9:22,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:c},{6:h,7:u,10:23,11:g},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(y,[2,25]),t(y,[2,26]),t(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:c},t(f,[2,14],{7:m,11:b}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(y,[2,31]),{21:[1,39]},{22:[1,40]},t(f,[2,13],{7:m,11:b}),t(_,[2,11]),t(_,[2,12]),t(d,[2,15],{24:k}),t(y,[2,30]),{22:[1,41]},t(y,[2,27]),t(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,o.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,o.K2)((function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,c="",l=0,h=0,u=0,g=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;r.push(f);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)((function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t}),"popStack"),(0,o.K2)(b,"lex");for(var _,k,E,S,N,x,D,L,I,C={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=a[E]&&a[E][_]),void 0===S||!S.length||!S[0]){var O;for(x in I=[],a[E])this.terminals_[x]&&x>2&&I.push("'"+this.terminals_[x]+"'");O=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(O,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:f,expected:I})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:n.push(_),s.push(d.yytext),r.push(d.yylloc),n.push(S[1]),_=null,k?(_=k,k=null):(h=d.yyleng,c=d.yytext,l=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[S[1]][1],C.$=s[s.length-D],C._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(C._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(N=this.performAction.apply(C,[c,h,l,p.yy,S[1],s,r].concat(g))))return N;D&&(n=n.slice(0,-1*D*2),s=s.slice(0,-1*D),r=r.slice(0,-1*D)),n.push(this.productions_[S[1]][0]),s.push(C.$),r.push(C._$),L=a[n[n.length-2]][n[n.length-1]],n.push(L);break;case 3:return!0}}return!0}),"parse")},S=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,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"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 n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,o.K2)((function(){return this.next()||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,n,i){switch(n){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 n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"
"),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 N(){this.yy={}}return E.lexer=S,(0,o.K2)(N,"Parser"),N.prototype=E,E.Parser=N,new N}();h.parser=h;var u=h,g=[],d=[],p=0,y={},f=(0,o.K2)((()=>{g=[],d=[],p=0,y={}}),"clear"),m=(0,o.K2)((t=>{if(0===g.length)return null;const e=g[0].level;let n=null;for(let t=g.length-1;t>=0;t--)if(g[t].level!==e||n||(n=g[t]),g[t].levelt.parentId===i.id));for(const e of s){const s={id:e.id,parentId:i.id,label:(0,o.jZ)(e.label??"",n),isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:(0,o.D7)()}}),"getData"),k=(0,o.K2)(((t,e,n,s,r)=>{const a=(0,o.D7)();let c=a.mindmap?.padding??o.UI.mindmap.padding;switch(s){case E.ROUNDED_RECT:case E.RECT:case E.HEXAGON:c*=2}const l={id:(0,o.jZ)(e,a)||"kbn"+p++,level:t,label:(0,o.jZ)(n,a),width:a.mindmap?.maxNodeWidth??o.UI.mindmap.maxNodeWidth,padding:c,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=(0,i.H)(t,{schema:i.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&&(l.shape=e?.shape),e?.label&&(l.label=e?.label),e?.icon&&(l.icon=e?.icon.toString()),e?.assigned&&(l.assigned=e?.assigned.toString()),e?.ticket&&(l.ticket=e?.ticket.toString()),e?.priority&&(l.priority=e?.priority)}const h=m(t);h?l.parentId=h.id||"kbn"+p++:d.push(l),g.push(l)}),"addNode"),E={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},S={clear:f,addNode:k,getSections:b,getData:_,nodeType:E,getType:(0,o.K2)(((t,e)=>{switch(o.Rm.debug("In get type",t,e),t){case"[":return E.RECT;case"(":return")"===e?E.ROUNDED_RECT:E.CLOUD;case"((":return E.CIRCLE;case")":return E.CLOUD;case"))":return E.BANG;case"{{":return E.HEXAGON;default:return E.DEFAULT}}),"getType"),setElementForId:(0,o.K2)(((t,e)=>{y[t]=e}),"setElementForId"),decorateNode:(0,o.K2)((t=>{if(!t)return;const e=(0,o.D7)(),n=g[g.length-1];t.icon&&(n.icon=(0,o.jZ)(t.icon,e)),t.class&&(n.cssClasses=(0,o.jZ)(t.class,e))}),"decorateNode"),type2Str:(0,o.K2)((t=>{switch(t){case E.DEFAULT:return"no-border";case E.RECT:return"rect";case E.ROUNDED_RECT:return"rounded-rect";case E.CIRCLE:return"circle";case E.CLOUD:return"cloud";case E.BANG:return"bang";case E.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),getLogger:(0,o.K2)((()=>o.Rm),"getLogger"),getElementById:(0,o.K2)((t=>y[t]),"getElementById")},N={draw:(0,o.K2)((async(t,e,n,i)=>{o.Rm.debug("Rendering kanban diagram\n"+t);const a=i.db.getData(),c=(0,o.D7)();c.htmlLabels=!1;const l=(0,r.D)(e),h=l.append("g");h.attr("class","sections");const u=l.append("g");u.attr("class","items");const g=a.nodes.filter((t=>t.isGroup));let d=0;const p=[];let y=25;for(const t of g){const e=c?.kanban?.sectionWidth||200;d+=1,t.x=e*d+10*(d-1)/2,t.width=e,t.y=0,t.height=3*e,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+d;const n=await(0,s.U)(h,t);y=Math.max(y,n?.labelBBox?.height),p.push(n)}let f=0;for(const t of g){const e=p[f];f+=1;const n=c?.kanban?.sectionWidth||200,i=3*-n/2+y;let r=i;const o=a.nodes.filter((e=>e.parentId===t.id));for(const e of o){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=t.x,e.width=n-15;const i=(await(0,s.on)(u,e,{config:c})).node().getBBox();e.y=r+i.height/2,await(0,s.U_)(e),r=e.y+i.height/2+5}const l=e.cluster.select("rect"),h=Math.max(r-i+30,50)+(y-25);l.attr("height",h)}(0,o.ot)(void 0,l,c.mindmap?.padding??o.UI.kanban.padding,c.mindmap?.useMaxWidth??o.UI.kanban.useMaxWidth)}),"draw")},x=(0,o.K2)((t=>{let e="";for(let e=0;et.darkMode?(0,l.A)(e,n):(0,c.A)(e,n)),"adjuster");for(let i=0;i`\n .edge {\n stroke-width: 3;\n }\n ${x(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`),"getStyles")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/357-e9bfa102.chunk.min.js b/docs/hugo/public/js/357-e9bfa102.chunk.min.js new file mode 100644 index 000000000..aac58eb5b --- /dev/null +++ b/docs/hugo/public/js/357-e9bfa102.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[357],{3933:(t,e,a)=>{function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(9502).K2)(r,"populateCommonDb")},7357:(t,e,a)=>{a.d(e,{diagram:()=>x});var r=a(3933),n=a(8159),o=a(7286),l=a(9502),i=a(8731),c={packet:[]},s=structuredClone(c),d=l.UI.packet,k=(0,l.K2)((()=>{const t=(0,n.$t)({...d,...(0,l.zj)().packet});return t.showBits&&(t.paddingY+=10),t}),"getConfig"),p=(0,l.K2)((()=>s.packet),"getPacket"),b={pushWord:(0,l.K2)((t=>{t.length>0&&s.packet.push(t)}),"pushWord"),getPacket:p,getConfig:k,clear:(0,l.K2)((()=>{(0,l.IU)(),s=structuredClone(c)}),"clear"),setAccTitle:l.SV,getAccTitle:l.iN,setDiagramTitle:l.ke,getDiagramTitle:l.ab,getAccDescription:l.m7,setAccDescription:l.EI},g=(0,l.K2)((t=>{(0,r.S)(t,b);let e=-1,a=[],n=1;const{bitsPerRow:o}=b.getConfig();for(let{start:r,end:i,label:c}of t.blocks){if(i&&i{if(void 0===t.end&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*a?[t,void 0]:[{start:t.start,end:e*a-1,label:t.label},{start:e*a,end:t.end,label:t.label}]}),"getNextFittingBlock"),f={parse:(0,l.K2)((async t=>{const e=await(0,i.qg)("packet",t);l.Rm.debug(e),g(e)}),"parse")},u=(0,l.K2)(((t,e,a,r)=>{const n=r.db,i=n.getConfig(),{rowHeight:c,paddingY:s,bitWidth:d,bitsPerRow:k}=i,p=n.getPacket(),b=n.getDiagramTitle(),g=c+s,h=g*(p.length+1)-(b?0:c),f=d*k+2,u=(0,o.D)(e);u.attr("viewbox",`0 0 ${f} ${h}`),(0,l.a$)(u,h,f,i.useMaxWidth);for(const[t,e]of p.entries())$(u,e,t,i);u.append("text").text(b).attr("x",f/2).attr("y",h-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")}),"draw"),$=(0,l.K2)(((t,e,a,{rowHeight:r,paddingX:n,paddingY:o,bitWidth:l,bitsPerRow:i,showBits:c})=>{const s=t.append("g"),d=a*(r+o)+o;for(const t of e){const e=t.start%i*l+1,a=(t.end-t.start+1)*l-n;if(s.append("rect").attr("x",e).attr("y",d).attr("width",a).attr("height",r).attr("class","packetBlock"),s.append("text").attr("x",e+a/2).attr("y",d+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(t.label),!c)continue;const o=t.end===t.start,k=d-2;s.append("text").attr("x",e+(o?a/2:0)).attr("y",k).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",o?"middle":"start").text(t.start),o||s.append("text").attr("x",e+a).attr("y",k).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(t.end)}}),"drawWord"),w={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},x={parser:f,db:b,renderer:{draw:u},styles:(0,l.K2)((({packet:t}={})=>{const e=(0,n.$t)(w,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")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/383-676aedef.chunk.min.js b/docs/hugo/public/js/383-676aedef.chunk.min.js new file mode 100644 index 000000000..237da8dc0 --- /dev/null +++ b/docs/hugo/public/js/383-676aedef.chunk.min.js @@ -0,0 +1 @@ +(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[383],{7799:function(t,e,i){var n;n=function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=7)}([function(e,i){e.exports=t},function(t,e,i){"use strict";var n=i(0).FDLayoutConstants;function r(){}for(var o in n)r[o]=n[o];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=r},function(t,e,i){"use strict";var n=i(0).FDLayoutEdge;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},function(t,e,i){"use strict";var n=i(0).LGraph;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},function(t,e,i){"use strict";var n=i(0).LGraphManager;function r(t){n.call(this,t)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},function(t,e,i){"use strict";var n=i(0).FDLayoutNode,r=i(0).IMath;function o(t,e,i,r){n.call(this,t,e,i,r)}for(var s in o.prototype=Object.create(n.prototype),n)o[s]=n[s];o.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*r.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.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},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,n=this.getChild().getNodes(),r=0;r0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},_.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%l.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=l.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=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!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(i,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},_.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i1)for(a=0;an&&(n=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(c.WORLD_CENTER_X-s.x/2,c.WORLD_CENTER_Y-s.y/2))},_.radialLayout=function(t,e,i){var n=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);_.branchRadialLayout(e,null,0,359,0,n);var r=y.calculateBounds(t),o=new E;o.setDeviceOrgX(r.getMinX()),o.setDeviceOrgY(r.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var E=y[0];y.splice(0,1);var m=c.indexOf(E);m>=0&&c.splice(m,1),p--,g--}u=null!=e?(c.indexOf(y[0])+1)%p:0;for(var v=Math.abs(n-i)/g,N=u;d!=g;N=++N%p){var A=c[N].getOtherEnd(t);if(A!=e){var L=(i+d*v)%360,T=(L+v)%360;_.branchRadialLayout(A,t,L,T,r+o,o),d++}}},_.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,i=0;ie&&(e=n)}return e},_.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},_.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],n=this.graphManager.getAllNodes(),r=0;r1){var n="DummyCompound_"+i;t.memberGroups[n]=e[i];var r=e[i][0].getParent(),o=new s(t.graphManager);o.id=n,o.paddingLeft=r.paddingLeft||0,o.paddingRight=r.paddingRight||0,o.paddingBottom=r.paddingBottom||0,o.paddingTop=r.paddingTop||0,t.idToDummyNode[n]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=r.getChild();h.add(o);for(var l=0;l=0;t--){var e=this.compoundOrder[t],i=e.id,n=e.paddingLeft,r=e.paddingTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,n,r)}},_.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(i){var n=t.idToDummyNode[i],r=n.paddingLeft,o=n.paddingTop;t.adjustLocations(e[i],n.rect.x,n.rect.y,r,o)}))},_.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var n=i.getNodes(),r=0;r0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},_.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,n=0;nh&&(h=c.rect.height)}i+=h+t.verticalPadding}},_.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(n){var r=e[n];i.tiledMemberPack[n]=i.tileNodes(t[n],r.paddingLeft+r.paddingRight),r.rect.width=i.tiledMemberPack[n].width,r.rect.height=i.tiledMemberPack[n].height}))},_.prototype.tileNodes=function(t,e){var i={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.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&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},_.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,n=0;ni&&(e=n,i=t.rowWidth[n]);return e},_.prototype.canAddHorizontal=function(t,e,i){var n=this.getShortestRowIndex(t);if(n<0)return!0;var r=t.rowWidth[n];if(r+t.horizontalPadding+e<=t.width)return!0;var o,s,a=0;return t.rowHeight[n]0&&(a=i+t.verticalPadding-t.rowHeight[n]),o=t.width-r>=e+t.horizontalPadding?(t.height+a)/(r+e+t.horizontalPadding):(t.height+a)/t.width,a=i+t.verticalPadding,(s=t.widtho&&e!=i){n.splice(-1,1),t.rows[i].push(r),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=n[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var c=r;c<=o;c++)h[0]+=this.grid[c][s-1].length+this.grid[c][s].length-1;if(o0)for(c=s;c<=a;c++)h[3]+=this.grid[r-1][c].length+this.grid[r][c].length-1;for(var g,u,d=p.MAX_VALUE,f=0;f0&&(s=i.getGraphManager().add(i.newGraph(),o),this.processChildrenList(s,g,i))}},g.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",g)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}])},t.exports=n(i(7799))},3143:function(t){var e;e=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=26)}([function(t,e,i){"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,i){"use strict";var n=i(2),r=i(8),o=i(9);function s(t,e,i){n.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(n.prototype),n)s[a]=n[a];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 i=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==n)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=r.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(13),s=i(0),a=i(16),h=i(4);function l(t,e,i,s){null==i&&null==s&&(s=e),n.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var c in l.prototype=Object.create(n.prototype),n)l[c]=n[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.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},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach((function(n){if(n.target==t){if(n.source!=i)throw"Incorrect edge source!";e.push(n)}})),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach((function(n){if(n.source!=i&&n.target!=i)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)})),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach((function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}})),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>i&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-i)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-i),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.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 i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var n=new h(e,i),r=t.inverseTransformPoint(n);this.setLocation(r.x,r.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"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,i){"use strict";var n=i(2),r=i(10),o=i(0),s=i(6),a=i(3),h=i(1),l=i(13),c=i(12),g=i(11);function u(t,e,i){n.call(this,i),this.estimatedSize=r.MIN_VALUE,this.margin=o.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 d in u.prototype=Object.create(n.prototype),n)u[d]=n[d];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,i){if(null==e&&null==i){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 r=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(r.source=e,r.target=i,r.isInterGraph=!1,this.getEdges().push(r),e.edges.push(r),i!=e&&i.edges.push(r),r)},u.prototype.remove=function(t){var e=t;if(t instanceof a){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 i=e.edges.slice(),n=i.length,r=0;r-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(c,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var t,e,i,n=r.MAX_VALUE,o=r.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(n=t),o>(e=l.getLeft())&&(o=e)}return n==r.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=n-i,new c(this.left,this.top))},u.prototype.updateBounds=function(t){for(var e,i,n,o,s,a=r.MAX_VALUE,h=-r.MAX_VALUE,c=r.MAX_VALUE,g=-r.MAX_VALUE,u=this.nodes,d=u.length,p=0;p(e=f.getLeft())&&(a=e),h<(i=f.getRight())&&(h=i),c>(n=f.getTop())&&(c=n),g<(o=f.getBottom())&&(g=o)}var y=new l(a,c,h-a,g-c);a==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=u[0].getParent().paddingLeft?u[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},u.calculateBounds=function(t){for(var e,i,n,o,s=r.MAX_VALUE,a=-r.MAX_VALUE,h=r.MAX_VALUE,c=-r.MAX_VALUE,g=t.length,u=0;u(e=d.getLeft())&&(s=e),a<(i=d.getRight())&&(a=i),h>(n=d.getTop())&&(h=n),c<(o=d.getBottom())&&(c=o)}return new l(s,h,a-s,c-h)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,n=0;n=this.nodes.length){var h=0;r.forEach((function(e){e.owner==t&&h++})),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=u},function(t,e,i){"use strict";var n,r=i(1);function o(t){n=i(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,n,r){if(null==i&&null==n&&null==r){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}r=i,i=t;var o=(n=e).getOwner(),s=r.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,n,r);if(i.isInterGraph=!0,i.source=n,i.target=r,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.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 i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=n,i[1]=h,i[2]=o,i[3]=m,!1;if(ro)return i[0]=a,i[1]=r,i[2]=E,i[3]=s,!1;if(no?(i[0]=c,i[1]=g,L=!0):(i[0]=l,i[1]=h,L=!0):O===I&&(n>o?(i[0]=a,i[1]=h,L=!0):(i[0]=u,i[1]=g,L=!0)),-D===I?o>n?(i[2]=_,i[3]=m,T=!0):(i[2]=E,i[3]=y,T=!0):D===I&&(o>n?(i[2]=f,i[3]=y,T=!0):(i[2]=v,i[3]=m,T=!0)),L&&T)return!1;if(n>o?r>s?(w=this.getCardinalDirection(O,I,4),R=this.getCardinalDirection(D,I,2)):(w=this.getCardinalDirection(-O,I,3),R=this.getCardinalDirection(-D,I,1)):r>s?(w=this.getCardinalDirection(-O,I,1),R=this.getCardinalDirection(-D,I,3)):(w=this.getCardinalDirection(O,I,2),R=this.getCardinalDirection(D,I,4)),!L)switch(w){case 1:M=h,C=n+-p/I,i[0]=C,i[1]=M;break;case 2:C=u,M=r+d*I,i[0]=C,i[1]=M;break;case 3:M=g,C=n+p/I,i[0]=C,i[1]=M;break;case 4:C=c,M=r+-d*I,i[0]=C,i[1]=M}if(!T)switch(R){case 1:G=y,x=o+-A/I,i[2]=x,i[3]=G;break;case 2:x=v,G=s+N*I,i[2]=x,i[3]=G;break;case 3:G=m,x=o+A/I,i[2]=x,i[3]=G;break;case 4:x=_,G=s+-N*I,i[2]=x,i[3]=G}}return!1},r.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},r.getIntersection=function(t,e,i,r){if(null==r)return this.getIntersection2(t,e,i);var o,s,a,h,l,c,g,u=t.x,d=t.y,p=e.x,f=e.y,y=i.x,E=i.y,_=r.x,m=r.y;return 0==(g=(o=f-d)*(h=y-_)-(s=m-E)*(a=u-p))?null:new n((a*(c=_*E-y*m)-h*(l=p*d-u*f))/g,(s*l-o*c)/g)},r.angleOfVector=function(t,e,i,n){var r=void 0;return t!==i?(r=Math.atan((n-e)/(i-t)),i0?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,i){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var c=a[0];a.splice(0,1),s.add(c);var g=c.getEdges();for(o=0;o-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},u.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),r=0;r0){for(var r=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(g,1),c.getNeighborsList().forEach((function(t){if(i.indexOf(t)<0){var e=n.get(t)-1;1==e&&h.push(t),n.set(t,e)}}))}i=i.concat(h),1!=e.length&&2!=e.length||(r=!0,o=e[0])}return o},u.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=u},function(t,e,i){"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,i){"use strict";var n=i(4);function r(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}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(t){this.lworldExtX=t},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(t){this.lworldExtY=t},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},r.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},r.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},r.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},r.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},r.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=r},function(t,e,i){"use strict";var n=i(15),r=i(7),o=i(0),s=i(8),a=i(9);function h(){n.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=r.DEFAULT_EDGE_LENGTH,this.springConstant=r.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=r.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}for(var l in h.prototype=Object.create(n.prototype),n)h[l]=n[l];h.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,n,s,a,h=this.getGraphManager().getAllEdges(),l=0;lr.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var c=0;ct}}]),t}();t.exports=o},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=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=i,this.match_score=n,this.mismatch_penalty=r,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var n=this.listeners[i];n.event===t&&n.callback===e&&this.listeners.splice(i,1)}},r.emit=function(t,e){for(var i=0;i{"use strict";i.d(e,{diagram:()=>X});var n=i(6058),r=i(8159),o=i(7286),s=i(9502),a=i(165),h=i(3457),l=i(4852),c=i(5097),g=i(8041),u=i(5263),d=function(){var t=(0,s.K2)((function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i}),"o"),e=[1,4],i=[1,13],n=[1,12],r=[1,15],o=[1,16],a=[1,20],h=[1,19],l=[6,7,8],c=[1,26],g=[1,24],u=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],f=[1,33],y=[1,34],E=[1,6,7,11,13,15,16,19,22],_={trace:(0,s.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,s.K2)((function(t,e,i,n,r,o,s){var a=o.length-1;switch(r){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: ",o[a].id),n.addNode(o[a-1].length,o[a].id,o[a].descr,o[a].type);break;case 16:n.getLogger().trace("Icon: ",o[a]),n.decorateNode({icon:o[a]});break;case 17:case 21:n.decorateNode({class:o[a]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",o[a].id),n.addNode(0,o[a].id,o[a].descr,o[a].type);break;case 20:n.decorateNode({icon:o[a]});break;case 25:n.getLogger().trace("node found ..",o[a-2]),this.$={id:o[a-1],descr:o[a-1],type:n.getType(o[a-2],o[a])};break;case 26:this.$={id:o[a],descr:o[a],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",o[a-3]),this.$={id:o[a-3],descr:o[a-1],type:n.getType(o[a-2],o[a])}}}),"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:i,7:[1,10],9:9,12:11,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},{6:i,9:22,12:11,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},{6:c,7:g,10:23,11:u},t(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:a,22:h}),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,23]),t(d,[2,24]),t(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:c,7:g,10:32,11:u},{1:[2,7],6:i,12:21,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},t(p,[2,14],{7:f,11:y}),t(E,[2,8]),t(E,[2,9]),t(E,[2,10]),t(d,[2,15]),t(d,[2,16]),t(d,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:f,11:y}),t(E,[2,11]),t(E,[2,12]),{21:[1,37]},t(d,[2,25]),t(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,s.K2)((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,i=[0],n=[],r=[null],o=[],a=this.table,h="",l=0,c=0,g=0,u=o.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;o.push(y);var E=d.options&&d.options.ranges;function _(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t}),"popStack"),(0,s.K2)(_,"lex");for(var m,v,N,A,L,T,O,D,I,w={};;){if(N=i[i.length-1],this.defaultActions[N]?A=this.defaultActions[N]:(null==m&&(m=_()),A=a[N]&&a[N][m]),void 0===A||!A.length||!A[0]){var R;for(T in I=[],a[N])this.terminals_[T]&&T>2&&I.push("'"+this.terminals_[T]+"'");R=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(R,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:y,expected:I})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+m);switch(A[0]){case 1:i.push(m),r.push(d.yytext),o.push(d.yylloc),i.push(A[1]),m=null,v?(m=v,v=null):(c=d.yyleng,h=d.yytext,l=d.yylineno,y=d.yylloc,g>0&&g--);break;case 2:if(O=this.productions_[A[1]][1],w.$=r[r.length-O],w._$={first_line:o[o.length-(O||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(O||1)].first_column,last_column:o[o.length-1].last_column},E&&(w._$.range=[o[o.length-(O||1)].range[0],o[o.length-1].range[1]]),void 0!==(L=this.performAction.apply(w,[h,c,l,p.yy,A[1],r,o].concat(u))))return L;O&&(i=i.slice(0,-1*O*2),r=r.slice(0,-1*O),o=o.slice(0,-1*O)),i.push(this.productions_[A[1]][0]),r.push(w.$),o.push(w._$),D=a[i[i.length-2]][i[i.length-1]],i.push(D);break;case 3:return!0}}return!0}),"parse")},m=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,i=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),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"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 i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(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],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var o in r)this[o]=r[o];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;oe[0].length)){if(e=i,n=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[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(){return this.next()||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,i,n){switch(i){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 v(){this.yy={}}return _.lexer=m,(0,s.K2)(v,"Parser"),v.prototype=_,_.Parser=v,new v}();d.parser=d;var p=d,f=[],y=0,E={},_=(0,s.K2)((()=>{f=[],y=0,E={}}),"clear"),m=(0,s.K2)((function(t){for(let e=f.length-1;e>=0;e--)if(f[e].levelf.length>0?f[0]:null),"getMindmap"),N=(0,s.K2)(((t,e,i,n)=>{s.Rm.info("addNode",t,e,i,n);const r=(0,s.D7)();let o=r.mindmap?.padding??s.UI.mindmap.padding;switch(n){case A.ROUNDED_RECT:case A.RECT:case A.HEXAGON:o*=2}const a={id:y++,nodeId:(0,s.jZ)(e,r),level:t,descr:(0,s.jZ)(i,r),type:n,children:[],width:r.mindmap?.maxNodeWidth??s.UI.mindmap.maxNodeWidth,padding:o},h=m(t);if(h)h.children.push(a),f.push(a);else{if(0!==f.length)throw new Error('There can be only one root. No parent could be found for ("'+a.descr+'")');f.push(a)}}),"addNode"),A={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},L={clear:_,addNode:N,getMindmap:v,nodeType:A,getType:(0,s.K2)(((t,e)=>{switch(s.Rm.debug("In get type",t,e),t){case"[":return A.RECT;case"(":return")"===e?A.ROUNDED_RECT:A.CLOUD;case"((":return A.CIRCLE;case")":return A.CLOUD;case"))":return A.BANG;case"{{":return A.HEXAGON;default:return A.DEFAULT}}),"getType"),setElementForId:(0,s.K2)(((t,e)=>{E[t]=e}),"setElementForId"),decorateNode:(0,s.K2)((t=>{if(!t)return;const e=(0,s.D7)(),i=f[f.length-1];t.icon&&(i.icon=(0,s.jZ)(t.icon,e)),t.class&&(i.class=(0,s.jZ)(t.class,e))}),"decorateNode"),type2Str:(0,s.K2)((t=>{switch(t){case A.DEFAULT:return"no-border";case A.RECT:return"rect";case A.ROUNDED_RECT:return"rounded-rect";case A.CIRCLE:return"circle";case A.CLOUD:return"cloud";case A.BANG:return"bang";case A.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),getLogger:(0,s.K2)((()=>s.Rm),"getLogger"),getElementById:(0,s.K2)((t=>E[t]),"getElementById")},T=(0,s.K2)((function(t,e,i,n){e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 ${i.height-5} v${10-i.height} q0,-5 5,-5 h${i.width-10} q5,0 5,5 v${i.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",i.height).attr("x2",i.width).attr("y2",i.height)}),"defaultBkg"),O=(0,s.K2)((function(t,e,i){e.append("rect").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("height",i.height).attr("width",i.width)}),"rectBkg"),D=(0,s.K2)((function(t,e,i){const n=i.width,r=i.height,o=.15*n,s=.25*n,a=.35*n,h=.2*n;e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 0 a${o},${o} 0 0,1 ${.25*n},${-1*n*.1}\n a${a},${a} 1 0,1 ${.4*n},${-1*n*.1}\n a${s},${s} 1 0,1 ${.35*n},${1*n*.2}\n\n a${o},${o} 1 0,1 ${.15*n},${1*r*.35}\n a${h},${h} 1 0,1 ${-1*n*.15},${1*r*.65}\n\n a${s},${o} 1 0,1 ${-1*n*.25},${.15*n}\n a${a},${a} 1 0,1 ${-1*n*.5},0\n a${o},${o} 1 0,1 ${-1*n*.25},${-1*n*.15}\n\n a${o},${o} 1 0,1 ${-1*n*.1},${-1*r*.35}\n a${h},${h} 1 0,1 ${.1*n},${-1*r*.65}\n\n H0 V0 Z`)}),"cloudBkg"),I=(0,s.K2)((function(t,e,i){const n=i.width,r=i.height,o=.15*n;e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 0 a${o},${o} 1 0,0 ${.25*n},${-1*r*.1}\n a${o},${o} 1 0,0 ${.25*n},0\n a${o},${o} 1 0,0 ${.25*n},0\n a${o},${o} 1 0,0 ${.25*n},${1*r*.1}\n\n a${o},${o} 1 0,0 ${.15*n},${1*r*.33}\n a${.8*o},${.8*o} 1 0,0 0,${1*r*.34}\n a${o},${o} 1 0,0 ${-1*n*.15},${1*r*.33}\n\n a${o},${o} 1 0,0 ${-1*n*.25},${.15*r}\n a${o},${o} 1 0,0 ${-1*n*.25},0\n a${o},${o} 1 0,0 ${-1*n*.25},0\n a${o},${o} 1 0,0 ${-1*n*.25},${-1*r*.15}\n\n a${o},${o} 1 0,0 ${-1*n*.1},${-1*r*.33}\n a${.8*o},${.8*o} 1 0,0 0,${-1*r*.34}\n a${o},${o} 1 0,0 ${.1*n},${-1*r*.33}\n\n H0 V0 Z`)}),"bangBkg"),w=(0,s.K2)((function(t,e,i){e.append("circle").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("r",i.width/2)}),"circleBkg");function R(t,e,i,n,r){return t.insert("polygon",":first-child").attr("points",n.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+(r.width-e)/2+", "+i+")")}(0,s.K2)(R,"insertPolygonShape");var C=(0,s.K2)((function(t,e,i){const n=i.height,r=n/4,o=i.width-i.padding+2*r;R(e,o,n,[{x:r,y:0},{x:o-r,y:0},{x:o,y:-n/2},{x:o-r,y:-n},{x:r,y:-n},{x:0,y:-n/2}],i)}),"hexagonBkg"),M=(0,s.K2)((function(t,e,i){e.append("rect").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("height",i.height).attr("rx",i.padding).attr("ry",i.padding).attr("width",i.width)}),"roundedRectBkg"),x=(0,s.K2)((async function(t,e,i,o,s){const a=s.htmlLabels,h=o%11,l=e.append("g");i.section=h;let c="section-"+h;h<0&&(c+=" section-root"),l.attr("class",(i.class?i.class+" ":"")+"mindmap-node "+c);const g=l.append("g"),u=l.append("g"),d=i.descr.replace(/()/g,"\n");await(0,n.GZ)(u,d,{useHtmlLabels:a,width:i.width,classes:"mindmap-node-label"},s),a||u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const p=u.node().getBBox(),[f]=(0,r.I5)(s.fontSize);if(i.height=p.height+1.1*f*.5+i.padding,i.width=p.width+2*i.padding,i.icon)if(i.type===t.nodeType.CIRCLE)i.height+=50,i.width+=50,l.append("foreignObject").attr("height","50px").attr("width",i.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+h+" "+i.icon),u.attr("transform","translate("+i.width/2+", "+(i.height/2-1.5*i.padding)+")");else{i.width+=50;const t=i.height;i.height=Math.max(t,60);const e=Math.abs(i.height-t);l.append("foreignObject").attr("width","60px").attr("height",i.height).attr("style","text-align: center;margin-top:"+e/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+h+" "+i.icon),u.attr("transform","translate("+(25+i.width/2)+", "+(e/2+i.padding/2)+")")}else if(a){const t=(i.width-p.width)/2,e=(i.height-p.height)/2;u.attr("transform","translate("+t+", "+e+")")}else{const t=i.width/2,e=i.padding/2;u.attr("transform","translate("+t+", "+e+")")}switch(i.type){case t.nodeType.DEFAULT:T(t,g,i,h);break;case t.nodeType.ROUNDED_RECT:M(t,g,i,h);break;case t.nodeType.RECT:O(t,g,i,h);break;case t.nodeType.CIRCLE:g.attr("transform","translate("+i.width/2+", "+ +i.height/2+")"),w(t,g,i,h);break;case t.nodeType.CLOUD:D(t,g,i,h);break;case t.nodeType.BANG:I(t,g,i,h);break;case t.nodeType.HEXAGON:C(t,g,i,h)}return t.setElementForId(i.id,l),i.height}),"drawNode"),G=(0,s.K2)((function(t,e){const i=t.getElementById(e.id),n=e.x||0,r=e.y||0;i.attr("transform","translate("+n+","+r+")")}),"positionNode");async function S(t,e,i,n,r){await x(t,e,i,n,r),i.children&&await Promise.all(i.children.map(((i,o)=>S(t,e,i,n<0?o:n,r))))}function b(t,e){e.edges().map(((e,i)=>{const n=e.data();if(e[0]._private.bodyBounds){const r=e[0]._private.rscratch;s.Rm.trace("Edge: ",i,n),t.insert("path").attr("d",`M ${r.startX},${r.startY} L ${r.midX},${r.midY} L${r.endX},${r.endY} `).attr("class","edge section-edge-"+n.section+" edge-depth-"+n.depth)}}))}function F(t,e,i,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach((r=>{F(r,e,i,n+1),e.add({group:"edges",data:{id:`${t.id}_${r.id}`,source:t.id,target:r.id,depth:n,section:r.section}})}))}function P(t,e){return new Promise((i=>{const n=(0,l.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),r=(0,a.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),F(t,r,e,0),r.nodes().forEach((function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}})),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready((t=>{s.Rm.info("Ready",t),i(r)}))}))}function U(t,e){e.nodes().map(((e,i)=>{const n=e.data();n.x=e.position().x,n.y=e.position().y,G(t,n);const r=t.getElementById(n.nodeId);s.Rm.info("Id:",i,"Position: (",e.position().x,", ",e.position().y,")",n),r.attr("transform",`translate(${e.position().x-n.width/2}, ${e.position().y-n.height/2})`),r.attr("attr",`apa-${i})`)}))}a.A.use(h),(0,s.K2)(S,"drawNodes"),(0,s.K2)(b,"drawEdges"),(0,s.K2)(F,"addNodes"),(0,s.K2)(P,"layoutMindmap"),(0,s.K2)(U,"positionNodes");var k={draw:(0,s.K2)((async(t,e,i,n)=>{s.Rm.debug("Rendering mindmap diagram\n"+t);const r=n.db,a=r.getMindmap();if(!a)return;const h=(0,s.D7)();h.htmlLabels=!1;const l=(0,o.D)(e),c=l.append("g");c.attr("class","mindmap-edges");const g=l.append("g");g.attr("class","mindmap-nodes"),await S(r,g,a,-1,h);const u=await P(a,h);b(c,u),U(r,u),(0,s.ot)(void 0,l,h.mindmap?.padding??s.UI.mindmap.padding,h.mindmap?.useMaxWidth??s.UI.mindmap.useMaxWidth)}),"draw")},Y=(0,s.K2)((t=>{let e="";for(let e=0;e`\n .edge {\n stroke-width: 3;\n }\n ${Y(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 .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")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/387-3546ecdc.chunk.min.js b/docs/hugo/public/js/387-3546ecdc.chunk.min.js new file mode 100644 index 000000000..75d1a6008 --- /dev/null +++ b/docs/hugo/public/js/387-3546ecdc.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[387],{2387:(e,c,k)=>{k.d(c,{createGitGraphServices:()=>s.b});var s=k(2785);k(9369)}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/391-549a9d24.chunk.min.js b/docs/hugo/public/js/391-549a9d24.chunk.min.js new file mode 100644 index 000000000..f2cac2c87 --- /dev/null +++ b/docs/hugo/public/js/391-549a9d24.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[391],{391:(e,r,s)=>{s.d(r,{diagram:()=>l});var a=s(6240),c=(s(6474),s(7308),s(7938),s(1282),s(1099),s(7588),s(3115),s(6058),s(8159),s(9502)),l={parser:a._$,db:a.z2,renderer:a.Lh,styles:a.tM,init:(0,c.K2)((e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,a.z2.clear()}),"init")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/410-3bccc12d.chunk.min.js b/docs/hugo/public/js/410-3bccc12d.chunk.min.js new file mode 100644 index 000000000..3c6c8dc20 --- /dev/null +++ b/docs/hugo/public/js/410-3bccc12d.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[410],{1471:(t,e,r)=>{r.d(e,{T:()=>f});var s=r(9142),a=r(9610),i=r(5041),n=r(4092),o=r(6401),l=r(8058),c=r(9592),d=r(7671),h=r(4326),g=r(7371),u=r(3533);const p=(0,h.A)((function(t){return(0,g.A)((0,d.A)(t,1,u.A,!0))}));var y=r(2866),b=r(3130),x="\0";class f{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=s.A(void 0),this._defaultEdgeLabelFn=s.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[x]={}),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 a.A(t)||(t=s.A(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return i.A(this._nodes)}sources(){var t=this;return n.A(this.nodes(),(function(e){return o.A(t._in[e])}))}sinks(){var t=this;return n.A(this.nodes(),(function(e){return o.A(t._out[e])}))}setNodes(t,e){var r=arguments,s=this;return l.A(t,(function(t){r.length>1?s.setNode(t,e):s.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]=x,this._children[t]={},this._children[x][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(i.A(this._in[t]),e),delete this._in[t],delete this._preds[t],l.A(i.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=x;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!==x)return e}}children(t){if(c.A(t)&&(t=x),this._isCompound){var e=this._children[t];if(e)return i.A(e)}else{if(t===x)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return i.A(e)}successors(t){var e=this._sucs[t];if(e)return i.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return p(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,s){t(s)&&e.setNode(s,r)})),l.A(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))}));var s={};function a(t){var i=r.parent(t);return void 0===i||e.hasNode(i)?(s[t]=i,i):i in s?s[i]:a(i)}return this._isCompound&&l.A(e.nodes(),(function(t){e.setParent(t,a(t))})),e}setDefaultEdgeLabel(t){return a.A(t)||(t=s.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return y.A(this._edgeObjs)}setPath(t,e){var r=this,s=arguments;return b.A(t,(function(t,a){return s.length>1?r.setEdge(t,a,e):r.setEdge(t,a),a})),this}setEdge(){var t,e,r,s,a=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(t=i.v,e=i.w,r=i.name,2===arguments.length&&(s=arguments[1],a=!0)):(t=i,e=arguments[1],r=arguments[3],arguments.length>2&&(s=arguments[2],a=!0)),t=""+t,e=""+e,c.A(r)||(r=""+r);var n=_(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return a&&(this._edgeLabels[n]=s),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[n]=a?s:this._defaultEdgeLabelFn(t,e,r);var o=function(t,e,r,s){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}var o={v:a,w:i};return s&&(o.name=s),o}(this._isDirected,t,e,r);return t=o.v,e=o.w,Object.freeze(o),this._edgeObjs[n]=o,m(this._preds[e],t),m(this._sucs[t],e),this._in[e][n]=o,this._out[t][n]=o,this._edgeCount++,this}edge(t,e,r){var s=1===arguments.length?L(this._isDirected,arguments[0]):_(this._isDirected,t,e,r);return this._edgeLabels[s]}hasEdge(t,e,r){var s=1===arguments.length?L(this._isDirected,arguments[0]):_(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,e,r){var s=1===arguments.length?L(this._isDirected,arguments[0]):_(this._isDirected,t,e,r),a=this._edgeObjs[s];return a&&(t=a.v,e=a.w,delete this._edgeLabels[s],delete this._edgeObjs[s],w(this._preds[e],t),w(this._sucs[t],e),delete this._in[e][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,e){var r=this._in[t];if(r){var s=y.A(r);return e?n.A(s,(function(t){return t.v===e})):s}}outEdges(t,e){var r=this._out[t];if(r){var s=y.A(r);return e?n.A(s,(function(t){return t.w===e})):s}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}function m(t,e){t[e]?t[e]++:t[e]=1}function w(t,e){--t[e]||delete t[e]}function _(t,e,r,s){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}return a+""+i+""+(c.A(s)?"\0":s)}function L(t,e){return _(t,e.v,e.w,e.name)}f.prototype._nodeCount=0,f.prototype._edgeCount=0},697:(t,e,r)=>{r.d(e,{T:()=>s.T});var s=r(1471)},5937:(t,e,r)=>{r.d(e,{A:()=>i});var s=r(6309),a=r(1931);const i=(t,e)=>s.A.lang.round(a.A.parse(t)[e])},53:(t,e,r)=>{r.d(e,{A:()=>a});var s=r(4507);const a=function(t){return(0,s.A)(t,4)}},172:(t,e,r)=>{r.d(e,{diagram:()=>fe});var s=r(7588),a=r(3115),i=r(6058),n=r(8159),o=r(9502),l=r(53),c=r(5937),d=r(5582),h=r(4852),g=r(697),u=function(){var t=(0,o.K2)((function(t,e,r,s){for(r=r||{},s=t.length;s--;r[t[s]]=e);return r}),"o"),e=[1,7],r=[1,13],s=[1,14],a=[1,15],i=[1,19],n=[1,16],l=[1,17],c=[1,18],d=[8,30],h=[8,21,28,29,30,31,32,40,44,47],g=[1,23],u=[1,24],p=[8,15,16,21,28,29,30,31,32,40,44,47],y=[8,15,16,21,27,28,29,30,31,32,40,44,47],b=[1,49],x={trace:(0,o.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,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList: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:49,$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:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"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],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,o.K2)((function(t,e,r,s,a,i,n){var o=i.length-1;switch(a){case 4:s.getLogger().debug("Rule: separator (NL) ");break;case 5:s.getLogger().debug("Rule: separator (Space) ");break;case 6:s.getLogger().debug("Rule: separator (EOF) ");break;case 7:s.getLogger().debug("Rule: hierarchy: ",i[o-1]),s.setHierarchy(i[o-1]);break;case 8:s.getLogger().debug("Stop NL ");break;case 9:s.getLogger().debug("Stop EOF ");break;case 10:s.getLogger().debug("Stop NL2 ");break;case 11:s.getLogger().debug("Stop EOF2 ");break;case 12:s.getLogger().debug("Rule: statement: ",i[o]),"number"==typeof i[o].length?this.$=i[o]:this.$=[i[o]];break;case 13:s.getLogger().debug("Rule: statement #2: ",i[o-1]),this.$=[i[o-1]].concat(i[o]);break;case 14:s.getLogger().debug("Rule: link: ",i[o],t),this.$={edgeTypeStr:i[o],label:""};break;case 15:s.getLogger().debug("Rule: LABEL link: ",i[o-3],i[o-1],i[o]),this.$={edgeTypeStr:i[o],label:i[o-1]};break;case 18:const e=parseInt(i[o]),r=s.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:s.getLogger().debug("Rule: (nodeStatement link node) ",i[o-2],i[o-1],i[o]," typestr: ",i[o-1].edgeTypeStr);const a=s.edgeStrToEdgeData(i[o-1].edgeTypeStr);this.$=[{id:i[o-2].id,label:i[o-2].label,type:i[o-2].type,directions:i[o-2].directions},{id:i[o-2].id+"-"+i[o].id,start:i[o-2].id,end:i[o].id,label:i[o-1].label,type:"edge",directions:i[o].directions,arrowTypeEnd:a,arrowTypeStart:"arrow_open"},{id:i[o].id,label:i[o].label,type:s.typeStr2Type(i[o].typeStr),directions:i[o].directions}];break;case 24:s.getLogger().debug("Rule: nodeStatement (abc88 node size) ",i[o-1],i[o]),this.$={id:i[o-1].id,label:i[o-1].label,type:s.typeStr2Type(i[o-1].typeStr),directions:i[o-1].directions,widthInColumns:parseInt(i[o],10)};break;case 25:s.getLogger().debug("Rule: nodeStatement (node) ",i[o]),this.$={id:i[o].id,label:i[o].label,type:s.typeStr2Type(i[o].typeStr),directions:i[o].directions,widthInColumns:1};break;case 26:s.getLogger().debug("APA123",this?this:"na"),s.getLogger().debug("COLUMNS: ",i[o]),this.$={type:"column-setting",columns:"auto"===i[o]?-1:parseInt(i[o])};break;case 27:s.getLogger().debug("Rule: id-block statement : ",i[o-2],i[o-1]),s.generateId(),this.$={...i[o-2],type:"composite",children:i[o-1]};break;case 28:s.getLogger().debug("Rule: blockStatement : ",i[o-2],i[o-1],i[o]);const n=s.generateId();this.$={id:n,type:"composite",label:"",children:i[o-1]};break;case 29:s.getLogger().debug("Rule: node (NODE_ID separator): ",i[o]),this.$={id:i[o]};break;case 30:s.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",i[o-1],i[o]),this.$={id:i[o-1],label:i[o].label,typeStr:i[o].typeStr,directions:i[o].directions};break;case 31:s.getLogger().debug("Rule: dirList: ",i[o]),this.$=[i[o]];break;case 32:s.getLogger().debug("Rule: dirList: ",i[o-1],i[o]),this.$=[i[o-1]].concat(i[o]);break;case 33:s.getLogger().debug("Rule: nodeShapeNLabel: ",i[o-2],i[o-1],i[o]),this.$={typeStr:i[o-2]+i[o],label:i[o-1]};break;case 34:s.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",i[o-3],i[o-2]," #3:",i[o-1],i[o]),this.$={typeStr:i[o-3]+i[o],label:i[o-2],directions:i[o-1]};break;case 35:case 36:this.$={type:"classDef",id:i[o-1].trim(),css:i[o].trim()};break;case 37:this.$={type:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:this.$={type:"applyStyles",id:i[o-1].trim(),stylesStr:i[o].trim()}}}),"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:s,31:a,32:i,40:n,44:l,47:c},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:e,28:r,29:s,31:a,32:i,40:n,44:l,47:c}),t(h,[2,16],{14:22,15:g,16:u}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(p,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,32:i},{11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:s,31:a,32:i,40:n,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(y,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,32:i},{32:[2,14]},{17:[1,36]},t(p,[2,24]),{11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:s,31:a,32:i,40:n,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},t(y,[2,30]),{18:[1,43]},{18:[1,44]},t(p,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{37:[1,47]},{34:48,35:b},{15:[1,50]},t(h,[2,27]),t(y,[2,33]),{39:[1,51]},{34:52,35:b,39:[2,31]},{32:[2,15]},t(y,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},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],s=[],a=[null],i=[],n=this.table,l="",c=0,d=0,h=0,g=i.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var b=u.yylloc;i.push(b);var x=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=s.pop()||u.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)((function(t){r.length=r.length-2*t,a.length=a.length-t,i.length=i.length-t}),"popStack"),(0,o.K2)(f,"lex");for(var m,w,_,L,k,S,v,E,D,C={};;){if(_=r[r.length-1],this.defaultActions[_]?L=this.defaultActions[_]:(null==m&&(m=f()),L=n[_]&&n[_][m]),void 0===L||!L.length||!L[0]){var R;for(S in D=[],n[_])this.terminals_[S]&&S>2&&D.push("'"+this.terminals_[S]+"'");R=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(R,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:b,expected:D})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+m);switch(L[0]){case 1:r.push(m),a.push(u.yytext),i.push(u.yylloc),r.push(L[1]),m=null,w?(m=w,w=null):(d=u.yyleng,l=u.yytext,c=u.yylineno,b=u.yylloc,h>0&&h--);break;case 2:if(v=this.productions_[L[1]][1],C.$=a[a.length-v],C._$={first_line:i[i.length-(v||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(v||1)].first_column,last_column:i[i.length-1].last_column},x&&(C._$.range=[i[i.length-(v||1)].range[0],i[i.length-1].range[1]]),void 0!==(k=this.performAction.apply(C,[l,d,c,p.yy,L[1],a,i].concat(g))))return k;v&&(r=r.slice(0,-1*v*2),a=a.slice(0,-1*v),i=i.slice(0,-1*v)),r.push(this.productions_[L[1]][0]),a.push(C.$),i.push(C._$),E=n[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}),"parse")},f=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 s=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 a=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===s.length?this.yylloc.first_column:0)+s[s.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[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,s,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var i in a)this[i]=a[i];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var t,e,r,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),i=0;ie[0].length)){if(e=r,s=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[s]))&&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(){return this.next()||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:{},performAction:(0,o.K2)((function(t,e,r,s){switch(r){case 0:return 10;case 1:return t.getLogger().debug("Found space-block"),31;case 2:return t.getLogger().debug("Found nl-block"),31;case 3:return t.getLogger().debug("Found space-block"),29;case 4:t.getLogger().debug(".",e.yytext);break;case 5:t.getLogger().debug("_",e.yytext);break;case 6:return 5;case 7:return e.yytext=-1,28;case 8:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 14:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 15:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 16:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 49: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 this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),38;case 75:return t.getLogger().debug("Lex: NODE_ID",e.yytext),32;case 76:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 79:return"NODE_DESCR";case 81:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 84:t.getLogger().debug("LEX POPPING"),this.popState();break;case 85:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 91:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 92:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 94:case 95:case 96:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 97:case 98:case 99:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 101:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 103:case 104:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 105:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}}),"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\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:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}}}();function m(){this.yy={}}return x.lexer=f,(0,o.K2)(m,"Parser"),m.prototype=x,x.Parser=m,new m}();u.parser=u;var p=u,y=new Map,b=[],x=new Map,f="color",m="fill",w=(0,o.D7)(),_=new Map,L=(0,o.K2)((t=>o.Y2.sanitizeText(t,w)),"sanitizeText"),k=(0,o.K2)((function(t,e=""){let r=_.get(t);r||(r={id:t,styles:[],textStyles:[]},_.set(t,r)),null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(f).exec(t)){const t=e.replace(m,"bgFill").replace(f,m);r.textStyles.push(t)}r.styles.push(e)}))}),"addStyleClass"),S=(0,o.K2)((function(t,e=""){const r=y.get(t);null!=e&&(r.styles=e.split(","))}),"addStyle2Node"),v=(0,o.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"),E=(0,o.K2)(((t,e)=>{const r=t.flat(),s=[];for(const t of r)if(t.label&&(t.label=L(t.label)),"classDef"!==t.type)if("applyClass"!==t.type)if("applyStyles"!==t.type)if("column-setting"===t.type)e.columns=t.columns??-1;else if("edge"===t.type){const e=(x.get(t.id)??0)+1;x.set(t.id,e),t.id=e+"-"+t.id,b.push(t)}else{t.label||("composite"===t.type?t.label="":t.label=t.id);const e=y.get(t.id);if(void 0===e?y.set(t.id,t):("na"!==t.type&&(e.type=t.type),t.label!==t.id&&(e.label=t.label)),t.children&&E(t.children,t),"space"===t.type){const e=t.width??1;for(let r=0;r{o.Rm.debug("Clear called"),(0,o.IU)(),C={id:"root",type:"composite",children:[],columns:-1},y=new Map([["root",C]]),D=[],_=new Map,b=[],x=new Map}),"clear");function K(t){switch(o.Rm.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return o.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 N(t){return o.Rm.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function T(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}(0,o.K2)(K,"typeStr2Type"),(0,o.K2)(N,"edgeTypeStr2Type"),(0,o.K2)(T,"edgeStrToEdgeData");var $=0,A=(0,o.K2)((()=>($++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$)),"generateId"),I=(0,o.K2)((t=>{C.children=t,E(t,C),D=C.children}),"setHierarchy"),O=(0,o.K2)((t=>{const e=y.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1}),"getColumns"),B=(0,o.K2)((()=>[...y.values()]),"getBlocksFlat"),z=(0,o.K2)((()=>D||[]),"getBlocks"),M=(0,o.K2)((()=>b),"getEdges"),P=(0,o.K2)((t=>y.get(t)),"getBlock"),Y=(0,o.K2)((t=>{y.set(t.id,t)}),"setBlock"),F=(0,o.K2)((()=>console),"getLogger"),j=(0,o.K2)((function(){return _}),"getClasses"),W={getConfig:(0,o.K2)((()=>(0,o.zj)().block),"getConfig"),typeStr2Type:K,edgeTypeStr2Type:N,edgeStrToEdgeData:T,getLogger:F,getBlocksFlat:B,getBlocks:z,getEdges:M,setHierarchy:I,getBlock:P,setBlock:Y,getColumns:O,getClasses:j,clear:R,generateId:A},X=(0,o.K2)(((t,e)=>{const r=c.A,s=r(t,"r"),a=r(t,"g"),i=r(t,"b");return d.A(s,a,i,e)}),"fade"),H=(0,o.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: ${X(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${X(t.mainBkg,.5)};\n fill: ${X(t.clusterBkg,.5)};\n stroke: ${X(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`),"getStyles"),U=(0,o.K2)(((t,e,r,s)=>{e.forEach((e=>{Z[e](t,r,s)}))}),"insertMarkers"),Z={extension:(0,o.K2)(((t,e,r)=>{o.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,o.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,o.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,o.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,o.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,o.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,o.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,o.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,o.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")},q=U,G=(0,o.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);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}(0,o.K2)(J,"calculateBlockPosition");var V=(0,o.K2)((t=>{let e=0,r=0;for(const s of t.children){const{width:a,height:i,x:n,y:l}=s.size??{width:0,height:0,x:0,y:0};o.Rm.debug("getMaxChildSize abc95 child:",s.id,"width:",a,"height:",i,"x:",n,"y:",l,s.type),"space"!==s.type&&(a>e&&(e=a/(t.widthInColumns??1)),i>r&&(r=i))}return{width:e,height:r}}),"getMaxChildSize");function Q(t,e,r=0,s=0){o.Rm.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"sieblingWidth",r),t?.size?.width||(t.size={width:r,height:s,x:0,y:0});let a=0,i=0;if(t.children?.length>0){for(const r of t.children)Q(r,e);const n=V(t);a=n.width,i=n.height,o.Rm.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",a,i);for(const e of t.children)e.size&&(o.Rm.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${a} ${i} ${JSON.stringify(e.size)}`),e.size.width=a*(e.widthInColumns??1)+G*((e.widthInColumns??1)-1),e.size.height=i,e.size.x=0,e.size.y=0,o.Rm.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${a} maxHeight:${i}`));for(const r of t.children)Q(r,e,a,i);const l=t.columns??-1;let c=0;for(const e of t.children)c+=e.widthInColumns??1;let d=t.children.length;l>0&&l0?Math.min(t.children.length,l):t.children.length;if(e>0){const r=(g-e*G-G)/e;o.Rm.debug("abc95 (growing to fit) width",t.id,g,t.size?.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:g,height:u,x:0,y:0}}o.Rm.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function tt(t,e){o.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(o.Rm.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){const s=t?.children[0]?.size?.width??0,a=t.children.length*s+(t.children.length-1)*G;o.Rm.debug("widthOfChildren 88",a,"posX");let i=0;o.Rm.debug("abc91 block?.size?.x",t.id,t?.size?.x);let n=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-G,l=0;for(const s of t.children){const a=t;if(!s.size)continue;const{width:c,height:d}=s.size,{px:h,py:g}=J(r,i);if(g!=l&&(l=g,n=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-G,o.Rm.debug("New row in layout for block",t.id," and child ",s.id,l)),o.Rm.debug(`abc89 layout blocks (child) id: ${s.id} Pos: ${i} (px, py) ${h},${g} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${c}${G}`),a.size){const t=c/2;s.size.x=n+G+t,o.Rm.debug(`abc91 layout blocks (calc) px, pyid:${s.id} startingPos=X${n} new startingPosX${s.size.x} ${t} padding=${G} width=${c} halfWidth=${t} => x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 ${c*(s?.widthInColumns??1)/2}`),n=s.size.x+t,s.size.y=a.size.y-a.size.height/2+g*(d+G)+d/2+G,o.Rm.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${n}${G}${t}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2${c*(s?.widthInColumns??1)/2}`)}s.children&&tt(s,e),i+=s?.widthInColumns??1,o.Rm.debug("abc88 columnsPos",s,i)}}o.Rm.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function et(t,{minX:e,minY:r,maxX:s,maxY:a}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:i,y:n,width:o,height:l}=t.size;i-o/2s&&(s=i+o/2),n+l/2>a&&(a=n+l/2)}if(t.children)for(const i of t.children)({minX:e,minY:r,maxX:s,maxY:a}=et(i,{minX:e,minY:r,maxX:s,maxY:a}));return{minX:e,minY:r,maxX:s,maxY:a}}function rt(t){const e=t.getBlock("root");if(!e)return;Q(e,t,0,0),tt(e,t),o.Rm.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:s,maxX:a,maxY:i}=et(e);return{x:r,y:s,width:a-r,height:i-s}}function st(t,e){e&&t.attr("style",e)}function at(t){const e=(0,h.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),s=t.label,a=t.isNode?"nodeLabel":"edgeLabel",i=r.append("span");return i.html(s),st(i,t.labelStyle),i.attr("class",a),st(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,o.K2)(Q,"setBlockSizes"),(0,o.K2)(tt,"layoutBlocks"),(0,o.K2)(et,"findBounds"),(0,o.K2)(rt,"layout"),(0,o.K2)(st,"applyStyle"),(0,o.K2)(at,"addHtmlLabel");var it=(0,o.K2)(((t,e,r,s)=>{let a=t||"";if("object"==typeof a&&(a=a[0]),(0,o._3)((0,o.D7)().flowchart.htmlLabels))return a=a.replace(/\\n|\n/g,"
"),o.Rm.debug("vertexText"+a),at({isNode:s,label:(0,i.hE)((0,n.Sm)(a)),labelStyle:e.replace("fill:","color:")});{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let s=[];s="string"==typeof a?a.split(/\\n|\n|/gi):Array.isArray(a)?a:[];for(const e of s){const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),r?s.setAttribute("class","title-row"):s.setAttribute("class","row"),s.textContent=e.trim(),t.appendChild(s)}return t}}),"createLabel"),nt=(0,o.K2)(((t,e,r,s,a)=>{e.arrowTypeStart&<(t,"start",e.arrowTypeStart,r,s,a),e.arrowTypeEnd&<(t,"end",e.arrowTypeEnd,r,s,a)}),"addEdgeMarkers"),ot={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},lt=(0,o.K2)(((t,e,r,s,a,i)=>{const n=ot[r];if(!n)return void o.Rm.warn(`Unknown arrow type: ${r}`);const l="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${s}#${a}_${i}-${n}${l})`)}),"addEdgeMarker"),ct={},dt={},ht=(0,o.K2)(((t,e)=>{const r=(0,o.D7)(),s=(0,o._3)(r.flowchart.htmlLabels),a="markdown"===e.labelType?(0,i.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:s,addSvgBackground:!0},r):it(e.label,e.labelStyle),n=t.insert("g").attr("class","edgeLabel"),l=n.insert("g").attr("class","label");l.node().appendChild(a);let c,d=a.getBBox();if(s){const t=a.children[0],e=(0,h.Ltv)(a);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}if(l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ct[e.id]=n,e.width=d.width,e.height=d.height,e.startLabelLeft){const r=it(e.startLabelLeft,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),a=s.insert("g").attr("class","inner");c=a.node().appendChild(r);const i=r.getBBox();a.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),dt[e.id]||(dt[e.id]={}),dt[e.id].startLeft=s,gt(c,e.startLabelLeft)}if(e.startLabelRight){const r=it(e.startLabelRight,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),a=s.insert("g").attr("class","inner");c=s.node().appendChild(r),a.node().appendChild(r);const i=r.getBBox();a.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),dt[e.id]||(dt[e.id]={}),dt[e.id].startRight=s,gt(c,e.startLabelRight)}if(e.endLabelLeft){const r=it(e.endLabelLeft,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),a=s.insert("g").attr("class","inner");c=a.node().appendChild(r);const i=r.getBBox();a.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),s.node().appendChild(r),dt[e.id]||(dt[e.id]={}),dt[e.id].endLeft=s,gt(c,e.endLabelLeft)}if(e.endLabelRight){const r=it(e.endLabelRight,e.labelStyle),s=t.insert("g").attr("class","edgeTerminals"),a=s.insert("g").attr("class","inner");c=a.node().appendChild(r);const i=r.getBBox();a.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),s.node().appendChild(r),dt[e.id]||(dt[e.id]={}),dt[e.id].endRight=s,gt(c,e.endLabelRight)}return a}),"insertEdgeLabel");function gt(t,e){(0,o.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,o.K2)(gt,"setTerminalWidth");var ut=(0,o.K2)(((t,e)=>{o.Rm.debug("Moving label abc88 ",t.id,t.label,ct[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const s=(0,o.D7)(),{subGraphTitleTotalMargin:i}=(0,a.O)(s);if(t.label){const s=ct[t.id];let a=t.x,l=t.y;if(r){const s=n._K.calcLabelPosition(r);o.Rm.debug("Moving label "+t.label+" from (",a,",",l,") to (",s.x,",",s.y,") abc88"),e.updatedPath&&(a=s.x,l=s.y)}s.attr("transform",`translate(${a}, ${l+i/2})`)}if(t.startLabelLeft){const e=dt[t.id].startLeft;let s=t.x,a=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=e.x,a=e.y}e.attr("transform",`translate(${s}, ${a})`)}if(t.startLabelRight){const e=dt[t.id].startRight;let s=t.x,a=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=e.x,a=e.y}e.attr("transform",`translate(${s}, ${a})`)}if(t.endLabelLeft){const e=dt[t.id].endLeft;let s=t.x,a=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=e.x,a=e.y}e.attr("transform",`translate(${s}, ${a})`)}if(t.endLabelRight){const e=dt[t.id].endRight;let s=t.x,a=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=e.x,a=e.y}e.attr("transform",`translate(${s}, ${a})`)}}),"positionEdgeLabel"),pt=(0,o.K2)(((t,e)=>{const r=t.x,s=t.y,a=Math.abs(e.x-r),i=Math.abs(e.y-s),n=t.width/2,o=t.height/2;return a>=n||i>=o}),"outsideNode"),yt=(0,o.K2)(((t,e,r)=>{o.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 s=t.x,a=t.y,i=Math.abs(s-r.x),n=t.width/2;let l=r.xMath.abs(s-e.x)*c){let t=r.y{o.Rm.debug("abc88 cutPathAtIntersect",t,e);let r=[],s=t[0],a=!1;return t.forEach((t=>{if(pt(e,t)||a)s=t,a||r.push(t);else{const i=yt(e,s,t);let n=!1;r.forEach((t=>{n=n||t.x===i.x&&t.y===i.y})),r.some((t=>t.x===i.x&&t.y===i.y))||r.push(i),a=!0}})),r}),"cutPathAtIntersect"),xt=(0,o.K2)((function(t,e,r,a,i,n,l){let c=r.points;o.Rm.debug("abc88 InsertEdge: edge=",r,"e=",e);let d=!1;const g=n.node(e.v);var u=n.node(e.w);u?.intersect&&g?.intersect&&(c=c.slice(1,r.points.length-1),c.unshift(g.intersect(c[0])),c.push(u.intersect(c[c.length-1]))),r.toCluster&&(o.Rm.debug("to cluster abc88",a[r.toCluster]),c=bt(r.points,a[r.toCluster].node),d=!0),r.fromCluster&&(o.Rm.debug("from cluster abc88",a[r.fromCluster]),c=bt(c.reverse(),a[r.fromCluster].node).reverse(),d=!0);const p=c.filter((t=>!Number.isNaN(t.y)));let y=h.qrM;!r.curve||"graph"!==i&&"flowchart"!==i||(y=r.curve);const{x:b,y:x}=(0,s.R)(r),f=(0,h.n8j)().x(b).y(x).curve(y);let m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}const w=t.append("path").attr("d",f(p)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style);let _="";((0,o.D7)().flowchart.arrowMarkerAbsolute||(0,o.D7)().state.arrowMarkerAbsolute)&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),nt(w,r,_,l,i);let L={};return d&&(L.updatedPath=c),L.originalPath=r.points,L}),"insertEdge"),ft=(0,o.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"),mt=(0,o.K2)(((t,e,r)=>{const s=ft(t),a=e.height+2*r.padding,i=a/2,n=e.width+2*i+r.padding,o=r.padding/2;return s.has("right")&&s.has("left")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:i,y:0},{x:n/2,y:2*o},{x:n-i,y:0},{x:n,y:0},{x:n,y:-a/3},{x:n+2*o,y:-a/2},{x:n,y:-2*a/3},{x:n,y:-a},{x:n-i,y:-a},{x:n/2,y:-a-2*o},{x:i,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*o,y:-a/2},{x:0,y:-a/3}]:s.has("right")&&s.has("left")&&s.has("up")?[{x:i,y:0},{x:n-i,y:0},{x:n,y:-a/2},{x:n-i,y:-a},{x:i,y:-a},{x:0,y:-a/2}]:s.has("right")&&s.has("left")&&s.has("down")?[{x:0,y:0},{x:i,y:-a},{x:n-i,y:-a},{x:n,y:0}]:s.has("right")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:n,y:-i},{x:n,y:-a+i},{x:0,y:-a}]:s.has("left")&&s.has("up")&&s.has("down")?[{x:n,y:0},{x:0,y:-i},{x:0,y:-a+i},{x:n,y:-a}]:s.has("right")&&s.has("left")?[{x:i,y:0},{x:i,y:-o},{x:n-i,y:-o},{x:n-i,y:0},{x:n,y:-a/2},{x:n-i,y:-a},{x:n-i,y:-a+o},{x:i,y:-a+o},{x:i,y:-a},{x:0,y:-a/2}]:s.has("up")&&s.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-a+o},{x:0,y:-a+o},{x:n/2,y:-a},{x:n,y:-a+o},{x:n-i,y:-a+o},{x:n-i,y:-o},{x:n,y:-o}]:s.has("right")&&s.has("up")?[{x:0,y:0},{x:n,y:-i},{x:0,y:-a}]:s.has("right")&&s.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-a}]:s.has("left")&&s.has("up")?[{x:n,y:0},{x:0,y:-i},{x:n,y:-a}]:s.has("left")&&s.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-a}]:s.has("right")?[{x:i,y:-o},{x:i,y:-o},{x:n-i,y:-o},{x:n-i,y:0},{x:n,y:-a/2},{x:n-i,y:-a},{x:n-i,y:-a+o},{x:i,y:-a+o},{x:i,y:-a+o}]:s.has("left")?[{x:i,y:0},{x:i,y:-o},{x:n-i,y:-o},{x:n-i,y:-a+o},{x:i,y:-a+o},{x:i,y:-a},{x:0,y:-a/2}]:s.has("up")?[{x:i,y:-o},{x:i,y:-a+o},{x:0,y:-a+o},{x:n/2,y:-a},{x:n,y:-a+o},{x:n-i,y:-a+o},{x:n-i,y:-o}]:s.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-a+o},{x:n-i,y:-a+o},{x:n-i,y:-o},{x:n,y:-o}]:[{x:0,y:0}]}),"getArrowPoints");function wt(t,e){return t.intersect(e)}(0,o.K2)(wt,"intersectNode");var _t=wt;function Lt(t,e,r,s){var a=t.x,i=t.y,n=a-s.x,o=i-s.y,l=Math.sqrt(e*e*o*o+r*r*n*n),c=Math.abs(e*r*n/l);s.x0}(0,o.K2)(Et,"intersectLine"),(0,o.K2)(Dt,"sameSign");var Ct=Et,Rt=Kt;function Kt(t,e,r){var s=t.x,a=t.y,i=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){n=Math.min(n,t.x),o=Math.min(o,t.y)})):(n=Math.min(n,e.x),o=Math.min(o,e.y));for(var l=s-t.width/2-n,c=a-t.height/2-o,d=0;d1&&i.sort((function(t,e){var s=t.x-r.x,a=t.y-r.y,i=Math.sqrt(s*s+a*a),n=e.x-r.x,o=e.y-r.y,l=Math.sqrt(n*n+o*o);return i{var r,s,a=t.x,i=t.y,n=e.x-a,o=e.y-i,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(n)*c?(o<0&&(c=-c),r=0===o?0:c*n/o,s=c):(n<0&&(l=-l),r=l,s=0===n?0:l*o/n),{x:a+r,y:i+s}}),"intersectRect")},Tt=(0,o.K2)((async(t,e,r,s)=>{const a=(0,o.D7)();let l;const c=e.useHtmlLabels||(0,o._3)(a.flowchart.htmlLabels);l=r||"node default";const d=t.insert("g").attr("class",l).attr("id",e.domId||e.id),g=d.insert("g").attr("class","label").attr("style",e.labelStyle);let u;u=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const p=g.node();let y;y="markdown"===e.labelType?(0,i.GZ)(g,(0,o.jZ)((0,n.Sm)(u),a),{useHtmlLabels:c,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):p.appendChild(it((0,o.jZ)((0,n.Sm)(u),a),e.labelStyle,!1,s));let b=y.getBBox();const x=e.padding/2;if((0,o._3)(a.flowchart.htmlLabels)){const t=y.children[0],e=(0,h.Ltv)(y),r=t.getElementsByTagName("img");if(r){const t=""===u.replace(/]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function s(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=a.fontSize?a.fontSize:window.getComputedStyle(document.body).fontSize,r=5,s=parseInt(t,10)*r+"px";e.style.minWidth=s,e.style.maxWidth=s}else e.style.width="100%";r(e)}(0,o.K2)(s,"setupImage"),setTimeout((()=>{e.complete&&s()})),e.addEventListener("error",s),e.addEventListener("load",s)})))))}b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}return c?g.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):g.attr("transform","translate(0, "+-b.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:d,bbox:b,halfPadding:x,label:g}}),"labelHelper"),$t=(0,o.K2)(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds");function At(t,e,r,s){return t.insert("polygon",":first-child").attr("points",s.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,o.K2)(At,"insertPolygonShape");var It=(0,o.K2)((async(t,e)=>{e.useHtmlLabels||(0,o.D7)().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:r,bbox:s,halfPadding:a}=await Tt(t,e,"node "+e.classes,!0);o.Rm.info("Classes = ",e.classes);const i=r.insert("rect",":first-child");return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-s.width/2-a).attr("y",-s.height/2-a).attr("width",s.width+e.padding).attr("height",s.height+e.padding),$t(e,i),e.intersect=function(t){return Nt.rect(e,t)},r}),"note"),Ot=(0,o.K2)((t=>t?" "+t:""),"formatClass"),Bt=(0,o.K2)(((t,e)=>`${e||"node default"}${Ot(t.classes)} ${Ot(t.class)}`),"getClassesFromNode"),zt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding+(s.height+e.padding),i=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];o.Rm.info("Question main (Circle)");const n=At(r,a,a,i);return n.attr("style",e.style),$t(e,n),e.intersect=function(t){return o.Rm.warn("Intersect called"),Nt.polygon(e,i,t)},r}),"question"),Mt=(0,o.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return r.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Nt.circle(e,14,t)},r}),"choice"),Pt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.height+e.padding,i=a/4,n=s.width+2*i+e.padding,o=[{x:i,y:0},{x:n-i,y:0},{x:n,y:-a/2},{x:n-i,y:-a},{x:i,y:-a},{x:0,y:-a/2}],l=At(r,n,a,o);return l.attr("style",e.style),$t(e,l),e.intersect=function(t){return Nt.polygon(e,o,t)},r}),"hexagon"),Yt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,void 0,!0),a=s.height+2*e.padding,i=a/2,n=s.width+2*i+e.padding,o=mt(e.directions,s,e),l=At(r,n,a,o);return l.attr("style",e.style),$t(e,l),e.intersect=function(t){return Nt.polygon(e,o,t)},r}),"block_arrow"),Ft=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:-i/2,y:0},{x:a,y:0},{x:a,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return At(r,a,i,n).attr("style",e.style),e.width=a+i,e.height=i,e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"rect_left_inv_arrow"),jt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:-2*i/6,y:0},{x:a-i/6,y:0},{x:a+2*i/6,y:-i},{x:i/6,y:-i}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"lean_right"),Wt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:2*i/6,y:0},{x:a+i/6,y:0},{x:a-2*i/6,y:-i},{x:-i/6,y:-i}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"lean_left"),Xt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:-2*i/6,y:0},{x:a+2*i/6,y:0},{x:a-i/6,y:-i},{x:i/6,y:-i}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"trapezoid"),Ht=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:i/6,y:0},{x:a-i/6,y:0},{x:a+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"inv_trapezoid"),Ut=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:0,y:0},{x:a+i/2,y:0},{x:a,y:-i/2},{x:a+i/2,y:-i},{x:0,y:-i}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"rect_right_inv_arrow"),Zt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=a/2,n=i/(2.5+a/50),o=s.height+n+e.padding,l="M 0,"+n+" a "+i+","+n+" 0,0,0 "+a+" 0 a "+i+","+n+" 0,0,0 "+-a+" 0 l 0,"+o+" a "+i+","+n+" 0,0,0 "+a+" 0 l 0,"+-o,c=r.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-a/2+","+-(o/2+n)+")");return $t(e,c),e.intersect=function(t){const r=Nt.rect(e,t),s=r.x-e.x;if(0!=i&&(Math.abs(s)e.height/2-n)){let a=n*n*(1-s*s/(i*i));0!=a&&(a=Math.sqrt(a)),a=n-a,t.y-e.y>0&&(a=-a),r.y+=a}return r},r}),"cylinder"),qt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:a}=await Tt(t,e,"node "+e.classes+" "+e.class,!0),i=r.insert("rect",":first-child"),n=e.positioned?e.width:s.width+e.padding,l=e.positioned?e.height:s.height+e.padding,c=e.positioned?-n/2:-s.width/2-a,d=e.positioned?-l/2:-s.height/2-a;if(i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",n).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Vt(i,e.props.borders,n,l),t.delete("borders")),t.forEach((t=>{o.Rm.warn(`Unknown node property ${t}`)}))}return $t(e,i),e.intersect=function(t){return Nt.rect(e,t)},r}),"rect"),Gt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:a}=await Tt(t,e,"node "+e.classes,!0),i=r.insert("rect",":first-child"),n=e.positioned?e.width:s.width+e.padding,l=e.positioned?e.height:s.height+e.padding,c=e.positioned?-n/2:-s.width/2-a,d=e.positioned?-l/2:-s.height/2-a;if(i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",n).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Vt(i,e.props.borders,n,l),t.delete("borders")),t.forEach((t=>{o.Rm.warn(`Unknown node property ${t}`)}))}return $t(e,i),e.intersect=function(t){return Nt.rect(e,t)},r}),"composite"),Jt=(0,o.K2)((async(t,e)=>{const{shapeSvg:r}=await Tt(t,e,"label",!0);o.Rm.trace("Classes = ",e.class);const s=r.insert("rect",":first-child");if(s.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Vt(s,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{o.Rm.warn(`Unknown node property ${t}`)}))}return $t(e,s),e.intersect=function(t){return Nt.rect(e,t)},r}),"labelRect");function Vt(t,e,r,s){const a=[],i=(0,o.K2)((t=>{a.push(t,0)}),"addBorder"),n=(0,o.K2)((t=>{a.push(0,t)}),"skipBorder");e.includes("t")?(o.Rm.debug("add top border"),i(r)):n(r),e.includes("r")?(o.Rm.debug("add right border"),i(s)):n(s),e.includes("b")?(o.Rm.debug("add bottom border"),i(r)):n(r),e.includes("l")?(o.Rm.debug("add left border"),i(s)):n(s),t.attr("stroke-dasharray",a.join(" "))}(0,o.K2)(Vt,"applyNodePropertyBorders");var Qt=(0,o.K2)(((t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),a=s.insert("rect",":first-child"),i=s.insert("line"),n=s.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText;let c="";c="object"==typeof l?l[0]:l,o.Rm.info("Label text abc79",c,l,"object"==typeof l);const d=n.node().appendChild(it(c,e.labelStyle,!0,!0));let g={width:0,height:0};if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=d.children[0],e=(0,h.Ltv)(d);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}o.Rm.info("Text 2",l);const u=l.slice(1,l.length);let p=d.getBBox();const y=n.node().appendChild(it(u.join?u.join("
"):u,e.labelStyle,!0,!0));if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=y.children[0],e=(0,h.Ltv)(y);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const b=e.padding/2;return(0,h.Ltv)(y).attr("transform","translate( "+(g.width>p.width?0:(p.width-g.width)/2)+", "+(p.height+b+5)+")"),(0,h.Ltv)(d).attr("transform","translate( "+(g.width{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.height+e.padding,i=s.width+a/4+e.padding,n=r.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-i/2).attr("y",-a/2).attr("width",i).attr("height",a);return $t(e,n),e.intersect=function(t){return Nt.rect(e,t)},r}),"stadium"),ee=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:a}=await Tt(t,e,Bt(e,void 0),!0),i=r.insert("circle",":first-child");return i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",s.width/2+a).attr("width",s.width+e.padding).attr("height",s.height+e.padding),o.Rm.info("Circle main"),$t(e,i),e.intersect=function(t){return o.Rm.info("Circle intersect",e,s.width/2+a,t),Nt.circle(e,s.width/2+a,t)},r}),"circle"),re=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s,halfPadding:a}=await Tt(t,e,Bt(e,void 0),!0),i=r.insert("g",":first-child"),n=i.insert("circle"),l=i.insert("circle");return i.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",s.width/2+a+5).attr("width",s.width+e.padding+10).attr("height",s.height+e.padding+10),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",s.width/2+a).attr("width",s.width+e.padding).attr("height",s.height+e.padding),o.Rm.info("DoubleCircle main"),$t(e,n),e.intersect=function(t){return o.Rm.info("DoubleCircle intersect",e,s.width/2+a+5,t),Nt.circle(e,s.width/2+a+5,t)},r}),"doublecircle"),se=(0,o.K2)((async(t,e)=>{const{shapeSvg:r,bbox:s}=await Tt(t,e,Bt(e,void 0),!0),a=s.width+e.padding,i=s.height+e.padding,n=[{x:0,y:0},{x:a,y:0},{x:a,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=At(r,a,i,n);return o.attr("style",e.style),$t(e,o),e.intersect=function(t){return Nt.polygon(e,n,t)},r}),"subroutine"),ae=(0,o.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=r.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),$t(e,s),e.intersect=function(t){return Nt.circle(e,7,t)},r}),"start"),ie=(0,o.K2)(((t,e,r)=>{const s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a=70,i=10;"LR"===r&&(a=10,i=70);const n=s.append("rect").attr("x",-1*a/2).attr("y",-1*i/2).attr("width",a).attr("height",i).attr("class","fork-join");return $t(e,n),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Nt.rect(e,t)},s}),"forkJoin"),ne={rhombus:zt,composite:Gt,question:zt,rect:qt,labelRect:Jt,rectWithTitle:Qt,choice:Mt,circle:ee,doublecircle:re,stadium:te,hexagon:Pt,block_arrow:Yt,rect_left_inv_arrow:Ft,lean_right:jt,lean_left:Wt,trapezoid:Xt,inv_trapezoid:Ht,rect_right_inv_arrow:Ut,cylinder:Zt,start:ae,end:(0,o.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=r.insert("circle",":first-child"),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),$t(e,a),e.intersect=function(t){return Nt.circle(e,7,t)},r}),"end"),note:It,subroutine:se,fork:ie,join:ie,class_box:(0,o.K2)(((t,e)=>{const r=e.padding/2;let s;s=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",s).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),n=a.insert("line"),l=a.insert("line");let c=0,d=4;const g=a.insert("g").attr("class","label");let u=0;const p=e.classData.annotations?.[0],y=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",b=g.node().appendChild(it(y,e.labelStyle,!0,!0));let x=b.getBBox();if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=b.children[0],e=(0,h.Ltv)(b);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+4,c+=x.width);let f=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,o.D7)().flowchart.htmlLabels?f+="<"+e.classData.type+">":f+="<"+e.classData.type+">");const m=g.node().appendChild(it(f,e.labelStyle,!0,!0));(0,h.Ltv)(m).attr("class","classTitle");let w=m.getBBox();if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=m.children[0],e=(0,h.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}d+=w.height+4,w.width>c&&(c=w.width);const _=[];e.classData.members.forEach((t=>{const r=t.getDisplayDetails();let s=r.displayText;(0,o.D7)().flowchart.htmlLabels&&(s=s.replace(//g,">"));const a=g.node().appendChild(it(s,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let i=a.getBBox();if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=a.children[0],e=(0,h.Ltv)(a);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}i.width>c&&(c=i.width),d+=i.height+4,_.push(a)})),d+=8;const L=[];if(e.classData.methods.forEach((t=>{const r=t.getDisplayDetails();let s=r.displayText;(0,o.D7)().flowchart.htmlLabels&&(s=s.replace(//g,">"));const a=g.node().appendChild(it(s,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let i=a.getBBox();if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){const t=a.children[0],e=(0,h.Ltv)(a);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}i.width>c&&(c=i.width),d+=i.height+4,L.push(a)})),d+=8,p){let t=(c-x.width)/2;(0,h.Ltv)(b).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),u=x.height+4}let k=(c-w.width)/2;return(0,h.Ltv)(m).attr("transform","translate( "+(-1*c/2+k)+", "+(-1*d/2+u)+")"),u+=w.height+4,n.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+u).attr("y2",-d/2-r+8+u),u+=8,_.forEach((t=>{(0,h.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+u+4)+")");const e=t?.getBBox();u+=(e?.height??0)+4})),u+=8,l.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+u).attr("y2",-d/2-r+8+u),u+=8,L.forEach((t=>{(0,h.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+u)+")");const e=t?.getBBox();u+=(e?.height??0)+4})),i.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-r).attr("y",-d/2-r).attr("width",c+e.padding).attr("height",d+e.padding),$t(e,i),e.intersect=function(t){return Nt.rect(e,t)},a}),"class_box")},oe={},le=(0,o.K2)((async(t,e,r)=>{let s,a;if(e.link){let i;"sandbox"===(0,o.D7)().securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),s=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i),a=await ne[e.shape](s,e,r)}else a=await ne[e.shape](t,e,r),s=a;return e.tooltip&&a.attr("title",e.tooltip),e.class&&a.attr("class","node default "+e.class),oe[e.id]=s,e.haveCallback&&oe[e.id].attr("class",oe[e.id].attr("class")+" clickable"),s}),"insertNode"),ce=(0,o.K2)((t=>{const e=oe[t.id];o.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 s=t;let a="default";(s?.classes?.length||0)>0&&(a=(s?.classes??[]).join(" ")),a+=" flowchart-label";let i,l=0,c="";switch(s.type){case"round":l=5,c="rect";break;case"composite":l=0,c="composite",i=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 d=(0,n.sM)(s?.styles??[]),h=s.label,g=s.size??{width:0,height:0,x:0,y:0};return{labelStyle:d.labelStyle,shape:c,labelText:h,rx:l,ry:l,class:a,style:d.style,id:s.id,directions:s.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:r,intersect:void 0,type:s.type,padding:i??(0,o.zj)()?.block?.padding??0}}async function he(t,e,r){const s=de(e,0,!1);if("group"===s.type)return;const a=(0,o.zj)(),i=await le(t,s,{config:a}),n=i.node().getBBox(),l=r.getBlock(s.id);l.size={width:n.width,height:n.height,x:0,y:0,node:i},r.setBlock(l),i.remove()}async function ge(t,e,r){const s=de(e,0,!0);if("space"!==r.getBlock(s.id).type){const r=(0,o.zj)();await le(t,s,{config:r}),e.intersect=s?.intersect,ce(s)}}async function ue(t,e,r,s){for(const a of e)await s(t,a,r),a.children&&await ue(t,a.children,r,s)}async function pe(t,e,r){await ue(t,e,r,he)}async function ye(t,e,r){await ue(t,e,r,ge)}async function be(t,e,r,s,a){const i=new g.T({multigraph:!0,compound:!0});i.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const t of r)t.size&&i.setNode(t.id,{width:t.size.width,height:t.size.height,intersect:t.intersect});for(const r of e)if(r.start&&r.end){const e=s.getBlock(r.start),n=s.getBlock(r.end);if(e?.size&&n?.size){const s=e.size,o=n.size,l=[{x:s.x,y:s.y},{x:s.x+(o.x-s.x)/2,y:s.y+(o.y-s.y)/2},{x:o.x,y:o.y}];xt(t,{v:r.start,w:r.end,name:r.id},{...r,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",i,a),r.label&&(await ht(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),ut({...r,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,o.K2)(de,"getNodeFromBlock"),(0,o.K2)(he,"calculateBlockSize"),(0,o.K2)(ge,"insertBlockPositioned"),(0,o.K2)(ue,"performOperations"),(0,o.K2)(pe,"calculateBlockSizes"),(0,o.K2)(ye,"insertBlocks"),(0,o.K2)(be,"insertEdges");var xe=(0,o.K2)((function(t,e){return e.db.getClasses()}),"getClasses"),fe={parser:p,db:W,renderer:{draw:(0,o.K2)((async function(t,e,r,s){const{securityLevel:a,block:i}=(0,o.zj)(),n=s.db;let l;"sandbox"===a&&(l=(0,h.Ltv)("#i"+e));const c="sandbox"===a?(0,h.Ltv)(l.nodes()[0].contentDocument.body):(0,h.Ltv)("body"),d="sandbox"===a?c.select(`[id="${e}"]`):(0,h.Ltv)(`[id="${e}"]`);q(d,["point","circle","cross"],s.type,e);const g=n.getBlocks(),u=n.getBlocksFlat(),p=n.getEdges(),y=d.insert("g").attr("class","block");await pe(y,g,n);const b=rt(n);if(await ye(y,g,n),await be(y,p,u,n,e),b){const t=b,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,s=t.width+10,{useMaxWidth:a}=i;(0,o.a$)(d,r,s,!!a),o.Rm.debug("Here Bounds",b,t),d.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}}),"draw"),getClasses:xe},styles:H}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/413-c02a8543.chunk.min.js b/docs/hugo/public/js/413-c02a8543.chunk.min.js new file mode 100644 index 000000000..47d1e7446 --- /dev/null +++ b/docs/hugo/public/js/413-c02a8543.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[413],{8413:(e,t,i)=>{i.d(t,{diagram:()=>Y});var n=i(9502),r=i(4852),s=i(567),a=i(697),l=function(){var e=(0,n.K2)((function(e,t,i,n){for(i=i||{},n=e.length;n--;i[e[n]]=t);return i}),"o"),t=[1,3],i=[1,4],r=[1,5],s=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],l=[1,18],o=[2,7],h=[1,22],c=[1,23],u=[1,24],d=[1,25],y=[1,26],p=[1,27],_=[1,20],g=[1,28],E=[1,29],R=[62,63],m=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],f=[1,47],I=[1,48],S=[1,49],k=[1,50],N=[1,51],b=[1,52],T=[1,53],x=[53,54],w=[1,64],A=[1,60],q=[1,61],v=[1,62],K=[1,63],$=[1,65],O=[1,69],L=[1,70],C=[1,67],M=[1,68],F=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],D={trace:(0,n.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,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$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",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"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],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:(0,n.K2)((function(e,t,i,n,r,s,a){var l=s.length-1;switch(r){case 4:this.$=s[l].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[l].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[l-3],s[l-4]);break;case 14:n.setNewReqId(s[l-2]);break;case 15:n.setNewReqText(s[l-2]);break;case 16:n.setNewReqRisk(s[l-2]);break;case 17:n.setNewReqVerifyMethod(s[l-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[l-3]);break;case 34:n.setNewElementType(s[l-2]);break;case 35:n.setNewElementDocRef(s[l-2]);break;case 38:n.addRelationship(s[l-2],s[l],s[l-4]);break;case 39:n.addRelationship(s[l-2],s[l-4],s[l]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES}}),"anonymous"),table:[{3:1,4:2,6:t,9:i,11:r,13:s},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:i,11:r,13:s},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:i,11:r,13:s},{1:[2,2]},{4:17,5:l,7:13,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:l,7:31,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:32,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:33,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:34,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:35,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(R,[2,20]),e(R,[2,21]),e(R,[2,22]),e(R,[2,23]),e(R,[2,24]),e(R,[2,25]),e(m,[2,49]),e(m,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:f,56:I,57:S,58:k,59:N,60:b,61:T},{52:54,55:f,56:I,57:S,58:k,59:N,60:b,61:T},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(x,[2,40]),e(x,[2,41]),e(x,[2,42]),e(x,[2,43]),e(x,[2,44]),e(x,[2,45]),e(x,[2,46]),{54:[1,58]},{5:w,20:59,21:A,24:q,26:v,28:K,30:$},{5:O,30:L,46:66,47:C,49:M},{23:71,62:g,63:E},{23:72,62:g,63:E},e(F,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:w,20:77,21:A,24:q,26:v,28:K,30:$},e(F,[2,19]),e(F,[2,33]),{22:[1,78]},{22:[1,79]},{5:O,30:L,46:80,47:C,49:M},e(F,[2,37]),e(F,[2,38]),e(F,[2,39]),{23:81,62:g,63:E},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(F,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(F,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:w,20:106,21:A,24:q,26:v,28:K,30:$},{5:w,20:107,21:A,24:q,26:v,28:K,30:$},{5:w,20:108,21:A,24:q,26:v,28:K,30:$},{5:w,20:109,21:A,24:q,26:v,28:K,30:$},{5:O,30:L,46:110,47:C,49:M},{5:O,30:L,46:111,47:C,49:M},e(F,[2,14]),e(F,[2,15]),e(F,[2,16]),e(F,[2,17]),e(F,[2,34]),e(F,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:(0,n.K2)((function(e,t){if(!t.recoverable){var i=new Error(e);throw i.hash=t,i}this.trace(e)}),"parseError"),parse:(0,n.K2)((function(e){var t=this,i=[0],r=[],s=[null],a=[],l=this.table,o="",h=0,c=0,u=0,d=a.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);y.setInput(e,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;a.push(g);var E=y.options&&y.options.ranges;function R(){var e;return"number"!=typeof(e=r.pop()||y.lex()||1)&&(e instanceof Array&&(e=(r=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.K2)((function(e){i.length=i.length-2*e,s.length=s.length-e,a.length=a.length-e}),"popStack"),(0,n.K2)(R,"lex");for(var m,f,I,S,k,N,b,T,x,w={};;){if(I=i[i.length-1],this.defaultActions[I]?S=this.defaultActions[I]:(null==m&&(m=R()),S=l[I]&&l[I][m]),void 0===S||!S.length||!S[0]){var A;for(N in x=[],l[I])this.terminals_[N]&&N>2&&x.push("'"+this.terminals_[N]+"'");A=y.showPosition?"Parse error on line "+(h+1)+":\n"+y.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:g,expected:x})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+m);switch(S[0]){case 1:i.push(m),s.push(y.yytext),a.push(y.yylloc),i.push(S[1]),m=null,f?(m=f,f=null):(c=y.yyleng,o=y.yytext,h=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(b=this.productions_[S[1]][1],w.$=s[s.length-b],w._$={first_line:a[a.length-(b||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(b||1)].first_column,last_column:a[a.length-1].last_column},E&&(w._$.range=[a[a.length-(b||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(w,[o,c,h,p.yy,S[1],s,a].concat(d))))return k;b&&(i=i.slice(0,-1*b*2),s=s.slice(0,-1*b),a=a.slice(0,-1*b)),i.push(this.productions_[S[1]][0]),s.push(w.$),a.push(w._$),T=l[i[i.length-2]][i[i.length-1]],i.push(T);break;case 3:return!0}}return!0}),"parse")},P=function(){return{EOF:1,parseError:(0,n.K2)((function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)}),"parseError"),setInput:(0,n.K2)((function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,n.K2)((function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e}),"input"),unput:(0,n.K2)((function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var 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),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,n.K2)((function(){return this._more=!0,this}),"more"),reject:(0,n.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,n.K2)((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:(0,n.K2)((function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,n.K2)((function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,n.K2)((function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:(0,n.K2)((function(e,t){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:(0,n.K2)((function(){if(this.done)return this.EOF;var e,t,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;st[0].length)){if(t=i,n=s,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,r[s])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,r[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,n.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,n.K2)((function(e){this.conditionStack.push(e)}),"begin"),popState:(0,n.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,n.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,n.K2)((function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"}),"topState"),pushState:(0,n.K2)((function(e){this.begin(e)}),"pushState"),stateStackSize:(0,n.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.K2)((function(e,t,i,n){switch(i){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 48:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 49:return"qString";case 50:return t.yytext=t.yytext.trim(),62}}),"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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],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,50],inclusive:!0}}}}();function V(){this.yy={}}return D.lexer=P,(0,n.K2)(V,"Parser"),V.prototype=D,D.Parser=V,new V}();l.parser=l;var o=l,h=[],c={},u=new Map,d={},y=new Map,p=(0,n.K2)(((e,t)=>(u.has(e)||u.set(e,{name:e,type:t,id:c.id,text:c.text,risk:c.risk,verifyMethod:c.verifyMethod}),c={},u.get(e))),"addRequirement"),_=(0,n.K2)((()=>u),"getRequirements"),g=(0,n.K2)((e=>{void 0!==c&&(c.id=e)}),"setNewReqId"),E=(0,n.K2)((e=>{void 0!==c&&(c.text=e)}),"setNewReqText"),R=(0,n.K2)((e=>{void 0!==c&&(c.risk=e)}),"setNewReqRisk"),m=(0,n.K2)((e=>{void 0!==c&&(c.verifyMethod=e)}),"setNewReqVerifyMethod"),f=(0,n.K2)((e=>(y.has(e)||(y.set(e,{name:e,type:d.type,docRef:d.docRef}),n.Rm.info("Added new requirement: ",e)),d={},y.get(e))),"addElement"),I=(0,n.K2)((()=>y),"getElements"),S=(0,n.K2)((e=>{void 0!==d&&(d.type=e)}),"setNewElementType"),k=(0,n.K2)((e=>{void 0!==d&&(d.docRef=e)}),"setNewElementDocRef"),N=(0,n.K2)(((e,t,i)=>{h.push({type:e,src:t,dst:i})}),"addRelationship"),b=(0,n.K2)((()=>h),"getRelationships"),T=(0,n.K2)((()=>{h=[],c={},u=new Map,d={},y=new Map,(0,n.IU)()}),"clear"),x={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},getConfig:(0,n.K2)((()=>(0,n.D7)().req),"getConfig"),addRequirement:p,getRequirements:_,setNewReqId:g,setNewReqText:E,setNewReqRisk:R,setNewReqVerifyMethod:m,setAccTitle:n.SV,getAccTitle:n.iN,setAccDescription:n.EI,getAccDescription:n.m7,addElement:f,getElements:I,setNewElementType:S,setNewElementDocRef:k,addRelationship:N,getRelationships:b,clear:T},w=(0,n.K2)((e=>`\n\n marker {\n fill: ${e.relationColor};\n stroke: ${e.relationColor};\n }\n\n marker.cross {\n stroke: ${e.lineColor};\n }\n\n svg {\n font-family: ${e.fontFamily};\n font-size: ${e.fontSize};\n }\n\n .reqBox {\n fill: ${e.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${e.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${e.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${e.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${e.relationLabelColor};\n }\n\n`),"getStyles"),A={CONTAINS:"contains",ARROW:"arrow"},q={ReqMarkers:A,insertLineEndings:(0,n.K2)(((e,t)=>{let i=e.append("defs").append("marker").attr("id",A.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",A.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${t.line_height},${t.line_height/2}\n M${t.line_height},${t.line_height/2}\n L0,${t.line_height}`).attr("stroke-width",1)}),"insertLineEndings")},v={},K=0,$=(0,n.K2)(((e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",v.rect_min_width+"px").attr("height",v.rect_min_height+"px")),"newRectNode"),O=(0,n.K2)(((e,t,i)=>{let n=v.rect_min_width/2,r=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",n).attr("y",v.rect_padding).attr("dominant-baseline","hanging"),s=0;i.forEach((e=>{0==s?r.append("tspan").attr("text-anchor","middle").attr("x",v.rect_min_width/2).attr("dy",0).text(e):r.append("tspan").attr("text-anchor","middle").attr("x",v.rect_min_width/2).attr("dy",.75*v.line_height).text(e),s++}));let a=1.5*v.rect_padding+s*v.line_height*.75;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",v.rect_min_width).attr("y1",a).attr("y2",a),{titleNode:r,y:a}}),"newTitleNode"),L=(0,n.K2)(((e,t,i,n)=>{let r=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",v.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),s=0,a=[];return i.forEach((e=>{let t=e.length;for(;t>30&&s<3;){let i=e.substring(0,30);t=(e=e.substring(30,e.length)).length,a[a.length]=i,s++}if(3==s){let e=a[a.length-1];a[a.length-1]=e.substring(0,e.length-4)+"..."}else a[a.length]=e;s=0})),a.forEach((e=>{r.append("tspan").attr("x",v.rect_padding).attr("dy",v.line_height).text(e)})),r}),"newBodyNode"),C=(0,n.K2)(((e,t,i,n)=>{const r=t.node().getTotalLength(),s=t.node().getPointAtLength(.5*r),a="rel"+K;K++;const l=e.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();e.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")}),"addEdgeLabel"),M=(0,n.K2)((function(e,t,i,s,a){const l=i.edge(U(t.src),U(t.dst)),o=(0,r.n8j)().x((function(e){return e.x})).y((function(e){return e.y})),h=e.insert("path","#"+s).attr("class","er relationshipLine").attr("d",o(l.points)).attr("fill","none");t.type==a.db.Relationships.CONTAINS?h.attr("marker-start","url("+n.Y2.getUrl(v.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+n.Y2.getUrl(v.arrowMarkerAbsolute)+"#"+q.ReqMarkers.ARROW+"_line_ending)")),C(e,h,v,`<<${t.type}>>`)}),"drawRelationshipFromLayout"),F=(0,n.K2)(((e,t,i)=>{e.forEach(((e,r)=>{r=U(r),n.Rm.info("Added new requirement: ",r);const s=i.append("g").attr("id",r),a=$(s,"req-"+r);let l=[],o=O(s,r+"_title",[`<<${e.type}>>`,`${e.name}`]);l.push(o.titleNode);let h=L(s,r+"_body",[`Id: ${e.id}`,`Text: ${e.text}`,`Risk: ${e.risk}`,`Verification: ${e.verifyMethod}`],o.y);l.push(h);const c=a.node().getBBox();t.setNode(r,{width:c.width,height:c.height,shape:"rect",id:r})}))}),"drawReqs"),D=(0,n.K2)(((e,t,i)=>{e.forEach(((e,n)=>{const r=U(n),s=i.append("g").attr("id",r),a="element-"+r,l=$(s,a);let o=[],h=O(s,a+"_title",["<>",`${n}`]);o.push(h.titleNode);let c=L(s,a+"_body",[`Type: ${e.type||"Not Specified"}`,`Doc Ref: ${e.docRef||"None"}`],h.y);o.push(c);const u=l.node().getBBox();t.setNode(r,{width:u.width,height:u.height,shape:"rect",id:r})}))}),"drawElements"),P=(0,n.K2)(((e,t)=>(e.forEach((function(e){let i=U(e.src),n=U(e.dst);t.setEdge(i,n,{relationship:e})})),e)),"addRelationships"),V=(0,n.K2)((function(e,t){t.nodes().forEach((function(i){void 0!==i&&void 0!==t.node(i)&&(e.select("#"+i),e.select("#"+i).attr("transform","translate("+(t.node(i).x-t.node(i).width/2)+","+(t.node(i).y-t.node(i).height/2)+" )"))}))}),"adjustEntities"),U=(0,n.K2)((e=>e.replace(/\s/g,"").replace(/\./g,"_")),"elementString"),Y={parser:o,db:x,renderer:{draw:(0,n.K2)(((e,t,i,l)=>{const o=(v=(0,n.D7)().requirement).securityLevel;let h;"sandbox"===o&&(h=(0,r.Ltv)("#i"+t));const c=("sandbox"===o?(0,r.Ltv)(h.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id='${t}']`);q.insertLineEndings(c,v);const u=new a.T({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:v.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let d=l.db.getRequirements(),y=l.db.getElements(),p=l.db.getRelationships();F(d,u,c),D(y,u,c),P(p,u),(0,s.Zp)(u),V(c,u),p.forEach((function(e){M(c,e,u,t,l)}));const _=v.rect_padding,g=c.node().getBBox(),E=g.width+2*_,R=g.height+2*_;(0,n.a$)(c,R,E,v.useMaxWidth),c.attr("viewBox",`${g.x-_} ${g.y-_} ${E} ${R}`)}),"draw")},styles:w}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/417-65958f5a.chunk.min.js b/docs/hugo/public/js/417-65958f5a.chunk.min.js new file mode 100644 index 000000000..5648acf0d --- /dev/null +++ b/docs/hugo/public/js/417-65958f5a.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[417],{5417:(t,e,r)=>{r.d(e,{diagram:()=>F});var a=r(8159),i=r(9502),n=r(697),s=r(4852),o=r(567);const c=[];for(let t=0;t<256;++t)c.push((t+256).toString(16).slice(1));const l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,h=function(t){if(!function(t){return"string"==typeof t&&l.test(t)}(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r};function d(t,e,r,a){switch(t){case 0:return e&r^~e&a;case 1:case 3:return e^r^a;case 2:return e&r^e&a^r&a}}function u(t,e){return t<>>32-e}const y=function(){function t(t,e,r,a){var i;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>0;l=c,c=o,o=u(s,30)>>>0,s=i,i=n}r[0]=r[0]+i>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+c>>>0,r[4]=r[4]+l>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}(n),n[6]=15&n[6]|80,n[8]=63&n[8]|128,r){a=a||0;for(let t=0;t<16;++t)r[a+t]=n[t];return r}return function(t,e=0){return c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]}(n)}try{t.name="v5"}catch(t){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}();var p=function(){var t=(0,i.K2)((function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r}),"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],a=[1,11],n=[1,12],s=[1,13],o=[1,14],c=[1,15],l=[1,21],h=[1,22],d=[1,23],u=[1,24],y=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],_=[1,34],f=[27,28,46,47],E=[41,42,43,44,45],g=[17,34],m=[1,54],O=[1,53],k=[17,34,36,38],b={trace:(0,i.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,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:(0,i.K2)((function(t,e,r,a,i,n,s){var o=n.length-1;switch(i){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:case 19:case 43:case 27:case 28:case 31:this.$=n[o];break;case 8:a.addEntity(n[o-4]),a.addEntity(n[o-2]),a.addRelationship(n[o-4],n[o],n[o-2],n[o-3]);break;case 9:a.addEntity(n[o-3]),a.addAttributes(n[o-3],n[o-1]);break;case 10:a.addEntity(n[o-2]);break;case 11:a.addEntity(n[o]);break;case 12:a.addEntity(n[o-6],n[o-4]),a.addAttributes(n[o-6],n[o-1]);break;case 13:a.addEntity(n[o-5],n[o-3]);break;case 14:a.addEntity(n[o-3],n[o-1]);break;case 15:case 16:this.$=n[o].trim(),a.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),a.setAccDescription(this.$);break;case 20:case 41:case 42:case 32:this.$=n[o].replace(/"/g,"");break;case 21:case 29:this.$=[n[o]];break;case 22:n[o].push(n[o-1]),this.$=n[o];break;case 23:this.$={attributeType:n[o-1],attributeName:n[o]};break;case 24:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeKeyTypeList:n[o]};break;case 25:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeComment:n[o]};break;case 26:this.$={attributeType:n[o-3],attributeName:n[o-2],attributeKeyTypeList:n[o-1],attributeComment:n[o]};break;case 30:n[o-2].push(n[o]),this.$=n[o-2];break;case 33:this.$={cardA:n[o],relType:n[o-1],cardB:n[o-2]};break;case 34:this.$=a.Cardinality.ZERO_OR_ONE;break;case 35:this.$=a.Cardinality.ZERO_OR_MORE;break;case 36:this.$=a.Cardinality.ONE_OR_MORE;break;case 37:this.$=a.Cardinality.ONLY_ONE;break;case 38:this.$=a.Cardinality.MD_PARENT;break;case 39:this.$=a.Identification.NON_IDENTIFYING;break;case 40:this.$=a.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,20:r,22:a,24:n,26:s,27:o,28:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:a,24:n,26:s,27:o,28:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:l,42:h,43:d,44:u,45:y}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:o,28:c},{16:30,17:[1,31],29:32,30:33,34:_},{11:35,27:o,28:c},{40:36,46:[1,37],47:[1,38]},t(f,[2,34]),t(f,[2,35]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:_},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:l,42:h,43:d,44:u,45:y},t(E,[2,39]),t(E,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(g,[2,23],{32:50,33:51,35:52,37:m,38:O}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(g,[2,24],{33:56,36:[1,57],38:O}),t(g,[2,25]),t(k,[2,29]),t(g,[2,32]),t(k,[2,31]),{16:58,17:[1,59],29:32,30:33,34:_},t(g,[2,26]),{35:60,37:m},{17:[1,61]},t(e,[2,13]),t(k,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},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],a=[],n=[null],s=[],o=this.table,c="",l=0,h=0,d=0,u=s.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc;s.push(f);var E=y.options&&y.options.ranges;function g(){var t;return"number"!=typeof(t=a.pop()||y.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){r.length=r.length-2*t,n.length=n.length-t,s.length=s.length-t}),"popStack"),(0,i.K2)(g,"lex");for(var m,O,k,b,R,N,x,T,A,M={};;){if(k=r[r.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==m&&(m=g()),b=o[k]&&o[k][m]),void 0===b||!b.length||!b[0]){var w;for(N in A=[],o[k])this.terminals_[N]&&N>2&&A.push("'"+this.terminals_[N]+"'");w=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(w,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:f,expected:A})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(b[0]){case 1:r.push(m),n.push(y.yytext),s.push(y.yylloc),r.push(b[1]),m=null,O?(m=O,O=null):(h=y.yyleng,c=y.yytext,l=y.yylineno,f=y.yylloc,d>0&&d--);break;case 2:if(x=this.productions_[b[1]][1],M.$=n[n.length-x],M._$={first_line:s[s.length-(x||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(x||1)].first_column,last_column:s[s.length-1].last_column},E&&(M._$.range=[s[s.length-(x||1)].range[0],s[s.length-1].range[1]]),void 0!==(R=this.performAction.apply(M,[c,h,l,p.yy,b[1],n,s].concat(u))))return R;x&&(r=r.slice(0,-1*x*2),n=n.slice(0,-1*x),s=s.slice(0,-1*x)),r.push(this.productions_[b[1]][0]),n.push(M.$),s.push(M._$),T=o[r[r.length-2]][r[r.length-1]],r.push(T);break;case 3:return!0}}return!0}),"parse")},R=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 a=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===a.length?this.yylloc.first_column:0)+a[a.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,a,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))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.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 n in i)this[n]=i[n];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),n=0;ne[0].length)){if(e=r,a=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&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(){return this.next()||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,a){switch(r){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;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 10;case 8:case 15:case 20:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 16:return 37;case 17:case 18:return 34;case 19:return 38;case 21:return this.popState(),17;case 22:case 54:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:case 29:case 30:case 43:return 41;case 26:case 27:case 28:case 36:case 38:case 45:return 43;case 31:case 32:case 33:case 34:case 35:case 37:case 44:return 42;case 39:case 40:case 41:case 42:return 44;case 46:return 45;case 47:case 50:case 51:case 52:return 46;case 48:case 49:return 47;case 53:return 27;case 55:return 6}}),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,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],inclusive:!0}}}}();function N(){this.yy={}}return b.lexer=R,(0,i.K2)(N,"Parser"),N.prototype=b,b.Parser=N,new N}();p.parser=p;var _=p,f=new Map,E=[],g=(0,i.K2)((function(t,e=void 0){return f.has(t)?!f.get(t).alias&&e&&(f.get(t).alias=e,i.Rm.info(`Add alias '${e}' to entity '${t}'`)):(f.set(t,{attributes:[],alias:e}),i.Rm.info("Added new entity :",t)),f.get(t)}),"addEntity"),m=(0,i.K2)((()=>f),"getEntities"),O=(0,i.K2)((function(t,e){let r,a=g(t);for(r=e.length-1;r>=0;r--)a.attributes.push(e[r]),i.Rm.debug("Added attribute ",e[r].attributeName)}),"addAttributes"),k=(0,i.K2)((function(t,e,r,a){let n={entityA:t,roleA:e,entityB:r,relSpec:a};E.push(n),i.Rm.debug("Added new relationship :",n)}),"addRelationship"),b=(0,i.K2)((()=>E),"getRelationships"),R=(0,i.K2)((function(){f=new Map,E=[],(0,i.IU)()}),"clear"),N={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"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},getConfig:(0,i.K2)((()=>(0,i.D7)().er),"getConfig"),addEntity:g,addAttributes:O,getEntities:m,addRelationship:k,getRelationships:b,clear:R,setAccTitle:i.SV,getAccTitle:i.iN,setAccDescription:i.EI,getAccDescription:i.m7,setDiagramTitle:i.ke,getDiagramTitle:i.ab},x={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},T={ERMarkers:x,insertMarkers:(0,i.K2)((function(t,e){let r;t.append("defs").append("marker").attr("id",x.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",x.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",x.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",x.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",x.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",x.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",x.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",x.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",x.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",x.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}),"insertMarkers")},A=/[^\dA-Za-z](\W)*/g,M={},w=new Map,I=(0,i.K2)((function(t){const e=Object.keys(t);for(const r of e)M[r]=t[r]}),"setConf"),D=(0,i.K2)(((t,e,r)=>{const a=M.entityPadding/3,n=M.entityPadding/3,s=.85*M.fontSize,o=e.node().getBBox(),c=[];let l=!1,h=!1,d=0,u=0,y=0,p=0,_=o.height+2*a,f=1;r.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(l=!0),void 0!==t.attributeComment&&(h=!0)})),r.forEach((r=>{const n=`${e.node().id}-attr-${f}`;let o=0;const E=(0,i.QO)(r.attributeType),g=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(E),m=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(r.attributeName),O={};O.tn=g,O.nn=m;const k=g.node().getBBox(),b=m.node().getBBox();if(d=Math.max(d,k.width),u=Math.max(u,b.width),o=Math.max(k.height,b.height),l){const e=void 0!==r.attributeKeyTypeList?r.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(e);O.kn=a;const c=a.node().getBBox();y=Math.max(y,c.width),o=Math.max(o,c.height)}if(h){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(r.attributeComment||"");O.cn=e;const a=e.node().getBBox();p=Math.max(p,a.width),o=Math.max(o,a.height)}O.height=o,c.push(O),_+=o+2*a,f+=1}));let E=4;l&&(E+=2),h&&(E+=2);const g=d+u+y+p,m={width:Math.max(M.minEntityWidth,Math.max(o.width+2*M.entityPadding,g+n*E)),height:r.length>0?_:Math.max(M.minEntityHeight,o.height+2*M.entityPadding)};if(r.length>0){const r=Math.max(0,(m.width-g-n*E)/(E/2));e.attr("transform","translate("+m.width/2+","+(a+o.height/2)+")");let i=o.height+2*a,s="attributeBoxOdd";c.forEach((e=>{const o=i+a+e.height/2;e.tn.attr("transform","translate("+n+","+o+")");const c=t.insert("rect","#"+e.tn.node().id).classed(`er ${s}`,!0).attr("x",0).attr("y",i).attr("width",d+2*n+r).attr("height",e.height+2*a),_=parseFloat(c.attr("x"))+parseFloat(c.attr("width"));e.nn.attr("transform","translate("+(_+n)+","+o+")");const f=t.insert("rect","#"+e.nn.node().id).classed(`er ${s}`,!0).attr("x",_).attr("y",i).attr("width",u+2*n+r).attr("height",e.height+2*a);let E=parseFloat(f.attr("x"))+parseFloat(f.attr("width"));if(l){e.kn.attr("transform","translate("+(E+n)+","+o+")");const c=t.insert("rect","#"+e.kn.node().id).classed(`er ${s}`,!0).attr("x",E).attr("y",i).attr("width",y+2*n+r).attr("height",e.height+2*a);E=parseFloat(c.attr("x"))+parseFloat(c.attr("width"))}h&&(e.cn.attr("transform","translate("+(E+n)+","+o+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${s}`,"true").attr("x",E).attr("y",i).attr("width",p+2*n+r).attr("height",e.height+2*a)),i+=e.height+2*a,s="attributeBoxOdd"===s?"attributeBoxEven":"attributeBoxOdd"}))}else m.height=Math.max(M.minEntityHeight,_),e.attr("transform","translate("+m.width/2+","+m.height/2+")");return m}),"drawAttributes"),S=(0,i.K2)((function(t,e,r){let a;return[...e.keys()].forEach((function(n){const s=Y(n,"entity");w.set(n,s);const o=t.append("g").attr("id",s);a=void 0===a?s:a;const c="text-"+s,l=o.append("text").classed("er entityLabel",!0).attr("id",c).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",(0,i.D7)().fontFamily).style("font-size",M.fontSize+"px").text(e.get(n).alias??n),{width:h,height:d}=D(o,l,e.get(n).attributes),u=o.insert("rect","#"+c).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",h).attr("height",d).node().getBBox();r.setNode(s,{width:u.width,height:u.height,shape:"rect",id:s})})),a}),"drawEntities"),v=(0,i.K2)((function(t,e){e.nodes().forEach((function(r){void 0!==r&&void 0!==e.node(r)&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")}))}),"adjustEntities"),L=(0,i.K2)((function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")}),"getEdgeName"),$=(0,i.K2)((function(t,e){return t.forEach((function(t){e.setEdge(w.get(t.entityA),w.get(t.entityB),{relationship:t},L(t))})),t}),"addRelationships"),K=0,C=(0,i.K2)((function(t,e,r,a,n){K++;const o=r.edge(w.get(e.entityA),w.get(e.entityB),L(e)),c=(0,s.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.qrM),l=t.insert("path","#"+a).classed("er relationshipLine",!0).attr("d",c(o.points)).style("stroke",M.stroke).style("fill","none");e.relSpec.relType===n.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let h="";switch(M.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case n.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+h+"#"+T.ERMarkers.ZERO_OR_ONE_END+")");break;case n.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+h+"#"+T.ERMarkers.ZERO_OR_MORE_END+")");break;case n.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+h+"#"+T.ERMarkers.ONE_OR_MORE_END+")");break;case n.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+h+"#"+T.ERMarkers.ONLY_ONE_END+")");break;case n.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+h+"#"+T.ERMarkers.MD_PARENT_END+")")}switch(e.relSpec.cardB){case n.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+h+"#"+T.ERMarkers.ZERO_OR_ONE_START+")");break;case n.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+h+"#"+T.ERMarkers.ZERO_OR_MORE_START+")");break;case n.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+h+"#"+T.ERMarkers.ONE_OR_MORE_START+")");break;case n.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+h+"#"+T.ERMarkers.ONLY_ONE_START+")");break;case n.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+h+"#"+T.ERMarkers.MD_PARENT_START+")")}const d=l.node().getTotalLength(),u=l.node().getPointAtLength(.5*d),y="rel"+K,p=e.roleA.split(/
/g),_=t.append("text").classed("er relationshipLabel",!0).attr("id",y).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",(0,i.D7)().fontFamily).style("font-size",M.fontSize+"px");if(1==p.length)_.text(e.roleA);else{const t=.5*-(p.length-1);p.forEach(((e,r)=>{_.append("tspan").attr("x",u.x).attr("dy",`${0===r?t:1}em`).text(e)}))}const f=_.node().getBBox();t.insert("rect","#"+y).classed("er relationshipLabelBox",!0).attr("x",u.x-f.width/2).attr("y",u.y-f.height/2).attr("width",f.width).attr("height",f.height)}),"drawRelationshipFromLayout"),B=(0,i.K2)((function(t,e,r,c){M=(0,i.D7)().er,i.Rm.info("Drawing ER diagram");const l=(0,i.D7)().securityLevel;let h;"sandbox"===l&&(h=(0,s.Ltv)("#i"+e));const d=("sandbox"===l?(0,s.Ltv)(h.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id='${e}']`);let u;T.insertMarkers(d,M),u=new n.T({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:M.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const y=S(d,c.db.getEntities(),u),p=$(c.db.getRelationships(),u);(0,o.Zp)(u),v(d,u),p.forEach((function(t){C(d,t,u,y,c)}));const _=M.diagramPadding;a._K.insertTitle(d,"entityTitleText",M.titleTopMargin,c.db.getDiagramTitle());const f=d.node().getBBox(),E=f.width+2*_,g=f.height+2*_;(0,i.a$)(d,g,E,M.useMaxWidth),d.attr("viewBox",`${f.x-_} ${f.y-_} ${E} ${g}`)}),"draw"),P="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function Y(t="",e=""){const r=t.replace(A,"");return`${Z(e)}${Z(r)}${y(t,P)}`}function Z(t=""){return t.length>0?`${t}-`:""}(0,i.K2)(Y,"generateId"),(0,i.K2)(Z,"strWithHyphen");var F={parser:_,db:N,renderer:{setConf:I,draw:B},styles:(0,i.K2)((t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n`),"getStyles")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/452-e65d6d68.chunk.min.js b/docs/hugo/public/js/452-e65d6d68.chunk.min.js new file mode 100644 index 000000000..34932b1a2 --- /dev/null +++ b/docs/hugo/public/js/452-e65d6d68.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[452],{4071:(e,c,k)=>{k.d(c,{createPacketServices:()=>s.$});var s=k(1609);k(9369)}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/485-6a3d102c.chunk.min.js b/docs/hugo/public/js/485-6a3d102c.chunk.min.js new file mode 100644 index 000000000..da0adb2ec --- /dev/null +++ b/docs/hugo/public/js/485-6a3d102c.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[485],{5937:(t,e,s)=>{s.d(e,{A:()=>i});var n=s(6309),r=s(1931);const i=(t,e)=>n.A.lang.round(r.A.parse(t)[e])},6474:(t,e,s)=>{s.d(e,{A:()=>i,P:()=>u});var n=s(9502),r=s(4852),i=(0,n.K2)(((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement"),u=(0,n.K2)(((t,e,s,r)=>{t.attr("class",s);const{width:i,height:u,x:c,y:l}=a(t,e);(0,n.a$)(t,u,i,r);const h=o(c,l,i,u,e);t.attr("viewBox",h),n.Rm.debug(`viewBox configured: ${h} with padding: ${e}`)}),"setupViewPortForSVG"),a=(0,n.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),o=(0,n.K2)(((t,e,s,n,r)=>`${t-r} ${e-r} ${s} ${n}`),"createViewBox")},4485:(t,e,s)=>{s.d(e,{diagram:()=>Dt});var n,r,i=s(6474),u=s(9874),a=s(7308),o=(s(7938),s(1282)),c=(s(1099),s(7588),s(3115),s(6058),s(8159)),l=s(9502),h=s(4852),d=s(5937),p=s(5582),A=0,g=(0,l.D7)(),f=new Map,y=[],k=new Map,b=[],E=new Map,m=new Map,D=0,x=!0,C=[],T=(0,l.K2)((t=>l.Y2.sanitizeText(t,g)),"sanitizeText"),S=(0,l.K2)((function(t){for(const e of f.values())if(e.id===t)return e.domId;return t}),"lookUpDomId"),F=(0,l.K2)((function(t,e,s,n,r,i,a={},c){if(!t||0===t.trim().length)return;let h,d=f.get(t);if(void 0===d&&(d={id:t,labelType:"text",domId:"flowchart-"+t+"-"+A,styles:[],classes:[]},f.set(t,d)),A++,void 0!==e?(g=(0,l.D7)(),h=T(e.text.trim()),d.labelType=e.type,h.startsWith('"')&&h.endsWith('"')&&(h=h.substring(1,h.length-1)),d.text=h):void 0===d.text&&(d.text=t),void 0!==s&&(d.type=s),null!=n&&n.forEach((function(t){d.styles.push(t)})),null!=r&&r.forEach((function(t){d.classes.push(t)})),void 0!==i&&(d.dir=i),void 0===d.props?d.props=a:void 0!==a&&Object.assign(d.props,a),void 0!==c){let e;e=c.includes("\n")?c+"\n":"{\n"+c+"\n}";const s=(0,u.H)(e,{schema:u.r});if(s.shape){if(s.shape!==s.shape.toLowerCase()||s.shape.includes("_"))throw new Error(`No such shape: ${s.shape}. Shape names should be lowercase.`);if(!(0,o.aP)(s.shape))throw new Error(`No such shape: ${s.shape}.`);d.type=s?.shape}s?.label&&(d.text=s?.label),s?.icon&&(d.icon=s?.icon,s.label?.trim()||d.text!==t||(d.text="")),s?.form&&(d.form=s?.form),s?.pos&&(d.pos=s?.pos),s?.img&&(d.img=s?.img,s.label?.trim()||d.text!==t||(d.text="")),s?.constraint&&(d.constraint=s.constraint),s.w&&(d.assetWidth=Number(s.w)),s.h&&(d.assetHeight=Number(s.h))}}),"addVertex"),_=(0,l.K2)((function(t,e,s){const n={start:t,end:e,type:void 0,text:"",labelType:"text"};l.Rm.info("abc78 Got edge...",n);const r=s.text;if(void 0!==r&&(n.text=T(r.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=r.type),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length),!(y.length<(g.maxEdges??500)))throw new Error(`Edge limit exceeded. ${y.length} edges found, but the limit is ${g.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.`);l.Rm.info("Pushing edge..."),y.push(n)}),"addSingleLink"),B=(0,l.K2)((function(t,e,s){l.Rm.info("addLink",t,e,s);for(const n of t)for(const t of e)_(n,t,s)}),"addLink"),v=(0,l.K2)((function(t,e){t.forEach((function(t){"default"===t?y.defaultInterpolate=e:y[t].interpolate=e}))}),"updateLinkInterpolate"),w=(0,l.K2)((function(t,e){t.forEach((function(t){if("number"==typeof t&&t>=y.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${y.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?y.defaultStyle=e:(y[t].style=e,(y[t]?.style?.length??0)>0&&!y[t]?.style?.some((t=>t?.startsWith("fill")))&&y[t]?.style?.push("fill:none"))}))}),"updateLink"),$=(0,l.K2)((function(t,e){t.split(",").forEach((function(t){let s=k.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},k.set(t,s)),null!=e&&e.forEach((function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)}))}))}),"addClass"),L=(0,l.K2)((function(t){/.*/.exec(n)&&(n="LR"),/.*v/.exec(n)&&(n="TB"),"TD"===n&&(n="TB")}),"setDirection"),R=(0,l.K2)((function(t,e){for(const s of t.split(",")){const t=f.get(s);t&&t.classes.push(e);const n=E.get(s);n&&n.classes.push(e)}}),"setClass"),I=(0,l.K2)((function(t,e){if(void 0!==e){e=T(e);for(const s of t.split(","))m.set("gen-1"===r?S(s):s,e)}}),"setTooltip"),K=(0,l.K2)((function(t,e,s){const n=S(t);if("loose"!==(0,l.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof s){r=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),(0,h.Ltv)(this).classed("hover",!1)}))}),"setupToolTips");C.push(Y);var j=(0,l.K2)((function(t="gen-1"){f=new Map,k=new Map,y=[],C=[Y],b=[],E=new Map,D=0,m=new Map,x=!0,r=t,g=(0,l.D7)(),(0,l.IU)()}),"clear"),X=(0,l.K2)((t=>{r=t||"gen-2"}),"setGen"),z=(0,l.K2)((function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}),"defaultStyle"),H=(0,l.K2)((function(t,e,s){let n=t.text.trim(),i=s.text;function u(t){const e={boolean:{},number:{},string:{}},s=[];let n;return{nodeList:t.filter((function(t){const r=typeof t;return t.stmt&&"dir"===t.stmt?(n=t.value,!1):""!==t.trim()&&(r in e?!e[r].hasOwnProperty(t)&&(e[r][t]=!0):!s.includes(t)&&s.push(t))})),dir:n}}t===s&&/\s/.exec(s.text)&&(n=void 0),(0,l.K2)(u,"uniq");const{nodeList:a,dir:o}=u(e.flat());if("gen-1"===r)for(let t=0;t2e3)return{result:!1,count:0};if(Z[Q]=e,b[e].id===t)return{result:!0,count:0};let n=0,r=1;for(;n=0){const s=J(t,e);if(s.result)return{result:!0,count:r+s.count};r+=s.count}n+=1}return{result:!1,count:r}}),"indexNodes2"),tt=(0,l.K2)((function(t){return Z[t]}),"getDepthFirstPos"),et=(0,l.K2)((function(){Q=-1,b.length>0&&J("none",b.length-1)}),"indexNodes"),st=(0,l.K2)((function(){return b}),"getSubGraphs"),nt=(0,l.K2)((()=>!!x&&(x=!1,!0)),"firstGraph"),rt=(0,l.K2)((t=>{let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:s,stroke:n}}),"destructStartLink"),it=(0,l.K2)(((t,e)=>{const s=e.length;let n=0;for(let r=0;r{const e=t.trim();let s=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,s=s.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,s=s.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,s=s.slice(1))}let r="normal",i=s.length-1;s.startsWith("=")&&(r="thick"),s.startsWith("~")&&(r="invisible");const u=it(".",s);return u&&(r="dotted",i=u),{type:n,stroke:r,length:i}}),"destructEndLink"),at=(0,l.K2)(((t,e)=>{const s=ut(t);let n;if(e){if(n=rt(e),n.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=s.type;else{if(n.type!==s.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=s.length,n}return s}),"destructLink"),ot=(0,l.K2)(((t,e)=>{for(const s of t)if(s.nodes.includes(e))return!0;return!1}),"exists"),ct=(0,l.K2)(((t,e)=>{const s=[];return t.nodes.forEach(((n,r)=>{ot(e,n)||s.push(t.nodes[r])})),{nodes:s}}),"makeUniq"),lt={firstGraph:nt},ht=(0,l.K2)((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}}),"getTypeFromVertex"),dt=(0,l.K2)(((t,e)=>t.find((t=>t.id===e))),"findNode"),pt=(0,l.K2)((t=>{let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}),"destructEdgeType"),At=(0,l.K2)(((t,e,s,n,r,i)=>{const u=s.get(t.id),a=n.get(t.id)??!1,o=dt(e,t.id);if(o)o.cssStyles=t.styles,o.cssCompiledStyles=gt(t.classes),o.cssClasses=t.classes.join(" ");else{const s={id:t.id,label:t.text,labelStyle:"",parentId:u,padding:r.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:gt(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:i,link:t.link,linkTarget:t.linkTarget,tooltip:P(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};a?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:ht(t)})}}),"addNodeFromVertex");function gt(t){let e=[];for(const s of t){const t=k.get(s);t?.styles&&(e=[...e,...t.styles??[]].map((t=>t.trim()))),t?.textStyles&&(e=[...e,...t.textStyles??[]].map((t=>t.trim())))}return e}(0,l.K2)(gt,"getCompiledStyles");var ft=(0,l.K2)((()=>{const t=(0,l.D7)(),e=[],s=[],n=st(),r=new Map,i=new Map;for(let t=n.length-1;t>=0;t--){const e=n[t];e.nodes.length>0&&i.set(e.id,!0);for(const t of e.nodes)r.set(t,e.id)}for(let s=n.length-1;s>=0;s--){const i=n[s];e.push({id:i.id,label:i.title,labelStyle:"",parentId:r.get(i.id),padding:8,cssCompiledStyles:gt(i.classes),cssClasses:i.classes.join(" "),shape:"rect",dir:i.dir,isGroup:!0,look:t.look})}U().forEach((s=>{At(s,e,r,i,t,t.look||"classic")}));const u=G();return u.forEach(((e,n)=>{const{arrowTypeStart:r,arrowTypeEnd:i}=pt(e.type),a=[...u.defaultStyle??[]];e.style&&a.push(...e.style);const o={id:(0,c.rY)(e.start,e.end,{counter:n,prefix:"L"}),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?"none":r,arrowTypeEnd:"invisible"===e?.stroke?"none":i,arrowheadStyle:"fill: #333",labelStyle:a,style:a,pattern:e.stroke,look:t.look};s.push(o)})),{nodes:e,edges:s,other:{},config:t}}),"getData"),yt={defaultConfig:(0,l.K2)((()=>l.ME.flowchart),"defaultConfig"),setAccTitle:l.SV,getAccTitle:l.iN,getAccDescription:l.m7,getData:ft,setAccDescription:l.EI,addVertex:F,lookUpDomId:S,addLink:B,updateLinkInterpolate:v,updateLink:w,addClass:$,setDirection:L,setClass:R,setTooltip:I,getTooltip:P,setClickEvent:O,setLink:N,bindFunctions:M,getDirection:V,getVertices:U,getEdges:G,getClasses:W,clear:j,setGen:X,defaultStyle:z,addSubGraph:H,getDepthFirstPos:tt,indexNodes:et,getSubGraphs:st,destructLink:at,lex:lt,exists:ot,makeUniq:ct,setDiagramTitle:l.ke,getDiagramTitle:l.ab},kt={getClasses:(0,l.K2)((function(t,e){return e.db.getClasses()}),"getClasses"),draw:(0,l.K2)((async function(t,e,s,n){l.Rm.info("REF0:"),l.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:r,flowchart:u,layout:o}=(0,l.D7)();let d;"sandbox"===r&&(d=(0,h.Ltv)("#i"+e));const p="sandbox"===r?d.nodes()[0].contentDocument:document;l.Rm.debug("Before getData: ");const A=n.db.getData();l.Rm.debug("Data: ",A);const g=(0,i.A)(e,r),f=V();A.type=n.type,A.layoutAlgorithm=(0,a.q7)(o),"dagre"===A.layoutAlgorithm&&"elk"===o&&l.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."),A.direction=f,A.nodeSpacing=u?.nodeSpacing||50,A.rankSpacing=u?.rankSpacing||50,A.markers=["point","circle","cross"],A.diagramId=e,l.Rm.debug("REF1:",A),await(0,a.XX)(A,g);const y=A.config.flowchart?.diagramPadding??8;c._K.insertTitle(g,"flowchartTitleText",u?.titleTopMargin||0,n.db.getDiagramTitle()),(0,i.P)(g,y,"flowchart",u?.useMaxWidth||!1);for(const t of A.nodes){const s=(0,h.Ltv)(`#${e} [id="${t.id}"]`);if(!s||!t.link)continue;const n=p.createElementNS("http://www.w3.org/2000/svg","a");n.setAttributeNS("http://www.w3.org/2000/svg","class",t.cssClasses),n.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===r?n.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):t.linkTarget&&n.setAttributeNS("http://www.w3.org/2000/svg","target",t.linkTarget);const i=s.insert((function(){return n}),":first-child"),u=s.select(".label-container");u&&i.append((function(){return u.node()}));const a=s.select(".label");a&&i.append((function(){return a.node()}))}}),"draw")},bt=function(){var t=(0,l.K2)((function(t,e,s,n){for(s=s||{},n=t.length;n--;s[t[n]]=e);return s}),"o"),e=[1,4],s=[1,3],n=[1,5],r=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],i=[2,2],u=[1,13],a=[1,14],o=[1,15],c=[1,16],h=[1,23],d=[1,25],p=[1,26],A=[1,27],g=[1,49],f=[1,48],y=[1,29],k=[1,30],b=[1,31],E=[1,32],m=[1,33],D=[1,44],x=[1,46],C=[1,42],T=[1,47],S=[1,43],F=[1,50],_=[1,45],B=[1,51],v=[1,52],w=[1,34],$=[1,35],L=[1,36],R=[1,37],I=[1,57],K=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],N=[1,61],P=[1,60],O=[1,62],M=[8,9,11,75,77],V=[1,77],U=[1,90],G=[1,95],W=[1,94],Y=[1,91],j=[1,87],X=[1,93],z=[1,89],H=[1,96],q=[1,92],Q=[1,97],Z=[1,88],J=[8,9,10,11,40,75,77],tt=[8,9,10,11,40,46,75,77],et=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],st=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],nt=[44,60,88,101,104,105,108,110,113,114,115],rt=[1,123],it=[1,122],ut=[1,130],at=[1,144],ot=[1,145],ct=[1,146],lt=[1,147],ht=[1,132],dt=[1,134],pt=[1,138],At=[1,139],gt=[1,140],ft=[1,141],yt=[1,142],kt=[1,143],bt=[1,148],Et=[1,149],mt=[1,128],Dt=[1,129],xt=[1,136],Ct=[1,131],Tt=[1,135],St=[1,133],Ft=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],_t=[1,151],Bt=[1,153],vt=[8,9,11],wt=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],$t=[1,173],Lt=[1,169],Rt=[1,170],It=[1,174],Kt=[1,171],Nt=[1,172],Pt=[77,115,118],Ot=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],Mt=[10,105],Vt=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],Ut=[1,242],Gt=[1,240],Wt=[1,244],Yt=[1,238],jt=[1,239],Xt=[1,241],zt=[1,243],Ht=[1,245],qt=[1,263],Qt=[8,9,11,105],Zt=[8,9,10,11,60,83,104,105,108,109,110,111],Jt={trace:(0,l.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,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$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",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"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],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,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],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:(0,l.K2)((function(t,e,s,n,r,i,u){var a=i.length-1;switch(r){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(i[a])||i[a].length>0)&&i[a-1].push(i[a]),this.$=i[a-1];break;case 4:case 181:case 44:case 54:case 76:case 179:this.$=i[a];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(i[a-1]),this.$=i[a-1];break;case 27:this.$=i[a-1].nodes;break;case 33:this.$=n.addSubGraph(i[a-6],i[a-1],i[a-4]);break;case 34:this.$=n.addSubGraph(i[a-3],i[a-1],i[a-3]);break;case 35:this.$=n.addSubGraph(void 0,i[a-1],void 0);break;case 37:this.$=i[a].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=i[a].trim(),n.setAccDescription(this.$);break;case 43:case 131:this.$=i[a-1]+i[a];break;case 45:n.addVertex(i[a-1][0],void 0,void 0,void 0,void 0,void 0,void 0,i[a]),n.addLink(i[a-3].stmt,i[a-1],i[a-2]),this.$={stmt:i[a-1],nodes:i[a-1].concat(i[a-3].nodes)};break;case 46:n.addLink(i[a-2].stmt,i[a],i[a-1]),this.$={stmt:i[a],nodes:i[a].concat(i[a-2].nodes)};break;case 47:n.addLink(i[a-3].stmt,i[a-1],i[a-2]),this.$={stmt:i[a-1],nodes:i[a-1].concat(i[a-3].nodes)};break;case 48:this.$={stmt:i[a-1],nodes:i[a-1]};break;case 49:n.addVertex(i[a-1][0],void 0,void 0,void 0,void 0,void 0,void 0,i[a]),this.$={stmt:i[a-1],nodes:i[a-1],shapeData:i[a]};break;case 50:this.$={stmt:i[a],nodes:i[a]};break;case 51:case 126:case 128:this.$=[i[a]];break;case 52:n.addVertex(i[a-5][0],void 0,void 0,void 0,void 0,void 0,void 0,i[a-4]),this.$=i[a-5].concat(i[a]);break;case 53:this.$=i[a-4].concat(i[a]);break;case 55:this.$=i[a-2],n.setClass(i[a-2],i[a]);break;case 56:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"square");break;case 57:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"doublecircle");break;case 58:this.$=i[a-5],n.addVertex(i[a-5],i[a-2],"circle");break;case 59:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"ellipse");break;case 60:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"stadium");break;case 61:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"subroutine");break;case 62:this.$=i[a-7],n.addVertex(i[a-7],i[a-1],"rect",void 0,void 0,void 0,Object.fromEntries([[i[a-5],i[a-3]]]));break;case 63:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"cylinder");break;case 64:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"round");break;case 65:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"diamond");break;case 66:this.$=i[a-5],n.addVertex(i[a-5],i[a-2],"hexagon");break;case 67:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"odd");break;case 68:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"trapezoid");break;case 69:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"inv_trapezoid");break;case 70:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"lean_right");break;case 71:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"lean_left");break;case 72:this.$=i[a],n.addVertex(i[a]);break;case 73:i[a-1].text=i[a],this.$=i[a-1];break;case 74:case 75:i[a-2].text=i[a-1],this.$=i[a-2];break;case 77:var o=n.destructLink(i[a],i[a-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:i[a-1]};break;case 78:case 84:case 99:case 101:this.$={text:i[a],type:"text"};break;case 79:case 85:case 100:this.$={text:i[a-1].text+""+i[a],type:i[a-1].type};break;case 80:case 86:this.$={text:i[a],type:"string"};break;case 81:case 87:case 102:this.$={text:i[a],type:"markdown"};break;case 82:o=n.destructLink(i[a]),this.$={type:o.type,stroke:o.stroke,length:o.length};break;case 83:this.$=i[a-1];break;case 103:this.$=i[a-4],n.addClass(i[a-2],i[a]);break;case 104:this.$=i[a-4],n.setClass(i[a-2],i[a]);break;case 105:case 113:this.$=i[a-1],n.setClickEvent(i[a-1],i[a]);break;case 106:case 114:this.$=i[a-3],n.setClickEvent(i[a-3],i[a-2]),n.setTooltip(i[a-3],i[a]);break;case 107:this.$=i[a-2],n.setClickEvent(i[a-2],i[a-1],i[a]);break;case 108:this.$=i[a-4],n.setClickEvent(i[a-4],i[a-3],i[a-2]),n.setTooltip(i[a-4],i[a]);break;case 109:this.$=i[a-2],n.setLink(i[a-2],i[a]);break;case 110:this.$=i[a-4],n.setLink(i[a-4],i[a-2]),n.setTooltip(i[a-4],i[a]);break;case 111:this.$=i[a-4],n.setLink(i[a-4],i[a-2],i[a]);break;case 112:this.$=i[a-6],n.setLink(i[a-6],i[a-4],i[a]),n.setTooltip(i[a-6],i[a-2]);break;case 115:this.$=i[a-1],n.setLink(i[a-1],i[a]);break;case 116:this.$=i[a-3],n.setLink(i[a-3],i[a-2]),n.setTooltip(i[a-3],i[a]);break;case 117:this.$=i[a-3],n.setLink(i[a-3],i[a-2],i[a]);break;case 118:this.$=i[a-5],n.setLink(i[a-5],i[a-4],i[a]),n.setTooltip(i[a-5],i[a-2]);break;case 119:this.$=i[a-4],n.addVertex(i[a-2],void 0,void 0,i[a]);break;case 120:this.$=i[a-4],n.updateLink([i[a-2]],i[a]);break;case 121:this.$=i[a-4],n.updateLink(i[a-2],i[a]);break;case 122:this.$=i[a-8],n.updateLinkInterpolate([i[a-6]],i[a-2]),n.updateLink([i[a-6]],i[a]);break;case 123:this.$=i[a-8],n.updateLinkInterpolate(i[a-6],i[a-2]),n.updateLink(i[a-6],i[a]);break;case 124:this.$=i[a-6],n.updateLinkInterpolate([i[a-4]],i[a]);break;case 125:this.$=i[a-6],n.updateLinkInterpolate(i[a-4],i[a]);break;case 127:case 129:i[a-2].push(i[a]),this.$=i[a-2];break;case 180:case 182:this.$=i[a-1]+""+i[a];break;case 183:this.$={stmt:"dir",value:"TB"};break;case 184:this.$={stmt:"dir",value:"BT"};break;case 185:this.$={stmt:"dir",value:"RL"};break;case 186:this.$={stmt:"dir",value:"LR"}}}),"anonymous"),table:[{3:1,4:2,9:e,10:s,12:n},{1:[3]},t(r,i,{5:6}),{4:7,9:e,10:s,12:n},{4:8,9:e,10:s,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:u,9:a,10:o,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),{8:[1,54],9:[1,55],10:I,15:53,18:56},t(K,[2,3]),t(K,[2,4]),t(K,[2,5]),t(K,[2,6]),t(K,[2,7]),t(K,[2,8]),{8:N,9:P,11:O,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:N,9:P,11:O,21:66},{8:N,9:P,11:O,21:67},{8:N,9:P,11:O,21:68},{8:N,9:P,11:O,21:69},{8:N,9:P,11:O,21:70},{8:N,9:P,10:[1,71],11:O,21:72},t(K,[2,36]),{35:[1,73]},{37:[1,74]},t(K,[2,39]),t(M,[2,50],{18:75,39:76,10:I,40:V}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:U,44:G,60:W,79:[1,85],88:Y,94:[1,82],96:[1,83],100:84,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z,119:86},t(K,[2,183]),t(K,[2,184]),t(K,[2,185]),t(K,[2,186]),t(J,[2,51]),t(J,[2,54],{46:[1,98]}),t(tt,[2,72],{112:111,29:[1,99],44:g,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:f,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:D,101:x,104:C,105:T,108:S,110:F,113:_,114:B,115:v}),t(et,[2,179]),t(et,[2,140]),t(et,[2,141]),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(r,[2,12]),t(r,[2,18]),t(r,[2,19]),{9:[1,112]},t(st,[2,26],{18:113,10:I}),t(K,[2,27]),{42:114,43:38,44:g,45:39,47:40,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(K,[2,40]),t(K,[2,41]),t(K,[2,42]),t(nt,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:rt,118:it},t([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),t(K,[2,28]),t(K,[2,29]),t(K,[2,30]),t(K,[2,31]),t(K,[2,32]),{10:ut,12:at,14:ot,27:ct,28:124,32:lt,44:ht,60:dt,75:pt,79:[1,126],80:[1,127],82:137,83:At,84:gt,85:ft,86:yt,87:kt,88:bt,89:Et,90:125,104:mt,108:Dt,110:xt,113:Ct,114:Tt,115:St},t(Ft,i,{5:150}),t(K,[2,37]),t(K,[2,38]),t(M,[2,48],{44:_t}),t(M,[2,49],{18:152,10:I,40:Bt}),t(J,[2,44]),{44:g,47:154,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{101:[1,155],102:156,104:[1,157]},{44:g,47:158,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{44:g,47:159,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(vt,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},t(vt,[2,113],{119:164,10:[1,163],14:U,44:G,60:W,88:Y,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z}),t(vt,[2,115],{10:[1,165]}),t(wt,[2,181]),t(wt,[2,168]),t(wt,[2,169]),t(wt,[2,170]),t(wt,[2,171]),t(wt,[2,172]),t(wt,[2,173]),t(wt,[2,174]),t(wt,[2,175]),t(wt,[2,176]),t(wt,[2,177]),t(wt,[2,178]),{44:g,47:166,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{30:167,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:175,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:177,50:[1,176],67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:178,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:179,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:180,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{108:[1,181]},{30:182,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:183,65:[1,184],67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:185,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:186,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:187,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},t(et,[2,180]),t(r,[2,20]),t(st,[2,25]),t(M,[2,46],{39:188,18:189,10:I,40:V}),t(nt,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{77:[1,193],78:194,115:rt,118:it},t(Pt,[2,78]),t(Pt,[2,80]),t(Pt,[2,81]),t(Pt,[2,166]),t(Pt,[2,167]),{8:N,9:P,10:ut,11:O,12:at,14:ot,21:196,27:ct,29:[1,195],32:lt,44:ht,60:dt,75:pt,82:137,83:At,84:gt,85:ft,86:yt,87:kt,88:bt,89:Et,90:197,104:mt,108:Dt,110:xt,113:Ct,114:Tt,115:St},t(Ot,[2,99]),t(Ot,[2,101]),t(Ot,[2,102]),t(Ot,[2,155]),t(Ot,[2,156]),t(Ot,[2,157]),t(Ot,[2,158]),t(Ot,[2,159]),t(Ot,[2,160]),t(Ot,[2,161]),t(Ot,[2,162]),t(Ot,[2,163]),t(Ot,[2,164]),t(Ot,[2,165]),t(Ot,[2,88]),t(Ot,[2,89]),t(Ot,[2,90]),t(Ot,[2,91]),t(Ot,[2,92]),t(Ot,[2,93]),t(Ot,[2,94]),t(Ot,[2,95]),t(Ot,[2,96]),t(Ot,[2,97]),t(Ot,[2,98]),{6:11,7:12,8:u,9:a,10:o,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,198],33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},{10:I,18:199},{44:[1,200]},t(J,[2,43]),{10:[1,201],44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:111,113:_,114:B,115:v},{10:[1,202]},{10:[1,203],105:[1,204]},t(Mt,[2,126]),{10:[1,205],44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:111,113:_,114:B,115:v},{10:[1,206],44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:111,113:_,114:B,115:v},{79:[1,207]},t(vt,[2,107],{10:[1,208]}),t(vt,[2,109],{10:[1,209]}),{79:[1,210]},t(wt,[2,182]),{79:[1,211],97:[1,212]},t(J,[2,55],{112:111,44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,113:_,114:B,115:v}),{31:[1,213],67:$t,81:214,115:It,116:Kt,117:Nt},t(Vt,[2,84]),t(Vt,[2,86]),t(Vt,[2,87]),t(Vt,[2,151]),t(Vt,[2,152]),t(Vt,[2,153]),t(Vt,[2,154]),{49:[1,215],67:$t,81:214,115:It,116:Kt,117:Nt},{30:216,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{51:[1,217],67:$t,81:214,115:It,116:Kt,117:Nt},{53:[1,218],67:$t,81:214,115:It,116:Kt,117:Nt},{55:[1,219],67:$t,81:214,115:It,116:Kt,117:Nt},{57:[1,220],67:$t,81:214,115:It,116:Kt,117:Nt},{60:[1,221]},{64:[1,222],67:$t,81:214,115:It,116:Kt,117:Nt},{66:[1,223],67:$t,81:214,115:It,116:Kt,117:Nt},{30:224,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{31:[1,225],67:$t,81:214,115:It,116:Kt,117:Nt},{67:$t,69:[1,226],71:[1,227],81:214,115:It,116:Kt,117:Nt},{67:$t,69:[1,229],71:[1,228],81:214,115:It,116:Kt,117:Nt},t(M,[2,45],{18:152,10:I,40:Bt}),t(M,[2,47],{44:_t}),t(nt,[2,75]),t(nt,[2,74]),{62:[1,230],67:$t,81:214,115:It,116:Kt,117:Nt},t(nt,[2,77]),t(Pt,[2,79]),{30:231,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},t(Ft,i,{5:232}),t(Ot,[2,100]),t(K,[2,35]),{43:233,44:g,45:39,47:40,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{10:I,18:234},{10:Ut,60:Gt,83:Wt,91:235,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{10:Ut,60:Gt,83:Wt,91:246,103:[1,247],104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{10:Ut,60:Gt,83:Wt,91:248,103:[1,249],104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{104:[1,250]},{10:Ut,60:Gt,83:Wt,91:251,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{44:g,47:252,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(vt,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},t(vt,[2,114]),t(vt,[2,116],{10:[1,256]}),t(vt,[2,117]),t(tt,[2,56]),t(Vt,[2,85]),t(tt,[2,57]),{51:[1,257],67:$t,81:214,115:It,116:Kt,117:Nt},t(tt,[2,64]),t(tt,[2,59]),t(tt,[2,60]),t(tt,[2,61]),{108:[1,258]},t(tt,[2,63]),t(tt,[2,65]),{66:[1,259],67:$t,81:214,115:It,116:Kt,117:Nt},t(tt,[2,67]),t(tt,[2,68]),t(tt,[2,70]),t(tt,[2,69]),t(tt,[2,71]),t([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:$t,81:214,115:It,116:Kt,117:Nt},{6:11,7:12,8:u,9:a,10:o,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,261],33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},t(J,[2,53]),{43:262,44:g,45:39,47:40,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(vt,[2,119],{105:qt}),t(Qt,[2,128],{107:264,10:Ut,60:Gt,83:Wt,104:Yt,108:jt,109:Xt,110:zt,111:Ht}),t(Zt,[2,130]),t(Zt,[2,132]),t(Zt,[2,133]),t(Zt,[2,134]),t(Zt,[2,135]),t(Zt,[2,136]),t(Zt,[2,137]),t(Zt,[2,138]),t(Zt,[2,139]),t(vt,[2,120],{105:qt}),{10:[1,265]},t(vt,[2,121],{105:qt}),{10:[1,266]},t(Mt,[2,127]),t(vt,[2,103],{105:qt}),t(vt,[2,104],{112:111,44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,113:_,114:B,115:v}),t(vt,[2,108]),t(vt,[2,110],{10:[1,267]}),t(vt,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:N,9:P,11:O,21:272},t(K,[2,34]),t(J,[2,52]),{10:Ut,60:Gt,83:Wt,104:Yt,106:273,107:237,108:jt,109:Xt,110:zt,111:Ht},t(Zt,[2,131]),{14:U,44:G,60:W,88:Y,100:274,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z,119:86},{14:U,44:G,60:W,88:Y,100:275,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z,119:86},{97:[1,276]},t(vt,[2,118]),t(tt,[2,58]),{30:277,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},t(tt,[2,66]),t(Ft,i,{5:278}),t(Qt,[2,129],{107:264,10:Ut,60:Gt,83:Wt,104:Yt,108:jt,109:Xt,110:zt,111:Ht}),t(vt,[2,124],{119:164,10:[1,279],14:U,44:G,60:W,88:Y,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z}),t(vt,[2,125],{119:164,10:[1,280],14:U,44:G,60:W,88:Y,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z}),t(vt,[2,112]),{31:[1,281],67:$t,81:214,115:It,116:Kt,117:Nt},{6:11,7:12,8:u,9:a,10:o,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,282],33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},{10:Ut,60:Gt,83:Wt,91:283,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{10:Ut,60:Gt,83:Wt,91:284,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},t(tt,[2,62]),t(K,[2,33]),t(vt,[2,122],{105:qt}),t(vt,[2,123],{105:qt})],defaultActions:{},parseError:(0,l.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,l.K2)((function(t){var e=this,s=[0],n=[],r=[null],i=[],u=this.table,a="",o=0,c=0,h=0,d=i.slice.call(arguments,1),p=Object.create(this.lexer),A={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(A.yy[g]=this.yy[g]);p.setInput(t,A.yy),A.yy.lexer=p,A.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;i.push(f);var y=p.options&&p.options.ranges;function k(){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 A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)((function(t){s.length=s.length-2*t,r.length=r.length-t,i.length=i.length-t}),"popStack"),(0,l.K2)(k,"lex");for(var b,E,m,D,x,C,T,S,F,_={};;){if(m=s[s.length-1],this.defaultActions[m]?D=this.defaultActions[m]:(null==b&&(b=k()),D=u[m]&&u[m][b]),void 0===D||!D.length||!D[0]){var B;for(C in F=[],u[m])this.terminals_[C]&&C>2&&F.push("'"+this.terminals_[C]+"'");B=p.showPosition?"Parse error on line "+(o+1)+":\n"+p.showPosition()+"\nExpecting "+F.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(B,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:F})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+b);switch(D[0]){case 1:s.push(b),r.push(p.yytext),i.push(p.yylloc),s.push(D[1]),b=null,E?(b=E,E=null):(c=p.yyleng,a=p.yytext,o=p.yylineno,f=p.yylloc,h>0&&h--);break;case 2:if(T=this.productions_[D[1]][1],_.$=r[r.length-T],_._$={first_line:i[i.length-(T||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(T||1)].first_column,last_column:i[i.length-1].last_column},y&&(_._$.range=[i[i.length-(T||1)].range[0],i[i.length-1].range[1]]),void 0!==(x=this.performAction.apply(_,[a,c,o,A.yy,D[1],r,i].concat(d))))return x;T&&(s=s.slice(0,-1*T*2),r=r.slice(0,-1*T),i=i.slice(0,-1*T)),s.push(this.productions_[D[1]][0]),r.push(_.$),i.push(_._$),S=u[s[s.length-2]][s[s.length-1]],s.push(S);break;case 3:return!0}}return!0}),"parse")},te=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,s=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),s.length-1&&(this.yylineno-=s.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"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 s,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(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],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var i in r)this[i]=r[i];return!1}return!1}),"test_match"),next:(0,l.K2)((function(){if(this.done)return this.EOF;var t,e,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),i=0;ie[0].length)){if(e=s,n=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[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(){return this.next()||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:{},performAction:(0,l.K2)((function(t,e,s,n){switch(s){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 s=/\n\s*/g;return e.yytext=e.yytext.replace(s,"
"),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 18:return 95;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 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 34:return 87;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 97;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 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:case 101:return 110;case 61:return 46;case 62:return 60;case 63:case 102:return 44;case 64:return 8;case 65:return 105;case 66:case 100:return 114;case 67:case 70:case 73:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:case 72:case 75:return 118;case 71:return this.pushState("thickEdgeText"),75;case 74:return this.pushState("dottedEdgeText"),75;case 76:return 77;case 77:return this.popState(),53;case 78:case 114:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case 107:return this.pushState("text"),62;case 108:return this.popState(),51;case 109:return this.pushState("text"),50;case 110:return this.popState(),31;case 111:return this.pushState("text"),29;case 112:return this.popState(),66;case 113:return this.pushState("text"),65;case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118: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]*)/,/^(?:[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,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],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,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}}}();function ee(){this.yy={}}return Jt.lexer=te,(0,l.K2)(ee,"Parser"),ee.prototype=Jt,Jt.Parser=ee,new ee}();bt.parser=bt;var Et=bt,mt=(0,l.K2)(((t,e)=>{const s=d.A,n=s(t,"r"),r=s(t,"g"),i=s(t,"b");return p.A(n,r,i,e)}),"fade"),Dt={parser:Et,db:yt,renderer:kt,styles:(0,l.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: ${mt(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`),"getStyles"),init:(0,l.K2)((t=>{t.flowchart||(t.flowchart={}),t.layout&&(0,l.XV)({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,(0,l.XV)({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),yt.clear(),yt.setGen("gen-2")}),"init")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/540-ae28fd42.chunk.min.js b/docs/hugo/public/js/540-ae28fd42.chunk.min.js new file mode 100644 index 000000000..414f9b03c --- /dev/null +++ b/docs/hugo/public/js/540-ae28fd42.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[540],{3814:(t,e,a)=>{a.d(e,{CP:()=>l,HT:()=>h,PB:()=>d,aC:()=>c,lC:()=>n,m:()=>o,tk:()=>i});var r=a(9502),s=a(6750),i=(0,r.K2)(((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a}),"drawRect"),n=(0,r.K2)(((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};i(t,a).lower()}),"drawBackgroundRect"),o=(0,r.K2)(((t,e)=>{const a=e.text.replace(r.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const i=s.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(a),s}),"drawText"),c=(0,r.K2)(((t,e,a,r)=>{const i=t.append("image");i.attr("x",e),i.attr("y",a);const n=(0,s.J)(r);i.attr("xlink:href",n)}),"drawImage"),l=(0,r.K2)(((t,e,a,r)=>{const i=t.append("use");i.attr("x",e),i.attr("y",a);const n=(0,s.J)(r);i.attr("xlink:href",`#${n}`)}),"drawEmbeddedImage"),d=(0,r.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),h=(0,r.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")},8160:(t,e,a)=>{a.d(e,{m:()=>s});var r=a(9502),s=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},8540:(t,e,a)=>{a.d(e,{diagram:()=>Ut});var r=a(3814),s=a(8160),i=a(8159),n=a(9502),o=a(4852),c=a(6750),l=function(){var t=(0,n.K2)((function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a}),"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],o=[1,11],c=[1,13],l=[1,14],d=[1,16],h=[1,17],p=[1,18],g=[1,24],u=[1,25],x=[1,26],y=[1,27],m=[1,28],b=[1,29],T=[1,30],f=[1,31],E=[1,32],w=[1,33],I=[1,34],L=[1,35],_=[1,36],P=[1,37],k=[1,38],A=[1,39],v=[1,41],N=[1,42],M=[1,43],D=[1,44],O=[1,45],S=[1,46],K=[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,54,59,60,61,62,70],R=[4,5,16,50,52,53],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],C=[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,54,59,60,61,62,70],B=[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,54,59,60,61,62,70],$=[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,54,59,60,61,62,70],V=[68,69,70],F=[1,122],W={trace:(0,n.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,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$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",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"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],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:(0,n.K2)((function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 62:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 53:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 54:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 55:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-2],i[o]];break;case 63:this.$=r.PLACEMENT.LEFTOF;break;case 64:this.$=r.PLACEMENT.RIGHTOF;break;case 65:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 67:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 68:this.$={type:"addParticipant",actor:i[o]};break;case 69:this.$=r.LINETYPE.SOLID_OPEN;break;case 70:this.$=r.LINETYPE.DOTTED_OPEN;break;case 71:this.$=r.LINETYPE.SOLID;break;case 72:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=r.LINETYPE.DOTTED;break;case 74:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=r.LINETYPE.SOLID_CROSS;break;case 76:this.$=r.LINETYPE.DOTTED_CROSS;break;case 77:this.$=r.LINETYPE.SOLID_POINT;break;case 78:this.$=r.LINETYPE.DOTTED_POINT;break;case 79:this.$=r.parseMessage(i[o].trim().substring(1))}}),"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},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,54,59,60,61,62,70],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:o,8:8,9:10,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},t(K,[2,5]),{9:47,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},t(K,[2,7]),t(K,[2,8]),t(K,[2,14]),{12:48,50:P,52:k,53:A},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(K,[2,29]),t(K,[2,30]),{32:[1,61]},{34:[1,62]},t(K,[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,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:S},{22:90,70:S},{22:91,70:S},{22:92,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(K,[2,6]),t(K,[2,15]),t(R,[2,9],{10:93}),t(K,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(K,[2,21]),{5:[1,97]},{5:[1,98]},t(K,[2,24]),t(K,[2,25]),t(K,[2,26]),t(K,[2,27]),t(K,[2,28]),t(K,[2,31]),t(K,[2,32]),t(Y,s,{7:99}),t(Y,s,{7:100}),t(Y,s,{7:101}),t(C,s,{40:102,7:103}),t(B,s,{42:104,7:105}),t(B,s,{7:105,42:106}),t($,s,{45:107,7:108}),t(Y,s,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:S},t(V,[2,69]),t(V,[2,70]),t(V,[2,71]),t(V,[2,72]),t(V,[2,73]),t(V,[2,74]),t(V,[2,75]),t(V,[2,76]),t(V,[2,77]),t(V,[2,78]),{22:118,70:S},{22:120,58:119,70:S},{70:[2,63]},{70:[2,64]},{56:121,81:F},{56:123,81:F},{56:124,81:F},{56:125,81:F},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:P,52:k,53:A},{5:[1,131]},t(K,[2,19]),t(K,[2,20]),t(K,[2,22]),t(K,[2,23]),{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,132],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,133],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,134],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,135]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,46],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,49:[1,136],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,137]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,44],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,48:[1,138],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,139]},{16:[1,140]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,42],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,47:[1,141],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,142],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{15:[1,143]},t(K,[2,49]),{15:[1,144]},t(K,[2,51]),t(K,[2,52]),{22:145,70:S},{22:146,70:S},{56:147,81:F},{56:148,81:F},{56:149,81:F},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(K,[2,16]),t(R,[2,10]),{12:151,50:P,52:k,53:A},t(R,[2,12]),t(R,[2,13]),t(K,[2,18]),t(K,[2,34]),t(K,[2,35]),t(K,[2,36]),t(K,[2,37]),{15:[1,152]},t(K,[2,38]),{15:[1,153]},t(K,[2,39]),t(K,[2,40]),{15:[1,154]},t(K,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:F},{56:158,81:F},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:S},t(R,[2,11]),t(C,s,{7:103,40:160}),t(B,s,{7:105,42:161}),t($,s,{7:108,45:162}),t(K,[2,48]),t(K,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:(0,n.K2)((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:(0,n.K2)((function(t){var e=this,a=[0],r=[],s=[null],i=[],o=this.table,c="",l=0,d=0,h=0,p=i.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;i.push(y);var m=g.options&&g.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.K2)((function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t}),"popStack"),(0,n.K2)(b,"lex");for(var T,f,E,w,I,L,_,P,k,A={};;){if(E=a[a.length-1],this.defaultActions[E]?w=this.defaultActions[E]:(null==T&&(T=b()),w=o[E]&&o[E][T]),void 0===w||!w.length||!w[0]){var v;for(L in k=[],o[E])this.terminals_[L]&&L>2&&k.push("'"+this.terminals_[L]+"'");v=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[T]||T)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==T?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(v,{text:g.match,token:this.terminals_[T]||T,line:g.yylineno,loc:y,expected:k})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+T);switch(w[0]){case 1:a.push(T),s.push(g.yytext),i.push(g.yylloc),a.push(w[1]),T=null,f?(T=f,f=null):(d=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc,h>0&&h--);break;case 2:if(_=this.productions_[w[1]][1],A.$=s[s.length-_],A._$={first_line:i[i.length-(_||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(_||1)].first_column,last_column:i[i.length-1].last_column},m&&(A._$.range=[i[i.length-(_||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(A,[c,d,l,u.yy,w[1],s,i].concat(p))))return I;_&&(a=a.slice(0,-1*_*2),s=s.slice(0,-1*_),i=i.slice(0,-1*_)),a.push(this.productions_[w[1]][0]),s.push(A.$),i.push(A._$),P=o[a[a.length-2]][a[a.length-1]],a.push(P);break;case 3:return!0}}return!0}),"parse")},q=function(){return{EOF:1,parseError:(0,n.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,n.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,n.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,n.K2)((function(t){var e=t.length,a=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 r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,n.K2)((function(){return this._more=!0,this}),"more"),reject:(0,n.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,n.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,n.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,n.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,n.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,n.K2)((function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1}),"test_match"),next:(0,n.K2)((function(){if(this.done)return this.EOF;var t,e,a,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;ie[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&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,n.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,n.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,n.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,n.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,n.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,n.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,n.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.K2)((function(t,e,a,r){switch(a){case 0:case 51:case 66:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 67:return"INVALID"}}),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?: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],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}}}();function z(){this.yy={}}return W.lexer=q,(0,n.K2)(z,"Parser"),z.prototype=W,W.Parser=z,new z}();l.parser=l;var d=l,h=new s.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}))),p=(0,n.K2)((function(t){h.records.boxes.push({name:t.text,wrap:t.wrap??M(),fill:t.color,actorKeys:[]}),h.records.currentBox=h.records.boxes.slice(-1)[0]}),"addBox"),g=(0,n.K2)((function(t,e,a,r){let s=h.records.currentBox;const i=h.records.actors.get(t);if(i){if(h.records.currentBox&&i.box&&h.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${h.records.currentBox.name}' at the same time.`);if(s=i.box?i.box:h.records.currentBox,i.box=s,i&&e===i.name&&null==a)return}if(null==a?.text&&(a={text:e,type:r}),null!=r&&null!=a.text||(a={text:e,type:r}),h.records.actors.set(t,{box:s,name:e,description:a.text,wrap:a.wrap??M(),prevActor:h.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),h.records.prevActor){const e=h.records.actors.get(h.records.prevActor);e&&(e.nextActor=t)}h.records.currentBox&&h.records.currentBox.actorKeys.push(t),h.records.prevActor=t}),"addActor"),u=(0,n.K2)((t=>{let e,a=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 h.records.messages.push({from:t,to:e,message:a?.text??"",wrap:a?.wrap??M(),type:r,activate:s}),!0}),"addSignal"),m=(0,n.K2)((function(){return h.records.boxes.length>0}),"hasAtLeastOneBox"),b=(0,n.K2)((function(){return h.records.boxes.some((t=>t.name))}),"hasAtLeastOneBoxWithTitle"),T=(0,n.K2)((function(){return h.records.messages}),"getMessages"),f=(0,n.K2)((function(){return h.records.boxes}),"getBoxes"),E=(0,n.K2)((function(){return h.records.actors}),"getActors"),w=(0,n.K2)((function(){return h.records.createdActors}),"getCreatedActors"),I=(0,n.K2)((function(){return h.records.destroyedActors}),"getDestroyedActors"),L=(0,n.K2)((function(t){return h.records.actors.get(t)}),"getActor"),_=(0,n.K2)((function(){return[...h.records.actors.keys()]}),"getActorKeys"),P=(0,n.K2)((function(){h.records.sequenceNumbersEnabled=!0}),"enableSequenceNumbers"),k=(0,n.K2)((function(){h.records.sequenceNumbersEnabled=!1}),"disableSequenceNumbers"),A=(0,n.K2)((()=>h.records.sequenceNumbersEnabled),"showSequenceNumbers"),v=(0,n.K2)((function(t){h.records.wrapEnabled=t}),"setWrap"),N=(0,n.K2)((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}}),"extractWrap"),M=(0,n.K2)((()=>void 0!==h.records.wrapEnabled?h.records.wrapEnabled:(0,n.D7)().sequence?.wrap??!1),"autoWrap"),D=(0,n.K2)((function(){h.reset(),(0,n.IU)()}),"clear"),O=(0,n.K2)((function(t){const e=t.trim(),{wrap:a,cleanedText:r}=N(e),s={text:r,wrap:a};return n.Rm.debug(`parseMessage: ${JSON.stringify(s)}`),s}),"parseMessage"),S=(0,n.K2)((function(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}const{wrap:s,cleanedText:i}=N(r);return{text:i?(0,n.jZ)(i,(0,n.D7)()):void 0,color:a,wrap:s}}),"parseBoxData"),K={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},R=(0,n.K2)((function(t,e,a){const r={actor:t,placement:e,message:a.text,wrap:a.wrap??M()},s=[].concat(t,t);h.records.notes.push(r),h.records.messages.push({from:s[0],to:s[1],message:a.text,wrap:a.wrap??M(),type:K.NOTE,placement:e})}),"addNote"),Y=(0,n.K2)((function(t,e){const a=L(t);try{let t=(0,n.jZ)(e.text,(0,n.D7)());t=t.replace(/&/g,"&"),t=t.replace(/=/g,"="),B(a,JSON.parse(t))}catch(t){n.Rm.error("error while parsing actor link text",t)}}),"addLinks"),C=(0,n.K2)((function(t,e){const a=L(t);try{const t={};let r=(0,n.jZ)(e.text,(0,n.D7)());const s=r.indexOf("@");r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");const i=r.slice(0,s-1).trim(),o=r.slice(s+1).trim();t[i]=o,B(a,t)}catch(t){n.Rm.error("error while parsing actor link text",t)}}),"addALink");function B(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}(0,n.K2)(B,"insertLinks");var $=(0,n.K2)((function(t,e){const a=L(t);try{const t=(0,n.jZ)(e.text,(0,n.D7)());V(a,JSON.parse(t))}catch(t){n.Rm.error("error while parsing actor properties text",t)}}),"addProperties");function V(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}function F(){h.records.currentBox=void 0}(0,n.K2)(V,"insertProperties"),(0,n.K2)(F,"boxEnd");var W=(0,n.K2)((function(t,e){const a=L(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&V(a,e.properties),e.links&&B(a,e.links)}catch(t){n.Rm.error("error while parsing actor details text",t)}}),"addDetails"),q=(0,n.K2)((function(t,e){if(void 0!==t?.properties)return t.properties[e]}),"getActorProperty"),z=(0,n.K2)((function(t){if(Array.isArray(t))t.forEach((function(t){z(t)}));else switch(t.type){case"sequenceIndex":h.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":g(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(h.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");h.records.lastCreated=t.actor,g(t.actor,t.actor,t.description,t.draw),h.records.createdActors.set(t.actor,h.records.messages.length);break;case"destroyParticipant":h.records.lastDestroyed=t.actor,h.records.destroyedActors.set(t.actor,h.records.messages.length);break;case"activeStart":case"activeEnd":y(t.actor,void 0,void 0,t.signalType);break;case"addNote":R(t.actor,t.placement,t.text);break;case"addLinks":Y(t.actor,t.text);break;case"addALink":C(t.actor,t.text);break;case"addProperties":$(t.actor,t.text);break;case"addDetails":W(t.actor,t.text);break;case"addMessage":if(h.records.lastCreated){if(t.to!==h.records.lastCreated)throw new Error("The created participant "+h.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");h.records.lastCreated=void 0}else if(h.records.lastDestroyed){if(t.to!==h.records.lastDestroyed&&t.from!==h.records.lastDestroyed)throw new Error("The destroyed participant "+h.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");h.records.lastDestroyed=void 0}y(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":p(t.boxData);break;case"boxEnd":F();break;case"loopStart":y(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":y(void 0,void 0,void 0,t.signalType);break;case"rectStart":y(void 0,void 0,t.color,t.signalType);break;case"optStart":y(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":y(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,n.SV)(t.text);break;case"parStart":case"and":y(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":y(void 0,void 0,t.criticalText,t.signalType);break;case"option":y(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":y(void 0,void 0,t.breakText,t.signalType)}}),"apply"),H={addActor:g,addMessage:x,addSignal:y,addLinks:Y,addDetails:W,addProperties:$,autoWrap:M,setWrap:v,enableSequenceNumbers:P,disableSequenceNumbers:k,showSequenceNumbers:A,getMessages:T,getActors:E,getCreatedActors:w,getDestroyedActors:I,getActor:L,getActorKeys:_,getActorProperty:q,getAccTitle:n.iN,getBoxes:f,getDiagramTitle:n.ab,setDiagramTitle:n.ke,getConfig:(0,n.K2)((()=>(0,n.D7)().sequence),"getConfig"),clear:D,parseMessage:O,parseBoxData:S,LINETYPE:K,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:R,setAccTitle:n.SV,apply:z,setAccDescription:n.EI,getAccDescription:n.m7,hasAtLeastOneBox:m,hasAtLeastOneBoxWithTitle:b},j=(0,n.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 .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`),"getStyles"),U="actor-top",J="actor-bottom",X="actor-man",G=(0,n.K2)((function(t,e){return(0,r.tk)(t,e)}),"drawRect"),Z=(0,n.K2)((function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var l="none";s&&(l="block !important");const d=t.append("g");d.attr("id","actor"+n+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",l);var h="";void 0!==o.class&&(h=" "+o.class);let p=o.width>a?o.width:a;const g=d.append("rect");if(g.attr("class","actorPopupMenuPanel"+h),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",p),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),null!=i){var u=20;for(let t in i){var x=d.append("a"),y=(0,c.J)(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),It(r)(t,x,o.x+10,o.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:o.height+u,width:p}}),"drawPopup"),Q=(0,n.K2)((function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"}),"popupMenuToggle"),tt=(0,n.K2)((async function(t,e,a=null){let r=t.append("foreignObject");const s=await(0,n.VJ)(e.text,(0,n.zj)()),i=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(r.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-i.width/2)).attr("y",Math.round(s.y+s.height/2-i.height/2))}else if(a){let{startx:t,stopx:s,starty:n}=a;if(t>s){const e=t;t=s,s=e}r.attr("x",Math.round(t+Math.abs(t-s)/2-i.width/2)),"loopText"===e.class?r.attr("y",Math.round(n)):r.attr("y",Math.round(n-i.height))}return[r]}),"drawKatex"),et=(0,n.K2)((function(t,e){let a=0,r=0;const s=e.text.split(n.Y2.lineBreakRegex),[o,c]=(0,i.I5)(e.fontSize);let l=[],d=0,h=(0,n.K2)((()=>e.y),"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":h=(0,n.K2)((()=>Math.round(e.y+e.textMargin)),"yfunc");break;case"middle":case"center":h=(0,n.K2)((()=>Math.round(e.y+(a+r+e.textMargin)/2)),"yfunc");break;case"bottom":case"end":h=(0,n.K2)((()=>Math.round(e.y+(a+r+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[n,p]of s.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==o&&(d=n*o);const s=t.append("text");s.attr("x",e.x),s.attr("y",h()),void 0!==e.anchor&&s.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&s.style("font-family",e.fontFamily),void 0!==c&&s.style("font-size",c),void 0!==e.fontWeight&&s.style("font-weight",e.fontWeight),void 0!==e.fill&&s.attr("fill",e.fill),void 0!==e.class&&s.attr("class",e.class),void 0!==e.dy?s.attr("dy",e.dy):0!==d&&s.attr("dy",d);const g=p||i.pe;if(e.tspan){const t=s.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else s.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(s._groups||s)[0][0].getBBox().height,a=r),l.push(s)}return l}),"drawText"),at=(0,n.K2)((function(t,e){function a(t,e,a,r,s){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-s)+" "+(t+a-1.2*s)+","+(e+r)+" "+t+","+(e+r)}(0,n.K2)(a,"genPoints");const r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,et(t,e),r}),"drawLabel"),rt=-1,st=(0,n.K2)(((t,e,a,r)=>{t.select&&a.forEach((a=>{const s=e.get(a),i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)}))}),"fixLifeLineHeights"),it=(0,n.K2)((function(t,e,a,s){const i=s?e.stopy:e.starty,o=e.x+e.width/2,c=i+e.height,l=t.append("g").lower();var d=l;s||(rt++,Object.keys(e.links||{}).length&&!a.forceMenus&&d.attr("onclick",Q(`actor${rt}_popup`)).attr("cursor","pointer"),d.append("line").attr("id","actor"+rt).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),d=l.append("g"),e.actorCnt=rt,null!=e.links&&d.attr("id","root-"+rt));const h=(0,r.PB)();var p="actor";e.properties?.class?p=e.properties.class:h.fill="#eaeaea",p+=s?` ${J}`:` ${U}`,h.x=e.x,h.y=i,h.width=e.width,h.height=e.height,h.class=p,h.rx=3,h.ry=3,h.name=e.name;const g=G(d,h);if(e.rectData=h,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,r.CP)(d,h.x+h.width-20,h.y+10,t.substr(1)):(0,r.aC)(d,h.x+h.width-20,h.y+10,t)}wt(a,(0,n.Wi)(e.description))(e.description,d,h.x,h.y,h.width,h.height,{class:"actor actor-box"},a);let u=e.height;if(g.node){const t=g.node().getBBox();e.height=t.height,u=t.height}return u}),"drawActorTypeParticipant"),nt=(0,n.K2)((function(t,e,a,s){const i=s?e.stopy:e.starty,o=e.x+e.width/2,c=i+80,l=t.append("g").lower();s||(rt++,l.append("line").attr("id","actor"+rt).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=rt);const d=t.append("g");let h=X;h+=s?` ${J}`:` ${U}`,d.attr("class",h),d.attr("name",e.name);const p=(0,r.PB)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor",p.rx=3,p.ry=3,d.append("line").attr("id","actor-man-torso"+rt).attr("x1",o).attr("y1",i+25).attr("x2",o).attr("y2",i+45),d.append("line").attr("id","actor-man-arms"+rt).attr("x1",o-18).attr("y1",i+33).attr("x2",o+18).attr("y2",i+33),d.append("line").attr("x1",o-18).attr("y1",i+60).attr("x2",o).attr("y2",i+45),d.append("line").attr("x1",o).attr("y1",i+45).attr("x2",o+18-2).attr("y2",i+60);const g=d.append("circle");g.attr("cx",e.x+e.width/2),g.attr("cy",i+10),g.attr("r",15),g.attr("width",e.width),g.attr("height",e.height);const u=d.node().getBBox();return e.height=u.height,wt(a,(0,n.Wi)(e.description))(e.description,d,p.x,p.y+35,p.width,p.height,{class:`actor ${X}`},a),e.height}),"drawActorTypeActor"),ot=(0,n.K2)((async function(t,e,a,r){switch(e.type){case"actor":return await nt(t,e,a,r);case"participant":return await it(t,e,a,r)}}),"drawActor"),ct=(0,n.K2)((function(t,e,a){const r=t.append("g");pt(r,e),e.name&&wt(a)(e.name,r,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()}),"drawBox"),lt=(0,n.K2)((function(t){return t.append("g")}),"anchorElement"),dt=(0,n.K2)((function(t,e,a,s,i){const n=(0,r.PB)(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+i%3,n.width=e.stopx-e.startx,n.height=a-e.starty,G(o,n)}),"drawActivation"),ht=(0,n.K2)((async function(t,e,a,s){const{boxMargin:i,boxTextMargin:o,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=s,g=t.append("g"),u=(0,n.K2)((function(t,e,a,r){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")}),"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let x=(0,r.HT)();x.text=a,x.x=e.startx,x.y=e.starty,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=c||20,x.textMargin=o,x.class="labelText",at(g,x),x=ft(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+i+o,x.anchor="middle",x.valign="middle",x.textMargin=o,x.class="loopText",x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=!0;let y=(0,n.Wi)(x.text)?await tt(g,x,e):et(g,x);if(void 0!==e.sectionTitles)for(const[t,a]of Object.entries(e.sectionTitles))if(a.message){x.text=a.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[t].y+i+o,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=e.wrap,(0,n.Wi)(x.text)?(e.starty=e.sections[t].y,await tt(g,x,e)):et(g,x);let r=Math.round(y.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[t].height+=r-(i+o)}return e.height=Math.round(e.stopy-e.starty),g}),"drawLoop"),pt=(0,n.K2)((function(t,e){(0,r.lC)(t,e)}),"drawBackgroundRect"),gt=(0,n.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"),ut=(0,n.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"),xt=(0,n.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"),yt=(0,n.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"),mt=(0,n.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"),bt=(0,n.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,n.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"),ft=(0,n.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"),Et=(0,n.K2)((function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),wt=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a+i/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,o,c,l,d){const{actorFontSize:h,actorFontFamily:p,actorFontWeight:g}=d,[u,x]=(0,i.I5)(h),y=t.split(n.Y2.lineBreakRegex);for(let t=0;tt.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,n.K2)((function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]}),"clear"),addBox:(0,n.K2)((function(t){this.boxes.push(t)}),"addBox"),addActor:(0,n.K2)((function(t){this.actors.push(t)}),"addActor"),addLoop:(0,n.K2)((function(t){this.loops.push(t)}),"addLoop"),addMessage:(0,n.K2)((function(t){this.messages.push(t)}),"addMessage"),addNote:(0,n.K2)((function(t){this.notes.push(t)}),"addNote"),lastActor:(0,n.K2)((function(){return this.actors[this.actors.length-1]}),"lastActor"),lastLoop:(0,n.K2)((function(){return this.loops[this.loops.length-1]}),"lastLoop"),lastMessage:(0,n.K2)((function(){return this.messages[this.messages.length-1]}),"lastMessage"),lastNote:(0,n.K2)((function(){return this.notes[this.notes.length-1]}),"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,n.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,Rt((0,n.D7)())}),"init"),updateVal:(0,n.K2)((function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])}),"updateVal"),updateBounds:(0,n.K2)((function(t,e,a,r){const s=this;let i=0;function o(o){return(0,n.K2)((function(n){i++;const c=s.sequenceItems.length-i+1;s.updateVal(n,"starty",e-c*_t.boxMargin,Math.min),s.updateVal(n,"stopy",r+c*_t.boxMargin,Math.max),s.updateVal(Pt.data,"startx",t-c*_t.boxMargin,Math.min),s.updateVal(Pt.data,"stopx",a+c*_t.boxMargin,Math.max),"activation"!==o&&(s.updateVal(n,"startx",t-c*_t.boxMargin,Math.min),s.updateVal(n,"stopx",a+c*_t.boxMargin,Math.max),s.updateVal(Pt.data,"starty",e-c*_t.boxMargin,Math.min),s.updateVal(Pt.data,"stopy",r+c*_t.boxMargin,Math.max))}),"updateItemBounds")}(0,n.K2)(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))}),"updateBounds"),insert:(0,n.K2)((function(t,e,a,r){const s=n.Y2.getMin(t,a),i=n.Y2.getMax(t,a),o=n.Y2.getMin(e,r),c=n.Y2.getMax(e,r);this.updateVal(Pt.data,"startx",s,Math.min),this.updateVal(Pt.data,"starty",o,Math.min),this.updateVal(Pt.data,"stopx",i,Math.max),this.updateVal(Pt.data,"stopy",c,Math.max),this.updateBounds(s,o,i,c)}),"insert"),newActivation:(0,n.K2)((function(t,e,a){const r=a.get(t.from),s=Yt(t.from).length||0,i=r.x+r.width/2+(s-1)*_t.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+_t.activationWidth,stopy:void 0,actor:t.from,anchored:Lt.anchorElement(e)})}),"newActivation"),endActivation:(0,n.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,n.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,n.K2)((function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))}),"newLoop"),endLoop:(0,n.K2)((function(){return this.sequenceItems.pop()}),"endLoop"),isLoopOverlap:(0,n.K2)((function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap}),"isLoopOverlap"),addSectionToLoop:(0,n.K2)((function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Pt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)}),"addSectionToLoop"),saveVerticalPos:(0,n.K2)((function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)}),"saveVerticalPos"),resetVerticalPos:(0,n.K2)((function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)}),"resetVerticalPos"),bumpVerticalPos:(0,n.K2)((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=n.Y2.getMax(this.data.stopy,this.verticalPos)}),"bumpVerticalPos"),getVerticalPos:(0,n.K2)((function(){return this.verticalPos}),"getVerticalPos"),getBounds:(0,n.K2)((function(){return{bounds:this.data,models:this.models}}),"getBounds")},kt=(0,n.K2)((async function(t,e){Pt.bumpVerticalPos(_t.boxMargin),e.height=_t.boxMargin,e.starty=Pt.getVerticalPos();const a=(0,r.PB)();a.x=e.startx,a.y=e.starty,a.width=e.width||_t.width,a.class="note";const s=t.append("g"),i=Lt.drawRect(s,a),o=(0,r.HT)();o.x=e.startx,o.y=e.starty,o.width=a.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=_t.noteFontFamily,o.fontSize=_t.noteFontSize,o.fontWeight=_t.noteFontWeight,o.anchor=_t.noteAlign,o.textMargin=_t.noteMargin,o.valign="center";const c=(0,n.Wi)(o.text)?await tt(s,o):et(s,o),l=Math.round(c.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));i.attr("height",l+2*_t.noteMargin),e.height+=l+2*_t.noteMargin,Pt.bumpVerticalPos(l+2*_t.noteMargin),e.stopy=e.starty+l+2*_t.noteMargin,e.stopx=e.startx+a.width,Pt.insert(e.startx,e.starty,e.stopx,e.stopy),Pt.models.addNote(e)}),"drawNote"),At=(0,n.K2)((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont"),vt=(0,n.K2)((t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight})),"noteFont"),Nt=(0,n.K2)((t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight})),"actorFont");async function Mt(t,e){Pt.bumpVerticalPos(10);const{startx:a,stopx:r,message:s}=e,o=n.Y2.splitBreaks(s).length,c=(0,n.Wi)(s),l=c?await(0,n.Dl)(s,(0,n.D7)()):i._K.calculateTextDimensions(s,At(_t));if(!c){const t=l.height/o;e.height+=t,Pt.bumpVerticalPos(t)}let d,h=l.height-10;const p=l.width;if(a===r){d=Pt.getVerticalPos()+h,_t.rightAngles||(h+=_t.boxMargin,d=Pt.getVerticalPos()+h),h+=30;const t=n.Y2.getMax(p/2,_t.width/2);Pt.insert(a-t,Pt.getVerticalPos()-10+h,r+t,Pt.getVerticalPos()+30+h)}else h+=_t.boxMargin,d=Pt.getVerticalPos()+h,Pt.insert(a,d-10,r,d);return Pt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,Pt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),d}(0,n.K2)(Mt,"boundMessage");var Dt=(0,n.K2)((async function(t,e,a,s){const{startx:o,stopx:c,starty:l,message:d,type:h,sequenceIndex:p,sequenceVisible:g}=e,u=i._K.calculateTextDimensions(d,At(_t)),x=(0,r.HT)();x.x=o,x.y=l+10,x.width=c-o,x.class="messageText",x.dy="1em",x.text=d,x.fontFamily=_t.messageFontFamily,x.fontSize=_t.messageFontSize,x.fontWeight=_t.messageFontWeight,x.anchor=_t.messageAlign,x.valign="center",x.textMargin=_t.wrapPadding,x.tspan=!1,(0,n.Wi)(x.text)?await tt(t,x,{startx:o,stopx:c,starty:a}):et(t,x);const y=u.width;let m;o===c?m=_t.rightAngles?t.append("path").attr("d",`M ${o},${a} H ${o+n.Y2.getMax(_t.width/2,y/2)} V ${a+25} H ${o}`):t.append("path").attr("d","M "+o+","+a+" C "+(o+60)+","+(a-10)+" "+(o+60)+","+(a+30)+" "+o+","+(a+20)):(m=t.append("line"),m.attr("x1",o),m.attr("y1",a),m.attr("x2",c),m.attr("y2",a)),h===s.db.LINETYPE.DOTTED||h===s.db.LINETYPE.DOTTED_CROSS||h===s.db.LINETYPE.DOTTED_POINT||h===s.db.LINETYPE.DOTTED_OPEN||h===s.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let b="";_t.arrowMarkerAbsolute&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),h!==s.db.LINETYPE.SOLID&&h!==s.db.LINETYPE.DOTTED||m.attr("marker-end","url("+b+"#arrowhead)"),h!==s.db.LINETYPE.BIDIRECTIONAL_SOLID&&h!==s.db.LINETYPE.BIDIRECTIONAL_DOTTED||(m.attr("marker-start","url("+b+"#arrowhead)"),m.attr("marker-end","url("+b+"#arrowhead)")),h!==s.db.LINETYPE.SOLID_POINT&&h!==s.db.LINETYPE.DOTTED_POINT||m.attr("marker-end","url("+b+"#filled-head)"),h!==s.db.LINETYPE.SOLID_CROSS&&h!==s.db.LINETYPE.DOTTED_CROSS||m.attr("marker-end","url("+b+"#crosshead)"),(g||_t.showSequenceNumbers)&&(m.attr("marker-start","url("+b+"#sequencenumber)"),t.append("text").attr("x",o).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(p))}),"drawMessage"),Ot=(0,n.K2)((function(t,e,a,r,s,i,o){let c,l=0,d=0,h=0;for(const t of r){const r=e.get(t),i=r.box;c&&c!=i&&(o||Pt.models.addBox(c),d+=_t.boxMargin+c.margin),i&&i!=c&&(o||(i.x=l+d,i.y=s),d+=i.margin),r.width=r.width||_t.width,r.height=n.Y2.getMax(r.height||_t.height,_t.height),r.margin=r.margin||_t.actorMargin,h=n.Y2.getMax(h,r.height),a.get(r.name)&&(d+=r.width/2),r.x=l+d,r.starty=Pt.getVerticalPos(),Pt.insert(r.x,s,r.x+r.width,r.height),l+=r.width+d,r.box&&(r.box.width=l+i.margin-r.box.x),d=r.margin,c=r.box,Pt.models.addActor(r)}c&&!o&&Pt.models.addBox(c),Pt.bumpVerticalPos(h)}),"addActorRenderingData"),St=(0,n.K2)((async function(t,e,a,r){if(r){let r=0;Pt.bumpVerticalPos(2*_t.boxMargin);for(const s of a){const a=e.get(s);a.stopy||(a.stopy=Pt.getVerticalPos());const i=await Lt.drawActor(t,a,_t,!0);r=n.Y2.getMax(r,i)}Pt.bumpVerticalPos(r+_t.boxMargin)}else for(const r of a){const a=e.get(r);await Lt.drawActor(t,a,_t,!1)}}),"drawActors"),Kt=(0,n.K2)((function(t,e,a,r){let s=0,i=0;for(const n of a){const a=e.get(n),o=Wt(a),c=Lt.drawPopup(t,a,o,_t,_t.forceMenus,r);c.height>s&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}}),"drawActorsPopup"),Rt=(0,n.K2)((function(t){(0,n.hH)(_t,t),t.fontFamily&&(_t.actorFontFamily=_t.noteFontFamily=_t.messageFontFamily=t.fontFamily),t.fontSize&&(_t.actorFontSize=_t.noteFontSize=_t.messageFontSize=t.fontSize),t.fontWeight&&(_t.actorFontWeight=_t.noteFontWeight=_t.messageFontWeight=t.fontWeight)}),"setConf"),Yt=(0,n.K2)((function(t){return Pt.activations.filter((function(e){return e.actor===t}))}),"actorActivations"),Ct=(0,n.K2)((function(t,e){const a=e.get(t),r=Yt(t);return[r.reduce((function(t,e){return n.Y2.getMin(t,e.startx)}),a.x+a.width/2-1),r.reduce((function(t,e){return n.Y2.getMax(t,e.stopx)}),a.x+a.width/2+1)]}),"activationBounds");function Bt(t,e,a,r,s){Pt.bumpVerticalPos(a);let o=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,s=At(_t);e.message=i._K.wrapLabel(`[${e.message}]`,a-2*_t.wrapPadding,s),e.width=a,e.wrap=!0;const c=i._K.calculateTextDimensions(e.message,s),l=n.Y2.getMax(c.height,_t.labelBoxHeight);o=r+l,n.Rm.debug(`${l} - ${e.message}`)}s(e),Pt.bumpVerticalPos(o)}function $t(t,e,a,r,s,i,o){function c(a,r){a.x{t.add(e.from),t.add(e.to)})),y=y.filter((e=>t.has(e)))}Ot(h,p,g,y,0,m,!1);const w=await jt(m,p,E,r);function I(t,e){const a=Pt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),Lt.drawActivation(h,a,e,_t,Yt(t.from).length),Pt.insert(a.startx,e-10,a.stopx,e)}Lt.insertArrowHead(h),Lt.insertArrowCrossHead(h),Lt.insertArrowFilledHead(h),Lt.insertSequenceNumber(h),(0,n.K2)(I,"activeEnd");let L=1,_=1;const P=[],k=[];let A=0;for(const t of m){let e,a,s;switch(t.type){case r.db.LINETYPE.NOTE:Pt.resetVerticalPos(),a=t.noteModel,await kt(h,a);break;case r.db.LINETYPE.ACTIVE_START:Pt.newActivation(t,h,p);break;case r.db.LINETYPE.ACTIVE_END:I(t,Pt.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.LOOP_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"loop",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.RECT_START:Bt(w,t,_t.boxMargin,_t.boxMargin,(t=>Pt.newLoop(void 0,t.message)));break;case r.db.LINETYPE.RECT_END:e=Pt.endLoop(),k.push(e),Pt.models.addLoop(e),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.OPT_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"opt",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.ALT_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.ALT_ELSE:Bt(w,t,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.ALT_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"alt",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t))),Pt.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:Bt(w,t,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.PAR_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"par",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.AUTONUMBER:L=t.message.start||L,_=t.message.step||_,t.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.CRITICAL_OPTION:Bt(w,t,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.CRITICAL_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"critical",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.BREAK_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.BREAK_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"break",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;default:try{s=t.msgModel,s.starty=Pt.getVerticalPos(),s.sequenceIndex=L,s.sequenceVisible=r.db.showSequenceNumbers();const e=await Mt(0,s);$t(t,s,e,A,p,g,u),P.push({messageModel:s,lineStartY:e}),Pt.models.addMessage(s)}catch(t){n.Rm.error("error while drawing message",t)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(L+=_),A++}n.Rm.debug("createdActors",g),n.Rm.debug("destroyedActors",u),await St(h,p,y,!1);for(const t of P)await Dt(h,t.messageModel,t.lineStartY,r);_t.mirrorActors&&await St(h,p,y,!0),k.forEach((t=>Lt.drawBackgroundRect(h,t))),st(h,p,y,_t);for(const t of Pt.models.boxes)t.height=Pt.getVerticalPos()-t.y,Pt.insert(t.x,t.y,t.x+t.width,t.height),t.startx=t.x,t.starty=t.y,t.stopx=t.startx+t.width,t.stopy=t.starty+t.height,t.stroke="rgb(0,0,0, 0.5)",Lt.drawBox(h,t,_t);T&&Pt.bumpVerticalPos(_t.boxMargin);const v=Kt(h,p,y,d),{bounds:N}=Pt.getBounds();void 0===N.startx&&(N.startx=0),void 0===N.starty&&(N.starty=0),void 0===N.stopx&&(N.stopx=0),void 0===N.stopy&&(N.stopy=0);let M=N.stopy-N.starty;M{const a=At(_t);let r=e.actorKeys.reduce(((e,a)=>e+(t.get(a).width+(t.get(a).margin||0))),0);r-=2*_t.boxTextMargin,e.wrap&&(e.name=i._K.wrapLabel(e.name,r-2*_t.wrapPadding,a));const o=i._K.calculateTextDimensions(e.name,a);s=n.Y2.getMax(o.height,s);const c=n.Y2.getMax(r,o.width+2*_t.wrapPadding);if(e.margin=_t.boxTextMargin,rt.textMaxHeight=s)),n.Y2.getMax(r,_t.height)}(0,n.K2)(qt,"calculateActorMargins");var zt=(0,n.K2)((async function(t,e,a){const r=e.get(t.from),s=e.get(t.to),o=r.x,c=s.x,l=t.wrap&&t.message;let d=(0,n.Wi)(t.message)?await(0,n.Dl)(t.message,(0,n.D7)()):i._K.calculateTextDimensions(l?i._K.wrapLabel(t.message,_t.width,vt(_t)):t.message,vt(_t));const h={width:l?_t.width:n.Y2.getMax(_t.width,d.width+2*_t.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(h.width=l?n.Y2.getMax(_t.width,d.width):n.Y2.getMax(r.width/2+s.width/2,d.width+2*_t.noteMargin),h.startx=o+(r.width+_t.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(h.width=l?n.Y2.getMax(_t.width,d.width+2*_t.noteMargin):n.Y2.getMax(r.width/2+s.width/2,d.width+2*_t.noteMargin),h.startx=o-h.width+(r.width-_t.actorMargin)/2):t.to===t.from?(d=i._K.calculateTextDimensions(l?i._K.wrapLabel(t.message,n.Y2.getMax(_t.width,r.width),vt(_t)):t.message,vt(_t)),h.width=l?n.Y2.getMax(_t.width,r.width):n.Y2.getMax(r.width,_t.width,d.width+2*_t.noteMargin),h.startx=o+(r.width-h.width)/2):(h.width=Math.abs(o+r.width/2-(c+s.width/2))+_t.actorMargin,h.startx=o2,g=(0,n.K2)((t=>l?-t:t),"adjustValue");t.from===t.to?h=d:(t.activate&&!p&&(h+=g(_t.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(h+=g(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(d-=g(3)));const u=[r,s,o,c],x=Math.abs(d-h);t.wrap&&t.message&&(t.message=i._K.wrapLabel(t.message,n.Y2.getMax(x+2*_t.wrapPadding,_t.width),At(_t)));const y=i._K.calculateTextDimensions(t.message,At(_t));return{width:n.Y2.getMax(t.wrap?0:y.width+2*_t.wrapPadding,x+2*_t.wrapPadding,_t.width),height:0,startx:d,stopx:h,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,u),toBounds:Math.max.apply(null,u)}}),"buildMessageModel"),jt=(0,n.K2)((async function(t,e,a,r){const s={},o=[];let c,l,d;for(const a of t){switch(a.id=i._K.random({length:10}),a.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:o.push({id:a.id,msg:a.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:a.message&&(c=o.pop(),s[c.id]=c,s[a.id]=c,o.push(c));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:c=o.pop(),s[c.id]=c;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(a.from?a.from:a.to.actor),r=Yt(a.from?a.from:a.to.actor).length,s=t.x+t.width/2+(r-1)*_t.activationWidth/2,i={startx:s,stopx:s+_t.activationWidth,actor:a.from,enabled:!0};Pt.activations.push(i)}break;case r.db.LINETYPE.ACTIVE_END:{const t=Pt.activations.map((t=>t.actor)).lastIndexOf(a.from);Pt.activations.splice(t,1).splice(0,1)}}void 0!==a.placement?(l=await zt(a,e,r),a.noteModel=l,o.forEach((t=>{c=t,c.from=n.Y2.getMin(c.from,l.startx),c.to=n.Y2.getMax(c.to,l.startx+l.width),c.width=n.Y2.getMax(c.width,Math.abs(c.from-c.to))-_t.labelBoxWidth}))):(d=Ht(a,e,r),a.msgModel=d,d.startx&&d.stopx&&o.length>0&&o.forEach((t=>{if(c=t,d.startx===d.stopx){const t=e.get(a.from),r=e.get(a.to);c.from=n.Y2.getMin(t.x-d.width/2,t.x-t.width/2,c.from),c.to=n.Y2.getMax(r.x+d.width/2,r.x+t.width/2,c.to),c.width=n.Y2.getMax(c.width,Math.abs(c.to-c.from))-_t.labelBoxWidth}else c.from=n.Y2.getMin(d.startx,c.from),c.to=n.Y2.getMax(d.stopx,c.to),c.width=n.Y2.getMax(c.width,d.width)-_t.labelBoxWidth})))}return Pt.activations=[],n.Rm.debug("Loop type widths:",s),s}),"calculateLoopBounds"),Ut={parser:d,db:H,renderer:{bounds:Pt,drawActors:St,drawActorsPopup:Kt,setConf:Rt,draw:Vt},styles:j,init:(0,n.K2)((({wrap:t})=>{H.setWrap(t)}),"init")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/545-bfa2b46e.chunk.min.js b/docs/hugo/public/js/545-bfa2b46e.chunk.min.js new file mode 100644 index 000000000..1e1adaa24 --- /dev/null +++ b/docs/hugo/public/js/545-bfa2b46e.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[545],{545:(t,i,e)=>{e.d(i,{diagram:()=>J});var s=e(6058),n=e(8159),a=e(7286),h=e(9502),o=e(4852),r=function(){var t=(0,h.K2)((function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e}),"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],a=[1,6],o=[1,7],r=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],y=[1,34],m=[1,35],b=[1,36],A=[1,37],S=[1,43],C=[1,42],w=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[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],D=[1,64],L={trace:(0,h.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,h.K2)((function(t,i,e,s,n,a,h){var o=a.length-1;switch(n){case 5:s.setOrientation(a[o]);break;case 9:s.setDiagramTitle(a[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},a[o]);break;case 13:s.setLineData(a[o-1],a[o]);break;case 14:s.setBarData({text:"",type:"text"},a[o]);break;case 15:s.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),s.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:s.setXAxisTitle(a[o]);break;case 23:s.setXAxisTitle(a[o-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(a[o]);break;case 26:s.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:s.setYAxisTitle(a[o]);break;case 31:s.setYAxisTitle(a[o-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.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(i,e,{3:1,4:2,7:4,5:s,34:n,35:a,36:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:n,35:a,36:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:a,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(r,[2,34]),t(r,[2,35]),t(r,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:n,35:a,36:o}),{1:[2,3]},t(r,[2,5]),t(i,[2,7],{4:22,34:n,35:a,36:o}),{11:23,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:39,13:38,24:S,27:C,29:40,30:41,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:45,15:44,27:w,33:46,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:49,17:48,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:52,17:51,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(T,[2,37],{40:55,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A}),t(T,[2,38]),t(T,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:S,27:C}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,11]),t(_,[2,30],{33:60,27:w}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:D},t(_,[2,14]),{17:65,24:k},t(_,[2,16]),t(_,[2,17]),t(R,[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:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,33]),t(_,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,h.K2)((function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)}),"parseError"),parse:(0,h.K2)((function(t){var i=this,e=[0],s=[],n=[null],a=[],o=this.table,r="",l=0,c=0,g=0,u=a.slice.call(arguments,1),x=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);x.setInput(t,d.yy),d.yy.lexer=x,d.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;a.push(f);var y=x.options&&x.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||x.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K2)((function(t){e.length=e.length-2*t,n.length=n.length-t,a.length=a.length-t}),"popStack"),(0,h.K2)(m,"lex");for(var b,A,S,C,w,k,_,T,R,D={};;){if(S=e[e.length-1],this.defaultActions[S]?C=this.defaultActions[S]:(null==b&&(b=m()),C=o[S]&&o[S][b]),void 0===C||!C.length||!C[0]){var L;for(k in R=[],o[S])this.terminals_[k]&&k>2&&R.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(l+1)+":\n"+x.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[b]||b,line:x.yylineno,loc:f,expected:R})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+b);switch(C[0]){case 1:e.push(b),n.push(x.yytext),a.push(x.yylloc),e.push(C[1]),b=null,A?(b=A,A=null):(c=x.yyleng,r=x.yytext,l=x.yylineno,f=x.yylloc,g>0&&g--);break;case 2:if(_=this.productions_[C[1]][1],D.$=n[n.length-_],D._$={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&&(D._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(D,[r,c,l,d.yy,C[1],n,a].concat(u))))return w;_&&(e=e.slice(0,-1*_*2),n=n.slice(0,-1*_),a=a.slice(0,-1*_)),e.push(this.productions_[C[1]][0]),n.push(D.$),a.push(D._$),T=o[e[e.length-2]][e[e.length-1]],e.push(T);break;case 3:return!0}}return!0}),"parse")},P=function(){return{EOF:1,parseError:(0,h.K2)((function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)}),"parseError"),setInput:(0,h.K2)((function(t,i){return this.yy=i||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,h.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,h.K2)((function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var n=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,h.K2)((function(){return this._more=!0,this}),"more"),reject:(0,h.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,h.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,h.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,h.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,h.K2)((function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"}),"showPosition"),test_match:(0,h.K2)((function(t,i){var e,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.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],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1}),"test_match"),next:(0,h.K2)((function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;ai[0].length)){if(i=e,s=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[s]))&&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,h.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,h.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,h.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,h.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,h.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,h.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,h.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,h.K2)((function(t,i,e,s){switch(e){case 0:case 1:case 5:case 43: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 25:case 27:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 26:this.pushState("string");break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 44:return 35;case 45: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,/^(?:(?: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,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],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:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}}}();function E(){this.yy={}}return L.lexer=P,(0,h.K2)(E,"Parser"),E.prototype=L,L.Parser=E,new E}();r.parser=r;var l=r;function c(t){return"bar"===t.type}function g(t){return"band"===t.type}function u(t){return"linear"===t.type}(0,h.K2)(c,"isBarPlot"),(0,h.K2)(g,"isBandAxisData"),(0,h.K2)(u,"isLinearAxisData");var x=class{constructor(t){this.parentGroup=t}static{(0,h.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce(((t,i)=>Math.max(i.length,t)),0)*i,height:i};const e={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const a of t){const t=(0,s.W6)(n,1,a),h=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return n.remove(),e}},d=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,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,h.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 i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const n=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const n=e.width+2*this.axisConfig.labelPadding;n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,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 i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${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 i=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 ${i},${this.getScaleValue(t)} L ${i-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 i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,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 i=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)},${i} L ${this.getScaleValue(t)},${i+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 i=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},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,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 i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+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():[]}},p=class extends d{static{(0,h.K2)(this,"BandAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.categories=e,this.scale=(0,o.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,o.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),h.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},f=class extends d{static{(0,h.K2)(this,"LinearAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.domain=e,this.scale=(0,o.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,o.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function y(t,i,e,s){const n=new x(s);return g(t)?new p(i,e,t.categories,t.title,n):new f(i,e,[t.min,t.max],t.title,n)}(0,h.K2)(y,"getAxis");var m=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,h.K2)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,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 b(t,i,e,s){const n=new x(s);return new m(n,t,i,e)}(0,h.K2)(b,"getChartTitleComponent");var A=class{constructor(t,i,e,s,n){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=n}static{(0,h.K2)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]));let i;return i="horizontal"===this.orientation?(0,o.n8j)().y((t=>t[0])).x((t=>t[1]))(t):(0,o.n8j)().x((t=>t[0])).y((t=>t[1]))(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},S=class{constructor(t,i,e,s,n,a){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{(0,h.K2)(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])])),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:this.boundingRect.x,y:t[0]-e,height:i,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]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]}},C=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,h.K2)(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}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[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new A(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new S(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function w(t,i,e){return new C(t,i,e)}(0,h.K2)(w,"getPlotComponent");var k,_=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:b(t,i,e,s),plot:w(t,i,e),xAxis:y(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:y(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{(0,h.K2)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:a});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=h.width,t-=h.width,t>0&&(n+=t,t=0),i>0&&(a+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+a}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some((t=>c(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:h});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=o.width,s=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=o.height,n=e+o.height,t>0&&(a+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([n,n+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((t=>c(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 i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},T=class{static{(0,h.K2)(this,"XYChartBuilder")}static build(t,i,e,s){return new _(t,i,e,s).getDrawableElement()}},R=0,D=$(),L=I(),P={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},E=L.plotColorPalette.split(",").map((t=>t.trim())),v=!1,K=!1;function I(){const t=(0,h.P$)(),i=(0,h.zj)();return(0,n.$t)(t.xyChart,i.themeVariables.xyChart)}function $(){const t=(0,h.zj)();return(0,n.$t)(h.UI.xyChart,t.xyChart)}function M(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function B(t){const i=(0,h.zj)();return(0,h.jZ)(t.trim(),i)}function z(t){k=t}function W(t){D.chartOrientation="horizontal"===t?"horizontal":"vertical"}function O(t){P.xAxis.title=B(t.text)}function F(t,i){P.xAxis={type:"linear",title:P.xAxis.title,min:t,max:i},v=!0}function N(t){P.xAxis={type:"band",title:P.xAxis.title,categories:t.map((t=>B(t.text)))},v=!0}function V(t){P.yAxis.title=B(t.text)}function X(t,i){P.yAxis={type:"linear",title:P.yAxis.title,min:t,max:i},K=!0}function Y(t){const i=Math.min(...t),e=Math.max(...t),s=u(P.yAxis)?P.yAxis.min:1/0,n=u(P.yAxis)?P.yAxis.max:-1/0;P.yAxis={type:"linear",title:P.yAxis.title,min:Math.min(s,i),max:Math.max(n,e)}}function U(t){let i=[];if(0===t.length)return i;if(!v){const i=u(P.xAxis)?P.xAxis.min:1/0,e=u(P.xAxis)?P.xAxis.max:-1/0;F(Math.min(i,1),Math.max(e,t.length))}if(K||Y(t),g(P.xAxis)&&(i=P.xAxis.categories.map(((i,e)=>[i,t[e]]))),u(P.xAxis)){const e=P.xAxis.min,s=P.xAxis.max,n=(s-e)/(t.length-1),a=[];for(let t=e;t<=s;t+=n)a.push(`${t}`);i=a.map(((i,e)=>[i,t[e]]))}return i}function H(t){return E[0===t?0:t%E.length]}function j(t,i){const e=U(i);P.plots.push({type:"line",strokeFill:H(R),strokeWidth:2,data:e}),R++}function G(t,i){const e=U(i);P.plots.push({type:"bar",fill:H(R),data:e}),R++}function Q(){if(0===P.plots.length)throw Error("No Plot to render, please provide a plot with some data");return P.title=(0,h.ab)(),T.build(D,P,L,k)}function Z(){return L}function q(){return D}(0,h.K2)(I,"getChartDefaultThemeConfig"),(0,h.K2)($,"getChartDefaultConfig"),(0,h.K2)(M,"getChartDefaultData"),(0,h.K2)(B,"textSanitizer"),(0,h.K2)(z,"setTmpSVGG"),(0,h.K2)(W,"setOrientation"),(0,h.K2)(O,"setXAxisTitle"),(0,h.K2)(F,"setXAxisRangeData"),(0,h.K2)(N,"setXAxisBand"),(0,h.K2)(V,"setYAxisTitle"),(0,h.K2)(X,"setYAxisRangeData"),(0,h.K2)(Y,"setYAxisRangeFromPlotData"),(0,h.K2)(U,"transformDataWithoutCategory"),(0,h.K2)(H,"getPlotColorFromPalette"),(0,h.K2)(j,"setLineData"),(0,h.K2)(G,"setBarData"),(0,h.K2)(Q,"getDrawableElem"),(0,h.K2)(Z,"getChartThemeConfig"),(0,h.K2)(q,"getChartConfig");var J={parser:l,db:{getDrawableElem:Q,clear:(0,h.K2)((function(){(0,h.IU)(),R=0,D=$(),P={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},L=I(),E=L.plotColorPalette.split(",").map((t=>t.trim())),v=!1,K=!1}),"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:W,setXAxisTitle:O,setXAxisRangeData:F,setXAxisBand:N,setYAxisTitle:V,setYAxisRangeData:X,setLineData:j,setBarData:G,setTmpSVGG:z,getChartThemeConfig:Z,getChartConfig:q},renderer:{draw:(0,h.K2)(((t,i,e,s)=>{const n=s.db,o=n.getChartThemeConfig(),r=n.getChartConfig();function l(t){return"top"===t?"text-before-edge":"middle"}function c(t){return"left"===t?"start":"right"===t?"end":"middle"}function g(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,h.K2)(l,"getDominantBaseLine"),(0,h.K2)(c,"getTextAnchor"),(0,h.K2)(g,"getTextTransformation"),h.Rm.debug("Rendering xychart chart\n"+t);const u=(0,a.D)(i),x=u.append("g").attr("class","main"),d=x.append("rect").attr("width",r.width).attr("height",r.height).attr("class","background");(0,h.a$)(u,r.height,r.width,!0),u.attr("viewBox",`0 0 ${r.width} ${r.height}`),d.attr("fill",o.backgroundColor),n.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group"));const p=n.getDrawableElem(),f={};function y(t){let i=x,e="";for(const[s]of t.entries()){let n=x;s>0&&f[e]&&(n=f[e]),e+=t[s],i=f[e],i||(i=f[e]=n.append("g").attr("class",t[s]))}return i}(0,h.K2)(y,"getGroup");for(const t of p){if(0===t.data.length)continue;const i=y(t.groupTexts);switch(t.type){case"rect":i.selectAll("rect").data(t.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));break;case"text":i.selectAll("text").data(t.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>l(t.verticalPos))).attr("text-anchor",(t=>c(t.horizontalPos))).attr("transform",(t=>g(t))).text((t=>t.text));break;case"path":i.selectAll("path").data(t.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")}}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/56-09931933.chunk.min.js b/docs/hugo/public/js/56-09931933.chunk.min.js new file mode 100644 index 000000000..0ee0532e5 --- /dev/null +++ b/docs/hugo/public/js/56-09931933.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[56],{3056:(e,r,s)=>{s.d(r,{diagram:()=>l});var a=s(6240),c=(s(6474),s(7308),s(7938),s(1282),s(1099),s(7588),s(3115),s(6058),s(8159),s(9502)),l={parser:a._$,db:a.z2,renderer:a.Lh,styles:a.tM,init:(0,c.K2)((e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,a.z2.clear()}),"init")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/567-4fef9a1a.chunk.min.js b/docs/hugo/public/js/567-4fef9a1a.chunk.min.js new file mode 100644 index 000000000..7e004a8c7 --- /dev/null +++ b/docs/hugo/public/js/567-4fef9a1a.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[567],{567:(e,n,t)=>{t.d(n,{Zp:()=>bn});var r=t(8058),o=t(3456),i=0;const u=function(e){var n=++i;return(0,o.A)(e)+n};var a=t(9142),s=t(4098),d=t(4722),c=Math.ceil,h=Math.max;var f=t(6832),v=t(3631);const l=function(e,n,t){return t&&"number"!=typeof t&&(0,f.A)(e,n,t)&&(n=t=void 0),e=(0,v.A)(e),void 0===n?(n=e,e=0):n=(0,v.A)(n),function(e,n,t,r){for(var o=-1,i=h(c((n-e)/(t||1)),0),u=Array(i);i--;)u[r?i:++o]=e,e+=t;return u}(e,n,t=void 0===t?e0;--a)if(r=n[a].dequeue()){o=o.concat(m(e,n,t,r,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return s.A(d.A(o,(function(n){return e.outEdges(n.v,n.w)})))}(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],t={},o={};return r.A(e.nodes(),(function i(u){Object.prototype.hasOwnProperty.call(o,u)||(o[u]=!0,t[u]=!0,r.A(e.outEdges(u),(function(e){Object.prototype.hasOwnProperty.call(t,e.w)?n.push(e):i(e.w)})),delete t[u])})),n}(e);r.A(n,(function(n){var t=e.edge(n);e.removeEdge(n),t.forwardName=n.name,t.reversed=!0,e.setEdge(n.w,n.v,t,u("rev"))}))}var E=t(7222),x=t(5507),k=t(6964);var O=t(5255),N=t(7424);const P=(j=function(e,n){return null==e?{}:function(e,n){return(0,x.A)(e,n,(function(n,t){return(0,k.A)(e,t)}))}(e,n)},(0,N.A)((0,O.A)(j,void 0,s.A),j+""));var j,C=t(3068),I=t(2559);const L=function(e,n){return e>n};var T=t(9008);const M=function(e){return e&&e.length?(0,I.A)(e,T.A,L):void 0};var R=t(6666),F=t(2528),D=t(9841),S=t(6307);const G=function(e,n){var t={};return n=(0,S.A)(n,3),(0,D.A)(e,(function(e,r,o){(0,F.A)(t,r,n(e,r,o))})),t};var V=t(9592),B=t(6452),q=t(9622),Y=t(1917);const z=function(){return Y.A.Date.now()};function $(e,n,t,r){var o;do{o=u(r)}while(e.hasNode(o));return t.dummy=n,e.setNode(o,t),o}function J(e){var n=new g.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.A(e.nodes(),(function(t){e.children(t).length||n.setNode(t,e.node(t))})),r.A(e.edges(),(function(t){n.setEdge(t,e.edge(t))})),n}function Z(e,n){var t,r,o=e.x,i=e.y,u=n.x-o,a=n.y-i,s=e.width/2,d=e.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*s>Math.abs(u)*d?(a<0&&(d=-d),t=d*u/a,r=d):(u<0&&(s=-s),t=s,r=s*a/u),{x:o+t,y:i+r}}function H(e){var n=d.A(l(Q(e)+1),(function(){return[]}));return r.A(e.nodes(),(function(t){var r=e.node(t),o=r.rank;V.A(o)||(n[o][r.order]=t)})),n}function K(e,n,t,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=r),$(e,"border",o,n)}function Q(e){return M(d.A(e.nodes(),(function(n){var t=e.node(n).rank;if(!V.A(t))return t})))}function U(e,n){var t=z();try{return n()}finally{console.log(e+" time: "+(z()-t)+"ms")}}function W(e,n){return n()}function X(e,n,t,r,o,i){var u={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],s=$(e,"border",u,t);o[n][i]=s,e.setParent(s,r),a&&e.setEdge(a,s,{weight:1})}function ee(e){r.A(e.nodes(),(function(n){ne(e.node(n))})),r.A(e.edges(),(function(n){ne(e.edge(n))}))}function ne(e){var n=e.width;e.width=e.height,e.height=n}function te(e){e.y=-e.y}function re(e){var n=e.x;e.x=e.y,e.y=n}var oe=t(6224);const ie=function(e,n){return e&&e.length?(0,I.A)(e,(0,S.A)(n,2),oe.A):void 0};function ue(e){var n={};r.A(e.sources(),(function t(r){var o=e.node(r);if(Object.prototype.hasOwnProperty.call(n,r))return o.rank;n[r]=!0;var i=B.A(d.A(e.outEdges(r),(function(n){return t(n.w)-e.edge(n).minlen})));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i}))}function ae(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function se(e){var n,t,r=new g.T({directed:!1}),o=e.nodes()[0],i=e.nodeCount();for(r.setNode(o,{});de(r,e)u.lim&&(a=u,s=!0);var d=ve.A(n.edges(),(function(n){return s===Fe(0,e.node(n.v),a)&&s!==Fe(0,e.node(n.w),a)}));return ie(d,(function(e){return ae(n,e)}))}function Re(e,n,t,o){var i=t.v,u=t.w;e.removeEdge(i,u),e.setEdge(o.v,o.w,{}),Ie(e),je(e,n),function(e,n){var t=fe.A(e.nodes(),(function(e){return!n.node(e).parent})),o=function(e,n){return Oe(e,n,"pre")}(e,t);o=o.slice(1),r.A(o,(function(t){var r=e.node(t).parent,o=n.edge(t,r),i=!1;o||(o=n.edge(r,t),i=!0),n.node(t).rank=n.node(r).rank+(i?o.minlen:-o.minlen)}))}(e,n)}function Fe(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}function De(e){switch(e.graph().ranker){case"network-simplex":default:!function(e){Pe(e)}(e);break;case"tight-tree":!function(e){ue(e),se(e)}(e);break;case"longest-path":Se(e)}}t(1471),Pe.initLowLimValues=Ie,Pe.initCutValues=je,Pe.calcCutValue=Ce,Pe.leaveEdge=Te,Pe.enterEdge=Me,Pe.exchangeEdges=Re;var Se=ue;var Ge=t(2866),Ve=t(3130);function Be(e){var n=$(e,"root",{},"_root"),t=function(e){var n={};function t(o,i){var u=e.children(o);u&&u.length&&r.A(u,(function(e){t(e,i+1)})),n[o]=i}return r.A(e.children(),(function(e){t(e,1)})),n}(e),o=M(Ge.A(t))-1,i=2*o+1;e.graph().nestingRoot=n,r.A(e.edges(),(function(n){e.edge(n).minlen*=i}));var u=function(e){return Ve.A(e.edges(),(function(n,t){return n+e.edge(t).weight}),0)}(e)+1;r.A(e.children(),(function(r){qe(e,n,i,u,o,t,r)})),e.graph().nodeRankFactor=i}function qe(e,n,t,o,i,u,a){var s=e.children(a);if(s.length){var d=K(e,"_bt"),c=K(e,"_bb"),h=e.node(a);e.setParent(d,a),h.borderTop=d,e.setParent(c,a),h.borderBottom=c,r.A(s,(function(r){qe(e,n,t,o,i,u,r);var s=e.node(r),h=s.borderTop?s.borderTop:r,f=s.borderBottom?s.borderBottom:r,v=s.borderTop?o:2*o,l=h!==f?1:i-u[a]+1;e.setEdge(d,h,{weight:v,minlen:l,nestingEdge:!0}),e.setEdge(f,c,{weight:v,minlen:l,nestingEdge:!0})})),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+u[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:t})}var Ye=t(4507);const ze=function(e){return(0,Ye.A)(e,5)};var $e=t(2851);const Je=function(e,n){return function(e,n,t){for(var r=-1,o=e.length,i=n.length,u={};++rn||i&&u&&s&&!a&&!d||r&&u&&s||!t&&s||!o)return 1;if(!r&&!i&&!d&&e=a?s:s*("desc"==t[r]?-1:1)}return e.index-n.index}(e,n,t)}))},nn=(0,t(4326).A)((function(e,n){if(null==e)return[];var t=n.length;return t>1&&(0,f.A)(e,n[0],n[1])?n=[]:t>2&&(0,f.A)(n[0],n[1],n[2])&&(n=[n[0]]),en(e,(0,Ze.A)(n,1),[])}));function tn(e,n){for(var t=0,r=1;r0;)n%2&&(t+=c[n+1]),c[n=n-1>>1]+=e.weight;h+=e.weight*t}))),h}function on(e,n){var t,o=function(e){var n={lhs:[],rhs:[]};return r.A(e,(function(e){var t;t=e,Object.prototype.hasOwnProperty.call(t,"barycenter")?n.lhs.push(e):n.rhs.push(e)})),n}(e),i=o.lhs,u=nn(o.rhs,(function(e){return-e.i})),a=[],d=0,c=0,h=0;i.sort((t=!!n,function(e,n){return e.barycentern.barycenter?1:t?n.i-e.i:e.i-n.i})),h=un(a,u,h),r.A(i,(function(e){h+=e.vs.length,a.push(e.vs),d+=e.barycenter*e.weight,c+=e.weight,h=un(a,u,h)}));var f={vs:s.A(a)};return c&&(f.barycenter=d/c,f.weight=c),f}function un(e,n,t){for(var r;n.length&&(r=R.A(n)).i<=t;)n.pop(),e.push(r.vs),t++;return t}function an(e,n,t,o){var i=e.children(n),u=e.node(n),a=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,h={};a&&(i=ve.A(i,(function(e){return e!==a&&e!==c})));var f=function(e,n){return d.A(n,(function(n){var t=e.inEdges(n);if(t.length){var r=Ve.A(t,(function(n,t){var r=e.edge(t),o=e.node(t.v);return{sum:n.sum+r.weight*o.order,weight:n.weight+r.weight}}),{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}return{v:n}}))}(e,i);r.A(f,(function(n){if(e.children(n.v).length){var r=an(e,n.v,t,o);h[n.v]=r,Object.prototype.hasOwnProperty.call(r,"barycenter")&&(i=n,u=r,V.A(i.barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u}));var v=function(e,n){var t={};return r.A(e,(function(e,n){var r=t[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};V.A(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)})),r.A(n.edges(),(function(e){var n=t[e.v],r=t[e.w];V.A(n)||V.A(r)||(r.indegree++,n.out.push(t[e.w]))})),function(e){var n=[];function t(e){return function(n){var t,r,o,i;n.merged||(V.A(n.barycenter)||V.A(e.barycenter)||n.barycenter>=e.barycenter)&&(r=n,o=0,i=0,(t=e).weight&&(o+=t.barycenter*t.weight,i+=t.weight),r.weight&&(o+=r.barycenter*r.weight,i+=r.weight),t.vs=r.vs.concat(t.vs),t.barycenter=o/i,t.weight=i,t.i=Math.min(r.i,t.i),r.merged=!0)}}function o(n){return function(t){t.in.push(n),0==--t.indegree&&e.push(t)}}for(;e.length;){var i=e.pop();n.push(i),r.A(i.in.reverse(),t(i)),r.A(i.out,o(i))}return d.A(ve.A(n,(function(e){return!e.merged})),(function(e){return P(e,["vs","i","barycenter","weight"])}))}(ve.A(t,(function(e){return!e.indegree})))}(f,t);!function(e,n){r.A(e,(function(e){e.vs=s.A(e.vs.map((function(e){return n[e]?n[e].vs:e})))}))}(v,h);var l=on(v,o);if(a&&(l.vs=s.A([a,l.vs,c]),e.predecessors(a).length)){var g=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+g.order+p.order)/(l.weight+2),l.weight+=2}return l}function sn(e,n,t){return d.A(n,(function(n){return function(e,n,t){var o=function(e){for(var n;e.hasNode(n=u("_root")););return n}(e),i=new g.T({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(n){return e.node(n)}));return r.A(e.nodes(),(function(u){var a=e.node(u),s=e.parent(u);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(u),i.setParent(u,s||o),r.A(e[t](u),(function(n){var t=n.v===u?n.w:n.v,r=i.edge(t,u),o=V.A(r)?0:r.weight;i.setEdge(t,u,{weight:e.edge(n).weight+o})})),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(u,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))})),i}(e,n,t)}))}function dn(e,n){var t=new g.T;r.A(e,(function(e){var o=e.graph().root,i=an(e,o,t,n);r.A(i.vs,(function(n,t){e.node(n).order=t})),function(e,n,t){var o,i={};r.A(t,(function(t){for(var r,u,a=e.parent(t);a;){if((r=e.parent(a))?(u=i[r],i[r]=a):(u=o,o=a),u&&u!==a)return void n.setEdge(u,a);a=r}}))}(e,t,i.vs)}))}function cn(e,n){r.A(n,(function(n){r.A(n,(function(n,t){e.node(n).order=t}))}))}var hn=t(9922);const fn=function(e,n){return e&&(0,D.A)(e,(0,hn.A)(n))};var vn=t(7132),ln=t(9999);const gn=function(e,n){return null==e?e:(0,vn.A)(e,(0,hn.A)(n),ln.A)};function pn(e,n,t){if(n>t){var r=n;n=t,t=r}var o=e[n];o||(e[n]=o={}),o[t]=!0}function An(e,n,t){if(n>t){var r=n;n=t,t=r}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],t)}function wn(e){var n,t=H(e),o=E.A(function(e,n){var t={};return Ve.A(n,(function(n,o){var i=0,u=0,a=n.length,s=R.A(o);return r.A(o,(function(n,d){var c=function(e,n){if(e.node(n).dummy)return fe.A(e.predecessors(n),(function(n){return e.node(n).dummy}))}(e,n),h=c?e.node(c).order:a;(c||n===s)&&(r.A(o.slice(u,d+1),(function(n){r.A(e.predecessors(n),(function(r){var o=e.node(r),u=o.order;!(ua)&&pn(t,n,s)}))}))}return Ve.A(n,(function(n,t){var i,u=-1,a=0;return r.A(t,(function(r,s){if("border"===e.node(r).dummy){var d=e.predecessors(r);d.length&&(i=e.node(d[0]).order,o(t,a,s,u,i),a=s,u=i)}o(t,a,t.length,i,n.length)})),t})),t}(e,t)),i={};r.A(["u","d"],(function(u){n="u"===u?t:Ge.A(t).reverse(),r.A(["l","r"],(function(t){"r"===t&&(n=d.A(n,(function(e){return Ge.A(e).reverse()})));var a=("u"===u?e.predecessors:e.successors).bind(e),s=function(e,n,t,o){var i={},u={},a={};return r.A(n,(function(e){r.A(e,(function(e,n){i[e]=e,u[e]=e,a[e]=n}))})),r.A(n,(function(e){var n=-1;r.A(e,(function(e){var r=o(e);if(r.length){r=nn(r,(function(e){return a[e]}));for(var s=(r.length-1)/2,d=Math.floor(s),c=Math.ceil(s);d<=c;++d){var h=r[d];u[e]===e&&n{var n=t(" buildLayoutGraph",(()=>function(e){var n=new g.T({multigraph:!0,compound:!0}),t=jn(e.graph());return n.setGraph(E.A({},yn,Pn(t,mn),P(t,_n))),r.A(e.nodes(),(function(t){var r=jn(e.node(t));n.setNode(t,C.A(Pn(r,En),xn)),n.setParent(t,e.parent(t))})),r.A(e.edges(),(function(t){var r=jn(e.edge(t));n.setEdge(t,E.A({},On,Pn(r,kn),P(r,Nn)))})),n}(e)));t(" runLayout",(()=>function(e,n){n(" makeSpaceForEdgeLabels",(()=>function(e){var n=e.graph();n.ranksep/=2,r.A(e.edges(),(function(t){var r=e.edge(t);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e))),n(" removeSelfEdges",(()=>function(e){r.A(e.edges(),(function(n){if(n.v===n.w){var t=e.node(n.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}}))}(e))),n(" acyclic",(()=>_(e))),n(" nestingGraph.run",(()=>Be(e))),n(" rank",(()=>De(J(e)))),n(" injectEdgeLabelProxies",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);if(t.width&&t.height){var r=e.node(n.v),o={rank:(e.node(n.w).rank-r.rank)/2+r.rank,e:n};$(e,"edge-proxy",o,"_ep")}}))}(e))),n(" removeEmptyRanks",(()=>function(e){var n=B.A(d.A(e.nodes(),(function(n){return e.node(n).rank}))),t=[];r.A(e.nodes(),(function(r){var o=e.node(r).rank-n;t[o]||(t[o]=[]),t[o].push(r)}));var o=0,i=e.graph().nodeRankFactor;r.A(t,(function(n,t){V.A(n)&&t%i!=0?--o:o&&r.A(n,(function(n){e.node(n).rank+=o}))}))}(e))),n(" nestingGraph.cleanup",(()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,r.A(e.edges(),(function(n){e.edge(n).nestingEdge&&e.removeEdge(n)}))}(e))),n(" normalizeRanks",(()=>function(e){var n=B.A(d.A(e.nodes(),(function(n){return e.node(n).rank})));r.A(e.nodes(),(function(t){var r=e.node(t);q.A(r,"rank")&&(r.rank-=n)}))}(e))),n(" assignRankMinMax",(()=>function(e){var n=0;r.A(e.nodes(),(function(t){var r=e.node(t);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,n=M(n,r.maxRank))})),e.graph().maxRank=n}(e))),n(" removeEdgeLabelProxies",(()=>function(e){r.A(e.nodes(),(function(n){var t=e.node(n);"edge-proxy"===t.dummy&&(e.edge(t.e).labelRank=t.rank,e.removeNode(n))}))}(e))),n(" normalize.run",(()=>function(e){e.graph().dummyChains=[],r.A(e.edges(),(function(n){!function(e,n){var t=n.v,r=e.node(t).rank,o=n.w,i=e.node(o).rank,u=n.name,a=e.edge(n),s=a.labelRank;if(i!==r+1){e.removeEdge(n);var d,c,h=void 0;for(c=0,++r;rfunction(e){var n=function(e){var n={},t=0;return r.A(e.children(),(function o(i){var u=t;r.A(e.children(i),o),n[i]={low:u,lim:t++}})),n}(e);r.A(e.graph().dummyChains,(function(t){for(var r=e.node(t),o=r.edgeObj,i=function(e,n,t,r){var o,i,u=[],a=[],s=Math.min(n[t].low,n[r].low),d=Math.max(n[t].lim,n[r].lim);o=t;do{o=e.parent(o),u.push(o)}while(o&&(n[o].low>s||d>n[o].lim));for(i=o,o=r;(o=e.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(e,n,o.v,o.w),u=i.path,a=i.lca,s=0,d=u[s],c=!0;t!==o.w;){if(r=e.node(t),c){for(;(d=u[s])!==a&&e.node(d).maxRankfunction(e){r.A(e.children(),(function n(t){var o=e.children(t),i=e.node(t);if(o.length&&r.A(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var u=i.minRank,a=i.maxRank+1;ufunction(e){var n=Q(e),t=sn(e,l(1,n+1),"inEdges"),o=sn(e,l(n-1,-1,-1),"outEdges"),i=function(e){var n={},t=ve.A(e.nodes(),(function(n){return!e.children(n).length})),o=M(d.A(t,(function(n){return e.node(n).rank}))),i=d.A(l(o+1),(function(){return[]})),u=nn(t,(function(n){return e.node(n).rank}));return r.A(u,(function t(o){if(!q.A(n,o)){n[o]=!0;var u=e.node(o);i[u.rank].push(o),r.A(e.successors(o),t)}})),i}(e);cn(e,i);for(var u,a=Number.POSITIVE_INFINITY,s=0,c=0;c<4;++s,++c){dn(s%2?t:o,s%4>=2);var h=tn(e,i=H(e));hfunction(e){var n=H(e);r.A(n,(function(n){var t=0;r.A(n,(function(n,o){var i=e.node(n);i.order=o+t,r.A(i.selfEdges,(function(n){$(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++t,e:n.e,label:n.label},"_se")})),delete i.selfEdges}))}))}(e))),n(" adjustCoordinateSystem",(()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||ee(e)}(e))),n(" position",(()=>function(e){(function(e){var n=H(e),t=e.graph().ranksep,o=0;r.A(n,(function(n){var i=M(d.A(n,(function(n){return e.node(n).height})));r.A(n,(function(n){e.node(n).y=o+i/2})),o+=i+t}))})(e=J(e)),fn(wn(e),(function(n,t){e.node(t).x=n}))}(e))),n(" positionSelfEdges",(()=>function(e){r.A(e.nodes(),(function(n){var t=e.node(n);if("selfedge"===t.dummy){var r=e.node(t.e.v),o=r.x+r.width/2,i=r.y,u=t.x-o,a=r.height/2;e.setEdge(t.e,t.label),e.removeNode(n),t.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],t.label.x=t.x,t.label.y=t.y}}))}(e))),n(" removeBorderNodes",(()=>function(e){r.A(e.nodes(),(function(n){if(e.children(n).length){var t=e.node(n),r=e.node(t.borderTop),o=e.node(t.borderBottom),i=e.node(R.A(t.borderLeft)),u=e.node(R.A(t.borderRight));t.width=Math.abs(u.x-i.x),t.height=Math.abs(o.y-r.y),t.x=i.x+t.width/2,t.y=r.y+t.height/2}})),r.A(e.nodes(),(function(n){"border"===e.node(n).dummy&&e.removeNode(n)}))}(e))),n(" normalize.undo",(()=>function(e){r.A(e.graph().dummyChains,(function(n){var t,r=e.node(n),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)t=e.successors(n)[0],e.removeNode(n),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),n=t,r=e.node(n)}))}(e))),n(" fixupEdgeLabelCoords",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);if(Object.prototype.hasOwnProperty.call(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}}))}(e))),n(" undoCoordinateSystem",(()=>function(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){r.A(e.nodes(),(function(n){te(e.node(n))})),r.A(e.edges(),(function(n){var t=e.edge(n);r.A(t.points,te),Object.prototype.hasOwnProperty.call(t,"y")&&te(t)}))}(e),"lr"!==n&&"rl"!==n||(function(e){r.A(e.nodes(),(function(n){re(e.node(n))})),r.A(e.edges(),(function(n){var t=e.edge(n);r.A(t.points,re),Object.prototype.hasOwnProperty.call(t,"x")&&re(t)}))}(e),ee(e))}(e))),n(" translateGraph",(()=>function(e){var n=Number.POSITIVE_INFINITY,t=0,o=Number.POSITIVE_INFINITY,i=0,u=e.graph(),a=u.marginx||0,s=u.marginy||0;function d(e){var r=e.x,u=e.y,a=e.width,s=e.height;n=Math.min(n,r-a/2),t=Math.max(t,r+a/2),o=Math.min(o,u-s/2),i=Math.max(i,u+s/2)}r.A(e.nodes(),(function(n){d(e.node(n))})),r.A(e.edges(),(function(n){var t=e.edge(n);Object.prototype.hasOwnProperty.call(t,"x")&&d(t)})),n-=a,o-=s,r.A(e.nodes(),(function(t){var r=e.node(t);r.x-=n,r.y-=o})),r.A(e.edges(),(function(t){var i=e.edge(t);r.A(i.points,(function(e){e.x-=n,e.y-=o})),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)})),u.width=t-n+a,u.height=i-o+s}(e))),n(" assignNodeIntersects",(()=>function(e){r.A(e.edges(),(function(n){var t,r,o=e.edge(n),i=e.node(n.v),u=e.node(n.w);o.points?(t=o.points[0],r=o.points[o.points.length-1]):(o.points=[],t=u,r=i),o.points.unshift(Z(i,t)),o.points.push(Z(u,r))}))}(e))),n(" reversePoints",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);t.reversed&&t.points.reverse()}))}(e))),n(" acyclic.undo",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);if(t.reversed){e.removeEdge(n);var r=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,r)}}))}(e)))}(n,t))),t(" updateInputGraph",(()=>function(e,n){r.A(e.nodes(),(function(t){var r=e.node(t),o=n.node(t);r&&(r.x=o.x,r.y=o.y,n.children(t).length&&(r.width=o.width,r.height=o.height))})),r.A(e.edges(),(function(t){var r=e.edge(t),o=n.edge(t);r.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(r.x=o.x,r.y=o.y)})),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n)))}))}var mn=["nodesep","edgesep","ranksep","marginx","marginy"],yn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_n=["acyclicer","ranker","rankdir","align"],En=["width","height"],xn={width:0,height:0},kn=["minlen","weight","width","height","labeloffset"],On={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Nn=["labelpos"];function Pn(e,n){return G(P(e,n),Number)}function jn(e){var n={};return r.A(e,(function(e,t){n[t.toLowerCase()]=e})),n}},1471:(e,n,t)=>{t.d(n,{T:()=>w});var r=t(9142),o=t(9610),i=t(5041),u=t(4092),a=t(6401),s=t(8058),d=t(9592),c=t(7671),h=t(4326),f=t(7371),v=t(3533);const l=(0,h.A)((function(e){return(0,f.A)((0,c.A)(e,1,v.A,!0))}));var g=t(2866),p=t(3130),A="\0";class w{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.A(void 0),this._defaultEdgeLabelFn=r.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[A]={}),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(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return o.A(e)||(e=r.A(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return i.A(this._nodes)}sources(){var e=this;return u.A(this.nodes(),(function(n){return a.A(e._in[n])}))}sinks(){var e=this;return u.A(this.nodes(),(function(n){return a.A(e._out[n])}))}setNodes(e,n){var t=arguments,r=this;return s.A(e,(function(e){t.length>1?r.setNode(e,n):r.setNode(e)})),this}setNode(e,n){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=A,this._children[e]={},this._children[A][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var n=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],s.A(this.children(e),(e=>{this.setParent(e)})),delete this._children[e]),s.A(i.A(this._in[e]),n),delete this._in[e],delete this._preds[e],s.A(i.A(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(d.A(n))n=A;else{for(var t=n+="";!d.A(t);t=this.parent(t))if(t===e)throw new Error("Setting "+n+" as parent of "+e+" would create a cycle");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var n=this._parent[e];if(n!==A)return n}}children(e){if(d.A(e)&&(e=A),this._isCompound){var n=this._children[e];if(n)return i.A(n)}else{if(e===A)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var n=this._preds[e];if(n)return i.A(n)}successors(e){var n=this._sucs[e];if(n)return i.A(n)}neighbors(e){var n=this.predecessors(e);if(n)return l(n,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var t=this;s.A(this._nodes,(function(t,r){e(r)&&n.setNode(r,t)})),s.A(this._edgeObjs,(function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,t.edge(e))}));var r={};function o(e){var i=t.parent(e);return void 0===i||n.hasNode(i)?(r[e]=i,i):i in r?r[i]:o(i)}return this._isCompound&&s.A(n.nodes(),(function(e){n.setParent(e,o(e))})),n}setDefaultEdgeLabel(e){return o.A(e)||(e=r.A(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return g.A(this._edgeObjs)}setPath(e,n){var t=this,r=arguments;return p.A(e,(function(e,o){return r.length>1?t.setEdge(e,o,n):t.setEdge(e,o),o})),this}setEdge(){var e,n,t,r,o=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,n=i.w,t=i.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=i,n=arguments[1],t=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=""+e,n=""+n,d.A(t)||(t=""+t);var u=y(this._isDirected,e,n,t);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,u))return o&&(this._edgeLabels[u]=r),this;if(!d.A(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(n),this._edgeLabels[u]=o?r:this._defaultEdgeLabelFn(e,n,t);var a=function(e,n,t,r){var o=""+n,i=""+t;if(!e&&o>i){var u=o;o=i,i=u}var a={v:o,w:i};return r&&(a.name=r),a}(this._isDirected,e,n,t);return e=a.v,n=a.w,Object.freeze(a),this._edgeObjs[u]=a,b(this._preds[n],e),b(this._sucs[e],n),this._in[n][u]=a,this._out[e][u]=a,this._edgeCount++,this}edge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t);return this._edgeLabels[r]}hasEdge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t),o=this._edgeObjs[r];return o&&(e=o.v,n=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],m(this._preds[n],e),m(this._sucs[e],n),delete this._in[n][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,n){var t=this._in[e];if(t){var r=g.A(t);return n?u.A(r,(function(e){return e.v===n})):r}}outEdges(e,n){var t=this._out[e];if(t){var r=g.A(t);return n?u.A(r,(function(e){return e.w===n})):r}}nodeEdges(e,n){var t=this.inEdges(e,n);if(t)return t.concat(this.outEdges(e,n))}}function b(e,n){e[n]?e[n]++:e[n]=1}function m(e,n){--e[n]||delete e[n]}function y(e,n,t,r){var o=""+n,i=""+t;if(!e&&o>i){var u=o;o=i,i=u}return o+""+i+""+(d.A(r)?"\0":r)}function _(e,n){return y(e,n.v,n.w,n.name)}w.prototype._nodeCount=0,w.prototype._edgeCount=0},697:(e,n,t)=>{t.d(n,{T:()=>r.T});var r=t(1471)},2559:(e,n,t)=>{t.d(n,{A:()=>o});var r=t(9501);const o=function(e,n,t){for(var o=-1,i=e.length;++o{t.d(n,{A:()=>r});const r=function(e,n){return e{t.d(n,{A:()=>i});var r=t(4288),o=t(8446);const i=function(e,n){var t=-1,i=(0,o.A)(e)?Array(e.length):[];return(0,r.A)(e,(function(e,r,o){i[++t]=n(e,r,o)})),i}},5507:(e,n,t)=>{t.d(n,{A:()=>c});var r=t(6318),o=t(2851),i=t(1521),u=t(5353),a=t(3149),s=t(901);const d=function(e,n,t,r){if(!(0,a.A)(e))return e;for(var d=-1,c=(n=(0,i.A)(n,e)).length,h=c-1,f=e;null!=f&&++d{t.d(n,{A:()=>d});var r=t(4326),o=t(6984),i=t(6832),u=t(9999),a=Object.prototype,s=a.hasOwnProperty;const d=(0,r.A)((function(e,n){e=Object(e);var t=-1,r=n.length,d=r>2?n[2]:void 0;for(d&&(0,i.A)(n[0],n[1],d)&&(r=1);++t{t.d(n,{A:()=>d});var r=t(6307),o=t(8446),i=t(5041);var u=t(5707),a=t(8593),s=Math.max;const d=(c=function(e,n,t){var o=null==e?0:e.length;if(!o)return-1;var i=null==t?0:(0,a.A)(t);return i<0&&(i=s(o+i,0)),(0,u.A)(e,(0,r.A)(n,3),i)},function(e,n,t){var u=Object(e);if(!(0,o.A)(e)){var a=(0,r.A)(n,3);e=(0,i.A)(e),n=function(e){return a(u[e],e,u)}}var s=c(e,n,t);return s>-1?u[a?e[s]:s]:void 0});var c},4098:(e,n,t)=>{t.d(n,{A:()=>o});var r=t(7671);const o=function(e){return null!=e&&e.length?(0,r.A)(e,1):[]}},9622:(e,n,t)=>{t.d(n,{A:()=>u});var r=Object.prototype.hasOwnProperty;const o=function(e,n){return null!=e&&r.call(e,n)};var i=t(5054);const u=function(e,n){return null!=e&&(0,i.A)(e,n,o)}},9703:(e,n,t)=>{t.d(n,{A:()=>u});var r=t(2383),o=t(2049),i=t(3098);const u=function(e){return"string"==typeof e||!(0,o.A)(e)&&(0,i.A)(e)&&"[object String]"==(0,r.A)(e)}},6666:(e,n,t)=>{t.d(n,{A:()=>r});const r=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0}},4722:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(5572),o=t(6307),i=t(2568),u=t(2049);const a=function(e,n){return((0,u.A)(e)?r.A:i.A)(e,(0,o.A)(n,3))}},6452:(e,n,t)=>{t.d(n,{A:()=>u});var r=t(2559),o=t(6224),i=t(9008);const u=function(e){return e&&e.length?(0,r.A)(e,i.A,o.A):void 0}},3631:(e,n,t)=>{t.d(n,{A:()=>v});var r=/\s/;var o=/^\s+/;const i=function(e){return e?e.slice(0,function(e){for(var n=e.length;n--&&r.test(e.charAt(n)););return n}(e)+1).replace(o,""):e};var u=t(3149),a=t(9501),s=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,c=/^0o[0-7]+$/i,h=parseInt;var f=1/0;const v=function(e){return e?(e=function(e){if("number"==typeof e)return e;if((0,a.A)(e))return NaN;if((0,u.A)(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=(0,u.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var t=d.test(e);return t||c.test(e)?h(e.slice(2),t?2:8):s.test(e)?NaN:+e}(e))===f||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8593:(e,n,t)=>{t.d(n,{A:()=>o});var r=t(3631);const o=function(e){var n=(0,r.A)(e),t=n%1;return n==n?t?n-t:n:0}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/632-7a25d3c6.chunk.min.js b/docs/hugo/public/js/632-7a25d3c6.chunk.min.js new file mode 100644 index 000000000..353ef0f06 --- /dev/null +++ b/docs/hugo/public/js/632-7a25d3c6.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[632],{2251:(t,e,i)=>{i.d(e,{diagram:()=>v});var a=i(9502),n=i(4852),s=function(){var t=(0,a.K2)((function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i}),"o"),e=[1,3],i=[1,4],n=[1,5],s=[1,6],r=[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],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,14],T=[1,23],m=[1,18],q=[1,19],A=[1,20],_=[1,21],b=[1,22],S=[1,24],k=[1,25],F=[1,26],P=[1,27],C=[1,28],L=[1,29],v=[1,32],I=[1,33],E=[1,34],D=[1,39],z=[1,40],w=[1,42],K=[1,44],U=[1,62],N=[1,61],R=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],B=[1,65],W=[1,66],$=[1,67],Q=[1,68],O=[1,69],X=[1,70],H=[1,71],M=[1,72],Y=[1,73],j=[1,74],G=[1,75],V=[1,76],Z=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],it=[1,99],at=[1,93],nt=[1,96],st=[1,94],rt=[1,95],ot=[1,97],lt=[1,98],ht=[1,102],ct=[10,55,56,57],dt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ut={trace:(0,a.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,a.K2)((function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" ⟶ ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" ⟶ ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}}),"anonymous"),table:[{18:e,26:1,27:2,28:i,55:n,56:s,57:r},{1:[3]},{18:e,26:8,27:2,28:i,55:n,56:s,57:r},{18:e,26:9,27:2,28:i,55:n,56:s,57:r},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(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(o,[2,34]),{27:45,55:n,56:s,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(h,[2,45]),t(h,[2,46]),{18:[1,50]},{4:d,5:u,10:x,12:g,13:f,14:p,43:51,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:52,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:53,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:54,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:55,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:56,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,44:[1,57],47:[1,58],58:60,59:59,63:E,64:D,65:z,66:w,67:K},t(R,[2,64]),t(R,[2,66]),t(R,[2,67]),t(R,[2,70]),t(R,[2,71]),t(R,[2,72]),t(R,[2,73]),t(R,[2,74]),t(R,[2,75]),t(R,[2,76]),t(R,[2,77]),t(R,[2,78]),t(R,[2,79]),t(R,[2,80]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:64,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,21:63},t(h,[2,53],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,77],63:E,64:D,65:z,66:w,67:K}),t(h,[2,56],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,78],63:E,64:D,65:z,66:w,67:K}),t(h,[2,57],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,58],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,59],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,60],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),{45:[1,79]},{44:[1,80]},t(R,[2,65]),t(R,[2,81]),t(R,[2,82]),t(R,[2,83]),{3:82,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,18:[1,81]},t(Z,[2,23]),t(Z,[2,1]),t(Z,[2,2]),t(Z,[2,3]),t(Z,[2,4]),t(Z,[2,5]),t(Z,[2,6]),t(Z,[2,7]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(Z,[2,11]),t(Z,[2,12]),t(h,[2,52],{58:31,43:83,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,55],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:88,23:87},t(Z,[2,24]),t(h,[2,51],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,54],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{46:[1,101]},t(h,[2,29],{10:ht}),t(ct,[2,27],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),t(dt,[2,25]),t(dt,[2,13]),t(dt,[2,14]),t(dt,[2,15]),t(dt,[2,16]),t(dt,[2,17]),t(dt,[2,18]),t(dt,[2,19]),t(dt,[2,20]),t(dt,[2,21]),t(dt,[2,22]),t(h,[2,49],{10:ht}),t(h,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:105},t(dt,[2,26]),t(h,[2,50],{10:ht}),t(ct,[2,28],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,a.K2)((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:(0,a.K2)((function(t){var e=this,i=[0],n=[],s=[null],r=[],o=this.table,l="",h=0,c=0,d=0,u=r.slice.call(arguments,1),x=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);x.setInput(t,g.yy),g.yy.lexer=x,g.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var p=x.yylloc;r.push(p);var y=x.options&&x.options.ranges;function T(){var t;return"number"!=typeof(t=n.pop()||x.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)((function(t){i.length=i.length-2*t,s.length=s.length-t,r.length=r.length-t}),"popStack"),(0,a.K2)(T,"lex");for(var m,q,A,_,b,S,k,F,P,C={};;){if(A=i[i.length-1],this.defaultActions[A]?_=this.defaultActions[A]:(null==m&&(m=T()),_=o[A]&&o[A][m]),void 0===_||!_.length||!_[0]){var L;for(S in P=[],o[A])this.terminals_[S]&&S>2&&P.push("'"+this.terminals_[S]+"'");L=x.showPosition?"Parse error on line "+(h+1)+":\n"+x.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[m]||m,line:x.yylineno,loc:p,expected:P})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(_[0]){case 1:i.push(m),s.push(x.yytext),r.push(x.yylloc),i.push(_[1]),m=null,q?(m=q,q=null):(c=x.yyleng,l=x.yytext,h=x.yylineno,p=x.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[_[1]][1],C.$=s[s.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},y&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,c,h,g.yy,_[1],s,r].concat(u))))return b;k&&(i=i.slice(0,-1*k*2),s=s.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[_[1]][0]),s.push(C.$),r.push(C._$),F=o[i[i.length-2]][i[i.length-1]],i.push(F);break;case 3:return!0}}return!0}),"parse")},xt=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,i=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 a=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),i.length-1&&(this.yylineno-=i.length-1);var n=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:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(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 i,a,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.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],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1}),"test_match"),next:(0,a.K2)((function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;se[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&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(){return this.next()||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,i,a){switch(i){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 gt(){this.yy={}}return ut.lexer=xt,(0,a.K2)(gt,"Parser"),gt.prototype=ut,ut.Parser=gt,new gt}();s.parser=s;var r=s,o=(0,a.P$)(),l=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,a.K2)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:a.UI.quadrantChart?.chartWidth||500,chartWidth:a.UI.quadrantChart?.chartHeight||500,titlePadding:a.UI.quadrantChart?.titlePadding||10,titleFontSize:a.UI.quadrantChart?.titleFontSize||20,quadrantPadding:a.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:a.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:a.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:a.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:a.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:a.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:a.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:a.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:a.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:a.UI.quadrantChart?.pointRadius||5,xAxisPosition:a.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:a.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:o.quadrant1Fill,quadrant2Fill:o.quadrant2Fill,quadrant3Fill:o.quadrant3Fill,quadrant4Fill:o.quadrant4Fill,quadrant1TextFill:o.quadrant1TextFill,quadrant2TextFill:o.quadrant2TextFill,quadrant3TextFill:o.quadrant3TextFill,quadrant4TextFill:o.quadrant4TextFill,quadrantPointFill:o.quadrantPointFill,quadrantPointTextFill:o.quadrantPointTextFill,quadrantXAxisTextFill:o.quadrantXAxisTextFill,quadrantYAxisTextFill:o.quadrantYAxisTextFill,quadrantTitleFill:o.quadrantTitleFill,quadrantInternalBorderStrokeFill:o.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:o.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,a.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){a.Rm.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){a.Rm.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,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:a,y:s,width:n,height:i,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:a,y:s+i,width:n,height:i,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:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const t of r)t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:s,quadrantWidth:r}=e,o=(0,n.m4Y)().domain([0,1]).range([a,r+a]),l=(0,n.m4Y)().domain([0,1]).range([i+s,s]);return this.data.points.map((t=>{const e=this.classes.get(t.className);return e&&(t={...e,...t}),{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:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}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),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},h=class extends Error{static{(0,a.K2)(this,"InvalidStyleError")}constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}};function c(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function d(t){return!/^\d+$/.test(t)}function u(t){return!/^\d+px$/.test(t)}(0,a.K2)(c,"validateHexCode"),(0,a.K2)(d,"validateNumber"),(0,a.K2)(u,"validateSizeInPixels");var x=(0,a.D7)();function g(t){return(0,a.jZ)(t.trim(),x)}(0,a.K2)(g,"textSanitizer");var f=new l;function p(t){f.setData({quadrant1Text:g(t.text)})}function y(t){f.setData({quadrant2Text:g(t.text)})}function T(t){f.setData({quadrant3Text:g(t.text)})}function m(t){f.setData({quadrant4Text:g(t.text)})}function q(t){f.setData({xAxisLeftText:g(t.text)})}function A(t){f.setData({xAxisRightText:g(t.text)})}function _(t){f.setData({yAxisTopText:g(t.text)})}function b(t){f.setData({yAxisBottomText:g(t.text)})}function S(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(d(a))throw new h(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(c(a))throw new h(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(c(a))throw new h(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(u(a))throw new h(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function k(t,e,i,a,n){const s=S(n);f.addPoints([{x:i,y:a,text:g(t.text),className:e,...s}])}function F(t,e){f.addClass(t,S(e))}function P(t){f.setConfig({chartWidth:t})}function C(t){f.setConfig({chartHeight:t})}function L(){const t=(0,a.D7)(),{themeVariables:e,quadrantChart:i}=t;return i&&f.setConfig(i),f.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}),f.setData({titleText:(0,a.ab)()}),f.build()}(0,a.K2)(p,"setQuadrant1Text"),(0,a.K2)(y,"setQuadrant2Text"),(0,a.K2)(T,"setQuadrant3Text"),(0,a.K2)(m,"setQuadrant4Text"),(0,a.K2)(q,"setXAxisLeftText"),(0,a.K2)(A,"setXAxisRightText"),(0,a.K2)(_,"setYAxisTopText"),(0,a.K2)(b,"setYAxisBottomText"),(0,a.K2)(S,"parseStyles"),(0,a.K2)(k,"addPoint"),(0,a.K2)(F,"addClass"),(0,a.K2)(P,"setWidth"),(0,a.K2)(C,"setHeight"),(0,a.K2)(L,"getQuadrantData");var v={parser:r,db:{setWidth:P,setHeight:C,setQuadrant1Text:p,setQuadrant2Text:y,setQuadrant3Text:T,setQuadrant4Text:m,setXAxisLeftText:q,setXAxisRightText:A,setYAxisTopText:_,setYAxisBottomText:b,parseStyles:S,addPoint:k,addClass:F,getQuadrantData:L,clear:(0,a.K2)((function(){f.clear(),(0,a.IU)()}),"clear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI},renderer:{draw:(0,a.K2)(((t,e,i,s)=>{function r(t){return"top"===t?"hanging":"middle"}function o(t){return"left"===t?"start":"middle"}function l(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,a.K2)(r,"getDominantBaseLine"),(0,a.K2)(o,"getTextAnchor"),(0,a.K2)(l,"getTransformation");const h=(0,a.D7)();a.Rm.debug("Rendering quadrant chart\n"+t);const c=h.securityLevel;let d;"sandbox"===c&&(d=(0,n.Ltv)("#i"+e));const u=("sandbox"===c?(0,n.Ltv)(d.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${e}"]`),x=u.append("g").attr("class","main"),g=h.quadrantChart?.chartWidth??500,f=h.quadrantChart?.chartHeight??500;(0,a.a$)(u,f,g,h.quadrantChart?.useMaxWidth??!0),u.attr("viewBox","0 0 "+g+" "+f),s.db.setHeight(f),s.db.setWidth(g);const p=s.db.getQuadrantData(),y=x.append("g").attr("class","quadrants"),T=x.append("g").attr("class","border"),m=x.append("g").attr("class","data-points"),q=x.append("g").attr("class","labels"),A=x.append("g").attr("class","title");p.title&&A.append("text").attr("x",0).attr("y",0).attr("fill",p.title.fill).attr("font-size",p.title.fontSize).attr("dominant-baseline",r(p.title.horizontalPos)).attr("text-anchor",o(p.title.verticalPos)).attr("transform",l(p.title)).text(p.title.text),p.borderLines&&T.selectAll("line").data(p.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 _=y.selectAll("g.quadrant").data(p.quadrants).enter().append("g").attr("class","quadrant");_.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),_.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=>r(t.text.horizontalPos))).attr("text-anchor",(t=>o(t.text.verticalPos))).attr("transform",(t=>l(t.text))).text((t=>t.text.text)),q.selectAll("g.label").data(p.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=>r(t.horizontalPos))).attr("text-anchor",(t=>o(t.verticalPos))).attr("transform",(t=>l(t)));const b=m.selectAll("g.data-point").data(p.points).enter().append("g").attr("class","data-point");b.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)),b.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=>r(t.text.horizontalPos))).attr("text-anchor",(t=>o(t.text.verticalPos))).attr("transform",(t=>l(t.text)))}),"draw")},styles:(0,a.K2)((()=>""),"styles")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/648-b5ba4bb4.chunk.min.js b/docs/hugo/public/js/648-b5ba4bb4.chunk.min.js new file mode 100644 index 000000000..bf15f3327 --- /dev/null +++ b/docs/hugo/public/js/648-b5ba4bb4.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[648],{3648:(t,n,e)=>{e.d(n,{diagram:()=>it});var i=e(9502),s=e(4852);function r(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function o(t){return t.target.depth}function c(t,n){return t.sourceLinks.length?t.depth:n-1}function a(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function l(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e=n)&&(e=n);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e=s)&&(e=s)}return e}function h(t){return function(){return t}}function u(t,n){return y(t.source,n.source)||t.index-n.index}function f(t,n){return y(t.target,n.target)||t.index-n.index}function y(t,n){return t.y0-n.y0}function d(t){return t.value}function p(t){return t.index}function g(t){return t.nodes}function _(t){return t.links}function k(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function x({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const e of n.sourceLinks)e.y0=t+e.width/2,t+=e.width;for(const t of n.targetLinks)t.y1=e+t.width/2,e+=t.width}}var m=Math.PI,v=2*m,b=1e-6,w=v-b;function L(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function S(){return new L}L.prototype=S.prototype={constructor:L,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,s,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+s)+","+(this._y1=+r)},arcTo:function(t,n,e,i,s){t=+t,n=+n,e=+e,i=+i,s=+s;var r=this._x1,o=this._y1,c=e-t,a=i-n,l=r-t,h=o-n,u=l*l+h*h;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>b)if(Math.abs(h*c-a*l)>b&&s){var f=e-r,y=i-o,d=c*c+a*a,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),k=s*Math.tan((m-Math.acos((d+u-p)/(2*g*_)))/2),x=k/_,v=k/g;Math.abs(x-1)>b&&(this._+="L"+(t+x*l)+","+(n+x*h)),this._+="A"+s+","+s+",0,0,"+ +(h*f>l*y)+","+(this._x1=t+v*c)+","+(this._y1=n+v*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,s,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),c=e*Math.sin(i),a=t+o,l=n+c,h=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+l:(Math.abs(this._x1-a)>b||Math.abs(this._y1-l)>b)&&(this._+="L"+a+","+l),e&&(u<0&&(u=u%v+v),u>w?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-c)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=l):u>b&&(this._+="A"+e+","+e+",0,"+ +(u>=m)+","+h+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=n+e*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const E=S;var A=Array.prototype.slice;function K(t){return function(){return t}}function M(t){return t[0]}function I(t){return t[1]}function T(t){return t.source}function D(t){return t.target}function N(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function P(t){return[t.source.x1,t.y0]}function C(t){return[t.target.x0,t.y1]}function O(){return function(t){var n=T,e=D,i=M,s=I,r=null;function o(){var o,c=A.call(arguments),a=n.apply(this,c),l=e.apply(this,c);if(r||(r=o=E()),t(r,+i.apply(this,(c[0]=a,c)),+s.apply(this,c),+i.apply(this,(c[0]=l,c)),+s.apply(this,c)),o)return r=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:K(+t),o):i},o.y=function(t){return arguments.length?(s="function"==typeof t?t:K(+t),o):s},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}(N).source(P).target(C)}var $=function(){var t=(0,i.K2)((function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e}),"o"),n=[1,9],e=[1,10],s=[1,5,10,12],r={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,n,e,i,s,r,o){var c=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[c-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[c-2].trim().replaceAll('""','"')),e=parseFloat(r[c].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=r[c];break;case 10:this.$=r[c-1]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(s,[2,8]),t(s,[2,9]),{19:[1,16]},t(s,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(s,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,i.K2)((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var n=this,e=[0],s=[],r=[null],o=[],c=this.table,a="",l=0,h=0,u=0,f=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;o.push(g);var _=y.options&&y.options.ranges;function k(){var t;return"number"!=typeof(t=s.pop()||y.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){e.length=e.length-2*t,r.length=r.length-t,o.length=o.length-t}),"popStack"),(0,i.K2)(k,"lex");for(var x,m,v,b,w,L,S,E,A,K={};;){if(v=e[e.length-1],this.defaultActions[v]?b=this.defaultActions[v]:(null==x&&(x=k()),b=c[v]&&c[v][x]),void 0===b||!b.length||!b[0]){var M;for(L in A=[],c[v])this.terminals_[L]&&L>2&&A.push("'"+this.terminals_[L]+"'");M=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:g,expected:A})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+x);switch(b[0]){case 1:e.push(x),r.push(y.yytext),o.push(y.yylloc),e.push(b[1]),x=null,m?(x=m,m=null):(h=y.yyleng,a=y.yytext,l=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[b[1]][1],K.$=r[r.length-S],K._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},_&&(K._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(K,[a,h,l,d.yy,b[1],r,o].concat(f))))return w;S&&(e=e.slice(0,-1*S*2),r=r.slice(0,-1*S),o=o.slice(0,-1*S)),e.push(this.productions_[b[1]][0]),r.push(K.$),o.push(K._$),E=c[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}),"parse")},o=function(){return{EOF:1,parseError:(0,i.K2)((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:(0,i.K2)((function(t,n){return this.yy=n||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 n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),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(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,n){var e,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;rn[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[r])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){return this.next()||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,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\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:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function c(){this.yy={}}return r.lexer=o,(0,i.K2)(c,"Parser"),c.prototype=r,r.Parser=c,new c}();$.parser=$;var j=$,z=[],U=[],F=new Map,W=(0,i.K2)((()=>{z=[],U=[],F=new Map,(0,i.IU)()}),"clear"),G=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{(0,i.K2)(this,"SankeyLink")}},V=(0,i.K2)(((t,n,e)=>{z.push(new G(t,n,e))}),"addLink"),X=class{constructor(t){this.ID=t}static{(0,i.K2)(this,"SankeyNode")}},Y=(0,i.K2)((t=>{t=i.Y2.sanitizeText(t,(0,i.D7)());let n=F.get(t);return void 0===n&&(n=new X(t),F.set(t,n),U.push(n)),n}),"findOrCreateNode"),q=(0,i.K2)((()=>U),"getNodes"),Q=(0,i.K2)((()=>z),"getLinks"),R=(0,i.K2)((()=>({nodes:U.map((t=>({id:t.ID}))),links:z.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),B={nodesMap:F,getConfig:(0,i.K2)((()=>(0,i.D7)().sankey),"getConfig"),getNodes:q,getLinks:Q,getGraph:R,addLink:V,findOrCreateNode:Y,getAccTitle:i.iN,setAccTitle:i.SV,getAccDescription:i.m7,setAccDescription:i.EI,getDiagramTitle:i.ab,setDiagramTitle:i.ke,clear:W},Z=class t{static{(0,i.K2)(this,"Uid")}static{this.count=0}static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},H={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?r(t.sourceLinks,o)-1:0},justify:c},J=(0,i.K2)((function(t,n,e,o){const{securityLevel:m,sankey:v}=(0,i.D7)(),b=i.ME.sankey;let w;"sandbox"===m&&(w=(0,s.Ltv)("#i"+n));const L="sandbox"===m?(0,s.Ltv)(w.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),S="sandbox"===m?L.select(`[id="${n}"]`):(0,s.Ltv)(`[id="${n}"]`),E=v?.width??b.width,A=v?.height??b.width,K=v?.useMaxWidth??b.useMaxWidth,M=v?.nodeAlignment??b.nodeAlignment,I=v?.prefix??b.prefix,T=v?.suffix??b.suffix,D=v?.showValues??b.showValues,N=o.db.getGraph(),P=H[M];(function(){let t,n,e,i=0,s=0,o=1,m=1,v=24,b=8,w=p,L=c,S=g,E=_,A=6;function K(){const c={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,e]of t.entries())e.index=n,e.sourceLinks=[],e.targetLinks=[];const i=new Map(t.map(((n,e)=>[w(n,e,t),n])));for(const[t,e]of n.entries()){e.index=t;let{source:n,target:s}=e;"object"!=typeof n&&(n=e.source=k(i,n)),"object"!=typeof s&&(s=e.target=k(i,s)),n.sourceLinks.push(e),s.targetLinks.push(e)}if(null!=e)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(e),i.sort(e)}(c),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(a(n.sourceLinks,d),a(n.targetLinks,d)):n.fixedValue}(c),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.depth=s;for(const{target:n}of t.sourceLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(c),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.height=s;for(const{source:n}of t.targetLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(c),function(e){const c=function({nodes:t}){const e=l(t,(t=>t.depth))+1,s=(o-i-v)/(e-1),r=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+v,r[t]?r[t].push(n):r[t]=[n]}if(n)for(const t of r)t.sort(n);return r}(e);t=Math.min(b,(m-s)/(l(c,(t=>t.length))-1)),function(n){const e=r(n,(n=>(m-s-(n.length-1)*t)/a(n,d)));for(const i of n){let n=s;for(const s of i){s.y0=n,s.y1=n+s.value*e,n=s.y1+t;for(const t of s.sourceLinks)t.width=t.value*e}n=(m-n+t)/(i.length+1);for(let t=0;t0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),T(r,i)}}function I(t,e,i){for(let s=t.length-2;s>=0;--s){const r=t[s];for(const t of r){let n=0,i=0;for(const{target:e,value:s}of t.sourceLinks){let r=s*(e.layer-t.layer);n+=$(t,e)*r,i+=r}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),T(r,i)}}function T(n,e){const i=n.length>>1,r=n[i];N(n,r.y0-t,i-1,e),D(n,r.y1+t,i+1,e),N(n,m,n.length-1,e),D(n,s,0,e)}function D(n,e,i,s){for(;i1e-6&&(r.y0+=o,r.y1+=o),e=r.y1+t}}function N(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>1e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(f);for(const{target:{targetLinks:n}}of t)n.sort(u)}}function C(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(f),e.sort(u)}function O(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:s,width:r}of n.sourceLinks){if(s===e)break;i+=r+t}for(const{source:t,width:s}of e.targetLinks){if(t===n)break;i-=s}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:s,width:r}of e.targetLinks){if(s===n)break;i+=r+t}for(const{target:t,width:s}of n.sourceLinks){if(t===e)break;i-=s}return i}return K.update=function(t){return x(t),t},K.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:h(t),K):w},K.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:h(t),K):L},K.nodeSort=function(t){return arguments.length?(n=t,K):n},K.nodeWidth=function(t){return arguments.length?(v=+t,K):v},K.nodePadding=function(n){return arguments.length?(b=t=+n,K):b},K.nodes=function(t){return arguments.length?(S="function"==typeof t?t:h(t),K):S},K.links=function(t){return arguments.length?(E="function"==typeof t?t:h(t),K):E},K.linkSort=function(t){return arguments.length?(e=t,K):e},K.size=function(t){return arguments.length?(i=s=0,o=+t[0],m=+t[1],K):[o-i,m-s]},K.extent=function(t){return arguments.length?(i=+t[0][0],o=+t[1][0],s=+t[0][1],m=+t[1][1],K):[[i,s],[o,m]]},K.iterations=function(t){return arguments.length?(A=+t,K):A},K})().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(D?15:0)).nodeAlign(P).extent([[0,0],[E,A]])(N);const C=(0,s.UMr)(s.zt);S.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=Z.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=>C(t.id)));const $=(0,i.K2)((({id:t,value:n})=>D?`${t}\n${I}${Math.round(100*n)/100}${T}`:t),"getText");S.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",(t=>t.x0(t.y1+t.y0)/2)).attr("dy",(D?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0(t.uid=Z.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=>C(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>C(t.target.id)))}let U;switch(z){case"gradient":U=(0,i.K2)((t=>t.uid),"coloring");break;case"source":U=(0,i.K2)((t=>C(t.source.id)),"coloring");break;case"target":U=(0,i.K2)((t=>C(t.target.id)),"coloring");break;default:U=z}j.append("path").attr("d",O()).attr("stroke",U).attr("stroke-width",(t=>Math.max(1,t.width))),(0,i.ot)(void 0,S,0,K)}),"draw"),tt={draw:J},nt=(0,i.K2)((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),et=j.parse.bind(j);j.parse=t=>et(nt(t));var it={parser:j,db:B,renderer:tt}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/664-ed5252a5.chunk.min.js b/docs/hugo/public/js/664-ed5252a5.chunk.min.js new file mode 100644 index 000000000..64d262d5b --- /dev/null +++ b/docs/hugo/public/js/664-ed5252a5.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[664],{2664:(t,e,a)=>{a.d(e,{diagram:()=>Nt});var n=a(3814),i=a(8159),r=a(9502),s=a(4852),l=a(6750),o=function(){var t=(0,r.K2)((function(t,e,a,n){for(a=a||{},n=t.length;n--;a[t[n]]=e);return a}),"o"),e=[1,24],a=[1,25],n=[1,26],i=[1,27],s=[1,28],l=[1,63],o=[1,64],h=[1,65],d=[1,66],u=[1,67],p=[1,68],y=[1,69],g=[1,29],f=[1,30],b=[1,31],x=[1,32],_=[1,33],m=[1,34],E=[1,35],S=[1,36],A=[1,37],C=[1,38],w=[1,39],k=[1,40],O=[1,41],T=[1,42],v=[1,43],R=[1,44],D=[1,45],N=[1,46],P=[1,47],B=[1,48],I=[1,50],M=[1,51],j=[1,52],K=[1,53],L=[1,54],Y=[1,55],U=[1,56],F=[1,57],X=[1,58],z=[1,59],W=[1,60],Q=[14,42],$=[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],q=[1,82],V=[1,83],G=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],at=[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,r.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,r.K2)((function(t,e,a,n,i,r,s){var l=r.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(r[l-3]);break;case 19:n.setTitle(r[l].substring(6)),this.$=r[l].substring(6);break;case 20:n.setAccDescription(r[l].substring(15)),this.$=r[l].substring(15);break;case 21:this.$=r[l].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=r[l].trim(),n.setAccDescription(this.$);break;case 28:r[l].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 29:r[l].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 30:n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 31:r[l].splice(2,0,"CONTAINER"),n.addContainerBoundary(...r[l]),this.$=r[l];break;case 32:n.addDeploymentNode("node",...r[l]),this.$=r[l];break;case 33:n.addDeploymentNode("nodeL",...r[l]),this.$=r[l];break;case 34:n.addDeploymentNode("nodeR",...r[l]),this.$=r[l];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...r[l]),this.$=r[l];break;case 40:n.addPersonOrSystem("external_person",...r[l]),this.$=r[l];break;case 41:n.addPersonOrSystem("system",...r[l]),this.$=r[l];break;case 42:n.addPersonOrSystem("system_db",...r[l]),this.$=r[l];break;case 43:n.addPersonOrSystem("system_queue",...r[l]),this.$=r[l];break;case 44:n.addPersonOrSystem("external_system",...r[l]),this.$=r[l];break;case 45:n.addPersonOrSystem("external_system_db",...r[l]),this.$=r[l];break;case 46:n.addPersonOrSystem("external_system_queue",...r[l]),this.$=r[l];break;case 47:n.addContainer("container",...r[l]),this.$=r[l];break;case 48:n.addContainer("container_db",...r[l]),this.$=r[l];break;case 49:n.addContainer("container_queue",...r[l]),this.$=r[l];break;case 50:n.addContainer("external_container",...r[l]),this.$=r[l];break;case 51:n.addContainer("external_container_db",...r[l]),this.$=r[l];break;case 52:n.addContainer("external_container_queue",...r[l]),this.$=r[l];break;case 53:n.addComponent("component",...r[l]),this.$=r[l];break;case 54:n.addComponent("component_db",...r[l]),this.$=r[l];break;case 55:n.addComponent("component_queue",...r[l]),this.$=r[l];break;case 56:n.addComponent("external_component",...r[l]),this.$=r[l];break;case 57:n.addComponent("external_component_db",...r[l]),this.$=r[l];break;case 58:n.addComponent("external_component_queue",...r[l]),this.$=r[l];break;case 60:n.addRel("rel",...r[l]),this.$=r[l];break;case 61:n.addRel("birel",...r[l]),this.$=r[l];break;case 62:n.addRel("rel_u",...r[l]),this.$=r[l];break;case 63:n.addRel("rel_d",...r[l]),this.$=r[l];break;case 64:n.addRel("rel_l",...r[l]),this.$=r[l];break;case 65:n.addRel("rel_r",...r[l]),this.$=r[l];break;case 66:n.addRel("rel_b",...r[l]),this.$=r[l];break;case 67:r[l].splice(0,1),n.addRel("rel",...r[l]),this.$=r[l];break;case 68:n.updateElStyle("update_el_style",...r[l]),this.$=r[l];break;case 69:n.updateRelStyle("update_rel_style",...r[l]),this.$=r[l];break;case 70:n.updateLayoutConfig("update_layout_config",...r[l]),this.$=r[l];break;case 71:this.$=[r[l]];break;case 72:r[l].unshift(r[l-1]),this.$=r[l];break;case 73:case 75:this.$=r[l].trim();break;case 74:let t={};t[r[l-1].trim()]=r[l].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:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:70,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:71,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:72,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:73,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{14:[1,74]},t(Q,[2,13],{43:23,29:49,30:61,32:62,20:75,34:l,36:o,37:h,38:d,39:u,40:p,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(Q,[2,14]),t($,[2,16],{12:[1,76]}),t(Q,[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:q,77:V,79:G,80:J},{35:86,75:81,76:q,77:V,79:G,80:J},{35:87,75:81,76:q,77:V,79:G,80:J},{35:88,75:81,76:q,77:V,79:G,80:J},{35:89,75:81,76:q,77:V,79:G,80:J},{35:90,75:81,76:q,77:V,79:G,80:J},{35:91,75:81,76:q,77:V,79:G,80:J},{35:92,75:81,76:q,77:V,79:G,80:J},{35:93,75:81,76:q,77:V,79:G,80:J},{35:94,75:81,76:q,77:V,79:G,80:J},{35:95,75:81,76:q,77:V,79:G,80:J},{35:96,75:81,76:q,77:V,79:G,80:J},{35:97,75:81,76:q,77:V,79:G,80:J},{35:98,75:81,76:q,77:V,79:G,80:J},{35:99,75:81,76:q,77:V,79:G,80:J},{35:100,75:81,76:q,77:V,79:G,80:J},{35:101,75:81,76:q,77:V,79:G,80:J},{35:102,75:81,76:q,77:V,79:G,80:J},{35:103,75:81,76:q,77:V,79:G,80:J},{35:104,75:81,76:q,77:V,79:G,80:J},t(Z,[2,59]),{35:105,75:81,76:q,77:V,79:G,80:J},{35:106,75:81,76:q,77:V,79:G,80:J},{35:107,75:81,76:q,77:V,79:G,80:J},{35:108,75:81,76:q,77:V,79:G,80:J},{35:109,75:81,76:q,77:V,79:G,80:J},{35:110,75:81,76:q,77:V,79:G,80:J},{35:111,75:81,76:q,77:V,79:G,80:J},{35:112,75:81,76:q,77:V,79:G,80:J},{35:113,75:81,76:q,77:V,79:G,80:J},{35:114,75:81,76:q,77:V,79:G,80:J},{35:115,75:81,76:q,77:V,79:G,80:J},{20:116,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{12:[1,118],33:[1,117]},{35:119,75:81,76:q,77:V,79:G,80:J},{35:120,75:81,76:q,77:V,79:G,80:J},{35:121,75:81,76:q,77:V,79:G,80:J},{35:122,75:81,76:q,77:V,79:G,80:J},{35:123,75:81,76:q,77:V,79:G,80:J},{35:124,75:81,76:q,77:V,79:G,80:J},{35:125,75:81,76:q,77:V,79:G,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Q,[2,15]),t($,[2,17],{21:22,19:130,22:e,23:a,24:n,26:i,28:s}),t(Q,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:n,26:i,28:s,34:l,36:o,37:h,38:d,39:u,40:p,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(H,[2,21]),t(H,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:q,77:V,79:G,80:J}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(at,[2,28]),t(at,[2,29]),t(at,[2,30]),t(at,[2,31]),t(at,[2,32]),t(at,[2,33]),t(at,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t($,[2,18]),t(Q,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(Z,[2,24]),t(Z,[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,r.K2)((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:(0,r.K2)((function(t){var e=this,a=[0],n=[],i=[null],s=[],l=this.table,o="",c=0,h=0,d=0,u=s.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var b=p.options&&p.options.ranges;function x(){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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K2)((function(t){a.length=a.length-2*t,i.length=i.length-t,s.length=s.length-t}),"popStack"),(0,r.K2)(x,"lex");for(var _,m,E,S,A,C,w,k,O,T={};;){if(E=a[a.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=x()),S=l[E]&&l[E][_]),void 0===S||!S.length||!S[0]){var v;for(C in O=[],l[E])this.terminals_[C]&&C>2&&O.push("'"+this.terminals_[C]+"'");v=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(v,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:f,expected:O})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:a.push(_),i.push(p.yytext),s.push(p.yylloc),a.push(S[1]),_=null,m?(_=m,m=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(w=this.productions_[S[1]][1],T.$=i[i.length-w],T._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},b&&(T._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(A=this.performAction.apply(T,[o,h,c,y.yy,S[1],i,s].concat(u))))return A;w&&(a=a.slice(0,-1*w*2),i=i.slice(0,-1*w),s=s.slice(0,-1*w)),a.push(this.productions_[S[1]][0]),i.push(T.$),s.push(T._$),k=l[a[a.length-2]][a[a.length-1]],a.push(k);break;case 3:return!0}}return!0}),"parse")},rt=function(){return{EOF:1,parseError:(0,r.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,r.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,r.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,r.K2)((function(t){var e=t.length,a=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),a.length-1&&(this.yylineno-=a.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:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[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,r.K2)((function(){return this._more=!0,this}),"more"),reject:(0,r.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,r.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,r.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,r.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,r.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,r.K2)((function(t,e){var a,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],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1}),"test_match"),next:(0,r.K2)((function(){if(this.done)return this.EOF;var t,e,a,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;re[0].length)){if(e=a,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[r])))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,r.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,r.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,r.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,r.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,r.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,r.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,r.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,r.K2)((function(t,e,a,n){switch(a){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=rt,(0,r.K2)(st,"Parser"),st.prototype=it,it.Parser=st,new st}();o.parser=o;var h,d=o,u=[],p=[""],y="global",g="",f=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],b=[],x="",_=!1,m=4,E=2,S=(0,r.K2)((function(){return h}),"getC4Type"),A=(0,r.K2)((function(t){let e=(0,r.jZ)(t,(0,r.D7)());h=e}),"setC4Type"),C=(0,r.K2)((function(t,e,a,n,i,r,s,l,o){if(null==t||null==e||null==a||null==n)return;let c={};const h=b.find((t=>t.from===e&&t.to===a));if(h?c=h:b.push(c),c.type=t,c.from=e,c.to=a,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==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.sprite=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=$()}),"addRel"),w=(0,r.K2)((function(t,e,a,n,i,r,s){if(null===e||null===a)return;let l={};const o=u.find((t=>t.alias===e));if(o&&e===o.alias?l=o:(l.alias=e,u.push(l)),l.label=null==a?{text:""}:{text:a},null==n)l.descr={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.tags=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.link=s;l.typeC4Shape={text:t},l.parentBoundary=y,l.wrap=$()}),"addPersonOrSystem"),k=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=u.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y}),"addContainer"),O=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=u.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y}),"addComponent"),T=(0,r.K2)((function(t,e,a,n,i){if(null===t||null===e)return;let r={};const s=f.find((e=>e.alias===t));if(s&&t===s.alias?r=s:(r.alias=t,f.push(r)),r.label=null==e?{text:""}:{text:e},null==a)r.type={text:"system"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),g=y,y=t,p.push(g)}),"addPersonOrSystemBoundary"),v=(0,r.K2)((function(t,e,a,n,i){if(null===t||null===e)return;let r={};const s=f.find((e=>e.alias===t));if(s&&t===s.alias?r=s:(r.alias=t,f.push(r)),r.label=null==e?{text:""}:{text:e},null==a)r.type={text:"container"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),g=y,y=t,p.push(g)}),"addContainerBoundary"),R=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=f.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,f.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.type={text:"node"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.type={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=y,o.wrap=$(),g=y,y=e,p.push(g)}),"addDeploymentNode"),D=(0,r.K2)((function(){y=g,p.pop(),g=p.pop(),p.push(g)}),"popBoundaryParseStack"),N=(0,r.K2)((function(t,e,a,n,i,r,s,l,o,c,h){let d=u.find((t=>t.alias===e));if(void 0!==d||(d=f.find((t=>t.alias===e)),void 0!==d)){if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];d[t]=e}else d.bgColor=a;if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];d[t]=e}else d.fontColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];d[t]=e}else d.borderColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];d[t]=e}else d.shadowing=r;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];d[t]=e}else d.shape=s;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];d[t]=e}else d.sprite=l;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];d[t]=e}else d.techn=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];d[t]=e}else d.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];d[t]=e}else d.legendSprite=h}}),"updateElStyle"),P=(0,r.K2)((function(t,e,a,n,i,r,s){const l=b.find((t=>t.from===e&&t.to===a));if(void 0!==l){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]=e}else l.textColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(r);if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(s)}}),"updateRelStyle"),B=(0,r.K2)((function(t,e,a){let n=m,i=E;if("object"==typeof e){const t=Object.values(e)[0];n=parseInt(t)}else n=parseInt(e);if("object"==typeof a){const t=Object.values(a)[0];i=parseInt(t)}else i=parseInt(a);n>=1&&(m=n),i>=1&&(E=i)}),"updateLayoutConfig"),I=(0,r.K2)((function(){return m}),"getC4ShapeInRow"),M=(0,r.K2)((function(){return E}),"getC4BoundaryInRow"),j=(0,r.K2)((function(){return y}),"getCurrentBoundaryParse"),K=(0,r.K2)((function(){return g}),"getParentBoundaryParse"),L=(0,r.K2)((function(t){return null==t?u:u.filter((e=>e.parentBoundary===t))}),"getC4ShapeArray"),Y=(0,r.K2)((function(t){return u.find((e=>e.alias===t))}),"getC4Shape"),U=(0,r.K2)((function(t){return Object.keys(L(t))}),"getC4ShapeKeys"),F=(0,r.K2)((function(t){return null==t?f:f.filter((e=>e.parentBoundary===t))}),"getBoundaries"),X=F,z=(0,r.K2)((function(){return b}),"getRels"),W=(0,r.K2)((function(){return x}),"getTitle"),Q=(0,r.K2)((function(t){_=t}),"setWrap"),$=(0,r.K2)((function(){return _}),"autoWrap"),H=(0,r.K2)((function(){u=[],f=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],g="",y="global",p=[""],b=[],p=[""],x="",_=!1,m=4,E=2}),"clear"),q=(0,r.K2)((function(t){let e=(0,r.jZ)(t,(0,r.D7)());x=e}),"setTitle"),V={addPersonOrSystem:w,addPersonOrSystemBoundary:T,addContainer:k,addContainerBoundary:v,addComponent:O,addDeploymentNode:R,popBoundaryParseStack:D,addRel:C,updateElStyle:N,updateRelStyle:P,updateLayoutConfig:B,autoWrap:$,setWrap:Q,getC4ShapeArray:L,getC4Shape:Y,getC4ShapeKeys:U,getBoundaries:F,getBoundarys:X,getCurrentBoundaryParse:j,getParentBoundaryParse:K,getRels:z,getTitle:W,getC4Type:S,getC4ShapeInRow:I,getC4BoundaryInRow:M,setAccTitle:r.SV,getAccTitle:r.iN,getAccDescription:r.m7,setAccDescription:r.EI,getConfig:(0,r.K2)((()=>(0,r.D7)().c4),"getConfig"),clear:H,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:q,setC4Type:A},G=(0,r.K2)((function(t,e){return(0,n.tk)(t,e)}),"drawRect"),J=(0,r.K2)((function(t,e,a,n,i,r){const s=t.append("image");s.attr("width",e),s.attr("height",a),s.attr("x",n),s.attr("y",i);let o=r.startsWith("data:image/png;base64")?r:(0,l.J)(r);s.attr("xlink:href",o)}),"drawImage"),Z=(0,r.K2)(((t,e,a)=>{const n=t.append("g");let i=0;for(let t of e){let e=t.textColor?t.textColor:"#444444",r=t.lineColor?t.lineColor:"#444444",s=t.offsetX?parseInt(t.offsetX):0,l=t.offsetY?parseInt(t.offsetY):0,o="";if(0===i){let e=n.append("line");e.attr("x1",t.startPoint.x),e.attr("y1",t.startPoint.y),e.attr("x2",t.endPoint.x),e.attr("y2",t.endPoint.y),e.attr("stroke-width","1"),e.attr("stroke",r),e.style("fill","none"),"rel_b"!==t.type&&e.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==t.type&&"rel_b"!==t.type||e.attr("marker-start","url("+o+"#arrowend)"),i=-1}else{let e=n.append("path");e.attr("fill","none").attr("stroke-width","1").attr("stroke",r).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",t.startPoint.x).replaceAll("starty",t.startPoint.y).replaceAll("controlx",t.startPoint.x+(t.endPoint.x-t.startPoint.x)/2-(t.endPoint.x-t.startPoint.x)/4).replaceAll("controly",t.startPoint.y+(t.endPoint.y-t.startPoint.y)/2).replaceAll("stopx",t.endPoint.x).replaceAll("stopy",t.endPoint.y)),"rel_b"!==t.type&&e.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==t.type&&"rel_b"!==t.type||e.attr("marker-start","url("+o+"#arrowend)")}let c=a.messageFont();dt(a)(t.label.text,n,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+s,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+l,t.label.width,t.label.height,{fill:e},c),t.techn&&""!==t.techn.text&&(c=a.messageFont(),dt(a)("["+t.techn.text+"]",n,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+s,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+a.messageFontSize+5+l,Math.max(t.label.width,t.techn.width),t.techn.height,{fill:e,"font-style":"italic"},c))}}),"drawRels"),tt=(0,r.K2)((function(t,e,a){const n=t.append("g");let i=e.bgColor?e.bgColor:"none",r=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let o={x:e.x,y:e.y,fill:i,stroke:r,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};G(n,o);let c=a.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=s,dt(a)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=a.boundaryFont(),c.fontColor=s,dt(a)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=a.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=s,dt(a)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))}),"drawBoundary"),et=(0,r.K2)((function(t,e,a){let i=e.bgColor?e.bgColor:a[e.typeC4Shape.text+"_bg_color"],r=e.borderColor?e.borderColor:a[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",l="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":l="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":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const o=t.append("g");o.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=r,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},G(o,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).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=ht(a,e.typeC4Shape.text);switch(o.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(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,l)}let d=a[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,dt(a)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},d),d=a[e.typeC4Shape.text+"Font"](),d.fontColor=s,e.techn&&""!==e.techn?.text?dt(a)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:s,"font-style":"italic"},d):e.type&&""!==e.type.text&&dt(a)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},d),e.descr&&""!==e.descr.text&&(d=a.personFont(),d.fontColor=s,dt(a)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},d)),e.height}),"drawC4Shape"),at=(0,r.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"),nt=(0,r.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"),it=(0,r.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"),rt=(0,r.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"),st=(0,r.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,r.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"),ot=(0,r.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"),ct=(0,r.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"),ht=(0,r.K2)(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"getC4ShapeFont"),dt=function(){function t(t,e,a,i,r,s,l){n(e.append("text").attr("x",a+r/2).attr("y",i+s/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,a,i,s,l,o,c){const{fontSize:h,fontFamily:d,fontWeight:u}=c,p=t.split(r.Y2.lineBreakRegex);for(let t=0;t=this.data.widthLimit||a>=this.data.widthLimit||this.nextData.cnt>gt)&&(e=this.nextData.startx+t.margin+bt.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=a=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",a,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",a,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},_t(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},_t=(0,r.K2)((function(t){(0,r.hH)(bt,t),t.fontFamily&&(bt.personFontFamily=bt.systemFontFamily=bt.messageFontFamily=t.fontFamily),t.fontSize&&(bt.personFontSize=bt.systemFontSize=bt.messageFontSize=t.fontSize),t.fontWeight&&(bt.personFontWeight=bt.systemFontWeight=bt.messageFontWeight=t.fontWeight)}),"setConf"),mt=(0,r.K2)(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"c4ShapeFont"),Et=(0,r.K2)((t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight})),"boundaryFont"),St=(0,r.K2)((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont");function At(t,e,a,n,s){if(!e[t].width)if(a)e[t].text=(0,i.bH)(e[t].text,s,n),e[t].textLines=e[t].text.split(r.Y2.lineBreakRegex).length,e[t].width=s,e[t].height=(0,i.ru)(e[t].text,n);else{let a=e[t].text.split(r.Y2.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(const r of a)e[t].width=Math.max((0,i.Un)(r,n),e[t].width),s=(0,i.ru)(r,n),e[t].height=e[t].height+s}}(0,r.K2)(At,"calcC4ShapeTextWH");var Ct=(0,r.K2)((function(t,e,a){e.x=a.data.startx,e.y=a.data.starty,e.width=a.data.stopx-a.data.startx,e.height=a.data.stopy-a.data.starty,e.label.y=bt.c4ShapeMargin-35;let n=e.wrap&&bt.wrap,r=Et(bt);r.fontSize=r.fontSize+2,r.fontWeight="bold",At("label",e,n,r,(0,i.Un)(e.label.text,r)),ut.drawBoundary(t,e,bt)}),"drawBoundary"),wt=(0,r.K2)((function(t,e,a,n){let r=0;for(const s of n){r=0;const n=a[s];let l=mt(bt,n.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,n.typeC4Shape.width=(0,i.Un)("«"+n.typeC4Shape.text+"»",l),n.typeC4Shape.height=l.fontSize+2,n.typeC4Shape.Y=bt.c4ShapePadding,r=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=r,r=n.image.Y+n.image.height}n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=r,r=n.image.Y+n.image.height);let o=n.wrap&&bt.wrap,c=bt.width-2*bt.c4ShapePadding,h=mt(bt,n.typeC4Shape.text);h.fontSize=h.fontSize+2,h.fontWeight="bold",At("label",n,o,h,c),n.label.Y=r+8,r=n.label.Y+n.label.height,n.type&&""!==n.type.text?(n.type.text="["+n.type.text+"]",At("type",n,o,mt(bt,n.typeC4Shape.text),c),n.type.Y=r+5,r=n.type.Y+n.type.height):n.techn&&""!==n.techn.text&&(n.techn.text="["+n.techn.text+"]",At("techn",n,o,mt(bt,n.techn.text),c),n.techn.Y=r+5,r=n.techn.Y+n.techn.height);let d=r,u=n.label.width;n.descr&&""!==n.descr.text&&(At("descr",n,o,mt(bt,n.typeC4Shape.text),c),n.descr.Y=r+20,r=n.descr.Y+n.descr.height,u=Math.max(n.label.width,n.descr.width),d=r-5*n.descr.textLines),u+=bt.c4ShapePadding,n.width=Math.max(n.width||bt.width,u,bt.width),n.height=Math.max(n.height||bt.height,d,bt.height),n.margin=n.margin||bt.c4ShapeMargin,t.insert(n),ut.drawC4Shape(e,n,bt)}t.bumpLastMargin(bt.c4ShapeMargin)}),"drawC4ShapeArray"),kt=class{static{(0,r.K2)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},Ot=(0,r.K2)((function(t,e){let a=t.x,n=t.y,i=e.x,r=e.y,s=a+t.width/2,l=n+t.height/2,o=Math.abs(a-i),c=Math.abs(n-r),h=c/o,d=t.height/t.width,u=null;return n==r&&ai?u=new kt(a,l):a==i&&nr&&(u=new kt(s,n)),a>i&&n=h?new kt(a,l+h*t.width/2):new kt(s-o/c*t.height/2,n+t.height):a=h?new kt(a+t.width,l+h*t.width/2):new kt(s+o/c*t.height/2,n+t.height):ar?u=d>=h?new kt(a+t.width,l-h*t.width/2):new kt(s+t.height/2*o/c,n):a>i&&n>r&&(u=d>=h?new kt(a,l-t.width/2*h):new kt(s-t.height/2*o/c,n)),u}),"getIntersectPoint"),Tt=(0,r.K2)((function(t,e){let a={x:0,y:0};a.x=e.x+e.width/2,a.y=e.y+e.height/2;let n=Ot(t,a);return a.x=t.x+t.width/2,a.y=t.y+t.height/2,{startPoint:n,endPoint:Ot(e,a)}}),"getIntersectPoints"),vt=(0,r.K2)((function(t,e,a,n){let r=0;for(let t of e){r+=1;let e=t.wrap&&bt.wrap,s=St(bt);"C4Dynamic"===n.db.getC4Type()&&(t.label.text=r+": "+t.label.text);let l=(0,i.Un)(t.label.text,s);At("label",t,e,s,l),t.techn&&""!==t.techn.text&&(l=(0,i.Un)(t.techn.text,s),At("techn",t,e,s,l)),t.descr&&""!==t.descr.text&&(l=(0,i.Un)(t.descr.text,s),At("descr",t,e,s,l));let o=a(t.from),c=a(t.to),h=Tt(o,c);t.startPoint=h.startPoint,t.endPoint=h.endPoint}ut.drawRels(t,e,bt)}),"drawRels");function Rt(t,e,a,n,i){let r=new xt(i);r.data.widthLimit=a.data.widthLimit/Math.min(ft,n.length);for(let[s,l]of n.entries()){let n=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=n,n=l.image.Y+l.image.height);let o=l.wrap&&bt.wrap,c=Et(bt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",At("label",l,o,c,r.data.widthLimit),l.label.Y=n+8,n=l.label.Y+l.label.height,l.type&&""!==l.type.text&&(l.type.text="["+l.type.text+"]",At("type",l,o,Et(bt),r.data.widthLimit),l.type.Y=n+5,n=l.type.Y+l.type.height),l.descr&&""!==l.descr.text){let t=Et(bt);t.fontSize=t.fontSize-2,At("descr",l,o,t,r.data.widthLimit),l.descr.Y=n+20,n=l.descr.Y+l.descr.height}if(0==s||s%ft==0){let t=a.data.startx+bt.diagramMarginX,e=a.data.stopy+bt.diagramMarginY+n;r.setData(t,t,e,e)}else{let t=r.data.stopx!==r.data.startx?r.data.stopx+bt.diagramMarginX:r.data.startx,e=r.data.starty;r.setData(t,t,e,e)}r.name=l.alias;let h=i.db.getC4ShapeArray(l.alias),d=i.db.getC4ShapeKeys(l.alias);d.length>0&&wt(r,t,h,d),e=l.alias;let u=i.db.getBoundarys(e);u.length>0&&Rt(t,e,r,u,i),"global"!==l.alias&&Ct(t,l,r),a.data.stopy=Math.max(r.data.stopy+bt.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(r.data.stopx+bt.c4ShapeMargin,a.data.stopx),pt=Math.max(pt,a.data.stopx),yt=Math.max(yt,a.data.stopy)}}(0,r.K2)(Rt,"drawInsideBoundary");var Dt={drawPersonOrSystemArray:wt,drawBoundary:Ct,setConf:_t,draw:(0,r.K2)((function(t,e,a,n){bt=(0,r.D7)().c4;const i=(0,r.D7)().securityLevel;let l;"sandbox"===i&&(l=(0,s.Ltv)("#i"+e));const o="sandbox"===i?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body");let c=n.db;n.db.setWrap(bt.wrap),gt=c.getC4ShapeInRow(),ft=c.getC4BoundaryInRow(),r.Rm.debug(`C:${JSON.stringify(bt,null,2)}`);const h="sandbox"===i?o.select(`[id="${e}"]`):(0,s.Ltv)(`[id="${e}"]`);ut.insertComputerIcon(h),ut.insertDatabaseIcon(h),ut.insertClockIcon(h);let d=new xt(n);d.setData(bt.diagramMarginX,bt.diagramMarginX,bt.diagramMarginY,bt.diagramMarginY),d.data.widthLimit=screen.availWidth,pt=bt.diagramMarginX,yt=bt.diagramMarginY;const u=n.db.getTitle();Rt(h,"",d,n.db.getBoundarys(""),n),ut.insertArrowHead(h),ut.insertArrowEnd(h),ut.insertArrowCrossHead(h),ut.insertArrowFilledHead(h),vt(h,n.db.getRels(),n.db.getC4Shape,n),d.data.stopx=pt,d.data.stopy=yt;const p=d.data;let y=p.stopy-p.starty+2*bt.diagramMarginY;const g=p.stopx-p.startx+2*bt.diagramMarginX;u&&h.append("text").text(u).attr("x",(p.stopx-p.startx)/2-4*bt.diagramMarginX).attr("y",p.starty+bt.diagramMarginY),(0,r.a$)(h,y,g,bt.useMaxWidth);const f=u?60:0;h.attr("viewBox",p.startx-bt.diagramMarginX+" -"+(bt.diagramMarginY+f)+" "+g+" "+(y+f)),r.Rm.debug("models:",p)}),"draw")},Nt={parser:d,db:V,renderer:Dt,styles:(0,r.K2)((t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`),"getStyles"),init:(0,r.K2)((({c4:t,wrap:e})=>{Dt.setConf(t),V.setWrap(e)}),"init")}},3814:(t,e,a)=>{a.d(e,{CP:()=>c,HT:()=>d,PB:()=>h,aC:()=>o,lC:()=>s,m:()=>l,tk:()=>r});var n=a(9502),i=a(6750),r=(0,n.K2)(((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a}),"drawRect"),s=(0,n.K2)(((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};r(t,a).lower()}),"drawBackgroundRect"),l=(0,n.K2)(((t,e)=>{const a=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 r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(a),i}),"drawText"),o=(0,n.K2)(((t,e,a,n)=>{const r=t.append("image");r.attr("x",e),r.attr("y",a);const s=(0,i.J)(n);r.attr("xlink:href",s)}),"drawImage"),c=(0,n.K2)(((t,e,a,n)=>{const r=t.append("use");r.attr("x",e),r.attr("y",a);const s=(0,i.J)(n);r.attr("xlink:href",`#${s}`)}),"drawEmbeddedImage"),h=(0,n.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),d=(0,n.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/691-2a6930fd.chunk.min.js b/docs/hugo/public/js/691-2a6930fd.chunk.min.js new file mode 100644 index 000000000..159bfeef5 --- /dev/null +++ b/docs/hugo/public/js/691-2a6930fd.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[691],{7691:(t,e,n)=>{n.d(e,{diagram:()=>J});var i=n(9502),s=n(4852),r=n(5097),a=n(8041),o=n(5263),c=function(){var t=(0,i.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,20,21],n=[1,9],s=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,16],l=[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,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 15:i.addTask(r[o],0,""),this.$=r[o];break;case 16:i.addEvent(r[o].substr(2)),this.$=r[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:n,12:s,14:r,16:a,17:o,18:14,19:15,20:c,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:s,14:r,16:a,17:o,18:14,19:15,20:c,21:l},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 n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var e=this,n=[0],s=[],r=[null],a=[],o=this.table,c="",l=0,h=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=s.pop()||p.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,i.K2)(x,"lex");for(var b,k,_,w,v,K,S,$,E,T={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=x()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var I;for(K in E=[],o[_])this.terminals_[K]&&K>2&&E.push("'"+this.terminals_[K]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),r.push(p.yytext),a.push(p.yylloc),n.push(w[1]),b=null,k?(b=k,k=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(S=this.productions_[w[1]][1],T.$=r[r.length-S],T._$={first_line:a[a.length-(S||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(S||1)].first_column,last_column:a[a.length-1].last_column},m&&(T._$.range=[a[a.length-(S||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(T,[c,h,l,y.yy,w[1],r,a].concat(u))))return v;S&&(n=n.slice(0,-1*S*2),r=r.slice(0,-1*S),a=a.slice(0,-1*S)),n.push(this.productions_[w[1]][0]),r.push(T.$),a.push(T._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},d=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,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"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 n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){return this.next()||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,n,i){switch(n){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]+)/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 u(){this.yy={}}return h.lexer=d,(0,i.K2)(u,"Parser"),u.prototype=h,h.Parser=u,new u}();c.parser=c;var l=c,h={};(0,i.VA)(h,{addEvent:()=>w,addSection:()=>x,addTask:()=>_,addTaskOrg:()=>v,clear:()=>m,default:()=>S,getCommonDb:()=>f,getSections:()=>b,getTasks:()=>k});var d="",u=0,p=[],y=[],g=[],f=(0,i.K2)((()=>i.Wt),"getCommonDb"),m=(0,i.K2)((function(){p.length=0,y.length=0,d="",g.length=0,(0,i.IU)()}),"clear"),x=(0,i.K2)((function(t){d=t,p.push(t)}),"addSection"),b=(0,i.K2)((function(){return p}),"getSections"),k=(0,i.K2)((function(){let t=K(),e=0;for(;!t&&e<100;)t=K(),e++;return y.push(...g),y}),"getTasks"),_=(0,i.K2)((function(t,e,n){const i={id:u++,section:d,type:d,task:t,score:e||0,events:n?[n]:[]};g.push(i)}),"addTask"),w=(0,i.K2)((function(t){g.find((t=>t.id===u-1)).events.push(t)}),"addEvent"),v=(0,i.K2)((function(t){const e={section:d,type:d,description:t,task:t,classes:[]};y.push(e)}),"addTaskOrg"),K=(0,i.K2)((function(){const t=(0,i.K2)((function(t){return g[t].processed}),"compileTask");let e=!0;for(const[n,i]of g.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),S={clear:m,getCommonDb:f,addSection:x,getSections:b,getTasks:k,addTask:_,addTaskOrg:v,addEvent:w},$=(0,i.K2)((function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n}),"drawRect"),E=(0,i.K2)((function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function a(t){const n=(0,s.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(t){const n=(0,s.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/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 r.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"),r.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)(a,"smile"),(0,i.K2)(o,"sad"),(0,i.K2)(c,"ambivalent"),e.score>3?a(r):e.score<3?o(r):c(r),n}),"drawFace"),T=(0,i.K2)((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),I=(0,i.K2)((function(t,e){const n=e.text.replace(//gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const s=i.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(n),i}),"drawText"),R=(0,i.K2)((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,i.K2)(n,"genPoints");const s=t.append("polygon");s.attr("points",n(e.x,e.y,50,20,7)),s.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,I(t,e)}),"drawLabel"),A=(0,i.K2)((function(t,e,n){const i=t.append("g"),s=P();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,$(i,s),H(n)(e.text,i,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),L=-1,M=(0,i.K2)((function(t,e,n){const i=e.x+n.width/2,s=t.append("g");L++,s.append("line").attr("id","task"+L).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(s,{cx:i,cy:300+30*(5-e.score),score:e.score});const r=P();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="task task-type-"+e.num,r.rx=3,r.ry=3,$(s,r),H(n)(e.task,s,r.x,r.y,r.width,r.height,{class:"task"},n,e.colour)}),"drawTask"),C=(0,i.K2)((function(t,e){$(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()}),"drawBackgroundRect"),N=(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"),P=(0,i.K2)((function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),H=function(){function t(t,e,n,i,r,a,o,c){s(e.append("text").attr("x",n+r/2).attr("y",i+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:d}=c,u=t.split(//gi);for(let t=0;t)/).reverse(),r=[],a=n.attr("y"),o=parseFloat(n.attr("dy")),c=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",o+"em");for(let s=0;se||"
"===t)&&(r.pop(),c.text(r.join(" ").trim()),r="
"===t?[""]:[t],c=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))}))}(0,i.K2)(j,"wrap");var D=(0,i.K2)((function(t,e,n,i){const s=n%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);const a=r.append("g"),o=r.append("g"),c=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(j,e.width).node().getBBox(),l=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=c.height+1.1*l*.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+")"),W(a,e,s,i),e}),"drawNode"),z=(0,i.K2)((function(t,e,n){const i=t.append("g"),s=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(j,e.width).node().getBBox(),r=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),s.height+1.1*r*.5+e.padding}),"getVirtualNodeHeight"),W=(0,i.K2)((function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}),"defaultBkg"),B={drawRect:$,drawCircle:T,drawSection:A,drawText:I,drawLabel:R,drawTask:M,drawBackgroundRect:C,getTextObj:N,getNoteRect:P,initGraphics:O,drawNode:D,getVirtualNodeHeight:z},F=(0,i.K2)((function(t,e,n,r){const a=(0,i.D7)(),o=a.leftMargin??50;i.Rm.debug("timeline",r.db);const c=a.securityLevel;let l;"sandbox"===c&&(l=(0,s.Ltv)("#i"+e));const h=("sandbox"===c?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select("#"+e);h.append("g");const d=r.db.getTasks(),u=r.db.getCommonDb().getDiagramTitle();i.Rm.debug("task",d),B.initGraphics(h);const p=r.db.getSections();i.Rm.debug("sections",p);let y=0,g=0,f=0,m=0,x=50+o,b=50;m=50;let k=0,_=!0;p.forEach((function(t){const e={number:k,descr:t,section:k,width:150,padding:20,maxHeight:y},n=B.getVirtualNodeHeight(h,e,a);i.Rm.debug("sectionHeight before draw",n),y=Math.max(y,n+20)}));let w=0,v=0;i.Rm.debug("tasks.length",d.length);for(const[t,e]of d.entries()){const n={number:t,descr:e,section:e.section,width:150,padding:20,maxHeight:g},s=B.getVirtualNodeHeight(h,n,a);i.Rm.debug("taskHeight before draw",s),g=Math.max(g,s+20),w=Math.max(w,e.events.length);let r=0;for(const t of e.events){const n={descr:t,section:e.section,number:e.section,width:150,padding:20,maxHeight:50};r+=B.getVirtualNodeHeight(h,n,a)}v=Math.max(v,r)}i.Rm.debug("maxSectionHeight before draw",y),i.Rm.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach((t=>{const e=d.filter((e=>e.section===t)),n={number:k,descr:t,section:k,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:y};i.Rm.debug("sectionNode",n);const s=h.append("g"),r=B.drawNode(s,n,k,a);i.Rm.debug("sectionNode output",r),s.attr("transform",`translate(${x}, 50)`),b+=y+50,e.length>0&&V(h,e,k,x,b,g,a,w,v,y,!1),x+=200*Math.max(e.length,1),b=50,k++})):(_=!1,V(h,d,k,x,b,g,a,w,v,y,!0));const K=h.node().getBBox();i.Rm.debug("bounds",K),u&&h.append("text").text(u).attr("x",K.width/2-o).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),f=_?y+g+150:g+100,h.append("g").attr("class","lineWrapper").append("line").attr("x1",o).attr("y1",f).attr("x2",K.width+3*o).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,i.ot)(void 0,h,a.timeline?.padding??50,a.timeline?.useMaxWidth??!1)}),"draw"),V=(0,i.K2)((function(t,e,n,s,r,a,o,c,l,h,d){for(const c of e){const e={descr:c.task,section:n,number:n,width:150,padding:20,maxHeight:a};i.Rm.debug("taskNode",e);const u=t.append("g").attr("class","taskWrapper"),p=B.drawNode(u,e,n,o).height;if(i.Rm.debug("taskHeight after draw",p),u.attr("transform",`translate(${s}, ${r})`),a=Math.max(a,p),c.events){const e=t.append("g").attr("class","lineWrapper");let i=a;r+=100,i+=G(t,c.events,n,s,r,o),r-=100,e.append("line").attr("x1",s+95).attr("y1",r+a).attr("x2",s+95).attr("y2",r+a+(d?a:h)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s+=200,d&&!o.timeline?.disableMulticolor&&n++}r-=10}),"drawTasks"),G=(0,i.K2)((function(t,e,n,s,r,a){let o=0;const c=r;r+=100;for(const c of e){const e={descr:c,section:n,number:n,width:150,padding:20,maxHeight:50};i.Rm.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),h=B.drawNode(l,e,n,a).height;o+=h,l.attr("transform",`translate(${s}, ${r})`),r=r+10+h}return r=c,o}),"drawEvents"),U={setConf:(0,i.K2)((()=>{}),"setConf"),draw:F},q=(0,i.K2)((t=>{let e="";for(let e=0;e`\n .edge {\n stroke-width: 3;\n }\n ${q(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")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/720-970f726e.chunk.min.js b/docs/hugo/public/js/720-970f726e.chunk.min.js new file mode 100644 index 000000000..158ba0ef8 --- /dev/null +++ b/docs/hugo/public/js/720-970f726e.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[720],{9720:(e,c,k)=>{k.d(c,{createArchitectureServices:()=>r.S});var r=k(9936);k(9369)}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/723-47eb515a.chunk.min.js b/docs/hugo/public/js/723-47eb515a.chunk.min.js new file mode 100644 index 000000000..128f89722 --- /dev/null +++ b/docs/hugo/public/js/723-47eb515a.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[723],{7723:(e,c,k)=>{k.d(c,{createPieServices:()=>s.f});var s=k(8685);k(9369)}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/731-70ea2831.chunk.min.js b/docs/hugo/public/js/731-70ea2831.chunk.min.js new file mode 100644 index 000000000..d4b98f75b --- /dev/null +++ b/docs/hugo/public/js/731-70ea2831.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[731],{9850:(e,t,n)=>{t.Qi=t.XO=void 0;const r=n(9590),i=n(8585),s=n(2676);var a;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(a||(t.XO=a={}));const o=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{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 s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.Qi=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=a.None}}},2676:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(9590);var i;!function(e){const t={dispose(){}};e.None=function(){return t}}(i||(t.Event=i={}));class s{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=a._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=a,a._noop=function(){}},8585:(e,t)=>{function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},9590:(e,t)=>{let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},7021:(e,t,n)=>{n.d(t,{v:()=>o});var r=n(9369),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.e5,a);return t.ServiceRegistry.register(n),{shared:t,Info:n}}(0,r.K2)(o,"createInfoServices")},8685:(e,t,n)=>{n.d(t,{f:()=>c});var r=n(9369),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},a=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new a),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.KX,o);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}(0,r.K2)(c,"createPieServices")},1609:(e,t,n)=>{n.d(t,{$:()=>o});var r=n(9369),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.AM,a);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}(0,r.K2)(o,"createPacketServices")},9936:(e,t,n)=>{n.d(t,{S:()=>c});var r=n(9369),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},a=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,n){return"ARCH_ICON"===e.name?t.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?t.replace(/["()]/g,""):"ARCH_TITLE"===e.name?t.replace(/[[\]]/g,"").trim():void 0}},o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new a),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.jE,o);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}(0,r.K2)(c,"createArchitectureServices")},2785:(e,t,n)=>{n.d(t,{b:()=>o});var r=n(9369),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.eZ,a);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}(0,r.K2)(o,"createGitGraphServices")},9369:(e,t,n)=>{n.d(t,{AM:()=>$,K2:()=>s,KX:()=>w,Tm:()=>P,dg:()=>_,e5:()=>C,eZ:()=>O,jE:()=>L,mR:()=>M,sr:()=>N});var r=n(3707),i=Object.defineProperty,s=(e,t)=>i(e,"name",{value:t,configurable:!0});s((function(e){return g.isInstance(e,"Architecture")}),"isArchitecture");var a="Branch";s((function(e){return g.isInstance(e,a)}),"isBranch");var o="Commit";s((function(e){return g.isInstance(e,o)}),"isCommit"),s((function(e){return g.isInstance(e,"Common")}),"isCommon");var c="GitGraph";s((function(e){return g.isInstance(e,c)}),"isGitGraph"),s((function(e){return g.isInstance(e,"Info")}),"isInfo");var l="Merge";s((function(e){return g.isInstance(e,l)}),"isMerge"),s((function(e){return g.isInstance(e,"Packet")}),"isPacket"),s((function(e){return g.isInstance(e,"PacketBlock")}),"isPacketBlock"),s((function(e){return g.isInstance(e,"Pie")}),"isPie"),s((function(e){return g.isInstance(e,"PieSection")}),"isPieSection");var u,d,h,f,p,m=class extends r.kD{static{s(this,"MermaidAstReflection")}getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(e,t){switch(e){case a:case"Checkout":case"CherryPicking":case o:case l:return this.isSubtype("Statement",t);case"Direction":return this.isSubtype(c,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;throw new Error(`${t} is not a valid reference id.`)}getTypeMetaData(e){switch(e){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},g=new m,y=s((()=>u??(u=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"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@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"InfoGrammar"),A=s((()=>d??(d=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PacketGrammar"),T=s((()=>h??(h=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PieGrammar"),v=s((()=>f??(f=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"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@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"ArchitectureGrammar"),R=s((()=>p??(p=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"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@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"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@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"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@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}'))),"GitGraphGrammar"),E={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},k={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},x={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},I={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},S={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},N={AstReflection:s((()=>new m),"AstReflection")},C={Grammar:s((()=>y()),"Grammar"),LanguageMetaData:s((()=>E),"LanguageMetaData"),parser:{}},$={Grammar:s((()=>A()),"Grammar"),LanguageMetaData:s((()=>k),"LanguageMetaData"),parser:{}},w={Grammar:s((()=>T()),"Grammar"),LanguageMetaData:s((()=>x),"LanguageMetaData"),parser:{}},L={Grammar:s((()=>v()),"Grammar"),LanguageMetaData:s((()=>I),"LanguageMetaData"),parser:{}},O={Grammar:s((()=>R()),"Grammar"),LanguageMetaData:s((()=>S),"LanguageMetaData"),parser:{}},b={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},_=class extends r.dM{static{s(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return void 0===r&&(r=this.runCustomConverter(e,t,n)),void 0===r?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){const r=b[e.name];if(void 0===r)return;const i=r.exec(t);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}},P=class extends _{static{s(this,"CommonValueConverter")}runCustomConverter(e,t,n){}},M=class extends r.QU{static{s(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);return r.forEach((e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))})),r}};(class extends M{static{s(this,"CommonTokenBuilder")}})},8731:(e,t,n)=>{n.d(t,{qg:()=>a}),n(2785),n(7021),n(1609),n(8685),n(9936);var r=n(9369),i={},s={info:(0,r.K2)((async()=>{const{createInfoServices:e}=await n.e(890).then(n.bind(n,890)),t=e().Info.parser.LangiumParser;i.info=t}),"info"),packet:(0,r.K2)((async()=>{const{createPacketServices:e}=await n.e(452).then(n.bind(n,4071)),t=e().Packet.parser.LangiumParser;i.packet=t}),"packet"),pie:(0,r.K2)((async()=>{const{createPieServices:e}=await n.e(723).then(n.bind(n,7723)),t=e().Pie.parser.LangiumParser;i.pie=t}),"pie"),architecture:(0,r.K2)((async()=>{const{createArchitectureServices:e}=await n.e(720).then(n.bind(n,9720)),t=e().Architecture.parser.LangiumParser;i.architecture=t}),"architecture"),gitGraph:(0,r.K2)((async()=>{const{createGitGraphServices:e}=await n.e(387).then(n.bind(n,2387)),t=e().GitGraph.parser.LangiumParser;i.gitGraph=t}),"gitGraph")};async function a(e,t){const n=s[e];if(!n)throw new Error(`Unknown diagram type: ${e}`);i[e]||await n();const r=i[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new o(r);return r.value}(0,r.K2)(a,"parse");var o=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map((e=>e.message)).join("\n")} ${e.parserErrors.map((e=>e.message)).join("\n")}`),this.result=e}static{(0,r.K2)(this,"MermaidParseError")}}},3707:(e,t,n)=>{function r(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function i(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText}function s(e){return"object"==typeof e&&null!==e&&r(e.container)&&i(e.reference)&&"string"==typeof e.message}n.d(t,{kD:()=>a,QU:()=>pc,dM:()=>mc,DD:()=>Jl,tG:()=>jl,uM:()=>Vl,WQ:()=>Hl,y0:()=>tu});class a{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const r=n[t];if(void 0!==r)return r;{const r=this.computeIsSubtype(e,t);return n[t]=r,r}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),n=[];for(const r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}}function o(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function c(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function l(e){return o(e)&&"string"==typeof e.fullText}class u{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){const e=[],t=this.iterator();let n;do{n=t.next(),void 0!==n.value&&e.push(n.value)}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map((n=>[e?e(n):n,t?t(n):n]));return new Map(n)}toString(){return this.join()}concat(e){const t=e[Symbol.iterator]();return new u((()=>({first:this.startFn(),firstDone:!1})),(e=>{let n;if(!e.firstDone){do{if(n=this.nextFn(e.first),!n.done)return n}while(!n.done);e.firstDone=!0}do{if(n=t.next(),!n.done)return n}while(!n.done);return f}))}join(e=","){const t=this.iterator();let n,r="",i=!1;do{n=t.next(),n.done||(i&&(r+=e),r+="string"==typeof(s=n.value)?s:void 0===s?"undefined":"function"==typeof s.toString?s.toString():Object.prototype.toString.call(s)),i=!0}while(!n.done);var s;return r}indexOf(e,t=0){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(e){return new u(this.startFn,(t=>{const{done:n,value:r}=this.nextFn(t);return n?f:{done:!1,value:e(r)}}))}filter(e){return new u(this.startFn,(t=>{let n;do{if(n=this.nextFn(t),!n.done&&e(n.value))return n}while(!n.done);return f}))}nonNullable(){return this.filter((e=>null!=e))}reduce(e,t){const n=this.iterator();let r=t,i=n.next();for(;!i.done;)r=void 0===r?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done)return n;const i=this.recursiveReduce(e,t,n);return void 0===i?r.value:t(i,r.value)}find(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(e){return new u((()=>({this:this.startFn()})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(!d(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return f}))}flat(e){if(void 0===e&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new u((()=>({this:t.startFn()})),(e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(!d(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return f}))}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new u((()=>{const t=this.startFn();for(let n=0;n({size:0,state:this.startFn()})),(t=>(t.size++,t.size>e?f:this.nextFn(t.state))))}distinct(e){const t=new Set;return this.filter((n=>{const r=e?e(n):n;return!t.has(r)&&(t.add(r),!0)}))}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter((e=>{const r=t?t(e):e;return!n.has(r)}))}}function d(e){return!!e&&"function"==typeof e[Symbol.iterator]}const h=new u((()=>{}),(()=>f)),f=Object.freeze({done:!0,value:void 0});function p(...e){if(1===e.length){const t=e[0];if(t instanceof u)return t;if(d(t))return new u((()=>t[Symbol.iterator]()),(e=>e.next()));if("number"==typeof t.length)return new u((()=>({index:0})),(e=>e.index1?new u((()=>({collIndex:0,arrIndex:0})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex({iterators:(null==n?void 0:n.includeRoot)?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1})),(e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const n=e.iterators[e.iterators.length-1].next();if(!n.done)return e.iterators.push(t(n.value)[Symbol.iterator]()),n;e.iterators.pop()}return f}))}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var g,y;function A(e){return new m(e,(e=>o(e)?e.content:[]),{includeRoot:!0})}function T(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function v(e){if(!e)return;const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}!function(e){e.sum=function(e){return e.reduce(((e,t)=>e+t),0)},e.product=function(e){return e.reduce(((e,t)=>e*t),0)},e.min=function(e){return e.reduce(((e,t)=>Math.min(e,t)))},e.max=function(e){return e.reduce(((e,t)=>Math.max(e,t)))}}(g||(g={})),function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside"}(y||(y={}));const R=/^[\w\p{L}]$/u;function E(e,t){return c(e)&&t.includes(e.tokenType.name)}class k extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function x(e){throw new Error("Error! The input value was not handled.")}const I="AbstractRule",S="AbstractType",N="Condition",C="ValueLiteral",$="AbstractElement",w="BooleanLiteral",L="Conjunction",O="Disjunction",b="InferredType";function _(e){return ve.isInstance(e,b)}const P="Interface";function M(e){return ve.isInstance(e,P)}const D="Negation",U="ParameterReference",F="ParserRule";function G(e){return ve.isInstance(e,F)}const K="ReturnType",B="SimpleType",j="TerminalRule";function V(e){return ve.isInstance(e,j)}const H="Type";function W(e){return ve.isInstance(e,H)}const z="Action";function Y(e){return ve.isInstance(e,z)}const X="Alternatives";function q(e){return ve.isInstance(e,X)}const Q="Assignment";function J(e){return ve.isInstance(e,Q)}const Z="CharacterRange",ee="CrossReference";function te(e){return ve.isInstance(e,ee)}const ne="EndOfFile",re="Group";function ie(e){return ve.isInstance(e,re)}const se="Keyword";function ae(e){return ve.isInstance(e,se)}const oe="NegatedToken",ce="RegexToken",le="RuleCall";function ue(e){return ve.isInstance(e,le)}const de="TerminalAlternatives",he="TerminalGroup",fe="TerminalRuleCall";function pe(e){return ve.isInstance(e,fe)}const me="UnorderedGroup";function ge(e){return ve.isInstance(e,me)}const ye="UntilToken",Ae="Wildcard";class Te extends a{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,t){switch(e){case z:case X:case Q:case Z:case ee:case ne:case re:case se:case oe:case ce:case le:case de:case he:case fe:case me:case ye:case Ae:return this.isSubtype($,t);case"ArrayLiteral":case"NumberLiteral":case"StringLiteral":return this.isSubtype(C,t);case"ArrayType":case"ReferenceType":case B:case"UnionType":return this.isSubtype("TypeDefinition",t);case w:return this.isSubtype(N,t)||this.isSubtype(C,t);case L:case O:case D:case U:return this.isSubtype(N,t);case b:case P:case H:return this.isSubtype(S,t);case F:return this.isSubtype(I,t)||this.isSubtype(S,t);case j:return this.isSubtype(I,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return S;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return I;case"Grammar:usedGrammars":return"Grammar";case"NamedArgument:parameter":case"ParameterReference:parameter":return"Parameter";case"TerminalRuleCall:rule":return j;default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}}const ve=new Te;function Re(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function Ee(e){const t=function(e){for(;e.$container;)e=e.$container;return e}(e),n=t.$document;if(!n)throw new Error("AST node has no document.");return n}function ke(e,t){if(!e)throw new Error("Node must be an AstNode.");const n=null==t?void 0:t.range;return new u((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{for(;t.keyIndexke(e,t)))}function Ie(e,t){if(!e)throw new Error("Root node must be an AstNode.");return(null==t?void 0:t.range)&&!Se(e,t.range)?new m(e,(()=>[])):new m(e,(e=>ke(e,t)),{includeRoot:!0})}function Se(e,t){var n;if(!t)return!0;const r=null===(n=e.$cstNode)||void 0===n?void 0:n.range;return!!r&&function(e,t){const n=function(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>t.end.character)return y.After;const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.liney.After}(r,t)}function Ne(e){return new u((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{for(;t.keyIndex=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class Be{visitChildren(e){for(const t in e){const n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((e=>{this.visit(e)}),this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const je=/\r?\n/gm,Ve=new Ke,He=new class extends Be{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=Ye(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){"Group"===e.type&&e.quantifier||super.visitChildren(e)}};function We(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),He.reset(e),He.visit(Ve.pattern(e)),He.multiline}catch(e){return!1}}function ze(e){return("string"==typeof e?new RegExp(e):e).test(" ")}function Ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xe(e,t){const n=new Set,r=function(e){return e.rules.find((e=>G(e)&&e.entry))}(e);if(!r)return new Set(e.rules);const i=[r].concat(function(e){return e.rules.filter((e=>V(e)&&e.hidden))}(e));for(const e of i)qe(e,n,t);const s=new Set;for(const t of e.rules)(n.has(t.name)||V(t)&&t.hidden)&&s.add(t);return s}function qe(e,t,n){t.add(e.name),xe(e).forEach((e=>{if(ue(e)||n&&pe(e)){const r=e.rule.ref;r&&!t.has(r.name)&&qe(r,t,n)}}))}function Qe(e,t,n){if(!e||!t)return;const r=Je(e,t,e.astNode,!0);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function Je(e,t,n,r){if(!r){const n=Re(e.grammarSource,J);if(n&&n.feature===t)return[e]}return o(e)&&e.astNode===n?e.content.flatMap((e=>Je(e,t,n,!1))):[]}function Ze(e){let t=e;return _(t)&&(Y(t.$container)?t=t.$container.$container:G(t.$container)?t=t.$container:x(t.$container)),et(e,t,new Map)}function et(e,t,n){var r,i;function s(t,r){let i;return Re(t,J)||(i=et(r,r,n)),n.set(e,i),i}if(n.has(e))return n.get(e);n.set(e,void 0);for(const a of xe(t)){if(J(a)&&"name"===a.feature.toLowerCase())return n.set(e,a),a;if(ue(a)&&G(a.rule.ref))return s(a,a.rule.ref);if(i=a,ve.isInstance(i,B)&&(null===(r=a.typeRef)||void 0===r?void 0:r.ref))return s(a,a.typeRef.ref)}}function tt(e){return nt(e,new Set)}function nt(e,t){if(t.has(e))return!0;t.add(e);for(const n of xe(e))if(ue(n)){if(!n.rule.ref)return!1;if(G(n.rule.ref)&&!nt(n.rule.ref,t))return!1}else{if(J(n))return!1;if(Y(n))return!1}return Boolean(e.definition)}function rt(e){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t){if(G(t))return t.name;if(M(t)||W(t))return t.name}}}function it(e){var t,n;if(G(e))return tt(e)?e.name:null!==(t=rt(e))&&void 0!==t?t:e.name;if(M(e)||W(e)||(n=e,ve.isInstance(n,K)))return e.name;if(Y(e)){const t=function(e){var t;return e.inferredType?e.inferredType.name:(null===(t=e.type)||void 0===t?void 0:t.ref)?it(e.type.ref):void 0}(e);if(t)return t}else if(_(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function st(e){const t={s:!1,i:!1,u:!1},n=ot(e.definition,t),r=Object.entries(t).filter((([,e])=>e)).map((([e])=>e)).join("");return new RegExp(n,r)}const at=/[\s\S]/.source;function ot(e,t){if(o=e,ve.isInstance(o,de))return lt((a=e).elements.map((e=>ot(e))).join("|"),{cardinality:a.cardinality,lookahead:a.lookahead});if(function(e){return ve.isInstance(e,he)}(e))return lt((s=e).elements.map((e=>ot(e))).join(""),{cardinality:s.cardinality,lookahead:s.lookahead});if(function(e){return ve.isInstance(e,Z)}(e))return(n=e).right?lt(`[${ct(n.left)}-${ct(n.right)}]`,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1}):lt(ct(n.left),{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1});var n,r,i,s,a,o;if(pe(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return lt(ot(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead})}if(function(e){return ve.isInstance(e,oe)}(e))return lt(`(?!${ot((r=e).terminal)})${at}*?`,{cardinality:r.cardinality,lookahead:r.lookahead});if(function(e){return ve.isInstance(e,ye)}(e))return lt(`${at}*?${ot((i=e).terminal)}`,{cardinality:i.cardinality,lookahead:i.lookahead});if(function(e){return ve.isInstance(e,ce)}(e)){const n=e.regex.lastIndexOf("/"),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),lt(r,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1})}if(function(e){return ve.isInstance(e,Ae)}(e))return lt(at,{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error(`Invalid terminal element: ${null==e?void 0:e.$type}`)}function ct(e){return Ye(e.value)}function lt(e,t){var n;return(!1!==t.wrap||t.lookahead)&&(e=`(${null!==(n=t.lookahead)&&void 0!==n?n:""}${e})`),t.cardinality?`${e}${t.cardinality}`:e}var ut=n(8058),dt=n(2866),ht=n(6401),ft=n(4722),pt=n(9622),mt=n(53);function gt(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}return r(),r(),e}const yt=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r{t.accept(e)}))}}class Kt extends Gt{constructor(e){super([]),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class Bt extends Gt{constructor(e){super(e.definition),this.orgText="",Ct(this,bt(e,(e=>void 0!==e)))}}class jt extends Gt{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Ct(this,bt(e,(e=>void 0!==e)))}}class Vt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}}class Ht extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}}class Wt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}}class zt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}}class Yt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}}class Xt extends Gt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ct(this,bt(e,(e=>void 0!==e)))}}class qt{constructor(e){this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}accept(e){e.visit(this)}}function Qt(e){function t(e){return(0,ft.A)(e,Qt)}if(e instanceof Kt){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return(0,vt.A)(e.label)&&(t.label=e.label),t}if(e instanceof jt)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Vt)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Ht)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Wt)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Qt(new qt({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Yt)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Qt(new qt({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof zt)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Xt)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof qt){const t={type:"Terminal",name:e.terminalType.name,label:(n=e.terminalType,r=n,(0,vt.A)(r.LABEL)&&""!==r.LABEL?n.LABEL:n.name),idx:e.idx};(0,vt.A)(e.label)&&(t.terminalLabel=e.label);const i=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=Ft(i)?i.source:i),t}var n,r;if(e instanceof Bt)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}class Jt{visit(e){const t=e;switch(t.constructor){case Kt:return this.visitNonTerminal(t);case jt:return this.visitAlternative(t);case Vt:return this.visitOption(t);case Ht:return this.visitRepetitionMandatory(t);case Wt:return this.visitRepetitionMandatoryWithSeparator(t);case Yt:return this.visitRepetitionWithSeparator(t);case zt:return this.visitRepetition(t);case Xt:return this.visitAlternation(t);case qt:return this.visitTerminal(t);case Bt:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}var Zt=n(3736),en=n(4288);const tn=function(e,t){var n;return(0,en.A)(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n};var nn=n(2049),rn=n(6832);const sn=function(e,t,n){var r=(0,nn.A)(e)?Zt.A:tn;return n&&(0,rn.A)(e,t,n)&&(t=void 0),r(e,(0,wt.A)(t,3))};var an=n(5205),on=Math.max;const cn=function(e,t,n,r){e=(0,xt.A)(e)?e:(0,dt.A)(e),n=n&&!r?(0,At.A)(n):0;var i=e.length;return n<0&&(n=on(i+n,0)),(0,vt.A)(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&(0,an.A)(e,t,n)>-1},ln=function(e,t){for(var n=-1,r=null==e?0:e.length;++nhn(e,t))):!(e instanceof Kt&&cn(t,e))&&e instanceof Gt&&(e instanceof Kt&&t.push(e),dn(e.definition,(e=>hn(e,t)))))}function fn(e){if(e instanceof Kt)return"SUBRULE";if(e instanceof Vt)return"OPTION";if(e instanceof Xt)return"OR";if(e instanceof Ht)return"AT_LEAST_ONE";if(e instanceof Wt)return"AT_LEAST_ONE_SEP";if(e instanceof Yt)return"MANY_SEP";if(e instanceof zt)return"MANY";if(e instanceof qt)return"CONSUME";throw Error("non exhaustive match")}class pn{walk(e,t=[]){(0,ut.A)(e.definition,((n,r)=>{const i=Tt(e.definition,r+1);if(n instanceof Kt)this.walkProdRef(n,i,t);else if(n instanceof qt)this.walkTerminal(n,i,t);else if(n instanceof jt)this.walkFlat(n,i,t);else if(n instanceof Vt)this.walkOption(n,i,t);else if(n instanceof Ht)this.walkAtLeastOne(n,i,t);else if(n instanceof Wt)this.walkAtLeastOneSep(n,i,t);else if(n instanceof Yt)this.walkManySep(n,i,t);else if(n instanceof zt)this.walkMany(n,i,t);else{if(!(n instanceof Xt))throw Error("non exhaustive match");this.walkOr(n,i,t)}}))}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new Vt({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=mn(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new Vt({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=mn(e,t,n);this.walk(e,r)}walkOr(e,t,n){const r=t.concat(n);(0,ut.A)(e.definition,(e=>{const t=new jt({definition:[e]});this.walk(t,r)}))}}function mn(e,t,n){return[new Vt({definition:[new qt({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}var gn=n(7371);const yn=function(e){return e&&e.length?(0,gn.A)(e):[]};var An=n(4098);function Tn(e){if(e instanceof Kt)return Tn(e.referencedRule);if(e instanceof qt)return[e.terminalType];if(function(e){return e instanceof jt||e instanceof Vt||e instanceof zt||e instanceof Ht||e instanceof Wt||e instanceof Yt||e instanceof qt||e instanceof Bt}(e))return function(e){let t=[];const n=e.definition;let r,i=0,s=n.length>i,a=!0;for(;s&&a;)r=n[i],a=hn(r),t=t.concat(Tn(r)),i+=1,s=n.length>i;return yn(t)}(e);if(function(e){return e instanceof Xt}(e))return function(e){const t=(0,ft.A)(e.definition,(e=>Tn(e)));return yn((0,An.A)(t))}(e);throw Error("non exhaustive match")}const vn="_~IN~_";class Rn extends pn{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=(i=e.referencedRule,s=e.idx,i.name+s+vn+this.topProd.name);var i,s;const a=t.concat(n),o=Tn(new jt({definition:a}));this.follows[r]=o}}var En=n(9592),kn=n(3068),xn=n(2634),In=n(1790);const Sn=function(e,t){return((0,nn.A)(e)?xn.A:In.A)(e,function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}((0,wt.A)(t,3)))};var Nn=n(9610),Cn=Math.max;const $n=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:(0,At.A)(n);return i<0&&(i=Cn(r+i,0)),(0,an.A)(e,t,i)};var wn=n(3130),Ln=n(4092),On=n(8300),bn=n(5530),_n=n(7809),Pn=n(4099);var Mn=n(7671),Dn=n(4326),Un=n(3533);const Fn=(0,Dn.A)((function(e,t){return(0,Un.A)(e)?function(e,t,n,r){var i=-1,s=bn.A,a=!0,o=e.length,c=[],l=t.length;if(!o)return c;n&&(t=(0,$t.A)(t,(0,Mt.A)(n))),r?(s=_n.A,a=!1):t.length>=200&&(s=Pn.A,a=!1,t=new On.A(t));e: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 n="";t&&(n="\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."),jn(`${Xn}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Qn(e,t,n){switch(e.type){case"Disjunction":for(let r=0;r{if("number"==typeof e)Jn(e,t,n);else{const r=e;if(!0===n)for(let e=r.from;e<=r.to;e++)Jn(e,t,n);else{for(let e=r.from;e<=r.to&&e=yr){const e=r.from>=yr?r.from:yr,n=r.to,i=Tr(e),s=Tr(n);for(let e=i;e<=s;e++)t[e]=e}}}}));break;case"Group":Qn(s.value,t,n);break;default:throw Error("Non Exhaustive Match")}const a=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===er(s)||"Group"!==s.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return(0,dt.A)(t)}function Jn(e,t,n){const r=Tr(e);t[r]=r,!0===n&&function(e,t){const n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){const e=Tr(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=Tr(e.charCodeAt(0));t[n]=n}}}(e,t)}function Zn(e,t){return(0,Bn.A)(e.value,(e=>{if("number"==typeof e)return cn(t,e);{const n=e;return void 0!==(0,Bn.A)(t,(e=>n.from<=e&&e<=n.to))}}))}function er(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&((0,nn.A)(e.value)?dn(e.value,er):er(e.value))}class tr extends Be{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}super.visitChildren(e)}}visitCharacter(e){cn(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===Zn(e,this.targetCharCodes)&&(this.found=!0):void 0!==Zn(e,this.targetCharCodes)&&(this.found=!0)}}function nr(e,t){if(t instanceof RegExp){const n=zn(t),r=new tr(e);return r.visit(n),r.found}return void 0!==(0,Bn.A)(t,(t=>cn(e,t.charCodeAt(0))))}const rr="PATTERN",ir="defaultMode",sr="modes";let ar="boolean"==typeof new RegExp("(?:)").sticky;const or=/[^\\][$]/,cr=/[^\\[][\^]|^\^/;function lr(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function ur(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function dr(e){const t=e.PATTERN;if(Ft(t))return!1;if((0,Nn.A)(t))return!0;if((0,pt.A)(t,"exec"))return!0;if((0,vt.A)(t))return!1;throw Error("non exhaustive match")}function hr(e){return!(!(0,vt.A)(e)||1!==e.length)&&e.charCodeAt(0)}const fr={test:function(e){const t=e.length;for(let n=this.lastIndex;n(0,vt.A)(e)?e.charCodeAt(0):e))}function gr(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}const yr=256;let Ar=[];function Tr(e){return ee.CATEGORIES))));const e=Fn(n,t);t=t.concat(e),(0,ht.A)(e)?r=!1:n=e}return t}(e);!function(e){(0,ut.A)(e,(e=>{var t;wr(e)||(Nr[Sr]=e,e.tokenTypeIdx=Sr++),Lr(e)&&!(0,nn.A)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Lr(e)||(e.CATEGORIES=[]),t=e,(0,pt.A)(t,"categoryMatches")||(e.categoryMatches=[]),function(e){return(0,pt.A)(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})}))}(t),function(e){(0,ut.A)(e,(e=>{$r([],e)}))}(t),function(e){(0,ut.A)(e,(e=>{e.categoryMatches=[],(0,ut.A)(e.categoryMatchesMap,((t,n)=>{e.categoryMatches.push(Nr[n].tokenTypeIdx)}))}))}(t),(0,ut.A)(t,(e=>{e.isParent=e.categoryMatches.length>0}))}function $r(e,t){(0,ut.A)(e,(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0})),(0,ut.A)(t.CATEGORIES,(n=>{const r=e.concat(t);cn(r,n)||$r(r,n)}))}function wr(e){return(0,pt.A)(e,"tokenTypeIdx")}function Lr(e){return(0,pt.A)(e,"CATEGORIES")}function Or(e){return(0,pt.A)(e,"tokenTypeIdx")}var br;!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"}(br||(br={}));const _r={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:{buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`},traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(_r);class Pr{constructor(e,t=_r){if(this.lexerDefinition=e,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=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=kr(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Ct({},_r,t);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(()=>{let n,r=!0;this.TRACE_INIT("Lexer Config handling",(()=>{if(this.config.lineTerminatorsPattern===_r.lineTerminatorsPattern)this.config.lineTerminatorsPattern=fr;else if(this.config.lineTerminatorCharacters===_r.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(t.safeMode&&t.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,nn.A)(e)?n={modes:{defaultMode:(0,mt.A)(e)},defaultMode:ir}:(r=!1,n=(0,mt.A)(e))})),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e){const t=[];return(0,pt.A)(e,ir)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+ir+"> property in its definition\n",type:br.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,pt.A)(e,sr)||t.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:br.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,pt.A)(e,sr)&&(0,pt.A)(e,ir)&&!(0,pt.A)(e.modes,e.defaultMode)&&t.push({message:`A MultiMode Lexer cannot be initialized with a ${ir}: <${e.defaultMode}>which does not exist\n`,type:br.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,pt.A)(e,sr)&&(0,ut.A)(e.modes,((e,n)=>{(0,ut.A)(e,((r,i)=>{if((0,En.A)(r))t.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${i}>\n`,type:br.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if((0,pt.A)(r,"LONGER_ALT")){const i=(0,nn.A)(r.LONGER_ALT)?r.LONGER_ALT:[r.LONGER_ALT];(0,ut.A)(i,(i=>{(0,En.A)(i)||cn(e,i)||t.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${r.name}> outside of mode <${n}>\n`,type:br.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))}}))})),t}(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),this.TRACE_INIT("performWarningRuntimeChecks",(()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(function(e,t,n){const r=[];let i=!1;const s=Gn((0,An.A)((0,dt.A)(e.modes))),a=Sn(s,(e=>e[rr]===Pr.NA)),o=mr(n);return t&&(0,ut.A)(a,(e=>{const t=pr(e,o);if(!1!==t){const n=function(e,t){if(t.issue===br.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===br.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(e,t),i={message:n,type:t.issue,tokenType:e};r.push(i)}else(0,pt.A)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):nr(o,e.PATTERN)&&(i=!0)})),t&&!i&&r.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:br.NO_LINE_BREAKS_FLAGS}),r}(n,this.trackStartLines,this.config.lineTerminatorCharacters))}))),n.modes=n.modes?n.modes:{},(0,ut.A)(n.modes,((e,t)=>{n.modes[t]=Sn(e,(e=>(0,En.A)(e)))}));const i=(0,St.A)(n.modes);if((0,ut.A)(n.modes,((e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,(()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e,t){let n=[];const r=function(e){const t=(0,Ln.A)(e,(e=>!(0,pt.A)(e,rr)));return{errors:(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:br.MISSING_PATTERN,tokenTypes:[e]}))),valid:Fn(e,t)}}(e);n=n.concat(r.errors);const i=function(e){const t=(0,Ln.A)(e,(e=>{const t=e[rr];return!(Ft(t)||(0,Nn.A)(t)||(0,pt.A)(t,"exec")||(0,vt.A)(t))}));return{errors:(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:br.INVALID_PATTERN,tokenTypes:[e]}))),valid:Fn(e,t)}}(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(function(e){let t=[];const n=(0,Ln.A)(e,(e=>Ft(e[rr])));return t=t.concat(function(e){class t extends Be{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const n=(0,Ln.A)(e,(e=>{const n=e.PATTERN;try{const e=zn(n),r=new t;return r.visit(e),r.found}catch(e){return or.test(n.source)}}));return(0,ft.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:br.EOI_ANCHOR_FOUND,tokenTypes:[e]})))}(n)),t=t.concat(function(e){class t extends Be{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const n=(0,Ln.A)(e,(e=>{const n=e.PATTERN;try{const e=zn(n),r=new t;return r.visit(e),r.found}catch(e){return cr.test(n.source)}}));return(0,ft.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:br.SOI_ANCHOR_FOUND,tokenTypes:[e]})))}(n)),t=t.concat(function(e){const t=(0,Ln.A)(e,(e=>{const t=e[rr];return t instanceof RegExp&&(t.multiline||t.global)}));return(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:br.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]})))}(n)),t=t.concat(function(e){const t=[];let n=(0,ft.A)(e,(n=>(0,wn.A)(e,((e,r)=>(n.PATTERN.source!==r.PATTERN.source||cn(t,r)||r.PATTERN===Pr.NA||(t.push(r),e.push(r)),e)),[])));n=Gn(n);const r=(0,Ln.A)(n,(e=>e.length>1));return(0,ft.A)(r,(e=>{const t=(0,ft.A)(e,(e=>e.name));return{message:`The same RegExp pattern ->${Kn(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:br.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}))}(n)),t=t.concat(function(e){const t=(0,Ln.A)(e,(e=>e.PATTERN.test("")));return(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:br.EMPTY_MATCH_PATTERN,tokenTypes:[e]})))}(n)),t}(s)),n=n.concat(function(e){const t=(0,Ln.A)(e,(e=>{if(!(0,pt.A)(e,"GROUP"))return!1;const t=e.GROUP;return t!==Pr.SKIPPED&&t!==Pr.NA&&!(0,vt.A)(t)}));return(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:br.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]})))}(s)),n=n.concat(function(e,t){const n=(0,Ln.A)(e,(e=>void 0!==e.PUSH_MODE&&!cn(t,e.PUSH_MODE)));return(0,ft.A)(n,(e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:br.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]})))}(s,t)),n=n.concat(function(e){const t=[],n=(0,wn.A)(e,((e,t,n)=>{const r=t.PATTERN;return r===Pr.NA||((0,vt.A)(r)?e.push({str:r,idx:n,tokenType:t}):Ft(r)&&(i=r,void 0===(0,Bn.A)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(e=>-1!==i.source.indexOf(e))))&&e.push({str:r.source,idx:n,tokenType:t})),e;var i}),[]);return(0,ut.A)(e,((e,r)=>{(0,ut.A)(n,(({str:n,idx:i,tokenType:s})=>{if(r${s.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:br.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}}))})),t}(s)),n}(e,i))})),(0,ht.A)(this.lexerDefinitionErrors)){let r;Cr(e),this.TRACE_INIT("analyzeTokenTypes",(()=>{r=function(e,t){const n=(t=(0,kn.A)(t,{useSticky:ar,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()})).tracer;let r;n("initCharCodeToOptimizedIndexMap",(()=>{!function(){if((0,ht.A)(Ar)){Ar=new Array(65536);for(let e=0;e<65536;e++)Ar[e]=e>255?255+~~(e/255):e}}()})),n("Reject Lexer.NA",(()=>{r=Sn(e,(e=>e[rr]===Pr.NA))}));let i,s,a,o,c,l,u,d,h,f,p,m=!1;n("Transform Patterns",(()=>{m=!1,i=(0,ft.A)(r,(e=>{const n=e[rr];if(Ft(n)){const e=n.source;return 1!==e.length||"^"===e||"$"===e||"."===e||n.ignoreCase?2!==e.length||"\\"!==e[0]||cn(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?t.useSticky?ur(n):lr(n):e[1]:e}if((0,Nn.A)(n))return m=!0,{exec:n};if("object"==typeof n)return m=!0,n;if("string"==typeof n){if(1===n.length)return n;{const e=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),r=new RegExp(e);return t.useSticky?ur(r):lr(r)}}throw Error("non exhaustive match")}))})),n("misc mapping",(()=>{s=(0,ft.A)(r,(e=>e.tokenTypeIdx)),a=(0,ft.A)(r,(e=>{const t=e.GROUP;if(t!==Pr.SKIPPED){if((0,vt.A)(t))return t;if((0,En.A)(t))return!1;throw Error("non exhaustive match")}})),o=(0,ft.A)(r,(e=>{const t=e.LONGER_ALT;if(t)return(0,nn.A)(t)?(0,ft.A)(t,(e=>$n(r,e))):[$n(r,t)]})),c=(0,ft.A)(r,(e=>e.PUSH_MODE)),l=(0,ft.A)(r,(e=>(0,pt.A)(e,"POP_MODE")))})),n("Line Terminator Handling",(()=>{const e=mr(t.lineTerminatorCharacters);u=(0,ft.A)(r,(e=>!1)),"onlyOffset"!==t.positionTracking&&(u=(0,ft.A)(r,(t=>(0,pt.A)(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===pr(t,e)&&nr(e,t.PATTERN))))})),n("Misc Mapping #2",(()=>{d=(0,ft.A)(r,dr),h=(0,ft.A)(i,hr),f=(0,wn.A)(r,((e,t)=>{const n=t.GROUP;return(0,vt.A)(n)&&n!==Pr.SKIPPED&&(e[n]=[]),e}),{}),p=(0,ft.A)(i,((e,t)=>({pattern:i[t],longerAlt:o[t],canLineTerminator:u[t],isCustom:d[t],short:h[t],group:a[t],push:c[t],pop:l[t],tokenTypeIdx:s[t],tokenType:r[t]})))}));let g=!0,y=[];return t.safeMode||n("First Char Optimization",(()=>{y=(0,wn.A)(r,((e,n,r)=>{if("string"==typeof n.PATTERN){const t=Tr(n.PATTERN.charCodeAt(0));gr(e,t,p[r])}else if((0,nn.A)(n.START_CHARS_HINT)){let t;(0,ut.A)(n.START_CHARS_HINT,(n=>{const i=Tr("string"==typeof n?n.charCodeAt(0):n);t!==i&&(t=i,gr(e,i,p[r]))}))}else if(Ft(n.PATTERN))if(n.PATTERN.unicode)g=!1,t.ensureOptimizations&&jn(`${Xn}\tUnable to analyze < ${n.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 i=qn(n.PATTERN,t.ensureOptimizations);(0,ht.A)(i)&&(g=!1),(0,ut.A)(i,(t=>{gr(e,t,p[r])}))}else t.ensureOptimizations&&jn(`${Xn}\tTokenType: <${n.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`),g=!1;return e}),[])})),{emptyGroups:f,patternIdxToConfig:p,charCodeToPatternIdxToConfig:y,hasCustom:m,canBeOptimized:g}}(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})})),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=Ct({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}}))})),this.defaultMode=n.defaultMode,!(0,ht.A)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=(0,ft.A)(this.lexerDefinitionErrors,(e=>e.message)).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}(0,ut.A)(this.lexerDefinitionWarning,(e=>{Vn(e.message)})),this.TRACE_INIT("Choosing sub-methods implementations",(()=>{if(ar?(this.chopInput=vr.A,this.match=this.matchWithTest):(this.updateLastIndex=Rr.A,this.match=this.matchWithExec),r&&(this.handleModes=Rr.A),!1===this.trackStartLines&&(this.computeNewColumn=vr.A),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=Rr.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 e=(0,wn.A)(this.canModeBeOptimized,((e,t,n)=>(!1===t&&e.push(n),e)),[]);if(t.ensureOptimizations&&!(0,ht.A)(e))throw Error(`Lexer Modes: < ${e.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",(()=>{Hn={}})),this.TRACE_INIT("toFastProperties",(()=>{gt(this)}))}))}tokenize(e,t=this.defaultMode){if(!(0,ht.A)(this.lexerDefinitionErrors)){const e=(0,ft.A)(this.lexerDefinitionErrors,(e=>e.message)).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,s,a,o,c,l,u,d,h,f,p,m,g;const y=e,A=y.length;let T=0,v=0;const R=this.hasCustom?0:Math.floor(e.length/10),E=new Array(R),k=[];let x=this.trackStartLines?1:void 0,I=this.trackStartLines?1:void 0;const S=function(e){const t={},n=(0,St.A)(e);return(0,ut.A)(n,(n=>{const r=e[n];if(!(0,nn.A)(r))throw Error("non exhaustive match");t[n]=[]})),t}(this.emptyGroups),N=this.trackStartLines,C=this.config.lineTerminatorsPattern;let $=0,w=[],L=[];const O=[],b=[];let _;function P(){return w}function M(e){const t=Tr(e),n=L[t];return void 0===n?b:n}Object.freeze(b);const D=e=>{if(1===O.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);k.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{O.pop();const e=(0,Er.A)(O);w=this.patternIdxToConfig[e],L=this.charCodeToPatternIdxToConfig[e],$=w.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;_=L&&t?M:P}};function U(e){O.push(e),L=this.charCodeToPatternIdxToConfig[e],w=this.patternIdxToConfig[e],$=w.length,$=w.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;_=L&&t?M:P}let F;U.call(this,t);const G=this.config.recoveryEnabled;for(;To.length){o=s,c=l,F=t;break}}}break}}if(null!==o){if(u=o.length,d=F.group,void 0!==d&&(h=F.tokenTypeIdx,f=this.createTokenInstance(o,T,h,F.tokenType,x,I,u),this.handlePayload(f,c),!1===d?v=this.addToken(E,v,f):S[d].push(f)),e=this.chopInput(e,u),T+=u,I=this.computeNewColumn(I,u),!0===N&&!0===F.canLineTerminator){let e,t,n=0;C.lastIndex=0;do{e=C.test(o),!0===e&&(t=C.lastIndex-1,n++)}while(!0===e);0!==n&&(x+=n,I=u-t,this.updateTokenEndLineColumnLocation(f,d,t,n,x,I,u))}this.handleModes(F,D,U,f)}else{const t=T,n=x,i=I;let s=!1===G;for(;!1===s&&T`Expecting ${Dr(e)?`--\x3e ${Mr(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ",a="\nbut found: '"+Kn(t).image+"'";if(r)return s+r+a;{const t=(0,wn.A)(e,((e,t)=>e.concat(t)),[]),n=(0,ft.A)(t,(e=>`[${(0,ft.A)(e,(e=>Mr(e))).join(", ")}]`));return s+`one of these possible Token sequences:\n${(0,ft.A)(n,((e,t)=>` ${t+1}. ${e}`)).join("\n")}`+a}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){const i="Expecting: ",s="\nbut found: '"+Kn(t).image+"'";return n?i+n+s:i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${(0,ft.A)(e,(e=>`[${(0,ft.A)(e,(e=>Mr(e))).join(",")}]`)).join(" ,")}>`+s}};Object.freeze(qr);const Qr={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},Jr={buildDuplicateFoundError(e,t){const n=e.name,r=Kn(t),i=r.idx,s=fn(r),a=(o=r)instanceof qt?o.terminalType.name:o instanceof Kt?o.nonTerminalName:"";var o;let c=`->${s}${i>0?i:""}<- ${a?`with argument: ->${a}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,"\n"),c},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.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(e){const t=(0,ft.A)(e.prefixPath,(e=>Mr(e))).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin inside <${e.topLevelRule.name}> Rule,\n<${t}> 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(e){const t=(0,ft.A)(e.prefixPath,(e=>Mr(e))).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError(e){let t=fn(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${t} --\x3e ${(0,ft.A)(e.leftRecursionPath,(e=>e.name)).concat([t]).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:e=>"deprecated",buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof Bt?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};class Zr extends Jt{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){(0,ut.A)((0,dt.A)(this.nameToTopRule),(e=>{this.currTopLevel=e,e.accept(this)}))}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Ns.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}const ei=function(e,t){return(0,Mn.A)((0,ft.A)(e,t),1)};var ti=n(2528);const ni=function(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i{!1===(0,ht.A)(e.definition)&&(r=s(e.definition))})),r;if(!(t instanceof qt))throw Error("non exhaustive match");n.push(t.terminalType)}}i++}return r.push({partialPath:n,suffixDef:Tt(e,i)}),r}function yi(e,t,n,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const c=t.length,l=c-r-1,u=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,ht.A)(d);){const e=d.pop();if(e===a){o&&(0,Er.A)(d).idx<=l&&d.pop();continue}const r=e.def,h=e.idx,f=e.ruleStack,p=e.occurrenceStack;if((0,ht.A)(r))continue;const m=r[0];if(m===i){const e={idx:h,def:Tt(r),ruleStack:ci(f),occurrenceStack:ci(p)};d.push(e)}else if(m instanceof qt)if(h=0;e--){const t={idx:h,def:m.definition[e].definition.concat(Tt(r)),ruleStack:f,occurrenceStack:p};d.push(t),d.push(a)}else if(m instanceof jt)d.push({idx:h,def:m.definition.concat(Tt(r)),ruleStack:f,occurrenceStack:p});else{if(!(m instanceof Bt))throw Error("non exhaustive match");d.push(Ai(m,h,f,p))}}return u}function Ai(e,t,n,r){const i=(0,mt.A)(n);i.push(e.name);const s=(0,mt.A)(r);return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var Ti;function vi(e){if(e instanceof Vt||"Option"===e)return Ti.OPTION;if(e instanceof zt||"Repetition"===e)return Ti.REPETITION;if(e instanceof Ht||"RepetitionMandatory"===e)return Ti.REPETITION_MANDATORY;if(e instanceof Wt||"RepetitionMandatoryWithSeparator"===e)return Ti.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Yt||"RepetitionWithSeparator"===e)return Ti.REPETITION_WITH_SEPARATOR;if(e instanceof Xt||"Alternation"===e)return Ti.ALTERNATION;throw Error("non exhaustive match")}function Ri(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,s=vi(r);return s===Ti.ALTERNATION?wi(t,n,i):Li(t,n,s,i)}function Ei(e,t,n,r){const i=e.length,s=dn(e,(e=>dn(e,(e=>1===e.length))));if(t)return function(t){const r=(0,ft.A)(t,(e=>e.GATE));for(let t=0;t(0,An.A)(e))),n=(0,wn.A)(t,((e,t,n)=>((0,ut.A)(t,(t=>{(0,pt.A)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),(0,ut.A)(t.categoryMatches,(t=>{(0,pt.A)(e,t)||(e[t]=n)}))})),e)),{});return function(){const e=this.LA(1);return n[e.tokenTypeIdx]}}return function(){for(let t=0;t1===e.length)),i=e.length;if(r&&!n){const t=(0,An.A)(e);if(1===t.length&&(0,ht.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,wn.A)(t,((e,t,n)=>(e[t.tokenTypeIdx]=!0,(0,ut.A)(t.categoryMatches,(t=>{e[t]=!0})),e)),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let n=0;ngi([e],1))),r=Si(n.length),i=(0,ft.A)(n,(e=>{const t={};return(0,ut.A)(e,(e=>{const n=Ni(e.partialPath);(0,ut.A)(n,(e=>{t[e]=!0}))})),t}));let s=n;for(let e=1;e<=t;e++){const n=s;s=Si(n.length);for(let a=0;a{const t=Ni(e.partialPath);(0,ut.A)(t,(e=>{i[a][e]=!0}))}))}}}}return r}function wi(e,t,n,r){const i=new Ii(e,Ti.ALTERNATION,r);return t.accept(i),$i(i.result,n)}function Li(e,t,n,r){const i=new Ii(e,n);t.accept(i);const s=i.result,a=new xi(t,e,n).startWalking();return $i([new jt({definition:s}),new jt({definition:a})],r)}function Oi(e,t){e:for(let n=0;ndn(e,(e=>dn(e,(e=>(0,ht.A)(e.categoryMatches)))))))}function _i(e){return`${fn(e)}_#_${e.idx}_#_${Pi(e)}`}function Pi(e){return e instanceof qt?e.terminalType.name:e instanceof Kt?e.nonTerminalName:""}class Mi extends Jt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function Di(e,t,n,r=[]){const i=[],s=Ui(t.definition);if((0,ht.A)(s))return[];{const t=e.name;cn(s,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Ns.LEFT_RECURSION,ruleName:t});const a=Fn(s,r.concat([e])),o=ei(a,(t=>{const i=(0,mt.A)(r);return i.push(t),Di(e,t,n,i)}));return i.concat(o)}}function Ui(e){let t=[];if((0,ht.A)(e))return t;const n=Kn(e);if(n instanceof Kt)t.push(n.referencedRule);else if(n instanceof jt||n instanceof Vt||n instanceof Ht||n instanceof Wt||n instanceof Yt||n instanceof zt)t=t.concat(Ui(n.definition));else if(n instanceof Xt)t=(0,An.A)((0,ft.A)(n.definition,(e=>Ui(e.definition))));else if(!(n instanceof qt))throw Error("non exhaustive match");const r=hn(n),i=e.length>1;if(r&&i){const n=Tt(e);return t.concat(Ui(n))}return t}class Fi extends Jt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}class Gi extends Jt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}const Ki="MismatchedTokenException",Bi="NoViableAltException",ji="EarlyExitException",Vi="NotAllInputParsedException",Hi=[Ki,Bi,ji,Vi];function Wi(e){return cn(Hi,e.name)}Object.freeze(Hi);class zi extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class Yi extends zi{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Ki}}class Xi extends zi{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Bi}}class qi extends zi{constructor(e,t){super(e,t),this.name=Vi}}class Qi extends zi{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ji}}const Ji={},Zi="InRuleRecoveryException";class es extends Error{constructor(e){super(e),this.name=Zi}}function ts(e,t,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[o];if(void 0===c){const e=this.getCurrRuleFullName();c=new s(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[o]=c}let l=c.token,u=c.occurrence;const d=c.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===l&&(l=zr,u=1),void 0!==l&&void 0!==u&&this.shouldInRepetitionRecoveryBeTried(l,u,a)&&this.tryInRepetitionRecovery(e,t,n,l)}const ns=1024,rs=1280,is=1536;function ss(e,t,n){return n|t|e}class as{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:Is.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if((0,ht.A)(t)){const n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return ei(e,(e=>Di(e,e,Jr)))}validateEmptyOrAlternatives(e){return ei(e,(e=>function(e,t){const n=new Fi;e.accept(n);const r=n.alternations;return ei(r,(n=>{const r=ci(n.definition);return ei(r,((r,i)=>{const s=yi([r],[],xr,1);return(0,ht.A)(s)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:Ns.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]}))}))}(e,Jr)))}validateAmbiguousAlternationAlternatives(e,t){return ei(e,(e=>function(e,t,n){const r=new Fi;e.accept(r);let i=r.alternations;i=Sn(i,(e=>!0===e.ignoreAmbiguities));return ei(i,(r=>{const i=r.idx,s=r.maxLookahead||t,a=wi(i,e,s,r),o=function(e,t,n,r){const i=[],s=(0,wn.A)(e,((n,r,s)=>(!0===t.definition[s].ignoreAmbiguities||(0,ut.A)(r,(r=>{const a=[s];(0,ut.A)(e,((e,n)=>{s!==n&&Oi(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&a.push(n)})),a.length>1&&!Oi(i,r)&&(i.push(r),n.push({alts:a,path:r}))})),n)),[]);return(0,ft.A)(s,(e=>{const i=(0,ft.A)(e.alts,(e=>e+1));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Ns.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}}))}(a,r,e,n),c=function(e,t,n,r){const i=(0,wn.A)(e,((e,t,n)=>{const r=(0,ft.A)(t,(e=>({idx:n,path:e})));return e.concat(r)}),[]);return Gn(ei(i,(e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const s=e.idx,a=e.path,o=(0,Ln.A)(i,(e=>{return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx{const n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]})));var n,r}));return(0,ft.A)(o,(e=>{const i=[e.idx+1,s+1],a=0===t.idx?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Ns.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:a,alternatives:i}}))})))}(a,r,e,n);return o.concat(c)}))}(e,t,Jr)))}validateSomeNonEmptyLookaheadPath(e,t){return function(e,t,n){const r=[];return(0,ut.A)(e,(e=>{const i=new Gi;e.accept(i);const s=i.allProductions;(0,ut.A)(s,(i=>{const s=vi(i),a=i.maxLookahead||t,o=Li(i.idx,e,s,a)[0];if((0,ht.A)((0,An.A)(o))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:Ns.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}(e,t,Jr)}buildLookaheadForAlternation(e){return function(e,t,n,r,i,s){const a=wi(e,t,n);return s(a,r,bi(a)?Ir:xr,i)}(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Ei)}buildLookaheadForOptional(e){return function(e,t,n,r,i,s){const a=Li(e,t,i,n),o=bi(a)?Ir:xr;return s(a[0],o,r)}(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,vi(e.prodType),ki)}}const os=new class extends Jt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function cs(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset(0,Nn.A)(e.GATE)));return s.hasPredicates=a,n.definition.push(s),(0,ut.A)(i,(e=>{const t=new jt({definition:[]});s.definition.push(t),(0,pt.A)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,pt.A)(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()})),ps}function Es(e){return 0===e?"":`${e}`}function ks(e){if(e<0||e>gs){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${gs+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}const xs=Yr(zr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(xs);const Is=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:qr,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Ss=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Ns,Cs,$s;function ws(e=void 0){return function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"}(Ns||(Ns={}));class Ls{static performSelfAnalysis(e){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 e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",(()=>{gt(this)})),this.TRACE_INIT("Grammar Recording",(()=>{try{this.enableRecording(),(0,ut.A)(this.definedRulesNames,(e=>{const t=this[e].originalGrammarAction;let n;this.TRACE_INIT(`${e} Rule`,(()=>{n=this.topLevelRuleRecord(e,t)})),this.gastProductionsCache[e]=n}))}finally{this.disableRecording()}}));let n=[];if(this.TRACE_INIT("Grammar Resolving",(()=>{n=function(e){const t=(0,kn.A)(e,{errMsgProvider:Qr}),n={};return(0,ut.A)(e.rules,(e=>{n[e.name]=e})),function(e,t){const n=new Zr(e,t);return n.resolveRefs(),n.errors}(n,t.errMsgProvider)}({rules:(0,dt.A)(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)})),this.TRACE_INIT("Grammar Validations",(()=>{if((0,ht.A)(n)&&!1===this.skipValidations){const n=(e={rules:(0,dt.A)(this.gastProductionsCache),tokenTypes:(0,dt.A)(this.tokensMap),errMsgProvider:Jr,grammarName:t},function(e,t,n,r){const i=ei(e,(e=>function(e,t){const n=new Mi;e.accept(n);const r=n.allProductions,i=si(r,_i),s=bt(i,(e=>e.length>1));return(0,ft.A)((0,dt.A)(s),(n=>{const r=Kn(n),i=t.buildDuplicateFoundError(e,n),s=fn(r),a={message:i,type:Ns.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:s,occurrence:r.idx},o=Pi(r);return o&&(a.parameter=o),a}))}(e,n))),s=function(e,t,n){const r=[],i=(0,ft.A)(t,(e=>e.name));return(0,ut.A)(e,(e=>{const t=e.name;if(cn(i,t)){const i=n.buildNamespaceConflictError(e);r.push({message:i,type:Ns.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}(e,t,n),a=ei(e,(e=>function(e,t){const n=new Fi;e.accept(n);const r=n.alternations;return ei(r,(n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Ns.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[]))}(e,n))),o=ei(e,(t=>function(e,t,n,r){const i=[],s=(0,wn.A)(t,((t,n)=>n.name===e.name?t+1:t),0);if(s>1){const t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:Ns.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}(t,e,r,n)));return i.concat(s,a,o)}((e=(0,kn.A)(e,{errMsgProvider:Jr})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)),r=function(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,ft.A)(t,(e=>Object.assign({type:Ns.CUSTOM_LOOKAHEAD_VALIDATION},e)))}({lookaheadStrategy:this.lookaheadStrategy,rules:(0,dt.A)(this.gastProductionsCache),tokenTypes:(0,dt.A)(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(n,r)}var e})),(0,ht.A)(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",(()=>{const e=function(e){const t={};return(0,ut.A)(e,(e=>{const n=new Rn(e).startWalking();Ct(t,n)})),t}((0,dt.A)(this.gastProductionsCache));this.resyncFollows=e})),this.TRACE_INIT("ComputeLookaheadFunctions",(()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:(0,dt.A)(this.gastProductionsCache)}),this.preComputeLookaheadFunctions((0,dt.A)(this.gastProductionsCache))}))),!Ls.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,ht.A)(this.definitionErrors))throw e=(0,ft.A)(this.definitionErrors,(e=>e.message)),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)}))}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),(0,pt.A)(t,"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,pt.A)(t,"skipValidations")?t.skipValidations:Is.skipValidations}}Ls.DEFER_DEFINITION_ERRORS_HANDLING=!1,Cs=Ls,$s=[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,pt.A)(e,"recoveryEnabled")?e.recoveryEnabled:Is.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=ts)}getTokenToInsert(e){const t=Yr(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){const i=this.findReSyncTokenType(),s=this.exportLexerState(),a=[];let o=!1;const c=this.LA(1);let l=this.LA(1);const u=()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()}),n=new Yi(t,c,this.LA(0));n.resyncedTokens=ci(a),this.SAVE_ERROR(n)};for(;!o;){if(this.tokenMatcher(l,r))return void u();if(n.call(this))return u(),void e.apply(this,t);this.tokenMatcher(l,i)?o=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,a))}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){return!1!==n&&!this.tokenMatcher(this.LA(1),e)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new es("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if((0,ht.A)(t))return!1;const n=this.LA(1);return void 0!==(0,Bn.A)(t,(e=>this.tokenMatcher(n,e)))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return cn(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),n=2;for(;;){const r=(0,Bn.A)(e,(e=>Xr(t,e)));if(void 0!==r)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return Ji;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return(0,ft.A)(e,((n,r)=>0===r?Ji:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])}))}flattenFollowSet(){const e=(0,ft.A)(this.buildFullFollowKeyStack(),(e=>this.getFollowSetFromFollowKey(e)));return(0,An.A)(e)}getFollowSetFromFollowKey(e){if(e===Ji)return[zr];const t=e.ruleName+e.idxInCallingRule+vn+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,zr)||t.push(e),t}reSyncTo(e){const t=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return ci(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,a){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,mt.A)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return(0,ft.A)(this.RULE_STACK,(e=>this.shortRuleNameToFullName(e)))}},class{initLooksAhead(e){this.dynamicTokensEnabled=(0,pt.A)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Is.dynamicTokensEnabled,this.maxLookahead=(0,pt.A)(e,"maxLookahead")?e.maxLookahead:Is.maxLookahead,this.lookaheadStrategy=(0,pt.A)(e,"lookaheadStrategy")?e.lookaheadStrategy:new as({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,ut.A)(e,(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,(()=>{const{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:a}=function(e){os.reset(),e.accept(os);const t=os.dslMethods;return os.reset(),t}(e);(0,ut.A)(t,(t=>{const n=0===t.idx?"":t.idx;this.TRACE_INIT(`${fn(t)}${n}`,(()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=ss(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)}))})),(0,ut.A)(n,(t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,fn(t))})),(0,ut.A)(r,(t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,fn(t))})),(0,ut.A)(i,(t=>{this.computeLookaheadFunc(e,t.idx,ns,"RepetitionMandatory",t.maxLookahead,fn(t))})),(0,ut.A)(s,(t=>{this.computeLookaheadFunc(e,t.idx,is,"RepetitionMandatoryWithSeparator",t.maxLookahead,fn(t))})),(0,ut.A)(a,(t=>{this.computeLookaheadFunc(e,t.idx,rs,"RepetitionWithSeparator",t.maxLookahead,fn(t))}))}))}))}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${0===t?"":t}`,(()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),a=ss(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(a,s)}))}getKeyForAutomaticLookahead(e,t){return ss(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,pt.A)(e,"nodeLocationTracking")?e.nodeLocationTracking:Is.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=ls,this.setNodeLocationFromNode=ls,this.cstPostRule=Rr.A,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Rr.A,this.setNodeLocationFromNode=Rr.A,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=cs,this.setNodeLocationFromNode=cs,this.cstPostRule=Rr.A,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Rr.A,this.setNodeLocationFromNode=Rr.A,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=Rr.A,this.setNodeLocationFromNode=Rr.A,this.cstPostRule=Rr.A,this.setInitialNodeLocation=Rr.A}else this.cstInvocationStateUpdate=Rr.A,this.cstFinallyStateUpdate=Rr.A,this.cstPostTerminal=Rr.A,this.cstPostNonTerminal=Rr.A,this.cstPostRule=Rr.A}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];var r,i,s;i=t,s=e,void 0===(r=n).children[s]?r.children[s]=[i]:r.children[s].push(i),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];!function(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,En.A)(this.baseCstVisitorConstructor)){const e=function(e,t){const n=function(){};us(n,e+"BaseSemantics");const r={visit:function(e,t){if((0,nn.A)(e)&&(e=e[0]),!(0,En.A)(e))return this[e.name](e.children,t)},validateVisitor:function(){const e=function(e,t){const n=function(e,t){const n=(0,Ln.A)(t,(t=>!1===(0,Nn.A)(e[t]))),r=(0,ft.A)(n,(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:hs.MISSING_METHOD,methodName:t})));return Gn(r)}(e,t);return n}(this,t);if(!(0,ht.A)(e)){const t=(0,ft.A)(e,(e=>e.msg));throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=r).constructor=n,n._RULE_NAMES=t,n}(this.className,(0,St.A)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,En.A)(this.baseCstVisitorWithDefaultsConstructor)){const e=function(e,t,n){const r=function(){};us(r,e+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return(0,ut.A)(t,(e=>{i[e]=ds})),(r.prototype=i).constructor=r,r}(this.className,(0,St.A)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):xs}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?xs:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ir,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,pt.A)(t,"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,nn.A)(e)){if((0,ht.A)(e))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 e[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,nn.A)(e))this.tokensMap=(0,wn.A)(e,((e,t)=>(e[t.name]=t,e)),{});else if((0,pt.A)(e,"modes")&&dn((0,An.A)((0,dt.A)(e.modes)),Or)){const t=(0,An.A)((0,dt.A)(e.modes)),n=yn(t);this.tokensMap=(0,wn.A)(n,((e,t)=>(e[t.name]=t,e)),{})}else{if(!(0,fs.A)(e))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,mt.A)(e)}this.tokensMap.EOF=zr;const n=(0,pt.A)(e,"modes")?(0,An.A)((0,dt.A)(e.modes)):(0,dt.A)(e),r=dn(n,(e=>(0,ht.A)(e.categoryMatches)));this.tokenMatcher=r?Ir:xr,Cr((0,dt.A)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> 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 r=(0,pt.A)(n,"resyncEnabled")?n.resyncEnabled:Ss.resyncEnabled,i=(0,pt.A)(n,"recoveryValueFunc")?n.recoveryValueFunc:Ss.recoveryValueFunc,s=this.ruleShortNameIdx<<12;let a;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,a=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(a,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){const r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Wi(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(ns,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,Ti.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,ns,e,pi)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(is,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,Ti.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,mi],t,is,e,mi)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let s=!0;for(;!0===i.call(this)&&!0===s;)s=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,hi,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(rs,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,fi],t,rs,e,fi)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,is,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(256,t),r=(0,nn.A)(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new qi(t,e))}}subruleInternal(e,t,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw Wi(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Yi(r,t,i))}consumeInternalRecovery(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===Zi?n:e}}}saveRecogState(){const e=this.errors,t=(0,mt.A)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),zr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=Ss){if(cn(this.definedRulesNames,e)){const t={message:Jr.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Ns.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=Ss){const r=function(e,t,n){const r=[];let i;return cn(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:Ns.INVALID_RULE_OVERRIDE,ruleName:e})),r}(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(Wi(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return e=(0,dt.A)(this.gastProductionsCache),(0,ft.A)(e,Qt);var e}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=(0,pt.A)(e,"errorMessageProvider")?e.errorMessageProvider:Is.errorMessageProvider}SAVE_ERROR(e){if(Wi(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,mt.A)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return(0,mt.A)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName(),i=Li(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],s=[];for(let e=1;e<=this.maxLookahead;e++)s.push(this.LA(e));const a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new Qi(a,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName(),r=wi(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));const s=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Xi(a,this.LA(1),s))}},class{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if((0,En.A)(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return yi([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=Kn(e.ruleStack),n=this.getGAstProductions()[t];return new ui(n,e).startWalking()}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},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 e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA}))}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return xs}topLevelRuleRecord(e,t){try{const n=new Bt({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.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(t){throw e}throw e}}optionInternalRecord(e,t){return vs.call(this,Vt,e,t)}atLeastOneInternalRecord(e,t){vs.call(this,Ht,t,e)}atLeastOneSepFirstInternalRecord(e,t){vs.call(this,Wt,t,e,ms)}manyInternalRecord(e,t){vs.call(this,zt,t,e)}manySepFirstInternalRecord(e,t){vs.call(this,Yt,t,e,ms)}orInternalRecord(e,t){return Rs.call(this,e,t)}subruleInternalRecord(e,t,n){if(ks(t),!e||!1===(0,pt.A)(e,"ruleName")){const n=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,Er.A)(this.recordingProdStack),i=e.ruleName,s=new Kt({idx:t,nonTerminalName:i,label:null==n?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(s),this.outputCst?Ts:ps}consumeInternalRecord(e,t,n){if(ks(t),!wr(e)){const n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,Er.A)(this.recordingProdStack),i=new qt({idx:t,terminalType:e,label:null==n?void 0:n.LABEL});return r.definition.push(i),As}},class{initPerformanceTracer(e){if((0,pt.A)(e,"traceInitPerf")){const t=e.traceInitPerf,n="number"==typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Is.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=kr(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()}}],$s.forEach((e=>{const t=e.prototype;Object.getOwnPropertyNames(t).forEach((n=>{if("constructor"===n)return;const r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(Cs.prototype,n,r):Cs.prototype[n]=e.prototype[n]}))}));class Os extends Ls{constructor(e,t=Is){const n=(0,mt.A)(t);n.outputCst=!1,super(e,n)}}function bs(e,t,n){return`${e.name}_${t}_${n}`}class _s{constructor(e){this.target=e}isEpsilon(){return!1}}class Ps extends _s{constructor(e,t){super(e),this.tokenType=t}}class Ms extends _s{constructor(e){super(e)}isEpsilon(){return!0}}class Ds extends _s{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}}function Us(e,t,n){return n instanceof qt?Vs(e,t,n.terminalType,n):n instanceof Kt?function(e,t,n){const r=n.referencedRule,i=e.ruleToStartState.get(r),s=zs(e,t,n,{type:1}),a=zs(e,t,n,{type:1});return Ys(s,new Ds(i,r,a)),{left:s,right:a}}(e,t,n):n instanceof Xt?function(e,t,n){const r=zs(e,t,n,{type:1});Bs(e,r);const i=(0,ft.A)(n.definition,(n=>Us(e,t,n)));return js(e,t,r,n,...i)}(e,t,n):n instanceof Vt?function(e,t,n){const r=zs(e,t,n,{type:1});Bs(e,r);return function(e,t,n,r){const i=r.left;return Ws(i,r.right),e.decisionMap[bs(t,"Option",n.idx)]=i,r}(e,t,n,js(e,t,r,n,Fs(e,t,n)))}(e,t,n):n instanceof zt?function(e,t,n){const r=zs(e,t,n,{type:5});Bs(e,r);return Ks(e,t,n,js(e,t,r,n,Fs(e,t,n)))}(e,t,n):n instanceof Yt?function(e,t,n){const r=zs(e,t,n,{type:5});Bs(e,r);return Ks(e,t,n,js(e,t,r,n,Fs(e,t,n)),Vs(e,t,n.separator,n))}(e,t,n):n instanceof Ht?function(e,t,n){const r=zs(e,t,n,{type:4});Bs(e,r);return Gs(e,t,n,js(e,t,r,n,Fs(e,t,n)))}(e,t,n):n instanceof Wt?function(e,t,n){const r=zs(e,t,n,{type:4});Bs(e,r);return Gs(e,t,n,js(e,t,r,n,Fs(e,t,n)),Vs(e,t,n.separator,n))}(e,t,n):Fs(e,t,n)}function Fs(e,t,n){const r=(0,Ln.A)((0,ft.A)(n.definition,(n=>Us(e,t,n))),(e=>void 0!==e));return 1===r.length?r[0]:0===r.length?void 0:function(e,t){const n=t.length;for(let r=0;re.alt))}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function Js(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map((e=>e.stateNumber.toString())).join("_")}`}var Zs=n(6452);function ea(e,t){const n={};return r=>{const i=r.toString();let s=n[i];return void 0!==s||(s={atnStartState:e,decision:t,states:{}},n[i]=s),s}}class ta{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;nconsole.log(e)}initialize(e){this.atn=function(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(e,t){const n=t.length;for(let r=0;r(0,ft.A)(e,(e=>e[0]))));if(ia(l,!1)&&!i){const e=(0,wn.A)(l,((e,t,n)=>((0,ut.A)(t,(t=>{t&&(e[t.tokenTypeIdx]=n,(0,ut.A)(t.categoryMatches,(t=>{e[t]=n})))})),e)),{});return r?function(t){var n;const r=this.LA(1),i=e[r.tokenTypeIdx];if(void 0!==t&&void 0!==i){const e=null===(n=t[i])||void 0===n?void 0:n.GATE;if(void 0!==e&&!1===e.call(this))return}return i}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return r?function(e){const t=new ta,n=void 0===e?0:e.length;for(let r=0;r(0,ft.A)(e,(e=>e[0]))));if(ia(l)&&l[0][0]&&!i){const e=l[0],t=(0,An.A)(e);if(1===t.length&&(0,ht.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,wn.A)(t,((e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,(0,ut.A)(t.categoryMatches,(t=>{e[t]=!0}))),e)),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=sa.call(this,s,c,na,a);return"object"!=typeof e&&0===e}}}function ia(e,t=!0){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(void 0===i){if(t)break;return!1}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function sa(e,t,n,r){const i=e[t](n);let s=i.start;return void 0===s&&(s=fa(i,da(function(e){const t=new Qs,n=e.transitions.length;for(let r=0;r0&&!function(e){for(const t of e.elements)if(7===t.state.type)return!0;return!1}(s))for(const e of i)s.add(e);return s}(t.configs,n,i);if(0===a.size)return ha(e,t,n,qs),qs;let o=da(a);const c=function(e,t){let n;for(const r of e.elements)if(!0===t.is(r.alt))if(void 0===n)n=r.alt;else if(n!==r.alt)return;return n}(a,i);if(void 0!==c)o.isAcceptState=!0,o.prediction=c,o.configs.uniqueAlt=c;else if(function(e){if(function(e){for(const t of e.elements)if(7!==t.state.type)return!1;return!0}(e))return!0;const t=function(e){const t=new Map;for(const n of e){const e=Js(n,!1);let r=t.get(e);void 0===r&&(r={},t.set(e,r)),r[n.alt]=!0}return t}(e.elements);return function(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}(t)&&!function(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}(t)}(a)){const t=(0,Zs.A)(a.alts);o.isAcceptState=!0,o.prediction=t,o.configs.uniqueAlt=t,ca.apply(this,[e,r,a.alts,s])}return o=ha(e,t,n,o),o}function ca(e,t,n,r){const i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);const s=e.atnStartState;r(function(e){const t=(0,ft.A)(e.prefixPath,(e=>Mr(e))).join(", "),n=0===e.production.idx?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${function(e){if(e instanceof Kt)return"SUBRULE";if(e instanceof Vt)return"OPTION";if(e instanceof Xt)return"OR";if(e instanceof Ht)return"AT_LEAST_ONE";if(e instanceof Wt)return"AT_LEAST_ONE_SEP";if(e instanceof Yt)return"MANY_SEP";if(e instanceof zt)return"MANY";if(e instanceof qt)return"CONSUME";throw Error("non exhaustive match")}(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r}({topLevelRule:s.rule,ambiguityIndices:n,production:s.production,prefixPath:i}))}function la(e,t,n){const r=ei(t.configs.elements,(e=>e.state.transitions));return{actualToken:n,possibleTokenTypes:(i=r.filter((e=>e instanceof Ps)).map((e=>e.tokenType)),s=e=>e.tokenTypeIdx,i&&i.length?(0,gn.A)(i,(0,wt.A)(s,2)):[]),tokenPath:e};var i,s}function ua(e,t){if(e instanceof Ps&&Xr(t,e.tokenType))return e.target}function da(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function ha(e,t,n,r){return r=fa(e,r),t.edges[n.tokenTypeIdx]=r,r}function fa(e,t){if(t===qs)return t;const n=t.configs.key,r=e.states[n];return void 0!==r?r:(t.configs.finalize(),e.states[n]=t,t)}function pa(e,t){const n=e.state;if(7===n.type){if(e.stack.length>0){const n=[...e.stack];pa({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);const r=n.transitions.length;for(let i=0;i0&&(r.arguments=n),r},e.is=function(e){let t=e;return Bo.defined(t)&&Bo.string(t.title)&&Bo.string(t.command)}}(_a||(_a={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Bo.objectLiteral(t)&&Bo.string(t.newText)&&Ra.is(t.range)}}(Pa||(Pa={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Bo.objectLiteral(t)&&Bo.string(t.label)&&(Bo.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Bo.string(t.description)||void 0===t.description)}}(Ma||(Ma={})),function(e){e.is=function(e){const t=e;return Bo.string(t)}}(Da||(Da={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return Pa.is(t)&&(Ma.is(t.annotationId)||Da.is(t.annotationId))}}(Ua||(Ua={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Bo.defined(t)&&Wa.is(t.textDocument)&&Array.isArray(t.edits)}}(Fa||(Fa={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Bo.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Bo.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Bo.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Da.is(t.annotationId))}}(Ga||(Ga={})),function(e){e.create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Bo.string(t.oldUri)&&Bo.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Bo.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Bo.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Da.is(t.annotationId))}}(Ka||(Ka={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Bo.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Bo.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Bo.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Da.is(t.annotationId))}}(Ba||(Ba={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Bo.string(e.kind)?Ga.is(e)||Ka.is(e)||Ba.is(e):Fa.is(e))))}}(ja||(ja={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Bo.defined(t)&&Bo.string(t.uri)}}(Va||(Va={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Bo.defined(t)&&Bo.string(t.uri)&&Bo.integer(t.version)}}(Ha||(Ha={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Bo.defined(t)&&Bo.string(t.uri)&&(null===t.version||Bo.integer(t.version))}}(Wa||(Wa={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Bo.defined(t)&&Bo.string(t.uri)&&Bo.string(t.languageId)&&Bo.integer(t.version)&&Bo.string(t.text)}}(za||(za={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(Ya||(Ya={})),function(e){e.is=function(e){const t=e;return Bo.objectLiteral(e)&&Ya.is(t.kind)&&Bo.string(t.value)}}(Xa||(Xa={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(qa||(qa={})),function(e){e.PlainText=1,e.Snippet=2}(Qa||(Qa={})),function(e){e.Deprecated=1}(Ja||(Ja={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Bo.string(t.newText)&&Ra.is(t.insert)&&Ra.is(t.replace)}}(Za||(Za={})),function(e){e.asIs=1,e.adjustIndentation=2}(eo||(eo={})),function(e){e.is=function(e){const t=e;return t&&(Bo.string(t.detail)||void 0===t.detail)&&(Bo.string(t.description)||void 0===t.description)}}(to||(to={})),function(e){e.create=function(e){return{label:e}}}(no||(no={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(ro||(ro={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Bo.string(t)||Bo.objectLiteral(t)&&Bo.string(t.language)&&Bo.string(t.value)}}(io||(io={})),function(e){e.is=function(e){let t=e;return!!t&&Bo.objectLiteral(t)&&(Xa.is(t.contents)||io.is(t.contents)||Bo.typedArray(t.contents,io.is))&&(void 0===e.range||Ra.is(e.range))}}(so||(so={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(ao||(ao={})),function(e){e.create=function(e,t,...n){let r={label:e};return Bo.defined(t)&&(r.documentation=t),Bo.defined(n)?r.parameters=n:r.parameters=[],r}}(oo||(oo={})),function(e){e.Text=1,e.Read=2,e.Write=3}(co||(co={})),function(e){e.create=function(e,t){let n={range:e};return Bo.number(t)&&(n.kind=t),n}}(lo||(lo={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(uo||(uo={})),function(e){e.Deprecated=1}(ho||(ho={})),function(e){e.create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s}}(fo||(fo={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(po||(po={})),function(e){e.create=function(e,t,n,r,i,s){let a={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(a.children=s),a},e.is=function(e){let t=e;return t&&Bo.string(t.name)&&Bo.number(t.kind)&&Ra.is(t.range)&&Ra.is(t.selectionRange)&&(void 0===t.detail||Bo.string(t.detail))&&(void 0===t.deprecated||Bo.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(mo||(mo={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(go||(go={})),function(e){e.Invoked=1,e.Automatic=2}(yo||(yo={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Bo.defined(t)&&Bo.typedArray(t.diagnostics,ba.is)&&(void 0===t.only||Bo.typedArray(t.only,Bo.string))&&(void 0===t.triggerKind||t.triggerKind===yo.Invoked||t.triggerKind===yo.Automatic)}}(Ao||(Ao={})),function(e){e.create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):_a.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Bo.string(t.title)&&(void 0===t.diagnostics||Bo.typedArray(t.diagnostics,ba.is))&&(void 0===t.kind||Bo.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||_a.is(t.command))&&(void 0===t.isPreferred||Bo.boolean(t.isPreferred))&&(void 0===t.edit||ja.is(t.edit))}}(To||(To={})),function(e){e.create=function(e,t){let n={range:e};return Bo.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Bo.defined(t)&&Ra.is(t.range)&&(Bo.undefined(t.command)||_a.is(t.command))}}(vo||(vo={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Bo.defined(t)&&Bo.uinteger(t.tabSize)&&Bo.boolean(t.insertSpaces)}}(Ro||(Ro={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Bo.defined(t)&&Ra.is(t.range)&&(Bo.undefined(t.target)||Bo.string(t.target))}}(Eo||(Eo={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Bo.objectLiteral(n)&&Ra.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(ko||(ko={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(xo||(xo={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(Io||(Io={})),function(e){e.is=function(e){const t=e;return Bo.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(So||(So={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&Ra.is(t.range)&&Bo.string(t.text)}}(No||(No={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&Ra.is(t.range)&&Bo.boolean(t.caseSensitiveLookup)&&(Bo.string(t.variableName)||void 0===t.variableName)}}(Co||(Co={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&Ra.is(t.range)&&(Bo.string(t.expression)||void 0===t.expression)}}($o||($o={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Bo.defined(t)&&Ra.is(e.stoppedLocation)}}(wo||(wo={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Lo||(Lo={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Bo.objectLiteral(t)&&(void 0===t.tooltip||Bo.string(t.tooltip)||Xa.is(t.tooltip))&&(void 0===t.location||Ea.is(t.location))&&(void 0===t.command||_a.is(t.command))}}(Oo||(Oo={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Bo.objectLiteral(t)&&va.is(t.position)&&(Bo.string(t.label)||Bo.typedArray(t.label,Oo.is))&&(void 0===t.kind||Lo.is(t.kind))&&void 0===t.textEdits||Bo.typedArray(t.textEdits,Pa.is)&&(void 0===t.tooltip||Bo.string(t.tooltip)||Xa.is(t.tooltip))&&(void 0===t.paddingLeft||Bo.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Bo.boolean(t.paddingRight))}}(bo||(bo={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(_o||(_o={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Po||(Po={})),function(e){e.create=function(e){return{items:e}}}(Mo||(Mo={})),function(e){e.Invoked=0,e.Automatic=1}(Do||(Do={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Uo||(Uo={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Fo||(Fo={})),function(e){e.is=function(e){const t=e;return Bo.objectLiteral(t)&&ya.is(t.uri)&&Bo.string(t.name)}}(Go||(Go={})),function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let a=0,o=0,c=0;for(;a{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],a=e.offsetAt(n.range.start),o=e.offsetAt(n.range.end);if(!(o<=s))throw new Error("Overlapping edit");r=r.substring(0,a)+n.newText+r.substring(o,r.length),s=a}return r}}(Ko||(Ko={}));class jo{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return va.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return va.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1=0&&t.content.splice(n,1)}}construct(e){const t=this.current;"string"==typeof e.$type&&(this.current.astNode=e),e.$cstNode=t;const n=this.nodeStack.pop();0===(null==n?void 0:n.content.length)&&this.removeNode(n)}addHiddenTokens(e){for(const t of e){const e=new Wo(t.startOffset,t.image.length,T(t),t.tokenType,!0);e.root=this.rootNode,this.addHiddenToken(this.rootNode,e)}}addHiddenToken(e,t){const{offset:n,end:r}=t;for(let i=0;ia&&r=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class Yo extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,Yo.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(const t of e)t.container=this.parent}}class Xo extends zo{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=null!=e?e:""}}const qo=Symbol("Datatype");function Qo(e){return e.$type===qo}const Jo=e=>e.endsWith("​")?e:e+"​";class Zo{constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition;this.wrapper=new sc(t,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class ec extends Zo{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Vo,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const n=e.fragment?void 0:tt(e)?qo:it(e),r=this.wrapper.DEFINE_RULE(Jo(e.name),this.startImplementation(n,t).bind(this));return e.entry&&(this.mainRule=r),r}parse(e){this.nodeBuilder.buildRootNode(e);const t=this.lexer.tokenize(e);this.wrapper.input=t.tokens;const n=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(t.hidden),this.unorderedGroups.clear(),{value:n,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(e,t){return n=>{if(!this.isRecording()){const t={$type:e};this.stack.push(t),e===qo&&(t.value="")}let r;try{r=t(n)}catch(e){r=void 0}return this.isRecording()||void 0!==r||(r=this.construct()),r}}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.nodeBuilder.buildLeafNode(r,n),{assignment:t,isCrossRef:i}=this.getAssignment(n),s=this.current;if(t){const s=ae(n)?r.image:this.converter.convert(r.image,e);this.assign(t.operator,t.feature,s,e,i)}else if(Qo(s)){let t=r.image;ae(n)||(t=this.converter.convert(t,e).toString()),s.value+=t}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,n,r){let i;this.isRecording()||(i=this.nodeBuilder.buildCompositeNode(n));const s=this.wrapper.wrapSubrule(e,t,r);!this.isRecording()&&i&&i.length>0&&this.performSubruleAssignment(s,n,i)}performSubruleAssignment(e,t,n){const{assignment:r,isCrossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){const t=this.current;if(Qo(t))t.value+=e.toString();else if("object"==typeof e&&e){const n=e.$type,r=this.assignWithoutOverride(e,t);n&&(r.$type=n);const i=r;this.stack.pop(),this.stack.push(i)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&t.feature&&t.operator){n=this.construct(!1);const e=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(e)}const r={$type:e};this.stack.pop(),this.stack.push(r),t.feature&&t.operator&&this.assign(t.operator,t.feature,n,n.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;const t=this.current;return function(e){for(const[t,n]of Object.entries(e))t.startsWith("$")||(Array.isArray(n)?n.forEach(((n,i)=>{r(n)&&(n.$container=e,n.$containerProperty=t,n.$containerIndex=i)})):r(n)&&(n.$container=e,n.$containerProperty=t))}(t),this.nodeBuilder.construct(t),e&&this.stack.pop(),Qo(t)?this.converter.convert(t.value,t.$cstNode):(function(e,t){const n=e.getTypeMetaData(t.$type),r=t;for(const e of n.properties)void 0!==e.defaultValue&&void 0===r[e.name]&&(r[e.name]=Ce(e.defaultValue))}(this.astReflection,t),t)}getAssignment(e){if(!this.assignmentMap.has(e)){const t=Re(e,J);this.assignmentMap.set(e,{assignment:t,isCrossRef:!!t&&te(t.terminal)})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let a;switch(a=i&&"string"==typeof n?this.linker.buildReference(s,t,r,n):n,e){case"=":s[t]=a;break;case"?=":s[t]=!0;break;case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(a)}}assignWithoutOverride(e,t){for(const[n,r]of Object.entries(t)){const t=e[n];void 0===t?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class tc{buildMismatchTokenMessage(e){return qr.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return qr.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return qr.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return qr.buildEarlyExitMessage(e)}}class nc extends tc{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class rc extends Zo{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e);return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(Jo(e.name),this.startImplementation(t).bind(this));return e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r){this.before(n),this.wrapper.wrapSubrule(e,t,r),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const ic={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new nc};class sc extends Os{constructor(e,t){const n=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},ic),{lookaheadStrategy:n?new as({maxLookahead:t.maxLookahead}):new ra}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}}function ac(e,t,n){return function(e,t){const n=Xe(t,!1),r=p(t.rules).filter(G).filter((e=>n.has(e)));for(const t of r){const n=Object.assign(Object.assign({},e),{consume:1,optional:1,subrule:1,many:1,or:1});n.rules.set(t.name,e.parser.rule(t,oc(n,t.definition)))}}({parser:t,tokens:n,rules:new Map,ruleNames:new Map},e),t}function oc(e,t,n=!1){let r;if(ae(t))r=function(e,t){const n=e.consume++,r=e.tokens[t.value];if(!r)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(n,r,t)}(e,t);else if(Y(t))r=function(e,t){const n=it(t);return()=>e.parser.action(n,t)}(e,t);else if(J(t))r=oc(e,t.terminal);else if(te(t))r=uc(e,t);else if(ue(t))r=function(e,t){const n=t.rule.ref;if(G(n)){const r=e.subrule++,i=t.arguments.length>0?function(e,t){const n=t.map((e=>cc(e.value)));return t=>{const r={};for(let i=0;i({});return s=>e.parser.subrule(r,hc(e,n),t,i(s))}if(V(n)){const r=e.consume++,i=fc(e,n.name);return()=>e.parser.consume(r,i,t)}if(!n)throw new k(t.$cstNode,`Undefined rule type: ${t.$type}`);x()}(e,t);else if(q(t))r=function(e,t){if(1===t.elements.length)return oc(e,t.elements[0]);{const n=[];for(const r of t.elements){const t={ALT:oc(e,r,!0)},i=lc(r);i&&(t.GATE=cc(i)),n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map((e=>{const n={ALT:()=>e.ALT(t)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n})))}}(e,t);else if(ge(t))r=function(e,t){if(1===t.elements.length)return oc(e,t.elements[0]);const n=[];for(const r of t.elements){const t={ALT:oc(e,r,!0)},i=lc(r);i&&(t.GATE=cc(i)),n.push(t)}const r=e.or++,i=(e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,s=dc(e,lc(t),(t=>e.parser.alternatives(r,n.map(((n,s)=>{const a={ALT:()=>!0},o=e.parser;a.ALT=()=>{if(n.ALT(t),!o.isRecording()){const e=i(r,o);o.unorderedGroups.get(e)||o.unorderedGroups.set(e,[]);const t=o.unorderedGroups.get(e);void 0===(null==t?void 0:t[s])&&(t[s]=!0)}};const c=n.GATE;return a.GATE=c?()=>c(t):()=>{const e=o.unorderedGroups.get(i(r,o));return!(null==e?void 0:e[s])},a})))),"*");return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}(e,t);else if(ie(t))r=function(e,t){const n=t.elements.map((t=>oc(e,t)));return e=>n.forEach((t=>t(e)))}(e,t);else{if(i=t,!ve.isInstance(i,ne))throw new k(t.$cstNode,`Unexpected element type: ${t.$type}`);{const n=e.consume++;r=()=>e.parser.consume(n,zr,t)}}var i;return dc(e,n?void 0:lc(t),r,t.cardinality)}function cc(e){if(t=e,ve.isInstance(t,O)){const t=cc(e.left),n=cc(e.right);return e=>t(e)||n(e)}if(function(e){return ve.isInstance(e,L)}(e)){const t=cc(e.left),n=cc(e.right);return e=>t(e)&&n(e)}if(function(e){return ve.isInstance(e,D)}(e)){const t=cc(e.value);return e=>!t(e)}if(function(e){return ve.isInstance(e,U)}(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(function(e){return ve.isInstance(e,w)}(e)){const t=Boolean(e.true);return()=>t}var t;x()}function lc(e){if(ie(e))return e.guardCondition}function uc(e,t,n=t.terminal){if(n){if(ue(n)&&G(n.rule.ref)){const r=e.subrule++;return i=>e.parser.subrule(r,hc(e,n.rule.ref),t,i)}if(ue(n)&&V(n.rule.ref)){const r=e.consume++,i=fc(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if(ae(n)){const r=e.consume++,i=fc(e,n.value);return()=>e.parser.consume(r,i,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const n=Ze(t.type.ref),r=null==n?void 0:n.terminal;if(!r)throw new Error("Could not find name assignment for type: "+it(t.type.ref));return uc(e,t,r)}}function dc(e,t,n,r){const i=t&&cc(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:ws(),GATE:()=>!i(r)}])}return n}if("*"===r){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}if("+"===r){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:ws(),GATE:()=>!i(s)}])}return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}if("?"===r){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}x()}function hc(e,t){const n=function(e,t){if(G(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!G(r);)(ie(r)||q(r)||ge(r))&&(i=r.elements.indexOf(n).toString()+":"+i),n=r,r=r.$container;return i=r.name+":"+i,e.ruleNames.set(t,i),i}}(e,t),r=e.rules.get(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function fc(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}class pc{buildTokens(e,t){const n=p(Xe(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return r.forEach((e=>{const t=e.PATTERN;"object"==typeof t&&t&&"test"in t&&ze(t)?i.unshift(e):i.push(e)})),i}buildTerminalTokens(e){return e.filter(V).filter((e=>!e.fragment)).map((e=>this.buildTerminalToken(e))).toArray()}buildTerminalToken(e){const t=st(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n,LINE_BREAKS:!0};return e.hidden&&(r.GROUP=ze(t)?Pr.SKIPPED:"hidden"),r}requiresCustomPattern(e){return!!e.flags.includes("u")||!(!e.source.includes("?<=")&&!e.source.includes("?(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(G).flatMap((e=>xe(e).filter(ae))).distinct((e=>e.value)).toArray().sort(((e,t)=>t.value.length-e.value.length)).map((e=>this.buildKeywordToken(e,t,Boolean(null==n?void 0:n.caseInsensitive))))}buildKeywordToken(e,t,n){return{name:e.value,PATTERN:this.buildKeywordPattern(e,n),LONGER_ALT:this.findLongerAlt(e,t)}}buildKeywordPattern(e,t){return t?new RegExp(function(e){return Array.prototype.map.call(e,(e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:Ye(e))).join("")}(e.value)):e.value}findLongerAlt(e,t){return t.reduce(((t,n)=>{const r=null==n?void 0:n.PATTERN;return(null==r?void 0:r.source)&&function(e,t){const n=function(e){"string"==typeof e&&(e=new RegExp(e));const t=e,n=e.source;let r=0;return new RegExp(function e(){let i,s="";function a(e){s+=n.substr(r,e),r+=e}function o(e){s+="(?:"+n.substr(r,e)+"|$)",r+=e}for(;r",r)-r+1);break;default:o(2)}break;case"[":i=/\[(?:\\.|.)*?\]/g,i.lastIndex=r,i=i.exec(n)||[],o(i[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":a(1);break;case"{":i=/\{\d+,?\d*\}/g,i.lastIndex=r,i=i.exec(n),i?a(i[0].length):o(1);break;case"(":if("?"===n[r+1])switch(n[r+2]){case":":s+="(?:",r+=3,s+=e()+"|$)";break;case"=":s+="(?=",r+=3,s+=e()+")";break;case"!":i=r,r+=3,e(),s+=n.substr(i,r-i);break;case"<":switch(n[r+3]){case"=":case"!":i=r,r+=4,e(),s+=n.substr(i,r-i);break;default:a(n.indexOf(">",r)-r+1),s+=e()+"|$)"}}else a(1),s+=e()+"|$)";break;case")":return++r,s;default:o(1)}return s}(),e.flags)}(e),r=t.match(n);return!!r&&r[0].length>0}("^"+r.source+"$",e.value)&&t.push(n),t}),[])}}class mc{convert(e,t){let n=t.grammarSource;if(te(n)&&(n=function(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=Ze(e.type.ref);return null==t?void 0:t.terminal}}(n)),ue(n)){const r=n.rule.ref;if(!r)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(r,e,t)}return e}runConverter(e,t,n){var r;switch(e.name.toUpperCase()){case"INT":return gc.convertInt(t);case"STRING":return gc.convertString(t);case"ID":return gc.convertID(t)}switch(null===(r=function(e){var t,n,r;return V(e)?null!==(n=null===(t=e.type)||void 0===t?void 0:t.name)&&void 0!==n?n:"string":tt(e)?e.name:null!==(r=rt(e))&&void 0!==r?r:e.name}(e))||void 0===r?void 0:r.toLowerCase()){case"number":return gc.convertNumber(t);case"boolean":return gc.convertBoolean(t);case"bigint":return gc.convertBigint(t);case"date":return gc.convertDate(t);default:return t}}}var gc;!function(e){function t(e){switch(e){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 e}}e.convertString=function(e){let n="";for(let r=1;r=10&&(Ac=t,await new Promise((e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)}))),e.isCancellationRequested)throw Tc}class Ec{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)}))}}class kc{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const t of e)if(kc.isIncremental(t)){const e=$c(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let a=this._lineOffsets;const o=Nc(t.text,!1,n);if(s-i===o.length)for(let e=0,t=o.length;ee?r=i:n=i+1}const i=n-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1t&&Cc(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var xc,Ic;function Sc(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Sc(r,t),Sc(i,t);let s=0,a=0,o=0;for(;sn.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function wc(e){const t=$c(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new kc(e,t,n,r)},e.update=function(e,t,n){if(e instanceof kc)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=Sc(t.map(wc),((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let i=0;const s=[];for(const t of r){const r=e.offsetAt(t.range.start);if(ri&&s.push(n.substring(i,r)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(n.substr(i)),s.join("")}}(xc||(xc={})),(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,a=0,o=0;o<=e.length;++o){if(o2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=o,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=o,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,o):r=e.slice(s+1,o),i=o-s-1;s=o,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(r=a+"/"+r,i=47===a.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;il){if(47===n.charCodeAt(o+d))return n.slice(o+d+1);if(0===d)return n.slice(o+d)}else a>l&&(47===e.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var h=e.charCodeAt(i+d);if(h!==n.charCodeAt(o+d))break;47===h&&(u=d)}var f="";for(d=i+u+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(o+u):(o+=u,47===n.charCodeAt(o)&&++o,n.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,a=e.length-1;a>=1;--a)if(47===(n=e.charCodeAt(a))){if(!s){i=a;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var o=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!a){i=r+1;break}}else-1===c&&(a=!1,c=r+1),o>=0&&(l===n.charCodeAt(o)?-1==--o&&(s=r):(o=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){i=r+1;break}}else-1===s&&(a=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,a=0,o=e.length-1;o>=0;--o){var c=e.charCodeAt(o);if(47!==c)-1===i&&(s=!1,i=o+1),46===c?-1===n?n=o:1!==a&&(a=1):-1!==n&&(a=-1);else if(!s){r=o+1;break}}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var a=-1,o=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===a?a=u:1!==d&&(d=1):-1!==a&&(d=-1);else if(!l){o=u+1;break}return-1===a||-1===c||0===d||1===d&&a===c-1&&a===o+1?-1!==c&&(n.base=n.name=0===o&&s?e.slice(1,c):e.slice(o,c)):(0===o&&s?(n.name=e.slice(1,a),n.base=e.slice(1,c)):(n.name=e.slice(o,a),n.base=e.slice(o,c)),n.ext=e.slice(a,c)),o>0?n.dir=e.slice(0,o-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(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 r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>u,Utils:()=>x}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function a(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.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(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const o="",c="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||o,this.authority=e.authority||o,this.path=e.path||o,this.query=e.query||o,this.fragment=e.fragment||o):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||o,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||o),this.query=r||o,this.fragment=i||o,a(this,s))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=o),void 0===n?n=this.authority:null===n&&(n=o),void 0===r?r=this.path:null===r&&(r=o),void 0===i?i=this.query:null===i&&(i=o),void 0===s?s=this.fragment:null===s&&(s=o),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new h(t,n,r,i,s)}static parse(e,t=!1){const n=l.exec(e);return n?new h(n[2]||o,v(n[4]||o),v(n[5]||o),v(n[7]||o),v(n[9]||o),t):new h(o,o,o,o,o)}static file(t){let n=o;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new h("file",n,t,o,o)}static from(e){const t=new h(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new h(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}const d=e?1:void 0;class h extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const f={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 p(e,t,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a||n&&91===a||n&&93===a||n&&58===a)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=f[a];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function m(e){let t;for(let n=0;n1&&"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)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function y(e,t){const n=t?m:p;let r="",{scheme:i,authority:s,path:a,query:o,fragment:l}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=c,r+=c),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){const e=a.charCodeAt(1);e>=65&&e<=90&&(a=`/${String.fromCharCode(e+32)}:${a.substr(3)}`)}else if(a.length>=2&&58===a.charCodeAt(1)){const e=a.charCodeAt(0);e>=65&&e<=90&&(a=`${String.fromCharCode(e+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=t?l:p(l,!1,!1)),r}function A(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+A(e.substr(3)):e}}const T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(T)?e.replace(T,(e=>A(e))):e}var R=n(470);const E=R.posix||R,k="/";var x;!function(e){e.joinPath=function(e,...t){return e.with({path:E.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==k&&(n=k+n,r=!0);let i=E.resolve(n,...t);return r&&i[0]===k&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=E.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return E.basename(e.path)},e.extname=function(e){return E.extname(e.path)}}(x||(x={}))})(),Ic=r})();const{URI:Lc,Utils:Oc}=Ic;var bc,_c,Pc,Mc,Dc;!function(e){e.basename=Oc.basename,e.dirname=Oc.dirname,e.extname=Oc.extname,e.joinPath=Oc.joinPath,e.resolvePath=Oc.resolvePath,e.equals=function(e,t){return(null==e?void 0:e.toString())===(null==t?void 0:t.toString())},e.relative=function(e,t){const n="string"==typeof e?e:e.path,r="string"==typeof t?t:t.path,i=n.split("/").filter((e=>e.length>0)),s=r.split("/").filter((e=>e.length>0));let a=0;for(;anull!=r?r:r=xc.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,null!=t?t:"")}}class Fc{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return p(this.documentMap.values())}addDocument(e){const t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){const t=e.toString();return this.documentMap.get(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then((e=>(this.addDocument(e),e)));{const n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const t=e.toString(),n=this.documentMap.get(t);return n&&(n.state=_c.Changed,n.precomputedScopes=void 0,n.references=[],n.diagnostics=void 0),n}deleteDocument(e){const t=e.toString(),n=this.documentMap.get(t);return n&&(n.state=_c.Changed,this.documentMap.delete(t)),n}}class Gc{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,t=yc.XO.None){for(const n of Ie(e.parseResult.value))await Rc(t),Ne(n).forEach((t=>this.doLink(t,e)))}doLink(e,t){const n=e.reference;if(void 0===n._ref)try{const t=this.getCandidate(e);if(s(t))n._ref=t;else if(n._nodeDescription=t,this.langiumDocuments().hasDocument(t.documentUri)){const r=this.loadAstNode(t);n._ref=null!=r?r:this.createLinkingError(e,t)}}catch(t){n._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${n.$refText}': ${t}`})}t.references.push(n)}unlink(e){for(const t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){const t=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return null!=t?t:this.createLinkingError(e)}buildReference(e,t,n,i){const a=this,o={$refNode:n,$refText:i,get ref(){var n,i;if(r(this._ref))return this._ref;if("object"==typeof(i=this._nodeDescription)&&null!==i&&"string"==typeof i.name&&"string"==typeof i.type&&"string"==typeof i.path){const n=a.loadAstNode(this._nodeDescription);this._ref=null!=n?n:a.createLinkingError({reference:o,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){const r=a.getLinkedNode({reference:o,container:e,property:t});if(r.error&&Ee(e).state<_c.ComputedScopes)return;this._ref=null!==(n=r.node)&&void 0!==n?n:r.error,this._nodeDescription=r.descr}return r(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return s(this._ref)?this._ref:void 0}};return o}getLinkedNode(e){try{const t=this.getCandidate(e);if(s(t))return{error:t};const n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){return{error:Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${e.reference.$refText}': ${t}`})}}}loadAstNode(e){if(e.node)return e.node;const t=this.langiumDocuments().getDocument(e.documentUri);return t?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0}createLinkingError(e,t){const n=Ee(e.container);n.state<_c.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`);const r=this.reflection.getReferenceType(e);return Object.assign(Object.assign({},e),{message:`Could not resolve reference to ${r} named '${e.reference.$refText}'.`,targetDescription:t})}}class Kc{getName(e){if(function(e){return"string"==typeof e.name}(e))return e.name}getNameNode(e){return Qe(e.$cstNode,"name")}}class Bc{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){const t=function(e){var t;const n=e.astNode;for(;n===(null===(t=e.container)||void 0===t?void 0:t.astNode);){const t=Re(e.grammarSource,J);if(t)return t;e=e.container}}(e),n=e.astNode;if(t&&n){const r=n[t.feature];if(i(r))return r.ref;if(Array.isArray(r))for(const t of r)if(i(t)&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return t.ref}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||function(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}(e,t)))return n}}}findDeclarationNode(e){const t=this.findDeclaration(e);if(null==t?void 0:t.$cstNode){const e=this.nameProvider.getNameNode(t);return null!=e?e:t.$cstNode}}findReferences(e,t){const n=[];if(t.includeDeclaration){const t=this.getReferenceToSelf(e);t&&n.push(t)}let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter((e=>bc.equals(e.sourceUri,t.documentUri)))),n.push(...r),p(n)}getReferenceToSelf(e){const t=this.nameProvider.getNameNode(e);if(t){const n=Ee(e),r=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:r,targetUri:n.uri,targetPath:r,segment:v(t),local:!0}}}}class jc{constructor(e){if(this.map=new Map,e)for(const[t,n]of e)this.add(t,n)}get size(){return g.sum(p(this.map.values()).map((e=>e.length)))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0)return 1===n.length?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){var t;return null!==(t=this.map.get(e))&&void 0!==t?t:[]}has(e,t){if(void 0===t)return this.map.has(e);{const n=this.map.get(e);return!!n&&n.indexOf(t)>=0}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach(((t,n)=>t.forEach((t=>e(t,n,this)))))}[Symbol.iterator](){return this.entries().iterator()}entries(){return p(this.map.entries()).flatMap((([e,t])=>t.map((t=>[e,t]))))}keys(){return p(this.map.keys())}values(){return p(this.map.values()).flat()}entriesGroupedByKey(){return p(this.map.entries())}}class Vc{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}class Hc{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=yc.XO.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,n=ke,r=yc.XO.None){const i=[];this.exportNode(e,i,t);for(const s of n(e))await Rc(r),this.exportNode(s,i,t);return i}exportNode(e,t,n){const r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async computeLocalScopes(e,t=yc.XO.None){const n=e.parseResult.value,r=new jc;for(const i of xe(n))await Rc(t),this.processNode(i,e,r);return r}processNode(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}}class Wc{constructor(e,t,n){var r;this.elements=e,this.outerScope=t,this.caseInsensitive=null!==(r=null==n?void 0:n.caseInsensitive)&&void 0!==r&&r}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){return(this.caseInsensitive?this.elements.find((t=>t.name.toLowerCase()===e.toLowerCase())):this.elements.find((t=>t.name===e)))||(this.outerScope?this.outerScope.getElement(e):void 0)}}class zc{constructor(e,t,n){var r;this.elements=new Map,this.caseInsensitive=null!==(r=null==n?void 0:n.caseInsensitive)&&void 0!==r&&r;for(const t of e){const e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.set(e,t)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)||(this.outerScope?this.outerScope.getElement(e):void 0)}getAllElements(){let e=p(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class Yc{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach((e=>e.dispose()))}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class Xc extends Yc{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class qc extends Yc{constructor(e){super(),this.cache=new Map,this.converter=null!=e?e:e=>e}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){const e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}}class Qc extends Xc{constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate((()=>{this.clear()})))}}class Jc{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new Qc(e.shared)}getScope(e){const t=[],n=this.reflection.getReferenceType(e),r=Ee(e.container).precomputedScopes;if(r){let i=e.container;do{const e=r.get(i);e.length>0&&t.push(p(e).filter((e=>this.reflection.isSubtype(e.type,n)))),i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new Wc(p(e),t,n)}createScopeForNodes(e,t,n){const r=p(e).map((e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)})).nonNullable();return new Wc(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,(()=>new zc(this.indexManager.allElements(e))))}}function Zc(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}class el{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t={}){const n=null==t?void 0:t.replacer,r=(e,n)=>this.replacer(e,n,t),i=n?(e,t)=>n(e,t,r):r;try{return this.currentDocument=Ee(e),JSON.stringify(e,i,null==t?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t={}){const n=JSON.parse(e);return this.linkNode(n,n,t),n}replacer(e,t,{refText:n,sourceText:s,textRegions:a,comments:o,uriConverter:c}){var l,u,d,h;if(!this.ignoreProperties.has(e)){if(i(t)){const e=t.ref,r=n?t.$refText:void 0;if(e){const n=Ee(e);let i="";return this.currentDocument&&this.currentDocument!==n&&(i=c?c(n.uri,t):n.uri.toString()),{$ref:`${i}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:r}}return{$error:null!==(u=null===(l=t.error)||void 0===l?void 0:l.message)&&void 0!==u?u:"Could not resolve reference",$refText:r}}if(r(t)){let n;if(a&&(n=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},t)),e&&!t.$document||!(null==n?void 0:n.$textRegion)||(n.$textRegion.documentURI=null===(d=this.currentDocument)||void 0===d?void 0:d.uri.toString())),s&&!e&&(null!=n||(n=Object.assign({},t)),n.$sourceText=null===(h=t.$cstNode)||void 0===h?void 0:h.text),o){null!=n||(n=Object.assign({},t));const e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,""))}return null!=n?n:t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter((e=>!e.startsWith("$"))).forEach((r=>{const i=function(e,t){return e&&t?Je(e,t,e.astNode,!0):[]}(e.$cstNode,r).map(t);0!==i.length&&(n[r]=i)})),e}}linkNode(e,t,n,i,s,a){for(const[i,s]of Object.entries(e))if(Array.isArray(s))for(let a=0;a{try{await e.call(t,n,r,i)}catch(e){if(vc(e))throw e;console.error("An error occurred during validation:",e);const t=e instanceof Error?e.message:String(e);e instanceof Error&&e.stack&&console.error(e.stack),r("error","An error occurred during validation: "+t,{node:n})}}}addEntry(e,t){if("AstNode"!==e)for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,t);else this.entries.add("AstNode",t)}getChecks(e,t){let n=p(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(n=n.filter((e=>t.includes(e.category)))),n.map((e=>e.check))}}class il{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},n=yc.XO.None){const r=e.parseResult,i=[];if(await Rc(n),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===Mc.LexingError})))return i;if(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===Mc.ParsingError})))return i;if(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===Mc.LinkingError})))return i}try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(vc(e))throw e;console.error("An error occurred during validation:",e)}return await Rc(n),i}processLexingErrors(e,t,n){for(const n of e.lexerErrors){const e={severity:al("error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:nl(Mc.LexingError),source:this.getSource()};t.push(e)}}processParsingErrors(e,t,n){for(const n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if("previousToken"in n){const t=n.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=T(n.token);if(e){const r={severity:al("error"),range:e,message:n.message,data:nl(Mc.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(const n of e.references){const e=n.error;if(e){const n={node:e.container,property:e.property,index:e.index,data:{code:Mc.LinkingError,containerType:e.container.$type,property:e.property,refText:e.reference.$refText}};t.push(this.toDiagnostic("error",e.message,n))}}}async validateAst(e,t,n=yc.XO.None){const r=[],i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};return await Promise.all(Ie(e).map((async e=>{await Rc(n);const r=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of r)await t(e,i,n)}))),r}toDiagnostic(e,t,n){return{message:t,range:sl(n),severity:al(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function sl(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=Qe(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=function(e,t,n){if(!e)return;const r=function(e,t,n){if(e.astNode!==n)return[];if(ae(e.grammarSource)&&e.grammarSource.value===t)return[e];const r=A(e).iterator();let i;const s=[];do{if(i=r.next(),!i.done){const e=i.value;e.astNode===n?ae(e.grammarSource)&&e.grammarSource.value===t&&s.push(e):r.prune()}}while(!i.done);return s}(e,t,null==e?void 0:e.astNode);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}(e.node.$cstNode,e.keyword,e.index)),null!=t||(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function al(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}!function(e){e.LexingError="lexing-error",e.ParsingError="parsing-error",e.LinkingError="linking-error"}(Mc||(Mc={}));class ol{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n=Ee(e)){null!=t||(t=this.nameProvider.getName(e));const r=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${r} has no name.`);let i;const s=()=>{var t;return null!=i?i:i=v(null!==(t=this.nameProvider.getNameNode(e))&&void 0!==t?t:e.$cstNode)};return{node:e,name:t,get nameSegment(){return s()},selectionSegment:v(e.$cstNode),type:e.$type,documentUri:n.uri,path:r}}}class cl{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=yc.XO.None){const n=[],r=e.parseResult.value;for(const e of Ie(r))await Rc(t),Ne(e).filter((e=>!s(e))).forEach((e=>{const t=this.createDescription(e);t&&n.push(t)}));return n}createDescription(e){const t=e.reference.$nodeDescription,n=e.reference.$refNode;if(!t||!n)return;const r=Ee(e.container).uri;return{sourceUri:r,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:t.documentUri,targetPath:t.path,segment:v(n),local:bc.equals(t.documentUri,r)}}}class ll{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce(((e,t)=>{if(!e||0===t.length)return e;const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n),i=parseInt(t.substring(n+1)),s=e[r];return null==s?void 0:s[i]}return e[t]}),e)}}class ul{constructor(e){this._ready=new Ec,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t,n;this.workspaceConfig=null!==(n=null===(t=e.capabilities.workspace)||void 0===t?void 0:t.configuration)&&void 0!==n&&n}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map((e=>this.toSectionName(e.LanguageMetaData.languageId)))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map((e=>({section:this.toSectionName(e.LanguageMetaData.languageId)}))),n=await e.fetchConfiguration(t);t.forEach(((e,t)=>{this.updateSectionConfiguration(e.section,n[t])}))}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach((t=>{this.updateSectionConfiguration(t,e.settings[t])}))}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}}!function(e){e.create=function(e){return{dispose:async()=>await e()}}}(Dc||(Dc={}));class dl{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new jc,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=_c.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=yc.XO.None){var r,i;for(const n of e){const e=n.uri.toString();if(n.state===_c.Validated){if("boolean"==typeof t.validation&&t.validation)n.state=_c.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(e);else if("object"==typeof t.validation){const s=this.buildState.get(e),a=null===(r=null==s?void 0:s.result)||void 0===r?void 0:r.validationChecks;if(a){const r=(null!==(i=t.validation.categories)&&void 0!==i?i:Pc.all).filter((e=>!a.includes(e)));r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:Object.assign(Object.assign({},t.validation),{categories:r})},result:s.result}),n.state=_c.IndexedReferences)}}}else this.buildState.delete(e)}this.currentState=_c.Changed,await this.emitUpdate(e.map((e=>e.uri)),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=yc.XO.None){this.currentState=_c.Changed;for(const e of t)this.langiumDocuments.deleteDocument(e),this.buildState.delete(e.toString()),this.indexManager.remove(e);for(const t of e){if(!this.langiumDocuments.invalidateDocument(t)){const e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},t);e.state=_c.Changed,this.langiumDocuments.addDocument(e)}this.buildState.delete(t.toString())}const r=p(e).concat(t).map((e=>e.toString())).toSet();this.langiumDocuments.all.filter((e=>!r.has(e.uri.toString())&&this.shouldRelink(e,r))).forEach((e=>{this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e),e.state=Math.min(e.state,_c.ComputedScopes),e.diagnostics=void 0})),await this.emitUpdate(e,t),await Rc(n);const i=this.langiumDocuments.all.filter((e=>{var t;return e.state<_c.Linked||!(null===(t=this.buildState.get(e.uri.toString()))||void 0===t?void 0:t.completed)})).toArray();await this.buildDocuments(i,this.updateBuildOptions,n)}async emitUpdate(e,t){await Promise.all(this.updateListeners.map((n=>n(e,t))))}shouldRelink(e,t){return!!e.references.some((e=>void 0!==e.error))||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),Dc.create((()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)}))}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,_c.Parsed,n,(e=>this.langiumDocumentFactory.update(e,n))),await this.runCancelable(e,_c.IndexedContent,n,(e=>this.indexManager.updateContent(e,n))),await this.runCancelable(e,_c.ComputedScopes,n,(async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.precomputedScopes=await t.computeLocalScopes(e,n)})),await this.runCancelable(e,_c.Linked,n,(e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n))),await this.runCancelable(e,_c.IndexedReferences,n,(e=>this.indexManager.updateReferences(e,n)));const r=e.filter((e=>this.shouldValidate(e)));await this.runCancelable(r,_c.Validated,n,(e=>this.validate(e,n)));for(const t of e){const e=this.buildState.get(t.uri.toString());e&&(e.completed=!0)}}prepareBuild(e,t){for(const n of e){const e=n.uri.toString(),r=this.buildState.get(e);r&&!r.completed||this.buildState.set(e,{completed:!1,options:t,result:null==r?void 0:r.result})}}async runCancelable(e,t,n,r){const i=e.filter((e=>e.state{this.buildPhaseListeners.delete(e,t)}))}waitUntil(e,t,n){let r;if(t&&"path"in t?r=t:n=t,null!=n||(n=yc.XO.None),r){const t=this.langiumDocuments.getDocument(r);if(t&&t.state>e)return Promise.resolve(r)}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(Tc):new Promise(((t,i)=>{const s=this.onBuildPhase(e,(()=>{if(s.dispose(),a.dispose(),r){const e=this.langiumDocuments.getDocument(r);t(null==e?void 0:e.uri)}else t(void 0)})),a=n.onCancellationRequested((()=>{s.dispose(),a.dispose(),i(Tc)}))}))}async notifyBuildPhase(e,t,n){if(0===e.length)return;const r=this.buildPhaseListeners.get(t);for(const t of r)await Rc(n),await t(e,n)}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){var n,r;const i=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,s=this.getBuildOptions(e).validation,a="object"==typeof s?s:void 0,o=await i.validateDocument(e,a,t);e.diagnostics?e.diagnostics.push(...o):e.diagnostics=o;const c=this.buildState.get(e.uri.toString());if(c){null!==(n=c.result)&&void 0!==n||(c.result={});const e=null!==(r=null==a?void 0:a.categories)&&void 0!==r?r:Pc.all;c.result.validationChecks?c.result.validationChecks.push(...e):c.result.validationChecks=[...e]}}getBuildOptions(e){var t,n;return null!==(n=null===(t=this.buildState.get(e.uri.toString()))||void 0===t?void 0:t.options)&&void 0!==n?n:{}}}class hl{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new qc,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const n=Ee(e).uri,r=[];return this.referenceIndex.forEach((e=>{e.forEach((e=>{bc.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)}))})),p(r)}allElements(e,t){let n=p(this.symbolIndex.keys());return t&&(n=n.filter((e=>!t||t.has(e)))),n.map((t=>this.getFileDescriptions(t,e))).flat()}getFileDescriptions(e,t){var n;if(!t)return null!==(n=this.symbolIndex.get(e))&&void 0!==n?n:[];const r=this.symbolByTypeIndex.get(e,t,(()=>{var n;return(null!==(n=this.symbolIndex.get(e))&&void 0!==n?n:[]).filter((e=>this.astReflection.isSubtype(e.type,t)))}));return r}remove(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(e,t=yc.XO.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.references.ScopeComputation.computeExports(e,t),i=e.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=yc.XO.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());return!!n&&n.some((e=>!e.local&&t.has(e.targetUri.toString())))}}class fl{constructor(e){this.initialBuildOptions={},this._ready=new Ec,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var t;this.folders=null!==(t=e.workspaceFolders)&&void 0!==t?t:void 0}initialized(e){return this.mutex.write((e=>{var t;return this.initializeWorkspace(null!==(t=this.folders)&&void 0!==t?t:[],e)}))}async initializeWorkspace(e,t=yc.XO.None){const n=await this.performStartup(e);await Rc(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=this.serviceRegistry.all.flatMap((e=>e.LanguageMetaData.fileExtensions)),n=[],r=e=>{n.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)};return await this.loadAdditionalDocuments(e,r),await Promise.all(e.map((e=>[e,this.getRootFolder(e)])).map((async e=>this.traverseFolder(...e,t,r)))),this._ready.resolve(),n}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Lc.parse(e.uri)}async traverseFolder(e,t,n,r){const i=await this.fileSystemProvider.readDirectory(t);await Promise.all(i.map((async t=>{if(this.includeEntry(e,t,n))if(t.isDirectory)await this.traverseFolder(e,t.uri,n,r);else if(t.isFile){const e=await this.langiumDocuments.getOrCreateDocument(t.uri);r(e)}})))}includeEntry(e,t,n){const r=bc.basename(t.uri);if(r.startsWith("."))return!1;if(t.isDirectory)return"node_modules"!==r&&"out"!==r;if(t.isFile){const e=bc.extname(t.uri);return n.includes(e)}return!1}}class pl{constructor(e){const t=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=gl(t)?Object.values(t):t;this.chevrotainLexer=new Pr(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var t;const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:null!==(t=n.groups.hidden)&&void 0!==t?t:[]}}toTokenTypeDictionary(e){if(gl(e))return e;const t=ml(e)?Object.values(e.modes).flat():e,n={};return t.forEach((e=>n[e.name]=e)),n}}function ml(e){return e&&"modes"in e&&"defaultMode"in e}function gl(e){return!function(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}(e)&&!ml(e)}function yl(e){let t="";return t="string"==typeof e?e:e.text,t.split(je)}const Al=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Tl=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function vl(e,t,n,r){const i=[];if(0===e.length){const e=va.create(n,r),s=va.create(n,r+t.length);i.push({type:"text",content:t,range:Ra.create(e,s)})}else{let s=0;for(const a of e){const e=a.index,o=t.substring(s,e);o.length>0&&i.push({type:"text",content:t.substring(s,e),range:Ra.create(va.create(n,s+r),va.create(n,e+r))});let c=o.length+1;const l=a[1];if(i.push({type:"inline-tag",content:l,range:Ra.create(va.create(n,s+c+r),va.create(n,s+c+l.length+r))}),c+=l.length,4===a.length){c+=a[2].length;const e=a[3];i.push({type:"text",content:e,range:Ra.create(va.create(n,s+c+r),va.create(n,s+c+e.length+r))})}else i.push({type:"text",content:"",range:Ra.create(va.create(n,s+c+r),va.create(n,s+c+r))});s=e+a[0].length}const a=t.substring(s);a.length>0&&i.push({type:"text",content:a,range:Ra.create(va.create(n,s+r),va.create(n,s+r+a.length))})}return i}const Rl=/\S/,El=/\s*$/;function kl(e,t){const n=e.substring(t).match(Rl);return n?t+n.index:e.length}function xl(e){const t=e.match(El);if(t&&"number"==typeof t.index)return t.index}function Il(e,t){const n=e.tokens[e.index];return"tag"===n.type?Cl(e,!1):"text"===n.type||"inline-tag"===n.type?Sl(e):(function(e,t){if(t){const n=new Pl("",e.range);"inlines"in t?t.inlines.push(n):t.content.inlines.push(n)}}(n,t),void e.index++)}function Sl(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(Nl(e)),r=t,t=e.tokens[e.index];return new _l(i,Ra.create(n.range.start,r.range.end))}function Nl(e){return"inline-tag"===e.tokens[e.index].type?Cl(e,!0):$l(e)}function Cl(e,t){const n=e.tokens[e.index++],r=n.content.substring(1),i=e.tokens[e.index];if("text"===(null==i?void 0:i.type)){if(t){const i=$l(e);return new bl(r,new _l([i],i.range),t,Ra.create(n.range.start,i.range.end))}{const i=Sl(e);return new bl(r,i,t,Ra.create(n.range.start,i.range.end))}}{const e=n.range;return new bl(r,new _l([],e),t,e)}}function $l(e){const t=e.tokens[e.index++];return new Pl(t.content,t.range)}function wl(e){if(!e)return wl({start:"/**",end:"*/",line:"*"});const{start:t,end:n,line:r}=e;return{start:Ll(t,!0),end:Ll(n,!1),line:Ll(r,!0)}}function Ll(e,t){if("string"==typeof e||"object"==typeof e){const n="string"==typeof e?Ye(e):e.source;return t?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}return e}class Ol{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find((t=>t.name===e))}getTags(e){return this.getAllTags().filter((t=>t.name===e))}getAllTags(){return this.elements.filter((e=>"name"in e))}toString(){let e="";for(const t of this.elements)if(0===e.length)e=t.toString();else{const n=t.toString();e+=Ml(e)+n}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements)if(0===t.length)t=n.toMarkdown(e);else{const r=n.toMarkdown(e);t+=Ml(t)+r}return t.trim()}}class bl{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.renderTag)||void 0===t?void 0:t.call(e,this))&&void 0!==n?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=function(e,t,n){var r,i;if("linkplain"===e||"linkcode"===e||"link"===e){const s=t.indexOf(" ");let a=t;if(s>0){const e=kl(t,s);a=t.substring(e),t=t.substring(0,s)}("linkcode"===e||"link"===e&&"code"===n.link)&&(a=`\`${a}\``);const o=null!==(i=null===(r=n.renderLink)||void 0===r?void 0:r.call(n,t,a))&&void 0!==i?i:function(e,t){try{return Lc.parse(e,!0),`[${t}](${e})`}catch(t){return e}}(t,a);return o}}(this.name,t,null!=e?e:{});if("string"==typeof n)return n}let n="";"italic"===(null==e?void 0:e.tag)||void 0===(null==e?void 0:e.tag)?n="*":"bold"===(null==e?void 0:e.tag)?n="**":"bold-italic"===(null==e?void 0:e.tag)&&(n="***");let r=`${n}@${this.name}${n}`;return 1===this.content.inlines.length?r=`${r} — ${t}`:this.content.inlines.length>1&&(r=`${r}\n${t}`),this.inline?`{${r}}`:r}}class _l{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tn.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let n=0;nr.range.start.line&&(t+="\n")}return t}}class Pl{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function Ml(e){return e.endsWith("\n")?"\n":"\n\n"}class Dl{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&function(e){const t=wl(void 0),n=yl(e);if(0===n.length)return!1;const r=n[0],i=n[n.length-1],s=t.start,a=t.end;return Boolean(null==s?void 0:s.exec(r))&&Boolean(null==a?void 0:a.exec(i))}(t))return function(e,t,n){let r,i;"string"==typeof e?(i=t,r=n):(i=e.range.start,r=t),i||(i=va.create(0,0));const s=function(e){var t,n,r;const i=[];let s=e.position.line,a=e.position.character;for(let o=0;o=u.length){if(i.length>0){const e=va.create(s,a);i.push({type:"break",content:"",range:Ra.create(e,e)})}}else{Al.lastIndex=d;const e=Al.exec(u);if(e){const t=e[0],n=e[1],r=va.create(s,a+d),o=va.create(s,a+d+t.length);i.push({type:"tag",content:n,range:Ra.create(r,o)}),d+=t.length,d=kl(u,d)}if(d0&&"break"===i[i.length-1].type?i.slice(0,-1):i}({lines:yl(e),position:i,options:wl(r)});return function(e){var t,n,r,i;const s=va.create(e.position.line,e.position.character);if(0===e.tokens.length)return new Ol([],Ra.create(s,s));const a=[];for(;e.indexthis.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}documentationLinkRenderer(e,t,n){var r;const i=null!==(r=this.findNameInPrecomputedScopes(e,t))&&void 0!==r?r:this.findNameInGlobalScope(e,t);if(i&&i.nameSegment){const e=i.nameSegment.range.start.line+1,t=i.nameSegment.range.start.character+1;return`[${n}](${i.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(e,t){const n=Ee(e).precomputedScopes;if(!n)return;let r=e;do{const e=n.get(r).find((e=>e.name===t));if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find((e=>e.name===t))}}class Ul{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return function(e){return"string"==typeof e.$comment}(e)?e.$comment:null===(t=function(e,t){if(e){const n=function(e,t=!0){for(;e.container;){const n=e.container;let r=n.content.indexOf(e);for(;r>0;){r--;const e=n.content[r];if(t||!e.hidden)return e}e=n}}(e,!0);if(n&&E(n,t))return n;if(l(e))for(let n=e.content.findIndex((e=>!e.hidden))-1;n>=0;n--){const r=e.content[n];if(E(r,t))return r}}}(e.$cstNode,this.grammarConfig().multilineCommentRules))||void 0===t?void 0:t.text}}var Fl;n(2676);class Gl{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}}class Kl{constructor(){this.previousTokenSource=new yc.Qi,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=new yc.Qi;return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n){const r=new Ec,i={action:t,deferred:r,cancellationToken:null!=n?n:yc.XO.None};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map((async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then((()=>e(n)));t.resolve(r)}catch(e){vc(e)?t.resolve(void 0):t.reject(e)}}))),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Bl{constructor(e){this.grammarElementIdMap=new Vc,this.tokenTypeIdMap=new Vc,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map((e=>Object.assign({},e))),parserErrors:e.parserErrors.map((e=>Object.assign({},e))),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){const t=new Map,n=new Map;for(const n of Ie(e))t.set(n,{});if(e.$cstNode)for(const t of A(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[s,a]of Object.entries(e))if(!s.startsWith("$"))if(Array.isArray(a)){const e=[];n[s]=e;for(const n of a)r(n)?e.push(this.dehydrateAstNode(n,t)):i(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else r(a)?n[s]=this.dehydrateAstNode(a,t):i(a)?n[s]=this.dehydrateReference(a,t):void 0!==a&&(n[s]=a);return n}dehydrateReference(e,t){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);return l(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),o(e)?n.content=e.content.map((e=>this.dehydrateCstNode(e,t))):c(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const t=e.value,n=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map,n=new Map;for(const n of Ie(e))t.set(n,{});let r;if(e.$cstNode)for(const t of A(e.$cstNode)){let e;"fullText"in t?(e=new Xo(t.fullText),r=e):"content"in t?e=new zo:"tokenType"in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=r)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(const[s,a]of Object.entries(e))if(!s.startsWith("$"))if(Array.isArray(a)){const e=[];n[s]=e;for(const o of a)r(o)?e.push(this.setParent(this.hydrateAstNode(o,t),n)):i(o)?e.push(this.hydrateReference(o,n,s,t)):e.push(o)}else r(a)?n[s]=this.setParent(this.hydrateAstNode(a,t),n):i(a)?n[s]=this.hydrateReference(a,n,s,t):void 0!==a&&(n[s]=a);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),o(r))for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,s=e.startColumn,a=e.endLine,o=e.endColumn,c=e.hidden;return new Wo(n,r,{start:{line:i,character:s},end:{line:a,character:o}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();const t=this.grammarElementIdMap.getKey(e);if(t)return t;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(const n of Ie(this.grammar))t=n,ve.isInstance(t,$)&&this.grammarElementIdMap.set(n,e++);var t}}function jl(e){return{documentation:{CommentProvider:e=>new Ul(e),DocumentationProvider:e=>new Dl(e)},parser:{AsyncParser:e=>new Gl(e),GrammarConfig:e=>function(e){const t=[],n=e.Grammar;for(const e of n.rules)V(e)&&(r=e).hidden&&!st(r).test(" ")&&We(st(e))&&t.push(e.name);var r;return{multilineCommentRules:t,nameRegexp:R}}(e),LangiumParser:e=>function(e){const t=function(e){const t=e.Grammar,n=e.parser.Lexer;return ac(t,new ec(e),n.definition)}(e);return t.finalize(),t}(e),CompletionParser:e=>function(e){const t=e.Grammar,n=e.parser.Lexer,r=new rc(e);return ac(t,r,n.definition),r.finalize(),r}(e),ValueConverter:()=>new mc,TokenBuilder:()=>new pc,Lexer:e=>new pl(e),ParserErrorMessageProvider:()=>new nc},workspace:{AstNodeLocator:()=>new ll,AstNodeDescriptionProvider:e=>new ol(e),ReferenceDescriptionProvider:e=>new cl(e)},references:{Linker:e=>new Gc(e),NameProvider:()=>new Kc,ScopeProvider:e=>new Jc(e),ScopeComputation:e=>new Hc(e),References:e=>new Bc(e)},serializer:{Hydrator:e=>new Bl(e),JsonSerializer:e=>new el(e)},validation:{DocumentValidator:e=>new il(e),ValidationRegistry:e=>new rl(e)},shared:()=>e.shared}}function Vl(e){return{ServiceRegistry:()=>new tl,workspace:{LangiumDocuments:e=>new Fc(e),LangiumDocumentFactory:e=>new Uc(e),DocumentBuilder:e=>new dl(e),IndexManager:e=>new hl(e),WorkspaceManager:e=>new fl(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new Kl,ConfigurationProvider:e=>new ul(e)}}}function Hl(e,t,n,r,i,s,a,o,c){return zl([e,t,n,r,i,s,a,o,c].reduce(ql,{}))}!function(e){e.merge=(e,t)=>ql(ql({},e),t)}(Fl||(Fl={}));const Wl=Symbol("isProxy");function zl(e,t){const n=new Proxy({},{deleteProperty:()=>!1,get:(r,i)=>Xl(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(Xl(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Reflect.ownKeys(e),Wl]});return n[Wl]=!0,n}const Yl=Symbol();function Xl(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:e[t]});if(e[t]===Yl)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in n){const i=n[t];e[t]=Yl;try{e[t]="function"==typeof i?i(r):zl(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}}function ql(e,t){if(t)for(const[n,r]of Object.entries(t))if(void 0!==r){const t=e[n];e[n]=null!==t&&null!==r&&"object"==typeof t&&"object"==typeof r?ql(t,r):r}return e}class Ql{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const Jl={fileSystemProvider:()=>new Ql},Zl={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},eu={AstReflection:()=>new Te};function tu(e){var t;const n=function(){const e=Hl(Vl(Jl),eu),t=Hl(jl({shared:e}),Zl);return e.ServiceRegistry.register(t),t}(),r=n.serializer.JsonSerializer.deserialize(e);return n.shared.workspace.LangiumDocumentFactory.fromModel(r,Lc.parse(`memory://${null!==(t=r.name)&&void 0!==t?t:"grammar"}.langium`)),r}},2559:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(9501);const i=function(e,t,n){for(var i=-1,s=e.length;++i{n.d(t,{A:()=>r});const r=function(e,t){return e{n.d(t,{A:()=>s});var r=n(4288),i=n(8446);const s=function(e,t){var n=-1,s=(0,i.A)(e)?Array(e.length):[];return(0,r.A)(e,(function(e,r,i){s[++n]=t(e,r,i)})),s}},5507:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(6318),i=n(2851),s=n(1521),a=n(5353),o=n(3149),c=n(901);const l=function(e,t,n,r){if(!(0,o.A)(e))return e;for(var l=-1,u=(t=(0,s.A)(t,e)).length,d=u-1,h=e;null!=h&&++l{n.d(t,{A:()=>i});var r=n(4507);const i=function(e){return(0,r.A)(e,4)}},3068:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(4326),i=n(6984),s=n(6832),a=n(9999),o=Object.prototype,c=o.hasOwnProperty;const l=(0,r.A)((function(e,t){e=Object(e);var n=-1,r=t.length,l=r>2?t[2]:void 0;for(l&&(0,s.A)(t[0],t[1],l)&&(r=1);++n{n.d(t,{A:()=>l});var r=n(6307),i=n(8446),s=n(5041);var a=n(5707),o=n(8593),c=Math.max;const l=(u=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=null==n?0:(0,o.A)(n);return s<0&&(s=c(i+s,0)),(0,a.A)(e,(0,r.A)(t,3),s)},function(e,t,n){var a=Object(e);if(!(0,i.A)(e)){var o=(0,r.A)(t,3);e=(0,s.A)(e),t=function(e){return o(a[e],e,a)}}var c=u(e,t,n);return c>-1?a[o?e[c]:c]:void 0});var u},4098:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(7671);const i=function(e){return null!=e&&e.length?(0,r.A)(e,1):[]}},9622:(e,t,n)=>{n.d(t,{A:()=>a});var r=Object.prototype.hasOwnProperty;const i=function(e,t){return null!=e&&r.call(e,t)};var s=n(5054);const a=function(e,t){return null!=e&&(0,s.A)(e,t,i)}},9703:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(2383),i=n(2049),s=n(3098);const a=function(e){return"string"==typeof e||!(0,i.A)(e)&&(0,s.A)(e)&&"[object String]"==(0,r.A)(e)}},6666:(e,t,n)=>{n.d(t,{A:()=>r});const r=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},4722:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(5572),i=n(6307),s=n(2568),a=n(2049);const o=function(e,t){return((0,a.A)(e)?r.A:s.A)(e,(0,i.A)(t,3))}},6452:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(2559),i=n(6224),s=n(9008);const a=function(e){return e&&e.length?(0,r.A)(e,s.A,i.A):void 0}},3631:(e,t,n)=>{n.d(t,{A:()=>f});var r=/\s/;var i=/^\s+/;const s=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}(e)+1).replace(i,""):e};var a=n(3149),o=n(9501),c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;var h=1/0;const f=function(e){return e?(e=function(e){if("number"==typeof e)return e;if((0,o.A)(e))return NaN;if((0,a.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var n=l.test(e);return n||u.test(e)?d(e.slice(2),n?2:8):c.test(e)?NaN:+e}(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8593:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(3631);const i=function(e){var t=(0,r.A)(e),n=t%1;return t==t?n?t-n:t:0}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/732-8e5770e7.chunk.min.js b/docs/hugo/public/js/732-8e5770e7.chunk.min.js new file mode 100644 index 000000000..795bb5621 --- /dev/null +++ b/docs/hugo/public/js/732-8e5770e7.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[732],{9732:(t,e,a)=>{a.d(e,{diagram:()=>L});var i,n=a(758),r=(a(6474),a(7308),a(7938),a(1282),a(1099),a(7588),a(3115),a(6058),a(8159)),d=a(9502),s=a(4852),o=a(567),g=a(697),c={},p=(0,d.K2)(((t,e)=>{c[t]=e}),"set"),h=(0,d.K2)((t=>c[t]),"get"),l=(0,d.K2)((()=>Object.keys(c)),"keys"),x=(0,d.K2)((()=>l().length),"size"),D={get:h,set:p,keys:l,size:x},u=(0,d.K2)((t=>t.append("circle").attr("class","start-state").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit)),"drawStartState"),f=(0,d.K2)((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.D7)().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),y=(0,d.K2)(((t,e)=>{const a=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+2*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",i.width+2*(0,d.D7)().state.padding).attr("height",i.height+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),a}),"drawSimpleState"),w=(0,d.K2)(((t,e)=>{const a=(0,d.K2)((function(t,e,a){const i=t.append("tspan").attr("x",2*(0,d.D7)().state.padding).text(e);a||i.attr("dy",(0,d.D7)().state.textHeight)}),"addTspan"),i=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+1.3*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,r=t.append("text").attr("x",(0,d.D7)().state.padding).attr("y",n+.4*(0,d.D7)().state.padding+(0,d.D7)().state.dividerMargin+(0,d.D7)().state.textHeight).attr("class","state-description");let s=!0,o=!0;e.descriptions.forEach((function(t){s||(a(r,t,o),o=!1),s=!1}));const g=t.append("line").attr("x1",(0,d.D7)().state.padding).attr("y1",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("y2",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("class","descr-divider"),c=r.node().getBBox(),p=Math.max(c.width,i.width);return g.attr("x2",p+3*(0,d.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",p+2*(0,d.D7)().state.padding).attr("height",c.height+n+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),t}),"drawDescrState"),m=(0,d.K2)(((t,e,a)=>{const i=(0,d.D7)().state.padding,n=2*(0,d.D7)().state.padding,r=t.node().getBBox(),s=r.width,o=r.x,g=t.append("text").attr("x",0).attr("y",(0,d.D7)().state.titleShift).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),c=g.node().getBBox().width+n;let p,h=Math.max(c,s);h===s&&(h+=n);const l=t.node().getBBox();e.doc,p=o-i,c>s&&(p=(s-h)/2+i),Math.abs(o-l.x)s&&(p=o-(c-s)/2);const x=1-(0,d.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+(0,d.D7)().state.textHeight+(0,d.D7)().state.titleShift+1).attr("rx","0"),g.attr("x",p+i),c<=s&&g.attr("x",o+(h-n)/2-c/2+i),t.insert("rect",":first-child").attr("x",p).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",h).attr("height",3*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",h).attr("height",l.height+3+2*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t}),"addTitleAndBox"),b=(0,d.K2)((t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2))),"drawEndState"),B=(0,d.K2)(((t,e)=>{let a=(0,d.D7)().state.forkWidth,i=(0,d.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding)}),"drawForkJoinState"),k=(0,d.K2)(((t,e,a,i)=>{let n=0;const r=i.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"
");s=s.replace(/\n/g,"
");const o=s.split(d.Y2.lineBreakRegex);let g=1.25*(0,d.D7)().state.noteMargin;for(const t of o){const i=t.trim();if(i.length>0){const t=r.append("tspan");t.text(i),0===g&&(g+=t.node().getBBox().height),n+=g,t.attr("x",e+(0,d.D7)().state.noteMargin),t.attr("y",a+n+1.25*(0,d.D7)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:n}}),"_drawLongText"),S=(0,d.K2)(((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,d.D7)().state.padding),i=e.append("g"),{textWidth:n,textHeight:r}=k(t,0,0,i);return a.attr("height",r+2*(0,d.D7)().state.noteMargin),a.attr("width",n+2*(0,d.D7)().state.noteMargin),a}),"drawNote"),N=(0,d.K2)((function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&u(n),"end"===e.type&&b(n),"fork"!==e.type&&"join"!==e.type||B(n,e),"note"===e.type&&S(e.note.text,n),"divider"===e.type&&f(n),"default"===e.type&&0===e.descriptions.length&&y(n,e),"default"===e.type&&e.descriptions.length>0&&w(n,e);const r=n.node().getBBox();return i.width=r.width+2*(0,d.D7)().state.padding,i.height=r.height+2*(0,d.D7)().state.padding,D.set(a,i),i}),"drawState"),E=0,K=(0,d.K2)((function(t,e,a){const i=(0,d.K2)((function(t){switch(t){case n.iP.relationType.AGGREGATION:return"aggregation";case n.iP.relationType.EXTENSION:return"extension";case n.iP.relationType.COMPOSITION:return"composition";case n.iP.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const o=e.points,g=(0,s.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.qrM),c=t.append("path").attr("d",g(o)).attr("id","edge"+E).attr("class","transition");let p="";if((0,d.D7)().state.arrowMarkerAbsolute&&(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)")),c.attr("marker-end","url("+p+"#"+i(n.iP.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:s}=r._K.calcLabelPosition(e.points),o=d.Y2.getRows(a.title);let g=0;const c=[];let p=0,h=0;for(let t=0;t<=o.length;t++){const e=i.append("text").attr("text-anchor","middle").text(o[t]).attr("x",n).attr("y",s+g),a=e.node().getBBox();if(p=Math.max(p,a.width),h=Math.min(h,a.x),d.Rm.info(a.x,n,s+g),0===g){const t=e.node().getBBox();g=t.height,d.Rm.info("Title height",g,s)}c.push(e)}let l=g*o.length;if(o.length>1){const t=(o.length-1)*g*.5;c.forEach(((e,a)=>e.attr("y",s+a*g-t))),l=g*o.length}const x=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-p/2-(0,d.D7)().state.padding/2).attr("y",s-l/2-(0,d.D7)().state.padding/2-3.5).attr("width",p+(0,d.D7)().state.padding).attr("height",l+(0,d.D7)().state.padding),d.Rm.info(x)}E++}),"drawEdge"),M={},v=(0,d.K2)((function(){}),"setConf"),R=(0,d.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"),z=(0,d.K2)((function(t,e,a,n){i=(0,d.D7)().state;const r=(0,d.D7)().securityLevel;let o;"sandbox"===r&&(o=(0,s.Ltv)("#i"+e));const g="sandbox"===r?(0,s.Ltv)(o.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),c="sandbox"===r?o.nodes()[0].contentDocument:document;d.Rm.debug("Rendering diagram "+t);const p=g.select(`[id='${e}']`);R(p);const h=n.db.getRootDoc();T(h,p,void 0,!1,g,c,n);const l=i.padding,x=p.node().getBBox(),D=x.width+2*l,u=x.height+2*l,f=1.75*D;(0,d.a$)(p,u,f,i.useMaxWidth),p.attr("viewBox",`${x.x-i.padding} ${x.y-i.padding} `+D+" "+u)}),"draw"),H=(0,d.K2)((t=>t?t.length*i.fontSizeFactor:1),"getLabelWidth"),T=(0,d.K2)(((t,e,a,n,r,s,c)=>{const p=new g.T({compound:!0,multigraph:!0});let h,l=!0;for(h=0;h{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)}))):d.Rm.debug("No Node "+t+": "+JSON.stringify(p.node(t)))}));let w=y.getBBox();p.edges().forEach((function(t){void 0!==t&&void 0!==p.edge(t)&&(d.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(p.edge(t))),K(e,p.edge(t),p.edge(t).relation))})),w=y.getBBox();const b={id:a||"root",label:a||"root",width:0,height:0};return b.width=w.width+2*i.padding,b.height=w.height+2*i.padding,d.Rm.debug("Doc rendered",b,p),b}),"renderDoc"),P={setConf:v,draw:z},L={parser:n.Zk,db:n.iP,renderer:P,styles:n.tM,init:(0,d.K2)((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,n.iP.clear()}),"init")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/758-18005d5c.chunk.min.js b/docs/hugo/public/js/758-18005d5c.chunk.min.js new file mode 100644 index 000000000..2e3d30e6b --- /dev/null +++ b/docs/hugo/public/js/758-18005d5c.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[758],{6474:(t,e,s)=>{s.d(e,{A:()=>r,P:()=>o});var i=s(9502),n=s(4852),r=(0,i.K2)(((t,e)=>{let s;return"sandbox"===e&&(s=(0,n.Ltv)("#i"+t)),("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement"),o=(0,i.K2)(((t,e,s,n)=>{t.attr("class",s);const{width:r,height:o,x:c,y:h}=a(t,e);(0,i.a$)(t,o,r,n);const d=l(c,h,r,o,e);t.attr("viewBox",d),i.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)}),"setupViewPortForSVG"),a=(0,i.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),l=(0,i.K2)(((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`),"createViewBox")},758:(t,e,s)=>{s.d(e,{Zk:()=>l,iP:()=>Bt,q7:()=>w,tM:()=>Ft});var i=s(6474),n=s(7308),r=s(8159),o=s(9502),a=function(){var t=(0,o.K2)((function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s}),"o"),e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],a=[1,11],l=[1,16],c=[1,17],h=[1,18],d=[1,19],u=[1,32],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],_=[1,27],b=[1,28],T=[1,29],k=[1,30],E=[1,31],x=[1,34],D=[1,35],C=[1,36],$=[1,37],v=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],A=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],K={trace:(0,o.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,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$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:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"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],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,o.K2)((function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var l=r[a],c=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 34:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 35:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 36:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 44:case 45:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}}),"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},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,39],15:[1,40]}),t(L,[2,16]),{18:[1,41]},t(L,[2,18],{20:[1,42]}),{23:[1,43]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(L,[2,28]),{34:[1,48]},{36:[1,49]},t(L,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(I,[2,42],{55:[1,54]}),t(I,[2,43],{55:[1,55]}),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,6]),t(L,[2,13]),{13:56,24:u,54:v},t(L,[2,17]),t(A,n,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(L,[2,29]),t(L,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(L,[2,14],{14:[1,67]}),{4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,68],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(L,[2,32]),t(L,[2,33]),t(L,[2,34]),t(L,[2,35]),t(I,[2,44]),t(I,[2,45]),t(L,[2,15]),t(L,[2,19]),t(A,n,{7:72}),t(L,[2,26]),t(L,[2,27]),{4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,73],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:(0,o.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,o.K2)((function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,l="",c=0,h=0,d=0,u=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)((function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t}),"popStack"),(0,o.K2)(S,"lex");for(var _,b,T,k,E,x,D,C,$,v={};;){if(T=s[s.length-1],this.defaultActions[T]?k=this.defaultActions[T]:(null==_&&(_=S()),k=a[T]&&a[T][_]),void 0===k||!k.length||!k[0]){var L;for(x in $=[],a[T])this.terminals_[x]&&x>2&&$.push("'"+this.terminals_[x]+"'");L=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(L,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:f,expected:$})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+_);switch(k[0]){case 1:s.push(_),n.push(p.yytext),r.push(p.yylloc),s.push(k[1]),_=null,b?(_=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(D=this.productions_[k[1]][1],v.$=n[n.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(E=this.performAction.apply(v,[l,h,c,y.yy,k[1],n,r].concat(u))))return E;D&&(s=s.slice(0,-1*D*2),n=n.slice(0,-1*D),r=r.slice(0,-1*D)),s.push(this.productions_[k[1]][0]),n.push(v.$),r.push(v._$),C=a[s[s.length-2]][s[s.length-1]],s.push(C);break;case 3:return!0}}return!0}),"parse")},R=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,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(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 s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,o.K2)((function(){return this.next()||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,s,i){switch(s){case 0:return 41;case 1:case 42:return 48;case 2:case 43:return 49;case 3:case 44:return 50;case 4:case 45:return 51;case 5:case 6:case 8:case 9:case 10:case 11:case 54:case 56:case 62:break;case 7:case 77:return 5;case 12:case 32:return this.pushState("SCALE"),17;case 13:case 33:return 18;case 14:case 20:case 34:case 49:case 52:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 35:this.pushState("STATE");break;case 36:case 39:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:case 64:return this.popState(),"ID";case 50:return"STATE_DESCR";case 51:return 19;case 53:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 63:return"NOTE_TEXT";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 67:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 68:case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return e.yytext=e.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 78:return"INVALID"}}),"anonymous"),rules:[/^(?: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:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}}}();function w(){this.yy={}}return K.lexer=R,(0,o.K2)(w,"Parser"),w.prototype=K,K.Parser=w,new w}();a.parser=a;var l=a,c="state",h="relation",d="default",u="divider",p="fill:none",y="fill: #333",g="text",f="normal",m="rect",S="rectWithTitle",_="divider",b="roundedWithTitle",T="statediagram",k=`${T}-state`,E="transition",x=`${E} note-edge`,D=`${T}-note`,C=`${T}-cluster`,$=`${T}-cluster-alt`,v="parent",L="note",I="----",A=`${I}${L}`,K=`${I}${v}`,R=(0,o.K2)(((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const e of t.doc)"dir"===e.stmt&&(s=e.value);return s}),"getDir"),w={getClasses:(0,o.K2)((function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}),"getClasses"),draw:(0,o.K2)((async function(t,e,s,a){o.Rm.info("REF0:"),o.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:l,state:c,layout:h}=(0,o.D7)();a.db.extract(a.db.getRootDocV2());const d=a.db.getData(),u=(0,i.A)(e,l);d.type=a.type,d.layoutAlgorithm=h,d.nodeSpacing=c?.nodeSpacing||50,d.rankSpacing=c?.rankSpacing||50,d.markers=["barb"],d.diagramId=e,await(0,n.XX)(d,u),r._K.insertTitle(u,"statediagramTitleText",c?.titleTopMargin??25,a.db.getDiagramTitle()),(0,i.P)(u,8,T,c?.useMaxWidth??!0)}),"draw"),getDir:R},O=new Map,N=0;function B(t="",e=0,s="",i=I){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}(0,o.K2)(B,"stateDomId");var F=(0,o.K2)(((t,e,s,i,n,r,a,l)=>{o.Rm.trace("items",e),e.forEach((e=>{switch(e.stmt){case c:case d:z(t,e,s,i,n,r,a,l);break;case h:{z(t,e.state1,s,i,n,r,a,l),z(t,e.state2,s,i,n,r,a,l);const c={id:"edge"+N,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:p,labelStyle:"",label:o.Y2.sanitizeText(e.description,(0,o.D7)()),arrowheadStyle:y,labelpos:"c",labelType:g,thickness:f,classes:E,look:a};n.push(c),N++}}}))}),"setupDoc"),P=(0,o.K2)(((t,e="TB")=>{let s=e;if(t.doc)for(const e of t.doc)"dir"===e.stmt&&(s=e.value);return s}),"getDir");function Y(t,e,s){if(!e.id||""===e.id||""===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach((t=>{if(s.get(t)){const i=s.get(t);e.cssCompiledStyles=[...e.cssCompiledStyles,...i.styles]}})));const i=t.find((t=>t.id===e.id));i?Object.assign(i,e):t.push(e)}function G(t){return t?.classes?.join(" ")??""}function j(t){return t?.styles??[]}(0,o.K2)(Y,"insertOrUpdateNode"),(0,o.K2)(G,"getClassesFromDbInfo"),(0,o.K2)(j,"getStylesFromDbInfo");var z=(0,o.K2)(((t,e,s,i,n,r,a,l)=>{const c=e.id,h=s.get(c),T=G(h),E=j(h);if(o.Rm.info("dataFetcher parsedItem",e,h,E),"root"!==c){let s=m;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==d&&(s=e.type),O.get(c)||O.set(c,{id:c,shape:s,description:o.Y2.sanitizeText(c,(0,o.D7)()),cssClasses:`${T} ${k}`,cssStyles:E});const h=O.get(c);e.description&&(Array.isArray(h.description)?(h.shape=S,h.description.push(e.description)):h.description?.length>0?(h.shape=S,h.description===c?h.description=[e.description]:h.description=[h.description,e.description]):(h.shape=m,h.description=e.description),h.description=o.Y2.sanitizeTextOrArray(h.description,(0,o.D7)())),1===h.description?.length&&h.shape===S&&("group"===h.type?h.shape=b:h.shape=m),!h.type&&e.doc&&(o.Rm.info("Setting cluster for XCX",c,P(e)),h.type="group",h.isGroup=!0,h.dir=P(e),h.shape=e.type===u?_:b,h.cssClasses=`${h.cssClasses} ${C} ${r?$:""}`);const I={labelStyle:"",shape:h.shape,label:h.description,cssClasses:h.cssClasses,cssCompiledStyles:[],cssStyles:h.cssStyles,id:c,dir:h.dir,domId:B(c,N),type:h.type,isGroup:"group"===h.type,padding:8,rx:10,ry:10,look:a};if(I.shape===_&&(I.label=""),t&&"root"!==t.id&&(o.Rm.trace("Setting node ",c," to be child of its parent ",t.id),I.parentId=t.id),I.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,cssClasses:D,cssStyles:[],cssCompilesStyles:[],id:c+A+"-"+N,domId:B(c,N,L),type:h.type,isGroup:"group"===h.type,padding:(0,o.D7)().flowchart.padding,look:a,position:e.note.position},s=c+K,r={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:h.cssClasses,cssStyles:[],id:c+K,domId:B(c,N,v),type:"group",isGroup:!0,padding:16,look:a,position:e.note.position};N++,r.id=s,t.parentId=s,Y(i,r,l),Y(i,t,l),Y(i,I,l);let d=c,u=t.id;"left of"===e.note.position&&(d=t.id,u=c),n.push({id:d+"-"+u,start:d,end:u,arrowhead:"none",arrowTypeEnd:"",style:p,labelStyle:"",classes:x,arrowheadStyle:y,labelpos:"c",labelType:g,thickness:f,look:a})}else Y(i,I,l)}e.doc&&(o.Rm.trace("Adding nodes children "),F(e,e.doc,s,i,n,!r,a,l))}),"dataFetcher"),U=(0,o.K2)((()=>{O.clear(),N=0}),"reset"),M="[*]",X="start",V=M,W="color",H="fill";function J(){return new Map}(0,o.K2)(J,"newClassesList");var q=[],Z=[],Q="LR",tt=[],et=J(),st=(0,o.K2)((()=>({relations:[],states:new Map,documents:{}})),"newDoc"),it={root:st()},nt=it.root,rt=0,ot=0,at=(0,o.K2)((t=>JSON.parse(JSON.stringify(t))),"clone"),lt=(0,o.K2)((t=>{o.Rm.info("Setting root doc",t),tt=t}),"setRootDoc"),ct=(0,o.K2)((()=>tt),"getRootDoc"),ht=(0,o.K2)(((t,e,s)=>{if(e.stmt===h)ht(t,e.state1,!0),ht(t,e.state2,!1);else if(e.stmt===c&&("[*]"===e.id?(e.id=s?t.id+"_start":t.id+"_end",e.start=s):e.id=e.id.trim()),e.doc){const t=[];let s,i=[];for(s=0;s0&&i.length>0){const s={stmt:c,id:(0,r.$C)(),type:"divider",doc:at(i)};t.push(at(s)),e.doc=t}e.doc.forEach((t=>ht(e,t,!0)))}}),"docTranslator"),dt=(0,o.K2)((()=>(ht({id:"root"},{id:"root",doc:tt},!0),{id:"root",doc:tt})),"getRootDocV2"),ut=(0,o.K2)((t=>{let e;e=t.doc?t.doc:t,o.Rm.info(e),yt(!0),o.Rm.info("Extract initial document:",e),e.forEach((t=>{switch(o.Rm.warn("Statement",t.stmt),t.stmt){case c:pt(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case h:xt(t.state1,t.state2,t.description);break;case"classDef":vt(t.id.trim(),t.classes);break;case"style":{const e=t.id.trim().split(","),s=t.styleClass.split(",");e.forEach((t=>{let e=gt(t);if(void 0===e){const s=t.trim();pt(s),e=gt(s)}e.styles=s.map((t=>t.replace(/;/g,"")?.trim()))}))}break;case"applyClass":It(t.id.trim(),t.styleClass)}}));const s=ft(),i=(0,o.D7)().look;U(),z(void 0,dt(),s,q,Z,!0,i,et),q.forEach((t=>{if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+t.id+"]");t.label=t.label[0]}}))}),"extract"),pt=(0,o.K2)((function(t,e=d,s=null,i=null,n=null,r=null,a=null,l=null){const c=t?.trim();if(nt.states.has(c)?(nt.states.get(c).doc||(nt.states.get(c).doc=s),nt.states.get(c).type||(nt.states.get(c).type=e)):(o.Rm.info("Adding state ",c,i),nt.states.set(c,{id:c,descriptions:[],type:e,doc:s,note:n,classes:[],styles:[],textStyles:[]})),i&&(o.Rm.info("Setting state description",c,i),"string"==typeof i&&Dt(c,i.trim()),"object"==typeof i&&i.forEach((t=>Dt(c,t.trim())))),n){const t=nt.states.get(c);t.note=n,t.note.text=o.Y2.sanitizeText(t.note.text,(0,o.D7)())}r&&(o.Rm.info("Setting state classes",c,r),("string"==typeof r?[r]:r).forEach((t=>It(c,t.trim())))),a&&(o.Rm.info("Setting state styles",c,a),("string"==typeof a?[a]:a).forEach((t=>At(c,t.trim())))),l&&(o.Rm.info("Setting state styles",c,a),("string"==typeof l?[l]:l).forEach((t=>Kt(c,t.trim()))))}),"addState"),yt=(0,o.K2)((function(t){q=[],Z=[],it={root:st()},nt=it.root,rt=0,et=J(),t||(0,o.IU)()}),"clear"),gt=(0,o.K2)((function(t){return nt.states.get(t)}),"getState"),ft=(0,o.K2)((function(){return nt.states}),"getStates"),mt=(0,o.K2)((function(){o.Rm.info("Documents = ",it)}),"logDocuments"),St=(0,o.K2)((function(){return nt.relations}),"getRelations");function _t(t=""){let e=t;return t===M&&(rt++,e=`${X}${rt}`),e}function bt(t="",e=d){return t===M?X:e}function Tt(t=""){let e=t;return t===V&&(e="end"+ ++rt),e}function kt(t="",e=d){return t===V?"end":e}function Et(t,e,s){let i=_t(t.id.trim()),n=bt(t.id.trim(),t.type),r=_t(e.id.trim()),a=bt(e.id.trim(),e.type);pt(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),pt(r,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),nt.relations.push({id1:i,id2:r,relationTitle:o.Y2.sanitizeText(s,(0,o.D7)())})}(0,o.K2)(_t,"startIdIfNeeded"),(0,o.K2)(bt,"startTypeIfNeeded"),(0,o.K2)(Tt,"endIdIfNeeded"),(0,o.K2)(kt,"endTypeIfNeeded"),(0,o.K2)(Et,"addRelationObjs");var xt=(0,o.K2)((function(t,e,s){if("object"==typeof t)Et(t,e,s);else{const i=_t(t.trim()),n=bt(t),r=Tt(e.trim()),a=kt(e);pt(i,n),pt(r,a),nt.relations.push({id1:i,id2:r,title:o.Y2.sanitizeText(s,(0,o.D7)())})}}),"addRelation"),Dt=(0,o.K2)((function(t,e){const s=nt.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s.descriptions.push(o.Y2.sanitizeText(i,(0,o.D7)()))}),"addDescription"),Ct=(0,o.K2)((function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()}),"cleanupLabel"),$t=(0,o.K2)((()=>"divider-id-"+ ++ot),"getDividerId"),vt=(0,o.K2)((function(t,e=""){et.has(t)||et.set(t,{id:t,styles:[],textStyles:[]});const s=et.get(t);null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(W).exec(t)){const t=e.replace(H,"bgFill").replace(W,H);s.textStyles.push(t)}s.styles.push(e)}))}),"addStyleClass"),Lt=(0,o.K2)((function(){return et}),"getClasses"),It=(0,o.K2)((function(t,e){t.split(",").forEach((function(t){let s=gt(t);if(void 0===s){const e=t.trim();pt(e),s=gt(e)}s.classes.push(e)}))}),"setCssClass"),At=(0,o.K2)((function(t,e){const s=gt(t);void 0!==s&&s.styles.push(e)}),"setStyle"),Kt=(0,o.K2)((function(t,e){const s=gt(t);void 0!==s&&s.textStyles.push(e)}),"setTextStyle"),Rt=(0,o.K2)((()=>Q),"getDirection"),wt=(0,o.K2)((t=>{Q=t}),"setDirection"),Ot=(0,o.K2)((t=>t&&":"===t[0]?t.substr(1).trim():t.trim()),"trimColon"),Nt=(0,o.K2)((()=>{const t=(0,o.D7)();return{nodes:q,edges:Z,other:{},config:t,direction:R(dt())}}),"getData"),Bt={getConfig:(0,o.K2)((()=>(0,o.D7)().state),"getConfig"),getData:Nt,addState:pt,clear:yt,getState:gt,getStates:ft,getRelations:St,getClasses:Lt,getDirection:Rt,addRelation:xt,getDividerId:$t,setDirection:wt,cleanupLabel:Ct,lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:mt,getRootDoc:ct,setRootDoc:lt,getRootDocV2:dt,extract:ut,trimColon:Ot,getAccTitle:o.iN,setAccTitle:o.SV,getAccDescription:o.m7,setAccDescription:o.EI,addStyleClass:vt,setCssClass:It,addDescription:Dt,setDiagramTitle:o.ke,getDiagramTitle:o.ab},Ft=(0,o.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")}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/825-fe49e4aa.chunk.min.js b/docs/hugo/public/js/825-fe49e4aa.chunk.min.js new file mode 100644 index 000000000..903510ce5 --- /dev/null +++ b/docs/hugo/public/js/825-fe49e4aa.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[825],{3933:(e,t,a)=>{function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>i}),(0,a(9502).K2)(i,"populateCommonDb")},1825:(e,t,a)=>{a.d(t,{diagram:()=>k});var i=a(3933),n=a(8159),l=a(7286),r=a(9502),s=a(8731),o=a(4852),c=r.UI.pie,p={sections:new Map,showData:!1,config:c},d=p.sections,g=p.showData,u=structuredClone(c),h=(0,r.K2)((()=>structuredClone(u)),"getConfig"),m=(0,r.K2)((()=>{d=new Map,g=p.showData,(0,r.IU)()}),"clear"),f=(0,r.K2)((({label:e,value:t})=>{d.has(e)||(d.set(e,t),r.Rm.debug(`added new section: ${e}, with value: ${t}`))}),"addSection"),S=(0,r.K2)((()=>d),"getSections"),x=(0,r.K2)((e=>{g=e}),"setShowData"),w=(0,r.K2)((()=>g),"getShowData"),D={getConfig:h,clear:m,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:f,getSections:S,setShowData:x,getShowData:w},T=(0,r.K2)(((e,t)=>{(0,i.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)}),"populateDb"),$={parse:(0,r.K2)((async e=>{const t=await(0,s.qg)("pie",e);r.Rm.debug(t),T(t,D)}),"parse")},y=(0,r.K2)((e=>`\n .pieCircle{\n stroke: ${e.pieStrokeColor};\n stroke-width : ${e.pieStrokeWidth};\n opacity : ${e.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${e.pieOuterStrokeColor};\n stroke-width: ${e.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${e.pieTitleTextSize};\n fill: ${e.pieTitleTextColor};\n font-family: ${e.fontFamily};\n }\n .slice {\n font-family: ${e.fontFamily};\n fill: ${e.pieSectionTextColor};\n font-size:${e.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${e.pieLegendTextColor};\n font-family: ${e.fontFamily};\n font-size: ${e.pieLegendTextSize};\n }\n`),"getStyles"),C=(0,r.K2)((e=>{const t=[...e.entries()].map((e=>({label:e[0],value:e[1]}))).sort(((e,t)=>t.value-e.value));return(0,o.rLf)().value((e=>e.value))(t)}),"createPieArcs"),k={parser:$,db:D,renderer:{draw:(0,r.K2)(((e,t,a,i)=>{r.Rm.debug("rendering pie chart\n"+e);const s=i.db,c=(0,r.D7)(),p=(0,n.$t)(s.getConfig(),c.pie),d=(0,l.D)(t),g=d.append("g");g.attr("transform","translate(225,225)");const{themeVariables:u}=c;let[h]=(0,n.I5)(u.pieOuterStrokeWidth);h??=2;const m=p.textPosition,f=Math.min(450,450)/2-40,S=(0,o.JLW)().innerRadius(0).outerRadius(f),x=(0,o.JLW)().innerRadius(f*m).outerRadius(f*m);g.append("circle").attr("cx",0).attr("cy",0).attr("r",f+h/2).attr("class","pieOuterCircle");const w=s.getSections(),D=C(w),T=[u.pie1,u.pie2,u.pie3,u.pie4,u.pie5,u.pie6,u.pie7,u.pie8,u.pie9,u.pie10,u.pie11,u.pie12],$=(0,o.UMr)(T);g.selectAll("mySlices").data(D).enter().append("path").attr("d",S).attr("fill",(e=>$(e.data.label))).attr("class","pieCircle");let y=0;w.forEach((e=>{y+=e})),g.selectAll("mySlices").data(D).enter().append("text").text((e=>(e.data.value/y*100).toFixed(0)+"%")).attr("transform",(e=>"translate("+x.centroid(e)+")")).style("text-anchor","middle").attr("class","slice"),g.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const k=g.selectAll(".legend").data($.domain()).enter().append("g").attr("class","legend").attr("transform",((e,t)=>"translate(216,"+(22*t-22*$.domain().length/2)+")"));k.append("rect").attr("width",18).attr("height",18).style("fill",$).style("stroke",$),k.data(D).append("text").attr("x",22).attr("y",14).text((e=>{const{label:t,value:a}=e.data;return s.getShowData()?`${t} [${a}]`:t}));const b=512+Math.max(...k.selectAll("text").nodes().map((e=>e?.getBoundingClientRect().width??0)));d.attr("viewBox",`0 0 ${b} 450`),(0,r.a$)(d,450,b,p.useMaxWidth)}),"draw")},styles:y}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/890-c9907c95.chunk.min.js b/docs/hugo/public/js/890-c9907c95.chunk.min.js new file mode 100644 index 000000000..3437988ee --- /dev/null +++ b/docs/hugo/public/js/890-c9907c95.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[890],{890:(e,c,k)=>{k.d(c,{createInfoServices:()=>s.v});var s=k(7021);k(9369)}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/978-b543144f.chunk.min.js b/docs/hugo/public/js/978-b543144f.chunk.min.js new file mode 100644 index 000000000..384a7b3de --- /dev/null +++ b/docs/hugo/public/js/978-b543144f.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[978],{8160:(t,r,e)=>{e.d(r,{m:()=>o});var n=e(9502),o=class{constructor(t){this.init=t,this.records=this.init()}static{(0,n.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},3933:(t,r,e)=>{function n(t,r){t.accDescr&&r.setAccDescription?.(t.accDescr),t.accTitle&&r.setAccTitle?.(t.accTitle),t.title&&r.setDiagramTitle?.(t.title)}e.d(r,{S:()=>n}),(0,e(9502).K2)(n,"populateCommonDb")},5978:(t,r,e)=>{e.d(r,{diagram:()=>ft});var n=e(3933),o=e(8160),a=e(8159),c=e(9502),s=e(8731),i=e(4852),h={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},d=c.UI.gitGraph,m=(0,c.K2)((()=>(0,a.$t)({...d,...(0,c.zj)().gitGraph})),"getConfig"),$=new o.m((()=>{const t=m(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}}));function l(){return(0,a.yT)({length:7})}function g(t,r){const e=Object.create(null);return t.reduce(((t,n)=>{const o=r(n);return e[o]||(e[o]=!0,t.push(n)),t}),[])}(0,c.K2)(l,"getID"),(0,c.K2)(g,"uniqBy");var y=(0,c.K2)((function(t){$.records.direction=t}),"setDirection"),p=(0,c.K2)((function(t){c.Rm.debug("options str",t),t=t?.trim(),t=t||"{}";try{$.records.options=JSON.parse(t)}catch(t){c.Rm.error("error while parsing gitGraph options",t.message)}}),"setOptions"),x=(0,c.K2)((function(){return $.records.options}),"getOptions"),f=(0,c.K2)((function(t){let r=t.msg,e=t.id;const n=t.type;let o=t.tags;c.Rm.info("commit",r,e,n,o),c.Rm.debug("Entering commit:",r,e,n,o);const a=m();e=c.Y2.sanitizeText(e,a),r=c.Y2.sanitizeText(r,a),o=o?.map((t=>c.Y2.sanitizeText(t,a)));const s={id:e||$.records.seq+"-"+l(),message:r,seq:$.records.seq++,type:n??h.NORMAL,tags:o??[],parents:null==$.records.head?[]:[$.records.head.id],branch:$.records.currBranch};$.records.head=s,c.Rm.info("main branch",a.mainBranchName),$.records.commits.set(s.id,s),$.records.branches.set($.records.currBranch,s.id),c.Rm.debug("in pushCommit "+s.id)}),"commit"),u=(0,c.K2)((function(t){let r=t.name;const e=t.order;if(r=c.Y2.sanitizeText(r,m()),$.records.branches.has(r))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 ${r}")`);$.records.branches.set(r,null!=$.records.head?$.records.head.id:null),$.records.branchConfig.set(r,{name:r,order:e}),B(r),c.Rm.debug("in createBranch")}),"branch"),b=(0,c.K2)((t=>{let r=t.branch,e=t.id;const n=t.type,o=t.tags,a=m();r=c.Y2.sanitizeText(r,a),e&&(e=c.Y2.sanitizeText(e,a));const s=$.records.branches.get($.records.currBranch),i=$.records.branches.get(r),d=s?$.records.commits.get(s):void 0,g=i?$.records.commits.get(i):void 0;if(d&&g&&d.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if($.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===d||!d){const t=new Error(`Incorrect usage of "merge". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!$.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===g||!g){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(d===g){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&$.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw t.hash={text:`merge ${r} ${e} ${n} ${o?.join(" ")}`,token:`merge ${r} ${e} ${n} ${o?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${n} ${o?.join(" ")}`]},t}const y=i||"",p={id:e||`${$.records.seq}-${l()}`,message:`merged branch ${r} into ${$.records.currBranch}`,seq:$.records.seq++,parents:null==$.records.head?[]:[$.records.head.id,y],branch:$.records.currBranch,type:h.MERGE,customType:n,customId:!!e,tags:o??[]};$.records.head=p,$.records.commits.set(p.id,p),$.records.branches.set($.records.currBranch,p.id),c.Rm.debug($.records.branches),c.Rm.debug("in mergeBranch")}),"merge"),w=(0,c.K2)((function(t){let r=t.id,e=t.targetId,n=t.tags,o=t.parent;c.Rm.debug("Entering cherryPick:",r,e,n);const a=m();if(r=c.Y2.sanitizeText(r,a),e=c.Y2.sanitizeText(e,a),n=n?.map((t=>c.Y2.sanitizeText(t,a))),o=c.Y2.sanitizeText(o,a),!r||!$.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=$.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&(!Array.isArray(s.parents)||!s.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const i=s.branch;if(s.type===h.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!e||!$.records.commits.has(e)){if(i===$.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=$.records.branches.get($.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=$.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const d={id:$.records.seq+"-"+l(),message:`cherry-picked ${s?.message} into ${$.records.currBranch}`,seq:$.records.seq++,parents:null==$.records.head?[]:[$.records.head.id,s.id],branch:$.records.currBranch,type:h.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===h.MERGE?`|parent:${o}`:""}`]};$.records.head=d,$.records.commits.set(d.id,d),$.records.branches.set($.records.currBranch,d.id),c.Rm.debug($.records.branches),c.Rm.debug("in cherryPick")}}),"cherryPick"),B=(0,c.K2)((function(t){if(t=c.Y2.sanitizeText(t,m()),!$.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{$.records.currBranch=t;const r=$.records.branches.get($.records.currBranch);$.records.head=void 0!==r&&r?$.records.commits.get(r)??null:null}}),"checkout");function E(t,r,e){const n=t.indexOf(r);-1===n?t.push(e):t.splice(n,1,e)}function k(t){const r=t.reduce(((t,r)=>t.seq>r.seq?t:r),t[0]);let e="";t.forEach((function(t){e+=t===r?"\t*":"\t|"}));const n=[e,r.id,r.seq];for(const t in $.records.branches)$.records.branches.get(t)===r.id&&n.push(t);if(c.Rm.debug(n.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=$.records.commits.get(r.parents[0]);E(t,r,e),r.parents[1]&&t.push($.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=$.records.commits.get(r.parents[0]);E(t,r,e)}}k(t=g(t,(t=>t.id)))}(0,c.K2)(E,"upsert"),(0,c.K2)(k,"prettyPrintCommitHistory");var C=(0,c.K2)((function(){c.Rm.debug($.records.commits),k([R()[0]])}),"prettyPrint"),T=(0,c.K2)((function(){$.reset(),(0,c.IU)()}),"clear"),L=(0,c.K2)((function(){return[...$.records.branchConfig.values()].map(((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)})).sort(((t,r)=>(t.order??0)-(r.order??0))).map((({name:t})=>({name:t})))}),"getBranchesAsObjArray"),K=(0,c.K2)((function(){return $.records.branches}),"getBranches"),M=(0,c.K2)((function(){return $.records.commits}),"getCommits"),R=(0,c.K2)((function(){const t=[...$.records.commits.values()];return t.forEach((function(t){c.Rm.debug(t.id)})),t.sort(((t,r)=>t.seq-r.seq)),t}),"getCommitsArray"),v={commitType:h,getConfig:m,setDirection:y,setOptions:p,getOptions:x,commit:f,branch:u,merge:b,cherryPick:w,checkout:B,prettyPrint:C,clear:T,getBranchesAsObjArray:L,getBranches:K,getCommits:M,getCommitsArray:R,getCurrentBranch:(0,c.K2)((function(){return $.records.currBranch}),"getCurrentBranch"),getDirection:(0,c.K2)((function(){return $.records.direction}),"getDirection"),getHead:(0,c.K2)((function(){return $.records.head}),"getHead"),setAccTitle:c.SV,getAccTitle:c.iN,getAccDescription:c.m7,setAccDescription:c.EI,setDiagramTitle:c.ke,getDiagramTitle:c.ab},P=(0,c.K2)(((t,r)=>{(0,n.S)(t,r),t.dir&&r.setDirection(t.dir);for(const e of t.statements)I(e,r)}),"populate"),I=(0,c.K2)(((t,r)=>{const e={Commit:(0,c.K2)((t=>r.commit(A(t))),"Commit"),Branch:(0,c.K2)((t=>r.branch(G(t))),"Branch"),Merge:(0,c.K2)((t=>r.merge(O(t))),"Merge"),Checkout:(0,c.K2)((t=>r.checkout(q(t))),"Checkout"),CherryPicking:(0,c.K2)((t=>r.cherryPick(z(t))),"CherryPicking")}[t.$type];e?e(t):c.Rm.error(`Unknown statement type: ${t.$type}`)}),"parseStatement"),A=(0,c.K2)((t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?h[t.type]:h.NORMAL,tags:t.tags??void 0})),"parseCommit"),G=(0,c.K2)((t=>({name:t.name,order:t.order??0})),"parseBranch"),O=(0,c.K2)((t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?h[t.type]:void 0,tags:t.tags??void 0})),"parseMerge"),q=(0,c.K2)((t=>t.branch),"parseCheckout"),z=(0,c.K2)((t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent})),"parseCherryPicking"),H={parse:(0,c.K2)((async t=>{const r=await(0,s.qg)("gitGraph",t);c.Rm.debug(r),P(r,v)}),"parse")},S=(0,c.D7)(),D=S?.gitGraph,Y=10,N=40,j=new Map,W=new Map,_=new Map,F=[],U=0,V="LR",J=(0,c.K2)((()=>{j.clear(),W.clear(),_.clear(),U=0,F=[],V="LR"}),"clear"),Q=(0,c.K2)((t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach((t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)})),r}),"drawText"),X=(0,c.K2)((t=>{let r,e,n;return"BT"===V?(e=(0,c.K2)(((t,r)=>t<=r),"comparisonFunc"),n=1/0):(e=(0,c.K2)(((t,r)=>t>=r),"comparisonFunc"),n=0),t.forEach((t=>{const o="TB"===V||"BT"==V?W.get(t)?.y:W.get(t)?.x;void 0!==o&&e(o,n)&&(r=t,n=o)})),r}),"findClosestParent"),Z=(0,c.K2)((t=>{let r="",e=1/0;return t.forEach((t=>{const n=W.get(t).y;n<=e&&(r=t,e=n)})),r||void 0}),"findClosestParentBT"),tt=(0,c.K2)(((t,r,e)=>{let n=e,o=e;const a=[];t.forEach((t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(n=et(e),o=Math.max(n,o)):a.push(e),nt(e,n)})),n=o,a.forEach((t=>{ot(t,n,e)})),t.forEach((t=>{const e=r.get(t);if(e?.parents.length){const t=Z(e.parents);n=W.get(t).y-N,n<=o&&(o=n);const r=j.get(e.branch).pos,a=n-Y;W.set(e.id,{x:r,y:a})}}))}),"setParallelBTPos"),rt=(0,c.K2)((t=>{const r=X(t.parents.filter((t=>null!==t)));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=W.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e}),"findClosestParentPos"),et=(0,c.K2)((t=>rt(t)+N),"calculateCommitPosition"),nt=(0,c.K2)(((t,r)=>{const e=j.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const n=e.pos,o=r+Y;return W.set(t.id,{x:n,y:o}),{x:n,y:o}}),"setCommitPosition"),ot=(0,c.K2)(((t,r,e)=>{const n=j.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const o=r+e,a=n.pos;W.set(t.id,{x:a,y:o})}),"setRootPosition"),at=(0,c.K2)(((t,r,e,n,o,a)=>{if(a===h.HIGHLIGHT)t.append("rect").attr("x",e.x-10).attr("y",e.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${o%8} ${n}-outer`),t.append("rect").attr("x",e.x-6).attr("y",e.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${o%8} ${n}-inner`);else if(a===h.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const c=t.append("circle");if(c.attr("cx",e.x),c.attr("cy",e.y),c.attr("r",r.type===h.MERGE?9:10),c.attr("class",`commit ${r.id} commit${o%8}`),a===h.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",6),a.attr("class",`commit ${n} ${r.id} commit${o%8}`)}a===h.REVERSE&&t.append("path").attr("d",`M ${e.x-5},${e.y-5}L${e.x+5},${e.y+5}M${e.x-5},${e.y+5}L${e.x+5},${e.y-5}`).attr("class",`commit ${n} ${r.id} commit${o%8}`)}}),"drawCommitBullet"),ct=(0,c.K2)(((t,r,e,n)=>{if(r.type!==h.CHERRY_PICK&&(r.customId&&r.type===h.MERGE||r.type!==h.MERGE)&&D?.showCommitLabel){const o=t.append("g"),a=o.insert("rect").attr("class","commit-label-bkg"),c=o.append("text").attr("x",n).attr("y",e.y+25).attr("class","commit-label").text(r.id),s=c.node()?.getBBox();if(s&&(a.attr("x",e.posWithOffset-s.width/2-2).attr("y",e.y+13.5).attr("width",s.width+4).attr("height",s.height+4),"TB"===V||"BT"===V?(a.attr("x",e.x-(s.width+16+5)).attr("y",e.y-12),c.attr("x",e.x-(s.width+16)).attr("y",e.y+s.height-12)):c.attr("x",e.posWithOffset-s.width/2),D.rotateCommitLabel))if("TB"===V||"BT"===V)c.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),a.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(s.width+10)/25*9.5,r=10+s.width/25*8.5;o.attr("transform","translate("+t+", "+r+") rotate(-45, "+n+", "+e.y+")")}}}),"drawCommitLabel"),st=(0,c.K2)(((t,r,e,n)=>{if(r.tags.length>0){let o=0,a=0,c=0;const s=[];for(const n of r.tags.reverse()){const r=t.insert("polygon"),i=t.append("circle"),h=t.append("text").attr("y",e.y-16-o).attr("class","tag-label").text(n),d=h.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),c=Math.max(c,d.height),h.attr("x",e.posWithOffset-d.width/2),s.push({tag:h,hole:i,rect:r,yOffset:o}),o+=20}for(const{tag:t,hole:r,rect:o,yOffset:i}of s){const s=c/2,h=e.y-19.2-i;if(o.attr("class","tag-label-bkg").attr("points",`\n ${n-a/2-2},${h+2} \n ${n-a/2-2},${h-2}\n ${e.posWithOffset-a/2-4},${h-s-2}\n ${e.posWithOffset+a/2+4},${h-s-2}\n ${e.posWithOffset+a/2+4},${h+s+2}\n ${e.posWithOffset-a/2-4},${h+s+2}`),r.attr("cy",h).attr("cx",n-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===V||"BT"===V){const c=n+i;o.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${c+2}\n ${e.x},${c-2}\n ${e.x+Y},${c-s-2}\n ${e.x+Y+a+4},${c-s-2}\n ${e.x+Y+a+4},${c+s+2}\n ${e.x+Y},${c+s+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+n+")"),r.attr("cx",e.x+2).attr("cy",c).attr("transform","translate(12,12) rotate(45, "+e.x+","+n+")"),t.attr("x",e.x+5).attr("y",c+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+n+")")}}}}),"drawCommitTags"),it=(0,c.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,c.K2)(((t,r,e,n)=>{const o={x:0,y:0};if(!(t.parents.length>0))return"TB"===r?30:"BT"===r?(n.get(t.id)??o).y-N:0;{const e=X(t.parents);if(e){const a=n.get(e)??o;return"TB"===r?a.y+N:"BT"===r?(n.get(t.id)??o).y-N:a.x+N}}return 0}),"calculatePosition"),dt=(0,c.K2)(((t,r,e)=>{const n="BT"===V&&e?r:r+Y,o="TB"===V||"BT"===V?n:j.get(t.branch)?.pos,a="TB"===V||"BT"===V?j.get(t.branch)?.pos:n;if(void 0===a||void 0===o)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:o,posWithOffset:n}}),"getCommitPosition"),mt=(0,c.K2)(((t,r,e)=>{if(!D)throw new Error("GitGraph config not found");const n=t.append("g").attr("class","commit-bullets"),o=t.append("g").attr("class","commit-labels");let a="TB"===V||"BT"===V?30:0;const s=[...r.keys()],i=D?.parallelCommits??!1,h=(0,c.K2)(((t,e)=>{const n=r.get(t)?.seq,o=r.get(e)?.seq;return void 0!==n&&void 0!==o?n-o:0}),"sortKeys");let d=s.sort(h);"BT"===V&&(i&&tt(d,r,a),d=d.reverse()),d.forEach((t=>{const c=r.get(t);if(!c)throw new Error(`Commit not found for key ${t}`);i&&(a=ht(c,V,a,W));const s=dt(c,a,i);if(e){const t=it(c),r=c.customType??c.type,e=j.get(c.branch)?.index??0;at(n,c,s,t,e,r),ct(o,c,s,a),st(o,c,s,a)}"TB"===V||"BT"===V?W.set(c.id,{x:s.x,y:s.posWithOffset}):W.set(c.id,{x:s.posWithOffset,y:s.y}),a="BT"===V&&i?a+N:a+N+Y,a>U&&(U=a)}))}),"drawCommits"),$t=(0,c.K2)(((t,r,e,n,o)=>{const a=("TB"===V||"BT"===V?e.xt.branch===a),"isOnBranchToGetCurve"),i=(0,c.K2)((e=>e.seq>t.seq&&e.seqi(t)&&s(t)))}),"shouldRerouteArrow"),lt=(0,c.K2)(((t,r,e=0)=>{const n=t+Math.abs(t-r)/2;if(e>5)return n;if(F.every((t=>Math.abs(t-n)>=10)))return F.push(n),n;const o=Math.abs(t-r);return lt(t,r-o/5,e+1)}),"findLane"),gt=(0,c.K2)(((t,r,e,n)=>{const o=W.get(r.id),a=W.get(e.id);if(void 0===o||void 0===a)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=$t(r,e,o,a,n);let s,i="",d="",m=0,$=0,l=j.get(e.branch)?.index;if(e.type===h.MERGE&&r.id!==e.parents[0]&&(l=j.get(r.branch)?.index),c){i="A 10 10, 0, 0, 0,",d="A 10 10, 0, 0, 1,",m=10,$=10;const t=o.ya.x&&(i="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",m=20,$=20,s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${d} ${o.x-$} ${a.y} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${a.x+m} ${o.y} ${i} ${a.x} ${o.y+$} L ${a.x} ${a.y}`),o.x===a.x&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):"BT"===V?(o.xa.x&&(i="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",m=20,$=20,s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${i} ${o.x-$} ${a.y} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${i} ${a.x} ${o.y-$} L ${a.x} ${a.y}`),o.x===a.x&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):(o.ya.y&&(s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${i} ${a.x} ${o.y-$} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${d} ${o.x+$} ${a.y} L ${a.x} ${a.y}`),o.y===a.y&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`));if(void 0===s)throw new Error("Line definition not found");t.append("path").attr("d",s).attr("class","arrow arrow"+l%8)}),"drawArrow"),yt=(0,c.K2)(((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach((t=>{const n=r.get(t);n.parents&&n.parents.length>0&&n.parents.forEach((t=>{gt(e,r.get(t),n,r)}))}))}),"drawArrows"),pt=(0,c.K2)(((t,r)=>{const e=t.append("g");r.forEach(((t,r)=>{const n=r%8,o=j.get(t.name)?.pos;if(void 0===o)throw new Error(`Position not found for branch ${t.name}`);const a=e.append("line");a.attr("x1",0),a.attr("y1",o),a.attr("x2",U),a.attr("y2",o),a.attr("class","branch branch"+n),"TB"===V?(a.attr("y1",30),a.attr("x1",o),a.attr("y2",U),a.attr("x2",o)):"BT"===V&&(a.attr("y1",U),a.attr("x1",o),a.attr("y2",30),a.attr("x2",o)),F.push(o);const c=t.name,s=Q(c),i=e.insert("rect"),h=e.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);h.node().appendChild(s);const d=s.getBBox();i.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-d.width-4-(!0===D?.rotateCommitLabel?30:0)).attr("y",-d.height/2+8).attr("width",d.width+18).attr("height",d.height+4),h.attr("transform","translate("+(-d.width-14-(!0===D?.rotateCommitLabel?30:0))+", "+(o-d.height/2-1)+")"),"TB"===V?(i.attr("x",o-d.width/2-10).attr("y",0),h.attr("transform","translate("+(o-d.width/2-5)+", 0)")):"BT"===V?(i.attr("x",o-d.width/2-10).attr("y",U),h.attr("transform","translate("+(o-d.width/2-5)+", "+U+")")):i.attr("transform","translate(-19, "+(o-d.height/2)+")")}))}),"drawBranches"),xt=(0,c.K2)((function(t,r,e,n,o){return j.set(t,{pos:r,index:e}),r+(50+(o?40:0)+("TB"===V||"BT"===V?n.width/2:0))}),"setBranchPosition"),ft={parser:H,db:v,renderer:{draw:(0,c.K2)((function(t,r,e,n){if(J(),c.Rm.debug("in gitgraph renderer",t+"\n","id:",r,e),!D)throw new Error("GitGraph config not found");const o=D.rotateCommitLabel??!1,s=n.db;_=s.getCommits();const h=s.getBranchesAsObjArray();V=s.getDirection();const d=(0,i.Ltv)(`[id="${r}"]`);let m=0;h.forEach(((t,r)=>{const e=Q(t.name),n=d.append("g"),a=n.insert("g").attr("class","branchLabel"),c=a.insert("g").attr("class","label branch-label");c.node()?.appendChild(e);const s=e.getBBox();m=xt(t.name,m,r,s,o),c.remove(),a.remove(),n.remove()})),mt(d,_,!1),D.showBranches&&pt(d,h),yt(d,_),mt(d,_,!0),a._K.insertTitle(d,"gitTitleText",D.titleTopMargin??0,s.getDiagramTitle()),(0,c.mj)(void 0,d,D.diagramPadding,D.useMaxWidth)}),"draw")},styles:(0,c.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((r=>`\n .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }\n .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }\n .label${r} { fill: ${t["git"+r]}; }\n .arrow${r} { stroke: ${t["git"+r]}; }\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")}}}]); \ No newline at end of file diff --git a/docs/hugo/public/js/colortheme-01ea3db1.bundle.min.js b/docs/hugo/public/js/colortheme-01ea3db1.bundle.min.js new file mode 100644 index 000000000..ba2c14b00 --- /dev/null +++ b/docs/hugo/public/js/colortheme-01ea3db1.bundle.min.js @@ -0,0 +1 @@ +(()=>{var t={7148:function(t){var e,r,n,i;e=this,r=this&&this.define,n={version:"2.14.4",areas:{},apis:{},nsdelim:".",inherit:function(t,e){for(var r in t)e.hasOwnProperty(r)||Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e},stringify:function(t,e){return void 0===t||"function"==typeof t?t+"":JSON.stringify(t,e||n.replace)},parse:function(t,e){try{return JSON.parse(t,e||n.revive)}catch(e){return t}},fn:function(t,e){for(var r in n.storeAPI[t]=e,n.apis)n.apis[r][t]=e},get:function(t,e){return t.getItem(e)},set:function(t,e,r){t.setItem(e,r)},remove:function(t,e){t.removeItem(e)},key:function(t,e){return t.key(e)},length:function(t){return t.length},clear:function(t){t.clear()},Store:function(t,e,r){var i=n.inherit(n.storeAPI,(function(t,e,r){return 0===arguments.length?i.getAll():"function"==typeof e?i.transact(t,e,r):void 0!==e?i.set(t,e,r):"string"==typeof t||"number"==typeof t?i.get(t):"function"==typeof t?i.each(t):t?i.setAll(t,e):i.clear()}));i._id=t;try{var s="__store2_test";e.setItem(s,"ok"),i._area=e,e.removeItem(s)}catch(t){i._area=n.storage("fake")}return i._ns=r||"",n.areas[t]||(n.areas[t]=i._area),n.apis[i._ns+i._id]||(n.apis[i._ns+i._id]=i),i},storeAPI:{area:function(t,e){var r=this[t];return r&&r.area||(r=n.Store(t,e,this._ns),this[t]||(this[t]=r)),r},namespace:function(t,e,r){if(r=r||this._delim||n.nsdelim,!t)return this._ns?this._ns.substring(0,this._ns.length-r.length):"";var i=t,s=this[i];if(!(s&&s.namespace||((s=n.Store(this._id,this._area,this._ns+i+r))._delim=r,this[i]||(this[i]=s),e)))for(var a in n.areas)s.area(a,n.areas[a]);return s},isFake:function(t){return t?(this._real=this._area,this._area=n.storage("fake")):!1===t&&(this._area=this._real||this._area),"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(t){return this._area.has?this._area.has(this._in(t)):!!(this._in(t)in this._area)},size:function(){return this.keys().length},each:function(t,e){for(var r=0,i=n.length(this._area);rn.length(this._area)&&(i--,r--)}return e||this},keys:function(t){return this.each((function(t,e,r){r.push(t)}),t||[])},get:function(t,e){var r,i=n.get(this._area,this._in(t));return"function"==typeof e&&(r=e,e=null),null!==i?n.parse(i,r):null!=e?e:i},getAll:function(t){return this.each((function(t,e,r){r[t]=e}),t||{})},transact:function(t,e,r){var n=this.get(t,r),i=e(n);return this.set(t,void 0===i?n:i),this},set:function(t,e,r){var i,s=this.get(t);return null!=s&&!1===r?e:("function"==typeof r&&(i=r,r=void 0),n.set(this._area,this._in(t),n.stringify(e,i),r)||s)},setAll:function(t,e){var r,n;for(var i in t)n=t[i],this.set(i,n,e)!==n&&(r=!0);return r},add:function(t,e,r){var i=this.get(t);if(i instanceof Array)e=i.concat(e);else if(null!==i){var s=typeof i;if(s===typeof e&&"object"===s){for(var a in e)i[a]=e[a];e=i}else e=i+e}return n.set(this._area,this._in(t),n.stringify(e,r)),e},remove:function(t,e){var r=this.get(t,e);return n.remove(this._area,this._in(t)),r},clear:function(){return this._ns?this.each((function(t){n.remove(this._area,this._in(t))}),1):n.clear(this._area),this},clearAll:function(){var t=this._area;for(var e in n.areas)n.areas.hasOwnProperty(e)&&(this._area=n.areas[e],this.clear());return this._area=t,this},_in:function(t){return"string"!=typeof t&&(t=n.stringify(t)),this._ns?this._ns+t:t},_out:function(t){return this._ns?t&&0===t.indexOf(this._ns)?t.substring(this._ns.length):void 0:t}},storage:function(t){return n.inherit(n.storageAPI,{items:{},name:t})},storageAPI:{length:0,has:function(t){return this.items.hasOwnProperty(t)},key:function(t){var e=0;for(var r in this.items)if(this.has(r)&&t===e++)return r},setItem:function(t,e){this.has(t)||this.length++,this.items[t]=e},removeItem:function(t){this.has(t)&&(delete this.items[t],this.length--)},getItem:function(t){return this.has(t)?this.items[t]:null},clear:function(){for(var t in this.items)this.removeItem(t)}}},(i=n.Store("local",function(){try{return localStorage}catch(t){}}())).local=i,i._=n,i.area("session",function(){try{return sessionStorage}catch(t){}}()),i.area("page",n.storage("page")),"function"==typeof r&&void 0!==r.amd?r("store2",[],(function(){return i})):t.exports?t.exports=i:(e.store&&(n.conflict=e.store),e.store=i)}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,r),s.exports}(()=>{"use strict";var t=r(7148);const e="auto",n="hugo-geekdoc",i=[e,"dark","light"];function s(r=!0){if(t.isFake())return;let s=t.namespace(n),a=document.documentElement,o=i.includes(s.get("color-theme"))?s.get("color-theme"):e;a.setAttribute("class","color-toggle-"+o),o===e?a.removeAttribute("color-theme"):a.setAttribute("color-theme",o),r||location.reload()}s(),document.addEventListener("DOMContentLoaded",(()=>{document.getElementById("gdoc-color-theme").onclick=function(){let r=t.namespace(n),a=r.get("color-theme")||e,o=function(t=[],e){let r=t.indexOf(e),n=0;return r{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{var t;e.g.importScripts&&(t=e.g.location+"");var r=e.g.document;if(!t&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var a=r.getElementsByTagName("script");if(a.length)for(var n=a.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=a[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t+"../"})(),(()=>{e.p;class t{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,r){return r?e&&e.loc&&r.loc&&e.loc.lexer===r.loc.lexer?new t(e.loc.lexer,e.loc.start,r.loc.end):null:e&&e.loc}}class r{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,a){return new r(a,t.range(this,e))}}class a{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,i="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,n=o.end,r===s.length?i+=" at end of input: ":i+=" at position "+(r+1)+": ";var l=s.slice(r,n).replace(/[^]/g,"$&̲");i+=(r>15?"…"+s.slice(r-15,r):s.slice(0,r))+l+(n+15":">","<":"<",'"':""","'":"'"},o=/[&><"']/g,s=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l=function(e,t){return-1!==e.indexOf(t)},h=function(e,t){return void 0===e?t:e},m=function(e){return String(e).replace(o,(e=>i[e]))},c=function(e){return e.replace(n,"-$1").toLowerCase()},p=s,u=function(e){var t=s(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},d=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"},g={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:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function f(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;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 v{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},g)if(g.hasOwnProperty(t)){var r=g[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:f(r)}}reportNonstrict(e,t,r){var n=this.strict;if("function"==typeof n&&(n=n(e,t,r)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var a=this.strict;if("function"==typeof a)try{a=a(e,t,r)}catch(e){a="error"}return!(!a||"ignore"===a||!0!==a&&"error"!==a&&("warn"===a?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]"),1)))}isTrusted(e){if(e.url&&!e.protocol){var t=d(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class b{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return y[x[this.id]]}sub(){return y[w[this.id]]}fracNum(){return y[k[this.id]]}fracDen(){return y[S[this.id]]}cramp(){return y[M[this.id]]}text(){return y[z[this.id]]}isTight(){return this.size>=2}}var y=[new b(0,0,!1),new b(1,0,!0),new b(2,1,!1),new b(3,1,!0),new b(4,2,!1),new b(5,2,!0),new b(6,3,!1),new b(7,3,!0)],x=[4,5,4,5,6,7,6,7],w=[5,5,5,5,7,7,7,7],k=[2,3,4,5,6,7,6,7],S=[3,3,5,5,7,7,7,7],M=[1,1,3,3,5,5,7,7],z=[0,1,2,3,2,3,2,3],A={DISPLAY:y[0],TEXT:y[2],SCRIPT:y[4],SCRIPTSCRIPT:y[6]},T=[{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]]}],B=[];function N(e){for(var t=0;t=B[t]&&e<=B[t+1])return!0;return!1}T.forEach((e=>e.blocks.forEach((e=>B.push(...e)))));var C={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 q{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return l(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText())).join("")}}var I={"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]}},R={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]},H={Å:"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(e,t,r){if(!I[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),n=I[t][a];if(!n&&e[0]in H&&(a=H[e[0]].charCodeAt(0),n=I[t][a]),n||"text"!==r||N(a)&&(n=I[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var E={},L=[[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]],D=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],P=function(e,t){return t.size<2?e:L[e-1][t.size-1]};class V{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||V.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=D[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={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 e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new V(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:P(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:D[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=P(V.BASESIZE,e);return this.size===t&&this.textSize===V.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==V.BASESIZE?["sizing","reset-size"+this.size,"size"+V.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!E[t=e>=5?0:e>=3?1:2]){var r=E[t]={cssEmPerMu:R.quad[t]/18};for(var a in R)R.hasOwnProperty(a)&&(r[a]=R[a][t])}return E[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}V.BASESIZE=6;var F={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},G={ex:!0,em:!0,mu:!0},U=function(e){return"string"!=typeof e&&(e=e.unit),e in F||e in G||"ex"===e},Y=function(e,t){var r;if(e.unit in F)r=F[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n;if(n=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new a("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},X=function(e){return+e.toFixed(4)+"em"},W=function(e){return e.filter((e=>e)).join(" ")},_=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var a=t.getColor();a&&(this.style.color=a)}},$=function(e){var t=document.createElement(e);for(var r in t.className=W(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n/=\x00-\x1f]/,Z=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+m(W(this.classes))+'"');var r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=c(n)+":"+this.style[n]+";");for(var i in r&&(t+=' style="'+m(r)+'"'),this.attributes)if(this.attributes.hasOwnProperty(i)){if(j.test(i))throw new a("Invalid attribute name '"+i+"'");t+=" "+i+'="'+m(this.attributes[i])+'"'}t+=">";for(var o=0;o"};class K{constructor(e,t,r,a){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,_.call(this,e,r,a),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return l(this.classes,e)}toNode(){return $.call(this,"span")}toMarkup(){return Z.call(this,"span")}}class J{constructor(e,t,r,a){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,_.call(this,t,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return l(this.classes,e)}toNode(){return $.call(this,"a")}toMarkup(){return Z.call(this,"a")}}class Q{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return l(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+m(this.alt)+'"}}var ee={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class te{constructor(e,t,r,a,n,i,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=a||0,this.skew=n||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t=n[0]&&e<=n[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ee[this.text])}hasClass(e){return l(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=X(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=W(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(a)&&(r+=c(a)+":"+this.style[a]+";");r&&(e=!0,t+=' style="'+m(r)+'"');var n=m(this.text);return e?(t+=">",t+=n,t+=""):n}}class re{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r"}}class ae{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",C[this.pathName]),e}toMarkup(){return this.alternate?'':''}}class ne{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=""}}function ie(e){if(e instanceof te)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var oe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},se={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},le={math:{},text:{}};function he(e,t,r,a,n,i){le[e][n]={font:t,group:r,replace:a},i&&a&&(le[e][a]=le[e][n])}var me="math",ce="text",pe="main",ue="ams",de="accent-token",ge="bin",fe="close",ve="inner",be="mathord",ye="op-token",xe="open",we="punct",ke="rel",Se="spacing",Me="textord";he(me,pe,ke,"≡","\\equiv",!0),he(me,pe,ke,"≺","\\prec",!0),he(me,pe,ke,"≻","\\succ",!0),he(me,pe,ke,"∼","\\sim",!0),he(me,pe,ke,"⊥","\\perp"),he(me,pe,ke,"⪯","\\preceq",!0),he(me,pe,ke,"⪰","\\succeq",!0),he(me,pe,ke,"≃","\\simeq",!0),he(me,pe,ke,"∣","\\mid",!0),he(me,pe,ke,"≪","\\ll",!0),he(me,pe,ke,"≫","\\gg",!0),he(me,pe,ke,"≍","\\asymp",!0),he(me,pe,ke,"∥","\\parallel"),he(me,pe,ke,"⋈","\\bowtie",!0),he(me,pe,ke,"⌣","\\smile",!0),he(me,pe,ke,"⊑","\\sqsubseteq",!0),he(me,pe,ke,"⊒","\\sqsupseteq",!0),he(me,pe,ke,"≐","\\doteq",!0),he(me,pe,ke,"⌢","\\frown",!0),he(me,pe,ke,"∋","\\ni",!0),he(me,pe,ke,"∝","\\propto",!0),he(me,pe,ke,"⊢","\\vdash",!0),he(me,pe,ke,"⊣","\\dashv",!0),he(me,pe,ke,"∋","\\owns"),he(me,pe,we,".","\\ldotp"),he(me,pe,we,"⋅","\\cdotp"),he(me,pe,Me,"#","\\#"),he(ce,pe,Me,"#","\\#"),he(me,pe,Me,"&","\\&"),he(ce,pe,Me,"&","\\&"),he(me,pe,Me,"ℵ","\\aleph",!0),he(me,pe,Me,"∀","\\forall",!0),he(me,pe,Me,"ℏ","\\hbar",!0),he(me,pe,Me,"∃","\\exists",!0),he(me,pe,Me,"∇","\\nabla",!0),he(me,pe,Me,"♭","\\flat",!0),he(me,pe,Me,"ℓ","\\ell",!0),he(me,pe,Me,"♮","\\natural",!0),he(me,pe,Me,"♣","\\clubsuit",!0),he(me,pe,Me,"℘","\\wp",!0),he(me,pe,Me,"♯","\\sharp",!0),he(me,pe,Me,"♢","\\diamondsuit",!0),he(me,pe,Me,"ℜ","\\Re",!0),he(me,pe,Me,"♡","\\heartsuit",!0),he(me,pe,Me,"ℑ","\\Im",!0),he(me,pe,Me,"♠","\\spadesuit",!0),he(me,pe,Me,"§","\\S",!0),he(ce,pe,Me,"§","\\S"),he(me,pe,Me,"¶","\\P",!0),he(ce,pe,Me,"¶","\\P"),he(me,pe,Me,"†","\\dag"),he(ce,pe,Me,"†","\\dag"),he(ce,pe,Me,"†","\\textdagger"),he(me,pe,Me,"‡","\\ddag"),he(ce,pe,Me,"‡","\\ddag"),he(ce,pe,Me,"‡","\\textdaggerdbl"),he(me,pe,fe,"⎱","\\rmoustache",!0),he(me,pe,xe,"⎰","\\lmoustache",!0),he(me,pe,fe,"⟯","\\rgroup",!0),he(me,pe,xe,"⟮","\\lgroup",!0),he(me,pe,ge,"∓","\\mp",!0),he(me,pe,ge,"⊖","\\ominus",!0),he(me,pe,ge,"⊎","\\uplus",!0),he(me,pe,ge,"⊓","\\sqcap",!0),he(me,pe,ge,"∗","\\ast"),he(me,pe,ge,"⊔","\\sqcup",!0),he(me,pe,ge,"◯","\\bigcirc",!0),he(me,pe,ge,"∙","\\bullet",!0),he(me,pe,ge,"‡","\\ddagger"),he(me,pe,ge,"≀","\\wr",!0),he(me,pe,ge,"⨿","\\amalg"),he(me,pe,ge,"&","\\And"),he(me,pe,ke,"⟵","\\longleftarrow",!0),he(me,pe,ke,"⇐","\\Leftarrow",!0),he(me,pe,ke,"⟸","\\Longleftarrow",!0),he(me,pe,ke,"⟶","\\longrightarrow",!0),he(me,pe,ke,"⇒","\\Rightarrow",!0),he(me,pe,ke,"⟹","\\Longrightarrow",!0),he(me,pe,ke,"↔","\\leftrightarrow",!0),he(me,pe,ke,"⟷","\\longleftrightarrow",!0),he(me,pe,ke,"⇔","\\Leftrightarrow",!0),he(me,pe,ke,"⟺","\\Longleftrightarrow",!0),he(me,pe,ke,"↦","\\mapsto",!0),he(me,pe,ke,"⟼","\\longmapsto",!0),he(me,pe,ke,"↗","\\nearrow",!0),he(me,pe,ke,"↩","\\hookleftarrow",!0),he(me,pe,ke,"↪","\\hookrightarrow",!0),he(me,pe,ke,"↘","\\searrow",!0),he(me,pe,ke,"↼","\\leftharpoonup",!0),he(me,pe,ke,"⇀","\\rightharpoonup",!0),he(me,pe,ke,"↙","\\swarrow",!0),he(me,pe,ke,"↽","\\leftharpoondown",!0),he(me,pe,ke,"⇁","\\rightharpoondown",!0),he(me,pe,ke,"↖","\\nwarrow",!0),he(me,pe,ke,"⇌","\\rightleftharpoons",!0),he(me,ue,ke,"≮","\\nless",!0),he(me,ue,ke,"","\\@nleqslant"),he(me,ue,ke,"","\\@nleqq"),he(me,ue,ke,"⪇","\\lneq",!0),he(me,ue,ke,"≨","\\lneqq",!0),he(me,ue,ke,"","\\@lvertneqq"),he(me,ue,ke,"⋦","\\lnsim",!0),he(me,ue,ke,"⪉","\\lnapprox",!0),he(me,ue,ke,"⊀","\\nprec",!0),he(me,ue,ke,"⋠","\\npreceq",!0),he(me,ue,ke,"⋨","\\precnsim",!0),he(me,ue,ke,"⪹","\\precnapprox",!0),he(me,ue,ke,"≁","\\nsim",!0),he(me,ue,ke,"","\\@nshortmid"),he(me,ue,ke,"∤","\\nmid",!0),he(me,ue,ke,"⊬","\\nvdash",!0),he(me,ue,ke,"⊭","\\nvDash",!0),he(me,ue,ke,"⋪","\\ntriangleleft"),he(me,ue,ke,"⋬","\\ntrianglelefteq",!0),he(me,ue,ke,"⊊","\\subsetneq",!0),he(me,ue,ke,"","\\@varsubsetneq"),he(me,ue,ke,"⫋","\\subsetneqq",!0),he(me,ue,ke,"","\\@varsubsetneqq"),he(me,ue,ke,"≯","\\ngtr",!0),he(me,ue,ke,"","\\@ngeqslant"),he(me,ue,ke,"","\\@ngeqq"),he(me,ue,ke,"⪈","\\gneq",!0),he(me,ue,ke,"≩","\\gneqq",!0),he(me,ue,ke,"","\\@gvertneqq"),he(me,ue,ke,"⋧","\\gnsim",!0),he(me,ue,ke,"⪊","\\gnapprox",!0),he(me,ue,ke,"⊁","\\nsucc",!0),he(me,ue,ke,"⋡","\\nsucceq",!0),he(me,ue,ke,"⋩","\\succnsim",!0),he(me,ue,ke,"⪺","\\succnapprox",!0),he(me,ue,ke,"≆","\\ncong",!0),he(me,ue,ke,"","\\@nshortparallel"),he(me,ue,ke,"∦","\\nparallel",!0),he(me,ue,ke,"⊯","\\nVDash",!0),he(me,ue,ke,"⋫","\\ntriangleright"),he(me,ue,ke,"⋭","\\ntrianglerighteq",!0),he(me,ue,ke,"","\\@nsupseteqq"),he(me,ue,ke,"⊋","\\supsetneq",!0),he(me,ue,ke,"","\\@varsupsetneq"),he(me,ue,ke,"⫌","\\supsetneqq",!0),he(me,ue,ke,"","\\@varsupsetneqq"),he(me,ue,ke,"⊮","\\nVdash",!0),he(me,ue,ke,"⪵","\\precneqq",!0),he(me,ue,ke,"⪶","\\succneqq",!0),he(me,ue,ke,"","\\@nsubseteqq"),he(me,ue,ge,"⊴","\\unlhd"),he(me,ue,ge,"⊵","\\unrhd"),he(me,ue,ke,"↚","\\nleftarrow",!0),he(me,ue,ke,"↛","\\nrightarrow",!0),he(me,ue,ke,"⇍","\\nLeftarrow",!0),he(me,ue,ke,"⇏","\\nRightarrow",!0),he(me,ue,ke,"↮","\\nleftrightarrow",!0),he(me,ue,ke,"⇎","\\nLeftrightarrow",!0),he(me,ue,ke,"△","\\vartriangle"),he(me,ue,Me,"ℏ","\\hslash"),he(me,ue,Me,"▽","\\triangledown"),he(me,ue,Me,"◊","\\lozenge"),he(me,ue,Me,"Ⓢ","\\circledS"),he(me,ue,Me,"®","\\circledR"),he(ce,ue,Me,"®","\\circledR"),he(me,ue,Me,"∡","\\measuredangle",!0),he(me,ue,Me,"∄","\\nexists"),he(me,ue,Me,"℧","\\mho"),he(me,ue,Me,"Ⅎ","\\Finv",!0),he(me,ue,Me,"⅁","\\Game",!0),he(me,ue,Me,"‵","\\backprime"),he(me,ue,Me,"▲","\\blacktriangle"),he(me,ue,Me,"▼","\\blacktriangledown"),he(me,ue,Me,"■","\\blacksquare"),he(me,ue,Me,"⧫","\\blacklozenge"),he(me,ue,Me,"★","\\bigstar"),he(me,ue,Me,"∢","\\sphericalangle",!0),he(me,ue,Me,"∁","\\complement",!0),he(me,ue,Me,"ð","\\eth",!0),he(ce,pe,Me,"ð","ð"),he(me,ue,Me,"╱","\\diagup"),he(me,ue,Me,"╲","\\diagdown"),he(me,ue,Me,"□","\\square"),he(me,ue,Me,"□","\\Box"),he(me,ue,Me,"◊","\\Diamond"),he(me,ue,Me,"¥","\\yen",!0),he(ce,ue,Me,"¥","\\yen",!0),he(me,ue,Me,"✓","\\checkmark",!0),he(ce,ue,Me,"✓","\\checkmark"),he(me,ue,Me,"ℶ","\\beth",!0),he(me,ue,Me,"ℸ","\\daleth",!0),he(me,ue,Me,"ℷ","\\gimel",!0),he(me,ue,Me,"ϝ","\\digamma",!0),he(me,ue,Me,"ϰ","\\varkappa"),he(me,ue,xe,"┌","\\@ulcorner",!0),he(me,ue,fe,"┐","\\@urcorner",!0),he(me,ue,xe,"└","\\@llcorner",!0),he(me,ue,fe,"┘","\\@lrcorner",!0),he(me,ue,ke,"≦","\\leqq",!0),he(me,ue,ke,"⩽","\\leqslant",!0),he(me,ue,ke,"⪕","\\eqslantless",!0),he(me,ue,ke,"≲","\\lesssim",!0),he(me,ue,ke,"⪅","\\lessapprox",!0),he(me,ue,ke,"≊","\\approxeq",!0),he(me,ue,ge,"⋖","\\lessdot"),he(me,ue,ke,"⋘","\\lll",!0),he(me,ue,ke,"≶","\\lessgtr",!0),he(me,ue,ke,"⋚","\\lesseqgtr",!0),he(me,ue,ke,"⪋","\\lesseqqgtr",!0),he(me,ue,ke,"≑","\\doteqdot"),he(me,ue,ke,"≓","\\risingdotseq",!0),he(me,ue,ke,"≒","\\fallingdotseq",!0),he(me,ue,ke,"∽","\\backsim",!0),he(me,ue,ke,"⋍","\\backsimeq",!0),he(me,ue,ke,"⫅","\\subseteqq",!0),he(me,ue,ke,"⋐","\\Subset",!0),he(me,ue,ke,"⊏","\\sqsubset",!0),he(me,ue,ke,"≼","\\preccurlyeq",!0),he(me,ue,ke,"⋞","\\curlyeqprec",!0),he(me,ue,ke,"≾","\\precsim",!0),he(me,ue,ke,"⪷","\\precapprox",!0),he(me,ue,ke,"⊲","\\vartriangleleft"),he(me,ue,ke,"⊴","\\trianglelefteq"),he(me,ue,ke,"⊨","\\vDash",!0),he(me,ue,ke,"⊪","\\Vvdash",!0),he(me,ue,ke,"⌣","\\smallsmile"),he(me,ue,ke,"⌢","\\smallfrown"),he(me,ue,ke,"≏","\\bumpeq",!0),he(me,ue,ke,"≎","\\Bumpeq",!0),he(me,ue,ke,"≧","\\geqq",!0),he(me,ue,ke,"⩾","\\geqslant",!0),he(me,ue,ke,"⪖","\\eqslantgtr",!0),he(me,ue,ke,"≳","\\gtrsim",!0),he(me,ue,ke,"⪆","\\gtrapprox",!0),he(me,ue,ge,"⋗","\\gtrdot"),he(me,ue,ke,"⋙","\\ggg",!0),he(me,ue,ke,"≷","\\gtrless",!0),he(me,ue,ke,"⋛","\\gtreqless",!0),he(me,ue,ke,"⪌","\\gtreqqless",!0),he(me,ue,ke,"≖","\\eqcirc",!0),he(me,ue,ke,"≗","\\circeq",!0),he(me,ue,ke,"≜","\\triangleq",!0),he(me,ue,ke,"∼","\\thicksim"),he(me,ue,ke,"≈","\\thickapprox"),he(me,ue,ke,"⫆","\\supseteqq",!0),he(me,ue,ke,"⋑","\\Supset",!0),he(me,ue,ke,"⊐","\\sqsupset",!0),he(me,ue,ke,"≽","\\succcurlyeq",!0),he(me,ue,ke,"⋟","\\curlyeqsucc",!0),he(me,ue,ke,"≿","\\succsim",!0),he(me,ue,ke,"⪸","\\succapprox",!0),he(me,ue,ke,"⊳","\\vartriangleright"),he(me,ue,ke,"⊵","\\trianglerighteq"),he(me,ue,ke,"⊩","\\Vdash",!0),he(me,ue,ke,"∣","\\shortmid"),he(me,ue,ke,"∥","\\shortparallel"),he(me,ue,ke,"≬","\\between",!0),he(me,ue,ke,"⋔","\\pitchfork",!0),he(me,ue,ke,"∝","\\varpropto"),he(me,ue,ke,"◀","\\blacktriangleleft"),he(me,ue,ke,"∴","\\therefore",!0),he(me,ue,ke,"∍","\\backepsilon"),he(me,ue,ke,"▶","\\blacktriangleright"),he(me,ue,ke,"∵","\\because",!0),he(me,ue,ke,"⋘","\\llless"),he(me,ue,ke,"⋙","\\gggtr"),he(me,ue,ge,"⊲","\\lhd"),he(me,ue,ge,"⊳","\\rhd"),he(me,ue,ke,"≂","\\eqsim",!0),he(me,pe,ke,"⋈","\\Join"),he(me,ue,ke,"≑","\\Doteq",!0),he(me,ue,ge,"∔","\\dotplus",!0),he(me,ue,ge,"∖","\\smallsetminus"),he(me,ue,ge,"⋒","\\Cap",!0),he(me,ue,ge,"⋓","\\Cup",!0),he(me,ue,ge,"⩞","\\doublebarwedge",!0),he(me,ue,ge,"⊟","\\boxminus",!0),he(me,ue,ge,"⊞","\\boxplus",!0),he(me,ue,ge,"⋇","\\divideontimes",!0),he(me,ue,ge,"⋉","\\ltimes",!0),he(me,ue,ge,"⋊","\\rtimes",!0),he(me,ue,ge,"⋋","\\leftthreetimes",!0),he(me,ue,ge,"⋌","\\rightthreetimes",!0),he(me,ue,ge,"⋏","\\curlywedge",!0),he(me,ue,ge,"⋎","\\curlyvee",!0),he(me,ue,ge,"⊝","\\circleddash",!0),he(me,ue,ge,"⊛","\\circledast",!0),he(me,ue,ge,"⋅","\\centerdot"),he(me,ue,ge,"⊺","\\intercal",!0),he(me,ue,ge,"⋒","\\doublecap"),he(me,ue,ge,"⋓","\\doublecup"),he(me,ue,ge,"⊠","\\boxtimes",!0),he(me,ue,ke,"⇢","\\dashrightarrow",!0),he(me,ue,ke,"⇠","\\dashleftarrow",!0),he(me,ue,ke,"⇇","\\leftleftarrows",!0),he(me,ue,ke,"⇆","\\leftrightarrows",!0),he(me,ue,ke,"⇚","\\Lleftarrow",!0),he(me,ue,ke,"↞","\\twoheadleftarrow",!0),he(me,ue,ke,"↢","\\leftarrowtail",!0),he(me,ue,ke,"↫","\\looparrowleft",!0),he(me,ue,ke,"⇋","\\leftrightharpoons",!0),he(me,ue,ke,"↶","\\curvearrowleft",!0),he(me,ue,ke,"↺","\\circlearrowleft",!0),he(me,ue,ke,"↰","\\Lsh",!0),he(me,ue,ke,"⇈","\\upuparrows",!0),he(me,ue,ke,"↿","\\upharpoonleft",!0),he(me,ue,ke,"⇃","\\downharpoonleft",!0),he(me,pe,ke,"⊶","\\origof",!0),he(me,pe,ke,"⊷","\\imageof",!0),he(me,ue,ke,"⊸","\\multimap",!0),he(me,ue,ke,"↭","\\leftrightsquigarrow",!0),he(me,ue,ke,"⇉","\\rightrightarrows",!0),he(me,ue,ke,"⇄","\\rightleftarrows",!0),he(me,ue,ke,"↠","\\twoheadrightarrow",!0),he(me,ue,ke,"↣","\\rightarrowtail",!0),he(me,ue,ke,"↬","\\looparrowright",!0),he(me,ue,ke,"↷","\\curvearrowright",!0),he(me,ue,ke,"↻","\\circlearrowright",!0),he(me,ue,ke,"↱","\\Rsh",!0),he(me,ue,ke,"⇊","\\downdownarrows",!0),he(me,ue,ke,"↾","\\upharpoonright",!0),he(me,ue,ke,"⇂","\\downharpoonright",!0),he(me,ue,ke,"⇝","\\rightsquigarrow",!0),he(me,ue,ke,"⇝","\\leadsto"),he(me,ue,ke,"⇛","\\Rrightarrow",!0),he(me,ue,ke,"↾","\\restriction"),he(me,pe,Me,"‘","`"),he(me,pe,Me,"$","\\$"),he(ce,pe,Me,"$","\\$"),he(ce,pe,Me,"$","\\textdollar"),he(me,pe,Me,"%","\\%"),he(ce,pe,Me,"%","\\%"),he(me,pe,Me,"_","\\_"),he(ce,pe,Me,"_","\\_"),he(ce,pe,Me,"_","\\textunderscore"),he(me,pe,Me,"∠","\\angle",!0),he(me,pe,Me,"∞","\\infty",!0),he(me,pe,Me,"′","\\prime"),he(me,pe,Me,"△","\\triangle"),he(me,pe,Me,"Γ","\\Gamma",!0),he(me,pe,Me,"Δ","\\Delta",!0),he(me,pe,Me,"Θ","\\Theta",!0),he(me,pe,Me,"Λ","\\Lambda",!0),he(me,pe,Me,"Ξ","\\Xi",!0),he(me,pe,Me,"Π","\\Pi",!0),he(me,pe,Me,"Σ","\\Sigma",!0),he(me,pe,Me,"Υ","\\Upsilon",!0),he(me,pe,Me,"Φ","\\Phi",!0),he(me,pe,Me,"Ψ","\\Psi",!0),he(me,pe,Me,"Ω","\\Omega",!0),he(me,pe,Me,"A","Α"),he(me,pe,Me,"B","Β"),he(me,pe,Me,"E","Ε"),he(me,pe,Me,"Z","Ζ"),he(me,pe,Me,"H","Η"),he(me,pe,Me,"I","Ι"),he(me,pe,Me,"K","Κ"),he(me,pe,Me,"M","Μ"),he(me,pe,Me,"N","Ν"),he(me,pe,Me,"O","Ο"),he(me,pe,Me,"P","Ρ"),he(me,pe,Me,"T","Τ"),he(me,pe,Me,"X","Χ"),he(me,pe,Me,"¬","\\neg",!0),he(me,pe,Me,"¬","\\lnot"),he(me,pe,Me,"⊤","\\top"),he(me,pe,Me,"⊥","\\bot"),he(me,pe,Me,"∅","\\emptyset"),he(me,ue,Me,"∅","\\varnothing"),he(me,pe,be,"α","\\alpha",!0),he(me,pe,be,"β","\\beta",!0),he(me,pe,be,"γ","\\gamma",!0),he(me,pe,be,"δ","\\delta",!0),he(me,pe,be,"ϵ","\\epsilon",!0),he(me,pe,be,"ζ","\\zeta",!0),he(me,pe,be,"η","\\eta",!0),he(me,pe,be,"θ","\\theta",!0),he(me,pe,be,"ι","\\iota",!0),he(me,pe,be,"κ","\\kappa",!0),he(me,pe,be,"λ","\\lambda",!0),he(me,pe,be,"μ","\\mu",!0),he(me,pe,be,"ν","\\nu",!0),he(me,pe,be,"ξ","\\xi",!0),he(me,pe,be,"ο","\\omicron",!0),he(me,pe,be,"π","\\pi",!0),he(me,pe,be,"ρ","\\rho",!0),he(me,pe,be,"σ","\\sigma",!0),he(me,pe,be,"τ","\\tau",!0),he(me,pe,be,"υ","\\upsilon",!0),he(me,pe,be,"ϕ","\\phi",!0),he(me,pe,be,"χ","\\chi",!0),he(me,pe,be,"ψ","\\psi",!0),he(me,pe,be,"ω","\\omega",!0),he(me,pe,be,"ε","\\varepsilon",!0),he(me,pe,be,"ϑ","\\vartheta",!0),he(me,pe,be,"ϖ","\\varpi",!0),he(me,pe,be,"ϱ","\\varrho",!0),he(me,pe,be,"ς","\\varsigma",!0),he(me,pe,be,"φ","\\varphi",!0),he(me,pe,ge,"∗","*",!0),he(me,pe,ge,"+","+"),he(me,pe,ge,"−","-",!0),he(me,pe,ge,"⋅","\\cdot",!0),he(me,pe,ge,"∘","\\circ",!0),he(me,pe,ge,"÷","\\div",!0),he(me,pe,ge,"±","\\pm",!0),he(me,pe,ge,"×","\\times",!0),he(me,pe,ge,"∩","\\cap",!0),he(me,pe,ge,"∪","\\cup",!0),he(me,pe,ge,"∖","\\setminus",!0),he(me,pe,ge,"∧","\\land"),he(me,pe,ge,"∨","\\lor"),he(me,pe,ge,"∧","\\wedge",!0),he(me,pe,ge,"∨","\\vee",!0),he(me,pe,Me,"√","\\surd"),he(me,pe,xe,"⟨","\\langle",!0),he(me,pe,xe,"∣","\\lvert"),he(me,pe,xe,"∥","\\lVert"),he(me,pe,fe,"?","?"),he(me,pe,fe,"!","!"),he(me,pe,fe,"⟩","\\rangle",!0),he(me,pe,fe,"∣","\\rvert"),he(me,pe,fe,"∥","\\rVert"),he(me,pe,ke,"=","="),he(me,pe,ke,":",":"),he(me,pe,ke,"≈","\\approx",!0),he(me,pe,ke,"≅","\\cong",!0),he(me,pe,ke,"≥","\\ge"),he(me,pe,ke,"≥","\\geq",!0),he(me,pe,ke,"←","\\gets"),he(me,pe,ke,">","\\gt",!0),he(me,pe,ke,"∈","\\in",!0),he(me,pe,ke,"","\\@not"),he(me,pe,ke,"⊂","\\subset",!0),he(me,pe,ke,"⊃","\\supset",!0),he(me,pe,ke,"⊆","\\subseteq",!0),he(me,pe,ke,"⊇","\\supseteq",!0),he(me,ue,ke,"⊈","\\nsubseteq",!0),he(me,ue,ke,"⊉","\\nsupseteq",!0),he(me,pe,ke,"⊨","\\models"),he(me,pe,ke,"←","\\leftarrow",!0),he(me,pe,ke,"≤","\\le"),he(me,pe,ke,"≤","\\leq",!0),he(me,pe,ke,"<","\\lt",!0),he(me,pe,ke,"→","\\rightarrow",!0),he(me,pe,ke,"→","\\to"),he(me,ue,ke,"≱","\\ngeq",!0),he(me,ue,ke,"≰","\\nleq",!0),he(me,pe,Se," ","\\ "),he(me,pe,Se," ","\\space"),he(me,pe,Se," ","\\nobreakspace"),he(ce,pe,Se," ","\\ "),he(ce,pe,Se," "," "),he(ce,pe,Se," ","\\space"),he(ce,pe,Se," ","\\nobreakspace"),he(me,pe,Se,null,"\\nobreak"),he(me,pe,Se,null,"\\allowbreak"),he(me,pe,we,",",","),he(me,pe,we,";",";"),he(me,ue,ge,"⊼","\\barwedge",!0),he(me,ue,ge,"⊻","\\veebar",!0),he(me,pe,ge,"⊙","\\odot",!0),he(me,pe,ge,"⊕","\\oplus",!0),he(me,pe,ge,"⊗","\\otimes",!0),he(me,pe,Me,"∂","\\partial",!0),he(me,pe,ge,"⊘","\\oslash",!0),he(me,ue,ge,"⊚","\\circledcirc",!0),he(me,ue,ge,"⊡","\\boxdot",!0),he(me,pe,ge,"△","\\bigtriangleup"),he(me,pe,ge,"▽","\\bigtriangledown"),he(me,pe,ge,"†","\\dagger"),he(me,pe,ge,"⋄","\\diamond"),he(me,pe,ge,"⋆","\\star"),he(me,pe,ge,"◃","\\triangleleft"),he(me,pe,ge,"▹","\\triangleright"),he(me,pe,xe,"{","\\{"),he(ce,pe,Me,"{","\\{"),he(ce,pe,Me,"{","\\textbraceleft"),he(me,pe,fe,"}","\\}"),he(ce,pe,Me,"}","\\}"),he(ce,pe,Me,"}","\\textbraceright"),he(me,pe,xe,"{","\\lbrace"),he(me,pe,fe,"}","\\rbrace"),he(me,pe,xe,"[","\\lbrack",!0),he(ce,pe,Me,"[","\\lbrack",!0),he(me,pe,fe,"]","\\rbrack",!0),he(ce,pe,Me,"]","\\rbrack",!0),he(me,pe,xe,"(","\\lparen",!0),he(me,pe,fe,")","\\rparen",!0),he(ce,pe,Me,"<","\\textless",!0),he(ce,pe,Me,">","\\textgreater",!0),he(me,pe,xe,"⌊","\\lfloor",!0),he(me,pe,fe,"⌋","\\rfloor",!0),he(me,pe,xe,"⌈","\\lceil",!0),he(me,pe,fe,"⌉","\\rceil",!0),he(me,pe,Me,"\\","\\backslash"),he(me,pe,Me,"∣","|"),he(me,pe,Me,"∣","\\vert"),he(ce,pe,Me,"|","\\textbar",!0),he(me,pe,Me,"∥","\\|"),he(me,pe,Me,"∥","\\Vert"),he(ce,pe,Me,"∥","\\textbardbl"),he(ce,pe,Me,"~","\\textasciitilde"),he(ce,pe,Me,"\\","\\textbackslash"),he(ce,pe,Me,"^","\\textasciicircum"),he(me,pe,ke,"↑","\\uparrow",!0),he(me,pe,ke,"⇑","\\Uparrow",!0),he(me,pe,ke,"↓","\\downarrow",!0),he(me,pe,ke,"⇓","\\Downarrow",!0),he(me,pe,ke,"↕","\\updownarrow",!0),he(me,pe,ke,"⇕","\\Updownarrow",!0),he(me,pe,ye,"∐","\\coprod"),he(me,pe,ye,"⋁","\\bigvee"),he(me,pe,ye,"⋀","\\bigwedge"),he(me,pe,ye,"⨄","\\biguplus"),he(me,pe,ye,"⋂","\\bigcap"),he(me,pe,ye,"⋃","\\bigcup"),he(me,pe,ye,"∫","\\int"),he(me,pe,ye,"∫","\\intop"),he(me,pe,ye,"∬","\\iint"),he(me,pe,ye,"∭","\\iiint"),he(me,pe,ye,"∏","\\prod"),he(me,pe,ye,"∑","\\sum"),he(me,pe,ye,"⨂","\\bigotimes"),he(me,pe,ye,"⨁","\\bigoplus"),he(me,pe,ye,"⨀","\\bigodot"),he(me,pe,ye,"∮","\\oint"),he(me,pe,ye,"∯","\\oiint"),he(me,pe,ye,"∰","\\oiiint"),he(me,pe,ye,"⨆","\\bigsqcup"),he(me,pe,ye,"∫","\\smallint"),he(ce,pe,ve,"…","\\textellipsis"),he(me,pe,ve,"…","\\mathellipsis"),he(ce,pe,ve,"…","\\ldots",!0),he(me,pe,ve,"…","\\ldots",!0),he(me,pe,ve,"⋯","\\@cdots",!0),he(me,pe,ve,"⋱","\\ddots",!0),he(me,pe,Me,"⋮","\\varvdots"),he(ce,pe,Me,"⋮","\\varvdots"),he(me,pe,de,"ˊ","\\acute"),he(me,pe,de,"ˋ","\\grave"),he(me,pe,de,"¨","\\ddot"),he(me,pe,de,"~","\\tilde"),he(me,pe,de,"ˉ","\\bar"),he(me,pe,de,"˘","\\breve"),he(me,pe,de,"ˇ","\\check"),he(me,pe,de,"^","\\hat"),he(me,pe,de,"⃗","\\vec"),he(me,pe,de,"˙","\\dot"),he(me,pe,de,"˚","\\mathring"),he(me,pe,be,"","\\@imath"),he(me,pe,be,"","\\@jmath"),he(me,pe,Me,"ı","ı"),he(me,pe,Me,"ȷ","ȷ"),he(ce,pe,Me,"ı","\\i",!0),he(ce,pe,Me,"ȷ","\\j",!0),he(ce,pe,Me,"ß","\\ss",!0),he(ce,pe,Me,"æ","\\ae",!0),he(ce,pe,Me,"œ","\\oe",!0),he(ce,pe,Me,"ø","\\o",!0),he(ce,pe,Me,"Æ","\\AE",!0),he(ce,pe,Me,"Œ","\\OE",!0),he(ce,pe,Me,"Ø","\\O",!0),he(ce,pe,de,"ˊ","\\'"),he(ce,pe,de,"ˋ","\\`"),he(ce,pe,de,"ˆ","\\^"),he(ce,pe,de,"˜","\\~"),he(ce,pe,de,"ˉ","\\="),he(ce,pe,de,"˘","\\u"),he(ce,pe,de,"˙","\\."),he(ce,pe,de,"¸","\\c"),he(ce,pe,de,"˚","\\r"),he(ce,pe,de,"ˇ","\\v"),he(ce,pe,de,"¨",'\\"'),he(ce,pe,de,"˝","\\H"),he(ce,pe,de,"◯","\\textcircled");var ze={"--":!0,"---":!0,"``":!0,"''":!0};he(ce,pe,Me,"–","--",!0),he(ce,pe,Me,"–","\\textendash"),he(ce,pe,Me,"—","---",!0),he(ce,pe,Me,"—","\\textemdash"),he(ce,pe,Me,"‘","`",!0),he(ce,pe,Me,"‘","\\textquoteleft"),he(ce,pe,Me,"’","'",!0),he(ce,pe,Me,"’","\\textquoteright"),he(ce,pe,Me,"“","``",!0),he(ce,pe,Me,"“","\\textquotedblleft"),he(ce,pe,Me,"”","''",!0),he(ce,pe,Me,"”","\\textquotedblright"),he(me,pe,Me,"°","\\degree",!0),he(ce,pe,Me,"°","\\degree"),he(ce,pe,Me,"°","\\textdegree",!0),he(me,pe,Me,"£","\\pounds"),he(me,pe,Me,"£","\\mathsterling",!0),he(ce,pe,Me,"£","\\pounds"),he(ce,pe,Me,"£","\\textsterling",!0),he(me,ue,Me,"✠","\\maltese"),he(ce,ue,Me,"✠","\\maltese");for(var Ae=0;Ae<14;Ae++){var Te='0123456789/@."'.charAt(Ae);he(me,pe,Me,Te,Te)}for(var Be=0;Be<25;Be++){var Ne='0123456789!@*()-=+";:?/.,'.charAt(Be);he(ce,pe,Me,Ne,Ne)}for(var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",qe=0;qe<52;qe++){var Ie=Ce.charAt(qe);he(me,pe,be,Ie,Ie),he(ce,pe,Me,Ie,Ie)}he(me,ue,Me,"C","ℂ"),he(ce,ue,Me,"C","ℂ"),he(me,ue,Me,"H","ℍ"),he(ce,ue,Me,"H","ℍ"),he(me,ue,Me,"N","ℕ"),he(ce,ue,Me,"N","ℕ"),he(me,ue,Me,"P","ℙ"),he(ce,ue,Me,"P","ℙ"),he(me,ue,Me,"Q","ℚ"),he(ce,ue,Me,"Q","ℚ"),he(me,ue,Me,"R","ℝ"),he(ce,ue,Me,"R","ℝ"),he(me,ue,Me,"Z","ℤ"),he(ce,ue,Me,"Z","ℤ"),he(me,pe,be,"h","ℎ"),he(ce,pe,be,"h","ℎ");for(var Re="",He=0;He<52;He++){var Oe=Ce.charAt(He);he(me,pe,be,Oe,Re=String.fromCharCode(55349,56320+He)),he(ce,pe,Me,Oe,Re),he(me,pe,be,Oe,Re=String.fromCharCode(55349,56372+He)),he(ce,pe,Me,Oe,Re),he(me,pe,be,Oe,Re=String.fromCharCode(55349,56424+He)),he(ce,pe,Me,Oe,Re),he(me,pe,be,Oe,Re=String.fromCharCode(55349,56580+He)),he(ce,pe,Me,Oe,Re),he(me,pe,be,Oe,Re=String.fromCharCode(55349,56684+He)),he(ce,pe,Me,Oe,Re),he(me,pe,be,Oe,Re=String.fromCharCode(55349,56736+He)),he(ce,pe,Me,Oe,Re),he(me,pe,be,Oe,Re=String.fromCharCode(55349,56788+He)),he(ce,pe,Me,Oe,Re),he(me,pe,be,Oe,Re=String.fromCharCode(55349,56840+He)),he(ce,pe,Me,Oe,Re),he(me,pe,be,Oe,Re=String.fromCharCode(55349,56944+He)),he(ce,pe,Me,Oe,Re),He<26&&(he(me,pe,be,Oe,Re=String.fromCharCode(55349,56632+He)),he(ce,pe,Me,Oe,Re),he(me,pe,be,Oe,Re=String.fromCharCode(55349,56476+He)),he(ce,pe,Me,Oe,Re))}he(me,pe,be,"k",Re=String.fromCharCode(55349,56668)),he(ce,pe,Me,"k",Re);for(var Ee=0;Ee<10;Ee++){var Le=Ee.toString();he(me,pe,be,Le,Re=String.fromCharCode(55349,57294+Ee)),he(ce,pe,Me,Le,Re),he(me,pe,be,Le,Re=String.fromCharCode(55349,57314+Ee)),he(ce,pe,Me,Le,Re),he(me,pe,be,Le,Re=String.fromCharCode(55349,57324+Ee)),he(ce,pe,Me,Le,Re),he(me,pe,be,Le,Re=String.fromCharCode(55349,57334+Ee)),he(ce,pe,Me,Le,Re)}for(var De=0;De<3;De++){var Pe="ÐÞþ".charAt(De);he(me,pe,be,Pe,Pe),he(ce,pe,Me,Pe,Pe)}var Ve=[["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"]],Fe=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ge=function(e,t,r){return le[r][e]&&le[r][e].replace&&(e=le[r][e].replace),{value:e,metrics:O(e,t,r)}},Ue=function(e,t,r,a,n){var i,o=Ge(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||a&&"mathit"===a.font)&&(l=0),i=new te(e,s.height,s.depth,l,s.skew,s.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new te(e,0,0,0,0,0,n);if(a){i.maxFontSize=a.sizeMultiplier,a.style.isTight()&&i.classes.push("mtight");var h=a.getColor();h&&(i.style.color=h)}return i},Ye=(e,t)=>{if(W(e.classes)!==W(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var a in e.style)if(e.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},Xe=function(e){for(var t=0,r=0,a=0,n=0;nt&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=a},We=function(e,t,r,a){var n=new K(e,t,r,a);return Xe(n),n},_e=(e,t,r,a)=>new K(e,t,r,a),$e=function(e){var t=new q(e);return Xe(t),t},je=function(e,t,r){var a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return a+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Ze={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"}},Ke={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Je={fontMap:Ze,makeSymbol:Ue,mathsym:function(e,t,r,a){return void 0===a&&(a=[]),"boldsymbol"===r.font&&Ge(e,"Main-Bold",t).metrics?Ue(e,"Main-Bold",t,r,a.concat(["mathbf"])):"\\"===e||"main"===le[t][e].font?Ue(e,"Main-Regular",t,r,a):Ue(e,"AMS-Regular",t,r,a.concat(["amsrm"]))},makeSpan:We,makeSvgSpan:_e,makeLineSpan:function(e,t,r){var a=We([e],[],t);return a.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),a.style.borderBottomWidth=X(a.height),a.maxFontSize=1,a},makeAnchor:function(e,t,r,a){var n=new J(e,t,r,a);return Xe(n),n},makeFragment:$e,wrapFragment:function(e,t){return e instanceof q?We([],[e],t):e},makeVList:function(e,t){for(var{children:r,depth:a}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],a=-t[0].shift-t[0].elem.depth,n=a,i=1;i0)return Ue(i,h,n,t,o.concat(m));if(l){var c,p;if("boldsymbol"===l){var u=function(e,t,r,a,n){return"textord"!==n&&Ge(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,n,0,0,r);c=u.fontName,p=[u.fontClass]}else s?(c=Ze[l].fontName,p=[l]):(c=je(l,t.fontWeight,t.fontShape),p=[l,t.fontWeight,t.fontShape]);if(Ge(i,c,n).metrics)return Ue(i,c,n,t,o.concat(p));if(ze.hasOwnProperty(i)&&"Typewriter"===c.slice(0,10)){for(var d=[],g=0;g{var r=We(["mspace"],[],t),a=Y(e,t);return r.style.marginRight=X(a),r},staticSvg:function(e,t){var[r,a,n]=Ke[e],i=new ae(r),o=new re([i],{width:X(a),height:X(n),style:"width:"+X(a),viewBox:"0 0 "+1e3*a+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),s=_e(["overlay"],[o],t);return s.height=n,s.style.height=X(n),s.style.width=X(a),s},svgData:Ke,tryCombineChars:e=>{for(var t=0;t{var r=t.classes[0],a=e.classes[0];"mbin"===r&&l(ut,a)?t.classes[0]="mord":"mbin"===a&&l(pt,r)&&(e.classes[0]="mord")}),{node:c},p,u),vt(n,((e,t)=>{var r=xt(t),a=xt(e),n=r&&a?e.hasClass("mtight")?at[r][a]:rt[r][a]:null;if(n)return Je.makeGlue(n,h)}),{node:c},p,u),n},vt=function e(t,r,a,n,i){n&&t.push(n);for(var o=0;or=>{t.splice(e+1,0,r),o++})(o)}}n&&t.pop()},bt=function(e){return e instanceof q||e instanceof J||e instanceof K&&e.hasClass("enclosing")?e:null},yt=function e(t,r){var a=bt(t);if(a){var n=a.children;if(n.length){if("right"===r)return e(n[n.length-1],"right");if("left"===r)return e(n[0],"left")}}return t},xt=function(e,t){return e?(t&&(e=yt(e,t)),gt[e.classes[0]]||null):null},wt=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return ct(t.concat(r))},kt=function(e,t,r){if(!e)return ct();if(it[e.type]){var n=it[e.type](e,t);if(r&&t.size!==r.size){n=ct(t.sizingClasses(r),[n],t);var i=t.sizeMultiplier/r.sizeMultiplier;n.height*=i,n.depth*=i}return n}throw new a("Got group of unknown type: '"+e.type+"'")};function St(e,t){var r=ct(["base"],e,t),a=ct(["strut"]);return a.style.height=X(r.height+r.depth),r.depth&&(a.style.verticalAlign=X(-r.depth)),r.children.unshift(a),r}function Mt(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var a,n=ft(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(a=n.pop());for(var i,o=[],s=[],l=0;l0&&(o.push(St(s,t)),s=[]),o.push(n[l]));s.length>0&&o.push(St(s,t)),r?((i=St(ft(r,t,!0))).classes=["tag"],o.push(i)):a&&o.push(a);var m=ct(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=X(m.height+m.depth),m.depth&&(c.style.verticalAlign=X(-m.depth))}return m}function zt(e){return new q(e)}class At{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=W(this.classes));for(var r=0;r0&&(e+=' class ="'+m(W(this.classes))+'"'),e+=">";for(var r=0;r"}toText(){return this.children.map((e=>e.toText())).join("")}}class Tt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return m(this.toText())}toText(){return this.text}}var Bt={MathNode:At,TextNode:Tt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",X(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},newDocumentFragment:zt},Nt=function(e,t,r){return!le[t][e]||!le[t][e].replace||55349===e.charCodeAt(0)||ze.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=le[t][e].replace),new Bt.TextNode(e)},Ct=function(e){return 1===e.length?e[0]:new Bt.MathNode("mrow",e)},qt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var a=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.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 n=e.text;return l(["\\imath","\\jmath"],n)?null:(le[a][n]&&le[a][n].replace&&(n=le[a][n].replace),O(n,Je.fontMap[r].fontName,a)?Je.fontMap[r].variant:null)};function It(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Tt&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var r=e.children[0];return r instanceof Tt&&","===r.text}return!1}var Rt=function(e,t,r){if(1===e.length){var a=Ot(e[0],t);return r&&a instanceof At&&"mo"===a.type&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var n,i=[],o=0;o=1&&("mn"===n.type||It(n))){var l=s.children[0];l instanceof At&&"mn"===l.type&&(l.children=[...n.children,...l.children],i.pop())}else if("mi"===n.type&&1===n.children.length){var h=n.children[0];if(h instanceof Tt&&"̸"===h.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var m=s.children[0];m instanceof Tt&&m.text.length>0&&(m.text=m.text.slice(0,1)+"̸"+m.text.slice(1),i.pop())}}}i.push(s),n=s}return i},Ht=function(e,t,r){return Ct(Rt(e,t,r))},Ot=function(e,t){if(!e)return new Bt.MathNode("mrow");if(ot[e.type])return ot[e.type](e,t);throw new a("Got group of unknown type: '"+e.type+"'")};function Et(e,t,r,a,n){var i,o=Rt(e,r);i=1===o.length&&o[0]instanceof At&&l(["mrow","mtable"],o[0].type)?o[0]:new Bt.MathNode("mrow",o);var s=new Bt.MathNode("annotation",[new Bt.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var h=new Bt.MathNode("semantics",[i,s]),m=new Bt.MathNode("math",[h]);return m.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&m.setAttribute("display","block"),Je.makeSpan([n?"katex":"katex-mathml"],[m])}var Lt=function(e){return new V({style:e.displayMode?A.DISPLAY:A.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Dt=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Je.makeSpan(r,[e])}return e},Pt={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":"="},Vt={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]},Ft=function(e){var t=new Bt.MathNode("mo",[new Bt.TextNode(Pt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Gt=function(e,t){var{span:r,minWidth:a,height:n}=function(){var r=4e5,a=e.label.slice(1);if(l(["widehat","widecheck","widetilde","utilde"],a)){var n,i,o,s="ordgroup"===(d=e.base).type?d.body.length:1;if(s>5)"widehat"===a||"widecheck"===a?(n=420,r=2364,o=.42,i=a+"4"):(n=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][s];"widehat"===a||"widecheck"===a?(r=[0,1062,2364,2364,2364][h],n=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=a+h):(r=[0,600,1033,2339,2340][h],n=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var m=new ae(i),c=new re([m],{width:"100%",height:X(o),viewBox:"0 0 "+r+" "+n,preserveAspectRatio:"none"});return{span:Je.makeSvgSpan([],[c],t),minWidth:0,height:o}}var p,u,d,g=[],f=Vt[a],[v,b,y]=f,x=y/1e3,w=v.length;if(1===w)p=["hide-tail"],u=[f[3]];else if(2===w)p=["halfarrow-left","halfarrow-right"],u=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");p=["brace-left","brace-center","brace-right"],u=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k0&&(r.style.minWidth=X(a)),r};function Ut(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Yt(e){var t=Xt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Xt(e){return e&&("atom"===e.type||se.hasOwnProperty(e.type))?e:null}var Wt=(e,t)=>{var r,a,n;e&&"supsub"===e.type?(r=(a=Ut(e.base,"accent")).base,e.base=r,n=function(e){if(e instanceof K)return e;throw new Error("Expected span but got "+String(e)+".")}(kt(e,t)),e.base=a):r=(a=Ut(e,"accent")).base;var i=kt(r,t.havingCrampedStyle()),o=0;if(a.isShifty&&u(r)){var s=p(r);o=ie(kt(s,t.havingCrampedStyle())).skew}var l,h="\\c"===a.label,m=h?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(a.isStretchy)l=Gt(a,t),l=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+X(2*o)+")",marginLeft:X(2*o)}:void 0}]},t);else{var c,d;"\\vec"===a.label?(c=Je.staticSvg("vec",t),d=Je.svgData.vec[1]):((c=ie(c=Je.makeOrd({mode:a.mode,text:a.label},t,"textord"))).italic=0,d=c.width,h&&(m+=c.depth)),l=Je.makeSpan(["accent-body"],[c]);var g="\\textcircled"===a.label;g&&(l.classes.push("accent-full"),m=i.height);var f=o;g||(f-=d/2),l.style.left=X(f),"\\textcircled"===a.label&&(l.style.top=".2em"),l=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-m},{type:"elem",elem:l}]},t)}var v=Je.makeSpan(["mord","accent"],[l],t);return n?(n.children[0]=v,n.height=Math.max(v.height,n.height),n.classes[0]="mord",n):v},_t=(e,t)=>{var r=e.isStretchy?Ft(e.label):new Bt.MathNode("mo",[Nt(e.label,e.mode)]),a=new Bt.MathNode("mover",[Ot(e.base,t),r]);return a.setAttribute("accent","true"),a},$t=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));st({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=ht(t[0]),a=!$t.test(e.funcName),n=!a||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:n,base:r}},htmlBuilder:Wt,mathmlBuilder:_t}),st({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],a=e.parser.mode;return"math"===a&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Wt,mathmlBuilder:_t}),st({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:a,base:n}},htmlBuilder:(e,t)=>{var r=kt(e.base,t),a=Gt(e,t),n="\\utilde"===e.label?.12:0,i=Je.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]},t);return Je.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=Ft(e.label),a=new Bt.MathNode("munder",[Ot(e.base,t),r]);return a.setAttribute("accentunder","true"),a}});var jt=e=>{var t=new Bt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};st({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a,funcName:n}=e;return{type:"xArrow",mode:a.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,a=t.style,n=t.havingStyle(a.sup()),i=Je.wrapFragment(kt(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(a.sub()),(r=Je.wrapFragment(kt(e.below,n,t),t)).classes.push(o+"-arrow-pad"));var s,l=Gt(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]},t)}else s=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Je.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,a=Ft(e.label);if(a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=jt(Ot(e.body,t));if(e.below){var i=jt(Ot(e.below,t));r=new Bt.MathNode("munderover",[a,i,n])}else r=new Bt.MathNode("mover",[a,n])}else if(e.below){var o=jt(Ot(e.below,t));r=new Bt.MathNode("munder",[a,o])}else r=jt(),r=new Bt.MathNode("mover",[a,r]);return r}});var Zt=Je.makeSpan;function Kt(e,t){var r=ft(e.body,t,!0);return Zt([e.mclass],r,t)}function Jt(e,t){var r,a=Rt(e.body,t);return"minner"===e.mclass?r=new Bt.MathNode("mpadded",a):"mord"===e.mclass?e.isCharacterBox?(r=a[0]).type="mi":r=new Bt.MathNode("mi",a):(e.isCharacterBox?(r=a[0]).type="mo":r=new Bt.MathNode("mo",a),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}st({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+a.slice(5),body:mt(n),isCharacterBox:u(n)}},htmlBuilder:Kt,mathmlBuilder:Jt});var Qt=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};st({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:Qt(t[0]),body:mt(t[1]),isCharacterBox:u(t[1])}}}),st({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:a,funcName:n}=e,i=t[1],o=t[0];r="\\stackrel"!==n?Qt(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:mt(i)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:a.mode,mclass:r,body:[l],isCharacterBox:u(l)}},htmlBuilder:Kt,mathmlBuilder:Jt}),st({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:Qt(t[0]),body:mt(t[0])}},htmlBuilder(e,t){var r=ft(e.body,t,!0),a=Je.makeSpan([e.mclass],r,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var r=Rt(e.body,t),a=new Bt.MathNode("mstyle",r);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var er={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},tr=e=>"textord"===e.type&&"@"===e.text;function rr(e,t,r){var a=er[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:a,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[n],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);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"}}}st({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"cdlabel",mode:r.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),a=Je.wrapFragment(kt(e.label,r,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=X(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var r=new Bt.MathNode("mrow",[Ot(e.label,t)]);return(r=new Bt.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Bt.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),st({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=Je.wrapFragment(kt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new Bt.MathNode("mrow",[Ot(e.fragment,t)])}),st({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=Ut(t[0],"ordgroup").body,i="",o=0;o=1114111)throw new a("\\@char with invalid code point "+i);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var ar=(e,t)=>{var r=ft(e.body,t.withColor(e.color),!1);return Je.makeFragment(r)},nr=(e,t)=>{var r=Rt(e.body,t.withColor(e.color)),a=new Bt.MathNode("mstyle",r);return a.setAttribute("mathcolor",e.color),a};st({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,a=Ut(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:a,body:mt(n)}},htmlBuilder:ar,mathmlBuilder:nr}),st({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:a}=e,n=Ut(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var i=r.parseExpression(!0,a);return{type:"color",mode:r.mode,color:n,body:i}},htmlBuilder:ar,mathmlBuilder:nr}),st({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:a}=e,n="["===a.gullet.future().text?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&Ut(n,"size").value}},htmlBuilder(e,t){var r=Je.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=X(Y(e.size,t)))),r},mathmlBuilder(e,t){var r=new Bt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",X(Y(e.size,t)))),r}});var ir={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},or=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new a("Expected a control sequence",e);return t},sr=(e,t,r,a)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,a)};st({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(ir[n.text])return"\\global"!==r&&"\\\\globallong"!==r||(n.text=ir[n.text]),Ut(t.parseFunction(),"internal");throw new a("Invalid token after macro prefix",n)}}),st({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new a("Expected a control sequence",n);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new a('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new a('Argument number "'+n.text+'" out of order');s++,l.push([])}else{if("EOF"===n.text)throw new a("Expected a macro definition");l[s].push(n.text)}var{tokens:h}=t.gullet.consumeArg();return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(i,{tokens:h,numArgs:s,delimiters:l},r===ir[r]),{type:"internal",mode:t.mode}}}),st({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=or(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return sr(t,a,n,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),st({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=or(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return sr(t,a,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var lr=function(e,t,r){var a=O(le.math[e]&&le.math[e].replace||e,t,r);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return a},hr=function(e,t,r,a){var n=r.havingBaseStyle(t),i=Je.makeSpan(a.concat(n.sizingClasses(r)),[e],r),o=n.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=n.sizeMultiplier,i},mr=function(e,t,r){var a=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/a.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=X(n),e.height-=n,e.depth+=n},cr=function(e,t,r,a,n,i){var o=function(e,t,r,a){return Je.makeSymbol(e,"Size"+t+"-Regular",r,a)}(e,t,n,a),s=hr(Je.makeSpan(["delimsizing","size"+t],[o],a),A.TEXT,a,i);return r&&mr(s,a,A.TEXT),s},pr=function(e,t,r){return{type:"elem",elem:Je.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Je.makeSpan([],[Je.makeSymbol(e,t,r)])])}},ur=function(e,t,r){var a=I["Size4-Regular"][e.charCodeAt(0)]?I["Size4-Regular"][e.charCodeAt(0)][4]:I["Size1-Regular"][e.charCodeAt(0)][4],n=new ae("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new re([n],{width:X(a),height:X(t),style:"width:"+X(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Je.makeSvgSpan([],[i],r);return o.height=t,o.style.height=X(t),o.style.width=X(a),{type:"elem",elem:o}},dr={type:"kern",size:-.008},gr=["|","\\lvert","\\rvert","\\vert"],fr=["\\|","\\lVert","\\rVert","\\Vert"],vr=function(e,t,r,a,n,i){var o,s,h,m,c="",p=0;o=h=m=e,s=null;var u="Size1-Regular";"\\uparrow"===e?h=m="⏐":"\\Uparrow"===e?h=m="‖":"\\downarrow"===e?o=h="⏐":"\\Downarrow"===e?o=h="‖":"\\updownarrow"===e?(o="\\uparrow",h="⏐",m="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",h="‖",m="\\Downarrow"):l(gr,e)?(h="∣",c="vert",p=333):l(fr,e)?(h="∥",c="doublevert",p=556):"["===e||"\\lbrack"===e?(o="⎡",h="⎢",m="⎣",u="Size4-Regular",c="lbrack",p=667):"]"===e||"\\rbrack"===e?(o="⎤",h="⎥",m="⎦",u="Size4-Regular",c="rbrack",p=667):"\\lfloor"===e||"⌊"===e?(h=o="⎢",m="⎣",u="Size4-Regular",c="lfloor",p=667):"\\lceil"===e||"⌈"===e?(o="⎡",h=m="⎢",u="Size4-Regular",c="lceil",p=667):"\\rfloor"===e||"⌋"===e?(h=o="⎥",m="⎦",u="Size4-Regular",c="rfloor",p=667):"\\rceil"===e||"⌉"===e?(o="⎤",h=m="⎥",u="Size4-Regular",c="rceil",p=667):"("===e||"\\lparen"===e?(o="⎛",h="⎜",m="⎝",u="Size4-Regular",c="lparen",p=875):")"===e||"\\rparen"===e?(o="⎞",h="⎟",m="⎠",u="Size4-Regular",c="rparen",p=875):"\\{"===e||"\\lbrace"===e?(o="⎧",s="⎨",m="⎩",h="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",s="⎬",m="⎭",h="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",m="⎩",h="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",m="⎭",h="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",m="⎭",h="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",m="⎩",h="⎪",u="Size4-Regular");var d=lr(o,u,n),g=d.height+d.depth,f=lr(h,u,n),v=f.height+f.depth,b=lr(m,u,n),y=b.height+b.depth,x=0,w=1;if(null!==s){var k=lr(s,u,n);x=k.height+k.depth,w=2}var S=g+y+x,M=S+Math.max(0,Math.ceil((t-S)/(w*v)))*w*v,z=a.fontMetrics().axisHeight;r&&(z*=a.sizeMultiplier);var T=M/2-z,B=[];if(c.length>0){var N=M-g-y,C=Math.round(1e3*M),q=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(c,Math.round(1e3*N)),I=new ae(c,q),R=(p/1e3).toFixed(3)+"em",H=(C/1e3).toFixed(3)+"em",O=new re([I],{width:R,height:H,viewBox:"0 0 "+p+" "+C}),E=Je.makeSvgSpan([],[O],a);E.height=C/1e3,E.style.width=R,E.style.height=H,B.push({type:"elem",elem:E})}else{if(B.push(pr(m,u,n)),B.push(dr),null===s){var L=M-g-y+.016;B.push(ur(h,L,a))}else{var D=(M-g-y-x)/2+.016;B.push(ur(h,D,a)),B.push(dr),B.push(pr(s,u,n)),B.push(dr),B.push(ur(h,D,a))}B.push(dr),B.push(pr(o,u,n))}var P=a.havingBaseStyle(A.TEXT),V=Je.makeVList({positionType:"bottom",positionData:T,children:B},P);return hr(Je.makeSpan(["delimsizing","mult"],[V],P),A.TEXT,a,i)},br=.08,yr=function(e,t,r,a,n){var i=function(e,t,r){t*=1e3;var a="";switch(e){case"sqrtMain":a=function(e){return"M95,"+(622+e+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"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+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize1":a=function(e){return"M263,"+(601+e+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"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+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize2":a=function(e){return"M983 "+(10+e+80)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\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+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize3":a=function(e){return"M424,"+(2398+e+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"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+e)+" 80\nh400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize4":a=function(e){return"M473,"+(2713+e+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"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+e)+" 80h400000v"+(40+e)+"H1017.7z"}(t);break;case"sqrtTall":a=function(e,t,r){return"M702 "+(e+80)+"H400000"+(40+e)+"\nH742v"+(r-54-80-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+e)+"H742z"}(t,0,r)}return a}(e,a,r),o=new ae(e,i),s=new re([o],{width:"400em",height:X(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Je.makeSvgSpan(["hide-tail"],[s],n)},xr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],wr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],kr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Sr=[0,1.2,1.8,2.4,3],Mr=[{type:"small",style:A.SCRIPTSCRIPT},{type:"small",style:A.SCRIPT},{type:"small",style:A.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],zr=[{type:"small",style:A.SCRIPTSCRIPT},{type:"small",style:A.SCRIPT},{type:"small",style:A.TEXT},{type:"stack"}],Ar=[{type:"small",style:A.SCRIPTSCRIPT},{type:"small",style:A.SCRIPT},{type:"small",style:A.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Tr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Br=function(e,t,r,a){for(var n=Math.min(2,3-a.style.size);nt)return r[n]}return r[r.length-1]},Nr=function(e,t,r,a,n,i){var o;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),o=l(kr,e)?Mr:l(xr,e)?Ar:zr;var s=Br(e,t,o,a);return"small"===s.type?function(e,t,r,a,n,i){var o=Je.makeSymbol(e,"Main-Regular",n,a),s=hr(o,t,a,i);return r&&mr(s,a,t),s}(e,s.style,r,a,n,i):"large"===s.type?cr(e,s.size,r,a,n,i):vr(e,t,r,a,n,i)},Cr={sqrtImage:function(e,t){var r,a,n=t.havingBaseSizing(),i=Br("\\surd",e*n.sizeMultiplier,Ar,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),h=(1+s)/o,(r=yr("sqrtMain",l=(1+s+br)/o,m=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",a=.833/o):"large"===i.type?(m=1080*Sr[i.size],h=(Sr[i.size]+s)/o,l=(Sr[i.size]+s+br)/o,(r=yr("sqrtSize"+i.size,l,m,s,t)).style.minWidth="1.02em",a=1/o):(l=e+s+br,h=e+s,m=Math.floor(1e3*e+s)+80,(r=yr("sqrtTall",l,m,s,t)).style.minWidth="0.742em",a=1.056),r.height=h,r.style.height=X(l),{span:r,advanceWidth:a,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,n,i){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),l(xr,e)||l(kr,e))return cr(e,t,!1,r,n,i);if(l(wr,e))return vr(e,Sr[t],!1,r,n,i);throw new a("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:Sr,customSizedDelim:Nr,leftRightDelim:function(e,t,r,a,n,i){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,s=5/a.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return Nr(e,h,!0,a,n,i)}},qr={"\\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}},Ir=["(","\\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 Rr(e,t){var r=Xt(e);if(r&&l(Ir,r.text))return r;throw new a(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Hr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}st({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=Rr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:qr[e.funcName].size,mclass:qr[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?Je.makeSpan([e.mclass]):Cr.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Nt(e.delim,e.mode));var r=new Bt.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var a=X(Cr.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",a),r.setAttribute("maxsize",a),r}}),st({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Rr(t[0],e).text,color:r}}}),st({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Rr(t[0],e),a=e.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=Ut(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{Hr(e);for(var r,a,n=ft(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l{Hr(e);var r=Rt(e.body,t);if("."!==e.left){var a=new Bt.MathNode("mo",[Nt(e.left,e.mode)]);a.setAttribute("fence","true"),r.unshift(a)}if("."!==e.right){var n=new Bt.MathNode("mo",[Nt(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return Ct(r)}}),st({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Rr(t[0],e);if(!e.parser.leftrightDepth)throw new a("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=wt(t,[]);else{r=Cr.sizedDelim(e.delim,1,t,e.mode,[]);var a={delim:e.delim,options:t};r.isMiddle=a}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?Nt("|","text"):Nt(e.delim,e.mode),a=new Bt.MathNode("mo",[r]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Or=(e,t)=>{var r,a,n,i=Je.wrapFragment(kt(e.body,t),t),o=e.label.slice(1),s=t.sizeMultiplier,l=0,h=u(e.body);if("sout"===o)(r=Je.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,l=-.5*t.fontMetrics().xHeight;else if("phase"===o){var m=Y({number:.6,unit:"pt"},t),c=Y({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var p=i.height+i.depth+m+c;i.style.paddingLeft=X(p/2+m);var d=Math.floor(1e3*p*s),g="M400000 "+(a=d)+" H0 L"+a/2+" 0 l65 45 L145 "+(a-80)+" H400000z",f=new re([new ae("phase",g)],{width:"400em",height:X(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(r=Je.makeSvgSpan(["hide-tail"],[f],t)).style.height=X(p),l=i.depth+m+c}else{/cancel/.test(o)?h||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var v=0,b=0,y=0;/box/.test(o)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=v=t.fontMetrics().fboxsep+("colorbox"===o?0:y)):"angl"===o?(v=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-i.depth)):b=v=h?.2:0,r=function(e,t,r,a,n){var i,o=e.height+e.depth+r+a;if(/fbox|color|angl/.test(t)){if(i=Je.makeSpan(["stretchy",t],[],n),"fbox"===t){var s=n.color&&n.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new ne({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new ne({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new re(l,{width:"100%",height:X(o)});i=Je.makeSvgSpan([],[h],n)}return i.height=o,i.style.height=X(o),i}(i,o,v,b,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=X(y)):"angl"===o&&.049!==y&&(r.style.borderTopWidth=X(y),r.style.borderRightWidth=X(y)),l=i.depth+b,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)n=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:i,shift:0}]},t);else{var x=/cancel|phase/.test(o)?["svg-align"]:[];n=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:l,wrapperClasses:x}]},t)}return/cancel/.test(o)&&(n.height=i.height,n.depth=i.depth),/cancel/.test(o)&&!h?Je.makeSpan(["mord","cancel-lap"],[n],t):Je.makeSpan(["mord"],[n],t)},Er=(e,t)=>{var r=0,a=new Bt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Ot(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*r+"pt"),a.setAttribute("height","+"+2*r+"pt"),a.setAttribute("lspace",r+"pt"),a.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};st({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Ut(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:o}},htmlBuilder:Or,mathmlBuilder:Er}),st({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Ut(t[0],"color-token").color,o=Ut(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:Or,mathmlBuilder:Er}),st({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),st({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:Or,mathmlBuilder:Er}),st({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Lr={};function Dr(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l{if(!e.parser.settings.displayMode)throw new a("{"+e.envName+"} can be used only in display mode.")};function Ur(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Yr(e,t,n){var{hskipBeforeAndAfter:i,addJot:o,cols:s,arraystretch:l,colSeparationType:h,autoTag:m,singleRow:c,emptySingleRow:p,maxNumCols:u,leqno:d}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){var g=e.gullet.expandMacroAsText("\\arraystretch");if(null==g)l=1;else if(!(l=parseFloat(g))||l<0)throw new a("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var f=[],v=[f],b=[],y=[],x=null!=m?[]:void 0;function w(){m&&e.gullet.macros.set("\\@eqnsw","1",!0)}function k(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new r("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(Boolean(m)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(w(),y.push(Fr(e));;){var S=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),S={type:"ordgroup",mode:e.mode,body:S},n&&(S={type:"styling",mode:e.mode,style:n,body:[S]}),f.push(S);var M=e.fetch().text;if("&"===M){if(u&&f.length===u){if(c||h)throw new a("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===M){k(),1===f.length&&"styling"===S.type&&0===S.body[0].body.length&&(v.length>1||!p)&&v.pop(),y.length0&&(y+=.25),m.push({pos:y,isDashed:e[t]})}for(x(o[0]),r=0;r0&&(S<(B+=b)&&(S=B),B=0),e.addJot&&(S+=g),M.height=k,M.depth=S,y+=k,M.pos=y,y+=S+B,l[r]=M,x(o[r+1])}var N,C,q=y/2+t.fontMetrics().axisHeight,I=e.cols||[],R=[],H=[];if(e.tags&&e.tags.some((e=>e)))for(r=0;r=s)){var W=void 0;(n>0||e.hskipBeforeAndAfter)&&0!==(W=h(P.pregap,u))&&((N=Je.makeSpan(["arraycolsep"],[])).style.width=X(W),R.push(N));var _=[];for(r=0;r0){for(var K=Je.makeLineSpan("hline",t,c),J=Je.makeLineSpan("hdashline",t,c),Q=[{type:"elem",elem:l,shift:0}];m.length>0;){var ee=m.pop(),te=ee.pos-q;ee.isDashed?Q.push({type:"elem",elem:J,shift:te}):Q.push({type:"elem",elem:K,shift:te})}l=Je.makeVList({positionType:"individualShift",children:Q},t)}if(0===H.length)return Je.makeSpan(["mord"],[l],t);var re=Je.makeVList({positionType:"individualShift",children:H},t);return re=Je.makeSpan(["tag"],[re],t),Je.makeFragment([l,re])},_r={c:"center ",l:"left ",r:"right "},$r=function(e,t){for(var r=[],a=new Bt.MathNode("mtd",[],["mtr-glue"]),n=new Bt.MathNode("mtd",[],["mml-eqn-num"]),i=0;i0){var u=e.cols,d="",g=!1,f=0,v=u.length;"separator"===u[0].type&&(c+="top ",f=1),"separator"===u[u.length-1].type&&(c+="bottom ",v-=1);for(var b=f;b0?"left ":"",c+=S[S.length-1].length>0?"right ":"";for(var M=1;M-1?"alignat":"align",o="split"===e.envName,s=Yr(e.parser,{cols:n,addJot:!0,autoTag:o?void 0:Ur(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var m="",c=0;c0&&p&&(g=1),n[u]={type:"align",align:d,pregap:g,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};Dr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(Xt(t[0])?[t[0]]:Ut(t[0],"ordgroup").body).map((function(e){var t=Yt(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+t,e)})),n={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Yr(e.parser,n,Xr(e.envName))},htmlBuilder:Wr,mathmlBuilder:$r}),Dr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(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 o=Yr(e.parser,n,Xr(e.envName)),s=Math.max(0,...o.body.map((e=>e.length)));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Wr,mathmlBuilder:$r}),Dr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Yr(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Wr,mathmlBuilder:$r}),Dr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(Xt(t[0])?[t[0]]:Ut(t[0],"ordgroup").body).map((function(e){var t=Yt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new a("Unknown column alignment: "+t,e)}));if(r.length>1)throw new a("{subarray} can contain only one column");var n={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((n=Yr(e.parser,n,"script")).body.length>0&&n.body[0].length>1)throw new a("{subarray} can contain only one column");return n},htmlBuilder:Wr,mathmlBuilder:$r}),Dr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Yr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Xr(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Wr,mathmlBuilder:$r}),Dr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:jr,htmlBuilder:Wr,mathmlBuilder:$r}),Dr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){l(["gather","gather*"],e.envName)&&Gr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ur(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Yr(e.parser,t,"display")},htmlBuilder:Wr,mathmlBuilder:$r}),Dr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:jr,htmlBuilder:Wr,mathmlBuilder:$r}),Dr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Gr(e);var t={autoTag:Ur(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Yr(e.parser,t,"display")},htmlBuilder:Wr,mathmlBuilder:$r}),Dr({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Gr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new a("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var n,i,o=[],s=[o],l=0;l-1);else{if(!("<>AV".indexOf(p)>-1))throw new a('Expected one of "<>AV=|." after @',h[c]);for(var d=0;d<2;d++){for(var g=!0,f=c+1;f{var r=e.font,a=t.withFont(r);return kt(e.body,a)},Jr=(e,t)=>{var r=e.font,a=t.withFont(r);return Ot(e.body,a)},Qr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};st({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=ht(t[0]),i=a;return i in Qr&&(i=Qr[i]),{type:"font",mode:r.mode,font:i.slice(1),body:n}},htmlBuilder:Kr,mathmlBuilder:Jr}),st({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,a=t[0],n=u(a);return{type:"mclass",mode:r.mode,mclass:Qt(a),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}}),st({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a,breakOnTokenText:n}=e,{mode:i}=r,o=r.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+a.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:Kr,mathmlBuilder:Jr});var ea=(e,t)=>{var r=t;return"display"===e?r=r.id>=A.SCRIPT.id?r.text():A.DISPLAY:"text"===e&&r.size===A.DISPLAY.size?r=A.TEXT:"script"===e?r=A.SCRIPT:"scriptscript"===e&&(r=A.SCRIPTSCRIPT),r},ta=(e,t)=>{var r,a=ea(e.size,t.style),n=a.fracNum(),i=a.fracDen();r=t.havingStyle(n);var o=kt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(p=t.fontMetrics().num2,u=c):(p=t.fontMetrics().num3,u=3*c),d=t.fontMetrics().denom2),h){var x=t.fontMetrics().axisHeight;p-o.depth-(x+.5*m){var r=new Bt.MathNode("mfrac",[Ot(e.numer,t),Ot(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var a=Y(e.barSize,t);r.setAttribute("linethickness",X(a))}}else r.setAttribute("linethickness","0px");var n=ea(e.size,t.style);if(n.size!==t.style.size){r=new Bt.MathNode("mstyle",[r]);var i=n.size===A.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var s=new Bt.MathNode("mo",[new Bt.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(r),null!=e.rightDelim){var l=new Bt.MathNode("mo",[new Bt.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return Ct(o)}return r};st({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:a,funcName:n}=e,i=t[0],o=t[1],s=null,l=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:a.mode,continued:!1,numer:i,denom:o,hasBarLine:r,leftDelim:s,rightDelim:l,size:h,barSize:null}},htmlBuilder:ta,mathmlBuilder:ra}),st({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:n,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),st({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:a,token:n}=e;switch(a){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:n}}});var aa=["display","text","script","scriptscript"],na=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};st({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:a}=e,n=t[4],i=t[5],o=ht(t[0]),s="atom"===o.type&&"open"===o.family?na(o.text):null,l=ht(t[1]),h="atom"===l.type&&"close"===l.family?na(l.text):null,m=Ut(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var p="auto",u=t[3];if("ordgroup"===u.type){if(u.body.length>0){var d=Ut(u.body[0],"textord");p=aa[Number(d.text)]}}else u=Ut(u,"textord"),p=aa[Number(u.text)];return{type:"genfrac",mode:a.mode,numer:n,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h,size:p}},htmlBuilder:ta,mathmlBuilder:ra}),st({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:a,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Ut(t[0],"size").value,token:n}}}),st({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ut(t[1],"infix").size),o=t[2],s=i.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:ta,mathmlBuilder:ra});var ia=(e,t)=>{var r,a,n=t.style;"supsub"===e.type?(r=e.sup?kt(e.sup,t.havingStyle(n.sup()),t):kt(e.sub,t.havingStyle(n.sub()),t),a=Ut(e.base,"horizBrace")):a=Ut(e,"horizBrace");var i,o=kt(a.base,t.havingBaseStyle(A.DISPLAY)),s=Gt(a,t);if(a.isOver?(i=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Je.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Je.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t);i=a.isOver?Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Je.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Je.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t)};st({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"horizBrace",mode:r.mode,label:a,isOver:/^\\over/.test(a),base:t[0]}},htmlBuilder:ia,mathmlBuilder:(e,t)=>{var r=Ft(e.label);return new Bt.MathNode(e.isOver?"mover":"munder",[Ot(e.base,t),r])}}),st({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[1],n=Ut(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:mt(a)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=ft(e.body,t,!1);return Je.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Ht(e.body,t);return r instanceof At||(r=new At("mrow",[r])),r.setAttribute("href",e.href),r}}),st({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=Ut(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:a}))return r.formatUnsupportedCmd("\\url");for(var n=[],i=0;inew Bt.MathNode("mrow",Rt(e.body,t))}),st({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:n,funcName:i,token:o}=e,s=Ut(t[0],"raw").string,l=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h={};switch(i){case"\\htmlClass":h.class=s,r={command:"\\htmlClass",class:s};break;case"\\htmlId":h.id=s,r={command:"\\htmlId",id:s};break;case"\\htmlStyle":h.style=s,r={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var m=s.split(","),c=0;c{var r=ft(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var n=Je.makeSpan(a,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&n.setAttribute(i,e.attributes[i]);return n},mathmlBuilder:(e,t)=>Ht(e.body,t)}),st({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:mt(t[0]),mathml:mt(t[1])}},htmlBuilder:(e,t)=>{var r=ft(e.html,t,!1);return Je.makeFragment(r)},mathmlBuilder:(e,t)=>Ht(e.mathml,t)});var oa=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new a("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!U(r))throw new a("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};st({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=Ut(r[0],"raw").string.split(","),m=0;m{var r=Y(e.height,t),a=0;e.totalheight.number>0&&(a=Y(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=Y(e.width,t));var i={height:X(r+a)};n>0&&(i.width=X(n)),a>0&&(i.verticalAlign=X(-a));var o=new Q(e.src,e.alt,i);return o.height=r,o.depth=a,o},mathmlBuilder:(e,t)=>{var r=new Bt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var a=Y(e.height,t),n=0;if(e.totalheight.number>0&&(n=Y(e.totalheight,t)-a,r.setAttribute("valign",X(-n))),r.setAttribute("height",X(a+n)),e.width.number>0){var i=Y(e.width,t);r.setAttribute("width",X(i))}return r.setAttribute("src",e.src),r}}),st({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=Ut(t[0],"size");if(r.settings.strict){var i="m"===a[1],o="mu"===n.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+n.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder:(e,t)=>Je.makeGlue(e.dimension,t),mathmlBuilder(e,t){var r=Y(e.dimension,t);return new Bt.SpaceNode(r)}}),st({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:a.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=Je.makeSpan([],[kt(e.body,t)]),r=Je.makeSpan(["inner"],[r],t)):r=Je.makeSpan(["inner"],[kt(e.body,t)]);var a=Je.makeSpan(["fix"],[]),n=Je.makeSpan([e.alignment],[r,a],t),i=Je.makeSpan(["strut"]);return i.style.height=X(n.height+n.depth),n.depth&&(i.style.verticalAlign=X(-n.depth)),n.children.unshift(i),n=Je.makeSpan(["thinbox"],[n],t),Je.makeSpan(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new Bt.MathNode("mpadded",[Ot(e.body,t)]);if("rlap"!==e.alignment){var a="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",a+"width")}return r.setAttribute("width","0px"),r}}),st({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:a}=e,n=a.mode;a.switchMode("math");var i="\\("===r?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}}),st({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new a("Mismatched "+e.funcName)}});var sa=(e,t)=>{switch(t.style.size){case A.DISPLAY.size:return e.display;case A.TEXT.size:return e.text;case A.SCRIPT.size:return e.script;case A.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};st({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:mt(t[0]),text:mt(t[1]),script:mt(t[2]),scriptscript:mt(t[3])}},htmlBuilder:(e,t)=>{var r=sa(e,t),a=ft(r,t,!1);return Je.makeFragment(a)},mathmlBuilder:(e,t)=>{var r=sa(e,t);return Ht(r,t)}});var la=(e,t,r,a,n,i,o)=>{e=Je.makeSpan([],[e]);var s,l,h,m=r&&u(r);if(t){var c=kt(t,a.havingStyle(n.sup()),a);l={elem:c,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-c.depth)}}if(r){var p=kt(r,a.havingStyle(n.sub()),a);s={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-p.height)}}if(l&&s){var d=a.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;h=Je.makeVList({positionType:"bottom",positionData:d,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:X(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:X(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(s){var g=e.height-o;h=Je.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:X(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},a)}else{if(!l)return e;var f=e.depth+o;h=Je.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:X(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}var v=[h];if(s&&0!==i&&!m){var b=Je.makeSpan(["mspace"],[],a);b.style.marginRight=X(i),v.unshift(b)}return Je.makeSpan(["mop","op-limits"],v,a)},ha=["\\smallint"],ma=(e,t)=>{var r,a,n,i=!1;"supsub"===e.type?(r=e.sup,a=e.sub,n=Ut(e.base,"op"),i=!0):n=Ut(e,"op");var o,s=t.style,h=!1;if(s.size===A.DISPLAY.size&&n.symbol&&!l(ha,n.name)&&(h=!0),n.symbol){var m=h?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.slice(1),n.name="oiint"===c?"\\iint":"\\iiint"),o=Je.makeSymbol(n.name,m,"math",t,["mop","op-symbol",h?"large-op":"small-op"]),c.length>0){var p=o.italic,u=Je.staticSvg(c+"Size"+(h?"2":"1"),t);o=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:u,shift:h?.08:0}]},t),n.name="\\"+c,o.classes.unshift("mop"),o.italic=p}}else if(n.body){var d=ft(n.body,t,!0);1===d.length&&d[0]instanceof te?(o=d[0]).classes[0]="mop":o=Je.makeSpan(["mop"],d,t)}else{for(var g=[],f=1;f{var r;if(e.symbol)r=new At("mo",[Nt(e.name,e.mode)]),l(ha,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new At("mo",Rt(e.body,t));else{r=new At("mi",[new Tt(e.name.slice(1))]);var a=new At("mo",[Nt("⁡","text")]);r=e.parentIsSupSub?new At("mrow",[r,a]):zt([r,a])}return r},pa={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};st({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=a;return 1===n.length&&(n=pa[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:ma,mathmlBuilder:ca}),st({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:mt(a)}},htmlBuilder:ma,mathmlBuilder:ca});var ua={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};st({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ma,mathmlBuilder:ca}),st({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ma,mathmlBuilder:ca}),st({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,a=r;return 1===a.length&&(a=ua[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ma,mathmlBuilder:ca});var da=(e,t)=>{var r,a,n,i,o=!1;if("supsub"===e.type?(r=e.sup,a=e.sub,n=Ut(e.base,"operatorname"),o=!0):n=Ut(e,"operatorname"),n.body.length>0){for(var s=n.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=ft(s,t.withFont("mathrm"),!0),h=0;h{var{parser:r,funcName:a}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:mt(n),alwaysHandleSupSub:"\\operatornamewithlimits"===a,limits:!1,parentIsSupSub:!1}},htmlBuilder:da,mathmlBuilder:(e,t)=>{for(var r=Rt(e.body,t.withFont("mathrm")),a=!0,n=0;ne.toText())).join("");r=[new Bt.TextNode(s)]}var l=new Bt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var h=new Bt.MathNode("mo",[Nt("⁡","text")]);return e.parentIsSupSub?new Bt.MathNode("mrow",[l,h]):Bt.newDocumentFragment([l,h])}}),Vr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),lt({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Je.makeFragment(ft(e.body,t,!1)):Je.makeSpan(["mord"],ft(e.body,t,!0),t),mathmlBuilder:(e,t)=>Ht(e.body,t,!0)}),st({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,a=t[0];return{type:"overline",mode:r.mode,body:a}},htmlBuilder(e,t){var r=kt(e.body,t.havingCrampedStyle()),a=Je.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,i=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},t);return Je.makeSpan(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new Bt.MathNode("mo",[new Bt.TextNode("‾")]);r.setAttribute("stretchy","true");var a=new Bt.MathNode("mover",[Ot(e.body,t),r]);return a.setAttribute("accent","true"),a}}),st({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"phantom",mode:r.mode,body:mt(a)}},htmlBuilder:(e,t)=>{var r=ft(e.body,t.withPhantom(),!1);return Je.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=Rt(e.body,t);return new Bt.MathNode("mphantom",r)}}),st({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"hphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=Je.makeSpan([],[kt(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var a=0;a{var r=Rt(mt(e.body),t),a=new Bt.MathNode("mphantom",r),n=new Bt.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}}),st({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"vphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=Je.makeSpan(["inner"],[kt(e.body,t.withPhantom())]),a=Je.makeSpan(["fix"],[]);return Je.makeSpan(["mord","rlap"],[r,a],t)},mathmlBuilder:(e,t)=>{var r=Rt(mt(e.body),t),a=new Bt.MathNode("mphantom",r),n=new Bt.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}}),st({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,a=Ut(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:a,body:n}},htmlBuilder(e,t){var r=kt(e.body,t),a=Y(e.dy,t);return Je.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new Bt.MathNode("mpadded",[Ot(e.body,t)]),a=e.dy.number+e.dy.unit;return r.setAttribute("voffset",a),r}}),st({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),st({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:a}=e,n=r[0],i=Ut(t[0],"size"),o=Ut(t[1],"size");return{type:"rule",mode:a.mode,shift:n&&Ut(n,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=Je.makeSpan(["mord","rule"],[],t),a=Y(e.width,t),n=Y(e.height,t),i=e.shift?Y(e.shift,t):0;return r.style.borderRightWidth=X(a),r.style.borderTopWidth=X(n),r.style.bottom=X(i),r.width=a,r.height=n+i,r.depth=-i,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=Y(e.width,t),a=Y(e.height,t),n=e.shift?Y(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new Bt.MathNode("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",X(r)),o.setAttribute("height",X(a));var s=new Bt.MathNode("mpadded",[o]);return n>=0?s.setAttribute("height",X(n)):(s.setAttribute("height",X(n)),s.setAttribute("depth",X(-n))),s.setAttribute("voffset",X(n)),s}});var fa=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];st({type:"sizing",names:fa,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:fa.indexOf(a)+1,body:i}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return ga(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),a=Rt(e.body,r),n=new Bt.MathNode("mstyle",a);return n.setAttribute("mathsize",X(r.sizeMultiplier)),n}}),st({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:a}=e,n=!1,i=!1,o=r[0]&&Ut(r[0],"ordgroup");if(o)for(var s="",l=0;l{var r=Je.makeSpan([],[kt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var a=0;a{var r=new Bt.MathNode("mpadded",[Ot(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),st({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a}=e,n=r[0],i=t[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(e,t){var r=kt(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Je.wrapFragment(r,t);var a=t.fontMetrics().defaultRuleThickness,n=a;t.style.idr.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var c=s.height-r.height-i-l;r.style.paddingLeft=X(h);var p=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+c)},{type:"elem",elem:s},{type:"kern",size:l}]},t);if(e.index){var u=t.havingStyle(A.SCRIPTSCRIPT),d=kt(e.index,u,t),g=.6*(p.height-p.depth),f=Je.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:d}]},t),v=Je.makeSpan(["root"],[f]);return Je.makeSpan(["mord","sqrt"],[v,p],t)}return Je.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:r,index:a}=e;return a?new Bt.MathNode("mroot",[Ot(r,t),Ot(a,t)]):new Bt.MathNode("msqrt",[Ot(r,t)])}});var va={display:A.DISPLAY,text:A.TEXT,script:A.SCRIPT,scriptscript:A.SCRIPTSCRIPT};st({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!0,r),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:i}},htmlBuilder(e,t){var r=va[e.style],a=t.havingStyle(r).withFont("");return ga(e.body,a,t)},mathmlBuilder(e,t){var r=va[e.style],a=t.havingStyle(r),n=Rt(e.body,a),i=new Bt.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}}),lt({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===A.DISPLAY.size||r.alwaysHandleSupSub)?ma:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===A.DISPLAY.size||r.limits)?da:null:"accent"===r.type?u(r.base)?Wt:null:"horizBrace"===r.type&&!e.sub===r.isOver?ia:null:null}(e,t);if(r)return r(e,t);var a,n,i,{base:o,sup:s,sub:l}=e,h=kt(o,t),m=t.fontMetrics(),c=0,p=0,d=o&&u(o);if(s){var g=t.havingStyle(t.style.sup());a=kt(s,g,t),d||(c=h.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());n=kt(l,f,t),d||(p=h.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===A.DISPLAY?m.sup1:t.style.cramped?m.sup3:m.sup2;var v,b=t.sizeMultiplier,y=X(.5/m.ptPerEm/b),x=null;if(n){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(h instanceof te||w)&&(x=X(-h.italic))}if(a&&n){c=Math.max(c,i,a.depth+.25*m.xHeight),p=Math.max(p,m.sub2);var k=4*m.defaultRuleThickness;if(c-a.depth-(n.height-p)0&&(c+=S,p-=S)}v=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p,marginRight:y,marginLeft:x},{type:"elem",elem:a,shift:-c,marginRight:y}]},t)}else if(n){p=Math.max(p,m.sub1,n.height-.8*m.xHeight),v=Je.makeVList({positionType:"shift",positionData:p,children:[{type:"elem",elem:n,marginLeft:x,marginRight:y}]},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");c=Math.max(c,i,a.depth+.25*m.xHeight),v=Je.makeVList({positionType:"shift",positionData:-c,children:[{type:"elem",elem:a,marginRight:y}]},t)}var M=xt(h,"right")||"mord";return Je.makeSpan([M],[h,Je.makeSpan(["msupsub"],[v])],t)},mathmlBuilder(e,t){var r,a=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(a=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,i=[Ot(e.base,t)];if(e.sub&&i.push(Ot(e.sub,t)),e.sup&&i.push(Ot(e.sup,t)),a)n=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;n=o&&"op"===o.type&&o.limits&&t.style===A.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===A.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;n=s&&"op"===s.type&&s.limits&&(t.style===A.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===A.DISPLAY)?"munder":"msub"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===A.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===A.DISPLAY)?"mover":"msup"}return new Bt.MathNode(n,i)}}),lt({type:"atom",htmlBuilder:(e,t)=>Je.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new Bt.MathNode("mo",[Nt(e.text,e.mode)]);if("bin"===e.family){var a=qt(e,t);"bold-italic"===a&&r.setAttribute("mathvariant",a)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var ba={mi:"italic",mn:"normal",mtext:"normal"};lt({type:"mathord",htmlBuilder:(e,t)=>Je.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var r=new Bt.MathNode("mi",[Nt(e.text,e.mode,t)]),a=qt(e,t)||"italic";return a!==ba[r.type]&&r.setAttribute("mathvariant",a),r}}),lt({type:"textord",htmlBuilder:(e,t)=>Je.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var r,a=Nt(e.text,e.mode,t),n=qt(e,t)||"normal";return r="text"===e.mode?new Bt.MathNode("mtext",[a]):/[0-9]/.test(e.text)?new Bt.MathNode("mn",[a]):"\\prime"===e.text?new Bt.MathNode("mo",[a]):new Bt.MathNode("mi",[a]),n!==ba[r.type]&&r.setAttribute("mathvariant",n),r}});var ya={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},xa={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};lt({type:"spacing",htmlBuilder(e,t){if(xa.hasOwnProperty(e.text)){var r=xa[e.text].className||"";if("text"===e.mode){var n=Je.makeOrd(e,t,"textord");return n.classes.push(r),n}return Je.makeSpan(["mspace",r],[Je.mathsym(e.text,e.mode,t)],t)}if(ya.hasOwnProperty(e.text))return Je.makeSpan(["mspace",ya[e.text]],[],t);throw new a('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!xa.hasOwnProperty(e.text)){if(ya.hasOwnProperty(e.text))return new Bt.MathNode("mspace");throw new a('Unknown type of space "'+e.text+'"')}return new Bt.MathNode("mtext",[new Bt.TextNode(" ")])}});var wa=()=>{var e=new Bt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};lt({type:"tag",mathmlBuilder(e,t){var r=new Bt.MathNode("mtable",[new Bt.MathNode("mtr",[wa(),new Bt.MathNode("mtd",[Ht(e.body,t)]),wa(),new Bt.MathNode("mtd",[Ht(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var ka={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Sa={"\\textbf":"textbf","\\textmd":"textmd"},Ma={"\\textit":"textit","\\textup":"textup"},za=(e,t)=>{var r=e.font;return r?ka[r]?t.withTextFontFamily(ka[r]):Sa[r]?t.withTextFontWeight(Sa[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Ma[r]):t};st({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"text",mode:r.mode,body:mt(n),font:a}},htmlBuilder(e,t){var r=za(e,t),a=ft(e.body,r,!0);return Je.makeSpan(["mord","text"],a,r)},mathmlBuilder(e,t){var r=za(e,t);return Ht(e.body,r)}}),st({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=kt(e.body,t),a=Je.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=Je.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:r}]},t);return Je.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new Bt.MathNode("mo",[new Bt.TextNode("‾")]);r.setAttribute("stretchy","true");var a=new Bt.MathNode("munder",[Ot(e.body,t),r]);return a.setAttribute("accentunder","true"),a}}),st({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=kt(e.body,t),a=t.fontMetrics().axisHeight,n=.5*(r.height-a-(r.depth+a));return Je.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:(e,t)=>new Bt.MathNode("mpadded",[Ot(e.body,t)],["vcenter"])}),st({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Aa(e),a=[],n=t.havingStyle(t.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),Ta=nt,Ba="[ \r\n\t]",Na="(\\\\[a-zA-Z@]+)"+Ba+"*",Ca="[̀-ͯ]",qa=new RegExp(Ca+"+$"),Ia="("+Ba+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+Ca+"*|[\ud800-\udbff][\udc00-\udfff]"+Ca+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Na+"|\\\\[^\ud800-\udfff])";class Ra{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Ia,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,n=this.tokenRegex.lastIndex;if(n===e.length)return new r("EOF",new t(this,n,n));var i=this.tokenRegex.exec(e);if(null===i||i.index!==n)throw new a("Unexpected character: '"+e[n]+"'",new r(e[n],new t(this,n,n+1)));var o=i[6]||i[3]||(i[2]?"\\ ":" ");if(14===this.catcodes[o]){var s=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===s?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new r(o,new t(this,n,this.tokenRegex.lastIndex))}}class Ha{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new a("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(var a=0;a0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Oa=Pr;Vr("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Vr("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Vr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Vr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Vr("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Vr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Vr("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Ea={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};Vr("\\char",(function(e){var t,r=e.popToken(),n="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new a("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(null==(n=Ea[r.text])||n>=t)throw new a("Invalid base-"+t+" digit "+r.text);for(var i;null!=(i=Ea[e.future().text])&&i{var i=e.consumeArg().tokens;if(1!==i.length)throw new a("\\newcommand's first argument must be a macro name");var o=i[0].text,s=e.isDefined(o);if(s&&!t)throw new a("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!s&&!r)throw new a("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var l=0;if(1===(i=e.consumeArg().tokens).length&&"["===i[0].text){for(var h="",m=e.expandNextToken();"]"!==m.text&&"EOF"!==m.text;)h+=m.text,m=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new a("Invalid number of arguments: "+h);l=parseInt(h),i=e.consumeArg().tokens}return s&&n||e.macros.set(o,{tokens:i,numArgs:l}),""};Vr("\\newcommand",(e=>La(e,!1,!0,!1))),Vr("\\renewcommand",(e=>La(e,!0,!1,!1))),Vr("\\providecommand",(e=>La(e,!0,!0,!0))),Vr("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Vr("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Vr("\\show",(e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Ta[r],le.math[r],le.text[r]),""})),Vr("\\bgroup","{"),Vr("\\egroup","}"),Vr("~","\\nobreakspace"),Vr("\\lq","`"),Vr("\\rq","'"),Vr("\\aa","\\r a"),Vr("\\AA","\\r A"),Vr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Vr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Vr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Vr("ℬ","\\mathscr{B}"),Vr("ℰ","\\mathscr{E}"),Vr("ℱ","\\mathscr{F}"),Vr("ℋ","\\mathscr{H}"),Vr("ℐ","\\mathscr{I}"),Vr("ℒ","\\mathscr{L}"),Vr("ℳ","\\mathscr{M}"),Vr("ℛ","\\mathscr{R}"),Vr("ℭ","\\mathfrak{C}"),Vr("ℌ","\\mathfrak{H}"),Vr("ℨ","\\mathfrak{Z}"),Vr("\\Bbbk","\\Bbb{k}"),Vr("·","\\cdotp"),Vr("\\llap","\\mathllap{\\textrm{#1}}"),Vr("\\rlap","\\mathrlap{\\textrm{#1}}"),Vr("\\clap","\\mathclap{\\textrm{#1}}"),Vr("\\mathstrut","\\vphantom{(}"),Vr("\\underbar","\\underline{\\text{#1}}"),Vr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Vr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Vr("\\ne","\\neq"),Vr("≠","\\neq"),Vr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Vr("∉","\\notin"),Vr("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Vr("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Vr("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Vr("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Vr("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Vr("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Vr("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Vr("⟂","\\perp"),Vr("‼","\\mathclose{!\\mkern-0.8mu!}"),Vr("∌","\\notni"),Vr("⌜","\\ulcorner"),Vr("⌝","\\urcorner"),Vr("⌞","\\llcorner"),Vr("⌟","\\lrcorner"),Vr("©","\\copyright"),Vr("®","\\textregistered"),Vr("️","\\textregistered"),Vr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Vr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Vr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Vr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Vr("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Vr("⋮","\\vdots"),Vr("\\varGamma","\\mathit{\\Gamma}"),Vr("\\varDelta","\\mathit{\\Delta}"),Vr("\\varTheta","\\mathit{\\Theta}"),Vr("\\varLambda","\\mathit{\\Lambda}"),Vr("\\varXi","\\mathit{\\Xi}"),Vr("\\varPi","\\mathit{\\Pi}"),Vr("\\varSigma","\\mathit{\\Sigma}"),Vr("\\varUpsilon","\\mathit{\\Upsilon}"),Vr("\\varPhi","\\mathit{\\Phi}"),Vr("\\varPsi","\\mathit{\\Psi}"),Vr("\\varOmega","\\mathit{\\Omega}"),Vr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Vr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Vr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Vr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Vr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Vr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Vr("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Vr("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Da={",":"\\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"};Vr("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Da?t=Da[r]:("\\not"===r.slice(0,4)||r in le.math&&l(["bin","rel"],le.math[r].group))&&(t="\\dotsb"),t}));var Pa={")":!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};Vr("\\dotso",(function(e){return e.future().text in Pa?"\\ldots\\,":"\\ldots"})),Vr("\\dotsc",(function(e){var t=e.future().text;return t in Pa&&","!==t?"\\ldots\\,":"\\ldots"})),Vr("\\cdots",(function(e){return e.future().text in Pa?"\\@cdots\\,":"\\@cdots"})),Vr("\\dotsb","\\cdots"),Vr("\\dotsm","\\cdots"),Vr("\\dotsi","\\!\\cdots"),Vr("\\dotsx","\\ldots\\,"),Vr("\\DOTSI","\\relax"),Vr("\\DOTSB","\\relax"),Vr("\\DOTSX","\\relax"),Vr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Vr("\\,","\\tmspace+{3mu}{.1667em}"),Vr("\\thinspace","\\,"),Vr("\\>","\\mskip{4mu}"),Vr("\\:","\\tmspace+{4mu}{.2222em}"),Vr("\\medspace","\\:"),Vr("\\;","\\tmspace+{5mu}{.2777em}"),Vr("\\thickspace","\\;"),Vr("\\!","\\tmspace-{3mu}{.1667em}"),Vr("\\negthinspace","\\!"),Vr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Vr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Vr("\\enspace","\\kern.5em "),Vr("\\enskip","\\hskip.5em\\relax"),Vr("\\quad","\\hskip1em\\relax"),Vr("\\qquad","\\hskip2em\\relax"),Vr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Vr("\\tag@paren","\\tag@literal{({#1})}"),Vr("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Vr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Vr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Vr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Vr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Vr("\\newline","\\\\\\relax"),Vr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Va=X(I["Main-Regular"]["T".charCodeAt(0)][1]-.7*I["Main-Regular"]["A".charCodeAt(0)][1]);Vr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Va+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Vr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Va+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Vr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Vr("\\@hspace","\\hskip #1\\relax"),Vr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Vr("\\ordinarycolon",":"),Vr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Vr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Vr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Vr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Vr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Vr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Vr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Vr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Vr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Vr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Vr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Vr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Vr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Vr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Vr("∷","\\dblcolon"),Vr("∹","\\eqcolon"),Vr("≔","\\coloneqq"),Vr("≕","\\eqqcolon"),Vr("⩴","\\Coloneqq"),Vr("\\ratio","\\vcentcolon"),Vr("\\coloncolon","\\dblcolon"),Vr("\\colonequals","\\coloneqq"),Vr("\\coloncolonequals","\\Coloneqq"),Vr("\\equalscolon","\\eqqcolon"),Vr("\\equalscoloncolon","\\Eqqcolon"),Vr("\\colonminus","\\coloneq"),Vr("\\coloncolonminus","\\Coloneq"),Vr("\\minuscolon","\\eqcolon"),Vr("\\minuscoloncolon","\\Eqcolon"),Vr("\\coloncolonapprox","\\Colonapprox"),Vr("\\coloncolonsim","\\Colonsim"),Vr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Vr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Vr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Vr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Vr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Vr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Vr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Vr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Vr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Vr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Vr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Vr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Vr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Vr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Vr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Vr("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Vr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Vr("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Vr("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Vr("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Vr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Vr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Vr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Vr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Vr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Vr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Vr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Vr("\\imath","\\html@mathml{\\@imath}{ı}"),Vr("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Vr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Vr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Vr("⟦","\\llbracket"),Vr("⟧","\\rrbracket"),Vr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Vr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Vr("⦃","\\lBrace"),Vr("⦄","\\rBrace"),Vr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Vr("⦵","\\minuso"),Vr("\\darr","\\downarrow"),Vr("\\dArr","\\Downarrow"),Vr("\\Darr","\\Downarrow"),Vr("\\lang","\\langle"),Vr("\\rang","\\rangle"),Vr("\\uarr","\\uparrow"),Vr("\\uArr","\\Uparrow"),Vr("\\Uarr","\\Uparrow"),Vr("\\N","\\mathbb{N}"),Vr("\\R","\\mathbb{R}"),Vr("\\Z","\\mathbb{Z}"),Vr("\\alef","\\aleph"),Vr("\\alefsym","\\aleph"),Vr("\\Alpha","\\mathrm{A}"),Vr("\\Beta","\\mathrm{B}"),Vr("\\bull","\\bullet"),Vr("\\Chi","\\mathrm{X}"),Vr("\\clubs","\\clubsuit"),Vr("\\cnums","\\mathbb{C}"),Vr("\\Complex","\\mathbb{C}"),Vr("\\Dagger","\\ddagger"),Vr("\\diamonds","\\diamondsuit"),Vr("\\empty","\\emptyset"),Vr("\\Epsilon","\\mathrm{E}"),Vr("\\Eta","\\mathrm{H}"),Vr("\\exist","\\exists"),Vr("\\harr","\\leftrightarrow"),Vr("\\hArr","\\Leftrightarrow"),Vr("\\Harr","\\Leftrightarrow"),Vr("\\hearts","\\heartsuit"),Vr("\\image","\\Im"),Vr("\\infin","\\infty"),Vr("\\Iota","\\mathrm{I}"),Vr("\\isin","\\in"),Vr("\\Kappa","\\mathrm{K}"),Vr("\\larr","\\leftarrow"),Vr("\\lArr","\\Leftarrow"),Vr("\\Larr","\\Leftarrow"),Vr("\\lrarr","\\leftrightarrow"),Vr("\\lrArr","\\Leftrightarrow"),Vr("\\Lrarr","\\Leftrightarrow"),Vr("\\Mu","\\mathrm{M}"),Vr("\\natnums","\\mathbb{N}"),Vr("\\Nu","\\mathrm{N}"),Vr("\\Omicron","\\mathrm{O}"),Vr("\\plusmn","\\pm"),Vr("\\rarr","\\rightarrow"),Vr("\\rArr","\\Rightarrow"),Vr("\\Rarr","\\Rightarrow"),Vr("\\real","\\Re"),Vr("\\reals","\\mathbb{R}"),Vr("\\Reals","\\mathbb{R}"),Vr("\\Rho","\\mathrm{P}"),Vr("\\sdot","\\cdot"),Vr("\\sect","\\S"),Vr("\\spades","\\spadesuit"),Vr("\\sub","\\subset"),Vr("\\sube","\\subseteq"),Vr("\\supe","\\supseteq"),Vr("\\Tau","\\mathrm{T}"),Vr("\\thetasym","\\vartheta"),Vr("\\weierp","\\wp"),Vr("\\Zeta","\\mathrm{Z}"),Vr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Vr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Vr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Vr("\\bra","\\mathinner{\\langle{#1}|}"),Vr("\\ket","\\mathinner{|{#1}\\rangle}"),Vr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Vr("\\Bra","\\left\\langle#1\\right|"),Vr("\\Ket","\\left|#1\\right\\rangle");var Fa=e=>t=>{var r=t.consumeArg().tokens,a=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>r=>{e&&(r.macros.set("|",o),n.length&&r.macros.set("\\|",s));var i=t;return!t&&n.length&&"|"===r.future().text&&(r.popToken(),i=!0),{tokens:i?n:a,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,m=t.expandTokens([...i,...h,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};Vr("\\bra@ket",Fa(!1)),Vr("\\bra@set",Fa(!0)),Vr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Vr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Vr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Vr("\\angln","{\\angl n}"),Vr("\\blue","\\textcolor{##6495ed}{#1}"),Vr("\\orange","\\textcolor{##ffa500}{#1}"),Vr("\\pink","\\textcolor{##ff00af}{#1}"),Vr("\\red","\\textcolor{##df0030}{#1}"),Vr("\\green","\\textcolor{##28ae7b}{#1}"),Vr("\\gray","\\textcolor{gray}{#1}"),Vr("\\purple","\\textcolor{##9d38bd}{#1}"),Vr("\\blueA","\\textcolor{##ccfaff}{#1}"),Vr("\\blueB","\\textcolor{##80f6ff}{#1}"),Vr("\\blueC","\\textcolor{##63d9ea}{#1}"),Vr("\\blueD","\\textcolor{##11accd}{#1}"),Vr("\\blueE","\\textcolor{##0c7f99}{#1}"),Vr("\\tealA","\\textcolor{##94fff5}{#1}"),Vr("\\tealB","\\textcolor{##26edd5}{#1}"),Vr("\\tealC","\\textcolor{##01d1c1}{#1}"),Vr("\\tealD","\\textcolor{##01a995}{#1}"),Vr("\\tealE","\\textcolor{##208170}{#1}"),Vr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Vr("\\greenB","\\textcolor{##8af281}{#1}"),Vr("\\greenC","\\textcolor{##74cf70}{#1}"),Vr("\\greenD","\\textcolor{##1fab54}{#1}"),Vr("\\greenE","\\textcolor{##0d923f}{#1}"),Vr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Vr("\\goldB","\\textcolor{##ffbb71}{#1}"),Vr("\\goldC","\\textcolor{##ff9c39}{#1}"),Vr("\\goldD","\\textcolor{##e07d10}{#1}"),Vr("\\goldE","\\textcolor{##a75a05}{#1}"),Vr("\\redA","\\textcolor{##fca9a9}{#1}"),Vr("\\redB","\\textcolor{##ff8482}{#1}"),Vr("\\redC","\\textcolor{##f9685d}{#1}"),Vr("\\redD","\\textcolor{##e84d39}{#1}"),Vr("\\redE","\\textcolor{##bc2612}{#1}"),Vr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Vr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Vr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Vr("\\maroonD","\\textcolor{##ca337c}{#1}"),Vr("\\maroonE","\\textcolor{##9e034e}{#1}"),Vr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Vr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Vr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Vr("\\purpleD","\\textcolor{##7854ab}{#1}"),Vr("\\purpleE","\\textcolor{##543b78}{#1}"),Vr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Vr("\\mintB","\\textcolor{##edf2df}{#1}"),Vr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Vr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Vr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Vr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Vr("\\grayD","\\textcolor{##d6d8da}{#1}"),Vr("\\grayE","\\textcolor{##babec2}{#1}"),Vr("\\grayF","\\textcolor{##888d93}{#1}"),Vr("\\grayG","\\textcolor{##626569}{#1}"),Vr("\\grayH","\\textcolor{##3b3e40}{#1}"),Vr("\\grayI","\\textcolor{##21242c}{#1}"),Vr("\\kaBlue","\\textcolor{##314453}{#1}"),Vr("\\kaGreen","\\textcolor{##71B307}{#1}");var Ga={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Ua{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ha(Oa,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Ra(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:a}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new r("EOF",a.loc)),this.pushTokens(n),t.range(a,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var n,i=this.future(),o=0,s=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++o;else if("}"===n.text){if(-1==--o)throw new a("Extra }",n)}else if("EOF"===n.text)throw new a("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",n);if(e&&r)if((0===o||1===o&&"{"===e[s])&&n.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:n}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new a("The length of delimiters doesn't match the number of args!");for(var r=t[0],n=0;nthis.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new a("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var l=i[s];if("#"===l.text){if(0===s)throw new a("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new a("Not a valid argument number",l);i.splice(s,2,...o[+l.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new r(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),t.push(a)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var a="function"==typeof t?t(this):t;if("string"==typeof a){var n=0;if(-1!==a.indexOf("#"))for(var i=a.replace(/##/g,"");-1!==i.indexOf("#"+(n+1));)++n;for(var o=new Ra(a,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:n}}return a}isDefined(e){return this.macros.has(e)||Ta.hasOwnProperty(e)||le.math.hasOwnProperty(e)||le.text.hasOwnProperty(e)||Ga.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Ta.hasOwnProperty(e)&&!Ta[e].primitive}}var Ya=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Xa=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",ᵝ:"β",ᵞ:"γ",ᵟ:"δ",ᵠ:"ϕ",ᵡ:"χ",ᶿ:"θ"}),Wa={"́":{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"}},_a={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class $a{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Ua(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new a("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new r("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==$a.endOfExpression.indexOf(a.text))break;if(t&&a.text===t)break;if(e&&Ta[a.text]&&Ta[a.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var l,h=le[this.mode][r].group,m=t.range(e);if(oe.hasOwnProperty(h)){var c=h;l={type:"atom",mode:this.mode,family:c,loc:m,text:r}}else l={type:h,mode:this.mode,loc:m,text:r};o=l}else{if(!(r.charCodeAt(0)>=128))return null;this.settings.strict&&(N(r.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'" ('+r.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:t.range(e),text:r}}if(this.consume(),s)for(var p=0;pe.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");-1!==(r=e.search(n));){r>0&&(a.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));var i=t.findIndex((t=>e.startsWith(t.left)));if(-1===(r=en(t[i].right,e,t[i].left.length)))break;var o=e.slice(0,r+t[i].right.length),s=tn.test(o)?o:e.slice(t[i].left.length,r);a.push({type:"math",data:s,rawData:o,display:t[i].display}),e=e.slice(r+t[i].right.length)}return""!==e&&a.push({type:"text",data:e}),a}(e,t.delimiters);if(1===r.length&&"text"===r[0].type)return null;for(var a=document.createDocumentFragment(),n=0;n-1===t.indexOf(" "+e+" ")))&&e(n,r)}()}};!function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},an(e,r)}(document.body)})()})(); \ No newline at end of file diff --git a/docs/hugo/public/js/main-2e274343.bundle.min.js b/docs/hugo/public/js/main-2e274343.bundle.min.js new file mode 100644 index 000000000..45d1d47b6 --- /dev/null +++ b/docs/hugo/public/js/main-2e274343.bundle.min.js @@ -0,0 +1,2 @@ +/*! For license information please see main-2e274343.bundle.min.js.LICENSE.txt */ +(()=>{var t={7576:function(t){var e;e=function(){return function(){var t={686:function(t,e,n){"use strict";n.d(e,{default:function(){return S}});var o=n(279),r=n.n(o),c=n(370),i=n.n(c),u=n(817),a=n.n(u);function s(t){try{return document.execCommand(t)}catch(t){return!1}}var l=function(t){var e=a()(t);return s("cut"),e},f=function(t,e){var n=function(t){var e="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[e?"right":"left"]="-9999px";var o=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(o,"px"),n.setAttribute("readonly",""),n.value=t,n}(t);e.container.appendChild(n);var o=a()(n);return s("copy"),n.remove(),o},d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof t?n=f(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?n=f(t.value,e):(n=a()(t),s("copy")),n};function p(t){return p="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},p(t)}function y(t){return y="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},y(t)}function h(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===y(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=i()(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,r=t.target,c=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==r){if(!r||"object"!==p(r)||1!==r.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&r.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(r.hasAttribute("readonly")||r.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return c?d(c,{container:o}):r?"cut"===n?l(r):d(r,{container:o}):void 0}({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(o?"success":"error",{action:n,text:o,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return m("action",t)}},{key:"defaultTarget",value:function(t){var e=m("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return m("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}],o=[{key:"copy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return d(t,e)}},{key:"cut",value:function(t){return l(t)}},{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}],n&&h(e.prototype,n),o&&h(e,o),a}(r()),S=b},828:function(t){if("undefined"!=typeof Element&&!Element.prototype.matches){var e=Element.prototype;e.matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var o=n(828);function r(t,e,n,o,r){var i=c.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}function c(t,e,n,r){return function(n){n.delegateTarget=o(n.target,e),n.delegateTarget&&r.call(t,n)}}t.exports=function(t,e,n,o,c){return"function"==typeof t.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return r(t,e,n,o,c)})))}},879:function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var o=n(879),r=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!o.string(e))throw new TypeError("Second argument must be a String");if(!o.fn(n))throw new TypeError("Third argument must be a Function");if(o.node(t))return function(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}(t,e,n);if(o.nodeList(t))return function(t,e,n){return Array.prototype.forEach.call(t,(function(t){t.addEventListener(e,n)})),{destroy:function(){Array.prototype.forEach.call(t,(function(t){t.removeEventListener(e,n)}))}}}(t,e,n);if(o.string(t))return function(t,e,n){return r(document.body,t,e,n)}(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(t){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o{"use strict";var t=n(7576);document.addEventListener("DOMContentLoaded",(function(){new t(".clip").on("success",(function(t){const e=t.trigger;e.hasAttribute("data-copy-feedback")&&(e.classList.add("gdoc-post__codecopy--success","gdoc-post__codecopy--out"),e.querySelector(".gdoc-icon.copy").classList.add("hidden"),e.querySelector(".gdoc-icon.check").classList.remove("hidden"),setTimeout((function(){e.classList.remove("gdoc-post__codecopy--success","gdoc-post__codecopy--out"),e.querySelector(".gdoc-icon.copy").classList.remove("hidden"),e.querySelector(".gdoc-icon.check").classList.add("hidden")}),3e3)),t.clearSelection()})),document.querySelectorAll(".highlight").forEach((t=>function(t){const e=document.createElement("span");let n="pre > code";t.querySelector(".lntable")&&(n=".lntable .lntd:last-child pre > code");const o=t.querySelector(n);if(null!==o){const n=o.innerText.trim();e.classList.add("flex","align-center","justify-center","clip","gdoc-post__codecopy"),e.type="button",e.innerHTML='',e.setAttribute("data-clipboard-text",n),e.setAttribute("data-copy-feedback","Copied!"),e.setAttribute("role","button"),e.setAttribute("aria-label","Copy"),t.classList.add("gdoc-post__codecontainer"),t.insertBefore(e,t.firstChild)}}(t)))}))})()})(); \ No newline at end of file diff --git a/docs/hugo/public/js/main-2e274343.bundle.min.js.LICENSE.txt b/docs/hugo/public/js/main-2e274343.bundle.min.js.LICENSE.txt new file mode 100644 index 000000000..5161813c4 --- /dev/null +++ b/docs/hugo/public/js/main-2e274343.bundle.min.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*! + * clipboard.js v2.0.11 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ diff --git a/docs/hugo/public/js/mermaid-fc9f74ae.bundle.min.js b/docs/hugo/public/js/mermaid-fc9f74ae.bundle.min.js new file mode 100644 index 000000000..b7a1c8d92 --- /dev/null +++ b/docs/hugo/public/js/mermaid-fc9f74ae.bundle.min.js @@ -0,0 +1,2 @@ +/*! For license information please see mermaid-fc9f74ae.bundle.min.js.LICENSE.txt */ +(()=>{var t,e,r={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=void 0;var n=r(9119);function i(t){try{return decodeURIComponent(t)}catch(e){return t}}e.J=function(t){if(!t)return n.BLANK_URL;var e,r,a=i(t.trim());do{e=(a=i(a=(r=a,r.replace(n.ctrlCharactersRegex,"").replace(n.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))).replace(n.htmlCtrlEntityRegex,"").replace(n.ctrlCharactersRegex,"").replace(n.whitespaceEscapeCharsRegex,"").trim())).match(n.ctrlCharactersRegex)||a.match(n.htmlEntitiesRegex)||a.match(n.htmlCtrlEntityRegex)||a.match(n.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var o=a;if(!o)return n.BLANK_URL;if(function(t){return n.relativeFirstCharacters.indexOf(t[0])>-1}(o))return o;var s=o.trimStart(),l=s.match(n.urlSchemeRegex);if(!l)return o;var h=l[0].toLowerCase().trim();if(n.invalidProtocolRegex.test(h))return n.BLANK_URL;var c=s.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return n.BLANK_URL;var u=new URL(c);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return c}},4353:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,r="millisecond",n="second",i="minute",a="hour",o="day",s="week",l="month",h="quarter",c="year",u="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},m={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(o[0])}else{var s=e.name;b[s]=e,i=s}return!n&&i&&(x=i),i||!n&&x},_=function(t,e){if(C(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},v=m;v.l=w,v.i=C,v.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var y=g.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(v.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(p);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 v},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,e){var r=_(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return _(t){"use strict";function n(t,e,r){if(t&&t.length){const[n,i]=e,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-n)*o-(r-i)*s+n,e[1]=(t-n)*s+(r-i)*o+i}}}function i(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,r,a=1){const o=r,s=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,h=[0,0];if(o)for(const t of l)n(t,h,o);const c=function(t,e,r){const n=[];for(const e of t){const t=[...e];i(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&n.push(t)}const a=[];e=Math.max(e,.1);const o=[];for(const t of n)for(let e=0;et.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!o.length)return a;let s=[],l=o[0].ymin,h=0;for(;s.length||o.length;){if(o.length){let t=-1;for(let e=0;el);e++)t=e;o.splice(0,t+1).forEach((t=>{s.push({s:l,edge:t})}))}if(s=s.filter((t=>!(t.edge.ymax<=l))),s.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||h%e==0)&&s.length>1)for(let t=0;t=s.length)break;const r=s[t].edge,n=s[e].edge;a.push([[Math.round(r.x),l],[Math.round(n.x),l]])}l+=r,s.forEach((t=>{t.edge.x=t.edge.x+r*t.edge.islope})),h++}return a}(l,s,a);if(o){for(const t of l)n(t,h,-o);!function(t,e,r){const i=[];t.forEach((t=>i.push(...t))),n(i,e,r)}(c,h,-o)}return c}function o(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 o=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(o=i),a(t,i,n,o||1)}r.d(e,{A:()=>it});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=o(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 h extends s{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const n=o(t,Object.assign({},e,{hachureGap:r})),i=Math.PI/180*e.hachureAngle,a=[],s=.5*r*Math.cos(i),h=.5*r*Math.sin(i);for(const[t,e]of n)l([t,e])&&a.push([[t[0]-s,t[1]+h],[...e]],[[t[0]+s,t[1]-h],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class c extends s{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=o(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 o of t){const t=l(o),s=t/n,h=Math.ceil(s)-1,c=t-h*n,u=(o[0][0]+o[1][0])/2-n/4,d=Math.min(o[0][1],o[1][1]);for(let t=0;t{const a=l(t),o=Math.floor(a/(r+n)),s=(a+n-o*(r+n))/2;let h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);const u=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let t=0;t{const i=l(t),a=Math.round(i/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const h=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let t=0;tn%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:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.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:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.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:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[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 k(t){const e=[];let r="",n=0,i=0,a=0,o=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[n,i]=c,[a,o]=c;break;case"C":e.push({key:"C",data:[...c]}),n=c[4],i=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[n,i]=c;break;case"H":n=c[0],e.push({key:"L",data:[n,i]});break;case"V":i=c[0],e.push({key:"L",data:[n,i]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=n+(n-s),a=i+(i-l)):(t=n,a=i),e.push({key:"C",data:[t,a,...c]}),s=c[0],l=c[1],n=c[2],i=c[3];break}case"T":{const[t,a]=c;let o=0,h=0;"Q"===r||"T"===r?(o=n+(n-s),h=i+(i-l)):(o=n,h=i);const u=n+2*(o-n)/3,d=i+2*(h-i)/3,p=t+2*(o-t)/3,f=a+2*(h-a)/3;e.push({key:"C",data:[u,d,p,f,t,a]}),s=o,l=h,n=t,i=a;break}case"Q":{const[t,r,a,o]=c,h=n+2*(t-n)/3,u=i+2*(r-i)/3,d=a+2*(t-a)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[h,u,d,p,a,o]}),s=t,l=r,n=a,i=o;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],o=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[n,i,l,h,l,h]}),n=l,i=h):n===l&&i===h||(w(n,i,l,h,t,r,a,o,s).forEach((function(t){e.push({key:"C",data:t})})),n=l,i=h);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=o}r=h}return e}function C(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function w(t,e,r,n,i,a,o,s,l,h){const c=(u=o,Math.PI*u/180);var u;let d=[],p=0,f=0,g=0,y=0;if(h)[p,f,g,y]=h;else{[t,e]=C(t,e,-c),[r,n]=C(r,n,-c);const o=(t-r)/2,h=(e-n)/2;let u=o*o/(i*i)+h*h/(a*a);u>1&&(u=Math.sqrt(u),i*=u,a*=u);const d=i*i,m=a*a,x=d*m-d*h*h-m*o*o,b=d*h*h+m*o*o,k=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));g=k*i*h/a+(t+r)/2,y=k*-a*o/i+(e+n)/2,p=Math.asin(parseFloat(((e-y)/a).toFixed(9))),f=Math.asin(parseFloat(((n-y)/a).toFixed(9))),tf&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let m=f-p;if(Math.abs(m)>120*Math.PI/180){const t=f,e=r,s=n;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=w(r=g+i*Math.cos(f),n=y+a*Math.sin(f),e,s,i,a,o,0,l,[f,t,g,y])}m=f-p;const x=Math.cos(p),b=Math.sin(p),k=Math.cos(f),_=Math.sin(f),v=Math.tan(m/4),S=4/3*i*v,T=4/3*a*v,A=[t,e],M=[t+S*b,e-T*x],B=[r+S*_,n-T*k],L=[r,n];if(M[0]=2*A[0]-M[0],M[1]=2*A[1]-M[1],h)return[M,B,L].concat(d);{d=[M,B,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,y=Math.min(g/2,(f-p)/2),m=q(y,h,c,u,d,p,f,1,l);if(!l.disableMultiStroke){const t=q(y,h,c,u,d,p,f,1.5,l);m.push(...t)}return o&&(s?m.push(...N(h,c,h+u*Math.cos(p),c+d*Math.sin(p),l),...N(h,c,h+u*Math.cos(f),c+d*Math.sin(f),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(p),c+d*Math.sin(p)]})),{type:"path",ops:m}}function L(t,e){const r=k(b(x(t))),n=[];let i=[0,0],a=[0,0];for(const{key:t,data:o}of r)switch(t){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...N(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[t,r,i,s,l,h]=o;n.push(...j(t,r,i,s,l,h,a,e)),a=[l,h];break}case"Z":n.push(...N(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function F(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]+I(t,e),n[0][1]+I(t,e)]});for(let a=1;a500?.4:-.0016668*l+1.233334;let c=i.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const u=c/2,d=.2+.2*D(i);let p=i.bowing*i.maxRandomnessOffset*(n-e)/200,f=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=I(p,i,h),f=I(f,i,h);const g=[],y=()=>I(u,i,h),m=()=>I(c,i,h),x=i.preserveVertices;return a&&(o?g.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):g.push({op:"move",data:[t+(x?0:I(c,i,h)),e+(x?0:I(c,i,h))]})),o?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+(x?0:y()),n+(x?0:y())]}):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+(x?0:m()),n+(x?0:m())]}),g}function P(t,e,r){if(!t.length)return[];const n=[];n.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]),n.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]);for(let i=1;i3){const a=[],o=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],o=t[e+1],s=t[e+2],l=t[e+3],h=G(a,o,n),c=G(o,s,n),u=G(s,l,n),d=G(h,c,n),p=G(c,u,n),f=G(d,p,n);V([a,h,d,f],0,r,i),V([f,p,u,l],0,r,i)}var a,o;return i}function Z(t,e){return X(t,0,t.length,e)}function X(t,e,r,n,i){const a=i||[],o=t[e],s=t[r-1];let l=0,h=1;for(let n=e+1;nl&&(l=e,h=n)}return Math.sqrt(l)>n?(X(t,e,h+1,n,a),X(t,h,r,n,a)):(a.length||a.push(o),a.push(s)),a}function Q(t,e=.15,r){const n=[],i=(t.length-1)/3;for(let r=0;r0?X(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",[v(t,e,r,n,a)],a)}rectangle(t,e,r,n,i){const a=this._o(i),o=[],s=function(t,e,r,n,i){return function(t,e){return S(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?o.push(F([i],a)):o.push($([i],a))}return a.stroke!==J&&o.push(s),this._d("rectangle",o,a)}ellipse(t,e,r,n,i){const a=this._o(i),o=[],s=A(r,n,a),l=M(t,e,a,s);if(a.fill)if("solid"===a.fillStyle){const r=M(t,e,a,s).opset;r.type="fillPath",o.push(r)}else o.push($([l.estimatedPoints],a));return a.stroke!==J&&o.push(l.opset),this._d("ellipse",o,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",[S(t,!1,r)],r)}arc(t,e,r,n,i,a,o=!1,s){const l=this._o(s),h=[],c=B(t,e,r,n,i,a,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=B(t,e,r,n,i,a,!0,!1,o);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,n,i,a,o){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(n/2);h+=I(.01*h,o),c+=I(.01*c,o);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)/o.curveStepCount,f=[];for(let t=u;t<=d;t+=p)f.push([s+h*Math.cos(t),l+c*Math.sin(t)]);return f.push([s+h*Math.cos(d),l+c*Math.sin(d)]),f.push([s,l]),$([f],o)}(t,e,r,n,i,a,l));return l.stroke!==J&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),n=[],i=T(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=T(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(H([n[0],n[0],n[1],n[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(n),10,(1+r.roughness)/2))}e.length&&n.push($([e],r))}return r.stroke!==J&&n.push(i),this._d("curve",n,r)}polygon(t,e){const r=this._o(e),n=[],i=S(t,!0,r);return r.fill&&("solid"===r.fillStyle?n.push(F([t],r)):n.push($([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,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const n=k(b(x(t))),i=[];let a=[],o=[0,0],s=[];const l=()=>{s.length>=4&&a.push(...Q(s,1)),s=[]},h=()=>{l(),a.length&&(i.push(a),a=[])};for(const{key:t,data:e}of n)switch(t){case"M":h(),o=[e[0],e[1]],a.push(o);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!s.length){const t=a.length?a[a.length-1]:o;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),a.push([o[0],o[1]])}if(h(),!r)return i;const c=[];for(const t of i){const e=Z(t,r);e.length&&c.push(e)}return c}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=L(t,r);if(i)if("solid"===r.fillStyle)if(1===s.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(F(s,r));else n.push($(s,r));return a&&(o?s.forEach((t=>{n.push(S(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 t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":e={d:this.opsToPath(t),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":e=this.fillSketch(t,r)}e&&n.push(e)}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 n of e.ops){const e="number"==typeof r&&r>=0?n.data.map((t=>+t.toFixed(r))):n.data;switch(n.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,o=!1,s){const l=this.gen.arc(t,e,r,n,i,a,o,s);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 o of e){let e=null;switch(o.type){case"path":e=n.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,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(o,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,o,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,o=!1,s){const l=this.gen.arc(t,e,r,n,i,a,o,s);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()}},7148:function(t){!function(e,r){var n={version:"2.14.4",areas:{},apis:{},nsdelim:".",inherit:function(t,e){for(var r in t)e.hasOwnProperty(r)||Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e},stringify:function(t,e){return void 0===t||"function"==typeof t?t+"":JSON.stringify(t,e||n.replace)},parse:function(t,e){try{return JSON.parse(t,e||n.revive)}catch(e){return t}},fn:function(t,e){for(var r in n.storeAPI[t]=e,n.apis)n.apis[r][t]=e},get:function(t,e){return t.getItem(e)},set:function(t,e,r){t.setItem(e,r)},remove:function(t,e){t.removeItem(e)},key:function(t,e){return t.key(e)},length:function(t){return t.length},clear:function(t){t.clear()},Store:function(t,e,r){var i=n.inherit(n.storeAPI,(function(t,e,r){return 0===arguments.length?i.getAll():"function"==typeof e?i.transact(t,e,r):void 0!==e?i.set(t,e,r):"string"==typeof t||"number"==typeof t?i.get(t):"function"==typeof t?i.each(t):t?i.setAll(t,e):i.clear()}));i._id=t;try{var a="__store2_test";e.setItem(a,"ok"),i._area=e,e.removeItem(a)}catch(t){i._area=n.storage("fake")}return i._ns=r||"",n.areas[t]||(n.areas[t]=i._area),n.apis[i._ns+i._id]||(n.apis[i._ns+i._id]=i),i},storeAPI:{area:function(t,e){var r=this[t];return r&&r.area||(r=n.Store(t,e,this._ns),this[t]||(this[t]=r)),r},namespace:function(t,e,r){if(r=r||this._delim||n.nsdelim,!t)return this._ns?this._ns.substring(0,this._ns.length-r.length):"";var i=t,a=this[i];if(!(a&&a.namespace||((a=n.Store(this._id,this._area,this._ns+i+r))._delim=r,this[i]||(this[i]=a),e)))for(var o in n.areas)a.area(o,n.areas[o]);return a},isFake:function(t){return t?(this._real=this._area,this._area=n.storage("fake")):!1===t&&(this._area=this._real||this._area),"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(t){return this._area.has?this._area.has(this._in(t)):!!(this._in(t)in this._area)},size:function(){return this.keys().length},each:function(t,e){for(var r=0,i=n.length(this._area);rn.length(this._area)&&(i--,r--)}return e||this},keys:function(t){return this.each((function(t,e,r){r.push(t)}),t||[])},get:function(t,e){var r,i=n.get(this._area,this._in(t));return"function"==typeof e&&(r=e,e=null),null!==i?n.parse(i,r):null!=e?e:i},getAll:function(t){return this.each((function(t,e,r){r[t]=e}),t||{})},transact:function(t,e,r){var n=this.get(t,r),i=e(n);return this.set(t,void 0===i?n:i),this},set:function(t,e,r){var i,a=this.get(t);return null!=a&&!1===r?e:("function"==typeof r&&(i=r,r=void 0),n.set(this._area,this._in(t),n.stringify(e,i),r)||a)},setAll:function(t,e){var r,n;for(var i in t)n=t[i],this.set(i,n,e)!==n&&(r=!0);return r},add:function(t,e,r){var i=this.get(t);if(i instanceof Array)e=i.concat(e);else if(null!==i){var a=typeof i;if(a===typeof e&&"object"===a){for(var o in e)i[o]=e[o];e=i}else e=i+e}return n.set(this._area,this._in(t),n.stringify(e,r)),e},remove:function(t,e){var r=this.get(t,e);return n.remove(this._area,this._in(t)),r},clear:function(){return this._ns?this.each((function(t){n.remove(this._area,this._in(t))}),1):n.clear(this._area),this},clearAll:function(){var t=this._area;for(var e in n.areas)n.areas.hasOwnProperty(e)&&(this._area=n.areas[e],this.clear());return this._area=t,this},_in:function(t){return"string"!=typeof t&&(t=n.stringify(t)),this._ns?this._ns+t:t},_out:function(t){return this._ns?t&&0===t.indexOf(this._ns)?t.substring(this._ns.length):void 0:t}},storage:function(t){return n.inherit(n.storageAPI,{items:{},name:t})},storageAPI:{length:0,has:function(t){return this.items.hasOwnProperty(t)},key:function(t){var e=0;for(var r in this.items)if(this.has(r)&&t===e++)return r},setItem:function(t,e){this.has(t)||this.length++,this.items[t]=e},removeItem:function(t){this.has(t)&&(delete this.items[t],this.length--)},getItem:function(t){return this.has(t)?this.items[t]:null},clear:function(){for(var t in this.items)this.removeItem(t)}}},i=n.Store("local",function(){try{return localStorage}catch(t){}}());i.local=i,i._=n,i.area("session",function(){try{return sessionStorage}catch(t){}}()),i.area("page",n.storage("page")),"function"==typeof r&&void 0!==r.amd?r("store2",[],(function(){return i})):t.exports?t.exports=i:(e.store&&(n.conflict=e.store),e.store=i)}(this,this&&this.define)},513:(t,e,r)=>{"use strict";function n(t){for(var e=[],r=1;rn})},4852:(t,e,r)=>{"use strict";function n(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r=e)&&(r=e);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 e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);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:()=>Po,l78:()=>x,tlR:()=>m,qrM:()=>Qo,Yu4:()=>ts,IA3:()=>rs,Wi0:()=>is,PGM:()=>as,OEq:()=>ss,y8u:()=>cs,olC:()=>ds,IrU:()=>fs,oDi:()=>ms,Q7f:()=>bs,cVp:()=>Cs,lUB:()=>qo,Lx9:()=>_s,nVG:()=>Fs,uxU:()=>$s,Xf2:()=>Os,GZz:()=>Ns,UPb:()=>Ps,dyv:()=>Rs,bEH:()=>Xr,n8j:()=>Ho,T9B:()=>n,jkA:()=>i,rLf:()=>Go,WH:()=>an,m4Y:()=>Gn,UMr:()=>nn,w7C:()=>ho,zt:()=>co,Ltv:()=>uo,UAC:()=>ci,DCK:()=>qi,TUC:()=>bi,Agd:()=>li,t6C:()=>ii,wXd:()=>oi,ABi:()=>gi,Ui6:()=>Bi,rGn:()=>ki,ucG:()=>ai,YPH:()=>fi,Mol:()=>xi,PGu:()=>yi,GuW:()=>mi});var o=1,s=2,l=3,h=4,c=1e-6;function u(t){return"translate("+t+",0)"}function d(t){return"translate(0,"+t+")"}function p(t){return e=>+t(e)}function f(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function g(){return!this.__axis}function y(t,e){var r=[],n=null,i=null,y=6,m=6,x=3,b="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,k=t===o||t===h?-1:1,C=t===h||t===s?"x":"y",w=t===o||t===l?u:d;function _(u){var d=null==n?e.ticks?e.ticks.apply(e,r):e.domain():n,_=null==i?e.tickFormat?e.tickFormat.apply(e,r):a:i,v=Math.max(y,0)+x,S=e.range(),T=+S[0]+b,A=+S[S.length-1]+b,M=(e.bandwidth?f:p)(e.copy(),b),B=u.selection?u.selection():u,L=B.selectAll(".domain").data([null]),F=B.selectAll(".tick").data(d,e).order(),$=F.exit(),E=F.enter().append("g").attr("class","tick"),D=F.select("line"),O=F.select("text");L=L.merge(L.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),F=F.merge(E),D=D.merge(E.append("line").attr("stroke","currentColor").attr(C+"2",k*y)),O=O.merge(E.append("text").attr("fill","currentColor").attr(C,k*v).attr("dy",t===o?"0em":t===l?"0.71em":"0.32em")),u!==B&&(L=L.transition(u),F=F.transition(u),D=D.transition(u),O=O.transition(u),$=$.transition(u).attr("opacity",c).attr("transform",(function(t){return isFinite(t=M(t))?w(t+b):this.getAttribute("transform")})),E.attr("opacity",c).attr("transform",(function(t){var e=this.parentNode.__axis;return w((e&&isFinite(e=e(t))?e:M(t))+b)}))),$.remove(),L.attr("d",t===h||t===s?m?"M"+k*m+","+T+"H"+b+"V"+A+"H"+k*m:"M"+b+","+T+"V"+A:m?"M"+T+","+k*m+"V"+b+"H"+A+"V"+k*m:"M"+T+","+b+"H"+A),F.attr("opacity",1).attr("transform",(function(t){return w(M(t)+b)})),D.attr(C+"2",k*y),O.attr(C,k*v).text(_),B.filter(g).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===s?"start":t===h?"end":"middle"),B.each((function(){this.__axis=M}))}return _.scale=function(t){return arguments.length?(e=t,_):e},_.ticks=function(){return r=Array.from(arguments),_},_.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),_):r.slice()},_.tickValues=function(t){return arguments.length?(n=null==t?null:Array.from(t),_):n&&n.slice()},_.tickFormat=function(t){return arguments.length?(i=t,_):i},_.tickSize=function(t){return arguments.length?(y=m=+t,_):y},_.tickSizeInner=function(t){return arguments.length?(y=+t,_):y},_.tickSizeOuter=function(t){return arguments.length?(m=+t,_):m},_.tickPadding=function(t){return arguments.length?(x=+t,_):x},_.offset=function(t){return arguments.length?(b=+t,_):b},_}function m(t){return y(o,t)}function x(t){return y(l,t)}function b(){}function k(t){return null==t?b:function(){return this.querySelector(t)}}function C(){return[]}function w(t){return null==t?C:function(){return this.querySelectorAll(t)}}function _(t){return function(){return this.matches(t)}}function v(t){return function(e){return e.matches(t)}}var S=Array.prototype.find;function T(){return this.firstElementChild}var A=Array.prototype.filter;function M(){return Array.from(this.children)}function B(t){return new Array(t.length)}function L(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function F(t,e,r,n,i,a){for(var o,s=0,l=e.length,h=a.length;se?1:t>=e?0:NaN}L.prototype={constructor:L,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 N={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 R(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),N.hasOwnProperty(e)?{space:N[e],local:t}:t}function P(t){return function(){this.removeAttribute(t)}}function K(t){return function(){this.removeAttributeNS(t.space,t.local)}}function z(t,e){return function(){this.setAttribute(t,e)}}function q(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function j(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function W(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 H(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function U(t){return function(){this.style.removeProperty(t)}}function Y(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 V(t,e){return t.style.getPropertyValue(e)||H(t).getComputedStyle(t,null).getPropertyValue(e)}function Z(t){return function(){delete this[t]}}function X(t,e){return function(){this[t]=e}}function Q(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function J(t){return t.trim().split(/^|\s+/)}function tt(t){return t.classList||new et(t)}function et(t){this._node=t,this._names=J(t.getAttribute("class")||"")}function rt(t,e){for(var r=tt(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 Mt(t,e){this._groups=t,this._parents=e}function Bt(){return new Mt([[document.documentElement]],At)}Mt.prototype=Bt.prototype={constructor:Mt,select:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=C&&(C=k+1);!(b=m[C])&&++C=0;)(n=i[a])&&(o&&4^n.compareDocumentPosition(o)&&o.parentNode.insertBefore(n,o),o=n);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=O);for(var r=this._groups,n=r.length,i=new Array(n),a=0;a1?this.each((null==e?U:"function"==typeof e?G:Y)(t,e,null==r?"":r)):V(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Z:"function"==typeof e?Q:X)(t,e)):this.node()[t]},classed:function(t,e){var r=J(t+"");if(arguments.length<2){for(var n=tt(this.node()),i=-1,a=r.length;++i=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?_t:wt,n=0;n{}};function $t(){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}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o0)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(){for(var t,e,r=Nt,n=1/0;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:Nt=e);Rt=t,Jt(n)}(),jt=0}}function Qt(){var t=Ht.now(),e=t-qt;e>1e3&&(Wt-=e,qt=t)}function Jt(t){Pt||(Kt&&(Kt=clearTimeout(Kt)),t-jt>24?(t<1/0&&(Kt=setTimeout(Xt,t-Ht.now()-Wt)),zt&&(zt=clearInterval(zt))):(zt||(qt=Ht.now(),zt=setInterval(Qt,1e3)),Pt=1,Ut(Xt)))}function te(t,e,r){var n=new Vt;return e=null==e?0:+e,n.restart((r=>{n.stop(),t(r+e)}),e,r),n}Vt.prototype=Zt.prototype={constructor:Vt,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Yt():+r)+(null==e?0:+e),this._next||Rt===this||(Rt?Rt._next=this:Nt=this,Rt=this),this._call=t,this._time=r,Jt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jt())}};var ee=It("start","end","cancel","interrupt"),re=[];function ne(t,e,r,n,i,a){var o=t.__transition;if(o){if(r in o)return}else t.__transition={};!function(t,e,r){var n,i=t.__transition;function a(l){var h,c,u,d;if(1!==r.state)return s();for(h in i)if((d=i[h]).name===r.name){if(3===d.state)return te(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+h0)throw new Error("too late; already scheduled");return r}function ae(t,e){var r=oe(t,e);if(r.state>3)throw new Error("too late; already running");return r}function oe(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function se(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var le,he=180/Math.PI,ce={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ue(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:se(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:se(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:se(t,r)},{i:s-2,x:se(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=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?Re(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Re(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 ze(e[1],e[2],e[3],1):(e=Me.exec(t))?new ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Be.exec(t))?Re(e[1],e[2],e[3],e[4]):(e=Le.exec(t))?Re(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Fe.exec(t))?Ye(e[1],e[2]/100,e[3]/100,1):(e=$e.exec(t))?Ye(e[1],e[2]/100,e[3]/100,e[4]):Ee.hasOwnProperty(t)?Ne(Ee[t]):"transparent"===t?new ze(NaN,NaN,NaN,0):null}function Ne(t){return new ze(t>>16&255,t>>8&255,255&t,1)}function Re(t,e,r,n){return n<=0&&(t=e=r=NaN),new ze(t,e,r,n)}function Pe(t){return t instanceof ke||(t=Ie(t)),t?new ze((t=t.rgb()).r,t.g,t.b,t.opacity):new ze}function Ke(t,e,r,n){return 1===arguments.length?Pe(t):new ze(t,e,r,null==n?1:n)}function ze(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function qe(){return`#${Ue(this.r)}${Ue(this.g)}${Ue(this.b)}`}function je(){const t=We(this.opacity);return`${1===t?"rgb(":"rgba("}${He(this.r)}, ${He(this.g)}, ${He(this.b)}${1===t?")":`, ${t})`}`}function We(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function He(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ue(t){return((t=He(t))<16?"0":"")+t.toString(16)}function Ye(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Ve(t,e,r,n)}function Ge(t){if(t instanceof Ve)return new Ve(t.h,t.s,t.l,t.opacity);if(t instanceof ke||(t=Ie(t)),!t)return new Ve;if(t instanceof Ve)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),o=NaN,s=a-i,l=(a+i)/2;return s?(o=e===a?(r-n)/s+6*(r0&&l<1?0:o,new Ve(o,s,l,t.opacity)}function Ve(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function Ze(t){return(t=(t||0)%360)<0?t+360:t}function Xe(t){return Math.max(0,Math.min(1,t||0))}function Qe(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 Je(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}xe(ke,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:Oe,toString:Oe}),xe(ze,Ke,be(ke,{brighter(t){return t=null==t?we:Math.pow(we,t),new ze(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Ce:Math.pow(Ce,t),new ze(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ze(He(this.r),He(this.g),He(this.b),We(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qe,formatHex:qe,formatHex8:function(){return`#${Ue(this.r)}${Ue(this.g)}${Ue(this.b)}${Ue(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:je,toString:je})),xe(Ve,(function(t,e,r,n){return 1===arguments.length?Ge(t):new Ve(t,e,r,null==n?1:n)}),be(ke,{brighter(t){return t=null==t?we:Math.pow(we,t),new Ve(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ce:Math.pow(Ce,t),new Ve(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 ze(Qe(t>=240?t-240:t+120,i,n),Qe(t,i,n),Qe(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Ve(Ze(this.h),Xe(this.s),Xe(this.l),We(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=We(this.opacity);return`${1===t?"hsl(":"hsla("}${Ze(this.h)}, ${100*Xe(this.s)}%, ${100*Xe(this.l)}%${1===t?")":`, ${t})`}`}}));const tr=t=>()=>t;function er(t,e){return function(r){return t+r*e}}function rr(t,e){var r=e-t;return r?er(t,r):tr(isNaN(t)?e:t)}const nr=function t(e){var r=function(t){return 1==(t=+t)?rr: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):tr(isNaN(e)?r:e)}}(e);function n(t,e){var n=r((t=Ke(t)).r,(e=Ke(e)).r),i=r(t.g,e.g),a=r(t.b,e.b),o=rr(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return n.gamma=t,n}(1);function ir(t){return function(e){var r,n,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],o=n>0?t[n-1]:2*i-a,s=na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:se(r,n)})),a=or.lastIndex;return a=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ie:ae;return function(){var o=a(this,t),s=o.on;s!==n&&(i=(n=s).copy()).on(e,r),o.on=i}}(r,t,e))},attr:function(t,e){var r=R(t),n="transform"===r?fe:lr;return this.attrTween(t,"function"==typeof e?(r.local?fr:pr)(r,n,me(this,"attr."+t,e)):null==e?(r.local?cr:hr)(r):(r.local?dr:ur)(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=R(t);return this.tween(r,(n.local?gr:yr)(n,e))},style:function(t,e,r){var n="transform"==(t+="")?pe:lr;return null==e?this.styleTween(t,function(t,e){var r,n,i;return function(){var a=V(this,t),o=(this.style.removeProperty(t),V(this,t));return a===o?null:a===r&&o===n?i:i=e(r=a,n=o)}}(t,n)).on("end.style."+t,wr(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var n,i,a;return function(){var o=V(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=V(this,t)),o===l?null:o===n&&l===i?a:(i=l,a=e(n=o,s))}}(t,n,me(this,"style."+t,e))).each(function(t,e){var r,n,i,a,o="style."+e,s="end."+o;return function(){var l=ae(this,t),h=l.on,c=null==l.value[o]?a||(a=wr(e)):void 0;h===r&&i===c||(n=(r=h).copy()).on(s,i=c),l.on=n}}(this._id,t)):this.styleTween(t,function(t,e,r){var n,i,a=r+"";return function(){var o=V(this,t);return o===a?null:o===n?i:i=e(n=o,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}}(me(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=oe(this.node(),r).tween,a=0,o=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]):o=!1;o&&delete t.__transition}}(this,t)}))},Lt.prototype.transition=function(t){var e,r;t instanceof vr?(e=t._id,t=t._name):(e=Sr(),(r=Ar).time=Yt(),t=null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;aKr?Math.pow(t,1/3):t/Pr+Nr}function Wr(t){return t>Rr?t*t*t:Pr*(t-Nr)}function Hr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ur(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Yr(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof Gr)return new Gr(t.h,t.c,t.l,t.opacity);if(t instanceof qr||(t=zr(t)),0===t.a&&0===t.b)return new Gr(NaN,0180||r<-180?r-360*Math.round(r/360):r):tr(isNaN(t)?e:t)}));function Qr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}Zr(rr);class Jr extends Map{constructor(t,e=en){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(tn(this,t))}has(t){return super.has(tn(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}(this,t))}}function tn({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function en(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const rn=Symbol("implicit");function nn(){var t=new Jr,e=[],r=[],n=rn;function i(i){let a=t.get(i);if(void 0===a){if(n!==rn)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 Jr;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 nn(e,r).unknown(n)},Qr.apply(i,arguments),i}function an(){var t,e,r=nn().unknown(void 0),n=r.domain,i=r.range,a=0,o=1,s=!1,l=0,h=0,c=.5;function u(){var r=n().length,u=o=on?10:a>=sn?5:a>=ln?2:1;let s,l,h;return i<0?(h=Math.pow(10,-i)/o,s=Math.round(t*h),l=Math.round(e*h),s/he&&--l,h=-h):(h=Math.pow(10,i)*o,s=Math.round(t/h),l=Math.round(e/h),s*he&&--l),le?1:t>=e?0:NaN}function pn(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function fn(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(idn(t(e),r),n=(e,r)=>t(e)-r):(e=t===dn||t===pn?t:gn,r=t,n=t),{left:i,center:function(t,e,r=0,a=t.length){const o=i(t,e,r,a-1);return o>r&&n(t[o-1],e)>-n(t[o],e)?o-1:o},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),h=function(r){return Math.max(t,Math.min(e,r))}),n=l>2?Ln:Bn,i=a=null,u}function u(e){return null==e||isNaN(e=+e)?r:(i||(i=n(o.map(t),s,l)))(t(h(e)))}return u.invert=function(r){return h(e((a||(a=n(s,o.map(t),se)))(r)))},u.domain=function(t){return arguments.length?(o=Array.from(t,Sn),c()):o.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=vn,c()},u.clamp=function(t){return arguments.length?(h=!!t||An,c()):h!==An},u.interpolate=function(t){return arguments.length?(l=t,c()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,n){return t=r,e=n,c()}}()(An,An)}var En,Dn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function On(t){if(!(e=Dn.exec(t)))throw new Error("invalid format: "+t);var e;return new In({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 In(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 Nn(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Rn(t){return(t=Nn(Math.abs(t)))?t[1]:NaN}function Pn(t,e){var r=Nn(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")}On.prototype=In.prototype,In.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 Kn={"%":(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)=>Pn(100*t,e),r:Pn,s:function(t,e){var r=Nn(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(En=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Nn(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function zn(t){return t}var qn,jn,Wn,Hn=Array.prototype.map,Un=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Yn(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 s=a-i+1,l=new Array(s);if(n)if(o<0)for(let t=0;t0;){if((i=cn(l,h,r))===n)return a[o]=l,a[s]=h,e(a);if(i>0)l=Math.floor(l/i)*i,h=Math.ceil(h/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,h=Math.floor(h*i)/i}n=i}return t},t}function Gn(){var t=$n();return t.copy=function(){return Fn(t,Gn())},Qr.apply(t,arguments),Yn(t)}qn=function(t){var e,r,n=void 0===t.grouping||void 0===t.thousands?zn:(e=Hn.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(r)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?zn:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Hn.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",h=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=On(t)).fill,r=t.align,u=t.sign,d=t.symbol,p=t.zero,f=t.width,g=t.comma,y=t.precision,m=t.trim,x=t.type;"n"===x?(g=!0,x="g"):Kn[x]||(void 0===y&&(y=12),m=!0,x="g"),(p||"0"===e&&"="===r)&&(p=!0,e="0",r="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",k="$"===d?a:/[%p]/.test(x)?l:"",C=Kn[x],w=/[defgprs%]/.test(x);function _(t){var i,a,l,d=b,_=k;if("c"===x)_=C(t)+_,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:C(Math.abs(t),y),m&&(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)),v&&0==+t&&"+"!==u&&(v=!1),d=(v?"("===u?u:h:"-"===u||"("===u?"":u)+d,_=("s"===x?Un[8+En/3]:"")+_+(v&&"("===u?")":""),w)for(i=-1,a=t.length;++i(l=t.charCodeAt(i))||l>57){_=(46===l?o+t.slice(i+1):t.slice(i))+_,t=t.slice(0,i);break}}g&&!p&&(t=n(t,1/0));var S=d.length+t.length+_.length,T=S>1)+d+t+_+T.slice(S);break;default:t=T+d+t+_}return s(t)}return y=void 0===y?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),_.toString=function(){return t+""},_}return{format:u,formatPrefix:function(t,e){var r=u(((t=On(t)).type="f",t)),n=3*Math.max(-8,Math.min(8,Math.floor(Rn(e)/3))),i=Math.pow(10,-n),a=Un[8+n/3];return function(t){return r(i*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),jn=qn.format,Wn=qn.formatPrefix;const Vn=1e3,Zn=6e4,Xn=36e5,Qn=864e5,Jn=6048e5,ti=31536e6,ei=new Date,ri=new Date;function ni(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 o=[];if(r=i.ceil(r),a=null==a?1:Math.floor(a),!(r0))return o;let s;do{o.push(s=new Date(+r)),e(r,a),t(r)}while(sni((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)=>(ei.setTime(+e),ri.setTime(+n),t(ei),t(ri),Math.floor(r(ei,ri))),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 ii=ni((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));ii.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?ni((e=>{e.setTime(Math.floor(e/t)*t)}),((e,r)=>{e.setTime(+e+r*t)}),((e,r)=>(r-e)/t)):ii:null),ii.range;const ai=ni((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*Vn)}),((t,e)=>(e-t)/Vn),(t=>t.getUTCSeconds())),oi=(ai.range,ni((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Vn)}),((t,e)=>{t.setTime(+t+e*Zn)}),((t,e)=>(e-t)/Zn),(t=>t.getMinutes()))),si=(oi.range,ni((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*Zn)}),((t,e)=>(e-t)/Zn),(t=>t.getUTCMinutes()))),li=(si.range,ni((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Vn-t.getMinutes()*Zn)}),((t,e)=>{t.setTime(+t+e*Xn)}),((t,e)=>(e-t)/Xn),(t=>t.getHours()))),hi=(li.range,ni((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*Xn)}),((t,e)=>(e-t)/Xn),(t=>t.getUTCHours()))),ci=(hi.range,ni((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Zn)/Qn),(t=>t.getDate()-1))),ui=(ci.range,ni((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Qn),(t=>t.getUTCDate()-1))),di=(ui.range,ni((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Qn),(t=>Math.floor(t/Qn))));function pi(t){return ni((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())*Zn)/Jn))}di.range;const fi=pi(0),gi=pi(1),yi=pi(2),mi=pi(3),xi=pi(4),bi=pi(5),ki=pi(6);function Ci(t){return ni((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)/Jn))}fi.range,gi.range,yi.range,mi.range,xi.range,bi.range,ki.range;const wi=Ci(0),_i=Ci(1),vi=Ci(2),Si=Ci(3),Ti=Ci(4),Ai=Ci(5),Mi=Ci(6),Bi=(wi.range,_i.range,vi.range,Si.range,Ti.range,Ai.range,Mi.range,ni((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()))),Li=(Bi.range,ni((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()))),Fi=(Li.range,ni((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())));Fi.every=t=>isFinite(t=Math.floor(t))&&t>0?ni((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,Fi.range;const $i=ni((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()));function Ei(t,e,r,n,i,a){const o=[[ai,1,Vn],[ai,5,5e3],[ai,15,15e3],[ai,30,3e4],[a,1,Zn],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,Xn],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,Qn],[n,2,1728e5],[r,1,Jn],[e,1,2592e6],[e,3,7776e6],[t,1,ti]];function s(e,r,n){const i=Math.abs(r-e)/n,a=fn((([,,t])=>t)).right(o,i);if(a===o.length)return t.every(un(e/ti,r/ti,n));if(0===a)return ii.every(Math.max(un(e,r,n),1));const[s,l]=o[i/o[a-1][2]isFinite(t=Math.floor(t))&&t>0?ni((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,$i.range;const[Di,Oi]=Ei($i,Li,wi,di,hi,si),[Ii,Ni]=Ei(Fi,Bi,fi,ci,li,oi);function Ri(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Pi(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ki(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var zi,qi,ji={"-":"",_:" ",0:"0"},Wi=/^\s*\d+/,Hi=/^%/,Ui=/[\\^$*+?|[\]().{}]/g;function Yi(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a[t.toLowerCase(),e])))}function Xi(t,e,r){var n=Wi.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function Qi(t,e,r){var n=Wi.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function Ji(t,e,r){var n=Wi.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function ta(t,e,r){var n=Wi.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function ea(t,e,r){var n=Wi.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function ra(t,e,r){var n=Wi.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function na(t,e,r){var n=Wi.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function ia(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 aa(t,e,r){var n=Wi.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function oa(t,e,r){var n=Wi.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function sa(t,e,r){var n=Wi.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function la(t,e,r){var n=Wi.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function ha(t,e,r){var n=Wi.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function ca(t,e,r){var n=Wi.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function ua(t,e,r){var n=Wi.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function da(t,e,r){var n=Wi.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function pa(t,e,r){var n=Wi.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function fa(t,e,r){var n=Hi.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function ga(t,e,r){var n=Wi.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function ya(t,e,r){var n=Wi.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function ma(t,e){return Yi(t.getDate(),e,2)}function xa(t,e){return Yi(t.getHours(),e,2)}function ba(t,e){return Yi(t.getHours()%12||12,e,2)}function ka(t,e){return Yi(1+ci.count(Fi(t),t),e,3)}function Ca(t,e){return Yi(t.getMilliseconds(),e,3)}function wa(t,e){return Ca(t,e)+"000"}function _a(t,e){return Yi(t.getMonth()+1,e,2)}function va(t,e){return Yi(t.getMinutes(),e,2)}function Sa(t,e){return Yi(t.getSeconds(),e,2)}function Ta(t){var e=t.getDay();return 0===e?7:e}function Aa(t,e){return Yi(fi.count(Fi(t)-1,t),e,2)}function Ma(t){var e=t.getDay();return e>=4||0===e?xi(t):xi.ceil(t)}function Ba(t,e){return t=Ma(t),Yi(xi.count(Fi(t),t)+(4===Fi(t).getDay()),e,2)}function La(t){return t.getDay()}function Fa(t,e){return Yi(gi.count(Fi(t)-1,t),e,2)}function $a(t,e){return Yi(t.getFullYear()%100,e,2)}function Ea(t,e){return Yi((t=Ma(t)).getFullYear()%100,e,2)}function Da(t,e){return Yi(t.getFullYear()%1e4,e,4)}function Oa(t,e){var r=t.getDay();return Yi((t=r>=4||0===r?xi(t):xi.ceil(t)).getFullYear()%1e4,e,4)}function Ia(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Yi(e/60|0,"0",2)+Yi(e%60,"0",2)}function Na(t,e){return Yi(t.getUTCDate(),e,2)}function Ra(t,e){return Yi(t.getUTCHours(),e,2)}function Pa(t,e){return Yi(t.getUTCHours()%12||12,e,2)}function Ka(t,e){return Yi(1+ui.count($i(t),t),e,3)}function za(t,e){return Yi(t.getUTCMilliseconds(),e,3)}function qa(t,e){return za(t,e)+"000"}function ja(t,e){return Yi(t.getUTCMonth()+1,e,2)}function Wa(t,e){return Yi(t.getUTCMinutes(),e,2)}function Ha(t,e){return Yi(t.getUTCSeconds(),e,2)}function Ua(t){var e=t.getUTCDay();return 0===e?7:e}function Ya(t,e){return Yi(wi.count($i(t)-1,t),e,2)}function Ga(t){var e=t.getUTCDay();return e>=4||0===e?Ti(t):Ti.ceil(t)}function Va(t,e){return t=Ga(t),Yi(Ti.count($i(t),t)+(4===$i(t).getUTCDay()),e,2)}function Za(t){return t.getUTCDay()}function Xa(t,e){return Yi(_i.count($i(t)-1,t),e,2)}function Qa(t,e){return Yi(t.getUTCFullYear()%100,e,2)}function Ja(t,e){return Yi((t=Ga(t)).getUTCFullYear()%100,e,2)}function to(t,e){return Yi(t.getUTCFullYear()%1e4,e,4)}function eo(t,e){var r=t.getUTCDay();return Yi((t=r>=4||0===r?Ti(t):Ti.ceil(t)).getUTCFullYear()%1e4,e,4)}function ro(){return"+0000"}function no(){return"%"}function io(t){return+t}function ao(t){return Math.floor(+t/1e3)}function oo(t){return new Date(t)}function so(t){return t instanceof Date?+t:+new Date(+t)}function lo(t,e,r,n,i,a,o,s,l,h){var c=$n(),u=c.invert,d=c.domain,p=h(".%L"),f=h(":%S"),g=h("%I:%M"),y=h("%I %p"),m=h("%a %d"),x=h("%b %d"),b=h("%B"),k=h("%Y");function C(t){return(l(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:io,s:ao,S:Sa,u:Ta,U:Aa,V:Ba,w:La,W:Fa,x:null,X:null,y:$a,Y:Da,Z:Ia,"%":no},k={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Na,e:Na,f:qa,g:Ja,G:eo,H:Ra,I:Pa,j:Ka,L:za,m:ja,M:Wa,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:io,s:ao,S:Ha,u:Ua,U:Ya,V:Va,w:Za,W:Xa,x:null,X:null,y:Qa,Y:to,Z:ro,"%":no},C={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=m.exec(e.slice(r));return n?(t.m=x.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=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,r,n){return v(t,e,r,n)},d:sa,e:sa,f:pa,g:na,G:ra,H:ha,I:ha,j:la,L:da,m:oa,M:ca,p:function(t,e,r){var n=h.exec(e.slice(r));return n?(t.p=c.get(n[0].toLowerCase()),r+n[0].length):-1},q:aa,Q:ga,s:ya,S:ua,u:Qi,U:Ji,V:ta,w:Xi,W:ea,x:function(t,e,n){return v(t,r,e,n)},X:function(t,e,r){return v(t,n,e,r)},y:na,Y:ra,Z:ia,"%":fa};function w(t,e){return function(r){var n,i,a,o=[],s=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in a||(a.w=1),"Z"in a?(i=(n=Pi(Ki(a.y,0,1))).getUTCDay(),n=i>4||0===i?_i.ceil(n):_i(n),n=ui.offset(n,7*(a.V-1)),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(i=(n=Ri(Ki(a.y,0,1))).getDay(),n=i>4||0===i?gi.ceil(n):gi(n),n=ci.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?Pi(Ki(a.y,0,1)).getUTCDay():Ri(Ki(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,Pi(a)):Ri(a)}}function v(t,e,r,n){for(var i,a,o=0,s=e.length,l=r.length;o=l)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=C[i in ji?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return b.x=w(r,b),b.X=w(n,b),b.c=w(e,b),k.x=w(r,k),k.X=w(n,k),k.c=w(e,k),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=_(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",k);return e.toString=function(){return t},e},utcParse:function(t){var e=_(t+="",!0);return e.toString=function(){return t},e}}}({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"]}),qi=zi.format,zi.parse,zi.utcFormat,zi.utcParse;const co=function(t){for(var e=new Array(10),r=0;r<10;)e[r]="#"+t.slice(6*r,6*++r);return e}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function uo(t){return"string"==typeof t?new Mt([[document.querySelector(t)]],[document.documentElement]):new Mt([[t]],At)}function po(t){return function(){return t}}const fo=Math.abs,go=Math.atan2,yo=Math.cos,mo=Math.max,xo=Math.min,bo=Math.sin,ko=Math.sqrt,Co=1e-12,wo=Math.PI,_o=wo/2,vo=2*wo;function So(t){return t>=1?_o:t<=-1?-_o:Math.asin(t)}const To=Math.PI,Ao=2*To,Mo=1e-6,Bo=Ao-Mo;function Lo(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Lo;const r=10**e;return function(t){this._+=t[0];for(let e=1,n=t.length;eMo)if(Math.abs(c*s-l*h)>Mo&&i){let d=r-a,p=n-o,f=s*s+l*l,g=d*d+p*p,y=Math.sqrt(f),m=Math.sqrt(u),x=i*Math.tan((To-Math.acos((f+u-g)/(2*y*m)))/2),b=x/m,k=x/y;Math.abs(b-1)>Mo&&this._append`L${t+b*h},${e+b*c}`,this._append`A${i},${i},0,0,${+(c*d>h*p)},${this._x1=t+k*s},${this._y1=e+k*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,r,n,i,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(n),s=r*Math.sin(n),l=t+o,h=e+s,c=1^a,u=a?n-i:i-n;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>Mo||Math.abs(this._y1-h)>Mo)&&this._append`L${l},${h}`,r&&(u<0&&(u=u%Ao+Ao),u>Bo?this._append`A${r},${r},0,1,${c},${t-o},${e-s}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:u>Mo&&this._append`A${r},${r},0,${+(u>=To)},${c},${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 $o(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 Fo(e)}function Eo(t){return t.innerRadius}function Do(t){return t.outerRadius}function Oo(t){return t.startAngle}function Io(t){return t.endAngle}function No(t){return t&&t.padAngle}function Ro(t,e,r,n,i,a,o){var s=t-r,l=e-n,h=(o?a:-a)/ko(s*s+l*l),c=h*l,u=-h*s,d=t+c,p=e+u,f=r+c,g=n+u,y=(d+f)/2,m=(p+g)/2,x=f-d,b=g-p,k=x*x+b*b,C=i-a,w=d*g-f*p,_=(b<0?-1:1)*ko(mo(0,C*C*k-w*w)),v=(w*b-x*_)/k,S=(-w*x-b*_)/k,T=(w*b+x*_)/k,A=(-w*x+b*_)/k,M=v-y,B=S-m,L=T-y,F=A-m;return M*M+B*B>L*L+F*F&&(v=T,S=A),{cx:v,cy:S,x01:-c,y01:-u,x11:v*(i/C-1),y11:S*(i/C-1)}}function Po(){var t=Eo,e=Do,r=po(0),n=null,i=Oo,a=Io,o=No,s=null,l=$o(h);function h(){var h,c,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=i.apply(this,arguments)-_o,g=a.apply(this,arguments)-_o,y=fo(g-f),m=g>f;if(s||(s=h=l()),pCo)if(y>vo-Co)s.moveTo(p*yo(f),p*bo(f)),s.arc(0,0,p,f,g,!m),d>Co&&(s.moveTo(d*yo(g),d*bo(g)),s.arc(0,0,d,g,f,m));else{var x,b,k=f,C=g,w=f,_=g,v=y,S=y,T=o.apply(this,arguments)/2,A=T>Co&&(n?+n.apply(this,arguments):ko(d*d+p*p)),M=xo(fo(p-d)/2,+r.apply(this,arguments)),B=M,L=M;if(A>Co){var F=So(A/d*bo(T)),$=So(A/p*bo(T));(v-=2*F)>Co?(w+=F*=m?1:-1,_-=F):(v=0,w=_=(f+g)/2),(S-=2*$)>Co?(k+=$*=m?1:-1,C-=$):(S=0,k=C=(f+g)/2)}var E=p*yo(k),D=p*bo(k),O=d*yo(_),I=d*bo(_);if(M>Co){var N,R=p*yo(C),P=p*bo(C),K=d*yo(w),z=d*bo(w);if(y1?0:u<-1?wo:Math.acos(u))/2),Y=ko(N[0]*N[0]+N[1]*N[1]);B=xo(M,(d-Y)/(U-1)),L=xo(M,(p-Y)/(U+1))}else B=L=0}S>Co?L>Co?(x=Ro(K,z,E,D,p,L,m),b=Ro(R,P,O,I,p,L,m),s.moveTo(x.cx+x.x01,x.cy+x.y01),LCo&&v>Co?B>Co?(x=Ro(O,I,R,P,d,-B,m),b=Ro(E,D,K,z,d,-B,m),s.lineTo(x.cx+x.x01,x.cy+x.y01),Bt?1:e>=t?0:NaN}function Yo(t){return t}function Go(){var t=Yo,e=Uo,r=null,n=po(0),i=po(vo),a=po(0);function o(o){var s,l,h,c,u,d=(o=Ko(o)).length,p=0,f=new Array(d),g=new Array(d),y=+n.apply(this,arguments),m=Math.min(vo,Math.max(-vo,i.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/d,a.apply(this,arguments)),b=x*(m<0?-1:1);for(s=0;s0&&(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(o[t],o[e])})),s=0,h=p?(m-d*b)/p:0;s0?u*h:0)+b,g[l]={data:o[l],index:s,value:u,startAngle:y,endAngle:c,padAngle:x};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:po(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,r=null,o):e},o.sort=function(t){return arguments.length?(r=t,e=null,o):r},o.startAngle=function(t){return arguments.length?(n="function"==typeof t?t:po(+t),o):n},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:po(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:po(+t),o):a},o}function Vo(){}function Zo(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 Xo(t){this._context=t}function Qo(t){return new Xo(t)}function Jo(t){this._context=t}function ts(t){return new Jo(t)}function es(t){this._context=t}function rs(t){return new es(t)}Fo.prototype,Array.prototype.slice,zo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Xo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Zo(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:Zo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Jo.prototype={areaStart:Vo,areaEnd:Vo,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:Zo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},es.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:Zo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class ns{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 is(t){return new ns(t,!0)}function as(t){return new ns(t,!1)}function os(t,e){this._basis=new Xo(t),this._beta=e}os.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],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const ss=function t(e){function r(t){return 1===e?new Xo(t):new os(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function ls(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 hs(t,e){this._context=t,this._k=(1-e)/6}hs.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:ls(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:ls(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 cs=function t(e){function r(t){return new hs(t,e)}return r.tension=function(e){return t(+e)},r}(0);function us(t,e){this._context=t,this._k=(1-e)/6}us.prototype={areaStart:Vo,areaEnd:Vo,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:ls(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 ds=function t(e){function r(t){return new us(t,e)}return r.tension=function(e){return t(+e)},r}(0);function ps(t,e){this._context=t,this._k=(1-e)/6}ps.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:ls(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 fs=function t(e){function r(t){return new ps(t,e)}return r.tension=function(e){return t(+e)},r}(0);function gs(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Co){var s=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*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Co){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function ys(t,e){this._context=t,this._alpha=e}ys.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:gs(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 ms=function t(e){function r(t){return e?new ys(t,e):new hs(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function xs(t,e){this._context=t,this._alpha=e}xs.prototype={areaStart:Vo,areaEnd:Vo,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:gs(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 bs=function t(e){function r(t){return e?new xs(t,e):new us(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function ks(t,e){this._context=t,this._alpha=e}ks.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:gs(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 Cs=function t(e){function r(t){return e?new ks(t,e):new ps(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function ws(t){this._context=t}function _s(t){return new ws(t)}function vs(t){return t<0?-1:1}function Ss(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(vs(a)+vs(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ts(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function As(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function Ms(t){this._context=t}function Bs(t){this._context=new Ls(t)}function Ls(t){this._context=t}function Fs(t){return new Ms(t)}function $s(t){return new Bs(t)}function Es(t){this._context=t}function Ds(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[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}},Ks.prototype={constructor:Ks,scale:function(t){return 1===t?this:new Ks(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ks(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 Ks(1,0,0),Ks.prototype},9418:(t,e,r)=>{"use strict";r.d(e,{A:()=>tt});const{entries:n,setPrototypeOf:i,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:s}=Object;let{freeze:l,seal:h,create:c}=Object,{apply:u,construct:d}="undefined"!=typeof Reflect&&Reflect;l||(l=function(t){return t}),h||(h=function(t){return t}),u||(u=function(t,e,r){return t.apply(e,r)}),d||(d=function(t,e){return new t(...e)});const p=T(Array.prototype.forEach),f=T(Array.prototype.pop),g=T(Array.prototype.push),y=T(String.prototype.toLowerCase),m=T(String.prototype.toString),x=T(String.prototype.match),b=T(String.prototype.replace),k=T(String.prototype.indexOf),C=T(String.prototype.trim),w=T(Object.prototype.hasOwnProperty),_=T(RegExp.prototype.test),v=(S=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r1?r-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:y;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 M(t){for(let e=0;e/gm),W=h(/\$\{[\w\W]*}/gm),H=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),U=h(/^aria-[\-\w]+$/),Y=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=h(/^(?:\w+script|data):/i),V=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=h(/^html$/i),X=h(/^[a-z][.\w]*(-[.\w]+)+$/i);var Q=Object.freeze({__proto__:null,ARIA_ATTR:U,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:X,DATA_ATTR:H,DOCTYPE_NAME:Z,ERB_EXPR:j,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:G,MUSTACHE_EXPR:q,TMPLIT_EXPR:W});const J=function(){return"undefined"==typeof window?null:window};var tt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J();const r=e=>t(e);if(r.version="3.2.3",r.removed=[],!e||!e.document||9!==e.document.nodeType)return r.isSupported=!1,r;let{document:i}=e;const a=i,o=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:h,Node:u,Element:d,NodeFilter:S,NamedNodeMap:T=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:M,DOMParser:q,trustedTypes:j}=e,W=d.prototype,H=L(W,"cloneNode"),U=L(W,"remove"),G=L(W,"nextSibling"),V=L(W,"childNodes"),X=L(W,"parentNode");if("function"==typeof h){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let tt,et="";const{implementation:rt,createNodeIterator:nt,createDocumentFragment:it,getElementsByTagName:at}=i,{importNode:ot}=a;let st={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof n&&"function"==typeof X&&rt&&void 0!==rt.createHTMLDocument;const{MUSTACHE_EXPR:lt,ERB_EXPR:ht,TMPLIT_EXPR:ct,DATA_ATTR:ut,ARIA_ATTR:dt,IS_SCRIPT_OR_DATA:pt,ATTR_WHITESPACE:ft,CUSTOM_ELEMENT:gt}=Q;let{IS_ALLOWED_URI:yt}=Q,mt=null;const xt=A({},[...F,...$,...E,...O,...N]);let bt=null;const kt=A({},[...R,...P,...K,...z]);let Ct=Object.seal(c(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}})),wt=null,_t=null,vt=!0,St=!0,Tt=!1,At=!0,Mt=!1,Bt=!0,Lt=!1,Ft=!1,$t=!1,Et=!1,Dt=!1,Ot=!1,It=!0,Nt=!1,Rt=!0,Pt=!1,Kt={},zt=null;const qt=A({},["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 jt=null;const Wt=A({},["audio","video","img","source","image","track"]);let Ht=null;const Ut=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Yt="http://www.w3.org/1998/Math/MathML",Gt="http://www.w3.org/2000/svg",Vt="http://www.w3.org/1999/xhtml";let Zt=Vt,Xt=!1,Qt=null;const Jt=A({},[Yt,Gt,Vt],m);let te=A({},["mi","mo","mn","ms","mtext"]),ee=A({},["annotation-xml"]);const re=A({},["title","style","font","a","script"]);let ne=null;const ie=["application/xhtml+xml","text/html"];let ae=null,oe=null;const se=i.createElement("form"),le=function(t){return t instanceof RegExp||t instanceof Function},he=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!oe||oe!==t){if(t&&"object"==typeof t||(t={}),t=B(t),ne=-1===ie.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,ae="application/xhtml+xml"===ne?m:y,mt=w(t,"ALLOWED_TAGS")?A({},t.ALLOWED_TAGS,ae):xt,bt=w(t,"ALLOWED_ATTR")?A({},t.ALLOWED_ATTR,ae):kt,Qt=w(t,"ALLOWED_NAMESPACES")?A({},t.ALLOWED_NAMESPACES,m):Jt,Ht=w(t,"ADD_URI_SAFE_ATTR")?A(B(Ut),t.ADD_URI_SAFE_ATTR,ae):Ut,jt=w(t,"ADD_DATA_URI_TAGS")?A(B(Wt),t.ADD_DATA_URI_TAGS,ae):Wt,zt=w(t,"FORBID_CONTENTS")?A({},t.FORBID_CONTENTS,ae):qt,wt=w(t,"FORBID_TAGS")?A({},t.FORBID_TAGS,ae):{},_t=w(t,"FORBID_ATTR")?A({},t.FORBID_ATTR,ae):{},Kt=!!w(t,"USE_PROFILES")&&t.USE_PROFILES,vt=!1!==t.ALLOW_ARIA_ATTR,St=!1!==t.ALLOW_DATA_ATTR,Tt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Mt=t.SAFE_FOR_TEMPLATES||!1,Bt=!1!==t.SAFE_FOR_XML,Lt=t.WHOLE_DOCUMENT||!1,Et=t.RETURN_DOM||!1,Dt=t.RETURN_DOM_FRAGMENT||!1,Ot=t.RETURN_TRUSTED_TYPE||!1,$t=t.FORCE_BODY||!1,It=!1!==t.SANITIZE_DOM,Nt=t.SANITIZE_NAMED_PROPS||!1,Rt=!1!==t.KEEP_CONTENT,Pt=t.IN_PLACE||!1,yt=t.ALLOWED_URI_REGEXP||Y,Zt=t.NAMESPACE||Vt,te=t.MATHML_TEXT_INTEGRATION_POINTS||te,ee=t.HTML_INTEGRATION_POINTS||ee,Ct=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&le(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ct.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&le(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ct.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ct.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Mt&&(St=!1),Dt&&(Et=!0),Kt&&(mt=A({},N),bt=[],!0===Kt.html&&(A(mt,F),A(bt,R)),!0===Kt.svg&&(A(mt,$),A(bt,P),A(bt,z)),!0===Kt.svgFilters&&(A(mt,E),A(bt,P),A(bt,z)),!0===Kt.mathMl&&(A(mt,O),A(bt,K),A(bt,z))),t.ADD_TAGS&&(mt===xt&&(mt=B(mt)),A(mt,t.ADD_TAGS,ae)),t.ADD_ATTR&&(bt===kt&&(bt=B(bt)),A(bt,t.ADD_ATTR,ae)),t.ADD_URI_SAFE_ATTR&&A(Ht,t.ADD_URI_SAFE_ATTR,ae),t.FORBID_CONTENTS&&(zt===qt&&(zt=B(zt)),A(zt,t.FORBID_CONTENTS,ae)),Rt&&(mt["#text"]=!0),Lt&&A(mt,["html","head","body"]),mt.table&&(A(mt,["tbody"]),delete wt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');tt=t.TRUSTED_TYPES_POLICY,et=tt.createHTML("")}else void 0===tt&&(tt=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(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(j,o)),null!==tt&&"string"==typeof et&&(et=tt.createHTML(""));l&&l(t),oe=t}},ce=A({},[...$,...E,...D]),ue=A({},[...O,...I]),de=function(t){g(r.removed,{element:t});try{X(t).removeChild(t)}catch(e){U(t)}},pe=function(t,e){try{g(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){g(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Et||Dt)try{de(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},fe=function(t){let e=null,r=null;if($t)t=""+t;else{const e=x(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===ne&&Zt===Vt&&(t=''+t+"");const n=tt?tt.createHTML(t):t;if(Zt===Vt)try{e=(new q).parseFromString(n,ne)}catch(t){}if(!e||!e.documentElement){e=rt.createDocument(Zt,"template",null);try{e.documentElement.innerHTML=Xt?et:n}catch(t){}}const a=e.body||e.documentElement;return t&&r&&a.insertBefore(i.createTextNode(r),a.childNodes[0]||null),Zt===Vt?at.call(e,Lt?"html":"body")[0]:Lt?e.documentElement:a},ge=function(t){return nt.call(t.ownerDocument||t,t,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT|S.SHOW_PROCESSING_INSTRUCTION|S.SHOW_CDATA_SECTION,null)},ye=function(t){return t instanceof M&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof T)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},me=function(t){return"function"==typeof u&&t instanceof u};function xe(t,e,n){p(t,(t=>{t.call(r,e,n,oe)}))}const be=function(t){let e=null;if(xe(st.beforeSanitizeElements,t,null),ye(t))return de(t),!0;const n=ae(t.nodeName);if(xe(st.uponSanitizeElement,t,{tagName:n,allowedTags:mt}),t.hasChildNodes()&&!me(t.firstElementChild)&&_(/<[/\w]/g,t.innerHTML)&&_(/<[/\w]/g,t.textContent))return de(t),!0;if(7===t.nodeType)return de(t),!0;if(Bt&&8===t.nodeType&&_(/<[/\w]/g,t.data))return de(t),!0;if(!mt[n]||wt[n]){if(!wt[n]&&Ce(n)){if(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,n))return!1;if(Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(n))return!1}if(Rt&&!zt[n]){const e=X(t)||t.parentNode,r=V(t)||t.childNodes;if(r&&e)for(let n=r.length-1;n>=0;--n){const i=H(r[n],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,G(t))}}return de(t),!0}return t instanceof d&&!function(t){let e=X(t);e&&e.tagName||(e={namespaceURI:Zt,tagName:"template"});const r=y(t.tagName),n=y(e.tagName);return!!Qt[t.namespaceURI]&&(t.namespaceURI===Gt?e.namespaceURI===Vt?"svg"===r:e.namespaceURI===Yt?"svg"===r&&("annotation-xml"===n||te[n]):Boolean(ce[r]):t.namespaceURI===Yt?e.namespaceURI===Vt?"math"===r:e.namespaceURI===Gt?"math"===r&&ee[n]:Boolean(ue[r]):t.namespaceURI===Vt?!(e.namespaceURI===Gt&&!ee[n])&&!(e.namespaceURI===Yt&&!te[n])&&!ue[r]&&(re[r]||!ce[r]):!("application/xhtml+xml"!==ne||!Qt[t.namespaceURI]))}(t)?(de(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!_(/<\/no(script|embed|frames)/i,t.innerHTML)?(Mt&&3===t.nodeType&&(e=t.textContent,p([lt,ht,ct],(t=>{e=b(e,t," ")})),t.textContent!==e&&(g(r.removed,{element:t.cloneNode()}),t.textContent=e)),xe(st.afterSanitizeElements,t,null),!1):(de(t),!0)},ke=function(t,e,r){if(It&&("id"===e||"name"===e)&&(r in i||r in se))return!1;if(St&&!_t[e]&&_(ut,e));else if(vt&&_(dt,e));else if(!bt[e]||_t[e]){if(!(Ce(t)&&(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,t)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(t))&&(Ct.attributeNameCheck instanceof RegExp&&_(Ct.attributeNameCheck,e)||Ct.attributeNameCheck instanceof Function&&Ct.attributeNameCheck(e))||"is"===e&&Ct.allowCustomizedBuiltInElements&&(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,r)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(r))))return!1}else if(Ht[e]);else if(_(yt,b(r,ft,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==k(r,"data:")||!jt[t])if(Tt&&!_(pt,b(r,ft,"")));else if(r)return!1;return!0},Ce=function(t){return"annotation-xml"!==t&&x(t,gt)},we=function(t){xe(st.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||ye(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:bt,forceKeepAttr:void 0};let i=e.length;for(;i--;){const a=e[i],{name:o,namespaceURI:s,value:l}=a,h=ae(o);let c="value"===o?l:C(l);if(n.attrName=h,n.attrValue=c,n.keepAttr=!0,n.forceKeepAttr=void 0,xe(st.uponSanitizeAttribute,t,n),c=n.attrValue,!Nt||"id"!==h&&"name"!==h||(pe(o,t),c="user-content-"+c),Bt&&_(/((--!?|])>)|<\/(style|title)/i,c)){pe(o,t);continue}if(n.forceKeepAttr)continue;if(pe(o,t),!n.keepAttr)continue;if(!At&&_(/\/>/i,c)){pe(o,t);continue}Mt&&p([lt,ht,ct],(t=>{c=b(c,t," ")}));const u=ae(t.nodeName);if(ke(u,h,c)){if(tt&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(s);else switch(j.getAttributeType(u,h)){case"TrustedHTML":c=tt.createHTML(c);break;case"TrustedScriptURL":c=tt.createScriptURL(c)}try{s?t.setAttributeNS(s,o,c):t.setAttribute(o,c),ye(t)?de(t):f(r.removed)}catch(t){}}}xe(st.afterSanitizeAttributes,t,null)},_e=function t(e){let r=null;const n=ge(e);for(xe(st.beforeSanitizeShadowDOM,e,null);r=n.nextNode();)xe(st.uponSanitizeShadowNode,r,null),be(r),we(r),r.content instanceof s&&t(r.content);xe(st.afterSanitizeShadowDOM,e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,o=null,l=null;if(Xt=!t,Xt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!me(t)){if("function"!=typeof t.toString)throw v("toString is not a function");if("string"!=typeof(t=t.toString()))throw v("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Ft||he(e),r.removed=[],"string"==typeof t&&(Pt=!1),Pt){if(t.nodeName){const e=ae(t.nodeName);if(!mt[e]||wt[e])throw v("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)n=fe("\x3c!----\x3e"),i=n.ownerDocument.importNode(t,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!Et&&!Mt&&!Lt&&-1===t.indexOf("<"))return tt&&Ot?tt.createHTML(t):t;if(n=fe(t),!n)return Et?null:Ot?et:""}n&&$t&&de(n.firstChild);const h=ge(Pt?t:n);for(;o=h.nextNode();)be(o),we(o),o.content instanceof s&&_e(o.content);if(Pt)return t;if(Et){if(Dt)for(l=it.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(bt.shadowroot||bt.shadowrootmode)&&(l=ot.call(a,l,!0)),l}let c=Lt?n.outerHTML:n.innerHTML;return Lt&&mt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&_(Z,n.ownerDocument.doctype.name)&&(c="\n"+c),Mt&&p([lt,ht,ct],(t=>{c=b(c,t," ")})),tt&&Ot?tt.createHTML(c):c},r.setConfig=function(){he(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ft=!0},r.clearConfig=function(){oe=null,Ft=!1},r.isValidAttribute=function(t,e,r){oe||he({});const n=ae(t),i=ae(e);return ke(n,i,r)},r.addHook=function(t,e){"function"==typeof e&&g(st[t],e)},r.removeHook=function(t){return f(st[t])},r.removeHooks=function(t){st[t]=[]},r.removeAllHooks=function(){st={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},7266:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});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}},o=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),o=r.length,s=o%4==0,l=o>4,h=l?1:17,c=l?8:4,u=s?0:-1,d=l?255:15;return n.A.set({r:(i>>c*(u+3)&d)*h,g:(i>>c*(u+2)&d)*h,b:(i>>c*(u+1)&d)*h,a:s?(i&d)*h/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)]}`}},o=a;var s=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 s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.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,o,h,c]=r;return n.A.set({h:l._hue2deg(i),s:s.A.channel.clamp.s(parseFloat(a)),l:s.A.channel.clamp.l(parseFloat(o)),a:h?s.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(n)}%, ${i})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(n)}%)`}},h=l,c={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=c.colors[t];if(e)return o.parse(e)},stringify:t=>{const e=o.stringify(t);for(const t in c.colors)if(c.colors[t]===e)return t}},u=c,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,o,l,h,c,u,p]=r;return n.A.set({r:s.A.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:s.A.channel.clamp.g(l?2.55*parseFloat(o):parseFloat(o)),b:s.A.channel.clamp.b(c?2.55*parseFloat(h):parseFloat(h)),a:u?s.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(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(n)}, ${s.A.lang.round(i)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(n)})`}},p=d,f={format:{keyword:c,hex:o,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=o.parse(t)||p.parse(t)||h.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?h.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):o.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 t=0;t<=255;t++)i[t]=n.A.unit.dec2hex(t);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),o=a[e],s=n.A.channel.clamp[e](o+r);return o!==s&&(a[e]=s),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 t in e)r[t]=n.A.channel.clamp[t](e[t]);return i.A.stringify(r)}},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=>(t=>{const{r:e,g:r,b:a}=i.A.parse(t),o=.2126*n.A.channel.toLinear(e)+.7152*n.A.channel.toLinear(r)+.0722*n.A.channel.toLinear(a);return n.A.lang.round(o)})(t)>=.5,o=t=>!a(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:()=>s});var n=r(6309),i=r(7266),a=r(1931),o=r(8232);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,o.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(s)});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,o=2*r-a;switch(i){case"r":return 255*n.hue2rgb(o,a,t+1/3);case"g":return 255*n.hue2rgb(o,a,t);case"b":return 255*n.hue2rgb(o,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),o=(i+a)/2;if("l"===n)return 100*o;if(i===a)return 0;const s=i-a;if("s"===n)return 100*(o>.5?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-r)/s+(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}`}}}},9469:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(6984);const i=function(t,e){for(var r=t.length;r--;)if((0,n.A)(t[r][0],e))return r;return-1};var a=Array.prototype.splice;function o(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1},o.prototype.set=function(t,e){var r=this.__data__,n=i(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};const s=o},8335:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});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:()=>d});const n=(0,r(8562).A)(Object,"create");var i=Object.prototype.hasOwnProperty;var a=Object.prototype.hasOwnProperty;function o(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{"use strict";r.d(e,{A:()=>a});var n=r(8562),i=r(1917);const a=(0,n.A)(i.A,"Set")},2080:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(9469);var i=r(8335),a=r(2050);function o(t){var e=this.__data__=new n.A(t);this.size=e.size}o.prototype.clear=function(){this.__data__=new n.A,this.size=0},o.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},o.prototype.get=function(t){return this.__data__.get(t)},o.prototype.has=function(t){return this.__data__.has(t)},o.prototype.set=function(t,e){var r=this.__data__;if(r instanceof n.A){var o=r.__data__;if(!i.A||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new a.A(o)}return r.set(t,e),this.size=r.size,this};const s=o},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},2505:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var n=r(5175),i=r(2049),a=r(1200),o=r(5353),s=r(4749),l=Object.prototype.hasOwnProperty;const h=function(t,e){var r=(0,i.A)(t),h=!r&&(0,n.A)(t),c=!r&&!h&&(0,a.A)(t),u=!r&&!h&&!c&&(0,s.A)(t),d=r||h||c||u,p=d?function(t,e){for(var r=-1,n=Array(t);++r{"use strict";r.d(e,{A:()=>o});var n=r(2528),i=r(6984),a=Object.prototype.hasOwnProperty;const o=function(t,e,r){var o=t[e];a.call(t,e)&&(0,i.A)(o,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}},7132:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e,r){for(var n=-1,i=Object(t),a=r(t),o=a.length;o--;){var s=a[++n];if(!1===e(i[s],s,i))break}return t}},2383:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var n=r(241),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=n.A?n.A.toStringTag:void 0;var l=Object.prototype.toString;var h=n.A?n.A.toStringTag:void 0;const c=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":h&&h in Object(t)?function(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(t){}var i=o.call(t);return n&&(e?t[s]=r:delete t[s]),i}(t):function(t){return l.call(t)}(t)}},4453:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(7271);const i=(0,r(367).A)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;const o=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}},4326:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(9008),i=r(5255),a=r(7424);const o=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)}}},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,o=a&&a.exports===i?n.A.Buffer:void 0,s=o?o.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var r=t.length,n=s?s(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));++r{"use strict";r.d(e,{A:()=>a});var n=r(2851),i=r(2528);const a=function(t,e,r,a){var o=!r;r||(r={});for(var s=-1,l=e.length;++s{"use strict";r.d(e,{A:()=>a});var n=r(4326),i=r(6832);const a=function(t){return(0,n.A)((function(e,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&(0,i.A)(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++n{"use strict";r.d(e,{A:()=>i});var n=r(8562);const i=function(){try{var t=(0,n.A)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},2136:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n="object"==typeof global&&global&&global.Object===Object&&global},8562:(t,e,r)=>{"use strict";r.d(e,{A:()=>y});var n=r(9610);const i=r(1917).A["__core-js_shared__"];var a,o=(a=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";var s=r(3149),l=r(1121),h=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,d=c.toString,p=u.hasOwnProperty,f=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const g=function(t){return!(!(0,s.A)(t)||(e=t,o&&o in e))&&((0,n.A)(t)?f:h).test((0,l.A)(t));var e},y=function(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return g(r)?r:void 0}},5647:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=(0,r(367).A)(Object.getPrototypeOf,Object)},9137:(t,e,r)=>{"use strict";r.d(e,{A:()=>_});var n=r(8562),i=r(1917);const a=(0,n.A)(i.A,"DataView");var o=r(8335);const s=(0,n.A)(i.A,"Promise");var l=r(9857);const h=(0,n.A)(i.A,"WeakMap");var c=r(2383),u=r(1121),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",y="[object DataView]",m=(0,u.A)(a),x=(0,u.A)(o.A),b=(0,u.A)(s),k=(0,u.A)(l.A),C=(0,u.A)(h),w=c.A;(a&&w(new a(new ArrayBuffer(1)))!=y||o.A&&w(new o.A)!=d||s&&w(s.resolve())!=p||l.A&&w(new l.A)!=f||h&&w(new h)!=g)&&(w=function(t){var e=(0,c.A)(t),r="[object Object]"==e?t.constructor:void 0,n=r?(0,u.A)(r):"";if(n)switch(n){case m:return y;case x:return d;case b:return p;case k:return f;case C:return g}return e});const _=w},407:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});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 o=r(5647),s=r(7271);const l=function(t){return"function"!=typeof t.constructor||(0,s.A)(t)?{}:a((0,o.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&&t{"use strict";r.d(e,{A:()=>s});var n=r(6984),i=r(8446),a=r(5353),o=r(3149);const s=function(t,e,r){if(!(0,o.A)(r))return!1;var s=typeof e;return!!("number"==s?(0,i.A)(r)&&(0,a.A)(e,r.length):"string"==s&&e in r)&&(0,n.A)(r[e],t)}},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:()=>s});var n=r(2136),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i&&n.A.process;const s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(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:()=>i});var n=Math.max;const i=function(t,e,r){return e=n(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,o=n(i.length-e,0),s=Array(o);++a{"use strict";r.d(e,{A:()=>a});var n=r(2136),i="object"==typeof self&&self&&self.Object===Object&&self;const a=n.A||i||Function("return this")()},7424:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var n=r(9142),i=r(4171),a=r(9008);const o=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 s=Date.now;const l=(h=o,c=0,u=0,function(){var t=s(),e=16-(t-u);if(u=t,e>0){if(++c>=800)return arguments[0]}else c=0;return h.apply(void 0,arguments)});var h,c,u},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(t){}try{return t+""}catch(t){}}return""}},9142:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t){return function(){return t}}},6984:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=function(t,e){return t===e||t!=t&&e!=e}},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(2383),i=r(3098);const a=function(t){return(0,i.A)(t)&&"[object Arguments]"==(0,n.A)(t)};var o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable;const h=a(function(){return arguments}())?a:function(t){return(0,i.A)(t)&&s.call(t,"callee")&&!l.call(t,"callee")}},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:()=>s});var n=r(1917);var i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i?n.A.Buffer:void 0;const s=(o?o.isBuffer:void 0)||function(){return!1}},6401:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});var n=r(4453),i=r(9137),a=r(5175),o=r(2049),s=r(8446),l=r(1200),h=r(7271),c=r(4749),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,s.A)(t)&&((0,o.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,c.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,h.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(2383),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}},4749:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var n=r(2383),i=r(5254),a=r(3098),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;var s=r(2789),l=r(4841),h=l.A&&l.A.isTypedArray;const c=h?(0,s.A)(h):function(t){return(0,a.A)(t)&&(0,i.A)(t.length)&&!!o[(0,n.A)(t)]}},9999:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var n=r(2505),i=r(3149),a=r(7271);var o=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,i.A)(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(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 l=r(8446);const h=function(t){return(0,l.A)(t)?(0,n.A)(t,!0):s(t)}},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 o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};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:()=>$});var n=r(2080),i=r(2528),a=r(6984);const o=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 s=r(7132),l=r(154),h=r(1801),c=r(9759),u=r(407),d=r(5175),p=r(2049),f=r(3533),g=r(1200),y=r(9610),m=r(3149),x=r(2383),b=r(5647),k=r(3098),C=Function.prototype,w=Object.prototype,_=C.toString,v=w.hasOwnProperty,S=_.call(Object);var T=r(4749);const A=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var M=r(2031),B=r(9999);const L=function(t,e,r,n,i,a,s){var C,w=A(t,r),L=A(e,r),F=s.get(L);if(F)o(t,r,F);else{var $=a?a(w,L,r+"",t,e,s):void 0,E=void 0===$;if(E){var D=(0,p.A)(L),O=!D&&(0,g.A)(L),I=!D&&!O&&(0,T.A)(L);$=L,D||O||I?(0,p.A)(w)?$=w:(0,f.A)(w)?$=(0,c.A)(w):O?(E=!1,$=(0,l.A)(L,!0)):I?(E=!1,$=(0,h.A)(L,!0)):$=[]:function(t){if(!(0,k.A)(t)||"[object Object]"!=(0,x.A)(t))return!1;var e=(0,b.A)(t);if(null===e)return!0;var r=v.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&_.call(r)==S}(L)||(0,d.A)(L)?($=w,(0,d.A)(w)?(C=w,$=(0,M.A)(C,(0,B.A)(C))):(0,m.A)(w)&&!(0,y.A)(w)||($=(0,u.A)(L))):E=!1}E&&(s.set(L,$),i($,L,n,a,s),s.delete(L)),o(t,r,$)}},F=function t(e,r,i,a,l){e!==r&&(0,s.A)(r,(function(s,h){if(l||(l=new n.A),(0,m.A)(s))L(e,r,h,i,t,a,l);else{var c=a?a(A(e,h),s,h+"",e,r,l):void 0;void 0===c&&(c=s),o(e,h,c)}}),B.A)},$=(0,r(3767).A)((function(t,e,r){F(t,e,r)}))},7588:(t,e,r)=>{"use strict";r.d(e,{R:()=>s});var n=r(9502),i={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function a(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)(a,"calculateDeltaAndAngle");var o=(0,n.K2)((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),s=(0,n.K2)((t=>({x:(0,n.K2)((function(e,r,n){let s=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}=a(n[n.length-1],n[n.length-2]);s=i[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const h=Math.abs(o(e).x-o(n[n.length-1]).x),c=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(h0&&c0&&d=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(i,t.arrowTypeEnd)){const{angle:e,deltaY:r}=a(n[n.length-1],n[n.length-2]);s=i[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const h=Math.abs(o(e).y-o(n[n.length-1]).y),c=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(h0&&c0&&d{"use strict";r.d(e,{O:()=>n});var n=(0,r(9502).K2)((({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}}),"getSubGraphTitleMargins")},7938:(t,e,r)=>{"use strict";r.d(e,{IU:()=>y,Jo:()=>A,T_:()=>k,g0:()=>L,jP:()=>x});var n=r(1282),i=r(7588),a=r(3115),o=r(6058),s=r(8159),l=r(9502),h=r(4852),c=r(2274),u=(0,l.K2)(((t,e,r,n,i)=>{e.arrowTypeStart&&p(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&p(t,"end",e.arrowTypeEnd,r,n,i)}),"addEdgeMarkers"),d={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},p=(0,l.K2)(((t,e,r,n,i,a)=>{const o=d[r];if(!o)return void l.Rm.warn(`Unknown arrow type: ${r}`);const s="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${o}${s})`)}),"addEdgeMarker"),f=new Map,g=new Map,y=(0,l.K2)((()=>{f.clear(),g.clear()}),"clear"),m=(0,l.K2)((t=>t?t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),x=(0,l.K2)((async(t,e)=>{let r=(0,l._3)((0,l.D7)().flowchart.htmlLabels);const i=await(0,o.GZ)(t,e.label,{style:m(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});l.Rm.info("abc82",e,e.labelType);const a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let c,u=i.getBBox();if(r){const t=i.children[0],e=(0,h.Ltv)(i);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}if(s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),f.set(e.id,a),e.width=u.width,e.height=u.height,e.startLabelLeft){const r=await(0,n.DA)(e.startLabelLeft,m(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");c=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),g.get(e.id)||g.set(e.id,{}),g.get(e.id).startLeft=i,b(c,e.startLabelLeft)}if(e.startLabelRight){const r=await(0,n.DA)(e.startLabelRight,m(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");c=i.node().appendChild(r),a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),g.get(e.id)||g.set(e.id,{}),g.get(e.id).startRight=i,b(c,e.startLabelRight)}if(e.endLabelLeft){const r=await(0,n.DA)(e.endLabelLeft,m(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");c=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),g.get(e.id)||g.set(e.id,{}),g.get(e.id).endLeft=i,b(c,e.endLabelLeft)}if(e.endLabelRight){const r=await(0,n.DA)(e.endLabelRight,m(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");c=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),g.get(e.id)||g.set(e.id,{}),g.get(e.id).endRight=i,b(c,e.endLabelRight)}return i}),"insertEdgeLabel");function b(t,e){(0,l.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,l.K2)(b,"setTerminalWidth");var k=(0,l.K2)(((t,e)=>{l.Rm.debug("Moving label abc88 ",t.id,t.label,f.get(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=f.get(t.id);let a=t.x,o=t.y;if(r){const n=s._K.calcLabelPosition(r);l.Rm.debug("Moving label "+t.label+" from (",a,",",o,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(a=n.x,o=n.y)}n.attr("transform",`translate(${a}, ${o+i/2})`)}if(t.startLabelLeft){const e=g.get(t.id).startLeft;let n=t.x,i=t.y;if(r){const e=s._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=g.get(t.id).startRight;let n=t.x,i=t.y;if(r){const e=s._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=g.get(t.id).endLeft;let n=t.x,i=t.y;if(r){const e=s._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=g.get(t.id).endRight;let n=t.x,i=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}}),"positionEdgeLabel"),C=(0,l.K2)(((t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),o=t.width/2,s=t.height/2;return i>=o||a>=s}),"outsideNode"),w=(0,l.K2)(((t,e,r)=>{l.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),o=t.width/2;let s=r.xMath.abs(n-e.x)*h){let t=r.y{l.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach((t=>{if(l.Rm.info("abc88 checking point",t,e),C(e,t)||i)l.Rm.warn("abc88 outside",t,n),n=t,i||r.push(t);else{const a=w(e,n,t);l.Rm.debug("abc88 inside",t,n,a),l.Rm.debug("abc88 intersection",a,e);let o=!1;r.forEach((t=>{o=o||t.x===a.x&&t.y===a.y})),r.some((t=>t.x===a.x&&t.y===a.y))?l.Rm.warn("abc88 no intersect",a,r):r.push(a),i=!0}})),l.Rm.debug("returning points",r),r}),"cutPathAtIntersect");function v(t){const e=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}(0,l.K2)(v,"extractCornerPoints");var S=(0,l.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"),T=(0,l.K2)((function(t){const{cornerPointPositions:e}=v(t),r=[];for(let n=0;n10&&Math.abs(i.y-e.y)>=10){l.Rm.debug("Corner point fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));const t=5;d=a.x===o.x?{x:h<0?o.x-t+u:o.x+t-u,y:c<0?o.y-u:o.y+u}:{x:h<0?o.x-u:o.x+u,y:c<0?o.y-t+u:o.y+t-u}}else l.Rm.debug("Corner point skipping fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));r.push(d,s)}else r.push(t[n]);return r}),"fixCorners"),A=(0,l.K2)((function(t,e,r,n,a,o,s){const{handDrawnSeed:d}=(0,l.D7)();let p=e.points,f=!1;const g=a;var y=o;y.intersect&&g.intersect&&(p=p.slice(1,e.points.length-1),p.unshift(g.intersect(p[0])),l.Rm.debug("Last point APA12",e.start,"--\x3e",e.end,p[p.length-1],y,y.intersect(p[p.length-1])),p.push(y.intersect(p[p.length-1]))),e.toCluster&&(l.Rm.info("to cluster abc88",r.get(e.toCluster)),p=_(e.points,r.get(e.toCluster).node),f=!0),e.fromCluster&&(l.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(p,null,2)),p=_(p.reverse(),r.get(e.fromCluster).node).reverse(),f=!0);let m=p.filter((t=>!Number.isNaN(t.y)));m=T(m);let x=h.qrM;e.curve&&(x=e.curve);const{x:b,y:k}=(0,i.R)(e),C=(0,h.n8j)().x(b).y(k).curve(x);let w,v;switch(e.thickness){case"normal":default:w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible"}switch(e.pattern){case"solid":default:w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed"}let S=C(m);const A=Array.isArray(e.style)?e.style:[e.style];if("handDrawn"===e.look){const r=c.A.svg(t);Object.assign([],m);const n=r.path(S,{roughness:.3,seed:d});w+=" transition",v=(0,h.Ltv)(n).select("path").attr("id",e.id).attr("class"," "+w+(e.classes?" "+e.classes:"")).attr("style",A?A.reduce(((t,e)=>t+";"+e),""):"");let i=v.attr("d");v.attr("d",i),t.node().appendChild(v.node())}else v=t.append("path").attr("d",S).attr("id",e.id).attr("class"," "+w+(e.classes?" "+e.classes:"")).attr("style",A?A.reduce(((t,e)=>t+";"+e),""):"");let M="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(M=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,M=M.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),l.Rm.info("arrowTypeStart",e.arrowTypeStart),l.Rm.info("arrowTypeEnd",e.arrowTypeEnd),u(v,e,M,s,n);let B={};return f&&(B.updatedPath=p),B.originalPath=e.points,B}),"insertEdge"),M=(0,l.K2)(((t,e,r,n)=>{e.forEach((e=>{B[e](t,r,n)}))}),"insertMarkers"),B={extension:(0,l.K2)(((t,e,r)=>{l.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,l.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,l.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,l.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,l.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,l.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,l.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,l.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,l.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")},L=M},9502:(t,e,r)=>{"use strict";r.d(e,{C0:()=>v,VA:()=>y,K2:()=>g,xA:()=>ct,hH:()=>F,Dl:()=>Pt,IU:()=>ee,Wt:()=>Zt,Y2:()=>zt,a$:()=>Wt,sb:()=>Q,ME:()=>de,UI:()=>V,Ch:()=>T,mW:()=>S,DB:()=>w,_3:()=>Bt,EJ:()=>C,m7:()=>ae,iN:()=>ne,zj:()=>lt,D7:()=>ce,Gs:()=>xe,J$:()=>B,ab:()=>se,Q2:()=>ot,P$:()=>K,Wi:()=>Rt,H1:()=>yt,Rm:()=>x,QO:()=>$t,Js:()=>me,Xd:()=>A,VJ:()=>Kt,cL:()=>ut,$i:()=>Z,jZ:()=>wt,oB:()=>pe,wZ:()=>it,EI:()=>ie,SV:()=>re,Nk:()=>st,XV:()=>ue,ke:()=>oe,He:()=>b,UU:()=>nt,ot:()=>Ht,mj:()=>fe,tM:()=>Vt,H$:()=>W,B6:()=>at});var n=r(4353),i=r(1931),a=r(8232);const o=(t,e)=>{const r=i.A.parse(t),n={};for(const t in e)e[t]&&(n[t]=r[t]+e[t]);return(0,a.A)(t,n)};var s=r(5582);const l=(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,((t,e,r=50)=>{const{r:n,g:a,b:o,a:l}=i.A.parse(t),{r:h,g:c,b:u,a:d}=i.A.parse(e),p=r/100,f=2*p-1,g=l-d,y=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,m=1-y,x=n*y+h*m,b=a*y+c*m,k=o*y+u*m,C=l*p+d*(1-p);return(0,s.A)(x,b,k,C)})(r,t,e)};var h,c=r(5263),u=r(8041),d=r(5097),p=r(9418),f=Object.defineProperty,g=(t,e)=>f(t,"name",{value:e,configurable:!0}),y=(t,e)=>{for(var r in e)f(t,r,{get:e[r],enumerable:!0})},m={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},x={trace:g(((...t)=>{}),"trace"),debug:g(((...t)=>{}),"debug"),info:g(((...t)=>{}),"info"),warn:g(((...t)=>{}),"warn"),error:g(((...t)=>{}),"error"),fatal:g(((...t)=>{}),"fatal")},b=g((function(t="fatal"){let e=m.fatal;"string"==typeof t?t.toLowerCase()in m&&(e=m[t]):"number"==typeof t&&(e=t),x.trace=()=>{},x.debug=()=>{},x.info=()=>{},x.warn=()=>{},x.error=()=>{},x.fatal=()=>{},e<=m.fatal&&(x.fatal=console.error?console.error.bind(console,k("FATAL"),"color: orange"):console.log.bind(console,"",k("FATAL"))),e<=m.error&&(x.error=console.error?console.error.bind(console,k("ERROR"),"color: orange"):console.log.bind(console,"",k("ERROR"))),e<=m.warn&&(x.warn=console.warn?console.warn.bind(console,k("WARN"),"color: orange"):console.log.bind(console,"",k("WARN"))),e<=m.info&&(x.info=console.info?console.info.bind(console,k("INFO"),"color: lightblue"):console.log.bind(console,"",k("INFO"))),e<=m.debug&&(x.debug=console.debug?console.debug.bind(console,k("DEBUG"),"color: lightgreen"):console.log.bind(console,"",k("DEBUG"))),e<=m.trace&&(x.trace=console.debug?console.debug.bind(console,k("TRACE"),"color: lightgreen"):console.log.bind(console,"",k("TRACE")))}),"setLogLevel"),k=g((t=>`%c${n().format("ss.SSS")} : ${t} : `),"format"),C=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,w=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_=/\s*%%.*\n/gm,v=class extends Error{static{g(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},S={},T=g((function(t,e){t=t.replace(C,"").replace(w,"").replace(_,"\n");for(const[r,{detector:n}]of Object.entries(S))if(n(t,e))return r;throw new v(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),A=g(((...t)=>{for(const{id:e,detector:r,loader:n}of t)M(e,r,n)}),"registerLazyLoadedDiagrams"),M=g(((t,e,r)=>{S[t]&&x.warn(`Detector with key ${t} already exists. Overwriting.`),S[t]={detector:e,loader:r},x.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),B=g((t=>S[t].loader),"getDiagramLoader"),L=g(((t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>L(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]=L(t[i],e[i],{depth:r-1,clobber:n}))})),t)}),"assignWithDepth"),F=L,$="#ffffff",E="#f2f2f2",D=g(((t,e)=>o(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),O=class{static{g(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||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||D(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||D(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||D(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||l(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||l(this.tertiaryColor),this.lineColor=this.lineColor||l(this.background),this.arrowheadColor=this.arrowheadColor||l(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,c.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,c.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||l(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,u.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.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},I=g((t=>{const e=new O;return e.calculate(t),e}),"getThemeVariables"),N=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=l(this.background),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(l("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.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,c.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,c.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.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.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="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,u.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,u.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,u.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=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},R=g((t=>{const e=new N;return e.calculate(t),e}),"getThemeVariables"),P=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=o(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=D(this.primaryColor,this.darkMode),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(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.sectionBkgColor=(0,s.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.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",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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,c.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,c.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},K=g((t=>{const e=new P;return e.calculate(t),e}),"getThemeVariables"),z=class{static{g(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,u.A)("#cde498",10),this.primaryBorderColor=D(this.primaryColor,this.darkMode),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.primaryColor),this.lineColor=l(this.background),this.textColor=l(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.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,c.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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,c.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,c.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},q=g((t=>{const e=new z;return e.calculate(t),e}),"getThemeVariables"),j=class{static{g(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,u.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=D(this.primaryColor,this.darkMode),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(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.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.secondBkg=(0,u.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,u.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]}))}},W={base:{getThemeVariables:I},dark:{getThemeVariables:R},default:{getThemeVariables:K},forest:{getThemeVariables:q},neutral:{getThemeVariables:g((t=>{const e=new j;return e.calculate(t),e}),"getThemeVariables")}},H={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},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,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"]},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,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,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},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},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},U={...H,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:W.default.getThemeVariables(),sequence:{...H.sequence,messageFont:g((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:g((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:g((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...H.gantt,tickInterval:void 0,useWidth:void 0},c4:{...H.c4,useWidth:void 0,personFont:g((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:g((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:g((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:g((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:g((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:g((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:g((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:g((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:g((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:g((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:g((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:g((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:g((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:g((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:g((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:g((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:g((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:g((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:g((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:g((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:g((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:g((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...H.pie,useWidth:984},xyChart:{...H.xyChart,useWidth:void 0},requirement:{...H.requirement,useWidth:void 0},packet:{...H.packet}},Y=g(((t,e="")=>Object.keys(t).reduce(((r,n)=>Array.isArray(t[n])?r:"object"==typeof t[n]&&null!==t[n]?[...r,e+n,...Y(t[n],"")]:[...r,e+n]),[])),"keyify"),G=new Set(Y(U,"")),V=U,Z=g((t=>{if(x.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>Z(t)));else{for(const e of Object.keys(t)){if(x.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!G.has(e)||null==t[e]){x.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){x.debug("sanitizing object",e),Z(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(x.debug("sanitizing css option",e),t[e]=X(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]="")}x.debug("After sanitization",t)}}),"sanitizeDirective"),X=g((t=>{let e=0,r=0;for(const n of t){if(e{let r=F({},t),n={};for(const t of e)ht(t),n=F(n,t);if(r=F(r,n),n.theme&&n.theme in W){const t=F({},h),e=F(t.themeVariables||{},n.themeVariables);r.theme&&r.theme in W&&(r.themeVariables=W[r.theme].getThemeVariables(e))}return gt(et=r),et}),"updateCurrentConfig"),nt=g((t=>(J=F({},Q),J=F(J,t),t.theme&&W[t.theme]&&(J.themeVariables=W[t.theme].getThemeVariables(t.themeVariables)),rt(J,tt),J)),"setSiteConfig"),it=g((t=>{h=F({},t)}),"saveConfigFromInitialize"),at=g((t=>(J=F(J,t),rt(J,tt),J)),"updateSiteConfig"),ot=g((()=>F({},J)),"getSiteConfig"),st=g((t=>(gt(t),F(et,t),lt())),"setConfig"),lt=g((()=>F({},et)),"getConfig"),ht=g((t=>{t&&(["secure",...J.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(x.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]&&ht(t[e])})))}),"sanitize"),ct=g((t=>{Z(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),tt.push(t),rt(J,tt)}),"addDirective"),ut=g(((t=J)=>{rt(t,tt=[])}),"reset"),dt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},pt={},ft=g((t=>{pt[t]||(x.warn(dt[t]),pt[t]=!0)}),"issueWarning"),gt=g((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ft("LAZY_LOAD_DEPRECATED")}),"checkConfig"),yt=//gi,mt=g((t=>t?At(t).replace(/\\n/g,"#br#").split("#br#"):[""]),"getRows"),xt=(()=>{let t=!1;return()=>{t||(bt(),t=!0)}})();function bt(){const t="data-temp-href-target";p.A.addHook("beforeSanitizeAttributes",(e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),p.A.addHook("afterSanitizeAttributes",(e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}g(bt,"setupDompurifyHooks");var kt=g((t=>(xt(),p.A.sanitize(t))),"removeScript"),Ct=g(((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=kt(t):"loose"!==r&&(t=(t=(t=At(t)).replace(//g,">")).replace(/=/g,"="),t=Tt(t))}return t}),"sanitizeMore"),wt=g(((t,e)=>t?t=e.dompurifyConfig?p.A.sanitize(Ct(t,e),e.dompurifyConfig).toString():p.A.sanitize(Ct(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),_t=g(((t,e)=>"string"==typeof t?wt(t,e):t.flat().map((t=>wt(t,e)))),"sanitizeTextOrArray"),vt=g((t=>yt.test(t)),"hasBreaks"),St=g((t=>t.split(yt)),"splitBreaks"),Tt=g((t=>t.replace(/#br#/g,"
")),"placeholderToBreak"),At=g((t=>t.replace(yt,"#br#")),"breakToPlaceholder"),Mt=g((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e}),"getUrl"),Bt=g((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Lt=g((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),Ft=g((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),$t=g((function(t){const e=t.split(/(,)/),r=[];for(let t=0;t0&&t+1Math.max(0,t.split(e).length-1)),"countOccurrence"),Dt=g(((t,e)=>{const r=Et(t,"~"),n=Et(e,"~");return 1===r&&1===n}),"shouldCombineSets"),Ot=g((t=>{const e=Et(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"),It=g((()=>void 0!==window.MathMLElement),"isMathMLSupported"),Nt=/\$\$(.*)\$\$/g,Rt=g((t=>(t.match(Nt)?.length??0)>0),"hasKatex"),Pt=g((async(t,e)=>{t=await Kt(t,e);const r=document.createElement("div");r.innerHTML=t,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"),Kt=g((async(t,e)=>{if(!Rt(t))return t;if(!(It()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Nt,"MathML is unsupported in this environment.");const{default:n}=await r.e(130).then(r.bind(r,2130)),i=e.forceLegacyMathML||!It()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(yt).map((t=>Rt(t)?`
${t}
`:`
${t}
`)).join("").replace(Nt,((t,e)=>n.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,"")))}),"renderKatex"),zt={getRows:mt,sanitizeText:wt,sanitizeTextOrArray:_t,hasBreaks:vt,splitBreaks:St,lineBreakRegex:yt,removeScript:kt,getUrl:Mt,evaluate:Bt,getMax:Lt,getMin:Ft},qt=g((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),jt=g((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"),Wt=g((function(t,e,r,n){const i=jt(e,r,n);qt(t,i)}),"configureSvgSize"),Ht=g((function(t,e,r,n){const i=e.node().getBBox(),a=i.width,o=i.height;x.info(`SVG bounds: ${a}x${o}`,i);let s=0,l=0;x.info(`Graph bounds: ${s}x${l}`,t),s=a+2*r,l=o+2*r,x.info(`Calculated bounds: ${s}x${l}`),Wt(e,l,s,n);const h=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",h)}),"setupGraphViewbox"),Ut={},Yt=g(((t,e,r)=>{let n="";return t in Ut&&Ut[t]?n=Ut[t](r):x.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\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 ${n}\n\n ${e}\n`}),"getStyles"),Gt=g(((t,e)=>{void 0!==e&&(Ut[t]=e)}),"addStylesForDiagram"),Vt=Yt,Zt={};y(Zt,{clear:()=>ee,getAccDescription:()=>ae,getAccTitle:()=>ne,getDiagramTitle:()=>se,setAccDescription:()=>ie,setAccTitle:()=>re,setDiagramTitle:()=>oe});var Xt="",Qt="",Jt="",te=g((t=>wt(t,lt())),"sanitizeText"),ee=g((()=>{Xt="",Jt="",Qt=""}),"clear"),re=g((t=>{Xt=te(t).replace(/^\s+/g,"")}),"setAccTitle"),ne=g((()=>Xt),"getAccTitle"),ie=g((t=>{Jt=te(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),ae=g((()=>Jt),"getAccDescription"),oe=g((t=>{Qt=te(t)}),"setDiagramTitle"),se=g((()=>Qt),"getDiagramTitle"),le=x,he=b,ce=lt,ue=st,de=Q,pe=g((t=>wt(t,ce())),"sanitizeText"),fe=Ht,ge=g((()=>Zt),"getCommonDb"),ye={},me=g(((t,e,r)=>{ye[t]&&le.warn(`Diagram with id ${t} already registered. Overwriting.`),ye[t]=e,r&&M(t,r),Gt(t,e.styles),e.injectUtils?.(le,he,ce,pe,fe,ge(),(()=>{}))}),"registerDiagram"),xe=g((t=>{if(t in ye)return ye[t];throw new be(t)}),"getDiagram"),be=class extends Error{static{g(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},6058:(t,e,r)=>{"use strict";r.d(e,{W6:()=>Tt,GZ:()=>Lt,hE:()=>Bt});var n=r(8159),i=r(9502),a=r(4852);let o={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function s(t){o=t}const l=/[&<>"']/,h=new RegExp(l.source,"g"),c=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,u=new RegExp(c.source,"g"),d={"&":"&","<":"<",">":">",'"':""","'":"'"},p=t=>d[t];function f(t,e){if(e){if(l.test(t))return t.replace(h,p)}else if(c.test(t))return t.replace(u,p);return t}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,y=/(^|[^\[])\^/g;function m(t,e){let r="string"==typeof t?t:t.source;e=e||"";const n={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(y,"$1"),r=r.replace(t,i),n},getRegex:()=>new RegExp(r,e)};return n}function x(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const b={exec:()=>null};function k(t,e){const r=t.replace(/\|/g,((t,e,r)=>{let n=!1,i=e;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:C(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e){const r=t.match(/^(\s+)(?:```)/);if(null===r)return e;const n=r[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[r]=e;return r.length>=n.length?t.slice(n.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=C(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:C(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=C(e[0],"\n").split("\n"),r="",n="";const i=[];for(;t.length>0;){let e=!1;const a=[];let o;for(o=0;o/.test(t[o]))a.push(t[o]),e=!0;else{if(e)break;a.push(t[o])}t=t.slice(o);const s=a.join("\n"),l=s.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${l}`:l;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=h,0===t.length)break;const c=i[i.length-1];if("code"===c?.type)break;if("blockquote"===c?.type){const e=c,a=e.raw+"\n"+t.join("\n"),o=this.blockquote(a);i[i.length-1]=o,r=r.substring(0,r.length-e.raw.length)+o.raw,n=n.substring(0,n.length-e.text.length)+o.text;break}if("list"!==c?.type);else{const e=c,a=e.raw+"\n"+t.join("\n"),o=this.list(a);i[i.length-1]=o,r=r.substring(0,r.length-c.raw.length)+o.raw,n=n.substring(0,n.length-e.raw.length)+o.raw,t=a.substring(i[i.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:i,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const n=r.length>1,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:"[*+-]");const a=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;t;){let r=!1,n="",s="";if(!(e=a.exec(t)))break;if(this.rules.block.hr.test(t))break;n=e[0],t=t.substring(n.length);let l=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),h=t.split("\n",1)[0],c=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):c?u=e[1].length+1:(u=e[2].search(/[^ ]/),u=u>4?1:u,s=l.slice(u),u+=e[1].length),c&&/^ *$/.test(h)&&(n+=h+"\n",t=t.substring(h.length+1),r=!0),!r){const e=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;t;){const o=t.split("\n",1)[0];if(h=o,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(h))break;if(a.test(h))break;if(e.test(h))break;if(r.test(t))break;if(h.search(/[^ ]/)>=u||!h.trim())s+="\n"+h.slice(u);else{if(c)break;if(l.search(/[^ ]/)>=4)break;if(i.test(l))break;if(a.test(l))break;if(r.test(l))break;s+="\n"+h}c||h.trim()||(c=!0),n+=o+"\n",t=t.substring(o.length+1),l=h.slice(u)}}i.loose||(o?i.loose=!0:/\n *\n *$/.test(n)&&(o=!0));let d,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:n,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),i.raw+=n}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t"space"===t.type)),r=e.length>0&&e.some((t=>/\n.*\n/.test(t.raw)));i.loose=r}if(i.loose)for(let t=0;t$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:n}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!/[:|]/.test(e[2]))return;const r=k(e[1]),n=e[2].replace(/^\||\| *$/g,"").split("|"),i=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const t of n)/^ *-+: *$/.test(t)?a.align.push("right"):/^ *:-+: *$/.test(t)?a.align.push("center"):/^ *:-+ *$/.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]}))));return a}}lheading(t){const 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){const e=this.rules.block.paragraph.exec(t);if(e){const 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){const 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){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:f(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.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){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;const e=C(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let n=0;n-1){const 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){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);t&&(r=t[1],n=t[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),/^$/.test(t)?r.slice(1):r.slice(1,-1)),w(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return w(r,t,r[0],this.lexer)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(n&&(!n[3]||!r.match(/[\p{L}\p{N}]/u))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...n[0]].length-1;let i,a,o=r,s=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);null!=(n=l.exec(e));){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(a=[...i].length,n[3]||n[4]){o+=a;continue}if((n[5]||n[6])&&r%3&&!((r+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);const e=[...n[0]][0].length,l=t.slice(0,r+n.index+e+a);if(Math.min(r,a)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const r=/[^ ]/.test(t),n=/^ /.test(t)&&/ $/.test(t);return r&&n&&(t=t.substring(1,t.length-1)),t=f(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const 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){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=f(e[1]),r="mailto:"+t):(t=f(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=f(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=f(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){const e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:f(e[0]),{type:"text",raw:e[0],text:t}}}}const v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,S=/(?:[*+-]|\d{1,9}[.)])/,T=m(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,S).replace(/blockCode/g,/ {4}/).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/).getRegex(),A=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,M=/(?!\s*\])(?:\\.|[^\[\]\\])+/,B=m(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",M).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),L=m(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,S).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",$=/|$))/,E=m("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",$).replace("tag",F).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),D=m(A).replace("hr",v).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(),O={blockquote:m(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",D).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:B,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:v,html:E,lheading:T,list:L,newline:/^(?: *(?:\n|$))+/,paragraph:D,table:b,text:/^[^\n]+/},I=m("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),N={...O,table:I,paragraph:m(A).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",I).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()},R={...O,html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:b,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m(A).replace("hr",v).replace("heading"," *#{1,6} *[^\n]").replace("lheading",T).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},P=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,K=/^( {2,}|\\)\n(?!\s*$)/,z="\\p{P}\\p{S}",q=m(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,z).getRegex(),j=m(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,z).getRegex(),W=m("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,z).getRegex(),H=m("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,z).getRegex(),U=m(/\\([punct])/,"gu").replace(/punct/g,z).getRegex(),Y=m(/^<(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(),G=m($).replace("(?:--\x3e|$)","--\x3e").getRegex(),V=m("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",G).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X=m(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Z).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Q=m(/^!?\[(label)\]\[(ref)\]/).replace("label",Z).replace("ref",M).getRegex(),J=m(/^!?\[(ref)\](?:\[\])?/).replace("ref",M).getRegex(),tt={_backpedal:b,anyPunctuation:U,autolink:Y,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:K,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:b,emStrongLDelim:j,emStrongRDelimAst:W,emStrongRDelimUnd:H,escape:P,link:X,nolink:J,punctuation:q,reflink:Q,reflinkSearch:m("reflink|nolink(?!\\()","g").replace("reflink",Q).replace("nolink",J).getRegex(),tag:V,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\e+" ".repeat(r.length)));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.space(t))t=t.substring(n.raw.length),1===n.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(n);else if(n=this.tokenizer.code(t))t=t.substring(n.raw.length),i=e[e.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?e.push(n):(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.fences(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.heading(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.hr(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.blockquote(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.list(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.html(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.def(t))t=t.substring(n.raw.length),i=e[e.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(i.raw+="\n"+n.raw,i.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.table(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.lheading(t))t=t.substring(n.raw.length),e.push(n);else{if(a=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let n;this.options.extensions.startBlock.forEach((t=>{n=t.call({lexer:this},r),"number"==typeof n&&n>=0&&(e=Math.min(e,n))})),e<1/0&&e>=0&&(a=t.substring(0,e+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a)))i=e[e.length-1],r&&"paragraph"===i?.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n),r=a.length!==t.length,t=t.substring(n.raw.length);else if(n=this.tokenizer.text(t))t=t.substring(n.raw.length),i=e[e.length-1],i&&"text"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);else if(t){const 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,i,a,o,s,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,a.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(o||(s=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))))if(r=this.tokenizer.escape(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.tag(t))t=t.substring(r.raw.length),n=e[e.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);else if(r=this.tokenizer.link(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(r.raw.length),n=e[e.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);else if(r=this.tokenizer.emStrong(t,l,s))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.codespan(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.br(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.del(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.autolink(t))t=t.substring(r.raw.length),e.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(t))){if(i=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let n;this.options.extensions.startInline.forEach((t=>{n=t.call({lexer:this},r),"number"==typeof n&&n>=0&&(e=Math.min(e,n))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(i))t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),o=!0,n=e[e.length-1],n&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(r.raw.length),e.push(r);return e}}class st{options;parser;constructor(t){this.options=t||o}space(t){return""}code({text:t,lang:e,escaped:r}){const n=(e||"").match(/^\S*/)?.[0],i=t.replace(/\n$/,"")+"\n";return n?'
'+(r?i:f(i,!0))+"
\n":"
"+(r?i:f(i,!0))+"
\n"}blockquote({tokens:t}){return`
\n${this.parser.parse(t)}
\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
\n"}list(t){const e=t.ordered,r=t.start;let n="";for(let e=0;e\n"+n+"\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"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+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):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 e=0;e${n}`),"\n\n"+e+"\n"+n+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){const 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`${t}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){const n=this.parser.parseInline(r),i=x(t);if(null===i)return n;let a='
    ",a}image({href:t,title:e,text:r}){const n=x(t);if(null===n)return r;let i=`${r}{const 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){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const 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){const 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'");const 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){const e=this.defaults.renderer||new st(this.defaults);for(const r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const n=r;let i=t.renderer[n];t.useNewRenderer||(i=this.#e(i,n,e));const 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){const e=this.defaults.tokenizer||new _(this.defaults);for(const r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const 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){const e=this.defaults.hooks||new ct;for(const r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if("options"===r)continue;const n=r,i=t.hooks[n],a=e[n];ct.passThroughHooks.has(r)?e[n]=t=>{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then((t=>a.call(e,t)));const r=i.call(e,t);return a.call(e,r)}:e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){const 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}#e(t,e,r){switch(e){case"heading":return function(n){return n.type&&n.type===e?t.call(this,r.parser.parseInline(n.tokens),n.depth,function(t){return t.replace(g,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}(r.parser.parseInline(n.tokens,r.parser.textRenderer))):t.apply(this,arguments)};case"code":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.lang,!!r.escaped):t.apply(this,arguments)};case"table":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);let n="",i="";for(let t=0;t0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):s+=t+" "}s+=this.parser.parse(e.tokens,a),o+=this.listitem({type:"list_item",raw:s,text:s,task:i,checked:!!n,loose:a,tokens:e.tokens})}return t.call(this,o,n,i)};case"html":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.block):t.apply(this,arguments)};case"paragraph":case"strong":case"em":case"del":return function(r){return r.type&&r.type===e?t.call(this,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"escape":case"codespan":case"text":return function(r){return r.type&&r.type===e?t.call(this,r.text):t.apply(this,arguments)};case"link":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"image":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,r.text):t.apply(this,arguments)}}return t}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return ot.lex(t,e??this.defaults)}parser(t,e){return ht.parse(t,e??this.defaults)}#t(t,e){return(r,n)=>{const i={...n},a={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);const o=this.#r(!!a.silent,!!a.async);if(null==r)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then((e=>t(e,a))).then((t=>a.hooks?a.hooks.processAllTokens(t):t)).then((t=>a.walkTokens?Promise.all(this.walkTokens(t,a.walkTokens)).then((()=>t)):t)).then((t=>e(t,a))).then((t=>a.hooks?a.hooks.postprocess(t):t)).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=t(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let i=e(n,a);return a.hooks&&(i=a.hooks.postprocess(i)),i}catch(t){return o(t)}}}#r(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="

    An error occurred:

    "+f(r.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function dt(t,e){return ut.parse(t,e)}dt.options=dt.setOptions=function(t){return ut.setOptions(t),dt.defaults=ut.defaults,s(dt.defaults),dt},dt.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},dt.defaults=o,dt.use=function(...t){return ut.use(...t),dt.defaults=ut.defaults,s(dt.defaults),dt},dt.walkTokens=function(t,e){return ut.walkTokens(t,e)},dt.parseInline=ut.parseInline,dt.Parser=ht,dt.parser=ht.parse,dt.Renderer=st,dt.TextRenderer=lt,dt.Lexer=ot,dt.lexer=ot.lex,dt.Tokenizer=_,dt.Hooks=ct,dt.parse=dt,dt.options,dt.setOptions,dt.use,dt.walkTokens,dt.parseInline,ht.parse,ot.lex;var pt=r(513);function ft(t,{markdownAutoWrap:e}){const r=t.replace(//g,"\n").replace(/\n{2,}/g,"\n"),n=(0,pt.T)(r);return!1===e?n.replace(/ /g," "):n}function gt(t,e={}){const r=ft(t,e),n=dt.lexer(r),a=[[]];let o=0;function s(t,e="normal"){"text"===t.type?t.text.split("\n").forEach(((t,r)=>{0!==r&&(o++,a.push([])),t.split(" ").forEach((t=>{(t=t.replace(/'/g,"'"))&&a[o].push({content:t,type:e})}))})):"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{s(e,t.type)})):"html"===t.type&&a[o].push({content:t.text,type:"normal"})}return(0,i.K2)(s,"processNode"),n.forEach((t=>{"paragraph"===t.type?t.tokens?.forEach((t=>{s(t)})):"html"===t.type&&a[o].push({content:t.text,type:"normal"})})),a}function yt(t,{markdownAutoWrap:e}={}){const r=dt.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:`Unsupported markdown: ${t.type}`}return(0,i.K2)(n,"output"),r.map(n).join("")}function mt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function xt(t,e){return bt(t,[],mt(e.content),e.type)}function bt(t,e,r,n){if(0===r.length)return[{content:e.join(""),type:n},{content:"",type:n}];const[i,...a]=r,o=[...e,i];return t([{content:o.join(""),type:n}])?bt(t,o,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function kt(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ct(t,e)}function Ct(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"},o=[...n];if(""!==i&&o.push({content:i,type:"normal"}),o.push(a),e(o))return Ct(t,e,r,o);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){const[n,i]=xt(e,a);r.push([n]),i.content&&t.unshift(i)}return Ct(t,e,r)}function wt(t,e){e&&t.attr("style",e)}async function _t(t,e,r,n,a=!1){const o=t.append("foreignObject");o.attr("width",10*r+"px"),o.attr("height",10*r+"px");const s=o.append("xhtml:div");let l=e.label;e.label&&(0,i.Wi)(e.label)&&(l=await(0,i.VJ)(e.label.replace(i.Y2.lineBreakRegex,"\n"),(0,i.D7)()));const h=e.isNode?"nodeLabel":"edgeLabel",c=s.append("span");c.html(l),wt(c,e.labelStyle),c.attr("class",`${h} ${n}`),wt(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),u=s.node().getBoundingClientRect()),o.node()}function vt(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 St(t,e,r){const n=t.append("text"),i=vt(n,1,e);Mt(i,r);const a=i.node().getComputedTextLength();return n.remove(),a}function Tt(t,e,r){const n=t.append("text"),i=vt(n,1,e);Mt(i,[{content:r,type:"normal"}]);const a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function At(t,e,r,n=!1){const a=e.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let l=0;for(const e of r){const r=(0,i.K2)((e=>St(a,1.1,e)<=t),"checkWidth"),n=r(e)?[e]:kt(e,r);for(const t of n)Mt(vt(s,l,1.1),t),l++}if(n){const t=s.node().getBBox(),e=2;return o.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return s.node()}function Mt(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)}))}function Bt(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,(t=>``))}(0,i.K2)(ft,"preprocessMarkdown"),(0,i.K2)(gt,"markdownToLines"),(0,i.K2)(yt,"markdownToHTML"),(0,i.K2)(mt,"splitTextToChars"),(0,i.K2)(xt,"splitWordToFitWidth"),(0,i.K2)(bt,"splitWordToFitWidthRecursion"),(0,i.K2)(kt,"splitLineToFitWidth"),(0,i.K2)(Ct,"splitLineToFitWidthRecursion"),(0,i.K2)(wt,"applyStyle"),(0,i.K2)(_t,"addHtmlSpan"),(0,i.K2)(vt,"createTspan"),(0,i.K2)(St,"computeWidthOfText"),(0,i.K2)(Tt,"computeDimensionOfText"),(0,i.K2)(At,"createFormattedText"),(0,i.K2)(Mt,"updateTextContentAndStyles"),(0,i.K2)(Bt,"replaceIconSubstring");var Lt=(0,i.K2)((async(t,e="",{style:r="",isTitle:o=!1,classes:s="",useHtmlLabels:l=!0,isNode:h=!0,width:c=200,addSvgBackground:u=!1}={},d)=>{if(i.Rm.debug("XYZ createText",e,r,o,s,l,h,"addSvgBackground: ",u),l){const a=yt(e,d),o=Bt((0,n.Sm)(a)),l=e.replace(/\\\\/g,"\\"),p={isNode:h,label:(0,i.Wi)(e)?l:o,labelStyle:r.replace("fill:","color:")};return await _t(t,p,c,s,u)}{const n=At(c,t,gt(e.replace(//g,"
    ").replace("
    ","
    "),d),!!e&&u);if(h){/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,a.Ltv)(n).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,a.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,a.Ltv)(n).select("text").attr("style",e)}return n}}),"createText")},8159:(t,e,r)=>{"use strict";r.d(e,{$C:()=>A,$t:()=>j,C4:()=>H,I5:()=>q,Ib:()=>g,KL:()=>G,Sm:()=>U,Un:()=>O,_K:()=>W,bH:()=>$,dq:()=>K,pe:()=>l,rY:()=>Y,ru:()=>D,sM:()=>S,vU:()=>p,yT:()=>B});var n=r(9502),i=r(6750),a=r(4852),o=r(6632),s=r(7222),l="​",h={curveBasis:a.qrM,curveBasisClosed:a.Yu4,curveBasisOpen:a.IA3,curveBumpX:a.Wi0,curveBumpY:a.PGM,curveBundle:a.OEq,curveCardinalClosed:a.olC,curveCardinalOpen:a.IrU,curveCardinal:a.y8u,curveCatmullRomClosed:a.Q7f,curveCatmullRomOpen:a.cVp,curveCatmullRom:a.oDi,curveLinear:a.lUB,curveLinearClosed:a.Lx9,curveMonotoneX:a.nVG,curveMonotoneY:a.uxU,curveNatural:a.Xf2,curveStep:a.GZz,curveStepAfter:a.UPb,curveStepBefore:a.dyv},c=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,u=(0,n.K2)((function(t,e){const r=d(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 o="config";return void 0!==i[o]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[o],delete i[o]),i}),"detectInit"),d=(0,n.K2)((function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${c.source})(?=[}][%]{2}).*\n`,"ig");let i;t=t.trim().replace(r,"").replace(/'/gm,'"'),n.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const a=[];for(;null!==(i=n.DB.exec(t));)if(i.index===n.DB.lastIndex&&n.DB.lastIndex++,i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e)){const t=i[1]?i[1]:i[2],e=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:t,args:e})}return 0===a.length?{type:t,args:null}:1===a.length?a[0]:a}catch(r){return n.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),p=(0,n.K2)((function(t){return t.replace(n.DB,"")}),"removeDirectives"),f=(0,n.K2)((function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1}),"isSubstringInArray");function g(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,i.J)(r):r}(0,n.K2)(g,"interpolateToCurve"),(0,n.K2)(y,"formatUrl");var m=(0,n.K2)(((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let o=window;for(let e=0;e{r+=x(t,e),e=t})),w(t,r/2)}function k(t){return 1===t.length?t[0]:b(t)}(0,n.K2)(x,"distance"),(0,n.K2)(b,"traverseEdge"),(0,n.K2)(k,"calcLabelPosition");var C=(0,n.K2)(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),w=(0,n.K2)(((t,e)=>{let r,n=e;for(const e of t){if(r){const t=x(e,r);if(t=1)return{x:e.x,y:e.y};if(i>0&&i<1)return{x:C((1-i)*r.x+i*e.x,5),y:C((1-i)*r.y+i*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),_=(0,n.K2)(((t,e,r)=>{n.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=w(e,25),a=t?10:5,o=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+i.x)/2,s.y=-Math.cos(o)*a+(e[0].y+i.y)/2,s}),"calcCardinalityPosition");function v(t,e,r){const i=structuredClone(r);n.Rm.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=w(i,25+t),o=10+.5*t,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}function S(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,n.K2)(v,"calcTerminalLabelPosition"),(0,n.K2)(S,"getStylesFromArray");var T=0,A=(0,n.K2)((()=>(T++,"id-"+Math.random().toString(36).substr(2,12)+"-"+T)),"generateId");function M(t){let e="";for(let r=0;rM(t.length)),"random"),L=(0,n.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"),F=(0,n.K2)((function(t,e){const r=e.text.replace(n.Y2.lineBreakRegex," "),[,i]=q(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 o=a.append("tspan");return o.attr("x",e.x+2*e.textMargin),o.attr("fill",e.fill),o.text(r),a}),"drawSimpleText"),$=(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 o="";return i.forEach(((t,n)=>{const s=O(`${t} `,r),l=O(o,r);if(s>e){const{hyphenatedStrings:n,remainingWord:i}=E(t,e,"-",r);a.push(o,...n),o=i}else l+s>=e?(a.push(o),o=t):o=[o,t].filter(Boolean).join(" ");n+1===i.length&&a.push(o)})),a.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),E=(0,o.A)(((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],a=[];let o="";return i.forEach(((t,s)=>{const l=`${o}${t}`;if(O(l,n)>=e){const t=s+1,e=i.length===t,n=`${l}${r}`;a.push(e?l:n),o=""}else o=l})),{hyphenatedStrings:a,remainingWord:o}}),((t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`));function D(t,e){return N(t,e).height}function O(t,e){return N(t,e).width}(0,n.K2)(D,"calculateTextHeight"),(0,n.K2)(O,"calculateTextWidth");var I,N=(0,o.A)(((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,s]=q(r),h=["sans-serif",i],c=t.split(n.Y2.lineBreakRegex),u=[],d=(0,a.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const t of h){let e=0;const r={width:0,height:0,lineHeight:0};for(const n of c){const i=L();i.text=n||l;const a=F(p,i).style("font-size",s).style("font-weight",o).style("font-family",t),h=(a._groups||a)[0][0].getBBox();if(0===h.width&&0===h.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,h.width)),e=Math.round(h.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}u.push(r)}return p.remove(),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}`)),R=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.K2)(this,"InitIDGenerator")}},P=(0,n.K2)((function(t){return I=I||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),I.innerHTML=t,unescape(I.textContent)}),"entityDecode");function K(t){return"str"in t}(0,n.K2)(K,"isDetailedError");var z=(0,n.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"),q=(0,n.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,s.A)({},t,e)}(0,n.K2)(j,"cleanAndMerge");var W={assignWithDepth:n.hH,wrapLabel:$,calculateTextHeight:D,calculateTextWidth:O,calculateTextDimensions:N,cleanAndMerge:j,detectInit:u,detectDirective:d,isSubstringInArray:f,interpolateToCurve:g,calcLabelPosition:k,calcCardinalityPosition:_,calcTerminalLabelPosition:v,formatUrl:y,getStylesFromArray:S,generateId:A,random:B,runFunc:m,entityDecode:P,insertTitle:z,parseFontSize:q,InitIDGenerator:R},H=(0,n.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"),U=(0,n.K2)((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),Y=(0,n.K2)(((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`),"getEdgeId");function G(t){return t??null}(0,n.K2)(G,"handleUndefinedAttr")},1282:(t,e,r)=>{"use strict";r.d(e,{DA:()=>k,IU:()=>D,U:()=>E,U7:()=>we,U_:()=>ve,Zk:()=>c,aP:()=>be,gh:()=>_e,lC:()=>d,on:()=>Ce});var n=r(1099),i=r(3115),a=r(6058),o=r(8159),s=r(9502),l=r(4852),h=r(2274),c=(0,s.K2)((async(t,e,r)=>{let n;const i=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels);n=r||"node default";const h=t.insert("g").attr("class",n).attr("id",e.domId||e.id),c=h.insert("g").attr("class","label").attr("style",(0,o.KL)(e.labelStyle));let u;u=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const d=await(0,a.GZ)(c,(0,s.jZ)((0,o.Sm)(u),(0,s.D7)()),{useHtmlLabels:i,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let p=d.getBBox();const f=(e?.padding??0)/2;if(i){const t=d.children[0],e=(0,l.Ltv)(d),r=t.getElementsByTagName("img");if(r){const t=""===u.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,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[n=s.UI.fontSize]=(0,o.I5)(t),i=n*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,s.K2)(n,"setupImage"),setTimeout((()=>{e.complete&&n()})),e.addEventListener("error",n),e.addEventListener("load",n)})))))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return i?c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):c.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:h,bbox:p,halfPadding:f,label:c}}),"labelHelper"),u=(0,s.K2)((async(t,e,r)=>{const n=r.useHtmlLabels||(0,s._3)((0,s.D7)()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),h=await(0,a.GZ)(i,(0,s.jZ)((0,o.Sm)(e),(0,s.D7)()),{useHtmlLabels:n,width:r.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let c=h.getBBox();const u=r.padding/2;if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){const t=h.children[0],e=(0,l.Ltv)(h);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return n?i.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):i.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:c,halfPadding:u,label:i}}),"insertLabel"),d=(0,s.K2)(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds"),p=(0,s.K2)(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function f(t){const e=t.map(((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`));return e.push("Z"),e.join(" ")}function g(t,e,r,n,i,a){const o=[],s=r-t,l=n-e,h=s/a,c=2*Math.PI/h,u=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*s,n=u+i*Math.sin(c*(r-t));o.push({x:r,y:n})}return o}function y(t,e,r,n,i,a){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let i=0;i{var r,n,i=t.x,a=t.y,o=e.x-i,s=e.y-a,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(o)*h?(s<0&&(h=-h),r=0===s?0:h*o/s,n=h):(o<0&&(l=-l),r=l,n=0===o?0:l*s/o),{x:i+r,y:a+n}}),"intersectRect");function x(t,e){e&&t.attr("style",e)}async function b(t){const e=(0,l.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let n=t.label;t.label&&(0,s.Wi)(t.label)&&(n=await(0,s.VJ)(t.label.replace(s.Y2.lineBreakRegex,"\n"),(0,s.D7)()));const i=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+""),x(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,s.K2)(x,"applyStyle"),(0,s.K2)(b,"addHtmlLabel");var k=(0,s.K2)((async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),s.Rm.info("vertexText"+i);const t={isNode:n,label:(0,o.Sm)(i).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``)),labelStyle:e?e.replace("fill:","color:"):e};return await b(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"),C=(0,s.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"),w=(0,s.K2)((t=>{const{handDrawnSeed:e}=(0,s.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}}),"solidStateFill"),_=(0,s.K2)((t=>{const e=v([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}}),"compileStyles"),v=(0,s.K2)((t=>{const e=new Map;return t.forEach((t=>{const[r,n]=t.split(":");e.set(r.trim(),n?.trim())})),e}),"styles2Map"),S=(0,s.K2)((t=>{const{stylesArray:e}=_(t),r=[],n=[],i=[],a=[];return e.forEach((t=>{const e=t[0];"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===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"),T=(0,s.K2)(((t,e)=>{const{themeVariables:r,handDrawnSeed:n}=(0,s.D7)(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:o}=_(t);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||i,seed:n,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)}),"userNodeOverrides"),A=(0,s.K2)((async(t,e)=>{s.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:n,handDrawnSeed:o}=r,{clusterBkg:c,clusterBorder:u}=n,{labelStyles:d,nodeStyles:p,borderStyles:f,backgroundStyles:g}=S(e),y=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),x=(0,s._3)(r.flowchart.htmlLabels),b=y.insert("g").attr("class","cluster-label "),k=await(0,a.GZ)(b,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0});let w=k.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=k.children[0],e=(0,l.Ltv)(k);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}const _=e.width<=w.width+e.padding?w.width+e.padding:e.width;e.width<=w.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,A=e.x-_/2,M=e.y-v/2;let B;if(s.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(y),r=T(e,{roughness:.7,fill:c,stroke:u,fillWeight:3,seed:o}),n=t.path(C(A,M,_,v,0),r);B=y.insert((()=>(s.Rm.debug("Rough node insert CXC",n),n)),":first-child"),B.select("path:nth-child(2)").attr("style",f.join(";")),B.select("path").attr("style",g.join(";").replace("fill","stroke"))}else B=y.insert("rect",":first-child"),B.attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",M).attr("width",_).attr("height",v);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(b.attr("transform",`translate(${e.x-w.width/2}, ${e.y-e.height/2+L})`),d){const t=b.select("span");t&&t.attr("style",d)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=w.height-e.padding/2,e.intersect=function(t){return m(e,t)},{cluster:y,labelBBox:w}}),"rect"),M=(0,s.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 o=n.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return m(e,t)},{cluster:r,labelBBox:{width:0,height:0}}}),"noteGroup"),B=(0,s.K2)((async(t,e)=>{const r=(0,s.D7)(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:c,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 y=f.node().appendChild(await k(e.label,e.labelStyle,void 0,!0));let x=y.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=y.children[0],e=(0,l.Ltv)(y);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}const b=0*e.padding,w=b/2,_=(e.width<=x.width+e.padding?x.width+e.padding:e.width)+b;e.width<=x.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height+b,S=e.height+b-x.height-6,T=e.x-_/2,A=e.y-v/2;e.width=_;const M=e.y-e.height/2-w+x.height+2;let B;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=h.A.svg(d),n=e.rx||e.ry?r.path(C(T,A,_,v,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:u,seed:i}):r.rectangle(T,A,_,v,{seed:i});B=d.insert((()=>n),":first-child");const s=r.rectangle(T,M,_,S,{fill:t?a:o,fillStyle:t?"hachure":"solid",stroke:u,seed:i});B=d.insert((()=>n),":first-child"),g=d.insert((()=>s))}else{B=p.insert("rect",":first-child");const t="outer";B.attr("class",t).attr("x",T).attr("y",A).attr("width",_).attr("height",v).attr("data-look",e.look),g.attr("class","inner").attr("x",T).attr("y",M).attr("width",_).attr("height",S)}f.attr("transform",`translate(${e.x-x.width/2}, ${A+1-((0,s._3)(r.flowchart.htmlLabels)?0:3)})`);const L=B.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=x.height-e.padding/2,e.labelBBox=x,e.intersect=function(t){return m(e,t)},{cluster:d,labelBBox:x}}),"roundedWithTitle"),L=(0,s.K2)((async(t,e)=>{s.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:n,handDrawnSeed:o}=r,{clusterBkg:c,clusterBorder:u}=n,{labelStyles:d,nodeStyles:p,borderStyles:f,backgroundStyles:g}=S(e),y=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),x=(0,s._3)(r.flowchart.htmlLabels),b=y.insert("g").attr("class","cluster-label "),k=await(0,a.GZ)(b,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width});let w=k.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=k.children[0],e=(0,l.Ltv)(k);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}const _=e.width<=w.width+e.padding?w.width+e.padding:e.width;e.width<=w.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height,A=e.x-_/2,M=e.y-v/2;let B;if(s.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(y),r=T(e,{roughness:.7,fill:c,stroke:u,fillWeight:4,seed:o}),n=t.path(C(A,M,_,v,e.rx),r);B=y.insert((()=>(s.Rm.debug("Rough node insert CXC",n),n)),":first-child"),B.select("path:nth-child(2)").attr("style",f.join(";")),B.select("path").attr("style",g.join(";").replace("fill","stroke"))}else B=y.insert("rect",":first-child"),B.attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",M).attr("width",_).attr("height",v);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(b.attr("transform",`translate(${e.x-w.width/2}, ${e.y-e.height/2+L})`),d){const t=b.select("span");t&&t.attr("style",d)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=w.height-e.padding/2,e.intersect=function(t){return m(e,t)},{cluster:y,labelBBox:w}}),"kanbanSection"),F={rect:A,squareRect:A,roundedWithTitle:B,noteGroup:M,divider:(0,s.K2)(((t,e)=>{const r=(0,s.D7)(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=o.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(o).rectangle(p,f,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});g=o.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 y=g.node().getBBox();return e.height=y.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return m(e,t)},{cluster:o,labelBBox:{}}}),"divider"),kanbanSection:L},$=new Map,E=(0,s.K2)((async(t,e)=>{const r=e.shape||"rect",n=await F[r](t,e);return $.set(e.id,n),n}),"insertCluster"),D=(0,s.K2)((()=>{$=new Map}),"clear");function O(t,e){return t.intersect(e)}(0,s.K2)(O,"intersectNode");var I=O;function N(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,s=a-n.y,l=Math.sqrt(e*e*s*s+r*r*o*o),h=Math.abs(e*r*o/l);n.x0}(0,s.K2)(z,"intersectLine"),(0,s.K2)(q,"sameSign");var j=z;function W(t,e,r){let n=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=n-t.width/2-o,h=i-t.height/2-s;for(let n=0;n1&&a.sort((function(t,e){let n=t.x-r.x,i=t.y-r.y,a=Math.sqrt(n*n+i*i),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return af),":first-child");return g.attr("class","anchor").attr("style",(0,o.KL)(l)),d(e,g),e.intersect=function(t){return s.Rm.info("Circle intersect",e,1,t),H.circle(e,1,t)},a}function Y(t,e,r,n,i,a,o){const s=(t+r)/2,l=(e+n)/2,h=Math.atan2(n-e,r-t),c=(r-t)/2/i,u=(n-e)/2/a,d=Math.sqrt(c**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=s+p*a*Math.sin(h)*(o?-1:1),g=l-p*i*Math.cos(h)*(o?-1:1),y=Math.atan2((e-g)/a,(t-f)/i);let m=Math.atan2((n-g)/a,(r-f)/i)-y;o&&m<0&&(m+=2*Math.PI),!o&&m>0&&(m-=2*Math.PI);const x=[];for(let t=0;t<20;t++){const e=y+t/19*m,r=f+i*Math.cos(e),n=g+a*Math.sin(e);x.push({x:r,y:n})}return x}async function G(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=a.width+e.padding+20,s=a.height+e.padding,l=s/2,u=l/(2.5+s/50),{cssStyles:g}=e,y=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Y(-o/2,-s/2,-o/2,s/2,u,l,!1),{x:o/2,y:s/2},...Y(o/2,s/2,o/2,-s/2,u,l,!0)],m=h.A.svg(i),x=T(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=f(y),k=m.path(b,x),C=i.insert((()=>k),":first-child");return C.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",g),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${u/2}, 0)`),d(e,C),e.intersect=function(t){return H.polygon(e,y,t)},i}function V(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 Z(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=a.height+e.padding,s=a.width+e.padding+12,l=-o,u=[{x:12,y:l},{x:s,y:l},{x:s,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{}),n=f(u),a=t.path(n,r);g=i.insert((()=>a),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),y&&g.attr("style",y)}else g=V(i,s,o,u);return n&&g.attr("style",n),d(e,g),e.intersect=function(t){return H.polygon(e,u,t)},i}function X(t,e){const{nodeStyles:r}=S(e);e.label="";const n=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=h.A.svg(n),l=T(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const c=f(o),u=s.path(c,l),d=n.insert((()=>u),":first-child");return i&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",i),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return H.polygon(e,o,t)},n}async function Q(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:l}=await c(t,e,p(e)),u=a.width/2+l;let f;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{}),n=t.circle(0,0,2*u,r);f=i.insert((()=>n),":first-child"),f.attr("class","basic label-container").attr("style",(0,o.KL)(g))}else f=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0);return d(e,f),e.intersect=function(t){return s.Rm.info("Circle intersect",e,u,t),H.circle(e,u,t)},i}function J(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 tt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r,e.label="";const i=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:o}=e,l=h.A.svg(i),c=T(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=l.circle(0,0,2*a,c),f=J(a),g=l.path(f,c),y=i.insert((()=>u),":first-child");return y.insert((()=>g)),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),d(e,y),e.intersect=function(t){return s.Rm.info("crossedCircle intersect",e,{radius:a,point:t}),H.circle(e,a,t)},i}function et(t,e,r,n=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let i=0;i_),":first-child").attr("stroke-opacity",0),v.insert((()=>C),":first-child"),v.attr("class","text"),g&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",g),n&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-s/2+u-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),d(e,v),e.intersect=function(t){return H.polygon(e,m,t)},i}function nt(t,e,r,n=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let i=0;i_),":first-child").attr("stroke-opacity",0),v.insert((()=>C),":first-child"),v.attr("class","text"),g&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",g),n&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),d(e,v),e.intersect=function(t){return H.polygon(e,m,t)},i}function at(t,e,r,n=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let i=0;iM),":first-child").attr("stroke-opacity",0),B.insert((()=>w),":first-child"),B.insert((()=>v),":first-child"),B.attr("class","text"),g&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",g),n&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),d(e,B),e.intersect=function(t){return H.polygon(e,x,t)},i}async function st(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=Math.max(80,1.25*(a.width+2*(e.padding??0)),e?.width??0),s=Math.max(20,a.height+2*(e.padding??0),e?.height??0),l=s/2,{cssStyles:u}=e,g=h.A.svg(i),m=T(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const x=o-l,b=s/4,k=[{x,y:0},{x:b,y:0},{x:0,y:s/2},{x:b,y:s},{x,y:s},...y(-x,-s/2,l,50,270,90)],C=f(k),w=g.path(C,m),_=i.insert((()=>w),":first-child");return _.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",u),n&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",n),_.attr("transform",`translate(${-o/2}, ${-s/2})`),d(e,_),e.intersect=function(t){return H.polygon(e,k,t)},i}(0,s.K2)(U,"anchor"),(0,s.K2)(Y,"generateArcPoints"),(0,s.K2)(G,"bowTieRect"),(0,s.K2)(V,"insertPolygonShape"),(0,s.K2)(Z,"card"),(0,s.K2)(X,"choice"),(0,s.K2)(Q,"circle"),(0,s.K2)(J,"createLine"),(0,s.K2)(tt,"crossedCircle"),(0,s.K2)(et,"generateCirclePoints"),(0,s.K2)(rt,"curlyBraceLeft"),(0,s.K2)(nt,"generateCirclePoints"),(0,s.K2)(it,"curlyBraceRight"),(0,s.K2)(at,"generateCirclePoints"),(0,s.K2)(ot,"curlyBraces"),(0,s.K2)(st,"curvedTrapezoid");var lt=(0,s.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"),ht=(0,s.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"),ct=(0,s.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 ut(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await c(t,e,p(e)),l=Math.max(a.width+e.padding,e.width??0),u=l/2,f=u/(2.5+l/50),g=Math.max(a.height+f+e.padding,e.height??0);let y;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=ht(0,0,l,g,u,f),n=ct(0,f,l,g,u,f),a=t.path(r,T(e,{})),o=t.path(n,T(e,{fill:"none"}));y=i.insert((()=>o),":first-child"),y=i.insert((()=>a),":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const t=lt(0,0,l,g,u,f);y=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(m)).attr("style",n)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-l/2}, ${-(g/2+f)})`),d(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-a.height/2+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(t){const r=H.rect(e,t),n=r.x-(e.x??0);if(0!=u&&(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-f)){let i=f*f*(1-n*n/(u*u));i>0&&(i=Math.sqrt(i)),i=f-i,t.y-(e.y??0)>0&&(i=-i),r.y+=i}return r},i}async function dt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),s=a.width+e.padding,l=a.height+e.padding,u=.2*l,f=-s/2,g=-l/2-u/2,{cssStyles:y}=e,m=h.A.svg(i),x=T(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:f,y:g+u},{x:-f,y:g+u},{x:-f,y:-g},{x:f,y:-g},{x:f,y:g},{x:-f,y:g},{x:-f,y:g+u}],k=m.polygon(b.map((t=>[t.x,t.y])),x),C=i.insert((()=>k),":first-child");return C.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),o.attr("transform",`translate(${f+(e.padding??0)/2-(a.x-(a.left??0))}, ${g+u+(e.padding??0)/2-(a.y-(a.top??0))})`),d(e,C),e.intersect=function(t){return H.rect(e,t)},i}async function pt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:l}=await c(t,e,p(e)),u=a.width/2+l+5,f=a.width/2+l;let g;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{roughness:.2,strokeWidth:2.5}),n=T(e,{roughness:.2,strokeWidth:1.5}),a=t.circle(0,0,2*u,r),s=t.circle(0,0,2*f,n);g=i.insert("g",":first-child"),g.attr("class",(0,o.KL)(e.cssClasses)).attr("style",(0,o.KL)(y)),g.node()?.appendChild(a),g.node()?.appendChild(s)}else{g=i.insert("g",":first-child");const t=g.insert("circle",":first-child"),e=g.insert("circle");g.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0)}return d(e,g),e.intersect=function(t){return s.Rm.info("DoubleCircle intersect",e,u,t),H.circle(e,u,t)},i}function ft(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=S(e);e.label="",e.labelStyle=n;const a=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,l=h.A.svg(a),{nodeBorder:c}=r,u=T(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(u.roughness=0);const f=l.circle(0,0,14,u),g=a.insert((()=>f),":first-child");return g.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),d(e,g),e.intersect=function(t){return s.Rm.info("filledCircle intersect",e,{radius:7,point:t}),H.circle(e,7,t)},a}async function gt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),l=a.width+(e.padding??0),u=l+a.height,g=l+a.height,y=[{x:0,y:-u},{x:g,y:-u},{x:g/2,y:0}],{cssStyles:m}=e,x=h.A.svg(i),b=T(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=f(y),C=x.path(k,b),w=i.insert((()=>C),":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return m&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",m),n&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",n),e.width=l,e.height=u,d(e,w),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-u/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return s.Rm.info("Triangle intersect",e,y,t),H.polygon(e,y,t)},i}function yt(t,e,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:a}=S(e);e.label="";const o=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));const u=-1*l/2,f=-1*c/2,g=h.A.svg(o),y=T(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=g.rectangle(u,f,l,c,y),x=o.insert((()=>m),":first-child");s&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",a),d(e,x);const b=n?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return H.rect(e,t)},o}async function mt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=Math.max(80,a.width+2*(e.padding??0),e?.width??0),l=Math.max(50,a.height+2*(e.padding??0),e?.height??0),u=l/2,{cssStyles:g}=e,m=h.A.svg(i),x=T(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-o/2,y:-l/2},{x:o/2-u,y:-l/2},...y(-o/2+u,0,u,50,90,270),{x:o/2-u,y:l/2},{x:-o/2,y:l/2}],k=f(b),C=m.path(k,x),w=i.insert((()=>C),":first-child");return w.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",g),n&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",n),d(e,w),e.intersect=function(t){return s.Rm.info("Pill intersect",e,{radius:u,point:t}),H.polygon(e,b,t)},i}(0,s.K2)(ut,"cylinder"),(0,s.K2)(dt,"dividedRectangle"),(0,s.K2)(pt,"doublecircle"),(0,s.K2)(ft,"filledCircle"),(0,s.K2)(gt,"flippedTriangle"),(0,s.K2)(yt,"forkJoin"),(0,s.K2)(mt,"halfRoundedRectangle");var xt=(0,s.K2)(((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" ")),"createHexagonPathD");async function bt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=a.height+e.padding,s=o/4,l=a.width+2*s+e.padding,u=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-o/2},{x:l-s,y:-o},{x:s,y:-o},{x:0,y:-o/2}];let f;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{}),n=xt(0,0,l,o,s),a=t.path(n,r);f=i.insert((()=>a),":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),g&&f.attr("style",g)}else f=V(i,l,o,u);return n&&f.attr("style",n),e.width=l,e.height=o,d(e,f),e.intersect=function(t){return H.polygon(e,u,t)},i}async function kt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.label="",e.labelStyle=r;const{shapeSvg:i}=await c(t,e,p(e)),a=Math.max(30,e?.width??0),o=Math.max(30,e?.height??0),{cssStyles:l}=e,u=h.A.svg(i),g=T(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],m=f(y),x=u.path(m,g),b=i.insert((()=>x),":first-child");return b.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),n&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",n),b.attr("transform",`translate(${-a/2}, ${-o/2})`),d(e,b),e.intersect=function(t){return s.Rm.info("Pill intersect",e,{points:y}),H.polygon(e,y,t)},i}async function Ct(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=S(e);e.labelStyle=a;const o=e.assetHeight??48,l=e.assetWidth??48,u=Math.max(o,l),p=i?.wrappingWidth;e.width=Math.max(u,p??0);const{shapeSvg:f,bbox:g,label:y}=await c(t,e,"icon-shape default"),m="t"===e.pos,x=u,b=u,{nodeBorder:k}=r,{stylesMap:C}=_(e),w=-b/2,v=-x/2,A=e.label?8:0,M=h.A.svg(f),B=T(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const L=M.rectangle(w,v,b,x,B),F=Math.max(b,g.width),$=x+g.height+A,E=M.rectangle(-F/2,-$/2,F,$,{...B,fill:"transparent",stroke:"none"}),D=f.insert((()=>L),":first-child"),O=f.insert((()=>E));if(e.icon){const t=f.append("g");t.html(`${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,a=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${m?g.height/2+A/2-a/2-s:-g.height/2-A/2-a/2-s})`),t.attr("style",`color: ${C.get("stroke")??k};`)}return y.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${m?-$/2:$/2-g.height})`),D.attr("transform",`translate(0,${m?g.height/2+A/2:-g.height/2-A/2})`),d(e,O),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return H.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];return a=m?[{x:r-g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2+g.height+A},{x:r+b/2,y:n-i/2+g.height+A},{x:r+b/2,y:n+i/2},{x:r-b/2,y:n+i/2},{x:r-b/2,y:n-i/2+g.height+A},{x:r-g.width/2,y:n-i/2+g.height+A}]:[{x:r-b/2,y:n-i/2},{x:r+b/2,y:n-i/2},{x:r+b/2,y:n-i/2+x},{x:r+g.width/2,y:n-i/2+x},{x:r+g.width/2/2,y:n+i/2},{x:r-g.width/2,y:n+i/2},{x:r-g.width/2,y:n-i/2+x},{x:r-b/2,y:n-i/2+x}],H.polygon(e,a,t)},f}async function wt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=S(e);e.labelStyle=a;const o=e.assetHeight??48,l=e.assetWidth??48,u=Math.max(o,l),p=i?.wrappingWidth;e.width=Math.max(u,p??0);const{shapeSvg:f,bbox:g,label:y}=await c(t,e,"icon-shape default"),m=e.label?8:0,x="t"===e.pos,{nodeBorder:b,mainBkg:k}=r,{stylesMap:C}=_(e),w=h.A.svg(f),v=T(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const A=C.get("fill");v.stroke=A??k;const M=f.append("g");e.icon&&M.html(`${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const B=M.node().getBBox(),L=B.width,F=B.height,$=B.x,E=B.y,D=Math.max(L,F)*Math.SQRT2+40,O=w.circle(0,0,D,v),I=Math.max(D,g.width),N=D+g.height+m,R=w.rectangle(-I/2,-N/2,I,N,{...v,fill:"transparent",stroke:"none"}),P=f.insert((()=>O),":first-child"),K=f.insert((()=>R));return M.attr("transform",`translate(${-L/2-$},${x?g.height/2+m/2-F/2-E:-g.height/2-m/2-F/2-E})`),M.attr("style",`color: ${C.get("stroke")??b};`),y.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${x?-N/2:N/2-g.height})`),P.attr("transform",`translate(0,${x?g.height/2+m/2:-g.height/2-m/2})`),d(e,K),e.intersect=function(t){return s.Rm.info("iconSquare intersect",e,t),H.rect(e,t)},f}async function _t(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=S(e);e.labelStyle=a;const o=e.assetHeight??48,l=e.assetWidth??48,u=Math.max(o,l),p=i?.wrappingWidth;e.width=Math.max(u,p??0);const{shapeSvg:f,bbox:g,halfPadding:y,label:m}=await c(t,e,"icon-shape default"),x="t"===e.pos,b=u+2*y,k=u+2*y,{nodeBorder:w,mainBkg:v}=r,{stylesMap:A}=_(e),M=-k/2,B=-b/2,L=e.label?8:0,F=h.A.svg(f),$=T(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");const E=A.get("fill");$.stroke=E??v;const D=F.path(C(M,B,k,b,5),$),O=Math.max(k,g.width),I=b+g.height+L,N=F.rectangle(-O/2,-I/2,O,I,{...$,fill:"transparent",stroke:"none"}),R=f.insert((()=>D),":first-child").attr("class","icon-shape2"),P=f.insert((()=>N));if(e.icon){const t=f.append("g");t.html(`${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,a=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${x?g.height/2+L/2-a/2-s:-g.height/2-L/2-a/2-s})`),t.attr("style",`color: ${A.get("stroke")??w};`)}return m.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${x?-I/2:I/2-g.height})`),R.attr("transform",`translate(0,${x?g.height/2+L/2:-g.height/2-L/2})`),d(e,P),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return H.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];return a=x?[{x:r-g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2+g.height+L},{x:r+k/2,y:n-i/2+g.height+L},{x:r+k/2,y:n+i/2},{x:r-k/2,y:n+i/2},{x:r-k/2,y:n-i/2+g.height+L},{x:r-g.width/2,y:n-i/2+g.height+L}]:[{x:r-k/2,y:n-i/2},{x:r+k/2,y:n-i/2},{x:r+k/2,y:n-i/2+b},{x:r+g.width/2,y:n-i/2+b},{x:r+g.width/2/2,y:n+i/2},{x:r-g.width/2,y:n+i/2},{x:r-g.width/2,y:n-i/2+b},{x:r-k/2,y:n-i/2+b}],H.polygon(e,a,t)},f}async function vt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=S(e);e.labelStyle=a;const o=e.assetHeight??48,l=e.assetWidth??48,u=Math.max(o,l),p=i?.wrappingWidth;e.width=Math.max(u,p??0);const{shapeSvg:f,bbox:g,halfPadding:y,label:m}=await c(t,e,"icon-shape default"),x="t"===e.pos,b=u+2*y,k=u+2*y,{nodeBorder:w,mainBkg:v}=r,{stylesMap:A}=_(e),M=-k/2,B=-b/2,L=e.label?8:0,F=h.A.svg(f),$=T(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");const E=A.get("fill");$.stroke=E??v;const D=F.path(C(M,B,k,b,.1),$),O=Math.max(k,g.width),I=b+g.height+L,N=F.rectangle(-O/2,-I/2,O,I,{...$,fill:"transparent",stroke:"none"}),R=f.insert((()=>D),":first-child"),P=f.insert((()=>N));if(e.icon){const t=f.append("g");t.html(`${await(0,n.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,a=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${x?g.height/2+L/2-a/2-s:-g.height/2-L/2-a/2-s})`),t.attr("style",`color: ${A.get("stroke")??w};`)}return m.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${x?-I/2:I/2-g.height})`),R.attr("transform",`translate(0,${x?g.height/2+L/2:-g.height/2-L/2})`),d(e,P),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return H.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];return a=x?[{x:r-g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2},{x:r+g.width/2,y:n-i/2+g.height+L},{x:r+k/2,y:n-i/2+g.height+L},{x:r+k/2,y:n+i/2},{x:r-k/2,y:n+i/2},{x:r-k/2,y:n-i/2+g.height+L},{x:r-g.width/2,y:n-i/2+g.height+L}]:[{x:r-k/2,y:n-i/2},{x:r+k/2,y:n-i/2},{x:r+k/2,y:n-i/2+b},{x:r+g.width/2,y:n-i/2+b},{x:r+g.width/2/2,y:n+i/2},{x:r-g.width/2,y:n+i/2},{x:r-g.width/2,y:n-i/2+b},{x:r-k/2,y:n-i/2+b}],H.polygon(e,a,t)},f}async function St(t,e,{config:{flowchart:r}}){const n=new Image;n.src=e?.img??"",await n.decode();const i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;const{labelStyles:o}=S(e);e.labelStyle=o;const l=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const u=Math.max(e.label?l??0:0,e?.assetWidth??i),p="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:u,f="on"===e.constraint?p/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(p,l??0);const{shapeSvg:g,bbox:y,label:m}=await c(t,e,"image-shape default"),x="t"===e.pos,b=-p/2,k=-f/2,C=e.label?8:0,w=h.A.svg(g),_=T(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=w.rectangle(b,k,p,f,_),A=Math.max(p,y.width),M=f+y.height+C,B=w.rectangle(-A/2,-M/2,A,M,{..._,fill:"none",stroke:"none"}),L=g.insert((()=>v),":first-child"),F=g.insert((()=>B));if(e.img){const t=g.append("image");t.attr("href",e.img),t.attr("width",p),t.attr("height",f),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-p/2},${x?M/2-f:-M/2})`)}return m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-f/2-y.height/2-C/2:f/2-y.height/2+C/2})`),L.attr("transform",`translate(0,${x?y.height/2+C/2:-y.height/2-C/2})`),d(e,F),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return H.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];return a=x?[{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+C},{x:r+p/2,y:n-i/2+y.height+C},{x:r+p/2,y:n+i/2},{x:r-p/2,y:n+i/2},{x:r-p/2,y:n-i/2+y.height+C},{x:r-y.width/2,y:n-i/2+y.height+C}]:[{x:r-p/2,y:n-i/2},{x:r+p/2,y:n-i/2},{x:r+p/2,y:n-i/2+f},{x:r+y.width/2,y:n-i/2+f},{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+f},{x:r-p/2,y:n-i/2+f}],H.polygon(e,a,t)},g}async function Tt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),s=Math.max(a.height+2*(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let u;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{}),n=f(l),a=t.path(n,r);u=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),g&&u.attr("style",g)}else u=V(i,o,s,l);return n&&u.attr("style",n),e.width=o,e.height=s,d(e,u),e.intersect=function(t){return H.polygon(e,l,t)},i}async function At(t,e,r){const{labelStyles:n,nodeStyles:i}=S(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await c(t,e,p(e)),l=Math.max(s.width+2*r.labelPaddingX,e?.width||0),u=Math.max(s.height+2*r.labelPaddingY,e?.height||0),f=-l/2,g=-u/2;let y,{rx:m,ry:x}=e;const{cssStyles:b}=e;if(r?.rx&&r.ry&&(m=r.rx,x=r.ry),"handDrawn"===e.look){const t=h.A.svg(a),r=T(e,{}),n=m||x?t.path(C(f,g,l,u,m||0),r):t.rectangle(f,g,l,u,r);y=a.insert((()=>n),":first-child"),y.attr("class","basic label-container").attr("style",(0,o.KL)(b))}else y=a.insert("rect",":first-child"),y.attr("class","basic label-container").attr("style",i).attr("rx",(0,o.KL)(m)).attr("ry",(0,o.KL)(x)).attr("x",f).attr("y",g).attr("width",l).attr("height",u);return d(e,y),e.intersect=function(t){return H.rect(e,t)},a}async function Mt(t,e){const{shapeSvg:r,bbox:n,label:i}=await c(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))})`),d(e,a),e.intersect=function(t){return H.rect(e,t)},r}async function Bt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),s=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-3*s/6,y:-s}];let u;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{}),n=f(l),a=t.path(n,r);u=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),g&&u.attr("style",g)}else u=V(i,o,s,l);return n&&u.attr("style",n),e.width=o,e.height=s,d(e,u),e.intersect=function(t){return H.polygon(e,l,t)},i}async function Lt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),s=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let u;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{}),n=f(l),a=t.path(n,r);u=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),g&&u.attr("style",g)}else u=V(i,o,s,l);return n&&u.attr("style",n),e.width=o,e.height=s,d(e,u),e.intersect=function(t){return H.polygon(e,l,t)},i}function Ft(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.label="",e.labelStyle=r;const i=t.insert("g").attr("class",p(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(35,e?.width??0),l=Math.max(35,e?.height??0),c=[{x:o,y:0},{x:0,y:l+3.5},{x:o-14,y:l+3.5},{x:0,y:2*l},{x:o,y:l-3.5},{x:14,y:l-3.5}],u=h.A.svg(i),g=T(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=f(c),m=u.path(y,g),x=i.insert((()=>m),":first-child");return a&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(-${o/2},${-l})`),d(e,x),e.intersect=function(t){return s.Rm.info("lightningBolt intersect",e,t),H.polygon(e,c,t)},i}(0,s.K2)(bt,"hexagon"),(0,s.K2)(kt,"hourglass"),(0,s.K2)(Ct,"icon"),(0,s.K2)(wt,"iconCircle"),(0,s.K2)(_t,"iconRounded"),(0,s.K2)(vt,"iconSquare"),(0,s.K2)(St,"imageSquare"),(0,s.K2)(Tt,"inv_trapezoid"),(0,s.K2)(At,"drawRect"),(0,s.K2)(Mt,"labelRect"),(0,s.K2)(Bt,"lean_left"),(0,s.K2)(Lt,"lean_right"),(0,s.K2)(Ft,"lightningBolt");var $t=(0,s.K2)(((t,e,r,n,i,a,o)=>[`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+o}`,`a${i},${a} 0,0,0 ${r},0`].join(" ")),"createCylinderPathD"),Et=(0,s.K2)(((t,e,r,n,i,a,o)=>[`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+o}`,`a${i},${a} 0,0,0 ${r},0`].join(" ")),"createOuterCylinderPathD"),Dt=(0,s.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}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await c(t,e,p(e)),l=Math.max(a.width+(e.padding??0),e.width??0),u=l/2,f=u/(2.5+l/50),g=Math.max(a.height+f+(e.padding??0),e.height??0),y=.1*g;let m;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=Et(0,0,l,g,u,f,y),n=Dt(0,f,l,g,u,f),a=T(e,{}),o=t.path(r,a),s=t.path(n,a);i.insert((()=>s),":first-child").attr("class","line"),m=i.insert((()=>o),":first-child"),m.attr("class","basic label-container"),x&&m.attr("style",x)}else{const t=$t(0,0,l,g,u,f,y);m=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(x)).attr("style",n)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-l/2}, ${-(g/2+f)})`),d(e,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-a.height/2+f-(a.y-(a.top??0))})`),e.intersect=function(t){const r=H.rect(e,t),n=r.x-(e.x??0);if(0!=u&&(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-f)){let i=f*f*(1-n*n/(u*u));i>0&&(i=Math.sqrt(i)),i=f-i,t.y-(e.y??0)>0&&(i=-i),r.y+=i}return r},i}async function It(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=l/4,f=l+u,{cssStyles:y}=e,m=h.A.svg(i),x=T(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-s/2-s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:f/2},...g(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,u,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2},{x:-s/2,y:-f/2},{x:-s/2,y:f/2*1.1},{x:-s/2,y:-f/2}],k=m.polygon(b.map((t=>[t.x,t.y])),x),C=i.insert((()=>k),":first-child");return C.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),d(e,C),e.intersect=function(t){return H.polygon(e,b,t)},i}async function Nt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=-s/2,g=-l/2,{cssStyles:y}=e,m=h.A.svg(i),x=T(e,{}),b=[{x:u-5,y:g+5},{x:u-5,y:g+l+5},{x:u+s-5,y:g+l+5},{x:u+s-5,y:g+l},{x:u+s,y:g+l},{x:u+s,y:g+l-5},{x:u+s+5,y:g+l-5},{x:u+s+5,y:g-5},{x:u+5,y:g-5},{x:u+5,y:g},{x:u,y:g},{x:u,y:g+5}],k=[{x:u,y:g+5},{x:u+s-5,y:g+5},{x:u+s-5,y:g+l},{x:u+s,y:g+l},{x:u+s,y:g},{x:u,y:g}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const C=f(b),w=m.path(C,x),_=f(k),v=m.path(_,{...x,fill:"none"}),A=i.insert((()=>v),":first-child");return A.insert((()=>w),":first-child"),A.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",n),o.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),d(e,A),e.intersect=function(t){return H.polygon(e,b,t)},i}async function Rt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=l/4,y=l+u,m=-s/2,x=-y/2,{cssStyles:b}=e,k=g(m-5,x+y+5,m+s-5,x+y+5,u,.8),C=k?.[k.length-1],w=[{x:m-5,y:x+5},{x:m-5,y:x+y+5},...k,{x:m+s-5,y:C.y-5},{x:m+s,y:C.y-5},{x:m+s,y:C.y-10},{x:m+s+5,y:C.y-10},{x:m+s+5,y:x-5},{x:m+5,y:x-5},{x:m+5,y:x},{x:m,y:x},{x:m,y:x+5}],_=[{x:m,y:x+5},{x:m+s-5,y:x+5},{x:m+s-5,y:C.y-5},{x:m+s,y:C.y-5},{x:m+s,y:x},{x:m,y:x}],v=h.A.svg(i),A=T(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const M=f(w),B=v.path(M,A),L=f(_),F=v.path(L,A),$=i.insert((()=>B),":first-child");return $.insert((()=>F)),$.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",b),n&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-u/2-(a.y-(a.top??0))})`),d(e,$),e.intersect=function(t){return H.polygon(e,w,t)},i}async function Pt(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=S(e);e.labelStyle=n,e.useHtmlLabels||!1!==(0,s.zj)().flowchart?.htmlLabels||(e.centerLabel=!0);const{shapeSvg:a,bbox:o}=await c(t,e,p(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),u=Math.max(o.height+2*(e.padding??0),e?.height??0),f=-l/2,g=-u/2,{cssStyles:y}=e,m=h.A.svg(a),x=T(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=m.rectangle(f,g,l,u,x),k=a.insert((()=>b),":first-child");return k.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),d(e,k),e.intersect=function(t){return H.rect(e,t)},a}(0,s.K2)(Ot,"linedCylinder"),(0,s.K2)(It,"linedWaveEdgedRect"),(0,s.K2)(Nt,"multiRect"),(0,s.K2)(Rt,"multiWaveEdgedRectangle"),(0,s.K2)(Pt,"note");var Kt=(0,s.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 zt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=a.width+e.padding+(a.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 u;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{}),n=Kt(0,0,o),a=t.path(n,r);u=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${o/2})`),f&&u.attr("style",f)}else u=V(i,o,o,l);return n&&u.attr("style",n),d(e,u),e.intersect=function(t){return s.Rm.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",H.polygon(e,l,t)),H.polygon(e,l,t)},i}async function qt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),s=-Math.max(a.width+(e.padding??0),e?.width??0)/2,l=-Math.max(a.height+(e.padding??0),e?.height??0)/2,u=l/2,g=[{x:s+u,y:l},{x:s,y:0},{x:s+u,y:-l},{x:-s,y:-l},{x:-s,y:l}],{cssStyles:y}=e,m=h.A.svg(i),x=T(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=f(g),k=m.path(b,x),C=i.insert((()=>k),":first-child");return C.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",y),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),d(e,C),e.intersect=function(t){return H.polygon(e,g,t)},i}async function jt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);let i;e.labelStyle=r,i=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g"),c=a.insert("g").attr("class","label").attr("style",n),u=e.description,p=e.label,f=c.node().appendChild(await k(p,e.labelStyle,!0,!0));let g={width:0,height:0};if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){const t=f.children[0],e=(0,l.Ltv)(f);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}s.Rm.info("Text 2",u);const y=u||[],m=f.getBBox(),x=c.node().appendChild(await k(y.join?y.join("
    "):y,e.labelStyle,!0,!0)),b=x.children[0],w=(0,l.Ltv)(x);g=b.getBoundingClientRect(),w.attr("width",g.width),w.attr("height",g.height);const _=(e.padding||0)/2;(0,l.Ltv)(x).attr("transform","translate( "+(g.width>m.width?0:(m.width-g.width)/2)+", "+(m.height+_+5)+")"),(0,l.Ltv)(f).attr("transform","translate( "+(g.width(s.Rm.debug("Rough node insert CXC",n),i)),":first-child"),L=a.insert((()=>(s.Rm.debug("Rough node insert CXC",n),n)),":first-child")}else L=o.insert("rect",":first-child"),F=o.insert("line"),L.attr("class","outer title-state").attr("style",n).attr("x",-g.width/2-_).attr("y",-g.height/2-_).attr("width",g.width+(e.padding||0)).attr("height",g.height+(e.padding||0)),F.attr("class","divider").attr("x1",-g.width/2-_).attr("x2",g.width/2+_).attr("y1",-g.height/2-_+m.height+_).attr("y2",-g.height/2-_+m.height+_);return d(e,L),e.intersect=function(t){return H.rect(e,t)},a}async function Wt(t,e){return At(t,e,{rx:5,ry:5,classes:"",labelPaddingX:1*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function Ht(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await c(t,e,p(e)),l=e?.padding??0,u=Math.max(a.width+2*(e.padding??0),e?.width??0),f=Math.max(a.height+2*(e.padding??0),e?.height??0),g=-a.width/2-l,y=-a.height/2-l,{cssStyles:m}=e,x=h.A.svg(i),b=T(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y},{x:g+u+8,y},{x:g+u+8,y:y+f},{x:g-8,y:y+f},{x:g-8,y},{x:g,y},{x:g,y:y+f}],C=x.polygon(k.map((t=>[t.x,t.y])),b),w=i.insert((()=>C),":first-child");return w.attr("class","basic label-container").attr("style",(0,o.KL)(m)),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),m&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),s.attr("transform",`translate(${-u/2+4+(e.padding??0)-(a.x-(a.left??0))},${-f/2+(e.padding??0)-(a.y-(a.top??0))})`),d(e,w),e.intersect=function(t){return H.rect(e,t)},i}async function Ut(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=-s/2,g=-l/2,{cssStyles:y}=e,m=h.A.svg(i),x=T(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:u,y:g},{x:u,y:g+l},{x:u+s,y:g+l},{x:u+s,y:g-l/2}],k=f(b),C=m.path(k,x),w=i.insert((()=>C),":first-child");return w.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",y),n&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",n),w.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),d(e,w),e.intersect=function(t){return H.polygon(e,b,t)},i}async function Yt(t,e){return At(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function Gt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),s=a.height+e.padding,l=a.width+s/4+e.padding;let u;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{}),n=C(-l/2,-s/2,l,s,s/2),a=t.path(n,r);u=i.insert((()=>a),":first-child"),u.attr("class","basic label-container").attr("style",(0,o.KL)(f))}else u=i.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-l/2).attr("y",-s/2).attr("width",l).attr("height",s);return d(e,u),e.intersect=function(t){return H.rect(e,t)},i}async function Vt(t,e){return At(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function Zt(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=S(e);e.labelStyle=n;const{cssStyles:a}=e,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),u=h.A.svg(c),p=T(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const f=u.circle(0,0,14,{...p,stroke:o,strokeWidth:2}),g=s??l,y=u.circle(0,0,5,{...p,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),m=c.insert((()=>f),":first-child");return m.insert((()=>y)),a&&m.selectAll("path").attr("style",a),i&&m.selectAll("path").attr("style",i),d(e,m),e.intersect=function(t){return H.circle(e,7,t)},c}function Xt(t,e,{config:{themeVariables:r}}){const{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a;if("handDrawn"===e.look){const t=h.A.svg(i).circle(0,0,14,w(n));a=i.insert((()=>t)),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return d(e,a),e.intersect=function(t){return H.circle(e,7,t)},i}async function Qt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),s=(e?.padding||0)/2,l=a.width+e.padding,u=a.height+e.padding,f=-a.width/2-s,g=-a.height/2-s,y=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{}),n=t.rectangle(f-8,g,l+16,u,r),a=t.line(f,g,f,g+u,r),s=t.line(f+l,g,f+l,g+u,r);i.insert((()=>a),":first-child"),i.insert((()=>s),":first-child");const c=i.insert((()=>n),":first-child"),{cssStyles:p}=e;c.attr("class","basic label-container").attr("style",(0,o.KL)(p)),d(e,c)}else{const t=V(i,l,u,y);n&&t.attr("style",n),d(e,t)}return e.intersect=function(t){return H.polygon(e,y,t)},i}async function Jt(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),s=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-o/2,u=-s/2,g=.2*s,y=.2*s,{cssStyles:m}=e,x=h.A.svg(i),b=T(e,{}),k=[{x:l-g/2,y:u},{x:l+o+g/2,y:u},{x:l+o+g/2,y:u+s},{x:l-g/2,y:u+s}],C=[{x:l+o-g/2,y:u+s},{x:l+o+g/2,y:u+s},{x:l+o+g/2,y:u+s-y}];"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=f(k),_=x.path(w,b),v=f(C),A=x.path(v,{...b,fillStyle:"solid"}),M=i.insert((()=>A),":first-child");return M.insert((()=>_),":first-child"),M.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",n),d(e,M),e.intersect=function(t){return H.polygon(e,k,t)},i}async function te(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=l/4,y=.2*s,m=.2*l,x=l+u,{cssStyles:b}=e,k=h.A.svg(i),C=T(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const w=[{x:-s/2-s/2*.1,y:x/2},...g(-s/2-s/2*.1,x/2,s/2+s/2*.1,x/2,u,.8),{x:s/2+s/2*.1,y:-x/2},{x:-s/2-s/2*.1,y:-x/2}],_=-s/2+s/2*.1,v=-x/2-.4*m,A=[{x:_+s-y,y:1.4*(v+l)},{x:_+s,y:v+l-m},{x:_+s,y:.9*(v+l)},...g(_+s,1.3*(v+l),_+s-y,1.5*(v+l),.03*-l,.5)],M=f(w),B=k.path(M,C),L=f(A),F=k.path(L,{...C,fillStyle:"solid"}),$=i.insert((()=>F),":first-child");return $.insert((()=>B),":first-child"),$.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",b),n&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),d(e,$),e.intersect=function(t){return H.polygon(e,w,t)},i}async function ee(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=Math.max(a.width+e.padding,e?.width||0),s=Math.max(a.height+e.padding,e?.height||0),l=-o/2,h=-s/2,u=i.insert("rect",":first-child");return u.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",s),d(e,u),e.intersect=function(t){return H.rect(e,t)},i}(0,s.K2)(zt,"question"),(0,s.K2)(qt,"rect_left_inv_arrow"),(0,s.K2)(jt,"rectWithTitle"),(0,s.K2)(Wt,"roundedRect"),(0,s.K2)(Ht,"shadedProcess"),(0,s.K2)(Ut,"slopedRect"),(0,s.K2)(Yt,"squareRect"),(0,s.K2)(Gt,"stadium"),(0,s.K2)(Vt,"state"),(0,s.K2)(Zt,"stateEnd"),(0,s.K2)(Xt,"stateStart"),(0,s.K2)(Qt,"subroutine"),(0,s.K2)(Jt,"taggedRect"),(0,s.K2)(te,"taggedWaveEdgedRectangle"),(0,s.K2)(ee,"text");var re=(0,s.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"),ne=(0,s.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"),ie=(0,s.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 ae(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s,halfPadding:l}=await c(t,e,p(e)),u="neo"===e.look?2*l:l,f=a.height+u,g=f/2,y=g/(2.5+f/50),m=a.width+y+u,{cssStyles:x}=e;let b;if("handDrawn"===e.look){const t=h.A.svg(i),r=ne(0,0,m,f,y,g),n=ie(0,0,m,f,y,g),a=t.path(r,T(e,{})),o=t.path(n,T(e,{fill:"none"}));b=i.insert((()=>o),":first-child"),b=i.insert((()=>a),":first-child"),b.attr("class","basic label-container"),x&&b.attr("style",x)}else{const t=re(0,0,m,f,y,g);b=i.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(x)).attr("style",n),b.attr("class","basic label-container"),x&&b.selectAll("path").attr("style",x),n&&b.selectAll("path").attr("style",n)}return b.attr("label-offset-x",y),b.attr("transform",`translate(${-m/2}, ${f/2} )`),s.attr("transform",`translate(${-a.width/2-y-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),d(e,b),e.intersect=function(t){const r=H.rect(e,t),n=r.y-(e.y??0);if(0!=g&&(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/(g*g));0!=i&&(i=Math.sqrt(Math.abs(i))),i=y-i,t.x-(e.x??0)>0&&(i=-i),r.x+=i}return r},i}async function oe(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=a.width+e.padding,s=a.height+e.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let u;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=h.A.svg(i),r=T(e,{}),n=f(l),a=t.path(n,r);u=i.insert((()=>a),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),g&&u.attr("style",g)}else u=V(i,o,s,l);return n&&u.attr("style",n),e.width=o,e.height=s,d(e,u),e.intersect=function(t){return H.polygon(e,l,t)},i}async function se(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=Math.max(60,a.width+2*(e.padding??0),e?.width??0),s=Math.max(20,a.height+2*(e.padding??0),e?.height??0),{cssStyles:l}=e,u=h.A.svg(i),g=T(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-o/2*.8,y:-s/2},{x:o/2*.8,y:-s/2},{x:o/2,y:-s/2*.6},{x:o/2,y:s/2},{x:-o/2,y:s/2},{x:-o/2,y:-s/2*.6}],m=f(y),x=u.path(m,g),b=i.insert((()=>x),":first-child");return b.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),n&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",n),d(e,b),e.intersect=function(t){return H.polygon(e,y,t)},i}async function le(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),l=(0,s._3)((0,s.D7)().flowchart?.htmlLabels),u=a.width+(e.padding??0),g=u+a.height,y=u+a.height,m=[{x:0,y:0},{x:y,y:0},{x:y/2,y:-g}],{cssStyles:x}=e,b=h.A.svg(i),k=T(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=f(m),w=b.path(C,k),_=i.insert((()=>w),":first-child").attr("transform",`translate(${-g/2}, ${g/2})`);return x&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",x),n&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",n),e.width=u,e.height=g,d(e,_),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${g/2-(a.height+(e.padding??0)/(l?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return s.Rm.info("Triangle intersect",e,m,t),H.polygon(e,m,t)},i}async function he(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=l/8,y=l+u,{cssStyles:m}=e,x=70-s,b=x>0?x/2:0,k=h.A.svg(i),C=T(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const w=[{x:-s/2-b,y:y/2},...g(-s/2-b,y/2,s/2+b,y/2,u,.8),{x:s/2+b,y:-y/2},{x:-s/2-b,y:-y/2}],_=f(w),v=k.path(_,C),A=i.insert((()=>v),":first-child");return A.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u-(a.y-(a.top??0))})`),d(e,A),e.intersect=function(t){return H.polygon(e,w,t)},i}async function ce(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await c(t,e,p(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),s=Math.max(a.height+2*(e.padding??0),e?.height??0),l=o/s;let u=o,y=s;u>y*l?y=u/l:u=y*l,u=Math.max(u,100),y=Math.max(y,50);const m=Math.min(.2*y,y/4),x=y+2*m,{cssStyles:b}=e,k=h.A.svg(i),C=T(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const w=[{x:-u/2,y:x/2},...g(-u/2,x/2,u/2,x/2,m,1),{x:u/2,y:-x/2},...g(u/2,-x/2,-u/2,-x/2,m,-1)],_=f(w),v=k.path(_,C),A=i.insert((()=>v),":first-child");return A.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),n&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",n),d(e,A),e.intersect=function(t){return H.polygon(e,w,t)},i}async function ue(t,e){const{labelStyles:r,nodeStyles:n}=S(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:o}=await c(t,e,p(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),u=-s/2,f=-l/2,{cssStyles:g}=e,y=h.A.svg(i),m=T(e,{}),x=[{x:u-5,y:f-5},{x:u-5,y:f+l},{x:u+s,y:f+l},{x:u+s,y:f-5}],b=`M${u-5},${f-5} L${u+s},${f-5} L${u+s},${f+l} L${u-5},${f+l} L${u-5},${f-5}\n M${u-5},${f} L${u+s},${f}\n M${u},${f-5} L${u},${f+l}`;"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const k=y.path(b,m),C=i.insert((()=>k),":first-child");return C.attr("transform","translate(2.5, 2.5)"),C.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",g),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),o.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),d(e,C),e.intersect=function(t){return H.polygon(e,x,t)},i}async function de(t,e,r,n,i=r.class.padding??12){const a=n?0:3,o=t.insert("g").attr("class",p(e)).attr("id",e.domId||e.id);let s=null,l=null,h=null,c=null,u=0,d=0,f=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await pe(s,{text:`«${t}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await pe(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,h=o.insert("g").attr("class","members-group text");let y=0;for(const t of e.members)y+=await pe(h,t,y,[t.parseClassifier()])+a;f=h.node().getBBox().height,f<=0&&(f=i/2),c=o.insert("g").attr("class","methods-group text");let m=0;for(const t of e.methods)m+=await pe(c,t,m,[t.parseClassifier()])+a;let x=o.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+2*i})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+(f?f+4*i:2*i)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}async function pe(t,e,r,n=[]){const i=t.insert("g").attr("class","label").attr("style",n.join("; ")),h=(0,s.zj)();let c="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(h.htmlLabels)??!0,u="";u="text"in e?e.text:e.label,!c&&u.startsWith("\\")&&(u=u.substring(1)),(0,s.Wi)(u)&&(c=!0);const d=await(0,a.GZ)(i,(0,s.oB)((0,o.Sm)(u)),{width:(0,o.Un)(u,h)+50,classes:"markdown-node-label",useHtmlLabels:c},h);let p,f=1;if(c){const t=d.children[0],e=(0,l.Ltv)(d);f=t.innerHTML.split("
    ").length,t.innerHTML.includes("")&&(f+=t.innerHTML.split("").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===u.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,s.K2)(n,"setupImage"),setTimeout((()=>{e.complete&&n()})),e.addEventListener("error",n),e.addEventListener("load",n)})))))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}else{n.includes("font-weight: bolder")&&(0,l.Ltv)(d).selectAll("tspan").attr("font-weight",""),f=d.children.length;const t=d.children[0];(""===d.textContent||d.textContent.includes(">"))&&(t.textContent=u[0]+u.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===u[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),p=d.getBBox()}return i.attr("transform","translate(0,"+(-p.height/(2*f)+r)+")"),p.height}async function fe(t,e){const r=(0,s.D7)(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??(0,s._3)(r.htmlLabels)??!0,o=e;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:c,bbox:u}=await de(t,e,r,a,i),{labelStyles:p,nodeStyles:f}=S(e);e.labelStyle=p,e.cssStyles=o.styles||"";const g=o.styles?.join(";")||f||"";e.cssStyles||(e.cssStyles=g.replaceAll("!important","").split(";"));const y=0===o.members.length&&0===o.methods.length&&!r.class?.hideEmptyMembersBox,m=h.A.svg(c),x=T(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=u.width;let k=u.height;0===o.members.length&&0===o.methods.length?k+=i:o.members.length>0&&0===o.methods.length&&(k+=2*i);const C=-b/2,w=-k/2,_=m.rectangle(C-n,w-n-(y?n:0===o.members.length&&0===o.methods.length?-n/2:0),b+2*n,k+2*n+(y?2*n:0===o.members.length&&0===o.methods.length?-n:0),x),v=c.insert((()=>_),":first-child");v.attr("class","basic label-container");const A=v.node().getBBox();c.selectAll(".text").each(((t,e,r)=>{const i=(0,l.Ltv)(r[e]),s=i.attr("transform");let h=0;if(s){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(s);t&&(h=parseFloat(t[2]))}let u=h+w+n-(y?n:0===o.members.length&&0===o.methods.length?-n/2:0);a||(u-=4);let d=C;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(d=-i.node()?.getBBox().width/2||0,c.selectAll("text").each((function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(d=0)}))),i.attr("transform",`translate(${d}, ${u})`)}));const M=c.select(".annotation-group").node().getBBox().height-(y?n/2:0)||0,B=c.select(".label-group").node().getBBox().height-(y?n/2:0)||0,L=c.select(".members-group").node().getBBox().height-(y?n/2:0)||0;if(o.members.length>0||o.methods.length>0||y){const t=m.line(A.x,M+B+w+n,A.x+A.width,M+B+w+n,x);c.insert((()=>t)).attr("class","divider").attr("style",g)}if(y||o.members.length>0||o.methods.length>0){const t=m.line(A.x,M+B+L+w+2*i+n,A.x+A.width,M+B+L+w+n+2*i,x);c.insert((()=>t)).attr("class","divider").attr("style",g)}if("handDrawn"!==o.look&&c.selectAll("path").attr("style",g),v.select(":nth-child(2)").attr("style",g),c.selectAll(".divider").select("path").attr("style",g),e.labelStyle?c.selectAll("span").attr("style",e.labelStyle):c.selectAll("span").attr("style",g),!a){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(g);if(e){const t=e[0].replace("color","fill");c.selectAll("tspan").attr("style",t)}else if(p){const e=t.exec(p);if(e){const t=e[0].replace("color","fill");c.selectAll("tspan").attr("style",t)}}}return d(e,v),e.intersect=function(t){return H.rect(e,t)},c}(0,s.K2)(ae,"tiltedCylinder"),(0,s.K2)(oe,"trapezoid"),(0,s.K2)(se,"trapezoidalPentagon"),(0,s.K2)(le,"triangle"),(0,s.K2)(he,"waveEdgedRectangle"),(0,s.K2)(ce,"waveRectangle"),(0,s.K2)(ue,"windowPane"),(0,s.K2)(de,"textHelper"),(0,s.K2)(pe,"addText"),(0,s.K2)(fe,"classBox");var ge=(0,s.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 ye(t,e,{config:r}){const{labelStyles:n,nodeStyles:i}=S(e);e.labelStyle=n||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:o,bbox:s,label:l}=await c(t,e,p(e)),f=e.padding||10;let g,y="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(y=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),g=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",y).attr("target","_blank"));const m={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let x,b;({label:x,bbox:b}=g?await u(g,"ticket"in e&&e.ticket||"",m):await u(o,"ticket"in e&&e.ticket||"",m));const{label:k,bbox:w}=await u(o,"assigned"in e&&e.assigned||"",m);e.width=a;const _=e?.width||0,v=Math.max(b.height,w.height)/2,A=Math.max(s.height+20,e?.height||0)+v,M=-_/2,B=-A/2;let L;l.attr("transform","translate("+(f-_/2)+", "+(-v-s.height/2)+")"),x.attr("transform","translate("+(f-_/2)+", "+(-v+s.height/2)+")"),k.attr("transform","translate("+(f+_/2-w.width-20)+", "+(-v+s.height/2)+")");const{rx:F,ry:$}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=h.A.svg(o),r=T(e,{}),n=F||$?t.path(C(M,B,_,A,F||0),r):t.rectangle(M,B,_,A,r);L=o.insert((()=>n),":first-child"),L.attr("class","basic label-container").attr("style",E||null)}else{L=o.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",i).attr("rx",F??5).attr("ry",$??5).attr("x",M).attr("y",B).attr("width",_).attr("height",A);const t="priority"in e&&e.priority;if(t){const e=o.append("line"),r=M+2,n=B+Math.floor((F??0)/2),i=B+A-Math.floor((F??0)/2);e.attr("x1",r).attr("y1",n).attr("x2",r).attr("y2",i).attr("stroke-width","4").attr("stroke",ge(t))}}return d(e,L),e.height=A,e.intersect=function(t){return H.rect(e,t)},o}(0,s.K2)(ye,"kanbanItem");var me=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Yt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Wt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Gt},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Qt},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ut},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Q},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:zt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:bt},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Lt},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Bt},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:oe},{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:Tt},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:pt},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ee},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Z},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ht},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Xt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Zt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:yt},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:kt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:rt},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:it},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ot},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ft},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:he},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:mt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ae},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Ot},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:st},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:dt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:le},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ue},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ft},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:se},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:gt},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ut},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Rt},{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:G},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tt},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:te},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Jt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ce},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:qt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:It}],xe=(0,s.K2)((()=>{const t={state:Vt,choice:X,note:Pt,rectWithTitle:jt,labelRect:Mt,iconSquare:vt,iconCircle:wt,icon:Ct,iconRounded:_t,imageSquare:St,anchor:U,kanbanItem:ye,classBox:fe},e=[...Object.entries(t),...me.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 be(t){return t in xe}(0,s.K2)(be,"isValidShape");var ke=new Map;async function Ce(t,e,r){let n,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?xe[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;"sandbox"===r.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),ke.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}(0,s.K2)(Ce,"insertNode");var we=(0,s.K2)(((t,e)=>{ke.set(e.id,t)}),"setNodeElem"),_e=(0,s.K2)((()=>{ke.clear()}),"clear"),ve=(0,s.K2)((t=>{const e=ke.get(t.id);s.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")},7308:(t,e,r)=>{"use strict";r.d(e,{XX:()=>c,q7:()=>u,sO:()=>h});var n=r(7938),i=r(1282),a=r(8159),o=r(9502),s={common:o.Y2,getConfig:o.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_},l={},h=(0,o.K2)((t=>{for(const e of t)l[e.name]=e}),"registerLayoutLoaders");(0,o.K2)((()=>{h([{name:"dagre",loader:(0,o.K2)((async()=>await Promise.all([r.e(164),r.e(567),r.e(12)]).then(r.bind(r,9012))),"loader")}])}),"registerDefaultLayoutLoaders")();var c=(0,o.K2)((async(t,e)=>{if(!(t.layoutAlgorithm in l))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=l[t.layoutAlgorithm];return(await r.loader()).render(t,e,s,{algorithm:r.algorithm})}),"render"),u=(0,o.K2)(((t="",{fallback:e="dagre"}={})=>{if(t in l)return t;if(e in l)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")},7286:(t,e,r)=>{"use strict";r.d(e,{D:()=>a});var n=r(9502),i=r(4852),a=(0,n.K2)((t=>{const{securityLevel:e}=(0,n.D7)();let r=(0,i.Ltv)("body");if("sandbox"===e){const e=(0,i.Ltv)(`#i${t}`),n=e.node()?.contentDocument??document;r=(0,i.Ltv)(n.body)}return r.select(`#${t}`)}),"selectSvgElement")},6144:(t,e,r)=>{"use strict";r.d(e,{r:()=>n});var n="11.4.1"},1099:(t,e,r)=>{"use strict";r.d(e,{WY:()=>v,pC:()=>w,Gc:()=>b});var n=r(9502);const i=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),a=Object.freeze({left:0,top:0,width:16,height:16}),o=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),s=Object.freeze({...a,...o}),l=Object.freeze({...s,body:"",hidden:!1});function h(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 l)n in o?n in t&&!(n in r)&&(r[n]=o[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function c(t,e,r){const n=t.icons,i=t.aliases||Object.create(null);let a={};function o(t){a=h(n[t]||i[t],a)}return o(e),r.forEach(o),h(t,a)}const u=Object.freeze({width:null,height:null}),d=Object.freeze({...u,...o}),p=/(-?[0-9.]*[0-9]+[0-9.]*)/g,f=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function g(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(p);if(null===n||!n.length)return t;const i=[];let a=n.shift(),o=f.test(a);for(;;){if(o){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("");o=!o}}const y=/\sid="(\S+)"/g,m="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let x=0;var b={body:'?',height:80,width:80},k=new Map,C=new Map,w=(0,n.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(n.Rm.debug("Registering icon pack:",e.name),"loader"in e)C.set(e.name,e.loader);else{if(!("icons"in e))throw n.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');k.set(e.name,e.icons)}}}),"registerIconPacks"),_=(0,n.K2)((async(t,e)=>{const r=((t,e,r,n="")=>{const a=t.split(":");if("@"===t.slice(0,1)){if(a.length<2||a.length>3)return null;n=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const t=a.pop(),r=a.pop(),o={provider:a.length>0?a[0]:n,prefix:r,name:t};return e&&!i(o)?null:o}const o=a[0],s=o.split("-");if(s.length>1){const t={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!i(t)?null:t}if(r&&""===n){const t={provider:n,prefix:"",name:o};return e&&!i(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const a=r.prefix||e;if(!a)throw new Error(`Icon name must contain a prefix: ${t}`);let o=k.get(a);if(!o){const t=C.get(a);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:a},k.set(a,o)}catch(t){throw n.Rm.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=function(t,e){if(t.icons[e])return c(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?c(t,e,r):null}(o,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s}),"getRegisteredIconData"),v=(0,n.K2)((async(t,e)=>{let r;try{r=await _(t,e?.fallbackPrefix)}catch(t){n.Rm.error(t),r=b}const i=function(t,e){const r={...s,...t},n={...d,...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 o,s=t.rotate;switch(r?n?s+=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),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=i.height/2+i.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:o=i.width/2+i.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(i.left!==i.top&&(o=i.left,i.left=i.top,i.top=o),i.width!==i.height&&(o=i.width,i.width=i.height,i.height=o)),e.length&&(a=function(t,e){const r=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===o)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return n=r.defs,i=e+r.content+"",n?""+n+""+i:i;var n,i}(a,''))}));const o=n.width,l=n.height,h=i.width,c=i.height;let u,p;null===o?(p=null===l?"1em":"auto"===l?c:l,u=g(p,h/c)):(u="auto"===o?h:o,p=null===l?g(u,c/h):"auto"===l?c:l);const f={},y=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(f[t]=e.toString())};y("width",u),y("height",p);const m=[i.left,i.top,h,c];return f.viewBox=m.join(" "),{attributes:f,viewBox:m,body:a}}(r,e);return function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'"+t+""}(function(t,e=m){const r=[];let n;for(;n=y.exec(t);)r.push(n[1]);if(!r.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach((r=>{const n="function"==typeof e?e(r):e+(x++).toString(),a=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+n+i+"$3")})),t=t.replace(new RegExp(i,"g"),"")}(i.body),i.attributes)}),"getIconSVG")},9874:(t,e,r)=>{"use strict";r.d(e,{H:()=>er,r:()=>tr});var n=r(9502);function i(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function o(t){return Array.isArray(t)?t:i(t)?[]:[t]}function s(t,e){var r,n,i,a;if(e)for(r=0,n=(a=Object.keys(e)).length;rs&&(e=n-s+(a=" ... ").length),r-n>s&&(r=n+s-(o=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+o,pos:n-e+a.length}}function g(t,e){return c.repeat(" ",e-t.length)+t}function y(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=[],o=-1;r=n.exec(t.buffer);)a.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s,l,h="",u=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=f(t.buffer,i[o-s],a[o-s],t.position-(i[o]-i[o-s]),d),h=c.repeat(" ",e.indent)+g((t.line-s+1).toString(),u)+" | "+l.str+"\n"+h;for(l=f(t.buffer,i[o],a[o],t.position,d),h+=c.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",h+=c.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=a.length);s++)l=f(t.buffer,i[o+s],a[o+s],t.position-(i[o]-i[o+s]),d),h+=c.repeat(" ",e.indent)+g((t.line+s+1).toString(),u)+" | "+l.str+"\n";return h.replace(/\n$/,"")}(0,n.K2)(f,"getLine"),(0,n.K2)(g,"padStart"),(0,n.K2)(y,"makeSnippet");var m=y,x=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],b=["scalar","sequence","mapping"];function k(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function C(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===x.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=k(e.styleAliases||null),-1===b.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,n.K2)(k,"compileStyleAliases"),(0,n.K2)(C,"Type$1");var w=C;function _(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 v(){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 j(t){return null!==t&&!(!q.test(t)||"_"===t[t.length-1])}function W(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)(j,"resolveYamlFloat"),(0,n.K2)(W,"constructYamlFloat");var H=/^[-+]?[0-9]+e/;function U(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(c.isNegativeZero(t))return"-0.0";return r=t.toString(10),H.test(r)?r.replace("e",".e"):r}function Y(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||c.isNegativeZero(t))}(0,n.K2)(U,"representYamlFloat"),(0,n.K2)(Y,"isFloat");var G=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:j,construct:W,predicate:Y,represent:U,defaultStyle:"lowercase"}),V=T.extend({implicit:[L,D,z,G]}),Z=V,X=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!==X.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,n,i,a,o,s,l,h=0,c=null;if(null===(e=X.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],o=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,n,i,a,o,s,h)),c&&l.setTime(l.getTime()-c),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 w("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 w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:nt}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ot(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 st(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=at,o=0,s=[];for(e=0;e>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(n.charAt(e));return 0==(r=i%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)}function lt(t){var e,r,n="",i=0,a=t.length,o=at;for(e=0;e>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+t[e];return 0==(r=a%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2===r?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1===r&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function ht(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,n.K2)(ot,"resolveYamlBinary"),(0,n.K2)(st,"constructYamlBinary"),(0,n.K2)(lt,"representYamlBinary"),(0,n.K2)(ht,"isBinary");var ct=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ot,construct:st,predicate:ht,represent:lt}),ut=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,n,i,a,o=[],s=t;for(e=0,r=s.length;e>10),56320+(t-65536&1023))}(0,n.K2)(Ft,"_class"),(0,n.K2)($t,"is_EOL"),(0,n.K2)(Et,"is_WHITE_SPACE"),(0,n.K2)(Dt,"is_WS_OR_EOL"),(0,n.K2)(Ot,"is_FLOW_INDICATOR"),(0,n.K2)(It,"fromHexCode"),(0,n.K2)(Nt,"escapedHexLen"),(0,n.K2)(Rt,"fromDecimalCode"),(0,n.K2)(Pt,"simpleEscapeSequence"),(0,n.K2)(Kt,"charFromCodepoint");var zt,qt=new Array(256),jt=new Array(256);for(zt=0;zt<256;zt++)qt[zt]=Pt(zt)?1:0,jt[zt]=Pt(zt);function Wt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||vt,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 Ht(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=m(r),new p(e,r)}function Ut(t,e){throw Ht(t,e)}function Yt(t,e){t.onWarning&&t.onWarning.call(null,Ht(t,e))}(0,n.K2)(Wt,"State$1"),(0,n.K2)(Ht,"generateError"),(0,n.K2)(Ut,"throwError"),(0,n.K2)(Yt,"throwWarning");var Gt={YAML:(0,n.K2)((function(t,e,r){var n,i,a;null!==t.version&&Ut(t,"duplication of %YAML directive"),1!==r.length&&Ut(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Ut(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&Ut(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Yt(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:(0,n.K2)((function(t,e,r){var n,i;2!==r.length&&Ut(t,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],Bt.test(n)||Ut(t,"ill-formed tag handle (first argument) of the TAG directive"),St.call(t.tagMap,n)&&Ut(t,'there is a previously declared suffix for "'+n+'" tag handle'),Lt.test(i)||Ut(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){Ut(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i}),"handleTagDirective")};function Vt(t,e,r,n){var i,a,o,s;if(e1&&(t.result+=c.repeat("\n",e-1))}function re(t,e,r){var n,i,a,o,s,l,h,c,u=t.kind,d=t.result;if(Dt(c=t.input.charCodeAt(t.position))||Ot(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(Dt(n=t.input.charCodeAt(t.position+1))||r&&Ot(n)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,o=!1;0!==c;){if(58===c){if(Dt(n=t.input.charCodeAt(t.position+1))||r&&Ot(n))break}else if(35===c){if(Dt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&te(t)||r&&Ot(c))break;if($t(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,Jt(t,!1,-1),t.lineIndent>=e){o=!0,c=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=h;break}}o&&(Vt(t,i,a,!1),ee(t,t.line-s),i=a=t.position,o=!1),Et(c)||(a=t.position+1),c=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 $t(r)?(Vt(t,n,i,!0),ee(t,Jt(t,!1,e)),n=i=t.position):t.position===t.lineStart&&te(t)?Ut(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Ut(t,"unexpected end of the stream within a single quoted scalar")}function ie(t,e){var r,n,i,a,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Vt(t,r,t.position,!0),t.position++,!0;if(92===s){if(Vt(t,r,t.position,!0),$t(s=t.input.charCodeAt(++t.position)))Jt(t,!1,e);else if(s<256&&qt[s])t.result+=jt[s],t.position++;else if((o=Nt(s))>0){for(i=o,a=0;i>0;i--)(o=It(s=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+o:Ut(t,"expected hexadecimal character");t.result+=Kt(a),t.position++}else Ut(t,"unknown escape sequence");r=n=t.position}else $t(s)?(Vt(t,r,n,!0),ee(t,Jt(t,!1,e)),r=n=t.position):t.position===t.lineStart&&te(t)?Ut(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Ut(t,"unexpected end of the stream within a double quoted scalar")}function ae(t,e){var r,n,i,a,o,s,l,h,c,u,d,p,f=!0,g=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,h=!1,a=[];else{if(123!==p)return!1;o=125,h=!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))===o)return t.position++,t.tag=g,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=a,!0;f?44===p&&Ut(t,"expected the node content, but found ','"):Ut(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&Dt(t.input.charCodeAt(t.position+1))&&(s=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,c=t.result,Jt(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),Jt(t,!0,e),de(t,e,1,!1,!0),d=t.result),h?Xt(t,a,m,u,c,d,r,n,i):s?a.push(Xt(t,null,m,u,c,d,r,n,i)):a.push(c),Jt(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}Ut(t,"unexpected end of the stream within a flow collection")}function oe(t,e){var r,n,i,a,o=1,s=!1,l=!1,h=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===o?o=43===a?3:2:Ut(t,"repeat of a chomping mode identifier");else{if(!((i=Rt(a))>=0))break;0===i?Ut(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Ut(t,"repeat of an indentation width identifier"):(h=e+i-1,l=!0)}if(Et(a)){do{a=t.input.charCodeAt(++t.position)}while(Et(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!$t(a)&&0!==a)}for(;0!==a;){for(Qt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndenth&&(h=t.lineIndent),$t(a))u++;else{if(t.lineIndente)&&0!==n)Ut(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(m&&(o=t.line,s=t.lineStart,l=t.position),de(t,e,4,!0,i)&&(m?g=t.result:y=t.result),m||(Xt(t,d,p,f,g,y,o,s,l),f=g=y=null),Jt(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==h)Ut(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,h=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&Ut(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)):Ut(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function pe(t){var e,r,n,i,a=t.position,o=!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(o=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Dt(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&Ut(t,"directive name must not be less than one character in length");0!==i;){for(;Et(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!$t(i));break}if($t(i))break;for(e=t.position;0!==i&&!Dt(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&Qt(t),St.call(Gt,r)?Gt[r](t,r,n):Yt(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)):o&&Ut(t,"directives end mark is expected"),de(t,t.lineIndent-1,4,!1,!0),Jt(t,!0,-1),t.checkLineBreaks&&At.test(t.input.slice(a,t.position))&&Yt(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 Ne(t){return/^\n* /.test(t)}function Re(t,e,r,n,i,a,o,s){var l,h=0,c=null,u=!1,d=!1,p=-1!==n,f=-1,g=De(Ie(t,0))&&Oe(Ie(t,t.length-1));if(e||o)for(l=0;l=65536?l+=2:l++){if(!Fe(h=Ie(t,l)))return 5;g=g&&Ee(h,c,s),c=h}else{for(l=0;l=65536?l+=2:l++){if(10===(h=Ie(t,l)))u=!0,p&&(d=d||l-f-1>n&&" "!==t[f+1],f=l);else if(!Fe(h))return 5;g=g&&Ee(h,c,s),c=h}d=d||p&&l-f-1>n&&" "!==t[f+1]}return u||d?r>9&&Ne(t)?5:o?2===a?5:2:d?4:3:!g||o||i(t)?2===a?5:2:1}function Pe(t,e,r,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==we.indexOf(e)||_e.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=i||t.flowLevel>-1&&r>=t.flowLevel;function h(e){return Be(t,e)}switch((0,n.K2)(h,"testAmbiguity"),Re(e,l,t.indent,s,h,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Ke(e,t.indent)+ze(Ae(e,o));case 4:return">"+Ke(e,t.indent)+ze(Ae(qe(e,s),o));case 5:return'"'+We(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function Ke(t,e){var r=Ne(t)?String(e):"",n="\n"===t[t.length-1];return r+(!n||"\n"!==t[t.length-2]&&"\n"!==t?n?"":"-":"+")+"\n"}function ze(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,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,je(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];i=a.exec(t);){var l=i[1],h=i[2];n=" "===h[0],o+=l+(s||n||""===h?"":"\n")+je(h,e),s=n}return o}function je(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,o=0,s=0,l="";r=i.exec(t);)(s=r.index)-a>e&&(n=o>a?o:s,l+="\n"+t.slice(a,n),a=n+1),o=s;return l+="\n",t.length-a>e&&o>a?l+=t.slice(a,o)+"\n"+t.slice(o+1):l+=t.slice(a),l.slice(1)}function We(t){for(var e,r="",n=0,i=0;i=65536?i+=2:i++)n=Ie(t,i),!(e=Ce[n])&&Fe(n)?(r+=t[i],n>=65536&&(r+=t[i+1])):r+=e||Se(n);return r}function He(t,e,r){var n,i,a,o="",s=t.tag;for(n=0,i=r.length;n1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ze(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=h,t.dump="{"+l+"}"}function Ge(t,e,r,n){var i,a,o,s,l,h,c="",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)?h+="?":h+="? "),h+=t.dump,l&&(h+=Me(t,e)),Ze(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=u,t.dump=c||"{}"}function Ve(t,e,r){var n,i,a,o,s,l;for(a=0,o=(i=r?t.explicitTypes:t.implicitTypes).length;a tag resolver accepts not "'+l+'" style');n=s.represent[l](e,l)}t.dump=n}return!0}return!1}function Ze(t,e,r,n,i,a,o){t.tag=null,t.dump=r,Ve(t,r,!1)||Ve(t,r,!0);var s,l=xe.call(t.dump),h=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var c,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(d&&u&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)n&&0!==Object.keys(t.dump).length?(Ge(t,e,t.dump,i),u&&(t.dump="&ref_"+c+t.dump)):(Ye(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)n&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?Ue(t,e-1,t.dump,i):Ue(t,e,t.dump,i),u&&(t.dump="&ref_"+c+t.dump)):(He(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+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&&Pe(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Xe(t,e){var r,n,i=[],a=[];for(Qe(t,i,a),r=0,n=a.length;r{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.f={},i.e=t=>Promise.all(Object.keys(i.f).reduce(((e,r)=>(i.f[r](t,e),e)),[])),i.u=t=>"js/"+t+"-"+{12:"0b8427d1",56:"09931933",110:"f4b990d9",130:"3b252fb9",164:"c7b61128",165:"06872da1",175:"2944b44a",237:"c0a3f3fe",240:"8ca3ada2",244:"45e1a422",354:"5c1850f7",355:"ef4f96e9",357:"e9bfa102",383:"676aedef",387:"3546ecdc",391:"549a9d24",410:"3bccc12d",413:"c02a8543",417:"65958f5a",452:"e65d6d68",485:"6a3d102c",540:"ae28fd42",545:"bfa2b46e",567:"4fef9a1a",632:"7a25d3c6",648:"b5ba4bb4",664:"ed5252a5",691:"2a6930fd",720:"970f726e",723:"47eb515a",731:"70ea2831",732:"8e5770e7",758:"18005d5c",825:"fe49e4aa",890:"c9907c95",978:"b543144f"}[t]+".chunk.min.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="geekdoc:",i.l=(r,n,a,o)=>{if(t[r])t[r].push(n);else{var s,l;if(void 0!==a)for(var h=document.getElementsByTagName("script"),c=0;c{s.onerror=s.onload=null,clearTimeout(p);var i=t[r];if(delete t[r],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((t=>t(n))),e)return e(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t+"../"})(),(()=>{var t={304:0};i.f.j=(e,r)=>{var n=i.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var a=new Promise(((r,i)=>n=t[e]=[r,i]));r.push(n[2]=a);var o=i.p+i.u(e),s=new Error;i.l(o,(r=>{if(i.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,n[1](s)}}),"chunk-"+e,e)}};var e=(e,r)=>{var n,a,[o,s,l]=r,h=0;if(o.some((e=>0!==t[e]))){for(n in s)i.o(s,n)&&(i.m[n]=s[n]);l&&l(i)}for(e&&e(r);h{"use strict";var t=i(7148);const e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const n=new Uint8Array(16),a=[];for(let t=0;t<256;++t)a.push((t+256).toString(16).slice(1));const o=function(t,i,o){if(e.randomUUID&&!i&&!t)return e.randomUUID();const s=(t=t||{}).random??t.rng?.()??function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(n)}();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,i){if((o=o||0)<0||o+16>i.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let t=0;t<16;++t)i[o+t]=s[t];return i}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(s)},s="auto";var l=i(9874),h=i(7308),c=(i(7938),i(1282),i(1099)),u=(i(7588),i(3115),i(6058),i(8159)),d=i(6144),p=i(7286),f=i(9502),g=i(513),y=i(4852),m="comm",x="rule",b="decl",k=Math.abs,C=String.fromCharCode;function w(t){return t.trim()}function _(t,e,r){return t.replace(e,r)}function v(t,e,r){return t.indexOf(e,r)}function S(t,e){return 0|t.charCodeAt(e)}function T(t,e,r){return t.slice(e,r)}function A(t){return t.length}function M(t,e){return e.push(t),t}function B(t,e){for(var r="",n=0;n0?S(I,--D):0,$--,10===O&&($=1,F--),O}function P(){return O=D2||j(O)>3?"":" "}function U(t,e){for(;--e&&P()&&!(O<48||O>102||O>57&&O<65||O>70&&O<97););return q(t,z()+(e<6&&32==K()&&32==P()))}function Y(t){for(;P();)switch(O){case t:return D;case 34:case 39:34!==t&&39!==t&&Y(O);break;case 40:41===t&&Y(t);break;case 92:P()}return D}function G(t,e){for(;P()&&t+O!==57&&(t+O!==84||47!==K()););return"/*"+q(e,D-1)+"*"+C(47===t?t:P())}function V(t){for(;!j(K());)P();return q(t,D)}function Z(t){return function(t){return I="",t}(X("",null,null,null,[""],t=function(t){return F=$=1,E=A(I=t),D=0,[]}(t),0,[0],t))}function X(t,e,r,n,i,a,o,s,l){for(var h=0,c=0,u=o,d=0,p=0,f=0,g=1,y=1,m=1,x=0,b="",w=i,B=a,L=n,F=b;y;)switch(f=x,x=P()){case 40:if(108!=f&&58==S(F,u-1)){-1!=v(F+=_(W(x),"&","&\f"),"&\f",k(h?s[h-1]:0))&&(m=-1);break}case 34:case 39:case 91:F+=W(x);break;case 9:case 10:case 13:case 32:F+=H(f);break;case 92:F+=U(z()-1,7);continue;case 47:switch(K()){case 42:case 47:M(J(G(P(),z()),e,r,l),l),5!=j(f||1)&&5!=j(K()||1)||!A(F)||" "===T(F,-1,void 0)||(F+=" ");break;default:F+="/"}break;case 123*g:s[h++]=A(F)*m;case 125*g:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+c:-1==m&&(F=_(F,/\f/g,"")),p>0&&(A(F)-u||0===g&&47===f)&&M(p>32?tt(F+";",n,r,u-1,l):tt(_(F," ","")+";",n,r,u-2,l),l);break;case 59:F+=";";default:if(M(L=Q(F,e,r,h,c,i,s,b,w=[],B=[],u,a),a),123===x)if(0===c)X(F,e,L,L,w,a,u,s,B);else switch(99===d&&110===S(F,3)?100:d){case 100:case 108:case 109:case 115:X(t,L,L,n&&M(Q(t,L,L,0,0,i,s,b,i,w=[],u,B),B),i,B,u,s,n?w:B);break;default:X(F,L,L,L,[""],B,0,s,B)}}h=c=p=0,g=m=1,b=F="",u=o;break;case 58:u=1+A(F),p=f;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==R())continue;switch(F+=C(x),x*g){case 38:m=c>0?1:(F+="\f",-1);break;case 44:s[h++]=(A(F)-1)*m,m=1;break;case 64:45===K()&&(F+=W(P())),d=K(),c=u=A(b=F+=V(z())),x++;break;case 45:45===f&&2==A(F)&&(g=0)}}return a}function Q(t,e,r,n,i,a,o,s,l,h,c,u){for(var d=i-1,p=0===i?a:[""],f=function(t){return t.length}(p),g=0,y=0,m=0;g0?p[b]+" "+C:_(C,/&\f/g,p[b])))&&(l[m++]=v);return N(t,e,r,0===i?x:s,l,h,c,u)}function J(t,e,r,n){return N(t,e,r,m,C(O),T(t,2,-2),0,n)}function tt(t,e,r,n,i){return N(t,e,r,b,T(t,0,n),T(t,n+1,-1),n,i)}var et=i(9418),rt=i(6401),nt={id:"c4",detector:(0,f.K2)((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(664).then(i.bind(i,2664));return{id:"c4",diagram:t}}),"loader")},it="flowchart",at={id:it,detector:(0,f.K2)(((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(485).then(i.bind(i,4485));return{id:it,diagram:t}}),"loader")},ot="flowchart-v2",st={id:ot,detector:(0,f.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,f.K2)((async()=>{const{diagram:t}=await i.e(485).then(i.bind(i,4485));return{id:ot,diagram:t}}),"loader")},lt={id:"er",detector:(0,f.K2)((t=>/^\s*erDiagram/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(164),i.e(567),i.e(417)]).then(i.bind(i,5417));return{id:"er",diagram:t}}),"loader")},ht="gitGraph",ct={id:ht,detector:(0,f.K2)((t=>/^\s*gitGraph/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(164),i.e(731),i.e(978)]).then(i.bind(i,5978));return{id:ht,diagram:t}}),"loader")},ut="gantt",dt={id:ut,detector:(0,f.K2)((t=>/^\s*gantt/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(244).then(i.bind(i,6244));return{id:ut,diagram:t}}),"loader")},pt="info",ft={id:pt,detector:(0,f.K2)((t=>/^\s*info/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(164),i.e(731),i.e(354)]).then(i.bind(i,7354));return{id:pt,diagram:t}}),"loader")},gt={id:"pie",detector:(0,f.K2)((t=>/^\s*pie/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(164),i.e(731),i.e(825)]).then(i.bind(i,1825));return{id:"pie",diagram:t}}),"loader")},yt="quadrantChart",mt={id:yt,detector:(0,f.K2)((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(632).then(i.bind(i,2251));return{id:yt,diagram:t}}),"loader")},xt="xychart",bt={id:xt,detector:(0,f.K2)((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(545).then(i.bind(i,545));return{id:xt,diagram:t}}),"loader")},kt="requirement",Ct={id:kt,detector:(0,f.K2)((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(164),i.e(567),i.e(413)]).then(i.bind(i,8413));return{id:kt,diagram:t}}),"loader")},wt="sequence",_t={id:wt,detector:(0,f.K2)((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(540).then(i.bind(i,8540));return{id:wt,diagram:t}}),"loader")},vt="class",St={id:vt,detector:(0,f.K2)(((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(240),i.e(391)]).then(i.bind(i,391));return{id:vt,diagram:t}}),"loader")},Tt="classDiagram",At={id:Tt,detector:(0,f.K2)(((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(240),i.e(56)]).then(i.bind(i,3056));return{id:Tt,diagram:t}}),"loader")},Mt="state",Bt={id:Mt,detector:(0,f.K2)(((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(164),i.e(567),i.e(758),i.e(732)]).then(i.bind(i,9732));return{id:Mt,diagram:t}}),"loader")},Lt="stateDiagram",Ft={id:Lt,detector:(0,f.K2)(((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(758),i.e(110)]).then(i.bind(i,5110));return{id:Lt,diagram:t}}),"loader")},$t="journey",Et={id:$t,detector:(0,f.K2)((t=>/^\s*journey/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(237).then(i.bind(i,6237));return{id:$t,diagram:t}}),"loader")},Dt={draw:(0,f.K2)(((t,e,r)=>{f.Rm.debug("rendering svg for syntax error\n");const n=(0,p.D)(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),(0,f.a$)(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)}),"draw")},Ot=Dt,It={db:{},renderer:Dt,parser:{parse:(0,f.K2)((()=>{}),"parse")}},Nt="flowchart-elk",Rt={id:Nt,detector:(0,f.K2)(((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(485).then(i.bind(i,4485));return{id:Nt,diagram:t}}),"loader")},Pt="timeline",Kt={id:Pt,detector:(0,f.K2)((t=>/^\s*timeline/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(691).then(i.bind(i,7691));return{id:Pt,diagram:t}}),"loader")},zt="mindmap",qt={id:zt,detector:(0,f.K2)((t=>/^\s*mindmap/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(165),i.e(383)]).then(i.bind(i,6383));return{id:zt,diagram:t}}),"loader")},jt="kanban",Wt={id:jt,detector:(0,f.K2)((t=>/^\s*kanban/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(355).then(i.bind(i,6355));return{id:jt,diagram:t}}),"loader")},Ht="sankey",Ut={id:Ht,detector:(0,f.K2)((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await i.e(648).then(i.bind(i,3648));return{id:Ht,diagram:t}}),"loader")},Yt="packet",Gt={id:Yt,detector:(0,f.K2)((t=>/^\s*packet-beta/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(164),i.e(731),i.e(357)]).then(i.bind(i,7357));return{id:Yt,diagram:t}}),"loader")},Vt="block",Zt={id:Vt,detector:(0,f.K2)((t=>/^\s*block-beta/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(164),i.e(410)]).then(i.bind(i,172));return{id:Vt,diagram:t}}),"loader")},Xt="architecture",Qt={id:Xt,detector:(0,f.K2)((t=>/^\s*architecture/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([i.e(164),i.e(731),i.e(165),i.e(175)]).then(i.bind(i,3175));return{id:Xt,diagram:t}}),"loader")},Jt=!1,te=(0,f.K2)((()=>{Jt||(Jt=!0,(0,f.Js)("error",It,(t=>"error"===t.toLowerCase().trim())),(0,f.Js)("---",{db:{clear:(0,f.K2)((()=>{}),"clear")},styles:{},renderer:{draw:(0,f.K2)((()=>{}),"draw")},parser:{parse:(0,f.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,f.K2)((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),(0,f.Xd)(nt,Wt,At,St,lt,dt,ft,gt,Ct,_t,Rt,st,at,qt,Kt,ct,Ft,Bt,Et,mt,Ut,Gt,bt,Zt,Qt))}),"addDiagrams"),ee=(0,f.K2)((async()=>{f.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(f.mW).map((async([t,{detector:e,loader:r}])=>{if(r)try{(0,f.Gs)(t)}catch{try{const{diagram:t,id:n}=await r();(0,f.Js)(n,t,e)}catch(e){throw f.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete f.mW[t],e}}})))).filter((t=>"rejected"===t.status));if(t.length>0){f.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)f.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams");function re(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function ne(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,f.K2)(re,"setA11yDiagramInfo"),(0,f.K2)(ne,"addSVGa11yTitleDescription");var ie=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,f.K2)(this,"Diagram")}static async fromText(e,r={}){const n=(0,f.zj)(),i=(0,f.Ch)(e,n);e=(0,u.C4)(e)+"\n";try{(0,f.Gs)(i)}catch{const t=(0,f.J$)(i);if(!t)throw new f.C0(`Diagram ${i} not found.`);const{id:e,diagram:r}=await t();(0,f.Js)(e,r)}const{db:a,parser:o,renderer:s,init:l}=(0,f.Gs)(i);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await o.parse(e),new t(i,e,a,o,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},ae=[],oe=(0,f.K2)((()=>{ae.forEach((t=>{t()})),ae=[]}),"attachFunctions"),se=(0,f.K2)((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function le(t){const e=t.match(f.EJ);if(!e)return{text:t,metadata:{}};let r=(0,l.H)(e[1],{schema:l.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,f.K2)(le,"extractFrontMatter");var he=(0,f.K2)((t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),ce=(0,f.K2)((t=>{const{text:e,metadata:r}=le(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"),ue=(0,f.K2)((t=>{const e=u._K.detectInit(t)??{},r=u._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>"wrap"===t)):"wrap"===r?.type&&(e.wrap=!0),{text:(0,u.vU)(t),directive:e}}),"processDirectives");function de(t){const e=he(t),r=ce(e),n=ue(r.text),i=(0,u.$t)(r.config,n.directive);return{code:t=se(n.text),title:r.title,config:i}}function pe(t){const e=(new TextEncoder).encode(t),r=Array.from(e,(t=>String.fromCodePoint(t))).join("");return btoa(r)}(0,f.K2)(de,"preprocessDiagram"),(0,f.K2)(pe,"toBase64");var fe=["foreignobject"],ge=["dominant-baseline"];function ye(t){const e=de(t);return(0,f.cL)(),(0,f.xA)(e.config??{}),e}async function me(t,e){te();try{const{code:e,config:r}=ye(t);return{diagramType:(await Me(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,f.K2)(ye,"processAndSetConfigs"),(0,f.K2)(me,"parse");var xe=(0,f.K2)(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),be=(0,f.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,rt.A)(t.styles)||n.forEach((e=>{r+=xe(t.id,e,t.styles)})),(0,rt.A)(t.textStyles)||(r+=xe(t.id,"tspan",(t?.textStyles||[]).map((t=>t.replace("color","fill")))))}))}return r}),"createCssStyles"),ke=(0,f.K2)(((t,e,r,n)=>{const i=be(t,r);return B(Z(`${n}{${(0,f.tM)(e,i,t.themeVariables)}}`),L)}),"createUserStyles"),Ce=(0,f.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,u.Sm)(n),n=n.replace(/
    /g,"
    "),n}),"cleanUpSvgCode"),we=(0,f.K2)(((t="",e)=>``),"putIntoIFrame"),_e=(0,f.K2)(((t,e,r,n,i)=>{const a=t.append("div");a.attr("id",r),n&&a.attr("style",n);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&o.attr("xmlns:xlink",i),o.append("g"),t}),"appendDivSvgG");function ve(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,f.K2)(ve,"sandboxedIframe");var Se=(0,f.K2)(((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()}),"removeExistingElements"),Te=(0,f.K2)((async function(t,e,r){te();const n=ye(e);e=n.code;const i=(0,f.zj)();f.Rm.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const a="#"+t,o="i"+t,s="#"+o,l="d"+t,h="#"+l,c=(0,f.K2)((()=>{const t=p?s:h,e=(0,y.Ltv)(t).node();e&&"remove"in e&&e.remove()}),"removeTempElements");let u=(0,y.Ltv)("body");const p="sandbox"===i.securityLevel,g="loose"===i.securityLevel,m=i.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),p){const t=ve((0,y.Ltv)(r),o);u=(0,y.Ltv)(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=(0,y.Ltv)(r);_e(u,t,l,`font-family: ${m}`,"http://www.w3.org/1999/xlink")}else{if(Se(document,t,l,o),p){const t=ve((0,y.Ltv)("body"),o);u=(0,y.Ltv)(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=(0,y.Ltv)("body");_e(u,t,l)}let x,b;try{x=await ie.fromText(e,{title:n.title})}catch(t){if(i.suppressErrorRendering)throw c(),t;x=await ie.fromText("error"),b=t}const k=u.select(h).node(),C=x.type,w=k.firstChild,_=w.firstChild,v=x.renderer.getClasses?.(e,x),S=ke(i,C,v,a),T=document.createElement("style");T.innerHTML=S,w.insertBefore(T,_);try{await x.renderer.draw(e,t,d.r,x)}catch(r){throw i.suppressErrorRendering?c():Ot.draw(e,t,d.r),r}const A=u.select(`${h} svg`),M=x.db.getAccTitle?.(),B=x.db.getAccDescription?.();Be(C,A,M,B),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let L=u.select(h).node().innerHTML;if(f.Rm.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),L=Ce(L,p,(0,f._3)(i.arrowMarkerAbsolute)),p){const t=u.select(h+" svg").node();L=we(L,t)}else g||(L=et.A.sanitize(L,{ADD_TAGS:fe,ADD_ATTR:ge,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(oe(),b)throw b;return c(),{diagramType:C,svg:L,bindFunctions:x.db.bindFunctions}}),"render");function Ae(t={}){const e=(0,f.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,f.wZ)(e),e?.theme&&e.theme in f.H$?e.themeVariables=f.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=f.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,f.UU)(e):(0,f.Q2)();(0,f.He)(r.logLevel),te()}(0,f.K2)(Ae,"initialize");var Me=(0,f.K2)(((t,e={})=>{const{code:r}=de(t);return ie.fromText(r,e)}),"getDiagramFromText");function Be(t,e,r,n){re(e,t),ne(e,r,n,e.attr("id"))}(0,f.K2)(Be,"addA11yInfo");var Le=Object.freeze({render:Te,parse:me,getDiagramFromText:Me,initialize:Ae,getConfig:f.zj,setConfig:f.Nk,getSiteConfig:f.Q2,updateSiteConfig:f.B6,reset:(0,f.K2)((()=>{(0,f.cL)()}),"reset"),globalReset:(0,f.K2)((()=>{(0,f.cL)(f.sb)}),"globalReset"),defaultConfig:f.sb});(0,f.He)((0,f.zj)().logLevel),(0,f.cL)((0,f.zj)());var Fe=(0,f.K2)(((t,e,r)=>{f.Rm.warn(t),(0,u.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"),$e=(0,f.K2)((async function(t={querySelector:".mermaid"}){try{await Ee(t)}catch(e){if((0,u.dq)(e)&&f.Rm.error(e.str),We.parseError&&We.parseError(e),!t.suppressErrors)throw f.Rm.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),Ee=(0,f.K2)((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Le.getConfig();let i;if(f.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)}f.Rm.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(f.Rm.debug("Start On Load: "+n?.startOnLoad),Le.updateSiteConfig({startOnLoad:n?.startOnLoad}));const a=new u._K.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let o;const s=[];for(const e of Array.from(i)){if(f.Rm.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${a.next()}`;o=e.innerHTML,o=(0,g.T)(u._K.entityDecode(o)).trim().replace(//gi,"
    ");const n=u._K.detectInit(o);n&&f.Rm.debug("Detected early reinit: ",n);try{const{svg:n,bindFunctions:i}=await je(r,o,e);e.innerHTML=n,t&&await t(r),i&&i(e)}catch(t){Fe(t,s,We.parseError)}}if(s.length>0)throw s[0]}),"runThrowsErrors"),De=(0,f.K2)((function(t){Le.initialize(t)}),"initialize"),Oe=(0,f.K2)((async function(t,e,r){f.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&De(t);const n={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await $e(n)}),"init"),Ie=(0,f.K2)((async(t,{lazyLoad:e=!0}={})=>{te(),(0,f.Xd)(...t),!1===e&&await ee()}),"registerExternalDiagrams"),Ne=(0,f.K2)((function(){if(We.startOnLoad){const{startOnLoad:t}=Le.getConfig();t&&We.run().catch((t=>f.Rm.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Ne,!1);var Re=(0,f.K2)((function(t){We.parseError=t}),"setParseErrorHandler"),Pe=[],Ke=!1,ze=(0,f.K2)((async()=>{if(!Ke){for(Ke=!0;Pe.length>0;){const t=Pe.shift();if(t)try{await t()}catch(t){f.Rm.error("Error executing queue",t)}}Ke=!1}}),"executeQueue"),qe=(0,f.K2)((async(t,e)=>new Promise(((r,n)=>{const i=(0,f.K2)((()=>new Promise(((i,a)=>{Le.parse(t,e).then((t=>{i(t),r(t)}),(t=>{f.Rm.error("Error parsing",t),We.parseError?.(t),a(t),n(t)}))}))),"performCall");Pe.push(i),ze().catch(n)}))),"parse"),je=(0,f.K2)(((t,e,r)=>new Promise(((n,i)=>{const a=(0,f.K2)((()=>new Promise(((a,o)=>{Le.render(t,e,r).then((t=>{a(t),n(t)}),(t=>{f.Rm.error("Error parsing",t),We.parseError?.(t),o(t),i(t)}))}))),"performCall");Pe.push(a),ze().catch(i)}))),"render"),We={startOnLoad:!0,mermaidAPI:Le,parse:qe,render:je,init:Oe,run:$e,registerExternalDiagrams:Ie,registerLayoutLoaders:h.sO,initialize:De,parseError:void 0,contentLoaded:Ne,setParseErrorHandler:Re,detectType:f.Ch,registerIconPacks:c.pC},He=We;document.addEventListener("DOMContentLoaded",(function(){let e=t.namespace("hugo-geekdoc").get("color-theme")||s,r=window.matchMedia("(prefers-color-scheme: dark)"),n=!1,i="default";("dark"===e||e===s&&r.matches)&&(n=!0,i="dark"),He.initialize({startOnLoad:!1,flowchart:{useMaxWidth:!0},theme:i,themeVariables:{darkMode:n}}),document.querySelectorAll(".mermaid").forEach((function(t){let e="graph-"+o();He.render(e,t.innerText).then((({svg:e,bindFunctions:r})=>{t.innerHTML=e,r?.(t)}))}))}))})()})(); \ No newline at end of file diff --git a/docs/hugo/public/js/mermaid-fc9f74ae.bundle.min.js.LICENSE.txt b/docs/hugo/public/js/mermaid-fc9f74ae.bundle.min.js.LICENSE.txt new file mode 100644 index 000000000..bcb04865b --- /dev/null +++ b/docs/hugo/public/js/mermaid-fc9f74ae.bundle.min.js.LICENSE.txt @@ -0,0 +1,7 @@ +/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */ + +/*! Bundled license information: + +js-yaml/dist/js-yaml.mjs: + (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) +*/ diff --git a/docs/hugo/public/js/search-7db5e115.bundle.min.js b/docs/hugo/public/js/search-7db5e115.bundle.min.js new file mode 100644 index 000000000..0bba73381 --- /dev/null +++ b/docs/hugo/public/js/search-7db5e115.bundle.min.js @@ -0,0 +1,2 @@ +/*! For license information please see search-7db5e115.bundle.min.js.LICENSE.txt */ +(()=>{var __webpack_modules__={3332:(e,t,r)=>{"use strict";r.d(t,{A:()=>o}),r(2934);var n=r(283);function o(e){i(e,"add"),i(e,"append"),i(e,"search"),i(e,"update"),i(e,"remove")}function i(e,t){e[t+"Async"]=function(){const e=this,r=arguments,o=r[r.length-1];let i;(0,n.Qk)(o)&&(i=o,delete r[r.length-1]);const s=new Promise((function(n){setTimeout((function(){e.async=!0;const o=e[t].apply(e,r);e.async=!1,n(o)}))}));return i?(s.then(i),this):s}}},2270:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,p:()=>s}),r(2934);var n=r(283);function o(e){this.limit=!0!==e&&e,this.cache=(0,n.fp)(),this.queue=[]}const i=o;function s(e,t,r){(0,n.vZ)(e)&&(e=e.query);let o=this.cache.get(e);return o||(o=this.search(e,t,r),this.cache.set(e,o)),o}o.prototype.set=function(e,t){if(!this.cache[e]){let t=this.queue.length;t===this.limit?delete this.cache[this.queue[t-1]]:t++;for(let e=t-1;0{"use strict";function n(e,t){return void 0!==e?e:t}function o(e){const t=Array(e);for(let r=0;rc,PI:()=>u,PM:()=>f,Qk:()=>l,Vr:()=>o,WE:()=>i,fp:()=>s,uM:()=>n,vZ:()=>d,xW:()=>a})},4352:(e,t,r)=>{"use strict";r.d(t,{A:()=>y}),r(2934);var n=r(283);function o(e,t,r,n){if(e&&(t&&(e=a(e,t)),this.matcher&&(e=a(e,this.matcher)),this.stemmer&&1t?e.slice(r,r+t):e}function b(e,t,r,n){if(r){const o=n&&t>r;e=(e=e[o?t:r])&&e[o?r:t]}else e=e[t];return e}function w(e,t,r,o,i){let s=0;if((0,n.PI)(e))if(i){const r=e.indexOf(t);-1!==r?1=this.minlength&&(a||!s[f])){let l=g(c,i,u),h="";switch(this.tokenize){case"full":if(2t;n--)if(n-t>=this.minlength){const o=g(c,i,u,d,t);h=f.substring(t,n),this.push_index(s,h,o,e,r)}break}case"reverse":if(1=this.minlength){const n=g(c,i,u,d,t);this.push_index(s,h,n,e,r)}h=""}case"forward":if(1=this.minlength&&this.push_index(s,h,l,e,r);break}default:if(this.boost&&(l=Math.min(0|l/this.boost(t,f,u),c-1)),this.push_index(s,f,l,e,r),a&&1=this.minlength&&!s[f]){s[f]=1;const t=g(c+(i/2>c?0:1),i,u,l-1,n-1),a=this.bidirectional&&f>d;this.push_index(o,a?d:f,t,e,r,a?f:d)}}}}}this.fastupdate||(this.register[e]=1)}}return this},m.prototype.push_index=function(e,t,r,o,i,s){let a=s?this.ctx:this.map;if((!e[t]||s&&!e[t][s])&&(this.optimize&&(a=a[r]),s?((e=e[t]||(e[t]=(0,n.fp)()))[s]=1,a=a[s]||(a[s]=(0,n.fp)())):e[t]=1,a=a[t]||(a[t]=[]),this.optimize||(a=a[r]||(a[r]=[])),(!i||!a.includes(o))&&(a[a.length]=o,this.fastupdate))){const e=this.register[o]||(this.register[o]=[]);e[e.length]=a}},m.prototype.search=function(e,t,r){r||(!t&&(0,n.vZ)(e)?e=(r=e).query:(0,n.vZ)(t)&&(r=t));let o,i,s,a=[],c=0;if(r&&(e=r.query||e,t=r.limit,c=r.offset||0,i=r.context,s=r.suggest),e&&(o=(e=this.encode(""+e)).length,1=this.minlength&&!t[n]){if(!(this.optimize||s||this.map[n]))return a;r[c++]=n,t[n]=1}o=(e=r).length}if(!o)return a;t||(t=100);let u,f=this.depth&&1=r)))));d++);if(t)return o?x(a,r,0):void(e[e.length]=a)}return!t&&a},m.prototype.contain=function(e){return!!this.register[e]},m.prototype.update=function(e,t){return this.remove(e).add(e,t)},m.prototype.remove=function(e,t){const r=this.register[e];if(r){if(this.fastupdate)for(let t,n=0;n{"use strict";r.d(t,{c:()=>i,y:()=>o});var n=r(283);function o(e,t,r,o){const i=e.length;let s,a,c=[],u=0;o&&(o=[]);for(let f=i-1;0<=f;f--){const d=e[f],l=d.length,h=(0,n.fp)();let p=!s;for(let e=0;e{"use strict";r.d(t,{FQ:()=>i,UE:()=>a,b9:()=>c,yC:()=>s}),r(2934);var n=r(283);function o(e,t,r,n,o,i,s,a){setTimeout((function(){const c=e(r?r+"."+n:n,JSON.stringify(s));c&&c.then?c.then((function(){t.export(e,t,r,o,i+1,a)})):t.export(e,t,r,o,i+1,a)}))}function i(e,t,r,i,s,a){let c,u,f=!0;switch(void 0===a&&(f=new Promise((e=>{a=e}))),s||(s=0)){case 0:if(c="reg",this.fastupdate){u=(0,n.fp)();for(let e in this.register)u[e]=1}else u=this.register;break;case 1:c="cfg",u={doc:0,opt:this.optimize?1:0};break;case 2:c="map",u=this.map;break;case 3:c="ctx",u=this.ctx;break;default:return void(void 0===r&&a&&a())}return o(e,t||this,r,c,i,s,u,a),f}function s(e,t){if(t)switch((0,n.PM)(t)&&(t=JSON.parse(t)),e){case"cfg":this.optimize=!!t.opt;break;case"reg":this.fastupdate=!1,this.register=t;break;case"map":this.map=t;break;case"ctx":this.ctx=t}}function a(e,t,r,n,i,s){let a;if(void 0===s&&(a=new Promise((e=>{s=e}))),i||(i=0),n||(n=0),n{"use strict";function n(){this.cache=null,this.matcher=null,this.stemmer=null,this.filter=null}n.prototype.add,n.prototype.append,n.prototype.search,n.prototype.update,n.prototype.remove},7955:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(4352);function o(e){e=e.data;const t=self._index,r=e.args,o=e.task;if("init"===o){const t=e.options||{},r=e.factory,o=t.encode;t.cache=!1,o&&0===o.indexOf("function")&&(t.encode=Function("return "+o)()),r?(Function("return "+r)()(self),self._index=new self.FlexSearch.Index(t),delete self.FlexSearch):self._index=new n.A(t)}else{const n=e.id,i=t[o].apply(t,r);postMessage("search"===o?{id:n,msg:i}:{id:n})}}},2619:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _common_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(283),_handler_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7955);let pid=0;function WorkerIndex(e){if(!(this instanceof WorkerIndex))return new WorkerIndex(e);let t;e?(0,_common_js__WEBPACK_IMPORTED_MODULE_1__.Qk)(t=e.encode)&&(e.encode=t.toString()):e={};let r=(self||window)._factory;r&&(r=r.toString());const n="undefined"==typeof window&&self.exports,o=this;this.worker=create(r,n,e.worker),this.resolver=(0,_common_js__WEBPACK_IMPORTED_MODULE_1__.fp)(),this.worker&&(n?this.worker.on("message",(function(e){o.resolver[e.id](e.msg),delete o.resolver[e.id]})):this.worker.onmessage=function(e){e=e.data,o.resolver[e.id](e.msg),delete o.resolver[e.id]},this.worker.postMessage({task:"init",factory:r,options:e}))}const __WEBPACK_DEFAULT_EXPORT__=WorkerIndex;function register(e){WorkerIndex.prototype[e]=WorkerIndex.prototype[e+"Async"]=function(){const t=this,r=[].slice.call(arguments),n=r[r.length-1];let o;(0,_common_js__WEBPACK_IMPORTED_MODULE_1__.Qk)(n)&&(o=n,r.splice(r.length-1,1));const i=new Promise((function(n){setTimeout((function(){t.resolver[++pid]=n,t.worker.postMessage({task:e,id:pid,args:r})}))}));return o?(i.then(o),this):i}}function create(factory,is_node_js,worker_path){let worker;try{worker=is_node_js?eval('new (require("worker_threads")["Worker"])(__dirname + "/node/node.js")'):factory?new Worker(URL.createObjectURL(new Blob(["onmessage="+_handler_js__WEBPACK_IMPORTED_MODULE_0__.A.toString()],{type:"text/javascript"}))):new Worker((0,_common_js__WEBPACK_IMPORTED_MODULE_1__.PM)(worker_path)?worker_path:"worker/worker.js",{type:"module"})}catch(e){}return worker}register("add"),register("append"),register("search"),register("update"),register("remove")},5580:(e,t,r)=>{var n=r(6110)(r(9325),"DataView");e.exports=n},1549:(e,t,r)=>{var n=r(2032),o=r(3862),i=r(6721),s=r(2749),a=r(5749);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(3702),o=r(80),i=r(4739),s=r(8655),a=r(1175);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(6110)(r(9325),"Map");e.exports=n},3661:(e,t,r)=>{var n=r(3040),o=r(7670),i=r(289),s=r(4509),a=r(2949);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(6110)(r(9325),"Promise");e.exports=n},6545:(e,t,r)=>{var n=r(6110)(r(9325),"Set");e.exports=n},8859:(e,t,r)=>{var n=r(3661),o=r(1380),i=r(1459);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r(79),o=r(1420),i=r(938),s=r(3605),a=r(9817),c=r(945);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=a,u.prototype.set=c,e.exports=u},1873:(e,t,r)=>{var n=r(9325).Symbol;e.exports=n},7828:(e,t,r)=>{var n=r(9325).Uint8Array;e.exports=n},8303:(e,t,r)=>{var n=r(6110)(r(9325),"WeakMap");e.exports=n},3945:e=>{e.exports=function(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r{var n=r(8096),o=r(2428),i=r(6449),s=r(3656),a=r(361),c=r(7167),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),f=!r&&o(e),d=!r&&!f&&s(e),l=!r&&!f&&!d&&c(e),h=r||f||d||l,p=h?n(e.length,String):[],_=p.length;for(var v in e)!t&&!u.call(e,v)||h&&("length"==v||d&&("offset"==v||"parent"==v)||l&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||a(v,_))||p.push(v);return p}},4932:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{var n=r(7237)("length");e.exports=n},1074:e=>{e.exports=function(e){return e.split("")}},6025:(e,t,r)=>{var n=r(5288);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},2429:(e,t,r)=>{var n=r(909);e.exports=function(e,t,r,o){return n(e,(function(e,n,i){t(o,e,r(e),i)})),o}},3360:(e,t,r)=>{var n=r(3243);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},909:(e,t,r)=>{var n=r(641),o=r(8329)(n);e.exports=o},6649:(e,t,r)=>{var n=r(3221)();e.exports=n},641:(e,t,r)=>{var n=r(6649),o=r(5950);e.exports=function(e,t){return e&&n(e,t,o)}},7422:(e,t,r)=>{var n=r(1769),o=r(7797);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r{var n=r(4528),o=r(6449);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},2552:(e,t,r)=>{var n=r(1873),o=r(659),i=r(9350),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},7534:(e,t,r)=>{var n=r(2552),o=r(346);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},270:(e,t,r)=>{var n=r(7068),o=r(346);e.exports=function e(t,r,i,s,a){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,s,e,a))}},7068:(e,t,r)=>{var n=r(7217),o=r(5911),i=r(1986),s=r(689),a=r(5861),c=r(6449),u=r(3656),f=r(7167),d="[object Arguments]",l="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,_,v,m){var y=c(e),g=c(t),x=y?l:a(e),b=g?l:a(t),w=(x=x==d?h:x)==h,k=(b=b==d?h:b)==h,$=x==b;if($&&u(e)){if(!u(t))return!1;y=!0,w=!1}if($&&!w)return m||(m=new n),y||f(e)?o(e,t,r,_,v,m):i(e,t,x,r,_,v,m);if(!(1&r)){var j=w&&p.call(e,"__wrapped__"),L=k&&p.call(t,"__wrapped__");if(j||L){var O=j?e.value():e,P=L?t.value():t;return m||(m=new n),v(O,P,r,_,m)}}return!!$&&(m||(m=new n),s(e,t,r,_,v,m))}},1799:(e,t,r)=>{var n=r(7217),o=r(270);e.exports=function(e,t,r,i){var s=r.length,a=s,c=!i;if(null==e)return!a;for(e=Object(e);s--;){var u=r[s];if(c&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s{var n=r(1882),o=r(7296),i=r(3805),s=r(7473),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,f=c.toString,d=u.hasOwnProperty,l=RegExp("^"+f.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?l:a).test(s(e))}},1437:(e,t,r)=>{var n=r(2552),o=r(346);e.exports=function(e){return o(e)&&"[object RegExp]"==n(e)}},4901:(e,t,r)=>{var n=r(2552),o=r(294),i=r(346),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!s[n(e)]}},5389:(e,t,r)=>{var n=r(3663),o=r(7978),i=r(3488),s=r(6449),a=r(583);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?s(e)?o(e[0],e[1]):n(e):a(e)}},8984:(e,t,r)=>{var n=r(5527),o=r(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},3663:(e,t,r)=>{var n=r(1799),o=r(776),i=r(7197);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},7978:(e,t,r)=>{var n=r(270),o=r(8156),i=r(631),s=r(8586),a=r(756),c=r(7197),u=r(7797);e.exports=function(e,t){return s(e)&&a(t)?c(u(e),t):function(r){var s=o(r,e);return void 0===s&&s===t?i(r,e):n(t,s,3)}}},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255:(e,t,r)=>{var n=r(7422);e.exports=function(e){return function(t){return n(t,e)}}},5160:e=>{e.exports=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{var n=r(1873),o=r(4932),i=r(6449),s=r(2013),a=n?n.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},4128:(e,t,r)=>{var n=r(1800),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},9219:e=>{e.exports=function(e,t){return e.has(t)}},1769:(e,t,r)=>{var n=r(6449),o=r(8586),i=r(1802),s=r(3222);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(s(e))}},8754:(e,t,r)=>{var n=r(5160);e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:n(e,t,r)}},5481:(e,t,r)=>{var n=r(9325)["__core-js_shared__"];e.exports=n},2e3:(e,t,r)=>{var n=r(3945),o=r(2429),i=r(5389),s=r(6449);e.exports=function(e,t){return function(r,a){var c=s(r)?n:o,u=t?t():{};return c(r,e,i(a,2),u)}}},8329:(e,t,r)=>{var n=r(4894);e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,s=t?i:-1,a=Object(r);(t?s--:++s{e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),s=n(t),a=s.length;a--;){var c=s[e?a:++o];if(!1===r(i[c],c,i))break}return t}}},3243:(e,t,r)=>{var n=r(6110),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},5911:(e,t,r)=>{var n=r(8859),o=r(4248),i=r(9219);e.exports=function(e,t,r,s,a,c){var u=1&r,f=e.length,d=t.length;if(f!=d&&!(u&&d>f))return!1;var l=c.get(e),h=c.get(t);if(l&&h)return l==t&&h==e;var p=-1,_=!0,v=2&r?new n:void 0;for(c.set(e,t),c.set(t,e);++p{var n=r(1873),o=r(7828),i=r(5288),s=r(5911),a=r(317),c=r(4247),u=n?n.prototype:void 0,f=u?u.valueOf:void 0;e.exports=function(e,t,r,n,u,d,l){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":var p=1&n;if(h||(h=c),e.size!=t.size&&!p)return!1;var _=l.get(e);if(_)return _==t;n|=2,l.set(e,t);var v=s(h(e),h(t),n,u,d,l);return l.delete(e),v;case"[object Symbol]":if(f)return f.call(e)==f.call(t)}return!1}},689:(e,t,r)=>{var n=r(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,s,a){var c=1&r,u=n(e),f=u.length;if(f!=n(t).length&&!c)return!1;for(var d=f;d--;){var l=u[d];if(!(c?l in t:o.call(t,l)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var _=!0;a.set(e,t),a.set(t,e);for(var v=c;++d{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},2:(e,t,r)=>{var n=r(2199),o=r(4664),i=r(5950);e.exports=function(e){return n(e,i,o)}},2651:(e,t,r)=>{var n=r(4218);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},776:(e,t,r)=>{var n=r(756),o=r(5950);e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,n(s)]}return t}},6110:(e,t,r)=>{var n=r(5083),o=r(392);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},659:(e,t,r)=>{var n=r(1873),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=s.call(e);return n&&(t?e[a]=r:delete e[a]),o}},4664:(e,t,r)=>{var n=r(9770),o=r(3345),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),n(s(e),(function(t){return i.call(e,t)})))}:o;e.exports=a},5861:(e,t,r)=>{var n=r(5580),o=r(8223),i=r(2804),s=r(6545),a=r(8303),c=r(2552),u=r(7473),f="[object Map]",d="[object Promise]",l="[object Set]",h="[object WeakMap]",p="[object DataView]",_=u(n),v=u(o),m=u(i),y=u(s),g=u(a),x=c;(n&&x(new n(new ArrayBuffer(1)))!=p||o&&x(new o)!=f||i&&x(i.resolve())!=d||s&&x(new s)!=l||a&&x(new a)!=h)&&(x=function(e){var t=c(e),r="[object Object]"==t?e.constructor:void 0,n=r?u(r):"";if(n)switch(n){case _:return p;case v:return f;case m:return d;case y:return l;case g:return h}return t}),e.exports=x},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},9326:(e,t,r)=>{var n=r(1769),o=r(2428),i=r(6449),s=r(361),a=r(294),c=r(7797);e.exports=function(e,t,r){for(var u=-1,f=(t=n(t,e)).length,d=!1;++u{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},2032:(e,t,r)=>{var n=r(1042);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721:(e,t,r)=>{var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},2749:(e,t,r)=>{var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},5749:(e,t,r)=>{var n=r(1042);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(6449),o=r(2013),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||s.test(e)||!i.test(e)||null!=t&&e in Object(t)}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296:(e,t,r)=>{var n,o=r(5481),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},5527:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},756:(e,t,r)=>{var n=r(3805);e.exports=function(e){return e==e&&!n(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},80:(e,t,r)=>{var n=r(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():o.call(t,r,1),--this.size,0))}},4739:(e,t,r)=>{var n=r(6025);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},8655:(e,t,r)=>{var n=r(6025);e.exports=function(e){return n(this.__data__,e)>-1}},1175:(e,t,r)=>{var n=r(6025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},3040:(e,t,r)=>{var n=r(1549),o=r(79),i=r(8223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},7670:(e,t,r)=>{var n=r(2651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},289:(e,t,r)=>{var n=r(2651);e.exports=function(e){return n(this,e).get(e)}},4509:(e,t,r)=>{var n=r(2651);e.exports=function(e){return n(this,e).has(e)}},2949:(e,t,r)=>{var n=r(2651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},317:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},7197:e=>{e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},2224:(e,t,r)=>{var n=r(104);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},1042:(e,t,r)=>{var n=r(6110)(Object,"create");e.exports=n},3650:(e,t,r)=>{var n=r(4335)(Object.keys,Object);e.exports=n},6009:(e,t,r)=>{e=r.nmd(e);var n=r(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o&&n.process,a=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},9325:(e,t,r)=>{var n=r(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},4247:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},1420:(e,t,r)=>{var n=r(79);e.exports=function(){this.__data__=new n,this.size=0}},938:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},945:(e,t,r)=>{var n=r(79),o=r(8223),i=r(3661);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!o||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(s)}return r.set(e,t),this.size=r.size,this}},1993:(e,t,r)=>{var n=r(9811),o=r(9698),i=r(7927);e.exports=function(e){return o(e)?i(e):n(e)}},3912:(e,t,r)=>{var n=r(1074),o=r(9698),i=r(2054);e.exports=function(e){return o(e)?i(e):n(e)}},1802:(e,t,r)=>{var n=r(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=s},7797:(e,t,r)=>{var n=r(2013);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},1800:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},7927:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+n+"|"+o+")?",u="[\\ufe0e\\ufe0f]?",f=u+c+"(?:\\u200d(?:"+[i,s,a].join("|")+")"+u+c+")*",d="(?:"+[i+n+"?",n,s,a,r].join("|")+")",l=RegExp(o+"(?="+o+")|"+d+f,"g");e.exports=function(e){for(var t=l.lastIndex=0;l.test(e);)++t;return t}},2054:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+n+"|"+o+")?",u="[\\ufe0e\\ufe0f]?",f=u+c+"(?:\\u200d(?:"+[i,s,a].join("|")+")"+u+c+")*",d="(?:"+[i+n+"?",n,s,a,r].join("|")+")",l=RegExp(o+"(?="+o+")|"+d+f,"g");e.exports=function(e){return e.match(l)||[]}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},8156:(e,t,r)=>{var n=r(7422);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},4394:(e,t,r)=>{var n=r(3360),o=r(2e3),i=Object.prototype.hasOwnProperty,s=o((function(e,t,r){i.call(e,r)?e[r].push(t):n(e,r,[t])}));e.exports=s},631:(e,t,r)=>{var n=r(8077),o=r(9326);e.exports=function(e,t){return null!=e&&o(e,t,n)}},3488:e=>{e.exports=function(e){return e}},2428:(e,t,r)=>{var n=r(7534),o=r(346),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return o(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=c},6449:e=>{var t=Array.isArray;e.exports=t},4894:(e,t,r)=>{var n=r(1882),o=r(294);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},3656:(e,t,r)=>{e=r.nmd(e);var n=r(9325),o=r(9935),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,a=s&&s.exports===i?n.Buffer:void 0,c=(a?a.isBuffer:void 0)||o;e.exports=c},1882:(e,t,r)=>{var n=r(2552),o=r(3805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},9607:(e,t,r)=>{var n=r(1437),o=r(7301),i=r(6009),s=i&&i.isRegExp,a=s?o(s):n;e.exports=a},2013:(e,t,r)=>{var n=r(2552),o=r(346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},7167:(e,t,r)=>{var n=r(4901),o=r(7301),i=r(6009),s=i&&i.isTypedArray,a=s?o(s):n;e.exports=a},5950:(e,t,r)=>{var n=r(695),o=r(8984),i=r(4894);e.exports=function(e){return i(e)?n(e):o(e)}},104:(e,t,r)=>{var n=r(3661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},583:(e,t,r)=>{var n=r(7237),o=r(7255),i=r(8586),s=r(7797);e.exports=function(e){return i(e)?n(s(e)):o(e)}},3345:e=>{e.exports=function(){return[]}},9935:e=>{e.exports=function(){return!1}},7400:(e,t,r)=>{var n=r(9374),o=1/0;e.exports=function(e){return e?(e=n(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},1489:(e,t,r)=>{var n=r(7400);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},9374:(e,t,r)=>{var n=r(4128),o=r(3805),i=r(2013),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=a.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):s.test(e)?NaN:+e}},3222:(e,t,r)=>{var n=r(7556);e.exports=function(e){return null==e?"":n(e)}},2516:(e,t,r)=>{var n=r(7556),o=r(8754),i=r(9698),s=r(3805),a=r(9607),c=r(1993),u=r(3912),f=r(1489),d=r(3222),l=/\w*$/;e.exports=function(e,t){var r=30,h="...";if(s(t)){var p="separator"in t?t.separator:p;r="length"in t?f(t.length):r,h="omission"in t?n(t.omission):h}var _=(e=d(e)).length;if(i(e)){var v=u(e);_=v.length}if(r>=_)return e;var m=r-c(h);if(m<1)return h;var y=v?o(v,0,m).join(""):e.slice(0,m);if(void 0===p)return y+h;if(v&&(m+=y.length-m),a(p)){if(e.slice(m).search(p)){var g,x=y;for(p.global||(p=RegExp(p.source,d(l.exec(p))+"g")),p.lastIndex=0;g=p.exec(x);)var b=g.index;y=y.slice(0,void 0===b?m:b)}}else if(e.indexOf(n(p),m)!=m){var w=y.lastIndexOf(p);w>-1&&(y=y.slice(0,w))}return y+h}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";var e=__webpack_require__(4394),t=__webpack_require__(2516),r=__webpack_require__(4352),n=(__webpack_require__(2934),__webpack_require__(2270)),o=__webpack_require__(283),i=__webpack_require__(3332),s=__webpack_require__(5401),a=__webpack_require__(3029),c=__webpack_require__(2619);function u(e){if(!(this instanceof u))return new u(e);const t=e.document||e.doc||e;let r;this.tree=[],this.field=[],this.marker=[],this.register=(0,o.fp)(),this.key=(r=t.key||t.id)&&l(r,this.marker)||"id",this.fastupdate=(0,o.uM)(e.fastupdate,!0),this.storetree=(r=t.store)&&!0!==r&&[],this.store=r&&(0,o.fp)(),this.tag=(r=t.tag)&&l(r,this.marker),this.tagindex=r&&(0,o.fp)(),this.cache=(r=e.cache)&&new n.A(r),e.cache=!1,this.worker=e.worker,this.async=!1,this.index=d.call(this,e,t)}const f=u;function d(e,t){const n=(0,o.fp)();let i=t.index||t.field||t;(0,o.PM)(i)&&(i=[i]);for(let t,s,a=0;a1?t[i.href]=e:(i.hash="",""===n?r=i:k(e,t,r))}}else if(!0!==e&&!1!==e)return t;const o=r.href+(n?"#"+n:"");if(void 0!==t[o])throw new Error(`Duplicate schema URI "${o}".`);if(t[o]=e,!0===e||!1===e)return t;if(void 0===e.__absolute_uri__&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:o}),e.$ref&&void 0===e.__absolute_ref__){const t=new URL(e.$ref,r.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&void 0===e.__absolute_recursive_ref__){const t=new URL(e.$recursiveRef,r.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}e.$anchor&&(t[new URL("#"+e.$anchor,r.href).href]=e);for(let o in e){if(b[o])continue;const i=`${n}/${y(o)}`,s=e[o];if(Array.isArray(s)){if(g[o]){const e=s.length;for(let n=0;ne.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e)),uri:function(e){return I.test(e)&&M.test(e)},"uri-reference":O(/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i),"uri-template":O(/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i),url:O(/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu),email:e=>{if('"'===e[0])return!1;const[t,r,...n]=e.split("@");return!(!t||!r||0!==n.length||t.length>64||r.length>253)&&"."!==t[0]&&!t.endsWith(".")&&!t.includes("..")&&!(!/^[a-z0-9.-]+$/i.test(r)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t))&&r.split(".").every((e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e)))},hostname:O(/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i),ipv4:O(/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/),ipv6:O(/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i),regex:function(e){if(q.test(e))return!1;try{return new RegExp(e,"u"),!0}catch(e){return!1}},uuid:O(/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i),"json-pointer":O(/^(?:\/(?:[^~/]|~0|~1)*)*$/),"json-pointer-uri-fragment":O(/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i),"relative-json-pointer":O(/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/)};function A(e){const t=e.match($);if(!t)return!1;const r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(2==n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:j[n])}function z(e,t){const r=t.match(L);if(!r)return!1;const n=+r[1],o=+r[2],i=+r[3],s=!!r[5];return(n<=23&&o<=59&&i<=59||23==n&&59==o&&60==i)&&(!e||s)}const E=/t|\s/i,I=/\/|:/,M=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,q=/[^\\]\\Z/;var C;function S(e,t){const r=typeof e;if(r!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;nS(e,t)))||ae.push({instanceLocation:s,keyword:"enum",keywordLocation:`${a}/enum`,error:`Instance does not match any of ${JSON.stringify(v)}.`}):v.some((t=>e===t))||ae.push({instanceLocation:s,keyword:"enum",keywordLocation:`${a}/enum`,error:`Instance does not match any of ${JSON.stringify(v)}.`})),void 0!==g){const t=`${a}/not`;R(e,g,r,n,o,i,s,t).valid&&ae.push({instanceLocation:s,keyword:"not",keywordLocation:t,error:'Instance matched "not" schema.'})}let ce=[];if(void 0!==x){const t=`${a}/anyOf`,u=ae.length;let f=!1;for(let a=0;a{const f=Object.create(c),d=R(e,a,r,n,o,!0===h?i:null,s,`${t}/${u}`,f);return ae.push(...d.errors),d.valid&&ce.push(f),d.valid})).length;1===f?ae.length=u:ae.splice(u,0,{instanceLocation:s,keyword:"oneOf",keywordLocation:t,error:`Instance does not match exactly one subschema (${f} matches).`})}if("object"!==f&&"array"!==f||Object.assign(c,...ce),void 0!==$){const t=`${a}/if`;if(R(e,$,r,n,o,i,s,t,c).valid){if(void 0!==j){const u=R(e,j,r,n,o,i,s,`${a}/then`,c);u.valid||ae.push({instanceLocation:s,keyword:"if",keywordLocation:t,error:'Instance does not match "then" schema.'},...u.errors)}}else if(void 0!==L){const u=R(e,L,r,n,o,i,s,`${a}/else`,c);u.valid||ae.push({instanceLocation:s,keyword:"if",keywordLocation:t,error:'Instance does not match "else" schema.'},...u.errors)}}if("object"===f){if(void 0!==m)for(const t of m)t in e||ae.push({instanceLocation:s,keyword:"required",keywordLocation:`${a}/required`,error:`Instance does not have required property "${t}".`});const t=Object.keys(e);if(void 0!==M&&t.lengthq&&ae.push({instanceLocation:s,keyword:"maxProperties",keywordLocation:`${a}/maxProperties`,error:`Instance does not have at least ${q} properties.`}),void 0!==C){const t=`${a}/propertyNames`;for(const a in e){const e=`${s}/${y(a)}`,c=R(a,C,r,n,o,i,e,t);c.valid||ae.push({instanceLocation:s,keyword:"propertyNames",keywordLocation:t,error:`Property name "${a}" does not match schema.`},...c.errors)}}if(void 0!==D){const t=`${a}/dependantRequired`;for(const r in D)if(r in e){const n=D[r];for(const o of n)o in e||ae.push({instanceLocation:s,keyword:"dependentRequired",keywordLocation:t,error:`Instance has "${r}" but does not have "${o}".`})}}if(void 0!==T)for(const t in T){const u=`${a}/dependentSchemas`;if(t in e){const a=R(e,T[t],r,n,o,i,s,`${u}/${y(t)}`,c);a.valid||ae.push({instanceLocation:s,keyword:"dependentSchemas",keywordLocation:u,error:`Instance has "${t}" but does not match dependant schema.`},...a.errors)}}if(void 0!==U){const t=`${a}/dependencies`;for(const a in U)if(a in e){const c=U[a];if(Array.isArray(c))for(const r of c)r in e||ae.push({instanceLocation:s,keyword:"dependencies",keywordLocation:t,error:`Instance has "${a}" but does not have "${r}".`});else{const u=R(e,c,r,n,o,i,s,`${t}/${y(a)}`);u.valid||ae.push({instanceLocation:s,keyword:"dependencies",keywordLocation:t,error:`Instance has "${a}" but does not match dependant schema.`},...u.errors)}}}const u=Object.create(null);let f=!1;if(void 0!==A){const t=`${a}/properties`;for(const a in A){if(!(a in e))continue;const d=`${s}/${y(a)}`,l=R(e[a],A[a],r,n,o,i,d,`${t}/${y(a)}`);if(l.valid)c[a]=u[a]=!0;else if(f=o,ae.push({instanceLocation:s,keyword:"properties",keywordLocation:t,error:`Property "${a}" does not match schema.`},...l.errors),f)break}}if(!f&&void 0!==z){const t=`${a}/patternProperties`;for(const a in z){const d=new RegExp(a,"u"),l=z[a];for(const h in e){if(!d.test(h))continue;const p=`${s}/${y(h)}`,_=R(e[h],l,r,n,o,i,p,`${t}/${y(a)}`);_.valid?c[h]=u[h]=!0:(f=o,ae.push({instanceLocation:s,keyword:"patternProperties",keywordLocation:t,error:`Property "${h}" matches pattern "${a}" but does not match associated schema.`},..._.errors))}}}if(f||void 0===E){if(!f&&void 0!==I){const t=`${a}/unevaluatedProperties`;for(const a in e)if(!c[a]){const u=`${s}/${y(a)}`,f=R(e[a],I,r,n,o,i,u,t);f.valid?c[a]=!0:ae.push({instanceLocation:s,keyword:"unevaluatedProperties",keywordLocation:t,error:`Property "${a}" does not match unevaluated properties schema.`},...f.errors)}}}else{const t=`${a}/additionalProperties`;for(const a in e){if(u[a])continue;const d=`${s}/${y(a)}`,l=R(e[a],E,r,n,o,i,d,t);l.valid?c[a]=!0:(f=o,ae.push({instanceLocation:s,keyword:"additionalProperties",keywordLocation:t,error:`Property "${a}" does not match additional properties schema.`},...l.errors))}}}else if("array"===f){void 0!==Q&&e.length>Q&&ae.push({instanceLocation:s,keyword:"maxItems",keywordLocation:`${a}/maxItems`,error:`Array has too many items (${e.length} > ${Q}).`}),void 0!==J&&e.length=(K||0)&&(ae.length=f),void 0===K&&void 0===V&&0===d?ae.splice(f,0,{instanceLocation:s,keyword:"contains",keywordLocation:u,error:"Array does not contain item matching schema."}):void 0!==K&&dV&&ae.push({instanceLocation:s,keyword:"maxContains",keywordLocation:`${a}/maxContains`,error:`Array may contain at most ${V} items matching schema. ${d} items were found.`})}if(!f&&void 0!==B){const f=`${a}/unevaluatedItems`;for(;u=H||e>H)&&ae.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${a}/maximum`,error:`${e} is greater than ${ee?"or equal to ":""} ${H}.`})):(void 0!==G&&eH&&ae.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${a}/maximum`,error:`${e} is greater than ${H}.`}),void 0!==Y&&e<=Y&&ae.push({instanceLocation:s,keyword:"exclusiveMinimum",keywordLocation:`${a}/exclusiveMinimum`,error:`${e} is less than ${Y}.`}),void 0!==ee&&e>=ee&&ae.push({instanceLocation:s,keyword:"exclusiveMaximum",keywordLocation:`${a}/exclusiveMaximum`,error:`${e} is greater than or equal to ${ee}.`})),void 0!==te){const t=e%te;Math.abs(0-t)>=1.1920929e-7&&Math.abs(te-t)>=1.1920929e-7&&ae.push({instanceLocation:s,keyword:"multipleOf",keywordLocation:`${a}/multipleOf`,error:`${e} is not a multiple of ${te}.`})}}else if("string"===f){const t=void 0===re&&void 0===ne?0:function(e){let t,r=0,n=e.length,o=0;for(;o=55296&&t<=56319&&one&&ae.push({instanceLocation:s,keyword:"maxLength",keywordLocation:`${a}/maxLength`,error:`String is too long (${t} > ${ne}).`}),void 0===oe||new RegExp(oe,"u").test(e)||ae.push({instanceLocation:s,keyword:"pattern",keywordLocation:`${a}/pattern`,error:"String does not match pattern."}),void 0!==O&&P[O]&&!P[O](e)&&ae.push({instanceLocation:s,keyword:"format",keywordLocation:`${a}/format`,error:`String does not match format "${O}".`})}return{valid:0===ae.length,errors:ae}}!function(e){e[e.Flag=1]="Flag",e[e.Basic=2]="Basic",e[e.Detailed=4]="Detailed"}(C||(C={}));class D{schema;draft;shortCircuit;lookup;constructor(e,t="2019-09",r=!0){this.schema=e,this.draft=t,this.shortCircuit=r,this.lookup=k(e)}validate(e){return R(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),k(e,this.lookup)}}function T(e,t){e.removeEventListener("focus",T);const r=t.indexConfig?t.indexConfig:{tokenize:"forward"},n=t.dataFile;r.document={key:"id",index:["title","content","description"],store:["title","href","parent","description"]};const o=new f(r);window.geekdocSearchIndex=o,W(n,(function(e){e.forEach((e=>{window.geekdocSearchIndex.add(e)}))}))}function U(e,r,n){const o=[];for(const i of e){const e=document.createElement("li"),s=e.appendChild(document.createElement("a")),a=s.appendChild(document.createElement("span"));if(s.href=i.href,a.classList.add("gdoc-search__entry--title"),a.textContent=i.title,s.classList.add("gdoc-search__entry"),!0===n){const e=s.appendChild(document.createElement("span"));e.classList.add("gdoc-search__entry--description"),e.textContent=t(i.description,{length:55,separator:" "})}r?r.appendChild(e):o.push(e)}return o}function F(e){if(!e.ok)throw Error("Failed to fetch '"+e.url+"': "+e.statusText);return e}function W(e,t){fetch(e).then(F).then((e=>e.json())).then((e=>t(e))).catch((function(e){e instanceof AggregateError?(console.error(e.message),e.errors.forEach((e=>{console.error(e)}))):console.error(e)}))}document.addEventListener("DOMContentLoaded",(function(){const t=document.querySelector("#gdoc-search-input"),r=document.querySelector("#gdoc-search-results"),n=(o=t?t.dataset.siteBaseUrl:"",(i=document.createElement("a")).href=o,i.pathname);var o,i;const s=t?t.dataset.siteLang:"",a=new D({type:"object",properties:{dataFile:{type:"string"},indexConfig:{type:["object","null"]},showParent:{type:"boolean"},showDescription:{type:"boolean"}},additionalProperties:!1});var c,u;t&&W((c=n,(u="/search/"+s+".config.min.json")?c.replace(/\/+$/,"")+"/"+u.replace(/^\/+/,""):c),(function(n){const o=a.validate(n);if(!o.valid)throw AggregateError(o.errors.map((e=>new Error("Validation error: "+e.error))),"Schema validation failed");t&&(t.addEventListener("focus",(()=>{T(t,n)})),t.addEventListener("keyup",(()=>{!function(t,r,n){for(;r.firstChild;)r.removeChild(r.firstChild);if(!t.value)return r.classList.remove("has-hits");let o=function(e){const t=[],r=new Map;for(const n of e)for(const e of n.result)r.has(e.doc.href)||(r.set(e.doc.href,!0),t.push(e.doc));return t}(window.geekdocSearchIndex.search(t.value,{enrich:!0,limit:5}));if(o.length<1)return r.classList.remove("has-hits");r.classList.add("has-hits"),!0===n.showParent&&(o=e(o,(e=>e.parent)));const i=[];if(!0===n.showParent)for(const e in o){const t=document.createElement("li"),r=t.appendChild(document.createElement("span")),s=t.appendChild(document.createElement("ul"));e||r.remove(),r.classList.add("gdoc-search__section"),r.textContent=e,U(o[e],s,n.showDescription),i.push(t)}else{const e=document.createElement("li"),t=e.appendChild(document.createElement("span")),r=e.appendChild(document.createElement("ul"));t.textContent="Results",U(o,r,n.showDescription),i.push(e)}i.forEach((e=>{r.appendChild(e)}))}(t,r,n)})))}))}))})()})(); \ No newline at end of file diff --git a/docs/hugo/public/js/search-7db5e115.bundle.min.js.LICENSE.txt b/docs/hugo/public/js/search-7db5e115.bundle.min.js.LICENSE.txt new file mode 100644 index 000000000..b700d3a41 --- /dev/null +++ b/docs/hugo/public/js/search-7db5e115.bundle.min.js.LICENSE.txt @@ -0,0 +1,7 @@ +/**! + * FlexSearch.js + * Author and Copyright: Thomas Wilkerling + * Licence: Apache-2.0 + * Hosted by Nextapps GmbH + * https://github.com/nextapps-de/flexsearch + */ diff --git a/docs/hugo/public/katex-a0da2a32.min.css b/docs/hugo/public/katex-a0da2a32.min.css new file mode 100644 index 000000000..09266b4dd --- /dev/null +++ b/docs/hugo/public/katex-a0da2a32.min.css @@ -0,0 +1 @@ +@font-face{font-family:"KaTeX_AMS";src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"KaTeX_Caligraphic";src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype");font-weight:bold;font-style:normal}@font-face{font-family:"KaTeX_Caligraphic";src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"KaTeX_Fraktur";src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype");font-weight:bold;font-style:normal}@font-face{font-family:"KaTeX_Fraktur";src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"KaTeX_Main";src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype");font-weight:bold;font-style:normal}@font-face{font-family:"KaTeX_Main";src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype");font-weight:bold;font-style:italic}@font-face{font-family:"KaTeX_Main";src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype");font-weight:normal;font-style:italic}@font-face{font-family:"KaTeX_Main";src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"KaTeX_Math";src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype");font-weight:bold;font-style:italic}@font-face{font-family:"KaTeX_Math";src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype");font-weight:normal;font-style:italic}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype");font-weight:bold;font-style:normal}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype");font-weight:normal;font-style:italic}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"KaTeX_Script";src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"KaTeX_Size1";src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"KaTeX_Size2";src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"KaTeX_Size3";src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"KaTeX_Size4";src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}@font-face{font-family:"KaTeX_Typewriter";src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype");font-weight:normal;font-style:normal}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none !important}.katex *{border-color:currentColor}.katex .katex-version::after{content:"0.16.21"}.katex .katex-mathml{position:absolute;clip:rect(1px, 1px, 1px, 1px);padding:0;border:0;height:1px;width:1px;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{position:relative;display:inline-block;white-space:nowrap;width:-moz-min-content;width:min-content}.katex .strut{display:inline-block}.katex .textbf{font-weight:bold}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:bold}.katex .boldsymbol{font-family:KaTeX_Math;font-weight:bold;font-style:italic}.katex .amsrm{font-family:KaTeX_AMS}.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:bold}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:bold}.katex .mathsfit,.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{display:inline-table;table-layout:fixed;border-collapse:collapse}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;vertical-align:bottom;position:relative}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;vertical-align:bottom;font-size:1px;width:2px;min-width:2px}.katex .vbox{display:inline-flex;flex-direction:column;align-items:baseline}.katex .hbox{display:inline-flex;flex-direction:row;width:100%}.katex .thinbox{display:inline-flex;flex-direction:row;width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{display:inline-block;width:100%;border-bottom-style:solid}.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .underline .underline-line,.katex .hline,.katex .hdashline,.katex .rule{min-height:1px}.katex .mspace{display:inline-block}.katex .llap,.katex .rlap,.katex .clap{width:0;position:relative}.katex .llap>.inner,.katex .rlap>.inner,.katex .clap>.inner{position:absolute}.katex .llap>.fix,.katex .rlap>.fix,.katex .clap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .rlap>.inner,.katex .clap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{display:inline-block;border:solid 0;position:relative}.katex .overline .overline-line,.katex .underline .underline-line,.katex .hline{display:inline-block;width:100%;border-bottom-style:solid}.katex .hdashline{display:inline-block;width:100%;border-bottom-style:dashed}.katex .sqrt>.root{margin-left:0.2777777778em;margin-right:-0.5555555556em}.katex .sizing.reset-size1.size1,.katex .fontsize-ensurer.reset-size1.size1{font-size:1em}.katex .sizing.reset-size1.size2,.katex .fontsize-ensurer.reset-size1.size2{font-size:1.2em}.katex .sizing.reset-size1.size3,.katex .fontsize-ensurer.reset-size1.size3{font-size:1.4em}.katex .sizing.reset-size1.size4,.katex .fontsize-ensurer.reset-size1.size4{font-size:1.6em}.katex .sizing.reset-size1.size5,.katex .fontsize-ensurer.reset-size1.size5{font-size:1.8em}.katex .sizing.reset-size1.size6,.katex .fontsize-ensurer.reset-size1.size6{font-size:2em}.katex .sizing.reset-size1.size7,.katex .fontsize-ensurer.reset-size1.size7{font-size:2.4em}.katex .sizing.reset-size1.size8,.katex .fontsize-ensurer.reset-size1.size8{font-size:2.88em}.katex .sizing.reset-size1.size9,.katex .fontsize-ensurer.reset-size1.size9{font-size:3.456em}.katex .sizing.reset-size1.size10,.katex .fontsize-ensurer.reset-size1.size10{font-size:4.148em}.katex .sizing.reset-size1.size11,.katex .fontsize-ensurer.reset-size1.size11{font-size:4.976em}.katex .sizing.reset-size2.size1,.katex .fontsize-ensurer.reset-size2.size1{font-size:0.8333333333em}.katex .sizing.reset-size2.size2,.katex .fontsize-ensurer.reset-size2.size2{font-size:1em}.katex .sizing.reset-size2.size3,.katex .fontsize-ensurer.reset-size2.size3{font-size:1.1666666667em}.katex .sizing.reset-size2.size4,.katex .fontsize-ensurer.reset-size2.size4{font-size:1.3333333333em}.katex .sizing.reset-size2.size5,.katex .fontsize-ensurer.reset-size2.size5{font-size:1.5em}.katex .sizing.reset-size2.size6,.katex .fontsize-ensurer.reset-size2.size6{font-size:1.6666666667em}.katex .sizing.reset-size2.size7,.katex .fontsize-ensurer.reset-size2.size7{font-size:2em}.katex .sizing.reset-size2.size8,.katex .fontsize-ensurer.reset-size2.size8{font-size:2.4em}.katex .sizing.reset-size2.size9,.katex .fontsize-ensurer.reset-size2.size9{font-size:2.88em}.katex .sizing.reset-size2.size10,.katex .fontsize-ensurer.reset-size2.size10{font-size:3.4566666667em}.katex .sizing.reset-size2.size11,.katex .fontsize-ensurer.reset-size2.size11{font-size:4.1466666667em}.katex .sizing.reset-size3.size1,.katex .fontsize-ensurer.reset-size3.size1{font-size:0.7142857143em}.katex .sizing.reset-size3.size2,.katex .fontsize-ensurer.reset-size3.size2{font-size:0.8571428571em}.katex .sizing.reset-size3.size3,.katex .fontsize-ensurer.reset-size3.size3{font-size:1em}.katex .sizing.reset-size3.size4,.katex .fontsize-ensurer.reset-size3.size4{font-size:1.1428571429em}.katex .sizing.reset-size3.size5,.katex .fontsize-ensurer.reset-size3.size5{font-size:1.2857142857em}.katex .sizing.reset-size3.size6,.katex .fontsize-ensurer.reset-size3.size6{font-size:1.4285714286em}.katex .sizing.reset-size3.size7,.katex .fontsize-ensurer.reset-size3.size7{font-size:1.7142857143em}.katex .sizing.reset-size3.size8,.katex .fontsize-ensurer.reset-size3.size8{font-size:2.0571428571em}.katex .sizing.reset-size3.size9,.katex .fontsize-ensurer.reset-size3.size9{font-size:2.4685714286em}.katex .sizing.reset-size3.size10,.katex .fontsize-ensurer.reset-size3.size10{font-size:2.9628571429em}.katex .sizing.reset-size3.size11,.katex .fontsize-ensurer.reset-size3.size11{font-size:3.5542857143em}.katex .sizing.reset-size4.size1,.katex .fontsize-ensurer.reset-size4.size1{font-size:.625em}.katex .sizing.reset-size4.size2,.katex .fontsize-ensurer.reset-size4.size2{font-size:.75em}.katex .sizing.reset-size4.size3,.katex .fontsize-ensurer.reset-size4.size3{font-size:.875em}.katex .sizing.reset-size4.size4,.katex .fontsize-ensurer.reset-size4.size4{font-size:1em}.katex .sizing.reset-size4.size5,.katex .fontsize-ensurer.reset-size4.size5{font-size:1.125em}.katex .sizing.reset-size4.size6,.katex .fontsize-ensurer.reset-size4.size6{font-size:1.25em}.katex .sizing.reset-size4.size7,.katex .fontsize-ensurer.reset-size4.size7{font-size:1.5em}.katex .sizing.reset-size4.size8,.katex .fontsize-ensurer.reset-size4.size8{font-size:1.8em}.katex .sizing.reset-size4.size9,.katex .fontsize-ensurer.reset-size4.size9{font-size:2.16em}.katex .sizing.reset-size4.size10,.katex .fontsize-ensurer.reset-size4.size10{font-size:2.5925em}.katex .sizing.reset-size4.size11,.katex .fontsize-ensurer.reset-size4.size11{font-size:3.11em}.katex .sizing.reset-size5.size1,.katex .fontsize-ensurer.reset-size5.size1{font-size:0.5555555556em}.katex .sizing.reset-size5.size2,.katex .fontsize-ensurer.reset-size5.size2{font-size:0.6666666667em}.katex .sizing.reset-size5.size3,.katex .fontsize-ensurer.reset-size5.size3{font-size:0.7777777778em}.katex .sizing.reset-size5.size4,.katex .fontsize-ensurer.reset-size5.size4{font-size:0.8888888889em}.katex .sizing.reset-size5.size5,.katex .fontsize-ensurer.reset-size5.size5{font-size:1em}.katex .sizing.reset-size5.size6,.katex .fontsize-ensurer.reset-size5.size6{font-size:1.1111111111em}.katex .sizing.reset-size5.size7,.katex .fontsize-ensurer.reset-size5.size7{font-size:1.3333333333em}.katex .sizing.reset-size5.size8,.katex .fontsize-ensurer.reset-size5.size8{font-size:1.6em}.katex .sizing.reset-size5.size9,.katex .fontsize-ensurer.reset-size5.size9{font-size:1.92em}.katex .sizing.reset-size5.size10,.katex .fontsize-ensurer.reset-size5.size10{font-size:2.3044444444em}.katex .sizing.reset-size5.size11,.katex .fontsize-ensurer.reset-size5.size11{font-size:2.7644444444em}.katex .sizing.reset-size6.size1,.katex .fontsize-ensurer.reset-size6.size1{font-size:.5em}.katex .sizing.reset-size6.size2,.katex .fontsize-ensurer.reset-size6.size2{font-size:.6em}.katex .sizing.reset-size6.size3,.katex .fontsize-ensurer.reset-size6.size3{font-size:.7em}.katex .sizing.reset-size6.size4,.katex .fontsize-ensurer.reset-size6.size4{font-size:.8em}.katex .sizing.reset-size6.size5,.katex .fontsize-ensurer.reset-size6.size5{font-size:.9em}.katex .sizing.reset-size6.size6,.katex .fontsize-ensurer.reset-size6.size6{font-size:1em}.katex .sizing.reset-size6.size7,.katex .fontsize-ensurer.reset-size6.size7{font-size:1.2em}.katex .sizing.reset-size6.size8,.katex .fontsize-ensurer.reset-size6.size8{font-size:1.44em}.katex .sizing.reset-size6.size9,.katex .fontsize-ensurer.reset-size6.size9{font-size:1.728em}.katex .sizing.reset-size6.size10,.katex .fontsize-ensurer.reset-size6.size10{font-size:2.074em}.katex .sizing.reset-size6.size11,.katex .fontsize-ensurer.reset-size6.size11{font-size:2.488em}.katex .sizing.reset-size7.size1,.katex .fontsize-ensurer.reset-size7.size1{font-size:0.4166666667em}.katex .sizing.reset-size7.size2,.katex .fontsize-ensurer.reset-size7.size2{font-size:.5em}.katex .sizing.reset-size7.size3,.katex .fontsize-ensurer.reset-size7.size3{font-size:0.5833333333em}.katex .sizing.reset-size7.size4,.katex .fontsize-ensurer.reset-size7.size4{font-size:0.6666666667em}.katex .sizing.reset-size7.size5,.katex .fontsize-ensurer.reset-size7.size5{font-size:.75em}.katex .sizing.reset-size7.size6,.katex .fontsize-ensurer.reset-size7.size6{font-size:0.8333333333em}.katex .sizing.reset-size7.size7,.katex .fontsize-ensurer.reset-size7.size7{font-size:1em}.katex .sizing.reset-size7.size8,.katex .fontsize-ensurer.reset-size7.size8{font-size:1.2em}.katex .sizing.reset-size7.size9,.katex .fontsize-ensurer.reset-size7.size9{font-size:1.44em}.katex .sizing.reset-size7.size10,.katex .fontsize-ensurer.reset-size7.size10{font-size:1.7283333333em}.katex .sizing.reset-size7.size11,.katex .fontsize-ensurer.reset-size7.size11{font-size:2.0733333333em}.katex .sizing.reset-size8.size1,.katex .fontsize-ensurer.reset-size8.size1{font-size:0.3472222222em}.katex .sizing.reset-size8.size2,.katex .fontsize-ensurer.reset-size8.size2{font-size:0.4166666667em}.katex .sizing.reset-size8.size3,.katex .fontsize-ensurer.reset-size8.size3{font-size:0.4861111111em}.katex .sizing.reset-size8.size4,.katex .fontsize-ensurer.reset-size8.size4{font-size:0.5555555556em}.katex .sizing.reset-size8.size5,.katex .fontsize-ensurer.reset-size8.size5{font-size:.625em}.katex .sizing.reset-size8.size6,.katex .fontsize-ensurer.reset-size8.size6{font-size:0.6944444444em}.katex .sizing.reset-size8.size7,.katex .fontsize-ensurer.reset-size8.size7{font-size:0.8333333333em}.katex .sizing.reset-size8.size8,.katex .fontsize-ensurer.reset-size8.size8{font-size:1em}.katex .sizing.reset-size8.size9,.katex .fontsize-ensurer.reset-size8.size9{font-size:1.2em}.katex .sizing.reset-size8.size10,.katex .fontsize-ensurer.reset-size8.size10{font-size:1.4402777778em}.katex .sizing.reset-size8.size11,.katex .fontsize-ensurer.reset-size8.size11{font-size:1.7277777778em}.katex .sizing.reset-size9.size1,.katex .fontsize-ensurer.reset-size9.size1{font-size:0.2893518519em}.katex .sizing.reset-size9.size2,.katex .fontsize-ensurer.reset-size9.size2{font-size:0.3472222222em}.katex .sizing.reset-size9.size3,.katex .fontsize-ensurer.reset-size9.size3{font-size:0.4050925926em}.katex .sizing.reset-size9.size4,.katex .fontsize-ensurer.reset-size9.size4{font-size:.462962963em}.katex .sizing.reset-size9.size5,.katex .fontsize-ensurer.reset-size9.size5{font-size:0.5208333333em}.katex .sizing.reset-size9.size6,.katex .fontsize-ensurer.reset-size9.size6{font-size:0.5787037037em}.katex .sizing.reset-size9.size7,.katex .fontsize-ensurer.reset-size9.size7{font-size:0.6944444444em}.katex .sizing.reset-size9.size8,.katex .fontsize-ensurer.reset-size9.size8{font-size:0.8333333333em}.katex .sizing.reset-size9.size9,.katex .fontsize-ensurer.reset-size9.size9{font-size:1em}.katex .sizing.reset-size9.size10,.katex .fontsize-ensurer.reset-size9.size10{font-size:1.2002314815em}.katex .sizing.reset-size9.size11,.katex .fontsize-ensurer.reset-size9.size11{font-size:1.4398148148em}.katex .sizing.reset-size10.size1,.katex .fontsize-ensurer.reset-size10.size1{font-size:0.2410800386em}.katex .sizing.reset-size10.size2,.katex .fontsize-ensurer.reset-size10.size2{font-size:0.2892960463em}.katex .sizing.reset-size10.size3,.katex .fontsize-ensurer.reset-size10.size3{font-size:.337512054em}.katex .sizing.reset-size10.size4,.katex .fontsize-ensurer.reset-size10.size4{font-size:0.3857280617em}.katex .sizing.reset-size10.size5,.katex .fontsize-ensurer.reset-size10.size5{font-size:0.4339440694em}.katex .sizing.reset-size10.size6,.katex .fontsize-ensurer.reset-size10.size6{font-size:0.4821600771em}.katex .sizing.reset-size10.size7,.katex .fontsize-ensurer.reset-size10.size7{font-size:0.5785920926em}.katex .sizing.reset-size10.size8,.katex .fontsize-ensurer.reset-size10.size8{font-size:0.6943105111em}.katex .sizing.reset-size10.size9,.katex .fontsize-ensurer.reset-size10.size9{font-size:0.8331726133em}.katex .sizing.reset-size10.size10,.katex .fontsize-ensurer.reset-size10.size10{font-size:1em}.katex .sizing.reset-size10.size11,.katex .fontsize-ensurer.reset-size10.size11{font-size:1.1996142719em}.katex .sizing.reset-size11.size1,.katex .fontsize-ensurer.reset-size11.size1{font-size:0.2009646302em}.katex .sizing.reset-size11.size2,.katex .fontsize-ensurer.reset-size11.size2{font-size:0.2411575563em}.katex .sizing.reset-size11.size3,.katex .fontsize-ensurer.reset-size11.size3{font-size:0.2813504823em}.katex .sizing.reset-size11.size4,.katex .fontsize-ensurer.reset-size11.size4{font-size:0.3215434084em}.katex .sizing.reset-size11.size5,.katex .fontsize-ensurer.reset-size11.size5{font-size:0.3617363344em}.katex .sizing.reset-size11.size6,.katex .fontsize-ensurer.reset-size11.size6{font-size:0.4019292605em}.katex .sizing.reset-size11.size7,.katex .fontsize-ensurer.reset-size11.size7{font-size:0.4823151125em}.katex .sizing.reset-size11.size8,.katex .fontsize-ensurer.reset-size11.size8{font-size:.578778135em}.katex .sizing.reset-size11.size9,.katex .fontsize-ensurer.reset-size11.size9{font-size:0.6945337621em}.katex .sizing.reset-size11.size10,.katex .fontsize-ensurer.reset-size11.size10{font-size:0.8336012862em}.katex .sizing.reset-size11.size11,.katex .fontsize-ensurer.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter{position:relative}.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .op-limits>.vlist-t{text-align:center}.katex .accent>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex svg path{stroke:none}.katex img{border-style:none;min-width:0;min-height:0;max-width:none;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy::before,.katex .stretchy::after{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{position:absolute;left:0;width:50.2%;overflow:hidden}.katex .halfarrow-right{position:absolute;right:0;width:50.2%;overflow:hidden}.katex .brace-left{position:absolute;left:0;width:25.1%;overflow:hidden}.katex .brace-center{position:absolute;left:25%;width:50%;overflow:hidden}.katex .brace-right{position:absolute;right:0;width:25.1%;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .x-arrow,.katex .mover,.katex .munder{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-0.2em;margin-right:-0.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num::before{counter-increment:katexEqnNo;content:"(" counter(katexEqnNo) ")"}.katex .mml-eqn-num::before{counter-increment:mmlEqnNo;content:"(" counter(mmlEqnNo) ")"}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;position:absolute;left:calc(50% + .3em);text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo} \ No newline at end of file diff --git a/docs/hugo/public/main-4434ec39.min.css b/docs/hugo/public/main-4434ec39.min.css new file mode 100644 index 000000000..47f6f38a6 --- /dev/null +++ b/docs/hugo/public/main-4434ec39.min.css @@ -0,0 +1 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0;line-height:1.2em}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.flex{display:flex}.flex-auto{flex:1 1 auto}.flex-25{flex:1 1 25%}.flex-inline{display:inline-flex}.flex-even{flex:1 1}.flex-wrap{flex-wrap:wrap}.flex-grid{flex-direction:column;border:1px solid var(--accent-color);border-radius:.15rem;background:var(--accent-color-lite)}.flex-gap{flex-wrap:wrap;gap:1rem}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.align-center{align-items:center}.mx-auto{margin:0 auto}.text-center{text-align:center}.text-right{text-align:right}.no-wrap{white-space:nowrap}.hidden{display:none !important}.svg-sprite{position:absolute;width:0;height:0;overflow:hidden}.table-wrap{overflow:auto;margin:1rem 0}.table-wrap>table{margin:0 !important}.badge-placeholder{display:inline-block;min-width:4rem}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans-Bold.woff2") format("woff2"),url("fonts/LiberationSans-Bold.woff") format("woff");font-weight:bold;font-style:normal;font-display:swap}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans-BoldItalic.woff2") format("woff2"),url("fonts/LiberationSans-BoldItalic.woff") format("woff");font-weight:bold;font-style:italic;font-display:swap}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans-Italic.woff2") format("woff2"),url("fonts/LiberationSans-Italic.woff") format("woff");font-weight:normal;font-style:italic;font-display:swap}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans.woff2") format("woff2"),url("fonts/LiberationSans.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:"Liberation Mono";src:url("fonts/LiberationMono.woff2") format("woff2"),url("fonts/LiberationMono.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:"Metropolis";src:url("fonts/Metropolis.woff2") format("woff2"),url("fonts/Metropolis.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:"GeekdocIcons";src:url("fonts/GeekdocIcons.woff2") format("woff2"),url("fonts/GeekdocIcons.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}body{font-family:var(--body-font-family)}code,.gdoc-error__title{font-family:var(--code-font-family)}.gdoc-header{font-family:var(--header-font-family)}:root{--code-max-height: none;--header-font-family: "Metropolis", sans-serif;--body-font-family: "Liberation Sans", sans-serif;--code-font-family: "Liberation Mono", monospace}:root,:root[color-theme=light]{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: white;--body-font-color: rgb(52, 58, 64);--mark-color: rgb(255, 171, 0);--button-background: rgb(43.6295302013, 113.1640939597, 159.5204697987);--button-border-color: rgb(32, 83, 117);--link-color: rgb(10, 83, 154);--link-color-visited: rgb(119, 73, 191);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: rgb(206, 212, 218);--accent-color: rgb(233, 236, 239);--accent-color-lite: rgb(248, 249, 250);--control-icons: rgb(124.5724137931, 136.8, 149.0275862069);--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root .dark-mode-dim .gdoc-markdown img,:root[color-theme=light] .dark-mode-dim .gdoc-markdown img{filter:none}:root .gdoc-markdown .gdoc-hint,:root .gdoc-markdown .gdoc-props__tag,:root .gdoc-markdown .admonitionblock,:root[color-theme=light] .gdoc-markdown .gdoc-hint,:root[color-theme=light] .gdoc-markdown .gdoc-props__tag,:root[color-theme=light] .gdoc-markdown .admonitionblock{filter:none}:root .gdoc-markdown .gdoc-hint__title,:root .gdoc-markdown .admonitionblock table td:first-child,:root[color-theme=light] .gdoc-markdown .gdoc-hint__title,:root[color-theme=light] .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.05)}:root .chroma,:root[color-theme=light] .chroma{color:var(--code-font-color)}:root .chroma .lntable td:nth-child(2) code .hl,:root[color-theme=light] .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root .highlight pre.chroma,:root[color-theme=light] .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root .chroma .lntable,:root[color-theme=light] .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root .chroma .lntable pre.chroma,:root[color-theme=light] .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root .chroma .lntable td:first-child code,:root[color-theme=light] .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root .chroma .lntable td:nth-child(2),:root[color-theme=light] .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root .chroma .x,:root[color-theme=light] .chroma .x{color:inherit}:root .chroma .err,:root[color-theme=light] .chroma .err{color:#a61717;background-color:#e3d2d2}:root .chroma .lntd,:root[color-theme=light] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root .chroma .hl,:root[color-theme=light] .chroma .hl{display:block;width:100%;background-color:#ffc}:root .chroma .lnt,:root[color-theme=light] .chroma .lnt{padding:0 .8em}:root .chroma .ln,:root[color-theme=light] .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em}:root .chroma .k,:root[color-theme=light] .chroma .k{color:#000;font-weight:bold}:root .chroma .kc,:root[color-theme=light] .chroma .kc{color:#000;font-weight:bold}:root .chroma .kd,:root[color-theme=light] .chroma .kd{color:#000;font-weight:bold}:root .chroma .kn,:root[color-theme=light] .chroma .kn{color:#000;font-weight:bold}:root .chroma .kp,:root[color-theme=light] .chroma .kp{color:#000;font-weight:bold}:root .chroma .kr,:root[color-theme=light] .chroma .kr{color:#000;font-weight:bold}:root .chroma .kt,:root[color-theme=light] .chroma .kt{color:#458;font-weight:bold}:root .chroma .n,:root[color-theme=light] .chroma .n{color:inherit}:root .chroma .na,:root[color-theme=light] .chroma .na{color:#006767}:root .chroma .nb,:root[color-theme=light] .chroma .nb{color:#556165}:root .chroma .bp,:root[color-theme=light] .chroma .bp{color:#676767}:root .chroma .nc,:root[color-theme=light] .chroma .nc{color:#458;font-weight:bold}:root .chroma .no,:root[color-theme=light] .chroma .no{color:#006767}:root .chroma .nd,:root[color-theme=light] .chroma .nd{color:#3c5d5d;font-weight:bold}:root .chroma .ni,:root[color-theme=light] .chroma .ni{color:purple}:root .chroma .ne,:root[color-theme=light] .chroma .ne{color:#900;font-weight:bold}:root .chroma .nf,:root[color-theme=light] .chroma .nf{color:#900;font-weight:bold}:root .chroma .fm,:root[color-theme=light] .chroma .fm{color:inherit}:root .chroma .nl,:root[color-theme=light] .chroma .nl{color:#900;font-weight:bold}:root .chroma .nn,:root[color-theme=light] .chroma .nn{color:#555}:root .chroma .nx,:root[color-theme=light] .chroma .nx{color:inherit}:root .chroma .py,:root[color-theme=light] .chroma .py{color:inherit}:root .chroma .nt,:root[color-theme=light] .chroma .nt{color:navy}:root .chroma .nv,:root[color-theme=light] .chroma .nv{color:#006767}:root .chroma .vc,:root[color-theme=light] .chroma .vc{color:#006767}:root .chroma .vg,:root[color-theme=light] .chroma .vg{color:#006767}:root .chroma .vi,:root[color-theme=light] .chroma .vi{color:#006767}:root .chroma .vm,:root[color-theme=light] .chroma .vm{color:inherit}:root .chroma .l,:root[color-theme=light] .chroma .l{color:inherit}:root .chroma .ld,:root[color-theme=light] .chroma .ld{color:inherit}:root .chroma .s,:root[color-theme=light] .chroma .s{color:#d14}:root .chroma .sa,:root[color-theme=light] .chroma .sa{color:#d14}:root .chroma .sb,:root[color-theme=light] .chroma .sb{color:#d14}:root .chroma .sc,:root[color-theme=light] .chroma .sc{color:#d14}:root .chroma .dl,:root[color-theme=light] .chroma .dl{color:#d14}:root .chroma .sd,:root[color-theme=light] .chroma .sd{color:#d14}:root .chroma .s2,:root[color-theme=light] .chroma .s2{color:#d14}:root .chroma .se,:root[color-theme=light] .chroma .se{color:#d14}:root .chroma .sh,:root[color-theme=light] .chroma .sh{color:#d14}:root .chroma .si,:root[color-theme=light] .chroma .si{color:#d14}:root .chroma .sx,:root[color-theme=light] .chroma .sx{color:#d14}:root .chroma .sr,:root[color-theme=light] .chroma .sr{color:#009926}:root .chroma .s1,:root[color-theme=light] .chroma .s1{color:#d14}:root .chroma .ss,:root[color-theme=light] .chroma .ss{color:#990073}:root .chroma .m,:root[color-theme=light] .chroma .m{color:#027e83}:root .chroma .mb,:root[color-theme=light] .chroma .mb{color:#027e83}:root .chroma .mf,:root[color-theme=light] .chroma .mf{color:#027e83}:root .chroma .mh,:root[color-theme=light] .chroma .mh{color:#027e83}:root .chroma .mi,:root[color-theme=light] .chroma .mi{color:#027e83}:root .chroma .il,:root[color-theme=light] .chroma .il{color:#027e83}:root .chroma .mo,:root[color-theme=light] .chroma .mo{color:#027e83}:root .chroma .o,:root[color-theme=light] .chroma .o{color:#000;font-weight:bold}:root .chroma .ow,:root[color-theme=light] .chroma .ow{color:#000;font-weight:bold}:root .chroma .p,:root[color-theme=light] .chroma .p{color:inherit}:root .chroma .c,:root[color-theme=light] .chroma .c{color:#676765;font-style:italic}:root .chroma .ch,:root[color-theme=light] .chroma .ch{color:#676765;font-style:italic}:root .chroma .cm,:root[color-theme=light] .chroma .cm{color:#676765;font-style:italic}:root .chroma .c1,:root[color-theme=light] .chroma .c1{color:#676765;font-style:italic}:root .chroma .cs,:root[color-theme=light] .chroma .cs{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cp,:root[color-theme=light] .chroma .cp{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cpf,:root[color-theme=light] .chroma .cpf{color:#676767;font-weight:bold;font-style:italic}:root .chroma .g,:root[color-theme=light] .chroma .g{color:inherit}:root .chroma .gd,:root[color-theme=light] .chroma .gd{color:#000;background-color:#fdd}:root .chroma .ge,:root[color-theme=light] .chroma .ge{color:#000;font-style:italic}:root .chroma .gr,:root[color-theme=light] .chroma .gr{color:#a00}:root .chroma .gh,:root[color-theme=light] .chroma .gh{color:#676767}:root .chroma .gi,:root[color-theme=light] .chroma .gi{color:#000;background-color:#dfd}:root .chroma .go,:root[color-theme=light] .chroma .go{color:#6f6f6f}:root .chroma .gp,:root[color-theme=light] .chroma .gp{color:#555}:root .chroma .gs,:root[color-theme=light] .chroma .gs{font-weight:bold}:root .chroma .gu,:root[color-theme=light] .chroma .gu{color:#5f5f5f}:root .chroma .gt,:root[color-theme=light] .chroma .gt{color:#a00}:root .chroma .gl,:root[color-theme=light] .chroma .gl{text-decoration:underline}:root .chroma .w,:root[color-theme=light] .chroma .w{color:#bbb}:root,:root[color-theme=light]{--code-background: rgb(248, 249, 250);--code-accent-color: rgb(117.275, 136.95, 156.625);--code-accent-color-lite: rgb(204.425, 211.65, 218.875);--code-font-color: rgb(70, 70, 70);--code-copy-background: rgb(248, 249, 250);--code-copy-font-color: #6b6b6b;--code-copy-border-color: #909090;--code-copy-success-color: rgb(0, 200, 83)}@media(prefers-color-scheme: light){:root{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: white;--body-font-color: rgb(52, 58, 64);--mark-color: rgb(255, 171, 0);--button-background: rgb(43.6295302013, 113.1640939597, 159.5204697987);--button-border-color: rgb(32, 83, 117);--link-color: rgb(10, 83, 154);--link-color-visited: rgb(119, 73, 191);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: rgb(206, 212, 218);--accent-color: rgb(233, 236, 239);--accent-color-lite: rgb(248, 249, 250);--control-icons: rgb(124.5724137931, 136.8, 149.0275862069);--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root .dark-mode-dim .gdoc-markdown img{filter:none}:root .gdoc-markdown .gdoc-hint,:root .gdoc-markdown .gdoc-props__tag,:root .gdoc-markdown .admonitionblock{filter:none}:root .gdoc-markdown .gdoc-hint__title,:root .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.05)}:root .chroma{color:var(--code-font-color)}:root .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root .chroma .x{color:inherit}:root .chroma .err{color:#a61717;background-color:#e3d2d2}:root .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root .chroma .hl{display:block;width:100%;background-color:#ffc}:root .chroma .lnt{padding:0 .8em}:root .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em}:root .chroma .k{color:#000;font-weight:bold}:root .chroma .kc{color:#000;font-weight:bold}:root .chroma .kd{color:#000;font-weight:bold}:root .chroma .kn{color:#000;font-weight:bold}:root .chroma .kp{color:#000;font-weight:bold}:root .chroma .kr{color:#000;font-weight:bold}:root .chroma .kt{color:#458;font-weight:bold}:root .chroma .n{color:inherit}:root .chroma .na{color:#006767}:root .chroma .nb{color:#556165}:root .chroma .bp{color:#676767}:root .chroma .nc{color:#458;font-weight:bold}:root .chroma .no{color:#006767}:root .chroma .nd{color:#3c5d5d;font-weight:bold}:root .chroma .ni{color:purple}:root .chroma .ne{color:#900;font-weight:bold}:root .chroma .nf{color:#900;font-weight:bold}:root .chroma .fm{color:inherit}:root .chroma .nl{color:#900;font-weight:bold}:root .chroma .nn{color:#555}:root .chroma .nx{color:inherit}:root .chroma .py{color:inherit}:root .chroma .nt{color:navy}:root .chroma .nv{color:#006767}:root .chroma .vc{color:#006767}:root .chroma .vg{color:#006767}:root .chroma .vi{color:#006767}:root .chroma .vm{color:inherit}:root .chroma .l{color:inherit}:root .chroma .ld{color:inherit}:root .chroma .s{color:#d14}:root .chroma .sa{color:#d14}:root .chroma .sb{color:#d14}:root .chroma .sc{color:#d14}:root .chroma .dl{color:#d14}:root .chroma .sd{color:#d14}:root .chroma .s2{color:#d14}:root .chroma .se{color:#d14}:root .chroma .sh{color:#d14}:root .chroma .si{color:#d14}:root .chroma .sx{color:#d14}:root .chroma .sr{color:#009926}:root .chroma .s1{color:#d14}:root .chroma .ss{color:#990073}:root .chroma .m{color:#027e83}:root .chroma .mb{color:#027e83}:root .chroma .mf{color:#027e83}:root .chroma .mh{color:#027e83}:root .chroma .mi{color:#027e83}:root .chroma .il{color:#027e83}:root .chroma .mo{color:#027e83}:root .chroma .o{color:#000;font-weight:bold}:root .chroma .ow{color:#000;font-weight:bold}:root .chroma .p{color:inherit}:root .chroma .c{color:#676765;font-style:italic}:root .chroma .ch{color:#676765;font-style:italic}:root .chroma .cm{color:#676765;font-style:italic}:root .chroma .c1{color:#676765;font-style:italic}:root .chroma .cs{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cp{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cpf{color:#676767;font-weight:bold;font-style:italic}:root .chroma .g{color:inherit}:root .chroma .gd{color:#000;background-color:#fdd}:root .chroma .ge{color:#000;font-style:italic}:root .chroma .gr{color:#a00}:root .chroma .gh{color:#676767}:root .chroma .gi{color:#000;background-color:#dfd}:root .chroma .go{color:#6f6f6f}:root .chroma .gp{color:#555}:root .chroma .gs{font-weight:bold}:root .chroma .gu{color:#5f5f5f}:root .chroma .gt{color:#a00}:root .chroma .gl{text-decoration:underline}:root .chroma .w{color:#bbb}:root{--code-background: rgb(248, 249, 250);--code-accent-color: rgb(117.275, 136.95, 156.625);--code-accent-color-lite: rgb(204.425, 211.65, 218.875);--code-font-color: rgb(70, 70, 70);--code-copy-background: rgb(248, 249, 250);--code-copy-font-color: #6b6b6b;--code-copy-border-color: #909090;--code-copy-success-color: rgb(0, 200, 83)}}:root[color-theme=dark]{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: rgb(40.375, 53.375, 61.875);--body-font-color: rgb(180.9769254279, 196.5292481663, 206.6980745721);--mark-color: rgb(255, 171, 0);--button-background: rgb(43.6295302013, 113.1640939597, 159.5204697987);--button-border-color: rgb(32, 83, 117);--link-color: rgb(110, 168, 212);--link-color-visited: rgb(186, 142, 240);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: rgb(16.15, 21.35, 24.75);--accent-color: rgb(28.2625, 37.3625, 43.3125);--accent-color-lite: rgb(34.31875, 45.36875, 52.59375);--control-icons: rgb(124.5724137931, 136.8, 149.0275862069);--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root[color-theme=dark] .dark-mode-dim .gdoc-markdown img{filter:brightness(0.75) grayscale(0.2)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint,:root[color-theme=dark] .gdoc-markdown .gdoc-props__tag,:root[color-theme=dark] .gdoc-markdown .admonitionblock{filter:saturate(2.5) brightness(0.85)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint a,:root[color-theme=dark] .gdoc-markdown .admonitionblock a{color:var(--hint-link-color)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint a:visited,:root[color-theme=dark] .gdoc-markdown .admonitionblock a:visited{color:var(--hint-link-color-visited)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint__title,:root[color-theme=dark] .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.15)}:root[color-theme=dark] .chroma{color:var(--code-font-color)}:root[color-theme=dark] .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root[color-theme=dark] .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root[color-theme=dark] .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root[color-theme=dark] .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root[color-theme=dark] .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root[color-theme=dark] .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root[color-theme=dark] .chroma .x{color:inherit}:root[color-theme=dark] .chroma .err{color:inherit}:root[color-theme=dark] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root[color-theme=dark] .chroma .hl{display:block;width:100%;background-color:#4f1605}:root[color-theme=dark] .chroma .lnt{padding:0 .8em}:root[color-theme=dark] .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em;color:#b3b3b3}:root[color-theme=dark] .chroma .k{color:#ff79c6}:root[color-theme=dark] .chroma .kc{color:#ff79c6}:root[color-theme=dark] .chroma .kd{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .kn{color:#ff79c6}:root[color-theme=dark] .chroma .kp{color:#ff79c6}:root[color-theme=dark] .chroma .kr{color:#ff79c6}:root[color-theme=dark] .chroma .kt{color:#8be9fd}:root[color-theme=dark] .chroma .n{color:inherit}:root[color-theme=dark] .chroma .na{color:#50fa7b}:root[color-theme=dark] .chroma .nb{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .bp{color:inherit}:root[color-theme=dark] .chroma .nc{color:#50fa7b}:root[color-theme=dark] .chroma .no{color:inherit}:root[color-theme=dark] .chroma .nd{color:inherit}:root[color-theme=dark] .chroma .ni{color:inherit}:root[color-theme=dark] .chroma .ne{color:inherit}:root[color-theme=dark] .chroma .nf{color:#50fa7b}:root[color-theme=dark] .chroma .fm{color:inherit}:root[color-theme=dark] .chroma .nl{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .nn{color:inherit}:root[color-theme=dark] .chroma .nx{color:inherit}:root[color-theme=dark] .chroma .py{color:inherit}:root[color-theme=dark] .chroma .nt{color:#ff79c6}:root[color-theme=dark] .chroma .nv{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vc{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vg{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vi{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vm{color:inherit}:root[color-theme=dark] .chroma .l{color:inherit}:root[color-theme=dark] .chroma .ld{color:inherit}:root[color-theme=dark] .chroma .s{color:#f1fa8c}:root[color-theme=dark] .chroma .sa{color:#f1fa8c}:root[color-theme=dark] .chroma .sb{color:#f1fa8c}:root[color-theme=dark] .chroma .sc{color:#f1fa8c}:root[color-theme=dark] .chroma .dl{color:#f1fa8c}:root[color-theme=dark] .chroma .sd{color:#f1fa8c}:root[color-theme=dark] .chroma .s2{color:#f1fa8c}:root[color-theme=dark] .chroma .se{color:#f1fa8c}:root[color-theme=dark] .chroma .sh{color:#f1fa8c}:root[color-theme=dark] .chroma .si{color:#f1fa8c}:root[color-theme=dark] .chroma .sx{color:#f1fa8c}:root[color-theme=dark] .chroma .sr{color:#f1fa8c}:root[color-theme=dark] .chroma .s1{color:#f1fa8c}:root[color-theme=dark] .chroma .ss{color:#f1fa8c}:root[color-theme=dark] .chroma .m{color:#bd93f9}:root[color-theme=dark] .chroma .mb{color:#bd93f9}:root[color-theme=dark] .chroma .mf{color:#bd93f9}:root[color-theme=dark] .chroma .mh{color:#bd93f9}:root[color-theme=dark] .chroma .mi{color:#bd93f9}:root[color-theme=dark] .chroma .il{color:#bd93f9}:root[color-theme=dark] .chroma .mo{color:#bd93f9}:root[color-theme=dark] .chroma .o{color:#ff79c6}:root[color-theme=dark] .chroma .ow{color:#ff79c6}:root[color-theme=dark] .chroma .p{color:inherit}:root[color-theme=dark] .chroma .c{color:#96a6d8}:root[color-theme=dark] .chroma .ch{color:#96a6d8}:root[color-theme=dark] .chroma .cm{color:#96a6d8}:root[color-theme=dark] .chroma .c1{color:#96a6d8}:root[color-theme=dark] .chroma .cs{color:#96a6d8}:root[color-theme=dark] .chroma .cp{color:#ff79c6}:root[color-theme=dark] .chroma .cpf{color:#ff79c6}:root[color-theme=dark] .chroma .g{color:inherit}:root[color-theme=dark] .chroma .gd{color:#d98f90}:root[color-theme=dark] .chroma .ge{text-decoration:underline}:root[color-theme=dark] .chroma .gr{color:inherit}:root[color-theme=dark] .chroma .gh{font-weight:bold;color:inherit}:root[color-theme=dark] .chroma .gi{font-weight:bold}:root[color-theme=dark] .chroma .go{color:#8f9ea8}:root[color-theme=dark] .chroma .gp{color:inherit}:root[color-theme=dark] .chroma .gs{color:inherit}:root[color-theme=dark] .chroma .gu{font-weight:bold}:root[color-theme=dark] .chroma .gt{color:inherit}:root[color-theme=dark] .chroma .gl{text-decoration:underline}:root[color-theme=dark] .chroma .w{color:inherit}:root[color-theme=dark]{--code-background: rgb(34.31875, 45.36875, 52.59375);--code-accent-color: rgb(24.023125, 31.758125, 36.815625);--code-accent-color-lite: rgb(29.1709375, 38.5634375, 44.7046875);--code-font-color: rgb(185, 185, 185);--code-copy-background: rgb(34.31875, 45.36875, 52.59375);--code-copy-font-color: rgb(157.25, 157.25, 157.25);--code-copy-border-color: #949494;--code-copy-success-color: rgba(0, 200, 83, 0.45)}:root[code-theme=dark] .chroma{color:var(--code-font-color)}:root[code-theme=dark] .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root[code-theme=dark] .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root[code-theme=dark] .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root[code-theme=dark] .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root[code-theme=dark] .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root[code-theme=dark] .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root[code-theme=dark] .chroma .x{color:inherit}:root[code-theme=dark] .chroma .err{color:inherit}:root[code-theme=dark] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root[code-theme=dark] .chroma .hl{display:block;width:100%;background-color:#4f1605}:root[code-theme=dark] .chroma .lnt{padding:0 .8em}:root[code-theme=dark] .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em;color:#b3b3b3}:root[code-theme=dark] .chroma .k{color:#ff79c6}:root[code-theme=dark] .chroma .kc{color:#ff79c6}:root[code-theme=dark] .chroma .kd{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .kn{color:#ff79c6}:root[code-theme=dark] .chroma .kp{color:#ff79c6}:root[code-theme=dark] .chroma .kr{color:#ff79c6}:root[code-theme=dark] .chroma .kt{color:#8be9fd}:root[code-theme=dark] .chroma .n{color:inherit}:root[code-theme=dark] .chroma .na{color:#50fa7b}:root[code-theme=dark] .chroma .nb{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .bp{color:inherit}:root[code-theme=dark] .chroma .nc{color:#50fa7b}:root[code-theme=dark] .chroma .no{color:inherit}:root[code-theme=dark] .chroma .nd{color:inherit}:root[code-theme=dark] .chroma .ni{color:inherit}:root[code-theme=dark] .chroma .ne{color:inherit}:root[code-theme=dark] .chroma .nf{color:#50fa7b}:root[code-theme=dark] .chroma .fm{color:inherit}:root[code-theme=dark] .chroma .nl{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .nn{color:inherit}:root[code-theme=dark] .chroma .nx{color:inherit}:root[code-theme=dark] .chroma .py{color:inherit}:root[code-theme=dark] .chroma .nt{color:#ff79c6}:root[code-theme=dark] .chroma .nv{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vc{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vg{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vi{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vm{color:inherit}:root[code-theme=dark] .chroma .l{color:inherit}:root[code-theme=dark] .chroma .ld{color:inherit}:root[code-theme=dark] .chroma .s{color:#f1fa8c}:root[code-theme=dark] .chroma .sa{color:#f1fa8c}:root[code-theme=dark] .chroma .sb{color:#f1fa8c}:root[code-theme=dark] .chroma .sc{color:#f1fa8c}:root[code-theme=dark] .chroma .dl{color:#f1fa8c}:root[code-theme=dark] .chroma .sd{color:#f1fa8c}:root[code-theme=dark] .chroma .s2{color:#f1fa8c}:root[code-theme=dark] .chroma .se{color:#f1fa8c}:root[code-theme=dark] .chroma .sh{color:#f1fa8c}:root[code-theme=dark] .chroma .si{color:#f1fa8c}:root[code-theme=dark] .chroma .sx{color:#f1fa8c}:root[code-theme=dark] .chroma .sr{color:#f1fa8c}:root[code-theme=dark] .chroma .s1{color:#f1fa8c}:root[code-theme=dark] .chroma .ss{color:#f1fa8c}:root[code-theme=dark] .chroma .m{color:#bd93f9}:root[code-theme=dark] .chroma .mb{color:#bd93f9}:root[code-theme=dark] .chroma .mf{color:#bd93f9}:root[code-theme=dark] .chroma .mh{color:#bd93f9}:root[code-theme=dark] .chroma .mi{color:#bd93f9}:root[code-theme=dark] .chroma .il{color:#bd93f9}:root[code-theme=dark] .chroma .mo{color:#bd93f9}:root[code-theme=dark] .chroma .o{color:#ff79c6}:root[code-theme=dark] .chroma .ow{color:#ff79c6}:root[code-theme=dark] .chroma .p{color:inherit}:root[code-theme=dark] .chroma .c{color:#96a6d8}:root[code-theme=dark] .chroma .ch{color:#96a6d8}:root[code-theme=dark] .chroma .cm{color:#96a6d8}:root[code-theme=dark] .chroma .c1{color:#96a6d8}:root[code-theme=dark] .chroma .cs{color:#96a6d8}:root[code-theme=dark] .chroma .cp{color:#ff79c6}:root[code-theme=dark] .chroma .cpf{color:#ff79c6}:root[code-theme=dark] .chroma .g{color:inherit}:root[code-theme=dark] .chroma .gd{color:#d98f90}:root[code-theme=dark] .chroma .ge{text-decoration:underline}:root[code-theme=dark] .chroma .gr{color:inherit}:root[code-theme=dark] .chroma .gh{font-weight:bold;color:inherit}:root[code-theme=dark] .chroma .gi{font-weight:bold}:root[code-theme=dark] .chroma .go{color:#8f9ea8}:root[code-theme=dark] .chroma .gp{color:inherit}:root[code-theme=dark] .chroma .gs{color:inherit}:root[code-theme=dark] .chroma .gu{font-weight:bold}:root[code-theme=dark] .chroma .gt{color:inherit}:root[code-theme=dark] .chroma .gl{text-decoration:underline}:root[code-theme=dark] .chroma .w{color:inherit}:root[code-theme=dark]{--code-background: rgb(34.31875, 45.36875, 52.59375);--code-accent-color: rgb(24.023125, 31.758125, 36.815625);--code-accent-color-lite: rgb(29.1709375, 38.5634375, 44.7046875);--code-font-color: rgb(185, 185, 185);--code-copy-background: rgb(34.31875, 45.36875, 52.59375);--code-copy-font-color: rgb(157.25, 157.25, 157.25);--code-copy-border-color: #949494;--code-copy-success-color: rgba(0, 200, 83, 0.45)}@media(prefers-color-scheme: dark){:root{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: rgb(40.375, 53.375, 61.875);--body-font-color: rgb(180.9769254279, 196.5292481663, 206.6980745721);--mark-color: rgb(255, 171, 0);--button-background: rgb(43.6295302013, 113.1640939597, 159.5204697987);--button-border-color: rgb(32, 83, 117);--link-color: rgb(110, 168, 212);--link-color-visited: rgb(186, 142, 240);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: rgb(16.15, 21.35, 24.75);--accent-color: rgb(28.2625, 37.3625, 43.3125);--accent-color-lite: rgb(34.31875, 45.36875, 52.59375);--control-icons: rgb(124.5724137931, 136.8, 149.0275862069);--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root .dark-mode-dim .gdoc-markdown img{filter:brightness(0.75) grayscale(0.2)}:root .gdoc-markdown .gdoc-hint,:root .gdoc-markdown .gdoc-props__tag,:root .gdoc-markdown .admonitionblock{filter:saturate(2.5) brightness(0.85)}:root .gdoc-markdown .gdoc-hint a,:root .gdoc-markdown .admonitionblock a{color:var(--hint-link-color)}:root .gdoc-markdown .gdoc-hint a:visited,:root .gdoc-markdown .admonitionblock a:visited{color:var(--hint-link-color-visited)}:root .gdoc-markdown .gdoc-hint__title,:root .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.15)}:root .chroma{color:var(--code-font-color)}:root .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root .chroma .x{color:inherit}:root .chroma .err{color:inherit}:root .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root .chroma .hl{display:block;width:100%;background-color:#4f1605}:root .chroma .lnt{padding:0 .8em}:root .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em;color:#b3b3b3}:root .chroma .k{color:#ff79c6}:root .chroma .kc{color:#ff79c6}:root .chroma .kd{color:#8be9fd;font-style:italic}:root .chroma .kn{color:#ff79c6}:root .chroma .kp{color:#ff79c6}:root .chroma .kr{color:#ff79c6}:root .chroma .kt{color:#8be9fd}:root .chroma .n{color:inherit}:root .chroma .na{color:#50fa7b}:root .chroma .nb{color:#8be9fd;font-style:italic}:root .chroma .bp{color:inherit}:root .chroma .nc{color:#50fa7b}:root .chroma .no{color:inherit}:root .chroma .nd{color:inherit}:root .chroma .ni{color:inherit}:root .chroma .ne{color:inherit}:root .chroma .nf{color:#50fa7b}:root .chroma .fm{color:inherit}:root .chroma .nl{color:#8be9fd;font-style:italic}:root .chroma .nn{color:inherit}:root .chroma .nx{color:inherit}:root .chroma .py{color:inherit}:root .chroma .nt{color:#ff79c6}:root .chroma .nv{color:#8be9fd;font-style:italic}:root .chroma .vc{color:#8be9fd;font-style:italic}:root .chroma .vg{color:#8be9fd;font-style:italic}:root .chroma .vi{color:#8be9fd;font-style:italic}:root .chroma .vm{color:inherit}:root .chroma .l{color:inherit}:root .chroma .ld{color:inherit}:root .chroma .s{color:#f1fa8c}:root .chroma .sa{color:#f1fa8c}:root .chroma .sb{color:#f1fa8c}:root .chroma .sc{color:#f1fa8c}:root .chroma .dl{color:#f1fa8c}:root .chroma .sd{color:#f1fa8c}:root .chroma .s2{color:#f1fa8c}:root .chroma .se{color:#f1fa8c}:root .chroma .sh{color:#f1fa8c}:root .chroma .si{color:#f1fa8c}:root .chroma .sx{color:#f1fa8c}:root .chroma .sr{color:#f1fa8c}:root .chroma .s1{color:#f1fa8c}:root .chroma .ss{color:#f1fa8c}:root .chroma .m{color:#bd93f9}:root .chroma .mb{color:#bd93f9}:root .chroma .mf{color:#bd93f9}:root .chroma .mh{color:#bd93f9}:root .chroma .mi{color:#bd93f9}:root .chroma .il{color:#bd93f9}:root .chroma .mo{color:#bd93f9}:root .chroma .o{color:#ff79c6}:root .chroma .ow{color:#ff79c6}:root .chroma .p{color:inherit}:root .chroma .c{color:#96a6d8}:root .chroma .ch{color:#96a6d8}:root .chroma .cm{color:#96a6d8}:root .chroma .c1{color:#96a6d8}:root .chroma .cs{color:#96a6d8}:root .chroma .cp{color:#ff79c6}:root .chroma .cpf{color:#ff79c6}:root .chroma .g{color:inherit}:root .chroma .gd{color:#d98f90}:root .chroma .ge{text-decoration:underline}:root .chroma .gr{color:inherit}:root .chroma .gh{font-weight:bold;color:inherit}:root .chroma .gi{font-weight:bold}:root .chroma .go{color:#8f9ea8}:root .chroma .gp{color:inherit}:root .chroma .gs{color:inherit}:root .chroma .gu{font-weight:bold}:root .chroma .gt{color:inherit}:root .chroma .gl{text-decoration:underline}:root .chroma .w{color:inherit}:root{--code-background: rgb(34.31875, 45.36875, 52.59375);--code-accent-color: rgb(24.023125, 31.758125, 36.815625);--code-accent-color-lite: rgb(29.1709375, 38.5634375, 44.7046875);--code-font-color: rgb(185, 185, 185);--code-copy-background: rgb(34.31875, 45.36875, 52.59375);--code-copy-font-color: rgb(157.25, 157.25, 157.25);--code-copy-border-color: #949494;--code-copy-success-color: rgba(0, 200, 83, 0.45)}}html{font-size:16px;letter-spacing:.33px;scroll-behavior:smooth}html.color-toggle-hidden #gdoc-color-theme{display:none}html.color-toggle-light #gdoc-color-theme .gdoc_brightness_light{display:inline-block}html.color-toggle-light #gdoc-color-theme .gdoc_brightness_auto,html.color-toggle-light #gdoc-color-theme .gdoc_brightness_dark{display:none}html.color-toggle-dark #gdoc-color-theme .gdoc_brightness_dark{display:inline-block}html.color-toggle-dark #gdoc-color-theme .gdoc_brightness_auto,html.color-toggle-dark #gdoc-color-theme .gdoc_brightness_light{display:none}html.color-toggle-auto #gdoc-color-theme .gdoc_brightness_light{display:none}html.color-toggle-auto #gdoc-color-theme .gdoc_brightness_dark{display:none}html.color-toggle-auto #gdoc-color-theme .gdoc_brightness_auto{display:inline-block}html,body{min-width:20rem;overflow-x:hidden}body{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box}body *{box-sizing:inherit}h1,h2,h3,h4,h5,h6{font-weight:normal;display:flex;align-items:center}h4,h5,h6{font-size:1rem !important}a{text-decoration:none;color:var(--link-color)}a:hover{text-decoration:underline}a:visited{color:var(--link-color-visited)}i.gdoc-icon{font-family:"GeekdocIcons";font-style:normal}img{vertical-align:middle}#gdoc-color-theme{cursor:pointer}.fake-link:hover{background-image:linear-gradient(var(--link-color), var(--link-color));background-position:0 100%;background-size:100% 1px;background-repeat:no-repeat;text-decoration:none}.wrapper{display:flex;flex-direction:column;min-height:100vh;color:var(--body-font-color);background:var(--body-background);font-weight:normal}.container{width:100%;max-width:82rem;margin:0 auto;padding:1.25rem}svg.gdoc-icon{display:inline-block;width:1.25rem;height:1.25rem;vertical-align:middle;stroke-width:0;stroke:currentColor;fill:currentColor;position:relative}.gdoc-header{background:var(--header-background);color:var(--header-font-color);border-bottom:.3em solid var(--footer-background)}.gdoc-header__link,.gdoc-header__link:visited{color:var(--header-font-color)}.gdoc-header__link:hover{text-decoration:none}.gdoc-header svg.gdoc-icon{width:2rem;height:2rem}.gdoc-brand{font-size:2rem;line-height:2rem}.gdoc-brand__img{margin-right:1rem;width:2rem;height:2rem}.gdoc-menu-header__items{display:flex}.gdoc-menu-header__items>span{margin-left:.5rem}.gdoc-menu-header__control,.gdoc-menu-header__home{display:none}.gdoc-menu-header__control svg.gdoc-icon,.gdoc-menu-header__home svg.gdoc-icon{cursor:pointer}.gdoc-nav{flex:0 0 18rem}.gdoc-nav nav{width:18rem;padding:1rem 2rem 1rem 0}.gdoc-nav nav>ul>li>*{font-weight:normal}.gdoc-nav nav section{margin-top:2rem}.gdoc-nav__control{display:none;margin:0;padding:0}.gdoc-nav__control svg.gdoc-icon{cursor:pointer}.gdoc-nav__control svg.gdoc-icon.gdoc_menu{display:inline-block}.gdoc-nav__control svg.gdoc-icon.gdoc_arrow_back{display:none}.gdoc-nav__list{padding-left:1rem;margin:0;padding:0;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.gdoc-nav__list ul{padding-left:1rem}.gdoc-nav__list li{margin:.75rem 0}.gdoc-nav__list svg.gdoc-icon{margin-right:.25rem}.gdoc-nav__toggle{display:none}.gdoc-nav__toggle~label{cursor:pointer}.gdoc-nav__toggle~label svg.gdoc-icon.toggle{width:1rem;height:1rem}.gdoc-nav__toggle:not(:checked)~ul,.gdoc-nav__toggle:not(:checked)~label svg.gdoc-icon.gdoc_keyboard_arrow_down{display:none}.gdoc-nav__toggle:not(:checked)~label svg.gdoc-icon.gdoc_keyboard_arrow_left{display:block}.gdoc-nav__toggle:checked~ul,.gdoc-nav__toggle:checked~label svg.gdoc-icon.gdoc_keyboard_arrow_down{display:block}.gdoc-nav__toggle:checked~label svg.gdoc-icon.gdoc_keyboard_arrow_left{display:none}.gdoc-nav--main>ul>li>span,.gdoc-nav--main>ul>li>span>a,.gdoc-nav--main>ul>li>label,.gdoc-nav--main>ul>li>label>a{font-weight:bold}.gdoc-nav__entry,.gdoc-language__entry{flex:1;color:var(--body-font-color)}.gdoc-nav__entry:hover,.gdoc-nav__entry.is-active,.gdoc-language__entry:hover,.gdoc-language__entry.is-active{text-decoration:underline;text-decoration-style:dashed !important}.gdoc-nav__entry:visited,.gdoc-language__entry:visited{color:var(--body-font-color)}.gdoc-search__list,.gdoc-language__list{background:var(--body-background);border-radius:.15rem;box-shadow:0 1px 3px 0 var(--accent-color-dark),0 1px 2px 0 var(--accent-color);position:absolute;margin:0;padding:.5rem .25rem !important;list-style:none;top:calc(100% + 0.5rem);z-index:2}.gdoc-page{min-width:18rem;flex-grow:1;padding:1rem 0}.gdoc-page h1,.gdoc-page h2,.gdoc-page h3,.gdoc-page h4,.gdoc-page h5,.gdoc-page h6{font-weight:600}.gdoc-page__header,.gdoc-page__footer{margin-bottom:1.5rem}.gdoc-page__header svg.gdoc-icon,.gdoc-page__footer svg.gdoc-icon{color:var(--control-icons)}.gdoc-page__header a,.gdoc-page__header a:visited,.gdoc-page__footer a,.gdoc-page__footer a:visited{color:var(--link-color)}.gdoc-page__header{background:var(--accent-color-lite);padding:.5rem 1rem;border-radius:.15rem}.gdoc-page__nav:hover{background-image:linear-gradient(var(--link-color), var(--link-color));background-position:0 100%;background-size:100% 1px;background-repeat:no-repeat}.gdoc-page__anchorwrap{gap:.5em}.gdoc-page__anchorwrap:hover .gdoc-page__anchor svg.gdoc-icon{color:var(--control-icons)}.gdoc-page__anchor svg.gdoc-icon{width:1.85em;height:1.85em;color:rgba(0,0,0,0)}.gdoc-page__anchor:focus svg.gdoc-icon{color:var(--control-icons)}.gdoc-page__footer{margin-top:2rem}.gdoc-page__footer a:hover{text-decoration:none}.gdoc-post{word-wrap:break-word;border-top:1px dashed #868e96;padding:2rem 0}.gdoc-post:first-of-type{padding-top:0}.gdoc-post__header h1{margin-top:0}.gdoc-post__header a,.gdoc-post__header a:visited{color:var(--body-font-color);text-decoration:none}.gdoc-post__header a:hover{background:none;text-decoration:underline;color:var(--body-font-color)}.gdoc-post:first-child{border-top:0}.gdoc-post:first-child h1{margin-top:0}.gdoc-post__readmore{margin:2rem 0}.gdoc-post__readmore a,.gdoc-post__readmore a:hover,.gdoc-post__readmore a:visited{color:var(--link-color);text-decoration:none !important}.gdoc-post__meta span svg.gdoc-icon{margin-left:-5px}.gdoc-post__meta>span{margin:.25rem 0}.gdoc-post__meta>span:not(:last-child){margin-right:.5rem}.gdoc-post__meta svg.gdoc-icon{font-size:1.25rem}.gdoc-post__meta .gdoc-button{margin:0 .125rem 0 0}.gdoc-post__meta--head{margin-bottom:2rem}.gdoc-post__codecontainer{position:relative}.gdoc-post__codecontainer:hover>.gdoc-post__codecopy{visibility:visible}.gdoc-post__codecopy{visibility:hidden;position:absolute;top:.5rem;right:.5rem;border:1.5px solid var(--code-copy-border-color);border-radius:.15rem;background:var(--code-copy-background);width:2rem;height:2rem}.gdoc-post__codecopy svg.gdoc-icon{top:0;width:1.25rem;height:1.25rem;color:var(--code-copy-font-color)}.gdoc-post__codecopy:hover{cursor:pointer}.gdoc-post__codecopy--success{border-color:var(--code-copy-success-color)}.gdoc-post__codecopy--success svg.gdoc-icon{color:var(--code-copy-success-color)}.gdoc-post__codecopy--out{transition:visibility 2s ease-out}.gdoc-footer{background:var(--footer-background);color:var(--footer-font-color)}.gdoc-footer .fake-link{text-decoration:none}.gdoc-footer .fake-link:hover{background-image:linear-gradient(var(--footer-link-color), var(--footer-link-color))}.gdoc-footer__item{line-height:2rem}.gdoc-footer__item--row{margin-right:1rem}.gdoc-footer__link{text-decoration:underline;color:var(--footer-link-color)}.gdoc-footer__link:visited{color:var(--footer-link-color-visited)}.gdoc-search{position:relative}.gdoc-search svg.gdoc-icon{position:absolute;left:.5rem;color:var(--control-icons);width:1.25rem;height:1.25rem}.gdoc-search::after{display:block;content:"";clear:both}.gdoc-search__input{width:100%;padding:.5rem;padding-left:2rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;border:1px solid rgba(0,0,0,0);border-radius:.15rem;background:var(--accent-color-lite);color:var(--body-font-color)}.gdoc-search__input:focus{outline:none !important;border:1px solid var(--accent-color)}.gdoc-search__list{visibility:hidden;left:0;width:100%}.gdoc-search__list ul{list-style:none;padding-left:0}.gdoc-search__list>li>span{font-weight:bold}.gdoc-search__list>li+li{margin-top:.25rem}.gdoc-search__list svg.gdoc-icon{margin-right:.25rem}.gdoc-search__section{display:flex;flex-direction:column;padding:.25rem !important}.gdoc-search__entry{display:flex;flex-direction:column;color:var(--body-font-color);padding:.25rem !important;border-radius:.15rem}.gdoc-search__entry:hover,.gdoc-search__entry.is-active{background:var(--accent-color-lite);text-decoration:none}.gdoc-search__entry:hover .gdoc-search__entry--title,.gdoc-search__entry.is-active .gdoc-search__entry--title{text-decoration-style:dashed !important;text-decoration:underline}.gdoc-search__entry:visited{color:var(--body-font-color)}.gdoc-search__entry--description{font-size:.875rem;font-style:italic}.gdoc-search:focus-within .gdoc-search__list.has-hits,.gdoc-search__list.has-hits:hover{visibility:visible}.gdoc-language__selector{position:relative;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;margin:0;padding:0;width:100%}.gdoc-language__selector:focus .gdoc-language__list,.gdoc-language__selector:focus-within .gdoc-language__list,.gdoc-language__selector:active .gdoc-language__list{display:block}.gdoc-language__list{display:none;right:0;width:auto;white-space:nowrap}.gdoc-paging{padding:1rem 0}.gdoc-paging__item{flex:1 1 0}.gdoc-paging__item a:visited{color:var(--link-color)}.gdoc-paging__item a:hover,.gdoc-paging__item a:visited:hover{background:var(--link-color);color:#f8f9fa}.gdoc-paging__item--next{text-align:right}.gdoc-paging__item--prev{text-align:left}.gdoc-error{padding:6rem 1rem;margin:0 auto;max-width:45em}.gdoc-error svg.gdoc-icon{width:8rem;height:8rem;color:var(--body-font-color)}.gdoc-error__link,.gdoc-error__link:visited{text-decoration:underline;color:var(--link-color)}.gdoc-error__message{padding-left:4rem}.gdoc-error__line{padding:.5rem 0}.gdoc-error__title{font-size:4rem}.gdoc-error__code{font-weight:bolder}.gdoc-toc{margin:1rem 0}.gdoc-toc li{margin:.25rem 0}.gdoc-toc__level--1 ul ul,.gdoc-toc__level--2 ul ul ul,.gdoc-toc__level--3 ul ul ul ul,.gdoc-toc__level--4 ul ul ul ul ul,.gdoc-toc__level--5 ul ul ul ul ul ul,.gdoc-toc__level--6 ul ul ul ul ul ul ul{display:none}.gdoc-toc a,.gdoc-toc a:visited{text-decoration:none !important;color:var(--link-color)}.gdoc-nav nav,.gdoc-page,.markdown{transition:.2s ease-in-out;transition-property:transform,margin-left,opacity;will-change:transform,margin-left}.breadcrumb{display:inline;padding:0;margin:0}.breadcrumb li{display:inline}.gdoc-markdown{line-height:1.6rem}.gdoc-markdown h1,.gdoc-markdown h2,.gdoc-markdown h3,.gdoc-markdown h4,.gdoc-markdown h5,.gdoc-markdown h6{font-weight:600}.gdoc-markdown h1>code,.gdoc-markdown h2>code,.gdoc-markdown h3>code,.gdoc-markdown h4>code,.gdoc-markdown h5>code,.gdoc-markdown h6>code{border-top:3px solid var(--accent-color);font-size:.75rem !important}.gdoc-markdown h4>code,.gdoc-markdown h5>code,.gdoc-markdown h6>code{font-size:.875rem !important}.gdoc-markdown b,.gdoc-markdown optgroup,.gdoc-markdown strong{font-weight:bolder}.gdoc-markdown a,.gdoc-markdown__link{text-decoration:underline;border-bottom:1px solid rgba(0,0,0,0);line-height:normal}.gdoc-markdown a:hover,.gdoc-markdown__link:hover{text-decoration:underline}.gdoc-markdown__link--raw{text-decoration:none !important;color:#343a40 !important}.gdoc-markdown__link--raw:hover{text-decoration:none !important}.gdoc-markdown__link--raw:visited{color:#343a40 !important}.gdoc-markdown__link--code{text-decoration:none}.gdoc-markdown__link--code code{color:inherit !important}.gdoc-markdown__link--code:hover{background:none;color:var(--link-color) !important;text-decoration:underline}.gdoc-markdown__link--code:visited,.gdoc-markdown__link--code:visited:hover{color:var(--link-color-visited) !important}.gdoc-markdown__figure{padding:.25rem;margin:1rem 0;background-color:var(--accent-color);display:table;border-top-left-radius:.15rem;border-top-right-radius:.15rem}.gdoc-markdown__figure--round,.gdoc-markdown__figure--round img{border-radius:50% !important}.gdoc-markdown__figure figcaption{display:table-caption;caption-side:bottom;background-color:var(--accent-color);padding:0 .25rem .25rem;text-align:center;border-bottom-left-radius:.15rem;border-bottom-right-radius:.15rem}.gdoc-markdown__figure img{max-width:100%;height:auto}.gdoc-markdown img{max-width:100%;border-radius:.15rem}.gdoc-markdown blockquote{margin:1rem 0;padding:.5rem 1rem .5rem .75rem;border-left:3px solid var(--accent-color);border-radius:.15rem}.gdoc-markdown table:not(.lntable):not(.highlight){display:table;border-spacing:0;border-collapse:collapse;margin-top:1rem;margin-bottom:1rem;width:100%;text-align:left}.gdoc-markdown table:not(.lntable):not(.highlight) thead{border-bottom:3px solid var(--accent-color)}.gdoc-markdown table:not(.lntable):not(.highlight) tr th,.gdoc-markdown table:not(.lntable):not(.highlight) tr td{padding:.5rem 1rem}.gdoc-markdown table:not(.lntable):not(.highlight) tr{border-bottom:1.5px solid var(--accent-color)}.gdoc-markdown table:not(.lntable):not(.highlight) tr:nth-child(2n){background:var(--accent-color-lite)}.gdoc-markdown hr{height:1.5px;border:none;background:var(--accent-color)}.gdoc-markdown ul,.gdoc-markdown ol{padding-left:2rem}.gdoc-markdown dl dt{font-weight:bolder;margin-top:1rem}.gdoc-markdown dl dd{margin-left:2rem}.gdoc-markdown code{padding:.25rem .5rem}.gdoc-markdown pre,.gdoc-markdown code{background-color:var(--code-background);border-radius:.15rem;color:var(--code-font-color);font-size:.875rem;line-height:1rem}.gdoc-markdown pre code{display:block;padding:1rem;width:100%}.gdoc-markdown mark{background-color:var(--mark-color)}.gdoc-markdown__align{text-align:left}.gdoc-markdown__align--left h1,.gdoc-markdown__align--left h2,.gdoc-markdown__align--left h3,.gdoc-markdown__align--left h4,.gdoc-markdown__align--left h5,.gdoc-markdown__align--left h6{justify-content:flex-start}.gdoc-markdown__align--center{text-align:center}.gdoc-markdown__align--center h1,.gdoc-markdown__align--center h2,.gdoc-markdown__align--center h3,.gdoc-markdown__align--center h4,.gdoc-markdown__align--center h5,.gdoc-markdown__align--center h6{justify-content:center}.gdoc-markdown__align--right{text-align:right}.gdoc-markdown__align--right h1,.gdoc-markdown__align--right h2,.gdoc-markdown__align--right h3,.gdoc-markdown__align--right h4,.gdoc-markdown__align--right h5,.gdoc-markdown__align--right h6{justify-content:flex-end}.admonitionblock.info{border-left-color:#0091ea;background-color:rgb(243.27,249.2558974359,252.93);color:#343a40}.admonitionblock.note{border-left-color:#0091ea;background-color:rgb(243.27,249.2558974359,252.93);color:#343a40}.admonitionblock.ok{border-left-color:#00c853;background-color:hsl(144.9,70%,96.9607843137%);color:#343a40}.admonitionblock.tip{border-left-color:#00c853;background-color:hsl(144.9,70%,96.9607843137%);color:#343a40}.admonitionblock.important{border-left-color:#ffab00;background-color:hsl(40.2352941176,70%,97.5%);color:#343a40}.admonitionblock.caution{border-left-color:#7300d3;background-color:rgb(247.9961729858,242.2925,252.7575);color:#343a40}.admonitionblock.danger{border-left-color:#d50000;background-color:hsl(0,70%,97.0882352941%);color:#343a40}.admonitionblock.warning{border-left-color:#d50000;background-color:hsl(0,70%,97.0882352941%);color:#343a40}.admonitionblock{margin:1rem 0;padding:0;border-left:3px solid var(--accent-color);border-radius:.15rem}.admonitionblock table{margin:0 !important;padding:0 !important}.admonitionblock table tr{border:0 !important}.admonitionblock table td{display:block;padding:.25rem 1rem !important}.admonitionblock table td:first-child{background-color:rgba(134,142,150,.05);font-weight:bold}.admonitionblock table td:first-child.icon .title{display:flex;align-items:center}.admonitionblock table td:first-child.icon i.fa::after{content:attr(title);font-style:normal;padding-left:1.5rem}.admonitionblock table td:first-child.icon i.fa{color:#000;background-size:auto 90%;background-repeat:no-repeat;filter:invert(30%);margin-left:-5px}.admonitionblock table td:first-child.icon i.fa.icon-info{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.admonitionblock table td:first-child.icon i.fa.icon-note{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.admonitionblock table td:first-child.icon i.fa.icon-ok{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.admonitionblock table td:first-child.icon i.fa.icon-tip{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.admonitionblock table td:first-child.icon i.fa.icon-important{background-image:url(img/geekdoc-stack.svg#gdoc_error_outline)}.admonitionblock table td:first-child.icon i.fa.icon-caution{background-image:url(img/geekdoc-stack.svg#gdoc_dangerous)}.admonitionblock table td:first-child.icon i.fa.icon-danger{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.admonitionblock table td:first-child.icon i.fa.icon-warning{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.gdoc-expand{margin:1rem 0;border:1px solid var(--accent-color);border-radius:.15rem;overflow:hidden}.gdoc-expand__head{background:var(--accent-color-lite);padding:.5rem 1rem;cursor:pointer}.gdoc-expand__content{display:none;padding:0 1rem}.gdoc-expand__control:checked+.gdoc-expand__content{display:block}.gdoc-expand .gdoc-page__anchor{display:none}.gdoc-tabs{margin:1rem 0;border:1px solid var(--accent-color);border-radius:.15rem;overflow:hidden;display:flex;flex-wrap:wrap}.gdoc-tabs__label{display:inline-block;padding:.5rem 1rem;border-bottom:1px rgba(0,0,0,0);cursor:pointer}.gdoc-tabs__content{order:999;width:100%;border-top:1px solid var(--accent-color-lite);padding:0 1rem;display:none}.gdoc-tabs__control:checked+.gdoc-tabs__label{border-bottom:1.5px solid var(--link-color)}.gdoc-tabs__control:checked+.gdoc-tabs__label+.gdoc-tabs__content{display:block}.gdoc-tabs .gdoc-page__anchor{display:none}.gdoc-columns{margin:1rem 0}.gdoc-columns--regular>:first-child{flex:1}.gdoc-columns--small>:first-child{flex:.35;min-width:7rem}.gdoc-columns--large>:first-child{flex:1.65;min-width:33rem}.gdoc-columns__content{flex:1 1;min-width:13.2rem;padding:0}.gdoc-columns .gdoc-page__anchor{display:none}.gdoc-button{margin:1rem 0;display:inline-block;background:var(--accent-color-lite);border:1px solid var(--accent-color);border-radius:.15rem;cursor:pointer}.gdoc-button__link{display:inline-block;color:inherit !important;text-decoration:none !important}.gdoc-button:hover{background:var(--button-background);border-color:var(--button-border-color);color:#f8f9fa}.gdoc-button--regular{font-size:16px}.gdoc-button--regular .gdoc-button__link{padding:.25rem .5rem}.gdoc-button--large{font-size:1.25rem}.gdoc-button--large .gdoc-button__link{padding:.5rem 1rem}.gdoc-hint.info{border-left-color:#0091ea;background-color:rgb(243.27,249.2558974359,252.93);color:#343a40;padding:0}.gdoc-hint.info code,.gdoc-hint.info pre{background-color:rgb(220.5,229.0512820513,234.3);color:#464646}.gdoc-hint.note{border-left-color:#0091ea;background-color:rgb(243.27,249.2558974359,252.93);color:#343a40;padding:0}.gdoc-hint.note code,.gdoc-hint.note pre{background-color:rgb(220.5,229.0512820513,234.3);color:#464646}.gdoc-hint.ok{border-left-color:#00c853;background-color:hsl(144.9,70%,96.9607843137%);color:#343a40;padding:0}.gdoc-hint.ok code,.gdoc-hint.ok pre{background-color:rgb(216.25,231.75,222.6825);color:#464646}.gdoc-hint.tip{border-left-color:#00c853;background-color:hsl(144.9,70%,96.9607843137%);color:#343a40;padding:0}.gdoc-hint.tip code,.gdoc-hint.tip pre{background-color:rgb(216.25,231.75,222.6825);color:#464646}.gdoc-hint.important{border-left-color:#ffab00;background-color:hsl(40.2352941176,70%,97.5%);color:#343a40;padding:0}.gdoc-hint.important code,.gdoc-hint.important pre{background-color:hsl(40.2352941176,25%,90%);color:#464646}.gdoc-hint.caution{border-left-color:#7300d3;background-color:rgb(247.9961729858,242.2925,252.7575);color:#343a40;padding:0}.gdoc-hint.caution code,.gdoc-hint.caution pre{background-color:rgb(225.7731042654,217.625,232.575);color:#464646}.gdoc-hint.danger{border-left-color:#d50000;background-color:hsl(0,70%,97.0882352941%);color:#343a40;padding:0}.gdoc-hint.danger code,.gdoc-hint.danger pre{background-color:hsl(0,25%,88.3529411765%);color:#464646}.gdoc-hint.warning{border-left-color:#d50000;background-color:hsl(0,70%,97.0882352941%);color:#343a40;padding:0}.gdoc-hint.warning code,.gdoc-hint.warning pre{background-color:hsl(0,25%,88.3529411765%);color:#464646}.gdoc-hint__title{padding:.25rem 1rem;background-color:rgba(134,142,150,.05);font-weight:bold;color:rgba(52,58,64,.85)}.gdoc-hint__title i.fa::after{content:attr(title);font-style:normal;padding-left:1.5rem}.gdoc-hint__title i.fa{color:#000;background-size:auto 90%;background-repeat:no-repeat;filter:invert(30%);margin-left:-5px}.gdoc-hint__title i.fa.info{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.gdoc-hint__title i.fa.note{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.gdoc-hint__title i.fa.ok{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.gdoc-hint__title i.fa.tip{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.gdoc-hint__title i.fa.important{background-image:url(img/geekdoc-stack.svg#gdoc_error_outline)}.gdoc-hint__title i.fa.caution{background-image:url(img/geekdoc-stack.svg#gdoc_dangerous)}.gdoc-hint__title i.fa.danger{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.gdoc-hint__title i.fa.warning{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.gdoc-hint__title .gdoc-icon{width:1.5rem;height:1.5rem;margin-left:-5px}.gdoc-hint__text{padding:.25rem 1rem}.gdoc-hint .gdoc-page__anchor{display:none}.gdoc-mermaid{font-family:var(--body-font-family)}.gdoc-mermaid>svg{height:100%;padding:.5rem}.gdoc-props__title,.gdoc-props__default{padding:0;margin:0;font-family:var(--code-font-family)}.gdoc-props__meta{gap:.5em;line-height:normal;margin-bottom:.25rem}.gdoc-props__meta:hover .gdoc-page__anchor svg.gdoc-icon{color:var(--control-icons)}.gdoc-props__tag.info{border-color:rgb(231.54,243.5117948718,250.86);background-color:rgb(243.27,249.2558974359,252.93)}.gdoc-props__tag.note{border-color:rgb(231.54,243.5117948718,250.86);background-color:rgb(243.27,249.2558974359,252.93)}.gdoc-props__tag.ok{border-color:rgb(228.65,250.35,237.6555);background-color:hsl(144.9,70%,96.9607843137%)}.gdoc-props__tag.tip{border-color:rgb(228.65,250.35,237.6555);background-color:hsl(144.9,70%,96.9607843137%)}.gdoc-props__tag.important{border-color:hsl(40.2352941176,70%,95%);background-color:hsl(40.2352941176,70%,97.5%)}.gdoc-props__tag.caution{border-color:rgb(240.9923459716,229.585,250.515);background-color:rgb(247.9961729858,242.2925,252.7575)}.gdoc-props__tag.danger{border-color:hsl(0,70%,94.1764705882%);background-color:hsl(0,70%,97.0882352941%)}.gdoc-props__tag.warning{border-color:hsl(0,70%,94.1764705882%);background-color:hsl(0,70%,97.0882352941%)}.gdoc-props__tag{font-size:.875rem;font-weight:normal;background-color:#f8f9fa;border:1px solid #e9ecef;border-radius:.15rem;padding:.125rem .25rem;color:#343a40}.gdoc-props__default{font-size:.875rem}.gdoc-progress{margin-bottom:1rem}.gdoc-progress__label{padding:.25rem 0}.gdoc-progress__label--name{font-weight:bold}.gdoc-progress__wrap{background-color:var(--accent-color-lite);border-radius:1em;box-shadow:inset 0 0 0 1px var(--accent-color)}.gdoc-progress__bar{height:1em;border-radius:1em;background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.125) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.125) 50%, rgba(255, 255, 255, 0.125) 75%, transparent 75%, transparent);background-size:2.5em 2.5em;background-color:#205375 !important} \ No newline at end of file diff --git a/docs/hugo/public/major_upgrade-copy/index.html b/docs/hugo/public/major_upgrade-copy/index.html new file mode 100644 index 000000000..5ed162fbd --- /dev/null +++ b/docs/hugo/public/major_upgrade-copy/index.html @@ -0,0 +1,5162 @@ + + + + + + + + + + + + + Major-Upgrade | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Major-Upgrade

    +
    + +
    +

    CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.

    +
    +

    PAY ATTENTION: Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.

    +
    +

    + How does the upgrade work? +

    + + + +
    +
    +

    + Preconditions: +

    + + + +
    +
      +
    1. Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to.
    2. +
    3. Check - Check that the new PGVERSION is larger than the previously used one.
    4. +
    5. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.
    6. +
    +
    +

    + Preliminary checks +

    + + + +
    +
      +
    1. use initdb to prepare a new data_dir (data_new) based on the new PGVERSION.
    2. +
    3. check the upgrade possibility with pg_upgrade --check
    4. +
    +
    +

    HINT: If one of the steps is aborted, a cleanup is performed

    +
    +

    + Prepare the Upgrade +

    + + + +
    +
      +
    1. remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit.
    2. +
    3. activate the maintenance mode of the cluster
    4. +
    5. terminate PostgreSQL in an orderly manner
    6. +
    7. check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location
    8. +
    9. use port 5432 for rsyncd and start it
    10. +
    +
    +

    + Start the Upgrade +

    + + + +
    +
      +
    1. Call pg_upgrade -k to start the Upgrade
    2. +
    +
    +

    ATTENTION if the process failed, we need to rollback, if it was sucessful we’re reaching the point of no return

    +
      +
    1. Rename the directories. data -> data_old and data_new -> data
    2. +
    3. Update the Patroni.config (postgres.yml)
    4. +
    5. Call Checkpoint on every replica and trigger rsync on the Replicas
    6. +
    7. Wait for Replicas to complete rsxnc. Timeout: 300
    8. +
    9. Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid
    10. +
    11. Start Patroni on the Primary and start the postgres locally
    12. +
    13. Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads
    14. +
    15. Wait for every Replica to become ready
    16. +
    17. Disable the maintenance mode for the Cluster
    18. +
    19. Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade
    20. +
    +
    +

    + Completion of the upgrade +

    + + + +
    +
      +
    1. Drop directory data_old
    2. +
    3. Trigger new Backup
    4. +
    +
    +

    + How a rollback is working? +

    + + + +
    +
      +
    1. Stop rsynd if its running
    2. +
    3. Disable the maintenance mode for the Cluster
    4. +
    5. Drop directory data_new
    6. +
    +
    +

    + How to trigger a In-Place-Upgrade with cpo? +

    + + + +
    +
    spec:
    +  postgresql:
    +    version: "17"
    +

    To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above. +If you choosse a not allowed value, you will give an error and if you decrease the value, the operator will just ignore it with the following log-Entry.

    +
    Operator-Log
    +
    +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/major_upgrade-copy/index.xml b/docs/hugo/public/major_upgrade-copy/index.xml new file mode 100644 index 000000000..c992c9539 --- /dev/null +++ b/docs/hugo/public/major_upgrade-copy/index.xml @@ -0,0 +1,12 @@ + + + + Major-Upgrade on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/major_upgrade-copy/ + Recent content in Major-Upgrade on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/major_upgrade/index.html b/docs/hugo/public/major_upgrade/index.html new file mode 100644 index 000000000..ac7c1d7b3 --- /dev/null +++ b/docs/hugo/public/major_upgrade/index.html @@ -0,0 +1,5179 @@ + + + + + + + + + + + + + Major version Upgrade | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Major version Upgrade

    +
    + +
    +

    CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.

    +
    +

    PAY ATTENTION: Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.

    +
    +

    + How does the upgrade work? +

    + + + +
    +
    +

    + Preconditions: +

    + + + +
    +
      +
    1. Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to.
    2. +
    3. Check - Check that the new PGVERSION is larger than the previously used one.
    4. +
    5. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.
    6. +
    +
    +

    + Preliminary checks +

    + + + +
    +
      +
    1. use initdb to prepare a new data_dir (data_new) based on the new PGVERSION.
    2. +
    3. check the upgrade possibility with pg_upgrade --check
    4. +
    +
    +

    HINT: If one of the steps is aborted, a cleanup is performed

    +
    +

    + Prepare the Upgrade +

    + + + +
    +
      +
    1. remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit.
    2. +
    3. activate the maintenance mode of the cluster
    4. +
    5. terminate PostgreSQL in an orderly manner
    6. +
    7. check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location
    8. +
    9. use port 5432 for rsyncd and start it
    10. +
    +
    +

    + Start the Upgrade +

    + + + +
    +
      +
    1. Call pg_upgrade -k to start the Upgrade
    2. +
    +
    +

    ATTENTION if the process failed, we need to rollback, if it was sucessful we’re reaching the point of no return

    +
      +
    1. Rename the directories. data -> data_old and data_new -> data
    2. +
    3. Update the Patroni.config (postgres.yml)
    4. +
    5. Call Checkpoint on every replica and trigger rsync on the Replicas
    6. +
    7. Wait for Replicas to complete rsxnc. Timeout: 300
    8. +
    9. Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid
    10. +
    11. Start Patroni on the Primary and start the postgres locally
    12. +
    13. Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads
    14. +
    15. Wait for every Replica to become ready
    16. +
    17. Disable the maintenance mode for the Cluster
    18. +
    19. Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade
    20. +
    +
    +

    + Completion of the upgrade +

    + + + +
    +
      +
    1. Drop directory data_old
    2. +
    3. Trigger new Backup
    4. +
    +
    +

    + How a rollback is working? +

    + + + +
    +
      +
    1. Stop rsynd if its running
    2. +
    3. Disable the maintenance mode for the Cluster
    4. +
    5. Drop directory data_new
    6. +
    +
    +

    + How to trigger a In-Place-Upgrade with cpo? +

    + + + +
    +
    spec:
    +  postgresql:
    +    version: "17"
    +

    To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above. +If you choosse a not allowed value, you will give an error and if you decrease the value, the operator will just ignore it with the following log-Entry.

    +
    Operator-Log
    +
    +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/major_upgrade/index.xml b/docs/hugo/public/major_upgrade/index.xml new file mode 100644 index 000000000..bea2a3917 --- /dev/null +++ b/docs/hugo/public/major_upgrade/index.xml @@ -0,0 +1,12 @@ + + + + Major version Upgrade on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/major_upgrade/ + Recent content in Major version Upgrade on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/minor_update/index.html b/docs/hugo/public/minor_update/index.html new file mode 100644 index 000000000..b37e3ab86 --- /dev/null +++ b/docs/hugo/public/minor_update/index.html @@ -0,0 +1,5179 @@ + + + + + + + + + + + + + Minor Update | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Minor Update

    +
    + +
    +

    CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.

    +
    +

    PAY ATTENTION: Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.

    +
    +

    + How does the upgrade work? +

    + + + +
    +
    +

    + Preconditions: +

    + + + +
    +
      +
    1. Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to.
    2. +
    3. Check - Check that the new PGVERSION is larger than the previously used one.
    4. +
    5. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.
    6. +
    +
    +

    + Preliminary checks +

    + + + +
    +
      +
    1. use initdb to prepare a new data_dir (data_new) based on the new PGVERSION.
    2. +
    3. check the upgrade possibility with pg_upgrade --check
    4. +
    +
    +

    HINT: If one of the steps is aborted, a cleanup is performed

    +
    +

    + Prepare the Upgrade +

    + + + +
    +
      +
    1. remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit.
    2. +
    3. activate the maintenance mode of the cluster
    4. +
    5. terminate PostgreSQL in an orderly manner
    6. +
    7. check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location
    8. +
    9. use port 5432 for rsyncd and start it
    10. +
    +
    +

    + Start the Upgrade +

    + + + +
    +
      +
    1. Call pg_upgrade -k to start the Upgrade
    2. +
    +
    +

    ATTENTION if the process failed, we need to rollback, if it was sucessful we’re reaching the point of no return

    +
      +
    1. Rename the directories. data -> data_old and data_new -> data
    2. +
    3. Update the Patroni.config (postgres.yml)
    4. +
    5. Call Checkpoint on every replica and trigger rsync on the Replicas
    6. +
    7. Wait for Replicas to complete rsxnc. Timeout: 300
    8. +
    9. Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid
    10. +
    11. Start Patroni on the Primary and start the postgres locally
    12. +
    13. Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads
    14. +
    15. Wait for every Replica to become ready
    16. +
    17. Disable the maintenance mode for the Cluster
    18. +
    19. Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade
    20. +
    +
    +

    + Completion of the upgrade +

    + + + +
    +
      +
    1. Drop directory data_old
    2. +
    3. Trigger new Backup
    4. +
    +
    +

    + How a rollback is working? +

    + + + +
    +
      +
    1. Stop rsynd if its running
    2. +
    3. Disable the maintenance mode for the Cluster
    4. +
    5. Drop directory data_new
    6. +
    +
    +

    + How to trigger a In-Place-Upgrade with cpo? +

    + + + +
    +
    spec:
    +  postgresql:
    +    version: "17"
    +

    To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above. +If you choosse a not allowed value, you will give an error and if you decrease the value, the operator will just ignore it with the following log-Entry.

    +
    Operator-Log
    +
    +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/minor_update/index.xml b/docs/hugo/public/minor_update/index.xml new file mode 100644 index 000000000..1746f2f53 --- /dev/null +++ b/docs/hugo/public/minor_update/index.xml @@ -0,0 +1,12 @@ + + + + Minor Update on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/minor_update/ + Recent content in Minor Update on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/mobile-79ddc617.min.css b/docs/hugo/public/mobile-79ddc617.min.css new file mode 100644 index 000000000..abf3504d9 --- /dev/null +++ b/docs/hugo/public/mobile-79ddc617.min.css @@ -0,0 +1 @@ +@media screen and (max-width: 41rem){.gdoc-nav{margin-left:-18rem;font-size:16px}.gdoc-nav__control{display:inline-block}.gdoc-header svg.gdoc-icon{width:1.5rem;height:1.5rem}.gdoc-brand{font-size:1.5rem;line-height:1.5rem}.gdoc-brand__img{display:none}.gdoc-menu-header__items{display:none}.gdoc-menu-header__control,.gdoc-menu-header__home{display:flex}.gdoc-error{padding:6rem 1rem}.gdoc-error svg.gdoc-icon{width:6rem;height:6rem}.gdoc-error__message{padding-left:2rem}.gdoc-error__line{padding:.25rem 0}.gdoc-error__title{font-size:2rem}.gdoc-page__header .breadcrumb,.hidden-mobile{display:none}.flex-mobile-column{flex-direction:column}.flex-mobile-column.gdoc-columns{margin:2rem 0}.flex-mobile-column .gdoc-columns__content{min-width:auto;margin:0}#menu-control:checked~main .gdoc-nav nav,#menu-control:checked~main .gdoc-page{transform:translateX(18rem)}#menu-control:checked~main .gdoc-page{opacity:.25}#menu-control:checked~.gdoc-header .gdoc-nav__control svg.gdoc-icon.gdoc_menu{display:none}#menu-control:checked~.gdoc-header .gdoc-nav__control svg.gdoc-icon.gdoc_arrow_back{display:inline-block}#menu-header-control:checked~.gdoc-header .gdoc-brand{display:none}#menu-header-control:checked~.gdoc-header .gdoc-menu-header__items{display:flex}#menu-header-control:checked~.gdoc-header .gdoc-menu-header__control svg.gdoc-icon.gdoc_keyboard_arrow_left{display:none}} \ No newline at end of file diff --git a/docs/hugo/public/monitoring/index.html b/docs/hugo/public/monitoring/index.html new file mode 100644 index 000000000..f89b03d75 --- /dev/null +++ b/docs/hugo/public/monitoring/index.html @@ -0,0 +1,5266 @@ + + + + + + + + + + + + + Monitoring | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Monitoring

    +
    + +
    +

    The CPO-Project has prepared severall Tools which allows to setup a Monitoring-Stack including Alerting and Metric-Viewer. +These Stack is based on:

    +
      +
    • Prometheus
    • +
    • Alertmanager
    • +
    • Grafana
    • +
    • exporter-container
    • +
    +

    CPO has prepared an own Exporter for the PostgreSQl-Pod which can used as a sidecar.

    +
    +

    + Setting up the Monitoring Stack +

    + + + +
    +

    To setup the Monitoring-Stack we suggest that you create an own namespace and use the prepared kustomization file inside the Operator-Tutorials.

    +
    $ kubectl create namespace cpo-monitoring
    +namespace/cpo-monitoring created
    +$ kubectl get pods -n cpo-monitoring
    +No resources found in cpo-monitoring namespace.
    +
    +git clone https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorial
    +cd CYBERTEC-operator-tutorial/setup/monitoring
    +
    +# Hint: Please check if youn want to use a specific storage-class the file pvcs.yaml and add your storageclass on the commented part. Please ensure that you removed the comment-char.
    +
    +$ kubectl apply -n cpo-monitoring -k .
    +serviceaccount/cpo-monitoring created
    +serviceaccount/cpo-monitoring-tools created
    +clusterrole.rbac.authorization.k8s.io/cpo-monitoring unchanged
    +clusterrolebinding.rbac.authorization.k8s.io/cpo-monitoring unchanged
    +configmap/alertmanager-config created
    +configmap/alertmanager-rules-config created
    +configmap/cpo-prometheus-cm created
    +configmap/grafana-dashboards created
    +configmap/grafana-datasources created
    +secret/grafana-secret created
    +service/cpo-monitoring-alertmanager created
    +service/cpo-monitoring-grafana created
    +service/cpo-monitoring-prometheus created
    +persistentvolumeclaim/alertmanager-pvc created
    +persistentvolumeclaim/grafana-pvc created
    +persistentvolumeclaim/prometheus-pvc created
    +deployment.apps/cpo-monitoring-alertmanager created
    +deployment.apps/cpo-monitoring-grafana created
    +deployment.apps/cpo-monitoring-prometheus created
    +
    +Hint: If you're not running Openshift you will get a error like this: 
    +error: resource mapping not found for name: "grafana" namespace: "" from ".":
    +no matches for kind "Route" in version "route.openshift.io/v1" ensure CRDs are installed first
    +
    +You can ignore this, because it depends on an object with the type route which is part of Openshift. 
    +It is not needed replaced by ingress-rules or an loadbalancer-service.
    +

    After installing the Monitoring-Stack we’re able to check the created pods inside the namespace

    +
    $ kubectl get pods -n cpo-monitoring
    +----------------------------------------------------------------------------------------
    +NAME                                          | READY  | STATUS      | RESTARTS  | AGE
    +cpo-monitoring-alertmanager-5bb8bc79f7-8pdv4  | 1/1    | Running     | 0         | 3m35s
    +cpo-monitoring-grafana-7c7c4f787b-jbj2f       | 1/1    | Running     | 0         | 3m35s
    +cpo-monitoring-prometheus-67969b757f-k26jd    | 1/1    | Running     | 0         | 3m35s
    +

    The configuration of this monitoring-stack is based on severall configmaps which can be modified.

    +
    +

    + Prometheus-Configuration +

    + + + +
    +
    +

    + Alertmanager-Configuration +

    + + + +
    +
    +

    + Grafana-Configuration +

    + + + +
    +
    +

    + Configure a PostgreSQL-Cluster to allow Prometheus to gather metrics +

    + + + +
    +

    To allow Prometheus to gather metrics from your cluster you need to do some small modfications on the Cluster-Manifest. +We need to create the monitor-object for this:

    +
    kubectl edit postgresqls.cpo.opensource.cybertec.at cluster-1
    +
    +...
    +spec:
    +  ...
    +  monitor:
    +    image: docker.io/cybertecpostgresql/cybertec-pg-container:exporter-16.2-1
    +

    The Operator will add automatically the monitoring sidecar to your pods, create a new postgres-user and add some structure inside the postgres-database to enable everthing needed for the Monitoring. Also every Ressource of your Cluster will get a new label: cpo_monitoring_stack=true. This is needed for Prometheus to identify all clusters which should be added to the monitoring. +Removing this label will stop Prometheus to gather data from this cluster.

    +

    After changing your Cluster-Manifest the Pods needs to be recreated which is done by a rolling update. +After this you can see that the pod has now more than just one container.

    +
    kubectl get pods
    +-----------------------------------------------------------------------------
    +NAME                             | READY  | STATUS           | RESTARTS | AGE
    +cluster-1-0                      | 2/2    | Running          | 0        | 54s
    +cluster-1-1                      | 2/2    | Running          | 0        | 31s
    +

    You can check the logs to see that the exporter is working and with curl you can see the output of the exporter.

    +
    kubectl logs cluster-1-0 -c postgres-exporter
    +kubectl exec --stdin --tty cluster-1-0 -c postgres-exporter -- /bin/bash
    +[exporter@cluster-1-0 /]# curl http://127.0.0.1:9187/metrics
    +

    You can now setup a LoadBalancer-Service or create an Ingress-Rule to allow access von outside to the grafana. Alternativ you can use a port-forward.

    +
    +
    + LoadBalancer or Nodeport +
    + + + +
    +
    +
    + Ingress-Rule +
    + + + +
    +
    +
    + Port-Forwarding +
    + + + +
    +
    $ kubectl get pods -n cpo-monitoring
    +----------------------------------------------------------------------------------------
    +NAME                                          | READY  | STATUS      | RESTARTS  | AGE
    +cpo-monitoring-alertmanager-5bb8bc79f7-8pdv4  | 1/1    | Running     | 0         | 6m42s
    +cpo-monitoring-grafana-7c7c4f787b-jbj2f       | 1/1    | Running     | 0         | 6m42s
    +cpo-monitoring-prometheus-67969b757f-k26jd    | 1/1    | Running     | 0         | 6m42s
    +
    +$ kubectl port-forward cpo-monitoring-grafana-7c7c4f787b-jbj2f -n cpo-monitoring 9000:9000
    +Forwarding from 127.0.0.1:9000 -> 9000
    +Forwarding from [::1]:9000 -> 9000
    +

    Call http://localhost:9000 in the Browser

    +
    +
    + Use a Route (Openshift only) +
    + + + +
    +
    kubectl get route -n cpo-monitoring
    +

    Use the Route-Adress to access Grafana

    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/monitoring/index.xml b/docs/hugo/public/monitoring/index.xml new file mode 100644 index 000000000..57baaa524 --- /dev/null +++ b/docs/hugo/public/monitoring/index.xml @@ -0,0 +1,12 @@ + + + + Monitoring on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/monitoring/ + Recent content in Monitoring on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/multisite-copy/index.html b/docs/hugo/public/multisite-copy/index.html new file mode 100644 index 000000000..7b5ddfbd0 --- /dev/null +++ b/docs/hugo/public/multisite-copy/index.html @@ -0,0 +1,5422 @@ + + + + + + + + + + + + + Multisite | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Multisite

    +
    + +
    +

    Multisite is a function specially developed for Patroni that makes it possible to combine two separate Patroni clusters into a common cluster unit. ‘Separate’ in this context means that the clusters run independently of each other and can even be located on different Kubernetes clusters. +With Multisite, both clusters benefit from the well-known Patroni features such as automatic failover and demotion of members, resulting in a significant extension compared to a conventional standby cluster. +This feature significantly improves high availability and redundancy by managing multiple geographically or infrastructurally separated clusters as one logical unit. This allows one cluster to seamlessly transition to another in the event of a failure without having to rely on manual switchovers or third-party replication solutions.

    +
    +

    + Prerequisites +

    + + + +
    +

    In order to set up the multisite PostgreSQL operator you will need the following:

    +
      +
    • Two or more Kubernetes or OpenShift clusters (also possible with bare metal or VMs) +
        +
      • Kubernetes version 1.25+, OpenShift version 4.12+.
      • +
      • Support for defining LoadBalancer services with external IP addresses that are accessible from the other cluster(s).
      • +
      • Persistent volumes with must be available (only ReadWriteOnce capability is needed).
      • +
      +
    • +
    • A separate VM or Kubernetes/OpenShift cluster to provide quorum (if using less then three Kubernetes or OpenShift clusters). +
        +
      • For high availability there should not be a shared point of failure between the quorum and the two Kubernetes clusters.
      • +
      • VM or a LoadBalancer IP must be accessible on ports 2379/2380 to the two other clusters.
      • +
      • 2 vCPU and 2 GB of memory and 20GB of persistent storage is needed for the quorum site.
      • +
      +
    • +
    • Set up etcd cluster with 3 sites accessible from each of the sites. etcd needs to support API version 3.
    • +
    • For backups an object storage system with S3 compatible API is needed. Minio, Ceph and major cloud provider object storages are known to work.
    • +
    + + + + + +
    +
    +
    An additional etcd is set up for Multisite, which spans the Kubernetes or Openshift clusters and must contain the quorum.
    +
    + +
    +

    + Architecture +

    + + + +
    +

    Helm based deployment of the multisite operator contains two helm charts, postgres-operator and postgres-cluster. The first is used to deploy the operator and associated objects to a single Kubernetes cluster. The operator is responsible for managing PostgreSQL clusters based on Custom Resource Definitions (CRDs) of type postgresqls/pg.

    +

    Kubernetes entities

    +

    The diagram contains in green the Helm charts that are used to deploy operator and clusters, in blue the objects +deployed by the operator helm chart and in gold the objects deployed by the cluster chart.

    +

    Operator helm chart deployed objects have the following purposes:

    +
      +
    • deployments/postgres-operator - Deployment for the operator itself.
    • +
    • opconfig/postgres-operator - Operator configuration parameters that are read on operator startup. These apply to +all clusters managed by this operator.
    • +
    • crd/operatorconfigurations.cpo.opensource.cybertec.at - Schema for the operator configuration.
    • +
    • clusterrole/postgres-operator - Defines the Kubernetes API resource access used by the operator. Assigned to +postgres-operator service account.
    • +
    • clusterrole/postgres-pod - The Kubernetes API access needed by database pods. Access is needed to access leader +status, config and other things. This is assigned to postgres-pod service account used by database pods.
    • +
    • crd/postgresqls.cpo.opensource.cybertec.at - Schema for PostgreSQL cluster definitions.
    • +
    • clusterrole/postgres-operator:users:{admin,edit,view} - If rbac.createAggregateClusterRoles is set then user +facing roles are added for accessing the postgresqls CRDs.
    • +
    +

    The cluster chart creates an instance of postgresqls CRD, which will be called cluster manifest from here on. When this +cluster manifest is created operator will create the needed resources for the cluster. These include:

    +
      +
    • +

      statefulset/$clustername - StatefulSet is responsible for creating and managing database pods and their associated +PersistentVolumeClaims for storing the databases. Each database pod will run internally an instance of Patroni +process, which will coordinate over the Kubernetes API initialization of the database, startup, leader election +and other control plane actions.

      +
    • +
    • +

      service/$clustername,endpoints/$clustername - The main access point for users accessing the database. When load +balancer is enabled in the CRD or multisite mode is enabled, this service will be set to be a LoadBalancer service and +accessible from outside the Kubernetes cluster. The service is created without a selector. Instead, for leader +elections database pods will update the IP address of this endpoint to point to the current leader.

      +

      The endpoint also holds annotations that determine the duration of the leader lease.

      +

      In multicluster operation mode the standby site leader will be in read-only mode.

      +
    • +
    • +

      service/$clustername-repl - Service that points to non-leader (read-only) instances of the database cluster.

      +
    • +
    • +

      service/$clustername-config - A headless service with an endpoint that holds Patroni configuration in annotations.

      +
    • +
    • +

      poddisruptionbudget/postgres-$clustername-pdb - A pod disruption budget that does not allow Kubernetes to shut +down pods in leader role. On some Kubernetes clusters kubernetes.enable_pod_disruption_budgets may need to be +turned off to allow nodes to be drained for upgrades.

      +
    • +
    +
    +

    + Multisite mode +

    + + + +
    +

    In multisite operation mode there are multiple independent Kubernetes clusters with operators capable of independent +operation. To coordinate which site has the current leader process the database pods use a shared etcd cluster to +store a leader lease.

    +

    Multisite interactions

    +

    During bootstrap the first site to acquire the leader lease gets to initialize the database contents. Secondary +sites are configured to replicate from primary site using Patroni’s standby_cluster mechanism.

    +

    To be able to communicate between Kubernetes clusters a LoadBalancer service is needed. For this the operator +automatically turns the primary service of the cluster to be of kind LoadBalancer. Operator will wait for an +external IP address to be assigned to this service and passes this information to the database pod. The leader of +each site, whether primary or standby site, will periodically advertise the externally visible IP address for their +site in etcd. Based on this the standby site can configure the standby cluster mechanism to replicate from primary +site.

    +
    +

    + Deployment +

    + + + +
    +

    In multisite mode postgres-operator can manage a replicated PostgreSQL cluster that is deployed across multiple +Kubernetes clusters. Multisite operation can be turned on on a cluster by cluster basis, or can be configured to +default to on for all cluster managed by a single operator.

    +

    Setting up a GR deployment consists of the following steps:

    +
      +
    1. Creating a shared etcd cluster.
    2. +
    3. Configuring multisite operation parameters for the postgres-operator.
    4. +
    5. Creating a multisite enabled cluster.
    6. +
    +
    +

    + Etcd deployment +

    + + + +
    +

    Multisite operation mode requires an etcd cluster to achieve consensus on which site gets to accept write +transactions. This functionality is critical to avoid situations where multiple site accept incompatible writes that +cannot be reconciliated, also known as a split brain scenario.

    +

    A highly available etcd cluster consists of an odd number of nodes, at least 3. It is very important that a quorum +of etcd instances (for 3 node clusters, any two instances) do not share a single point of failure. Otherwise the +write availability of database clusters is limited to this single point of failure. Effectively this means that to +protect 3 node etcd clusters from whole site failure, any site can only contain 1 etcd node and there needs to be +at least 3 sites.

    +

    Postgres-operator is agnostic to the exact method of etcd setup, but for ease of use there is a +Helm chart packaged that demonstrates the +setup.

    +
    +

    + Example etcd setup +

    + + + +
    +

    This example uses one etcd instance deployed outside Kubernetes cluster as quorum. This etcd needs to be started +with the following configuration. Note that IP address that is advertised must be routed to the host that runs this +etcd.

    +
    ETCD_NAME=quorum
    +ETCD_INITIAL_CLUSTER=quorum=http://10.100.1.100:2380
    +ETCD_INITIAL_ADVERTISE_PEER_URLS=http://10.100.1.100:2380
    +ETCD_INITIAL_CLUSTER_TOKEN=hpe_etcd
    +ETCD_ADVERTISE_CLIENT_URLS=http://10.100.1.100:2379
    +ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
    +ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
    +

    Kubernetes clusters can then be joined to this node. This needs to be a two step process as typically the externally +visible IP address or port is not known before creating the LoadBalancer service. For this first create a free standing +loadbalancer service that will be overwritten by the Helm chart.

    +
    helm template global-etcd ./etcd-helm/ -f etcd-helm/site_a.yaml \
    +| awk '/service.yaml/{flag=1;next}/---/{flag=0}flag' \
    +| kubectl apply -f -
    +

    Then check what external IP address the load balancer service got assigned to it.

    +
    $ kubectl get svc -l app.kubernetes.io/instance=global-etcd
    +NAME                    TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)                         AGE
    +global-etcd-etcd-helm   LoadBalancer   10.109.171.146   10.200.1.101     2379:32488/TCP,2380:30336/TCP   17h
    +

    And set in the values for the helm chart:

    +
      +
    1. Unique name of the site.
    2. +
    3. Externally visible IP address of this service
    4. +
    5. IP address of existing etcd service.
    6. +
    7. Peer list that includes both existing and to be added etcd instance.
    8. +
    +

    Example:

    +
    site:
    +  name: site_a
    +  host: 10.100.2.101
    +
    +etcd:
    +  existing_etcd_cluster_hostname: 10.100.1.100
    +  token: hpe_etcd
    +  state: existing
    +  peers:
    +  #Peers should only include working peers and the current one
    +  - quorum=http://10.100.1.100:2380
    +  - site_a_etcd0=http://10.100.2.101:2380
    +  client_port: 2379
    +  peer_port: 2380
    +

    Then install the helm chart:

    +
    helm install global-etcd ./etcd-helm/ -f etcd-helm/site_a.yaml
    +

    This then needs to be repeated for the other site.

    +
    +

    + Configuring operator for multisite operations +

    + + + +
    +

    Multisite operation needs at a minimum the configuration options multisite.etcd_host, multisite.site +and multisite.enabled. All of them can be configured either in operator configuration or per cluster.

    +

    multisite.etcd_host needs to point at the global etcd. The port is currently assumed to be 2379. Normally +all clusters under one operator would be using the same etcd clusters, so it makes sense to configure it +in the operator configuration. At runtime database pods will discover the whole etcd cluster member list +and will also take notice of any membership changes. It is enough to use local etcd instance service name +here.

    +

    multisite.site is a unique identifier for this site. It will be prefixed to globally advertised database pod names +to distinguish them from pods in other sites. This also makes sense in the operator configuration.

    +

    multisite.enabled turns of the multisite behavior. Typically it would make sense to control this at the +cluster level, but the default could be turned on globally.

    +

    These parameters are exposed in Helm chart values file as configMultisite.*.

    +

    Example config:

    +
    $ kubectl get opconfig/postgres-operator -o yaml | grep multisite -B1 -A3
    +  min_instances: -1
    +  multisite:
    +    etcd_host: global-etcd-etcd-helm.default.svc.cluster.local
    +    site: s1
    +  postgres_pod_resources:
    +

    This needs to be repeated with a different site name in the second Kubernetes cluster.

    +
    +

    + Creating a multisite enabled postgres cluster +

    + + + +
    +

    If the operator is configured for multisite operation then creating a multisite cluster only needs +enabling of the multisite mode.

    +

    Here is an example values file to use for creating multisite enabled clusters:

    +
    apiVersion: cpo.opensource.cybertec.at/v1
    +kind: postgresql
    +metadata:
    +  name: multisite-cluster
    +  namespace: cpo
    +  labels:
    +    app.kubernetes.io/name: postgres-cluster
    +    app.kubernetes.io/instance: multisite-cluster 
    +spec:
    +  dockerImage: docker.io/cybertecpostgresql/cybertec-pg-container:postgres-multisite-17.4-1
    +  numberOfInstances: 1
    +  postgresql:
    +    version: '17'
    +  resources:
    +    limits:
    +      cpu: 500m
    +      memory: 500Mi
    +    requests:
    +      cpu: 500m
    +      memory: 500Mi
    +  teamId: acid
    +  volume:
    +    size: 5Gi
    +  patroni:
    +    ttl: 30
    +    loop_wait: 10
    +    retry_timeout: 10
    +    multisite:
    +      enable: true
    +

    There is no coordination needed between creating the two or more sites and they can use identical +configuration. The clusters need to be in the same namespace and have the same name to be considered +the same cluster. The first cluster to boot up will acquire multisite leader status and will bootstrap +the database. The other clusters will automatically fetch a copy from the leader cluster and start +replicating.

    +

    Multisite operation needs that the database cluster are capable of communicating with each other. +To do this a load balancer service is created in each cluster for the cluster leader. The operator +then waits for an external IP to be assigned and injects it into the database pods to be used for +advertising their identity.

    +
    +

    + Observing operations +

    + + + +
    +

    If database pods have not been created, the first place to check for information is operator logs. Operator logs can +be checked with the following command (add –follow if you want to observe in real-time):

    +
    kubectl logs $(kubectl get po -l 'app.kubernetes.io/name=postgres-operator' -o name)
    +

    The logs for a successful cluster creation look like this

    +
    time="2023-02-22T15:24:12Z" level=info msg="ADD event has been queued" cluster-name=cpo/multisite-cluster pkg=controller worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="creating a new Postgres cluster" cluster-name=cpo/multisite-cluster pkg=controller worker=1
    +time="2023-02-22T15:24:12Z" level=warning msg="master is not running, generated master endpoint does not contain any addresses" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="endpoint \"cpo/multisite-cluster\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=debug msg="final load balancer source ranges as seen in a service spec (not necessarily applied): [\"0.0.0.0/0\"]" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="master service \"cpo/multisite-cluster\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="replica service \"cpo/multisite-cluster-repl\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=debug msg="team API is disabled" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=debug msg="team API is disabled" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="users have been initialized" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="syncing secrets" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=debug msg="created new secret cpo/postgres.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at, namespace: default, uid: 75ded2eb-a2c9-4968-a1d7-50d2996baeb3" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=debug msg="created new secret cpo/standby.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at, namespace: default, uid: 45a2560a-65a8-4bd5-954f-34d80d8a1894" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=info msg="secrets have been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=info msg="pod disruption budget \"cpo/postgres-multisite-cluster-pdb\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=info msg="waiting for load balancer IP to be assigned" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=debug msg="created new statefulset \"cpo/multisite-cluster\", uid: \"b83647ea-17f6-40aa-aa0c-b1111e76cdc0\"" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=info msg="statefulset \"cpo/multisite-cluster\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=info msg="waiting for the cluster being ready" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:16Z" level=debug msg="Waiting for 1 pods to become ready" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="pods are ready" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="Create roles" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=debug msg="closing database connection" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="users have been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=debug msg="closing database connection" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="databases have been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found pod disruption budget: \"cpo/postgres-multisite-cluster-pdb\" (uid: \"986a0118-83e7-4736-9843-ec80c0ea9270\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found statefulset: \"cpo/multisite-cluster\" (uid: \"b83647ea-17f6-40aa-aa0c-b1111e76cdc0\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found secret: \"cpo/postgres.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at\" (uid: \"75ded2eb-a2c9-4968-a1d7-50d2996baeb3\") namesapce: default" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found secret: \"cpo/standby.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at\" (uid: \"45a2560a-65a8-4bd5-954f-34d80d8a1894\") namesapce: default" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found master endpoint: \"cpo/multisite-cluster\" (uid: \"d9f7870e-dd51-4a88-a36a-1c2eb258a31c\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found master service: \"cpo/multisite-cluster\" (uid: \"4b30df50-ca53-4def-8171-b792c4eefc17\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found replica service: \"cpo/multisite-cluster-repl\" (uid: \"a77c3a49-3eea-4b6b-92b1-032e13d78f02\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found pod: \"cpo/multisite-cluster-0\" (uid: \"9b31d378-c9eb-4c1a-8637-e78933187ed7\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found PVC: \"cpo/pgdata-multisite-cluster-0\" (uid: \"03e66572-27ed-42b4-87bd-825d32131d36\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=debug msg="syncing connection pooler (master, replica) from (false, nil) to (false, false)" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="cluster has been created" cluster-name=cpo/multisite-cluster pkg=controller worker=1
    +

    When database pods have been created, then Patroni logs can be checked from the pod logs:

    +
    kubectl logs multisite-cluster-0
    +

    Successful start of first database pod will have amongst other output the following lines:

    +
    . . .
    +# Kubernetes API access
    +2023-02-22 15:24:21,061 INFO: Selected new K8s API server endpoint https://192.168.49.2:8443
    +. . .
    +# Set ourselves as multisite leader
    +2023-02-22 15:24:21,218 INFO: Selected new etcd server http://192.168.50.101:2379
    +2023-02-22 15:24:21,348 INFO: Running multisite consensus.
    +2023-02-22 15:24:21,349 INFO: Touching member s1-multisite-cluster with {'host': '192.168.49.103', 'port': 5432}
    +2023-02-22 15:24:21,447 INFO: Became multisite leader
    +. . .
    +# Initializing a new empty database
    +2023-02-22 15:24:21,563 INFO: trying to bootstrap a new cluster
    +. . .
    +Success. You can now start the database server using:
    +. . .
    +# Database started
    +2023-02-22 15:24:23,934 INFO: postmaster pid=73
    +. . .
    +# Running global database intitialization script
    +2023-02-22 15:24:25,061 INFO: running post_bootstrap
    +. . .
    +# Bootstrap done 
    +2023-02-22 15:24:26,310 INFO: initialized a new cluster
    +. . .
    +# Repeated information about health every 10s
    +2023-02-22 15:24:26,313 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-0
    +2023-02-22 15:24:26,361 INFO: Triggering multisite hearbeat
    +2023-02-22 15:24:26,364 INFO: Running multisite consensus.
    +2023-02-22 15:24:26,364 INFO: Multisite has leader and it is us
    +2023-02-22 15:24:26,409 INFO: Updated multisite leader lease
    +2023-02-22 15:24:26,409 INFO: Touching member s1-multisite-cluster with {'host': '192.168.49.103', 'port': 5432}
    +2023-02-22 15:24:26,422 INFO: no action. I am (multisite-cluster-0), the leader with the lock
    +. . .
    +

    Bootstrap of standby on primary site will have these lines:

    +
    . . .
    +# Determine leader
    +2023-02-22 15:47:04,552 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-1
    +2023-02-22 15:47:04,677 INFO: trying to bootstrap from leader 'multisite-cluster-0'
    +. . .
    +# Data copied to replica successfully
    +2023-02-22 15:47:06,805 INFO: replica has been created using basebackup_fast_xlog
    +2023-02-22 15:47:06,807 INFO: bootstrapped from leader 'multisite-cluster-0'
    +# Postgres up
    +2023-02-22 15:47:07,205 INFO: postmaster pid=73
    +. . .
    +# Normal operation
    +2023-02-22 15:47:08,380 INFO: no action. I am (multisite-cluster-1), a secondary, and following a leader (multisite-cluster-0)
    +

    Standby cluster will have the following information:

    +
    . . .
    +# Discovering multisite status
    +2023-02-22 15:49:58,406 INFO: Running multisite consensus.
    +2023-02-22 15:49:58,407 INFO: Touching member s2-multisite-cluster with {'host': '192.168.50.103', 'port': 5432}
    +2023-02-22 15:49:58,454 INFO: Multisite has leader and it is s1-multisite-cluster
    +2023-02-22 15:49:58,454 INFO: Multisite replicate from Member(index='118', name='s1-multisite-cluster', session='4113060022582527194', data={'host': '192.168.49.103', 'port': 5432})
    +2023-02-22 15:49:58,454 INFO: Setting standby configuration to: {'host': '192.168.49.103', 'port': 5432}
    +2023-02-22 15:49:58,455 INFO: Touching member s2-multisite-cluster with {'host': '192.168.50.103', 'port': 5432}
    +. . .
    +# Acquiring standby site leader status and starting copy from primary site
    +2023-02-22 15:49:58,290 INFO: Lock owner: None; I am multisite-cluster-0
    +2023-02-22 15:49:58,566 INFO: trying to bootstrap a new standby leader
    +. . .
    +# Replica creation successful
    +2023-02-22 15:50:00,326 INFO: replica has been created using basebackup
    +2023-02-22 15:50:00,327 INFO: bootstrapped clone from remote master postgresql://192.168.49.103:5432
    +# Postgres started
    +2023-02-22 15:50:00,577 INFO: postmaster pid=58
    +. . .
    +# Normal operation output of standby leader
    +2023-02-22 15:50:01,835 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-0
    +2023-02-22 15:50:01,886 INFO: Triggering multisite hearbeat
    +2023-02-22 15:50:01,888 INFO: Running multisite consensus.
    +2023-02-22 15:50:01,888 INFO: Multisite has leader and it is s1-multisite-cluster
    +2023-02-22 15:50:01,888 INFO: Multisite replicate from Member(index='118', name='s1-multisite-cluster', session='4113060022582527194', data={'host': '192.168.49.103', 'port': 5432})
    +2023-02-22 15:50:01,888 INFO: Touching member s2-multisite-cluster with {'host': '192.168.50.103', 'port': 5432}
    +2023-02-22 15:50:01,899 INFO: no action. I am (multisite-cluster-0), the standby leader with the lock
    +

    In case access to PostgreSQL logs is needed, the easiest way is to exec into a running database pod +with kubectl exec -it multisite-cluster-0 -- bash and view the files there. Logs are stored +as /home/postgres/pgdata/pgroot/pg_log/postgresql-*.csv, with one file per weekday.

    +

    Replication state can be queried from PostgreSQL:

    +
    kubectl exec -it $(kubectl get -o name po -l 'spilo-role=master,cluster-name=multisite-cluster') -- su postgres -c \
    +   'psql -xc "SELECT application_name, client_addr, backend_start, write_lag FROM pg_stat_replication"'
    +

    To check how multisite mode is doing one option is to check the etcd state. For example by executing +in any one of your database pods:

    +
    kubectl exec multisite-cluster-0 -- bash -c \
    +'ETCDCTL_API=3 etcdctl --endpoints=http://${MULTISITE_ETCD_HOST}:2379 \
    + get /multisite/${POD_NAMESPACE}/${SCOPE}/{leader,members0}'
    +

    This will output state stored in etcd. Example:

    +
    /multisite/cpo/multisite-cluster/leader
    +s1-multisite-cluster
    +/multisite/cpo/multisite-cluster/members/s1-multisite-cluster
    +{"host":"192.168.49.102","port":5432}
    +/multisite/cpo/multisite-cluster/members/s2-multisite-cluster
    +{"host":"192.168.50.102","port":5432}
    +

    Each cluster state is stored with the prefix /multisite/$NAMESPACE/$CLUSTER_NAME. In this state +there is /leader key storing current leader of the cluster and /members/$SITE_$CLUSTER_NAME for +each sites externally visible service.

    +
    +

    + Triggering switchover manually +

    + + + +
    +

    Sometimes it is necessary to move leader role from one site to another. For this the operator REST API has an endpoint +named /clusters/$namespace/$cluster/multisite/. This accepts a POST request with a request JSON. The document has the +following attributes:

    +
      +
    • switchover_to: name of the site that should become the new multisite leader.
    • +
    +

    Example:

    +
    curl --data-raw '{"switchover_to": "s1"}' -H "Content-type: application/json" \
    +    http://postgres-operator.default.svc.cluster.local:8080/clusters/cpo/multisite-cluster/multisite/
    +

    The POST request to this endpoint will return immediately when the switchover request has been registered. The +actual switchover process will take some time to coordinate.

    +
    +

    + Observing multisite status +

    + + + +
    +

    Current multisite status is published to cluster CRD status subresource in Multisite field. The possible values +are Leader and Standby. When the role changes there will also be an event published.

    +

    Example output from a kubectl describe on the cluster CRD resource:

    +
    Status:
    +  Multisite:                Leader
    +  Postgres Cluster Status:  Running
    +Events:
    +  Type    Reason   Age   From     Message
    +  ----    ------   ----  ----     -------
    +  Normal  Promote  13s   patroni  Acquired multisite leader status
    +

    Ouptut from the standby side:

    +
    Status:
    +Multisite:                Standby
    +Postgres Cluster Status:  Running
    +Events:
    +Type    Reason     Age   From               Message
    +  ----    ------     ----  ----               -------
    +Normal  Demote     62s   patroni            Lost leader lock to s1-multisite-cluster
    +Normal  Multisite  97s   postgres-operator  Multisite switching over to "multisite-cluster" at site "s1"
    +Normal  Multisite  97s   postgres-operator  Successfully started switchover to "multisite-cluster" at "s1"
    +
    +

    + Development environment tips +

    + + + +
    +
    +

    + MetalLB based cross cluster communication with minikube +

    + + + +
    +

    Minikube is a useful distribution for deploying development Kubernetes clusters. With a bit of configuration it is +possible to set up 2 Minikube clusters with MetalLB deployed so that MetalLB assigned IP addresses are accessible +from the other cluster.

    +

    Pre-requisite is to have 2 virtual machines that either are in the same L2 network, or that have a subnet routed to +them.

    +

    This example is based on docker based deployment, same approach might work with other deployment options (e.g. +Virtualbox), but may require some extra configuration tuning.

    +

    Start minikube’s on the two hosts using different internal subnets, and configure and enable the metallb addon to +assign IP addresses from this subnet. The subnets chosen should not be in use for services needed by these two VMs, +but other hosts are not affected by the choice of the subnets.

    +
    # Host A
    +minikube start --subnet=192.168.49.2
    +minikube addons configure metallb
    +-- Enter Load Balancer Start IP: 192.168.49.100
    +-- Enter Load Balancer End IP: 192.168.49.200
    +    ▪ Using image docker.io/metallb/speaker:v0.9.6
    +    ▪ Using image docker.io/metallb/controller:v0.9.6
    +✅  metallb was successfully configured
    +minikube addons enable metallb
    +
    +# Host B
    +minikube start --subnet=192.168.50.2
    +minikube addons configure metallb
    +-- Enter Load Balancer Start IP: 192.168.50.100
    +-- Enter Load Balancer End IP: 192.168.50.200
    +    ▪ Using image docker.io/metallb/speaker:v0.9.6
    +    ▪ Using image docker.io/metallb/controller:v0.9.6
    +✅  metallb was successfully configured
    +minikube addons enable metallb
    +

    On both hosts turn on ip forwarding in sysctl.conf and reload it with sysctl -p

    +
    net.ipv4.ip_forward=1
    +

    In IP tables allow forwarding:

    +
    sudo iptables -A FORWARD -j ACCEPT
    +

    Configure on each host routing to access the other clusters metallb IP range via the other VMs IP address (need to +replace IP addresses and network interfaces with actual ones from the VMs):

    +
    # Host A
    +sudo ip route add 192.168.50.0/24 via 192.168.2.12 dev eth1
    +# Host B
    +sudo ip route add 192.168.49.0/24 via 192.168.2.11 dev eth1
    +

    To check if load balancer works, here’s an example HTTP service:

    +
    apiVersion: apps/v1
    +kind: Deployment
    +metadata:
    +  name: hello-blue-whale
    +spec:
    +  replicas: 1
    +  selector:
    +    matchLabels:
    +      app: hello-blue-whale-app
    +  template:
    +    metadata:
    +      name: hello-blue-whale-pod
    +      labels:
    +        app: hello-blue-whale-app
    +    spec:
    +      containers:
    +      - name: hello-blue-whale-container
    +        image: vamsijakkula/hello-blue-whale:v1
    +        ports:
    +        - containerPort: 80
    +---
    +apiVersion: v1
    +kind: Service
    +metadata:
    +  name: hello-blue-whale-svc
    +  labels:
    +    app: hello-blue-whale-app
    +spec:
    +  selector:
    +    app: hello-blue-whale-app
    +  type: LoadBalancer
    +  ports:
    +  - port: 80
    +    targetPort: 80
    +

    Then check what external ip got assigned to the service (should be the first IP from the range given above).

    +
    kubectl get svc/hello-blue-whale-svc
    +

    And then from the other host use curl to see if the service can be accessed.

    +
    curl -v http://192.168.49.100/
    +

    Other hosts on the same network can have the same routes added to access services in the clusters. If access from +other networks is needed, then the chosen subnets need to be routed to these VMs across your network.

    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/multisite-copy/index.xml b/docs/hugo/public/multisite-copy/index.xml new file mode 100644 index 000000000..2da25b617 --- /dev/null +++ b/docs/hugo/public/multisite-copy/index.xml @@ -0,0 +1,12 @@ + + + + Multisite on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/multisite-copy/ + Recent content in Multisite on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/multisite/index.html b/docs/hugo/public/multisite/index.html new file mode 100644 index 000000000..eae2d5a62 --- /dev/null +++ b/docs/hugo/public/multisite/index.html @@ -0,0 +1,5681 @@ + + + + + + + + + + + + + Multisite | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Multisite

    +
    + +
    +

    Multisite is a function specially developed for Patroni that makes it possible to combine two separate Patroni clusters into a common cluster unit. ‘Separate’ in this context means that the clusters run independently of each other and can even be located on different Kubernetes clusters. +With Multisite, both clusters benefit from the well-known Patroni features such as automatic failover and demotion of members, resulting in a significant extension compared to a conventional standby cluster. +This feature significantly improves high availability and redundancy by managing multiple geographically or infrastructurally separated clusters as one logical unit. This allows one cluster to seamlessly transition to another in the event of a failure without having to rely on manual switchovers or third-party replication solutions.

    +
    +

    + Prerequisites +

    + + + +
    +

    In order to set up the multisite PostgreSQL operator you will need the following:

    +
      +
    • Two or more Kubernetes or OpenShift clusters (also possible with bare metal or VMs) +
        +
      • Kubernetes version 1.25+, OpenShift version 4.12+.
      • +
      • Support for defining LoadBalancer services with external IP addresses that are accessible from the other cluster(s).
      • +
      • Persistent volumes with must be available (only ReadWriteOnce capability is needed).
      • +
      +
    • +
    • A separate VM or Kubernetes/OpenShift cluster to provide quorum (if using less then three Kubernetes or OpenShift clusters). +
        +
      • For high availability there should not be a shared point of failure between the quorum and the two Kubernetes clusters.
      • +
      • VM or a LoadBalancer IP must be accessible on ports 2379/2380 to the two other clusters.
      • +
      • 2 vCPU and 2 GB of memory and 20GB of persistent storage is needed for the quorum site.
      • +
      +
    • +
    • Set up etcd cluster with 3 sites accessible from each of the sites. etcd needs to support API version 3.
    • +
    • For backups an object storage system with S3 compatible API is needed. Minio, Ceph and major cloud provider object storages are known to work.
    • +
    + + + + + +
    +
    +
    An additional etcd is set up for Multisite, which spans the Kubernetes or Openshift clusters and must contain the quorum.
    +
    + +
    +

    + Architecture +

    + + + +
    +

    Helm based deployment of the multisite operator contains two helm charts, postgres-operator and postgres-cluster. The first is used to deploy the operator and associated objects to a single Kubernetes cluster. The operator is responsible for managing PostgreSQL clusters based on Custom Resource Definitions (CRDs) of type postgresqls/pg.

    +

    Kubernetes entities

    +

    The diagram contains in green the Helm charts that are used to deploy operator and clusters, in blue the objects +deployed by the operator helm chart and in gold the objects deployed by the cluster chart.

    +

    Operator helm chart deployed objects have the following purposes:

    +
      +
    • deployments/postgres-operator - Deployment for the operator itself.
    • +
    • opconfig/postgres-operator - Operator configuration parameters that are read on operator startup. These apply to +all clusters managed by this operator.
    • +
    • crd/operatorconfigurations.cpo.opensource.cybertec.at - Schema for the operator configuration.
    • +
    • clusterrole/postgres-operator - Defines the Kubernetes API resource access used by the operator. Assigned to +postgres-operator service account.
    • +
    • clusterrole/postgres-pod - The Kubernetes API access needed by database pods. Access is needed to access leader +status, config and other things. This is assigned to postgres-pod service account used by database pods.
    • +
    • crd/postgresqls.cpo.opensource.cybertec.at - Schema for PostgreSQL cluster definitions.
    • +
    • clusterrole/postgres-operator:users:{admin,edit,view} - If rbac.createAggregateClusterRoles is set then user +facing roles are added for accessing the postgresqls CRDs.
    • +
    +

    The cluster chart creates an instance of postgresqls CRD, which will be called cluster manifest from here on. When this +cluster manifest is created operator will create the needed resources for the cluster. These include:

    +
      +
    • +

      statefulset/$clustername - StatefulSet is responsible for creating and managing database pods and their associated +PersistentVolumeClaims for storing the databases. Each database pod will run internally an instance of Patroni +process, which will coordinate over the Kubernetes API initialization of the database, startup, leader election +and other control plane actions.

      +
    • +
    • +

      service/$clustername,endpoints/$clustername - The main access point for users accessing the database. When load +balancer is enabled in the CRD or multisite mode is enabled, this service will be set to be a LoadBalancer service and +accessible from outside the Kubernetes cluster. The service is created without a selector. Instead, for leader +elections database pods will update the IP address of this endpoint to point to the current leader.

      +

      The endpoint also holds annotations that determine the duration of the leader lease.

      +

      In multicluster operation mode the standby site leader will be in read-only mode.

      +
    • +
    • +

      service/$clustername-repl - Service that points to non-leader (read-only) instances of the database cluster.

      +
    • +
    • +

      service/$clustername-config - A headless service with an endpoint that holds Patroni configuration in annotations.

      +
    • +
    • +

      poddisruptionbudget/postgres-$clustername-pdb - A pod disruption budget that does not allow Kubernetes to shut +down pods in leader role. On some Kubernetes clusters kubernetes.enable_pod_disruption_budgets may need to be +turned off to allow nodes to be drained for upgrades.

      +
    • +
    +
    +

    + Multisite mode +

    + + + +
    +

    In multisite operation mode there are multiple independent Kubernetes clusters with operators capable of independent +operation. To coordinate which site has the current leader process the database pods use a shared etcd cluster to +store a leader lease.

    +

    Multisite interactions

    +

    During bootstrap the first site to acquire the leader lease gets to initialize the database contents. Secondary +sites are configured to replicate from primary site using Patroni’s standby_cluster mechanism.

    +

    To be able to communicate between Kubernetes clusters a LoadBalancer service is needed. For this the operator +automatically turns the primary service of the cluster to be of kind LoadBalancer. Operator will wait for an +external IP address to be assigned to this service and passes this information to the database pod. The leader of +each site, whether primary or standby site, will periodically advertise the externally visible IP address for their +site in etcd. Based on this the standby site can configure the standby cluster mechanism to replicate from primary +site.

    +
    +

    + Deployment +

    + + + +
    +

    In multisite mode postgres-operator can manage a replicated PostgreSQL cluster that is deployed across multiple +Kubernetes clusters. Multisite operation can be turned on on a cluster by cluster basis, or can be configured to +default to on for all cluster managed by a single operator.

    +

    Setting up a GR deployment consists of the following steps:

    +
      +
    1. Creating a shared etcd cluster.
    2. +
    3. Configuring multisite operation parameters for the postgres-operator.
    4. +
    5. Creating a multisite enabled cluster.
    6. +
    +
    +

    + Etcd deployment +

    + + + +
    +

    Multisite operation mode requires an etcd cluster to achieve consensus on which site gets to accept write +transactions. This functionality is critical to avoid situations where multiple site accept incompatible writes that +cannot be reconciliated, also known as a split brain scenario.

    +

    A highly available etcd cluster consists of an odd number of nodes, at least 3. It is very important that a quorum +of etcd instances (for 3 node clusters, any two instances) do not share a single point of failure. Otherwise the +write availability of database clusters is limited to this single point of failure. Effectively this means that to +protect 3 node etcd clusters from whole site failure, any site can only contain 1 etcd node and there needs to be +at least 3 sites.

    +

    Postgres-operator is agnostic to the exact method of etcd setup, but for ease of use there is a +Helm chart packaged that demonstrates the +setup.

    +
    +

    + Example etcd setup +

    + + + +
    +

    This example uses one etcd instance deployed outside Kubernetes cluster as quorum. This etcd needs to be started +with the following configuration. Note that IP address that is advertised must be routed to the host that runs this +etcd.

    +
    ETCD_NAME=quorum
    +ETCD_INITIAL_CLUSTER=quorum=http://10.100.1.100:2380
    +ETCD_INITIAL_ADVERTISE_PEER_URLS=http://10.100.1.100:2380
    +ETCD_INITIAL_CLUSTER_TOKEN=hpe_etcd
    +ETCD_ADVERTISE_CLIENT_URLS=http://10.100.1.100:2379
    +ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
    +ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
    +

    Kubernetes clusters can then be joined to this node. This needs to be a two step process as typically the externally +visible IP address or port is not known before creating the LoadBalancer service. For this first create a free standing +loadbalancer service that will be overwritten by the Helm chart.

    +
    helm template global-etcd ./etcd-helm/ -f etcd-helm/site_a.yaml \
    +| awk '/service.yaml/{flag=1;next}/---/{flag=0}flag' \
    +| kubectl apply -f -
    +

    Then check what external IP address the load balancer service got assigned to it.

    +
    $ kubectl get svc -l app.kubernetes.io/instance=global-etcd
    +NAME                    TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)                         AGE
    +global-etcd-etcd-helm   LoadBalancer   10.109.171.146   10.200.1.101     2379:32488/TCP,2380:30336/TCP   17h
    +

    And set in the values for the helm chart:

    +
      +
    1. Unique name of the site.
    2. +
    3. Externally visible IP address of this service
    4. +
    5. IP address of existing etcd service.
    6. +
    7. Peer list that includes both existing and to be added etcd instance.
    8. +
    +

    Example:

    +
    site:
    +  name: site_a
    +  host: 10.100.2.101
    +
    +etcd:
    +  existing_etcd_cluster_hostname: 10.100.1.100
    +  token: hpe_etcd
    +  state: existing
    +  peers:
    +  #Peers should only include working peers and the current one
    +  - quorum=http://10.100.1.100:2380
    +  - site_a_etcd0=http://10.100.2.101:2380
    +  client_port: 2379
    +  peer_port: 2380
    +

    Then install the helm chart:

    +
    helm install global-etcd ./etcd-helm/ -f etcd-helm/site_a.yaml
    +

    This then needs to be repeated for the other site.

    +
    +

    + Configuring operator for multisite operations +

    + + + +
    +

    Multisite operation needs at a minimum the configuration options multisite.etcd_host, multisite.site +and multisite.enabled. All of them can be configured either in operator configuration or per cluster.

    +

    multisite.etcd_host needs to point at the global etcd. The port is currently assumed to be 2379. Normally +all clusters under one operator would be using the same etcd clusters, so it makes sense to configure it +in the operator configuration. At runtime database pods will discover the whole etcd cluster member list +and will also take notice of any membership changes. It is enough to use local etcd instance service name +here.

    +

    multisite.site is a unique identifier for this site. It will be prefixed to globally advertised database pod names +to distinguish them from pods in other sites. This also makes sense in the operator configuration.

    +

    multisite.enabled turns of the multisite behavior. Typically it would make sense to control this at the +cluster level, but the default could be turned on globally.

    +

    These parameters are exposed in Helm chart values file as configMultisite.*.

    +

    Example config:

    +
    $ kubectl get opconfig/postgres-operator -o yaml | grep multisite -B1 -A3
    +  min_instances: -1
    +  multisite:
    +    etcd_host: global-etcd-etcd-helm.default.svc.cluster.local
    +    site: s1
    +  postgres_pod_resources:
    +

    This needs to be repeated with a different site name in the second Kubernetes cluster.

    +
    +

    + Creating a multisite enabled postgres cluster +

    + + + +
    +

    If the operator is configured for multisite operation then creating a multisite cluster only needs +enabling of the multisite mode.

    +

    Here is an example values file to use for creating multisite enabled clusters:

    +
    apiVersion: cpo.opensource.cybertec.at/v1
    +kind: postgresql
    +metadata:
    +  name: multisite-cluster
    +  namespace: cpo
    +  labels:
    +    app.kubernetes.io/name: postgres-cluster
    +    app.kubernetes.io/instance: multisite-cluster 
    +spec:
    +  dockerImage: docker.io/cybertecpostgresql/cybertec-pg-container:postgres-multisite-17.4-1
    +  numberOfInstances: 1
    +  postgresql:
    +    version: '17'
    +  resources:
    +    limits:
    +      cpu: 500m
    +      memory: 500Mi
    +    requests:
    +      cpu: 500m
    +      memory: 500Mi
    +  teamId: acid
    +  volume:
    +    size: 5Gi
    +  patroni:
    +    ttl: 30
    +    loop_wait: 10
    +    retry_timeout: 10
    +    multisite:
    +      enable: true
    +

    There is no coordination needed between creating the two or more sites and they can use identical +configuration. The clusters need to be in the same namespace and have the same name to be considered +the same cluster. The first cluster to boot up will acquire multisite leader status and will bootstrap +the database. The other clusters will automatically fetch a copy from the leader cluster and start +replicating.

    +

    Multisite operation needs that the database cluster are capable of communicating with each other. +To do this a load balancer service is created in each cluster for the cluster leader. The operator +then waits for an external IP to be assigned and injects it into the database pods to be used for +advertising their identity.

    +
    +

    + Observing operations +

    + + + +
    +

    If database pods have not been created, the first place to check for information is operator logs. Operator logs can +be checked with the following command (add –follow if you want to observe in real-time):

    +
    kubectl logs $(kubectl get po -l 'app.kubernetes.io/name=postgres-operator' -o name)
    +

    The logs for a successful cluster creation look like this

    +
    time="2023-02-22T15:24:12Z" level=info msg="ADD event has been queued" cluster-name=cpo/multisite-cluster pkg=controller worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="creating a new Postgres cluster" cluster-name=cpo/multisite-cluster pkg=controller worker=1
    +time="2023-02-22T15:24:12Z" level=warning msg="master is not running, generated master endpoint does not contain any addresses" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="endpoint \"cpo/multisite-cluster\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=debug msg="final load balancer source ranges as seen in a service spec (not necessarily applied): [\"0.0.0.0/0\"]" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="master service \"cpo/multisite-cluster\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="replica service \"cpo/multisite-cluster-repl\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=debug msg="team API is disabled" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=debug msg="team API is disabled" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="users have been initialized" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=info msg="syncing secrets" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:12Z" level=debug msg="created new secret cpo/postgres.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at, namespace: default, uid: 75ded2eb-a2c9-4968-a1d7-50d2996baeb3" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=debug msg="created new secret cpo/standby.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at, namespace: default, uid: 45a2560a-65a8-4bd5-954f-34d80d8a1894" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=info msg="secrets have been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=info msg="pod disruption budget \"cpo/postgres-multisite-cluster-pdb\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=info msg="waiting for load balancer IP to be assigned" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=debug msg="created new statefulset \"cpo/multisite-cluster\", uid: \"b83647ea-17f6-40aa-aa0c-b1111e76cdc0\"" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=info msg="statefulset \"cpo/multisite-cluster\" has been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:13Z" level=info msg="waiting for the cluster being ready" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:16Z" level=debug msg="Waiting for 1 pods to become ready" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="pods are ready" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="Create roles" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=debug msg="closing database connection" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="users have been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=debug msg="closing database connection" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="databases have been successfully created" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found pod disruption budget: \"cpo/postgres-multisite-cluster-pdb\" (uid: \"986a0118-83e7-4736-9843-ec80c0ea9270\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found statefulset: \"cpo/multisite-cluster\" (uid: \"b83647ea-17f6-40aa-aa0c-b1111e76cdc0\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found secret: \"cpo/postgres.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at\" (uid: \"75ded2eb-a2c9-4968-a1d7-50d2996baeb3\") namesapce: default" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found secret: \"cpo/standby.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at\" (uid: \"45a2560a-65a8-4bd5-954f-34d80d8a1894\") namesapce: default" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found master endpoint: \"cpo/multisite-cluster\" (uid: \"d9f7870e-dd51-4a88-a36a-1c2eb258a31c\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found master service: \"cpo/multisite-cluster\" (uid: \"4b30df50-ca53-4def-8171-b792c4eefc17\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found replica service: \"cpo/multisite-cluster-repl\" (uid: \"a77c3a49-3eea-4b6b-92b1-032e13d78f02\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found pod: \"cpo/multisite-cluster-0\" (uid: \"9b31d378-c9eb-4c1a-8637-e78933187ed7\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="found PVC: \"cpo/pgdata-multisite-cluster-0\" (uid: \"03e66572-27ed-42b4-87bd-825d32131d36\")" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=debug msg="syncing connection pooler (master, replica) from (false, nil) to (false, false)" cluster-name=cpo/multisite-cluster pkg=cluster worker=1
    +time="2023-02-22T15:24:28Z" level=info msg="cluster has been created" cluster-name=cpo/multisite-cluster pkg=controller worker=1
    +

    When database pods have been created, then Patroni logs can be checked from the pod logs:

    +
    kubectl logs multisite-cluster-0
    +

    Successful start of first database pod will have amongst other output the following lines:

    +
    . . .
    +# Kubernetes API access
    +2023-02-22 15:24:21,061 INFO: Selected new K8s API server endpoint https://192.168.49.2:8443
    +. . .
    +# Set ourselves as multisite leader
    +2023-02-22 15:24:21,218 INFO: Selected new etcd server http://192.168.50.101:2379
    +2023-02-22 15:24:21,348 INFO: Running multisite consensus.
    +2023-02-22 15:24:21,349 INFO: Touching member s1-multisite-cluster with {'host': '192.168.49.103', 'port': 5432}
    +2023-02-22 15:24:21,447 INFO: Became multisite leader
    +. . .
    +# Initializing a new empty database
    +2023-02-22 15:24:21,563 INFO: trying to bootstrap a new cluster
    +. . .
    +Success. You can now start the database server using:
    +. . .
    +# Database started
    +2023-02-22 15:24:23,934 INFO: postmaster pid=73
    +. . .
    +# Running global database intitialization script
    +2023-02-22 15:24:25,061 INFO: running post_bootstrap
    +. . .
    +# Bootstrap done 
    +2023-02-22 15:24:26,310 INFO: initialized a new cluster
    +. . .
    +# Repeated information about health every 10s
    +2023-02-22 15:24:26,313 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-0
    +2023-02-22 15:24:26,361 INFO: Triggering multisite hearbeat
    +2023-02-22 15:24:26,364 INFO: Running multisite consensus.
    +2023-02-22 15:24:26,364 INFO: Multisite has leader and it is us
    +2023-02-22 15:24:26,409 INFO: Updated multisite leader lease
    +2023-02-22 15:24:26,409 INFO: Touching member s1-multisite-cluster with {'host': '192.168.49.103', 'port': 5432}
    +2023-02-22 15:24:26,422 INFO: no action. I am (multisite-cluster-0), the leader with the lock
    +. . .
    +

    Bootstrap of standby on primary site will have these lines:

    +
    . . .
    +# Determine leader
    +2023-02-22 15:47:04,552 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-1
    +2023-02-22 15:47:04,677 INFO: trying to bootstrap from leader 'multisite-cluster-0'
    +. . .
    +# Data copied to replica successfully
    +2023-02-22 15:47:06,805 INFO: replica has been created using basebackup_fast_xlog
    +2023-02-22 15:47:06,807 INFO: bootstrapped from leader 'multisite-cluster-0'
    +# Postgres up
    +2023-02-22 15:47:07,205 INFO: postmaster pid=73
    +. . .
    +# Normal operation
    +2023-02-22 15:47:08,380 INFO: no action. I am (multisite-cluster-1), a secondary, and following a leader (multisite-cluster-0)
    +

    Standby cluster will have the following information:

    +
    . . .
    +# Discovering multisite status
    +2023-02-22 15:49:58,406 INFO: Running multisite consensus.
    +2023-02-22 15:49:58,407 INFO: Touching member s2-multisite-cluster with {'host': '192.168.50.103', 'port': 5432}
    +2023-02-22 15:49:58,454 INFO: Multisite has leader and it is s1-multisite-cluster
    +2023-02-22 15:49:58,454 INFO: Multisite replicate from Member(index='118', name='s1-multisite-cluster', session='4113060022582527194', data={'host': '192.168.49.103', 'port': 5432})
    +2023-02-22 15:49:58,454 INFO: Setting standby configuration to: {'host': '192.168.49.103', 'port': 5432}
    +2023-02-22 15:49:58,455 INFO: Touching member s2-multisite-cluster with {'host': '192.168.50.103', 'port': 5432}
    +. . .
    +# Acquiring standby site leader status and starting copy from primary site
    +2023-02-22 15:49:58,290 INFO: Lock owner: None; I am multisite-cluster-0
    +2023-02-22 15:49:58,566 INFO: trying to bootstrap a new standby leader
    +. . .
    +# Replica creation successful
    +2023-02-22 15:50:00,326 INFO: replica has been created using basebackup
    +2023-02-22 15:50:00,327 INFO: bootstrapped clone from remote master postgresql://192.168.49.103:5432
    +# Postgres started
    +2023-02-22 15:50:00,577 INFO: postmaster pid=58
    +. . .
    +# Normal operation output of standby leader
    +2023-02-22 15:50:01,835 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-0
    +2023-02-22 15:50:01,886 INFO: Triggering multisite hearbeat
    +2023-02-22 15:50:01,888 INFO: Running multisite consensus.
    +2023-02-22 15:50:01,888 INFO: Multisite has leader and it is s1-multisite-cluster
    +2023-02-22 15:50:01,888 INFO: Multisite replicate from Member(index='118', name='s1-multisite-cluster', session='4113060022582527194', data={'host': '192.168.49.103', 'port': 5432})
    +2023-02-22 15:50:01,888 INFO: Touching member s2-multisite-cluster with {'host': '192.168.50.103', 'port': 5432}
    +2023-02-22 15:50:01,899 INFO: no action. I am (multisite-cluster-0), the standby leader with the lock
    +

    In case access to PostgreSQL logs is needed, the easiest way is to exec into a running database pod +with kubectl exec -it multisite-cluster-0 -- bash and view the files there. Logs are stored +as /home/postgres/pgdata/pgroot/pg_log/postgresql-*.csv, with one file per weekday.

    +

    Replication state can be queried from PostgreSQL:

    +
    kubectl exec -it $(kubectl get -o name po -l 'spilo-role=master,cluster-name=multisite-cluster') -- su postgres -c \
    +   'psql -xc "SELECT application_name, client_addr, backend_start, write_lag FROM pg_stat_replication"'
    +

    To check how multisite mode is doing one option is to check the etcd state. For example by executing +in any one of your database pods:

    +
    kubectl exec multisite-cluster-0 -- bash -c \
    +'ETCDCTL_API=3 etcdctl --endpoints=http://${MULTISITE_ETCD_HOST}:2379 \
    + get /multisite/${POD_NAMESPACE}/${SCOPE}/{leader,members0}'
    +

    This will output state stored in etcd. Example:

    +
    /multisite/cpo/multisite-cluster/leader
    +s1-multisite-cluster
    +/multisite/cpo/multisite-cluster/members/s1-multisite-cluster
    +{"host":"192.168.49.102","port":5432}
    +/multisite/cpo/multisite-cluster/members/s2-multisite-cluster
    +{"host":"192.168.50.102","port":5432}
    +

    Each cluster state is stored with the prefix /multisite/$NAMESPACE/$CLUSTER_NAME. In this state +there is /leader key storing current leader of the cluster and /members/$SITE_$CLUSTER_NAME for +each sites externally visible service.

    +
    +

    + Triggering switchover manually +

    + + + +
    +

    Sometimes it is necessary to move leader role from one site to another. For this the operator REST API has an endpoint +named /clusters/$namespace/$cluster/multisite/. This accepts a POST request with a request JSON. The document has the +following attributes:

    +
      +
    • switchover_to: name of the site that should become the new multisite leader.
    • +
    +

    Example:

    +
    curl --data-raw '{"switchover_to": "s1"}' -H "Content-type: application/json" \
    +    http://postgres-operator.default.svc.cluster.local:8080/clusters/cpo/multisite-cluster/multisite/
    +

    The POST request to this endpoint will return immediately when the switchover request has been registered. The +actual switchover process will take some time to coordinate.

    +
    +

    + Observing multisite status +

    + + + +
    +

    Current multisite status is published to cluster CRD status subresource in Multisite field. The possible values +are Leader and Standby. When the role changes there will also be an event published.

    +

    Example output from a kubectl describe on the cluster CRD resource:

    +
    Status:
    +  Multisite:                Leader
    +  Postgres Cluster Status:  Running
    +Events:
    +  Type    Reason   Age   From     Message
    +  ----    ------   ----  ----     -------
    +  Normal  Promote  13s   patroni  Acquired multisite leader status
    +

    Ouptut from the standby side:

    +
    Status:
    +Multisite:                Standby
    +Postgres Cluster Status:  Running
    +Events:
    +Type    Reason     Age   From               Message
    +  ----    ------     ----  ----               -------
    +Normal  Demote     62s   patroni            Lost leader lock to s1-multisite-cluster
    +Normal  Multisite  97s   postgres-operator  Multisite switching over to "multisite-cluster" at site "s1"
    +Normal  Multisite  97s   postgres-operator  Successfully started switchover to "multisite-cluster" at "s1"
    +
    +

    + Development environment tips +

    + + + +
    +
    +

    + MetalLB based cross cluster communication with minikube +

    + + + +
    +

    Minikube is a useful distribution for deploying development Kubernetes clusters. With a bit of configuration it is +possible to set up 2 Minikube clusters with MetalLB deployed so that MetalLB assigned IP addresses are accessible +from the other cluster.

    +

    Pre-requisite is to have 2 virtual machines that either are in the same L2 network, or that have a subnet routed to +them.

    +

    This example is based on docker based deployment, same approach might work with other deployment options (e.g. +Virtualbox), but may require some extra configuration tuning.

    +

    Start minikube’s on the two hosts using different internal subnets, and configure and enable the metallb addon to +assign IP addresses from this subnet. The subnets chosen should not be in use for services needed by these two VMs, +but other hosts are not affected by the choice of the subnets.

    +
    # Host A
    +minikube start --subnet=192.168.49.2
    +minikube addons configure metallb
    +-- Enter Load Balancer Start IP: 192.168.49.100
    +-- Enter Load Balancer End IP: 192.168.49.200
    +    ▪ Using image docker.io/metallb/speaker:v0.9.6
    +    ▪ Using image docker.io/metallb/controller:v0.9.6
    +✅  metallb was successfully configured
    +minikube addons enable metallb
    +
    +# Host B
    +minikube start --subnet=192.168.50.2
    +minikube addons configure metallb
    +-- Enter Load Balancer Start IP: 192.168.50.100
    +-- Enter Load Balancer End IP: 192.168.50.200
    +    ▪ Using image docker.io/metallb/speaker:v0.9.6
    +    ▪ Using image docker.io/metallb/controller:v0.9.6
    +✅  metallb was successfully configured
    +minikube addons enable metallb
    +

    On both hosts turn on ip forwarding in sysctl.conf and reload it with sysctl -p

    +
    net.ipv4.ip_forward=1
    +

    In IP tables allow forwarding:

    +
    sudo iptables -A FORWARD -j ACCEPT
    +

    Configure on each host routing to access the other clusters metallb IP range via the other VMs IP address (need to +replace IP addresses and network interfaces with actual ones from the VMs):

    +
    # Host A
    +sudo ip route add 192.168.50.0/24 via 192.168.2.12 dev eth1
    +# Host B
    +sudo ip route add 192.168.49.0/24 via 192.168.2.11 dev eth1
    +

    To check if load balancer works, here’s an example HTTP service:

    +
    apiVersion: apps/v1
    +kind: Deployment
    +metadata:
    +  name: hello-blue-whale
    +spec:
    +  replicas: 1
    +  selector:
    +    matchLabels:
    +      app: hello-blue-whale-app
    +  template:
    +    metadata:
    +      name: hello-blue-whale-pod
    +      labels:
    +        app: hello-blue-whale-app
    +    spec:
    +      containers:
    +      - name: hello-blue-whale-container
    +        image: vamsijakkula/hello-blue-whale:v1
    +        ports:
    +        - containerPort: 80
    +---
    +apiVersion: v1
    +kind: Service
    +metadata:
    +  name: hello-blue-whale-svc
    +  labels:
    +    app: hello-blue-whale-app
    +spec:
    +  selector:
    +    app: hello-blue-whale-app
    +  type: LoadBalancer
    +  ports:
    +  - port: 80
    +    targetPort: 80
    +

    Then check what external ip got assigned to the service (should be the first IP from the range given above).

    +
    kubectl get svc/hello-blue-whale-svc
    +

    And then from the other host use curl to see if the service can be accessed.

    +
    curl -v http://192.168.49.100/
    +

    Other hosts on the same network can have the same routes added to access services in the clusters. If access from +other networks is needed, then the chosen subnets need to be routed to these VMs across your network.

    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/multisite/index.xml b/docs/hugo/public/multisite/index.xml new file mode 100644 index 000000000..55d84c9fa --- /dev/null +++ b/docs/hugo/public/multisite/index.xml @@ -0,0 +1,12 @@ + + + + Multisite on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/multisite/ + Recent content in Multisite on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/pg-versioning/index.html b/docs/hugo/public/pg-versioning/index.html new file mode 100644 index 000000000..781be669b --- /dev/null +++ b/docs/hugo/public/pg-versioning/index.html @@ -0,0 +1,5179 @@ + + + + + + + + + + + + + Major version Upgrade | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Major version Upgrade

    +
    + +
    +

    CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.

    +
    +

    PAY ATTENTION: Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.

    +
    +

    + How does the upgrade work? +

    + + + +
    +
    +

    + Preconditions: +

    + + + +
    +
      +
    1. Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to.
    2. +
    3. Check - Check that the new PGVERSION is larger than the previously used one.
    4. +
    5. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.
    6. +
    +
    +

    + Preliminary checks +

    + + + +
    +
      +
    1. use initdb to prepare a new data_dir (data_new) based on the new PGVERSION.
    2. +
    3. check the upgrade possibility with pg_upgrade --check
    4. +
    +
    +

    HINT: If one of the steps is aborted, a cleanup is performed

    +
    +

    + Prepare the Upgrade +

    + + + +
    +
      +
    1. remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit.
    2. +
    3. activate the maintenance mode of the cluster
    4. +
    5. terminate PostgreSQL in an orderly manner
    6. +
    7. check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location
    8. +
    9. use port 5432 for rsyncd and start it
    10. +
    +
    +

    + Start the Upgrade +

    + + + +
    +
      +
    1. Call pg_upgrade -k to start the Upgrade
    2. +
    +
    +

    ATTENTION if the process failed, we need to rollback, if it was sucessful we’re reaching the point of no return

    +
      +
    1. Rename the directories. data -> data_old and data_new -> data
    2. +
    3. Update the Patroni.config (postgres.yml)
    4. +
    5. Call Checkpoint on every replica and trigger rsync on the Replicas
    6. +
    7. Wait for Replicas to complete rsxnc. Timeout: 300
    8. +
    9. Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid
    10. +
    11. Start Patroni on the Primary and start the postgres locally
    12. +
    13. Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads
    14. +
    15. Wait for every Replica to become ready
    16. +
    17. Disable the maintenance mode for the Cluster
    18. +
    19. Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade
    20. +
    +
    +

    + Completion of the upgrade +

    + + + +
    +
      +
    1. Drop directory data_old
    2. +
    3. Trigger new Backup
    4. +
    +
    +

    + How a rollback is working? +

    + + + +
    +
      +
    1. Stop rsynd if its running
    2. +
    3. Disable the maintenance mode for the Cluster
    4. +
    5. Drop directory data_new
    6. +
    +
    +

    + How to trigger a In-Place-Upgrade with cpo? +

    + + + +
    +
    spec:
    +  postgresql:
    +    version: "17"
    +

    To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above. +If you choosse a not allowed value, you will give an error and if you decrease the value, the operator will just ignore it with the following log-Entry.

    +
    Operator-Log
    +
    +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/pg-versioning/index.xml b/docs/hugo/public/pg-versioning/index.xml new file mode 100644 index 000000000..f6e7eb01d --- /dev/null +++ b/docs/hugo/public/pg-versioning/index.xml @@ -0,0 +1,12 @@ + + + + Major version Upgrade on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/pg-versioning/ + Recent content in Major version Upgrade on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/pg_versioning/_index-copy/index.html b/docs/hugo/public/pg_versioning/_index-copy/index.html new file mode 100644 index 000000000..a0d484da6 --- /dev/null +++ b/docs/hugo/public/pg_versioning/_index-copy/index.html @@ -0,0 +1,5292 @@ + + + + + + + + + + + + + Major version Upgrade | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Major version Upgrade

    +
    +
    + +

    CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.

    +
    +

    PAY ATTENTION: Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.

    +
    +

    + How does the upgrade work? +

    + + + +
    +
    +

    + Preconditions: +

    + + + +
    +
      +
    1. Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to.
    2. +
    3. Check - Check that the new PGVERSION is larger than the previously used one.
    4. +
    5. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.
    6. +
    +
    +

    + Preliminary checks +

    + + + +
    +
      +
    1. use initdb to prepare a new data_dir (data_new) based on the new PGVERSION.
    2. +
    3. check the upgrade possibility with pg_upgrade --check
    4. +
    +
    +

    HINT: If one of the steps is aborted, a cleanup is performed

    +
    +

    + Prepare the Upgrade +

    + + + +
    +
      +
    1. remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit.
    2. +
    3. activate the maintenance mode of the cluster
    4. +
    5. terminate PostgreSQL in an orderly manner
    6. +
    7. check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location
    8. +
    9. use port 5432 for rsyncd and start it
    10. +
    +
    +

    + Start the Upgrade +

    + + + +
    +
      +
    1. Call pg_upgrade -k to start the Upgrade
    2. +
    +
    +

    ATTENTION if the process failed, we need to rollback, if it was sucessful we’re reaching the point of no return

    +
      +
    1. Rename the directories. data -> data_old and data_new -> data
    2. +
    3. Update the Patroni.config (postgres.yml)
    4. +
    5. Call Checkpoint on every replica and trigger rsync on the Replicas
    6. +
    7. Wait for Replicas to complete rsxnc. Timeout: 300
    8. +
    9. Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid
    10. +
    11. Start Patroni on the Primary and start the postgres locally
    12. +
    13. Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads
    14. +
    15. Wait for every Replica to become ready
    16. +
    17. Disable the maintenance mode for the Cluster
    18. +
    19. Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade
    20. +
    +
    +

    + Completion of the upgrade +

    + + + +
    +
      +
    1. Drop directory data_old
    2. +
    3. Trigger new Backup
    4. +
    +
    +

    + How a rollback is working? +

    + + + +
    +
      +
    1. Stop rsynd if its running
    2. +
    3. Disable the maintenance mode for the Cluster
    4. +
    5. Drop directory data_new
    6. +
    +
    +

    + How to trigger a In-Place-Upgrade with cpo? +

    + + + +
    +
    spec:
    +  postgresql:
    +    version: "17"
    +

    To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above. +If you choosse a not allowed value, you will give an error and if you decrease the value, the operator will just ignore it with the following log-Entry.

    +
    Operator-Log
    +
    +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/pg_versioning/index.html b/docs/hugo/public/pg_versioning/index.html new file mode 100644 index 000000000..d26869d33 --- /dev/null +++ b/docs/hugo/public/pg_versioning/index.html @@ -0,0 +1,5081 @@ + + + + + + + + + + + + PG versioning | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    PG versioning

    +
    + +
    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/pg_versioning/index.xml b/docs/hugo/public/pg_versioning/index.xml new file mode 100644 index 000000000..4e5acfbef --- /dev/null +++ b/docs/hugo/public/pg_versioning/index.xml @@ -0,0 +1,26 @@ + + + + PG versioning on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/ + Recent content in PG versioning on CYBERTEC-PG-Operator + Hugo + en + Thu, 28 Dec 2023 14:26:51 +0100 + + + Minor version update + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/minor_updates/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/minor_updates/ + <p>Minor version updates for PostgreSQL are performed by updating the PostgreSQL container image in use. With the update object <code>spec.dockerImage</code> of the cluster manifest, the operator takes over the update based on the rolling update strategy. This means that the pods are replaced one after the other, with the replicas being updated first and then the old primary after a switchover. The operational interruption should generally last less than 5 seconds (switchover time), but the clients must still reconnect.</p> + + + Major version upgrade + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/ + Thu, 28 Dec 2023 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/ + <p>CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.</p> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.</div> </blockquote> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="how-does-the-upgrade-work" > How does the upgrade work? </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#how-does-the-upgrade-work" class="gdoc-page__anchor clip flex align-center" title="Anchor to: How does the upgrade work?" aria-label="Anchor to: How does the upgrade work?" href="#how-does-the-upgrade-work"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="preconditions" > Preconditions: </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#preconditions" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Preconditions:" aria-label="Anchor to: Preconditions:" href="#preconditions"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>Pod restart - Use the rolling update strategy to replace all pods based on the new ENV <code>PGVERSION</code> with the version you want to update to.</li> <li>Check - Check that the new <code>PGVERSION</code> is larger than the previously used one.</li> <li>Check whether the new <code>PGVERSION</code> is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.</li> </ol> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="preliminary-checks" > Preliminary checks </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#preliminary-checks" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Preliminary checks" aria-label="Anchor to: Preliminary checks" href="#preliminary-checks"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>use initdb to prepare a new data_dir (<code>data_new</code>) based on the new <code>PGVERSION</code>.</li> <li>check the upgrade possibility with <code>pg_upgrade --check</code></li> </ol> <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">If one of the steps is aborted, a cleanup is performed</div> </blockquote> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="prepare-the-upgrade" > Prepare the Upgrade </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#prepare-the-upgrade" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Prepare the Upgrade" aria-label="Anchor to: Prepare the Upgrade" href="#prepare-the-upgrade"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>remove dependencies that can cause problems. For example, the extensions <code>pg_stat_statements</code> and <code>pgaudit</code>.</li> <li>activate the maintenance mode of the cluster</li> <li>terminate PostgreSQL in an orderly manner</li> <li>check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location</li> <li>use port <code>5432</code> for rsyncd and start it</li> </ol> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="start-the-upgrade" > Start the Upgrade </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#start-the-upgrade" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Start the Upgrade" aria-label="Anchor to: Start the Upgrade" href="#start-the-upgrade"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>Call pg_upgrade -k to start the Upgrade <blockquote class="gdoc-hint info"> <div class="gdoc-hint__title flex align-center"><i class="fa info" title="Info"></i></div> <div class="gdoc-hint__text">if the process failed, we need to rollback, if it was sucessful we&rsquo;re reaching the point of no return</div> </blockquote> </li> <li>Rename the directories. <code>data -&gt; data_old</code> and <code>data_new -&gt; data</code></li> <li>Update the Patroni.config (<code>postgres.yml</code>)</li> <li>Call Checkpoint on every replica and trigger rsync on the Replicas</li> <li>Wait for Replicas to complete rsxnc. <code>Timeout: 300</code></li> <li>Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid</li> <li>Start Patroni on the Primary and start the postgres locally</li> <li>Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads</li> <li>Wait for every Replica to become ready</li> <li>Disable the maintenance mode for the Cluster</li> <li>Restore custom statistics, analyze these tables and restore dropped objetcs from <code>Prepare the upgrade</code></li> </ol> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="completion-of-the-upgrade" > Completion of the upgrade </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#completion-of-the-upgrade" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Completion of the upgrade" aria-label="Anchor to: Completion of the upgrade" href="#completion-of-the-upgrade"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>Drop directory <code>data_old</code></li> <li>Trigger new Backup</li> </ol> <div class="flex align-center gdoc-page__anchorwrap"> <h3 id="how-a-rollback-is-working" > How a rollback is working? </h3> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#how-a-rollback-is-working" class="gdoc-page__anchor clip flex align-center" title="Anchor to: How a rollback is working?" aria-label="Anchor to: How a rollback is working?" href="#how-a-rollback-is-working"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ol> <li>Stop rsynd if its running</li> <li>Disable the maintenance mode for the Cluster</li> <li>Drop directory <code>data_new</code></li> </ol> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="how-to-trigger-a-in-place-upgrade-with-cpo" > How to trigger a In-Place-Upgrade with cpo? </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/#how-to-trigger-a-in-place-upgrade-with-cpo" class="gdoc-page__anchor clip flex align-center" title="Anchor to: How to trigger a In-Place-Upgrade with cpo?" aria-label="Anchor to: How to trigger a In-Place-Upgrade with cpo?" href="#how-to-trigger-a-in-place-upgrade-with-cpo"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <pre tabindex="0"><code>spec: postgresql: version: &#34;17&#34; </code></pre><p>To trigger an In-Place-Upgrade you have just to increase the parameter <code>spec.postgresql.version</code>. If you choose a valid number the Operator will start with the prozedure, described above.</p> + + + diff --git a/docs/hugo/public/pg_versioning/major_upgrades-copy/index.html b/docs/hugo/public/pg_versioning/major_upgrades-copy/index.html new file mode 100644 index 000000000..7fac46bec --- /dev/null +++ b/docs/hugo/public/pg_versioning/major_upgrades-copy/index.html @@ -0,0 +1,5343 @@ + + + + + + + + + + + + + Major version Upgrade | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Major version Upgrade

    +
    +
    + +

    CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.

    +
    +

    PAY ATTENTION: Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.

    +
    +

    + How does the upgrade work? +

    + + + +
    +
    +

    + Preconditions: +

    + + + +
    +
      +
    1. Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to.
    2. +
    3. Check - Check that the new PGVERSION is larger than the previously used one.
    4. +
    5. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.
    6. +
    +
    +

    + Preliminary checks +

    + + + +
    +
      +
    1. use initdb to prepare a new data_dir (data_new) based on the new PGVERSION.
    2. +
    3. check the upgrade possibility with pg_upgrade --check
    4. +
    +
    +

    HINT: If one of the steps is aborted, a cleanup is performed

    +
    +

    + Prepare the Upgrade +

    + + + +
    +
      +
    1. remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit.
    2. +
    3. activate the maintenance mode of the cluster
    4. +
    5. terminate PostgreSQL in an orderly manner
    6. +
    7. check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location
    8. +
    9. use port 5432 for rsyncd and start it
    10. +
    +
    +

    + Start the Upgrade +

    + + + +
    +
      +
    1. Call pg_upgrade -k to start the Upgrade
    2. +
    +
    +

    ATTENTION if the process failed, we need to rollback, if it was sucessful we’re reaching the point of no return

    +
      +
    1. Rename the directories. data -> data_old and data_new -> data
    2. +
    3. Update the Patroni.config (postgres.yml)
    4. +
    5. Call Checkpoint on every replica and trigger rsync on the Replicas
    6. +
    7. Wait for Replicas to complete rsxnc. Timeout: 300
    8. +
    9. Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid
    10. +
    11. Start Patroni on the Primary and start the postgres locally
    12. +
    13. Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads
    14. +
    15. Wait for every Replica to become ready
    16. +
    17. Disable the maintenance mode for the Cluster
    18. +
    19. Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade
    20. +
    +
    +

    + Completion of the upgrade +

    + + + +
    +
      +
    1. Drop directory data_old
    2. +
    3. Trigger new Backup
    4. +
    +
    +

    + How a rollback is working? +

    + + + +
    +
      +
    1. Stop rsynd if its running
    2. +
    3. Disable the maintenance mode for the Cluster
    4. +
    5. Drop directory data_new
    6. +
    +
    +

    + How to trigger a In-Place-Upgrade with cpo? +

    + + + +
    +
    spec:
    +  postgresql:
    +    version: "17"
    +

    To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above. +If you choosse a not allowed value, you will give an error and if you decrease the value, the operator will just ignore it with the following log-Entry.

    +
    Operator-Log
    +
    +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/pg_versioning/major_upgrades/index.html b/docs/hugo/public/pg_versioning/major_upgrades/index.html new file mode 100644 index 000000000..4a0f24e55 --- /dev/null +++ b/docs/hugo/public/pg_versioning/major_upgrades/index.html @@ -0,0 +1,5275 @@ + + + + + + + + + + + + + Major version upgrade | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Major version upgrade

    +
    +
    + +

    CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.

    + + + + + +
    +
    +
    Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.
    +
    + +
    +

    + How does the upgrade work? +

    + + + +
    +
    +

    + Preconditions: +

    + + + +
    +
      +
    1. Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to.
    2. +
    3. Check - Check that the new PGVERSION is larger than the previously used one.
    4. +
    5. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.
    6. +
    +
    +

    + Preliminary checks +

    + + + +
    +
      +
    1. use initdb to prepare a new data_dir (data_new) based on the new PGVERSION.
    2. +
    3. check the upgrade possibility with pg_upgrade --check
    4. +
    + + + + + +
    +
    +
    If one of the steps is aborted, a cleanup is performed
    +
    + +
    +

    + Prepare the Upgrade +

    + + + +
    +
      +
    1. remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit.
    2. +
    3. activate the maintenance mode of the cluster
    4. +
    5. terminate PostgreSQL in an orderly manner
    6. +
    7. check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location
    8. +
    9. use port 5432 for rsyncd and start it
    10. +
    +
    +

    + Start the Upgrade +

    + + + +
    +
      +
    1. Call pg_upgrade -k to start the Upgrade + + + + + +
      +
      +
      if the process failed, we need to rollback, if it was sucessful we’re reaching the point of no return
      +
      +
    2. +
    3. Rename the directories. data -> data_old and data_new -> data
    4. +
    5. Update the Patroni.config (postgres.yml)
    6. +
    7. Call Checkpoint on every replica and trigger rsync on the Replicas
    8. +
    9. Wait for Replicas to complete rsxnc. Timeout: 300
    10. +
    11. Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid
    12. +
    13. Start Patroni on the Primary and start the postgres locally
    14. +
    15. Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads
    16. +
    17. Wait for every Replica to become ready
    18. +
    19. Disable the maintenance mode for the Cluster
    20. +
    21. Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade
    22. +
    +
    +

    + Completion of the upgrade +

    + + + +
    +
      +
    1. Drop directory data_old
    2. +
    3. Trigger new Backup
    4. +
    +
    +

    + How a rollback is working? +

    + + + +
    +
      +
    1. Stop rsynd if its running
    2. +
    3. Disable the maintenance mode for the Cluster
    4. +
    5. Drop directory data_new
    6. +
    +
    +

    + How to trigger a In-Place-Upgrade with cpo? +

    + + + +
    +
    spec:
    +  postgresql:
    +    version: "17"
    +

    To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above.

    +
    kubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type='merge' -p \
    +'{"spec":{"postgresql":{"version":"17"}}}'
    +
    +

    + Upgrade on cloning +

    + + + +
    +

    When cloning, the new cluster manifest must have a higher version number than the source cluster and is created from a base backup. Depending on the cluster size, the downtime can be considerable in this case, as write operations in the database should be stopped and all WAL files should be archived first before cloning is started. Therefore, only use cloning to test major version upgrades and to check the compatibility of your app with the Postgres server of a higher version.

    +
    +

    + manual upgrade via the PostgreSQL container +

    + + + +
    +

    In this scenario the major version could then be run by a user from within the primary pod. Exec into the container and run:

    +
    python3 /scripts/inplace_upgrade.py N
    +

    where N is the number of members of your cluster (see numberOfInstances). The upgrade is usually fast, well under one minute for most DBs.

    + + + + + +
    +
    +
    Note, that changes become irrevertible once pg_upgrade is called.
    +
    + + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/pg_versioning/minor_updates/index.html b/docs/hugo/public/pg_versioning/minor_updates/index.html new file mode 100644 index 000000000..26e0326a1 --- /dev/null +++ b/docs/hugo/public/pg_versioning/minor_updates/index.html @@ -0,0 +1,5210 @@ + + + + + + + + + + + + + Minor version update | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Minor version update

    +
    +
    + +

    Minor version updates for PostgreSQL are performed by updating the PostgreSQL container image in use. +With the update object spec.dockerImage of the cluster manifest, the operator takes over the update based on the rolling update strategy. This means that the pods are replaced one after the other, with the replicas being updated first and then the old primary after a switchover. The operational interruption should generally last less than 5 seconds (switchover time), but the clients must still reconnect.

    +

    If necessary, the operator also supports the downgrade of minor releases in the same way.

    +

    To install minor version updates, PostgreSQL only requires the binaries to be replaced and the database to be restarted. For more information see PostgreSQL - Versioning Policy

    + + + + + +
    +
    +
    This procedure can also be used for all other containers in a cluster. Whether sidecars, exporter, pooler or backup image
    +
    + +
    +

    + Preconditions: +

    + + + +
    +
      +
    1. Check if there is a newer image for the PostgreSQL container - Check on Docker hub
    2. +
    3. Check - Check that the new PGVERSION is larger than the previously used one.
    4. +
    5. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.
    6. +
    +
    +

    + Updating PostgreSQL-Container-Image +

    + + + +
    +

    Old-Manifest:

    +
    apiVersion: cpo.opensource.cybertec.at/v1
    +kind: postgresql
    +metadata:
    +  name: cluster-1
    +  namespace: cpo
    +spec:
    +  dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.3-1'
    +

    New-Manifest:

    +
    apiVersion: cpo.opensource.cybertec.at/v1
    +kind: postgresql
    +metadata:
    +  name: cluster-1
    +  namespace: cpo
    +spec:
    +  dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1'
    +
    +

    + Updating via kubectl/oc-client +

    + + + +
    +
    kubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type='merge' -p \
    +'{"spec":{"dockerImage":"docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1"}}'
    +
    +

    + Updating Exporter-Container-Image +

    + + + +
    +
    +

    + Updating Cluster-Manifest: +

    + + + +
    +

    Old-Manifest:

    +
    apiVersion: cpo.opensource.cybertec.at/v1
    +kind: postgresql
    +metadata:
    +  name: cluster-1
    +  namespace: cpo
    +spec:
    +  monitor:
    +    image: 'docker.io/cybertecpostgresql/cybertec-pg-container:exporter-17.3-1'
    +

    New-Manifest:

    +
    apiVersion: cpo.opensource.cybertec.at/v1
    +kind: postgresql
    +metadata:
    +  name: cluster-1
    +  namespace: cpo
    +spec:
    +  monitor:
    +    image: 'docker.io/cybertecpostgresql/cybertec-pg-container:exporter-17.4-1'
    +
    +

    + Updating via kubectl/oc-client +

    + + + +
    +
    kubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type='merge' -p \
    +'{"spec":{"monitor":{"image":"docker.io/cybertecpostgresql/cybertec-pg-container:exporter-17.4-1"}}}'
    +
    +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/postgis/index.html b/docs/hugo/public/postgis/index.html new file mode 100644 index 000000000..5568404f9 --- /dev/null +++ b/docs/hugo/public/postgis/index.html @@ -0,0 +1,5168 @@ + + + + + + + + + + + + Postgis | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Postgis

    +
    + +
    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/postgis/index.xml b/docs/hugo/public/postgis/index.xml new file mode 100644 index 000000000..b8c59f485 --- /dev/null +++ b/docs/hugo/public/postgis/index.xml @@ -0,0 +1,19 @@ + + + + Postgis on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/postgis/ + Recent content in Postgis on CYBERTEC-PG-Operator + Hugo + en + Mon, 11 Mar 2024 14:26:51 +0100 + + + Introduction + http://localhost:1313/CYBERTEC-pg-operator/postgis/introduction/ + Mon, 11 Mar 2024 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/postgis/introduction/ + <p>asdasdasd</p> + + + diff --git a/docs/hugo/public/postgis/introduction/index.html b/docs/hugo/public/postgis/introduction/index.html new file mode 100644 index 000000000..f088ef2d6 --- /dev/null +++ b/docs/hugo/public/postgis/introduction/index.html @@ -0,0 +1,5183 @@ + + + + + + + + + + + + + Introduction | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Introduction

    +
    +
    + +

    asdasdasd

    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/print-735ccc12.min.css b/docs/hugo/public/print-735ccc12.min.css new file mode 100644 index 000000000..01994899b --- /dev/null +++ b/docs/hugo/public/print-735ccc12.min.css @@ -0,0 +1 @@ +@media print{.gdoc-nav,.gdoc-footer .container span:not(:first-child),.gdoc-paging,.editpage{display:none}.gdoc-footer{border-top:1px solid #dee2e6}.gdoc-markdown pre{white-space:pre-wrap;overflow-wrap:break-word}.chroma code{border:1px solid #dee2e6;padding:.5rem !important;font-weight:normal !important}.gdoc-markdown code{font-weight:bold}a,a:visited{color:inherit !important;text-decoration:none !important}.gdoc-toc{flex:none}.gdoc-toc nav{position:relative;width:auto}.wrapper{display:block}.wrapper main{display:block}} \ No newline at end of file diff --git a/docs/hugo/public/project/container_images/index.html b/docs/hugo/public/project/container_images/index.html new file mode 100644 index 000000000..02e7d56d1 --- /dev/null +++ b/docs/hugo/public/project/container_images/index.html @@ -0,0 +1,5153 @@ + + + + + + + + + + + + + Container Images | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Container Images

    +
    +
    + +

    For each version of the operator and the required PostgreSQL and other required containers, the corresponding image is provided on Dockerhub.

    +
    +

    + Operator container images +

    + + + +
    +

    The operator images are the central components that control the operation and administration of the PostgreSQL databases. These images are available in the following repository on DockerHub:

    +

    Operator Images

    +

    The repository contains all the necessary images for running the Cybertec PG Operator in a Kubernetes environment. These images are updated regularly to ensure the latest features and security updates.

    +
    +

    + Additional container images +

    + + + +
    +

    In addition to the operator images, various container images are required to support a complete PostgreSQL environment. These images are available in the following repository: +CYBERTEC-PG-Container Images

    +

    This repository contains images for the following components:

    +
      +
    • PostgreSQL: The main database image, which contains all supported major versions of PostgreSQL. The name of the tag always reflects the latest release, e.g. currently 17.4 for PostgreSQL 17.4. For the other major versions, the corresponding minor versions released by the PostgreSQL community at the same time are included.
    • +
    • Postgres-GIS: A specialised image that combines PostgreSQL with the PostGIS extension to support spatial data processing functions. You can find more information about Postgis here.
      +The tag for Postgis also includes the included version of Postgis. Example: postgres-gis-17.4-34-1 Postgis: 3.4.x
    • +
    • PGBackRest: A backup and restore tool developed specifically for PostgreSQL and available as a separate container image.
    • +
    • Exporter: Images for monitoring PostgreSQL databases that collect metrics and make them available for monitoring tools such as Prometheus.
    • +
    • PgBouncer: A lightweight connection pooler for PostgreSQL that manages and optimises the number of concurrent connections.
    • +
    +
    +

    + Extensions +

    + + + +
    +

    You can view the versions included in the Extensions section.

    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/project/index.html b/docs/hugo/public/project/index.html new file mode 100644 index 000000000..04ba09dfb --- /dev/null +++ b/docs/hugo/public/project/index.html @@ -0,0 +1,5072 @@ + + + + + + + + + + + + CPO | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    CPO

    +
    + +
    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/project/index.xml b/docs/hugo/public/project/index.xml new file mode 100644 index 000000000..829df1ce2 --- /dev/null +++ b/docs/hugo/public/project/index.xml @@ -0,0 +1,26 @@ + + + + CPO on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/project/ + Recent content in CPO on CYBERTEC-PG-Operator + Hugo + en + Mon, 11 Mar 2024 14:26:51 +0100 + + + The Project + http://localhost:1313/CYBERTEC-pg-operator/project/project/ + Mon, 11 Mar 2024 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/project/project/ + <p>The CYBERTEC PostgreSQL Operator (CPO) enables the simple provision and management of PostgreSQL clusters on Kubernetes. It reduces the administration effort and facilitates the management of single-node and HA clusters.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="main-components" > Main components </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/project/project/#main-components" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Main components" aria-label="Anchor to: Main components" href="#main-components"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ul> <li><a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-pg-operator" >CYBERTEC-pg-operator</a>: Kubernetes operator for the automation of PostgreSQL clusters.</li> <li><a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-pg-container" >CYBERTEC-pg-container</a>: Docker container suite for PostgreSQL, Patroni and etcd for the provision of HA clusters.</li> <li><a class="gdoc-markdown__link" href="https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials" >CYBERTEC-operator-tutorials</a>: Tutorials and instructions for installing and using the operator.</li> </ul> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="features" > Features </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/project/project/#features" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Features" aria-label="Anchor to: Features" href="#features"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <ul> <li>Cluster management: <ul> <li>Single-node and HA (High Availability) clusters via <a class="gdoc-markdown__link" href="https://patroni.readthedocs.io/en/latest/" >Patroni</a></li> <li>Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing</li> <li>Automated failover</li> <li>Live volume resize without pod restarts</li> <li>Basic credential and user management on K8s, eases application deployments</li> <li>Compatible with OpenShift and Rancher</li> </ul> </li> <li>PostgreSQL compatibility: <ul> <li>Supports PostgreSQL versions 13 to 17</li> <li>Inplace upgrades for smooth version changes and minimal downtime</li> <li>Extensive extension support, including pgAudit, TimescaleDB and PostGIS</li> <li>Standby-Cluster</li> </ul> </li> <li>Backup &amp; Restore: <ul> <li>Integrated pgBackRest support</li> <li>Automatic backups</li> <li>Point-in-Time- and Snapshot-based Restores / Disaster Recovery</li> </ul> </li> <li>Connection management: <ul> <li>pgBouncer for connection pooling</li> </ul> </li> <li>Monitoring &amp; alerting stack <ul> <li>Integrated metrics exporter</li> <li>Prometheus, alert manager for metrics collection and alerting</li> <li>Grafana for visual monitoring of the clusters</li> </ul> </li> <li>Operator UI: <ul> <li>Web interface for managing clusters</li> </ul> </li> </ul> <div class="flex align-center gdoc-page__anchorwrap"> <h2 id="installation" > Installation </h2> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/project/project/#installation" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Installation" aria-label="Anchor to: Installation" href="#installation"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>Detailed instructions on installation and configuration can be found in the CYBERTEC operator tutorials and in the following chapters Example of installation via Helm:</p> + + + Container Images + http://localhost:1313/CYBERTEC-pg-operator/project/container_images/ + Mon, 11 Mar 2024 14:26:51 +0100 + http://localhost:1313/CYBERTEC-pg-operator/project/container_images/ + <p>For each version of the operator and the required PostgreSQL and other required containers, the corresponding image is provided on Dockerhub.</p> <div class="flex align-center gdoc-page__anchorwrap"> <h4 id="operator-container-images" > Operator container images </h4> <a data-clipboard-text="http://localhost:1313/CYBERTEC-pg-operator/project/container_images/#operator-container-images" class="gdoc-page__anchor clip flex align-center" title="Anchor to: Operator container images" aria-label="Anchor to: Operator container images" href="#operator-container-images"> <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg> </a> </div> <p>The operator images are the central components that control the operation and administration of the PostgreSQL databases. These images are available in the following repository on DockerHub:</p> + + + diff --git a/docs/hugo/public/project/project/index.html b/docs/hugo/public/project/project/index.html new file mode 100644 index 000000000..9bf62aa21 --- /dev/null +++ b/docs/hugo/public/project/project/index.html @@ -0,0 +1,5211 @@ + + + + + + + + + + + + + The Project | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    The Project

    +
    +
    + +

    The CYBERTEC PostgreSQL Operator (CPO) enables the simple provision and management of PostgreSQL clusters on Kubernetes. It reduces the administration effort and facilitates the management of single-node and HA clusters.

    +
    +

    + Main components +

    + + + +
    + +
    +

    + Features +

    + + + +
    +
      +
    • Cluster management: +
        +
      • Single-node and HA (High Availability) clusters via Patroni
      • +
      • Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing
      • +
      • Automated failover
      • +
      • Live volume resize without pod restarts
      • +
      • Basic credential and user management on K8s, eases application deployments
      • +
      • Compatible with OpenShift and Rancher
      • +
      +
    • +
    • PostgreSQL compatibility: +
        +
      • Supports PostgreSQL versions 13 to 17
      • +
      • Inplace upgrades for smooth version changes and minimal downtime
      • +
      • Extensive extension support, including pgAudit, TimescaleDB and PostGIS
      • +
      • Standby-Cluster
      • +
      +
    • +
    • Backup & Restore: +
        +
      • Integrated pgBackRest support
      • +
      • Automatic backups
      • +
      • Point-in-Time- and Snapshot-based Restores / Disaster Recovery
      • +
      +
    • +
    • Connection management: +
        +
      • pgBouncer for connection pooling
      • +
      +
    • +
    • Monitoring & alerting stack +
        +
      • Integrated metrics exporter
      • +
      • Prometheus, alert manager for metrics collection and alerting
      • +
      • Grafana for visual monitoring of the clusters
      • +
      +
    • +
    • Operator UI: +
        +
      • Web interface for managing clusters
      • +
      +
    • +
    +
    +

    + Installation +

    + + + +
    +

    Detailed instructions on installation and configuration can be found in the CYBERTEC operator tutorials and in the following chapters +Example of installation via Helm:

    +
    helm repo add cybertec https://cybertec-postgresql.github.io/helm-charts/
    +helm install pg-operator cybertec/cybertec-pg-operator
    +

    More information: Installation

    +
    +

    + Contribution +

    + + + +
    +

    This project is open source, and contributions to its further development are expressly encouraged. +Possible forms of contribution:

    +
      +
    • Bug reports and feature requests
    • +
    • Code contributions (pull requests welcome)
    • +
    • Improvement of the documentation +Further details on contributions can be found in the respective GitHub repositories.
    • +
    +
    +

    + Licence +

    + + + +
    +

    The CYBERTEC PostgreSQL Operator is licensed under the Apache 2.0 licence.

    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/quickstart/index.html b/docs/hugo/public/quickstart/index.html new file mode 100644 index 000000000..9c4e4d1b9 --- /dev/null +++ b/docs/hugo/public/quickstart/index.html @@ -0,0 +1,5240 @@ + + + + + + + + + + + + + Quickstart | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Quickstart

    +
    + +
    +

    We can tell and document so much about our project but it seems you just want to get started. Let us show you the fastest way to use CPO.

    +
    +

    + Preconditions +

    + + + +
    +
      +
    • git
    • +
    • helm (optional)
    • +
    • kubectl or oc
    • +
    +
    +

    + Let’s start +

    + + + +
    +
    +

    + Step 1 - Preparations +

    + + + +
    +

    To get started, you can fork our tutorial repository on Github and then download it. +CYBERTEC-operator-tutorials

    +
    git clone https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials.git
    +cd CYBERTEC-operator-tutorials
    +
    +

    + Step 2 - Install the Operator +

    + + + +
    +

    Two options are available for the installation:

    +
      +
    • Installation via Helm-Chart (local or via helmn-repo)
    • +
    • Installation via apply
    • +
    +
    +

    + Installation via Helm-Chart +

    + + + +
    +

    If you want to use the helm-chart, YOU can decide for yourself whether you want to use the helm-cahrt from the operator-tutorials on github or directly connect the helm-repo for the cpo-project and install the helm-chart over it.

    +
    #add helm-repo (optional)
    +  helm repo add cpo https://cybertec-postgresql.github.io/CYBERTEC-operator-tutorials
    +  kubectl apply -n cpo -k setup/namespace/.
    +  helm install -n cpo cpo cpo/postgres-operator
    +
    +or
    +
    +# use local helm-chart from git
    +  kubectl apply -n cpo -k setup/namespace/.
    +  helm install cpo -n cpo setup/helm/operator/
    +
    +

    + Installation via apply +

    + + + +
    +
    kubectl apply -n cpo -k setup/namespace/.
    +kubectl apply -n cpo -k setup/helm/operator/.
    +

    You can check if the operator pod is in operation.

    +
    kubectl get pods -n cpo --selector=cpo.cybertec.at/pod/type=postgres-operator
    +

    The result should look like this:

    +
    NAME                                 READY   STATUS    RESTARTS   AGE
    +postgres-operator-599688d948-fw8pw   1/1     Running   0          41s
    +

    The operator is ready and the setup is complete. The next step is the creation of a Postgres cluster

    +
    +

    + Step 3 - Create a Cluster +

    + + + +
    +

    To create a simple cluster, the following command is sufficient

    +
    kubectl apply -n cpo -f cluster-tutorials/single-cluster
    +
    watch kubectl get pods -n cpo --selector cluster-name=cluster-1
    +

    The result should look like this:

    +
    Alle 2.0s: kubectl get pods -n cpo --selector cluster-name=cluster-1                                                                                                            
    +
    +NAME          READY   STATUS            RESTARTS   AGE
    +cluster-1-0   2/2     Running           0          28s
    +cluster-1-1   0/2     PodInitializing   0          9s
    +
    +

    + Step 4 - Connect to the Database +

    + + + +
    +

    Get your login information from the secret.

    +
    kubectl get secret -n cpo postgres.cluster-1.credentials.postgresql.cpo.opensource.cybertec.at -o jsonpath='{.data}' | jq '.|map_values(@base64d)'
    +

    The result should look like this:

    +
    {
    +  "password": "2rZG1Kx9asdHscswQGzff4Ru0xW6uasacy3GQ0sjdCH3wWr0kguUXUZek6dkemsf",
    +  "username": "postgres"
    +}
    +
    +

    + Connection via port-forward +

    + + + +
    +
    kubectl port-forward -n cpo cluster-1-0 5432:5432
    +
    # using psql
    +PGPASSWORD=2rZG1Kx9asdHscswQGzffjdCH3wWr0kguUXUZek6dkemsf psql -h 127.0.0.1 -p 5432 -U postgres
    +
    +# using usql
    +PGPASSWORD=2rZG1Kx9asdHscswQGzffjdCH3wWr0kguUXUZek6dkemsf usql postgresql://postgres@127.0.0.1/postgres
    +
    +

    + Next Steps +

    + + + +
    +

    Congratulations, your first cluster is ready and you were able to connect to it. On the following pages we have put together an introduction with lots of information and details to show you the different possibilities and components of CPO.

    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/quickstart/index.xml b/docs/hugo/public/quickstart/index.xml new file mode 100644 index 000000000..3580107d0 --- /dev/null +++ b/docs/hugo/public/quickstart/index.xml @@ -0,0 +1,12 @@ + + + + Quickstart on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/quickstart/ + Recent content in Quickstart on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/release_notes/index.html b/docs/hugo/public/release_notes/index.html new file mode 100644 index 000000000..fdb0067e1 --- /dev/null +++ b/docs/hugo/public/release_notes/index.html @@ -0,0 +1,5585 @@ + + + + + + + + + + + + + Release-Notes | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Release-Notes

    +
    + +
    +
    +

    + 0.8.3 +

    + + + +
    +
    +

    + Fixes +

    + + + +
    +
      +
    • Majorupgrade updated for Patroni 4.x.x
    • +
    • Fixes for PGEE
    • +
    • Fix for Monitoring-User
    • +
    • Dependency updates and several small changes
    • +
    +
    +

    + Supported Versions +

    + + + +
    +
      +
    • PG: 13 - 17
    • +
    • Patroni: 4.0.5
    • +
    • pgBackRest: 2.54.2
    • +
    • Kubernetes: 1.21 - 1.32
    • +
    • Openshift: 4.8 - 4.18
    • +
    +
    +

    + 0.8.2 +

    + + + +
    +
    +

    + Features +

    + + + +
    +
      +
    • Added Clone-Functionality with pgBackRest
    • +
    +
    +

    + Supported Versions +

    + + + +
    +
      +
    • PG: 13 - 17
    • +
    • Patroni: 3.3.2
    • +
    • pgBackRest: 2.54.0
    • +
    • Kubernetes: 1.21 - 1.32
    • +
    • Openshift: 4.8 - 4.18
    • +
    +
    +

    + 0.8.1 +

    + + + +
    +
    +

    + Features +

    + + + +
    +
      +
    • Added pgbackrest to Monitoring
    • +
    +
    +

    + Fixes +

    + + + +
    +
      +
    • Fixed role creation for monitoring
    • +
    +
    +

    + Supported Versions +

    + + + +
    +
      +
    • PG: 13 - 17
    • +
    • Patroni: 3.3.2
    • +
    • pgBackRest: 2.53
    • +
    • Kubernetes: 1.21 - 1.32
    • +
    • Openshift: 4.8 - 4.18
    • +
    +
    +

    + 0.8.0 +

    + + + +
    +
    +

    + Features +

    + + + +
    +
      +
    • Multisite - Support
    • +
    • use icu as default for pg > 14
    • +
    +
    +

    + Fixes +

    + + + +
    +
      +
    • Fixed role creation for monitoring.
    • +
    • Fix for the use of gcs with pgBackRest
    • +
    +
    +

    + Supported Versions +

    + + + +
    +
      +
    • PG: 13 - 16 & 17Beta2
    • +
    • Patroni: 3.3.2
    • +
    • pgBackRest: 2.53
    • +
    • Kubernetes: 1.21 - 1.32
    • +
    • Openshift: 4.8 - 4.18
    • +
    +
    +

    + 0.7.1 +

    + + + +
    +
    +

    + Fixes +

    + + + +
    +
      +
    • Fixed role creation for monitoring.
    • +
    • Fix for the use of gcs with pgBackRest
    • +
    +
    +

    + Supported Versions +

    + + + +
    +
      +
    • PG: 13 - 16 & 17Beta2
    • +
    • Patroni: 3.3.2
    • +
    • pgBackRest: 2.53
    • +
    • Kubernetes: 1.21 - 1.28
    • +
    • Openshift: 4.8 - 4.13
    • +
    +
    +

    + 0.7.0 +

    + + + +
    +
    +

    + Features +

    + + + +
    +
      +
    • Monitoring-Sidecar integrated via CRD Start with Monitoring
    • +
    • Password-Hash per default set to scram-sha-256
    • +
    • pgBackRest with blockstorage using RepoHost
    • +
    • Internal Certification-Management for RepoHost-Certificates
    • +
    • Compatible with PG17Beta2
    • +
    +
    +

    + Changes +

    + + + +
    +
      +
    • API Change acid.zalan.do is replaced by cpo.opensource.cybertec.at - If you’re updating your Operator from previous Versions, please check this HowTo Migrate to new API
    • +
    • Patroni-Compatibility has increased to Version 3.3.2
    • +
    • pgBackRest-Compatbility has increased to Version 2.52.1
    • +
    • Revision of the restore process
    • +
    • Revision of the backup jobs
    • +
    • Operator now using Rocky9 as Baseimage
    • +
    • Updates Go-Package to 1.22.5
    • +
    +
    +

    + Fixes +

    + + + +
    +
      +
    • PDB Bug fixed - Single-Node Clusters are not creating PDBs anymore which can break Kubernetes-Update
    • +
    • Wrong Templates inside Cronjobs fixed
    • +
    +
    +

    + Supported Versions +

    + + + +
    +
      +
    • PG: 13 - 16 & 17Beta2
    • +
    • Patroni: 3.3.2
    • +
    • pgBackRest: 2.52.1
    • +
    • Kubernetes: 1.21 - 1.28
    • +
    • Openshift: 4.8 - 4.13
    • +
    +
    +

    + 0.6.1 +

    + + + +
    +

    Release with fixes

    +
    +

    + Fixes +

    + + + +
    +
      +
    • Backup-Pod now runs with “best-effort” resource definition
    • +
    • Der Init-Container für die Wiederherstellung verwendet nun die gleiche Ressource-Definition wie der Datenbank-Container, wenn es keine spezifische Definition im Cluster-Manifest gibt (spec.backup.pgbackrest.resources)
    • +
    +
    +

    + Software-Versions +

    + + + +
    +
      +
    • PostgreSQL: 15.3 14.8, 13.11, 12.15
    • +
    • Patroni: 3.0.4
    • +
    • pgBackRest: 2.47
    • +
    • OS: Rocky-Linux 9.1 (4.18) +
    • +
    +
    +

    +
    +

    + 0.6.0 +

    + + + +
    +

    Release with some improvements and stabilisation measuresm

    +
    +

    + Features +

    + + + +
    + +
    +

    + Software-Versions +

    + + + +
    +
      +
    • PostgreSQL: 15.3 14.8, 13.11, 12.15
    • +
    • Patroni: 3.0.4
    • +
    • pgBackRest: 2.47
    • +
    • OS: Rocky-Linux 9.1 (4.18) +
    • +
    +
    +

    +
    +

    + 0.5.0 +

    + + + +
    +

    Release with new Software-Updates and some internal Improvements

    +
    +

    + Features +

    + + + +
    +
      +
    • Updated to Zalando Operator 1.9
    • +
    +
    +

    + Fixes +

    + + + +
    +
      +
    • internal Problems with Cronjobs
    • +
    • updates for some API-Definitions
    • +
    +
    +

    + Software-Versions +

    + + + +
    +
      +
    • PostgreSQL: 15.2 14.7, 13.10, 12.14
    • +
    • Patroni: 3.0.2
    • +
    • pgBackRest: 2.45
    • +
    • OS: Rocky-Linux 9.1 (4.18) +
    • +
    +
    +

    +
    +

    + 0.3.0 +

    + + + +
    +

    Release with some improvements and stabilisation measuresm

    +
    +

    + Fixes +

    + + + +
    +
      +
    • missing pgbackrest_restore configmap fixed
    • +
    +
    +

    + Software-Versions +

    + + + +
    +
      +
    • PostgreSQL: 15.1 14.7, 13.9, 12.13, 11.18 and 10.23
    • +
    • Patroni: 3.0.1
    • +
    • pgBackRest: 2.44
    • +
    • OS: Rocky-Linux 9.1 (4.18) +
    • +
    +
    +

    +
    +

    + 0.1.0 +

    + + + +
    +

    Initial Release as a Fork of the Zalando-Operator

    +
    +

    + Features +

    + + + +
    +
      +
    • Added Support for pgBackRest (PoC-State) +
        +
      • Stanza-create and Initial-Backup are executed automatically
      • +
      • Schedule automatic updates (Full/Incremental/Differential-Backup)
      • +
      • Securely store backups on AWS S3 and S3-compatible storage
      • +
      +
    • +
    +
    +

    + Software-Versions +

    + + + +
    +
      +
    • PostgreSQL: 14.6, 13.9, 12.13, 11.18 and 10.23
    • +
    • Patroni: 2.4.1
    • +
    • pgBackRest: 2.42
    • +
    • OS: Rocky-Linux 9.0 (4.18)
    • +
    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/release_notes/index.xml b/docs/hugo/public/release_notes/index.xml new file mode 100644 index 000000000..4a0b7af08 --- /dev/null +++ b/docs/hugo/public/release_notes/index.xml @@ -0,0 +1,12 @@ + + + + Release-Notes on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/release_notes/ + Recent content in Release-Notes on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/resources/index.html b/docs/hugo/public/resources/index.html new file mode 100644 index 000000000..9eac2038e --- /dev/null +++ b/docs/hugo/public/resources/index.html @@ -0,0 +1,5147 @@ + + + + + + + + + + + + + Apply Ressources | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Apply Ressources

    +
    + +
    +

    Kubernetes workloads are often deployed without a direct resource definition. This means that, apart from the limits specified by the administrators, the workloads can use the required resources of the worker node very dynamically.

    +

    The cluster manifest is used to define the Postgres pod resources via the typical resources objects.

    +

    There are basically two different definitions:

    +
      +
    • requests: Basic requirement and guaranteed by the worker node
    • +
    • limits: maximum availability, allocation is increased dynamically if the worker node can provide the resources.
    • +
    +

    For the planning of the cluster, a proper definition should be carried out in terms of the required hardware, which is then defined as requests. These resources are thus guaranteed to the cluster and are taken into account when deploying the pod. Accordingly, a pod can only be deployed on a worker if it can provide these resources. Any limits beyond this are not taken into account when deploying.

    +

    The unit of measurement should be taken into account when planning the necessary CPUs: +cpu specifications are based on millicores

    +
      +
    • 1 cpu corresponds to 1 core
    • +
    • 1 core corresponds to 1000 millicores (m)
    • +
    • 1/2 core corresponds to 500 m
    • +
    +
      resources:
    +    limits:
    +      cpu: 500m
    +      memory: 1Gi
    +    requests:
    +      cpu: 1000m
    +      memory: 1Gi
    +

    This example corresponds to a guaranteed availability of half a core and 1 Gibibyte. However, if necessary and available, the container can use up to one core. The allocation takes place dynamically and for the required time.

    +

    Pods can be categorised into three Quality of Services (QoS) based on the defined information on the resources.

    +
      +
    • Best-Effort: The containers of a pod have no resource information
    • +
    • Burstable: A container of the pod has a memory or CPU requests or limits.
    • +
    • Guaranteed: Each container of a pod has both cpu and memory requests and limits. In addition, the details of the respective limits correspond to the requests details
    • +
    +

    If you would like more information and explanations, you can take a look at the Kubernetes documentation on QoS.

    +

    We generally recommend using the Guaranteed Status for PostgreSQL workloads. However, many users very successfully use the deviation of the CPU limit by factors such as 2. +For example:

    +
      resources:
    +    limits:
    +      cpu: 1000m
    +      memory: 1Gi
    +    requests:
    +      cpu: 2000m
    +      memory: 1Gi
    +

    This is intended to create the possibility of additional CPU resources for sudden load peaks.

    + + + + + +
    +
    +
    The use of burstable definitions does not release you from a correct resource calculation, as limits resources are not guaranteed and therefore an undersupply can occur if the requests are not properly defined.
    +
    + + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/resources/index.xml b/docs/hugo/public/resources/index.xml new file mode 100644 index 000000000..e410477ae --- /dev/null +++ b/docs/hugo/public/resources/index.xml @@ -0,0 +1,12 @@ + + + + Apply Ressources on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/resources/ + Recent content in Apply Ressources on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/restore/index.html b/docs/hugo/public/restore/index.html new file mode 100644 index 000000000..7c9c21759 --- /dev/null +++ b/docs/hugo/public/restore/index.html @@ -0,0 +1,5230 @@ + + + + + + + + + + + + + Restore | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Restore

    +
    + +
    +

    Restore or recovery is the process of starting a PostgreSQL instance or a cluster based on a defined and existing backup. This can be just a Backup or a combination of a Backup and additional WAL files. The difference is that a Backup represents a fixed point in time, whereas the combination with WAL enables a point-in-time recovery(PITR).

    +

    You can find more information about backups here

    +
    +

    + Rescue my cluster +

    + + + +
    +

    CPO enables the restore based on an existing backup using pgBackRest. To do this, it needs the relevant information about the point in time or snapBackupshot to which it should restore and where the data for this comes from. +As we have already provided the operator with all the information relating to the storage of backups in the previous chapter, it only needs the following information:

    +
      +
    • id: Control variable, must be increased for each restore process
    • +
    • type: What type of restore is required
    • +
    • repo: Which repo the data should come from
    • +
    • set: Specific Backup to restore - Check backup to see how to get the identifier
    • +
    + + + + + +
    +
    +
    To ensure that the operator does not repeat an already done restore, the defined object id in the restore section is saved by the operator, so the value of this id must be changed for a new restore.
    +
    + +
    +

    + Details for a Backup restore +

    + + + +
    +

    With this information, we define a fixed Backup from repo1 and that pgBackRest should stop at the end of the Backup

    +
    restore:
    +  id: '1'
    +  options:
    +    type: 'immediate'
    +    set: '20240515-164100F'
    +  repo: 'repo1'
    +
    + + + + +
    +
    +
    Without the specification --type=immediate, pgBackRest would then consume the entire WAL that is available and thus restore the last available consistent data point.
    +
    + +
    +

    + Details for a point-in-time recoery (PITR) +

    + + + +
    +

    We use this information to define a point-in-time recovery (PITR) and define the end point using a timestamp and the start point using a Backup specification. The latter is optional. Without this information, pgBackRest would automatically start at the last previous full Backup.

    +
    restore:
    +  id: '1'
    +  options:
    +    type: 'time'
    +    set: '20240515-164100F'
    +    target: '2024-05-16 07:46:05.506817+00'
    +
    +  repo: '1'
    +
    + + + + +
    +
    +
    --type=time indicates that it is a point-in-time recovery (PITR).
    +
    + +
    +

    + Example in a cluster manifest +

    + + + +
    +
    apiVersion: cpo.opensource.cybertec.at/v1
    +kind: postgresql
    +metadata:
    +  name: cluster-5
    +  namespace: cpo
    +spec:
    +  backup:
    +    pgbackrest:
    +      configuration:
    +        secret: cluster-1-pvc-credentials
    +      global:
    +        repo1-retention-full: '7'
    +        repo1-retention-full-type: count
    +      image: 'docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1'
    +      repos:
    +        - name: repo1
    +          schedule:
    +            full: 30 2 * * *
    +          storage: pvc
    +          volume:
    +            size: 1Gi
    +      restore:
    +        id: '1'
    +        options:
    +          type: 'time'
    +          set: '20240515-164100F'
    +          target: '2024-05-16 07:46:05.506817+00'
    +

    An example of this can also be found in our tutorials. For a point-in-time recovery (PITR) you can find it here.

    + + + + + +
    +
    +
    Incorrect information for the Backup or the timestamp can result in pgBackRest not being able to complete the restore successfully. In the event of an error, the information must be corrected and another restore must be started.
    +
    + + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/restore/index.xml b/docs/hugo/public/restore/index.xml new file mode 100644 index 000000000..6ce8aed78 --- /dev/null +++ b/docs/hugo/public/restore/index.xml @@ -0,0 +1,12 @@ + + + + Restore on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/restore/ + Recent content in Restore on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/search/en.config.min.json b/docs/hugo/public/search/en.config.min.json new file mode 100644 index 000000000..6ac7e50fc --- /dev/null +++ b/docs/hugo/public/search/en.config.min.json @@ -0,0 +1 @@ +{"dataFile":"/CYBERTEC-pg-operator/search/en.data.min.json","indexConfig":null,"showParent":false,"showDescription":false} \ No newline at end of file diff --git a/docs/hugo/public/search/en.data.min.json b/docs/hugo/public/search/en.data.min.json new file mode 100644 index 000000000..f3d3ae804 --- /dev/null +++ b/docs/hugo/public/search/en.data.min.json @@ -0,0 +1 @@ +[{"id":0,"href":"/CYBERTEC-pg-operator/","title":"CPO (CYBERTEC-PG-Operator)","parent":"","content":"Current Release: 0.8.3 (04.04.2025) Release Notes\nCPO (CYBERTEC PG Operator) allows you to create and run PostgreSQL clusters on Kubernetes.\nThe operator reduces your efforts and simplifies the administration of your PostgreSQL clusters so that you can concentrate on other things.\nThe following features characterise our operator:\nDeclarative mode of operation Takes over all the necessary steps for setting up and managing the PG cluster. Integrated backup solution, automatic backups and very easy restore (snapshot \u0026amp; PITR) Rolling update procedure for adjustments to the pods and minor updates Major upgrade with minimum interruption time Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing CPO is tested on the following platforms:\nKubernetes: 1.21 - 1.28 Openshift: 4.8 - 4.13 Rancher AWS EKS Azure AKS Google GKE Furthermore, CPO is basically executable on any CSCF-certified Kubernetes platform.\n","description":"Current Release: 0.8.3 (04.04.2025) Release Notes\nCPO (CYBERTEC PG Operator) allows you to create and run PostgreSQL clusters on Kubernetes.\nThe operator reduces your efforts and simplifies the administration of your PostgreSQL clusters so that you can concentrate on other things.\nThe following features characterise our operator:\nDeclarative mode of operation Takes over all the necessary steps for setting up and managing the PG cluster. Integrated backup solution, automatic backups and very easy restore (snapshot \u0026amp; PITR) Rolling update procedure for adjustments to the pods and minor updates Major upgrade with minimum interruption time Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing CPO is tested on the following platforms:\n"},{"id":1,"href":"/CYBERTEC-pg-operator/backup/introduction/","title":"Introduction","parent":"Backup","content":"Backups are essential for databases. From broken storage to deployments gone wrong, backups often save the day. Starting with pg_dump, which was released in the late 1990s, to the archiving of WAL files (PostgreSQL 8.0 / 2005) and pg_basebackup (PostgreSQL 9.0 / 2010), PostgreSQL already offers built-in options for backups and restores based on logical and physical backups.\nBackups with pgBackRest CPO relies on pgBackRest as its backup solution, a tried-and-tested tool with extensive backup and restore options. The backup is based on two elements:\nSnapshots in the form of physical backups WAL archive: Continuous archiving of the WAL files Backups Backups represent a snapshot of the database in the form of pyhsical files. This contains all relevant information that PostgreSQL holds in its data folder. With pgBackRest it is possible to create different types of Backups:\nfull Snapshot: This captures and saves all files at the time of the backup Differential backup: Only captures all files that have been changed since the last full Backup Incremental backup: Only records the files that have been changed since the last backup (of any kind). When restoring using differential or incremental Backup, it is necessary to also use the previous Backup that provide the basis for the selected Backup.\nThe choice of Backup types depends on factors such as the size of the database, the time available for backups and the restore. WAL-Archive The WAL (Write-Ahead-Log) refers to log files which record all changes to the database data before they are written to the actual files. The basic idea here is to guarantee the consistency and recoverability of the comitted data even in the event of failures.\nPostgreSQL normally cleans up or recycles the WAL files that are no longer required. By using WAL archiving, the WAL files are saved to a different location before this process so that they can be used for various activities in the future. These activities include\nProviding the WAL files for replicas to keep them up to date Restoring instances that have lost parts of the WAL files in the event of a failure and cannot return to a consistent state without them without losing data Point-In-Time-Recovery (PITR): In contrast to Backups, which map a fixed point in time, WAL files make it possible to jump dynamically to a desired point in time and restore the database to the closest available consistent data point WAL archiving is an indispensable tool for data availability, recoverability and the continuous availability of PostgreSQL. Backup your Cluster With pgBackRest, backups can be stored on different types of storage:\nBlock storage (PVC) S3 / S3-compatible storage Azure blob storage GCS How a Backup works The operator creates a cronjob object on Kubernetes based on the defined times for automatic backups. This means that the Kubernetes core (CronJob Controller) will take care of processing the automatic backups and create a job and thus a pod at the appropriate time. The pod will send the backup command to the primary or, if block storage is used, to the repo host and monitor it. As soon as the backup is successfully completed, the pod stops with Completed and thus completes the job.\nkubectl get cronjobs --------------------------------------------------------------------------------------- NAME | SCHEDULE | SUSPEND | ACTIVE | LAST SCHEDULE | AGE pgbackrest-cluster-repo1-full | 30 2 * * * | False | 0 | 4h46m | 14h pgbackrest-cluster-repo1-incr | */30 * * * * | False | 1 | 81s | 106m kubectl get jobs ----------------------------------------------------------------------- NAME | COMPLETIONS | DURATION | AGE pgbackrest-cluster-repo1-full-28597110 | 1/1 | 52s | 140m pgbackrest-cluster-repo1-incr-28597365 | 1/1 | 2m37s | 32m pgbackrest-cluster-repo1-incr-28597380 | 1/1 | 2m38s | 17m pgbackrest-cluster-repo1-incr-28597395 | 0/1 | 2m3s | 2m3s If there are problems such as a timeout, the pod will stop with exit code 1 and thus indicate an error. In this case, a new pod will be created which will attempt to complete the backup. The maximum number of attempts is 6, so if the backup fails six times, the job is deemed to have failed and will not be attempted again until the next cronjob execution. The job pod log provides information about the problems.\nkubectl get pods ----------------------------------------------------------------------------------- NAME | READY | STATUS | RESTARTS | AGE cluster-0 | 2/2 | Running | 2 | 14h cluster-pgbackrest-repo-host-0 | 1/1 | Running | 0 | 107m pgbackrest-cluster-repo1-full-28597110-x8zpw | 0/1 | Completed | 0 | 143m pgbackrest-cluster-repo1-incr-28597365-7bb5l | 0/1 | Completed | 0 | 34m pgbackrest-cluster-repo1-incr-28597380-j76rr | 0/1 | Completed | 0 | 19m pgbackrest-cluster-repo1-incr-28597395-rh86t | 0/1 | Completed | 0 | 4m27s postgres-operator-66bbff5c54-5sjmk | 1/1 | Running | 0 | 47m ","description":"Backups are essential for databases. From broken storage to deployments gone wrong, backups often save the day. Starting with pg_dump, which was released in the late 1990s, to the archiving of WAL files (PostgreSQL 8.0 / 2005) and pg_basebackup (PostgreSQL 9.0 / 2010), PostgreSQL already offers built-in options for backups and restores based on logical and physical backups.\nBackups with pgBackRest CPO relies on pgBackRest as its backup solution, a tried-and-tested tool with extensive backup and restore options. The backup is based on two elements:\n"},{"id":2,"href":"/CYBERTEC-pg-operator/customize_cluster/sidecars/","title":"Sidecars","parent":"Customize Cluster","content":"Starting with the Single-Node-Cluster from the previous section, we want to modify the Instance a bit to see.\nCPU and Memory spec: resources: limits: cpu: 1000m memory: 500Mi requests: cpu: 500m memory: 500mi Based on the ressources-Definiton we\u0026rsquo;re able to modify the reserved Hardware (requests) and the limits, which allows use to consume more than the reserved definitons if the k8s-worker has this hardware available. There are some Restrictions when modifiying the limits-section. Because of the behaviour of Databases we should never define a diff between requests.memory and limits.memory. A Database is after some time using all available Memory, for Cache and other things. Limits are optional and the worker node can force them back. forcing back memory will create big problems inside a database like creating corruption, forcing OutOfMemory-Killer and so on. CPU on the other side is a ressource we can use inside the limits definiton to allow our database using more cpu if needed and available.\nSidecars Sidecars are further Containers running on the same Pod as the Database. We can use them for serveral different Jobs. The Operator allows us to define them directly inside the Cluster-Manifest.\nspec: sidecars: - name: \u0026#34;telegraf-sidecar\u0026#34; image: \u0026#34;telegraf:latest\u0026#34; ports: - name: metrics containerPort: 8094 protocol: TCP resources: limits: cpu: 500m memory: 500Mi requests: cpu: 100m memory: 100Mi env: - name: \u0026#34;USEFUL_VAR\u0026#34; value: \u0026#34;perhaps-true\u0026#34; This Example will add a second Container to our Pods. This will trigger a restart, which creates Downtime if you\u0026rsquo;re not running a HA-Cluster.\nInit-Containers We can exactly the same as for sidecars also for Init-Containers. The difference is, that a sidecar is running normally on a pod. An Init-Container will just run as first container when the pod is created and it will ends after his job is done. The \u0026ldquo;normal\u0026rdquo; Containers has to wait till all init-Containers finished their jobs and ended with a exit-status.\nspec: initContainers: - name: date image: busybox command: [ \u0026#34;/bin/date\u0026#34; ] TLS-Certificates One Startup the Containers will create a custom TLS-Certificate which allows creating tls-secured-connections to the Database. But this Certificates cannot verified, because the application has no information about the CA. Because of this the certificates are no protection against MITM-Attacks. You\u0026rsquo;re able to configure your own Certificates and CA to ensure, that you can use secured and verified connections between your application and your database.\nspec: tls: secretName: \u0026#34;\u0026#34; # should correspond to a Kubernetes Secret resource to load certificateFile: \u0026#34;tls.crt\u0026#34; privateKeyFile: \u0026#34;tls.key\u0026#34; caFile: \u0026#34;\u0026#34; # optionally configure Postgres with a CA certificate caSecretName: \u0026#34;\u0026#34; # optionally the ca.crt can come from this secret instead. You need to store the needed values from tls.crt, tls.key and ca.crt in a secret and define the secrtetname inside the tls-object. if you want you can create a separate sercet just for the ca and use this secret for every cluster inside the Namespace. To get Information about creating Certificates and the secrets check the Tutorial in the additonal-Section or click here\nNode-Affinity Node-Affinity will ensure that the Cluster-pods only deployed on Kubernetes-Nodes which has the defined Labelkey and -Value\nspec: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: cpo operator: In values: - enabled This allowes you to use specific database-nodes in a mixed cluster for example. In the Example above the Cluster-Pods are just deployed on Nodes with the Key: cpo and the value: enabled So you\u0026rsquo;re able to seperate your Workload.\nPostgreSQL-Configuration Every Cluster will start with the default PostgreSQL-Configuration. Every Parameter can be overriden based in definitions inside the Cluster-Manifest. Therefore we just need a add the section parameters to the postgresql-Object\nspec: postgresql: version: 16 parameters: max_connections: \u0026#34;53\u0026#34; log_statement: \u0026#34;all\u0026#34; track_io_timing: \u0026#34;true\u0026#34; These Definitions will change the PostgreSQL-Configuration. Based on the needs of Parameter changes the Pods may needs a restart, which creates a Downtime if its not a HA-Cluster. You can check Parameters and allowed Values on this Sources to ensure a correct Value.\nPostgreSQL Documentation PostgreSQL.org PostgreSQLco.nf ","description":"Starting with the Single-Node-Cluster from the previous section, we want to modify the Instance a bit to see.\nCPU and Memory spec: resources: limits: cpu: 1000m memory: 500Mi requests: cpu: 500m memory: 500mi Based on the ressources-Definiton we\u0026rsquo;re able to modify the reserved Hardware (requests) and the limits, which allows use to consume more than the reserved definitons if the k8s-worker has this hardware available. There are some Restrictions when modifiying the limits-section. Because of the behaviour of Databases we should never define a diff between requests.memory and limits.memory. A Database is after some time using all available Memory, for Cache and other things. Limits are optional and the worker node can force them back. forcing back memory will create big problems inside a database like creating corruption, forcing OutOfMemory-Killer and so on. CPU on the other side is a ressource we can use inside the limits definiton to allow our database using more cpu if needed and available.\n"},{"id":3,"href":"/CYBERTEC-pg-operator/backup/pvc/","title":"via Blockstorage (pvc)","parent":"Backup","content":" Backups on PVC (PersistentVolumeClaim) When using block storage, the operator creates an additional pod that acts as a repo host. Based on a TLS connection, the repo host obtains the data for the Backup from the current primary of the cluster, which is compressed before being sent. WAL archives are pushed from the primary pod to the repo host.\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster namespace: cpo spec: backup: pgbackrest: image: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1\u0026#39; repos: - name: repo1 schedule: full: 30 2 * * * storage: pvc volume: size: 15Gi storageClass: default global: repo1-retention-full: \u0026#39;7\u0026#39; repo1-retention-full-type: count This example creates backups based on a repo host with a daily full Backup at 2:30 am. In addition, pgBackRest is instructed to keep a maximum of 7 full Backups. The oldest one is always removed when a new Backup is created. You can increase the pvc-size all time if needed. Therefore you just need to update the size value to a higher amount of Gi. Please be aware that shrinking the volume is not possible.\nIn addition, further configurations for pgBackRest can be defined in the global object. Information on possible configurations can be found in the pgBackRest documentation ","description":" Backups on PVC (PersistentVolumeClaim) When using block storage, the operator creates an additional pod that acts as a repo host. Based on a TLS connection, the repo host obtains the data for the Backup from the current primary of the cluster, which is compressed before being sent. WAL archives are pushed from the primary pod to the repo host.\n"},{"id":4,"href":"/CYBERTEC-pg-operator/backup/aws/","title":"via S3","parent":"Backup","content":"This chapter describes the use of pgBackRest in combination with with AWS S3 or S3-compatible storage such as MinIO, Cloudian HyperStore or SwiftStack. It is not absolutely necessary to operate a Kubernetes on the AWS Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.\nThis Chapter will use AWS S3 for the example, the usage of different s3-compatible Storage is similiar.\nPrecondition: a S3-bucket and a priviledged role with credentials is needed for this chapter. Create a s3-bucket on the AWS console Create a priviledged service-role Modifying the Cluster As soon as all requirements are met:\nA S3 bucket Access-Token and Secret-Access-Key for the service role with the required authorisations for the bucket the cluster can be modified. Firstly, a secret containing the Credentials is created and the cluster manifest is adapted accordingly.\nThe first step is to create the required secret. This is most easily done storing the needed data in a file called s3.conf and using a kubectl command.\n# Create a file with name s3.conf and add the following infos. Please replace the placeholder by the credentials [global] repo1-s3-key=YOUR_S3_ACCESS_KEY repo1-s3-key-secret=YOUR_S3_KEY_SECRET repo1-cipher-pass=YOUR_ENCRYPTION_PASSPHRASE # Create the secret with the credentials kubectl create secret generic cluster-1-s3-credentials --from-file=s3.conf=s3.conf In the next step, the secret name ais stored in the secret in the cluster manifest. In addition, global settings, such as the retention time of the backups in the global object, are defined, the image for pgBackRest is specified and the necessary information for the repository is added. This includes both the desired storage path in the bucket and the times for automatic backups based on the cron syntax.\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster namespace: cpo spec: backup: pgbackrest: image: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1\u0026#39; repos: - endpoint: \u0026#39;https://s3-zurich.cyberlink.cloud:443\u0026#39; name: repo1 region: zurich resource: cpo-cluster-bucket schedule: full: 30 2 * * * incr: \u0026#39;*/30 * * * *\u0026#39; storage: s3 configuration: secret: cluster-1-s3-credential global: repo1-path: /cluster/repo1/ repo1-retention-full: \u0026#39;7\u0026#39; repo1-retention-full-type: count This example creates a backup in the defined S3 bucket. In addition to the above configurations, a secret is also required which contains the access data for the S3 storage. The name of the secret must be stored in the spec.backup.pgbackrest.configuration.secret object and the secret must be located in the same namespace as the cluster. Information required to address the S3 bucket:\nEndpoint: S3 api endpoint Region: Region of the bucket resource: Name of the bucket An example with a sercret generator is also available in the tutorials. Enter your access data in the s3.conf file and transfer the tutorial to your Kubernetes with kubectl apply -k cluster-tutorials/pgbackrest_with_s3/.\n","description":"This chapter describes the use of pgBackRest in combination with with AWS S3 or S3-compatible storage such as MinIO, Cloudian HyperStore or SwiftStack. It is not absolutely necessary to operate a Kubernetes on the AWS Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.\nThis Chapter will use AWS S3 for the example, the usage of different s3-compatible Storage is similiar.\n"},{"id":5,"href":"/CYBERTEC-pg-operator/architecture/compontens/","title":"Software-Components","parent":"Architecture","content":"Various software components are used to operate CPO. This chapter lists the most important components and their respective purposes.\nBasically, the CPO project focusses on the main tasks of each individual component. This means that each component does what it does best and only that. In addition to reliable operation, this should also ensure efficient development and project management that utilises existing approaches rather than fighting against them.\n1. CYBERTEC-pg-operator The CYBERTEC-pg-operator is a Kubernetes operator that automates the operation and management of PostgreSQL databases on Kubernetes clusters. It facilitates the provisioning, scaling, backup and recovery of PostgreSQL clusters and integrates tools such as Patroni and pgBackRest for high availability and backup management.\nThe main focus of the operator is the creation of the necessary templates and objects for Kubernetes, the regular check whether the declarative description of the cluster is still up to date and for the implementation of various tasks in the cluster, which were commissioned by the user.\n2. Kubernetes Kubernetes is an open source platform for automating the deployment, scaling and management of containerised applications. It enables the management of container clusters in different environments and offers functions such as automatic load balancing, self-healing and rollouts. Kubernetes ensures that applications are always available and scalable and provides a framework for managing infrastructure in a cloud-native environment.\nThe focus of Kubernetes in the context of CPO is the use of the operator\u0026rsquo;s templates to create the required objects. For example, the statefulset controller creates the desired pods based on the template. Kubernetes or the respective controllers monitor the generated objects independently and react if they are missing or do not correspond to the template. This means, for example, that pods that have been removed are automatically regenerated even if the operator is not currently running. This avoids the operator as a single point of failure.\n3. Patroni Patroni is an open source tool for managing PostgreSQL high availability clusters. It uses a distributed consensus mechanism, often based on Etcd, Consul or Zookeeper, to manage the role of the PostgreSQL primary node and perform automatic failovers. Patroni ensures that only one primary database server is active at a time, enabling consistency and availability of PostgreSQL databases in a cluster.\nThe focus of Patroni is to build, configure and monitor the PostgreSQL cluster based on the configuration created by the operator. Patroni therefore takes over all tasks such as leader selection, cluster monitoring, auto-failover and much more independently. Patroni is included in every PostgreSQL container and therefore pod and focussed on the individual cluster. This means that cluster management is guaranteed even without a currently running operator and therefore runs independently of the operator. This avoids the operator as a single point of failure.\n4. PostgreSQL PostgreSQL is a powerful, open source object-relational database management system (ORDBMS). It is known for its reliability, robustness and compliance with SQL standards. PostgreSQL supports advanced data types, functions and offers extensive customisation options. It is suitable for applications of any size and offers strong support for ACID transactions and Multi-Version Concurrency Control (MVCC).\nThe main role of PostgreSQL in the context of CPO is quite clear. Controlled by Patroni, PostgreSQL takes care of its task as a DBMS.\n5. pgBackRest pgBackRest is a reliable backup and restore tool for PostgreSQL databases. It offers features such as incremental backups, parallel backup and restore, compression and encryption. pgBackRest is designed for use in large databases and offers both local and remote backup options. It integrates well into Kubernetes environments and enables automated and efficient backup strategies.\npgBackRest is configured based on the cluster manifest and therefore via the operator. Automatic backups, on the other hand, are based on Kubernetes cron jobs and are therefore independent of the operator, apart from the template generation by the operator.\n6. pgBouncer PgBouncer is a lightweight connection pooler for PostgreSQL. It reduces the load on the database server by consolidating and efficiently managing incoming client connections. PgBouncer improves the performance and scalability of PostgreSQL-based applications by reducing the number of active connections while enabling fast switching times between different connections.\n","description":"Various software components are used to operate CPO. This chapter lists the most important components and their respective purposes.\nBasically, the CPO project focusses on the main tasks of each individual component. This means that each component does what it does best and only that. In addition to reliable operation, this should also ensure efficient development and project management that utilises existing approaches rather than fighting against them.\n1. CYBERTEC-pg-operator The CYBERTEC-pg-operator is a Kubernetes operator that automates the operation and management of PostgreSQL databases on Kubernetes clusters. It facilitates the provisioning, scaling, backup and recovery of PostgreSQL clusters and integrates tools such as Patroni and pgBackRest for high availability and backup management.\n"},{"id":6,"href":"/CYBERTEC-pg-operator/customize_cluster/additional-volumes/","title":"Additional Volumes","parent":"Customize Cluster","content":" additionalVolumes: - name: empty mountPath: /opt/empty targetContainers: - all volumeSource: emptyDir: {} # - name: data # mountPath: /home/postgres/pgdata/partitions # targetContainers: # - postgres # volumeSource: # PersistentVolumeClaim: # claimName: pvc-postgresql-data-partitions # readyOnly: false # - name: conf # mountPath: /etc/telegraf # subPath: telegraf.conf # targetContainers: # - telegraf-sidecar # volumeSource: # configMap: # name: my-config-map ","description":" additionalVolumes: - name: empty mountPath: /opt/empty targetContainers: - all volumeSource: emptyDir: {} # - name: data # mountPath: /home/postgres/pgdata/partitions # targetContainers: # - postgres # volumeSource: # PersistentVolumeClaim: # claimName: pvc-postgresql-data-partitions # readyOnly: false # - name: conf # mountPath: /etc/telegraf # subPath: telegraf.conf # targetContainers: # - telegraf-sidecar # volumeSource: # configMap: # name: my-config-map "},{"id":7,"href":"/CYBERTEC-pg-operator/backup/gcs/","title":"via GCS","parent":"Backup","content":"This chapter describes the use of pgBackRest in combination with Google Cloud Storage (gcs). It is not absolutely necessary to operate a Kubernetes on the Google Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.\nPrecondition: a gcs-bucket and a priviledged role is needed for this chapter. Create a gcs-bucket on the google cloud console Create a priviledged service-role Modifying the Cluster As soon as all requirements are met:\nA GCS bucket A JSON token for the service role with the required authorisations for the bucket the cluster can be modified. Firstly, a secret containing the JSON token is created and the cluster manifest is adapted accordingly.\nThe first step is to create the required secret. This is most easily done using a kubectl command.\nkubectl create secret generic cluster-1-gcs-credentials --from-file=gcs.json=fluent.json In the next step, both the secret name and the file name of the JSON token are stored in the secret in the cluster manifest. In addition, global settings, such as the retention time of the backups in the global object, are defined, the image for pgBackRest is specified and the necessary information for the repository is added. This includes both the desired storage path in the bucket and the times for automatic backups based on the cron syntax.\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1 spec: backup: pgbackrest: configuration: secret: cluster-1-gcs-credentials global: repo1-path: /cluster-1/repo1/ repo1-retention-full: \u0026#39;7\u0026#39; repo1-retention-full-type: count image: docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1\u0026#39; repos: - name: repo1 resource: postgresql-backup-bucket key: gcs.json keyType: service schedule: full: 30 2 * * * storage: gcs ","description":"This chapter describes the use of pgBackRest in combination with Google Cloud Storage (gcs). It is not absolutely necessary to operate a Kubernetes on the Google Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.\nPrecondition: a gcs-bucket and a priviledged role is needed for this chapter. Create a gcs-bucket on the google cloud console Create a priviledged service-role Modifying the Cluster As soon as all requirements are met:\n"},{"id":8,"href":"/CYBERTEC-pg-operator/architecture/rolling_update/","title":"Rolling-Updates","parent":"Architecture","content":"Whether updating the minor version, changing the hardware definitions of the cluster or other adjustments that require a pod restart, CPO ensures that the update is as uninterrupted as possible.\nThis means that adjustments are carried out on the various pods of a particular cluster one after the other and in a sensible sequence. This happens as soon as a cluster consists of more than 1 PostgreSQL node.\nIn the event of a necessary restart, the operator independently stops the pods and does not leave this to Kubernetes. The idea behind this is that all replica pods are restarted one after the other first. The operator recognises these by the label cpo.opensource.cybertec.at/role=replica set by Patroni\nAs soon as all replicas are ready again, the operator checks whether one of the replicas is able to take over cluster operation and performs a switchover. Only then is the former leader pod stopped and restarted.\nThis ensures that the only effect on the application is the switchover. A completely uninterrupted handover of operation is not possible due to the architecture and connection handling of PostgreSQL. ","description":"Whether updating the minor version, changing the hardware definitions of the cluster or other adjustments that require a pod restart, CPO ensures that the update is as uninterrupted as possible.\nThis means that adjustments are carried out on the various pods of a particular cluster one after the other and in a sensible sequence. This happens as soon as a cluster consists of more than 1 PostgreSQL node.\nIn the event of a necessary restart, the operator independently stops the pods and does not leave this to Kubernetes. The idea behind this is that all replica pods are restarted one after the other first. The operator recognises these by the label cpo.opensource.cybertec.at/role=replica set by Patroni\n"},{"id":9,"href":"/CYBERTEC-pg-operator/backup/azure_blob/","title":"via Azure-Blob","parent":"Backup","content":"This chapter describes the use of pgBackRest in combination with Azure Blob Storage. It is not absolutely necessary to operate a Kubernetes on the Azure Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.\nPrecondition: a blob-storage-volume and a priviledged role is needed for this chapter. Create a blob-storage-volume on the Azure console Create a priviledged service-role Modifying the Cluster As soon as all requirements are met:\nAn Azure-Blob-Storage-Volume A JSON token for the service role with the required authorisations for the Volume the cluster can be modified. Firstly, a secret containing the JSON token is created and the cluster manifest is adapted accordingly.\nThe first step is to create the required secret. This is most easily done using a kubectl command.\nkubectl create secret generic cluster-1-gcs-credentials --from-file=gcs.json=fluent.json In the next step, both the secret name and the file name of the JSON token are stored in the secret in the cluster manifest. In addition, global settings, such as the retention time of the backups in the global object, are defined, the image for pgBackRest is specified and the necessary information for the repository is added. This includes both the desired storage path in the bucket and the times for automatic backups based on the cron syntax.\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1 spec: backup: pgbackrest: configuration: secret: cluster-1-gcs-credentials global: repo1-path: /cluster-1/repo1/ repo1-retention-full: \u0026#39;7\u0026#39; repo1-retention-full-type: count image: docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1\u0026#39; repos: - name: repo1 resource: postgresql-backup-bucket key: gcs.json keyType: service schedule: full: 30 2 * * * storage: gcs ","description":"This chapter describes the use of pgBackRest in combination with Azure Blob Storage. It is not absolutely necessary to operate a Kubernetes on the Azure Cloud Platform. However, as with any cloud storage, the efficiency and therefore the duration of a backup depends on the connection.\nPrecondition: a blob-storage-volume and a priviledged role is needed for this chapter. Create a blob-storage-volume on the Azure console Create a priviledged service-role Modifying the Cluster As soon as all requirements are met:\n"},{"id":10,"href":"/CYBERTEC-pg-operator/backup/encryption/","title":"Encrypted Backups","parent":"Backup","content":"pgBackRest also allows you to encrypt your backups on the client side before uploading them. This is possible with any type of storage and is very easy to activate.\nFirstly, we need to define an encryption key. This must be specified separately for each repo and stored in the same secret that is defined in the spec.backup.pgbackrest.configuration.secret object.\nkind: Secret apiVersion: v1 metadata: name: cluster-1-s3-credential namespace: cpo stringData: s3.conf | [global] repo1-s3-key=YOUR_S3_KEY repo1-s3-key-secret=YOUR_S3_KEY_SECRET repo1-cipher-pass=YOUR_ENCRYPTION_KEY We also need to configure the type of encryption for pgBackRest. This is done via the cipher-type parameter, which must also be specified for each repo. You can find the available values for the parameter here\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster namespace: cpo spec: backup: pgbackrest: configuration: secret: cluster-1-s3-credential global: repo1-path: /cluster/repo1/ repo1-retention-full: \u0026#39;7\u0026#39; repo1-retention-full-type: count repo1-cipher-type: aes-256-cbc image: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1\u0026#39; repos: - endpoint: \u0026#39;https://s3-zurich.cyberlink.cloud:443\u0026#39; name: repo1 region: zurich resource: cpo-cluster-bucket schedule: full: 30 2 * * * incr: \u0026#39;*/30 * * * *\u0026#39; storage: s3 ","description":"pgBackRest also allows you to encrypt your backups on the client side before uploading them. This is possible with any type of storage and is very easy to activate.\nFirstly, we need to define an encryption key. This must be specified separately for each repo and stored in the same secret that is defined in the spec.backup.pgbackrest.configuration.secret object.\nkind: Secret apiVersion: v1 metadata: name: cluster-1-s3-credential namespace: cpo stringData: s3.conf | [global] repo1-s3-key=YOUR_S3_KEY repo1-s3-key-secret=YOUR_S3_KEY_SECRET repo1-cipher-pass=YOUR_ENCRYPTION_KEY We also need to configure the type of encryption for pgBackRest. This is done via the cipher-type parameter, which must also be specified for each repo. You can find the available values for the parameter here\n"},{"id":11,"href":"/CYBERTEC-pg-operator/backup/check_backups/","title":"Check/Monitor Backups","parent":"Backup","content":"There are several ways to gain an insight into the current status of pgBackRest. One of these is to use pgBackRest within the container. This can be done both via the repo host and the Postgres pod.\npgbackrest via terminal (Repo-Host-Pod) kubectl exec cluster-5-pgbackrest-repo-host-0 --stdin --tty -- pgbackrest info stanza: db status: ok cipher: none db (current) wal archive min/max (16): 00000006000000000000005C/000000070000000000000092 full backup: 20240517-125730F timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00 wal start/stop: 00000007000000000000005E / 00000007000000000000005E database size: 22.9MB, database backup size: 22.9MB repo1: backup set size: 3MB, backup size: 3MB incr backup: 20240517-125730F_20240517-130003I timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00 wal start/stop: 000000070000000000000060 / 000000070000000000000060 database size: 22.9MB, database backup size: 904.3KB repo1: backup set size: 3MB, backup size: 149.4KB backup reference list: 20240517-125730F incr backup: 20240517-125730F_20240517-131503I timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00 wal start/stop: 000000070000000000000062 / 000000070000000000000062 database size: 22.9MB, database backup size: 24.3KB repo1: backup set size: 3MB, backup size: 2.9KB backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I pgbackrest via terminal (Postgres-Pod) kubectl exec cluster-5-0 --stdin --tty -- pgbackrest info Defaulted container \u0026#34;postgres\u0026#34; out of: postgres, postgres-exporter, pgbackrest-restore (init) stanza: db status: ok cipher: none db (current) wal archive min/max (16): 00000006000000000000005C/000000070000000000000092 full backup: 20240517-125730F timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00 wal start/stop: 00000007000000000000005E / 00000007000000000000005E database size: 22.9MB, database backup size: 22.9MB repo1: backup set size: 3MB, backup size: 3MB incr backup: 20240517-125730F_20240517-130003I timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00 wal start/stop: 000000070000000000000060 / 000000070000000000000060 database size: 22.9MB, database backup size: 904.3KB repo1: backup set size: 3MB, backup size: 149.4KB backup reference list: 20240517-125730F incr backup: 20240517-125730F_20240517-131503I timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00 wal start/stop: 000000070000000000000062 / 000000070000000000000062 database size: 22.9MB, database backup size: 24.3KB repo1: backup set size: 3MB, backup size: 2.9KB backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I There is the \u0026ldquo;normal\u0026rdquo; output, as well as the output format Json, which can be processed directly in the terminal.\nkubectl exec cluster-5-0 --stdin --tty -- pgbackrest info --output=json Check pgBackrest via Monitoring In addition to reading the status via the containers, pgBackRest can also be analysed and monitored via the monitoring stack. You can find information on setting up the monitoring stack and further information here.\n","description":"There are several ways to gain an insight into the current status of pgBackRest. One of these is to use pgBackRest within the container. This can be done both via the repo host and the Postgres pod.\npgbackrest via terminal (Repo-Host-Pod) kubectl exec cluster-5-pgbackrest-repo-host-0 --stdin --tty -- pgbackrest info stanza: db status: ok cipher: none db (current) wal archive min/max (16): 00000006000000000000005C/000000070000000000000092 full backup: 20240517-125730F timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00 wal start/stop: 00000007000000000000005E / 00000007000000000000005E database size: 22.9MB, database backup size: 22.9MB repo1: backup set size: 3MB, backup size: 3MB incr backup: 20240517-125730F_20240517-130003I timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00 wal start/stop: 000000070000000000000060 / 000000070000000000000060 database size: 22.9MB, database backup size: 904.3KB repo1: backup set size: 3MB, backup size: 149.4KB backup reference list: 20240517-125730F incr backup: 20240517-125730F_20240517-131503I timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00 wal start/stop: 000000070000000000000062 / 000000070000000000000062 database size: 22.9MB, database backup size: 24.3KB repo1: backup set size: 3MB, backup size: 2.9KB backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I pgbackrest via terminal (Postgres-Pod) kubectl exec cluster-5-0 --stdin --tty -- pgbackrest info Defaulted container \u0026#34;postgres\u0026#34; out of: postgres, postgres-exporter, pgbackrest-restore (init) stanza: db status: ok cipher: none db (current) wal archive min/max (16): 00000006000000000000005C/000000070000000000000092 full backup: 20240517-125730F timestamp start/stop: 2024-05-17 12:57:30+00 / 2024-05-17 12:57:41+00 wal start/stop: 00000007000000000000005E / 00000007000000000000005E database size: 22.9MB, database backup size: 22.9MB repo1: backup set size: 3MB, backup size: 3MB incr backup: 20240517-125730F_20240517-130003I timestamp start/stop: 2024-05-17 13:00:03+00 / 2024-05-17 13:00:05+00 wal start/stop: 000000070000000000000060 / 000000070000000000000060 database size: 22.9MB, database backup size: 904.3KB repo1: backup set size: 3MB, backup size: 149.4KB backup reference list: 20240517-125730F incr backup: 20240517-125730F_20240517-131503I timestamp start/stop: 2024-05-17 13:15:03+00 / 2024-05-17 13:15:04+00 wal start/stop: 000000070000000000000062 / 000000070000000000000062 database size: 22.9MB, database backup size: 24.3KB repo1: backup set size: 3MB, backup size: 2.9KB backup reference list: 20240517-125730F, 20240517-125730F_20240517-130003I There is the \u0026ldquo;normal\u0026rdquo; output, as well as the output format Json, which can be processed directly in the terminal.\n"},{"id":12,"href":"/CYBERTEC-pg-operator/project/","title":"CPO","parent":"CPO (CYBERTEC-PG-Operator)","content":"","description":""},{"id":13,"href":"/CYBERTEC-pg-operator/project/project/","title":"The Project","parent":"CPO","content":"The CYBERTEC PostgreSQL Operator (CPO) enables the simple provision and management of PostgreSQL clusters on Kubernetes. It reduces the administration effort and facilitates the management of single-node and HA clusters.\nMain components CYBERTEC-pg-operator: Kubernetes operator for the automation of PostgreSQL clusters. CYBERTEC-pg-container: Docker container suite for PostgreSQL, Patroni and etcd for the provision of HA clusters. CYBERTEC-operator-tutorials: Tutorials and instructions for installing and using the operator. Features Cluster management: Single-node and HA (High Availability) clusters via Patroni Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing Automated failover Live volume resize without pod restarts Basic credential and user management on K8s, eases application deployments Compatible with OpenShift and Rancher PostgreSQL compatibility: Supports PostgreSQL versions 13 to 17 Inplace upgrades for smooth version changes and minimal downtime Extensive extension support, including pgAudit, TimescaleDB and PostGIS Standby-Cluster Backup \u0026amp; Restore: Integrated pgBackRest support Automatic backups Point-in-Time- and Snapshot-based Restores / Disaster Recovery Connection management: pgBouncer for connection pooling Monitoring \u0026amp; alerting stack Integrated metrics exporter Prometheus, alert manager for metrics collection and alerting Grafana for visual monitoring of the clusters Operator UI: Web interface for managing clusters Installation Detailed instructions on installation and configuration can be found in the CYBERTEC operator tutorials and in the following chapters Example of installation via Helm:\nhelm repo add cybertec https://cybertec-postgresql.github.io/helm-charts/ helm install pg-operator cybertec/cybertec-pg-operator More information: Installation\nContribution This project is open source, and contributions to its further development are expressly encouraged. Possible forms of contribution:\nBug reports and feature requests Code contributions (pull requests welcome) Improvement of the documentation Further details on contributions can be found in the respective GitHub repositories. Licence The CYBERTEC PostgreSQL Operator is licensed under the Apache 2.0 licence.\n","description":"The CYBERTEC PostgreSQL Operator (CPO) enables the simple provision and management of PostgreSQL clusters on Kubernetes. It reduces the administration effort and facilitates the management of single-node and HA clusters.\nMain components CYBERTEC-pg-operator: Kubernetes operator for the automation of PostgreSQL clusters. CYBERTEC-pg-container: Docker container suite for PostgreSQL, Patroni and etcd for the provision of HA clusters. CYBERTEC-operator-tutorials: Tutorials and instructions for installing and using the operator. Features Cluster management: Single-node and HA (High Availability) clusters via Patroni Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing Automated failover Live volume resize without pod restarts Basic credential and user management on K8s, eases application deployments Compatible with OpenShift and Rancher PostgreSQL compatibility: Supports PostgreSQL versions 13 to 17 Inplace upgrades for smooth version changes and minimal downtime Extensive extension support, including pgAudit, TimescaleDB and PostGIS Standby-Cluster Backup \u0026amp; Restore: Integrated pgBackRest support Automatic backups Point-in-Time- and Snapshot-based Restores / Disaster Recovery Connection management: pgBouncer for connection pooling Monitoring \u0026amp; alerting stack Integrated metrics exporter Prometheus, alert manager for metrics collection and alerting Grafana for visual monitoring of the clusters Operator UI: Web interface for managing clusters Installation Detailed instructions on installation and configuration can be found in the CYBERTEC operator tutorials and in the following chapters Example of installation via Helm:\n"},{"id":14,"href":"/CYBERTEC-pg-operator/project/container_images/","title":"Container Images","parent":"CPO","content":"For each version of the operator and the required PostgreSQL and other required containers, the corresponding image is provided on Dockerhub.\nOperator container images The operator images are the central components that control the operation and administration of the PostgreSQL databases. These images are available in the following repository on DockerHub:\nOperator Images\nThe repository contains all the necessary images for running the Cybertec PG Operator in a Kubernetes environment. These images are updated regularly to ensure the latest features and security updates.\nAdditional container images In addition to the operator images, various container images are required to support a complete PostgreSQL environment. These images are available in the following repository: CYBERTEC-PG-Container Images\nThis repository contains images for the following components:\nPostgreSQL: The main database image, which contains all supported major versions of PostgreSQL. The name of the tag always reflects the latest release, e.g. currently 17.4 for PostgreSQL 17.4. For the other major versions, the corresponding minor versions released by the PostgreSQL community at the same time are included. Postgres-GIS: A specialised image that combines PostgreSQL with the PostGIS extension to support spatial data processing functions. You can find more information about Postgis here.\nThe tag for Postgis also includes the included version of Postgis. Example: postgres-gis-17.4-34-1 Postgis: 3.4.x PGBackRest: A backup and restore tool developed specifically for PostgreSQL and available as a separate container image. Exporter: Images for monitoring PostgreSQL databases that collect metrics and make them available for monitoring tools such as Prometheus. PgBouncer: A lightweight connection pooler for PostgreSQL that manages and optimises the number of concurrent connections. Extensions You can view the versions included in the Extensions section.\n","description":"For each version of the operator and the required PostgreSQL and other required containers, the corresponding image is provided on Dockerhub.\nOperator container images The operator images are the central components that control the operation and administration of the PostgreSQL databases. These images are available in the following repository on DockerHub:\n"},{"id":15,"href":"/CYBERTEC-pg-operator/architecture/","title":"Architecture","parent":"CPO (CYBERTEC-PG-Operator)","content":"","description":""},{"id":16,"href":"/CYBERTEC-pg-operator/crd/crd-postgresql/","title":"PostgreSQL","parent":"References","content":" CRD for kind postgresql Name Type required Description apiVersion string true acid.zalando.do/v1 kind string true metadata object true spec object true status object false spec Name Type required Description additionalVolumes array false List of additional volumes to mount in each container of the statefulset pod allowedSourceRanges array false The corresponding load balancer is accessible only to the networks defined by this parameter backup object false Enables the definition of a customised backup solution for the cluster clone object false Defines the clone-target for the Cluster connectionPooler object false Defines the configuration and settings for every type of a connectionPoolers (Primary and Replica). databases map false Defines the name of the database, they are created by the operator. See tutorial dockerImage string true Defines the used PostgreSQL-Container-Image for this cluster enableLogicalBackup boolean false Enable logical Backups for this Cluster (Stored on S3) - s3-configuration for Operator is needed (Not for pgBackRest) enableConnectionPooler boolean false creates a ConnectionPooler for the primary Pod enableReplicaConnectionPooler boolean false creates a ConnectionPooler for the replica Pods enableMasterLoadBalancer boolean false Define whether to enable the load balancer pointing to the Postgres primary enableReplicaLoadBalancer boolean false Define whether to enable the load balancer pointing to the Postgres replicas enableMasterPoolerLoadBalancer boolean false Define whether to enable the load balancer pointing to the primary ConnectionPooler enableReplicaPoolerLoadBalancer boolean false Define whether to enable the load balancer pointing to the Replica-ConnectionPooler enableShmVolume boolean false Start a database pod without limitations on shm memory. By default Docker limit /dev/shm to 64M (see e.g. the docker issue, which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is true, to the target database pod will be mounted a new tmpfs volume to remove this limitation. env array false Allows to add own Envs to the PostgreSQL containers initContainers array false Enables the definition of init-containers logicalBackupSchedule string false Enables the scheduling of logical backups based on cron-syntax. Example: 30 00 * * * maintenanceWindows array false Enables the definition of maintenance windows for the cluster. Example: Sat:00:00-04:00 masterServiceAnnotations map false Enables the definition of annotations for the Primary Service monitor map false Enables monitoring on the basis of the defined image nodeAffinity map false Enables overwriting of the nodeAffinity numberOfInstances int true Number of nodes of the cluster patroni map false Enables the customisation of patroni settings podPriorityClassName string false a name of the priority class that should be assigned to the cluster pods. If not set then the default priority class is taken. The priority class itself must be defined in advance podAnnotations map false A map of key value pairs that gets attached as annotations to each pod created for the database. postgresql map false Enables the customisation of PostgreSQL settings and parameters preparedDatabases map false Allows you to define databases including owner, schemas and extension and have the operator generate them. item See tutorial replicaServiceAnnotations map false Enables the definition of annotations for the Replica Service resources map true CPU \u0026amp; Memory (Limit \u0026amp; Request) definition for the Postgres container ServiceAnnotations map false A map of key value pairs that gets attached as annotations to each Service created for the database. sidecars array false Enables the definition of custom sidecars spiloFSGroup int false the Persistent Volumes for the Spilo pods in the StatefulSet will be owned and writable by the group ID specified. This will override the spilo_fsgroup operator parameter spiloRunAsGroup int false sets the group ID which should be used in the container to run the process. spiloRunAsUser int false Sets the user ID which should be used in the container to run the process. This must be set to run the container without root. standby map false Enables the creation of a standby cluster at the time of the creation of a new cluster streams array false Enables change data capture streams for defined database tables tde map false Enables the activation of TDE if a new cluster is created teamId string true name of the team the cluster belongs to. Will be removed soon tls map false Custom TLS certificate tolerations array false a list of tolerations that apply to the cluster pods. Each element of that list is a dictionary with the following fields: key, operator, value, effect and tolerationSeconds topologySpreadConstraints map false Enables the definition of a topologySpreadConstraint. See K8s-Documentation users map false a map of usernames to user flags for the users that should be created in the cluster by the operator. See tutorial usersWithSecretRotation list false list of users to enable credential rotation in K8s secrets. The rotation interval can only be configured globally. usersWithInPlaceSecretRotation list false list of users to enable in-place password rotation in K8s secrets. The rotation interval can only be configured globally. volume map true define the properties of the persistent storage that stores Postgres data ⬅ Back to Parent additionalVolumes Name Type required Description name string true Enables the definition of a pgbackrest-setup for the cluster mountPath string true Enables the definition of a pgbackrest-setup for the cluster targetContainers array true Enables the definition of a pgbackrest-setup for the cluster subPath string false Enables the definition of a pgbackrest-setup for the cluster isSubPathExpr boolean false Enables the definition of a pgbackrest-setup for the cluster volumeSource map true Enables the definition of a pgbackrest-setup for the cluster ⬅ Back to Parent backup Name Type required Description pgbackrest object false Enables the definition of a pgbackrest-setup for the cluster ⬅ Back to Parent clone Name Type required Description cluster string true Name of the cluster to be cloned. Random value if the cluster does not exist locally. pgbackrest object false Enables the definition of a pgbackrest-setup for the cluster ⬅ Back to Parent connectionPooler Name Type required Description numberOfInstances int true Number of Pods per Pooler mode string true pooling mode for pgBouncer (session, transaction, statement) schema string true Schema for Pooler (Default: pooler) user string true Username for Pooler (Default: pooler) maxDBConnections string true maxConnections to the DB-Pod(s) resources map true CPU \u0026amp; Memory (Limit \u0026amp; Request) definition for the Pooler ⬅ Back to Parent ","description":" CRD for kind postgresql Name Type required Description apiVersion string true acid.zalando.do/v1 kind string true metadata object true spec object true status object false spec Name Type required Description additionalVolumes array false List of additional volumes to mount in each container of the statefulset pod allowedSourceRanges array false The corresponding load balancer is accessible only to the networks defined by this parameter backup object false Enables the definition of a customised backup solution for the cluster clone object false Defines the clone-target for the Cluster connectionPooler object false Defines the configuration and settings for every type of a connectionPoolers (Primary and Replica). databases map false Defines the name of the database, they are created by the operator. See tutorial dockerImage string true Defines the used PostgreSQL-Container-Image for this cluster enableLogicalBackup boolean false Enable logical Backups for this Cluster (Stored on S3) - s3-configuration for Operator is needed (Not for pgBackRest) enableConnectionPooler boolean false creates a ConnectionPooler for the primary Pod enableReplicaConnectionPooler boolean false creates a ConnectionPooler for the replica Pods enableMasterLoadBalancer boolean false Define whether to enable the load balancer pointing to the Postgres primary enableReplicaLoadBalancer boolean false Define whether to enable the load balancer pointing to the Postgres replicas enableMasterPoolerLoadBalancer boolean false Define whether to enable the load balancer pointing to the primary ConnectionPooler enableReplicaPoolerLoadBalancer boolean false Define whether to enable the load balancer pointing to the Replica-ConnectionPooler enableShmVolume boolean false Start a database pod without limitations on shm memory. By default Docker limit /dev/shm to 64M (see e.g. the docker issue, which could be not enough if PostgreSQL uses parallel workers heavily. If this option is present and value is true, to the target database pod will be mounted a new tmpfs volume to remove this limitation. env array false Allows to add own Envs to the PostgreSQL containers initContainers array false Enables the definition of init-containers logicalBackupSchedule string false Enables the scheduling of logical backups based on cron-syntax. Example: 30 00 * * * maintenanceWindows array false Enables the definition of maintenance windows for the cluster. Example: Sat:00:00-04:00 masterServiceAnnotations map false Enables the definition of annotations for the Primary Service monitor map false Enables monitoring on the basis of the defined image nodeAffinity map false Enables overwriting of the nodeAffinity numberOfInstances int true Number of nodes of the cluster patroni map false Enables the customisation of patroni settings podPriorityClassName string false a name of the priority class that should be assigned to the cluster pods. If not set then the default priority class is taken. The priority class itself must be defined in advance podAnnotations map false A map of key value pairs that gets attached as annotations to each pod created for the database. postgresql map false Enables the customisation of PostgreSQL settings and parameters preparedDatabases map false Allows you to define databases including owner, schemas and extension and have the operator generate them. item See tutorial replicaServiceAnnotations map false Enables the definition of annotations for the Replica Service resources map true CPU \u0026amp; Memory (Limit \u0026amp; Request) definition for the Postgres container ServiceAnnotations map false A map of key value pairs that gets attached as annotations to each Service created for the database. sidecars array false Enables the definition of custom sidecars spiloFSGroup int false the Persistent Volumes for the Spilo pods in the StatefulSet will be owned and writable by the group ID specified. This will override the spilo_fsgroup operator parameter spiloRunAsGroup int false sets the group ID which should be used in the container to run the process. spiloRunAsUser int false Sets the user ID which should be used in the container to run the process. This must be set to run the container without root. standby map false Enables the creation of a standby cluster at the time of the creation of a new cluster streams array false Enables change data capture streams for defined database tables tde map false Enables the activation of TDE if a new cluster is created teamId string true name of the team the cluster belongs to. Will be removed soon tls map false Custom TLS certificate tolerations array false a list of tolerations that apply to the cluster pods. Each element of that list is a dictionary with the following fields: key, operator, value, effect and tolerationSeconds topologySpreadConstraints map false Enables the definition of a topologySpreadConstraint. See K8s-Documentation users map false a map of usernames to user flags for the users that should be created in the cluster by the operator. See tutorial usersWithSecretRotation list false list of users to enable credential rotation in K8s secrets. The rotation interval can only be configured globally. usersWithInPlaceSecretRotation list false list of users to enable in-place password rotation in K8s secrets. The rotation interval can only be configured globally. volume map true define the properties of the persistent storage that stores Postgres data ⬅ Back to Parent additionalVolumes Name Type required Description name string true Enables the definition of a pgbackrest-setup for the cluster mountPath string true Enables the definition of a pgbackrest-setup for the cluster targetContainers array true Enables the definition of a pgbackrest-setup for the cluster subPath string false Enables the definition of a pgbackrest-setup for the cluster isSubPathExpr boolean false Enables the definition of a pgbackrest-setup for the cluster volumeSource map true Enables the definition of a pgbackrest-setup for the cluster ⬅ Back to Parent backup Name Type required Description pgbackrest object false Enables the definition of a pgbackrest-setup for the cluster ⬅ Back to Parent clone Name Type required Description cluster string true Name of the cluster to be cloned. Random value if the cluster does not exist locally. pgbackrest object false Enables the definition of a pgbackrest-setup for the cluster ⬅ Back to Parent connectionPooler Name Type required Description numberOfInstances int true Number of Pods per Pooler mode string true pooling mode for pgBouncer (session, transaction, statement) schema string true Schema for Pooler (Default: pooler) user string true Username for Pooler (Default: pooler) maxDBConnections string true maxConnections to the DB-Pod(s) resources map true CPU \u0026amp; Memory (Limit \u0026amp; Request) definition for the Pooler ⬅ Back to Parent "},{"id":17,"href":"/CYBERTEC-pg-operator/crd/crd-operator-configurator/","title":"Operator-Configuration","parent":"References","content":" Name Type default Description enable_crd_registration boolean true crd_categories string all enable_lazy_spilo_upgrade boolean false enable_pgversion_env_var boolean true enable_spilo_wal_path_combat boolean false etcd_host string kubernetes_use_configmaps boolean false docker_image string sidecars list enable_shm_volume boolean true workers int 8 max_instances int -1 min_instances int -1 resync_period string 30m repair_period string 5m set_memory_request_to_limit boolean false debug_logging boolean true enable_db_access boolean true spilo_privileged boolean false spilo_allow_privilege_escalation boolean true watched_namespace string * major-upgrade-specific Name Type default Description major_version_upgrade_mode string off major_version_upgrade_team_allow_list string minimal_major_version string 9.6 target_major_version string 14 aws-specific Name Type default Description wal_s3_bucket string log_s3_bucket string kube_iam_role string aws_region string additional_secret_mount string additional_secret_mount_path string enable_ebs_gp3_migration boolean enable_ebs_gp3_migration_max_size int logical-backup-specific Name Type default Description logical_backup_docker_image string logical_backup_google_application_credentials string logical_backup_job_prefix string logical_backup_provider string logical_backup_s3_access_key_id string logical_backup_s3_bucket string logical_backup_s3_endpoint string logical_backup_s3_region string logical_backup_s3_secret_access_key string logical_backup_s3_sse string logical_backup_s3_retention_time string logical_backup_schedule string (Cron-Syntax) team-api-specific Name Type default Description enable_teams_api string teams_api_url string teams_api_role_configuration string enable_team_superuser boolean team_admin_role boolean enable_admin_role_for_users boolean pam_role_name string pam_configuration string protected_role_names list postgres_superuser_teams string role_deletion_suffix string enable_team_member_deprecation boolean enable_postgres_team_crd boolean enable_postgres_team_crd_superusers boolean enable_team_id_clustername_prefix boolean ","description":" Name Type default Description enable_crd_registration boolean true crd_categories string all enable_lazy_spilo_upgrade boolean false enable_pgversion_env_var boolean true enable_spilo_wal_path_combat boolean false etcd_host string kubernetes_use_configmaps boolean false docker_image string sidecars list enable_shm_volume boolean true workers int 8 max_instances int -1 min_instances int -1 resync_period string 30m repair_period string 5m set_memory_request_to_limit boolean false debug_logging boolean true enable_db_access boolean true spilo_privileged boolean false spilo_allow_privilege_escalation boolean true watched_namespace string * major-upgrade-specific Name Type default Description major_version_upgrade_mode string off major_version_upgrade_team_allow_list string minimal_major_version string 9.6 target_major_version string 14 aws-specific Name Type default Description wal_s3_bucket string log_s3_bucket string kube_iam_role string aws_region string additional_secret_mount string additional_secret_mount_path string enable_ebs_gp3_migration boolean enable_ebs_gp3_migration_max_size int logical-backup-specific Name Type default Description logical_backup_docker_image string logical_backup_google_application_credentials string logical_backup_job_prefix string logical_backup_provider string logical_backup_s3_access_key_id string logical_backup_s3_bucket string logical_backup_s3_endpoint string logical_backup_s3_region string logical_backup_s3_secret_access_key string logical_backup_s3_sse string logical_backup_s3_retention_time string logical_backup_schedule string (Cron-Syntax) team-api-specific Name Type default Description enable_teams_api string teams_api_url string teams_api_role_configuration string enable_team_superuser boolean team_admin_role boolean enable_admin_role_for_users boolean pam_role_name string pam_configuration string protected_role_names list postgres_superuser_teams string role_deletion_suffix string enable_team_member_deprecation boolean enable_postgres_team_crd boolean enable_postgres_team_crd_superusers boolean enable_team_id_clustername_prefix boolean "},{"id":18,"href":"/CYBERTEC-pg-operator/quickstart/","title":"Quickstart","parent":"CPO (CYBERTEC-PG-Operator)","content":"We can tell and document so much about our project but it seems you just want to get started. Let us show you the fastest way to use CPO.\nPreconditions git helm (optional) kubectl or oc Let\u0026rsquo;s start Step 1 - Preparations To get started, you can fork our tutorial repository on Github and then download it. CYBERTEC-operator-tutorials\ngit clone https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorials.git cd CYBERTEC-operator-tutorials Step 2 - Install the Operator Two options are available for the installation:\nInstallation via Helm-Chart (local or via helmn-repo) Installation via apply Installation via Helm-Chart If you want to use the helm-chart, YOU can decide for yourself whether you want to use the helm-cahrt from the operator-tutorials on github or directly connect the helm-repo for the cpo-project and install the helm-chart over it.\n#add helm-repo (optional) helm repo add cpo https://cybertec-postgresql.github.io/CYBERTEC-operator-tutorials kubectl apply -n cpo -k setup/namespace/. helm install -n cpo cpo cpo/postgres-operator or # use local helm-chart from git kubectl apply -n cpo -k setup/namespace/. helm install cpo -n cpo setup/helm/operator/ Installation via apply kubectl apply -n cpo -k setup/namespace/. kubectl apply -n cpo -k setup/helm/operator/. You can check if the operator pod is in operation.\nkubectl get pods -n cpo --selector=cpo.cybertec.at/pod/type=postgres-operator The result should look like this:\nNAME READY STATUS RESTARTS AGE postgres-operator-599688d948-fw8pw 1/1 Running 0 41s The operator is ready and the setup is complete. The next step is the creation of a Postgres cluster\nStep 3 - Create a Cluster To create a simple cluster, the following command is sufficient\nkubectl apply -n cpo -f cluster-tutorials/single-cluster watch kubectl get pods -n cpo --selector cluster-name=cluster-1 The result should look like this:\nAlle 2.0s: kubectl get pods -n cpo --selector cluster-name=cluster-1 NAME READY STATUS RESTARTS AGE cluster-1-0 2/2 Running 0 28s cluster-1-1 0/2 PodInitializing 0 9s Step 4 - Connect to the Database Get your login information from the secret.\nkubectl get secret -n cpo postgres.cluster-1.credentials.postgresql.cpo.opensource.cybertec.at -o jsonpath=\u0026#39;{.data}\u0026#39; | jq \u0026#39;.|map_values(@base64d)\u0026#39; The result should look like this:\n{ \u0026#34;password\u0026#34;: \u0026#34;2rZG1Kx9asdHscswQGzff4Ru0xW6uasacy3GQ0sjdCH3wWr0kguUXUZek6dkemsf\u0026#34;, \u0026#34;username\u0026#34;: \u0026#34;postgres\u0026#34; } Connection via port-forward kubectl port-forward -n cpo cluster-1-0 5432:5432 # using psql PGPASSWORD=2rZG1Kx9asdHscswQGzffjdCH3wWr0kguUXUZek6dkemsf psql -h 127.0.0.1 -p 5432 -U postgres # using usql PGPASSWORD=2rZG1Kx9asdHscswQGzffjdCH3wWr0kguUXUZek6dkemsf usql postgresql://postgres@127.0.0.1/postgres Next Steps Congratulations, your first cluster is ready and you were able to connect to it. On the following pages we have put together an introduction with lots of information and details to show you the different possibilities and components of CPO.\n","description":"We can tell and document so much about our project but it seems you just want to get started. Let us show you the fastest way to use CPO.\nPreconditions git helm (optional) kubectl or oc Let\u0026rsquo;s start Step 1 - Preparations To get started, you can fork our tutorial repository on Github and then download it. CYBERTEC-operator-tutorials\n"},{"id":19,"href":"/CYBERTEC-pg-operator/installation/","title":"Installation","parent":"CPO (CYBERTEC-PG-Operator)","content":"","description":""},{"id":20,"href":"/CYBERTEC-pg-operator/installation/dev-k8s/","title":"Setup local Kubernetes","parent":"Installation","content":"There are various options for setting up a local Kubernetes environment. This chapter deals with the following two variants:\nminikube crc (CodeReadyContainers from RedHat) Minikube Minikube is a tool that makes it possible to run Kubernetes locally on a single computer. It sets up a minimal but functional Kubernetes environment suitable for development and testing purposes. Minikube supports most Kubernetes features and provides an easy way to launch and manage Kubernetes clusters on local machines without the need for a complex cloud infrastructure.\nInstall Kubectl \u0026amp; Minikube To use Minikube, it is essential to install the Kubectl client.\nHere you will find all the information you need to install kubectl on your Linux, Mac or Windows device.\nYou can Install Minikube on your Linux-, Mac- or Windows-Devide using this Documentation.\nUse Minikube Before starting minikube, it is advisable to define a path for the kubeconfig.\nexport KUBECONFIG=/home/USERNAME/kubeconfig_minikube.conf You can then start minikube and all the necessary data is written directly to the conf. The definition of a user-defined path ensures that other configs are not inadvertently overwritten. The path must be defined again via ENV in each new user session. Alternatively, this can also be permanently defined via .bashrc. If the default path is not used for any other purpose, the ENV does not need to be set.\n# Start minikube minikube start # get pods from default namespace kubectl get pods # change default namespace to cpo kubectl config set-context --namespace=cpo CRC CRC (CodeReady Containers) is a tool from Red Hat that provides a local OpenShift environment. It is specifically designed to run a compact version of OpenShift on a local machine to provide developers and testers with an easy way to develop and test applications optimised for use in OpenShift. CRC includes all the necessary OpenShift components and makes it possible to use Red Hat\u0026rsquo;s container platform locally without building a full cloud infrastructure.\nInstall oc-client \u0026amp; CRC To use CRC, it is essential to install the oc-client or the kubectl-client.\nHere you will find all the information you need to install kubectl on your Linux, Mac or Windows device.\nYou can Download and install CRC on your Linux-, Mac- or Windows-Devide using this informations.\nUse CRC Before installing crc, it is advisable to define a path for the kubeconfig.\nexport KUBECONFIG=/home/USERNAME/kubeconfig_crc.conf You can then install and start crc and all the necessary data is written directly to the conf. The definition of a user-defined path ensures that other configs are not inadvertently overwritten. The path must be defined again via ENV in each new user session. Alternatively, this can also be permanently defined via .bashrc. If the default path is not used for any other purpose, the ENV does not need to be set.\n# Install crc crc setup # Start crc crc start # get pods from default namespace oc get pods # change default namespace to cpo oc project cpo ","description":"There are various options for setting up a local Kubernetes environment. This chapter deals with the following two variants:\nminikube crc (CodeReadyContainers from RedHat) Minikube Minikube is a tool that makes it possible to run Kubernetes locally on a single computer. It sets up a minimal but functional Kubernetes environment suitable for development and testing purposes. Minikube supports most Kubernetes features and provides an easy way to launch and manage Kubernetes clusters on local machines without the need for a complex cloud infrastructure.\n"},{"id":21,"href":"/CYBERTEC-pg-operator/installation/install_operator/","title":"Install CPO","parent":"Installation","content":" Prerequisites For the installation you either need our CPO tutorial repository or you install CPO directly from our registry. Exception: Installation via Operatorhub (Openshift only)\nCPO-Tutorial-Repository To get started, you can fork our tutorial repository on Github and then download it. CYBERTEC-operator-tutorials\nGITHUB_USER=\u0026#39;[YOUR_USERNAME]\u0026#39; git clone https://github.com/$GITHUB_USER/CYBERTEC-operator-tutorials.git cd CYBERTEC-operator-tutorials Helm-Registry helm repo add cpo https://cybertec-postgresql.github.io/CYBERTEC-operator-tutorials\nCreate Namespace # kubectl kubectl create namespace cpo # oc oc create namespace cpo Install CPO There are several ways to install CPO:\nUse Helm Use apply Use Operatorhub (On Openshift only) Helm You can check and change the value.yaml of the helm diagram under the path helm/operator/values.yaml By default, the operator is defined so that it is configured via crd-configuration. If you wish, you can change this to configmap. There are also some other default settings.\nhelm install -n cpo cpo helm/operator/. The installation uses a standard configuration. On the following page you will find more information on how to configure cpo and thus adapt it to your requirements.\nApply The installation uses a standard configuration. On the following page you will find more information on how to configure cpo and thus adapt it to your requirements.\nOperatorhub The installation uses a standard configuration. On the following page you will find more information on how to configure cpo and thus adapt it to your requirements.\n","description":" Prerequisites For the installation you either need our CPO tutorial repository or you install CPO directly from our registry. Exception: Installation via Operatorhub (Openshift only)\nCPO-Tutorial-Repository To get started, you can fork our tutorial repository on Github and then download it. CYBERTEC-operator-tutorials\n"},{"id":22,"href":"/CYBERTEC-pg-operator/installation/configuration_operator/","title":"Operator-Configuration","parent":"Installation","content":"Users who are already used to working with PostgreSQL from Baremetal or VMs are already familiar with the need for various files to configure PostgreSQL. These include\npostgresql.conf pg_hba.conf \u0026hellip; Although these files are available in the container, direct modification is not planned. As part of the declarative mode of operation of the operator, these files are defined via the operator. The modifying intervention within the container also represents a contradiction to the immutability of the container.\nFor these reasons, the operator provides a way to make adjustments to the various files, from PostgreSQL to Patroni.\nWe differentiate between two main objects in the cluster manifest:\npostgresql with the child objects version and parameters patroni with objects for the pg_hab, slots and much more postgresql The postgresql object consists of the following elements:\nversion - allows you to select the major version of PostgreSQL used. parameters- enables the postgresql.conf to be changed spec: postgresql: parameters: shared_preload_libraries: \u0026#39;pg_stat_statements,pgnodemx, timescaledb\u0026#39; shared_buffers: \u0026#39;512MB\u0026#39; version: \u0026#39;16\u0026#39; Any known PostgreSQL parameter from postgresql.conf can be entered here and will be delivered by the operator to all nodes of the cluster accordingly.\nYou can find more information about the parameters in the PostgreSQL documentation\npatroni The patroni object contains numerous options for customising the patroni-setu, and the pg_hba.conf is also configured here. A complete list of all available elements can be found here.\nThe most important elements include\npg_hba - pg_hba.conf slots synchronous_mode - enables synchronous mode in the cluster. The default is set to false maximum_lag_on_failover - Specifies the maximum lag so that the pod is still considered healthy in the event of a failover. failsafe_mode Allows you to cancel the downgrading of the leader if all cluster members can be reached via the Patroni Rest Api. You can find more information on this in the Patroni documentation pg_hba The pg_hba.conf contains all defined authentication rules for PostgreSQL.\nWhen customising this configuration, it is important that the entire version of pg_hba is written to the manifest. The current configuration can be read out in the database using table pg_hba_file_rules ;.\nFurther information can be found in the PostgreSQL documentation\nslots When using user-defined slots, for example for the use of CDC using Debezium, there are problems when interacting with Patroni, as the slot and its current status are not automatically synchronised to the replicas.\nIn the event of a failover, the client cannot start replication as both the entire slot and the information about the data that has already been synchronised are missing.\nTo resolve this problem, slots must be defined in the cluster manifest rather than in PostgreSQL.\nspec: patroni: slots: cdc-example: database: app_db plugin: pgoutput type: logical This example creates a logical replication slot with the name cdc-example within the app_db database and uses the pgoutput plugin for the slot.\nSlots are only synchronised from the leader/standby leader to the replicas. This means that using the slots read-only on the replicas will cause a problem in the event of a failover. ","description":"Users who are already used to working with PostgreSQL from Baremetal or VMs are already familiar with the need for various files to configure PostgreSQL. These include\npostgresql.conf pg_hba.conf \u0026hellip; Although these files are available in the container, direct modification is not planned. As part of the declarative mode of operation of the operator, these files are defined via the operator. The modifying intervention within the container also represents a contradiction to the immutability of the container.\n"},{"id":23,"href":"/CYBERTEC-pg-operator/first_cluster/","title":"Create a Cluster","parent":"CPO (CYBERTEC-PG-Operator)","content":"To set up a cluster, the implementation is based on a description, as with the other Kubernetes deplyoments. To do this, the operator uses a document of type postgresql.\nYou can also find the basic minimum specifications for a single-node cluster in our tutorial project on Github\nminimal Single-Node Cluster apiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1 spec: dockerImage: \u0026#34;docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1\u0026#34; numberOfInstances: 1 postgresql: version: \u0026#34;17\u0026#34; resources: limits: cpu: 500m memory: 500Mi requests: cpu: 500m memory: 500Mi volume: size: 5Gi Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-17-Server. Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit.\nAfter some seconds we should see, that the operator creates our cluster based on the declared definitions.\nkubectl get pods ----------------------------------------------------------------------------- NAME | READY | STATUS | RESTARTS | AGE cluster-1-0 | 1/1 | Running | 0 | 50s Here you will find a complete overview of the available options within the cluster manifest. Use a specific Storageclass spec: ... volume: size: 5Gi storageClass: default-provisioner ... Using the storageClass-Definiton allows us to define a specific storageClass for this Cluster. Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod.\nExpanding Volume The Operator allows to you expand your volume if the storage-System is able to do this.\nspec: ... volume: size: 10Gi storageClass: default-provisioner ... This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc.\nkubectl get pvc pgdata-cluster-1-0 -o yaml ------------------------------------------------------- spec: accessModes: - ReadWriteOnce resources: requests: storage: 10Gi storageClassName: crc-csi-hostpath-provisioner volumeMode: Filesystem volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37 status: accessModes: - ReadWriteOnce capacity: storage: 5Gi phase: Bound Creating additonal Volumes The Operator allows you to modify your cluster with additonal Volumes.\nspec: ... additionalVolumes: - name: empty mountPath: /opt/empty targetContainers: - all volumeSource: emptyDir: {} This example will create an emptyDir and mount it to all Containers inside the Database-Pod.\nSpecific Settings for aws gp3 Storage For the gp3 Storage aws you can define more informations\nvolume: size: 1Gi storageClass: gp3 iops: 1000 # for EBS gp3 throughput: 250 # in MB/s for EBS gp3 The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. Please also ensure to check the default and allowed values for IOPS and Throughput AWS docs.\nTo ensure that the settings are updates properly please define the Operator-Configuration \u0026lsquo;storage_resize_mode\u0026rsquo; from default to \u0026lsquo;mixed\u0026rsquo;\n","description":"To set up a cluster, the implementation is based on a description, as with the other Kubernetes deplyoments. To do this, the operator uses a document of type postgresql.\nYou can also find the basic minimum specifications for a single-node cluster in our tutorial project on Github\nminimal Single-Node Cluster apiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1 spec: dockerImage: \u0026#34;docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1\u0026#34; numberOfInstances: 1 postgresql: version: \u0026#34;17\u0026#34; resources: limits: cpu: 500m memory: 500Mi requests: cpu: 500m memory: 500Mi volume: size: 5Gi Based on this Manifest the Operator will deploy a single-Node-Cluster based on the defined dockerImage and start the included Postgres-17-Server. Also created is a volume based on your default-storage Class. The Ressource-Definiton means, that we reserve a half cpu and a half GB Memory for this Cluster with the same Definition as limit.\n"},{"id":24,"href":"/CYBERTEC-pg-operator/resources/","title":"Apply Ressources","parent":"CPO (CYBERTEC-PG-Operator)","content":"Kubernetes workloads are often deployed without a direct resource definition. This means that, apart from the limits specified by the administrators, the workloads can use the required resources of the worker node very dynamically.\nThe cluster manifest is used to define the Postgres pod resources via the typical resources objects.\nThere are basically two different definitions:\nrequests: Basic requirement and guaranteed by the worker node limits: maximum availability, allocation is increased dynamically if the worker node can provide the resources. For the planning of the cluster, a proper definition should be carried out in terms of the required hardware, which is then defined as requests. These resources are thus guaranteed to the cluster and are taken into account when deploying the pod. Accordingly, a pod can only be deployed on a worker if it can provide these resources. Any limits beyond this are not taken into account when deploying.\nThe unit of measurement should be taken into account when planning the necessary CPUs: cpu specifications are based on millicores\n1 cpu corresponds to 1 core 1 core corresponds to 1000 millicores (m) 1/2 core corresponds to 500 m resources: limits: cpu: 500m memory: 1Gi requests: cpu: 1000m memory: 1Gi This example corresponds to a guaranteed availability of half a core and 1 Gibibyte. However, if necessary and available, the container can use up to one core. The allocation takes place dynamically and for the required time.\nPods can be categorised into three Quality of Services (QoS) based on the defined information on the resources.\nBest-Effort: The containers of a pod have no resource information Burstable: A container of the pod has a memory or CPU requests or limits. Guaranteed: Each container of a pod has both cpu and memory requests and limits. In addition, the details of the respective limits correspond to the requests details If you would like more information and explanations, you can take a look at the Kubernetes documentation on QoS.\nWe generally recommend using the Guaranteed Status for PostgreSQL workloads. However, many users very successfully use the deviation of the CPU limit by factors such as 2. For example:\nresources: limits: cpu: 1000m memory: 1Gi requests: cpu: 2000m memory: 1Gi This is intended to create the possibility of additional CPU resources for sudden load peaks.\nThe use of burstable definitions does not release you from a correct resource calculation, as limits resources are not guaranteed and therefore an undersupply can occur if the requests are not properly defined. ","description":"Kubernetes workloads are often deployed without a direct resource definition. This means that, apart from the limits specified by the administrators, the workloads can use the required resources of the worker node very dynamically.\nThe cluster manifest is used to define the Postgres pod resources via the typical resources objects.\nThere are basically two different definitions:\nrequests: Basic requirement and guaranteed by the worker node limits: maximum availability, allocation is increased dynamically if the worker node can provide the resources. For the planning of the cluster, a proper definition should be carried out in terms of the required hardware, which is then defined as requests. These resources are thus guaranteed to the cluster and are taken into account when deploying the pod. Accordingly, a pod can only be deployed on a worker if it can provide these resources. Any limits beyond this are not taken into account when deploying.\n"},{"id":25,"href":"/CYBERTEC-pg-operator/storage/","title":"Storage","parent":"CPO (CYBERTEC-PG-Operator)","content":"Storage is crucial for the performance of a database and is therefore a central element. As with systems based on bare metal or virtual machines, the same requirements apply to Kubernetes workloads, such as constant availability, good performance, consistency and durability.\nA basic distinction is made between local storage, which is directly connected to the worker node, and network storage, which is mounted on the worker node and thus made available to the pod.\nIn probably the vast majority of Kubernetes systems, network storage is used, for example from systems from hyperscalers or other cloud providers or own systems such as CEPH.\nWith network storage in particular, attention must be paid to performance in terms of throughput (speed and guaranteed IOPS) and, above all, latency. It is also important to ensure that the different volumes do not compete with each other in terms of load.\nPAY ATTENTION: Before using a CPO cluster, make sure that the storage is suitable for the intended use and provides the necessary performance. In addition, check the storage with benchmarks before use. We recommend the use of pgbench for this purpose.\nDefine Storage-Volume The storage is defined via the volume object and enables the size and storage class for the storage to be defined, among other things.\nspec: volume: size: 5Gi storageClass: default-provisioner ... The volume is currently used for both PG and WAL data. In future, there will be an optional option to create a separate WAL volume. Please check our roadmap\nPlease ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod. The volume is currently used for both PG and WAL data. In future, there will be an optional option to create a separate WAL volume.\nExpanding Volume Kubernetes is able to forward requests to expand the storage to the storage system and enable the expand without the need to restart the container. However, this also requires the associated storage system and the driver used to support this. This information can be found in the storage class under the object: allowVolumeExpansion. A distinction must also be made between online and offline expand. The latter requires a restart of the pod. To do this, the pod must be deleted manually. To Expand the Volume, the value of the object volume.size must be increased\nspec: volume: size: 10Gi storageClass: default-provisioner ... This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc.\nkubectl get pvc pgdata-cluster-1-0 -o yaml ------------------------------------------------------- spec: accessModes: - ReadWriteOnce resources: requests: storage: 10Gi storageClassName: crc-csi-hostpath-provisioner volumeMode: Filesystem volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37 status: accessModes: - ReadWriteOnce capacity: storage: 5Gi phase: Bound Creating additonal Volumes The Operator allows you to modify your cluster with additonal Volumes.\nspec: ... additionalVolumes: - name: empty mountPath: /opt/empty targetContainers: - all volumeSource: emptyDir: {} This example will create an emptyDir and mount it to all Containers inside the Database-Pod.\nSpecific Settings for aws gp3 Storage For the gp3 Storage aws you can define more informations\nvolume: size: 1Gi storageClass: gp3 iops: 1000 # for EBS gp3 throughput: 250 # in MB/s for EBS gp3 The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. Please also ensure to check the default and allowed values for IOPS and Throughput AWS docs.\nTo ensure that the settings are updates properly please define the Operator-Configuration \u0026lsquo;storage_resize_mode\u0026rsquo; from default to \u0026lsquo;mixed\u0026rsquo;\n","description":"Storage is crucial for the performance of a database and is therefore a central element. As with systems based on bare metal or virtual machines, the same requirements apply to Kubernetes workloads, such as constant availability, good performance, consistency and durability.\nA basic distinction is made between local storage, which is directly connected to the worker node, and network storage, which is mounted on the worker node and thus made available to the pod.\n"},{"id":26,"href":"/CYBERTEC-pg-operator/db_users/","title":"Databases \u0026 Users","parent":"CPO (CYBERTEC-PG-Operator)","content":"CPO not only supports you in deploying your cluster, it also supports you in setting it up in terms of the database and users. CPO offers you three different options for this:\nCreate roles Create databases preapared databases Create Roles The creation of users is based on the definition of the user name and the definition of the required rights for this user. Available rights are\nsuperuser inherit login nologin createrole createdb replication bypassrls Unless explicitly defined via NOLOGIN, a created user automatically receives the LOGIN permission.\nspec: users: db_owner: - login - createdb appl_user: - login For each user created, CPO automatically creates a secret with username and password in the namespace of the cluster, which follows the following naming convention: [USERNAME].[CLUSTERNAME].credentials.postgresql.cpo.opensource.cybertec.at\nIf the secrets for an application are to be stored in a different namespace, for example, it is necessary to define the setting enable_cross_namespace_secret as true in the operator configuration. You can find more information about the operator configuration here.\nThe namespace must then be written before the user name.\nspec: users: db_owner: - login - createdb app_namespace.appl_user: - login Create Databases Databases are basically created in a very similar way to users. The definition is based on the database name and the database owner.\nspec: users: db_owner: - login - createdb app_namespace.appl_user: - login databases; app_db: app_namespace.appl_user Be aware that the user name must be defined for the database owner in the same way as it is done in the users object. Prepared Databases The preparedDatabases object is available for a much more extensive setup of databases and users. In addition to the creation of databases and users, this also enables the creation of schemas and extensions. A more detailed rights management is also available.\nDatabases and Schema Creating the preparedDatabases object already creates a database whose name is based on the cluster name. preparedDatabases: {}\nFor the database name, - is replaced with _ in the cluster name To create your own database names and elements such as schemas and extensions within the database, an object must be created within preparedDatabases for each database.\nspec: preparedDatabases: appl_db: extensions: dblink: public schemas: data: {} This example creates a database with the name appl_db and creates a schema with the name data in it, as well as creating the dblink extension in the schema public.\nManagement of users and Permissions For rights management, we distinguish between NOLOGIN roles and LOGIN roles. Users have login rights and inherit the other rights from the NOLOGIN role.\nNoLogin roles (defaultRoles) The roles are created if defaultroles is not explicitly set to false.\nspec: preparedDatabases: appl_db: extensions: dblink: public schemas: data: {} This creates roles for the schema owner, writer and reader\nLogin roles (defaultUsers) The roles described in the previous paragraph can be assigned to LOGIN roles via the users section in the manifest. Optionally, the Postgres operator can also create standard LOGIN roles for the database and each individual schema. These roles are given the suffix _user and inherit all rights from their NOLOGIN counterparts. Therefore, you cannot set defaultRoles to false and activate defaultUsers at the same time.\nspec: preparedDatabases: appl_db: defaultUsers: true extensions: dblink: public schemas: data: {} history: defaultRoles: true defaultUsers: false This example creates the following users and inheritances\nRole name Attributes inherits from appl_db_owner Cannot login appl_db_reader,appl_db_owner,appl_data_owner,\u0026hellip; appl_db_owner_user appl_db_owner appl_db_reader Cannot login appl_db_reader_user appl_db_reader appl_db_writer Cannot login appl_db_reader appl_db_writer_user appl_db_writer appl_db_data_owner Cannot login appl_db_data_reader,appl_db_data_writer appl_db_data_reader Cannot login appl_db_data_writer Cannot login appl_db_data_reader appl_db_history_owner Cannot login appl_db_history_reader,appl_db_history_writer appl_db_history_reader Cannot login appl_db_history_writer Cannot login appl_db_history_reader Default access permissions are also defined for LOGIN roles when databases and schemas are created. This means that they are not currently set if defaultUsers (or defaultRoles for schemas) are activated at a later time.\nUser Secrets For each user created by cpo with LOGIN permissions, the operator also creates a secret with username and password, as with the creation of roles via the users object.\n","description":"CPO not only supports you in deploying your cluster, it also supports you in setting it up in terms of the database and users. CPO offers you three different options for this:\nCreate roles Create databases preapared databases Create Roles The creation of users is based on the definition of the user name and the definition of the required rights for this user. Available rights are\n"},{"id":27,"href":"/CYBERTEC-pg-operator/customize_cluster/","title":"Customize Cluster","parent":"CPO (CYBERTEC-PG-Operator)","content":"","description":""},{"id":28,"href":"/CYBERTEC-pg-operator/ha_cluster/","title":"High Availability","parent":"CPO (CYBERTEC-PG-Operator)","content":"High availability (HA) is a critical aspect of running database systems, especially in mission-critical applications where downtime is unacceptable. This section explains why high availability is important for PostgreSQL and how Patroni acts as a solution to ensure HA. Why High Availability (HA) for PostgreSQL?\nTo minimise downtime: In modern, data-driven applications, downtime can cause significant financial and reputational losses. High availability ensures that the database remains available even in the event of hardware failures or network problems. Data integrity and security: A database failure can lead to data loss or data inconsistencies. High-availability solutions protect against such scenarios through continuous data replication and automatic failover. Scalability and load balancing: HA setups make it possible to distribute the load across multiple nodes, resulting in better performance and faster response times. This is particularly important in environments with high data traffic. Ease of maintenance: By setting up high availability, database maintenance can be performed without interrupting services. Nodes can be maintained incrementally while the database remains available. Patroni - the cluster manager In our PostgreSQL environment, we use Patroni in the PG containers by default. This has the advantage that even single-node instances basically function as Patroni clusters. This configuration offers several important advantages:\nEasy scalability: by using Patroni in all PG containers, scaling pods up and down is possible at any time. You can easily add additional pods as needed to improve performance or increase capacity, or remove pods to free up resources. This flexibility is particularly useful in dynamic environments where requirements can change quickly. Automated cluster management: Patroni automatically takes over the management of the cluster. When a new pod is added to an existing cluster, Patroni takes care of setting up the new node itself, including initialising and starting replication. This means you don\u0026rsquo;t have to perform any manual steps to configure or manage new nodes - Patroni does it all for you automatically. Seamless integration: As Patroni is active in every PG container by default, you don\u0026rsquo;t have to worry about compatibility or manual configuration. This makes deployment and maintenance much easier, as all the necessary components are already preconfigured. Optimisation of resources: Even with a minimal setup (single-node instance), you benefit from the advantages of a Patroni cluster, including the possibility of easy expansion and automatic failover in the event of a failure. This ensures optimal resource utilisation and minimises downtime. Upgrade the cluster to high availability The necessary changes to a high-availability cluster are very limited. Only the number of desired instances needs to be increased.\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1 spec: dockerImage: \u0026#34;docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1\u0026#34; numberOfInstances: 2 postgresql: version: \u0026#34;17\u0026#34; resources: limits: cpu: 500m memory: 500Mi requests: cpu: 500m memory: 500Mi volume: size: 5Gi You can either create a new cluster with the document or update an existing cluster with it. This makes it possible to scale the cluster up and down during operation.\nThe example above will create a HA-Cluster based on two Nodes.\nkubectl get pods ----------------------------------------------------------------------------- NAME | READY | STATUS | RESTARTS | AGE cluster-1-0 | 1/1 | Running | 0 | 3d cluster-1-1 | 1/1 | Running | 0 | 31s ","description":"High availability (HA) is a critical aspect of running database systems, especially in mission-critical applications where downtime is unacceptable. This section explains why high availability is important for PostgreSQL and how Patroni acts as a solution to ensure HA. Why High Availability (HA) for PostgreSQL?\nTo minimise downtime: In modern, data-driven applications, downtime can cause significant financial and reputational losses. High availability ensures that the database remains available even in the event of hardware failures or network problems. Data integrity and security: A database failure can lead to data loss or data inconsistencies. High-availability solutions protect against such scenarios through continuous data replication and automatic failover. Scalability and load balancing: HA setups make it possible to distribute the load across multiple nodes, resulting in better performance and faster response times. This is particularly important in environments with high data traffic. Ease of maintenance: By setting up high availability, database maintenance can be performed without interrupting services. Nodes can be maintained incrementally while the database remains available. Patroni - the cluster manager In our PostgreSQL environment, we use Patroni in the PG containers by default. This has the advantage that even single-node instances basically function as Patroni clusters. This configuration offers several important advantages:\n"},{"id":29,"href":"/CYBERTEC-pg-operator/config_cluster/","title":"PostgreSQL Configuration","parent":"CPO (CYBERTEC-PG-Operator)","content":"Users who are already used to working with PostgreSQL from Baremetal or VMs are already familiar with the need for various files to configure PostgreSQL. These include\npostgresql.conf pg_hba.conf \u0026hellip; Although these files are available in the container, direct modification is not planned. As part of the declarative mode of operation of the operator, these files are defined via the operator. The modifying intervention within the container also represents a contradiction to the immutability of the container.\nFor these reasons, the operator provides a way to make adjustments to the various files, from PostgreSQL to Patroni.\nWe differentiate between two main objects in the cluster manifest:\npostgresql with the child objects version and parameters patroni with objects for the pg_hab, slots and much more postgresql The postgresql object consists of the following elements:\nversion - allows you to select the major version of PostgreSQL used. parameters- enables the postgresql.conf to be changed spec: postgresql: parameters: shared_preload_libraries: \u0026#39;pg_stat_statements,pgnodemx, timescaledb\u0026#39; shared_buffers: \u0026#39;512MB\u0026#39; version: \u0026#39;16\u0026#39; Any known PostgreSQL parameter from postgresql.conf can be entered here and will be delivered by the operator to all nodes of the cluster accordingly.\nYou can find more information about the parameters in the PostgreSQL documentation\npatroni The patroni object contains numerous options for customising the patroni-setu, and the pg_hba.conf is also configured here. A complete list of all available elements can be found here.\nThe most important elements include\npg_hba - pg_hba.conf slots synchronous_mode - enables synchronous mode in the cluster. The default is set to false maximum_lag_on_failover - Specifies the maximum lag so that the pod is still considered healthy in the event of a failover. failsafe_mode Allows you to cancel the downgrading of the leader if all cluster members can be reached via the Patroni Rest Api. You can find more information on this in the Patroni documentation pg_hba The pg_hba.conf contains all defined authentication rules for PostgreSQL.\nWhen customising this configuration, it is important that the entire version of pg_hba is written to the manifest. The current configuration can be read out in the database using table pg_hba_file_rules ;.\nFurther information can be found in the PostgreSQL documentation\nslots When using user-defined slots, for example for the use of CDC using Debezium, there are problems when interacting with Patroni, as the slot and its current status are not automatically synchronised to the replicas.\nIn the event of a failover, the client cannot start replication as both the entire slot and the information about the data that has already been synchronised are missing.\nTo resolve this problem, slots must be defined in the cluster manifest rather than in PostgreSQL.\nspec: patroni: slots: cdc-example: database: app_db plugin: pgoutput type: logical This example creates a logical replication slot with the name cdc-example within the app_db database and uses the pgoutput plugin for the slot.\nSlots are only synchronised from the leader/standby leader to the replicas. This means that using the slots read-only on the replicas will cause a problem in the event of a failover. ","description":"Users who are already used to working with PostgreSQL from Baremetal or VMs are already familiar with the need for various files to configure PostgreSQL. These include\npostgresql.conf pg_hba.conf \u0026hellip; Although these files are available in the container, direct modification is not planned. As part of the declarative mode of operation of the operator, these files are defined via the operator. The modifying intervention within the container also represents a contradiction to the immutability of the container.\n"},{"id":30,"href":"/CYBERTEC-pg-operator/backup/","title":"Backup","parent":"CPO (CYBERTEC-PG-Operator)","content":"","description":""},{"id":31,"href":"/CYBERTEC-pg-operator/restore/","title":"Restore","parent":"CPO (CYBERTEC-PG-Operator)","content":"Restore or recovery is the process of starting a PostgreSQL instance or a cluster based on a defined and existing backup. This can be just a Backup or a combination of a Backup and additional WAL files. The difference is that a Backup represents a fixed point in time, whereas the combination with WAL enables a point-in-time recovery(PITR).\nYou can find more information about backups here\nRescue my cluster CPO enables the restore based on an existing backup using pgBackRest. To do this, it needs the relevant information about the point in time or snapBackupshot to which it should restore and where the data for this comes from. As we have already provided the operator with all the information relating to the storage of backups in the previous chapter, it only needs the following information:\nid: Control variable, must be increased for each restore process type: What type of restore is required repo: Which repo the data should come from set: Specific Backup to restore - Check backup to see how to get the identifier To ensure that the operator does not repeat an already done restore, the defined object id in the restore section is saved by the operator, so the value of this id must be changed for a new restore. Details for a Backup restore With this information, we define a fixed Backup from repo1 and that pgBackRest should stop at the end of the Backup\nrestore: id: \u0026#39;1\u0026#39; options: type: \u0026#39;immediate\u0026#39; set: \u0026#39;20240515-164100F\u0026#39; repo: \u0026#39;repo1\u0026#39; Without the specification --type=immediate, pgBackRest would then consume the entire WAL that is available and thus restore the last available consistent data point. Details for a point-in-time recoery (PITR) We use this information to define a point-in-time recovery (PITR) and define the end point using a timestamp and the start point using a Backup specification. The latter is optional. Without this information, pgBackRest would automatically start at the last previous full Backup.\nrestore: id: \u0026#39;1\u0026#39; options: type: \u0026#39;time\u0026#39; set: \u0026#39;20240515-164100F\u0026#39; target: \u0026#39;2024-05-16 07:46:05.506817+00\u0026#39; repo: \u0026#39;1\u0026#39; --type=time indicates that it is a point-in-time recovery (PITR). Example in a cluster manifest apiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-5 namespace: cpo spec: backup: pgbackrest: configuration: secret: cluster-1-pvc-credentials global: repo1-retention-full: \u0026#39;7\u0026#39; repo1-retention-full-type: count image: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:pgbackrest-16.4-1\u0026#39; repos: - name: repo1 schedule: full: 30 2 * * * storage: pvc volume: size: 1Gi restore: id: \u0026#39;1\u0026#39; options: type: \u0026#39;time\u0026#39; set: \u0026#39;20240515-164100F\u0026#39; target: \u0026#39;2024-05-16 07:46:05.506817+00\u0026#39; An example of this can also be found in our tutorials. For a point-in-time recovery (PITR) you can find it here.\nIncorrect information for the Backup or the timestamp can result in pgBackRest not being able to complete the restore successfully. In the event of an error, the information must be corrected and another restore must be started. ","description":"Restore or recovery is the process of starting a PostgreSQL instance or a cluster based on a defined and existing backup. This can be just a Backup or a combination of a Backup and additional WAL files. The difference is that a Backup represents a fixed point in time, whereas the combination with WAL enables a point-in-time recovery(PITR).\nYou can find more information about backups here\nRescue my cluster CPO enables the restore based on an existing backup using pgBackRest. To do this, it needs the relevant information about the point in time or snapBackupshot to which it should restore and where the data for this comes from. As we have already provided the operator with all the information relating to the storage of backups in the previous chapter, it only needs the following information:\n"},{"id":32,"href":"/CYBERTEC-pg-operator/tls/","title":"TLS/SSL connections","parent":"CPO (CYBERTEC-PG-Operator)","content":"Each cluster created is automatically equipped with a self-generated TLS certificate and is preconfigured for the use of TLS/SSL. However, this certificate is not based on a Certificate Authority (CA) that is known to the clients. This means that although communication between the client and server is encrypted, the certificate cannot be verified by the client.\nThe following chapter deals with the creation of custom certificates and the steps required to integrate these certificates into the PostgreSQL cluster. In the example, a custom CA is created, on the basis of which the certificates are then generated and signed by this CA. This step can be skipped if certificates have already been obtained from another trusted organisation.\nCreate a custom CA and Certificates Precondition: This chapter requires openssl Create the CA The first step is to create a custom CA. An organisation name is required for this. You can also add further details about the country, district and location. The CA serves as the central authority that signs the certificates and thus guarantees the correctness of the certificate. In order to successfully complete the verification of a certificate, the CA\u0026rsquo;s certificate must be stored on the client system.\nORGANIZATION=MyCustomOrganization CA=$ORGANIZATION-RootCA mkdir $CA cd $CA # Creating the CA-Key openssl genpkey -algorithm EC -out $CA.key -pkeyopt ec_paramgen_curve:secp384r1 -pkeyopt ec_param_enc:named_curve -aes256 # Creating the CA-Certificate openssl req -x509 -new -nodes -key $CA.key -sha512 -days 1826 -out $CA.crt -subj \u0026#34;/CN=${ORGANIZATION} Root-CA/C=AT/ST=Lower Austria/L=Woellersdorf/O=${ORGANIZATION}\u0026#34; Create a custom Certificate The server needs a certificate signed by a CA and a private key so that it can claim to be trustworthy.\nIt is important that the CA certificate is stored as trustworthy with the client. Otherwise, no certificate check is possible. CN=cluster-1 DNS2=\u0026#34;${CN}-repl\u0026#34; DNS3=\u0026#34;${CN}-pooler\u0026#34; DNS4=\u0026#34;${CN}-pooler-repl\u0026#34; # Creating the private Key openssl genpkey -algorithm EC -out $CN.key -pkeyopt ec_paramgen_curve:secp384r1 -pkeyopt ec_param_enc:named_curve # Creating Certificate Signing Request (CSR)) openssl req -new -key $CN.key -out $CN.csr \\ -subj \u0026#34;/C=AT/ST=Lower Austria/L=Woellersdorf/O=${ORGANIZATION}/OU=OrgUnit/CN=${CN}\u0026#34; \\ -addext \u0026#34;subjectAltName=DNS:${CN},DNS:${DNS2},DNS:${DNS3},DNS:${DNS4}\u0026#34; # Sign CSR with the CA openssl x509 -req -in $CN.csr -CA $CA.crt -CAkey $CA.key -CAcreateserial -out $CN.crt -days 365 \\ -extfile \u0026lt;(echo -e \u0026#34;[ v3_req ]\\nsubjectAltName=DNS:${CN},DNS:${DNS2},DNS:${DNS3},DNS:${DNS4}\u0026#34;) -extensions v3_req Add Certicate to the Cluster For adding the Certificate to your cluster a secret on kubernetes is needed. There are two different options here. For the first option, a secret is created that contains all the necessary information. I.e.\nServer certificate Private server key CA certificate In the second variant, the CA certificate is separated and written in a separate secret. The advantage of this is that the CA only needs to be saved once and changed in the event of an update. First Option: Using one secret for all three objects kubectl create secret generic cluster-1-tls \\ --from-file=tls.crt=$CN.crt \\ --from-file=tls.key=$CN.key \\ --from-file=ca.crt=$CA.crt Finally, the definition is made in the cluster manifest so that the operator adapts the cluster.\napiVersion: \u0026#34;cpo.opensource.cybertec.at/v1\u0026#34; kind: postgresql ... metadata: name: cluster-1 spec: tls: secretName: \u0026#34;cluster-1-tls\u0026#34; caFile: \u0026#34;ca.crt\u0026#34; Second Option: Using a separat Secret for the CA kubectl create secret generic cpo-root-ca --from-file=ca.crt=ca.crt kubectl create secret generic cluster-1-tls \\ --from-file=tls.crt=$CN.crt \\ --from-file=tls.key=$CN.key \\ Finally, the definition is made in the cluster manifest so that the operator adapts the cluster.\napiVersion: \u0026#34;cpo.opensource.cybertec.at/v1\u0026#34; kind: postgresql metadata: name: cluster-1 spec: tls: secretName: \u0026#34;cluster-1-tls\u0026#34; caSecretName: \u0026#34;cpo-root-ca\u0026#34; caFile: \u0026#34;ca.crt\u0026#34; A regular check of the mounted certificates takes place automatically within the container. This check takes place every 5 minutes. If the certificates have been updated, the certificates are loaded automatically.\nIn addition to generating the certificates independently, cert-manager can also be used for this purpose. ","description":"Each cluster created is automatically equipped with a self-generated TLS certificate and is preconfigured for the use of TLS/SSL. However, this certificate is not based on a Certificate Authority (CA) that is known to the clients. This means that although communication between the client and server is encrypted, the certificate cannot be verified by the client.\nThe following chapter deals with the creation of custom certificates and the steps required to integrate these certificates into the PostgreSQL cluster. In the example, a custom CA is created, on the basis of which the certificates are then generated and signed by this CA. This step can be skipped if certificates have already been obtained from another trusted organisation.\n"},{"id":33,"href":"/CYBERTEC-pg-operator/connection_pooler/","title":"connection pooler","parent":"CPO (CYBERTEC-PG-Operator)","content":"A connection pooler is a tool that acts as a proxy between the application and the database and enables the performance of the application to be improved and the load on the database to be reduced. The reason for this lies in the connection handling of PostgreSQL.\nHow PostgreSQL handles connection PostgreSQL use a new Process for every database-connection created by the postmaster. This process is handling the connection. On the positive side, this enables a stable connection and isolation, but it is not particularly efficient for short-lived connections due to the effort required to create them.\nHow Connection Pooling solves this problem With connection pooling, the application connects to the pooler, which in turn maintains a number of connections to the PostgreSQL database. This makes it possible to use the connections from the pooler to the database for a long time instead of short-lived connections and to recycle them accordingly.\nIn addition to utilising long-term connections, a ConnectionPooler also makes it possible to reduce the number of connections required to the database. For example, if you have 3 application nodes, each of which maintains 100 connections to the database at the same time, that would be 300 connections in total. The application usually does not even begin to utilise this number of connections. With the pgBouncer, this can be optimised so that the applications open the 300 connections to the pgBouncer, but the pgBouncer only generates 100 connections to PostgreSQL, for example, thus reducing the load by 2/3.\nIt is important to correctly configure the bouncer and thus the connections to be created between pgBouncer and PostgreSQL so that enough connections are available for the workload. How does this work with CPO CPO relies on pgBouncer, a popular and above all lightweight open source tool. pgBouncer manages individual user-database connections for each user used, which can be used immediately for incoming client connections.\nHow do I create a pooler for a cluster? connection_pooler.number_of_instances - How many instances of connection pooler to create. Default is 2 which is also the required minimum.\nconnection_pooler.schema - Database schema to create for credentials lookup function to be used by the connection pooler. Is is created in every database of the Postgres cluster. You can also choose an existing schema. Default schema is pooler.\nconnection_pooler.user - User to create for connection pooler to be able to connect to a database. You can also choose an existing role, but make sure it has the LOGIN privilege. Default role is pooler.\nconnection_pooler.image - Docker image to use for connection pooler deployment. Default: “registry.opensource.zalan.do/acid/pgbouncer”\nconnection_poole.max_db_connections - How many connections the pooler can max hold. This value is divided among the pooler pods. Default is 60 which will make up 30 connections per pod for the default setup with two instances.\nconnection_pooler.mode - Defines pooler mode. Available Value: session, transaction or statement. Default is transaction.\nconnection_pooler.resources - Hardware definition for the pooler pods\nenableConnectionPooler - Defines whether poolers for read/write access should be created based on the spec.connectionPooler definition.\nenableReplicaConnectionPooler- Defines whether poolers for read-only access should be created based on the spec.connectionPooler definition.\nspec: connectionPooler: mode: transaction numberOfInstances: 2 resources: limits: cpu: \u0026#39;1\u0026#39; memory: 100Mi requests: cpu: 500m memory: 100Mi schema: pooler user: pooler enableConnectionPooler: true enableReplicaConnectionPooler: true ","description":"A connection pooler is a tool that acts as a proxy between the application and the database and enables the performance of the application to be improved and the load on the database to be reduced. The reason for this lies in the connection handling of PostgreSQL.\nHow PostgreSQL handles connection PostgreSQL use a new Process for every database-connection created by the postmaster. This process is handling the connection. On the positive side, this enables a stable connection and isolation, but it is not particularly efficient for short-lived connections due to the effort required to create them.\n"},{"id":34,"href":"/CYBERTEC-pg-operator/extensions/pg13/","title":"PostgreSQL 13","parent":"Extensions","content":" The extensions listed are included in the standard images. This list refers to PostgreSQL 13. Name Default Version Comment adminpack 2.1 Administrative functions for PostgreSQL amcheck 1.2 Functions for verifying relation integrity autoinc 1.0 Functions for autoincrementing fields bloom 1.0 Bloom access method - signature file based index btree_gin 1.3 Support for indexing common datatypes in GIN btree_gist 1.5 Support for indexing common datatypes in GiST citext 1.6 Data type for case-insensitive character strings credcheck 3.0.0 credcheck - PostgreSQL plain text credential checker cube 1.4 Data type for multidimensional cubes dblink 1.2 Connect to other PostgreSQL databases from within a database dict_int 1.0 Text search dictionary template for integers dict_xsyn 1.0 Text search dictionary template for extended synonym processing earthdistance 1.1 Calculate great-circle distances on the surface of the Earth file_fdw 1.0 Foreign-data wrapper for flat file access fuzzystrmatch 1.1 Determine similarities and distance between strings hstore 1.7 Data type for storing sets of (key, value) pairs hstore_plperl 1.0 Transform between hstore and plperl hstore_plperlu 1.0 Transform between hstore and plperlu hstore_plpython3u 1.0 Transform between hstore and plpython3u insert_username 1.0 Functions for tracking who changed a table intagg 1.1 Integer aggregator and enumerator (obsolete) intarray 1.3 Functions, operators, and index support for 1-D arrays of integers isn 1.2 Data types for international product numbering standards jsonb_plperl 1.0 Transform between jsonb and plperl jsonb_plperlu 1.0 Transform between jsonb and plperlu jsonb_plpython3u 1.0 Transform between jsonb and plpython3u lo 1.1 Large Object maintenance ltree 1.2 Data type for hierarchical tree-like structures ltree_plpython3u 1.0 Transform between ltree and plpython3u moddatetime 1.0 Functions for tracking last modification time pageinspect 1.8 Inspect the contents of database pages at a low level pg_buffercache 1.3 Examine the shared buffer cache pg_cron 1.6 Job scheduler for PostgreSQL pg_freespacemap 1.2 Examine the free space map (FSM) pg_permissions 1.3 View object permissions and compare them with the desired state pg_prewarm 1.2 Prewarm relation data pg_proctab Placeholder - see pg_proctab\u0026ndash;0.0.10-compat.control pg_stat_statements 1.8 Track planning and execution statistics of all SQL statements executed pg_trgm 1.5 Text similarity measurement and index searching based on trigrams pg_visibility 1.2 Examine the visibility map (VM) and page-level visibility info pgaudit 1.5.3 Provides auditing functionality pgauditlogtofile 1.6 pgAudit addon to redirect audit entries to an independent file pgcrypto 1.3 Cryptographic functions pgnodemx 1.7 SQL functions that allow capture of node OS metrics from PostgreSQL pgrowlocks 1.2 Show row-level locking information pgstattuple 1.5 Show tuple-level statistics plpgsql 1.0 PL/pgSQL procedural language plpython3u 1.0 PL/Python3U untrusted procedural language pltcl 1.0 PL/Tcl procedural language pltclu 1.0 PL/TclU untrusted procedural language postgres_fdw 1.0 Foreign-data wrapper for remote PostgreSQL servers refint 1.0 Functions for implementing referential integrity (obsolete) seg 1.3 Data type for representing line segments or floating-point intervals set_user 4.1.0 Similar to SET ROLE but with added logging sslinfo 1.2 Information about SSL certificates tablefunc 1.0 Functions that manipulate whole tables, including crosstab tcn 1.0 Triggered change notifications timescaledb 2.15.3 Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) tsm_system_rows 1.0 TABLESAMPLE method which accepts number of rows as a limit tsm_system_time 1.0 TABLESAMPLE method which accepts time in milliseconds as a limit unaccent 1.1 Text search dictionary that removes accents uuid-ossp 1.1 Generate universally unique identifiers (UUIDs) xml2 1.1 XPath querying and XSLT The following extensions are additionally included in the Postgis images. Name Default Version Comment address_standardizer 3.4.4 Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. address_standardizer_data_us 3.4.4 Address Standardizer US dataset example postgis 3.4.4 PostGIS geometry and geography spatial types and functions postgis_raster 3.4.4 PostGIS raster types and functions postgis_sfcgal 3.4.4 PostGIS SFCGAL functions postgis_tiger_geocoder 3.4.4 PostGIS tiger geocoder and reverse geocoder postgis_topology 3.4.4 PostGIS topology spatial types and functions ","description":" The extensions listed are included in the standard images. This list refers to PostgreSQL 13. Name Default Version Comment adminpack 2.1 Administrative functions for PostgreSQL amcheck 1.2 Functions for verifying relation integrity autoinc 1.0 Functions for autoincrementing fields bloom 1.0 Bloom access method - signature file based index btree_gin 1.3 Support for indexing common datatypes in GIN btree_gist 1.5 Support for indexing common datatypes in GiST citext 1.6 Data type for case-insensitive character strings credcheck 3.0.0 credcheck - PostgreSQL plain text credential checker cube 1.4 Data type for multidimensional cubes dblink 1.2 Connect to other PostgreSQL databases from within a database dict_int 1.0 Text search dictionary template for integers dict_xsyn 1.0 Text search dictionary template for extended synonym processing earthdistance 1.1 Calculate great-circle distances on the surface of the Earth file_fdw 1.0 Foreign-data wrapper for flat file access fuzzystrmatch 1.1 Determine similarities and distance between strings hstore 1.7 Data type for storing sets of (key, value) pairs hstore_plperl 1.0 Transform between hstore and plperl hstore_plperlu 1.0 Transform between hstore and plperlu hstore_plpython3u 1.0 Transform between hstore and plpython3u insert_username 1.0 Functions for tracking who changed a table intagg 1.1 Integer aggregator and enumerator (obsolete) intarray 1.3 Functions, operators, and index support for 1-D arrays of integers isn 1.2 Data types for international product numbering standards jsonb_plperl 1.0 Transform between jsonb and plperl jsonb_plperlu 1.0 Transform between jsonb and plperlu jsonb_plpython3u 1.0 Transform between jsonb and plpython3u lo 1.1 Large Object maintenance ltree 1.2 Data type for hierarchical tree-like structures ltree_plpython3u 1.0 Transform between ltree and plpython3u moddatetime 1.0 Functions for tracking last modification time pageinspect 1.8 Inspect the contents of database pages at a low level pg_buffercache 1.3 Examine the shared buffer cache pg_cron 1.6 Job scheduler for PostgreSQL pg_freespacemap 1.2 Examine the free space map (FSM) pg_permissions 1.3 View object permissions and compare them with the desired state pg_prewarm 1.2 Prewarm relation data pg_proctab Placeholder - see pg_proctab\u0026ndash;0.0.10-compat.control pg_stat_statements 1.8 Track planning and execution statistics of all SQL statements executed pg_trgm 1.5 Text similarity measurement and index searching based on trigrams pg_visibility 1.2 Examine the visibility map (VM) and page-level visibility info pgaudit 1.5.3 Provides auditing functionality pgauditlogtofile 1.6 pgAudit addon to redirect audit entries to an independent file pgcrypto 1.3 Cryptographic functions pgnodemx 1.7 SQL functions that allow capture of node OS metrics from PostgreSQL pgrowlocks 1.2 Show row-level locking information pgstattuple 1.5 Show tuple-level statistics plpgsql 1.0 PL/pgSQL procedural language plpython3u 1.0 PL/Python3U untrusted procedural language pltcl 1.0 PL/Tcl procedural language pltclu 1.0 PL/TclU untrusted procedural language postgres_fdw 1.0 Foreign-data wrapper for remote PostgreSQL servers refint 1.0 Functions for implementing referential integrity (obsolete) seg 1.3 Data type for representing line segments or floating-point intervals set_user 4.1.0 Similar to SET ROLE but with added logging sslinfo 1.2 Information about SSL certificates tablefunc 1.0 Functions that manipulate whole tables, including crosstab tcn 1.0 Triggered change notifications timescaledb 2.15.3 Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) tsm_system_rows 1.0 TABLESAMPLE method which accepts number of rows as a limit tsm_system_time 1.0 TABLESAMPLE method which accepts time in milliseconds as a limit unaccent 1.1 Text search dictionary that removes accents uuid-ossp 1.1 Generate universally unique identifiers (UUIDs) xml2 1.1 XPath querying and XSLT The following extensions are additionally included in the Postgis images. Name Default Version Comment address_standardizer 3.4.4 Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. address_standardizer_data_us 3.4.4 Address Standardizer US dataset example postgis 3.4.4 PostGIS geometry and geography spatial types and functions postgis_raster 3.4.4 PostGIS raster types and functions postgis_sfcgal 3.4.4 PostGIS SFCGAL functions postgis_tiger_geocoder 3.4.4 PostGIS tiger geocoder and reverse geocoder postgis_topology 3.4.4 PostGIS topology spatial types and functions "},{"id":35,"href":"/CYBERTEC-pg-operator/extensions/pg14/","title":"PostgreSQL 14","parent":"Extensions","content":" The extensions listed are included in the standard images. This list refers to PostgreSQL 14. Name Default Version Comment adminpack 2.1 Administrative functions for PostgreSQL amcheck 1.3 Functions for verifying relation integrity autoinc 1.0 Functions for autoincrementing fields bloom 1.0 Bloom access method - signature file based index btree_gin 1.3 Support for indexing common datatypes in GIN btree_gist 1.6 Support for indexing common datatypes in GiST citext 1.6 Data type for case-insensitive character strings credcheck 3.0.0 credcheck - PostgreSQL plain text credential checker cube 1.5 Data type for multidimensional cubes dblink 1.2 Connect to other PostgreSQL databases from within a database dict_int 1.0 Text search dictionary template for integers dict_xsyn 1.0 Text search dictionary template for extended synonym processing earthdistance 1.1 Calculate great-circle distances on the surface of the Earth file_fdw 1.0 Foreign-data wrapper for flat file access fuzzystrmatch 1.1 Determine similarities and distance between strings hstore 1.8 Data type for storing sets of (key, value) pairs hstore_plperl 1.0 Transform between hstore and plperl hstore_plperlu 1.0 Transform between hstore and plperlu hstore_plpython3u 1.0 Transform between hstore and plpython3u insert_username 1.0 Functions for tracking who changed a table intagg 1.1 Integer aggregator and enumerator (obsolete) intarray 1.5 Functions, operators, and index support for 1-D arrays of integers isn 1.2 Data types for international product numbering standards jsonb_plperl 1.0 Transform between jsonb and plperl jsonb_plperlu 1.0 Transform between jsonb and plperlu jsonb_plpython3u 1.0 Transform between jsonb and plpython3u lo 1.1 Large Object maintenance ltree 1.2 Data type for hierarchical tree-like structures ltree_plpython3u 1.0 Transform between ltree and plpython3u moddatetime 1.0 Functions for tracking last modification time old_snapshot 1.0 Utilities in support of old_snapshot_threshold pageinspect 1.9 Inspect the contents of database pages at a low level pg_buffercache 1.3 Examine the shared buffer cache pg_cron 1.6 Job scheduler for PostgreSQL pg_freespacemap 1.2 Examine the free space map (FSM) pg_permissions 1.3 View object permissions and compare them with the desired state pg_prewarm 1.2 Prewarm relation data pg_proctab Placeholder - see pg_proctab\u0026ndash;0.0.10-compat.control pg_stat_statements 1.9 Track planning and execution statistics of all SQL statements executed pg_surgery 1.0 Extension to perform surgery on a damaged relation pg_trgm 1.6 Text similarity measurement and index searching based on trigrams pg_visibility 1.2 Examine the visibility map (VM) and page-level visibility info pgaudit 1.6.3 Provides auditing functionality pgauditlogtofile 1.6 pgAudit addon to redirect audit entries to an independent file pgcrypto 1.3 Cryptographic functions pgnodemx 1.7 SQL functions that allow capture of node OS metrics from PostgreSQL pgrowlocks 1.2 Show row-level locking information pgstattuple 1.5 Show tuple-level statistics plpgsql 1.0 PL/pgSQL procedural language plpython3u 1.0 PL/Python3U untrusted procedural language pltcl 1.0 PL/Tcl procedural language pltclu 1.0 PL/TclU untrusted procedural language postgres_fdw 1.1 Foreign-data wrapper for remote PostgreSQL servers refint 1.0 Functions for implementing referential integrity (obsolete) seg 1.4 Data type for representing line segments or floating-point intervals set_user 4.1.0 Similar to SET ROLE but with added logging sslinfo 1.2 Information about SSL certificates tablefunc 1.0 Functions that manipulate whole tables, including crosstab tcn 1.0 Triggered change notifications timescaledb 2.18.2 Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) tsm_system_rows 1.0 TABLESAMPLE method which accepts number of rows as a limit tsm_system_time 1.0 TABLESAMPLE method which accepts time in milliseconds as a limit unaccent 1.1 Text search dictionary that removes accents uuid-ossp 1.1 Generate universally unique identifiers (UUIDs) xml2 1.1 XPath querying and XSLT The following extensions are additionally included in the Postgis images. Name Default Version Comment address_standardizer 3.4.4 Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. address_standardizer_data_us 3.4.4 Address Standardizer US dataset example postgis 3.4.4 PostGIS geometry and geography spatial types and functions postgis_raster 3.4.4 PostGIS raster types and functions postgis_sfcgal 3.4.4 PostGIS SFCGAL functions postgis_tiger_geocoder 3.4.4 PostGIS tiger geocoder and reverse geocoder postgis_topology 3.4.4 PostGIS topology spatial types and functions ","description":" The extensions listed are included in the standard images. This list refers to PostgreSQL 14. Name Default Version Comment adminpack 2.1 Administrative functions for PostgreSQL amcheck 1.3 Functions for verifying relation integrity autoinc 1.0 Functions for autoincrementing fields bloom 1.0 Bloom access method - signature file based index btree_gin 1.3 Support for indexing common datatypes in GIN btree_gist 1.6 Support for indexing common datatypes in GiST citext 1.6 Data type for case-insensitive character strings credcheck 3.0.0 credcheck - PostgreSQL plain text credential checker cube 1.5 Data type for multidimensional cubes dblink 1.2 Connect to other PostgreSQL databases from within a database dict_int 1.0 Text search dictionary template for integers dict_xsyn 1.0 Text search dictionary template for extended synonym processing earthdistance 1.1 Calculate great-circle distances on the surface of the Earth file_fdw 1.0 Foreign-data wrapper for flat file access fuzzystrmatch 1.1 Determine similarities and distance between strings hstore 1.8 Data type for storing sets of (key, value) pairs hstore_plperl 1.0 Transform between hstore and plperl hstore_plperlu 1.0 Transform between hstore and plperlu hstore_plpython3u 1.0 Transform between hstore and plpython3u insert_username 1.0 Functions for tracking who changed a table intagg 1.1 Integer aggregator and enumerator (obsolete) intarray 1.5 Functions, operators, and index support for 1-D arrays of integers isn 1.2 Data types for international product numbering standards jsonb_plperl 1.0 Transform between jsonb and plperl jsonb_plperlu 1.0 Transform between jsonb and plperlu jsonb_plpython3u 1.0 Transform between jsonb and plpython3u lo 1.1 Large Object maintenance ltree 1.2 Data type for hierarchical tree-like structures ltree_plpython3u 1.0 Transform between ltree and plpython3u moddatetime 1.0 Functions for tracking last modification time old_snapshot 1.0 Utilities in support of old_snapshot_threshold pageinspect 1.9 Inspect the contents of database pages at a low level pg_buffercache 1.3 Examine the shared buffer cache pg_cron 1.6 Job scheduler for PostgreSQL pg_freespacemap 1.2 Examine the free space map (FSM) pg_permissions 1.3 View object permissions and compare them with the desired state pg_prewarm 1.2 Prewarm relation data pg_proctab Placeholder - see pg_proctab\u0026ndash;0.0.10-compat.control pg_stat_statements 1.9 Track planning and execution statistics of all SQL statements executed pg_surgery 1.0 Extension to perform surgery on a damaged relation pg_trgm 1.6 Text similarity measurement and index searching based on trigrams pg_visibility 1.2 Examine the visibility map (VM) and page-level visibility info pgaudit 1.6.3 Provides auditing functionality pgauditlogtofile 1.6 pgAudit addon to redirect audit entries to an independent file pgcrypto 1.3 Cryptographic functions pgnodemx 1.7 SQL functions that allow capture of node OS metrics from PostgreSQL pgrowlocks 1.2 Show row-level locking information pgstattuple 1.5 Show tuple-level statistics plpgsql 1.0 PL/pgSQL procedural language plpython3u 1.0 PL/Python3U untrusted procedural language pltcl 1.0 PL/Tcl procedural language pltclu 1.0 PL/TclU untrusted procedural language postgres_fdw 1.1 Foreign-data wrapper for remote PostgreSQL servers refint 1.0 Functions for implementing referential integrity (obsolete) seg 1.4 Data type for representing line segments or floating-point intervals set_user 4.1.0 Similar to SET ROLE but with added logging sslinfo 1.2 Information about SSL certificates tablefunc 1.0 Functions that manipulate whole tables, including crosstab tcn 1.0 Triggered change notifications timescaledb 2.18.2 Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) tsm_system_rows 1.0 TABLESAMPLE method which accepts number of rows as a limit tsm_system_time 1.0 TABLESAMPLE method which accepts time in milliseconds as a limit unaccent 1.1 Text search dictionary that removes accents uuid-ossp 1.1 Generate universally unique identifiers (UUIDs) xml2 1.1 XPath querying and XSLT The following extensions are additionally included in the Postgis images. Name Default Version Comment address_standardizer 3.4.4 Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. address_standardizer_data_us 3.4.4 Address Standardizer US dataset example postgis 3.4.4 PostGIS geometry and geography spatial types and functions postgis_raster 3.4.4 PostGIS raster types and functions postgis_sfcgal 3.4.4 PostGIS SFCGAL functions postgis_tiger_geocoder 3.4.4 PostGIS tiger geocoder and reverse geocoder postgis_topology 3.4.4 PostGIS topology spatial types and functions "},{"id":36,"href":"/CYBERTEC-pg-operator/extensions/pg15/","title":"PostgreSQL 15","parent":"Extensions","content":" The extensions listed are included in the standard images. This list refers to PostgreSQL 15. Name Default Version Comment adminpack 2.1 Administrative functions for PostgreSQL amcheck 1.3 Functions for verifying relation integrity autoinc 1.0 Functions for autoincrementing fields bloom 1.0 Bloom access method - signature file based index btree_gin 1.3 Support for indexing common datatypes in GIN btree_gist 1.7 Support for indexing common datatypes in GiST citext 1.6 Data type for case-insensitive character strings credcheck 3.0.0 credcheck - PostgreSQL plain text credential checker cube 1.5 Data type for multidimensional cubes dblink 1.2 Connect to other PostgreSQL databases from within a database dict_int 1.0 Text search dictionary template for integers dict_xsyn 1.0 Text search dictionary template for extended synonym processing earthdistance 1.1 Calculate great-circle distances on the surface of the Earth file_fdw 1.0 Foreign-data wrapper for flat file access fuzzystrmatch 1.1 Determine similarities and distance between strings hstore 1.8 Data type for storing sets of (key, value) pairs hstore_plperl 1.0 Transform between hstore and plperl hstore_plperlu 1.0 Transform between hstore and plperlu hstore_plpython3u 1.0 Transform between hstore and plpython3u insert_username 1.0 Functions for tracking who changed a table intagg 1.1 Integer aggregator and enumerator (obsolete) intarray 1.5 Functions, operators, and index support for 1-D arrays of integers isn 1.2 Data types for international product numbering standards jsonb_plperl 1.0 Transform between jsonb and plperl jsonb_plperlu 1.0 Transform between jsonb and plperlu jsonb_plpython3u 1.0 Transform between jsonb and plpython3u lo 1.1 Large Object maintenance ltree 1.2 Data type for hierarchical tree-like structures ltree_plpython3u 1.0 Transform between ltree and plpython3u moddatetime 1.0 Functions for tracking last modification time old_snapshot 1.0 Utilities in support of old_snapshot_threshold pageinspect 1.11 Inspect the contents of database pages at a low level pg_buffercache 1.3 Examine the shared buffer cache pg_cron 1.6 Job scheduler for PostgreSQL pg_freespacemap 1.2 Examine the free space map (FSM) pg_permissions 1.3 View object permissions and compare them with the desired state pg_prewarm 1.2 Prewarm relation data pg_proctab Placeholder - see pg_proctab\u0026ndash;0.0.10-compat.control pg_stat_statements 1.10 Track planning and execution statistics of all SQL statements executed pg_surgery 1.0 Extension to perform surgery on a damaged relation pg_trgm 1.6 Text similarity measurement and index searching based on trigrams pg_visibility 1.2 Examine the visibility map (VM) and page-level visibility info pg_walinspect 1.0 Functions to inspect contents of PostgreSQL Write-Ahead Log pgaudit 1.7 Provides auditing functionality pgauditlogtofile 1.6 pgAudit addon to redirect audit entries to an independent file pgcrypto 1.3 Cryptographic functions pgnodemx 1.7 SQL functions that allow capture of node OS metrics from PostgreSQL pgrowlocks 1.2 Show row-level locking information pgstattuple 1.5 Show tuple-level statistics plpgsql 1.0 PL/pgSQL procedural language plpython3u 1.0 PL/Python3U untrusted procedural language pltcl 1.0 PL/Tcl procedural language pltclu 1.0 PL/TclU untrusted procedural language postgres_fdw 1.1 Foreign-data wrapper for remote PostgreSQL servers refint 1.0 Functions for implementing referential integrity (obsolete) seg 1.4 Data type for representing line segments or floating-point intervals set_user 4.1.0 Similar to SET ROLE but with added logging sslinfo 1.2 Information about SSL certificates tablefunc 1.0 Functions that manipulate whole tables, including crosstab tcn 1.0 Triggered change notifications timescaledb 2.18.2 Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) tsm_system_rows 1.0 TABLESAMPLE method which accepts number of rows as a limit tsm_system_time 1.0 TABLESAMPLE method which accepts time in milliseconds as a limit unaccent 1.1 Text search dictionary that removes accents uuid-ossp 1.1 Generate universally unique identifiers (UUIDs) xml2 1.1 XPath querying and XSLT The following extensions are additionally included in the Postgis images. Name Default Version Comment address_standardizer 3.4.4 Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. address_standardizer_data_us 3.4.4 Address Standardizer US dataset example postgis 3.4.4 PostGIS geometry and geography spatial types and functions postgis_raster 3.4.4 PostGIS raster types and functions postgis_sfcgal 3.4.4 PostGIS SFCGAL functions postgis_tiger_geocoder 3.4.4 PostGIS tiger geocoder and reverse geocoder postgis_topology 3.4.4 PostGIS topology spatial types and functions ","description":" The extensions listed are included in the standard images. This list refers to PostgreSQL 15. Name Default Version Comment adminpack 2.1 Administrative functions for PostgreSQL amcheck 1.3 Functions for verifying relation integrity autoinc 1.0 Functions for autoincrementing fields bloom 1.0 Bloom access method - signature file based index btree_gin 1.3 Support for indexing common datatypes in GIN btree_gist 1.7 Support for indexing common datatypes in GiST citext 1.6 Data type for case-insensitive character strings credcheck 3.0.0 credcheck - PostgreSQL plain text credential checker cube 1.5 Data type for multidimensional cubes dblink 1.2 Connect to other PostgreSQL databases from within a database dict_int 1.0 Text search dictionary template for integers dict_xsyn 1.0 Text search dictionary template for extended synonym processing earthdistance 1.1 Calculate great-circle distances on the surface of the Earth file_fdw 1.0 Foreign-data wrapper for flat file access fuzzystrmatch 1.1 Determine similarities and distance between strings hstore 1.8 Data type for storing sets of (key, value) pairs hstore_plperl 1.0 Transform between hstore and plperl hstore_plperlu 1.0 Transform between hstore and plperlu hstore_plpython3u 1.0 Transform between hstore and plpython3u insert_username 1.0 Functions for tracking who changed a table intagg 1.1 Integer aggregator and enumerator (obsolete) intarray 1.5 Functions, operators, and index support for 1-D arrays of integers isn 1.2 Data types for international product numbering standards jsonb_plperl 1.0 Transform between jsonb and plperl jsonb_plperlu 1.0 Transform between jsonb and plperlu jsonb_plpython3u 1.0 Transform between jsonb and plpython3u lo 1.1 Large Object maintenance ltree 1.2 Data type for hierarchical tree-like structures ltree_plpython3u 1.0 Transform between ltree and plpython3u moddatetime 1.0 Functions for tracking last modification time old_snapshot 1.0 Utilities in support of old_snapshot_threshold pageinspect 1.11 Inspect the contents of database pages at a low level pg_buffercache 1.3 Examine the shared buffer cache pg_cron 1.6 Job scheduler for PostgreSQL pg_freespacemap 1.2 Examine the free space map (FSM) pg_permissions 1.3 View object permissions and compare them with the desired state pg_prewarm 1.2 Prewarm relation data pg_proctab Placeholder - see pg_proctab\u0026ndash;0.0.10-compat.control pg_stat_statements 1.10 Track planning and execution statistics of all SQL statements executed pg_surgery 1.0 Extension to perform surgery on a damaged relation pg_trgm 1.6 Text similarity measurement and index searching based on trigrams pg_visibility 1.2 Examine the visibility map (VM) and page-level visibility info pg_walinspect 1.0 Functions to inspect contents of PostgreSQL Write-Ahead Log pgaudit 1.7 Provides auditing functionality pgauditlogtofile 1.6 pgAudit addon to redirect audit entries to an independent file pgcrypto 1.3 Cryptographic functions pgnodemx 1.7 SQL functions that allow capture of node OS metrics from PostgreSQL pgrowlocks 1.2 Show row-level locking information pgstattuple 1.5 Show tuple-level statistics plpgsql 1.0 PL/pgSQL procedural language plpython3u 1.0 PL/Python3U untrusted procedural language pltcl 1.0 PL/Tcl procedural language pltclu 1.0 PL/TclU untrusted procedural language postgres_fdw 1.1 Foreign-data wrapper for remote PostgreSQL servers refint 1.0 Functions for implementing referential integrity (obsolete) seg 1.4 Data type for representing line segments or floating-point intervals set_user 4.1.0 Similar to SET ROLE but with added logging sslinfo 1.2 Information about SSL certificates tablefunc 1.0 Functions that manipulate whole tables, including crosstab tcn 1.0 Triggered change notifications timescaledb 2.18.2 Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) tsm_system_rows 1.0 TABLESAMPLE method which accepts number of rows as a limit tsm_system_time 1.0 TABLESAMPLE method which accepts time in milliseconds as a limit unaccent 1.1 Text search dictionary that removes accents uuid-ossp 1.1 Generate universally unique identifiers (UUIDs) xml2 1.1 XPath querying and XSLT The following extensions are additionally included in the Postgis images. Name Default Version Comment address_standardizer 3.4.4 Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. address_standardizer_data_us 3.4.4 Address Standardizer US dataset example postgis 3.4.4 PostGIS geometry and geography spatial types and functions postgis_raster 3.4.4 PostGIS raster types and functions postgis_sfcgal 3.4.4 PostGIS SFCGAL functions postgis_tiger_geocoder 3.4.4 PostGIS tiger geocoder and reverse geocoder postgis_topology 3.4.4 PostGIS topology spatial types and functions "},{"id":37,"href":"/CYBERTEC-pg-operator/extensions/pg16/","title":"PostgreSQL 16","parent":"Extensions","content":" The extensions listed are included in the standard images. This list refers to PostgreSQL 16. Name Default Version Comment adminpack 2.1 Administrative functions for PostgreSQL amcheck 1.3 Functions for verifying relation integrity autoinc 1.0 Functions for autoincrementing fields bloom 1.0 Bloom access method - signature file based index btree_gin 1.3 Support for indexing common datatypes in GIN btree_gist 1.7 Support for indexing common datatypes in GiST citext 1.6 Data type for case-insensitive character strings credcheck 3.0.0 credcheck - PostgreSQL plain text credential checker cube 1.5 Data type for multidimensional cubes dblink 1.2 Connect to other PostgreSQL databases from within a database dict_int 1.0 Text search dictionary template for integers dict_xsyn 1.0 Text search dictionary template for extended synonym processing earthdistance 1.2 Calculate great-circle distances on the surface of the Earth file_fdw 1.0 Foreign-data wrapper for flat file access fuzzystrmatch 1.2 Determine similarities and distance between strings hstore 1.8 Data type for storing sets of (key, value) pairs hstore_plperl 1.0 Transform between hstore and plperl hstore_plperlu 1.0 Transform between hstore and plperlu hstore_plpython3u 1.0 Transform between hstore and plpython3u insert_username 1.0 Functions for tracking who changed a table intagg 1.1 Integer aggregator and enumerator (obsolete) intarray 1.5 Functions, operators, and index support for 1-D arrays of integers isn 1.2 Data types for international product numbering standards jsonb_plperl 1.0 Transform between jsonb and plperl jsonb_plperlu 1.0 Transform between jsonb and plperlu jsonb_plpython3u 1.0 Transform between jsonb and plpython3u lo 1.1 Large Object maintenance ltree 1.2 Data type for hierarchical tree-like structures ltree_plpython3u 1.0 Transform between ltree and plpython3u moddatetime 1.0 Functions for tracking last modification time old_snapshot 1.0 Utilities in support of old_snapshot_threshold pageinspect 1.12 Inspect the contents of database pages at a low level pg_buffercache 1.4 Examine the shared buffer cache pg_cron 1.6 Job scheduler for PostgreSQL pg_freespacemap 1.2 Examine the free space map (FSM) pg_permissions 1.3 View object permissions and compare them with the desired state pg_prewarm 1.2 Prewarm relation data pg_proctab Placeholder - see pg_proctab\u0026ndash;0.0.10-compat.control pg_stat_statements 1.10 Track planning and execution statistics of all SQL statements executed pg_surgery 1.0 Extension to perform surgery on a damaged relation pg_trgm 1.6 Text similarity measurement and index searching based on trigrams pg_visibility 1.2 Examine the visibility map (VM) and page-level visibility info pg_walinspect 1.1 Functions to inspect contents of PostgreSQL Write-Ahead Log pgaudit 16.1 Provides auditing functionality pgauditlogtofile 1.6 pgAudit addon to redirect audit entries to an independent file pgcrypto 1.3 Cryptographic functions pgnodemx 1.7 SQL functions that allow capture of node OS metrics from PostgreSQL pgrowlocks 1.2 Show row-level locking information pgstattuple 1.5 Show tuple-level statistics plpgsql 1.0 PL/pgSQL procedural language plpython3u 1.0 PL/Python3U untrusted procedural language pltcl 1.0 PL/Tcl procedural language pltclu 1.0 PL/TclU untrusted procedural language postgres_fdw 1.1 Foreign-data wrapper for remote PostgreSQL servers refint 1.0 Functions for implementing referential integrity (obsolete) seg 1.4 Data type for representing line segments or floating-point intervals set_user 4.1.0 Similar to SET ROLE but with added logging sslinfo 1.2 Information about SSL certificates tablefunc 1.0 Functions that manipulate whole tables, including crosstab tcn 1.0 Triggered change notifications timescaledb 2.18.2 Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) tsm_system_rows 1.0 TABLESAMPLE method which accepts number of rows as a limit tsm_system_time 1.0 TABLESAMPLE method which accepts time in milliseconds as a limit unaccent 1.1 Text search dictionary that removes accents uuid-ossp 1.1 Generate universally unique identifiers (UUIDs) xml2 1.1 XPath querying and XSLT The following extensions are additionally included in the Postgis images. Name Default Version Comment address_standardizer 3.4.4 Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. address_standardizer_data_us 3.4.4 Address Standardizer US dataset example postgis 3.4.4 PostGIS geometry and geography spatial types and functions postgis_raster 3.4.4 PostGIS raster types and functions postgis_sfcgal 3.4.4 PostGIS SFCGAL functions postgis_tiger_geocoder 3.4.4 PostGIS tiger geocoder and reverse geocoder postgis_topology 3.4.4 PostGIS topology spatial types and functions ","description":" The extensions listed are included in the standard images. This list refers to PostgreSQL 16. Name Default Version Comment adminpack 2.1 Administrative functions for PostgreSQL amcheck 1.3 Functions for verifying relation integrity autoinc 1.0 Functions for autoincrementing fields bloom 1.0 Bloom access method - signature file based index btree_gin 1.3 Support for indexing common datatypes in GIN btree_gist 1.7 Support for indexing common datatypes in GiST citext 1.6 Data type for case-insensitive character strings credcheck 3.0.0 credcheck - PostgreSQL plain text credential checker cube 1.5 Data type for multidimensional cubes dblink 1.2 Connect to other PostgreSQL databases from within a database dict_int 1.0 Text search dictionary template for integers dict_xsyn 1.0 Text search dictionary template for extended synonym processing earthdistance 1.2 Calculate great-circle distances on the surface of the Earth file_fdw 1.0 Foreign-data wrapper for flat file access fuzzystrmatch 1.2 Determine similarities and distance between strings hstore 1.8 Data type for storing sets of (key, value) pairs hstore_plperl 1.0 Transform between hstore and plperl hstore_plperlu 1.0 Transform between hstore and plperlu hstore_plpython3u 1.0 Transform between hstore and plpython3u insert_username 1.0 Functions for tracking who changed a table intagg 1.1 Integer aggregator and enumerator (obsolete) intarray 1.5 Functions, operators, and index support for 1-D arrays of integers isn 1.2 Data types for international product numbering standards jsonb_plperl 1.0 Transform between jsonb and plperl jsonb_plperlu 1.0 Transform between jsonb and plperlu jsonb_plpython3u 1.0 Transform between jsonb and plpython3u lo 1.1 Large Object maintenance ltree 1.2 Data type for hierarchical tree-like structures ltree_plpython3u 1.0 Transform between ltree and plpython3u moddatetime 1.0 Functions for tracking last modification time old_snapshot 1.0 Utilities in support of old_snapshot_threshold pageinspect 1.12 Inspect the contents of database pages at a low level pg_buffercache 1.4 Examine the shared buffer cache pg_cron 1.6 Job scheduler for PostgreSQL pg_freespacemap 1.2 Examine the free space map (FSM) pg_permissions 1.3 View object permissions and compare them with the desired state pg_prewarm 1.2 Prewarm relation data pg_proctab Placeholder - see pg_proctab\u0026ndash;0.0.10-compat.control pg_stat_statements 1.10 Track planning and execution statistics of all SQL statements executed pg_surgery 1.0 Extension to perform surgery on a damaged relation pg_trgm 1.6 Text similarity measurement and index searching based on trigrams pg_visibility 1.2 Examine the visibility map (VM) and page-level visibility info pg_walinspect 1.1 Functions to inspect contents of PostgreSQL Write-Ahead Log pgaudit 16.1 Provides auditing functionality pgauditlogtofile 1.6 pgAudit addon to redirect audit entries to an independent file pgcrypto 1.3 Cryptographic functions pgnodemx 1.7 SQL functions that allow capture of node OS metrics from PostgreSQL pgrowlocks 1.2 Show row-level locking information pgstattuple 1.5 Show tuple-level statistics plpgsql 1.0 PL/pgSQL procedural language plpython3u 1.0 PL/Python3U untrusted procedural language pltcl 1.0 PL/Tcl procedural language pltclu 1.0 PL/TclU untrusted procedural language postgres_fdw 1.1 Foreign-data wrapper for remote PostgreSQL servers refint 1.0 Functions for implementing referential integrity (obsolete) seg 1.4 Data type for representing line segments or floating-point intervals set_user 4.1.0 Similar to SET ROLE but with added logging sslinfo 1.2 Information about SSL certificates tablefunc 1.0 Functions that manipulate whole tables, including crosstab tcn 1.0 Triggered change notifications timescaledb 2.18.2 Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) tsm_system_rows 1.0 TABLESAMPLE method which accepts number of rows as a limit tsm_system_time 1.0 TABLESAMPLE method which accepts time in milliseconds as a limit unaccent 1.1 Text search dictionary that removes accents uuid-ossp 1.1 Generate universally unique identifiers (UUIDs) xml2 1.1 XPath querying and XSLT The following extensions are additionally included in the Postgis images. Name Default Version Comment address_standardizer 3.4.4 Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. address_standardizer_data_us 3.4.4 Address Standardizer US dataset example postgis 3.4.4 PostGIS geometry and geography spatial types and functions postgis_raster 3.4.4 PostGIS raster types and functions postgis_sfcgal 3.4.4 PostGIS SFCGAL functions postgis_tiger_geocoder 3.4.4 PostGIS tiger geocoder and reverse geocoder postgis_topology 3.4.4 PostGIS topology spatial types and functions "},{"id":38,"href":"/CYBERTEC-pg-operator/extensions/pg17/","title":"PostgreSQL 17","parent":"Extensions","content":" The extensions listed are included in the standard images. This list refers to PostgreSQL 17. Name Default Version Comment amcheck 1.4 Functions for verifying relation integrity autoinc 1.0 Functions for autoincrementing fields bloom 1.0 Bloom access method - signature file based index btree_gin 1.3 Support for indexing common datatypes in GIN btree_gist 1.7 Support for indexing common datatypes in GiST citext 1.6 Data type for case-insensitive character strings credcheck 3.0.0 credcheck - PostgreSQL plain text credential checker cube 1.5 Data type for multidimensional cubes dblink 1.2 Connect to other PostgreSQL databases from within a database dict_int 1.0 Text search dictionary template for integers dict_xsyn 1.0 Text search dictionary template for extended synonym processing earthdistance 1.2 Calculate great-circle distances on the surface of the Earth file_fdw 1.0 Foreign-data wrapper for flat file access fuzzystrmatch 1.2 Determine similarities and distance between strings hstore 1.8 Data type for storing sets of (key, value) pairs hstore_plperl 1.0 Transform between hstore and plperl hstore_plperlu 1.0 Transform between hstore and plperlu hstore_plpython3u 1.0 Transform between hstore and plpython3u insert_username 1.0 Functions for tracking who changed a table intagg 1.1 Integer aggregator and enumerator (obsolete) intarray 1.5 Functions, operators, and index support for 1-D arrays of integers isn 1.2 Data types for international product numbering standards jsonb_plperl 1.0 Transform between jsonb and plperl jsonb_plperlu 1.0 Transform between jsonb and plperlu jsonb_plpython3u 1.0 Transform between jsonb and plpython3u lo 1.1 Large Object maintenance ltree 1.3 Data type for hierarchical tree-like structures ltree_plpython3u 1.0 Transform between ltree and plpython3u moddatetime 1.0 Functions for tracking last modification time pageinspect 1.12 Inspect the contents of database pages at a low level pg_buffercache 1.5 Examine the shared buffer cache pg_cron 1.6 Job scheduler for PostgreSQL pg_freespacemap 1.2 Examine the free space map (FSM) pg_permissions 1.3 View object permissions and compare them with the desired state pg_prewarm 1.2 Prewarm relation data pg_proctab Placeholder - see pg_proctab\u0026ndash;0.0.10-compat.control pg_stat_statements 1.11 Track planning and execution statistics of all SQL statements executed pg_surgery 1.0 Extension to perform surgery on a damaged relation pg_trgm 1.6 Text similarity measurement and index searching based on trigrams pg_visibility 1.2 Examine the visibility map (VM) and page-level visibility info pg_walinspect 1.1 Functions to inspect contents of PostgreSQL Write-Ahead Log pgaudit 17.1 Provides auditing functionality pgauditlogtofile 1.6 pgAudit addon to redirect audit entries to an independent file pgcrypto 1.3 Cryptographic functions pgnodemx 1.7 SQL functions that allow capture of node OS metrics from PostgreSQL pgrowlocks 1.2 Show row-level locking information pgstattuple 1.5 Show tuple-level statistics plpgsql 1.0 PL/pgSQL procedural language plpython3u 1.0 PL/Python3U untrusted procedural language pltcl 1.0 PL/Tcl procedural language pltclu 1.0 PL/TclU untrusted procedural language postgres_fdw 1.1 Foreign-data wrapper for remote PostgreSQL servers refint 1.0 Functions for implementing referential integrity (obsolete) seg 1.4 Data type for representing line segments or floating-point intervals set_user 4.1.0 Similar to SET ROLE but with added logging sslinfo 1.2 Information about SSL certificates tablefunc 1.0 Functions that manipulate whole tables, including crosstab tcn 1.0 Triggered change notifications timescaledb 2.18.2 Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) tsm_system_rows 1.0 TABLESAMPLE method which accepts number of rows as a limit tsm_system_time 1.0 TABLESAMPLE method which accepts time in milliseconds as a limit unaccent 1.1 Text search dictionary that removes accents uuid-ossp 1.1 Generate universally unique identifiers (UUIDs) xml2 1.1 XPath querying and XSLT The following extensions are additionally included in the Postgis images. Name Default Version Comment address_standardizer 3.4.4 Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. address_standardizer_data_us 3.4.4 Address Standardizer US dataset example postgis 3.4.4 PostGIS geometry and geography spatial types and functions postgis_raster 3.4.4 PostGIS raster types and functions postgis_sfcgal 3.4.4 PostGIS SFCGAL functions postgis_tiger_geocoder 3.4.4 PostGIS tiger geocoder and reverse geocoder postgis_topology 3.4.4 PostGIS topology spatial types and functions ","description":" The extensions listed are included in the standard images. This list refers to PostgreSQL 17. Name Default Version Comment amcheck 1.4 Functions for verifying relation integrity autoinc 1.0 Functions for autoincrementing fields bloom 1.0 Bloom access method - signature file based index btree_gin 1.3 Support for indexing common datatypes in GIN btree_gist 1.7 Support for indexing common datatypes in GiST citext 1.6 Data type for case-insensitive character strings credcheck 3.0.0 credcheck - PostgreSQL plain text credential checker cube 1.5 Data type for multidimensional cubes dblink 1.2 Connect to other PostgreSQL databases from within a database dict_int 1.0 Text search dictionary template for integers dict_xsyn 1.0 Text search dictionary template for extended synonym processing earthdistance 1.2 Calculate great-circle distances on the surface of the Earth file_fdw 1.0 Foreign-data wrapper for flat file access fuzzystrmatch 1.2 Determine similarities and distance between strings hstore 1.8 Data type for storing sets of (key, value) pairs hstore_plperl 1.0 Transform between hstore and plperl hstore_plperlu 1.0 Transform between hstore and plperlu hstore_plpython3u 1.0 Transform between hstore and plpython3u insert_username 1.0 Functions for tracking who changed a table intagg 1.1 Integer aggregator and enumerator (obsolete) intarray 1.5 Functions, operators, and index support for 1-D arrays of integers isn 1.2 Data types for international product numbering standards jsonb_plperl 1.0 Transform between jsonb and plperl jsonb_plperlu 1.0 Transform between jsonb and plperlu jsonb_plpython3u 1.0 Transform between jsonb and plpython3u lo 1.1 Large Object maintenance ltree 1.3 Data type for hierarchical tree-like structures ltree_plpython3u 1.0 Transform between ltree and plpython3u moddatetime 1.0 Functions for tracking last modification time pageinspect 1.12 Inspect the contents of database pages at a low level pg_buffercache 1.5 Examine the shared buffer cache pg_cron 1.6 Job scheduler for PostgreSQL pg_freespacemap 1.2 Examine the free space map (FSM) pg_permissions 1.3 View object permissions and compare them with the desired state pg_prewarm 1.2 Prewarm relation data pg_proctab Placeholder - see pg_proctab\u0026ndash;0.0.10-compat.control pg_stat_statements 1.11 Track planning and execution statistics of all SQL statements executed pg_surgery 1.0 Extension to perform surgery on a damaged relation pg_trgm 1.6 Text similarity measurement and index searching based on trigrams pg_visibility 1.2 Examine the visibility map (VM) and page-level visibility info pg_walinspect 1.1 Functions to inspect contents of PostgreSQL Write-Ahead Log pgaudit 17.1 Provides auditing functionality pgauditlogtofile 1.6 pgAudit addon to redirect audit entries to an independent file pgcrypto 1.3 Cryptographic functions pgnodemx 1.7 SQL functions that allow capture of node OS metrics from PostgreSQL pgrowlocks 1.2 Show row-level locking information pgstattuple 1.5 Show tuple-level statistics plpgsql 1.0 PL/pgSQL procedural language plpython3u 1.0 PL/Python3U untrusted procedural language pltcl 1.0 PL/Tcl procedural language pltclu 1.0 PL/TclU untrusted procedural language postgres_fdw 1.1 Foreign-data wrapper for remote PostgreSQL servers refint 1.0 Functions for implementing referential integrity (obsolete) seg 1.4 Data type for representing line segments or floating-point intervals set_user 4.1.0 Similar to SET ROLE but with added logging sslinfo 1.2 Information about SSL certificates tablefunc 1.0 Functions that manipulate whole tables, including crosstab tcn 1.0 Triggered change notifications timescaledb 2.18.2 Enables scalable inserts and complex queries for time-series data (Apache 2 Edition) tsm_system_rows 1.0 TABLESAMPLE method which accepts number of rows as a limit tsm_system_time 1.0 TABLESAMPLE method which accepts time in milliseconds as a limit unaccent 1.1 Text search dictionary that removes accents uuid-ossp 1.1 Generate universally unique identifiers (UUIDs) xml2 1.1 XPath querying and XSLT The following extensions are additionally included in the Postgis images. Name Default Version Comment address_standardizer 3.4.4 Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. address_standardizer_data_us 3.4.4 Address Standardizer US dataset example postgis 3.4.4 PostGIS geometry and geography spatial types and functions postgis_raster 3.4.4 PostGIS raster types and functions postgis_sfcgal 3.4.4 PostGIS SFCGAL functions postgis_tiger_geocoder 3.4.4 PostGIS tiger geocoder and reverse geocoder postgis_topology 3.4.4 PostGIS topology spatial types and functions "},{"id":39,"href":"/CYBERTEC-pg-operator/extensions/","title":"Extensions","parent":"CPO (CYBERTEC-PG-Operator)","content":"","description":""},{"id":40,"href":"/CYBERTEC-pg-operator/monitoring/","title":"Monitoring","parent":"CPO (CYBERTEC-PG-Operator)","content":"The CPO-Project has prepared severall Tools which allows to setup a Monitoring-Stack including Alerting and Metric-Viewer. These Stack is based on:\nPrometheus Alertmanager Grafana exporter-container CPO has prepared an own Exporter for the PostgreSQl-Pod which can used as a sidecar.\nSetting up the Monitoring Stack To setup the Monitoring-Stack we suggest that you create an own namespace and use the prepared kustomization file inside the Operator-Tutorials.\n$ kubectl create namespace cpo-monitoring namespace/cpo-monitoring created $ kubectl get pods -n cpo-monitoring No resources found in cpo-monitoring namespace. git clone https://github.com/cybertec-postgresql/CYBERTEC-operator-tutorial cd CYBERTEC-operator-tutorial/setup/monitoring # Hint: Please check if youn want to use a specific storage-class the file pvcs.yaml and add your storageclass on the commented part. Please ensure that you removed the comment-char. $ kubectl apply -n cpo-monitoring -k . serviceaccount/cpo-monitoring created serviceaccount/cpo-monitoring-tools created clusterrole.rbac.authorization.k8s.io/cpo-monitoring unchanged clusterrolebinding.rbac.authorization.k8s.io/cpo-monitoring unchanged configmap/alertmanager-config created configmap/alertmanager-rules-config created configmap/cpo-prometheus-cm created configmap/grafana-dashboards created configmap/grafana-datasources created secret/grafana-secret created service/cpo-monitoring-alertmanager created service/cpo-monitoring-grafana created service/cpo-monitoring-prometheus created persistentvolumeclaim/alertmanager-pvc created persistentvolumeclaim/grafana-pvc created persistentvolumeclaim/prometheus-pvc created deployment.apps/cpo-monitoring-alertmanager created deployment.apps/cpo-monitoring-grafana created deployment.apps/cpo-monitoring-prometheus created Hint: If you\u0026#39;re not running Openshift you will get a error like this: error: resource mapping not found for name: \u0026#34;grafana\u0026#34; namespace: \u0026#34;\u0026#34; from \u0026#34;.\u0026#34;: no matches for kind \u0026#34;Route\u0026#34; in version \u0026#34;route.openshift.io/v1\u0026#34; ensure CRDs are installed first You can ignore this, because it depends on an object with the type route which is part of Openshift. It is not needed replaced by ingress-rules or an loadbalancer-service. After installing the Monitoring-Stack we\u0026rsquo;re able to check the created pods inside the namespace\n$ kubectl get pods -n cpo-monitoring ---------------------------------------------------------------------------------------- NAME | READY | STATUS | RESTARTS | AGE cpo-monitoring-alertmanager-5bb8bc79f7-8pdv4 | 1/1 | Running | 0 | 3m35s cpo-monitoring-grafana-7c7c4f787b-jbj2f | 1/1 | Running | 0 | 3m35s cpo-monitoring-prometheus-67969b757f-k26jd | 1/1 | Running | 0 | 3m35s The configuration of this monitoring-stack is based on severall configmaps which can be modified.\nPrometheus-Configuration Alertmanager-Configuration Grafana-Configuration Configure a PostgreSQL-Cluster to allow Prometheus to gather metrics To allow Prometheus to gather metrics from your cluster you need to do some small modfications on the Cluster-Manifest. We need to create the monitor-object for this:\nkubectl edit postgresqls.cpo.opensource.cybertec.at cluster-1 ... spec: ... monitor: image: docker.io/cybertecpostgresql/cybertec-pg-container:exporter-16.2-1 The Operator will add automatically the monitoring sidecar to your pods, create a new postgres-user and add some structure inside the postgres-database to enable everthing needed for the Monitoring. Also every Ressource of your Cluster will get a new label: cpo_monitoring_stack=true. This is needed for Prometheus to identify all clusters which should be added to the monitoring. Removing this label will stop Prometheus to gather data from this cluster.\nAfter changing your Cluster-Manifest the Pods needs to be recreated which is done by a rolling update. After this you can see that the pod has now more than just one container.\nkubectl get pods ----------------------------------------------------------------------------- NAME | READY | STATUS | RESTARTS | AGE cluster-1-0 | 2/2 | Running | 0 | 54s cluster-1-1 | 2/2 | Running | 0 | 31s You can check the logs to see that the exporter is working and with curl you can see the output of the exporter.\nkubectl logs cluster-1-0 -c postgres-exporter kubectl exec --stdin --tty cluster-1-0 -c postgres-exporter -- /bin/bash [exporter@cluster-1-0 /]# curl http://127.0.0.1:9187/metrics You can now setup a LoadBalancer-Service or create an Ingress-Rule to allow access von outside to the grafana. Alternativ you can use a port-forward.\nLoadBalancer or Nodeport Ingress-Rule Port-Forwarding $ kubectl get pods -n cpo-monitoring ---------------------------------------------------------------------------------------- NAME | READY | STATUS | RESTARTS | AGE cpo-monitoring-alertmanager-5bb8bc79f7-8pdv4 | 1/1 | Running | 0 | 6m42s cpo-monitoring-grafana-7c7c4f787b-jbj2f | 1/1 | Running | 0 | 6m42s cpo-monitoring-prometheus-67969b757f-k26jd | 1/1 | Running | 0 | 6m42s $ kubectl port-forward cpo-monitoring-grafana-7c7c4f787b-jbj2f -n cpo-monitoring 9000:9000 Forwarding from 127.0.0.1:9000 -\u0026gt; 9000 Forwarding from [::1]:9000 -\u0026gt; 9000 Call http://localhost:9000 in the Browser\nUse a Route (Openshift only) kubectl get route -n cpo-monitoring Use the Route-Adress to access Grafana\n","description":"The CPO-Project has prepared severall Tools which allows to setup a Monitoring-Stack including Alerting and Metric-Viewer. These Stack is based on:\nPrometheus Alertmanager Grafana exporter-container CPO has prepared an own Exporter for the PostgreSQl-Pod which can used as a sidecar.\nSetting up the Monitoring Stack To setup the Monitoring-Stack we suggest that you create an own namespace and use the prepared kustomization file inside the Operator-Tutorials.\n"},{"id":41,"href":"/CYBERTEC-pg-operator/clone-cluster/","title":"Clone Cluster","parent":"CPO (CYBERTEC-PG-Operator)","content":"The function of a cluster clone was implemented to create the possibility of duplicating the current status of a cluster in order to carry out tests such as a major upgrade. It creates an autonomous and independent cluster based on an existing local cluster or from a cloud storage via pgBackRest (S3, gcs or Azure Blob)\nPreconditions: The primary cluster must either:\nbe accessible from the standby cluster via streaming replication the backup storage used by the standby cluster (S3, GCS or Azure Blob) must be accessible for the standby cluster The passwords for the Postgres user, the replication user and the exporter user (if monitoring is active) must be created as a secret for the standby cluster. Otherwise connection problems will occur\nClone a cluster via pvc apiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1-clone spec: dockerImage: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1\u0026#39; numberOfInstances: 1 postgresql: version: \u0026#39;17\u0026#39; resources: limits: cpu: 500m memory: 500Mi requests: cpu: 500m memory: 500Mi teamId: acid volume: size: 5Gi clone: cluster: cluster-1 pgbackrest: configuration: secret: cluster-1-pvc-configuration repo: storage: pvc Clone a cluster via s3 apiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1-clone spec: dockerImage: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1\u0026#39; numberOfInstances: 1 postgresql: version: \u0026#39;17\u0026#39; resources: limits: cpu: 500m memory: 500Mi requests: cpu: 500m memory: 500Mi teamId: acid volume: size: 5Gi clone: cluster: cluster-1 # A random cluster name can be used if the source cluster is not present on the k8s. pgbackrest: configuration: secret: cluster-1-s3-credentials options: repo1-path: /YOUR_PATH_INSIDE_THE_BUCKET_TO_THE_SOURCE_STANZA/repo1/ repo: endpoint: YOUR_SOURCE_S3_ENDPOINT name: repo1 region: YOUR_SOURCE_S3_REGION resource: YOUR_SOURCE_BUCKET_NAME storage: s3 Limitations A primary cluster cannot be demoted to a standby cluster. If necessary, the recommendation is to create a new cluster as a standby cluster.\n","description":"The function of a cluster clone was implemented to create the possibility of duplicating the current status of a cluster in order to carry out tests such as a major upgrade. It creates an autonomous and independent cluster based on an existing local cluster or from a cloud storage via pgBackRest (S3, gcs or Azure Blob)\nPreconditions: The primary cluster must either:\n"},{"id":42,"href":"/CYBERTEC-pg-operator/standby-cluster/","title":"Standby Cluster","parent":"CPO (CYBERTEC-PG-Operator)","content":"A standby cluster is an independent PostgreSQL cluster that consists of a standby leader and optionally further replicas (if numberOfInstances \u0026gt; 1). The standby leader runs in read-only mode and does not accept any write operations. A standby cluster can be promoted to a primary cluster if required, whereby the standby leader becomes a fully-fledged leader and allows write operations.\nPreconditions: The primary cluster must either:\nbe accessible from the standby cluster via streaming replication the backup storage used by the standby cluster (S3, GCS or Azure Blob) must be accessible for the standby cluster The passwords for the Postgres user, the replication user and the exporter user (if monitoring is active) must be created as a secret for the standby cluster. Otherwise connection problems will occur\nCreate standby cluster The standby object in the cluster manifest is required to create a standby cluster.\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: standby-cluster-1 spec: standby: standby_host: \u0026#34;cluster-1.cpo\u0026#34; standby_port: \u0026#34;5432\u0026#34; dockerImage: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1\u0026#39; numberOfInstances: 1 postgresql: version: \u0026#39;17\u0026#39; resources: limits: cpu: 500m memory: 500Mi requests: cpu: 500m memory: 500Mi teamId: acid volume: size: 5Gi The primary cluster must be accessible from the standby cluster. It can be located in the same Kubernetes cluster or in a different one.\nstandby_host: Corresponds to the endpoint via which the primary pod can be reached. It can be a kubernetes-internal DNS name or an IP or DNS name that can be reached in the network. standby_port: Corresponds to the PostgreSQL port used (default 5432) Promoting cluster To promote a cluster, it is only necessary to remove the standby object. The cluster is then promoted to a primary cluster.\nkubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type=\u0026#39;merge\u0026#39; -p \\ \u0026#39;{\u0026#34;spec\u0026#34;:{\u0026#34;standby\u0026#34;:null}}\u0026#39; Limitations A primary cluster cannot be demoted to a standby cluster. If necessary, the recommendation is to create a new cluster as a standby cluster.\n","description":"A standby cluster is an independent PostgreSQL cluster that consists of a standby leader and optionally further replicas (if numberOfInstances \u0026gt; 1). The standby leader runs in read-only mode and does not accept any write operations. A standby cluster can be promoted to a primary cluster if required, whereby the standby leader becomes a fully-fledged leader and allows write operations.\nPreconditions: The primary cluster must either:\n"},{"id":43,"href":"/CYBERTEC-pg-operator/pg_versioning/","title":"PG versioning","parent":"CPO (CYBERTEC-PG-Operator)","content":"","description":""},{"id":44,"href":"/CYBERTEC-pg-operator/pg_versioning/minor_updates/","title":"Minor version update","parent":"PG versioning","content":"Minor version updates for PostgreSQL are performed by updating the PostgreSQL container image in use. With the update object spec.dockerImage of the cluster manifest, the operator takes over the update based on the rolling update strategy. This means that the pods are replaced one after the other, with the replicas being updated first and then the old primary after a switchover. The operational interruption should generally last less than 5 seconds (switchover time), but the clients must still reconnect.\nIf necessary, the operator also supports the downgrade of minor releases in the same way.\nTo install minor version updates, PostgreSQL only requires the binaries to be replaced and the database to be restarted. For more information see PostgreSQL - Versioning Policy\nThis procedure can also be used for all other containers in a cluster. Whether sidecars, exporter, pooler or backup image Preconditions: Check if there is a newer image for the PostgreSQL container - Check on Docker hub Check - Check that the new PGVERSION is larger than the previously used one. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag. Updating PostgreSQL-Container-Image Old-Manifest:\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1 namespace: cpo spec: dockerImage: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.3-1\u0026#39; New-Manifest:\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1 namespace: cpo spec: dockerImage: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1\u0026#39; Updating via kubectl/oc-client kubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type=\u0026#39;merge\u0026#39; -p \\ \u0026#39;{\u0026#34;spec\u0026#34;:{\u0026#34;dockerImage\u0026#34;:\u0026#34;docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1\u0026#34;}}\u0026#39; Updating Exporter-Container-Image Updating Cluster-Manifest: Old-Manifest:\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1 namespace: cpo spec: monitor: image: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:exporter-17.3-1\u0026#39; New-Manifest:\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: cluster-1 namespace: cpo spec: monitor: image: \u0026#39;docker.io/cybertecpostgresql/cybertec-pg-container:exporter-17.4-1\u0026#39; Updating via kubectl/oc-client kubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type=\u0026#39;merge\u0026#39; -p \\ \u0026#39;{\u0026#34;spec\u0026#34;:{\u0026#34;monitor\u0026#34;:{\u0026#34;image\u0026#34;:\u0026#34;docker.io/cybertecpostgresql/cybertec-pg-container:exporter-17.4-1\u0026#34;}}}\u0026#39; ","description":"Minor version updates for PostgreSQL are performed by updating the PostgreSQL container image in use. With the update object spec.dockerImage of the cluster manifest, the operator takes over the update based on the rolling update strategy. This means that the pods are replaced one after the other, with the replicas being updated first and then the old primary after a switchover. The operational interruption should generally last less than 5 seconds (switchover time), but the clients must still reconnect.\n"},{"id":45,"href":"/CYBERTEC-pg-operator/pg_versioning/major_upgrades/","title":"Major version upgrade","parent":"PG versioning","content":"CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.\nNote that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore. How does the upgrade work? Preconditions: Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to. Check - Check that the new PGVERSION is larger than the previously used one. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag. Preliminary checks use initdb to prepare a new data_dir (data_new) based on the new PGVERSION. check the upgrade possibility with pg_upgrade --check If one of the steps is aborted, a cleanup is performed Prepare the Upgrade remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit. activate the maintenance mode of the cluster terminate PostgreSQL in an orderly manner check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location use port 5432 for rsyncd and start it Start the Upgrade Call pg_upgrade -k to start the Upgrade if the process failed, we need to rollback, if it was sucessful we\u0026rsquo;re reaching the point of no return Rename the directories. data -\u0026gt; data_old and data_new -\u0026gt; data Update the Patroni.config (postgres.yml) Call Checkpoint on every replica and trigger rsync on the Replicas Wait for Replicas to complete rsxnc. Timeout: 300 Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid Start Patroni on the Primary and start the postgres locally Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads Wait for every Replica to become ready Disable the maintenance mode for the Cluster Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade Completion of the upgrade Drop directory data_old Trigger new Backup How a rollback is working? Stop rsynd if its running Disable the maintenance mode for the Cluster Drop directory data_new How to trigger a In-Place-Upgrade with cpo? spec: postgresql: version: \u0026#34;17\u0026#34; To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above.\nkubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type=\u0026#39;merge\u0026#39; -p \\ \u0026#39;{\u0026#34;spec\u0026#34;:{\u0026#34;postgresql\u0026#34;:{\u0026#34;version\u0026#34;:\u0026#34;17\u0026#34;}}}\u0026#39; Upgrade on cloning When cloning, the new cluster manifest must have a higher version number than the source cluster and is created from a base backup. Depending on the cluster size, the downtime can be considerable in this case, as write operations in the database should be stopped and all WAL files should be archived first before cloning is started. Therefore, only use cloning to test major version upgrades and to check the compatibility of your app with the Postgres server of a higher version.\nmanual upgrade via the PostgreSQL container In this scenario the major version could then be run by a user from within the primary pod. Exec into the container and run:\npython3 /scripts/inplace_upgrade.py N where N is the number of members of your cluster (see numberOfInstances). The upgrade is usually fast, well under one minute for most DBs.\nNote, that changes become irrevertible once pg_upgrade is called. ","description":"CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.\nNote that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore. How does the upgrade work? Preconditions: Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to. Check - Check that the new PGVERSION is larger than the previously used one. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag. Preliminary checks use initdb to prepare a new data_dir (data_new) based on the new PGVERSION. check the upgrade possibility with pg_upgrade --check If one of the steps is aborted, a cleanup is performed Prepare the Upgrade remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit. activate the maintenance mode of the cluster terminate PostgreSQL in an orderly manner check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location use port 5432 for rsyncd and start it Start the Upgrade Call pg_upgrade -k to start the Upgrade if the process failed, we need to rollback, if it was sucessful we\u0026rsquo;re reaching the point of no return Rename the directories. data -\u0026gt; data_old and data_new -\u0026gt; data Update the Patroni.config (postgres.yml) Call Checkpoint on every replica and trigger rsync on the Replicas Wait for Replicas to complete rsxnc. Timeout: 300 Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid Start Patroni on the Primary and start the postgres locally Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads Wait for every Replica to become ready Disable the maintenance mode for the Cluster Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade Completion of the upgrade Drop directory data_old Trigger new Backup How a rollback is working? Stop rsynd if its running Disable the maintenance mode for the Cluster Drop directory data_new How to trigger a In-Place-Upgrade with cpo? spec: postgresql: version: \u0026#34;17\u0026#34; To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above.\n"},{"id":46,"href":"/CYBERTEC-pg-operator/multisite/","title":"Multisite","parent":"CPO (CYBERTEC-PG-Operator)","content":"Multisite is a function specially developed for Patroni that makes it possible to combine two separate Patroni clusters into a common cluster unit. ‘Separate’ in this context means that the clusters run independently of each other and can even be located on different Kubernetes clusters. With Multisite, both clusters benefit from the well-known Patroni features such as automatic failover and demotion of members, resulting in a significant extension compared to a conventional standby cluster. This feature significantly improves high availability and redundancy by managing multiple geographically or infrastructurally separated clusters as one logical unit. This allows one cluster to seamlessly transition to another in the event of a failure without having to rely on manual switchovers or third-party replication solutions.\nPrerequisites In order to set up the multisite PostgreSQL operator you will need the following:\nTwo or more Kubernetes or OpenShift clusters (also possible with bare metal or VMs) Kubernetes version 1.25+, OpenShift version 4.12+. Support for defining LoadBalancer services with external IP addresses that are accessible from the other cluster(s). Persistent volumes with must be available (only ReadWriteOnce capability is needed). A separate VM or Kubernetes/OpenShift cluster to provide quorum (if using less then three Kubernetes or OpenShift clusters). For high availability there should not be a shared point of failure between the quorum and the two Kubernetes clusters. VM or a LoadBalancer IP must be accessible on ports 2379/2380 to the two other clusters. 2 vCPU and 2 GB of memory and 20GB of persistent storage is needed for the quorum site. Set up etcd cluster with 3 sites accessible from each of the sites. etcd needs to support API version 3. For backups an object storage system with S3 compatible API is needed. Minio, Ceph and major cloud provider object storages are known to work. An additional etcd is set up for Multisite, which spans the Kubernetes or Openshift clusters and must contain the quorum. Architecture Helm based deployment of the multisite operator contains two helm charts, postgres-operator and postgres-cluster. The first is used to deploy the operator and associated objects to a single Kubernetes cluster. The operator is responsible for managing PostgreSQL clusters based on Custom Resource Definitions (CRDs) of type postgresqls/pg.\nThe diagram contains in green the Helm charts that are used to deploy operator and clusters, in blue the objects deployed by the operator helm chart and in gold the objects deployed by the cluster chart.\nOperator helm chart deployed objects have the following purposes:\ndeployments/postgres-operator - Deployment for the operator itself. opconfig/postgres-operator - Operator configuration parameters that are read on operator startup. These apply to all clusters managed by this operator. crd/operatorconfigurations.cpo.opensource.cybertec.at - Schema for the operator configuration. clusterrole/postgres-operator - Defines the Kubernetes API resource access used by the operator. Assigned to postgres-operator service account. clusterrole/postgres-pod - The Kubernetes API access needed by database pods. Access is needed to access leader status, config and other things. This is assigned to postgres-pod service account used by database pods. crd/postgresqls.cpo.opensource.cybertec.at - Schema for PostgreSQL cluster definitions. clusterrole/postgres-operator:users:{admin,edit,view} - If rbac.createAggregateClusterRoles is set then user facing roles are added for accessing the postgresqls CRDs. The cluster chart creates an instance of postgresqls CRD, which will be called cluster manifest from here on. When this cluster manifest is created operator will create the needed resources for the cluster. These include:\nstatefulset/$clustername - StatefulSet is responsible for creating and managing database pods and their associated PersistentVolumeClaims for storing the databases. Each database pod will run internally an instance of Patroni process, which will coordinate over the Kubernetes API initialization of the database, startup, leader election and other control plane actions.\nservice/$clustername,endpoints/$clustername - The main access point for users accessing the database. When load balancer is enabled in the CRD or multisite mode is enabled, this service will be set to be a LoadBalancer service and accessible from outside the Kubernetes cluster. The service is created without a selector. Instead, for leader elections database pods will update the IP address of this endpoint to point to the current leader.\nThe endpoint also holds annotations that determine the duration of the leader lease.\nIn multicluster operation mode the standby site leader will be in read-only mode.\nservice/$clustername-repl - Service that points to non-leader (read-only) instances of the database cluster.\nservice/$clustername-config - A headless service with an endpoint that holds Patroni configuration in annotations.\npoddisruptionbudget/postgres-$clustername-pdb - A pod disruption budget that does not allow Kubernetes to shut down pods in leader role. On some Kubernetes clusters kubernetes.enable_pod_disruption_budgets may need to be turned off to allow nodes to be drained for upgrades.\nMultisite mode In multisite operation mode there are multiple independent Kubernetes clusters with operators capable of independent operation. To coordinate which site has the current leader process the database pods use a shared etcd cluster to store a leader lease.\nDuring bootstrap the first site to acquire the leader lease gets to initialize the database contents. Secondary sites are configured to replicate from primary site using Patroni\u0026rsquo;s standby_cluster mechanism.\nTo be able to communicate between Kubernetes clusters a LoadBalancer service is needed. For this the operator automatically turns the primary service of the cluster to be of kind LoadBalancer. Operator will wait for an external IP address to be assigned to this service and passes this information to the database pod. The leader of each site, whether primary or standby site, will periodically advertise the externally visible IP address for their site in etcd. Based on this the standby site can configure the standby cluster mechanism to replicate from primary site.\nDeployment In multisite mode postgres-operator can manage a replicated PostgreSQL cluster that is deployed across multiple Kubernetes clusters. Multisite operation can be turned on on a cluster by cluster basis, or can be configured to default to on for all cluster managed by a single operator.\nSetting up a GR deployment consists of the following steps:\nCreating a shared etcd cluster. Configuring multisite operation parameters for the postgres-operator. Creating a multisite enabled cluster. Etcd deployment Multisite operation mode requires an etcd cluster to achieve consensus on which site gets to accept write transactions. This functionality is critical to avoid situations where multiple site accept incompatible writes that cannot be reconciliated, also known as a split brain scenario.\nA highly available etcd cluster consists of an odd number of nodes, at least 3. It is very important that a quorum of etcd instances (for 3 node clusters, any two instances) do not share a single point of failure. Otherwise the write availability of database clusters is limited to this single point of failure. Effectively this means that to protect 3 node etcd clusters from whole site failure, any site can only contain 1 etcd node and there needs to be at least 3 sites.\nPostgres-operator is agnostic to the exact method of etcd setup, but for ease of use there is a Helm chart packaged that demonstrates the setup.\nExample etcd setup This example uses one etcd instance deployed outside Kubernetes cluster as quorum. This etcd needs to be started with the following configuration. Note that IP address that is advertised must be routed to the host that runs this etcd.\nETCD_NAME=quorum ETCD_INITIAL_CLUSTER=quorum=http://10.100.1.100:2380 ETCD_INITIAL_ADVERTISE_PEER_URLS=http://10.100.1.100:2380 ETCD_INITIAL_CLUSTER_TOKEN=hpe_etcd ETCD_ADVERTISE_CLIENT_URLS=http://10.100.1.100:2379 ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 Kubernetes clusters can then be joined to this node. This needs to be a two step process as typically the externally visible IP address or port is not known before creating the LoadBalancer service. For this first create a free standing loadbalancer service that will be overwritten by the Helm chart.\nhelm template global-etcd ./etcd-helm/ -f etcd-helm/site_a.yaml \\ | awk \u0026#39;/service.yaml/{flag=1;next}/---/{flag=0}flag\u0026#39; \\ | kubectl apply -f - Then check what external IP address the load balancer service got assigned to it.\n$ kubectl get svc -l app.kubernetes.io/instance=global-etcd NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE global-etcd-etcd-helm LoadBalancer 10.109.171.146 10.200.1.101 2379:32488/TCP,2380:30336/TCP 17h And set in the values for the helm chart:\nUnique name of the site. Externally visible IP address of this service IP address of existing etcd service. Peer list that includes both existing and to be added etcd instance. Example:\nsite: name: site_a host: 10.100.2.101 etcd: existing_etcd_cluster_hostname: 10.100.1.100 token: hpe_etcd state: existing peers: #Peers should only include working peers and the current one - quorum=http://10.100.1.100:2380 - site_a_etcd0=http://10.100.2.101:2380 client_port: 2379 peer_port: 2380 Then install the helm chart:\nhelm install global-etcd ./etcd-helm/ -f etcd-helm/site_a.yaml This then needs to be repeated for the other site.\nConfiguring operator for multisite operations Multisite operation needs at a minimum the configuration options multisite.etcd_host, multisite.site and multisite.enabled. All of them can be configured either in operator configuration or per cluster.\nmultisite.etcd_host needs to point at the global etcd. The port is currently assumed to be 2379. Normally all clusters under one operator would be using the same etcd clusters, so it makes sense to configure it in the operator configuration. At runtime database pods will discover the whole etcd cluster member list and will also take notice of any membership changes. It is enough to use local etcd instance service name here.\nmultisite.site is a unique identifier for this site. It will be prefixed to globally advertised database pod names to distinguish them from pods in other sites. This also makes sense in the operator configuration.\nmultisite.enabled turns of the multisite behavior. Typically it would make sense to control this at the cluster level, but the default could be turned on globally.\nThese parameters are exposed in Helm chart values file as configMultisite.*.\nExample config:\n$ kubectl get opconfig/postgres-operator -o yaml | grep multisite -B1 -A3 min_instances: -1 multisite: etcd_host: global-etcd-etcd-helm.default.svc.cluster.local site: s1 postgres_pod_resources: This needs to be repeated with a different site name in the second Kubernetes cluster.\nCreating a multisite enabled postgres cluster If the operator is configured for multisite operation then creating a multisite cluster only needs enabling of the multisite mode.\nHere is an example values file to use for creating multisite enabled clusters:\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: multisite-cluster namespace: cpo labels: app.kubernetes.io/name: postgres-cluster app.kubernetes.io/instance: multisite-cluster spec: dockerImage: docker.io/cybertecpostgresql/cybertec-pg-container:postgres-multisite-17.4-1 numberOfInstances: 1 postgresql: version: \u0026#39;17\u0026#39; resources: limits: cpu: 500m memory: 500Mi requests: cpu: 500m memory: 500Mi teamId: acid volume: size: 5Gi patroni: ttl: 30 loop_wait: 10 retry_timeout: 10 multisite: enable: true There is no coordination needed between creating the two or more sites and they can use identical configuration. The clusters need to be in the same namespace and have the same name to be considered the same cluster. The first cluster to boot up will acquire multisite leader status and will bootstrap the database. The other clusters will automatically fetch a copy from the leader cluster and start replicating.\nMultisite operation needs that the database cluster are capable of communicating with each other. To do this a load balancer service is created in each cluster for the cluster leader. The operator then waits for an external IP to be assigned and injects it into the database pods to be used for advertising their identity.\nObserving operations If database pods have not been created, the first place to check for information is operator logs. Operator logs can be checked with the following command (add \u0026ndash;follow if you want to observe in real-time):\nkubectl logs $(kubectl get po -l \u0026#39;app.kubernetes.io/name=postgres-operator\u0026#39; -o name) The logs for a successful cluster creation look like this\ntime=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=info msg=\u0026#34;ADD event has been queued\u0026#34; cluster-name=cpo/multisite-cluster pkg=controller worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=info msg=\u0026#34;creating a new Postgres cluster\u0026#34; cluster-name=cpo/multisite-cluster pkg=controller worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=warning msg=\u0026#34;master is not running, generated master endpoint does not contain any addresses\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=info msg=\u0026#34;endpoint \\\u0026#34;cpo/multisite-cluster\\\u0026#34; has been successfully created\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=debug msg=\u0026#34;final load balancer source ranges as seen in a service spec (not necessarily applied): [\\\u0026#34;0.0.0.0/0\\\u0026#34;]\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=info msg=\u0026#34;master service \\\u0026#34;cpo/multisite-cluster\\\u0026#34; has been successfully created\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=info msg=\u0026#34;replica service \\\u0026#34;cpo/multisite-cluster-repl\\\u0026#34; has been successfully created\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=debug msg=\u0026#34;team API is disabled\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=debug msg=\u0026#34;team API is disabled\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=info msg=\u0026#34;users have been initialized\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=info msg=\u0026#34;syncing secrets\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:12Z\u0026#34; level=debug msg=\u0026#34;created new secret cpo/postgres.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at, namespace: default, uid: 75ded2eb-a2c9-4968-a1d7-50d2996baeb3\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:13Z\u0026#34; level=debug msg=\u0026#34;created new secret cpo/standby.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at, namespace: default, uid: 45a2560a-65a8-4bd5-954f-34d80d8a1894\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:13Z\u0026#34; level=info msg=\u0026#34;secrets have been successfully created\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:13Z\u0026#34; level=info msg=\u0026#34;pod disruption budget \\\u0026#34;cpo/postgres-multisite-cluster-pdb\\\u0026#34; has been successfully created\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:13Z\u0026#34; level=info msg=\u0026#34;waiting for load balancer IP to be assigned\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:13Z\u0026#34; level=debug msg=\u0026#34;created new statefulset \\\u0026#34;cpo/multisite-cluster\\\u0026#34;, uid: \\\u0026#34;b83647ea-17f6-40aa-aa0c-b1111e76cdc0\\\u0026#34;\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:13Z\u0026#34; level=info msg=\u0026#34;statefulset \\\u0026#34;cpo/multisite-cluster\\\u0026#34; has been successfully created\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:13Z\u0026#34; level=info msg=\u0026#34;waiting for the cluster being ready\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:16Z\u0026#34; level=debug msg=\u0026#34;Waiting for 1 pods to become ready\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;pods are ready\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;Create roles\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=debug msg=\u0026#34;closing database connection\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;users have been successfully created\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=debug msg=\u0026#34;closing database connection\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;databases have been successfully created\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;found pod disruption budget: \\\u0026#34;cpo/postgres-multisite-cluster-pdb\\\u0026#34; (uid: \\\u0026#34;986a0118-83e7-4736-9843-ec80c0ea9270\\\u0026#34;)\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;found statefulset: \\\u0026#34;cpo/multisite-cluster\\\u0026#34; (uid: \\\u0026#34;b83647ea-17f6-40aa-aa0c-b1111e76cdc0\\\u0026#34;)\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;found secret: \\\u0026#34;cpo/postgres.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at\\\u0026#34; (uid: \\\u0026#34;75ded2eb-a2c9-4968-a1d7-50d2996baeb3\\\u0026#34;) namesapce: default\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;found secret: \\\u0026#34;cpo/standby.multisite-cluster.credentials.postgresql.cpo.opensource.cybertec.at\\\u0026#34; (uid: \\\u0026#34;45a2560a-65a8-4bd5-954f-34d80d8a1894\\\u0026#34;) namesapce: default\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;found master endpoint: \\\u0026#34;cpo/multisite-cluster\\\u0026#34; (uid: \\\u0026#34;d9f7870e-dd51-4a88-a36a-1c2eb258a31c\\\u0026#34;)\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;found master service: \\\u0026#34;cpo/multisite-cluster\\\u0026#34; (uid: \\\u0026#34;4b30df50-ca53-4def-8171-b792c4eefc17\\\u0026#34;)\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;found replica service: \\\u0026#34;cpo/multisite-cluster-repl\\\u0026#34; (uid: \\\u0026#34;a77c3a49-3eea-4b6b-92b1-032e13d78f02\\\u0026#34;)\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;found pod: \\\u0026#34;cpo/multisite-cluster-0\\\u0026#34; (uid: \\\u0026#34;9b31d378-c9eb-4c1a-8637-e78933187ed7\\\u0026#34;)\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;found PVC: \\\u0026#34;cpo/pgdata-multisite-cluster-0\\\u0026#34; (uid: \\\u0026#34;03e66572-27ed-42b4-87bd-825d32131d36\\\u0026#34;)\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=debug msg=\u0026#34;syncing connection pooler (master, replica) from (false, nil) to (false, false)\u0026#34; cluster-name=cpo/multisite-cluster pkg=cluster worker=1 time=\u0026#34;2023-02-22T15:24:28Z\u0026#34; level=info msg=\u0026#34;cluster has been created\u0026#34; cluster-name=cpo/multisite-cluster pkg=controller worker=1 When database pods have been created, then Patroni logs can be checked from the pod logs:\nkubectl logs multisite-cluster-0 Successful start of first database pod will have amongst other output the following lines:\n. . . # Kubernetes API access 2023-02-22 15:24:21,061 INFO: Selected new K8s API server endpoint https://192.168.49.2:8443 . . . # Set ourselves as multisite leader 2023-02-22 15:24:21,218 INFO: Selected new etcd server http://192.168.50.101:2379 2023-02-22 15:24:21,348 INFO: Running multisite consensus. 2023-02-22 15:24:21,349 INFO: Touching member s1-multisite-cluster with {\u0026#39;host\u0026#39;: \u0026#39;192.168.49.103\u0026#39;, \u0026#39;port\u0026#39;: 5432} 2023-02-22 15:24:21,447 INFO: Became multisite leader . . . # Initializing a new empty database 2023-02-22 15:24:21,563 INFO: trying to bootstrap a new cluster . . . Success. You can now start the database server using: . . . # Database started 2023-02-22 15:24:23,934 INFO: postmaster pid=73 . . . # Running global database intitialization script 2023-02-22 15:24:25,061 INFO: running post_bootstrap . . . # Bootstrap done 2023-02-22 15:24:26,310 INFO: initialized a new cluster . . . # Repeated information about health every 10s 2023-02-22 15:24:26,313 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-0 2023-02-22 15:24:26,361 INFO: Triggering multisite hearbeat 2023-02-22 15:24:26,364 INFO: Running multisite consensus. 2023-02-22 15:24:26,364 INFO: Multisite has leader and it is us 2023-02-22 15:24:26,409 INFO: Updated multisite leader lease 2023-02-22 15:24:26,409 INFO: Touching member s1-multisite-cluster with {\u0026#39;host\u0026#39;: \u0026#39;192.168.49.103\u0026#39;, \u0026#39;port\u0026#39;: 5432} 2023-02-22 15:24:26,422 INFO: no action. I am (multisite-cluster-0), the leader with the lock . . . Bootstrap of standby on primary site will have these lines:\n. . . # Determine leader 2023-02-22 15:47:04,552 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-1 2023-02-22 15:47:04,677 INFO: trying to bootstrap from leader \u0026#39;multisite-cluster-0\u0026#39; . . . # Data copied to replica successfully 2023-02-22 15:47:06,805 INFO: replica has been created using basebackup_fast_xlog 2023-02-22 15:47:06,807 INFO: bootstrapped from leader \u0026#39;multisite-cluster-0\u0026#39; # Postgres up 2023-02-22 15:47:07,205 INFO: postmaster pid=73 . . . # Normal operation 2023-02-22 15:47:08,380 INFO: no action. I am (multisite-cluster-1), a secondary, and following a leader (multisite-cluster-0) Standby cluster will have the following information:\n. . . # Discovering multisite status 2023-02-22 15:49:58,406 INFO: Running multisite consensus. 2023-02-22 15:49:58,407 INFO: Touching member s2-multisite-cluster with {\u0026#39;host\u0026#39;: \u0026#39;192.168.50.103\u0026#39;, \u0026#39;port\u0026#39;: 5432} 2023-02-22 15:49:58,454 INFO: Multisite has leader and it is s1-multisite-cluster 2023-02-22 15:49:58,454 INFO: Multisite replicate from Member(index=\u0026#39;118\u0026#39;, name=\u0026#39;s1-multisite-cluster\u0026#39;, session=\u0026#39;4113060022582527194\u0026#39;, data={\u0026#39;host\u0026#39;: \u0026#39;192.168.49.103\u0026#39;, \u0026#39;port\u0026#39;: 5432}) 2023-02-22 15:49:58,454 INFO: Setting standby configuration to: {\u0026#39;host\u0026#39;: \u0026#39;192.168.49.103\u0026#39;, \u0026#39;port\u0026#39;: 5432} 2023-02-22 15:49:58,455 INFO: Touching member s2-multisite-cluster with {\u0026#39;host\u0026#39;: \u0026#39;192.168.50.103\u0026#39;, \u0026#39;port\u0026#39;: 5432} . . . # Acquiring standby site leader status and starting copy from primary site 2023-02-22 15:49:58,290 INFO: Lock owner: None; I am multisite-cluster-0 2023-02-22 15:49:58,566 INFO: trying to bootstrap a new standby leader . . . # Replica creation successful 2023-02-22 15:50:00,326 INFO: replica has been created using basebackup 2023-02-22 15:50:00,327 INFO: bootstrapped clone from remote master postgresql://192.168.49.103:5432 # Postgres started 2023-02-22 15:50:00,577 INFO: postmaster pid=58 . . . # Normal operation output of standby leader 2023-02-22 15:50:01,835 INFO: Lock owner: multisite-cluster-0; I am multisite-cluster-0 2023-02-22 15:50:01,886 INFO: Triggering multisite hearbeat 2023-02-22 15:50:01,888 INFO: Running multisite consensus. 2023-02-22 15:50:01,888 INFO: Multisite has leader and it is s1-multisite-cluster 2023-02-22 15:50:01,888 INFO: Multisite replicate from Member(index=\u0026#39;118\u0026#39;, name=\u0026#39;s1-multisite-cluster\u0026#39;, session=\u0026#39;4113060022582527194\u0026#39;, data={\u0026#39;host\u0026#39;: \u0026#39;192.168.49.103\u0026#39;, \u0026#39;port\u0026#39;: 5432}) 2023-02-22 15:50:01,888 INFO: Touching member s2-multisite-cluster with {\u0026#39;host\u0026#39;: \u0026#39;192.168.50.103\u0026#39;, \u0026#39;port\u0026#39;: 5432} 2023-02-22 15:50:01,899 INFO: no action. I am (multisite-cluster-0), the standby leader with the lock In case access to PostgreSQL logs is needed, the easiest way is to exec into a running database pod with kubectl exec -it multisite-cluster-0 -- bash and view the files there. Logs are stored as /home/postgres/pgdata/pgroot/pg_log/postgresql-*.csv, with one file per weekday.\nReplication state can be queried from PostgreSQL:\nkubectl exec -it $(kubectl get -o name po -l \u0026#39;spilo-role=master,cluster-name=multisite-cluster\u0026#39;) -- su postgres -c \\ \u0026#39;psql -xc \u0026#34;SELECT application_name, client_addr, backend_start, write_lag FROM pg_stat_replication\u0026#34;\u0026#39; To check how multisite mode is doing one option is to check the etcd state. For example by executing in any one of your database pods:\nkubectl exec multisite-cluster-0 -- bash -c \\ \u0026#39;ETCDCTL_API=3 etcdctl --endpoints=http://${MULTISITE_ETCD_HOST}:2379 \\ get /multisite/${POD_NAMESPACE}/${SCOPE}/{leader,members0}\u0026#39; This will output state stored in etcd. Example:\n/multisite/cpo/multisite-cluster/leader s1-multisite-cluster /multisite/cpo/multisite-cluster/members/s1-multisite-cluster {\u0026#34;host\u0026#34;:\u0026#34;192.168.49.102\u0026#34;,\u0026#34;port\u0026#34;:5432} /multisite/cpo/multisite-cluster/members/s2-multisite-cluster {\u0026#34;host\u0026#34;:\u0026#34;192.168.50.102\u0026#34;,\u0026#34;port\u0026#34;:5432} Each cluster state is stored with the prefix /multisite/$NAMESPACE/$CLUSTER_NAME. In this state there is /leader key storing current leader of the cluster and /members/$SITE_$CLUSTER_NAME for each sites externally visible service.\nTriggering switchover manually Sometimes it is necessary to move leader role from one site to another. For this the operator REST API has an endpoint named /clusters/$namespace/$cluster/multisite/. This accepts a POST request with a request JSON. The document has the following attributes:\nswitchover_to: name of the site that should become the new multisite leader. Example:\ncurl --data-raw \u0026#39;{\u0026#34;switchover_to\u0026#34;: \u0026#34;s1\u0026#34;}\u0026#39; -H \u0026#34;Content-type: application/json\u0026#34; \\ http://postgres-operator.default.svc.cluster.local:8080/clusters/cpo/multisite-cluster/multisite/ The POST request to this endpoint will return immediately when the switchover request has been registered. The actual switchover process will take some time to coordinate.\nObserving multisite status Current multisite status is published to cluster CRD status subresource in Multisite field. The possible values are Leader and Standby. When the role changes there will also be an event published.\nExample output from a kubectl describe on the cluster CRD resource:\nStatus: Multisite: Leader Postgres Cluster Status: Running Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Promote 13s patroni Acquired multisite leader status Ouptut from the standby side:\nStatus: Multisite: Standby Postgres Cluster Status: Running Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Demote 62s patroni Lost leader lock to s1-multisite-cluster Normal Multisite 97s postgres-operator Multisite switching over to \u0026#34;multisite-cluster\u0026#34; at site \u0026#34;s1\u0026#34; Normal Multisite 97s postgres-operator Successfully started switchover to \u0026#34;multisite-cluster\u0026#34; at \u0026#34;s1\u0026#34; Development environment tips MetalLB based cross cluster communication with minikube Minikube is a useful distribution for deploying development Kubernetes clusters. With a bit of configuration it is possible to set up 2 Minikube clusters with MetalLB deployed so that MetalLB assigned IP addresses are accessible from the other cluster.\nPre-requisite is to have 2 virtual machines that either are in the same L2 network, or that have a subnet routed to them.\nThis example is based on docker based deployment, same approach might work with other deployment options (e.g. Virtualbox), but may require some extra configuration tuning.\nStart minikube\u0026rsquo;s on the two hosts using different internal subnets, and configure and enable the metallb addon to assign IP addresses from this subnet. The subnets chosen should not be in use for services needed by these two VMs, but other hosts are not affected by the choice of the subnets.\n# Host A minikube start --subnet=192.168.49.2 minikube addons configure metallb -- Enter Load Balancer Start IP: 192.168.49.100 -- Enter Load Balancer End IP: 192.168.49.200 ▪ Using image docker.io/metallb/speaker:v0.9.6 ▪ Using image docker.io/metallb/controller:v0.9.6 ✅ metallb was successfully configured minikube addons enable metallb # Host B minikube start --subnet=192.168.50.2 minikube addons configure metallb -- Enter Load Balancer Start IP: 192.168.50.100 -- Enter Load Balancer End IP: 192.168.50.200 ▪ Using image docker.io/metallb/speaker:v0.9.6 ▪ Using image docker.io/metallb/controller:v0.9.6 ✅ metallb was successfully configured minikube addons enable metallb On both hosts turn on ip forwarding in sysctl.conf and reload it with sysctl -p\nnet.ipv4.ip_forward=1 In IP tables allow forwarding:\nsudo iptables -A FORWARD -j ACCEPT Configure on each host routing to access the other clusters metallb IP range via the other VMs IP address (need to replace IP addresses and network interfaces with actual ones from the VMs):\n# Host A sudo ip route add 192.168.50.0/24 via 192.168.2.12 dev eth1 # Host B sudo ip route add 192.168.49.0/24 via 192.168.2.11 dev eth1 To check if load balancer works, here\u0026rsquo;s an example HTTP service:\napiVersion: apps/v1 kind: Deployment metadata: name: hello-blue-whale spec: replicas: 1 selector: matchLabels: app: hello-blue-whale-app template: metadata: name: hello-blue-whale-pod labels: app: hello-blue-whale-app spec: containers: - name: hello-blue-whale-container image: vamsijakkula/hello-blue-whale:v1 ports: - containerPort: 80 --- apiVersion: v1 kind: Service metadata: name: hello-blue-whale-svc labels: app: hello-blue-whale-app spec: selector: app: hello-blue-whale-app type: LoadBalancer ports: - port: 80 targetPort: 80 Then check what external ip got assigned to the service (should be the first IP from the range given above).\nkubectl get svc/hello-blue-whale-svc And then from the other host use curl to see if the service can be accessed.\ncurl -v http://192.168.49.100/ Other hosts on the same network can have the same routes added to access services in the clusters. If access from other networks is needed, then the chosen subnets need to be routed to these VMs across your network.\n","description":"Multisite is a function specially developed for Patroni that makes it possible to combine two separate Patroni clusters into a common cluster unit. ‘Separate’ in this context means that the clusters run independently of each other and can even be located on different Kubernetes clusters. With Multisite, both clusters benefit from the well-known Patroni features such as automatic failover and demotion of members, resulting in a significant extension compared to a conventional standby cluster. This feature significantly improves high availability and redundancy by managing multiple geographically or infrastructurally separated clusters as one logical unit. This allows one cluster to seamlessly transition to another in the event of a failure without having to rely on manual switchovers or third-party replication solutions.\n"},{"id":47,"href":"/CYBERTEC-pg-operator/tde/","title":"TDE","parent":"CPO (CYBERTEC-PG-Operator)","content":" What is Transparent Data Encryption (TDE)? Transparent Data Encryption (TDE) is a technology for encrypting databases at file level. The data is automatically encrypted before it is stored on the storage medium and decrypted transparently for authorised applications and users if required. This ensures that the data is protected at rest without the need for changes to existing applications. TDE is used by various database vendors such as Microsoft, Oracle and IBM to increase the security of database files.\nDifference between hard disk encryption and TDE Hard disk encryption, also known as Full Disk Encryption (FDE), encrypts the entire hard disk or individual partitions to prevent unauthorised access to sensitive data. This method protects all data on a system, including the operating system, but only when the system is switched off. As soon as an authorised user logs on, the encryption is removed and the data is accessible to anyone who can access the computer while the user is logged on.\nIn contrast, TDE specifically encrypts the database files at file level. Encryption is transparent to the applications accessing the database and protects the data at rest, regardless of the status of the operating system or hardware. This provides an additional protection mechanism, especially in scenarios where hard disk encryption is not sufficient or not implemented.\nAdvantages of TDE Protection of data at rest: Data on the storage medium is encrypted, reducing the risk of data leaks. Transparency for applications: Encryption is done directly at database level, so no changes to existing applications are required. Integration with PGEE: Full support in Kubernetes environments and other modern IT infrastructures. Fulfilment of regulatory requirements: Support for compliance requirements such as GDPR, HIPAA and other data protection standards. Additional security features: In combination with other PGEE features such as data masking and obfuscation, comprehensive protection of sensitive data is ensured. Further information on TDE and PGEE can be found here: CYBERTEC TDE.\nSecuring clusters with TDE The CYBERTEC pg operator, together with Patroni, takes over the setup and administration of the TDE functionality in conjunction with the cost-effective PGEE containers\nPreconditions CYBERTEC-pgee-container Valid licence agreement for PGEE Deploy a TDE-Cluster Setting up a TDE cluster is basically the same as setting up a conventional cluster. The only difference is the defined Postgres. container and the object TDE.enabled: true, which instructs the operator to initialise the database with the TDE functionality.\napiVersion: cpo.opensource.cybertec.at/v1 kind: postgresql metadata: name: tde-cluster-1 namespace: cpo spec: dockerImage: \u0026#39;containers.cybertec.at/cybertec-pgee-container/postgres:rocky9-17.4-1\u0026#39; numberOfInstances: 1 postgresql: version: \u0026#39;17\u0026#39; resources: limits: cpu: 250m memory: 500Mi requests: cpu: 250m memory: 500Mi tde: enable: true teamId: acid volume: size: 5Gi dockerImage - Must contain a PostgreSQL image of the pgee container suite tde.enabled- initialises the DB with TDE Please note that the activation of TDE is only possible when creating new clusters. Subsequent activation is not possible. Check TDE-Status [postgres@tde-cluster-1-0 ~]$ psql psql (17.4 EE 1.4.1) ____ ____ _____ _____ | _ \\ / ___| ____| ____| | |_) | | _| _| | _| | __/| |_| | |___| |___ |_| \\____|_____|_____| PostgreSQL EE by CYBERTEC Type \u0026#34;help\u0026#34; for help. postgres=# show data_encryption; data_encryption ----------------- on (1 row) ","description":" What is Transparent Data Encryption (TDE)? Transparent Data Encryption (TDE) is a technology for encrypting databases at file level. The data is automatically encrypted before it is stored on the storage medium and decrypted transparently for authorised applications and users if required. This ensures that the data is protected at rest without the need for changes to existing applications. TDE is used by various database vendors such as Microsoft, Oracle and IBM to increase the security of database files.\n"},{"id":48,"href":"/CYBERTEC-pg-operator/tutorials/","title":"Tutorials","parent":"CPO (CYBERTEC-PG-Operator)","content":" Overview: CYBERTEC Operator Tutorials In this repository we provide various tutorials that demonstrate the use of the CYBERTEC operator. The tutorials contain cluster snippets that can be used directly with kubectl.\nUsing the tutorials The snippets provided can be deployed in two ways:\nWith kubectl apply -f: Use this method to apply a YAML file directly. With kubectl apply -k**: Use this method to execute kustomise-supported deployments. Repository The repository with all tutorials can be found here:\nCYBERTEC Operator Tutorials\nCluster tutorials The specific cluster tutorials are available under the following path\n🔗 Operator Helm-Chart\n🔗 Cluster Tutorials\nOverview 🔗 Single Cluster\n🔗 Cluster-configured users and databases 🔗 Cluster with prepared databases\n🔗 HA-Cluster\n🔗 Cluster with Backup via PVC 🔗 Cluster with Backup via S3 🔗 Cluster with Backup via GCS\n🔗 Restore Cluster\n🔗 Cluster with Pooler\n🔗 Cluster with Monitoring\n🔗 Cluster-Clone via PVC 🔗 Cluster-Clone via S3\n🔗 Standby Cluster\n🔗 Multisite-Cluster\n🔗 TDE-Cluster\nGood luck trying it out! 🚀\n","description":" Overview: CYBERTEC Operator Tutorials In this repository we provide various tutorials that demonstrate the use of the CYBERTEC operator. The tutorials contain cluster snippets that can be used directly with kubectl.\nUsing the tutorials The snippets provided can be deployed in two ways:\n"},{"id":49,"href":"/CYBERTEC-pg-operator/crd/","title":"References","parent":"CPO (CYBERTEC-PG-Operator)","content":"","description":""},{"id":50,"href":"/CYBERTEC-pg-operator/release_notes/","title":"Release-Notes","parent":"CPO (CYBERTEC-PG-Operator)","content":" 0.8.3 Fixes Majorupgrade updated for Patroni 4.x.x Fixes for PGEE Fix for Monitoring-User Dependency updates and several small changes Supported Versions PG: 13 - 17 Patroni: 4.0.5 pgBackRest: 2.54.2 Kubernetes: 1.21 - 1.32 Openshift: 4.8 - 4.18 0.8.2 Features Added Clone-Functionality with pgBackRest Supported Versions PG: 13 - 17 Patroni: 3.3.2 pgBackRest: 2.54.0 Kubernetes: 1.21 - 1.32 Openshift: 4.8 - 4.18 0.8.1 Features Added pgbackrest to Monitoring Fixes Fixed role creation for monitoring Supported Versions PG: 13 - 17 Patroni: 3.3.2 pgBackRest: 2.53 Kubernetes: 1.21 - 1.32 Openshift: 4.8 - 4.18 0.8.0 Features Multisite - Support use icu as default for pg \u0026gt; 14 Fixes Fixed role creation for monitoring. Fix for the use of gcs with pgBackRest Supported Versions PG: 13 - 16 \u0026amp; 17Beta2 Patroni: 3.3.2 pgBackRest: 2.53 Kubernetes: 1.21 - 1.32 Openshift: 4.8 - 4.18 0.7.1 Fixes Fixed role creation for monitoring. Fix for the use of gcs with pgBackRest Supported Versions PG: 13 - 16 \u0026amp; 17Beta2 Patroni: 3.3.2 pgBackRest: 2.53 Kubernetes: 1.21 - 1.28 Openshift: 4.8 - 4.13 0.7.0 Features Monitoring-Sidecar integrated via CRD Start with Monitoring Password-Hash per default set to scram-sha-256 pgBackRest with blockstorage using RepoHost Internal Certification-Management for RepoHost-Certificates Compatible with PG17Beta2 Changes API Change acid.zalan.do is replaced by cpo.opensource.cybertec.at - If you\u0026rsquo;re updating your Operator from previous Versions, please check this HowTo Migrate to new API Patroni-Compatibility has increased to Version 3.3.2 pgBackRest-Compatbility has increased to Version 2.52.1 Revision of the restore process Revision of the backup jobs Operator now using Rocky9 as Baseimage Updates Go-Package to 1.22.5 Fixes PDB Bug fixed - Single-Node Clusters are not creating PDBs anymore which can break Kubernetes-Update Wrong Templates inside Cronjobs fixed Supported Versions PG: 13 - 16 \u0026amp; 17Beta2 Patroni: 3.3.2 pgBackRest: 2.52.1 Kubernetes: 1.21 - 1.28 Openshift: 4.8 - 4.13 0.6.1 Release with fixes\nFixes Backup-Pod now runs with \u0026ldquo;best-effort\u0026rdquo; resource definition Der Init-Container für die Wiederherstellung verwendet nun die gleiche Ressource-Definition wie der Datenbank-Container, wenn es keine spezifische Definition im Cluster-Manifest gibt (spec.backup.pgbackrest.resources) Software-Versions PostgreSQL: 15.3 14.8, 13.11, 12.15 Patroni: 3.0.4 pgBackRest: 2.47 OS: Rocky-Linux 9.1 (4.18) 0.6.0 Release with some improvements and stabilisation measuresm\nFeatures Added Pod Topology Spread Constraints Added support for TDE based on the CYBERTEC PostgreSQL Enterprise Images (Licensed Container Suite) Software-Versions PostgreSQL: 15.3 14.8, 13.11, 12.15 Patroni: 3.0.4 pgBackRest: 2.47 OS: Rocky-Linux 9.1 (4.18) 0.5.0 Release with new Software-Updates and some internal Improvements\nFeatures Updated to Zalando Operator 1.9 Fixes internal Problems with Cronjobs updates for some API-Definitions Software-Versions PostgreSQL: 15.2 14.7, 13.10, 12.14 Patroni: 3.0.2 pgBackRest: 2.45 OS: Rocky-Linux 9.1 (4.18) 0.3.0 Release with some improvements and stabilisation measuresm\nFixes missing pgbackrest_restore configmap fixed Software-Versions PostgreSQL: 15.1 14.7, 13.9, 12.13, 11.18 and 10.23 Patroni: 3.0.1 pgBackRest: 2.44 OS: Rocky-Linux 9.1 (4.18) 0.1.0 Initial Release as a Fork of the Zalando-Operator\nFeatures Added Support for pgBackRest (PoC-State) Stanza-create and Initial-Backup are executed automatically Schedule automatic updates (Full/Incremental/Differential-Backup) Securely store backups on AWS S3 and S3-compatible storage Software-Versions PostgreSQL: 14.6, 13.9, 12.13, 11.18 and 10.23 Patroni: 2.4.1 pgBackRest: 2.42 OS: Rocky-Linux 9.0 (4.18) ","description":" 0.8.3 Fixes Majorupgrade updated for Patroni 4.x.x Fixes for PGEE Fix for Monitoring-User Dependency updates and several small changes Supported Versions PG: 13 - 17 Patroni: 4.0.5 pgBackRest: 2.54.2 Kubernetes: 1.21 - 1.32 Openshift: 4.8 - 4.18 0.8.2 Features Added Clone-Functionality with pgBackRest Supported Versions PG: 13 - 17 Patroni: 3.3.2 pgBackRest: 2.54.0 Kubernetes: 1.21 - 1.32 Openshift: 4.8 - 4.18 0.8.1 Features Added pgbackrest to Monitoring Fixes Fixed role creation for monitoring Supported Versions PG: 13 - 17 Patroni: 3.3.2 pgBackRest: 2.53 Kubernetes: 1.21 - 1.32 Openshift: 4.8 - 4.18 0.8.0 Features Multisite - Support use icu as default for pg \u0026gt; 14 Fixes Fixed role creation for monitoring. Fix for the use of gcs with pgBackRest Supported Versions PG: 13 - 16 \u0026amp; 17Beta2 Patroni: 3.3.2 pgBackRest: 2.53 Kubernetes: 1.21 - 1.32 Openshift: 4.8 - 4.18 0.7.1 Fixes Fixed role creation for monitoring. Fix for the use of gcs with pgBackRest Supported Versions PG: 13 - 16 \u0026amp; 17Beta2 Patroni: 3.3.2 pgBackRest: 2.53 Kubernetes: 1.21 - 1.28 Openshift: 4.8 - 4.13 0.7.0 Features Monitoring-Sidecar integrated via CRD Start with Monitoring Password-Hash per default set to scram-sha-256 pgBackRest with blockstorage using RepoHost Internal Certification-Management for RepoHost-Certificates Compatible with PG17Beta2 Changes API Change acid.zalan.do is replaced by cpo.opensource.cybertec.at - If you\u0026rsquo;re updating your Operator from previous Versions, please check this HowTo Migrate to new API Patroni-Compatibility has increased to Version 3.3.2 pgBackRest-Compatbility has increased to Version 2.52.1 Revision of the restore process Revision of the backup jobs Operator now using Rocky9 as Baseimage Updates Go-Package to 1.22.5 Fixes PDB Bug fixed - Single-Node Clusters are not creating PDBs anymore which can break Kubernetes-Update Wrong Templates inside Cronjobs fixed Supported Versions PG: 13 - 16 \u0026amp; 17Beta2 Patroni: 3.3.2 pgBackRest: 2.52.1 Kubernetes: 1.21 - 1.28 Openshift: 4.8 - 4.13 0.6.1 Release with fixes\n"},{"id":51,"href":"/CYBERTEC-pg-operator/categories/","title":"Categories","parent":"CPO (CYBERTEC-PG-Operator)","content":"","description":""},{"id":52,"href":"/CYBERTEC-pg-operator/tags/","title":"Tags","parent":"CPO (CYBERTEC-PG-Operator)","content":"","description":""}] \ No newline at end of file diff --git a/docs/hugo/public/sitemap.xml b/docs/hugo/public/sitemap.xml new file mode 100644 index 000000000..4d97d3e48 --- /dev/null +++ b/docs/hugo/public/sitemap.xml @@ -0,0 +1,162 @@ + + + + http://localhost:1313/CYBERTEC-pg-operator/ + 2024-03-11T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/backup/introduction/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/sidecars/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/backup/pvc/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/backup/aws/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/architecture/compontens/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/additional-volumes/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/backup/gcs/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/architecture/rolling_update/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/backup/azure_blob/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/backup/encryption/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/backup/check_backups/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/project/ + 2024-03-11T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/project/project/ + 2024-03-11T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/project/container_images/ + 2024-03-11T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/architecture/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/crd/crd-postgresql/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/crd/crd-operator-configurator/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/quickstart/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/installation/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/installation/dev-k8s/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/installation/install_operator/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/installation/configuration_operator/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/first_cluster/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/resources/ + 2024-04-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/storage/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/db_users/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/customize_cluster/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/ha_cluster/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/config_cluster/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/backup/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/restore/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/tls/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/connection_pooler/ + 2024-05-31T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg13/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg14/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg15/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg16/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/extensions/pg17/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/extensions/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/monitoring/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/clone-cluster/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/standby-cluster/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/minor_updates/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/pg_versioning/major_upgrades/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/multisite/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/tde/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/tutorials/ + 2023-12-28T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/crd/ + 2023-03-07T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/release_notes/ + 2024-03-11T14:26:51+01:00 + + http://localhost:1313/CYBERTEC-pg-operator/categories/ + + http://localhost:1313/CYBERTEC-pg-operator/tags/ + + diff --git a/docs/hugo/public/standby-cluster/index.html b/docs/hugo/public/standby-cluster/index.html new file mode 100644 index 000000000..7b2b741f1 --- /dev/null +++ b/docs/hugo/public/standby-cluster/index.html @@ -0,0 +1,5167 @@ + + + + + + + + + + + + + Standby Cluster | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Standby Cluster

    +
    + +
    +

    A standby cluster is an independent PostgreSQL cluster that consists of a standby leader and optionally further replicas (if numberOfInstances > 1). The standby leader runs in read-only mode and does not accept any write operations. A standby cluster can be promoted to a primary cluster if required, whereby the standby leader becomes a fully-fledged leader and allows write operations.

    +
    +

    + Preconditions: +

    + + + +
    +

    The primary cluster must either:

    +
      +
    • be accessible from the standby cluster via streaming replication
    • +
    • the backup storage used by the standby cluster (S3, GCS or Azure Blob) must be accessible for the standby cluster
    • +
    +

    The passwords for the Postgres user, the replication user and the exporter user (if monitoring is active) must be created as a secret for the standby cluster. Otherwise connection problems will occur

    +
    +

    + Create standby cluster +

    + + + +
    +

    The standby object in the cluster manifest is required to create a standby cluster.

    +
    apiVersion: cpo.opensource.cybertec.at/v1
    +kind: postgresql
    +metadata:
    +  name: standby-cluster-1
    +spec:
    +  standby:
    +    standby_host: "cluster-1.cpo"
    +    standby_port: "5432"
    +  dockerImage: 'docker.io/cybertecpostgresql/cybertec-pg-container:postgres-17.4-1'
    +  numberOfInstances: 1
    +  postgresql:
    +    version: '17'
    +  resources:
    +    limits:
    +      cpu: 500m
    +      memory: 500Mi
    +    requests:
    +      cpu: 500m
    +      memory: 500Mi
    +  teamId: acid
    +  volume:
    +    size: 5Gi
    +

    The primary cluster must be accessible from the standby cluster. It can be located in the same Kubernetes cluster or in a different one.

    +
      +
    • standby_host: Corresponds to the endpoint via which the primary pod can be reached. It can be a kubernetes-internal DNS name or an IP or DNS name that can be reached in the network.
    • +
    • standby_port: Corresponds to the PostgreSQL port used (default 5432)
    • +
    +
    +

    + Promoting cluster +

    + + + +
    +

    To promote a cluster, it is only necessary to remove the standby object. +The cluster is then promoted to a primary cluster.

    +
    kubectl patch postgresqls.cpo.opensource.cybertec.at cluster-1 --type='merge' -p \
    +'{"spec":{"standby":null}}'
    +
    +

    + Limitations +

    + + + +
    +

    A primary cluster cannot be demoted to a standby cluster. +If necessary, the recommendation is to create a new cluster as a standby cluster.

    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/standby-cluster/index.xml b/docs/hugo/public/standby-cluster/index.xml new file mode 100644 index 000000000..b381e1d06 --- /dev/null +++ b/docs/hugo/public/standby-cluster/index.xml @@ -0,0 +1,12 @@ + + + + Standby Cluster on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/standby-cluster/ + Recent content in Standby Cluster on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/storage/index.html b/docs/hugo/public/storage/index.html new file mode 100644 index 000000000..c076e1190 --- /dev/null +++ b/docs/hugo/public/storage/index.html @@ -0,0 +1,5213 @@ + + + + + + + + + + + + + Storage | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Storage

    +
    + +
    +

    Storage is crucial for the performance of a database and is therefore a central element. As with systems based on bare metal or virtual machines, the same requirements apply to Kubernetes workloads, such as constant availability, good performance, consistency and durability.

    +

    A basic distinction is made between local storage, which is directly connected to the worker node, and network storage, which is mounted on the worker node and thus made available to the pod.

    +

    In probably the vast majority of Kubernetes systems, network storage is used, for example from systems from hyperscalers or other cloud providers or own systems such as CEPH.

    +

    With network storage in particular, attention must be paid to performance in terms of throughput (speed and guaranteed IOPS) and, above all, latency. It is also important to ensure that the different volumes do not compete with each other in terms of load.

    +
    +

    PAY ATTENTION: Before using a CPO cluster, make sure that the storage is suitable for the intended use and provides the necessary performance. In addition, check the storage with benchmarks before use. We recommend the use of pgbench for this purpose.

    +
    +

    + Define Storage-Volume +

    + + + +
    +

    The storage is defined via the volume object and enables the size and storage class for the storage to be defined, among other things.

    +
    spec:
    +  volume:
    +    size: 5Gi
    +    storageClass: default-provisioner
    +  ...
    +

    The volume is currently used for both PG and WAL data. In future, there will be an optional option to create a separate WAL volume. +Please check our roadmap

    + + + + + +
    +
    +
    Please ensure, that the storageClass exists and is usable. If a Volume cannot provide the Volume will stand in the pending-State as like the Database-Pod.
    +
    + +

    The volume is currently used for both PG and WAL data. In future, there will be an optional option to create a separate WAL volume.

    +
    +

    + Expanding Volume +

    + + + +
    + + + + + +
    +
    +
    Kubernetes is able to forward requests to expand the storage to the storage system and enable the expand without the need to restart the container. However, this also requires the associated storage system and the driver used to support this. This information can be found in the storage class under the object: allowVolumeExpansion. A distinction must also be made between online and offline expand. The latter requires a restart of the pod. To do this, the pod must be deleted manually.
    +
    + +

    To Expand the Volume, the value of the object volume.size must be increased

    +
    spec:
    +  volume:
    +    size: 10Gi
    +    storageClass: default-provisioner
    +  ...
    +

    This will trigger the expand of your Cluster-Volumes. It will need some time and you can check the current state inside the pvc.

    +
    kubectl get pvc pgdata-cluster-1-0 -o yaml
    +-------------------------------------------------------
    +spec:
    +  accessModes:
    +  - ReadWriteOnce
    +  resources:
    +    requests:
    +      storage: 10Gi
    +  storageClassName: crc-csi-hostpath-provisioner
    +  volumeMode: Filesystem
    +  volumeName: pvc-800d7ecc-2d5f-4ef4-af83-1cd94c766d37
    +status:
    +  accessModes:
    +  - ReadWriteOnce
    +  capacity:
    +    storage: 5Gi
    +  phase: Bound
    +
    +

    + Creating additonal Volumes +

    + + + +
    +

    The Operator allows you to modify your cluster with additonal Volumes.

    +
    spec:
    +  ...
    +  additionalVolumes:
    +    - name: empty
    +      mountPath: /opt/empty
    +      targetContainers:
    +        - all
    +      volumeSource:
    +        emptyDir: {}
    +

    This example will create an emptyDir and mount it to all Containers inside the Database-Pod.

    +
    +

    + Specific Settings for aws gp3 Storage +

    + + + +
    +

    For the gp3 Storage aws you can define more informations

    +
      volume:
    +    size: 1Gi
    +    storageClass: gp3
    +    iops: 1000  # for EBS gp3
    +    throughput: 250  # in MB/s for EBS gp3
    +

    The defined IOPS and Throughput will include in the PersistentVolumeClaim and send to the storage-Provisioner. +Please keep in Mind, that on aws there is a CoolDown-Time as a limitation defined. For new Changes you need to wait 6 hours. +Please also ensure to check the default and allowed values for IOPS and Throughput AWS docs.

    +

    To ensure that the settings are updates properly please define the Operator-Configuration ‘storage_resize_mode’ from default to ‘mixed’

    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/storage/index.xml b/docs/hugo/public/storage/index.xml new file mode 100644 index 000000000..bc4a5ace3 --- /dev/null +++ b/docs/hugo/public/storage/index.xml @@ -0,0 +1,12 @@ + + + + Storage on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/storage/ + Recent content in Storage on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/tags/index.html b/docs/hugo/public/tags/index.html new file mode 100644 index 000000000..ecc2e0e6c --- /dev/null +++ b/docs/hugo/public/tags/index.html @@ -0,0 +1,4972 @@ + + + + + + + + + + + + Tags | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/tags/index.xml b/docs/hugo/public/tags/index.xml new file mode 100644 index 000000000..dca889d3a --- /dev/null +++ b/docs/hugo/public/tags/index.xml @@ -0,0 +1,11 @@ + + + + Tags on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/tags/ + Recent content in Tags on CYBERTEC-PG-Operator + Hugo + en + + + diff --git a/docs/hugo/public/tags/page/1/index.html b/docs/hugo/public/tags/page/1/index.html new file mode 100644 index 000000000..18e442e9a --- /dev/null +++ b/docs/hugo/public/tags/page/1/index.html @@ -0,0 +1,10 @@ + + + + http://localhost:1313/CYBERTEC-pg-operator/tags/ + + + + + + diff --git a/docs/hugo/public/tde/index.html b/docs/hugo/public/tde/index.html new file mode 100644 index 000000000..56a7553d5 --- /dev/null +++ b/docs/hugo/public/tde/index.html @@ -0,0 +1,5220 @@ + + + + + + + + + + + + + TDE | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    TDE

    +
    + +
    +
    +

    + What is Transparent Data Encryption (TDE)? +

    + + + +
    +

    Transparent Data Encryption (TDE) is a technology for encrypting databases at file level. The data is automatically encrypted before it is stored on the storage medium and decrypted transparently for authorised applications and users if required. This ensures that the data is protected at rest without the need for changes to existing applications. TDE is used by various database vendors such as Microsoft, Oracle and IBM to increase the security of database files.

    +
    +

    + Difference between hard disk encryption and TDE +

    + + + +
    +

    Hard disk encryption, also known as Full Disk Encryption (FDE), encrypts the entire hard disk or individual partitions to prevent unauthorised access to sensitive data. This method protects all data on a system, including the operating system, but only when the system is switched off. As soon as an authorised user logs on, the encryption is removed and the data is accessible to anyone who can access the computer while the user is logged on.

    +

    In contrast, TDE specifically encrypts the database files at file level. Encryption is transparent to the applications accessing the database and protects the data at rest, regardless of the status of the operating system or hardware. This provides an additional protection mechanism, especially in scenarios where hard disk encryption is not sufficient or not implemented.

    +
    +

    + Advantages of TDE +

    + + + +
    +
      +
    • Protection of data at rest: Data on the storage medium is encrypted, reducing the risk of data leaks.
    • +
    • Transparency for applications: Encryption is done directly at database level, so no changes to existing applications are required.
    • +
    • Integration with PGEE: Full support in Kubernetes environments and other modern IT infrastructures.
    • +
    • Fulfilment of regulatory requirements: Support for compliance requirements such as GDPR, HIPAA and other data protection standards.
    • +
    • Additional security features: In combination with other PGEE features such as data masking and obfuscation, comprehensive protection of sensitive data is ensured.
    • +
    +

    Further information on TDE and PGEE can be found here: CYBERTEC TDE.

    +
    +

    + Securing clusters with TDE +

    + + + +
    +

    The CYBERTEC pg operator, together with Patroni, takes over the setup and administration of the TDE functionality in conjunction with the cost-effective PGEE containers

    +
    +

    + Preconditions +

    + + + +
    +
      +
    • CYBERTEC-pgee-container
    • +
    • Valid licence agreement for PGEE
    • +
    +
    +

    + Deploy a TDE-Cluster +

    + + + +
    +

    Setting up a TDE cluster is basically the same as setting up a conventional cluster. +The only difference is the defined Postgres. container and the object TDE.enabled: true, which instructs the operator to initialise the database with the TDE functionality.

    +
    apiVersion: cpo.opensource.cybertec.at/v1
    +kind: postgresql
    +metadata:
    +  name: tde-cluster-1
    +  namespace: cpo
    +spec:
    +  dockerImage: 'containers.cybertec.at/cybertec-pgee-container/postgres:rocky9-17.4-1'
    +  numberOfInstances: 1
    +  postgresql:
    +    version: '17'
    +  resources:
    +    limits:
    +      cpu: 250m
    +      memory: 500Mi
    +    requests:
    +      cpu: 250m
    +      memory: 500Mi
    +  tde:
    +    enable: true
    +  teamId: acid
    +  volume:
    +    size: 5Gi
    +
      +
    • dockerImage - Must contain a PostgreSQL image of the pgee container suite
    • +
    • tde.enabled- initialises the DB with TDE
    • +
    + + + + + +
    +
    +
    Please note that the activation of TDE is only possible when creating new clusters. Subsequent activation is not possible.
    +
    + +
    +

    + Check TDE-Status +

    + + + +
    +
    [postgres@tde-cluster-1-0 ~]$ psql
    +psql (17.4 EE 1.4.1)
    + ____   ____ _____ _____
    +|  _ \ / ___| ____| ____|
    +| |_) | |  _|  _| |  _|
    +|  __/| |_| | |___| |___
    +|_|    \____|_____|_____|
    +PostgreSQL EE by CYBERTEC
    +Type "help" for help.
    +
    +postgres=# show data_encryption;
    + data_encryption 
    +-----------------
    + on
    +(1 row)
    +
    +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/tde/index.xml b/docs/hugo/public/tde/index.xml new file mode 100644 index 000000000..ec0ceedf7 --- /dev/null +++ b/docs/hugo/public/tde/index.xml @@ -0,0 +1,12 @@ + + + + TDE on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/tde/ + Recent content in TDE on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/tls-copy/index.html b/docs/hugo/public/tls-copy/index.html new file mode 100644 index 000000000..3bce1589a --- /dev/null +++ b/docs/hugo/public/tls-copy/index.html @@ -0,0 +1,4834 @@ + + + + + + + + + + + + + TLS/SSL connections | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    TLS/SSL connections

    +
    + +
    +

    Each cluster created is automatically equipped with a self-generated TLS certificate and is preconfigured for the use of TLS/SSL. However, this certificate is not based on a Certificate Authority (CA) that is known to the clients. This means that although communication between the client and server is encrypted, the certificate cannot be verified by the client.

    +

    The following chapter deals with the creation of custom certificates and the steps required to integrate these certificates into the PostgreSQL cluster. In the example, a custom CA is created, on the basis of which the certificates are then generated and signed by this CA. This step can be skipped if certificates have already been obtained from another trusted organisation.

    +
    +

    + Create a custom CA and Certificates +

    + + + +
    + + + + + +
    +
    +
    Precondition: This chapter requires openssl
    +
    + +
    +

    + Create the CA +

    + + + +
    +

    The first step is to create a custom CA. An organisation name is required for this. You can also add further details about the country, district and location. +The CA serves as the central authority that signs the certificates and thus guarantees the correctness of the certificate. In order to successfully complete the verification of a certificate, the CA’s certificate must be stored on the client system.

    +
    ORGANIZATION=MyCustomOrganization
    +CA=$ORGANIZATION-RootCA
    +
    +mkdir $CA
    +cd $CA
    +
    +# Creating the CA-Key
    +openssl genpkey -algorithm EC -out $CA.key -pkeyopt ec_paramgen_curve:secp384r1 -pkeyopt ec_param_enc:named_curve -aes256
    +
    +# Creating the CA-Certificate
    +openssl req -x509 -new -nodes -key $CA.key -sha512 -days 1826 -out $CA.crt -subj "/CN=${ORGANIZATION} Root-CA/C=AT/ST=Lower Austria/L=Woellersdorf/O=${ORGANIZATION}"
    +
    +

    + Create a custom Certificate +

    + + + +
    +

    The server needs a certificate signed by a CA and a private key so that it can claim to be trustworthy.

    + + + + + +
    +
    +
    It is important that the CA certificate is stored as trustworthy with the client. Otherwise, no certificate check is possible.
    +
    + +
    CN=cluster-1
    +DNS2="${CN}-repl"
    +DNS3="${CN}-pooler"
    +DNS4="${CN}-pooler-repl"
    +
    +# Creating the private Key
    +openssl genpkey -algorithm EC -out $CN.key -pkeyopt ec_paramgen_curve:secp384r1 -pkeyopt ec_param_enc:named_curve
    +
    +# Creating Certificate Signing Request (CSR))
    +openssl req -new -key $CN.key -out $CN.csr \
    +  -subj "/C=AT/ST=Lower Austria/L=Woellersdorf/O=${ORGANIZATION}/OU=OrgUnit/CN=${CN}" \
    +  -addext "subjectAltName=DNS:${CN},DNS:${DNS2},DNS:${DNS3},DNS:${DNS4}"
    +
    +
    +# Sign CSR with the CA
    +openssl x509 -req -in $CN.csr -CA $CA.crt -CAkey $CA.key -CAcreateserial -out $CN.crt -days 365 \
    +  -extfile <(echo -e "[ v3_req ]\nsubjectAltName=DNS:${CN},DNS:${DNS2},DNS:${DNS3},DNS:${DNS4}") -extensions v3_req
    +
    +

    + Add Certicate to the Cluster +

    + + + +
    +

    For adding the Certificate to your cluster a secret on kubernetes is needed. +There are two different options here. +For the first option, a secret is created that contains all the necessary information. I.e.

    +
      +
    • Server certificate
    • +
    • Private server key
    • +
    • CA certificate +In the second variant, the CA certificate is separated and written in a separate secret. The advantage of this is that the CA only needs to be saved once and changed in the event of an update.
    • +
    +
    +
    + First Option: Using one secret for all three objects +
    + + + +
    +
    kubectl create secret generic cluster-1-tls \
    +  --from-file=tls.crt=$CN.crt \
    +  --from-file=tls.key=$CN.key \
    +  --from-file=ca.crt=$CA.crt
    +

    Finally, the definition is made in the cluster manifest so that the operator adapts the cluster.

    +
    apiVersion: "cpo.opensource.cybertec.at/v1"
    +kind: postgresql
    +...
    +metadata:
    +  name: cluster-1
    +spec:
    +  tls:
    +    secretName: "cluster-1-tls"
    +    caFile: "ca.crt"
    +
    +
    + Second Option: Using a separat Secret for the CA +
    + + + +
    +
    kubectl create secret generic cpo-root-ca --from-file=ca.crt=ca.crt
    +
    kubectl create secret generic cluster-1-tls \
    +  --from-file=tls.crt=$CN.crt \
    +  --from-file=tls.key=$CN.key \
    +

    Finally, the definition is made in the cluster manifest so that the operator adapts the cluster.

    +
    apiVersion: "cpo.opensource.cybertec.at/v1"
    +kind: postgresql
    +
    +metadata:
    +  name: cluster-1
    +spec:
    +  tls:
    +    secretName: "cluster-1-tls"
    +    caSecretName: "cpo-root-ca"
    +    caFile: "ca.crt"
    +

    A regular check of the mounted certificates takes place automatically within the container. This check takes place every 5 minutes. If the certificates have been updated, the certificates are loaded automatically.

    + + + + + +
    +
    +
    In addition to generating the certificates independently, cert-manager can also be used for this purpose.
    +
    + + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/tls-copy/index.xml b/docs/hugo/public/tls-copy/index.xml new file mode 100644 index 000000000..f6bacb7a4 --- /dev/null +++ b/docs/hugo/public/tls-copy/index.xml @@ -0,0 +1,12 @@ + + + + TLS/SSL connections on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/tls-copy/ + Recent content in TLS/SSL connections on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/tls/index.html b/docs/hugo/public/tls/index.html new file mode 100644 index 000000000..4b0d90aef --- /dev/null +++ b/docs/hugo/public/tls/index.html @@ -0,0 +1,5247 @@ + + + + + + + + + + + + + TLS/SSL connections | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    TLS/SSL connections

    +
    + +
    +

    Each cluster created is automatically equipped with a self-generated TLS certificate and is preconfigured for the use of TLS/SSL. However, this certificate is not based on a Certificate Authority (CA) that is known to the clients. This means that although communication between the client and server is encrypted, the certificate cannot be verified by the client.

    +

    The following chapter deals with the creation of custom certificates and the steps required to integrate these certificates into the PostgreSQL cluster. In the example, a custom CA is created, on the basis of which the certificates are then generated and signed by this CA. This step can be skipped if certificates have already been obtained from another trusted organisation.

    +
    +

    + Create a custom CA and Certificates +

    + + + +
    + + + + + +
    +
    +
    Precondition: This chapter requires openssl
    +
    + +
    +

    + Create the CA +

    + + + +
    +

    The first step is to create a custom CA. An organisation name is required for this. You can also add further details about the country, district and location. +The CA serves as the central authority that signs the certificates and thus guarantees the correctness of the certificate. In order to successfully complete the verification of a certificate, the CA’s certificate must be stored on the client system.

    +
    ORGANIZATION=MyCustomOrganization
    +CA=$ORGANIZATION-RootCA
    +
    +mkdir $CA
    +cd $CA
    +
    +# Creating the CA-Key
    +openssl genpkey -algorithm EC -out $CA.key -pkeyopt ec_paramgen_curve:secp384r1 -pkeyopt ec_param_enc:named_curve -aes256
    +
    +# Creating the CA-Certificate
    +openssl req -x509 -new -nodes -key $CA.key -sha512 -days 1826 -out $CA.crt -subj "/CN=${ORGANIZATION} Root-CA/C=AT/ST=Lower Austria/L=Woellersdorf/O=${ORGANIZATION}"
    +
    +

    + Create a custom Certificate +

    + + + +
    +

    The server needs a certificate signed by a CA and a private key so that it can claim to be trustworthy.

    + + + + + +
    +
    +
    It is important that the CA certificate is stored as trustworthy with the client. Otherwise, no certificate check is possible.
    +
    + +
    CN=cluster-1
    +DNS2="${CN}-repl"
    +DNS3="${CN}-pooler"
    +DNS4="${CN}-pooler-repl"
    +
    +# Creating the private Key
    +openssl genpkey -algorithm EC -out $CN.key -pkeyopt ec_paramgen_curve:secp384r1 -pkeyopt ec_param_enc:named_curve
    +
    +# Creating Certificate Signing Request (CSR))
    +openssl req -new -key $CN.key -out $CN.csr \
    +  -subj "/C=AT/ST=Lower Austria/L=Woellersdorf/O=${ORGANIZATION}/OU=OrgUnit/CN=${CN}" \
    +  -addext "subjectAltName=DNS:${CN},DNS:${DNS2},DNS:${DNS3},DNS:${DNS4}"
    +
    +
    +# Sign CSR with the CA
    +openssl x509 -req -in $CN.csr -CA $CA.crt -CAkey $CA.key -CAcreateserial -out $CN.crt -days 365 \
    +  -extfile <(echo -e "[ v3_req ]\nsubjectAltName=DNS:${CN},DNS:${DNS2},DNS:${DNS3},DNS:${DNS4}") -extensions v3_req
    +
    +

    + Add Certicate to the Cluster +

    + + + +
    +

    For adding the Certificate to your cluster a secret on kubernetes is needed. +There are two different options here. +For the first option, a secret is created that contains all the necessary information. I.e.

    +
      +
    • Server certificate
    • +
    • Private server key
    • +
    • CA certificate +In the second variant, the CA certificate is separated and written in a separate secret. The advantage of this is that the CA only needs to be saved once and changed in the event of an update.
    • +
    +
    +
    + First Option: Using one secret for all three objects +
    + + + +
    +
    kubectl create secret generic cluster-1-tls \
    +  --from-file=tls.crt=$CN.crt \
    +  --from-file=tls.key=$CN.key \
    +  --from-file=ca.crt=$CA.crt
    +

    Finally, the definition is made in the cluster manifest so that the operator adapts the cluster.

    +
    apiVersion: "cpo.opensource.cybertec.at/v1"
    +kind: postgresql
    +...
    +metadata:
    +  name: cluster-1
    +spec:
    +  tls:
    +    secretName: "cluster-1-tls"
    +    caFile: "ca.crt"
    +
    +
    + Second Option: Using a separat Secret for the CA +
    + + + +
    +
    kubectl create secret generic cpo-root-ca --from-file=ca.crt=ca.crt
    +
    kubectl create secret generic cluster-1-tls \
    +  --from-file=tls.crt=$CN.crt \
    +  --from-file=tls.key=$CN.key \
    +

    Finally, the definition is made in the cluster manifest so that the operator adapts the cluster.

    +
    apiVersion: "cpo.opensource.cybertec.at/v1"
    +kind: postgresql
    +
    +metadata:
    +  name: cluster-1
    +spec:
    +  tls:
    +    secretName: "cluster-1-tls"
    +    caSecretName: "cpo-root-ca"
    +    caFile: "ca.crt"
    +

    A regular check of the mounted certificates takes place automatically within the container. This check takes place every 5 minutes. If the certificates have been updated, the certificates are loaded automatically.

    + + + + + +
    +
    +
    In addition to generating the certificates independently, cert-manager can also be used for this purpose.
    +
    + + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/tls/index.xml b/docs/hugo/public/tls/index.xml new file mode 100644 index 000000000..0078d8f19 --- /dev/null +++ b/docs/hugo/public/tls/index.xml @@ -0,0 +1,12 @@ + + + + TLS/SSL connections on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/tls/ + Recent content in TLS/SSL connections on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/tutorials/index.html b/docs/hugo/public/tutorials/index.html new file mode 100644 index 000000000..009542778 --- /dev/null +++ b/docs/hugo/public/tutorials/index.html @@ -0,0 +1,5216 @@ + + + + + + + + + + + + + Tutorials | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Tutorials

    +
    + +
    +
    +

    + Overview: CYBERTEC Operator Tutorials +

    + + + +
    +

    In this repository we provide various tutorials that demonstrate the use of the CYBERTEC operator. The tutorials contain cluster snippets that can be used directly with kubectl.

    +
    +

    + Using the tutorials +

    + + + +
    +

    The snippets provided can be deployed in two ways:

    +
      +
    • With kubectl apply -f: Use this method to apply a YAML file directly.
    • +
    • With kubectl apply -k**: Use this method to execute kustomise-supported deployments.
    • +
    +
    +

    + Repository +

    + + + +
    +

    The repository with all tutorials can be found here:

    +

    CYBERTEC Operator Tutorials

    +
    +

    + Cluster tutorials +

    + + + +
    +

    The specific cluster tutorials are available under the following path

    +

    🔗 Operator Helm-Chart

    +

    🔗 Cluster Tutorials

    +
    +

    + Overview +

    + + + +
    +

    🔗 Single Cluster

    +

    🔗 Cluster-configured users and databases +🔗 Cluster with prepared databases

    +

    🔗 HA-Cluster

    +

    🔗 Cluster with Backup via PVC +🔗 Cluster with Backup via S3 +🔗 Cluster with Backup via GCS

    +

    🔗 Restore Cluster

    +

    🔗 Cluster with Pooler

    +

    🔗 Cluster with Monitoring

    +

    🔗 Cluster-Clone via PVC +🔗 Cluster-Clone via S3

    +

    🔗 Standby Cluster

    +

    🔗 Multisite-Cluster

    +

    🔗 TDE-Cluster

    +

    Good luck trying it out! 🚀

    + +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/tutorials/index.xml b/docs/hugo/public/tutorials/index.xml new file mode 100644 index 000000000..aa2dd65a4 --- /dev/null +++ b/docs/hugo/public/tutorials/index.xml @@ -0,0 +1,12 @@ + + + + Tutorials on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/tutorials/ + Recent content in Tutorials on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/public/versionm-/index.html b/docs/hugo/public/versionm-/index.html new file mode 100644 index 000000000..2d0dd524a --- /dev/null +++ b/docs/hugo/public/versionm-/index.html @@ -0,0 +1,5179 @@ + + + + + + + + + + + + + Major version Upgrade | CYBERTEC-PG-Operator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + + + + +
    + + + + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + Toggle Dark/Light/Auto mode + + + + + + + + Back to homepage + + + + + + + + + + Support + + + + + + + +
    +
    +
    + + + +
    + + + + + +
    + + + + + + + + + + + +
    + +
    + + +
    + + +
    + + +
    +

    Major version Upgrade

    +
    + +
    +

    CPO enables the use of the in-place upgrade, which makes it possible to upgrade a cluster to a new PG major. For this purpose, pg_upgrade is used in the background.

    +
    +

    PAY ATTENTION: Note that an in-place upgrade generates both a pod restore in the form of a rolling update and an operational interruption of the cluster during the actual execution of the restore.

    +
    +

    + How does the upgrade work? +

    + + + +
    +
    +

    + Preconditions: +

    + + + +
    +
      +
    1. Pod restart - Use the rolling update strategy to replace all pods based on the new ENV PGVERSION with the version you want to update to.
    2. +
    3. Check - Check that the new PGVERSION is larger than the previously used one.
    4. +
    5. Check whether the new PGVERSION is larger than the previously used one and the maintenance mode of the cluster must be deactivated. In addition, the replicas should not have a high lag.
    6. +
    +
    +

    + Preliminary checks +

    + + + +
    +
      +
    1. use initdb to prepare a new data_dir (data_new) based on the new PGVERSION.
    2. +
    3. check the upgrade possibility with pg_upgrade --check
    4. +
    +
    +

    HINT: If one of the steps is aborted, a cleanup is performed

    +
    +

    + Prepare the Upgrade +

    + + + +
    +
      +
    1. remove dependencies that can cause problems. For example, the extensions pg_stat_statements and pgaudit.
    2. +
    3. activate the maintenance mode of the cluster
    4. +
    5. terminate PostgreSQL in an orderly manner
    6. +
    7. check pg_controldata for the checkpoint position and wait until all replicas apply the latest checkpoint location
    8. +
    9. use port 5432 for rsyncd and start it
    10. +
    +
    +

    + Start the Upgrade +

    + + + +
    +
      +
    1. Call pg_upgrade -k to start the Upgrade
    2. +
    +
    +

    ATTENTION if the process failed, we need to rollback, if it was sucessful we’re reaching the point of no return

    +
      +
    1. Rename the directories. data -> data_old and data_new -> data
    2. +
    3. Update the Patroni.config (postgres.yml)
    4. +
    5. Call Checkpoint on every replica and trigger rsync on the Replicas
    6. +
    7. Wait for Replicas to complete rsxnc. Timeout: 300
    8. +
    9. Stop rsyncd on Primary and remove ininitialize key from DCS, because its based on the old sysid
    10. +
    11. Start Patroni on the Primary and start the postgres locally
    12. +
    13. Reset custom staticstics, warmup the Memory and start Analyze in stages in separate threads
    14. +
    15. Wait for every Replica to become ready
    16. +
    17. Disable the maintenance mode for the Cluster
    18. +
    19. Restore custom statistics, analyze these tables and restore dropped objetcs from Prepare the upgrade
    20. +
    +
    +

    + Completion of the upgrade +

    + + + +
    +
      +
    1. Drop directory data_old
    2. +
    3. Trigger new Backup
    4. +
    +
    +

    + How a rollback is working? +

    + + + +
    +
      +
    1. Stop rsynd if its running
    2. +
    3. Disable the maintenance mode for the Cluster
    4. +
    5. Drop directory data_new
    6. +
    +
    +

    + How to trigger a In-Place-Upgrade with cpo? +

    + + + +
    +
    spec:
    +  postgresql:
    +    version: "17"
    +

    To trigger an In-Place-Upgrade you have just to increase the parameter spec.postgresql.version. If you choose a valid number the Operator will start with the prozedure, described above. +If you choosse a not allowed value, you will give an error and if you decrease the value, the operator will just ignore it with the following log-Entry.

    +
    Operator-Log
    +
    +
    + + + + + + + +
    +
    + + + +
    + + + + + + diff --git a/docs/hugo/public/versionm-/index.xml b/docs/hugo/public/versionm-/index.xml new file mode 100644 index 000000000..b62952188 --- /dev/null +++ b/docs/hugo/public/versionm-/index.xml @@ -0,0 +1,12 @@ + + + + Major version Upgrade on CYBERTEC-PG-Operator + http://localhost:1313/CYBERTEC-pg-operator/versionm-/ + Recent content in Major version Upgrade on CYBERTEC-PG-Operator + Hugo + en + + + + diff --git a/docs/hugo/static/images/k8s-entities.png b/docs/hugo/static/images/k8s-entities.png new file mode 100644 index 000000000..7f33924b4 Binary files /dev/null and b/docs/hugo/static/images/k8s-entities.png differ diff --git a/docs/hugo/static/images/multisite-interaction.png b/docs/hugo/static/images/multisite-interaction.png new file mode 100644 index 000000000..10b4c6f1e Binary files /dev/null and b/docs/hugo/static/images/multisite-interaction.png differ