diff --git a/README.md b/README.md index 17f20e31..cbd7f8a5 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,12 @@ Spring Cloud 2023.0.2 Spring Cloud Alibaba 2023.0.1.0 Spring Cloud Tencent 1.14.0--2023.0.0-SNAPSHOT - Nacos 2.3.2 + Nacos 2.3.3

- Version 3.3.1.1 - Dante Engine 3.3.1.1 - Dante OSS 3.3.1.1 + Version 3.3.1.2 + Dante Engine 3.3.1.2 + Dante OSS 3.3.1.2 Java 17 License AGPL 3.0 Total Visits @@ -162,7 +162,7 @@ | Spring Cloud Tencent | 1.14.0-2023.0.0 | | Spring Authorization Server | 1.3.1 | | Spring Boot Admin | 3.2.2 | -| Nacos | 2.3.2 | +| Nacos | 2.3.3 | | Sentinel | 1.8.7 | | Seata | 1.7.0 | diff --git a/package.json b/package.json index d380172d..9bb13b6d 100644 --- a/package.json +++ b/package.json @@ -31,25 +31,25 @@ "lodash-es": "^4.17.21", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", - "qs": "^6.12.1", + "qs": "^6.12.2", "quasar": "^2.16.4", - "vue": "^3.4.30", + "vue": "^3.4.31", "vue-i18n": "^9.13.1" }, "devDependencies": { - "@changesets/cli": "^2.27.6", + "@changesets/cli": "^2.27.7", "@quasar/vite-plugin": "^1.7.0", "@types/lodash-es": "^4.17.12", - "@types/node": "^20.14.8", + "@types/node": "^20.14.9", "@types/qs": "^6.9.15", - "@typescript-eslint/eslint-plugin": "^7.13.1", - "@typescript-eslint/parser": "^7.13.1", + "@typescript-eslint/eslint-plugin": "^7.15.0", + "@typescript-eslint/parser": "^7.15.0", "@vitejs/plugin-vue": "^5.0.5", "commitizen": "^4.3.0", "cross-env": "^7.0.3", "cz-conventional-changelog": "^3.3.0", "dotenv": "^16.4.5", - "eslint": "^9.5.0", + "eslint": "^9.6.0", "eslint-config-prettier": "^9.1.0", "eslint-define-config": "^2.1.0", "eslint-plugin-prettier": "^5.1.3", @@ -57,7 +57,7 @@ "eslint-plugin-vue": "^9.26.0", "husky": "^9.0.11", "lint-staged": "^15.2.7", - "postcss": "^8.4.38", + "postcss": "^8.4.39", "postcss-html": "^1.7.0", "prettier": "^3.3.2", "rollup": "4.18.0", @@ -69,14 +69,14 @@ "stylelint-config-recommended-vue": "^1.5.0", "stylelint-config-standard-scss": "^13.1.0", "terser": "^5.31.1", - "typescript": "^5.5.2", + "typescript": "^5.5.3", "unplugin-auto-import": "^0.17.6", "unplugin-icons": "^0.19.0", - "unplugin-vue-components": "^0.27.0", - "vite": "^5.3.1", + "unplugin-vue-components": "^0.27.2", + "vite": "^5.3.2", "vite-plugin-compression": "^0.5.1", "vite-plugin-dts": "3.9.1", "vite-plugin-html": "^3.2.2", - "vue-tsc": "^2.0.22" + "vue-tsc": "^2.0.24" } } diff --git a/packages/ui/package.json b/packages/ui/package.json index 5872bdf9..597ab078 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@dante/ui", - "version": "3.3.1.1", + "version": "3.3.1.2", "description": "", "keywords": [], "author": "", @@ -28,12 +28,12 @@ "@vueuse/core": "^10.11.0", "animate.css": "^4.1.1", "colord": "^2.9.3", - "echarts": "^5.5.0", + "echarts": "^5.5.1", "element-resize-detector": "^1.2.4", "highlight.js": "^11.9.0", "jwt-decode": "^4.0.0", "vkbeautify": "^0.99.3", - "vue": "^3.4.30", + "vue": "^3.4.31", "vue-cookies": "^1.8.4", "vue-i18n": "^9.13.1", "vue-router": "^4.4.0", @@ -41,7 +41,7 @@ "xlsx": "^0.18.5" }, "devDependencies": { - "@types/node": "20.14.8", + "@types/node": "20.14.9", "@types/vkbeautify": "^0.99.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b59e5550..eefd09b7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,77 +16,77 @@ importers: version: 4.17.21 pinia: specifier: ^2.1.7 - version: 2.1.7(typescript@5.5.2)(vue@3.4.30(typescript@5.5.2)) + version: 2.1.7(typescript@5.5.3)(vue@3.4.31(typescript@5.5.3)) pinia-plugin-persistedstate: specifier: ^3.2.1 - version: 3.2.1(pinia@2.1.7(typescript@5.5.2)(vue@3.4.30(typescript@5.5.2))) + version: 3.2.1(pinia@2.1.7(typescript@5.5.3)(vue@3.4.31(typescript@5.5.3))) qs: - specifier: ^6.12.1 - version: 6.12.1 + specifier: ^6.12.2 + version: 6.12.2 quasar: specifier: ^2.16.4 version: 2.16.4 vue: - specifier: ^3.4.30 - version: 3.4.30(typescript@5.5.2) + specifier: ^3.4.31 + version: 3.4.31(typescript@5.5.3) vue-i18n: specifier: ^9.13.1 - version: 9.13.1(vue@3.4.30(typescript@5.5.2)) + version: 9.13.1(vue@3.4.31(typescript@5.5.3)) devDependencies: '@changesets/cli': - specifier: ^2.27.6 - version: 2.27.6 + specifier: ^2.27.7 + version: 2.27.7 '@quasar/vite-plugin': specifier: ^1.7.0 - version: 1.7.0(@vitejs/plugin-vue@5.0.5(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@3.4.30(typescript@5.5.2)))(quasar@2.16.4)(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@3.4.30(typescript@5.5.2)) + version: 1.7.0(@vitejs/plugin-vue@5.0.5(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1))(vue@3.4.31(typescript@5.5.3)))(quasar@2.16.4)(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1))(vue@3.4.31(typescript@5.5.3)) '@types/lodash-es': specifier: ^4.17.12 version: 4.17.12 '@types/node': - specifier: ^20.14.8 - version: 20.14.8 + specifier: ^20.14.9 + version: 20.14.9 '@types/qs': specifier: ^6.9.15 version: 6.9.15 '@typescript-eslint/eslint-plugin': - specifier: ^7.13.1 - version: 7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.5.2))(eslint@9.5.0)(typescript@5.5.2) + specifier: ^7.15.0 + version: 7.15.0(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.3))(eslint@9.6.0)(typescript@5.5.3) '@typescript-eslint/parser': - specifier: ^7.13.1 - version: 7.13.1(eslint@9.5.0)(typescript@5.5.2) + specifier: ^7.15.0 + version: 7.15.0(eslint@9.6.0)(typescript@5.5.3) '@vitejs/plugin-vue': specifier: ^5.0.5 - version: 5.0.5(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@3.4.30(typescript@5.5.2)) + version: 5.0.5(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1))(vue@3.4.31(typescript@5.5.3)) commitizen: specifier: ^4.3.0 - version: 4.3.0(@types/node@20.14.8)(typescript@5.5.2) + version: 4.3.0(@types/node@20.14.9)(typescript@5.5.3) cross-env: specifier: ^7.0.3 version: 7.0.3 cz-conventional-changelog: specifier: ^3.3.0 - version: 3.3.0(@types/node@20.14.8)(typescript@5.5.2) + version: 3.3.0(@types/node@20.14.9)(typescript@5.5.3) dotenv: specifier: ^16.4.5 version: 16.4.5 eslint: - specifier: ^9.5.0 - version: 9.5.0 + specifier: ^9.6.0 + version: 9.6.0 eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@9.5.0) + version: 9.1.0(eslint@9.6.0) eslint-define-config: specifier: ^2.1.0 version: 2.1.0 eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@9.5.0))(eslint@9.5.0)(prettier@3.3.2) + version: 5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@9.6.0))(eslint@9.6.0)(prettier@3.3.2) eslint-plugin-quasar: specifier: ^1.1.0 version: 1.1.0 eslint-plugin-vue: specifier: ^9.26.0 - version: 9.26.0(eslint@9.5.0) + version: 9.26.0(eslint@9.6.0) husky: specifier: ^9.0.11 version: 9.0.11 @@ -94,8 +94,8 @@ importers: specifier: ^15.2.7 version: 15.2.7 postcss: - specifier: ^8.4.38 - version: 8.4.38 + specifier: ^8.4.39 + version: 8.4.39 postcss-html: specifier: ^1.7.0 version: 1.7.0 @@ -113,49 +113,49 @@ importers: version: 1.77.6 stylelint: specifier: ^16.6.1 - version: 16.6.1(typescript@5.5.2) + version: 16.6.1(typescript@5.5.3) stylelint-config-prettier: specifier: ^9.0.5 - version: 9.0.5(stylelint@16.6.1(typescript@5.5.2)) + version: 9.0.5(stylelint@16.6.1(typescript@5.5.3)) stylelint-config-recess-order: specifier: ^5.0.1 - version: 5.0.1(stylelint@16.6.1(typescript@5.5.2)) + version: 5.0.1(stylelint@16.6.1(typescript@5.5.3)) stylelint-config-recommended-vue: specifier: ^1.5.0 - version: 1.5.0(postcss-html@1.7.0)(stylelint@16.6.1(typescript@5.5.2)) + version: 1.5.0(postcss-html@1.7.0)(stylelint@16.6.1(typescript@5.5.3)) stylelint-config-standard-scss: specifier: ^13.1.0 - version: 13.1.0(postcss@8.4.38)(stylelint@16.6.1(typescript@5.5.2)) + version: 13.1.0(postcss@8.4.39)(stylelint@16.6.1(typescript@5.5.3)) terser: specifier: ^5.31.1 version: 5.31.1 typescript: - specifier: ^5.5.2 - version: 5.5.2 + specifier: ^5.5.3 + version: 5.5.3 unplugin-auto-import: specifier: ^0.17.6 - version: 0.17.6(@vueuse/core@10.11.0(vue@3.4.30(typescript@5.5.2)))(rollup@4.18.0) + version: 0.17.6(@vueuse/core@10.11.0(vue@3.4.31(typescript@5.5.3)))(rollup@4.18.0) unplugin-icons: specifier: ^0.19.0 - version: 0.19.0(@vue/compiler-sfc@3.4.30)(vue-template-compiler@2.7.16) + version: 0.19.0(@vue/compiler-sfc@3.4.31)(vue-template-compiler@2.7.16) unplugin-vue-components: - specifier: ^0.27.0 - version: 0.27.0(@babel/parser@7.24.7)(rollup@4.18.0)(vue@3.4.30(typescript@5.5.2)) + specifier: ^0.27.2 + version: 0.27.2(@babel/parser@7.24.7)(rollup@4.18.0)(vue@3.4.31(typescript@5.5.3)) vite: - specifier: ^5.3.1 - version: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + specifier: ^5.3.2 + version: 5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1) vite-plugin-compression: specifier: ^0.5.1 - version: 0.5.1(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1)) + version: 0.5.1(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1)) vite-plugin-dts: specifier: 3.9.1 - version: 3.9.1(@types/node@20.14.8)(rollup@4.18.0)(typescript@5.5.2)(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1)) + version: 3.9.1(@types/node@20.14.9)(rollup@4.18.0)(typescript@5.5.3)(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1)) vite-plugin-html: specifier: ^3.2.2 - version: 3.2.2(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1)) + version: 3.2.2(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1)) vue-tsc: - specifier: ^2.0.22 - version: 2.0.22(typescript@5.5.2) + specifier: ^2.0.24 + version: 2.0.24(typescript@5.5.3) packages/ui: dependencies: @@ -179,7 +179,7 @@ importers: version: link:../../shared/oss-apis '@highlightjs/vue-plugin': specifier: ^2.1.0 - version: 2.1.0(highlight.js@11.9.0)(vue@3.4.30(typescript@5.5.2)) + version: 2.1.0(highlight.js@11.9.0)(vue@3.4.31(typescript@5.5.3)) '@mdi/js': specifier: ^7.4.47 version: 7.4.47 @@ -191,13 +191,13 @@ importers: version: 7.0.0 '@vuelidate/core': specifier: ^2.0.3 - version: 2.0.3(vue@3.4.30(typescript@5.5.2)) + version: 2.0.3(vue@3.4.31(typescript@5.5.3)) '@vuelidate/validators': specifier: ^2.0.4 - version: 2.0.4(vue@3.4.30(typescript@5.5.2)) + version: 2.0.4(vue@3.4.31(typescript@5.5.3)) '@vueuse/core': specifier: ^10.11.0 - version: 10.11.0(vue@3.4.30(typescript@5.5.2)) + version: 10.11.0(vue@3.4.31(typescript@5.5.3)) animate.css: specifier: ^4.1.1 version: 4.1.1 @@ -205,8 +205,8 @@ importers: specifier: ^2.9.3 version: 2.9.3 echarts: - specifier: ^5.5.0 - version: 5.5.0 + specifier: ^5.5.1 + version: 5.5.1 element-resize-detector: specifier: ^1.2.4 version: 1.2.4 @@ -220,27 +220,27 @@ importers: specifier: ^0.99.3 version: 0.99.3 vue: - specifier: ^3.4.30 - version: 3.4.30(typescript@5.5.2) + specifier: ^3.4.31 + version: 3.4.31(typescript@5.5.3) vue-cookies: specifier: ^1.8.4 version: 1.8.4 vue-i18n: specifier: ^9.13.1 - version: 9.13.1(vue@3.4.30(typescript@5.5.2)) + version: 9.13.1(vue@3.4.31(typescript@5.5.3)) vue-router: specifier: ^4.4.0 - version: 4.4.0(vue@3.4.30(typescript@5.5.2)) + version: 4.4.0(vue@3.4.31(typescript@5.5.3)) vue-simple-uploader: specifier: ^1.0.3 - version: 1.0.3(vue@3.4.30(typescript@5.5.2)) + version: 1.0.3(vue@3.4.31(typescript@5.5.3)) xlsx: specifier: ^0.18.5 version: 0.18.5 devDependencies: '@types/node': - specifier: 20.14.8 - version: 20.14.8 + specifier: 20.14.9 + version: 20.14.9 '@types/vkbeautify': specifier: ^0.99.4 version: 0.99.4 @@ -272,26 +272,26 @@ importers: specifier: workspace:^ version: link:../core bpmn-js: - specifier: ^17.8.2 - version: 17.8.2 + specifier: ^17.9.0 + version: 17.9.0 bpmn-js-properties-panel: specifier: ^5.18.0 - version: 5.18.0(@bpmn-io/properties-panel@3.22.0(@lezer/common@1.2.1))(bpmn-js@17.8.2)(camunda-bpmn-js-behaviors@1.3.0(bpmn-js@17.8.2)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.1.0))(diagram-js@14.7.1) + version: 5.18.0(@bpmn-io/properties-panel@3.22.0(@lezer/common@1.2.1))(bpmn-js@17.9.0)(camunda-bpmn-js-behaviors@1.3.0(bpmn-js@17.9.0)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.1.0))(diagram-js@14.8.0) bpmn-js-token-simulation: specifier: ^0.34.2 version: 0.34.2 camunda-bpmn-js-behaviors: specifier: ^1.3.0 - version: 1.3.0(bpmn-js@17.8.2)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.1.0) + version: 1.3.0(bpmn-js@17.9.0)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.1.0) camunda-bpmn-moddle: specifier: ^7.0.1 version: 7.0.1 diagram-js: - specifier: ^14.7.1 - version: 14.7.1 + specifier: ^14.8.0 + version: 14.8.0 preact: - specifier: ^10.22.0 - version: 10.22.0 + specifier: ^10.22.1 + version: 10.22.1 zeebe-bpmn-moddle: specifier: ^1.1.0 version: 1.1.0 @@ -309,14 +309,14 @@ importers: specifier: ^7.4.47 version: 7.4.47 '@tsparticles/basic': - specifier: ^3.4.0 - version: 3.4.0 + specifier: ^3.5.0 + version: 3.5.0 '@tsparticles/engine': - specifier: ^3.4.0 - version: 3.4.0 + specifier: ^3.5.0 + version: 3.5.0 '@tsparticles/interaction-particles-links': - specifier: ^3.4.0 - version: 3.4.0 + specifier: ^3.5.0 + version: 3.5.0 quasar: specifier: ^2.16.4 version: 2.16.4 @@ -345,8 +345,8 @@ importers: specifier: ^0.3.13 version: 0.3.13 sweetalert2: - specifier: ^11.12.0 - version: 11.12.0 + specifier: ^11.12.1 + version: 11.12.1 devDependencies: '@types/crypto-js': specifier: ^4.2.2 @@ -369,8 +369,8 @@ packages: '@antfu/install-pkg@0.3.3': resolution: {integrity: sha512-nHHsk3NXQ6xkCfiRRC8Nfrg8pU5kkr3P3Y9s9dKqiuRmBD0Yap7fymNDjGFKeWhZQHqqbCS5CfeMy9wtExM24w==, tarball: https://registry.npmmirror.com/@antfu/install-pkg/-/install-pkg-0.3.3.tgz} - '@antfu/utils@0.7.8': - resolution: {integrity: sha512-rWQkqXRESdjXtc+7NRfK9lASQjpXJu1ayp7qi1d23zZorY+wBHVLHHoVcMsEnkqEBWTFqbztO7/QdJFzyEcLTg==, tarball: https://registry.npmmirror.com/@antfu/utils/-/utils-0.7.8.tgz} + '@antfu/utils@0.7.10': + resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==, tarball: https://registry.npmmirror.com/@antfu/utils/-/utils-0.7.10.tgz} '@babel/code-frame@7.24.7': resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==, tarball: https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.24.7.tgz} @@ -420,30 +420,30 @@ packages: '@bpmn-io/properties-panel@3.22.0': resolution: {integrity: sha512-k9Mcwe8Xdy9YPBOlZpOsivFDBUMPOI768P9JP5GBi88uo8/QrKCzQ3oE8qG8aY61DQ6hLjZvRLH+hYtCaZWo8g==, tarball: https://registry.npmmirror.com/@bpmn-io/properties-panel/-/properties-panel-3.22.0.tgz} - '@changesets/apply-release-plan@7.0.3': - resolution: {integrity: sha512-klL6LCdmfbEe9oyfLxnidIf/stFXmrbFO/3gT5LU5pcyoZytzJe4gWpTBx3BPmyNPl16dZ1xrkcW7b98e3tYkA==, tarball: https://registry.npmmirror.com/@changesets/apply-release-plan/-/apply-release-plan-7.0.3.tgz} + '@changesets/apply-release-plan@7.0.4': + resolution: {integrity: sha512-HLFwhKWayKinWAul0Vj+76jVx1Pc2v55MGPVjZ924Y/ROeSsBMFutv9heHmCUj48lJyRfOTJG5+ar+29FUky/A==, tarball: https://registry.npmmirror.com/@changesets/apply-release-plan/-/apply-release-plan-7.0.4.tgz} - '@changesets/assemble-release-plan@6.0.2': - resolution: {integrity: sha512-n9/Tdq+ze+iUtjmq0mZO3pEhJTKkku9hUxtUadW30jlN7kONqJG3O6ALeXrmc6gsi/nvoCuKjqEJ68Hk8RbMTQ==, tarball: https://registry.npmmirror.com/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.2.tgz} + '@changesets/assemble-release-plan@6.0.3': + resolution: {integrity: sha512-bLNh9/Lgl1VwkjWZTq8JmRqH+hj7/Yzfz0jsQ/zJJ+FTmVqmqPj3szeKOri8O/hEM8JmHW019vh2gTO9iq5Cuw==, tarball: https://registry.npmmirror.com/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.3.tgz} '@changesets/changelog-git@0.2.0': resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==, tarball: https://registry.npmmirror.com/@changesets/changelog-git/-/changelog-git-0.2.0.tgz} - '@changesets/cli@2.27.6': - resolution: {integrity: sha512-PB7KS5JkCQ4WSXlnfThn8CXAHVwYxFdZvYTimhi12fls/tzj9iimUhKsYwkrKSbw1AiVlGCZtihj5Wkt6siIjA==, tarball: https://registry.npmmirror.com/@changesets/cli/-/cli-2.27.6.tgz} + '@changesets/cli@2.27.7': + resolution: {integrity: sha512-6lr8JltiiXPIjDeYg4iM2MeePP6VN/JkmqBsVA5XRiy01hGS3y629LtSDvKcycj/w/5Eur1rEwby/MjcYS+e2A==, tarball: https://registry.npmmirror.com/@changesets/cli/-/cli-2.27.7.tgz} hasBin: true - '@changesets/config@3.0.1': - resolution: {integrity: sha512-nCr8pOemUjvGJ8aUu8TYVjqnUL+++bFOQHBVmtNbLvKzIDkN/uiP/Z4RKmr7NNaiujIURHySDEGFPftR4GbTUA==, tarball: https://registry.npmmirror.com/@changesets/config/-/config-3.0.1.tgz} + '@changesets/config@3.0.2': + resolution: {integrity: sha512-cdEhS4t8woKCX2M8AotcV2BOWnBp09sqICxKapgLHf9m5KdENpWjyrFNMjkLqGJtUys9U+w93OxWT0czorVDfw==, tarball: https://registry.npmmirror.com/@changesets/config/-/config-3.0.2.tgz} '@changesets/errors@0.2.0': resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==, tarball: https://registry.npmmirror.com/@changesets/errors/-/errors-0.2.0.tgz} - '@changesets/get-dependents-graph@2.1.0': - resolution: {integrity: sha512-QOt6pQq9RVXKGHPVvyKimJDYJumx7p4DO5MO9AhRJYgAPgv0emhNqAqqysSVKHBm4sxKlGN4S1zXOIb5yCFuhQ==, tarball: https://registry.npmmirror.com/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.0.tgz} + '@changesets/get-dependents-graph@2.1.1': + resolution: {integrity: sha512-LRFjjvigBSzfnPU2n/AhFsuWR5DK++1x47aq6qZ8dzYsPtS/I5mNhIGAS68IAxh1xjO9BTtz55FwefhANZ+FCA==, tarball: https://registry.npmmirror.com/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.1.tgz} - '@changesets/get-release-plan@4.0.2': - resolution: {integrity: sha512-rOalz7nMuMV2vyeP7KBeAhqEB7FM2GFPO5RQSoOoUKKH9L6wW3QyPA2K+/rG9kBrWl2HckPVES73/AuwPvbH3w==, tarball: https://registry.npmmirror.com/@changesets/get-release-plan/-/get-release-plan-4.0.2.tgz} + '@changesets/get-release-plan@4.0.3': + resolution: {integrity: sha512-6PLgvOIwTSdJPTtpdcr3sLtGatT+Jr22+cQwEBJBy6wP0rjB4yJ9lv583J9fVpn1bfQlBkDa8JxbS2g/n9lIyA==, tarball: https://registry.npmmirror.com/@changesets/get-release-plan/-/get-release-plan-4.0.3.tgz} '@changesets/get-version-range-type@0.4.0': resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==, tarball: https://registry.npmmirror.com/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz} @@ -495,8 +495,8 @@ packages: '@codemirror/state@6.4.1': resolution: {integrity: sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==, tarball: https://registry.npmmirror.com/@codemirror/state/-/state-6.4.1.tgz} - '@codemirror/view@6.28.2': - resolution: {integrity: sha512-A3DmyVfjgPsGIjiJqM/zvODUAPQdQl3ci0ghehYNnbt5x+o76xq+dL5+mMBuysDXnI3kapgOkoeJ0sbtL/3qPw==, tarball: https://registry.npmmirror.com/@codemirror/view/-/view-6.28.2.tgz} + '@codemirror/view@6.28.3': + resolution: {integrity: sha512-QVqP+ko078/h9yrW+u5grX3rQhC+BkGKADRrlDaJznfPngJOv5zObiVf0+SgAWhL/Yt0nvZ+10rO3L+gU5IbFw==, tarball: https://registry.npmmirror.com/@codemirror/view/-/view-6.28.3.tgz} '@commitlint/config-validator@19.0.3': resolution: {integrity: sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==, tarball: https://registry.npmmirror.com/@commitlint/config-validator/-/config-validator-19.0.3.tgz} @@ -518,22 +518,22 @@ packages: resolution: {integrity: sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==, tarball: https://registry.npmmirror.com/@commitlint/types/-/types-19.0.3.tgz} engines: {node: '>=v18'} - '@csstools/css-parser-algorithms@2.6.3': - resolution: {integrity: sha512-xI/tL2zxzEbESvnSxwFgwvy5HS00oCXxL4MLs6HUiDcYfwowsoQaABKxUElp1ARITrINzBnsECOc1q0eg2GOrA==, tarball: https://registry.npmmirror.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.6.3.tgz} + '@csstools/css-parser-algorithms@2.7.0': + resolution: {integrity: sha512-qvBMcOU/uWFCH/VO0MYe0AMs0BGMWAt6FTryMbFIKYtZtVnqTZtT8ktv5o718llkaGZWomJezJZjq3vJDHeJNQ==, tarball: https://registry.npmmirror.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.0.tgz} engines: {node: ^14 || ^16 || >=18} peerDependencies: - '@csstools/css-tokenizer': ^2.3.1 + '@csstools/css-tokenizer': ^2.3.2 - '@csstools/css-tokenizer@2.3.1': - resolution: {integrity: sha512-iMNHTyxLbBlWIfGtabT157LH9DUx9X8+Y3oymFEuMj8HNc+rpE3dPFGFgHjpKfjeFDjLjYIAIhXPGvS2lKxL9g==, tarball: https://registry.npmmirror.com/@csstools/css-tokenizer/-/css-tokenizer-2.3.1.tgz} + '@csstools/css-tokenizer@2.3.2': + resolution: {integrity: sha512-0xYOf4pQpAaE6Sm2Q0x3p25oRukzWQ/O8hWVvhIt9Iv98/uu053u2CGm/g3kJ+P0vOYTAYzoU8Evq2pg9ZPXtw==, tarball: https://registry.npmmirror.com/@csstools/css-tokenizer/-/css-tokenizer-2.3.2.tgz} engines: {node: ^14 || ^16 || >=18} - '@csstools/media-query-list-parser@2.1.11': - resolution: {integrity: sha512-uox5MVhvNHqitPP+SynrB1o8oPxPMt2JLgp5ghJOWf54WGQ5OKu47efne49r1SWqs3wRP8xSWjnO9MBKxhB1dA==, tarball: https://registry.npmmirror.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.11.tgz} + '@csstools/media-query-list-parser@2.1.12': + resolution: {integrity: sha512-t1/CdyVJzOQUiGUcIBXRzTAkWTFPxiPnoKwowKW2z9Uj78c2bBWI/X94BeVfUwVq1xtCjD7dnO8kS6WONgp8Jw==, tarball: https://registry.npmmirror.com/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.12.tgz} engines: {node: ^14 || ^16 || >=18} peerDependencies: - '@csstools/css-parser-algorithms': ^2.6.3 - '@csstools/css-tokenizer': ^2.3.1 + '@csstools/css-parser-algorithms': ^2.7.0 + '@csstools/css-tokenizer': ^2.3.2 '@csstools/selector-specificity@3.1.1': resolution: {integrity: sha512-a7cxGcJ2wIlMFLlh8z2ONm+715QkPHiyJcxwQlKOz/03GPw1COpfhcmC9wm4xlZfp//jWHNNMwzjtqHXVWU9KA==, tarball: https://registry.npmmirror.com/@csstools/selector-specificity/-/selector-specificity-3.1.1.tgz} @@ -688,20 +688,20 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.1': - resolution: {integrity: sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==, tarball: https://registry.npmmirror.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz} + '@eslint-community/regexpp@4.11.0': + resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==, tarball: https://registry.npmmirror.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.16.0': - resolution: {integrity: sha512-/jmuSd74i4Czf1XXn7wGRWZCuyaUZ330NH1Bek0Pplatt4Sy1S5haN21SCLLdbeKslQ+S0wEJ+++v5YibSi+Lg==, tarball: https://registry.npmmirror.com/@eslint/config-array/-/config-array-0.16.0.tgz} + '@eslint/config-array@0.17.0': + resolution: {integrity: sha512-A68TBu6/1mHHuc5YJL0U0VVeGNiklLAL6rRmhTCP2B5XjWLMnrX+HkO+IAXyHvks5cyyY1jjK5ITPQ1HGS2EVA==, tarball: https://registry.npmmirror.com/@eslint/config-array/-/config-array-0.17.0.tgz} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==, tarball: https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.5.0': - resolution: {integrity: sha512-A7+AOT2ICkodvtsWnxZP4Xxk3NbZ3VMHd8oihydLRGrJgqqdEz1qSeEgXYyT/Cu8h1TWWsQRejIx48mtjZ5y1w==, tarball: https://registry.npmmirror.com/@eslint/js/-/js-9.5.0.tgz} + '@eslint/js@9.6.0': + resolution: {integrity: sha512-D9B0/3vNg44ZeWbYMpBoXqNP4j6eQD5vNwIlGAuFRRzK/WtT/jvDQW3Bi9kkf3PMDMlM7Yi+73VLUsn5bJcl8A==, tarball: https://registry.npmmirror.com/@eslint/js/-/js-9.6.0.tgz} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.4': @@ -954,32 +954,32 @@ packages: '@stomp/stompjs@7.0.0': resolution: {integrity: sha512-fGdq4wPDnSV/KyOsjq4P+zLc8MFWC3lMmP5FBgLWKPJTYcuCbAIrnRGjB7q2jHZdYCOD5vxLuFoKIYLy5/u8Pw==, tarball: https://registry.npmmirror.com/@stomp/stompjs/-/stompjs-7.0.0.tgz} - '@tsparticles/basic@3.4.0': - resolution: {integrity: sha512-a0HxG0GOhXof7NDqcqdyu9XpmCAQ0M402YECz/jsH4CkBpz3ut0BrgnyjT6Xcqna3pR1Kv1m516/sV2fwNnnQw==, tarball: https://registry.npmmirror.com/@tsparticles/basic/-/basic-3.4.0.tgz} + '@tsparticles/basic@3.5.0': + resolution: {integrity: sha512-oty33TxM2aHWrzcwWRic1bQ04KBCdpnvzv8JXEkx5Uyp70vgVegUbtKmwGki3shqKZIt3v2qE4I8NsK6onhLrA==, tarball: https://registry.npmmirror.com/@tsparticles/basic/-/basic-3.5.0.tgz} - '@tsparticles/engine@3.4.0': - resolution: {integrity: sha512-OqoMZYJCoiihNnexnnSmInEMNXr0Z8CmE1HSiFVeifgK1qUlonTFe2G09KdvNT8ZdvmIC513yTpFJNDbnMZYRQ==, tarball: https://registry.npmmirror.com/@tsparticles/engine/-/engine-3.4.0.tgz} + '@tsparticles/engine@3.5.0': + resolution: {integrity: sha512-RCwrJ2SvSYdhXJ24oUCjSUKEZQ9lXwObOWMvfMC9vS6/bk+Qo0N7Xx8AfumqzP/LebB1YJdlCvuoJMauAon0Pg==, tarball: https://registry.npmmirror.com/@tsparticles/engine/-/engine-3.5.0.tgz} - '@tsparticles/interaction-particles-links@3.4.0': - resolution: {integrity: sha512-2UhzNsZCSF69L0PGwlJARNx3qrMdSrl5p/TgO5Q5w7iwBU1x/W27O+TDQvNdMHsOLPPUomUI+jJfRXY2snqp3Q==, tarball: https://registry.npmmirror.com/@tsparticles/interaction-particles-links/-/interaction-particles-links-3.4.0.tgz} + '@tsparticles/interaction-particles-links@3.5.0': + resolution: {integrity: sha512-ZdIixcGcRJMxCq4zxeRAzzbbuN5vVoy3pDDLaO3mnWnfJWywkYZToV0XvOUaHUT2AkUuKa9ZuQKx0LO3z1AO+w==, tarball: https://registry.npmmirror.com/@tsparticles/interaction-particles-links/-/interaction-particles-links-3.5.0.tgz} - '@tsparticles/move-base@3.4.0': - resolution: {integrity: sha512-4P9CzgVN7INogAvqkg/cEA+6WKeGUAtsgljJ2rUADgNBiScW1oJZAw/004AZiOlonLRiUZujUCNS4zlAg62ZvQ==, tarball: https://registry.npmmirror.com/@tsparticles/move-base/-/move-base-3.4.0.tgz} + '@tsparticles/move-base@3.5.0': + resolution: {integrity: sha512-9oDk7zTxyhUCstj3lHTNTiWAgqIBzWa2o1tVQFK63Qwq+/WxzJCSwZOocC9PAHGM1IP6nA4zYJSfjbMBTrUocA==, tarball: https://registry.npmmirror.com/@tsparticles/move-base/-/move-base-3.5.0.tgz} - '@tsparticles/shape-circle@3.4.0': - resolution: {integrity: sha512-X1ynt8h7bO+xep12Vkxeo2fImbKzLMEZr0qY3vKZzhHcy0/lxoo505pwyVL2+V98eZNOu9fmQM7vlIt/0FGTcg==, tarball: https://registry.npmmirror.com/@tsparticles/shape-circle/-/shape-circle-3.4.0.tgz} + '@tsparticles/shape-circle@3.5.0': + resolution: {integrity: sha512-59TmXkeeI6Jzv5vt/D3TkclglabaoEXQi2kbDjSCBK68SXRHzlQu29mSAL41Y5S0Ft5ZJKkAQHX1IqEnm8Hyjg==, tarball: https://registry.npmmirror.com/@tsparticles/shape-circle/-/shape-circle-3.5.0.tgz} - '@tsparticles/updater-color@3.4.0': - resolution: {integrity: sha512-joT5O/78p7n3jBq1aiFEp4wMevv8WtfjBJnODwEUO7aiHRozs9tA05djVLYZ7kjH0bLymJoPwxM46SEGSTsh+g==, tarball: https://registry.npmmirror.com/@tsparticles/updater-color/-/updater-color-3.4.0.tgz} + '@tsparticles/updater-color@3.5.0': + resolution: {integrity: sha512-TGGgiLixIg37sst2Fj9IV4XbdMwkT6PYanM7qEqyfmv4hJ/RHMQlCznEe6b7OhChQVBg5ov5EMl/BT4/fIWEYw==, tarball: https://registry.npmmirror.com/@tsparticles/updater-color/-/updater-color-3.5.0.tgz} - '@tsparticles/updater-opacity@3.4.0': - resolution: {integrity: sha512-OCWbebZykDh8ZbTiTQX+pBRXHfTMMJpNXbFps4lTSHXHMDsbEMl5a3/TEFeUk3rd0wkiRSCjPUSGKupoU5B14w==, tarball: https://registry.npmmirror.com/@tsparticles/updater-opacity/-/updater-opacity-3.4.0.tgz} + '@tsparticles/updater-opacity@3.5.0': + resolution: {integrity: sha512-T2YfqdIFV/f5VOg1JQsXu6/owdi9g9K2wrJlBfgteo+IboVp6Lcuo4PGAfilWVkWrTdp1Nz4mz39NrLHfOce2g==, tarball: https://registry.npmmirror.com/@tsparticles/updater-opacity/-/updater-opacity-3.5.0.tgz} - '@tsparticles/updater-out-modes@3.4.0': - resolution: {integrity: sha512-i80MSXpnfivKlfA0FbAxk2CfZGNG3rPNtx5Pz/ZCDQ71j1YFjztdwfugp9oueu/sLfOSw4hIKfyR062zpgZp6Q==, tarball: https://registry.npmmirror.com/@tsparticles/updater-out-modes/-/updater-out-modes-3.4.0.tgz} + '@tsparticles/updater-out-modes@3.5.0': + resolution: {integrity: sha512-y6NZe2OSk5SrYdaLwUIQnHICsNEDIdPPJHQ2nAWSvAuPJphlSKjUknc7OaGiFwle6l0OkhWoZZe1rV1ktbw/lA==, tarball: https://registry.npmmirror.com/@tsparticles/updater-out-modes/-/updater-out-modes-3.5.0.tgz} - '@tsparticles/updater-size@3.4.0': - resolution: {integrity: sha512-3z7INo2E7HR+ps8V490mOiLcCaFmUJFgObXBO3lF6uZ1xe6SfvVsX2r1HpQLwIpq7Ph2ZqQ4tj8tBPyKtada7g==, tarball: https://registry.npmmirror.com/@tsparticles/updater-size/-/updater-size-3.4.0.tgz} + '@tsparticles/updater-size@3.5.0': + resolution: {integrity: sha512-TnWlOChBsVZffT2uO0S4ALGSzxT6UAMIVlhGMGFgSeIlktKMqM+dxDGAPrYa1n8IS2dkVGisiXzsV0Ss6Ceu1A==, tarball: https://registry.npmmirror.com/@tsparticles/updater-size/-/updater-size-3.5.0.tgz} '@types/argparse@1.0.38': resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==, tarball: https://registry.npmmirror.com/@types/argparse/-/argparse-1.0.38.tgz} @@ -1005,8 +1005,8 @@ packages: '@types/lodash-es@4.17.12': resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==, tarball: https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz} - '@types/lodash@4.17.5': - resolution: {integrity: sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==, tarball: https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.5.tgz} + '@types/lodash@4.17.6': + resolution: {integrity: sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA==, tarball: https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.6.tgz} '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==, tarball: https://registry.npmmirror.com/@types/node/-/node-12.20.55.tgz} @@ -1014,8 +1014,8 @@ packages: '@types/node@13.13.52': resolution: {integrity: sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==, tarball: https://registry.npmmirror.com/@types/node/-/node-13.13.52.tgz} - '@types/node@20.14.8': - resolution: {integrity: sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA==, tarball: https://registry.npmmirror.com/@types/node/-/node-20.14.8.tgz} + '@types/node@20.14.9': + resolution: {integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==, tarball: https://registry.npmmirror.com/@types/node/-/node-20.14.9.tgz} '@types/qs@6.9.15': resolution: {integrity: sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==, tarball: https://registry.npmmirror.com/@types/qs/-/qs-6.9.15.tgz} @@ -1029,8 +1029,8 @@ packages: '@types/web-bluetooth@0.0.20': resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==, tarball: https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz} - '@typescript-eslint/eslint-plugin@7.13.1': - resolution: {integrity: sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==, tarball: https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.1.tgz} + '@typescript-eslint/eslint-plugin@7.15.0': + resolution: {integrity: sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA==, tarball: https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.15.0.tgz} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1040,8 +1040,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.13.1': - resolution: {integrity: sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==, tarball: https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-7.13.1.tgz} + '@typescript-eslint/parser@7.15.0': + resolution: {integrity: sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A==, tarball: https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-7.15.0.tgz} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1050,12 +1050,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.13.1': - resolution: {integrity: sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==, tarball: https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-7.13.1.tgz} + '@typescript-eslint/scope-manager@7.15.0': + resolution: {integrity: sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==, tarball: https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-7.15.0.tgz} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.13.1': - resolution: {integrity: sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==, tarball: https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-7.13.1.tgz} + '@typescript-eslint/type-utils@7.15.0': + resolution: {integrity: sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg==, tarball: https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-7.15.0.tgz} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1064,12 +1064,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.13.1': - resolution: {integrity: sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==, tarball: https://registry.npmmirror.com/@typescript-eslint/types/-/types-7.13.1.tgz} + '@typescript-eslint/types@7.15.0': + resolution: {integrity: sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==, tarball: https://registry.npmmirror.com/@typescript-eslint/types/-/types-7.15.0.tgz} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/typescript-estree@7.13.1': - resolution: {integrity: sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==, tarball: https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.1.tgz} + '@typescript-eslint/typescript-estree@7.15.0': + resolution: {integrity: sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==, tarball: https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.15.0.tgz} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1077,14 +1077,14 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.13.1': - resolution: {integrity: sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==, tarball: https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-7.13.1.tgz} + '@typescript-eslint/utils@7.15.0': + resolution: {integrity: sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==, tarball: https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-7.15.0.tgz} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/visitor-keys@7.13.1': - resolution: {integrity: sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==, tarball: https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.1.tgz} + '@typescript-eslint/visitor-keys@7.15.0': + resolution: {integrity: sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==, tarball: https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.15.0.tgz} engines: {node: ^18.18.0 || >=20.0.0} '@vitejs/plugin-vue@5.0.5': @@ -1097,32 +1097,32 @@ packages: '@volar/language-core@1.11.1': resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==, tarball: https://registry.npmmirror.com/@volar/language-core/-/language-core-1.11.1.tgz} - '@volar/language-core@2.3.3': - resolution: {integrity: sha512-Blu4NQaRszEsgK/QvWFRSQPRAhPDbYef+peFV9Gb86swxRCs01q7h673/HYstaPsTbjh/F5mXjozoOFxQ8tLYw==, tarball: https://registry.npmmirror.com/@volar/language-core/-/language-core-2.3.3.tgz} + '@volar/language-core@2.4.0-alpha.11': + resolution: {integrity: sha512-DtftH0DtpksK1y+de/kLnu8CHcFQ7huKXi7cyxH9R0PbOOTSGXd31kijBeKNzyoXRp8dqGpu/7WhOlCWXQR62w==, tarball: https://registry.npmmirror.com/@volar/language-core/-/language-core-2.4.0-alpha.11.tgz} '@volar/source-map@1.11.1': resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==, tarball: https://registry.npmmirror.com/@volar/source-map/-/source-map-1.11.1.tgz} - '@volar/source-map@2.3.3': - resolution: {integrity: sha512-eFRHA13hxiGPt+Xa0EX3yNd50ozctnW5KzQj/IllKmSK/KuBEkSAsIhBdOxCpv1YhV4GmI3iKG9peOs6k9LtnA==, tarball: https://registry.npmmirror.com/@volar/source-map/-/source-map-2.3.3.tgz} + '@volar/source-map@2.4.0-alpha.11': + resolution: {integrity: sha512-yyjmv8KUkTcxXzwme9qUMl6Szdji9JUQa8eadE4ib/spFXXZGq6QOX8cgSu5UQ0ooyBJFO1zdVH5otBJyZE3Ew==, tarball: https://registry.npmmirror.com/@volar/source-map/-/source-map-2.4.0-alpha.11.tgz} '@volar/typescript@1.11.1': resolution: {integrity: sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==, tarball: https://registry.npmmirror.com/@volar/typescript/-/typescript-1.11.1.tgz} - '@volar/typescript@2.3.3': - resolution: {integrity: sha512-cwGMSwqIR54Hngu5dYmUJPHFpo6KGj7BlpwT2G9WTKwEjFlH4g/0IPeq064428DAi/VMP42vqAQSBiEHi5Gc4A==, tarball: https://registry.npmmirror.com/@volar/typescript/-/typescript-2.3.3.tgz} + '@volar/typescript@2.4.0-alpha.11': + resolution: {integrity: sha512-N/v+wSddhtsNtfv2w0Bxj2QQWURN5budGzpyBTrlcXxz2dnvB0eAMqrEQbBi6rCOVHlRaXbh+wyTRdAcB/FHrg==, tarball: https://registry.npmmirror.com/@volar/typescript/-/typescript-2.4.0-alpha.11.tgz} - '@vue/compiler-core@3.4.30': - resolution: {integrity: sha512-ZL8y4Xxdh8O6PSwfdZ1IpQ24PjTAieOz3jXb/MDTfDtANcKBMxg1KLm6OX2jofsaQGYfIVzd3BAG22i56/cF1w==, tarball: https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.4.30.tgz} + '@vue/compiler-core@3.4.31': + resolution: {integrity: sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==, tarball: https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.4.31.tgz} - '@vue/compiler-dom@3.4.30': - resolution: {integrity: sha512-+16Sd8lYr5j/owCbr9dowcNfrHd+pz+w2/b5Lt26Oz/kB90C9yNbxQ3bYOvt7rI2bxk0nqda39hVcwDFw85c2Q==, tarball: https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.4.30.tgz} + '@vue/compiler-dom@3.4.31': + resolution: {integrity: sha512-wK424WMXsG1IGMyDGyLqB+TbmEBFM78hIsOJ9QwUVLGrcSk0ak6zYty7Pj8ftm7nEtdU/DGQxAXp0/lM/2cEpQ==, tarball: https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.4.31.tgz} - '@vue/compiler-sfc@3.4.30': - resolution: {integrity: sha512-8vElKklHn/UY8+FgUFlQrYAPbtiSB2zcgeRKW7HkpSRn/JjMRmZvuOtwDx036D1aqKNSTtXkWRfqx53Qb+HmMg==, tarball: https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.4.30.tgz} + '@vue/compiler-sfc@3.4.31': + resolution: {integrity: sha512-einJxqEw8IIJxzmnxmJBuK2usI+lJonl53foq+9etB2HAzlPjAS/wa7r0uUpXw5ByX3/0uswVSrjNb17vJm1kQ==, tarball: https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.4.31.tgz} - '@vue/compiler-ssr@3.4.30': - resolution: {integrity: sha512-ZJ56YZGXJDd6jky4mmM0rNaNP6kIbQu9LTKZDhcpddGe/3QIalB1WHHmZ6iZfFNyj5mSypTa4+qDJa5VIuxMSg==, tarball: https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.4.30.tgz} + '@vue/compiler-ssr@3.4.31': + resolution: {integrity: sha512-RtefmITAje3fJ8FSg1gwgDhdKhZVntIVbwupdyZDSifZTRMiWxWehAOTCc8/KZDnBOcYQ4/9VWxsTbd3wT0hAA==, tarball: https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.4.31.tgz} '@vue/devtools-api@6.6.3': resolution: {integrity: sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==, tarball: https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.3.tgz} @@ -1135,30 +1135,30 @@ packages: typescript: optional: true - '@vue/language-core@2.0.22': - resolution: {integrity: sha512-dNTAAtEOuMiz7N1s5tKpypnVVCtawxVSF5BukD0ELcYSw+DSbrSlYYSw8GuwvurodCeYFSHsmslE+c2sYDNoiA==, tarball: https://registry.npmmirror.com/@vue/language-core/-/language-core-2.0.22.tgz} + '@vue/language-core@2.0.24': + resolution: {integrity: sha512-997YD6Lq/66LXr3ZOLNxDCmyn13z9NP8LU1UZn9hGCDWhzlbXAIP0hOgL3w3x4RKEaWTaaRtsHP9DzHvmduruQ==, tarball: https://registry.npmmirror.com/@vue/language-core/-/language-core-2.0.24.tgz} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true - '@vue/reactivity@3.4.30': - resolution: {integrity: sha512-bVJurnCe3LS0JII8PPoAA63Zd2MBzcKrEzwdQl92eHCcxtIbxD2fhNwJpa+KkM3Y/A4T5FUnmdhgKwOf6BfbcA==, tarball: https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.4.30.tgz} + '@vue/reactivity@3.4.31': + resolution: {integrity: sha512-VGkTani8SOoVkZNds1PfJ/T1SlAIOf8E58PGAhIOUDYPC4GAmFA2u/E14TDAFcf3vVDKunc4QqCe/SHr8xC65Q==, tarball: https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.4.31.tgz} - '@vue/runtime-core@3.4.30': - resolution: {integrity: sha512-qaFEbnNpGz+tlnkaualomogzN8vBLkgzK55uuWjYXbYn039eOBZrWxyXWq/7qh9Bz2FPifZqGjVDl/FXiq9L2g==, tarball: https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.4.30.tgz} + '@vue/runtime-core@3.4.31': + resolution: {integrity: sha512-LDkztxeUPazxG/p8c5JDDKPfkCDBkkiNLVNf7XZIUnJ+66GVGkP+TIh34+8LtPisZ+HMWl2zqhIw0xN5MwU1cw==, tarball: https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.4.31.tgz} - '@vue/runtime-dom@3.4.30': - resolution: {integrity: sha512-tV6B4YiZRj5QsaJgw2THCy5C1H+2UeywO9tqgWEc21tn85qHEERndHN/CxlyXvSBFrpmlexCIdnqPuR9RM9thw==, tarball: https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.4.30.tgz} + '@vue/runtime-dom@3.4.31': + resolution: {integrity: sha512-2Auws3mB7+lHhTFCg8E9ZWopA6Q6L455EcU7bzcQ4x6Dn4cCPuqj6S2oBZgN2a8vJRS/LSYYxwFFq2Hlx3Fsaw==, tarball: https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.4.31.tgz} - '@vue/server-renderer@3.4.30': - resolution: {integrity: sha512-TBD3eqR1DeDc0cMrXS/vEs/PWzq1uXxnvjoqQuDGFIEHFIwuDTX/KWAQKIBjyMWLFHEeTDGYVsYci85z2UbTDg==, tarball: https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.4.30.tgz} + '@vue/server-renderer@3.4.31': + resolution: {integrity: sha512-D5BLbdvrlR9PE3by9GaUp1gQXlCNadIZytMIb8H2h3FMWJd4oUfkUTEH2wAr3qxoRz25uxbTcbqd3WKlm9EHQA==, tarball: https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.4.31.tgz} peerDependencies: - vue: 3.4.30 + vue: 3.4.31 - '@vue/shared@3.4.30': - resolution: {integrity: sha512-CLg+f8RQCHQnKvuHY9adMsMaQOcqclh6Z5V9TaoMgy0ut0tz848joZ7/CYFFyF/yZ5i2yaw7Fn498C+CNZVHIg==, tarball: https://registry.npmmirror.com/@vue/shared/-/shared-3.4.30.tgz} + '@vue/shared@3.4.31': + resolution: {integrity: sha512-Yp3wtJk//8cO4NItOPpi3QkLExAr/aLBGZMmTtW9WpdwBCJpRM6zj9WgWktXAl8IDIozwNMByT45JP3tO3ACWA==, tarball: https://registry.npmmirror.com/@vue/shared/-/shared-3.4.31.tgz} '@vuelidate/core@2.0.3': resolution: {integrity: sha512-AN6l7KF7+mEfyWG0doT96z+47ljwPpZfi9/JrNMkOGLFv27XVZvKzRLXlmDPQjPl/wOB1GNnHuc54jlCLRNqGA==, tarball: https://registry.npmmirror.com/@vuelidate/core/-/core-2.0.3.tgz} @@ -1376,8 +1376,8 @@ packages: resolution: {integrity: sha512-WeWA6c/1y415XaFYoCmueNaUg17vBP28JXZw+FjARas39FfJR5yTs3nG2sCFiexqHgPvlSJ+oN8sNUWhzMGPnA==, tarball: https://registry.npmmirror.com/bpmn-js-token-simulation/-/bpmn-js-token-simulation-0.34.2.tgz} engines: {node: '>= 16'} - bpmn-js@17.8.2: - resolution: {integrity: sha512-No3xH8SIhDrZDQ0Jc1XdeGVwafv9lWaYOWUNPx2QrFhY6GDSz8Tg6/FyEYXdGgsyqluwbdc34zwnKhJ5PdxXng==, tarball: https://registry.npmmirror.com/bpmn-js/-/bpmn-js-17.8.2.tgz} + bpmn-js@17.9.0: + resolution: {integrity: sha512-JmbyLWtaa04qZWtyjLcXBWsg+87SuYL2kY7+8wxa7uo6YDdWAoBXOSrGbfsp26ofvSa38LgNOYn7vBl3uABbUw==, tarball: https://registry.npmmirror.com/bpmn-js/-/bpmn-js-17.9.0.tgz} bpmn-moddle@8.1.0: resolution: {integrity: sha512-yI5OAFfYVJwViKTsTsonVfCBPtB3MlefADUORwNIxxBOMp21vnoxuxsdgUWlPH/dvAEZh/+mr8UtqOBNu8NC5Q==, tarball: https://registry.npmmirror.com/bpmn-moddle/-/bpmn-moddle-8.1.0.tgz} @@ -1431,8 +1431,8 @@ packages: camunda-bpmn-moddle@7.0.1: resolution: {integrity: sha512-Br8Diu6roMpziHdpl66Dhnm0DTnCFMrSD9zwLV08LpD52QA0UsXxU87XfHf08HjuB7ly0Hd1bvajZRpf9hbmYQ==, tarball: https://registry.npmmirror.com/camunda-bpmn-moddle/-/camunda-bpmn-moddle-7.0.1.tgz} - caniuse-lite@1.0.30001636: - resolution: {integrity: sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==, tarball: https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz} + caniuse-lite@1.0.30001639: + resolution: {integrity: sha512-eFHflNTBIlFwP2AIKaYuBQN/apnUoKNhBdza8ZnW/h2di4LCZ4xFqYlxUxo+LQ76KFI1PGcC1QDxMbxTZpSCAg==, tarball: https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001639.tgz} cfb@1.2.2: resolution: {integrity: sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==, tarball: https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz} @@ -1686,8 +1686,8 @@ packages: peerDependencies: diagram-js: '*' - diagram-js@14.7.1: - resolution: {integrity: sha512-XSWuB35iRuKPUVdYdArJb7OimI1oGj61M/7AtyfyS9uwlW//Z7edm4/yNbEUA4MEGhHJZbzg3wLexB1g2N/RmA==, tarball: https://registry.npmmirror.com/diagram-js/-/diagram-js-14.7.1.tgz} + diagram-js@14.8.0: + resolution: {integrity: sha512-HV3R6i+hl2PyhsdOQ1pqOsI+JCkX/bYJiHgO5zAaExORtuDrdGVDW7lKsEfcrcGA0fXfpEcmerjOmdH/PIvyJA==, tarball: https://registry.npmmirror.com/diagram-js/-/diagram-js-14.8.0.tgz} didi@10.2.2: resolution: {integrity: sha512-l8NYkYFXV1izHI65EyT8EXOjUZtKmQkHLTT89cSP7HU5J/G7AOj0dXKtLc04EXYlga99PBY18IPjOeZ+c3DI4w==, tarball: https://registry.npmmirror.com/didi/-/didi-10.2.2.tgz} @@ -1738,16 +1738,16 @@ packages: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==, tarball: https://registry.npmmirror.com/dotenv/-/dotenv-16.4.5.tgz} engines: {node: '>=12'} - echarts@5.5.0: - resolution: {integrity: sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==, tarball: https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz} + echarts@5.5.1: + resolution: {integrity: sha512-Fce8upazaAXUVUVsjgV6mBnGuqgO+JNDlcgF79Dksy4+wgGpQB2lmYoO4TSweFg/mZITdpGHomw/cNBJZj1icA==, tarball: https://registry.npmmirror.com/echarts/-/echarts-5.5.1.tgz} ejs@3.1.10: resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==, tarball: https://registry.npmmirror.com/ejs/-/ejs-3.1.10.tgz} engines: {node: '>=0.10.0'} hasBin: true - electron-to-chromium@1.4.810: - resolution: {integrity: sha512-Kaxhu4T7SJGpRQx99tq216gCq2nMxJo+uuT6uzz9l8TVN2stL7M06MIIXAtr9jsrLs2Glflgf2vMQRepxawOdQ==, tarball: https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.810.tgz} + electron-to-chromium@1.4.816: + resolution: {integrity: sha512-EKH5X5oqC6hLmiS7/vYtZHZFTNdhsYG5NVPRN6Yn0kQHNBlT59+xSM8HBy66P5fxWpKgZbPqb+diC64ng295Jw==, tarball: https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.816.tgz} element-resize-detector@1.2.4: resolution: {integrity: sha512-Fl5Ftk6WwXE0wqCgNoseKWndjzZlDCwuPTcoVZfCP9R3EHQF8qUtr3YUPNETegRBOKqQKPW3n4kiIWngGi8tKg==, tarball: https://registry.npmmirror.com/element-resize-detector/-/element-resize-detector-1.2.4.tgz} @@ -1866,8 +1866,8 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==, tarball: https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.5.0: - resolution: {integrity: sha512-+NAOZFrW/jFTS3dASCGBxX1pkFD0/fsO+hfAkJ4TyYKwgsXZbqzrw+seCYFCcPCYXvnD67tAnglU7GQTz6kcVw==, tarball: https://registry.npmmirror.com/eslint/-/eslint-9.5.0.tgz} + eslint@9.6.0: + resolution: {integrity: sha512-ElQkdLMEEqQNM9Njff+2Y4q2afHk7JpkPvrd7Xh7xefwgQynqPxwf55J7di9+MEibWUGdNjFF9ITG9Pck5M84w==, tarball: https://registry.npmmirror.com/eslint/-/eslint-9.6.0.tgz} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true @@ -2587,8 +2587,8 @@ packages: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==, tarball: https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz} engines: {node: '>=10'} - minimatch@9.0.4: - resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==, tarball: https://registry.npmmirror.com/minimatch/-/minimatch-9.0.4.tgz} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==, tarball: https://registry.npmmirror.com/minimatch/-/minimatch-9.0.5.tgz} engines: {node: '>=16 || 14 >=14.17'} minimist@1.2.7: @@ -2813,8 +2813,8 @@ packages: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==, tarball: https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz} engines: {node: '>=8'} - pkg-types@1.1.1: - resolution: {integrity: sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ==, tarball: https://registry.npmmirror.com/pkg-types/-/pkg-types-1.1.1.tgz} + pkg-types@1.1.2: + resolution: {integrity: sha512-VEGf1he2DR5yowYRl0XJhWJq5ktm9gYIsH+y8sNJpHlxch7JPDaufgrsl4vYjd9hMUY8QVjoNncKbow9I7exyA==, tarball: https://registry.npmmirror.com/pkg-types/-/pkg-types-1.1.2.tgz} postcss-html@1.7.0: resolution: {integrity: sha512-MfcMpSUIaR/nNgeVS8AyvyDugXlADjN9AcV7e5rDfrF1wduIAGSkL4q2+wgrZgA3sHVAHLDO9FuauHhZYW2nBw==, tarball: https://registry.npmmirror.com/postcss-html/-/postcss-html-1.7.0.tgz} @@ -2856,12 +2856,12 @@ packages: postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==, tarball: https://registry.npmmirror.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz} - postcss@8.4.38: - resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==, tarball: https://registry.npmmirror.com/postcss/-/postcss-8.4.38.tgz} + postcss@8.4.39: + resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==, tarball: https://registry.npmmirror.com/postcss/-/postcss-8.4.39.tgz} engines: {node: ^10 || ^12 || >=14} - preact@10.22.0: - resolution: {integrity: sha512-RRurnSjJPj4rp5K6XoP45Ui33ncb7e4H7WiOHVpjbkvqvA3U+N8Z6Qbo0AE6leGYBV66n8EhEaFixvIu3SkxFw==, tarball: https://registry.npmmirror.com/preact/-/preact-10.22.0.tgz} + preact@10.22.1: + resolution: {integrity: sha512-jRYbDDgMpIb5LHq3hkI0bbl+l/TQ9UnkdQ0ww+lp+4MMOdqaUYdFc5qeyP+IV8FAd/2Em7drVPeKdQxsiWCf/A==, tarball: https://registry.npmmirror.com/preact/-/preact-10.22.1.tgz} preferred-pm@3.1.3: resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==, tarball: https://registry.npmmirror.com/preferred-pm/-/preferred-pm-3.1.3.tgz} @@ -2895,8 +2895,8 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==, tarball: https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz} engines: {node: '>=6'} - qs@6.12.1: - resolution: {integrity: sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==, tarball: https://registry.npmmirror.com/qs/-/qs-6.12.1.tgz} + qs@6.12.2: + resolution: {integrity: sha512-x+NLUpx9SYrcwXtX7ob1gnkSems4i/mGZX5SlYxwIau6RrUSODO89TR/XDGGpn5RPWSYIB+aSfuSlV5+CmbTBg==, tarball: https://registry.npmmirror.com/qs/-/qs-6.12.2.tgz} engines: {node: '>=0.6'} quasar@2.16.4: @@ -3125,8 +3125,8 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz} engines: {node: '>=8'} - string-width@7.1.0: - resolution: {integrity: sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==, tarball: https://registry.npmmirror.com/string-width/-/string-width-7.1.0.tgz} + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==, tarball: https://registry.npmmirror.com/string-width/-/string-width-7.2.0.tgz} engines: {node: '>=18'} string_decoder@1.3.0: @@ -3263,8 +3263,8 @@ packages: svg-tags@1.0.0: resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==, tarball: https://registry.npmmirror.com/svg-tags/-/svg-tags-1.0.0.tgz} - sweetalert2@11.12.0: - resolution: {integrity: sha512-Fe6sitTNReNdPF1q1w4uz1GAVv9acZff9Q7YILH5n6O/ti3MzwgfEA0aQ6tLjpy+O1NLXnZjUE//xrbluGXzJw==, tarball: https://registry.npmmirror.com/sweetalert2/-/sweetalert2-11.12.0.tgz} + sweetalert2@11.12.1: + resolution: {integrity: sha512-xV3/YI7Ah6BeP+bXKcrHy1yn6duh8eqlX2TSI9I/rTIzGLYQvnnTa3mOIo5RHUobAjSmacC2IhPApxjvppZaEQ==, tarball: https://registry.npmmirror.com/sweetalert2/-/sweetalert2-11.12.1.tgz} synckit@0.8.8: resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==, tarball: https://registry.npmmirror.com/synckit/-/synckit-0.8.8.tgz} @@ -3360,8 +3360,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@5.5.2: - resolution: {integrity: sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==, tarball: https://registry.npmmirror.com/typescript/-/typescript-5.5.2.tgz} + typescript@5.5.3: + resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==, tarball: https://registry.npmmirror.com/typescript/-/typescript-5.5.3.tgz} engines: {node: '>=14.17'} hasBin: true @@ -3414,8 +3414,8 @@ packages: vue-template-es2015-compiler: optional: true - unplugin-vue-components@0.27.0: - resolution: {integrity: sha512-77eTEy23sQ0UpzGWnZ9I2mY3cnmXwklz4ITcn3JfxjCoX643ghImkiZ4nFm58sxbdVcc4Fo/o4LIoFnlqEqsSg==, tarball: https://registry.npmmirror.com/unplugin-vue-components/-/unplugin-vue-components-0.27.0.tgz} + unplugin-vue-components@0.27.2: + resolution: {integrity: sha512-YifnsmslMRNt+JRQiCG4ZX1+xUQuubUZm76K7Qtg8dmchZJkHIDxZSyfZb5/jqrLWMTm/TUjGJ3ZDlzO6SFnSQ==, tarball: https://registry.npmmirror.com/unplugin-vue-components/-/unplugin-vue-components-0.27.2.tgz} engines: {node: '>=14'} peerDependencies: '@babel/parser': ^7.15.8 @@ -3427,8 +3427,8 @@ packages: '@nuxt/kit': optional: true - unplugin@1.10.1: - resolution: {integrity: sha512-d6Mhq8RJeGA8UfKCu54Um4lFA0eSaRa3XxdAJg8tIdxbu1ubW0hBCZUL7yI2uGyYCRndvbK8FLHzqy2XKfeMsg==, tarball: https://registry.npmmirror.com/unplugin/-/unplugin-1.10.1.tgz} + unplugin@1.11.0: + resolution: {integrity: sha512-3r7VWZ/webh0SGgJScpWl2/MRCZK5d3ZYFcNaeci/GQ7Teop7zf0Nl2pUuz7G21BwPd9pcUPOC5KmJ2L3WgC5g==, tarball: https://registry.npmmirror.com/unplugin/-/unplugin-1.11.0.tgz} engines: {node: '>=14.0.0'} update-browserslist-db@1.0.16: @@ -3467,8 +3467,8 @@ packages: peerDependencies: vite: '>=2.0.0' - vite@5.3.1: - resolution: {integrity: sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==, tarball: https://registry.npmmirror.com/vite/-/vite-5.3.1.tgz} + vite@5.3.2: + resolution: {integrity: sha512-6lA7OBHBlXUxiJxbO5aAY2fsHHzDr1q7DvXYnyZycRs2Dz+dXBWuhpWHvmljTRTpQC2uvGmUFFkSHF2vGo90MA==, tarball: https://registry.npmmirror.com/vite/-/vite-5.3.2.tgz} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -3558,14 +3558,14 @@ packages: peerDependencies: typescript: '*' - vue-tsc@2.0.22: - resolution: {integrity: sha512-lMBIwPBO0sxCcmvu45yt1b035AaQ8/XSXQDk8m75y4j0jSXY/y/XzfEtssQ9JMS47lDaR10O3/926oCs8OeGUw==, tarball: https://registry.npmmirror.com/vue-tsc/-/vue-tsc-2.0.22.tgz} + vue-tsc@2.0.24: + resolution: {integrity: sha512-1qi4P8L7yS78A7OJ7CDDxUIZPD6nVxoQEgX3DkRZNi1HI1qOfzOJwQlNpmwkogSVD6S/XcanbW9sktzpSxz6rA==, tarball: https://registry.npmmirror.com/vue-tsc/-/vue-tsc-2.0.24.tgz} hasBin: true peerDependencies: - typescript: '*' + typescript: '>=5.0.0' - vue@3.4.30: - resolution: {integrity: sha512-NcxtKCwkdf1zPsr7Y8+QlDBCGqxvjLXF2EX+yi76rV5rrz90Y6gK1cq0olIhdWGgrlhs9ElHuhi9t3+W5sG5Xw==, tarball: https://registry.npmmirror.com/vue/-/vue-3.4.30.tgz} + vue@3.4.31: + resolution: {integrity: sha512-njqRrOy7W3YLAlVqSKpBebtZpDVg21FPoaq1I7f/+qqBThK9ChAIjkRWgeP6Eat+8C+iia4P3OYqpATP21BCoQ==, tarball: https://registry.npmmirror.com/vue/-/vue-3.4.31.tgz} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -3683,8 +3683,8 @@ packages: zeebe-bpmn-moddle@1.1.0: resolution: {integrity: sha512-ES/UZFO0VmKvAzL4+cD3VcQpKvlmgLtnFKTyiv0DdDcxNrdQg1rI0OmUdrKMiybAbtAgPDkVXZCusE3kkXwEyQ==, tarball: https://registry.npmmirror.com/zeebe-bpmn-moddle/-/zeebe-bpmn-moddle-1.1.0.tgz} - zrender@5.5.0: - resolution: {integrity: sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==, tarball: https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz} + zrender@5.6.0: + resolution: {integrity: sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==, tarball: https://registry.npmmirror.com/zrender/-/zrender-5.6.0.tgz} snapshots: @@ -3697,7 +3697,7 @@ snapshots: dependencies: '@jsdevtools/ez-spawn': 3.0.4 - '@antfu/utils@0.7.8': {} + '@antfu/utils@0.7.10': {} '@babel/code-frame@7.24.7': dependencies: @@ -3732,13 +3732,13 @@ snapshots: '@bpmn-io/cm-theme@0.1.0-alpha.2': dependencies: '@codemirror/language': 6.10.2 - '@codemirror/view': 6.28.2 + '@codemirror/view': 6.28.3 '@lezer/highlight': 1.2.0 '@bpmn-io/diagram-js-ui@0.2.3': dependencies: htm: 3.1.1 - preact: 10.22.0 + preact: 10.22.1 '@bpmn-io/extract-process-variables@0.8.0': dependencies: @@ -3747,12 +3747,12 @@ snapshots: '@bpmn-io/feel-editor@1.6.1(@lezer/common@1.2.1)': dependencies: '@bpmn-io/feel-lint': 1.2.0 - '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.2)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.3)(@lezer/common@1.2.1) '@codemirror/commands': 6.6.0 '@codemirror/language': 6.10.2 '@codemirror/lint': 6.8.1 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.28.2 + '@codemirror/view': 6.28.3 '@lezer/highlight': 1.2.0 lang-feel: 2.1.1 min-dom: 4.2.1 @@ -3767,7 +3767,7 @@ snapshots: '@bpmn-io/properties-panel@3.22.0(@lezer/common@1.2.1)': dependencies: '@bpmn-io/feel-editor': 1.6.1(@lezer/common@1.2.1) - '@codemirror/view': 6.28.2 + '@codemirror/view': 6.28.3 classnames: 2.5.1 feelers: 1.4.0 focus-trap: 7.5.4 @@ -3776,10 +3776,10 @@ snapshots: transitivePeerDependencies: - '@lezer/common' - '@changesets/apply-release-plan@7.0.3': + '@changesets/apply-release-plan@7.0.4': dependencies: '@babel/runtime': 7.24.7 - '@changesets/config': 3.0.1 + '@changesets/config': 3.0.2 '@changesets/get-version-range-type': 0.4.0 '@changesets/git': 3.0.0 '@changesets/should-skip-package': 0.1.0 @@ -3793,11 +3793,11 @@ snapshots: resolve-from: 5.0.0 semver: 7.6.2 - '@changesets/assemble-release-plan@6.0.2': + '@changesets/assemble-release-plan@6.0.3': dependencies: '@babel/runtime': 7.24.7 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.0 + '@changesets/get-dependents-graph': 2.1.1 '@changesets/should-skip-package': 0.1.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -3807,16 +3807,16 @@ snapshots: dependencies: '@changesets/types': 6.0.0 - '@changesets/cli@2.27.6': + '@changesets/cli@2.27.7': dependencies: '@babel/runtime': 7.24.7 - '@changesets/apply-release-plan': 7.0.3 - '@changesets/assemble-release-plan': 6.0.2 + '@changesets/apply-release-plan': 7.0.4 + '@changesets/assemble-release-plan': 6.0.3 '@changesets/changelog-git': 0.2.0 - '@changesets/config': 3.0.1 + '@changesets/config': 3.0.2 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.0 - '@changesets/get-release-plan': 4.0.2 + '@changesets/get-dependents-graph': 2.1.1 + '@changesets/get-release-plan': 4.0.3 '@changesets/git': 3.0.0 '@changesets/logger': 0.1.0 '@changesets/pre': 2.0.0 @@ -3842,10 +3842,10 @@ snapshots: spawndamnit: 2.0.0 term-size: 2.2.1 - '@changesets/config@3.0.1': + '@changesets/config@3.0.2': dependencies: '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.0 + '@changesets/get-dependents-graph': 2.1.1 '@changesets/logger': 0.1.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -3856,7 +3856,7 @@ snapshots: dependencies: extendable-error: 0.1.7 - '@changesets/get-dependents-graph@2.1.0': + '@changesets/get-dependents-graph@2.1.1': dependencies: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -3864,11 +3864,11 @@ snapshots: fs-extra: 7.0.1 semver: 7.6.2 - '@changesets/get-release-plan@4.0.2': + '@changesets/get-release-plan@4.0.3': dependencies: '@babel/runtime': 7.24.7 - '@changesets/assemble-release-plan': 6.0.2 - '@changesets/config': 3.0.1 + '@changesets/assemble-release-plan': 6.0.3 + '@changesets/config': 3.0.2 '@changesets/pre': 2.0.0 '@changesets/read': 0.6.0 '@changesets/types': 6.0.0 @@ -3932,24 +3932,24 @@ snapshots: human-id: 1.0.2 prettier: 2.8.8 - '@codemirror/autocomplete@6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.2)(@lezer/common@1.2.1)': + '@codemirror/autocomplete@6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.3)(@lezer/common@1.2.1)': dependencies: '@codemirror/language': 6.10.2 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.28.2 + '@codemirror/view': 6.28.3 '@lezer/common': 1.2.1 '@codemirror/commands@6.6.0': dependencies: '@codemirror/language': 6.10.2 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.28.2 + '@codemirror/view': 6.28.3 '@lezer/common': 1.2.1 '@codemirror/language@6.10.2': dependencies: '@codemirror/state': 6.4.1 - '@codemirror/view': 6.28.2 + '@codemirror/view': 6.28.3 '@lezer/common': 1.2.1 '@lezer/highlight': 1.2.0 '@lezer/lr': 1.4.1 @@ -3958,12 +3958,12 @@ snapshots: '@codemirror/lint@6.8.1': dependencies: '@codemirror/state': 6.4.1 - '@codemirror/view': 6.28.2 + '@codemirror/view': 6.28.3 crelt: 1.0.6 '@codemirror/state@6.4.1': {} - '@codemirror/view@6.28.2': + '@codemirror/view@6.28.3': dependencies: '@codemirror/state': 6.4.1 style-mod: 4.1.2 @@ -3978,15 +3978,15 @@ snapshots: '@commitlint/execute-rule@19.0.0': optional: true - '@commitlint/load@19.2.0(@types/node@20.14.8)(typescript@5.5.2)': + '@commitlint/load@19.2.0(@types/node@20.14.9)(typescript@5.5.3)': dependencies: '@commitlint/config-validator': 19.0.3 '@commitlint/execute-rule': 19.0.0 '@commitlint/resolve-extends': 19.1.0 '@commitlint/types': 19.0.3 chalk: 5.3.0 - cosmiconfig: 9.0.0(typescript@5.5.2) - cosmiconfig-typescript-loader: 5.0.0(@types/node@20.14.8)(cosmiconfig@9.0.0(typescript@5.5.2))(typescript@5.5.2) + cosmiconfig: 9.0.0(typescript@5.5.3) + cosmiconfig-typescript-loader: 5.0.0(@types/node@20.14.9)(cosmiconfig@9.0.0(typescript@5.5.3))(typescript@5.5.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -4011,16 +4011,16 @@ snapshots: chalk: 5.3.0 optional: true - '@csstools/css-parser-algorithms@2.6.3(@csstools/css-tokenizer@2.3.1)': + '@csstools/css-parser-algorithms@2.7.0(@csstools/css-tokenizer@2.3.2)': dependencies: - '@csstools/css-tokenizer': 2.3.1 + '@csstools/css-tokenizer': 2.3.2 - '@csstools/css-tokenizer@2.3.1': {} + '@csstools/css-tokenizer@2.3.2': {} - '@csstools/media-query-list-parser@2.1.11(@csstools/css-parser-algorithms@2.6.3(@csstools/css-tokenizer@2.3.1))(@csstools/css-tokenizer@2.3.1)': + '@csstools/media-query-list-parser@2.1.12(@csstools/css-parser-algorithms@2.7.0(@csstools/css-tokenizer@2.3.2))(@csstools/css-tokenizer@2.3.2)': dependencies: - '@csstools/css-parser-algorithms': 2.6.3(@csstools/css-tokenizer@2.3.1) - '@csstools/css-tokenizer': 2.3.1 + '@csstools/css-parser-algorithms': 2.7.0(@csstools/css-tokenizer@2.3.2) + '@csstools/css-tokenizer': 2.3.2 '@csstools/selector-specificity@3.1.1(postcss-selector-parser@6.1.0)': dependencies: @@ -4097,14 +4097,14 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.5.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.6.0)': dependencies: - eslint: 9.5.0 + eslint: 9.6.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.1': {} + '@eslint-community/regexpp@4.11.0': {} - '@eslint/config-array@0.16.0': + '@eslint/config-array@0.17.0': dependencies: '@eslint/object-schema': 2.1.4 debug: 4.3.5 @@ -4126,14 +4126,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.5.0': {} + '@eslint/js@9.6.0': {} '@eslint/object-schema@2.1.4': {} - '@highlightjs/vue-plugin@2.1.0(highlight.js@11.9.0)(vue@3.4.30(typescript@5.5.2))': + '@highlightjs/vue-plugin@2.1.0(highlight.js@11.9.0)(vue@3.4.31(typescript@5.5.3))': dependencies: highlight.js: 11.9.0 - vue: 3.4.30(typescript@5.5.2) + vue: 3.4.31(typescript@5.5.3) '@humanwhocodes/module-importer@1.0.1': {} @@ -4144,7 +4144,7 @@ snapshots: '@iconify/utils@2.1.25': dependencies: '@antfu/install-pkg': 0.1.1 - '@antfu/utils': 0.7.8 + '@antfu/utils': 0.7.10 '@iconify/types': 2.0.0 debug: 4.3.5 kolorist: 1.8.0 @@ -4227,23 +4227,23 @@ snapshots: '@mdi/js@7.4.47': {} - '@microsoft/api-extractor-model@7.28.13(@types/node@20.14.8)': + '@microsoft/api-extractor-model@7.28.13(@types/node@20.14.9)': dependencies: '@microsoft/tsdoc': 0.14.2 '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 4.0.2(@types/node@20.14.8) + '@rushstack/node-core-library': 4.0.2(@types/node@20.14.9) transitivePeerDependencies: - '@types/node' - '@microsoft/api-extractor@7.43.0(@types/node@20.14.8)': + '@microsoft/api-extractor@7.43.0(@types/node@20.14.9)': dependencies: - '@microsoft/api-extractor-model': 7.28.13(@types/node@20.14.8) + '@microsoft/api-extractor-model': 7.28.13(@types/node@20.14.9) '@microsoft/tsdoc': 0.14.2 '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 4.0.2(@types/node@20.14.8) + '@rushstack/node-core-library': 4.0.2(@types/node@20.14.9) '@rushstack/rig-package': 0.5.2 - '@rushstack/terminal': 0.10.0(@types/node@20.14.8) - '@rushstack/ts-command-line': 4.19.1(@types/node@20.14.8) + '@rushstack/terminal': 0.10.0(@types/node@20.14.9) + '@rushstack/ts-command-line': 4.19.1(@types/node@20.14.9) lodash: 4.17.21 minimatch: 3.0.8 resolve: 1.22.8 @@ -4278,12 +4278,12 @@ snapshots: '@quasar/extras@1.16.11': {} - '@quasar/vite-plugin@1.7.0(@vitejs/plugin-vue@5.0.5(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@3.4.30(typescript@5.5.2)))(quasar@2.16.4)(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@3.4.30(typescript@5.5.2))': + '@quasar/vite-plugin@1.7.0(@vitejs/plugin-vue@5.0.5(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1))(vue@3.4.31(typescript@5.5.3)))(quasar@2.16.4)(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1))(vue@3.4.31(typescript@5.5.3))': dependencies: - '@vitejs/plugin-vue': 5.0.5(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@3.4.30(typescript@5.5.2)) + '@vitejs/plugin-vue': 5.0.5(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1))(vue@3.4.31(typescript@5.5.3)) quasar: 2.16.4 - vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) - vue: 3.4.30(typescript@5.5.2) + vite: 5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1) + vue: 3.4.31(typescript@5.5.3) '@rollup/pluginutils@4.2.1': dependencies: @@ -4346,7 +4346,7 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.18.0': optional: true - '@rushstack/node-core-library@4.0.2(@types/node@20.14.8)': + '@rushstack/node-core-library@4.0.2(@types/node@20.14.9)': dependencies: fs-extra: 7.0.1 import-lazy: 4.0.0 @@ -4355,23 +4355,23 @@ snapshots: semver: 7.5.4 z-schema: 5.0.5 optionalDependencies: - '@types/node': 20.14.8 + '@types/node': 20.14.9 '@rushstack/rig-package@0.5.2': dependencies: resolve: 1.22.8 strip-json-comments: 3.1.1 - '@rushstack/terminal@0.10.0(@types/node@20.14.8)': + '@rushstack/terminal@0.10.0(@types/node@20.14.9)': dependencies: - '@rushstack/node-core-library': 4.0.2(@types/node@20.14.8) + '@rushstack/node-core-library': 4.0.2(@types/node@20.14.9) supports-color: 8.1.1 optionalDependencies: - '@types/node': 20.14.8 + '@types/node': 20.14.9 - '@rushstack/ts-command-line@4.19.1(@types/node@20.14.8)': + '@rushstack/ts-command-line@4.19.1(@types/node@20.14.9)': dependencies: - '@rushstack/terminal': 0.10.0(@types/node@20.14.8) + '@rushstack/terminal': 0.10.0(@types/node@20.14.9) '@types/argparse': 1.0.38 argparse: 1.0.10 string-argv: 0.3.2 @@ -4380,51 +4380,51 @@ snapshots: '@stomp/stompjs@7.0.0': {} - '@tsparticles/basic@3.4.0': + '@tsparticles/basic@3.5.0': dependencies: - '@tsparticles/engine': 3.4.0 - '@tsparticles/move-base': 3.4.0 - '@tsparticles/shape-circle': 3.4.0 - '@tsparticles/updater-color': 3.4.0 - '@tsparticles/updater-opacity': 3.4.0 - '@tsparticles/updater-out-modes': 3.4.0 - '@tsparticles/updater-size': 3.4.0 + '@tsparticles/engine': 3.5.0 + '@tsparticles/move-base': 3.5.0 + '@tsparticles/shape-circle': 3.5.0 + '@tsparticles/updater-color': 3.5.0 + '@tsparticles/updater-opacity': 3.5.0 + '@tsparticles/updater-out-modes': 3.5.0 + '@tsparticles/updater-size': 3.5.0 - '@tsparticles/engine@3.4.0': {} + '@tsparticles/engine@3.5.0': {} - '@tsparticles/interaction-particles-links@3.4.0': + '@tsparticles/interaction-particles-links@3.5.0': dependencies: - '@tsparticles/engine': 3.4.0 + '@tsparticles/engine': 3.5.0 - '@tsparticles/move-base@3.4.0': + '@tsparticles/move-base@3.5.0': dependencies: - '@tsparticles/engine': 3.4.0 + '@tsparticles/engine': 3.5.0 - '@tsparticles/shape-circle@3.4.0': + '@tsparticles/shape-circle@3.5.0': dependencies: - '@tsparticles/engine': 3.4.0 + '@tsparticles/engine': 3.5.0 - '@tsparticles/updater-color@3.4.0': + '@tsparticles/updater-color@3.5.0': dependencies: - '@tsparticles/engine': 3.4.0 + '@tsparticles/engine': 3.5.0 - '@tsparticles/updater-opacity@3.4.0': + '@tsparticles/updater-opacity@3.5.0': dependencies: - '@tsparticles/engine': 3.4.0 + '@tsparticles/engine': 3.5.0 - '@tsparticles/updater-out-modes@3.4.0': + '@tsparticles/updater-out-modes@3.5.0': dependencies: - '@tsparticles/engine': 3.4.0 + '@tsparticles/engine': 3.5.0 - '@tsparticles/updater-size@3.4.0': + '@tsparticles/updater-size@3.5.0': dependencies: - '@tsparticles/engine': 3.4.0 + '@tsparticles/engine': 3.5.0 '@types/argparse@1.0.38': {} '@types/conventional-commits-parser@5.0.0': dependencies: - '@types/node': 20.14.8 + '@types/node': 20.14.9 optional: true '@types/crypto-js@4.2.2': {} @@ -4445,15 +4445,15 @@ snapshots: '@types/lodash-es@4.17.12': dependencies: - '@types/lodash': 4.17.5 + '@types/lodash': 4.17.6 - '@types/lodash@4.17.5': {} + '@types/lodash@4.17.6': {} '@types/node@12.20.55': {} '@types/node@13.13.52': {} - '@types/node@20.14.8': + '@types/node@20.14.9': dependencies: undici-types: 5.26.5 @@ -4465,225 +4465,225 @@ snapshots: '@types/web-bluetooth@0.0.20': {} - '@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.5.2))(eslint@9.5.0)(typescript@5.5.2)': + '@typescript-eslint/eslint-plugin@7.15.0(@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.3))(eslint@9.6.0)(typescript@5.5.3)': dependencies: - '@eslint-community/regexpp': 4.10.1 - '@typescript-eslint/parser': 7.13.1(eslint@9.5.0)(typescript@5.5.2) - '@typescript-eslint/scope-manager': 7.13.1 - '@typescript-eslint/type-utils': 7.13.1(eslint@9.5.0)(typescript@5.5.2) - '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.5.2) - '@typescript-eslint/visitor-keys': 7.13.1 - eslint: 9.5.0 + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 7.15.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/type-utils': 7.15.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/utils': 7.15.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 7.15.0 + eslint: 9.6.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.2) + ts-api-utils: 1.3.0(typescript@5.5.3) optionalDependencies: - typescript: 5.5.2 + typescript: 5.5.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.5.2)': + '@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.3)': dependencies: - '@typescript-eslint/scope-manager': 7.13.1 - '@typescript-eslint/types': 7.13.1 - '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.5.2) - '@typescript-eslint/visitor-keys': 7.13.1 + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 7.15.0 debug: 4.3.5 - eslint: 9.5.0 + eslint: 9.6.0 optionalDependencies: - typescript: 5.5.2 + typescript: 5.5.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.13.1': + '@typescript-eslint/scope-manager@7.15.0': dependencies: - '@typescript-eslint/types': 7.13.1 - '@typescript-eslint/visitor-keys': 7.13.1 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/visitor-keys': 7.15.0 - '@typescript-eslint/type-utils@7.13.1(eslint@9.5.0)(typescript@5.5.2)': + '@typescript-eslint/type-utils@7.15.0(eslint@9.6.0)(typescript@5.5.3)': dependencies: - '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.5.2) - '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.5.2) + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.3) + '@typescript-eslint/utils': 7.15.0(eslint@9.6.0)(typescript@5.5.3) debug: 4.3.5 - eslint: 9.5.0 - ts-api-utils: 1.3.0(typescript@5.5.2) + eslint: 9.6.0 + ts-api-utils: 1.3.0(typescript@5.5.3) optionalDependencies: - typescript: 5.5.2 + typescript: 5.5.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@7.13.1': {} + '@typescript-eslint/types@7.15.0': {} - '@typescript-eslint/typescript-estree@7.13.1(typescript@5.5.2)': + '@typescript-eslint/typescript-estree@7.15.0(typescript@5.5.3)': dependencies: - '@typescript-eslint/types': 7.13.1 - '@typescript-eslint/visitor-keys': 7.13.1 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/visitor-keys': 7.15.0 debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 - minimatch: 9.0.4 + minimatch: 9.0.5 semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.5.2) + ts-api-utils: 1.3.0(typescript@5.5.3) optionalDependencies: - typescript: 5.5.2 + typescript: 5.5.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.13.1(eslint@9.5.0)(typescript@5.5.2)': + '@typescript-eslint/utils@7.15.0(eslint@9.6.0)(typescript@5.5.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) - '@typescript-eslint/scope-manager': 7.13.1 - '@typescript-eslint/types': 7.13.1 - '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.5.2) - eslint: 9.5.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.3) + eslint: 9.6.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.13.1': + '@typescript-eslint/visitor-keys@7.15.0': dependencies: - '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/types': 7.15.0 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.0.5(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@3.4.30(typescript@5.5.2))': + '@vitejs/plugin-vue@5.0.5(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1))(vue@3.4.31(typescript@5.5.3))': dependencies: - vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) - vue: 3.4.30(typescript@5.5.2) + vite: 5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1) + vue: 3.4.31(typescript@5.5.3) '@volar/language-core@1.11.1': dependencies: '@volar/source-map': 1.11.1 - '@volar/language-core@2.3.3': + '@volar/language-core@2.4.0-alpha.11': dependencies: - '@volar/source-map': 2.3.3 + '@volar/source-map': 2.4.0-alpha.11 '@volar/source-map@1.11.1': dependencies: muggle-string: 0.3.1 - '@volar/source-map@2.3.3': {} + '@volar/source-map@2.4.0-alpha.11': {} '@volar/typescript@1.11.1': dependencies: '@volar/language-core': 1.11.1 path-browserify: 1.0.1 - '@volar/typescript@2.3.3': + '@volar/typescript@2.4.0-alpha.11': dependencies: - '@volar/language-core': 2.3.3 + '@volar/language-core': 2.4.0-alpha.11 path-browserify: 1.0.1 vscode-uri: 3.0.8 - '@vue/compiler-core@3.4.30': + '@vue/compiler-core@3.4.31': dependencies: '@babel/parser': 7.24.7 - '@vue/shared': 3.4.30 + '@vue/shared': 3.4.31 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.0 - '@vue/compiler-dom@3.4.30': + '@vue/compiler-dom@3.4.31': dependencies: - '@vue/compiler-core': 3.4.30 - '@vue/shared': 3.4.30 + '@vue/compiler-core': 3.4.31 + '@vue/shared': 3.4.31 - '@vue/compiler-sfc@3.4.30': + '@vue/compiler-sfc@3.4.31': dependencies: '@babel/parser': 7.24.7 - '@vue/compiler-core': 3.4.30 - '@vue/compiler-dom': 3.4.30 - '@vue/compiler-ssr': 3.4.30 - '@vue/shared': 3.4.30 + '@vue/compiler-core': 3.4.31 + '@vue/compiler-dom': 3.4.31 + '@vue/compiler-ssr': 3.4.31 + '@vue/shared': 3.4.31 estree-walker: 2.0.2 magic-string: 0.30.10 - postcss: 8.4.38 + postcss: 8.4.39 source-map-js: 1.2.0 - '@vue/compiler-ssr@3.4.30': + '@vue/compiler-ssr@3.4.31': dependencies: - '@vue/compiler-dom': 3.4.30 - '@vue/shared': 3.4.30 + '@vue/compiler-dom': 3.4.31 + '@vue/shared': 3.4.31 '@vue/devtools-api@6.6.3': {} - '@vue/language-core@1.8.27(typescript@5.5.2)': + '@vue/language-core@1.8.27(typescript@5.5.3)': dependencies: '@volar/language-core': 1.11.1 '@volar/source-map': 1.11.1 - '@vue/compiler-dom': 3.4.30 - '@vue/shared': 3.4.30 + '@vue/compiler-dom': 3.4.31 + '@vue/shared': 3.4.31 computeds: 0.0.1 - minimatch: 9.0.4 + minimatch: 9.0.5 muggle-string: 0.3.1 path-browserify: 1.0.1 vue-template-compiler: 2.7.16 optionalDependencies: - typescript: 5.5.2 + typescript: 5.5.3 - '@vue/language-core@2.0.22(typescript@5.5.2)': + '@vue/language-core@2.0.24(typescript@5.5.3)': dependencies: - '@volar/language-core': 2.3.3 - '@vue/compiler-dom': 3.4.30 - '@vue/shared': 3.4.30 + '@volar/language-core': 2.4.0-alpha.11 + '@vue/compiler-dom': 3.4.31 + '@vue/shared': 3.4.31 computeds: 0.0.1 - minimatch: 9.0.4 + minimatch: 9.0.5 muggle-string: 0.4.1 path-browserify: 1.0.1 vue-template-compiler: 2.7.16 optionalDependencies: - typescript: 5.5.2 + typescript: 5.5.3 - '@vue/reactivity@3.4.30': + '@vue/reactivity@3.4.31': dependencies: - '@vue/shared': 3.4.30 + '@vue/shared': 3.4.31 - '@vue/runtime-core@3.4.30': + '@vue/runtime-core@3.4.31': dependencies: - '@vue/reactivity': 3.4.30 - '@vue/shared': 3.4.30 + '@vue/reactivity': 3.4.31 + '@vue/shared': 3.4.31 - '@vue/runtime-dom@3.4.30': + '@vue/runtime-dom@3.4.31': dependencies: - '@vue/reactivity': 3.4.30 - '@vue/runtime-core': 3.4.30 - '@vue/shared': 3.4.30 + '@vue/reactivity': 3.4.31 + '@vue/runtime-core': 3.4.31 + '@vue/shared': 3.4.31 csstype: 3.1.3 - '@vue/server-renderer@3.4.30(vue@3.4.30(typescript@5.5.2))': + '@vue/server-renderer@3.4.31(vue@3.4.31(typescript@5.5.3))': dependencies: - '@vue/compiler-ssr': 3.4.30 - '@vue/shared': 3.4.30 - vue: 3.4.30(typescript@5.5.2) + '@vue/compiler-ssr': 3.4.31 + '@vue/shared': 3.4.31 + vue: 3.4.31(typescript@5.5.3) - '@vue/shared@3.4.30': {} + '@vue/shared@3.4.31': {} - '@vuelidate/core@2.0.3(vue@3.4.30(typescript@5.5.2))': + '@vuelidate/core@2.0.3(vue@3.4.31(typescript@5.5.3))': dependencies: - vue: 3.4.30(typescript@5.5.2) - vue-demi: 0.13.11(vue@3.4.30(typescript@5.5.2)) + vue: 3.4.31(typescript@5.5.3) + vue-demi: 0.13.11(vue@3.4.31(typescript@5.5.3)) - '@vuelidate/validators@2.0.4(vue@3.4.30(typescript@5.5.2))': + '@vuelidate/validators@2.0.4(vue@3.4.31(typescript@5.5.3))': dependencies: - vue: 3.4.30(typescript@5.5.2) - vue-demi: 0.13.11(vue@3.4.30(typescript@5.5.2)) + vue: 3.4.31(typescript@5.5.3) + vue-demi: 0.13.11(vue@3.4.31(typescript@5.5.3)) - '@vueuse/core@10.11.0(vue@3.4.30(typescript@5.5.2))': + '@vueuse/core@10.11.0(vue@3.4.31(typescript@5.5.3))': dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 10.11.0 - '@vueuse/shared': 10.11.0(vue@3.4.30(typescript@5.5.2)) - vue-demi: 0.14.8(vue@3.4.30(typescript@5.5.2)) + '@vueuse/shared': 10.11.0(vue@3.4.31(typescript@5.5.3)) + vue-demi: 0.14.8(vue@3.4.31(typescript@5.5.3)) transitivePeerDependencies: - '@vue/composition-api' - vue '@vueuse/metadata@10.11.0': {} - '@vueuse/shared@10.11.0(vue@3.4.30(typescript@5.5.2))': + '@vueuse/shared@10.11.0(vue@3.4.31(typescript@5.5.3))': dependencies: - vue-demi: 0.14.8(vue@3.4.30(typescript@5.5.2)) + vue-demi: 0.14.8(vue@3.4.31(typescript@5.5.3)) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -4875,14 +4875,14 @@ snapshots: boolbase@1.0.0: {} - bpmn-js-properties-panel@5.18.0(@bpmn-io/properties-panel@3.22.0(@lezer/common@1.2.1))(bpmn-js@17.8.2)(camunda-bpmn-js-behaviors@1.3.0(bpmn-js@17.8.2)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.1.0))(diagram-js@14.7.1): + bpmn-js-properties-panel@5.18.0(@bpmn-io/properties-panel@3.22.0(@lezer/common@1.2.1))(bpmn-js@17.9.0)(camunda-bpmn-js-behaviors@1.3.0(bpmn-js@17.9.0)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.1.0))(diagram-js@14.8.0): dependencies: '@bpmn-io/extract-process-variables': 0.8.0 '@bpmn-io/properties-panel': 3.22.0(@lezer/common@1.2.1) array-move: 4.0.0 - bpmn-js: 17.8.2 - camunda-bpmn-js-behaviors: 1.3.0(bpmn-js@17.8.2)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.1.0) - diagram-js: 14.7.1 + bpmn-js: 17.9.0 + camunda-bpmn-js-behaviors: 1.3.0(bpmn-js@17.9.0)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.1.0) + diagram-js: 14.8.0 ids: 1.0.5 min-dash: 4.2.1 min-dom: 4.2.1 @@ -4894,11 +4894,11 @@ snapshots: min-dom: 5.1.1 randomcolor: 0.6.2 - bpmn-js@17.8.2: + bpmn-js@17.9.0: dependencies: bpmn-moddle: 8.1.0 - diagram-js: 14.7.1 - diagram-js-direct-editing: 3.0.1(diagram-js@14.7.1) + diagram-js: 14.8.0 + diagram-js-direct-editing: 3.0.1(diagram-js@14.8.0) ids: 1.0.5 inherits-browser: 0.1.0 min-dash: 4.2.1 @@ -4926,8 +4926,8 @@ snapshots: browserslist@4.23.1: dependencies: - caniuse-lite: 1.0.30001636 - electron-to-chromium: 1.4.810 + caniuse-lite: 1.0.30001639 + electron-to-chromium: 1.4.816 node-releases: 2.0.14 update-browserslist-db: 1.0.16(browserslist@4.23.1) @@ -4957,9 +4957,9 @@ snapshots: pascal-case: 3.1.2 tslib: 2.6.3 - camunda-bpmn-js-behaviors@1.3.0(bpmn-js@17.8.2)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.1.0): + camunda-bpmn-js-behaviors@1.3.0(bpmn-js@17.9.0)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.1.0): dependencies: - bpmn-js: 17.8.2 + bpmn-js: 17.9.0 camunda-bpmn-moddle: 7.0.1 ids: 1.0.5 min-dash: 4.2.1 @@ -4967,7 +4967,7 @@ snapshots: camunda-bpmn-moddle@7.0.1: {} - caniuse-lite@1.0.30001636: {} + caniuse-lite@1.0.30001639: {} cfb@1.2.2: dependencies: @@ -5024,7 +5024,7 @@ snapshots: cli-truncate@4.0.0: dependencies: slice-ansi: 5.0.0 - string-width: 7.1.0 + string-width: 7.2.0 cli-width@3.0.0: {} @@ -5069,10 +5069,10 @@ snapshots: commander@9.5.0: optional: true - commitizen@4.3.0(@types/node@20.14.8)(typescript@5.5.2): + commitizen@4.3.0(@types/node@20.14.9)(typescript@5.5.3): dependencies: cachedir: 2.3.0 - cz-conventional-changelog: 3.3.0(@types/node@20.14.8)(typescript@5.5.2) + cz-conventional-changelog: 3.3.0(@types/node@20.14.9)(typescript@5.5.3) dedent: 0.7.0 detect-indent: 6.1.0 find-node-modules: 2.1.3 @@ -5103,22 +5103,22 @@ snapshots: conventional-commit-types@3.0.0: {} - cosmiconfig-typescript-loader@5.0.0(@types/node@20.14.8)(cosmiconfig@9.0.0(typescript@5.5.2))(typescript@5.5.2): + cosmiconfig-typescript-loader@5.0.0(@types/node@20.14.9)(cosmiconfig@9.0.0(typescript@5.5.3))(typescript@5.5.3): dependencies: - '@types/node': 20.14.8 - cosmiconfig: 9.0.0(typescript@5.5.2) + '@types/node': 20.14.9 + cosmiconfig: 9.0.0(typescript@5.5.3) jiti: 1.21.6 - typescript: 5.5.2 + typescript: 5.5.3 optional: true - cosmiconfig@9.0.0(typescript@5.5.2): + cosmiconfig@9.0.0(typescript@5.5.3): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.5.2 + typescript: 5.5.3 crc-32@1.2.2: {} @@ -5163,16 +5163,16 @@ snapshots: csstype@3.1.3: {} - cz-conventional-changelog@3.3.0(@types/node@20.14.8)(typescript@5.5.2): + cz-conventional-changelog@3.3.0(@types/node@20.14.9)(typescript@5.5.3): dependencies: chalk: 2.4.2 - commitizen: 4.3.0(@types/node@20.14.8)(typescript@5.5.2) + commitizen: 4.3.0(@types/node@20.14.9)(typescript@5.5.3) conventional-commit-types: 3.0.0 lodash.map: 4.6.0 longest: 2.0.1 word-wrap: 1.2.5 optionalDependencies: - '@commitlint/load': 19.2.0(@types/node@20.14.8)(typescript@5.5.2) + '@commitlint/load': 19.2.0(@types/node@20.14.9)(typescript@5.5.3) transitivePeerDependencies: - '@types/node' - typescript @@ -5205,13 +5205,13 @@ snapshots: detect-indent@6.1.0: {} - diagram-js-direct-editing@3.0.1(diagram-js@14.7.1): + diagram-js-direct-editing@3.0.1(diagram-js@14.8.0): dependencies: - diagram-js: 14.7.1 + diagram-js: 14.8.0 min-dash: 4.2.1 min-dom: 4.2.1 - diagram-js@14.7.1: + diagram-js@14.8.0: dependencies: '@bpmn-io/diagram-js-ui': 0.2.3 clsx: 2.1.1 @@ -5276,16 +5276,16 @@ snapshots: dotenv@16.4.5: {} - echarts@5.5.0: + echarts@5.5.1: dependencies: tslib: 2.3.0 - zrender: 5.5.0 + zrender: 5.6.0 ejs@3.1.10: dependencies: jake: 10.9.1 - electron-to-chromium@1.4.810: {} + electron-to-chromium@1.4.816: {} element-resize-detector@1.2.4: dependencies: @@ -5357,37 +5357,37 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-config-prettier@9.1.0(eslint@9.5.0): + eslint-config-prettier@9.1.0(eslint@9.6.0): dependencies: - eslint: 9.5.0 + eslint: 9.6.0 eslint-define-config@2.1.0: {} - eslint-plugin-prettier@5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@9.5.0))(eslint@9.5.0)(prettier@3.3.2): + eslint-plugin-prettier@5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@9.6.0))(eslint@9.6.0)(prettier@3.3.2): dependencies: - eslint: 9.5.0 + eslint: 9.6.0 prettier: 3.3.2 prettier-linter-helpers: 1.0.0 synckit: 0.8.8 optionalDependencies: '@types/eslint': 8.56.10 - eslint-config-prettier: 9.1.0(eslint@9.5.0) + eslint-config-prettier: 9.1.0(eslint@9.6.0) eslint-plugin-quasar@1.1.0: dependencies: requireindex: 1.2.0 semver-compare: 1.0.0 - eslint-plugin-vue@9.26.0(eslint@9.5.0): + eslint-plugin-vue@9.26.0(eslint@9.6.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) - eslint: 9.5.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) + eslint: 9.6.0 globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.1.0 semver: 7.6.2 - vue-eslint-parser: 9.4.3(eslint@9.5.0) + vue-eslint-parser: 9.4.3(eslint@9.6.0) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -5411,13 +5411,13 @@ snapshots: eslint-visitor-keys@4.0.0: {} - eslint@9.5.0: + eslint@9.6.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) - '@eslint-community/regexpp': 4.10.1 - '@eslint/config-array': 0.16.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) + '@eslint-community/regexpp': 4.11.0 + '@eslint/config-array': 0.17.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.5.0 + '@eslint/js': 9.6.0 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 @@ -5550,12 +5550,12 @@ snapshots: dependencies: '@bpmn-io/cm-theme': 0.1.0-alpha.2 '@bpmn-io/feel-lint': 1.2.0 - '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.2)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.3)(@lezer/common@1.2.1) '@codemirror/commands': 6.6.0 '@codemirror/language': 6.10.2 '@codemirror/lint': 6.8.1 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.28.2 + '@codemirror/view': 6.28.3 '@lezer/common': 1.2.1 '@lezer/highlight': 1.2.0 '@lezer/lr': 1.4.1 @@ -5942,7 +5942,7 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 20.14.8 + '@types/node': 20.14.9 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -6002,10 +6002,10 @@ snapshots: lang-feel@2.1.1: dependencies: - '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.2)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.16.3(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.28.3)(@lezer/common@1.2.1) '@codemirror/language': 6.10.2 '@codemirror/state': 6.4.1 - '@codemirror/view': 6.28.2 + '@codemirror/view': 6.28.3 '@lezer/common': 1.2.1 lezer-feel: 1.2.9 @@ -6059,7 +6059,7 @@ snapshots: local-pkg@0.5.0: dependencies: mlly: 1.7.1 - pkg-types: 1.1.1 + pkg-types: 1.1.2 locate-path@5.0.0: dependencies: @@ -6180,7 +6180,7 @@ snapshots: dependencies: brace-expansion: 2.0.1 - minimatch@9.0.4: + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -6190,7 +6190,7 @@ snapshots: dependencies: acorn: 8.12.0 pathe: 1.1.2 - pkg-types: 1.1.1 + pkg-types: 1.1.2 ufo: 1.5.3 moddle-xml@10.1.0: @@ -6369,23 +6369,23 @@ snapshots: pify@4.0.1: {} - pinia-plugin-persistedstate@3.2.1(pinia@2.1.7(typescript@5.5.2)(vue@3.4.30(typescript@5.5.2))): + pinia-plugin-persistedstate@3.2.1(pinia@2.1.7(typescript@5.5.3)(vue@3.4.31(typescript@5.5.3))): dependencies: - pinia: 2.1.7(typescript@5.5.2)(vue@3.4.30(typescript@5.5.2)) + pinia: 2.1.7(typescript@5.5.3)(vue@3.4.31(typescript@5.5.3)) - pinia@2.1.7(typescript@5.5.2)(vue@3.4.30(typescript@5.5.2)): + pinia@2.1.7(typescript@5.5.3)(vue@3.4.31(typescript@5.5.3)): dependencies: '@vue/devtools-api': 6.6.3 - vue: 3.4.30(typescript@5.5.2) - vue-demi: 0.14.8(vue@3.4.30(typescript@5.5.2)) + vue: 3.4.31(typescript@5.5.3) + vue-demi: 0.14.8(vue@3.4.31(typescript@5.5.3)) optionalDependencies: - typescript: 5.5.2 + typescript: 5.5.3 pkg-dir@4.2.0: dependencies: find-up: 4.1.0 - pkg-types@1.1.1: + pkg-types@1.1.2: dependencies: confbox: 0.1.7 mlly: 1.7.1 @@ -6395,43 +6395,43 @@ snapshots: dependencies: htmlparser2: 8.0.2 js-tokens: 9.0.0 - postcss: 8.4.38 - postcss-safe-parser: 6.0.0(postcss@8.4.38) + postcss: 8.4.39 + postcss-safe-parser: 6.0.0(postcss@8.4.39) postcss-media-query-parser@0.2.3: {} postcss-resolve-nested-selector@0.1.1: {} - postcss-safe-parser@6.0.0(postcss@8.4.38): + postcss-safe-parser@6.0.0(postcss@8.4.39): dependencies: - postcss: 8.4.38 + postcss: 8.4.39 - postcss-safe-parser@7.0.0(postcss@8.4.38): + postcss-safe-parser@7.0.0(postcss@8.4.39): dependencies: - postcss: 8.4.38 + postcss: 8.4.39 - postcss-scss@4.0.9(postcss@8.4.38): + postcss-scss@4.0.9(postcss@8.4.39): dependencies: - postcss: 8.4.38 + postcss: 8.4.39 postcss-selector-parser@6.1.0: dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-sorting@8.0.2(postcss@8.4.38): + postcss-sorting@8.0.2(postcss@8.4.39): dependencies: - postcss: 8.4.38 + postcss: 8.4.39 postcss-value-parser@4.2.0: {} - postcss@8.4.38: + postcss@8.4.39: dependencies: nanoid: 3.3.7 picocolors: 1.0.1 source-map-js: 1.2.0 - preact@10.22.0: {} + preact@10.22.1: {} preferred-pm@3.1.3: dependencies: @@ -6456,7 +6456,7 @@ snapshots: punycode@2.3.1: {} - qs@6.12.1: + qs@6.12.2: dependencies: side-channel: 1.0.6 @@ -6690,7 +6690,7 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - string-width@7.1.0: + string-width@7.2.0: dependencies: emoji-regex: 10.3.0 get-east-asian-width: 1.2.0 @@ -6724,79 +6724,79 @@ snapshots: style-mod@4.1.2: {} - stylelint-config-html@1.1.0(postcss-html@1.7.0)(stylelint@16.6.1(typescript@5.5.2)): + stylelint-config-html@1.1.0(postcss-html@1.7.0)(stylelint@16.6.1(typescript@5.5.3)): dependencies: postcss-html: 1.7.0 - stylelint: 16.6.1(typescript@5.5.2) + stylelint: 16.6.1(typescript@5.5.3) - stylelint-config-prettier@9.0.5(stylelint@16.6.1(typescript@5.5.2)): + stylelint-config-prettier@9.0.5(stylelint@16.6.1(typescript@5.5.3)): dependencies: - stylelint: 16.6.1(typescript@5.5.2) + stylelint: 16.6.1(typescript@5.5.3) - stylelint-config-recess-order@5.0.1(stylelint@16.6.1(typescript@5.5.2)): + stylelint-config-recess-order@5.0.1(stylelint@16.6.1(typescript@5.5.3)): dependencies: - stylelint: 16.6.1(typescript@5.5.2) - stylelint-order: 6.0.4(stylelint@16.6.1(typescript@5.5.2)) + stylelint: 16.6.1(typescript@5.5.3) + stylelint-order: 6.0.4(stylelint@16.6.1(typescript@5.5.3)) - stylelint-config-recommended-scss@14.0.0(postcss@8.4.38)(stylelint@16.6.1(typescript@5.5.2)): + stylelint-config-recommended-scss@14.0.0(postcss@8.4.39)(stylelint@16.6.1(typescript@5.5.3)): dependencies: - postcss-scss: 4.0.9(postcss@8.4.38) - stylelint: 16.6.1(typescript@5.5.2) - stylelint-config-recommended: 14.0.1(stylelint@16.6.1(typescript@5.5.2)) - stylelint-scss: 6.3.2(stylelint@16.6.1(typescript@5.5.2)) + postcss-scss: 4.0.9(postcss@8.4.39) + stylelint: 16.6.1(typescript@5.5.3) + stylelint-config-recommended: 14.0.1(stylelint@16.6.1(typescript@5.5.3)) + stylelint-scss: 6.3.2(stylelint@16.6.1(typescript@5.5.3)) optionalDependencies: - postcss: 8.4.38 + postcss: 8.4.39 - stylelint-config-recommended-vue@1.5.0(postcss-html@1.7.0)(stylelint@16.6.1(typescript@5.5.2)): + stylelint-config-recommended-vue@1.5.0(postcss-html@1.7.0)(stylelint@16.6.1(typescript@5.5.3)): dependencies: postcss-html: 1.7.0 semver: 7.6.2 - stylelint: 16.6.1(typescript@5.5.2) - stylelint-config-html: 1.1.0(postcss-html@1.7.0)(stylelint@16.6.1(typescript@5.5.2)) - stylelint-config-recommended: 14.0.1(stylelint@16.6.1(typescript@5.5.2)) + stylelint: 16.6.1(typescript@5.5.3) + stylelint-config-html: 1.1.0(postcss-html@1.7.0)(stylelint@16.6.1(typescript@5.5.3)) + stylelint-config-recommended: 14.0.1(stylelint@16.6.1(typescript@5.5.3)) - stylelint-config-recommended@14.0.1(stylelint@16.6.1(typescript@5.5.2)): + stylelint-config-recommended@14.0.1(stylelint@16.6.1(typescript@5.5.3)): dependencies: - stylelint: 16.6.1(typescript@5.5.2) + stylelint: 16.6.1(typescript@5.5.3) - stylelint-config-standard-scss@13.1.0(postcss@8.4.38)(stylelint@16.6.1(typescript@5.5.2)): + stylelint-config-standard-scss@13.1.0(postcss@8.4.39)(stylelint@16.6.1(typescript@5.5.3)): dependencies: - stylelint: 16.6.1(typescript@5.5.2) - stylelint-config-recommended-scss: 14.0.0(postcss@8.4.38)(stylelint@16.6.1(typescript@5.5.2)) - stylelint-config-standard: 36.0.1(stylelint@16.6.1(typescript@5.5.2)) + stylelint: 16.6.1(typescript@5.5.3) + stylelint-config-recommended-scss: 14.0.0(postcss@8.4.39)(stylelint@16.6.1(typescript@5.5.3)) + stylelint-config-standard: 36.0.1(stylelint@16.6.1(typescript@5.5.3)) optionalDependencies: - postcss: 8.4.38 + postcss: 8.4.39 - stylelint-config-standard@36.0.1(stylelint@16.6.1(typescript@5.5.2)): + stylelint-config-standard@36.0.1(stylelint@16.6.1(typescript@5.5.3)): dependencies: - stylelint: 16.6.1(typescript@5.5.2) - stylelint-config-recommended: 14.0.1(stylelint@16.6.1(typescript@5.5.2)) + stylelint: 16.6.1(typescript@5.5.3) + stylelint-config-recommended: 14.0.1(stylelint@16.6.1(typescript@5.5.3)) - stylelint-order@6.0.4(stylelint@16.6.1(typescript@5.5.2)): + stylelint-order@6.0.4(stylelint@16.6.1(typescript@5.5.3)): dependencies: - postcss: 8.4.38 - postcss-sorting: 8.0.2(postcss@8.4.38) - stylelint: 16.6.1(typescript@5.5.2) + postcss: 8.4.39 + postcss-sorting: 8.0.2(postcss@8.4.39) + stylelint: 16.6.1(typescript@5.5.3) - stylelint-scss@6.3.2(stylelint@16.6.1(typescript@5.5.2)): + stylelint-scss@6.3.2(stylelint@16.6.1(typescript@5.5.3)): dependencies: known-css-properties: 0.31.0 postcss-media-query-parser: 0.2.3 postcss-resolve-nested-selector: 0.1.1 postcss-selector-parser: 6.1.0 postcss-value-parser: 4.2.0 - stylelint: 16.6.1(typescript@5.5.2) + stylelint: 16.6.1(typescript@5.5.3) - stylelint@16.6.1(typescript@5.5.2): + stylelint@16.6.1(typescript@5.5.3): dependencies: - '@csstools/css-parser-algorithms': 2.6.3(@csstools/css-tokenizer@2.3.1) - '@csstools/css-tokenizer': 2.3.1 - '@csstools/media-query-list-parser': 2.1.11(@csstools/css-parser-algorithms@2.6.3(@csstools/css-tokenizer@2.3.1))(@csstools/css-tokenizer@2.3.1) + '@csstools/css-parser-algorithms': 2.7.0(@csstools/css-tokenizer@2.3.2) + '@csstools/css-tokenizer': 2.3.2 + '@csstools/media-query-list-parser': 2.1.12(@csstools/css-parser-algorithms@2.7.0(@csstools/css-tokenizer@2.3.2))(@csstools/css-tokenizer@2.3.2) '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.0) '@dual-bundle/import-meta-resolve': 4.1.0 balanced-match: 2.0.0 colord: 2.9.3 - cosmiconfig: 9.0.0(typescript@5.5.2) + cosmiconfig: 9.0.0(typescript@5.5.3) css-functions-list: 3.2.2 css-tree: 2.3.1 debug: 4.3.5 @@ -6816,9 +6816,9 @@ snapshots: micromatch: 4.0.7 normalize-path: 3.0.0 picocolors: 1.0.1 - postcss: 8.4.38 + postcss: 8.4.39 postcss-resolve-nested-selector: 0.1.1 - postcss-safe-parser: 7.0.0(postcss@8.4.38) + postcss-safe-parser: 7.0.0(postcss@8.4.39) postcss-selector-parser: 6.1.0 postcss-value-parser: 4.2.0 resolve-from: 5.0.0 @@ -6853,7 +6853,7 @@ snapshots: svg-tags@1.0.0: {} - sweetalert2@11.12.0: {} + sweetalert2@11.12.1: {} synckit@0.8.8: dependencies: @@ -6906,9 +6906,9 @@ snapshots: dependencies: is-number: 7.0.0 - ts-api-utils@1.3.0(typescript@5.5.2): + ts-api-utils@1.3.0(typescript@5.5.3): dependencies: - typescript: 5.5.2 + typescript: 5.5.3 tslib@2.3.0: {} @@ -6926,7 +6926,7 @@ snapshots: typescript@5.4.2: {} - typescript@5.5.2: {} + typescript@5.5.3: {} ufo@1.5.3: {} @@ -6943,10 +6943,10 @@ snapshots: magic-string: 0.30.10 mlly: 1.7.1 pathe: 1.1.2 - pkg-types: 1.1.1 + pkg-types: 1.1.2 scule: 1.3.0 strip-literal: 2.1.0 - unplugin: 1.10.1 + unplugin: 1.11.0 transitivePeerDependencies: - rollup @@ -6954,56 +6954,56 @@ snapshots: universalify@2.0.1: {} - unplugin-auto-import@0.17.6(@vueuse/core@10.11.0(vue@3.4.30(typescript@5.5.2)))(rollup@4.18.0): + unplugin-auto-import@0.17.6(@vueuse/core@10.11.0(vue@3.4.31(typescript@5.5.3)))(rollup@4.18.0): dependencies: - '@antfu/utils': 0.7.8 + '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.1.0(rollup@4.18.0) fast-glob: 3.3.2 local-pkg: 0.5.0 magic-string: 0.30.10 - minimatch: 9.0.4 + minimatch: 9.0.5 unimport: 3.7.2(rollup@4.18.0) - unplugin: 1.10.1 + unplugin: 1.11.0 optionalDependencies: - '@vueuse/core': 10.11.0(vue@3.4.30(typescript@5.5.2)) + '@vueuse/core': 10.11.0(vue@3.4.31(typescript@5.5.3)) transitivePeerDependencies: - rollup - unplugin-icons@0.19.0(@vue/compiler-sfc@3.4.30)(vue-template-compiler@2.7.16): + unplugin-icons@0.19.0(@vue/compiler-sfc@3.4.31)(vue-template-compiler@2.7.16): dependencies: '@antfu/install-pkg': 0.3.3 - '@antfu/utils': 0.7.8 + '@antfu/utils': 0.7.10 '@iconify/utils': 2.1.25 debug: 4.3.5 kolorist: 1.8.0 local-pkg: 0.5.0 - unplugin: 1.10.1 + unplugin: 1.11.0 optionalDependencies: - '@vue/compiler-sfc': 3.4.30 + '@vue/compiler-sfc': 3.4.31 vue-template-compiler: 2.7.16 transitivePeerDependencies: - supports-color - unplugin-vue-components@0.27.0(@babel/parser@7.24.7)(rollup@4.18.0)(vue@3.4.30(typescript@5.5.2)): + unplugin-vue-components@0.27.2(@babel/parser@7.24.7)(rollup@4.18.0)(vue@3.4.31(typescript@5.5.3)): dependencies: - '@antfu/utils': 0.7.8 + '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.1.0(rollup@4.18.0) chokidar: 3.6.0 debug: 4.3.5 fast-glob: 3.3.2 local-pkg: 0.5.0 magic-string: 0.30.10 - minimatch: 9.0.4 - resolve: 1.22.8 - unplugin: 1.10.1 - vue: 3.4.30(typescript@5.5.2) + minimatch: 9.0.5 + mlly: 1.7.1 + unplugin: 1.11.0 + vue: 3.4.31(typescript@5.5.3) optionalDependencies: '@babel/parser': 7.24.7 transitivePeerDependencies: - rollup - supports-color - unplugin@1.10.1: + unplugin@1.11.0: dependencies: acorn: 8.12.0 chokidar: 3.6.0 @@ -7024,33 +7024,33 @@ snapshots: validator@13.12.0: {} - vite-plugin-compression@0.5.1(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1)): + vite-plugin-compression@0.5.1(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1)): dependencies: chalk: 4.1.2 debug: 4.3.5 fs-extra: 10.1.0 - vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + vite: 5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - supports-color - vite-plugin-dts@3.9.1(@types/node@20.14.8)(rollup@4.18.0)(typescript@5.5.2)(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1)): + vite-plugin-dts@3.9.1(@types/node@20.14.9)(rollup@4.18.0)(typescript@5.5.3)(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1)): dependencies: - '@microsoft/api-extractor': 7.43.0(@types/node@20.14.8) + '@microsoft/api-extractor': 7.43.0(@types/node@20.14.9) '@rollup/pluginutils': 5.1.0(rollup@4.18.0) - '@vue/language-core': 1.8.27(typescript@5.5.2) + '@vue/language-core': 1.8.27(typescript@5.5.3) debug: 4.3.5 kolorist: 1.8.0 magic-string: 0.30.10 - typescript: 5.5.2 - vue-tsc: 1.8.27(typescript@5.5.2) + typescript: 5.5.3 + vue-tsc: 1.8.27(typescript@5.5.3) optionalDependencies: - vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + vite: 5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-html@3.2.2(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1)): + vite-plugin-html@3.2.2(vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1)): dependencies: '@rollup/pluginutils': 4.2.1 colorette: 2.0.20 @@ -7064,15 +7064,15 @@ snapshots: html-minifier-terser: 6.1.0 node-html-parser: 5.4.2 pathe: 0.2.0 - vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + vite: 5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1) - vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1): + vite@5.3.2(@types/node@20.14.9)(sass@1.77.6)(terser@5.31.1): dependencies: esbuild: 0.21.5 - postcss: 8.4.38 + postcss: 8.4.39 rollup: 4.18.0 optionalDependencies: - '@types/node': 20.14.8 + '@types/node': 20.14.9 fsevents: 2.3.3 sass: 1.77.6 terser: 5.31.1 @@ -7083,18 +7083,18 @@ snapshots: vue-cookies@1.8.4: {} - vue-demi@0.13.11(vue@3.4.30(typescript@5.5.2)): + vue-demi@0.13.11(vue@3.4.31(typescript@5.5.3)): dependencies: - vue: 3.4.30(typescript@5.5.2) + vue: 3.4.31(typescript@5.5.3) - vue-demi@0.14.8(vue@3.4.30(typescript@5.5.2)): + vue-demi@0.14.8(vue@3.4.31(typescript@5.5.3)): dependencies: - vue: 3.4.30(typescript@5.5.2) + vue: 3.4.31(typescript@5.5.3) - vue-eslint-parser@9.4.3(eslint@9.5.0): + vue-eslint-parser@9.4.3(eslint@9.6.0): dependencies: debug: 4.3.5 - eslint: 9.5.0 + eslint: 9.6.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 @@ -7104,51 +7104,51 @@ snapshots: transitivePeerDependencies: - supports-color - vue-i18n@9.13.1(vue@3.4.30(typescript@5.5.2)): + vue-i18n@9.13.1(vue@3.4.31(typescript@5.5.3)): dependencies: '@intlify/core-base': 9.13.1 '@intlify/shared': 9.13.1 '@vue/devtools-api': 6.6.3 - vue: 3.4.30(typescript@5.5.2) + vue: 3.4.31(typescript@5.5.3) - vue-router@4.4.0(vue@3.4.30(typescript@5.5.2)): + vue-router@4.4.0(vue@3.4.31(typescript@5.5.3)): dependencies: '@vue/devtools-api': 6.6.3 - vue: 3.4.30(typescript@5.5.2) + vue: 3.4.31(typescript@5.5.3) - vue-simple-uploader@1.0.3(vue@3.4.30(typescript@5.5.2)): + vue-simple-uploader@1.0.3(vue@3.4.31(typescript@5.5.3)): dependencies: simple-uploader.js: 0.6.0 - vue: 3.4.30(typescript@5.5.2) + vue: 3.4.31(typescript@5.5.3) vue-template-compiler@2.7.16: dependencies: de-indent: 1.0.2 he: 1.2.0 - vue-tsc@1.8.27(typescript@5.5.2): + vue-tsc@1.8.27(typescript@5.5.3): dependencies: '@volar/typescript': 1.11.1 - '@vue/language-core': 1.8.27(typescript@5.5.2) + '@vue/language-core': 1.8.27(typescript@5.5.3) semver: 7.6.2 - typescript: 5.5.2 + typescript: 5.5.3 - vue-tsc@2.0.22(typescript@5.5.2): + vue-tsc@2.0.24(typescript@5.5.3): dependencies: - '@volar/typescript': 2.3.3 - '@vue/language-core': 2.0.22(typescript@5.5.2) + '@volar/typescript': 2.4.0-alpha.11 + '@vue/language-core': 2.0.24(typescript@5.5.3) semver: 7.6.2 - typescript: 5.5.2 + typescript: 5.5.3 - vue@3.4.30(typescript@5.5.2): + vue@3.4.31(typescript@5.5.3): dependencies: - '@vue/compiler-dom': 3.4.30 - '@vue/compiler-sfc': 3.4.30 - '@vue/runtime-dom': 3.4.30 - '@vue/server-renderer': 3.4.30(vue@3.4.30(typescript@5.5.2)) - '@vue/shared': 3.4.30 + '@vue/compiler-dom': 3.4.31 + '@vue/compiler-sfc': 3.4.31 + '@vue/runtime-dom': 3.4.31 + '@vue/server-renderer': 3.4.31(vue@3.4.31(typescript@5.5.3)) + '@vue/shared': 3.4.31 optionalDependencies: - typescript: 5.5.2 + typescript: 5.5.3 w3c-keyname@2.2.8: {} @@ -7224,7 +7224,7 @@ snapshots: wrap-ansi@9.0.0: dependencies: ansi-styles: 6.2.1 - string-width: 7.1.0 + string-width: 7.2.0 strip-ansi: 7.1.0 wrappy@1.0.2: {} @@ -7278,6 +7278,6 @@ snapshots: zeebe-bpmn-moddle@1.1.0: {} - zrender@5.5.0: + zrender@5.6.0: dependencies: tslib: 2.3.0 diff --git a/shared/bpmn-designer/dist/index.es.mjs b/shared/bpmn-designer/dist/index.es.mjs index 1abdb5b3..84b2021d 100644 --- a/shared/bpmn-designer/dist/index.es.mjs +++ b/shared/bpmn-designer/dist/index.es.mjs @@ -6,7 +6,7 @@ import { lodash, toast, standardDeleteNotify } from "@herodotus/core"; import { Swal, lodash as lodash2, standardDeleteNotify as standardDeleteNotify2, toast as toast2 } from "@herodotus/core"; import { BpmnPropertiesPanelModule, BpmnPropertiesProviderModule, CamundaPlatformPropertiesProviderModule } from "bpmn-js-properties-panel"; import TokenSimulation from "bpmn-js-token-simulation"; -import Ids from "ids"; +import Ids$1 from "ids"; import Diagram from "diagram-js"; const _sfc_main$2 = defineComponent({ name: "HBpmnDesignerToolbar", @@ -8174,7 +8174,7 @@ function BaseModeler(options) { e$3(BaseModeler, BaseViewer); BaseModeler.prototype._createModdle = function(options) { var moddle = BaseViewer.prototype._createModdle.call(this, options); - moddle.ids = new Ids([32, 36, 1]); + moddle.ids = new Ids$1([32, 36, 1]); return moddle; }; BaseModeler.prototype._collectIds = function(definitions, elementsById) { @@ -8560,7 +8560,7 @@ function rotate(gfx, angle) { rotate2.setRotate(angle, 0, 0); transform$1(gfx, rotate2); } -var markerIds = new Ids(); +var markerIds = new Ids$1(); var ELEMENT_LABEL_DISTANCE$1 = 10, INNER_OUTER_DIST = 3, PARTICIPANT_STROKE_WIDTH = 1.5, TASK_BORDER_RADIUS = 10; var DEFAULT_OPACITY = 0.95, FULL_OPACITY = 1, LOW_OPACITY = 0.25; function BpmnRenderer(config, eventBus, styles, pathMap, canvas, textRenderer, priority) { @@ -12744,12 +12744,13 @@ function shouldMoveToPlane(businessObject, plane) { var LOW_PRIORITY$p = 250; var ARROW_DOWN_SVG = ''; var EMPTY_MARKER = "bjs-drilldown-empty"; -function DrilldownOverlayBehavior(canvas, eventBus, elementRegistry, overlays) { +function DrilldownOverlayBehavior(canvas, eventBus, elementRegistry, overlays, translate2) { CommandInterceptor.call(this, eventBus); this._canvas = canvas; this._eventBus = eventBus; this._elementRegistry = elementRegistry; this._overlays = overlays; + this._translate = translate2; var self2 = this; this.executed("shape.toggleCollapse", LOW_PRIORITY$p, function(context) { var shape = context.shape; @@ -12829,12 +12830,13 @@ DrilldownOverlayBehavior.prototype._updateOverlayVisibility = function(element) classes$1(overlay.html).toggle(EMPTY_MARKER, !hasFlowElements); }; DrilldownOverlayBehavior.prototype._addOverlay = function(element) { - var canvas = this._canvas, overlays = this._overlays; + var canvas = this._canvas, overlays = this._overlays, bo = getBusinessObject(element); var existingOverlays = overlays.get({ element, type: "drilldown" }); if (existingOverlays.length) { this._removeOverlay(element); } - var button = domify$1('"); + var button = domify$1('"), elementName = bo.get("name") || bo.get("id"), title = this._translate("Open {element}", { element: elementName }); + button.setAttribute("title", title); button.addEventListener("click", function() { canvas.setRootElement(canvas.findRoot(getPlaneIdFromShape(element))); }); @@ -12858,7 +12860,8 @@ DrilldownOverlayBehavior.$inject = [ "canvas", "eventBus", "elementRegistry", - "overlays" + "overlays", + "translate" ]; const DrilldownModdule = { __depends__: [OverlaysModule, ChangeSupportModule, RootElementsModule], @@ -14195,22 +14198,84 @@ const AlignElementsModule$1 = { __init__: ["alignElements"], alignElements: ["type", AlignElements$1] }; +const Ids = new IdGenerator(); +function Scheduler(eventBus) { + this._scheduled = {}; + eventBus.on("diagram.destroy", () => { + Object.keys(this._scheduled).forEach((id) => { + this.cancel(id); + }); + }); +} +Scheduler.$inject = ["eventBus"]; +Scheduler.prototype.schedule = function(taskFn, id = Ids.next()) { + this.cancel(id); + const newScheduled = this._schedule(taskFn, id); + this._scheduled[id] = newScheduled; + return newScheduled.promise; +}; +Scheduler.prototype._schedule = function(taskFn, id) { + const { + promise, + resolve, + reject + } = defer(); + const executionId = requestAnimationFrame(() => { + try { + resolve(taskFn()); + } catch (error2) { + reject(error2); + } + }); + return { + executionId, + promise + }; +}; +Scheduler.prototype.cancel = function(id) { + const scheduled = this._scheduled[id]; + if (scheduled) { + this._cancel(scheduled); + this._scheduled[id] = null; + } +}; +Scheduler.prototype._cancel = function(scheduled) { + cancelAnimationFrame(scheduled.executionId); +}; +function defer() { + let resolve; + let reject; + const promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + return { + promise, + resolve, + reject + }; +} +const SchedulerModule = { + scheduler: ["type", Scheduler] +}; var MARKER_HIDDEN$1 = "djs-element-hidden"; var entrySelector = ".entry"; var DEFAULT_PRIORITY$2 = 1e3; var CONTEXT_PAD_MARGIN = 8; var HOVER_DELAY = 300; -function ContextPad(canvas, elementRegistry, eventBus) { +function ContextPad(canvas, elementRegistry, eventBus, scheduler) { this._canvas = canvas; this._elementRegistry = elementRegistry; this._eventBus = eventBus; + this._scheduler = scheduler; this._current = null; this._init(); } ContextPad.$inject = [ "canvas", "elementRegistry", - "eventBus" + "eventBus", + "scheduler" ]; ContextPad.prototype._init = function() { var self2 = this; @@ -14228,10 +14293,10 @@ ContextPad.prototype._init = function() { if (!current) { return; } - var { target } = current; + var target = current.target; var targets = isArray$2(target) ? target : [target]; var targetsChanged = targets.filter(function(element) { - return includes$8(elements, element); + return elements.includes(element); }); if (targetsChanged.length) { self2.close(); @@ -14243,16 +14308,25 @@ ContextPad.prototype._init = function() { } } }); - this._eventBus.on("canvas.viewbox.changed", () => { - this._updatePosition(); + this._eventBus.on("canvas.viewbox.changed", function() { + self2._updatePosition(); }); this._eventBus.on("element.marker.update", function(event2) { + if (!self2.isOpen()) { + return; + } + var element = event2.element; + var current = self2._current; + var targets = isArray$2(current.target) ? current.target : [current.target]; + if (!targets.includes(element)) { + return; + } self2._updateVisibility(); }); this._container = this._createContainer(); }; ContextPad.prototype._createContainer = function() { - const container = domify$1('

'); + var container = domify$1('
'); this._canvas.getContainer().appendChild(container); return container; }; @@ -14285,6 +14359,7 @@ ContextPad.prototype.getEntries = function(target) { return entries; }; ContextPad.prototype.trigger = function(action, event2, autoActivate) { + var self2 = this; var entry, originalEvent, button = event2.delegateTarget || event2.target; if (!button) { return event2.preventDefault(); @@ -14292,8 +14367,8 @@ ContextPad.prototype.trigger = function(action, event2, autoActivate) { entry = attr$1(button, "data-action"); originalEvent = event2.originalEvent || event2; if (action === "mouseover") { - this._timeout = setTimeout(() => { - this._mouseout = this.triggerEntry(entry, "hover", originalEvent, autoActivate); + this._timeout = setTimeout(function() { + self2._mouseout = self2.triggerEntry(entry, "hover", originalEvent, autoActivate); }, HOVER_DELAY); return; } else if (action === "mouseout") { @@ -14439,7 +14514,7 @@ ContextPad.prototype.isOpen = function(target) { } if (isArray$2(target)) { return target.length === currentTarget.length && every(target, function(element) { - return includes$8(currentTarget, element); + return currentTarget.includes(element); }); } else { return currentTarget === target; @@ -14465,9 +14540,9 @@ ContextPad.prototype.hide = function() { }; ContextPad.prototype._getPosition = function(target) { if (!isArray$2(target) && isConnection(target)) { - const viewbox = this._canvas.viewbox(); - const lastWaypoint = getLastWaypoint(target); - const x2 = lastWaypoint.x * viewbox.scale - viewbox.x * viewbox.scale, y2 = lastWaypoint.y * viewbox.scale - viewbox.y * viewbox.scale; + var viewbox = this._canvas.viewbox(); + var lastWaypoint = getLastWaypoint(target); + var x2 = lastWaypoint.x * viewbox.scale - viewbox.x * viewbox.scale, y2 = lastWaypoint.y * viewbox.scale - viewbox.y * viewbox.scale; return { left: x2 + CONTEXT_PAD_MARGIN * this._canvas.zoom(), top: y2 @@ -14504,27 +14579,31 @@ ContextPad.prototype._updatePosition = function() { } }; ContextPad.prototype._updateVisibility = function() { - if (!this.isOpen()) { - return; - } - var self2 = this; - var target = this._current.target; - var targets = isArray$2(target) ? target : [target]; - var isHidden2 = targets.some(function(target2) { - return self2._canvas.hasMarker(target2, MARKER_HIDDEN$1); - }); - if (isHidden2) { - self2.hide(); - } else { - self2.show(); - } + const updateFn = () => { + if (!this.isOpen()) { + return; + } + var self2 = this; + var target = this._current.target; + var targets = isArray$2(target) ? target : [target]; + var isHidden2 = targets.some(function(target2) { + return self2._canvas.hasMarker(target2, MARKER_HIDDEN$1); + }); + if (isHidden2) { + self2.hide(); + } else { + self2.show(); + } + }; + this._scheduler.schedule(updateFn, "ContextPad#_updateVisibility"); }; ContextPad.prototype._getTargetBounds = function(target) { + var self2 = this; var elements = isArray$2(target) ? target : [target]; - var elementsGfx = elements.map((element) => { - return this._canvas.getGraphics(element); + var elementsGfx = elements.map(function(element) { + return self2._canvas.getGraphics(element); }); - return elementsGfx.reduce((bounds, elementGfx) => { + return elementsGfx.reduce(function(bounds, elementGfx) { const elementBounds = elementGfx.getBoundingClientRect(); bounds.top = Math.min(bounds.top, elementBounds.top); bounds.right = Math.max(bounds.right, elementBounds.right); @@ -14549,9 +14628,6 @@ function addClasses$1(element, classNames) { classes2.add(cls); }); } -function includes$8(array, item) { - return array.indexOf(item) !== -1; -} function getLastWaypoint(connection) { return connection.waypoints[connection.waypoints.length - 1]; } @@ -14565,6 +14641,7 @@ function targetsEqual(target, otherTarget) { const ContextPadModule$1 = { __depends__: [ InteractionEventsModule$1, + SchedulerModule, OverlaysModule ], contextPad: ["type", ContextPad] @@ -14594,10 +14671,10 @@ function k$1(n2) { function b(n2, l2) { this.props = n2, this.context = l2; } -function x$1(n2, l2) { - if (null == l2) return n2.__ ? x$1(n2.__, n2.__i + 1) : null; +function x(n2, l2) { + if (null == l2) return n2.__ ? x(n2.__, n2.__i + 1) : null; for (var u2; l2 < n2.__k.length; l2++) if (null != (u2 = n2.__k[l2]) && null != u2.__e) return u2.__e; - return "function" == typeof n2.type ? x$1(n2) : null; + return "function" == typeof n2.type ? x(n2) : null; } function C$1(n2) { var l2, u2; @@ -14614,18 +14691,18 @@ function M(n2) { } function P() { var n2, u2, t2, o2, r2, e2, c2, s2; - for (i$1.sort(f$1); n2 = i$1.shift(); ) n2.__d && (u2 = i$1.length, o2 = void 0, e2 = (r2 = (t2 = n2).__v).__e, c2 = [], s2 = [], t2.__P && ((o2 = d$1({}, r2)).__v = r2.__v + 1, l$1.vnode && l$1.vnode(o2), O(t2.__P, o2, r2, t2.__n, t2.__P.namespaceURI, 32 & r2.__u ? [e2] : null, c2, null == e2 ? x$1(r2) : e2, !!(32 & r2.__u), s2), o2.__v = r2.__v, o2.__.__k[o2.__i] = o2, j$1(c2, o2, s2), o2.__e != e2 && C$1(o2)), i$1.length > u2 && i$1.sort(f$1)); + for (i$1.sort(f$1); n2 = i$1.shift(); ) n2.__d && (u2 = i$1.length, o2 = void 0, e2 = (r2 = (t2 = n2).__v).__e, c2 = [], s2 = [], t2.__P && ((o2 = d$1({}, r2)).__v = r2.__v + 1, l$1.vnode && l$1.vnode(o2), O(t2.__P, o2, r2, t2.__n, t2.__P.namespaceURI, 32 & r2.__u ? [e2] : null, c2, null == e2 ? x(r2) : e2, !!(32 & r2.__u), s2), o2.__v = r2.__v, o2.__.__k[o2.__i] = o2, j$1(c2, o2, s2), o2.__e != e2 && C$1(o2)), i$1.length > u2 && i$1.sort(f$1)); P.__r = 0; } function S(n2, l2, u2, t2, i2, o2, r2, f2, e2, c2, s2) { var a2, v2, y2, d2, w2, _2 = t2 && t2.__k || p$1, g2 = l2.length; - for (u2.__d = e2, $(u2, l2, _2), e2 = u2.__d, a2 = 0; a2 < g2; a2++) null != (y2 = u2.__k[a2]) && "boolean" != typeof y2 && "function" != typeof y2 && (v2 = -1 === y2.__i ? h$1 : _2[y2.__i] || h$1, y2.__i = a2, O(n2, y2, v2, i2, o2, r2, f2, e2, c2, s2), d2 = y2.__e, y2.ref && v2.ref != y2.ref && (v2.ref && N(v2.ref, null, y2), s2.push(y2.ref, y2.__c || d2, y2)), null == w2 && null != d2 && (w2 = d2), 65536 & y2.__u || v2.__k === y2.__k ? (e2 && !e2.isConnected && (e2 = x$1(v2)), e2 = I(y2, e2, n2)) : "function" == typeof y2.type && void 0 !== y2.__d ? e2 = y2.__d : d2 && (e2 = d2.nextSibling), y2.__d = void 0, y2.__u &= -196609); + for (u2.__d = e2, $(u2, l2, _2), e2 = u2.__d, a2 = 0; a2 < g2; a2++) null != (y2 = u2.__k[a2]) && "boolean" != typeof y2 && "function" != typeof y2 && (v2 = -1 === y2.__i ? h$1 : _2[y2.__i] || h$1, y2.__i = a2, O(n2, y2, v2, i2, o2, r2, f2, e2, c2, s2), d2 = y2.__e, y2.ref && v2.ref != y2.ref && (v2.ref && N(v2.ref, null, y2), s2.push(y2.ref, y2.__c || d2, y2)), null == w2 && null != d2 && (w2 = d2), 65536 & y2.__u || v2.__k === y2.__k ? (e2 && "string" == typeof y2.type && !n2.contains(e2) && (e2 = x(v2)), e2 = I(y2, e2, n2)) : "function" == typeof y2.type && void 0 !== y2.__d ? e2 = y2.__d : d2 && (e2 = d2.nextSibling), y2.__d = void 0, y2.__u &= -196609); u2.__d = e2, u2.__e = w2; } function $(n2, l2, u2) { var t2, i2, o2, r2, f2, e2 = l2.length, c2 = u2.length, s2 = c2, a2 = 0; - for (n2.__k = [], t2 = 0; t2 < e2; t2++) r2 = t2 + a2, null != (i2 = n2.__k[t2] = null == (i2 = l2[t2]) || "boolean" == typeof i2 || "function" == typeof i2 ? null : "string" == typeof i2 || "number" == typeof i2 || "bigint" == typeof i2 || i2.constructor == String ? g(null, i2, null, null, null) : y$1(i2) ? g(k$1, { children: i2 }, null, null, null) : void 0 === i2.constructor && i2.__b > 0 ? g(i2.type, i2.props, i2.key, i2.ref ? i2.ref : null, i2.__v) : i2) ? (i2.__ = n2, i2.__b = n2.__b + 1, f2 = L(i2, u2, r2, s2), i2.__i = f2, o2 = null, -1 !== f2 && (s2--, (o2 = u2[f2]) && (o2.__u |= 131072)), null == o2 || null === o2.__v ? (-1 == f2 && a2--, "function" != typeof i2.type && (i2.__u |= 65536)) : f2 !== r2 && (f2 === r2 + 1 ? a2++ : f2 > r2 ? s2 > e2 - r2 ? a2 += f2 - r2 : a2-- : f2 < r2 ? f2 == r2 - 1 && (a2 = f2 - r2) : a2 = 0, f2 !== t2 + a2 && (i2.__u |= 65536))) : (o2 = u2[r2]) && null == o2.key && o2.__e && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = x$1(o2)), V(o2, o2, false), u2[r2] = null, s2--); - if (s2) for (t2 = 0; t2 < c2; t2++) null != (o2 = u2[t2]) && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = x$1(o2)), V(o2, o2)); + for (n2.__k = [], t2 = 0; t2 < e2; t2++) r2 = t2 + a2, null != (i2 = n2.__k[t2] = null == (i2 = l2[t2]) || "boolean" == typeof i2 || "function" == typeof i2 ? null : "string" == typeof i2 || "number" == typeof i2 || "bigint" == typeof i2 || i2.constructor == String ? g(null, i2, null, null, null) : y$1(i2) ? g(k$1, { children: i2 }, null, null, null) : void 0 === i2.constructor && i2.__b > 0 ? g(i2.type, i2.props, i2.key, i2.ref ? i2.ref : null, i2.__v) : i2) ? (i2.__ = n2, i2.__b = n2.__b + 1, f2 = L(i2, u2, r2, s2), i2.__i = f2, o2 = null, -1 !== f2 && (s2--, (o2 = u2[f2]) && (o2.__u |= 131072)), null == o2 || null === o2.__v ? (-1 == f2 && a2--, "function" != typeof i2.type && (i2.__u |= 65536)) : f2 !== r2 && (f2 == r2 - 1 ? a2 = f2 - r2 : f2 == r2 + 1 ? a2++ : f2 > r2 ? s2 > e2 - r2 ? a2 += f2 - r2 : a2-- : f2 < r2 && a2++, f2 !== t2 + a2 && (i2.__u |= 65536))) : (o2 = u2[r2]) && null == o2.key && o2.__e && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = x(o2)), V(o2, o2, false), u2[r2] = null, s2--); + if (s2) for (t2 = 0; t2 < c2; t2++) null != (o2 = u2[t2]) && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = x(o2)), V(o2, o2)); } function I(n2, l2, u2) { var t2, i2; @@ -14654,28 +14731,28 @@ function L(n2, l2, u2, t2) { } return -1; } -function T(n2, l2, u2) { +function T$1(n2, l2, u2) { "-" === l2[0] ? n2.setProperty(l2, null == u2 ? "" : u2) : n2[l2] = null == u2 ? "" : "number" != typeof u2 || v$1.test(l2) ? u2 : u2 + "px"; } function A$1(n2, l2, u2, t2, i2) { var o2; n: if ("style" === l2) if ("string" == typeof u2) n2.style.cssText = u2; else { - if ("string" == typeof t2 && (n2.style.cssText = t2 = ""), t2) for (l2 in t2) u2 && l2 in u2 || T(n2.style, l2, ""); - if (u2) for (l2 in u2) t2 && u2[l2] === t2[l2] || T(n2.style, l2, u2[l2]); + if ("string" == typeof t2 && (n2.style.cssText = t2 = ""), t2) for (l2 in t2) u2 && l2 in u2 || T$1(n2.style, l2, ""); + if (u2) for (l2 in u2) t2 && u2[l2] === t2[l2] || T$1(n2.style, l2, u2[l2]); } else if ("o" === l2[0] && "n" === l2[1]) o2 = l2 !== (l2 = l2.replace(/(PointerCapture)$|Capture$/i, "$1")), l2 = l2.toLowerCase() in n2 || "onFocusOut" === l2 || "onFocusIn" === l2 ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + o2] = u2, u2 ? t2 ? u2.u = t2.u : (u2.u = e$2, n2.addEventListener(l2, o2 ? s$1 : c$1, o2)) : n2.removeEventListener(l2, o2 ? s$1 : c$1, o2); else { if ("http://www.w3.org/2000/svg" == i2) l2 = l2.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); - else if ("width" != l2 && "height" != l2 && "href" != l2 && "list" != l2 && "form" != l2 && "tabIndex" != l2 && "download" != l2 && "rowSpan" != l2 && "colSpan" != l2 && "role" != l2 && l2 in n2) try { + else if ("width" != l2 && "height" != l2 && "href" != l2 && "list" != l2 && "form" != l2 && "tabIndex" != l2 && "download" != l2 && "rowSpan" != l2 && "colSpan" != l2 && "role" != l2 && "popover" != l2 && l2 in n2) try { n2[l2] = null == u2 ? "" : u2; break n; } catch (n3) { } - "function" == typeof u2 || (null == u2 || false === u2 && "-" !== l2[4] ? n2.removeAttribute(l2) : n2.setAttribute(l2, u2)); + "function" == typeof u2 || (null == u2 || false === u2 && "-" !== l2[4] ? n2.removeAttribute(l2) : n2.setAttribute(l2, "popover" == l2 && 1 == u2 ? "" : u2)); } } -function F$1(n2) { +function F(n2) { return function(u2) { if (this.l) { var t2 = this.l[u2.type + n2]; @@ -14686,30 +14763,30 @@ function F$1(n2) { }; } function O(n2, u2, t2, i2, o2, r2, f2, e2, c2, s2) { - var a2, h2, p2, v2, w2, _2, g2, m2, x2, C2, M2, P2, $2, I2, H, L2 = u2.type; + var a2, h2, p2, v2, w2, _2, g2, m2, x2, C2, M2, P2, $2, I2, H, L2, T2 = u2.type; if (void 0 !== u2.constructor) return null; 128 & t2.__u && (c2 = !!(32 & t2.__u), r2 = [e2 = u2.__e = t2.__e]), (a2 = l$1.__b) && a2(u2); - n: if ("function" == typeof L2) try { - if (m2 = u2.props, x2 = (a2 = L2.contextType) && i2[a2.__c], C2 = a2 ? x2 ? x2.props.value : a2.__ : i2, t2.__c ? g2 = (h2 = u2.__c = t2.__c).__ = h2.__E : ("prototype" in L2 && L2.prototype.render ? u2.__c = h2 = new L2(m2, C2) : (u2.__c = h2 = new b(m2, C2), h2.constructor = L2, h2.render = q$1), x2 && x2.sub(h2), h2.props = m2, h2.state || (h2.state = {}), h2.context = C2, h2.__n = i2, p2 = h2.__d = true, h2.__h = [], h2._sb = []), null == h2.__s && (h2.__s = h2.state), null != L2.getDerivedStateFromProps && (h2.__s == h2.state && (h2.__s = d$1({}, h2.__s)), d$1(h2.__s, L2.getDerivedStateFromProps(m2, h2.__s))), v2 = h2.props, w2 = h2.state, h2.__v = u2, p2) null == L2.getDerivedStateFromProps && null != h2.componentWillMount && h2.componentWillMount(), null != h2.componentDidMount && h2.__h.push(h2.componentDidMount); + n: if ("function" == typeof T2) try { + if (m2 = u2.props, x2 = "prototype" in T2 && T2.prototype.render, C2 = (a2 = T2.contextType) && i2[a2.__c], M2 = a2 ? C2 ? C2.props.value : a2.__ : i2, t2.__c ? g2 = (h2 = u2.__c = t2.__c).__ = h2.__E : (x2 ? u2.__c = h2 = new T2(m2, M2) : (u2.__c = h2 = new b(m2, M2), h2.constructor = T2, h2.render = q$1), C2 && C2.sub(h2), h2.props = m2, h2.state || (h2.state = {}), h2.context = M2, h2.__n = i2, p2 = h2.__d = true, h2.__h = [], h2._sb = []), x2 && null == h2.__s && (h2.__s = h2.state), x2 && null != T2.getDerivedStateFromProps && (h2.__s == h2.state && (h2.__s = d$1({}, h2.__s)), d$1(h2.__s, T2.getDerivedStateFromProps(m2, h2.__s))), v2 = h2.props, w2 = h2.state, h2.__v = u2, p2) x2 && null == T2.getDerivedStateFromProps && null != h2.componentWillMount && h2.componentWillMount(), x2 && null != h2.componentDidMount && h2.__h.push(h2.componentDidMount); else { - if (null == L2.getDerivedStateFromProps && m2 !== v2 && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(m2, C2), !h2.__e && (null != h2.shouldComponentUpdate && false === h2.shouldComponentUpdate(m2, h2.__s, C2) || u2.__v === t2.__v)) { + if (x2 && null == T2.getDerivedStateFromProps && m2 !== v2 && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(m2, M2), !h2.__e && (null != h2.shouldComponentUpdate && false === h2.shouldComponentUpdate(m2, h2.__s, M2) || u2.__v === t2.__v)) { for (u2.__v !== t2.__v && (h2.props = m2, h2.state = h2.__s, h2.__d = false), u2.__e = t2.__e, u2.__k = t2.__k, u2.__k.forEach(function(n3) { n3 && (n3.__ = u2); - }), M2 = 0; M2 < h2._sb.length; M2++) h2.__h.push(h2._sb[M2]); + }), P2 = 0; P2 < h2._sb.length; P2++) h2.__h.push(h2._sb[P2]); h2._sb = [], h2.__h.length && f2.push(h2); break n; } - null != h2.componentWillUpdate && h2.componentWillUpdate(m2, h2.__s, C2), null != h2.componentDidUpdate && h2.__h.push(function() { + null != h2.componentWillUpdate && h2.componentWillUpdate(m2, h2.__s, M2), x2 && null != h2.componentDidUpdate && h2.__h.push(function() { h2.componentDidUpdate(v2, w2, _2); }); } - if (h2.context = C2, h2.props = m2, h2.__P = n2, h2.__e = false, P2 = l$1.__r, $2 = 0, "prototype" in L2 && L2.prototype.render) { - for (h2.state = h2.__s, h2.__d = false, P2 && P2(u2), a2 = h2.render(h2.props, h2.state, h2.context), I2 = 0; I2 < h2._sb.length; I2++) h2.__h.push(h2._sb[I2]); + if (h2.context = M2, h2.props = m2, h2.__P = n2, h2.__e = false, $2 = l$1.__r, I2 = 0, x2) { + for (h2.state = h2.__s, h2.__d = false, $2 && $2(u2), a2 = h2.render(h2.props, h2.state, h2.context), H = 0; H < h2._sb.length; H++) h2.__h.push(h2._sb[H]); h2._sb = []; } else do { - h2.__d = false, P2 && P2(u2), a2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s; - } while (h2.__d && ++$2 < 25); - h2.state = h2.__s, null != h2.getChildContext && (i2 = d$1(d$1({}, i2), h2.getChildContext())), p2 || null == h2.getSnapshotBeforeUpdate || (_2 = h2.getSnapshotBeforeUpdate(v2, w2)), S(n2, y$1(H = null != a2 && a2.type === k$1 && null == a2.key ? a2.props.children : a2) ? H : [H], u2, t2, i2, o2, r2, f2, e2, c2, s2), h2.base = u2.__e, u2.__u &= -161, h2.__h.length && f2.push(h2), g2 && (h2.__E = h2.__ = null); + h2.__d = false, $2 && $2(u2), a2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s; + } while (h2.__d && ++I2 < 25); + h2.state = h2.__s, null != h2.getChildContext && (i2 = d$1(d$1({}, i2), h2.getChildContext())), x2 && !p2 && null != h2.getSnapshotBeforeUpdate && (_2 = h2.getSnapshotBeforeUpdate(v2, w2)), S(n2, y$1(L2 = null != a2 && a2.type === k$1 && null == a2.key ? a2.props.children : a2) ? L2 : [L2], u2, t2, i2, o2, r2, f2, e2, c2, s2), h2.base = u2.__e, u2.__u &= -161, h2.__h.length && f2.push(h2), g2 && (h2.__E = h2.__ = null); } catch (n3) { u2.__v = null, c2 || null != r2 ? (u2.__e = e2, u2.__u |= c2 ? 160 : 32, r2[r2.indexOf(e2)] = null) : (u2.__e = t2.__e, u2.__k = t2.__k), l$1.__e(n3, u2, t2); } @@ -14752,7 +14829,7 @@ function z$1(l2, u2, t2, i2, o2, r2, f2, e2, c2) { } for (s2 in k2) d2 = k2[s2], "children" == s2 ? v2 = d2 : "dangerouslySetInnerHTML" == s2 ? a2 = d2 : "value" == s2 ? _2 = d2 : "checked" == s2 ? g2 = d2 : "key" === s2 || e2 && "function" != typeof d2 || m2[s2] === d2 || A$1(l2, s2, d2, m2[s2], o2); if (a2) e2 || p2 && (a2.__html === p2.__html || a2.__html === l2.innerHTML) || (l2.innerHTML = a2.__html), u2.__k = []; - else if (p2 && (l2.innerHTML = ""), S(l2, y$1(v2) ? v2 : [v2], u2, t2, i2, "foreignObject" === b2 ? "http://www.w3.org/1999/xhtml" : o2, r2, f2, r2 ? r2[0] : t2.__k && x$1(t2, 0), e2, c2), null != r2) for (s2 = r2.length; s2--; ) null != r2[s2] && w$1(r2[s2]); + else if (p2 && (l2.innerHTML = ""), S(l2, y$1(v2) ? v2 : [v2], u2, t2, i2, "foreignObject" === b2 ? "http://www.w3.org/1999/xhtml" : o2, r2, f2, r2 ? r2[0] : t2.__k && x(t2, 0), e2, c2), null != r2) for (s2 = r2.length; s2--; ) null != r2[s2] && w$1(r2[s2]); e2 || (s2 = "value", void 0 !== _2 && (_2 !== l2[s2] || "progress" === b2 && !_2 || "option" === b2 && _2 !== m2[s2]) && A$1(l2, s2, _2, m2[s2], o2), s2 = "checked", void 0 !== g2 && g2 !== l2[s2] && A$1(l2, s2, g2, m2[s2], o2)); } return l2; @@ -14798,7 +14875,7 @@ n$1 = p$1.slice, l$1 = { __e: function(n2, l2, u2, t2) { this.__v && (this.__e = true, n2 && this.__h.push(n2), M(this)); }, b.prototype.render = k$1, i$1 = [], r$2 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f$1 = function(n2, l2) { return n2.__v.__b - l2.__v.__b; -}, P.__r = 0, e$2 = 0, c$1 = F$1(false), s$1 = F$1(true); +}, P.__r = 0, e$2 = 0, c$1 = F(false), s$1 = F(true); var n = function(t2, s2, r2, e2) { var u2; s2[0] = 0; @@ -14821,17 +14898,17 @@ function e$1(s2) { }(s2)), r2), arguments, [])).length > 1 ? r2 : r2[0]; } var m$1 = e$1.bind(_$1); -var t, r$1, u, i, o = 0, f = [], c = [], e = l$1, a = e.__b, v = e.__r, l = e.diffed, m = e.__c, s = e.unmount, d = e.__; -function h(n2, t2) { - e.__h && e.__h(r$1, n2, o || t2), o = 0; +var t, r$1, u, i, o = 0, f = [], c = l$1, e = c.__b, a = c.__r, v = c.diffed, l = c.__c, m = c.unmount, s = c.__; +function d(n2, t2) { + c.__h && c.__h(r$1, n2, o || t2), o = 0; var u2 = r$1.__H || (r$1.__H = { __: [], __h: [] }); - return n2 >= u2.__.length && u2.__.push({ __V: c }), u2.__[n2]; + return n2 >= u2.__.length && u2.__.push({}), u2.__[n2]; } -function p(n2) { - return o = 1, y(D, n2); +function h(n2) { + return o = 1, p(D, n2); } -function y(n2, u2, i2) { - var o2 = h(t++, 2); +function p(n2, u2, i2) { + var o2 = d(t++, 2); if (o2.t = n2, !o2.__c && (o2.__ = [D(void 0, u2), function(n3) { var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3); t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({})); @@ -14864,25 +14941,25 @@ function y(n2, u2, i2) { } return o2.__N || o2.__; } -function _(n2, u2) { - var i2 = h(t++, 3); - !e.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r$1.__H.__h.push(i2)); +function y(n2, u2) { + var i2 = d(t++, 3); + !c.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r$1.__H.__h.push(i2)); } -function A(n2, u2) { - var i2 = h(t++, 4); - !e.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r$1.__h.push(i2)); +function _(n2, u2) { + var i2 = d(t++, 4); + !c.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r$1.__h.push(i2)); } -function F(n2) { - return o = 5, q(function() { +function A(n2) { + return o = 5, T(function() { return { current: n2 }; }, []); } -function q(n2, r2) { - var u2 = h(t++, 7); - return C(u2.__H, r2) ? (u2.__V = n2(), u2.i = r2, u2.__h = n2, u2.__V) : u2.__; +function T(n2, r2) { + var u2 = d(t++, 7); + return C(u2.__H, r2) && (u2.__ = n2(), u2.__H = r2, u2.__h = n2), u2.__; } -function x(n2, t2) { - return o = 8, q(function() { +function q(n2, t2) { + return o = 8, T(function() { return n2; }, t2); } @@ -14890,26 +14967,26 @@ function j() { for (var n2; n2 = f.shift(); ) if (n2.__P && n2.__H) try { n2.__H.__h.forEach(z), n2.__H.__h.forEach(B), n2.__H.__h = []; } catch (t2) { - n2.__H.__h = [], e.__e(t2, n2.__v); + n2.__H.__h = [], c.__e(t2, n2.__v); } } -e.__b = function(n2) { - r$1 = null, a && a(n2); -}, e.__ = function(n2, t2) { - n2 && t2.__k && t2.__k.__m && (n2.__m = t2.__k.__m), d && d(n2, t2); -}, e.__r = function(n2) { - v && v(n2), t = 0; +c.__b = function(n2) { + r$1 = null, e && e(n2); +}, c.__ = function(n2, t2) { + n2 && t2.__k && t2.__k.__m && (n2.__m = t2.__k.__m), s && s(n2, t2); +}, c.__r = function(n2) { + a && a(n2), t = 0; var i2 = (r$1 = n2.__c).__H; i2 && (u === r$1 ? (i2.__h = [], r$1.__h = [], i2.__.forEach(function(n3) { - n3.__N && (n3.__ = n3.__N), n3.__V = c, n3.__N = n3.i = void 0; + n3.__N && (n3.__ = n3.__N), n3.i = n3.__N = void 0; })) : (i2.__h.forEach(z), i2.__h.forEach(B), i2.__h = [], t = 0)), u = r$1; -}, e.diffed = function(n2) { - l && l(n2); +}, c.diffed = function(n2) { + v && v(n2); var t2 = n2.__c; - t2 && t2.__H && (t2.__H.__h.length && (1 !== f.push(t2) && i === e.requestAnimationFrame || ((i = e.requestAnimationFrame) || w)(j)), t2.__H.__.forEach(function(n3) { - n3.i && (n3.__H = n3.i), n3.__V !== c && (n3.__ = n3.__V), n3.i = void 0, n3.__V = c; + t2 && t2.__H && (t2.__H.__h.length && (1 !== f.push(t2) && i === c.requestAnimationFrame || ((i = c.requestAnimationFrame) || w)(j)), t2.__H.__.forEach(function(n3) { + n3.i && (n3.__H = n3.i), n3.i = void 0; })), u = r$1 = null; -}, e.__c = function(n2, t2) { +}, c.__c = function(n2, t2) { t2.some(function(n3) { try { n3.__h.forEach(z), n3.__h = n3.__h.filter(function(n4) { @@ -14918,11 +14995,11 @@ e.__b = function(n2) { } catch (r2) { t2.some(function(n4) { n4.__h && (n4.__h = []); - }), t2 = [], e.__e(r2, n3.__v); + }), t2 = [], c.__e(r2, n3.__v); } - }), m && m(n2, t2); -}, e.unmount = function(n2) { - s && s(n2); + }), l && l(n2, t2); +}, c.unmount = function(n2) { + m && m(n2); var t2, r2 = n2.__c; r2 && r2.__H && (r2.__H.__.forEach(function(n3) { try { @@ -14930,7 +15007,7 @@ e.__b = function(n2) { } catch (n4) { t2 = n4; } - }), r2.__H = void 0, t2 && e.__e(t2, r2.__v)); + }), r2.__H = void 0, t2 && c.__e(t2, r2.__v)); }; var k = "function" == typeof requestAnimationFrame; function w(n2) { @@ -14976,7 +15053,7 @@ function PopupMenuHeader(props) { setSelectedEntry, title } = props; - const groups = q(() => groupEntries$1(headerEntries), [headerEntries]); + const groups = T(() => groupEntries$1(headerEntries), [headerEntries]); return m$1`

${title}

@@ -15051,7 +15128,6 @@ function PopupMenuItem(props) { onMouseEnter=${onMouseEnter} onMouseLeave=${onMouseLeave} onDragStart=${(event2) => onAction(event2, entry, "dragstart")} - aria-role="button" draggable=${true} >
@@ -15100,9 +15176,9 @@ function PopupMenuList(props) { entries, ...restProps } = props; - const resultsRef = F(); - const groups = q(() => groupEntries(entries), [entries]); - A(() => { + const resultsRef = A(); + const groups = T(() => groupEntries(entries), [entries]); + _(() => { const containerEl = resultsRef.current; if (!containerEl) return; @@ -15176,14 +15252,14 @@ function PopupMenuComponent(props) { onOpened, onClosed } = props; - const searchable = q(() => { + const searchable = T(() => { if (!isDefined(search)) { return false; } return originalEntries.length > 5; }, [search, originalEntries]); - const [value, setValue] = p(""); - const filterEntries = x((originalEntries2, value2) => { + const [value, setValue] = h(""); + const filterEntries = q((originalEntries2, value2) => { if (!searchable) { return originalEntries2; } @@ -15203,18 +15279,18 @@ function PopupMenuComponent(props) { }; return originalEntries2.filter(filter2); }, [searchable]); - const [entries, setEntries] = p(filterEntries(originalEntries, value)); - const [selectedEntry, setSelectedEntry] = p(entries[0]); - const updateEntries = x((newEntries) => { + const [entries, setEntries] = h(filterEntries(originalEntries, value)); + const [selectedEntry, setSelectedEntry] = h(entries[0]); + const updateEntries = q((newEntries) => { if (!selectedEntry || !newEntries.includes(selectedEntry)) { setSelectedEntry(newEntries[0]); } setEntries(newEntries); }, [selectedEntry, setEntries, setSelectedEntry]); - _(() => { + y(() => { updateEntries(filterEntries(originalEntries, value)); }, [value, originalEntries]); - const keyboardSelect = x((direction) => { + const keyboardSelect = q((direction) => { const idx = entries.indexOf(selectedEntry); let nextIdx = idx + direction; if (nextIdx < 0) { @@ -15225,7 +15301,7 @@ function PopupMenuComponent(props) { } setSelectedEntry(entries[nextIdx]); }, [entries, selectedEntry, setSelectedEntry]); - const handleKeyDown = x((event2) => { + const handleKeyDown = q((event2) => { if (event2.key === "Enter" && selectedEntry) { return onSelect(event2, selectedEntry); } @@ -15238,18 +15314,18 @@ function PopupMenuComponent(props) { return event2.preventDefault(); } }, [onSelect, selectedEntry, keyboardSelect]); - const handleKey = x((event2) => { + const handleKey = q((event2) => { if (matches(event2.target, "input")) { setValue(() => event2.target.value); } }, [setValue]); - _(() => { + y(() => { onOpened(); return () => { onClosed(); }; }, []); - const displayHeader = q(() => title || headerEntries.length > 0, [title, headerEntries]); + const displayHeader = T(() => title || headerEntries.length > 0, [title, headerEntries]); return m$1` <${PopupMenuWrapper} onClose=${onClose} @@ -15304,8 +15380,8 @@ function PopupMenuWrapper(props) { children, position: positionGetter } = props; - const popupRef = F(); - A(() => { + const popupRef = A(); + _(() => { if (typeof positionGetter !== "function") { return; } @@ -15314,7 +15390,7 @@ function PopupMenuWrapper(props) { popupEl.style.left = `${position.x}px`; popupEl.style.top = `${position.y}px`; }, [popupRef.current, positionGetter]); - A(() => { + _(() => { const popupEl = popupRef.current; if (!popupEl) { return; @@ -15322,7 +15398,7 @@ function PopupMenuWrapper(props) { const inputEl = popupEl.querySelector("input"); (inputEl || popupEl).focus(); }, []); - _(() => { + y(() => { const handleKeyDown = (event2) => { if (event2.key === "Escape") { event2.preventDefault(); diff --git a/shared/bpmn-designer/dist/index.umd.js b/shared/bpmn-designer/dist/index.umd.js index ac610341..180d2170 100644 --- a/shared/bpmn-designer/dist/index.umd.js +++ b/shared/bpmn-designer/dist/index.umd.js @@ -1,13 +1,13 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("quasar"),require("vue"),require("@herodotus/components"),require("@herodotus/bpmn-apis"),require("@herodotus/core"),require("bpmn-js-properties-panel"),require("bpmn-js-token-simulation"),require("ids"),require("diagram-js")):"function"==typeof define&&define.amd?define(["exports","quasar","vue","@herodotus/components","@herodotus/bpmn-apis","@herodotus/core","bpmn-js-properties-panel","bpmn-js-token-simulation","ids","diagram-js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@herodotus/bpmn-designer"]={},e.quasar,e.vue,e.HerodotusComponents,e.HerodotusBpmnApis,e.HerodotusCore,e.BpmnJsPropertiesPanel,e.BpmnJsTokenSimulation,e.Ids,e.DiagramJs)}(this,(function(e,t,n,i,r,o,a,s,c,l){"use strict";const p=n.defineComponent({name:"HBpmnDesignerToolbar",components:{HListItem:i.HListItem,HSwitch:i.HSwitch,HTextField:i.HTextField},props:{file:{type:String,required:!0},zoom:{type:Number,default:1}},emits:["update:file","downloadXml","downloadSvg","downloadBpmn","alignLeft","alignRight","alignTop","alignBottom","alignHorizontalCenter","alignVerticalCenter","zoomMinus","zoomPlus","zoomReset","undo","redo","refresh","simulation","save"],setup(e,{emit:t}){const i=n.ref(null),r=n.ref(!1),o=n.ref(!1),a=n.ref(""),s=n.computed({get:()=>e.file,set:e=>{t("update:file",e)}}),c=n.ref(""),l=n.ref(""),p=n.ref(!1),u=n.ref(!1),d=n.ref(!1);n.watch(i,(e=>{(async e=>{if(e){const t=await e.text();a.value=e.name,t&&(s.value=t)}else s.value=""})(e)})),n.watch((()=>a.value),(e=>{e&&(c.value=e,d.value=!0)}),{immediate:!0}),n.watch(u,(e=>{e&&(p.value=!0)}),{immediate:!0});return{bpmnModelFile:i,onDownloadXml:()=>{t("downloadXml")},onDownloadSvg:()=>{t("downloadSvg")},onDownloadBpmn:()=>{t("downloadBpmn")},onAlignLeft:()=>{t("alignLeft")},onAlignRight:()=>{t("alignRight")},onAlignTop:()=>{t("alignTop")},onAlignBottom:()=>{t("alignBottom")},onAlignHorizontalCenter:()=>{t("alignHorizontalCenter")},onAlignVerticalCenter:()=>{t("alignVerticalCenter")},onZoomMinus:()=>{t("zoomMinus")},onZoomPlus:()=>{t("zoomPlus")},onZoomReset:()=>{t("zoomReset")},onUndo:()=>{t("undo")},onRedo:()=>{t("redo")},onRefresh:()=>{t("refresh")},simulation:r,onSimulation:()=>{r.value=!r.value,t("simulation")},showUploadDialog:o,onSave:()=>{o.value=!1;const e={deploymentName:c.value,enableDuplicateFiltering:p.value,deployChangedOnly:u.value,resource:s.value};t("save",e)},name:a,deploymentName:c,tenantId:l,enableDuplicateCheck:p,deployChangedOnly:u,disableNameInput:d}}}),u=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},d=n.createElementVNode("div",{class:"text-h6"},"模型信息",-1);const h=u(p,[["render",function(e,i,r,o,a,s){const c=t.QIcon,l=t.QFile,p=t.QSeparator,u=n.resolveComponent("h-list-item"),h=t.QList,m=t.QBtnDropdown,f=n.resolveComponent("h-button"),g=t.QBtnGroup,y=t.QBtn,v=t.QCardSection,b=n.resolveComponent("h-text-field"),x=n.resolveComponent("h-switch"),_=t.QCardActions,w=t.QCard,E=t.QDialog,S=t.QToolbar,C=n.resolveDirective("close-popup");return n.openBlock(),n.createBlock(S,{class:"bg-primary text-white q-px-none"},{default:n.withCtx((()=>[n.createVNode(l,{modelValue:e.bpmnModelFile,"onUpdate:modelValue":i[0]||(i[0]=t=>e.bpmnModelFile=t),"label-color":"white","bg-color":"primary",square:"",standout:"",dense:"",clearable:"",label:"打开"},{prepend:n.withCtx((()=>[n.createVNode(c,{name:"mdi-folder-open",color:"white"})])),_:1},8,["modelValue"]),n.createVNode(p,{vertical:"",color:"white"}),n.createVNode(m,{stretch:"",flat:"",label:"下载",dense:"",icon:"mdi-download-box"},{default:n.withCtx((()=>[n.createVNode(h,null,{default:n.withCtx((()=>[n.createVNode(h,null,{default:n.withCtx((()=>[n.createVNode(u,{label:"下载为XML文件",icon:"mdi-xml",onClick:i[1]||(i[1]=t=>e.onDownloadXml())}),n.createVNode(u,{label:"下载为SVG文件",icon:"mdi-svg",onClick:i[2]||(i[2]=t=>e.onDownloadSvg())}),n.createVNode(u,{label:"下载为BPMN文件",icon:"mdi-codepen",onClick:i[3]||(i[3]=t=>e.onDownloadBpmn())})])),_:1})])),_:1})])),_:1}),n.createVNode(p,{vertical:"",color:"white"}),n.createVNode(m,{stretch:"",flat:"",label:"代码",dense:"",icon:"mdi-eye"},{default:n.withCtx((()=>[n.createVNode(h,null,{default:n.withCtx((()=>[n.createVNode(h,null,{default:n.withCtx((()=>[n.createVNode(u,{label:"预览XML",icon:"mdi-xml"}),n.createVNode(u,{label:"预览JSON",icon:"mdi-code-json"})])),_:1})])),_:1})])),_:1}),n.createVNode(p,{vertical:"",color:"white"}),n.createVNode(f,{stretch:"",flat:"",color:"primary",dense:"","text-color":"white",icon:e.simulation?"mdi-play-pause":"mdi-play",tooltip:e.simulation?"退出模拟":"开启模拟",label:e.simulation?"退出模拟":"开启模拟",onClick:i[4]||(i[4]=t=>e.onSimulation())},null,8,["icon","tooltip","label"]),n.createVNode(p,{vertical:"",color:"white"}),n.createVNode(f,{stretch:"",flat:"",color:"primary",dense:"","text-color":"white",icon:"mdi-cloud-upload",tooltip:"上传至服务器",label:"上传云端",onClick:i[5]||(i[5]=t=>e.showUploadDialog=!0)}),n.createVNode(p,{vertical:"",color:"white"}),n.createVNode(g,{class:"q-ml-sm"},{default:n.withCtx((()=>[n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-horizontal-left",tooltip:"向左对齐",onClick:i[6]||(i[6]=t=>e.onAlignLeft())}),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-horizontal-right",tooltip:"向右对齐",onClick:i[7]||(i[7]=t=>e.onAlignRight())}),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-vertical-top",tooltip:"向上对齐",onClick:i[8]||(i[8]=t=>e.onAlignTop())}),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-vertical-bottom",tooltip:"向下对齐",onClick:i[9]||(i[9]=t=>e.onAlignBottom())}),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-horizontal-center",tooltip:"水平居中",onClick:i[10]||(i[10]=t=>e.onAlignHorizontalCenter())}),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-vertical-center",tooltip:"垂直居中",onClick:i[11]||(i[11]=t=>e.onAlignVerticalCenter())})])),_:1}),n.createVNode(g,{class:"q-ml-xs"},{default:n.withCtx((()=>[n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-magnify-minus",tooltip:"缩小视图",disable:e.zoom<.2,onClick:i[12]||(i[12]=t=>e.onZoomMinus())},null,8,["disable"]),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(y,{color:"white","text-color":"grey-8",dense:"",class:"q-px-sm",label:Math.floor(10*e.zoom*10)+"%",disable:""},null,8,["label"]),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-magnify-plus",tooltip:"放大视图",disable:e.zoom>4,onClick:i[13]||(i[13]=t=>e.onZoomPlus())},null,8,["disable"]),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-magnify-scan",tooltip:"重置视图并居中",onClick:i[14]||(i[14]=t=>e.onZoomReset())})])),_:1}),n.createVNode(g,{class:"q-mx-xs"},{default:n.withCtx((()=>[n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-undo-variant",tooltip:"撤销",onClick:e.onUndo},null,8,["onClick"]),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-redo-variant",tooltip:"恢复",onClick:e.onRedo},null,8,["onClick"]),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-refresh",onClick:e.onRefresh},null,8,["onClick"])])),_:1}),n.createVNode(E,{modelValue:e.showUploadDialog,"onUpdate:modelValue":i[19]||(i[19]=t=>e.showUploadDialog=t)},{default:n.withCtx((()=>[n.createVNode(w,null,{default:n.withCtx((()=>[n.createVNode(v,null,{default:n.withCtx((()=>[d])),_:1}),n.createVNode(p),n.createVNode(v,{style:{"max-height":"50vh"},class:"scroll"},{default:n.withCtx((()=>[n.createVNode(b,{modelValue:e.deploymentName,"onUpdate:modelValue":i[15]||(i[15]=t=>e.deploymentName=t),label:"模型名称",placeholder:"请输入模型名称",disable:e.disableNameInput},null,8,["modelValue","disable"]),n.createVNode(x,{modelValue:e.enableDuplicateCheck,"onUpdate:modelValue":i[16]||(i[16]=t=>e.enableDuplicateCheck=t),label:"开启部署重复检查"},null,8,["modelValue"]),n.createVNode(x,{modelValue:e.deployChangedOnly,"onUpdate:modelValue":i[17]||(i[17]=t=>e.deployChangedOnly=t),label:"仅在模型存在变化时部署"},null,8,["modelValue"])])),_:1}),n.createVNode(p),n.createVNode(_,{align:"right"},{default:n.withCtx((()=>[n.withDirectives(n.createVNode(y,{label:"取消",color:"red"},null,512),[[C]]),n.createVNode(y,{label:"部署",color:"primary",onClick:i[18]||(i[18]=t=>e.onSave())})])),_:1})])),_:1})])),_:1},8,["modelValue"])])),_:1})}]]),m='\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n',f=(e,t)=>{const{warnings:n,message:i}=t;t(e,n,i)},g=(e,t)=>{if(e&&t){const n=document.createElement("a");n.download=t,n.href=e,n.click(),URL.revokeObjectURL(n.href)}},y=(e,t="diagram",n)=>({filename:`${t}.${e}`,href:`data:application/${"svg"===e?"text/xml":"bpmn20-xml"};charset=UTF-8,${encodeURIComponent(n)}`,data:n}),v={"Activate the create/remove space tool":"启动创建/删除空间工具","Activate the global connect tool":"启动全局连接工具","Activate the hand tool":"启动手动工具","Activate the lasso tool":"启动 Lasso 工具","Ad-hoc":"Ad-hoc子流程","Add Lane above":"添加到通道之上","Add Lane below":"添加到通道之下","Append compensation activity":"追加补偿活动","Append {type}":"追加 {type}","Business Rule Task":"规则任务","Call Activity":"引用流程","Cancel Boundary Event":"取消边界事件","Cancel End Event":"结束取消事件","Change type":"更改类型","Collapsed Pool":"折叠池","Compensation Boundary Event":"补偿边界事件","Compensation End Event":"结束补偿事件","Compensation Intermediate Throw Event":"中间补偿抛出事件","Compensation Start Event":"补偿启动事件","Complex Gateway":"复杂网关","Conditional Boundary Event (non-interrupting)":"条件边界事件 (非中断)","Conditional Boundary Event":"条件边界事件","Conditional Intermediate Catch Event":"中间条件捕获事件","Conditional Start Event (non-interrupting)":"条件启动事件 (非中断)","Conditional Start Event":"条件启动事件","Connect using Association":"文本关联","Connect using DataInputAssociation":"数据关联","Connect using Sequence/MessageFlow or Association":"消息关联","Create IntermediateThrowEvent/BoundaryEvent":"创建中间抛出/边界事件","Create Pool/Participant":"创建池/参与者","Create expanded SubProcess":"创建可折叠子流程","Create {type}":"创建 {type}","Divide into three Lanes":"分成三条通道","Divide into two Lanes":"分成两条通道","End Event":"结束事件","Error Boundary Event":"错误边界事件","Error End Event":"结束错误事件","Error Start Event":"错误启动事件","Escalation Boundary Event (non-interrupting)":"升级边界事件 (非中断)","Escalation Boundary Event":"升级边界事件","Escalation End Event":"结束升级事件","Escalation Intermediate Throw Event":"中间升级抛出事件","Escalation Start Event (non-interrupting)":"升级启动事件 (非中断)","Escalation Start Event":"升级启动事件","Event Sub Process":"事件子流程","Event based Gateway":"事件网关","Exclusive Gateway":"独占网关","Expanded Pool":"展开池","Inclusive Gateway":"包容网关","Intermediate Throw Event":"中间抛出事件","Link Intermediate Catch Event":"中间链接捕获事件","Link Intermediate Throw Event":"中间链接抛出事件",Loop:"循环","Manual Task":"手动任务","Message Boundary Event (non-interrupting)":"消息边界事件 (非中断)","Message Boundary Event":"消息边界事件","Message End Event":"结束消息事件","Message Intermediate Catch Event":"中间消息捕获事件","Message Intermediate Throw Event":"中间消息抛出事件","Message Start Event (non-interrupting)":"消息启动事件 (非中断)","Message Start Event":"消息启动事件","Parallel Gateway":"并行网关","Parallel Multi Instance":"并行多实例","Receive Task":"接受任务",Remove:"移除","Script Task":"脚本任务","Send Task":"发送任务","Sequential Multi Instance":"串行多实例","Service Task":"服务任务","Signal Boundary Event (non-interrupting)":"信号边界事件 (非中断)","Signal Boundary Event":"信号边界事件","Signal End Event":"结束信号事件","Signal Intermediate Catch Event":"中间信号捕获事件","Signal Intermediate Throw Event":"中间信号抛出事件","Signal Start Event (non-interrupting)":"信号启动事件 (非中断)","Signal Start Event":"信号启动事件","Start Event":"开始事件","Sub Process (collapsed)":"可折叠子流程","Sub Process (expanded)":"可展开子流程","Sub Process":"子流程",Task:"任务","Terminate End Event":"终止边界事件","Timer Boundary Event (non-interrupting)":"定时边界事件 (非中断)","Timer Boundary Event":"定时边界事件","Timer Intermediate Catch Event":"中间定时捕获事件","Timer Start Event (non-interrupting)":"定时启动事件 (非中断)","Timer Start Event":"定时启动事件",Transaction:"事务","User Task":"用户任务","already rendered {element}":"{element} 已呈现","diagram not part of bpmn:Definitions":"图表不是 bpmn:Definitions 的一部分","element required":"需要元素","element {element} referenced by {referenced}#{property} not yet drawn":"元素 {element} 的引用 {referenced}#{property} 尚未绘制","failed to import {element}":"{element} 导入失败","flow elements must be children of pools/participants":"元素必须是池/参与者的子级","more than {count} child lanes":"超过 {count} 条通道","no diagram to display":"没有要显示的图表","no parent for {element} in {parent}":"在 {element} 中没有父元素 {parent}","no process or collaboration to display":"没有可显示的流程或协作","no shape type specified":"未指定形状类型","out of bounds release":"越界释放","Asynchronous Continuations":"异步延续","Candidate starter":"候选发起人",create:"创建","Create new list item":"创建新列表项",Documentation:"文档",General:"常规","Execution listeners":"执行监听器","Extension properties":"扩展属性","External task":"外部任务",Forms:"表单","History cleanup":"历史清理",Inputs:"输入","Job execution":"调度执行",Outputs:"输出",Tasklist:"任务列表"};function b(e,t){t=t||{};return(e=v[e]||e).replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}function x(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}function _(e){return Array.prototype.concat.apply([],e)}const w=Object.prototype.toString,E=Object.prototype.hasOwnProperty;function S(e){return void 0===e}function C(e){return void 0!==e}function k(e){return null==e}function A(e){return"[object Array]"===w.call(e)}function P(e){return"[object Object]"===w.call(e)}function R(e){return"[object Number]"===w.call(e)}function M(e){const t=w.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function T(e){return"[object String]"===w.call(e)}function D(e,t){return E.call(e,t)}function B(e,t){const n=Y(t);let i;return j(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function N(e,t){const n=Y(t);let i=A(e)?-1:void 0;return j(e,(function(e,t){if(n(e,t))return i=t,!1})),i}function O(e,t){const n=Y(t);let i=[];return j(e,(function(e,t){n(e,t)&&i.push(e)})),i}function j(e,t){let n,i;if(S(e))return;const r=A(e)?Q:Z;for(let o in e)if(D(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function L(e,t){if(S(e))return[];!function(e){if(!A(e))throw new Error("must supply array")}(e);const n=Y(t);return e.filter((function(e,t){return!n(e,t)}))}function I(e,t,n){return j(e,(function(e,i){n=t(n,e,i)})),n}function $(e,t){return!!I(e,(function(e,n,i){return e&&t(n,i)}),!0)}function z(e,t){return!!B(e,t)}function F(e,t){let n=[];return j(e,(function(e,i){n.push(t(e,i))})),n}function V(e){return e&&Object.keys(e)||[]}function H(e){return F(e,(e=>e))}function G(e,t,n={}){return t=X(t),j(e,(function(e){let i=t(e)||"_",r=n[i];r||(r=n[i]=[]),r.push(e)})),n}function W(e,...t){e=X(e);let n={};return j(t,(t=>G(t,e,n))),F(n,(function(e,t){return e[0]}))}const U=W;function q(e,t){t=X(t);let n=[];return j(e,(function(e,i){let r=t(e,i),o={d:r,v:e};for(var a=0;ae.v))}function K(e){return function(t){return $(e,(function(e,n){return t[n]===e}))}}function X(e){return M(e)?e:t=>t[e]}function Y(e){return M(e)?e:t=>t===e}function Z(e){return e}function Q(e){return Number(e)}function J(e,t){return e.bind(t)}function ee(e,...t){return Object.assign(e,...t)}function te(e,t){let n={},i=Object(e);return j(t,(function(t){t in i&&(n[t]=e[t])})),n}function ne(e,t){let n={};return j(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}function ie(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const re=Object.prototype.toString,oe=Object.prototype.hasOwnProperty;function ae(e,t){return oe.call(e,t)}function se(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===re.call(e)}(e)?le:ce;for(let o in e)if(ae(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function ce(e){return e}function le(e){return Number(e)}function pe(e,...t){const n=e.style;return se(t,(function(e){e&&se(e,(function(e,t){n[t]=e}))})),e}function ue(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const de=Object.prototype.toString;function he(e){return new me(e)}function me(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function fe(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function ge(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}me.prototype.add=function(e){return this.list.add(e),this},me.prototype.remove=function(e){return"[object RegExp]"==de.call(e)?this.removeMatching(e):(this.list.remove(e),this)},me.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n
a',Ae=!Se.getElementsByTagName("link").length,Se=void 0);var Pe={legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],_default:Ae?[1,"X
","
"]:[0,"",""]};Pe.td=Pe.th=[3,"","
"],Pe.option=Pe.optgroup=[1,'"],Pe.thead=Pe.tbody=Pe.colgroup=Pe.caption=Pe.tfoot=[1,"","
"],Pe.polyline=Pe.ellipse=Pe.polygon=Pe.circle=Pe.text=Pe.line=Pe.path=Pe.rect=Pe.g=[1,'',""];var Re=ke;function Me(e,t){return e&&"function"==typeof e.matches&&e.matches(t)||!1}function Te(e,t){return(t=t||document).querySelector(e)}function De(e,t){return(t=t||document).querySelectorAll(e)}function Be(e){e.parentNode&&e.parentNode.removeChild(e)}function Ne(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(n){}return e}(e,t))}(t,e),e}var Oe=2,je={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":Oe,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":Oe,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Le(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=je[i];r?(r===Oe&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function Ie(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return je[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);Le(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)Le(e,i,t[i])}(e,t);return e}const $e=Object.prototype.toString;function ze(e){return new Fe(e)}function Fe(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Ve(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function He(e){return e.cloneNode(!0)}Fe.prototype.add=function(e){return this.list.add(e),this},Fe.prototype.remove=function(e){return"[object RegExp]"==$e.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Fe.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n"+e+"",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function qe(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=Ue(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Ge.svg,e),t&&Ie(n,t),n}var Ke=null;function Xe(e){return(null===Ke&&(Ke=qe("svg")),Ke).createSVGTransform()}var Ye=/([&<>]{1})/g,Ze=/([\n\r"]{1})/g,Qe={"&":"&","<":"<",">":">",'"':"'"};function Je(e,t){return e.replace(t,(function(e,t){return Qe[t]||t}))}function et(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(Je(e.textContent,Ye));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n"),n=0,i=(a=e.childNodes).length;n")}else t.push("/>");break;case 8:t.push("\x3c!--",Je(e.nodeValue,Ye),"--\x3e");break;case 4:t.push("");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function tt(e,t){return function(e){for(var t=e.firstChild,n=[];t;)et(t,n),t=t.nextSibling;return n.join("")}(e)}function nt(e){var t=e.parentNode;return t&&t.removeChild(e),e}function it(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function rt(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(it(e,i))}(n,t)),n.consolidate()}function ot(){}function at(e,t){this.model=e,this.properties=t}ot.prototype.get=function(e){return this.$model.properties.get(this,e)},ot.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},at.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(ot.prototype);j(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),j(e,J((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var st={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},ct={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function lt(e,t){var n=ct[e];return n?n(t):t}function pt(e){return!!st[e]}function ut(e){return!!ct[e]}function dt(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected or , got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function ht(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function mt(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,j(e,J(this.registerPackage,this))}function ft(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function gt(e){this.model=e}function yt(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function vt(e){return e.replace(/^:/,"")}function bt(e,t={}){this.properties=new gt(this),this.factory=new at(this,this.properties),this.registry=new mt(e,this.properties),this.typeCache={},this.config=t}ht.prototype.build=function(){return te(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},ht.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},ht.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},ht.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=dt(r[0],i),a=dt(r[1],o.prefix).name,s=this.propertiesByName[a];if(!s)throw new Error("refined property <"+a+"> not found");this.replaceProperty(s,e,n),delete e.redefines},ht.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},ht.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},ht.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},ht.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},ht.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},ht.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},ht.prototype.hasProperty=function(e){return this.propertiesByName[e]},ht.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(j(e.properties,J((function(n){n=ee({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[r]=e)},mt.prototype.getPackage=function(e){return this.packageMap[e]},mt.prototype.getPackages=function(){return this.packages},mt.prototype.registerPackage=function(e){e=ee({},e);var t=this.packageMap;ft(t,e,"prefix"),ft(t,e,"uri"),j(e.types,J((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},mt.prototype.registerType=function(e,t){var n=dt((e=ee({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:ee(e.meta||{})})).name,t.prefix),i=n.name,r={};j(e.properties,J((function(e){var t=dt(e.name,n.prefix),i=t.name;pt(e.type)||(e.type=dt(e.type,t.prefix).name),ee(e,{ns:t,name:i}),r[i]=e}),this)),ee(e,{ns:n,name:i,propertiesByName:r}),j(e.extends,J((function(e){var t=dt(e,n.prefix),r=this.typeMap[t.name];r.traits=r.traits||[],r.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},mt.prototype.mapTypes=function(e,t,n){var i=pt(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=dt(n,pt(n)?"":e.prefix);r.mapTypes(o,t,i)}function a(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");j(i.superClass,n?a:function(e){return o(e,!1)}),t(i,!n),j(i.traits,a)},mt.prototype.getEffectiveDescriptor=function(e){var t=dt(e),n=new ht(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},mt.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},gt.prototype.set=function(e,t,n){if(!T(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.getProperty(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[vt(t)]:i?r in e?e[r]=n:yt(e,i,n):e.$attrs[vt(t)]=n},gt.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[vt(t)];var i=n.name;return!e[i]&&n.isMany&&yt(e,n,[]),e[i]},gt.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=ee({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},gt.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},gt.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},gt.prototype.getProperty=function(e,t){var n=this.model,i=n.getPropertyDescriptor(e,t);if(i)return i;if(t.includes(":"))return null;const r=n.config.strict;if(void 0!==r){const n=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(r)throw n}return null},bt.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},bt.prototype.getType=function(e){var t=this.typeCache,n=T(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},bt.prototype.createAny=function(e,t,n){var i=dt(e),r={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){!function(e,t,n){let i=e;j(t,(function(e,r){if("number"!=typeof e&&"string"!=typeof e)throw new Error("illegal key type: "+typeof e+". Key should be of type number or string.");if("constructor"===e)throw new Error("illegal key: constructor");if("__proto__"===e)throw new Error("illegal key: __proto__");let o=t[r+1],a=i[e];C(o)&&k(a)&&(a=i[e]=isNaN(+o)?{}:[]),S(o)?S(n)?delete i[e]:i[e]=n:i=a}))}(this,[e],t)}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"get",{enumerable:!1,writable:!0}),this.properties.define(r,"set",{enumerable:!1,writable:!0}),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),this.properties.define(r,"$instanceOf",{enumerable:!1,writable:!0}),j(n,(function(e,t){P(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e})),r},bt.prototype.getPackage=function(e){return this.registry.getPackage(e)},bt.prototype.getPackages=function(){return this.registry.getPackages()},bt.prototype.getElementDescriptor=function(e){return e.$descriptor},bt.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},bt.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},bt.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var xt=String.fromCharCode,_t=Object.prototype.hasOwnProperty,wt=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,Et={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function St(e,t,n,i){return i?_t.call(Et,i)?Et[i]:"&"+i+";":xt(t||parseInt(n,16))}function Ct(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(wt,St):e}Object.keys(Et).forEach((function(e){Et[e.toUpperCase()]=Et[e]}));var kt="xsi:type",At="non-whitespace outside of root node";function Pt(e){return new Error(e)}function Rt(e){return"missing namespace for prefix <"+e+">"}function Mt(e){return{get:e,enumerable:!0}}function Tt(e){var t,n={};for(t in e)n[t]=e[t];return n}function Dt(e){return e+"$uri"}function Bt(){return{line:0,column:0}}function Nt(e){throw e}function Ot(e){if(!this)return new Ot(e);var t,n,i,r,o,a,s,c,l,p=e&&e.proxy,u=Nt,d=Bt,h=!1,m=!1,f=null,g=!1;function y(e){e instanceof Error||(e=Pt(e)),f=e,u(e,d)}function v(e){o&&(e instanceof Error||(e=Pt(e)),o(e,d))}this.on=function(e,l){if("function"!=typeof l)throw Pt("required args ");switch(e){case"openTag":n=l;break;case"text":t=l;break;case"closeTag":i=l;break;case"error":u=l;break;case"warn":o=l;break;case"cdata":r=l;break;case"attention":c=l;break;case"question":s=l;break;case"comment":a=l;break;default:throw Pt("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw Pt("required args ");var t,n={};for(t in e)n[t]=e[t];return n["http://www.w3.org/2001/XMLSchema-instance"]="xsi",m=!0,l=n,this},this.parse=function(e){if("string"!=typeof e)throw Pt("required args ");return f=null,function(e){var o,u,f,b,x,_,w,E,S,C,k,A=m?[]:null,P=m?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Dt(n)]=t;return i}(l):null,R=[],M=0,T=!1,D=!1,B=0,N=0,O="",j=0;function L(){if(null!==k)return k;var e,t,n,i,r,o,a,s,c,p,u,d=m&&P.xmlns,f=m&&h?[]:null,g=j,y=O,b=y.length,x={},_={};e:for(;g8)){for((p<65||p>122||p>90&&p<97)&&95!==p&&58!==p&&(v("illegal first char attribute name"),c=!0),u=g+1;u96&&p<123||p>64&&p<91||p>47&&p<59||46===p||45===p||95===p)){if(32===p||p<14&&p>8){v("missing attribute value"),g=u;continue e}if(61===p)break;v("illegal attribute name char"),c=!0}if("xmlns:xmlns"===(s=y.substring(g,u))&&(v("illegal declaration of xmlns"),c=!0),34===(p=y.charCodeAt(u+1)))-1===(u=y.indexOf('"',g=u+2))&&-1!==(u=y.indexOf("'",g))&&(v("attribute value quote missmatch"),c=!0);else if(39===p)-1===(u=y.indexOf("'",g=u+2))&&-1!==(u=y.indexOf('"',g))&&(v("attribute value quote missmatch"),c=!0);else for(v("missing attribute value quotes"),c=!0,u+=1;u8);u++);for(-1===u&&(v("missing closing quotes"),u=b,c=!0),c||(o=y.substring(g,u)),g=u;u+18);u++)g===u&&(v("illegal character after attribute end"),c=!0);if(g=u+1,!c)if(s in _)v("attribute <"+s+"> already defined");else if(_[s]=!0,m)if(h){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=Ct(o),t=Dt(r),!(a=l[e])){if("xmlns"===r||t in P&&P[t]!==e)do{a="ns"+M++}while(void 0!==P[a]);else a=r;l[e]=a}P[r]!==a&&(i||(P=Tt(P),i=!0),P[r]=a,"xmlns"===r&&(P[Dt(a)]=e,d=a),P[t]=e),x[s]=o;continue}f.push(s,o)}else-1!==(p=s.indexOf(":"))?(n=P[s.substring(0,p)])?((s=d===n?s.substr(p+1):n+s.substr(p))===kt&&(-1!==(p=o.indexOf(":"))?(n=o.substring(0,p),o=(n=P[n]||n)+o.substring(p)):o=d+":"+o),x[s]=o):v(Rt(s.substring(0,p))):x[s]=o;else x[s]=o}if(h)for(g=0,b=f.length;g=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>B);)r+=1,a=s;return-1==B?(o=s,n=e.substring(N)):0===N?n=e.substring(N,B):(o=B-a,n=-1==N?e.substring(B):e.substring(B,N+1)),{data:n,line:r,column:o}}d=I,p&&(C=Object.create({},{name:Mt((function(){return E})),originalName:Mt((function(){return S})),attrs:Mt(L),ns:Mt((function(){return P}))}));for(;-1!==N;){if(-1===(B=60===e.charCodeAt(N)?N:e.indexOf("<",N)))return R.length?y("unexpected end of file"):0===N?y("missing start tag"):void(N",B)))return y("unclosed cdata");if(r&&(r(e.substring(B+9,N),d),g))return;N+=3;continue}if(45===b&&45===e.charCodeAt(B+3)){if(-1===(N=e.indexOf("--\x3e",B)))return y("unclosed comment");if(a&&(a(e.substring(B+4,N),Ct,d),g))return;N+=3;continue}}if(63!==x){for(u=B+1;;u++){if(_=e.charCodeAt(u),isNaN(_))return N=-1,y("unclosed tag");if(34===_)u=-1!==(b=e.indexOf('"',u+1))?b:u;else if(39===_)u=-1!==(b=e.indexOf("'",u+1))?b:u;else if(62===_){N=u;break}}if(33!==x){if(k={},47===x){if(T=!1,D=!0,!R.length)return y("missing open tag");if(u=E=R.pop(),b=B+2+u.length,e.substring(B+2,b)!==u)return y("closing tag mismatch");for(;b8&&x<14))return y("close tag")}else{if(47===e.charCodeAt(N-1)?(u=E=e.substring(B+1,N-1),T=!0,D=!0):(u=E=e.substring(B+1,N),T=!0,D=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return y("illegal first char nodeName");for(b=1,f=u.length;b96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46==x)){if(32===x||x<14&&x>8){E=u.substring(0,b),k=null;break}return y("invalid nodeName")}D||R.push(E)}if(m){if(o=P,T&&(D||A.push(o),null===k&&(h=-1!==u.indexOf("xmlns",b))&&(j=b,O=u,L(),h=!1)),S=E,-1!==(x=E.indexOf(":"))){if(!(w=P[E.substring(0,x)]))return y("missing namespace on <"+S+">");E=E.substr(x+1)}else w=P.xmlns;w&&(E=w+":"+E)}if(T&&(j=b,O=u,n&&(p?n(C,Ct,D,d):n(E,L,Ct,D,d),g)))return;if(D){if(i&&(i(p?C:E,Ct,T,d),g))return;m&&(P=T?o:A.pop())}N+=1}else{if(c&&(c(e.substring(B,N+1),Ct,d),g))return;N+=1}}else{if(-1===(N=e.indexOf("?>",B)))return y("unclosed question");if(s&&(s(e.substring(B,N+2),d),g))return;N+=2}}}(e),d=Bt,g=!1,f},this.stop=function(){g=!0}}function jt(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Lt={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},It="xsi:type";function $t(e){return e.xml&&e.xml.serialize}function zt(e){return $t(e)===It}function Ft(e,t){return jt(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Vt(e){return new Error(e)}function Ht(e){return e.$descriptor}function Gt(e){ee(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw Vt("expected element");var t,n=this.elementsById,i=Ht(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw Vt("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Wt(){}function Ut(){}function qt(){}function Kt(e,t){this.property=e,this.context=t}function Xt(e,t){this.element=t,this.propertyDesc=e}function Yt(){}function Zt(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function Qt(e,t,n){Zt.call(this,e,t,n)}function Jt(e,t,n){this.model=e,this.context=n}function en(e){e instanceof bt&&(e={model:e}),ee(this,{lax:!1},e)}Wt.prototype.handleEnd=function(){},Wt.prototype.handleText=function(){},Wt.prototype.handleNode=function(){},Ut.prototype=Object.create(Wt.prototype),Ut.prototype.handleNode=function(){return this},qt.prototype=Object.create(Wt.prototype),qt.prototype.handleText=function(e){this.body=(this.body||"")+e},Kt.prototype=Object.create(qt.prototype),Kt.prototype.handleNode=function(e){if(this.element)throw Vt("expected no sub nodes");return this.element=this.createReference(e),this},Kt.prototype.handleEnd=function(){this.element.id=this.body},Kt.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},Xt.prototype=Object.create(qt.prototype),Xt.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=lt(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Yt.prototype=Object.create(qt.prototype),Yt.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},Zt.prototype=Object.create(Yt.prototype),Zt.prototype.addReference=function(e){this.context.addReference(e)},Zt.prototype.handleText=function(e){if(!Ht(this.element).bodyProperty)throw Vt("unexpected body text <"+e+">");qt.prototype.handleText.call(this,e)},Zt.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Ht(t).bodyProperty;n&&void 0!==e&&(e=lt(n.type,e),t.set(n.name,e))},Zt.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Ht(i),o=this.context,a=new i({}),s=this.model;return j(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?j(e.split(" "),(function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i?e=lt(i.type,e):"xmlns"!==n&&(t=dt(n,r.ns.prefix),s.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:a,property:n,value:e})),a.set(n,e))})),a},Zt.prototype.getPropertyForNode=function(e){var t,n,i=dt(e.name),r=this.type,o=this.model,a=Ht(r),s=i.name,c=a.propertiesByName[s];if(c&&!c.isAttr)return zt(c)&&(t=e.attributes[It])?(t=function(e,t){var n=dt(e);return function(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(n,t.getPackage(n.prefix))}(t,o),ee({},c,{effectiveType:Ht(n=o.getType(t)).name})):c;var l=o.getPackage(i.prefix);if(l){if(t=Ft(i,l),n=o.getType(t),c=B(a.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return ee({},c,{effectiveType:Ht(n).name})}else if(c=B(a.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return c;throw Vt("unrecognized element <"+i.name+">")},Zt.prototype.toString=function(){return"ElementDescriptor["+Ht(this.type).name+"]"},Zt.prototype.valueHandler=function(e,t){return new Xt(e,t)},Zt.prototype.referenceHandler=function(e){return new Kt(e,this.context)},Zt.prototype.handler=function(e){return"Element"===e?new Jt(this.model,e,this.context):new Zt(this.model,e,this.context)},Zt.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,ut(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(ee(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},Qt.prototype=Object.create(Zt.prototype),Qt.prototype.createElement=function(e){var t=e.name,n=dt(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&Ft(n,o)||t;if(!r.hasType(a))throw Vt("unexpected element <"+e.originalName+">");return Zt.prototype.createElement.call(this,e)},Jt.prototype=Object.create(Yt.prototype),Jt.prototype.createElement=function(e){var t=e.name,n=dt(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Jt.prototype.handleChild=function(e){var t=new Jt(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},Jt.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},en.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Zt?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,a=new Gt(ee({},t,{rootHandler:i})),s=new Ot({proxy:!0}),c=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function l(e,t,n){var i=t(),r=i.line,o=i.column,s=i.data;"<"===s.charAt(0)&&-1!==s.indexOf(" ")&&(s=s.slice(0,s.indexOf(" "))+">");var c="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:c,error:e}),!0;throw Vt(c)}function p(e,t){return l(e,t,!0)}i.context=a,c.push(i);var u=/^<\?xml /i,d=/ encoding="([^"]+)"/i,h=/^utf-8$/i;function m(e,t){try{c.peek().handleText(e)}catch(n){p(n,t)}}var f=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return s.ns(f).on("openTag",(function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=c.peek();try{c.push(n.handleNode(e))}catch(i){l(i,t,o)&&c.push(new Ut)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=d.exec(e),n=t&&t[1];n&&!h.test(n)&&a.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){c.pop().handleEnd()})).on("cdata",m).on("text",(function(e,t,n){!function(e,t){e.trim()&&m(e,t)}(t(e),n)})).on("error",l).on("warn",p),new Promise((function(t,n){var r;try{s.parse(e),function(){var e,t,n=a.elementsById,i=a.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],s=Ht(r).propertiesByName[t.property];if(o||a.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),s.isMany){var c=r.get(s.name),l=c.indexOf(t);-1===l&&(l=c.length),o?c[l]=o:c.splice(l,1)}else r.set(s.name,o)}}()}catch(u){r=u}var o=i.element;r||o||(r=Vt("failed to parse document as <"+i.type.$descriptor.name+">"));var c=a.warnings,l=a.references,p=a.elementsById;return r?(r.warnings=c,n(r)):t({rootElement:o,elementsById:p,references:l,warnings:c})}))},en.prototype.handler=function(e){return new Qt(this.model,e)};var tn=/<|>|'|"|&|\n\r|\n/g,nn=/<|>|&/g;function rn(e){var t={},n={},i={},r=[],o=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):o.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,r=this.getNSKey(t);i[r]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(r,o).filter((function(e){var n=t.getNSKey(e);return i[n]}))}}function on(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function an(e){return T(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var sn={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},cn={"<":"lt",">":"gt","&":"amp"};function ln(e,t,n){return(e=T(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function pn(e){this.tagName=e}function un(){}function dn(e){this.tagName=e}function hn(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function mn(e,t){hn.call(this,e,t)}function fn(){this.value="",this.write=function(e){this.value+=e}}function gn(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function yn(e){return e=ee({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new fn,r=new gn(i,e.format);if(e.preamble&&r.append('\n'),(new hn).build(t).serializeTo(r),!n)return i.value}}}function vn(e,t){bt.call(this,e,t)}pn.prototype.build=function(e){return this.element=e,this},pn.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"").appendNewLine()},un.prototype.serializeValue=un.prototype.serializeTo=function(e){e.append(this.escape?ln(this.value,nn,cn):this.value)},un.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(nn)&&(this.escape=!0),this},on(dn,un),dn.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("").appendNewLine()},hn.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o||(n=function(e){return O(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!D(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(O(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return O(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},hn.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?ee({localName:t.ns.localName},e):ee({localName:(n=t.ns.localName,i=t.$pkg,jt(i)?(r=n).charAt(0).toLowerCase()+r.slice(1):n)},e);var n,i,r}(this.logNamespaceUsed(e.ns),e)},hn.prototype.nsPropertyTagName=function(e){return function(e,t){return ee({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},hn.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},hn.prototype.nsAttributeName=function(e){var t;if(t=T(e)?dt(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:ee({localName:t.localName},n)},hn.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return j(e,(function(r,o){"$body"===o?n.push((new un).build({type:"String"},r)):"$children"===o?j(r,(function(e){n.push(new hn(t).build(e))})):0!==o.indexOf("$")&&t.parseNsAttribute(e,o,r)&&i.push({name:o,value:r})})),i},hn.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=dt(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var a=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(a)}},hn.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];return j(i,(function(t,i){var o=n.parseNsAttribute(e,i,t);o&&r.push(o)})),r},hn.prototype.parseGenericAttributes=function(e,t){var n=this;j(t,(function(e){if(e.name!==It)try{n.addAttribute(n.nsAttributeName(e.name),e.value)}catch(t){}}))},hn.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;j(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new un).build(e,r[0]));else if(ut(e.type))j(r,(function(i){n.push(new dn(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)j(r,(function(i){n.push(new pn(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=zt(e),s=function(e){return"property"===$t(e)}(e);j(r,(function(i){var r;r=a?new mn(t,e):s?new hn(t,e):new hn(t),n.push(r.build(i))}))}}))},hn.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new rn(t):n=t),n},hn.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},hn.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.element.$model,a=this.getNamespaces(t),s=e.prefix,c=e.uri;if(!s&&!c)return{localName:e.localName};if(r=Lt[s]||o&&(o.getPackage(s)||{}).uri,!(c=c||r||a.uriByPrefix(s)))throw new Error("no namespace uri given for prefix <"+s+">");if(!(e=a.byUri(c))){for(n=s,i=1;a.uriByPrefix(n);)n=s+"_"+i++;e=this.logNamespace({prefix:n,uri:c},r===c)}return s&&a.mapPrefix(s,c),e},hn.prototype.parseAttributes=function(e){var t=this,n=this.element;j(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];j(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},hn.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),an(e)},hn.prototype.addAttribute=function(e,t){var n=this.attrs;T(t)&&(t=ln(t,tn,sn));var i=N(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),r={name:e,value:t};-1!==i?n.splice(i,1,r):n.push(r)},hn.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=function(e){return e.getUsed().filter((function(e){return"xml"!==e.prefix})).map((function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}}))}(n).concat(t)),j(t,(function(t){e.append(" ").append(an(t.name)).append('="').append(t.value).append('"')}))},hn.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==un;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),j(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()},on(mn,hn),mn.prototype.parseNsAttributes=function(e){var t=hn.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(It),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},mn.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},vn.prototype=Object.create(bt.prototype),vn.prototype.fromXML=function(e,t,n){T(t)||(n=t,t="bpmn:Definitions");var i=new en(ee({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},vn.prototype.toXML=function(e,t){var n=new yn(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(r){return i(r)}}))};var bn={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]},color:{name:"BPMN in Color",uri:"http://www.omg.org/spec/BPMN/non-normative/color/1.0",prefix:"color",types:[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};function xn(e,t){return new vn(ee({},bn,e),t)}function _n(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':""}var wn="Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472";function En(e){D(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error(wn)}})}function Sn(e,t){return e.$instanceOf(t)}function Cn(e){var t={},n=[],i={};function r(e,t){return function(n){e(n,t)}}function o(e){t[e.id]=e}function a(t,n){try{var r=i[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${_n(t)}`);return e.element(t,i[t.id],n)}(t,n);return o(t),r}catch(a){s(a.message,{element:t,error:a})}}function s(t,n){e.error(t,n)}var c=this.registerDi=function(e){var t=e.bpmnElement;t?i[t.id]?s(`multiple DI elements defined for ${_n(t)}`,{element:t}):(i[t.id]=e,En(t)):s(`no bpmnElement referenced in ${_n(e)}`,{element:e})};function l(e){var t;t=e.plane,c(t),j(t.planeElement,p)}function p(e){c(e)}this.handleDefinitions=function(o,a){var p=o.diagrams;if(a&&-1===p.indexOf(a))throw new Error("diagram not part of ");if(!a&&p&&p.length&&(a=p[0]),!a)throw new Error("no diagram to display");i={},l(a);var m=a.plane;if(!m)throw new Error(`no plane for ${_n(a)}`);var f=m.bpmnElement;if(!f){if(f=function(e){return B(e.rootElements,(function(e){return Sn(e,"bpmn:Process")||Sn(e,"bpmn:Collaboration")}))}(o),!f)throw new Error("no process or collaboration to display");s(`correcting missing bpmnElement on ${_n(m)} to ${_n(f)}`),m.bpmnElement=f,c(m)}var g,y,b=function(t,n){return e.root(t,i[t.id],n)}(f,m);if(Sn(f,"bpmn:Process")||Sn(f,"bpmn:SubProcess"))d(f,b);else{if(!Sn(f,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${_n(m)}: ${_n(f)}`);y=b,j((g=f).participants,r(k,y)),v(g.artifacts,y),n.push((function(){!function(e,t){j(e,r(h,t))}(g.messageFlows,y)})),function(e,n){O(e,(function(e){return!t[e.id]&&Sn(e,"bpmn:Process")&&e.laneSets})).forEach(r(d,n))}(o.rootElements,b)}u(n)};var u=this.handleDeferred=function(){for(;n.length;)n.shift()()};function d(e,t){C(e,t),b(e.ioSpecification,t),v(e.artifacts,t),o(e)}function h(e,t){a(e,t)}function m(e,t){a(e,t)}function f(e,t){a(e,t)}function g(e,t){a(e,t)}function y(e,t){a(e,t)}function v(e,t){j(e,(function(e){Sn(e,"bpmn:Association")?n.push((function(){y(e,t)})):y(e,t)}))}function b(e,t){e&&(j(e.dataInputs,r(f,t)),j(e.dataOutputs,r(g,t)))}var x=this.handleSubProcess=function(e,t){C(e,t),v(e.artifacts,t)};function _(e,t){var i=a(e,t);Sn(e,"bpmn:SubProcess")&&x(e,i||t),Sn(e,"bpmn:Activity")&&b(e.ioSpecification,t),n.push((function(){j(e.dataInputAssociations,r(m,t)),j(e.dataOutputAssociations,r(m,t))}))}function w(e,t){a(e,t)}function E(e,t){n.push((function(){var n=a(e,t);e.childLaneSet&&S(e.childLaneSet,n||t),function(e){j(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function S(e,t){j(e.lanes,r(E,t))}function C(e,t){!function(e,t){j(e,(function(e){Sn(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){a(e,t)}(e,t)})):Sn(e,"bpmn:BoundaryEvent")?n.unshift((function(){_(e,t)})):Sn(e,"bpmn:FlowNode")?_(e,t):Sn(e,"bpmn:DataObject")||(Sn(e,"bpmn:DataStoreReference")||Sn(e,"bpmn:DataObjectReference")?w(e,t):s(`unrecognized flowElement ${_n(e)} in context ${_n(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){j(e,r(S,t))}(e.laneSets,t)}function k(e,t){var n=a(e,t),i=e.processRef;i&&d(i,n||t)}}function kn(e,t){var n=Pn(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function An(e,t){return z(t,(function(t){return kn(e,t)}))}function Pn(e){return e&&e.businessObject||e}function Rn(e){return e&&e.di}function Mn(e,t,n){var i,r,o,a=[];function s(e,t){var n=new Cn({root:function(e,t){return i.add(e,t)},element:function(e,t,n){return i.add(e,t,n)},error:function(e,t){a.push({message:e,context:t})}});t=t||e.diagrams&&e.diagrams[0];var r=function(e,t){if(!t||!t.plane)return;var n,i=t.plane.bpmnElement,r=i;kn(i,"bpmn:Process")||kn(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(kn(t,"bpmn:Process"))return t;t=t.$parent}}(i));n=kn(r,"bpmn:Collaboration")?r:B(e.rootElements,(function(e){if(kn(e,"bpmn:Collaboration"))return B(e.participants,(function(e){return e.processRef===r}))}));var o=[r];n&&(o=F(n.participants,(function(e){return e.processRef}))).push(n);var a=Tn(o),s=[t],c=[i];return j(e.diagrams,(function(e){if(e.plane){var t=e.plane.bpmnElement;-1!==a.indexOf(t)&&-1===c.indexOf(t)&&(s.push(e),c.push(t))}})),s}(e,t);if(!r)throw new Error("no diagram to display");j(r,(function(t){n.handleDefinitions(e,t)}));var s=t.plane.bpmnElement.id;o.setRootElement(o.findRoot(s+"_plane")||o.findRoot(s))}return new Promise((function(c,l){try{return i=e.get("bpmnImporter"),r=e.get("eventBus"),o=e.get("canvas"),r.fire("import.render.start",{definitions:t}),s(t,n),r.fire("import.render.complete",{error:undefined,warnings:a}),c({warnings:a})}catch(p){return p.warnings=a,l(p)}}))}function Tn(e){var t=[];return j(e,(function(e){e&&(t.push(e),t=t.concat(Tn(e.flowElements)))})),t}var Dn,Bn='',Nn={verticalAlign:"middle"},On={color:"#404040"},jn={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},Ln={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},In={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},$n='
'+Bn+'Web-based tooling for BPMN, DMN and forms powered by bpmn.io.
';function zn(){Dn||(pe(Dn=Re($n),jn),pe(Te("svg",Dn),Nn),pe(Te(".backdrop",Dn),Ln),pe(Te(".notice",Dn),In),pe(Te(".link",Dn),On,{margin:"15px 20px 15px 10px",alignSelf:"center"}),Ce.bind(Dn,".backdrop","click",(function(e){document.body.removeChild(Dn)}))),document.body.appendChild(Dn)}function Fn(e){e=ee({},Hn,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),function(e){const t=Re(''+Bn+"");pe(Te("svg",t),Nn),pe(t,On,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(t),we.bind(t,"click",(function(e){zn(),e.preventDefault()}))}(this._container),this._init(this._container,this._moddle,e)}function Vn(e,t){return e.warnings=t,e}x(Fn,l),Fn.prototype.importXML=async function(e,t){const n=this;let i=[];try{let a;e=this._emit("import.parse.start",{xml:e})||e;try{a=await this._moddle.fromXML(e,"bpmn:Definitions")}catch(o){throw this._emit("import.parse.complete",{error:o}),o}let s=a.rootElement;const c=a.references,l=a.warnings,p=a.elementsById;i=i.concat(l),s=this._emit("import.parse.complete",(r={error:null,definitions:s,elementsById:p,references:c,warnings:i},n.get("eventBus").createEvent(r)))||s;const u=await this.importDefinitions(s,t);return i=i.concat(u.warnings),this._emit("import.done",{error:null,warnings:i}),{warnings:i}}catch(a){let e=a;throw i=i.concat(e.warnings||[]),Vn(e,i),e=function(e){const t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]);return e}(e),this._emit("import.done",{error:e,warnings:e.warnings}),e}var r},Fn.prototype.importDefinitions=async function(e,t){this._setDefinitions(e);return{warnings:(await this.open(t)).warnings}},Fn.prototype.open=async function(e){const t=this._definitions;let n=e;if(!t){const e=new Error("no XML imported");throw Vn(e,[]),e}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return B(e.diagrams,(function(e){return e.id===t}))||null}(t,e),!n)){const t=new Error("BPMNDiagram <"+e+"> not found");throw Vn(t,[]),t}try{this.clear()}catch(r){throw Vn(r,[]),r}const{warnings:i}=await Mn(this,t,n);return{warnings:i}},Fn.prototype.saveXML=async function(e){e=e||{};let t,n,i=this._definitions;try{if(!i)throw new Error("no definitions loaded");i=this._emit("saveXML.start",{definitions:i})||i;n=(await this._moddle.toXML(i,e)).xml,n=this._emit("saveXML.serialized",{xml:n})||n}catch(o){t=o}const r=t?{error:t}:{xml:n};if(this._emit("saveXML.done",r),t)throw t;return r},Fn.prototype.saveSVG=async function(){let e,t;this._emit("saveSVG.start");try{const t=this.get("canvas"),n=t.getActiveLayer(),i=Te(":scope > defs",t._svg),r=tt(n),o=i?""+tt(i)+"":"",a=n.getBBox();e='\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n\n'+o+r+""}catch(n){t=n}if(this._emit("saveSVG.done",{error:t,svg:e}),t)throw t;return{svg:e}},Fn.prototype._setDefinitions=function(e){this._definitions=e},Fn.prototype.getModules=function(){return this._modules},Fn.prototype.clear=function(){this.getDefinitions()&&l.prototype.clear.call(this)},Fn.prototype.destroy=function(){l.prototype.destroy.call(this),Be(this._container)},Fn.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},Fn.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Fn.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=Te(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Fn.prototype.getDefinitions=function(){return this._definitions},Fn.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Fn.prototype._init=function(e,t,n){const i=n.modules||this.getModules(n),r=n.additionalModules||[],o=[].concat([{bpmnjs:["value",this],moddle:["value",t]}],i,r),a=ee(ne(n,["additionalModules"]),{canvas:ee({},n.canvas,{container:e}),modules:o});l.call(this,a),n&&n.container&&this.attachTo(n.container)},Fn.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Fn.prototype._createContainer=function(e){const t=Re('
');return pe(t,{width:Gn(e.width),height:Gn(e.height),position:e.position}),t},Fn.prototype._createModdle=function(e){return new xn(ee({},this._moddleExtensions,e.moddleExtensions))},Fn.prototype._modules=[];const Hn={width:"100%",height:"100%",position:"relative"};function Gn(e){return e+(R(e)?"px":"")}function Wn(e){Fn.call(this,e),this.on("import.parse.complete",(function(e){e.error||this._collectIds(e.definitions,e.elementsById)}),this),this.on("diagram.destroy",(function(){this.get("moddle").ids.clear()}),this)}x(Wn,Fn),Wn.prototype._createModdle=function(e){var t=Fn.prototype._createModdle.call(this,e);return t.ids=new c([32,36,1]),t},Wn.prototype._collectIds=function(e,t){var n,i=e.$model.ids;for(n in i.clear(),t)i.claim(n,t[n])};var Un=1e3;function qn(e,t){var n=this;t=t||Un,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,a=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,a):n.drawConnection(o,r,a)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function Kn(e,t){return!kn(e,"bpmn:CallActivity")&&(kn(e,"bpmn:SubProcess")?!(!(t=t||Rn(e))||!kn(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!kn(e,"bpmn:Participant")||!!Pn(e).processRef)}function Xn(e){if(kn(e,"bpmn:Participant")||kn(e,"bpmn:Lane")){var t=Rn(e).isHorizontal;return void 0===t||t}}function Yn(e){return e&&!!Pn(e).triggeredByEvent}function Zn(e,t){return z(Pn(e).eventDefinitions,(function(e){return kn(e,t)}))}function Qn(e){return P(e)&&D(e,"waypoints")}function Jn(e){return P(e)&&D(e,"labelTarget")}qn.prototype.canRender=function(e){},qn.prototype.drawShape=function(e,t){},qn.prototype.drawConnection=function(e,t){},qn.prototype.getShapePath=function(e){},qn.prototype.getConnectionPath=function(e){};var ei={width:90,height:20},ti=15;function ni(e){return kn(e,"bpmn:Event")||kn(e,"bpmn:Gateway")||kn(e,"bpmn:DataStoreReference")||kn(e,"bpmn:DataObjectReference")||kn(e,"bpmn:DataInput")||kn(e,"bpmn:DataOutput")||kn(e,"bpmn:SequenceFlow")||kn(e,"bpmn:MessageFlow")||kn(e,"bpmn:Group")}function ii(e){return Jn(e.label)}function ri(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],r=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}(e),o=Math.atan((i.y-n.y)/(i.x-n.x)),a=r.x,s=r.y;return Math.abs(o) defs",a);c||Ne(a,c=qe("defs")),Ne(c,s)}function h(e,t,n,i){var r=Ai.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){d(t,{element:qe("path",{d:"M 1 5 L 11 10 L 1 15 Z",...p({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("messageflow-start"===n){d(t,{element:qe("circle",{cx:6,cy:6,r:3.5,...p({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6},parentGfx:e})}if("messageflow-end"===n){d(t,{element:qe("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...p({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5},parentGfx:e})}if("association-start"===n){d(t,{element:qe("path",{d:"M 11 5 L 1 10 L 11 15",...u({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5,parentGfx:e})}if("association-end"===n){d(t,{element:qe("path",{d:"M 1 5 L 11 10 L 1 15",...u({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("conditional-flow-marker"===n){d(t,{element:qe("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...p({fill:i,stroke:r})}),ref:{x:-1,y:10},scale:.5,parentGfx:e})}if("conditional-default-flow-marker"===n){d(t,{element:qe("path",{d:"M 6 4 L 10 16",...p({stroke:r,fill:"none"})}),ref:{x:0,y:10},scale:.5,parentGfx:e})}}(e,r,t,n,i),"url(#"+r+")"}function m(e,t,n,i,r={}){P(i)&&(r=i,i=0),i=i||0,r=p(r);var o=qe("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return Ne(e,o),o}function f(e,t,n,i,r,o){P(r)&&(o=r,r=0),r=r||0,o=p(o);var a=qe("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return Ne(e,a),a}function g(e,t,n,i){var r=hi(t,n=u(n),i);return Ne(e,r),r}function y(e,t,n){return g(e,t,n,5)}function v(e,t,n){n=u(n);var i=qe("path",{...n,d:t});return Ne(e,i),i}function b(e,t,n,i){return v(t,n,ee({"data-marker":e},i))}function x(e){return Z[e]}function _(e){return function(t,n,i){return x(e)(t,n,i)}}var w=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:r?vi(t,s,n.fill):bi(t,c,n.stroke),strokeWidth:1})},E=function(e,t,n={}){var r=m(e,t.width,t.height,.2*t.height,{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:2});v(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{stroke:bi(t,c,n.stroke),strokeWidth:2});for(var o=0;o<12;o++){var a=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),l=t.width/2,p=t.height/2;v(e,a,{strokeWidth:1,stroke:bi(t,c,n.stroke),transform:"rotate("+30*o+","+p+","+l+")"})}return r},S=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},C=function(e,t,n={}){return v(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},k=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},A=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},R=function(e,t,n={},r){var o=v(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?bi(t,c,n.stroke):"none",stroke:bi(t,c,n.stroke),strokeWidth:1});return ki(o,45),o},M=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},T=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},D=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),strokeWidth:1})},B=function(e,t,n={}){return v(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},N=function(e,t,n={}){return m(e,t.width,t.height,8,{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:4})};function O(e,t,n={}){var i,r=Pn(e),o="bpmn:IntermediateThrowEvent"===(i=r).$type||"bpmn:EndEvent"===i.$type;return r.get("eventDefinitions")&&r.get("eventDefinitions").length>1?r.get("parallelMultiple")?B(t,e,n,o):D(t,e,n,o):yi(r,"bpmn:MessageEventDefinition")?w(t,e,n,o):yi(r,"bpmn:TimerEventDefinition")?E(t,e,n,o):yi(r,"bpmn:ConditionalEventDefinition")?C(t,e,n,o):yi(r,"bpmn:SignalEventDefinition")?T(t,e,n,o):yi(r,"bpmn:EscalationEventDefinition")?S(t,e,n,o):yi(r,"bpmn:LinkEventDefinition")?k(t,e,n,o):yi(r,"bpmn:ErrorEventDefinition")?A(t,e,n,o):yi(r,"bpmn:CancelEventDefinition")?R(t,e,n,o):yi(r,"bpmn:CompensateEventDefinition")?M(t,e,n,o):yi(r,"bpmn:TerminateEventDefinition")?N(t,e,n,o):null}var L={ParticipantMultiplicityMarker:function(e,t,n={}){var r=wi(t,n),o=Ei(t,n);b("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2-6)/r,my:(o-15)/o}}),{strokeWidth:2,fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},SubProcessMarker:function(e,t,n={}){Ci(f(e,14,14,0,{strokeWidth:1,fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)}),t.width/2-7.5,t.height-20),b("sub-process",e,i.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},ParallelMarker:function(e,t,n){var r=wi(t,n),o=Ei(t,n);b("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.parallel)/r,my:(o-20)/o}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},SequentialMarker:function(e,t,n){b("sequential",e,i.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},CompensationMarker:function(e,t,n){b("compensation",e,i.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}}),{strokeWidth:1,fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},LoopMarker:function(e,t,n){var r=wi(t,n),o=Ei(t,n);b("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.loop)/r,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:bi(t,c,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=wi(t,n),o=Ei(t,n);b("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.adhoc)/r,my:(o-15)/o}}),{strokeWidth:1,fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke)})}};function I(e,t,n,i){L[e](t,n,i)}function $(e,t,n,i={}){i={fill:i.fill,stroke:i.stroke,width:wi(t,i),height:Ei(t,i)};var r=Pn(t),o=n&&n.includes("SubProcessMarker");i=o?{...i,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{...i,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},j(n,(function(n){I(n,e,t,i)})),r.get("isForCompensation")&&I("CompensationMarker",e,t,i),kn(r,"bpmn:AdHocSubProcess")&&I("AdhocMarker",e,t,i);var a=r.get("loopCharacteristics"),s=a&&a.get("isSequential");a&&(void 0===s&&I("LoopMarker",e,t,i),!1===s&&I("ParallelMarker",e,t,i),!0===s&&I("SequentialMarker",e,t,i))}function z(e,t,n={}){n=ee({size:{width:100}},n);var i=o.createText(t||"",n);return ze(i).add("djs-label"),Ne(e,i),i}function F(e,t,n,i={}){var r=Pn(t),o=_i({x:t.x,y:t.y,width:t.width,height:t.height},i);return z(e,r.name,{align:n,box:o,padding:7,style:{fill:xi(t,l,c,i.stroke)}})}function V(e,t,n,i={}){var r=Xn(n),o=z(e,t,{box:{height:30,width:r?Ei(n,i):wi(n,i)},align:"center-middle",style:{fill:xi(n,l,c,i.stroke)}});r&&Si(o,0,-(-1*Ei(n,i)),270)}function H(e,t,n={}){var{width:i,height:r}=_i(t,n);return f(e,i,r,10,{...n,fill:vi(t,s,n.fill),fillOpacity:Pi,stroke:bi(t,c,n.stroke)})}function G(e,t,n={}){var i=Pn(t),r=vi(t,s,n.fill),o=bi(t,c,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=h(e,"association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=h(e,"association-start",r,o)),n=Mi(n,["markerStart","markerEnd"]),y(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function W(e,t,n={}){var r=vi(t,s,n.fill),o=bi(t,c,n.stroke),a=v(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:Pi,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(Pn(t))&&v(e,i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:(t.height-18)/t.height}}),{strokeWidth:2,fill:r,stroke:o});return a}function U(e,t,n={}){return m(e,t.width,t.height,{fillOpacity:Pi,...n,fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})}function q(e,t,n={}){return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=p(i);var s=qe("polygon",{...i,points:a});return Ne(e,s),s}(e,t.width,t.height,{fill:vi(t,s,n.fill),fillOpacity:Pi,stroke:bi(t,c,n.stroke)})}function K(e,t,n={}){var i=f(e,wi(t,n),Ei(t,n),0,{fill:vi(t,s,n.fill),fillOpacity:n.fillOpacity||Pi,stroke:bi(t,c,n.stroke),strokeWidth:1.5}),r=Pn(t);kn(r,"bpmn:Lane")&&V(e,r.get("name"),t,n);return i}function X(e,t,n={}){var i=H(e,t,n);Yn(t)&&Ie(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var r=Kn(t);return F(e,t,r?"center-top":"center-middle",n),$(e,t,r?void 0:["SubProcessMarker"],n),i}function Y(e,t,n={}){var i=H(e,t,n);return F(e,t,"center-middle",n),$(e,t,void 0,n),i}var Z=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return X(e,t,n=Kn(t)?Mi(n,["fill","stroke","width","height"]):Mi(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return G(e,t,n=Mi(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Mi(n,["fill","stroke"]);var r=Pn(t).get("cancelActivity");n={strokeWidth:1.5,fill:vi(t,s,n.fill),fillOpacity:1,stroke:bi(t,c,n.stroke)},r||(n.strokeDasharray="6");var o=U(e,t,n);return m(e,t.width,t.height,3,{...n,fill:"none"}),i&&O(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return Ie(v(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),Ie(v(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=Mi(n,["fill","stroke"]),X(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=q(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=W(e,t,n);return v(e,r,{fill:"none",stroke:bi(t,c,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=Mi(n,["fill","stroke"]),G(e,t,{...n,markerEnd:h(e,"association-end",vi(t,s,n.fill),bi(t,c,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return W(e,t,n=Mi(n,["fill","stroke"]))},"bpmn:DataObjectReference":_("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=W(e,t,n);return v(e,r,{strokeWidth:1,fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=Mi(n,["fill","stroke"]),G(e,t,{...n,markerEnd:h(e,"association-end",vi(t,s,n.fill),bi(t,c,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=Mi(n,["fill","stroke"]),v(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:vi(t,s,n.fill),fillOpacity:Pi,stroke:bi(t,c,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Mi(n,["fill","stroke"]);var r=U(e,t,{...n,strokeWidth:4});return i&&O(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var r=Pn(t),o=q(e,t,n);m(e,t.width,t.height,.2*t.height,{fill:vi(t,"none",n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1});var a,s=r.get("eventGatewayType"),l=!!r.get("instantiate");if("Parallel"===s){var p=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});v(e,p,{fill:"none",stroke:bi(t,c,n.stroke),strokeWidth:1})}else"Exclusive"===s&&(l||m(e,t.width,t.height,.26*t.height,{fill:"none",stroke:bi(t,c,n.stroke),strokeWidth:1}),a=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}}),v(e,a,{fill:"none",stroke:bi(t,c,n.stroke),strokeWidth:2}));return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=q(e,t,n=Mi(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return Rn(t).get("isMarkerVisible")&&v(e,o,{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return q(e,t,n=Mi(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=Mi(n,["fill","stroke","width","height"]),f(e,t.width,t.height,10,{stroke:bi(t,c,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:wi(t,n),height:Ei(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=q(e,t,n=Mi(n,["fill","stroke"]));return m(e,t.width,t.height,.24*t.height,{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Mi(n,["fill","stroke"]);var r=U(e,t,{...n,strokeWidth:1.5});return m(e,t.width,t.height,3,{fill:"none",stroke:bi(t,c,n.stroke),strokeWidth:1.5}),i&&O(t,e,n),r},"bpmn:IntermediateCatchEvent":_("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":_("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=Mi(n,["fill","stroke","width","height"]),K(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var r=Pn(t),o=Rn(t),a=vi(t,s,n.fill),l=bi(t,c,n.stroke),p=y(e,t.waypoints,{markerEnd:h(e,"messageflow-end",a,l),markerStart:h(e,"messageflow-start",a,l),stroke:l,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var u=p.getPointAtLength(p.getTotalLength()/2),d=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),m={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(m.fill=a,m.stroke=l):(m.fill=l,m.stroke=a);var f=v(e,d,m),g=z(e,r.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:l}}),b=f.getBBox(),x=g.getBBox();Si(g,u.x-x.width/2,u.y+b.height/2+10,0)}return p},"bpmn:ParallelGateway":function(e,t,n={}){var r=q(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=K(e,t,n=Mi(n,["fill","stroke","width","height"])),r=Kn(t),o=Xn(t),a=Pn(t),s=a.get("name");if(r){g(e,o?[{x:30,y:0},{x:30,y:Ei(t,n)}]:[{x:0,y:30},{x:wi(t,n),y:30}],{stroke:bi(t,c,n.stroke),strokeWidth:1.5}),V(e,s,t,n)}else{var p=_i(t,n);o||(p.height=wi(t,n),p.width=Ei(t,n));var u=z(e,s,{box:p,align:"center-middle",style:{fill:xi(t,l,c,n.stroke)}});if(!o)Si(u,0,-(-1*Ei(t,n)),270)}return a.get("participantMultiplicity")&&I("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var r,o=Pn(t),a=Y(e,t,n);return o.get("instantiate")?(m(e,28,28,4.4,{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),r=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):r=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),v(e,r,{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),a},"bpmn:ScriptTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:bi(t,c,n.stroke),stroke:vi(t,s,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var i=vi(t,s,n.fill),r=bi(t,c,n.stroke),o=y(e,t.waypoints,{markerEnd:h(e,"sequenceflow-end",i,r),stroke:r}),a=Pn(t),{source:l}=t;if(l){var p=Pn(l);a.get("conditionExpression")&&kn(p,"bpmn:Activity")&&Ie(o,{markerStart:h(e,"conditional-flow-marker",i,r)}),p.get("default")&&(kn(p,"bpmn:Gateway")||kn(p,"bpmn:Activity"))&&p.get("default")===a&&Ie(o,{markerStart:h(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return m(e,10,10,{fill:vi(t,s,n.fill),stroke:"none",transform:"translate(6, 6)"}),v(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),m(e,10,10,{fill:vi(t,s,n.fill),stroke:"none",transform:"translate(11, 10)"}),v(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Mi(n,["fill","stroke"]),Pn(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=U(e,t,n);return i&&O(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return X(e,t,n=Kn(t)?Mi(n,["fill","stroke","width","height"]):Mi(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return Y(e,t,n=Mi(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=Mi(n,["fill","stroke","width","height"]);var{width:r,height:o}=_i(t,n),a=f(e,r,o,0,0,{fill:"none",stroke:"none"});return v(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:bi(t,c,n.stroke)}),z(e,Pn(t).get("text")||"",{align:"left-top",box:_i(t,n),padding:7,style:{fill:xi(t,l,c,n.stroke)}}),a},"bpmn:Transaction":function(e,t,i={}){i=Kn(t)?Mi(i,["fill","stroke","width","height"]):Mi(i,["fill","stroke"]);var r=X(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:bi(t,c,i.stroke),strokeWidth:1.5});return Kn(t)||(i={}),f(e,wi(t,i),Ei(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:.5}),v(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:.5}),v(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:.5}),r},label:function(e,t,n={}){return function(e,t,n={}){var i={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return z(e,si(t),{box:i,fitBox:!0,style:ee({},o.getExternalStyle(),{fill:xi(t,l,c,n.stroke)})})}(e,t,n)}};this._drawPath=v,this._renderer=x}function Mi(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}x(Ri,qn),Ri.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Ri.prototype.canRender=function(e){return kn(e,"bpmn:BaseElement")},Ri.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Ri.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Ri.prototype.getShapePath=function(e){return kn(e,"bpmn:Event")?(n=(t=e).x+t.width/2,i=t.y+t.height/2,r=t.width/2,ci([["M",n,i],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]])):kn(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return ci([["M",n+t,i],["l",r-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-r,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]])}(e,10):kn(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return ci([["M",e.x+t,e.y],["l",t,n],["l",-t,n],["l",-t,-n],["z"]])}(e):function(e){var t=e.x,n=e.y,i=e.width;return ci([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e);var t,n,i,r};var Ti=0,Di={width:150,height:50};function Bi(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(o){return{width:0,height:0}}}function Ni(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=Bi(o,n)).width=o?i.width:0," "===o||""===o||i.width1)for(;n=i.shift();){if(!(n.length+oe?t.width:e}),0),m=o.top;"middle"===r.vertical&&(m+=(n.height-d)/2),m-=(s||l[0].height)/4;var f=qe("text");return Ie(f,i),j(l,(function(e){var t;switch(m+=s||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(a?h:p)-o.right-e.width;break;default:t=Math.max(((a?h:p)-e.width)/2+o.left,0)}var n=qe("tspan");Ie(n,{x:t,y:m}),n.textContent=e.text,Ne(f,n)})),nt(u),{dimensions:{width:h,height:d},element:f}};function $i(e){var t=ee({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=ee({},t,{fontSize:n},e&&e.externalStyle||{}),r=new Ii({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30},style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=r.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}$i.$inject=["config.textRenderer"];var zi=/\{([^{}]+)\}/g,Fi=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;const Vi={__init__:["bpmnRenderer"],bpmnRenderer:["type",Ri],textRenderer:["type",$i],pathMap:["type",function(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o,a,s={};if(t.position){for(var c=t.containerHeight/r.height*t.yScaleFactor,l=t.containerWidth/r.width*t.xScaleFactor,p=0;pt.x-n&&e.y>t.y-n&&e.x=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function yr(e,t,n,i,r){return e*(e*(-3*t+9*n-9*i+3*r)+6*t-12*n+6*i)-3*t+3*n}function vr(e,t,n,i,r,o,a,s,c){null==c&&(c=1);for(var l=(c=c>1?1:c<0?0:c)/2,p=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],u=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,h=0;h<12;h++){var m=l*p[h]+l,f=yr(m,e,n,r,a),g=yr(m,t,i,o,s),y=f*f+g*g;d+=u[h]*Ji.sqrt(y)}return l*d}function br(e,t,n,i,r,o,a,s){if(!(nr(e,n)nr(r,a)||nr(t,i)nr(o,s))){var c=(e*i-t*n)*(o-s)-(t-i)*(r*s-o*a),l=(e-n)*(o-s)-(t-i)*(r-a);if(l){var p=xr(((e*i-t*n)*(r-a)-(e-n)*(r*s-o*a))/l),u=xr(c/l),d=+p.toFixed(2),h=+u.toFixed(2);if(!(d<+tr(e,n).toFixed(2)||d>+nr(e,n).toFixed(2)||d<+tr(r,a).toFixed(2)||d>+nr(r,a).toFixed(2)||h<+tr(t,i).toFixed(2)||h>+nr(t,i).toFixed(2)||h<+tr(o,s).toFixed(2)||h>+nr(o,s).toFixed(2)))return{x:p,y:u}}}}function xr(e){return Math.round(1e11*e)/1e11}function _r(e,t,n){if(!function(e,t){return e=ur(e),gr(t=ur(t),e.x,e.y)||gr(t,e.x2,e.y)||gr(t,e.x,e.y2)||gr(t,e.x2,e.y2)||gr(e,t.x,t.y)||gr(e,t.x2,t.y)||gr(e,t.x,t.y2)||gr(e,t.x2,t.y2)||(e.xt.x||t.xe.x)&&(e.yt.y||t.ye.y)}(fr(e),fr(t)))return n?0:[];for(var i=vr(...e),r=vr(...t),o=Sr(e)?1:~~(i/5)||1,a=Sr(t)?1:~~(r/5)||1,s=[],c=[],l={},p=n?0:[],u=0;u=0&&w<=1&&E>=0&&E<=1&&(n?p++:p.push({x:_.x,y:_.y,t1:w,t2:E}))}}return p}function wr(e,t,n){e=Pr(e),t=Pr(t);for(var i,r,o,a,s,c,l,p,u,d,h=n?0:[],m=0,f=e.length;m2&&(i.push([t,...o.splice(0,2)]),a="l",t="m"==t?"l":"L");o.length>=n[a]&&(i.push([t,...o.splice(0,n[a])]),n[a]););})),i.toString=pr.toString,t.arr=lr(i),i}(e)),!e||!e.length)return[["M",0,0]];var n,i=[],r=0,o=0,a=0,s=0,c=0;"M"==e[0][0]&&(a=r=+e[0][1],s=o=+e[0][2],c++,i[0]=["M",r,o]);for(var l,p,u=c,d=e.length;u=1e3&&delete i[r.shift()],r.push(n),i[n]=e(...arguments),i[n])}}((function(e,t,n){return{x:e*Ji.cos(n)-t*Ji.sin(n),y:e*Ji.sin(n)+t*Ji.cos(n)}}));if(l)E=l[0],S=l[1],_=l[2],w=l[3];else{e=(p=m(e,t,-d)).x,t=p.y;var f=(e-(s=(p=m(s,c,-d)).x))/2,g=(t-(c=p.y))/2,y=f*f/(n*n)+g*g/(i*i);y>1&&(n*=y=Ji.sqrt(y),i*=y);var v=n*n,b=i*i,x=(o==a?-1:1)*Ji.sqrt(rr((v*b-v*g*g-b*f*f)/(v*g*g+b*f*f))),_=x*n*g/i+(e+s)/2,w=x*-i*f/n+(t+c)/2,E=Ji.asin(((t-w)/i).toFixed(9)),S=Ji.asin(((c-w)/i).toFixed(9));(E=e<_?er-E:E)<0&&(E=2*er+E),(S=s<_?er-S:S)<0&&(S=2*er+S),a&&E>S&&(E-=2*er),!a&&S>E&&(S-=2*er)}var C=S-E;if(rr(C)>u){var k=S,A=s,P=c;S=E+u*(a&&S>E?1:-1),h=Ar(s=_+n*Ji.cos(S),c=w+i*Ji.sin(S),n,i,r,0,a,A,P,[S,k,_,w])}C=S-E;var R=Ji.cos(E),M=Ji.sin(E),T=Ji.cos(S),D=Ji.sin(S),B=Ji.tan(C/4),N=4/3*n*B,O=4/3*i*B,j=[e,t],L=[e+N*M,t-O*R],I=[s+N*D,c-O*T],$=[s,c];if(L[0]=2*j[0]-L[0],L[1]=2*j[1]-L[1],l)return[L,I,$].concat(h);for(var z=[],F=0,V=(h=[L,I,$].concat(h).join().split(",")).length;F7){e[t].shift();for(var i=e[t];i.length;)a[t]="A",e.splice(t++,0,["C",...i.splice(0,6)]);e.splice(t,1),p=n.length}},a=[],s="",c="",l=0,p=n.length;l=r.right,s=i.top-n.y>=r.bottom,c=o?"top":s?"bottom":null,l=i.right+n.x<=r.left?"left":a?"right":null;return l&&c?c+"-"+l:l||c||"intersect"}function jr(e,t,n){var i=wr(e,t);return 1===i.length||2===i.length&&Gi(i[0],i[1])<1?Mr(i[0]):i.length>1?Mr((i=q(i,(function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t})))[n?0:i.length-1]):null}function Lr(e,t,n){return ee({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Ir(e,t,n){var i=e.waypoint;return!i||i.length<2?[Nr(t),Nr(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function $r(e,t,n){return new Error(`element ${_n(t)} referenced by ${_n(e)}#${n} not yet drawn`)}function zr(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}zr.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],zr.prototype.add=function(e,t,n){var i,r,o,a,s,c,l;if(kn(t,"bpmndi:BPMNPlane")){var p=kn(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(Lr(e,t,p)),this._canvas.addRootElement(i)}else if(kn(t,"bpmndi:BPMNShape")){var u=!Kn(e,t),d=function(e){return kn(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var h=t.bounds;i=this._elementFactory.createShape(Lr(e,t,{collapsed:u,hidden:r,x:Math.round(h.x),y:Math.round(h.y),width:Math.round(h.width),height:Math.round(h.height),isFrame:d})),kn(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),kn(e,"bpmn:Lane")&&(o=0),kn(e,"bpmn:DataStoreReference")&&(a=n,s=Nr(h),c=s.x,l=s.y,c>=a.x&&c<=a.x+a.width&&l>=a.y&&l<=a.y+a.height||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!kn(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${_n(t)} for element ${_n(e)}`);var m=this._getSource(e),f=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(Lr(e,t,{hidden:r,source:m,target:f,waypoints:Ir(t,m,f)})),kn(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return ni(e)&&si(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},zr.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${_n(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw $r(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},zr.prototype.addLabel=function(e,t,n){var i,r,o;return i=function(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(ei.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=oi(t),i=ei),ee({x:n.x-i.width/2,y:n.y-i.height/2},i)}(t,n),(r=si(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(Lr(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!si(n),x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)})),this._canvas.addShape(o,n.parent)},zr.prototype._getConnectedElement=function(e,t){var n,i,r=e.$type;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?$r(e,i,t+"Ref"):new Error(`${_n(e)}#${t} Ref not specified`)},zr.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},zr.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},zr.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};const Fr={__depends__:[Vi,{__depends__:[Hi],bpmnImporter:["type",zr]}]};function Vr(e){return O(e,(function(t){return!B(e,(function(e){return e!==t&&Hr(t,e)}))}))}function Hr(e,t){if(t){if(e===t)return t;if(e.parent)return Hr(e.parent,t)}}function Gr(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function Wr(e,t,n){n=n||0,A(e)||(e=[e]),j(e,(function(e,i){var r=t(e,i,n);A(r)&&r.length&&Wr(r,t,n+1)}))}function Ur(e,t){return function(e,t,n){var i=[],r=[];return Wr(e,(function(e,n,o){Gr(i,e,t);var a=e.children;if(a&&Gr(r,a,t))return a})),i}(e,!t)}function qr(e,t){var n,i,r,o;return t=!!t,A(e)||(e=[e]),j(e,(function(e){var a=e;e.waypoints&&!t&&(a=qr(e.waypoints,!0));var s=a.x,c=a.y,l=a.height||0,p=a.width||0;(sr||void 0===r)&&(r=s+p),(c+l>o||void 0===o)&&(o=c+l)})),{x:n,y:i,height:o-i,width:r-n}}function Kr(e,t){return ee({},e||{},t||{})}function Xr(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}Xr.prototype.next=function(){return this._prefix+ ++this._counter};var Yr=new Xr("ov");function Zr(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=Yr,this._overlayDefaults=ee({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),pe(o=Re('
'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function Qr(e,t,n){pe(e,{left:t+"px",top:n+"px"})}function Jr(e,t){e.style.display=!1===t?"none":""}function eo(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}Zr.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Zr.prototype.get=function(e){if(T(e)&&(e={id:e}),T(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?O(t.overlays,K({type:e.type})):t.overlays.slice():[]}return e.type?O(this._overlays,K({type:e.type})):e.id?this._overlays[e.id]:null},Zr.prototype.add=function(e,t,n){if(P(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return n=ee({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},Zr.prototype.remove=function(e){var t=this.get(e)||[];A(t)||(t=[t]);var n=this;j(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Be(e.html),Be(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},Zr.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},Zr.prototype.show=function(){Jr(this._overlayRoot)},Zr.prototype.hide=function(){Jr(this._overlayRoot,!1)},Zr.prototype.clear=function(){this._overlays={},this._overlayContainers=[],fe(this._overlayRoot)},Zr.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=qr(t);i=o.x,r=o.y}Qr(n,i,r),ue(e.html,"data-container-id",t.id)},Zr.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,a=i.left,s=i.top;void 0!==i.right&&(t=o.waypoints?qr(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?qr(o).height:o.height,s=-1*i.bottom+n);Qr(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Zr.prototype._createOverlayContainer=function(e){var t=Re('
');pe(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Zr.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";eo(this._overlayRoot,n)},Zr.prototype._getOverlayContainer=function(e,t){var n=B(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},Zr.prototype._addOverlay=function(e){var t,n,i=e.id,r=e.element,o=e.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),T(o)&&(o=Re(o)),n=this._getOverlayContainer(r),pe(t=Re('
'),{position:"absolute"}),t.appendChild(o),e.type&&he(t).add("djs-overlay-"+e.type),Jr(t,this._canvas.findRoot(r)===this._canvas.getRootElement()),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Zr.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),r=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=!0;(i!==this._canvas.getRootElement()||n&&(C(r)&&r>t.scale||C(o)&&oi&&(r=(1/t.scale||1)*i)),C(r)&&(s="scale("+r+","+r+")"),eo(a,s)},Zr.prototype._updateOverlaysVisibilty=function(e){var t=this;j(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},Zr.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){var n;n=e.viewbox,t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element;j(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){Be(i.html);var r=t._overlayContainers.indexOf(i);-1!==r&&t._overlayContainers.splice(r,1)}})),e.on("element.changed",500,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(j(i.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(i))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&he(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};const to={__init__:["overlays"],overlays:["type",Zr]};function no(e,t,n,i){e.on("element.changed",(function(i){var r=i.element;(r.parent||r===t.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&e.fire(function(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}(r)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}no.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const io={__init__:["changeSupport"],changeSupport:["type",no]};function ro(e){this._eventBus=e}function oo(e){return function(t,n,i,r,o){(M(t)||R(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function ao(e,t){t.invoke(ro,this),this.executed((function(t){var n=t.context;n.rootElement?e.setRootElement(n.rootElement):n.rootElement=e.getRootElement()})),this.revert((function(t){var n=t.context;n.rootElement&&e.setRootElement(n.rootElement)}))}ro.$inject=["eventBus"],ro.prototype.on=function(e,t,n,i,r,o){if((M(t)||R(t))&&(o=r,r=i,i=n,n=t,t=null),M(n)&&(o=r,r=i,i=n,n=1e3),P(r)&&(o=r,r=!1),!M(i))throw new Error("handlerFn must be a function");A(e)||(e=[e]);var a=this._eventBus;j(e,(function(e){var s=["commandStack",e,t].filter((function(e){return e})).join(".");a.on(s,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)}))},ro.prototype.canExecute=oo("canExecute"),ro.prototype.preExecute=oo("preExecute"),ro.prototype.preExecuted=oo("preExecuted"),ro.prototype.execute=oo("execute"),ro.prototype.executed=oo("executed"),ro.prototype.postExecute=oo("postExecute"),ro.prototype.postExecuted=oo("postExecuted"),ro.prototype.revert=oo("revert"),ro.prototype.reverted=oo("reverted"),x(ao,ro),ao.$inject=["canvas","injector"];const so={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",ao]};function co(e){return CSS.escape(e)}var lo={"&":"&","<":"<",">":">",'"':""","'":"'"};function po(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return lo[e]}))}var uo="_plane";function ho(e){return function(e){return e.replace(new RegExp(uo+"$"),"")}(e.id)}function mo(e){var t=e.id;return kn(e,"bpmn:SubProcess")?yo(t):t}function fo(e){return yo(e)}function go(e){return kn(Rn(e),"bpmndi:BPMNPlane")}function yo(e){return e+uo}function vo(e,t,n){var i=Re('
    '),r=n.getContainer(),o=he(r);r.appendChild(i);var a=[];function s(e){e&&(a=function(e){for(var t=Pn(e),n=[],i=t;i;i=i.$parent)(kn(i,"bpmn:SubProcess")||kn(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=a.flatMap((function(e){var i=n.findRoot(mo(e))||n.findRoot(e.id);if(!i&&kn(e,"bpmn:Process")){var r=t.find((function(t){var n=Pn(t);return n&&n.get("processRef")===e}));i=r&&n.findRoot(r.id)}if(!i)return[];var o=po(e.name||e.id),a=Re('
  • '+o+"
  • ");return a.addEventListener("click",(function(){n.setRootElement(i)})),a}));i.innerHTML="";var s=r.length>1;o.toggle("bjs-breadcrumbs-shown",s),r.forEach((function(e){i.appendChild(e)}))}e.on("element.changed",(function(e){var t=Pn(e.element);B(a,(function(e){return e===t}))&&s()})),e.on("root.set",(function(e){s(e.element)}))}function bo(e,t){var n=null,i=new xo;e.on("root.set",(function(e){var r=e.element,o=t.viewbox(),a=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,kn(r,"bpmn:SubProcess")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,c=(o.y-a.y)*o.scale;0===s&&0===c||t.scroll({dx:s,dy:c}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function xo(){this._entries=[],this.set=function(e,t){var n=!1;for(var i in this._entries)if(this._entries[i][0]===e){this._entries[i][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}-1!==t&&this._entries.splice(t,1)}}vo.$inject=["eventBus","elementRegistry","canvas"],bo.$inject=["eventBus","canvas"];var _o=180,wo=160;function Eo(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,(function(e,t){n._handleImport(t.definitions)}))}function So(e){return kn(e,"bpmndi:BPMNDiagram")?e:So(e.$parent)}Eo.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)})),e.diagrams.filter((e=>e.plane)).flatMap((e=>t._createNewDiagrams(e.plane))).forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},Eo.prototype._createNewDiagrams=function(e){var t=this,n=[],i=[];e.get("planeElement").forEach((function(t){var r=t.bpmnElement;if(r){var o=r.$parent;kn(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!kn(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(An(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(r,e)&&i.push({diElement:t,parent:o})}}));var r=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t._createDiagram(e);t._processToDiagramMap[e.id]=n,r.push(n)}})),i.forEach((function(e){for(var i=e.diElement,r=e.parent;r&&-1===n.indexOf(r);)r=r.$parent;if(r){var o=t._processToDiagramMap[r.id];t._moveToDiPlane(i,o.plane)}})),r},Eo.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=function(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach((function(e){if(e.bounds){var n=Tr(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),Dr(t)}(e),i=n.x-_o,r=n.y-wo;t.forEach((function(e){e.waypoint?e.waypoint.forEach((function(e){e.x=e.x-i,e.y=e.y-r})):e.bounds&&(e.bounds.x=e.bounds.x-i,e.bounds.y=e.bounds.y-r)}))},Eo.prototype._moveToDiPlane=function(e,t){var n=So(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},Eo.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n},Eo.$inject=["eventBus","moddle"];var Co=250;function ko(e,t,n,i){ro.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=i;var r=this;this.executed("shape.toggleCollapse",Co,(function(e){var t=e.shape;r._canDrillDown(t)?r._addOverlay(t):r._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",Co,(function(e){var t=e.shape;r._canDrillDown(t)?r._addOverlay(t):r._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],Co,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;r._canDrillDown(i)&&r._addOverlay(i),r._updateDrilldownOverlay(t),r._updateDrilldownOverlay(n),r._updateDrilldownOverlay(i)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],Co,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;r._canDrillDown(i)&&r._addOverlay(i),r._updateDrilldownOverlay(t),r._updateDrilldownOverlay(n),r._updateDrilldownOverlay(i)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return r._canDrillDown(e)})).map((function(e){r._addOverlay(e)}))}))}x(ko,ro),ko.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},ko.prototype._canDrillDown=function(e){var t=this._canvas;return kn(e,"bpmn:SubProcess")&&t.findRoot(mo(e))},ko.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=Pn(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;he(i.html).toggle("bjs-drilldown-empty",!r)}},ko.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays;n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var i=Re('');i.addEventListener("click",(function(){t.setRootElement(t.findRoot(mo(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:i}),this._updateOverlayVisibility(e)},ko.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},ko.$inject=["canvas","eventBus","elementRegistry","overlays"];const Ao={__depends__:[to,io,so],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",vo],drilldownCentering:["type",bo],drilldownOverlayBehavior:["type",ko],subprocessCompatibility:["type",Eo]};function Po(e,t){this._eventBus=e,this.offset=5;var n=t.cls("djs-outline",["no-fill"]),i=this;function r(e){var t=qe("rect");return Ie(t,ee({x:0,y:0,rx:4,width:100,height:100},n)),t}e.on(["shape.added","shape.changed"],500,(function(e){var t=e.element,n=e.gfx,o=Te(".djs-outline",n);o||Ne(n,o=i.getOutline(t)||r()),i.updateShapeOutline(o,t)})),e.on(["connection.added","connection.changed"],(function(e){var t=e.element,n=e.gfx,o=Te(".djs-outline",n);o||Ne(n,o=r()),i.updateConnectionOutline(o,t)}))}Po.prototype.updateShapeOutline=function(e,t){var n=!1,i=this._getProviders();i.length&&j(i,(function(i){n=n||i.updateOutline(t,e)})),n||Ie(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},Po.prototype.updateConnectionOutline=function(e,t){var n=qr(t);Ie(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},Po.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("outline.getProviders",e,(function(e){e.providers.push(t)}))},Po.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"outline.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Po.prototype.getOutline=function(e){var t;return j(this._getProviders(),(function(n){M(n.getOutline)&&(t=t||n.getOutline(e))})),t},Po.$inject=["eventBus","styles","elementRegistry"];const Ro={__init__:["outline"],outline:["type",Po]},Mo={width:36,height:50},To={width:50,height:50};function Do(e,t,n){return qe("path",{d:e,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`,...n})}function Bo(e,t){this._styles=t,e.registerProvider(this)}function No(e,t){var n;return"bpmn:DataObjectReference"===t?n=Mo:"bpmn:DataStoreReference"===t&&(n=To),e.width===n.width&&e.height===n.height}Bo.$inject=["outline","styles"],Bo.prototype.getOutline=function(e){const t=this._styles.cls("djs-outline",["no-fill"]);var n;if(!Jn(e))return kn(e,"bpmn:Gateway")?(ee((n=qe("rect")).style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),Ie(n,ee({x:2,y:2,rx:4,width:e.width-4,height:e.height-4},t))):An(e,["bpmn:Task","bpmn:SubProcess","bpmn:Group","bpmn:CallActivity"])?Ie(n=qe("rect"),ee({x:-5,y:-5,rx:14,width:e.width+10,height:e.height+10},t)):kn(e,"bpmn:EndEvent")?Ie(n=qe("circle"),ee({cx:e.width/2,cy:e.height/2,r:e.width/2+5+1},t)):kn(e,"bpmn:Event")?Ie(n=qe("circle"),ee({cx:e.width/2,cy:e.height/2,r:e.width/2+5},t)):kn(e,"bpmn:DataObjectReference")&&No(e,"bpmn:DataObjectReference")?n=Do("M44.7648 11.3263L36.9892 2.64074C36.0451 1.58628 34.5651 0.988708 33.1904 0.988708H5.98667C3.22688 0.988708 0.989624 3.34892 0.989624 6.26039V55.0235C0.989624 57.9349 3.22688 60.2952 5.98667 60.2952H40.966C43.7257 60.2952 45.963 57.9349 45.963 55.0235V14.9459C45.963 13.5998 45.6407 12.3048 44.7648 11.3263Z",{x:-6,y:-6},t):kn(e,"bpmn:DataStoreReference")&&No(e,"bpmn:DataStoreReference")&&(n=Do("M1.03845 48.1347C1.03845 49.3511 1.07295 50.758 1.38342 52.064C1.69949 53.3938 2.32428 54.7154 3.56383 55.6428C6.02533 57.4841 10.1161 58.7685 14.8212 59.6067C19.5772 60.4538 25.1388 60.8738 30.6831 60.8738C36.2276 60.8738 41.7891 60.4538 46.545 59.6067C51.2504 58.7687 55.3412 57.4842 57.8028 55.6429C59.0424 54.7156 59.6673 53.3938 59.9834 52.064C60.2938 50.7579 60.3285 49.351 60.3285 48.1344V13.8415C60.3285 12.6249 60.2938 11.218 59.9834 9.91171C59.6673 8.58194 59.0423 7.2602 57.8027 6.33294C55.341 4.49168 51.2503 3.20723 46.545 2.36914C41.7891 1.522 36.2276 1.10204 30.6831 1.10205C25.1388 1.10206 19.5772 1.52206 14.8213 2.36923C10.1162 3.20734 6.02543 4.49183 3.5639 6.33314C2.32433 7.26038 1.69951 8.58206 1.38343 9.91181C1.07295 11.2179 1.03845 12.6247 1.03845 13.8411V48.1347Z",{x:-6,y:-6},t)),n},Bo.prototype.updateOutline=function(e,t){if(!Jn(e))return An(e,["bpmn:SubProcess","bpmn:Group"])?(Ie(t,{width:e.width+10,height:e.height+10}),!0):!!An(e,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"])};const Oo={__depends__:[Ro],__init__:["outlineProvider"],outlineProvider:["type",Bo]};function jo(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function Lo(e){return e.originalEvent||e.srcEvent}function Io(e){jo(e),jo(Lo(e))}function $o(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function zo(){return/mac/i.test(navigator.platform)}function Fo(e,t){return(Lo(e)||e).button===t}function Vo(e){return Fo(e,0)}function Ho(e){var t=Lo(e)||e;return!!Vo(e)&&(zo()?t.metaKey:t.ctrlKey)}function Go(e){var t=Lo(e)||e;return Vo(e)&&t.shiftKey}function Wo(e){return!0}function Uo(e){return Vo(e)||function(e){return Fo(e,1)}(e)}function qo(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){return!(c[e]||Vo)(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":Wo,"element.mousedown":Uo,"element.mouseup":Uo,"element.click":Uo,"element.dblclick":Uo};var l="svg, .djs-element";function p(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(c[n]=i),a.$delegate=Ce.bind(e,l,t,a)}function u(e,t,n){var i=a(n);i&&Ce.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,j(s,(function(e,n){u(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,j(s,(function(e,n){p(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var d=f("djs-hit djs-hit-stroke"),h=f("djs-hit djs-hit-click-stroke"),m={all:f("djs-hit djs-hit-all"),"click-stroke":h,stroke:d,"no-move":f("djs-hit djs-hit-no-move")};function f(e,t){return t=ee({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function g(e,t){var n=m[t];if(!n)throw new Error("invalid hit type <"+t+">");return Ie(e,n),e}function y(e,t){Ne(e,t)}this.removeHits=function(e){j(De(".djs-hit",e),nt)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=hi(t);return g(n,"stroke"),y(e,n),n},this.createBoxHit=function(e,t,n){n=ee({x:0,y:0},n);var i=qe("rect");return g(i,t),Ie(i,n),y(e,i),i},this.updateDefaultHit=function(e,t){var n=Te(".djs-hit",t);if(n)return e.waypoints?mi(n,e.waypoints):Ie(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=s[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=a,this.registerEvent=p,this.unregisterEvent=u}qo.$inject=["eventBus","elementRegistry","styles"];const Ko={__init__:["interactionEvents"],interactionEvents:["type",qo]};function Xo(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],(function(e){var t=e.element;n.deselect(t)})),e.on(["diagram.clear","root.set"],(function(e){n.select(null)}))}Xo.$inject=["eventBus","canvas"],Xo.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},Xo.prototype.get=function(){return this._selectedElements},Xo.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},Xo.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();A(e)||(e=e?[e]:[]);var r=this._canvas,o=r.getRootElement();e=e.filter((function(e){var t=r.findRoot(e);return o===t})),t?j(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};var Yo="hover",Zo="selected";function Qo(e,t,n){this._canvas=e;var i=this;function r(t,n){e.addMarker(t,n)}function o(t,n){e.removeMarker(t,n)}this._multiSelectionBox=null,t.on("element.hover",(function(e){r(e.element,Yo)})),t.on("element.out",(function(e){o(e.element,Yo)})),t.on("selection.changed",(function(e){var t=e.oldSelection,n=e.newSelection;j(t,(function(e){-1===n.indexOf(e)&&o(e,Zo)})),j(n,(function(e){-1===t.indexOf(e)&&r(e,Zo)})),i._updateSelectionOutline(n)})),t.on("element.changed",(function(e){n.isSelected(e.element)&&i._updateSelectionOutline(n.get())}))}function Jo(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,o=(n.hints||{}).autoSelect;if(i){if(!1===o)return;A(o)?t.select(o):t.select(r.filter(ea))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);B(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(Vo(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=Go(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function ea(e){return!e.hidden}Qo.$inject=["canvas","eventBus","selection"],Qo.prototype._updateSelectionOutline=function(e){var t=this._canvas.getLayer("selectionOutline");Ve(t);var n=e.length>1;if(ze(this._canvas.getContainer())[n?"add":"remove"]("djs-multi-select"),n){var i=function(e){return{x:e.x-6,y:e.y-6,width:e.width+12,height:e.height+12}}(qr(e)),r=qe("rect");Ie(r,ee({rx:3},i)),ze(r).add("djs-selection-outline"),Ne(t,r)}},Jo.$inject=["eventBus","selection","canvas","elementRegistry"];const ta={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Ko,Ro],selection:["type",Xo],selectionVisuals:["type",Qo],selectionBehavior:["type",Jo]};function na(e){Fn.call(this,e)}x(na,Fn),na.prototype._modules=[Fr,Ao,Oo,to,ta,Hi],na.prototype._moddleExtensions={};var ia=["c","C"],ra=["v","V"],oa=["y","Y"],aa=["z","Z"];function sa(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function ca(e,t){return-1!==(e=A(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function la(e){return e.shiftKey}var pa="keyboard.keydown",ua="input-handle-modified-keys";function da(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),t.on("diagram.init",(function(){n._fire("init")})),t.on("attach",(function(){e&&e.bindTo&&n.bind(e.bindTo)})),t.on("detach",(function(){n.unbind()}))}da.$inject=["config.keyboard","eventBus"],da.prototype._keydownHandler=function(e){this._keyHandler(e,pa)},da.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},da.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||pa,n)&&e.preventDefault()}},da.prototype._isEventIgnored=function(e){return!!e.defaultPrevented||((t=e.target)&&(Me(t,"input, textarea")||"true"===t.contentEditable)||function(e){return e&&Me(e,"button, input[type=submit], input[type=button], a[href], [aria-role=button]")}(e.target)&&ca([" ","Enter"],e))&&this._isModifiedKeyIgnored(e);var t},da.prototype._isModifiedKeyIgnored=function(e){return!sa(e)||-1===this._getAllowedModifiers(e.target).indexOf(e.key)},da.prototype._getAllowedModifiers=function(e){var t=ge(e,"["+ua+"]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(ua).split(",")},da.prototype.bind=function(e){this.unbind(),this._node=e,we.bind(e,"keydown",this._keydownHandler),we.bind(e,"keyup",this._keyupHandler),this._fire("bind")},da.prototype.getBinding=function(){return this._node},da.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),we.unbind(e,"keydown",this._keydownHandler),we.unbind(e,"keyup",this._keyupHandler)),this._node=null},da.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},da.prototype.addListener=function(e,t,n){M(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||pa,e,t)},da.prototype.removeListener=function(e,t){this._eventBus.off(t||pa,e)},da.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},da.prototype.isCmd=sa,da.prototype.isShift=la,da.prototype.isKey=ca;var ha=500;function ma(e,t){var n=this;e.on("editorActions.init",ha,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}ma.$inject=["eventBus","keyboard"],ma.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){if(function(e){return sa(e)&&!la(e)&&ca(aa,e)}(e.keyEvent))return t.trigger("undo"),!0})),n("redo",(function(e){if(function(e){return sa(e)&&(ca(oa,e)||ca(aa,e)&&la(e))}(e.keyEvent))return t.trigger("redo"),!0})),n("copy",(function(e){if(function(e){return sa(e)&&ca(ia,e)}(e.keyEvent))return t.trigger("copy"),!0})),n("paste",(function(e){if(function(e){return sa(e)&&ca(ra,e)}(e.keyEvent))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(ca(["+","Add","="],n)&&sa(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(ca(["-","Subtract"],n)&&sa(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(ca("0",n)&&sa(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(ca(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};const fa={__init__:["keyboard","keyboardBindings"],keyboard:["type",da],keyboardBindings:["type",ma]};var ga={moveSpeed:50,moveSpeedAccelerated:200};function ya(e,t,n){var i=this;this._config=ee({},ga,e||{}),t.addListener((function(e){var n=e.keyEvent,r=i._config;if(!t.isCmd(n))return;if(t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],n)){var o,a=t.isShift(n)?r.moveSpeedAccelerated:r.moveSpeed;switch(n.key){case"ArrowLeft":case"Left":o="left";break;case"ArrowUp":case"Up":o="up";break;case"ArrowRight":case"Right":o="right";break;case"ArrowDown":case"Down":o="down"}return i.moveCanvas({speed:a,direction:o}),!0}})),this.moveCanvas=function(e){var t=0,i=0,r=e.speed/Math.min(Math.sqrt(n.viewbox().scale),1);switch(e.direction){case"left":t=r;break;case"up":i=r;break;case"right":t=-r;break;case"down":i=-r}n.scroll({dx:t,dy:i})}}ya.$inject=["config.keyboardMove","keyboard","canvas"];const va={__depends__:[fa],__init__:["keyboardMove"],keyboardMove:["type",ya]};var ba=/^djs-cursor-.*$/;function xa(e){var t=he(document.body);t.removeMatching(ba),e&&t.add("djs-cursor-"+e)}function _a(){xa(null)}var wa=5e3;function Ea(e,t){function n(){return!1}return t=t||"element.click",e.once(t,wa,n),function(){e.off(t,n)}}function Sa(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Ca(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ka(e,t){var n;function i(i){var r,o=n.start,a=n.button,s=$o(i),c=Ca(s,o);(!n.dragging&&(r=c,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,0===a&&Ea(e),xa("grab")),n.dragging)&&(c=Ca(s,n.last||n.start),t.scroll({dx:c.x,dy:c.y}),n.last=s);i.preventDefault()}function r(e){we.unbind(document,"mousemove",i),we.unbind(document,"mouseup",r),n=null,_a()}e.on("element.mousedown",500,(function(e){return function(e){if(ge(e.target,".djs-draggable"))return;var t=e.button;if(t>=2||e.ctrlKey||e.shiftKey||e.altKey)return;return n={button:t,start:$o(e)},we.bind(document,"mousemove",i),we.bind(document,"mouseup",r),!0}(e.originalEvent)})),this.isActive=function(){return!!n}}ka.$inject=["eventBus","canvas"];const Aa={__init__:["moveCanvas"],moveCanvas:["type",ka]};function Pa(e){return Math.log(e)/Math.log(10)}function Ra(e,t){var n=Pa(e.min),i=Pa(e.max);return(Math.abs(n)+Math.abs(i))/t}var Ma=Math.sign||function(e){return e>=0?1:-1},Ta={min:.2,max:4};function Da(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=J(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var i=this;t.on("canvas.init",(function(t){i._init(!1!==e.enabled)}))}Da.$inject=["config.zoomScroll","eventBus","canvas"],Da.prototype.scroll=function(e){this._canvas.scroll(e)},Da.prototype.reset=function(){this._canvas.zoom("fit-viewport")},Da.prototype.zoom=function(e,t){var n=Ra(Ta,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},Da.prototype._handleWheel=function(e){if(!ge(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey||zo()&&e.metaKey,r=e.shiftKey,o=-1*this._scale;if(o*=i?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,i){var a=t.getBoundingClientRect(),s={x:e.clientX-a.left,y:e.clientY-a.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*Ma(e.deltaY)*o,this.zoom(n,s)}else n=r?{dx:o*e.deltaY,dy:0}:{dx:o*e.deltaX,dy:o*e.deltaY},this.scroll(n)}},Da.prototype.stepZoom=function(e,t){var n=Ra(Ta,10);this._zoom(e,t,n)},Da.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=Pa(i.zoom()),a=Math.round(o/n)*n;a+=n*r;var s,c,l=Math.pow(10,a);i.zoom((s=Ta,c=l,Math.max(s.min,Math.min(s.max,c))),t)},Da.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&we[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},Da.prototype._init=function(e){this.toggle(e)};const Ba={__init__:["zoomScroll"],zoomScroll:["type",Da]};function Na(e){na.call(this,e)}function Oa(e){return e&&e[e.length-1]}function ja(e){return e.y}function La(e){return e.x}x(Na,na),Na.prototype._navigationModules=[va,Aa,Ba],Na.prototype._modules=[].concat(na.prototype._modules,Na.prototype._navigationModules);var Ia={left:La,center:La,right:function(e){return e.x+e.width},top:ja,middle:ja,bottom:function(e){return e.y+e.height}};function $a(e,t){this._modeling=e,this._rules=t}$a.$inject=["modeling","rules"],$a.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},$a.prototype._isType=function(e,t){return-1!==t.indexOf(e)},$a.prototype._alignmentPosition=function(e,t){var n,i,r,o,a,s=this._getOrientationDetails(e),c=s.axis,l=s.dimension,p={},u={},d=!1;if(this._isType(e,["left","top"]))p[e]=t[0][c];else if(this._isType(e,["right","bottom"]))r=Oa(t),p[e]=r[c]+r[l];else if(this._isType(e,["center","middle"])){if(j(t,(function(e){var t=e[c]+Math.round(e[l]/2);u[t]?u[t].elements.push(e):u[t]={elements:[e],center:t}})),n=q(u,(function(e){return e.elements.length>1&&(d=!0),e.elements.length})),d)return p[e]=Oa(n).center,p;i=t[0],r=Oa(t=q(t,(function(e){return e[c]+e[l]}))),p[e]=(o=i,a=r,Math.round((o[c]+a[c]+a[l])/2))}return p},$a.prototype.trigger=function(e,t){var n,i=this._modeling,r=O(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(A(n=this._rules.allowed("elements.align",{elements:r}))&&(r=n),!(r.length<2)&&n){var o=q(r,Ia[t]),a=this._alignmentPosition(t,o);i.alignElements(o,a)}};const za={__init__:["alignElements"],alignElements:["type",$a]};var Fa=".entry";function Va(e,t,n){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._current=null,this._init()}function Ha(e,t){return-1!==e.indexOf(t)}Va.$inject=["canvas","elementRegistry","eventBus"],Va.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",(function(t){var n=t.newSelection,i=n.length?1===n.length?n[0]:n:null;i?e.open(i,!0):e.close()})),this._eventBus.on("elements.changed",(function(t){var n=t.elements,i=e._current;if(i){var{target:r}=i,o=A(r)?r:[r];if(o.filter((function(e){return Ha(n,e)})).length){e.close();var a=o.filter((function(t){return e._elementRegistry.get(t.id)}));a.length&&e._updateAndOpen(a.length>1?a:a[0])}}})),this._eventBus.on("canvas.viewbox.changed",(()=>{this._updatePosition()})),this._eventBus.on("element.marker.update",(function(t){e._updateVisibility()})),this._container=this._createContainer()},Va.prototype._createContainer=function(){const e=Re('
    ');return this._canvas.getContainer().appendChild(e),e},Va.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},Va.prototype.getEntries=function(e){var t=this._getProviders(),n=A(e)?"getMultiElementContextPadEntries":"getContextPadEntries",i={};return j(t,(function(t){if(M(t[n])){var r=t[n](e);M(r)?i=r(i):j(r,(function(e,t){i[t]=e}))}})),i},Va.prototype.trigger=function(e,t,n){var i,r,o=t.delegateTarget||t.target;return o?(i=ue(o,"data-action"),r=t.originalEvent||t,"mouseover"!==e?"mouseout"===e?(clearTimeout(this._timeout),void(this._mouseout&&(this._mouseout(),this._mouseout=null))):this.triggerEntry(i,e,r,n):void(this._timeout=setTimeout((()=>{this._mouseout=this.triggerEntry(i,"hover",r,n)}),300))):t.preventDefault()},Va.prototype.triggerEntry=function(e,t,n,i){if(this.isShown()){var r=this._current.target,o=this._current.entries[e];if(o){var a=o.action;if(!1!==this._eventBus.fire("contextPad.trigger",{entry:o,event:n})){if(M(a)){if("click"===t)return a(n,r,i)}else if(a[t])return a[t](n,r,i);n.preventDefault()}}}},Va.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},Va.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Va.prototype._updateAndOpen=function(e){var t,n=this.getEntries(e),i=this._createHtml(e);j(n,(function(e,n){var r,o,a,s,c=e.group||"default",l=Re(e.html||'
    ');ue(l,"data-action",n),(r=Te("[data-group="+co(c)+"]",i))||(ue(r=Re('
    '),"data-group",c),i.appendChild(r)),r.appendChild(l),e.className&&(o=l,a=e.className,s=he(o),(a=A(a)?a:a.split(/\s+/g)).forEach((function(e){s.add(e)}))),e.title&&ue(l,"title",e.title),e.imageUrl&&(ue(t=Re(""),"src",e.imageUrl),t.style.width="100%",t.style.height="100%",l.appendChild(t))})),he(i).add("open"),this._current={entries:n,html:i,target:e},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current})},Va.prototype._createHtml=function(e){var t=this,n=Re('
    ');return Ce.bind(n,Fa,"click",(function(e){t.trigger("click",e)})),Ce.bind(n,Fa,"dragstart",(function(e){t.trigger("dragstart",e)})),Ce.bind(n,Fa,"mouseover",(function(e){t.trigger("mouseover",e)})),Ce.bind(n,Fa,"mouseout",(function(e){t.trigger("mouseout",e)})),we.bind(n,"mousedown",(function(e){e.stopPropagation()})),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n},Va.prototype.getPad=function(e){let t;return t=this.isOpen()&&function(e,t){return e=A(e)?e:[e],t=A(t)?t:[t],e.length===t.length&&$(e,(function(e){return t.includes(e)}))}(this._current.target,e)?this._current.html:this._createHtml(e),{html:t}},Va.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},Va.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return A(e)===A(n)&&(A(e)?e.length===n.length&&$(e,(function(e){return Ha(n,e)})):n===e)},Va.prototype.isShown=function(){return this.isOpen()&&he(this._current.html).has("open")},Va.prototype.show=function(){this.isOpen()&&(he(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}))},Va.prototype.hide=function(){this.isOpen()&&(he(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))},Va.prototype._getPosition=function(e){if(!A(e)&&Qn(e)){const n=this._canvas.viewbox(),i=(t=e).waypoints[t.waypoints.length-1],r=i.x*n.scale-n.x*n.scale,o=i.y*n.scale-n.y*n.scale;return{left:r+8*this._canvas.zoom(),top:o}}var t,n=this._canvas.getContainer().getBoundingClientRect(),i=this._getTargetBounds(e);return{left:i.right-n.left+8*this._canvas.zoom(),top:i.top-n.top}},Va.prototype._updatePosition=function(){if(this.isOpen()){var e=this._current.html,t=this._getPosition(this._current.target);"x"in t&&"y"in t?(e.style.left=t.x+"px",e.style.top=t.y+"px"):["top","right","bottom","left"].forEach((function(n){n in t&&(e.style[n]=t[n]+"px")}))}},Va.prototype._updateVisibility=function(){if(this.isOpen()){var e=this,t=this._current.target;(A(t)?t:[t]).some((function(t){return e._canvas.hasMarker(t,"djs-element-hidden")}))?e.hide():e.show()}},Va.prototype._getTargetBounds=function(e){return(A(e)?e:[e]).map((e=>this._canvas.getGraphics(e))).reduce(((e,t)=>{const n=t.getBoundingClientRect();return e.top=Math.min(e.top,n.top),e.right=Math.max(e.right,n.right),e.bottom=Math.max(e.bottom,n.bottom),e.left=Math.min(e.left,n.left),e.x=e.left,e.y=e.top,e.width=e.right-e.left,e.height=e.bottom-e.top,e}),{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};const Ga={__depends__:[Ko,to],contextPad:["type",Va]};var Wa,Ua,qa,Ka,Xa,Ya,Za,Qa,Ja,es,ts={},ns=[],is=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,rs=Array.isArray;function os(e,t){for(var n in t)e[n]=t[n];return e}function as(e){var t=e.parentNode;t&&t.removeChild(e)}function ss(e,t,n){var i,r,o,a={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Wa.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return cs(e,a,i,r,null)}function cs(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++qa:r,__i:-1,__u:0};return null==r&&null!=Ua.vnode&&Ua.vnode(o),o}function ls(e){return e.children}function ps(e,t){this.props=e,this.context=t}function us(e,t){if(null==t)return e.__?us(e.__,e.__i+1):null;for(var n;tt&&Ka.sort(Za));ms.__r=0}function fs(e,t,n,i,r,o,a,s,c,l,p){var u,d,h,m,f,g=i&&i.__k||ns,y=t.length;for(n.__d=c,function(e,t,n){var i,r,o,a,s,c=t.length,l=n.length,p=l,u=0;for(e.__k=[],i=0;i0?cs(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,s=ys(r,n,a,p),r.__i=s,o=null,-1!==s&&(p--,(o=n[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&u--,"function"!=typeof r.type&&(r.__u|=65536)):s!==a&&(s===a+1?u++:s>a?p>c-a?u+=s-a:u--:s(null==c||131072&c.__u?0:1))for(;a>=0||s=0){if((c=t[a])&&!(131072&c.__u)&&r==c.key&&o===c.type)return a;a--}if(s=5&&((r||!e&&5===i)&&(a.push(i,0,r,n),i=6),e&&(a.push(i,e,0,n),i=6)),r=""},c=0;c"===t?(i=1,r=""):r=t+r[0]:o?t===o?o="":r+=t:'"'===t||"'"===t?o=t:">"===t?(s(),i=1):i&&("="===t?(i=5,n=r,r=""):"/"===t&&(i<5||">"===e[c][l+1])?(s(),3===i&&(a=a[0]),i=a,(a=a[0]).push(2,0,i),i=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),i=2):r+=t),3===i&&"!--"===r&&(i=4,a=a[0])}return s(),a}(e)),t),arguments,[])).length>1?t:t[0]}.bind(ss),Ns=0,Os=[],js=[],Ls=Ua,Is=Ls.__b,$s=Ls.__r,zs=Ls.diffed,Fs=Ls.__c,Vs=Ls.unmount,Hs=Ls.__;function Gs(e,t){Ls.__h&&Ls.__h(Ms,e,Ns||t),Ns=0;var n=Ms.__H||(Ms.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:js}),n.__[e]}function Ws(e){return Ns=1,function(e,t,n){var i=Gs(Rs++,2);if(i.t=e,!i.__c&&(i.__=[ic(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=Ms,!Ms.u)){var r=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var a=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&i.__c.props===e)&&(!o||o.call(this,e,t,n))};Ms.u=!0;var o=Ms.shouldComponentUpdate,a=Ms.componentWillUpdate;Ms.componentWillUpdate=function(e,t,n){if(this.__e){var i=o;o=void 0,r(e,t,n),o=i}a&&a.call(this,e,t,n)},Ms.shouldComponentUpdate=r}return i.__N||i.__}(ic,e)}function Us(e,t){var n=Gs(Rs++,3);!Ls.__s&&nc(n.__H,t)&&(n.__=e,n.i=t,Ms.__H.__h.push(n))}function qs(e,t){var n=Gs(Rs++,4);!Ls.__s&&nc(n.__H,t)&&(n.__=e,n.i=t,Ms.__h.push(n))}function Ks(e){return Ns=5,Xs((function(){return{current:e}}),[])}function Xs(e,t){var n=Gs(Rs++,7);return nc(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ys(e,t){return Ns=8,Xs((function(){return e}),t)}function Zs(){for(var e;e=Os.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ec),e.__H.__h.forEach(tc),e.__H.__h=[]}catch(t){e.__H.__h=[],Ls.__e(t,e.__v)}}Ls.__b=function(e){Ms=null,Is&&Is(e)},Ls.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Hs&&Hs(e,t)},Ls.__r=function(e){$s&&$s(e),Rs=0;var t=(Ms=e.__c).__H;t&&(Ts===Ms?(t.__h=[],Ms.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=js,e.__N=e.i=void 0}))):(t.__h.forEach(ec),t.__h.forEach(tc),t.__h=[],Rs=0)),Ts=Ms},Ls.diffed=function(e){zs&&zs(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Os.push(t)&&Ds===Ls.requestAnimationFrame||((Ds=Ls.requestAnimationFrame)||Js)(Zs)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==js&&(e.__=e.__V),e.i=void 0,e.__V=js}))),Ts=Ms=null},Ls.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ec),e.__h=e.__h.filter((function(e){return!e.__||tc(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Ls.__e(n,e.__v)}})),Fs&&Fs(e,t)},Ls.unmount=function(e){Vs&&Vs(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{ec(e)}catch(n){t=n}})),n.__H=void 0,t&&Ls.__e(t,n.__v))};var Qs="function"==typeof requestAnimationFrame;function Js(e){var t,n=function(){clearTimeout(i),Qs&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);Qs&&(t=requestAnimationFrame(n))}function ec(e){var t=Ms,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ms=t}function tc(e){var t=Ms;e.__c=e.__(),Ms=t}function nc(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ic(e,t){return"function"==typeof t?t(e):t}function rc(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;tt.reduce(((e,t)=>{const n=t.group||"default",i=e.find((e=>e.id===n));return i?i.entries.push(t):e.push({id:n,entries:[t]}),e}),[])),[t]);return Bs` +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("quasar"),require("vue"),require("@herodotus/components"),require("@herodotus/bpmn-apis"),require("@herodotus/core"),require("bpmn-js-properties-panel"),require("bpmn-js-token-simulation"),require("ids"),require("diagram-js")):"function"==typeof define&&define.amd?define(["exports","quasar","vue","@herodotus/components","@herodotus/bpmn-apis","@herodotus/core","bpmn-js-properties-panel","bpmn-js-token-simulation","ids","diagram-js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@herodotus/bpmn-designer"]={},e.quasar,e.vue,e.HerodotusComponents,e.HerodotusBpmnApis,e.HerodotusCore,e.BpmnJsPropertiesPanel,e.BpmnJsTokenSimulation,e.Ids,e.DiagramJs)}(this,(function(e,t,n,i,r,o,a,s,c,l){"use strict";const p=n.defineComponent({name:"HBpmnDesignerToolbar",components:{HListItem:i.HListItem,HSwitch:i.HSwitch,HTextField:i.HTextField},props:{file:{type:String,required:!0},zoom:{type:Number,default:1}},emits:["update:file","downloadXml","downloadSvg","downloadBpmn","alignLeft","alignRight","alignTop","alignBottom","alignHorizontalCenter","alignVerticalCenter","zoomMinus","zoomPlus","zoomReset","undo","redo","refresh","simulation","save"],setup(e,{emit:t}){const i=n.ref(null),r=n.ref(!1),o=n.ref(!1),a=n.ref(""),s=n.computed({get:()=>e.file,set:e=>{t("update:file",e)}}),c=n.ref(""),l=n.ref(""),p=n.ref(!1),u=n.ref(!1),d=n.ref(!1);n.watch(i,(e=>{(async e=>{if(e){const t=await e.text();a.value=e.name,t&&(s.value=t)}else s.value=""})(e)})),n.watch((()=>a.value),(e=>{e&&(c.value=e,d.value=!0)}),{immediate:!0}),n.watch(u,(e=>{e&&(p.value=!0)}),{immediate:!0});return{bpmnModelFile:i,onDownloadXml:()=>{t("downloadXml")},onDownloadSvg:()=>{t("downloadSvg")},onDownloadBpmn:()=>{t("downloadBpmn")},onAlignLeft:()=>{t("alignLeft")},onAlignRight:()=>{t("alignRight")},onAlignTop:()=>{t("alignTop")},onAlignBottom:()=>{t("alignBottom")},onAlignHorizontalCenter:()=>{t("alignHorizontalCenter")},onAlignVerticalCenter:()=>{t("alignVerticalCenter")},onZoomMinus:()=>{t("zoomMinus")},onZoomPlus:()=>{t("zoomPlus")},onZoomReset:()=>{t("zoomReset")},onUndo:()=>{t("undo")},onRedo:()=>{t("redo")},onRefresh:()=>{t("refresh")},simulation:r,onSimulation:()=>{r.value=!r.value,t("simulation")},showUploadDialog:o,onSave:()=>{o.value=!1;const e={deploymentName:c.value,enableDuplicateFiltering:p.value,deployChangedOnly:u.value,resource:s.value};t("save",e)},name:a,deploymentName:c,tenantId:l,enableDuplicateCheck:p,deployChangedOnly:u,disableNameInput:d}}}),u=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},d=n.createElementVNode("div",{class:"text-h6"},"模型信息",-1);const h=u(p,[["render",function(e,i,r,o,a,s){const c=t.QIcon,l=t.QFile,p=t.QSeparator,u=n.resolveComponent("h-list-item"),h=t.QList,m=t.QBtnDropdown,f=n.resolveComponent("h-button"),g=t.QBtnGroup,y=t.QBtn,v=t.QCardSection,b=n.resolveComponent("h-text-field"),x=n.resolveComponent("h-switch"),_=t.QCardActions,w=t.QCard,E=t.QDialog,S=t.QToolbar,C=n.resolveDirective("close-popup");return n.openBlock(),n.createBlock(S,{class:"bg-primary text-white q-px-none"},{default:n.withCtx((()=>[n.createVNode(l,{modelValue:e.bpmnModelFile,"onUpdate:modelValue":i[0]||(i[0]=t=>e.bpmnModelFile=t),"label-color":"white","bg-color":"primary",square:"",standout:"",dense:"",clearable:"",label:"打开"},{prepend:n.withCtx((()=>[n.createVNode(c,{name:"mdi-folder-open",color:"white"})])),_:1},8,["modelValue"]),n.createVNode(p,{vertical:"",color:"white"}),n.createVNode(m,{stretch:"",flat:"",label:"下载",dense:"",icon:"mdi-download-box"},{default:n.withCtx((()=>[n.createVNode(h,null,{default:n.withCtx((()=>[n.createVNode(h,null,{default:n.withCtx((()=>[n.createVNode(u,{label:"下载为XML文件",icon:"mdi-xml",onClick:i[1]||(i[1]=t=>e.onDownloadXml())}),n.createVNode(u,{label:"下载为SVG文件",icon:"mdi-svg",onClick:i[2]||(i[2]=t=>e.onDownloadSvg())}),n.createVNode(u,{label:"下载为BPMN文件",icon:"mdi-codepen",onClick:i[3]||(i[3]=t=>e.onDownloadBpmn())})])),_:1})])),_:1})])),_:1}),n.createVNode(p,{vertical:"",color:"white"}),n.createVNode(m,{stretch:"",flat:"",label:"代码",dense:"",icon:"mdi-eye"},{default:n.withCtx((()=>[n.createVNode(h,null,{default:n.withCtx((()=>[n.createVNode(h,null,{default:n.withCtx((()=>[n.createVNode(u,{label:"预览XML",icon:"mdi-xml"}),n.createVNode(u,{label:"预览JSON",icon:"mdi-code-json"})])),_:1})])),_:1})])),_:1}),n.createVNode(p,{vertical:"",color:"white"}),n.createVNode(f,{stretch:"",flat:"",color:"primary",dense:"","text-color":"white",icon:e.simulation?"mdi-play-pause":"mdi-play",tooltip:e.simulation?"退出模拟":"开启模拟",label:e.simulation?"退出模拟":"开启模拟",onClick:i[4]||(i[4]=t=>e.onSimulation())},null,8,["icon","tooltip","label"]),n.createVNode(p,{vertical:"",color:"white"}),n.createVNode(f,{stretch:"",flat:"",color:"primary",dense:"","text-color":"white",icon:"mdi-cloud-upload",tooltip:"上传至服务器",label:"上传云端",onClick:i[5]||(i[5]=t=>e.showUploadDialog=!0)}),n.createVNode(p,{vertical:"",color:"white"}),n.createVNode(g,{class:"q-ml-sm"},{default:n.withCtx((()=>[n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-horizontal-left",tooltip:"向左对齐",onClick:i[6]||(i[6]=t=>e.onAlignLeft())}),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-horizontal-right",tooltip:"向右对齐",onClick:i[7]||(i[7]=t=>e.onAlignRight())}),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-vertical-top",tooltip:"向上对齐",onClick:i[8]||(i[8]=t=>e.onAlignTop())}),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-vertical-bottom",tooltip:"向下对齐",onClick:i[9]||(i[9]=t=>e.onAlignBottom())}),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-horizontal-center",tooltip:"水平居中",onClick:i[10]||(i[10]=t=>e.onAlignHorizontalCenter())}),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-align-vertical-center",tooltip:"垂直居中",onClick:i[11]||(i[11]=t=>e.onAlignVerticalCenter())})])),_:1}),n.createVNode(g,{class:"q-ml-xs"},{default:n.withCtx((()=>[n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-magnify-minus",tooltip:"缩小视图",disable:e.zoom<.2,onClick:i[12]||(i[12]=t=>e.onZoomMinus())},null,8,["disable"]),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(y,{color:"white","text-color":"grey-8",dense:"",class:"q-px-sm",label:Math.floor(10*e.zoom*10)+"%",disable:""},null,8,["label"]),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-magnify-plus",tooltip:"放大视图",disable:e.zoom>4,onClick:i[13]||(i[13]=t=>e.onZoomPlus())},null,8,["disable"]),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-magnify-scan",tooltip:"重置视图并居中",onClick:i[14]||(i[14]=t=>e.onZoomReset())})])),_:1}),n.createVNode(g,{class:"q-mx-xs"},{default:n.withCtx((()=>[n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-undo-variant",tooltip:"撤销",onClick:e.onUndo},null,8,["onClick"]),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-redo-variant",tooltip:"恢复",onClick:e.onRedo},null,8,["onClick"]),n.createVNode(p,{vertical:"",color:"grey-6"}),n.createVNode(f,{color:"white","text-color":"grey-8",class:"q-px-sm",dense:"",icon:"mdi-refresh",onClick:e.onRefresh},null,8,["onClick"])])),_:1}),n.createVNode(E,{modelValue:e.showUploadDialog,"onUpdate:modelValue":i[19]||(i[19]=t=>e.showUploadDialog=t)},{default:n.withCtx((()=>[n.createVNode(w,null,{default:n.withCtx((()=>[n.createVNode(v,null,{default:n.withCtx((()=>[d])),_:1}),n.createVNode(p),n.createVNode(v,{style:{"max-height":"50vh"},class:"scroll"},{default:n.withCtx((()=>[n.createVNode(b,{modelValue:e.deploymentName,"onUpdate:modelValue":i[15]||(i[15]=t=>e.deploymentName=t),label:"模型名称",placeholder:"请输入模型名称",disable:e.disableNameInput},null,8,["modelValue","disable"]),n.createVNode(x,{modelValue:e.enableDuplicateCheck,"onUpdate:modelValue":i[16]||(i[16]=t=>e.enableDuplicateCheck=t),label:"开启部署重复检查"},null,8,["modelValue"]),n.createVNode(x,{modelValue:e.deployChangedOnly,"onUpdate:modelValue":i[17]||(i[17]=t=>e.deployChangedOnly=t),label:"仅在模型存在变化时部署"},null,8,["modelValue"])])),_:1}),n.createVNode(p),n.createVNode(_,{align:"right"},{default:n.withCtx((()=>[n.withDirectives(n.createVNode(y,{label:"取消",color:"red"},null,512),[[C]]),n.createVNode(y,{label:"部署",color:"primary",onClick:i[18]||(i[18]=t=>e.onSave())})])),_:1})])),_:1})])),_:1},8,["modelValue"])])),_:1})}]]),m='\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n',f=(e,t)=>{const{warnings:n,message:i}=t;t(e,n,i)},g=(e,t)=>{if(e&&t){const n=document.createElement("a");n.download=t,n.href=e,n.click(),URL.revokeObjectURL(n.href)}},y=(e,t="diagram",n)=>({filename:`${t}.${e}`,href:`data:application/${"svg"===e?"text/xml":"bpmn20-xml"};charset=UTF-8,${encodeURIComponent(n)}`,data:n}),v={"Activate the create/remove space tool":"启动创建/删除空间工具","Activate the global connect tool":"启动全局连接工具","Activate the hand tool":"启动手动工具","Activate the lasso tool":"启动 Lasso 工具","Ad-hoc":"Ad-hoc子流程","Add Lane above":"添加到通道之上","Add Lane below":"添加到通道之下","Append compensation activity":"追加补偿活动","Append {type}":"追加 {type}","Business Rule Task":"规则任务","Call Activity":"引用流程","Cancel Boundary Event":"取消边界事件","Cancel End Event":"结束取消事件","Change type":"更改类型","Collapsed Pool":"折叠池","Compensation Boundary Event":"补偿边界事件","Compensation End Event":"结束补偿事件","Compensation Intermediate Throw Event":"中间补偿抛出事件","Compensation Start Event":"补偿启动事件","Complex Gateway":"复杂网关","Conditional Boundary Event (non-interrupting)":"条件边界事件 (非中断)","Conditional Boundary Event":"条件边界事件","Conditional Intermediate Catch Event":"中间条件捕获事件","Conditional Start Event (non-interrupting)":"条件启动事件 (非中断)","Conditional Start Event":"条件启动事件","Connect using Association":"文本关联","Connect using DataInputAssociation":"数据关联","Connect using Sequence/MessageFlow or Association":"消息关联","Create IntermediateThrowEvent/BoundaryEvent":"创建中间抛出/边界事件","Create Pool/Participant":"创建池/参与者","Create expanded SubProcess":"创建可折叠子流程","Create {type}":"创建 {type}","Divide into three Lanes":"分成三条通道","Divide into two Lanes":"分成两条通道","End Event":"结束事件","Error Boundary Event":"错误边界事件","Error End Event":"结束错误事件","Error Start Event":"错误启动事件","Escalation Boundary Event (non-interrupting)":"升级边界事件 (非中断)","Escalation Boundary Event":"升级边界事件","Escalation End Event":"结束升级事件","Escalation Intermediate Throw Event":"中间升级抛出事件","Escalation Start Event (non-interrupting)":"升级启动事件 (非中断)","Escalation Start Event":"升级启动事件","Event Sub Process":"事件子流程","Event based Gateway":"事件网关","Exclusive Gateway":"独占网关","Expanded Pool":"展开池","Inclusive Gateway":"包容网关","Intermediate Throw Event":"中间抛出事件","Link Intermediate Catch Event":"中间链接捕获事件","Link Intermediate Throw Event":"中间链接抛出事件",Loop:"循环","Manual Task":"手动任务","Message Boundary Event (non-interrupting)":"消息边界事件 (非中断)","Message Boundary Event":"消息边界事件","Message End Event":"结束消息事件","Message Intermediate Catch Event":"中间消息捕获事件","Message Intermediate Throw Event":"中间消息抛出事件","Message Start Event (non-interrupting)":"消息启动事件 (非中断)","Message Start Event":"消息启动事件","Parallel Gateway":"并行网关","Parallel Multi Instance":"并行多实例","Receive Task":"接受任务",Remove:"移除","Script Task":"脚本任务","Send Task":"发送任务","Sequential Multi Instance":"串行多实例","Service Task":"服务任务","Signal Boundary Event (non-interrupting)":"信号边界事件 (非中断)","Signal Boundary Event":"信号边界事件","Signal End Event":"结束信号事件","Signal Intermediate Catch Event":"中间信号捕获事件","Signal Intermediate Throw Event":"中间信号抛出事件","Signal Start Event (non-interrupting)":"信号启动事件 (非中断)","Signal Start Event":"信号启动事件","Start Event":"开始事件","Sub Process (collapsed)":"可折叠子流程","Sub Process (expanded)":"可展开子流程","Sub Process":"子流程",Task:"任务","Terminate End Event":"终止边界事件","Timer Boundary Event (non-interrupting)":"定时边界事件 (非中断)","Timer Boundary Event":"定时边界事件","Timer Intermediate Catch Event":"中间定时捕获事件","Timer Start Event (non-interrupting)":"定时启动事件 (非中断)","Timer Start Event":"定时启动事件",Transaction:"事务","User Task":"用户任务","already rendered {element}":"{element} 已呈现","diagram not part of bpmn:Definitions":"图表不是 bpmn:Definitions 的一部分","element required":"需要元素","element {element} referenced by {referenced}#{property} not yet drawn":"元素 {element} 的引用 {referenced}#{property} 尚未绘制","failed to import {element}":"{element} 导入失败","flow elements must be children of pools/participants":"元素必须是池/参与者的子级","more than {count} child lanes":"超过 {count} 条通道","no diagram to display":"没有要显示的图表","no parent for {element} in {parent}":"在 {element} 中没有父元素 {parent}","no process or collaboration to display":"没有可显示的流程或协作","no shape type specified":"未指定形状类型","out of bounds release":"越界释放","Asynchronous Continuations":"异步延续","Candidate starter":"候选发起人",create:"创建","Create new list item":"创建新列表项",Documentation:"文档",General:"常规","Execution listeners":"执行监听器","Extension properties":"扩展属性","External task":"外部任务",Forms:"表单","History cleanup":"历史清理",Inputs:"输入","Job execution":"调度执行",Outputs:"输出",Tasklist:"任务列表"};function b(e,t){t=t||{};return(e=v[e]||e).replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}function x(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}function _(e){return Array.prototype.concat.apply([],e)}const w=Object.prototype.toString,E=Object.prototype.hasOwnProperty;function S(e){return void 0===e}function C(e){return void 0!==e}function k(e){return null==e}function A(e){return"[object Array]"===w.call(e)}function P(e){return"[object Object]"===w.call(e)}function R(e){return"[object Number]"===w.call(e)}function M(e){const t=w.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function T(e){return"[object String]"===w.call(e)}function D(e,t){return E.call(e,t)}function B(e,t){const n=Y(t);let i;return j(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function N(e,t){const n=Y(t);let i=A(e)?-1:void 0;return j(e,(function(e,t){if(n(e,t))return i=t,!1})),i}function O(e,t){const n=Y(t);let i=[];return j(e,(function(e,t){n(e,t)&&i.push(e)})),i}function j(e,t){let n,i;if(S(e))return;const r=A(e)?Q:Z;for(let o in e)if(D(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function L(e,t){if(S(e))return[];!function(e){if(!A(e))throw new Error("must supply array")}(e);const n=Y(t);return e.filter((function(e,t){return!n(e,t)}))}function I(e,t,n){return j(e,(function(e,i){n=t(n,e,i)})),n}function $(e,t){return!!I(e,(function(e,n,i){return e&&t(n,i)}),!0)}function z(e,t){return!!B(e,t)}function F(e,t){let n=[];return j(e,(function(e,i){n.push(t(e,i))})),n}function H(e){return e&&Object.keys(e)||[]}function V(e){return F(e,(e=>e))}function G(e,t,n={}){return t=X(t),j(e,(function(e){let i=t(e)||"_",r=n[i];r||(r=n[i]=[]),r.push(e)})),n}function W(e,...t){e=X(e);let n={};return j(t,(t=>G(t,e,n))),F(n,(function(e,t){return e[0]}))}const U=W;function q(e,t){t=X(t);let n=[];return j(e,(function(e,i){let r=t(e,i),o={d:r,v:e};for(var a=0;ae.v))}function K(e){return function(t){return $(e,(function(e,n){return t[n]===e}))}}function X(e){return M(e)?e:t=>t[e]}function Y(e){return M(e)?e:t=>t===e}function Z(e){return e}function Q(e){return Number(e)}function J(e,t){return e.bind(t)}function ee(e,...t){return Object.assign(e,...t)}function te(e,t){let n={},i=Object(e);return j(t,(function(t){t in i&&(n[t]=e[t])})),n}function ne(e,t){let n={};return j(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}function ie(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const re=Object.prototype.toString,oe=Object.prototype.hasOwnProperty;function ae(e,t){return oe.call(e,t)}function se(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===re.call(e)}(e)?le:ce;for(let o in e)if(ae(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function ce(e){return e}function le(e){return Number(e)}function pe(e,...t){const n=e.style;return se(t,(function(e){e&&se(e,(function(e,t){n[t]=e}))})),e}function ue(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const de=Object.prototype.toString;function he(e){return new me(e)}function me(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function fe(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function ge(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}me.prototype.add=function(e){return this.list.add(e),this},me.prototype.remove=function(e){return"[object RegExp]"==de.call(e)?this.removeMatching(e):(this.list.remove(e),this)},me.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n
    a',Ae=!Se.getElementsByTagName("link").length,Se=void 0);var Pe={legend:[1,"
    ","
    "],tr:[2,"","
    "],col:[2,"","
    "],_default:Ae?[1,"X
    ","
    "]:[0,"",""]};Pe.td=Pe.th=[3,"","
    "],Pe.option=Pe.optgroup=[1,'"],Pe.thead=Pe.tbody=Pe.colgroup=Pe.caption=Pe.tfoot=[1,"","
    "],Pe.polyline=Pe.ellipse=Pe.polygon=Pe.circle=Pe.text=Pe.line=Pe.path=Pe.rect=Pe.g=[1,'',""];var Re=ke;function Me(e,t){return e&&"function"==typeof e.matches&&e.matches(t)||!1}function Te(e,t){return(t=t||document).querySelector(e)}function De(e,t){return(t=t||document).querySelectorAll(e)}function Be(e){e.parentNode&&e.parentNode.removeChild(e)}function Ne(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(n){}return e}(e,t))}(t,e),e}var Oe=2,je={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":Oe,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":Oe,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Le(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=je[i];r?(r===Oe&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function Ie(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return je[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);Le(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)Le(e,i,t[i])}(e,t);return e}const $e=Object.prototype.toString;function ze(e){return new Fe(e)}function Fe(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function He(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ve(e){return e.cloneNode(!0)}Fe.prototype.add=function(e){return this.list.add(e),this},Fe.prototype.remove=function(e){return"[object RegExp]"==$e.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Fe.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n"+e+"",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function qe(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=Ue(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Ge.svg,e),t&&Ie(n,t),n}var Ke=null;function Xe(e){return(null===Ke&&(Ke=qe("svg")),Ke).createSVGTransform()}var Ye=/([&<>]{1})/g,Ze=/([\n\r"]{1})/g,Qe={"&":"&","<":"<",">":">",'"':"'"};function Je(e,t){return e.replace(t,(function(e,t){return Qe[t]||t}))}function et(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(Je(e.textContent,Ye));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n"),n=0,i=(a=e.childNodes).length;n")}else t.push("/>");break;case 8:t.push("\x3c!--",Je(e.nodeValue,Ye),"--\x3e");break;case 4:t.push("");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function tt(e,t){return function(e){for(var t=e.firstChild,n=[];t;)et(t,n),t=t.nextSibling;return n.join("")}(e)}function nt(e){var t=e.parentNode;return t&&t.removeChild(e),e}function it(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function rt(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(it(e,i))}(n,t)),n.consolidate()}function ot(){}function at(e,t){this.model=e,this.properties=t}ot.prototype.get=function(e){return this.$model.properties.get(this,e)},ot.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},at.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(ot.prototype);j(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function o(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),j(e,J((function(e,t){this.set(t,e)}),this))}return o.prototype=i,o.hasType=i.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var st={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},ct={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function lt(e,t){var n=ct[e];return n?n(t):t}function pt(e){return!!st[e]}function ut(e){return!!ct[e]}function dt(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected or , got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function ht(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function mt(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,j(e,J(this.registerPackage,this))}function ft(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function gt(e){this.model=e}function yt(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function vt(e){return e.replace(/^:/,"")}function bt(e,t={}){this.properties=new gt(this),this.factory=new at(this,this.properties),this.registry=new mt(e,this.properties),this.typeCache={},this.config=t}ht.prototype.build=function(){return te(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},ht.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},ht.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},ht.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=dt(r[0],i),a=dt(r[1],o.prefix).name,s=this.propertiesByName[a];if(!s)throw new Error("refined property <"+a+"> not found");this.replaceProperty(s,e,n),delete e.redefines},ht.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},ht.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},ht.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},ht.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},ht.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},ht.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},ht.prototype.hasProperty=function(e){return this.propertiesByName[e]},ht.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(j(e.properties,J((function(n){n=ee({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[r]=e)},mt.prototype.getPackage=function(e){return this.packageMap[e]},mt.prototype.getPackages=function(){return this.packages},mt.prototype.registerPackage=function(e){e=ee({},e);var t=this.packageMap;ft(t,e,"prefix"),ft(t,e,"uri"),j(e.types,J((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},mt.prototype.registerType=function(e,t){var n=dt((e=ee({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:ee(e.meta||{})})).name,t.prefix),i=n.name,r={};j(e.properties,J((function(e){var t=dt(e.name,n.prefix),i=t.name;pt(e.type)||(e.type=dt(e.type,t.prefix).name),ee(e,{ns:t,name:i}),r[i]=e}),this)),ee(e,{ns:n,name:i,propertiesByName:r}),j(e.extends,J((function(e){var t=dt(e,n.prefix),r=this.typeMap[t.name];r.traits=r.traits||[],r.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},mt.prototype.mapTypes=function(e,t,n){var i=pt(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=dt(n,pt(n)?"":e.prefix);r.mapTypes(o,t,i)}function a(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");j(i.superClass,n?a:function(e){return o(e,!1)}),t(i,!n),j(i.traits,a)},mt.prototype.getEffectiveDescriptor=function(e){var t=dt(e),n=new ht(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},mt.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},gt.prototype.set=function(e,t,n){if(!T(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.getProperty(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[vt(t)]:i?r in e?e[r]=n:yt(e,i,n):e.$attrs[vt(t)]=n},gt.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[vt(t)];var i=n.name;return!e[i]&&n.isMany&&yt(e,n,[]),e[i]},gt.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=ee({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},gt.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},gt.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},gt.prototype.getProperty=function(e,t){var n=this.model,i=n.getPropertyDescriptor(e,t);if(i)return i;if(t.includes(":"))return null;const r=n.config.strict;if(void 0!==r){const n=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(r)throw n}return null},bt.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},bt.prototype.getType=function(e){var t=this.typeCache,n=T(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},bt.prototype.createAny=function(e,t,n){var i=dt(e),r={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){!function(e,t,n){let i=e;j(t,(function(e,r){if("number"!=typeof e&&"string"!=typeof e)throw new Error("illegal key type: "+typeof e+". Key should be of type number or string.");if("constructor"===e)throw new Error("illegal key: constructor");if("__proto__"===e)throw new Error("illegal key: __proto__");let o=t[r+1],a=i[e];C(o)&&k(a)&&(a=i[e]=isNaN(+o)?{}:[]),S(o)?S(n)?delete i[e]:i[e]=n:i=a}))}(this,[e],t)}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"get",{enumerable:!1,writable:!0}),this.properties.define(r,"set",{enumerable:!1,writable:!0}),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),this.properties.define(r,"$instanceOf",{enumerable:!1,writable:!0}),j(n,(function(e,t){P(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e})),r},bt.prototype.getPackage=function(e){return this.registry.getPackage(e)},bt.prototype.getPackages=function(){return this.registry.getPackages()},bt.prototype.getElementDescriptor=function(e){return e.$descriptor},bt.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},bt.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},bt.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var xt=String.fromCharCode,_t=Object.prototype.hasOwnProperty,wt=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,Et={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function St(e,t,n,i){return i?_t.call(Et,i)?Et[i]:"&"+i+";":xt(t||parseInt(n,16))}function Ct(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(wt,St):e}Object.keys(Et).forEach((function(e){Et[e.toUpperCase()]=Et[e]}));var kt="xsi:type",At="non-whitespace outside of root node";function Pt(e){return new Error(e)}function Rt(e){return"missing namespace for prefix <"+e+">"}function Mt(e){return{get:e,enumerable:!0}}function Tt(e){var t,n={};for(t in e)n[t]=e[t];return n}function Dt(e){return e+"$uri"}function Bt(){return{line:0,column:0}}function Nt(e){throw e}function Ot(e){if(!this)return new Ot(e);var t,n,i,r,o,a,s,c,l,p=e&&e.proxy,u=Nt,d=Bt,h=!1,m=!1,f=null,g=!1;function y(e){e instanceof Error||(e=Pt(e)),f=e,u(e,d)}function v(e){o&&(e instanceof Error||(e=Pt(e)),o(e,d))}this.on=function(e,l){if("function"!=typeof l)throw Pt("required args ");switch(e){case"openTag":n=l;break;case"text":t=l;break;case"closeTag":i=l;break;case"error":u=l;break;case"warn":o=l;break;case"cdata":r=l;break;case"attention":c=l;break;case"question":s=l;break;case"comment":a=l;break;default:throw Pt("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw Pt("required args ");var t,n={};for(t in e)n[t]=e[t];return n["http://www.w3.org/2001/XMLSchema-instance"]="xsi",m=!0,l=n,this},this.parse=function(e){if("string"!=typeof e)throw Pt("required args ");return f=null,function(e){var o,u,f,b,x,_,w,E,S,C,k,A=m?[]:null,P=m?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Dt(n)]=t;return i}(l):null,R=[],M=0,T=!1,D=!1,B=0,N=0,O="",j=0;function L(){if(null!==k)return k;var e,t,n,i,r,o,a,s,c,p,u,d=m&&P.xmlns,f=m&&h?[]:null,g=j,y=O,b=y.length,x={},_={};e:for(;g8)){for((p<65||p>122||p>90&&p<97)&&95!==p&&58!==p&&(v("illegal first char attribute name"),c=!0),u=g+1;u96&&p<123||p>64&&p<91||p>47&&p<59||46===p||45===p||95===p)){if(32===p||p<14&&p>8){v("missing attribute value"),g=u;continue e}if(61===p)break;v("illegal attribute name char"),c=!0}if("xmlns:xmlns"===(s=y.substring(g,u))&&(v("illegal declaration of xmlns"),c=!0),34===(p=y.charCodeAt(u+1)))-1===(u=y.indexOf('"',g=u+2))&&-1!==(u=y.indexOf("'",g))&&(v("attribute value quote missmatch"),c=!0);else if(39===p)-1===(u=y.indexOf("'",g=u+2))&&-1!==(u=y.indexOf('"',g))&&(v("attribute value quote missmatch"),c=!0);else for(v("missing attribute value quotes"),c=!0,u+=1;u8);u++);for(-1===u&&(v("missing closing quotes"),u=b,c=!0),c||(o=y.substring(g,u)),g=u;u+18);u++)g===u&&(v("illegal character after attribute end"),c=!0);if(g=u+1,!c)if(s in _)v("attribute <"+s+"> already defined");else if(_[s]=!0,m)if(h){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=Ct(o),t=Dt(r),!(a=l[e])){if("xmlns"===r||t in P&&P[t]!==e)do{a="ns"+M++}while(void 0!==P[a]);else a=r;l[e]=a}P[r]!==a&&(i||(P=Tt(P),i=!0),P[r]=a,"xmlns"===r&&(P[Dt(a)]=e,d=a),P[t]=e),x[s]=o;continue}f.push(s,o)}else-1!==(p=s.indexOf(":"))?(n=P[s.substring(0,p)])?((s=d===n?s.substr(p+1):n+s.substr(p))===kt&&(-1!==(p=o.indexOf(":"))?(n=o.substring(0,p),o=(n=P[n]||n)+o.substring(p)):o=d+":"+o),x[s]=o):v(Rt(s.substring(0,p))):x[s]=o;else x[s]=o}if(h)for(g=0,b=f.length;g=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>B);)r+=1,a=s;return-1==B?(o=s,n=e.substring(N)):0===N?n=e.substring(N,B):(o=B-a,n=-1==N?e.substring(B):e.substring(B,N+1)),{data:n,line:r,column:o}}d=I,p&&(C=Object.create({},{name:Mt((function(){return E})),originalName:Mt((function(){return S})),attrs:Mt(L),ns:Mt((function(){return P}))}));for(;-1!==N;){if(-1===(B=60===e.charCodeAt(N)?N:e.indexOf("<",N)))return R.length?y("unexpected end of file"):0===N?y("missing start tag"):void(N",B)))return y("unclosed cdata");if(r&&(r(e.substring(B+9,N),d),g))return;N+=3;continue}if(45===b&&45===e.charCodeAt(B+3)){if(-1===(N=e.indexOf("--\x3e",B)))return y("unclosed comment");if(a&&(a(e.substring(B+4,N),Ct,d),g))return;N+=3;continue}}if(63!==x){for(u=B+1;;u++){if(_=e.charCodeAt(u),isNaN(_))return N=-1,y("unclosed tag");if(34===_)u=-1!==(b=e.indexOf('"',u+1))?b:u;else if(39===_)u=-1!==(b=e.indexOf("'",u+1))?b:u;else if(62===_){N=u;break}}if(33!==x){if(k={},47===x){if(T=!1,D=!0,!R.length)return y("missing open tag");if(u=E=R.pop(),b=B+2+u.length,e.substring(B+2,b)!==u)return y("closing tag mismatch");for(;b8&&x<14))return y("close tag")}else{if(47===e.charCodeAt(N-1)?(u=E=e.substring(B+1,N-1),T=!0,D=!0):(u=E=e.substring(B+1,N),T=!0,D=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return y("illegal first char nodeName");for(b=1,f=u.length;b96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46==x)){if(32===x||x<14&&x>8){E=u.substring(0,b),k=null;break}return y("invalid nodeName")}D||R.push(E)}if(m){if(o=P,T&&(D||A.push(o),null===k&&(h=-1!==u.indexOf("xmlns",b))&&(j=b,O=u,L(),h=!1)),S=E,-1!==(x=E.indexOf(":"))){if(!(w=P[E.substring(0,x)]))return y("missing namespace on <"+S+">");E=E.substr(x+1)}else w=P.xmlns;w&&(E=w+":"+E)}if(T&&(j=b,O=u,n&&(p?n(C,Ct,D,d):n(E,L,Ct,D,d),g)))return;if(D){if(i&&(i(p?C:E,Ct,T,d),g))return;m&&(P=T?o:A.pop())}N+=1}else{if(c&&(c(e.substring(B,N+1),Ct,d),g))return;N+=1}}else{if(-1===(N=e.indexOf("?>",B)))return y("unclosed question");if(s&&(s(e.substring(B,N+2),d),g))return;N+=2}}}(e),d=Bt,g=!1,f},this.stop=function(){g=!0}}function jt(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Lt={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},It="xsi:type";function $t(e){return e.xml&&e.xml.serialize}function zt(e){return $t(e)===It}function Ft(e,t){return jt(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Ht(e){return new Error(e)}function Vt(e){return e.$descriptor}function Gt(e){ee(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw Ht("expected element");var t,n=this.elementsById,i=Vt(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw Ht("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Wt(){}function Ut(){}function qt(){}function Kt(e,t){this.property=e,this.context=t}function Xt(e,t){this.element=t,this.propertyDesc=e}function Yt(){}function Zt(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function Qt(e,t,n){Zt.call(this,e,t,n)}function Jt(e,t,n){this.model=e,this.context=n}function en(e){e instanceof bt&&(e={model:e}),ee(this,{lax:!1},e)}Wt.prototype.handleEnd=function(){},Wt.prototype.handleText=function(){},Wt.prototype.handleNode=function(){},Ut.prototype=Object.create(Wt.prototype),Ut.prototype.handleNode=function(){return this},qt.prototype=Object.create(Wt.prototype),qt.prototype.handleText=function(e){this.body=(this.body||"")+e},Kt.prototype=Object.create(qt.prototype),Kt.prototype.handleNode=function(e){if(this.element)throw Ht("expected no sub nodes");return this.element=this.createReference(e),this},Kt.prototype.handleEnd=function(){this.element.id=this.body},Kt.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},Xt.prototype=Object.create(qt.prototype),Xt.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=lt(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Yt.prototype=Object.create(qt.prototype),Yt.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},Zt.prototype=Object.create(Yt.prototype),Zt.prototype.addReference=function(e){this.context.addReference(e)},Zt.prototype.handleText=function(e){if(!Vt(this.element).bodyProperty)throw Ht("unexpected body text <"+e+">");qt.prototype.handleText.call(this,e)},Zt.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Vt(t).bodyProperty;n&&void 0!==e&&(e=lt(n.type,e),t.set(n.name,e))},Zt.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Vt(i),o=this.context,a=new i({}),s=this.model;return j(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?j(e.split(" "),(function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i?e=lt(i.type,e):"xmlns"!==n&&(t=dt(n,r.ns.prefix),s.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:a,property:n,value:e})),a.set(n,e))})),a},Zt.prototype.getPropertyForNode=function(e){var t,n,i=dt(e.name),r=this.type,o=this.model,a=Vt(r),s=i.name,c=a.propertiesByName[s];if(c&&!c.isAttr)return zt(c)&&(t=e.attributes[It])?(t=function(e,t){var n=dt(e);return function(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(n,t.getPackage(n.prefix))}(t,o),ee({},c,{effectiveType:Vt(n=o.getType(t)).name})):c;var l=o.getPackage(i.prefix);if(l){if(t=Ft(i,l),n=o.getType(t),c=B(a.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return ee({},c,{effectiveType:Vt(n).name})}else if(c=B(a.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return c;throw Ht("unrecognized element <"+i.name+">")},Zt.prototype.toString=function(){return"ElementDescriptor["+Vt(this.type).name+"]"},Zt.prototype.valueHandler=function(e,t){return new Xt(e,t)},Zt.prototype.referenceHandler=function(e){return new Kt(e,this.context)},Zt.prototype.handler=function(e){return"Element"===e?new Jt(this.model,e,this.context):new Zt(this.model,e,this.context)},Zt.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,ut(n=t.effectiveType||t.type))return this.valueHandler(t,i);var o=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(ee(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},Qt.prototype=Object.create(Zt.prototype),Qt.prototype.createElement=function(e){var t=e.name,n=dt(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&Ft(n,o)||t;if(!r.hasType(a))throw Ht("unexpected element <"+e.originalName+">");return Zt.prototype.createElement.call(this,e)},Jt.prototype=Object.create(Yt.prototype),Jt.prototype.createElement=function(e){var t=e.name,n=dt(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Jt.prototype.handleChild=function(e){var t=new Jt(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},Jt.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},en.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Zt?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,a=new Gt(ee({},t,{rootHandler:i})),s=new Ot({proxy:!0}),c=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function l(e,t,n){var i=t(),r=i.line,o=i.column,s=i.data;"<"===s.charAt(0)&&-1!==s.indexOf(" ")&&(s=s.slice(0,s.indexOf(" "))+">");var c="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:c,error:e}),!0;throw Ht(c)}function p(e,t){return l(e,t,!0)}i.context=a,c.push(i);var u=/^<\?xml /i,d=/ encoding="([^"]+)"/i,h=/^utf-8$/i;function m(e,t){try{c.peek().handleText(e)}catch(n){p(n,t)}}var f=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return s.ns(f).on("openTag",(function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=c.peek();try{c.push(n.handleNode(e))}catch(i){l(i,t,o)&&c.push(new Ut)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=d.exec(e),n=t&&t[1];n&&!h.test(n)&&a.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){c.pop().handleEnd()})).on("cdata",m).on("text",(function(e,t,n){!function(e,t){e.trim()&&m(e,t)}(t(e),n)})).on("error",l).on("warn",p),new Promise((function(t,n){var r;try{s.parse(e),function(){var e,t,n=a.elementsById,i=a.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],s=Vt(r).propertiesByName[t.property];if(o||a.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),s.isMany){var c=r.get(s.name),l=c.indexOf(t);-1===l&&(l=c.length),o?c[l]=o:c.splice(l,1)}else r.set(s.name,o)}}()}catch(u){r=u}var o=i.element;r||o||(r=Ht("failed to parse document as <"+i.type.$descriptor.name+">"));var c=a.warnings,l=a.references,p=a.elementsById;return r?(r.warnings=c,n(r)):t({rootElement:o,elementsById:p,references:l,warnings:c})}))},en.prototype.handler=function(e){return new Qt(this.model,e)};var tn=/<|>|'|"|&|\n\r|\n/g,nn=/<|>|&/g;function rn(e){var t={},n={},i={},r=[],o=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):o.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,r=this.getNSKey(t);i[r]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(r,o).filter((function(e){var n=t.getNSKey(e);return i[n]}))}}function on(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function an(e){return T(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var sn={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},cn={"<":"lt",">":"gt","&":"amp"};function ln(e,t,n){return(e=T(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function pn(e){this.tagName=e}function un(){}function dn(e){this.tagName=e}function hn(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function mn(e,t){hn.call(this,e,t)}function fn(){this.value="",this.write=function(e){this.value+=e}}function gn(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function yn(e){return e=ee({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new fn,r=new gn(i,e.format);if(e.preamble&&r.append('\n'),(new hn).build(t).serializeTo(r),!n)return i.value}}}function vn(e,t){bt.call(this,e,t)}pn.prototype.build=function(e){return this.element=e,this},pn.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"").appendNewLine()},un.prototype.serializeValue=un.prototype.serializeTo=function(e){e.append(this.escape?ln(this.value,nn,cn):this.value)},un.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(nn)&&(this.escape=!0),this},on(dn,un),dn.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("").appendNewLine()},hn.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o||(n=function(e){return O(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!D(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(O(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return O(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},hn.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?ee({localName:t.ns.localName},e):ee({localName:(n=t.ns.localName,i=t.$pkg,jt(i)?(r=n).charAt(0).toLowerCase()+r.slice(1):n)},e);var n,i,r}(this.logNamespaceUsed(e.ns),e)},hn.prototype.nsPropertyTagName=function(e){return function(e,t){return ee({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},hn.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},hn.prototype.nsAttributeName=function(e){var t;if(t=T(e)?dt(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:ee({localName:t.localName},n)},hn.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return j(e,(function(r,o){"$body"===o?n.push((new un).build({type:"String"},r)):"$children"===o?j(r,(function(e){n.push(new hn(t).build(e))})):0!==o.indexOf("$")&&t.parseNsAttribute(e,o,r)&&i.push({name:o,value:r})})),i},hn.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=dt(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var a=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(a)}},hn.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];return j(i,(function(t,i){var o=n.parseNsAttribute(e,i,t);o&&r.push(o)})),r},hn.prototype.parseGenericAttributes=function(e,t){var n=this;j(t,(function(e){if(e.name!==It)try{n.addAttribute(n.nsAttributeName(e.name),e.value)}catch(t){}}))},hn.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;j(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new un).build(e,r[0]));else if(ut(e.type))j(r,(function(i){n.push(new dn(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)j(r,(function(i){n.push(new pn(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=zt(e),s=function(e){return"property"===$t(e)}(e);j(r,(function(i){var r;r=a?new mn(t,e):s?new hn(t,e):new hn(t),n.push(r.build(i))}))}}))},hn.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new rn(t):n=t),n},hn.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(o,r),e},hn.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.element.$model,a=this.getNamespaces(t),s=e.prefix,c=e.uri;if(!s&&!c)return{localName:e.localName};if(r=Lt[s]||o&&(o.getPackage(s)||{}).uri,!(c=c||r||a.uriByPrefix(s)))throw new Error("no namespace uri given for prefix <"+s+">");if(!(e=a.byUri(c))){for(n=s,i=1;a.uriByPrefix(n);)n=s+"_"+i++;e=this.logNamespace({prefix:n,uri:c},r===c)}return s&&a.mapPrefix(s,c),e},hn.prototype.parseAttributes=function(e){var t=this,n=this.element;j(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];j(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},hn.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),an(e)},hn.prototype.addAttribute=function(e,t){var n=this.attrs;T(t)&&(t=ln(t,tn,sn));var i=N(n,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),r={name:e,value:t};-1!==i?n.splice(i,1,r):n.push(r)},hn.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=function(e){return e.getUsed().filter((function(e){return"xml"!==e.prefix})).map((function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}}))}(n).concat(t)),j(t,(function(t){e.append(" ").append(an(t.name)).append('="').append(t.value).append('"')}))},hn.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==un;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),j(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()},on(mn,hn),mn.prototype.parseNsAttributes=function(e){var t=hn.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(It),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},mn.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},vn.prototype=Object.create(bt.prototype),vn.prototype.fromXML=function(e,t,n){T(t)||(n=t,t="bpmn:Definitions");var i=new en(ee({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},vn.prototype.toXML=function(e,t){var n=new yn(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(r){return i(r)}}))};var bn={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]},color:{name:"BPMN in Color",uri:"http://www.omg.org/spec/BPMN/non-normative/color/1.0",prefix:"color",types:[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};function xn(e,t){return new vn(ee({},bn,e),t)}function _n(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':""}var wn="Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472";function En(e){D(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error(wn)}})}function Sn(e,t){return e.$instanceOf(t)}function Cn(e){var t={},n=[],i={};function r(e,t){return function(n){e(n,t)}}function o(e){t[e.id]=e}function a(t,n){try{var r=i[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${_n(t)}`);return e.element(t,i[t.id],n)}(t,n);return o(t),r}catch(a){s(a.message,{element:t,error:a})}}function s(t,n){e.error(t,n)}var c=this.registerDi=function(e){var t=e.bpmnElement;t?i[t.id]?s(`multiple DI elements defined for ${_n(t)}`,{element:t}):(i[t.id]=e,En(t)):s(`no bpmnElement referenced in ${_n(e)}`,{element:e})};function l(e){var t;t=e.plane,c(t),j(t.planeElement,p)}function p(e){c(e)}this.handleDefinitions=function(o,a){var p=o.diagrams;if(a&&-1===p.indexOf(a))throw new Error("diagram not part of ");if(!a&&p&&p.length&&(a=p[0]),!a)throw new Error("no diagram to display");i={},l(a);var m=a.plane;if(!m)throw new Error(`no plane for ${_n(a)}`);var f=m.bpmnElement;if(!f){if(f=function(e){return B(e.rootElements,(function(e){return Sn(e,"bpmn:Process")||Sn(e,"bpmn:Collaboration")}))}(o),!f)throw new Error("no process or collaboration to display");s(`correcting missing bpmnElement on ${_n(m)} to ${_n(f)}`),m.bpmnElement=f,c(m)}var g,y,b=function(t,n){return e.root(t,i[t.id],n)}(f,m);if(Sn(f,"bpmn:Process")||Sn(f,"bpmn:SubProcess"))d(f,b);else{if(!Sn(f,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${_n(m)}: ${_n(f)}`);y=b,j((g=f).participants,r(k,y)),v(g.artifacts,y),n.push((function(){!function(e,t){j(e,r(h,t))}(g.messageFlows,y)})),function(e,n){O(e,(function(e){return!t[e.id]&&Sn(e,"bpmn:Process")&&e.laneSets})).forEach(r(d,n))}(o.rootElements,b)}u(n)};var u=this.handleDeferred=function(){for(;n.length;)n.shift()()};function d(e,t){C(e,t),b(e.ioSpecification,t),v(e.artifacts,t),o(e)}function h(e,t){a(e,t)}function m(e,t){a(e,t)}function f(e,t){a(e,t)}function g(e,t){a(e,t)}function y(e,t){a(e,t)}function v(e,t){j(e,(function(e){Sn(e,"bpmn:Association")?n.push((function(){y(e,t)})):y(e,t)}))}function b(e,t){e&&(j(e.dataInputs,r(f,t)),j(e.dataOutputs,r(g,t)))}var x=this.handleSubProcess=function(e,t){C(e,t),v(e.artifacts,t)};function _(e,t){var i=a(e,t);Sn(e,"bpmn:SubProcess")&&x(e,i||t),Sn(e,"bpmn:Activity")&&b(e.ioSpecification,t),n.push((function(){j(e.dataInputAssociations,r(m,t)),j(e.dataOutputAssociations,r(m,t))}))}function w(e,t){a(e,t)}function E(e,t){n.push((function(){var n=a(e,t);e.childLaneSet&&S(e.childLaneSet,n||t),function(e){j(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function S(e,t){j(e.lanes,r(E,t))}function C(e,t){!function(e,t){j(e,(function(e){Sn(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){a(e,t)}(e,t)})):Sn(e,"bpmn:BoundaryEvent")?n.unshift((function(){_(e,t)})):Sn(e,"bpmn:FlowNode")?_(e,t):Sn(e,"bpmn:DataObject")||(Sn(e,"bpmn:DataStoreReference")||Sn(e,"bpmn:DataObjectReference")?w(e,t):s(`unrecognized flowElement ${_n(e)} in context ${_n(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){j(e,r(S,t))}(e.laneSets,t)}function k(e,t){var n=a(e,t),i=e.processRef;i&&d(i,n||t)}}function kn(e,t){var n=Pn(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function An(e,t){return z(t,(function(t){return kn(e,t)}))}function Pn(e){return e&&e.businessObject||e}function Rn(e){return e&&e.di}function Mn(e,t,n){var i,r,o,a=[];function s(e,t){var n=new Cn({root:function(e,t){return i.add(e,t)},element:function(e,t,n){return i.add(e,t,n)},error:function(e,t){a.push({message:e,context:t})}});t=t||e.diagrams&&e.diagrams[0];var r=function(e,t){if(!t||!t.plane)return;var n,i=t.plane.bpmnElement,r=i;kn(i,"bpmn:Process")||kn(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(kn(t,"bpmn:Process"))return t;t=t.$parent}}(i));n=kn(r,"bpmn:Collaboration")?r:B(e.rootElements,(function(e){if(kn(e,"bpmn:Collaboration"))return B(e.participants,(function(e){return e.processRef===r}))}));var o=[r];n&&(o=F(n.participants,(function(e){return e.processRef}))).push(n);var a=Tn(o),s=[t],c=[i];return j(e.diagrams,(function(e){if(e.plane){var t=e.plane.bpmnElement;-1!==a.indexOf(t)&&-1===c.indexOf(t)&&(s.push(e),c.push(t))}})),s}(e,t);if(!r)throw new Error("no diagram to display");j(r,(function(t){n.handleDefinitions(e,t)}));var s=t.plane.bpmnElement.id;o.setRootElement(o.findRoot(s+"_plane")||o.findRoot(s))}return new Promise((function(c,l){try{return i=e.get("bpmnImporter"),r=e.get("eventBus"),o=e.get("canvas"),r.fire("import.render.start",{definitions:t}),s(t,n),r.fire("import.render.complete",{error:undefined,warnings:a}),c({warnings:a})}catch(p){return p.warnings=a,l(p)}}))}function Tn(e){var t=[];return j(e,(function(e){e&&(t.push(e),t=t.concat(Tn(e.flowElements)))})),t}var Dn,Bn='',Nn={verticalAlign:"middle"},On={color:"#404040"},jn={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},Ln={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},In={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},$n='
    '+Bn+'Web-based tooling for BPMN, DMN and forms powered by bpmn.io.
    ';function zn(){Dn||(pe(Dn=Re($n),jn),pe(Te("svg",Dn),Nn),pe(Te(".backdrop",Dn),Ln),pe(Te(".notice",Dn),In),pe(Te(".link",Dn),On,{margin:"15px 20px 15px 10px",alignSelf:"center"}),Ce.bind(Dn,".backdrop","click",(function(e){document.body.removeChild(Dn)}))),document.body.appendChild(Dn)}function Fn(e){e=ee({},Vn,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),function(e){const t=Re(''+Bn+"");pe(Te("svg",t),Nn),pe(t,On,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(t),we.bind(t,"click",(function(e){zn(),e.preventDefault()}))}(this._container),this._init(this._container,this._moddle,e)}function Hn(e,t){return e.warnings=t,e}x(Fn,l),Fn.prototype.importXML=async function(e,t){const n=this;let i=[];try{let a;e=this._emit("import.parse.start",{xml:e})||e;try{a=await this._moddle.fromXML(e,"bpmn:Definitions")}catch(o){throw this._emit("import.parse.complete",{error:o}),o}let s=a.rootElement;const c=a.references,l=a.warnings,p=a.elementsById;i=i.concat(l),s=this._emit("import.parse.complete",(r={error:null,definitions:s,elementsById:p,references:c,warnings:i},n.get("eventBus").createEvent(r)))||s;const u=await this.importDefinitions(s,t);return i=i.concat(u.warnings),this._emit("import.done",{error:null,warnings:i}),{warnings:i}}catch(a){let e=a;throw i=i.concat(e.warnings||[]),Hn(e,i),e=function(e){const t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]);return e}(e),this._emit("import.done",{error:e,warnings:e.warnings}),e}var r},Fn.prototype.importDefinitions=async function(e,t){this._setDefinitions(e);return{warnings:(await this.open(t)).warnings}},Fn.prototype.open=async function(e){const t=this._definitions;let n=e;if(!t){const e=new Error("no XML imported");throw Hn(e,[]),e}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return B(e.diagrams,(function(e){return e.id===t}))||null}(t,e),!n)){const t=new Error("BPMNDiagram <"+e+"> not found");throw Hn(t,[]),t}try{this.clear()}catch(r){throw Hn(r,[]),r}const{warnings:i}=await Mn(this,t,n);return{warnings:i}},Fn.prototype.saveXML=async function(e){e=e||{};let t,n,i=this._definitions;try{if(!i)throw new Error("no definitions loaded");i=this._emit("saveXML.start",{definitions:i})||i;n=(await this._moddle.toXML(i,e)).xml,n=this._emit("saveXML.serialized",{xml:n})||n}catch(o){t=o}const r=t?{error:t}:{xml:n};if(this._emit("saveXML.done",r),t)throw t;return r},Fn.prototype.saveSVG=async function(){let e,t;this._emit("saveSVG.start");try{const t=this.get("canvas"),n=t.getActiveLayer(),i=Te(":scope > defs",t._svg),r=tt(n),o=i?""+tt(i)+"":"",a=n.getBBox();e='\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n\n'+o+r+""}catch(n){t=n}if(this._emit("saveSVG.done",{error:t,svg:e}),t)throw t;return{svg:e}},Fn.prototype._setDefinitions=function(e){this._definitions=e},Fn.prototype.getModules=function(){return this._modules},Fn.prototype.clear=function(){this.getDefinitions()&&l.prototype.clear.call(this)},Fn.prototype.destroy=function(){l.prototype.destroy.call(this),Be(this._container)},Fn.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},Fn.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Fn.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=Te(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Fn.prototype.getDefinitions=function(){return this._definitions},Fn.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Fn.prototype._init=function(e,t,n){const i=n.modules||this.getModules(n),r=n.additionalModules||[],o=[].concat([{bpmnjs:["value",this],moddle:["value",t]}],i,r),a=ee(ne(n,["additionalModules"]),{canvas:ee({},n.canvas,{container:e}),modules:o});l.call(this,a),n&&n.container&&this.attachTo(n.container)},Fn.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Fn.prototype._createContainer=function(e){const t=Re('
    ');return pe(t,{width:Gn(e.width),height:Gn(e.height),position:e.position}),t},Fn.prototype._createModdle=function(e){return new xn(ee({},this._moddleExtensions,e.moddleExtensions))},Fn.prototype._modules=[];const Vn={width:"100%",height:"100%",position:"relative"};function Gn(e){return e+(R(e)?"px":"")}function Wn(e){Fn.call(this,e),this.on("import.parse.complete",(function(e){e.error||this._collectIds(e.definitions,e.elementsById)}),this),this.on("diagram.destroy",(function(){this.get("moddle").ids.clear()}),this)}x(Wn,Fn),Wn.prototype._createModdle=function(e){var t=Fn.prototype._createModdle.call(this,e);return t.ids=new c([32,36,1]),t},Wn.prototype._collectIds=function(e,t){var n,i=e.$model.ids;for(n in i.clear(),t)i.claim(n,t[n])};var Un=1e3;function qn(e,t){var n=this;t=t||Un,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,a=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,a):n.drawConnection(o,r,a)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function Kn(e,t){return!kn(e,"bpmn:CallActivity")&&(kn(e,"bpmn:SubProcess")?!(!(t=t||Rn(e))||!kn(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!kn(e,"bpmn:Participant")||!!Pn(e).processRef)}function Xn(e){if(kn(e,"bpmn:Participant")||kn(e,"bpmn:Lane")){var t=Rn(e).isHorizontal;return void 0===t||t}}function Yn(e){return e&&!!Pn(e).triggeredByEvent}function Zn(e,t){return z(Pn(e).eventDefinitions,(function(e){return kn(e,t)}))}function Qn(e){return P(e)&&D(e,"waypoints")}function Jn(e){return P(e)&&D(e,"labelTarget")}qn.prototype.canRender=function(e){},qn.prototype.drawShape=function(e,t){},qn.prototype.drawConnection=function(e,t){},qn.prototype.getShapePath=function(e){},qn.prototype.getConnectionPath=function(e){};var ei={width:90,height:20},ti=15;function ni(e){return kn(e,"bpmn:Event")||kn(e,"bpmn:Gateway")||kn(e,"bpmn:DataStoreReference")||kn(e,"bpmn:DataObjectReference")||kn(e,"bpmn:DataInput")||kn(e,"bpmn:DataOutput")||kn(e,"bpmn:SequenceFlow")||kn(e,"bpmn:MessageFlow")||kn(e,"bpmn:Group")}function ii(e){return Jn(e.label)}function ri(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],r=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}(e),o=Math.atan((i.y-n.y)/(i.x-n.x)),a=r.x,s=r.y;return Math.abs(o) defs",a);c||Ne(a,c=qe("defs")),Ne(c,s)}function h(e,t,n,i){var r=Ai.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){d(t,{element:qe("path",{d:"M 1 5 L 11 10 L 1 15 Z",...p({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("messageflow-start"===n){d(t,{element:qe("circle",{cx:6,cy:6,r:3.5,...p({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6},parentGfx:e})}if("messageflow-end"===n){d(t,{element:qe("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...p({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5},parentGfx:e})}if("association-start"===n){d(t,{element:qe("path",{d:"M 11 5 L 1 10 L 11 15",...u({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5,parentGfx:e})}if("association-end"===n){d(t,{element:qe("path",{d:"M 1 5 L 11 10 L 1 15",...u({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("conditional-flow-marker"===n){d(t,{element:qe("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...p({fill:i,stroke:r})}),ref:{x:-1,y:10},scale:.5,parentGfx:e})}if("conditional-default-flow-marker"===n){d(t,{element:qe("path",{d:"M 6 4 L 10 16",...p({stroke:r,fill:"none"})}),ref:{x:0,y:10},scale:.5,parentGfx:e})}}(e,r,t,n,i),"url(#"+r+")"}function m(e,t,n,i,r={}){P(i)&&(r=i,i=0),i=i||0,r=p(r);var o=qe("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return Ne(e,o),o}function f(e,t,n,i,r,o){P(r)&&(o=r,r=0),r=r||0,o=p(o);var a=qe("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return Ne(e,a),a}function g(e,t,n,i){var r=hi(t,n=u(n),i);return Ne(e,r),r}function y(e,t,n){return g(e,t,n,5)}function v(e,t,n){n=u(n);var i=qe("path",{...n,d:t});return Ne(e,i),i}function b(e,t,n,i){return v(t,n,ee({"data-marker":e},i))}function x(e){return Z[e]}function _(e){return function(t,n,i){return x(e)(t,n,i)}}var w=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:r?vi(t,s,n.fill):bi(t,c,n.stroke),strokeWidth:1})},E=function(e,t,n={}){var r=m(e,t.width,t.height,.2*t.height,{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:2});v(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{stroke:bi(t,c,n.stroke),strokeWidth:2});for(var o=0;o<12;o++){var a=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),l=t.width/2,p=t.height/2;v(e,a,{strokeWidth:1,stroke:bi(t,c,n.stroke),transform:"rotate("+30*o+","+p+","+l+")"})}return r},S=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},C=function(e,t,n={}){return v(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},k=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},A=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},R=function(e,t,n={},r){var o=v(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?bi(t,c,n.stroke):"none",stroke:bi(t,c,n.stroke),strokeWidth:1});return ki(o,45),o},M=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},T=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},D=function(e,t,n={},r){return v(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{fill:r?bi(t,c,n.stroke):vi(t,s,n.fill),strokeWidth:1})},B=function(e,t,n={}){return v(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1})},N=function(e,t,n={}){return m(e,t.width,t.height,8,{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:4})};function O(e,t,n={}){var i,r=Pn(e),o="bpmn:IntermediateThrowEvent"===(i=r).$type||"bpmn:EndEvent"===i.$type;return r.get("eventDefinitions")&&r.get("eventDefinitions").length>1?r.get("parallelMultiple")?B(t,e,n,o):D(t,e,n,o):yi(r,"bpmn:MessageEventDefinition")?w(t,e,n,o):yi(r,"bpmn:TimerEventDefinition")?E(t,e,n,o):yi(r,"bpmn:ConditionalEventDefinition")?C(t,e,n,o):yi(r,"bpmn:SignalEventDefinition")?T(t,e,n,o):yi(r,"bpmn:EscalationEventDefinition")?S(t,e,n,o):yi(r,"bpmn:LinkEventDefinition")?k(t,e,n,o):yi(r,"bpmn:ErrorEventDefinition")?A(t,e,n,o):yi(r,"bpmn:CancelEventDefinition")?R(t,e,n,o):yi(r,"bpmn:CompensateEventDefinition")?M(t,e,n,o):yi(r,"bpmn:TerminateEventDefinition")?N(t,e,n,o):null}var L={ParticipantMultiplicityMarker:function(e,t,n={}){var r=wi(t,n),o=Ei(t,n);b("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2-6)/r,my:(o-15)/o}}),{strokeWidth:2,fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},SubProcessMarker:function(e,t,n={}){Ci(f(e,14,14,0,{strokeWidth:1,fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)}),t.width/2-7.5,t.height-20),b("sub-process",e,i.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},ParallelMarker:function(e,t,n){var r=wi(t,n),o=Ei(t,n);b("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.parallel)/r,my:(o-20)/o}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},SequentialMarker:function(e,t,n){b("sequential",e,i.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},CompensationMarker:function(e,t,n){b("compensation",e,i.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}}),{strokeWidth:1,fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})},LoopMarker:function(e,t,n){var r=wi(t,n),o=Ei(t,n);b("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.loop)/r,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:bi(t,c,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=wi(t,n),o=Ei(t,n);b("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.adhoc)/r,my:(o-15)/o}}),{strokeWidth:1,fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke)})}};function I(e,t,n,i){L[e](t,n,i)}function $(e,t,n,i={}){i={fill:i.fill,stroke:i.stroke,width:wi(t,i),height:Ei(t,i)};var r=Pn(t),o=n&&n.includes("SubProcessMarker");i=o?{...i,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{...i,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},j(n,(function(n){I(n,e,t,i)})),r.get("isForCompensation")&&I("CompensationMarker",e,t,i),kn(r,"bpmn:AdHocSubProcess")&&I("AdhocMarker",e,t,i);var a=r.get("loopCharacteristics"),s=a&&a.get("isSequential");a&&(void 0===s&&I("LoopMarker",e,t,i),!1===s&&I("ParallelMarker",e,t,i),!0===s&&I("SequentialMarker",e,t,i))}function z(e,t,n={}){n=ee({size:{width:100}},n);var i=o.createText(t||"",n);return ze(i).add("djs-label"),Ne(e,i),i}function F(e,t,n,i={}){var r=Pn(t),o=_i({x:t.x,y:t.y,width:t.width,height:t.height},i);return z(e,r.name,{align:n,box:o,padding:7,style:{fill:xi(t,l,c,i.stroke)}})}function H(e,t,n,i={}){var r=Xn(n),o=z(e,t,{box:{height:30,width:r?Ei(n,i):wi(n,i)},align:"center-middle",style:{fill:xi(n,l,c,i.stroke)}});r&&Si(o,0,-(-1*Ei(n,i)),270)}function V(e,t,n={}){var{width:i,height:r}=_i(t,n);return f(e,i,r,10,{...n,fill:vi(t,s,n.fill),fillOpacity:Pi,stroke:bi(t,c,n.stroke)})}function G(e,t,n={}){var i=Pn(t),r=vi(t,s,n.fill),o=bi(t,c,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=h(e,"association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=h(e,"association-start",r,o)),n=Mi(n,["markerStart","markerEnd"]),y(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function W(e,t,n={}){var r=vi(t,s,n.fill),o=bi(t,c,n.stroke),a=v(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:Pi,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(Pn(t))&&v(e,i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:(t.height-18)/t.height}}),{strokeWidth:2,fill:r,stroke:o});return a}function U(e,t,n={}){return m(e,t.width,t.height,{fillOpacity:Pi,...n,fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)})}function q(e,t,n={}){return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=p(i);var s=qe("polygon",{...i,points:a});return Ne(e,s),s}(e,t.width,t.height,{fill:vi(t,s,n.fill),fillOpacity:Pi,stroke:bi(t,c,n.stroke)})}function K(e,t,n={}){var i=f(e,wi(t,n),Ei(t,n),0,{fill:vi(t,s,n.fill),fillOpacity:n.fillOpacity||Pi,stroke:bi(t,c,n.stroke),strokeWidth:1.5}),r=Pn(t);kn(r,"bpmn:Lane")&&H(e,r.get("name"),t,n);return i}function X(e,t,n={}){var i=V(e,t,n);Yn(t)&&Ie(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var r=Kn(t);return F(e,t,r?"center-top":"center-middle",n),$(e,t,r?void 0:["SubProcessMarker"],n),i}function Y(e,t,n={}){var i=V(e,t,n);return F(e,t,"center-middle",n),$(e,t,void 0,n),i}var Z=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return X(e,t,n=Kn(t)?Mi(n,["fill","stroke","width","height"]):Mi(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return G(e,t,n=Mi(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Mi(n,["fill","stroke"]);var r=Pn(t).get("cancelActivity");n={strokeWidth:1.5,fill:vi(t,s,n.fill),fillOpacity:1,stroke:bi(t,c,n.stroke)},r||(n.strokeDasharray="6");var o=U(e,t,n);return m(e,t.width,t.height,3,{...n,fill:"none"}),i&&O(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return Ie(v(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),Ie(v(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=Mi(n,["fill","stroke"]),X(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=q(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=W(e,t,n);return v(e,r,{fill:"none",stroke:bi(t,c,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=Mi(n,["fill","stroke"]),G(e,t,{...n,markerEnd:h(e,"association-end",vi(t,s,n.fill),bi(t,c,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return W(e,t,n=Mi(n,["fill","stroke"]))},"bpmn:DataObjectReference":_("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=W(e,t,n);return v(e,r,{strokeWidth:1,fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=Mi(n,["fill","stroke"]),G(e,t,{...n,markerEnd:h(e,"association-end",vi(t,s,n.fill),bi(t,c,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=Mi(n,["fill","stroke"]),v(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:vi(t,s,n.fill),fillOpacity:Pi,stroke:bi(t,c,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Mi(n,["fill","stroke"]);var r=U(e,t,{...n,strokeWidth:4});return i&&O(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var r=Pn(t),o=q(e,t,n);m(e,t.width,t.height,.2*t.height,{fill:vi(t,"none",n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1});var a,s=r.get("eventGatewayType"),l=!!r.get("instantiate");if("Parallel"===s){var p=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});v(e,p,{fill:"none",stroke:bi(t,c,n.stroke),strokeWidth:1})}else"Exclusive"===s&&(l||m(e,t.width,t.height,.26*t.height,{fill:"none",stroke:bi(t,c,n.stroke),strokeWidth:1}),a=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}}),v(e,a,{fill:"none",stroke:bi(t,c,n.stroke),strokeWidth:2}));return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=q(e,t,n=Mi(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return Rn(t).get("isMarkerVisible")&&v(e,o,{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return q(e,t,n=Mi(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=Mi(n,["fill","stroke","width","height"]),f(e,t.width,t.height,10,{stroke:bi(t,c,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:wi(t,n),height:Ei(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=q(e,t,n=Mi(n,["fill","stroke"]));return m(e,t.width,t.height,.24*t.height,{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Mi(n,["fill","stroke"]);var r=U(e,t,{...n,strokeWidth:1.5});return m(e,t.width,t.height,3,{fill:"none",stroke:bi(t,c,n.stroke),strokeWidth:1.5}),i&&O(t,e,n),r},"bpmn:IntermediateCatchEvent":_("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":_("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=Mi(n,["fill","stroke","width","height"]),K(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var r=Pn(t),o=Rn(t),a=vi(t,s,n.fill),l=bi(t,c,n.stroke),p=y(e,t.waypoints,{markerEnd:h(e,"messageflow-end",a,l),markerStart:h(e,"messageflow-start",a,l),stroke:l,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var u=p.getPointAtLength(p.getTotalLength()/2),d=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),m={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(m.fill=a,m.stroke=l):(m.fill=l,m.stroke=a);var f=v(e,d,m),g=z(e,r.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:l}}),b=f.getBBox(),x=g.getBBox();Si(g,u.x-x.width/2,u.y+b.height/2+10,0)}return p},"bpmn:ParallelGateway":function(e,t,n={}){var r=q(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=K(e,t,n=Mi(n,["fill","stroke","width","height"])),r=Kn(t),o=Xn(t),a=Pn(t),s=a.get("name");if(r){g(e,o?[{x:30,y:0},{x:30,y:Ei(t,n)}]:[{x:0,y:30},{x:wi(t,n),y:30}],{stroke:bi(t,c,n.stroke),strokeWidth:1.5}),H(e,s,t,n)}else{var p=_i(t,n);o||(p.height=wi(t,n),p.width=Ei(t,n));var u=z(e,s,{box:p,align:"center-middle",style:{fill:xi(t,l,c,n.stroke)}});if(!o)Si(u,0,-(-1*Ei(t,n)),270)}return a.get("participantMultiplicity")&&I("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var r,o=Pn(t),a=Y(e,t,n);return o.get("instantiate")?(m(e,28,28,4.4,{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),r=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):r=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),v(e,r,{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),a},"bpmn:ScriptTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:bi(t,c,n.stroke),stroke:vi(t,s,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=Mi(n,["fill","stroke"]);var i=vi(t,s,n.fill),r=bi(t,c,n.stroke),o=y(e,t.waypoints,{markerEnd:h(e,"sequenceflow-end",i,r),stroke:r}),a=Pn(t),{source:l}=t;if(l){var p=Pn(l);a.get("conditionExpression")&&kn(p,"bpmn:Activity")&&Ie(o,{markerStart:h(e,"conditional-flow-marker",i,r)}),p.get("default")&&(kn(p,"bpmn:Gateway")||kn(p,"bpmn:Activity"))&&p.get("default")===a&&Ie(o,{markerStart:h(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return m(e,10,10,{fill:vi(t,s,n.fill),stroke:"none",transform:"translate(6, 6)"}),v(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),m(e,10,10,{fill:vi(t,s,n.fill),stroke:"none",transform:"translate(11, 10)"}),v(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=Mi(n,["fill","stroke"]),Pn(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=U(e,t,n);return i&&O(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return X(e,t,n=Kn(t)?Mi(n,["fill","stroke","width","height"]):Mi(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return Y(e,t,n=Mi(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=Mi(n,["fill","stroke","width","height"]);var{width:r,height:o}=_i(t,n),a=f(e,r,o,0,0,{fill:"none",stroke:"none"});return v(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:bi(t,c,n.stroke)}),z(e,Pn(t).get("text")||"",{align:"left-top",box:_i(t,n),padding:7,style:{fill:xi(t,l,c,n.stroke)}}),a},"bpmn:Transaction":function(e,t,i={}){i=Kn(t)?Mi(i,["fill","stroke","width","height"]):Mi(i,["fill","stroke"]);var r=X(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:bi(t,c,i.stroke),strokeWidth:1.5});return Kn(t)||(i={}),f(e,wi(t,i),Ei(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=Y(e,t,n=Mi(n,["fill","stroke"]));return v(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:.5}),v(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:vi(t,s,n.fill),stroke:bi(t,c,n.stroke),strokeWidth:.5}),v(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:bi(t,c,n.stroke),stroke:bi(t,c,n.stroke),strokeWidth:.5}),r},label:function(e,t,n={}){return function(e,t,n={}){var i={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return z(e,si(t),{box:i,fitBox:!0,style:ee({},o.getExternalStyle(),{fill:xi(t,l,c,n.stroke)})})}(e,t,n)}};this._drawPath=v,this._renderer=x}function Mi(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}x(Ri,qn),Ri.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Ri.prototype.canRender=function(e){return kn(e,"bpmn:BaseElement")},Ri.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Ri.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},Ri.prototype.getShapePath=function(e){return kn(e,"bpmn:Event")?(n=(t=e).x+t.width/2,i=t.y+t.height/2,r=t.width/2,ci([["M",n,i],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]])):kn(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return ci([["M",n+t,i],["l",r-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-r,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]])}(e,10):kn(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return ci([["M",e.x+t,e.y],["l",t,n],["l",-t,n],["l",-t,-n],["z"]])}(e):function(e){var t=e.x,n=e.y,i=e.width;return ci([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e);var t,n,i,r};var Ti=0,Di={width:150,height:50};function Bi(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(o){return{width:0,height:0}}}function Ni(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=Bi(o,n)).width=o?i.width:0," "===o||""===o||i.width1)for(;n=i.shift();){if(!(n.length+oe?t.width:e}),0),m=o.top;"middle"===r.vertical&&(m+=(n.height-d)/2),m-=(s||l[0].height)/4;var f=qe("text");return Ie(f,i),j(l,(function(e){var t;switch(m+=s||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(a?h:p)-o.right-e.width;break;default:t=Math.max(((a?h:p)-e.width)/2+o.left,0)}var n=qe("tspan");Ie(n,{x:t,y:m}),n.textContent=e.text,Ne(f,n)})),nt(u),{dimensions:{width:h,height:d},element:f}};function $i(e){var t=ee({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=ee({},t,{fontSize:n},e&&e.externalStyle||{}),r=new Ii({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30},style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=r.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}$i.$inject=["config.textRenderer"];var zi=/\{([^{}]+)\}/g,Fi=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;const Hi={__init__:["bpmnRenderer"],bpmnRenderer:["type",Ri],textRenderer:["type",$i],pathMap:["type",function(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o,a,s={};if(t.position){for(var c=t.containerHeight/r.height*t.yScaleFactor,l=t.containerWidth/r.width*t.xScaleFactor,p=0;pt.x-n&&e.y>t.y-n&&e.x=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function yr(e,t,n,i,r){return e*(e*(-3*t+9*n-9*i+3*r)+6*t-12*n+6*i)-3*t+3*n}function vr(e,t,n,i,r,o,a,s,c){null==c&&(c=1);for(var l=(c=c>1?1:c<0?0:c)/2,p=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],u=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,h=0;h<12;h++){var m=l*p[h]+l,f=yr(m,e,n,r,a),g=yr(m,t,i,o,s),y=f*f+g*g;d+=u[h]*Ji.sqrt(y)}return l*d}function br(e,t,n,i,r,o,a,s){if(!(nr(e,n)nr(r,a)||nr(t,i)nr(o,s))){var c=(e*i-t*n)*(o-s)-(t-i)*(r*s-o*a),l=(e-n)*(o-s)-(t-i)*(r-a);if(l){var p=xr(((e*i-t*n)*(r-a)-(e-n)*(r*s-o*a))/l),u=xr(c/l),d=+p.toFixed(2),h=+u.toFixed(2);if(!(d<+tr(e,n).toFixed(2)||d>+nr(e,n).toFixed(2)||d<+tr(r,a).toFixed(2)||d>+nr(r,a).toFixed(2)||h<+tr(t,i).toFixed(2)||h>+nr(t,i).toFixed(2)||h<+tr(o,s).toFixed(2)||h>+nr(o,s).toFixed(2)))return{x:p,y:u}}}}function xr(e){return Math.round(1e11*e)/1e11}function _r(e,t,n){if(!function(e,t){return e=ur(e),gr(t=ur(t),e.x,e.y)||gr(t,e.x2,e.y)||gr(t,e.x,e.y2)||gr(t,e.x2,e.y2)||gr(e,t.x,t.y)||gr(e,t.x2,t.y)||gr(e,t.x,t.y2)||gr(e,t.x2,t.y2)||(e.xt.x||t.xe.x)&&(e.yt.y||t.ye.y)}(fr(e),fr(t)))return n?0:[];for(var i=vr(...e),r=vr(...t),o=Sr(e)?1:~~(i/5)||1,a=Sr(t)?1:~~(r/5)||1,s=[],c=[],l={},p=n?0:[],u=0;u=0&&w<=1&&E>=0&&E<=1&&(n?p++:p.push({x:_.x,y:_.y,t1:w,t2:E}))}}return p}function wr(e,t,n){e=Pr(e),t=Pr(t);for(var i,r,o,a,s,c,l,p,u,d,h=n?0:[],m=0,f=e.length;m2&&(i.push([t,...o.splice(0,2)]),a="l",t="m"==t?"l":"L");o.length>=n[a]&&(i.push([t,...o.splice(0,n[a])]),n[a]););})),i.toString=pr.toString,t.arr=lr(i),i}(e)),!e||!e.length)return[["M",0,0]];var n,i=[],r=0,o=0,a=0,s=0,c=0;"M"==e[0][0]&&(a=r=+e[0][1],s=o=+e[0][2],c++,i[0]=["M",r,o]);for(var l,p,u=c,d=e.length;u=1e3&&delete i[r.shift()],r.push(n),i[n]=e(...arguments),i[n])}}((function(e,t,n){return{x:e*Ji.cos(n)-t*Ji.sin(n),y:e*Ji.sin(n)+t*Ji.cos(n)}}));if(l)E=l[0],S=l[1],_=l[2],w=l[3];else{e=(p=m(e,t,-d)).x,t=p.y;var f=(e-(s=(p=m(s,c,-d)).x))/2,g=(t-(c=p.y))/2,y=f*f/(n*n)+g*g/(i*i);y>1&&(n*=y=Ji.sqrt(y),i*=y);var v=n*n,b=i*i,x=(o==a?-1:1)*Ji.sqrt(rr((v*b-v*g*g-b*f*f)/(v*g*g+b*f*f))),_=x*n*g/i+(e+s)/2,w=x*-i*f/n+(t+c)/2,E=Ji.asin(((t-w)/i).toFixed(9)),S=Ji.asin(((c-w)/i).toFixed(9));(E=e<_?er-E:E)<0&&(E=2*er+E),(S=s<_?er-S:S)<0&&(S=2*er+S),a&&E>S&&(E-=2*er),!a&&S>E&&(S-=2*er)}var C=S-E;if(rr(C)>u){var k=S,A=s,P=c;S=E+u*(a&&S>E?1:-1),h=Ar(s=_+n*Ji.cos(S),c=w+i*Ji.sin(S),n,i,r,0,a,A,P,[S,k,_,w])}C=S-E;var R=Ji.cos(E),M=Ji.sin(E),T=Ji.cos(S),D=Ji.sin(S),B=Ji.tan(C/4),N=4/3*n*B,O=4/3*i*B,j=[e,t],L=[e+N*M,t-O*R],I=[s+N*D,c-O*T],$=[s,c];if(L[0]=2*j[0]-L[0],L[1]=2*j[1]-L[1],l)return[L,I,$].concat(h);for(var z=[],F=0,H=(h=[L,I,$].concat(h).join().split(",")).length;F7){e[t].shift();for(var i=e[t];i.length;)a[t]="A",e.splice(t++,0,["C",...i.splice(0,6)]);e.splice(t,1),p=n.length}},a=[],s="",c="",l=0,p=n.length;l=r.right,s=i.top-n.y>=r.bottom,c=o?"top":s?"bottom":null,l=i.right+n.x<=r.left?"left":a?"right":null;return l&&c?c+"-"+l:l||c||"intersect"}function jr(e,t,n){var i=wr(e,t);return 1===i.length||2===i.length&&Gi(i[0],i[1])<1?Mr(i[0]):i.length>1?Mr((i=q(i,(function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t})))[n?0:i.length-1]):null}function Lr(e,t,n){return ee({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Ir(e,t,n){var i=e.waypoint;return!i||i.length<2?[Nr(t),Nr(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function $r(e,t,n){return new Error(`element ${_n(t)} referenced by ${_n(e)}#${n} not yet drawn`)}function zr(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}zr.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],zr.prototype.add=function(e,t,n){var i,r,o,a,s,c,l;if(kn(t,"bpmndi:BPMNPlane")){var p=kn(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(Lr(e,t,p)),this._canvas.addRootElement(i)}else if(kn(t,"bpmndi:BPMNShape")){var u=!Kn(e,t),d=function(e){return kn(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var h=t.bounds;i=this._elementFactory.createShape(Lr(e,t,{collapsed:u,hidden:r,x:Math.round(h.x),y:Math.round(h.y),width:Math.round(h.width),height:Math.round(h.height),isFrame:d})),kn(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),kn(e,"bpmn:Lane")&&(o=0),kn(e,"bpmn:DataStoreReference")&&(a=n,s=Nr(h),c=s.x,l=s.y,c>=a.x&&c<=a.x+a.width&&l>=a.y&&l<=a.y+a.height||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!kn(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${_n(t)} for element ${_n(e)}`);var m=this._getSource(e),f=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(Lr(e,t,{hidden:r,source:m,target:f,waypoints:Ir(t,m,f)})),kn(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return ni(e)&&si(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},zr.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${_n(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw $r(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},zr.prototype.addLabel=function(e,t,n){var i,r,o;return i=function(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(ei.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=oi(t),i=ei),ee({x:n.x-i.width/2,y:n.y-i.height/2},i)}(t,n),(r=si(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(Lr(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!si(n),x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)})),this._canvas.addShape(o,n.parent)},zr.prototype._getConnectedElement=function(e,t){var n,i,r=e.$type;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?$r(e,i,t+"Ref"):new Error(`${_n(e)}#${t} Ref not specified`)},zr.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},zr.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},zr.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};const Fr={__depends__:[Hi,{__depends__:[Vi],bpmnImporter:["type",zr]}]};function Hr(e){return O(e,(function(t){return!B(e,(function(e){return e!==t&&Vr(t,e)}))}))}function Vr(e,t){if(t){if(e===t)return t;if(e.parent)return Vr(e.parent,t)}}function Gr(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function Wr(e,t,n){n=n||0,A(e)||(e=[e]),j(e,(function(e,i){var r=t(e,i,n);A(r)&&r.length&&Wr(r,t,n+1)}))}function Ur(e,t){return function(e,t,n){var i=[],r=[];return Wr(e,(function(e,n,o){Gr(i,e,t);var a=e.children;if(a&&Gr(r,a,t))return a})),i}(e,!t)}function qr(e,t){var n,i,r,o;return t=!!t,A(e)||(e=[e]),j(e,(function(e){var a=e;e.waypoints&&!t&&(a=qr(e.waypoints,!0));var s=a.x,c=a.y,l=a.height||0,p=a.width||0;(sr||void 0===r)&&(r=s+p),(c+l>o||void 0===o)&&(o=c+l)})),{x:n,y:i,height:o-i,width:r-n}}function Kr(e,t){return ee({},e||{},t||{})}function Xr(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}Xr.prototype.next=function(){return this._prefix+ ++this._counter};var Yr=new Xr("ov");function Zr(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=Yr,this._overlayDefaults=ee({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),pe(o=Re('
    '),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function Qr(e,t,n){pe(e,{left:t+"px",top:n+"px"})}function Jr(e,t){e.style.display=!1===t?"none":""}function eo(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}Zr.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Zr.prototype.get=function(e){if(T(e)&&(e={id:e}),T(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?O(t.overlays,K({type:e.type})):t.overlays.slice():[]}return e.type?O(this._overlays,K({type:e.type})):e.id?this._overlays[e.id]:null},Zr.prototype.add=function(e,t,n){if(P(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return n=ee({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},Zr.prototype.remove=function(e){var t=this.get(e)||[];A(t)||(t=[t]);var n=this;j(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Be(e.html),Be(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},Zr.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},Zr.prototype.show=function(){Jr(this._overlayRoot)},Zr.prototype.hide=function(){Jr(this._overlayRoot,!1)},Zr.prototype.clear=function(){this._overlays={},this._overlayContainers=[],fe(this._overlayRoot)},Zr.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=qr(t);i=o.x,r=o.y}Qr(n,i,r),ue(e.html,"data-container-id",t.id)},Zr.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,a=i.left,s=i.top;void 0!==i.right&&(t=o.waypoints?qr(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?qr(o).height:o.height,s=-1*i.bottom+n);Qr(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Zr.prototype._createOverlayContainer=function(e){var t=Re('
    ');pe(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Zr.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";eo(this._overlayRoot,n)},Zr.prototype._getOverlayContainer=function(e,t){var n=B(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},Zr.prototype._addOverlay=function(e){var t,n,i=e.id,r=e.element,o=e.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),T(o)&&(o=Re(o)),n=this._getOverlayContainer(r),pe(t=Re('
    '),{position:"absolute"}),t.appendChild(o),e.type&&he(t).add("djs-overlay-"+e.type),Jr(t,this._canvas.findRoot(r)===this._canvas.getRootElement()),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Zr.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),r=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=!0;(i!==this._canvas.getRootElement()||n&&(C(r)&&r>t.scale||C(o)&&oi&&(r=(1/t.scale||1)*i)),C(r)&&(s="scale("+r+","+r+")"),eo(a,s)},Zr.prototype._updateOverlaysVisibilty=function(e){var t=this;j(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},Zr.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){var n;n=e.viewbox,t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element;j(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){Be(i.html);var r=t._overlayContainers.indexOf(i);-1!==r&&t._overlayContainers.splice(r,1)}})),e.on("element.changed",500,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(j(i.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(i))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&he(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};const to={__init__:["overlays"],overlays:["type",Zr]};function no(e,t,n,i){e.on("element.changed",(function(i){var r=i.element;(r.parent||r===t.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&e.fire(function(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}(r)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}no.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const io={__init__:["changeSupport"],changeSupport:["type",no]};function ro(e){this._eventBus=e}function oo(e){return function(t,n,i,r,o){(M(t)||R(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function ao(e,t){t.invoke(ro,this),this.executed((function(t){var n=t.context;n.rootElement?e.setRootElement(n.rootElement):n.rootElement=e.getRootElement()})),this.revert((function(t){var n=t.context;n.rootElement&&e.setRootElement(n.rootElement)}))}ro.$inject=["eventBus"],ro.prototype.on=function(e,t,n,i,r,o){if((M(t)||R(t))&&(o=r,r=i,i=n,n=t,t=null),M(n)&&(o=r,r=i,i=n,n=1e3),P(r)&&(o=r,r=!1),!M(i))throw new Error("handlerFn must be a function");A(e)||(e=[e]);var a=this._eventBus;j(e,(function(e){var s=["commandStack",e,t].filter((function(e){return e})).join(".");a.on(s,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)}))},ro.prototype.canExecute=oo("canExecute"),ro.prototype.preExecute=oo("preExecute"),ro.prototype.preExecuted=oo("preExecuted"),ro.prototype.execute=oo("execute"),ro.prototype.executed=oo("executed"),ro.prototype.postExecute=oo("postExecute"),ro.prototype.postExecuted=oo("postExecuted"),ro.prototype.revert=oo("revert"),ro.prototype.reverted=oo("reverted"),x(ao,ro),ao.$inject=["canvas","injector"];const so={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",ao]};function co(e){return CSS.escape(e)}var lo={"&":"&","<":"<",">":">",'"':""","'":"'"};function po(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return lo[e]}))}var uo="_plane";function ho(e){return function(e){return e.replace(new RegExp(uo+"$"),"")}(e.id)}function mo(e){var t=e.id;return kn(e,"bpmn:SubProcess")?yo(t):t}function fo(e){return yo(e)}function go(e){return kn(Rn(e),"bpmndi:BPMNPlane")}function yo(e){return e+uo}function vo(e,t,n){var i=Re('
      '),r=n.getContainer(),o=he(r);r.appendChild(i);var a=[];function s(e){e&&(a=function(e){for(var t=Pn(e),n=[],i=t;i;i=i.$parent)(kn(i,"bpmn:SubProcess")||kn(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=a.flatMap((function(e){var i=n.findRoot(mo(e))||n.findRoot(e.id);if(!i&&kn(e,"bpmn:Process")){var r=t.find((function(t){var n=Pn(t);return n&&n.get("processRef")===e}));i=r&&n.findRoot(r.id)}if(!i)return[];var o=po(e.name||e.id),a=Re('
    • '+o+"
    • ");return a.addEventListener("click",(function(){n.setRootElement(i)})),a}));i.innerHTML="";var s=r.length>1;o.toggle("bjs-breadcrumbs-shown",s),r.forEach((function(e){i.appendChild(e)}))}e.on("element.changed",(function(e){var t=Pn(e.element);B(a,(function(e){return e===t}))&&s()})),e.on("root.set",(function(e){s(e.element)}))}function bo(e,t){var n=null,i=new xo;e.on("root.set",(function(e){var r=e.element,o=t.viewbox(),a=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,kn(r,"bpmn:SubProcess")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,c=(o.y-a.y)*o.scale;0===s&&0===c||t.scroll({dx:s,dy:c}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function xo(){this._entries=[],this.set=function(e,t){var n=!1;for(var i in this._entries)if(this._entries[i][0]===e){this._entries[i][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}-1!==t&&this._entries.splice(t,1)}}vo.$inject=["eventBus","elementRegistry","canvas"],bo.$inject=["eventBus","canvas"];var _o=180,wo=160;function Eo(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,(function(e,t){n._handleImport(t.definitions)}))}function So(e){return kn(e,"bpmndi:BPMNDiagram")?e:So(e.$parent)}Eo.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)})),e.diagrams.filter((e=>e.plane)).flatMap((e=>t._createNewDiagrams(e.plane))).forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},Eo.prototype._createNewDiagrams=function(e){var t=this,n=[],i=[];e.get("planeElement").forEach((function(t){var r=t.bpmnElement;if(r){var o=r.$parent;kn(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!kn(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(An(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(r,e)&&i.push({diElement:t,parent:o})}}));var r=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t._createDiagram(e);t._processToDiagramMap[e.id]=n,r.push(n)}})),i.forEach((function(e){for(var i=e.diElement,r=e.parent;r&&-1===n.indexOf(r);)r=r.$parent;if(r){var o=t._processToDiagramMap[r.id];t._moveToDiPlane(i,o.plane)}})),r},Eo.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=function(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach((function(e){if(e.bounds){var n=Tr(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),Dr(t)}(e),i=n.x-_o,r=n.y-wo;t.forEach((function(e){e.waypoint?e.waypoint.forEach((function(e){e.x=e.x-i,e.y=e.y-r})):e.bounds&&(e.bounds.x=e.bounds.x-i,e.bounds.y=e.bounds.y-r)}))},Eo.prototype._moveToDiPlane=function(e,t){var n=So(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},Eo.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n},Eo.$inject=["eventBus","moddle"];var Co=250;function ko(e,t,n,i,r){ro.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=i,this._translate=r;var o=this;this.executed("shape.toggleCollapse",Co,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",Co,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],Co,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],Co,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return o._canDrillDown(e)})).map((function(e){o._addOverlay(e)}))}))}x(ko,ro),ko.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},ko.prototype._canDrillDown=function(e){var t=this._canvas;return kn(e,"bpmn:SubProcess")&&t.findRoot(mo(e))},ko.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=Pn(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;he(i.html).toggle("bjs-drilldown-empty",!r)}},ko.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,i=Pn(e);n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=Re(''),o=i.get("name")||i.get("id"),a=this._translate("Open {element}",{element:o});r.setAttribute("title",a),r.addEventListener("click",(function(){t.setRootElement(t.findRoot(mo(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},ko.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},ko.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const Ao={__depends__:[to,io,so],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",vo],drilldownCentering:["type",bo],drilldownOverlayBehavior:["type",ko],subprocessCompatibility:["type",Eo]};function Po(e,t){this._eventBus=e,this.offset=5;var n=t.cls("djs-outline",["no-fill"]),i=this;function r(e){var t=qe("rect");return Ie(t,ee({x:0,y:0,rx:4,width:100,height:100},n)),t}e.on(["shape.added","shape.changed"],500,(function(e){var t=e.element,n=e.gfx,o=Te(".djs-outline",n);o||Ne(n,o=i.getOutline(t)||r()),i.updateShapeOutline(o,t)})),e.on(["connection.added","connection.changed"],(function(e){var t=e.element,n=e.gfx,o=Te(".djs-outline",n);o||Ne(n,o=r()),i.updateConnectionOutline(o,t)}))}Po.prototype.updateShapeOutline=function(e,t){var n=!1,i=this._getProviders();i.length&&j(i,(function(i){n=n||i.updateOutline(t,e)})),n||Ie(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},Po.prototype.updateConnectionOutline=function(e,t){var n=qr(t);Ie(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},Po.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("outline.getProviders",e,(function(e){e.providers.push(t)}))},Po.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"outline.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Po.prototype.getOutline=function(e){var t;return j(this._getProviders(),(function(n){M(n.getOutline)&&(t=t||n.getOutline(e))})),t},Po.$inject=["eventBus","styles","elementRegistry"];const Ro={__init__:["outline"],outline:["type",Po]},Mo={width:36,height:50},To={width:50,height:50};function Do(e,t,n){return qe("path",{d:e,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`,...n})}function Bo(e,t){this._styles=t,e.registerProvider(this)}function No(e,t){var n;return"bpmn:DataObjectReference"===t?n=Mo:"bpmn:DataStoreReference"===t&&(n=To),e.width===n.width&&e.height===n.height}Bo.$inject=["outline","styles"],Bo.prototype.getOutline=function(e){const t=this._styles.cls("djs-outline",["no-fill"]);var n;if(!Jn(e))return kn(e,"bpmn:Gateway")?(ee((n=qe("rect")).style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),Ie(n,ee({x:2,y:2,rx:4,width:e.width-4,height:e.height-4},t))):An(e,["bpmn:Task","bpmn:SubProcess","bpmn:Group","bpmn:CallActivity"])?Ie(n=qe("rect"),ee({x:-5,y:-5,rx:14,width:e.width+10,height:e.height+10},t)):kn(e,"bpmn:EndEvent")?Ie(n=qe("circle"),ee({cx:e.width/2,cy:e.height/2,r:e.width/2+5+1},t)):kn(e,"bpmn:Event")?Ie(n=qe("circle"),ee({cx:e.width/2,cy:e.height/2,r:e.width/2+5},t)):kn(e,"bpmn:DataObjectReference")&&No(e,"bpmn:DataObjectReference")?n=Do("M44.7648 11.3263L36.9892 2.64074C36.0451 1.58628 34.5651 0.988708 33.1904 0.988708H5.98667C3.22688 0.988708 0.989624 3.34892 0.989624 6.26039V55.0235C0.989624 57.9349 3.22688 60.2952 5.98667 60.2952H40.966C43.7257 60.2952 45.963 57.9349 45.963 55.0235V14.9459C45.963 13.5998 45.6407 12.3048 44.7648 11.3263Z",{x:-6,y:-6},t):kn(e,"bpmn:DataStoreReference")&&No(e,"bpmn:DataStoreReference")&&(n=Do("M1.03845 48.1347C1.03845 49.3511 1.07295 50.758 1.38342 52.064C1.69949 53.3938 2.32428 54.7154 3.56383 55.6428C6.02533 57.4841 10.1161 58.7685 14.8212 59.6067C19.5772 60.4538 25.1388 60.8738 30.6831 60.8738C36.2276 60.8738 41.7891 60.4538 46.545 59.6067C51.2504 58.7687 55.3412 57.4842 57.8028 55.6429C59.0424 54.7156 59.6673 53.3938 59.9834 52.064C60.2938 50.7579 60.3285 49.351 60.3285 48.1344V13.8415C60.3285 12.6249 60.2938 11.218 59.9834 9.91171C59.6673 8.58194 59.0423 7.2602 57.8027 6.33294C55.341 4.49168 51.2503 3.20723 46.545 2.36914C41.7891 1.522 36.2276 1.10204 30.6831 1.10205C25.1388 1.10206 19.5772 1.52206 14.8213 2.36923C10.1162 3.20734 6.02543 4.49183 3.5639 6.33314C2.32433 7.26038 1.69951 8.58206 1.38343 9.91181C1.07295 11.2179 1.03845 12.6247 1.03845 13.8411V48.1347Z",{x:-6,y:-6},t)),n},Bo.prototype.updateOutline=function(e,t){if(!Jn(e))return An(e,["bpmn:SubProcess","bpmn:Group"])?(Ie(t,{width:e.width+10,height:e.height+10}),!0):!!An(e,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"])};const Oo={__depends__:[Ro],__init__:["outlineProvider"],outlineProvider:["type",Bo]};function jo(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function Lo(e){return e.originalEvent||e.srcEvent}function Io(e){jo(e),jo(Lo(e))}function $o(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function zo(){return/mac/i.test(navigator.platform)}function Fo(e,t){return(Lo(e)||e).button===t}function Ho(e){return Fo(e,0)}function Vo(e){var t=Lo(e)||e;return!!Ho(e)&&(zo()?t.metaKey:t.ctrlKey)}function Go(e){var t=Lo(e)||e;return Ho(e)&&t.shiftKey}function Wo(e){return!0}function Uo(e){return Ho(e)||function(e){return Fo(e,1)}(e)}function qo(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){return!(c[e]||Ho)(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":Wo,"element.mousedown":Uo,"element.mouseup":Uo,"element.click":Uo,"element.dblclick":Uo};var l="svg, .djs-element";function p(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(c[n]=i),a.$delegate=Ce.bind(e,l,t,a)}function u(e,t,n){var i=a(n);i&&Ce.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,j(s,(function(e,n){u(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,j(s,(function(e,n){p(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var d=f("djs-hit djs-hit-stroke"),h=f("djs-hit djs-hit-click-stroke"),m={all:f("djs-hit djs-hit-all"),"click-stroke":h,stroke:d,"no-move":f("djs-hit djs-hit-no-move")};function f(e,t){return t=ee({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function g(e,t){var n=m[t];if(!n)throw new Error("invalid hit type <"+t+">");return Ie(e,n),e}function y(e,t){Ne(e,t)}this.removeHits=function(e){j(De(".djs-hit",e),nt)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=hi(t);return g(n,"stroke"),y(e,n),n},this.createBoxHit=function(e,t,n){n=ee({x:0,y:0},n);var i=qe("rect");return g(i,t),Ie(i,n),y(e,i),i},this.updateDefaultHit=function(e,t){var n=Te(".djs-hit",t);if(n)return e.waypoints?mi(n,e.waypoints):Ie(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=s[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=a,this.registerEvent=p,this.unregisterEvent=u}qo.$inject=["eventBus","elementRegistry","styles"];const Ko={__init__:["interactionEvents"],interactionEvents:["type",qo]};function Xo(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],(function(e){var t=e.element;n.deselect(t)})),e.on(["diagram.clear","root.set"],(function(e){n.select(null)}))}Xo.$inject=["eventBus","canvas"],Xo.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},Xo.prototype.get=function(){return this._selectedElements},Xo.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},Xo.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();A(e)||(e=e?[e]:[]);var r=this._canvas,o=r.getRootElement();e=e.filter((function(e){var t=r.findRoot(e);return o===t})),t?j(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};var Yo="hover",Zo="selected";function Qo(e,t,n){this._canvas=e;var i=this;function r(t,n){e.addMarker(t,n)}function o(t,n){e.removeMarker(t,n)}this._multiSelectionBox=null,t.on("element.hover",(function(e){r(e.element,Yo)})),t.on("element.out",(function(e){o(e.element,Yo)})),t.on("selection.changed",(function(e){var t=e.oldSelection,n=e.newSelection;j(t,(function(e){-1===n.indexOf(e)&&o(e,Zo)})),j(n,(function(e){-1===t.indexOf(e)&&r(e,Zo)})),i._updateSelectionOutline(n)})),t.on("element.changed",(function(e){n.isSelected(e.element)&&i._updateSelectionOutline(n.get())}))}function Jo(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,o=(n.hints||{}).autoSelect;if(i){if(!1===o)return;A(o)?t.select(o):t.select(r.filter(ea))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);B(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(Ho(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=Go(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function ea(e){return!e.hidden}Qo.$inject=["canvas","eventBus","selection"],Qo.prototype._updateSelectionOutline=function(e){var t=this._canvas.getLayer("selectionOutline");He(t);var n=e.length>1;if(ze(this._canvas.getContainer())[n?"add":"remove"]("djs-multi-select"),n){var i=function(e){return{x:e.x-6,y:e.y-6,width:e.width+12,height:e.height+12}}(qr(e)),r=qe("rect");Ie(r,ee({rx:3},i)),ze(r).add("djs-selection-outline"),Ne(t,r)}},Jo.$inject=["eventBus","selection","canvas","elementRegistry"];const ta={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Ko,Ro],selection:["type",Xo],selectionVisuals:["type",Qo],selectionBehavior:["type",Jo]};function na(e){Fn.call(this,e)}x(na,Fn),na.prototype._modules=[Fr,Ao,Oo,to,ta,Vi],na.prototype._moddleExtensions={};var ia=["c","C"],ra=["v","V"],oa=["y","Y"],aa=["z","Z"];function sa(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function ca(e,t){return-1!==(e=A(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function la(e){return e.shiftKey}var pa="keyboard.keydown",ua="input-handle-modified-keys";function da(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),t.on("diagram.init",(function(){n._fire("init")})),t.on("attach",(function(){e&&e.bindTo&&n.bind(e.bindTo)})),t.on("detach",(function(){n.unbind()}))}da.$inject=["config.keyboard","eventBus"],da.prototype._keydownHandler=function(e){this._keyHandler(e,pa)},da.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},da.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||pa,n)&&e.preventDefault()}},da.prototype._isEventIgnored=function(e){return!!e.defaultPrevented||((t=e.target)&&(Me(t,"input, textarea")||"true"===t.contentEditable)||function(e){return e&&Me(e,"button, input[type=submit], input[type=button], a[href], [aria-role=button]")}(e.target)&&ca([" ","Enter"],e))&&this._isModifiedKeyIgnored(e);var t},da.prototype._isModifiedKeyIgnored=function(e){return!sa(e)||-1===this._getAllowedModifiers(e.target).indexOf(e.key)},da.prototype._getAllowedModifiers=function(e){var t=ge(e,"["+ua+"]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(ua).split(",")},da.prototype.bind=function(e){this.unbind(),this._node=e,we.bind(e,"keydown",this._keydownHandler),we.bind(e,"keyup",this._keyupHandler),this._fire("bind")},da.prototype.getBinding=function(){return this._node},da.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),we.unbind(e,"keydown",this._keydownHandler),we.unbind(e,"keyup",this._keyupHandler)),this._node=null},da.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},da.prototype.addListener=function(e,t,n){M(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||pa,e,t)},da.prototype.removeListener=function(e,t){this._eventBus.off(t||pa,e)},da.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},da.prototype.isCmd=sa,da.prototype.isShift=la,da.prototype.isKey=ca;var ha=500;function ma(e,t){var n=this;e.on("editorActions.init",ha,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}ma.$inject=["eventBus","keyboard"],ma.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){if(function(e){return sa(e)&&!la(e)&&ca(aa,e)}(e.keyEvent))return t.trigger("undo"),!0})),n("redo",(function(e){if(function(e){return sa(e)&&(ca(oa,e)||ca(aa,e)&&la(e))}(e.keyEvent))return t.trigger("redo"),!0})),n("copy",(function(e){if(function(e){return sa(e)&&ca(ia,e)}(e.keyEvent))return t.trigger("copy"),!0})),n("paste",(function(e){if(function(e){return sa(e)&&ca(ra,e)}(e.keyEvent))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(ca(["+","Add","="],n)&&sa(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(ca(["-","Subtract"],n)&&sa(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(ca("0",n)&&sa(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(ca(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};const fa={__init__:["keyboard","keyboardBindings"],keyboard:["type",da],keyboardBindings:["type",ma]};var ga={moveSpeed:50,moveSpeedAccelerated:200};function ya(e,t,n){var i=this;this._config=ee({},ga,e||{}),t.addListener((function(e){var n=e.keyEvent,r=i._config;if(!t.isCmd(n))return;if(t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],n)){var o,a=t.isShift(n)?r.moveSpeedAccelerated:r.moveSpeed;switch(n.key){case"ArrowLeft":case"Left":o="left";break;case"ArrowUp":case"Up":o="up";break;case"ArrowRight":case"Right":o="right";break;case"ArrowDown":case"Down":o="down"}return i.moveCanvas({speed:a,direction:o}),!0}})),this.moveCanvas=function(e){var t=0,i=0,r=e.speed/Math.min(Math.sqrt(n.viewbox().scale),1);switch(e.direction){case"left":t=r;break;case"up":i=r;break;case"right":t=-r;break;case"down":i=-r}n.scroll({dx:t,dy:i})}}ya.$inject=["config.keyboardMove","keyboard","canvas"];const va={__depends__:[fa],__init__:["keyboardMove"],keyboardMove:["type",ya]};var ba=/^djs-cursor-.*$/;function xa(e){var t=he(document.body);t.removeMatching(ba),e&&t.add("djs-cursor-"+e)}function _a(){xa(null)}var wa=5e3;function Ea(e,t){function n(){return!1}return t=t||"element.click",e.once(t,wa,n),function(){e.off(t,n)}}function Sa(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Ca(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ka(e,t){var n;function i(i){var r,o=n.start,a=n.button,s=$o(i),c=Ca(s,o);(!n.dragging&&(r=c,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,0===a&&Ea(e),xa("grab")),n.dragging)&&(c=Ca(s,n.last||n.start),t.scroll({dx:c.x,dy:c.y}),n.last=s);i.preventDefault()}function r(e){we.unbind(document,"mousemove",i),we.unbind(document,"mouseup",r),n=null,_a()}e.on("element.mousedown",500,(function(e){return function(e){if(ge(e.target,".djs-draggable"))return;var t=e.button;if(t>=2||e.ctrlKey||e.shiftKey||e.altKey)return;return n={button:t,start:$o(e)},we.bind(document,"mousemove",i),we.bind(document,"mouseup",r),!0}(e.originalEvent)})),this.isActive=function(){return!!n}}ka.$inject=["eventBus","canvas"];const Aa={__init__:["moveCanvas"],moveCanvas:["type",ka]};function Pa(e){return Math.log(e)/Math.log(10)}function Ra(e,t){var n=Pa(e.min),i=Pa(e.max);return(Math.abs(n)+Math.abs(i))/t}var Ma=Math.sign||function(e){return e>=0?1:-1},Ta={min:.2,max:4};function Da(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=J(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var i=this;t.on("canvas.init",(function(t){i._init(!1!==e.enabled)}))}Da.$inject=["config.zoomScroll","eventBus","canvas"],Da.prototype.scroll=function(e){this._canvas.scroll(e)},Da.prototype.reset=function(){this._canvas.zoom("fit-viewport")},Da.prototype.zoom=function(e,t){var n=Ra(Ta,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},Da.prototype._handleWheel=function(e){if(!ge(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey||zo()&&e.metaKey,r=e.shiftKey,o=-1*this._scale;if(o*=i?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,i){var a=t.getBoundingClientRect(),s={x:e.clientX-a.left,y:e.clientY-a.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*Ma(e.deltaY)*o,this.zoom(n,s)}else n=r?{dx:o*e.deltaY,dy:0}:{dx:o*e.deltaX,dy:o*e.deltaY},this.scroll(n)}},Da.prototype.stepZoom=function(e,t){var n=Ra(Ta,10);this._zoom(e,t,n)},Da.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=Pa(i.zoom()),a=Math.round(o/n)*n;a+=n*r;var s,c,l=Math.pow(10,a);i.zoom((s=Ta,c=l,Math.max(s.min,Math.min(s.max,c))),t)},Da.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&we[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},Da.prototype._init=function(e){this.toggle(e)};const Ba={__init__:["zoomScroll"],zoomScroll:["type",Da]};function Na(e){na.call(this,e)}function Oa(e){return e&&e[e.length-1]}function ja(e){return e.y}function La(e){return e.x}x(Na,na),Na.prototype._navigationModules=[va,Aa,Ba],Na.prototype._modules=[].concat(na.prototype._modules,Na.prototype._navigationModules);var Ia={left:La,center:La,right:function(e){return e.x+e.width},top:ja,middle:ja,bottom:function(e){return e.y+e.height}};function $a(e,t){this._modeling=e,this._rules=t}$a.$inject=["modeling","rules"],$a.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},$a.prototype._isType=function(e,t){return-1!==t.indexOf(e)},$a.prototype._alignmentPosition=function(e,t){var n,i,r,o,a,s=this._getOrientationDetails(e),c=s.axis,l=s.dimension,p={},u={},d=!1;if(this._isType(e,["left","top"]))p[e]=t[0][c];else if(this._isType(e,["right","bottom"]))r=Oa(t),p[e]=r[c]+r[l];else if(this._isType(e,["center","middle"])){if(j(t,(function(e){var t=e[c]+Math.round(e[l]/2);u[t]?u[t].elements.push(e):u[t]={elements:[e],center:t}})),n=q(u,(function(e){return e.elements.length>1&&(d=!0),e.elements.length})),d)return p[e]=Oa(n).center,p;i=t[0],r=Oa(t=q(t,(function(e){return e[c]+e[l]}))),p[e]=(o=i,a=r,Math.round((o[c]+a[c]+a[l])/2))}return p},$a.prototype.trigger=function(e,t){var n,i=this._modeling,r=O(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(A(n=this._rules.allowed("elements.align",{elements:r}))&&(r=n),!(r.length<2)&&n){var o=q(r,Ia[t]),a=this._alignmentPosition(t,o);i.alignElements(o,a)}};const za={__init__:["alignElements"],alignElements:["type",$a]},Fa=new Xr;function Ha(e){this._scheduled={},e.on("diagram.destroy",(()=>{Object.keys(this._scheduled).forEach((e=>{this.cancel(e)}))}))}Ha.$inject=["eventBus"],Ha.prototype.schedule=function(e,t=Fa.next()){this.cancel(t);const n=this._schedule(e,t);return this._scheduled[t]=n,n.promise},Ha.prototype._schedule=function(e,t){const{promise:n,resolve:i,reject:r}=function(){let e,t;const n=new Promise(((n,i)=>{e=n,t=i}));return{promise:n,resolve:e,reject:t}}();return{executionId:requestAnimationFrame((()=>{try{i(e())}catch(t){r(t)}})),promise:n}},Ha.prototype.cancel=function(e){const t=this._scheduled[e];t&&(this._cancel(t),this._scheduled[e]=null)},Ha.prototype._cancel=function(e){cancelAnimationFrame(e.executionId)};const Va={scheduler:["type",Ha]};var Ga=".entry";function Wa(e,t,n,i){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._scheduler=i,this._current=null,this._init()}Wa.$inject=["canvas","elementRegistry","eventBus","scheduler"],Wa.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",(function(t){var n=t.newSelection,i=n.length?1===n.length?n[0]:n:null;i?e.open(i,!0):e.close()})),this._eventBus.on("elements.changed",(function(t){var n=t.elements,i=e._current;if(i){var r=i.target,o=A(r)?r:[r];if(o.filter((function(e){return n.includes(e)})).length){e.close();var a=o.filter((function(t){return e._elementRegistry.get(t.id)}));a.length&&e._updateAndOpen(a.length>1?a:a[0])}}})),this._eventBus.on("canvas.viewbox.changed",(function(){e._updatePosition()})),this._eventBus.on("element.marker.update",(function(t){if(e.isOpen()){var n=t.element,i=e._current;(A(i.target)?i.target:[i.target]).includes(n)&&e._updateVisibility()}})),this._container=this._createContainer()},Wa.prototype._createContainer=function(){var e=Re('
      ');return this._canvas.getContainer().appendChild(e),e},Wa.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},Wa.prototype.getEntries=function(e){var t=this._getProviders(),n=A(e)?"getMultiElementContextPadEntries":"getContextPadEntries",i={};return j(t,(function(t){if(M(t[n])){var r=t[n](e);M(r)?i=r(i):j(r,(function(e,t){i[t]=e}))}})),i},Wa.prototype.trigger=function(e,t,n){var i,r,o=this,a=t.delegateTarget||t.target;return a?(i=ue(a,"data-action"),r=t.originalEvent||t,"mouseover"!==e?"mouseout"===e?(clearTimeout(this._timeout),void(this._mouseout&&(this._mouseout(),this._mouseout=null))):this.triggerEntry(i,e,r,n):void(this._timeout=setTimeout((function(){o._mouseout=o.triggerEntry(i,"hover",r,n)}),300))):t.preventDefault()},Wa.prototype.triggerEntry=function(e,t,n,i){if(this.isShown()){var r=this._current.target,o=this._current.entries[e];if(o){var a=o.action;if(!1!==this._eventBus.fire("contextPad.trigger",{entry:o,event:n})){if(M(a)){if("click"===t)return a(n,r,i)}else if(a[t])return a[t](n,r,i);n.preventDefault()}}}},Wa.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},Wa.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Wa.prototype._updateAndOpen=function(e){var t,n=this.getEntries(e),i=this._createHtml(e);j(n,(function(e,n){var r,o,a,s,c=e.group||"default",l=Re(e.html||'
      ');ue(l,"data-action",n),(r=Te("[data-group="+co(c)+"]",i))||(ue(r=Re('
      '),"data-group",c),i.appendChild(r)),r.appendChild(l),e.className&&(o=l,a=e.className,s=he(o),(a=A(a)?a:a.split(/\s+/g)).forEach((function(e){s.add(e)}))),e.title&&ue(l,"title",e.title),e.imageUrl&&(ue(t=Re(""),"src",e.imageUrl),t.style.width="100%",t.style.height="100%",l.appendChild(t))})),he(i).add("open"),this._current={entries:n,html:i,target:e},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current})},Wa.prototype._createHtml=function(e){var t=this,n=Re('
      ');return Ce.bind(n,Ga,"click",(function(e){t.trigger("click",e)})),Ce.bind(n,Ga,"dragstart",(function(e){t.trigger("dragstart",e)})),Ce.bind(n,Ga,"mouseover",(function(e){t.trigger("mouseover",e)})),Ce.bind(n,Ga,"mouseout",(function(e){t.trigger("mouseout",e)})),we.bind(n,"mousedown",(function(e){e.stopPropagation()})),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n},Wa.prototype.getPad=function(e){let t;return t=this.isOpen()&&function(e,t){return e=A(e)?e:[e],t=A(t)?t:[t],e.length===t.length&&$(e,(function(e){return t.includes(e)}))}(this._current.target,e)?this._current.html:this._createHtml(e),{html:t}},Wa.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},Wa.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return A(e)===A(n)&&(A(e)?e.length===n.length&&$(e,(function(e){return n.includes(e)})):n===e)},Wa.prototype.isShown=function(){return this.isOpen()&&he(this._current.html).has("open")},Wa.prototype.show=function(){this.isOpen()&&(he(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}))},Wa.prototype.hide=function(){this.isOpen()&&(he(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))},Wa.prototype._getPosition=function(e){if(!A(e)&&Qn(e)){var t=this._canvas.viewbox(),n=(o=e).waypoints[o.waypoints.length-1],i=n.x*t.scale-t.x*t.scale,r=n.y*t.scale-t.y*t.scale;return{left:i+8*this._canvas.zoom(),top:r}}var o,a=this._canvas.getContainer().getBoundingClientRect(),s=this._getTargetBounds(e);return{left:s.right-a.left+8*this._canvas.zoom(),top:s.top-a.top}},Wa.prototype._updatePosition=function(){if(this.isOpen()){var e=this._current.html,t=this._getPosition(this._current.target);"x"in t&&"y"in t?(e.style.left=t.x+"px",e.style.top=t.y+"px"):["top","right","bottom","left"].forEach((function(n){n in t&&(e.style[n]=t[n]+"px")}))}},Wa.prototype._updateVisibility=function(){this._scheduler.schedule((()=>{if(this.isOpen()){var e=this,t=this._current.target;(A(t)?t:[t]).some((function(t){return e._canvas.hasMarker(t,"djs-element-hidden")}))?e.hide():e.show()}}),"ContextPad#_updateVisibility")},Wa.prototype._getTargetBounds=function(e){var t=this;return(A(e)?e:[e]).map((function(e){return t._canvas.getGraphics(e)})).reduce((function(e,t){const n=t.getBoundingClientRect();return e.top=Math.min(e.top,n.top),e.right=Math.max(e.right,n.right),e.bottom=Math.max(e.bottom,n.bottom),e.left=Math.min(e.left,n.left),e.x=e.left,e.y=e.top,e.width=e.right-e.left,e.height=e.bottom-e.top,e}),{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};const Ua={__depends__:[Ko,Va,to],contextPad:["type",Wa]};var qa,Ka,Xa,Ya,Za,Qa,Ja,es,ts,ns,is={},rs=[],os=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,as=Array.isArray;function ss(e,t){for(var n in t)e[n]=t[n];return e}function cs(e){var t=e.parentNode;t&&t.removeChild(e)}function ls(e,t,n){var i,r,o,a={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?qa.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return ps(e,a,i,r,null)}function ps(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++Xa:r,__i:-1,__u:0};return null==r&&null!=Ka.vnode&&Ka.vnode(o),o}function us(e){return e.children}function ds(e,t){this.props=e,this.context=t}function hs(e,t){if(null==t)return e.__?hs(e.__,e.__i+1):null;for(var n;tt&&Ya.sort(Ja));gs.__r=0}function ys(e,t,n,i,r,o,a,s,c,l,p){var u,d,h,m,f,g=i&&i.__k||rs,y=t.length;for(n.__d=c,function(e,t,n){var i,r,o,a,s,c=t.length,l=n.length,p=l,u=0;for(e.__k=[],i=0;i0?ps(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,s=bs(r,n,a,p),r.__i=s,o=null,-1!==s&&(p--,(o=n[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&u--,"function"!=typeof r.type&&(r.__u|=65536)):s!==a&&(s==a-1?u=s-a:s==a+1?u++:s>a?p>c-a?u+=s-a:u--:s(null==c||131072&c.__u?0:1))for(;a>=0||s=0){if((c=t[a])&&!(131072&c.__u)&&r==c.key&&o===c.type)return a;a--}if(s=5&&((r||!e&&5===i)&&(a.push(i,0,r,n),i=6),e&&(a.push(i,e,0,n),i=6)),r=""},c=0;c"===t?(i=1,r=""):r=t+r[0]:o?t===o?o="":r+=t:'"'===t||"'"===t?o=t:">"===t?(s(),i=1):i&&("="===t?(i=5,n=r,r=""):"/"===t&&(i<5||">"===e[c][l+1])?(s(),3===i&&(a=a[0]),i=a,(a=a[0]).push(2,0,i),i=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),i=2):r+=t),3===i&&"!--"===r&&(i=4,a=a[0])}return s(),a}(e)),t),arguments,[])).length>1?t:t[0]}.bind(ls),js=0,Ls=[],Is=Ka,$s=Is.__b,zs=Is.__r,Fs=Is.diffed,Hs=Is.__c,Vs=Is.unmount,Gs=Is.__;function Ws(e,t){Is.__h&&Is.__h(Ds,e,js||t),js=0;var n=Ds.__H||(Ds.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Us(e){return js=1,function(e,t,n){var i=Ws(Ts++,2);if(i.t=e,!i.__c&&(i.__=[rc(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=Ds,!Ds.u)){var r=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var a=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&i.__c.props===e)&&(!o||o.call(this,e,t,n))};Ds.u=!0;var o=Ds.shouldComponentUpdate,a=Ds.componentWillUpdate;Ds.componentWillUpdate=function(e,t,n){if(this.__e){var i=o;o=void 0,r(e,t,n),o=i}a&&a.call(this,e,t,n)},Ds.shouldComponentUpdate=r}return i.__N||i.__}(rc,e)}function qs(e,t){var n=Ws(Ts++,3);!Is.__s&&ic(n.__H,t)&&(n.__=e,n.i=t,Ds.__H.__h.push(n))}function Ks(e,t){var n=Ws(Ts++,4);!Is.__s&&ic(n.__H,t)&&(n.__=e,n.i=t,Ds.__h.push(n))}function Xs(e){return js=5,Ys((function(){return{current:e}}),[])}function Ys(e,t){var n=Ws(Ts++,7);return ic(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Zs(e,t){return js=8,Ys((function(){return e}),t)}function Qs(){for(var e;e=Ls.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(tc),e.__H.__h.forEach(nc),e.__H.__h=[]}catch(t){e.__H.__h=[],Is.__e(t,e.__v)}}Is.__b=function(e){Ds=null,$s&&$s(e)},Is.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Gs&&Gs(e,t)},Is.__r=function(e){zs&&zs(e),Ts=0;var t=(Ds=e.__c).__H;t&&(Bs===Ds?(t.__h=[],Ds.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(tc),t.__h.forEach(nc),t.__h=[],Ts=0)),Bs=Ds},Is.diffed=function(e){Fs&&Fs(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Ls.push(t)&&Ns===Is.requestAnimationFrame||((Ns=Is.requestAnimationFrame)||ec)(Qs)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),Bs=Ds=null},Is.__c=function(e,t){t.some((function(e){try{e.__h.forEach(tc),e.__h=e.__h.filter((function(e){return!e.__||nc(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Is.__e(n,e.__v)}})),Hs&&Hs(e,t)},Is.unmount=function(e){Vs&&Vs(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{tc(e)}catch(n){t=n}})),n.__H=void 0,t&&Is.__e(t,n.__v))};var Js="function"==typeof requestAnimationFrame;function ec(e){var t,n=function(){clearTimeout(i),Js&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);Js&&(t=requestAnimationFrame(n))}function tc(e){var t=Ds,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ds=t}function nc(e){var t=Ds;e.__c=e.__(),Ds=t}function ic(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function rc(e,t){return"function"==typeof t?t(e):t}function oc(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;tt.reduce(((e,t)=>{const n=t.group||"default",i=e.find((e=>e.id===n));return i?i.entries.push(t):e.push({id:n,entries:[t]}),e}),[])),[t]);return Os`

      ${o}

      - ${a.map((e=>Bs` + ${a.map((e=>Os`
        - ${e.entries.map((e=>Bs` + ${e.entries.map((e=>Os`
      • <${e.action?"button":"span"} - class=${function(e,t){return oc("entry",e.className,e.active?"active":"",e.disabled?"disabled":"",t?"selected":"")}(e,e===i)} + class=${function(e,t){return ac("entry",e.className,e.active?"active":"",e.disabled?"disabled":"",t?"selected":"")}(e,e===i)} onClick=${t=>e.action&&n(t,e)} title=${e.title||e.label} data-id=${e.id} @@ -16,8 +16,8 @@ onFocus=${()=>e.action&&r(e)} onBlur=${()=>e.action&&r(null)} > - ${e.imageUrl&&Bs``||e.imageHtml&&Bs`
        `} - ${e.label?Bs` + ${e.imageUrl&&Os``||e.imageHtml&&Os`
        `} + ${e.label?Os` ${e.label} `:null} @@ -26,9 +26,9 @@
      `))}
      - `}function sc(e){const{entry:t,selected:n,onMouseEnter:i,onMouseLeave:r,onAction:o}=e;return Bs` + `}function cc(e){const{entry:t,selected:n,onMouseEnter:i,onMouseLeave:r,onAction:o}=e;return Os`
    • o(e,t,"dragstart")} - aria-role="button" draggable=${!0} >
      - ${t.imageUrl&&Bs``||t.imageHtml&&Bs`
      `} + ${t.imageUrl&&Os``||t.imageHtml&&Os`
      `} - ${t.label?Bs` + ${t.label?Os` ${t.label} `:null} - ${t.description&&Bs` + ${t.description&&Os` `}
      - ${t.documentationRef&&Bs` + ${t.documentationRef&&Os`
      `}
    • - `}function cc(e){const{selectedEntry:t,setSelectedEntry:n,entries:i,...r}=e,o=Ks(),a=Xs((()=>function(e){const t=[],n=e=>t.find((t=>e.id===t.id)),i=e=>!!n(e),r=e=>"string"==typeof e?{id:e}:e;return e.forEach((e=>{const o=e.group?r(e.group):{id:"default"};i(o)?n(o).entries.push(e):t.push({...o,entries:[e]})})),t}(i)),[i]);return qs((()=>{const e=o.current;if(!e)return;const t=e.querySelector(".selected");var n;t&&("function"==typeof(n=t).scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded():n.scrollIntoView({scrollMode:"if-needed",block:"nearest"}))}),[t]),Bs` + `}function lc(e){const{selectedEntry:t,setSelectedEntry:n,entries:i,...r}=e,o=Xs(),a=Ys((()=>function(e){const t=[],n=e=>t.find((t=>e.id===t.id)),i=e=>!!n(e),r=e=>"string"==typeof e?{id:e}:e;return e.forEach((e=>{const o=e.group?r(e.group):{id:"default"};i(o)?n(o).entries.push(e):t.push({...o,entries:[e]})})),t}(i)),[i]);return Ks((()=>{const e=o.current;if(!e)return;const t=e.querySelector(".selected");var n;t&&("function"==typeof(n=t).scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded():n.scrollIntoView({scrollMode:"if-needed",block:"nearest"}))}),[t]),Os`
      - ${a.map((e=>Bs` - ${e.name&&Bs` + ${a.map((e=>Os` + ${e.name&&Os`
      ${e.name}
      `}
        - ${e.entries.map((e=>Bs` - <${sc} + ${e.entries.map((e=>Os` + <${cc} key=${e.id} entry=${e} selected=${e===t} @@ -100,8 +99,8 @@
      `))}
      - `}function lc(e){const{onClose:t,onSelect:n,className:i,headerEntries:r,position:o,title:a,width:s,scale:c,search:l,emptyPlaceholder:p,entries:u,onOpened:d,onClosed:h}=e,m=Xs((()=>!!C(l)&&u.length>5),[l,u]),[f,g]=Ws(""),y=Ys(((e,t)=>{if(!m)return e;return e.filter((e=>{if(!t)return(e.rank||0)>=0;if(!1===e.searchable)return!1;const n=[e.description||"",e.label||"",e.search||""].map((e=>e.toLowerCase()));return t.toLowerCase().split(/\s/g).every((e=>n.some((t=>t.includes(e)))))}))}),[m]),[v,b]=Ws(y(u,f)),[x,_]=Ws(v[0]),w=Ys((e=>{x&&e.includes(x)||_(e[0]),b(e)}),[x,b,_]);Us((()=>{w(y(u,f))}),[f,u]);const E=Ys((e=>{let t=v.indexOf(x)+e;t<0&&(t=v.length-1),t>=v.length&&(t=0),_(v[t])}),[v,x,_]),S=Ys((e=>"Enter"===e.key&&x?n(e,x):"ArrowUp"===e.key?(E(-1),e.preventDefault()):"ArrowDown"===e.key?(E(1),e.preventDefault()):void 0),[n,x,E]),k=Ys((e=>{Me(e.target,"input")&&g((()=>e.target.value))}),[g]);Us((()=>(d(),()=>{h()})),[]);const A=Xs((()=>a||r.length>0),[a,r]);return Bs` - <${pc} + `}function pc(e){const{onClose:t,onSelect:n,className:i,headerEntries:r,position:o,title:a,width:s,scale:c,search:l,emptyPlaceholder:p,entries:u,onOpened:d,onClosed:h}=e,m=Ys((()=>!!C(l)&&u.length>5),[l,u]),[f,g]=Us(""),y=Zs(((e,t)=>{if(!m)return e;return e.filter((e=>{if(!t)return(e.rank||0)>=0;if(!1===e.searchable)return!1;const n=[e.description||"",e.label||"",e.search||""].map((e=>e.toLowerCase()));return t.toLowerCase().split(/\s/g).every((e=>n.some((t=>t.includes(e)))))}))}),[m]),[v,b]=Us(y(u,f)),[x,_]=Us(v[0]),w=Zs((e=>{x&&e.includes(x)||_(e[0]),b(e)}),[x,b,_]);qs((()=>{w(y(u,f))}),[f,u]);const E=Zs((e=>{let t=v.indexOf(x)+e;t<0&&(t=v.length-1),t>=v.length&&(t=0),_(v[t])}),[v,x,_]),S=Zs((e=>"Enter"===e.key&&x?n(e,x):"ArrowUp"===e.key?(E(-1),e.preventDefault()):"ArrowDown"===e.key?(E(1),e.preventDefault()):void 0),[n,x,E]),k=Zs((e=>{Me(e.target,"input")&&g((()=>e.target.value))}),[g]);qs((()=>(d(),()=>{h()})),[]);const A=Ys((()=>a||r.length>0),[a,r]);return Os` + <${uc} onClose=${t} onKeyup=${k} onKeydown=${S} @@ -110,8 +109,8 @@ width=${s} scale=${c} > - ${A&&Bs` - <${ac} + ${A&&Os` + <${sc} headerEntries=${r} onSelect=${n} selectedEntry=${x} @@ -119,10 +118,10 @@ title=${a} /> `} - ${u.length>0&&Bs` + ${u.length>0&&Os`
      - ${m&&Bs` + ${m&&Os` `} - <${cc} + <${lc} entries=${v} selectedEntry=${x} setSelectedEntry=${_} @@ -139,13 +138,13 @@ />
      `} - ${p&&0===v.length&&Bs` + ${p&&0===v.length&&Os`
      ${M(p)?p(f):p}
      `} - - `}function pc(e){const{onClose:t,onKeydown:n,onKeyup:i,className:r,children:o,position:a}=e,s=Ks();return qs((()=>{if("function"!=typeof a)return;const e=s.current,t=a(e);e.style.left=`${t.x}px`,e.style.top=`${t.y}px`}),[s.current,a]),qs((()=>{const e=s.current;if(!e)return;(e.querySelector("input")||e).focus()}),[]),Us((()=>{const e=e=>{if("Escape"===e.key)return e.preventDefault(),t()},n=e=>{if(!ge(e.target,".djs-popup",!0))return t()};return document.documentElement.addEventListener("keydown",e),document.body.addEventListener("click",n),()=>{document.documentElement.removeEventListener("keydown",e),document.body.removeEventListener("click",n)}}),[]),Bs` + + `}function uc(e){const{onClose:t,onKeydown:n,onKeyup:i,className:r,children:o,position:a}=e,s=Xs();return Ks((()=>{if("function"!=typeof a)return;const e=s.current,t=a(e);e.style.left=`${t.x}px`,e.style.top=`${t.y}px`}),[s.current,a]),Ks((()=>{const e=s.current;if(!e)return;(e.querySelector("input")||e).focus()}),[]),qs((()=>{const e=e=>{if("Escape"===e.key)return e.preventDefault(),t()},n=e=>{if(!ge(e.target,".djs-popup",!0))return t()};return document.documentElement.addEventListener("keydown",e),document.body.addEventListener("click",n),()=>{document.documentElement.removeEventListener("keydown",e),document.body.removeEventListener("click",n)}}),[]),Os`
      ${o}
      - `}var uc=["contextPad.close","canvas.viewbox.changing","commandStack.changed"];function dc(e,t,n){this._eventBus=t,this._canvas=n,this._current=null;var i=C(e&&e.scale)?e.scale:{min:1,max:1};this._config={scale:i},t.on("diagram.destroy",(()=>{this.close()})),t.on("element.changed",(e=>{const t=this.isOpen()&&this._current.target;e.element===t&&this.refresh()}))}dc.$inject=["config.popupMenu","eventBus","canvas"],dc.prototype._render=function(){const{position:e,providerId:t,entries:n,headerEntries:i,emptyPlaceholder:r,options:o}=this._current,a=Object.entries(n).map((([e,t])=>({id:e,...t}))),s=Object.entries(i).map((([e,t])=>({id:e,...t}))),c=e&&(t=>this._ensureVisible(t,e)),l=this._updateScale(this._current.container);ks(Bs` - <${lc} + `}var dc=["contextPad.close","canvas.viewbox.changing","commandStack.changed"];function hc(e,t,n){this._eventBus=t,this._canvas=n,this._current=null;var i=C(e&&e.scale)?e.scale:{min:1,max:1};this._config={scale:i},t.on("diagram.destroy",(()=>{this.close()})),t.on("element.changed",(e=>{const t=this.isOpen()&&this._current.target;e.element===t&&this.refresh()}))}hc.$inject=["config.popupMenu","eventBus","canvas"],hc.prototype._render=function(){const{position:e,providerId:t,entries:n,headerEntries:i,emptyPlaceholder:r,options:o}=this._current,a=Object.entries(n).map((([e,t])=>({id:e,...t}))),s=Object.entries(i).map((([e,t])=>({id:e,...t}))),c=e&&(t=>this._ensureVisible(t,e)),l=this._updateScale(this._current.container);Ps(Os` + <${pc} onClose=${e=>this.close(e)} onSelect=${(e,t,n)=>this.trigger(e,t,n)} position=${c} @@ -168,4 +167,4 @@ onClosed=${this._onClosed.bind(this)} ...${{...o}} /> - `,this._current.container)},dc.prototype.open=function(e,t,n,i){if(!e)throw new Error("target is missing");if(!t)throw new Error("providers for <"+t+"> not found");if(!n)throw new Error("position is missing");this.isOpen()&&this.close();const{entries:r,headerEntries:o,emptyPlaceholder:a}=this._getContext(e,t);this._current={position:n,providerId:t,target:e,entries:r,headerEntries:o,emptyPlaceholder:a,container:this._createContainer({provider:t}),options:i},this._emit("open"),this._bindAutoClose(),this._render()},dc.prototype.refresh=function(){if(!this.isOpen())return;const{target:e,providerId:t}=this._current,{entries:n,headerEntries:i,emptyPlaceholder:r}=this._getContext(e,t);this._current={...this._current,entries:n,headerEntries:i,emptyPlaceholder:r},this._emit("refresh"),this._render()},dc.prototype._getContext=function(e,t){const n=this._getProviders(t);if(!n||!n.length)throw new Error("provider for <"+t+"> not found");const i=this._getEntries(e,n),r=this._getHeaderEntries(e,n);return{entries:i,headerEntries:r,emptyPlaceholder:this._getEmptyPlaceholder(n),empty:!(Object.keys(i).length||Object.keys(r).length)}},dc.prototype.close=function(){this.isOpen()&&(this._emit("close"),this.reset(),this._current=null)},dc.prototype.reset=function(){const e=this._current.container;ks(null,e),Be(e)},dc.prototype._emit=function(e,t){this._eventBus.fire(`popupMenu.${e}`,t)},dc.prototype._onOpened=function(){this._emit("opened")},dc.prototype._onClosed=function(){this._emit("closed")},dc.prototype._createContainer=function(e){var t=this._canvas.getContainer();const n=Re(`
      `);return t.appendChild(n),n},dc.prototype._bindAutoClose=function(){this._eventBus.once(uc,this.close,this)},dc.prototype._unbindAutoClose=function(){this._eventBus.off(uc,this.close,this)},dc.prototype._updateScale=function(){var e,t,n=this._canvas.zoom(),i=this._config.scale,r=n;return!0!==i&&(!1===i?(e=1,t=1):(e=i.min,t=i.max),C(e)&&nt&&(r=t)),r},dc.prototype._ensureVisible=function(e,t){var n=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect(),r={},o=t.x,a=t.y;return t.x+i.width>n.width&&(r.x=!0),t.y+i.height>n.height&&(r.y=!0),r.x&&r.y?(o=t.x-i.width,a=t.y-i.height):r.x?(o=t.x-i.width,a=t.y):r.y&&t.yM(e.getEmptyPlaceholder)));return t&&t.getEmptyPlaceholder()},dc.prototype.isOpen=function(){return!!this._current},dc.prototype.trigger=function(e,t,n="click"){if(e.preventDefault(),!t){let n=ue(ge(e.delegateTarget||e.target,".entry",!0),"data-id");t={id:n,...this._getEntry(n)}}const i=t.action;if(!1!==this._emit("trigger",{entry:t,event:e}))if(M(i)){if("click"===n)return i(e,t)}else if(i[n])return i[n](e,t)},dc.prototype._getEntry=function(e){var t=this._current.entries[e]||this._current.headerEntries[e];if(!t)throw new Error("entry not found");return t};const hc={__init__:["popupMenu"],popupMenu:["type",dc]};var mc={align:'\n \n \n \n ',bottom:'\n \n \n \n ',center:'\n \n \n \n ',left:'\n \n \n \n ',right:'\n \n \n \n ',top:'\n \n \n \n ',middle:'\n \n \n \n '};function fc(e,t,n,i){e.registerProvider(900,this),this._contextPad=e,this._popupMenu=t,this._translate=n,this._canvas=i}fc.$inject=["contextPad","popupMenu","translate","canvas"],fc.prototype.getMultiElementContextPadEntries=function(e){var t={};return this._isAllowed(e)&&ee(t,this._getEntries(e)),t},fc.prototype._isAllowed=function(e){return!this._popupMenu.isEmpty(e,"align-elements")},fc.prototype._getEntries=function(){var e=this;return{"align-elements":{group:"align-elements",title:e._translate("Align elements"),html:`
      ${mc.align}
      `,action:{click:function(t,n){var i=e._getMenuPosition(n);ee(i,{cursor:{x:t.x,y:t.y}}),e._popupMenu.open(n,"align-elements",i)}}}}},fc.prototype._getMenuPosition=function(e){var t=this._contextPad.getPad(e).html.getBoundingClientRect();return{x:t.left,y:t.bottom+5}};var gc=["left","center","right","top","middle","bottom"];function yc(e,t,n,i){this._alignElements=t,this._translate=n,this._popupMenu=e,this._rules=i,e.registerProvider("align-elements",this)}function vc(e){ro.call(this,e),this.init()}function bc(e){vc.call(this,e)}yc.$inject=["popupMenu","alignElements","translate","rules"],yc.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&ee(t,this._getEntries(e)),t},yc.prototype._isAllowed=function(e){return this._rules.allowed("elements.align",{elements:e})},yc.prototype._getEntries=function(e){var t=this._alignElements,n=this._translate,i=this._popupMenu,r={};return j(gc,(function(o){r["align-elements-"+o]={group:"align",title:n("Align elements "+o),className:"bjs-align-elements-menu-entry",imageHtml:mc[o],action:function(){t.trigger(e,o),i.close()}}})),r},vc.$inject=["eventBus"],x(vc,ro),vc.prototype.addRule=function(e,t,n){var i=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){i.canExecute(e,t,(function(e,t,i){return n(e)}),!0)}))},vc.prototype.init=function(){},bc.$inject=["eventBus"],x(bc,vc),bc.prototype.init=function(){this.addRule("elements.align",(function(e){var t=O(e.elements,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));return!((t=Vr(t)).length<2)&&t}))};const xc={__depends__:[za,Ga,hc],__init__:["alignElementsContextPadProvider","alignElementsMenuProvider","bpmnAlignElements"],alignElementsContextPadProvider:["type",fc],alignElementsMenuProvider:["type",yc],bpmnAlignElements:["type",bc]};var _c=10,wc=50,Ec=250;function Sc(e,t,n,i){for(var r;r=kc(e,n,t);)n=i(t,n,r);return n}function Cc(e){return function(t,n,i){var r={x:n.x,y:n.y};return["x","y"].forEach((function(o){var a=e[o];if(a){var s="x"===o?"width":"height",c=a.margin,l=a.minDistance;r[o]=c<0?Math.min(i[o]+c-t[s]/2,n[o]-l+c):Math.max(i[o]+i[s]+c+t[s]/2,n[o]+l+c)}})),r}}function kc(e,t,n){var i={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height},r=function(e){var t=Ac(e);e.host&&(t=t.concat(Ac(e.host)));e.attachers&&(t=t.concat(e.attachers.reduce((function(e,t){return e.concat(Ac(t))}),[])));return t}(e);return B(r,(function(e){return e!==n&&"intersect"===Or(e,i,_c)}))}function Ac(e){return(t=e,t.outgoing.map((function(e){return e.target}))).concat(function(e){return e.incoming.map((function(e){return e.source}))}(e));var t}function Pc(){return!0}function Rc(e,t,n){e.on("autoPlace",100,(function(e){var t=e.shape;return function(e,t,n){n||(n={});var i=n.defaultDistance||wc,r=Nr(e),o=Tr(e);return{x:o.right+i+t.width/2,y:r.y}}(e.source,t)})),e.on("autoPlace.end",(function(e){n.scrollToElement(e.shape)})),this.append=function(n,i,r){e.fire("autoPlace.start",{source:n,shape:i});var o=e.fire("autoPlace",{source:n,shape:i}),a=t.appendShape(n,i,o,n.parent,r);return e.fire("autoPlace.end",{source:n,shape:a}),a}}function Mc(e,t){e.on("autoPlace.end",500,(function(e){t.select(e.shape)}))}Rc.$inject=["eventBus","modeling","canvas"],Mc.$inject=["eventBus","selection"];const Tc={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",Rc],autoPlaceSelectionBehavior:["type",Mc]};function Dc(e,t){for(T(t)&&(t=[t]);e=e.parent;)if(An(e,t))return e;return null}function Bc(e){var t=["bpmn:Participant","bpmn:Lane"],n=Dc(e,t);return n?Xn(n):!An(e,t)||Xn(e)}function Nc(e,t){return kn(t,"bpmn:TextAnnotation")?function(e,t){var n=Tr(e),i=Bc(e),r=i?{x:n.right+t.width/2,y:n.top-50-t.height/2}:{x:n.right+50+t.width/2,y:n.bottom+t.height/2};Qn(e)&&(r=Nr(e),i?(r.x+=100,r.y-=50):(r.x+=100,r.y+=50));var o={margin:i?-30:30,minDistance:20};return Sc(e,t,r,Cc(i?{y:o}:{x:o}))}(e,t):An(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])?function(e,t){var n=Tr(e),i=Bc(e),r=i?{x:n.right-10+t.width/2,y:n.bottom+40+t.width/2}:{x:n.left-40-t.width/2,y:n.bottom-10+t.height/2},o={margin:30,minDistance:30};return Sc(e,t,r,Cc(i?{x:o}:{y:o}))}(e,t):kn(t,"bpmn:FlowNode")?function(e,t){var n=Tr(e),i=Nr(e),r=Bc(e),o=r?{directionHint:"e",minDistance:80,baseOrientation:"left",boundaryOrientation:"top",start:"top",end:"bottom"}:{directionHint:"s",minDistance:90,baseOrientation:"top",boundaryOrientation:"left",start:"left",end:"right"},a=function(e,t){t||(t={});var n=t.defaultDistance||wc,i=t.direction||"e",r=t.filter,o=t.getWeight||function(t){return t.source===e?1:-1},a=t.maxDistance||Ec,s=t.reference||"start";function c(e,t){return"n"===i?"start"===s?Tr(e).top-Tr(t).bottom:"center"===s?Tr(e).top-Nr(t).y:Tr(e).top-Tr(t).top:"w"===i?"start"===s?Tr(e).left-Tr(t).right:"center"===s?Tr(e).left-Nr(t).x:Tr(e).left-Tr(t).left:"s"===i?"start"===s?Tr(t).top-Tr(e).bottom:"center"===s?Nr(t).y-Tr(e).bottom:Tr(t).bottom-Tr(e).bottom:"start"===s?Tr(t).left-Tr(e).right:"center"===s?Nr(t).x-Tr(e).right:Tr(t).right-Tr(e).right}r||(r=Pc);var l=e.incoming.filter(r).map((function(t){var n=o(t),i=n<0?c(t.source,e):c(e,t.source);return{id:t.source.id,distance:i,weight:n}})),p=e.outgoing.filter(r).map((function(t){var n=o(t),i=n>0?c(e,t.target):c(t.target,e);return{id:t.target.id,distance:i,weight:n}}));return I(l.concat(p).reduce((function(e,t){return e[t.id+"__weight_"+t.weight]=t,e}),{}),(function(e,t){var n=t.distance,i=t.weight;return n<0||n>a||(e[String(n)]||(e[String(n)]=0),e[String(n)]+=1*i,(!e.distance||e[e.distance]t.top&&(n=n.concat("n"));e.rightt.left&&(n=n.concat("e"));return n}(te(t,["x","y","width","height"]),n);this.resize(t,n,{autoResize:i});var r=t.parent;r&&this._expand([t],r)}}},Ic.prototype.getOffset=function(e){return{top:60,bottom:60,left:100,right:100}},Ic.prototype.getPadding=function(e){return{top:2,bottom:2,left:15,right:15}},Ic.prototype.resize=function(e,t,n){this._modeling.resizeShape(e,t,null,n)},$c.$inject=["injector"],x($c,Ic),$c.prototype.resize=function(e,t,n){kn(e,"bpmn:Participant")?this._modeling.resizeLane(e,t,null,n):this._modeling.resizeShape(e,t,null,n)},zc.$inject=["eventBus"],x(zc,vc),zc.prototype.canResize=function(e,t){return!1},x(Fc,zc),Fc.$inject=["eventBus","modeling"],Fc.prototype.canResize=function(e,t){if(kn(t.di,"bpmndi:BPMNPlane"))return!1;if(!kn(t,"bpmn:Participant")&&!kn(t,"bpmn:Lane")&&!kn(t,"bpmn:SubProcess"))return!1;var n=!0;return j(e,(function(e){(kn(e,"bpmn:Lane")||Jn(e))&&(n=!1)})),n};const Vc={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",$c],bpmnAutoResizeProvider:["type",Fc]};function Hc(e,t,n){var i,r,o=this,a=n.get("dragging",!1);a&&t.on("drag.start",(function(n){t.once("drag.move",1500,(function(t){!function(t){if(!t.hover){var n=t.originalEvent,i=o._findTargetGfx(n),r=i&&e.get(i);i&&r&&(t.stopPropagation(),a.hover({element:r,gfx:i}),a.move(n))}}(t)}))})),t.on("element.hover",(function(e){i=e.gfx,r=e.element})),t.on("element.hover",1500,(function(e){r&&t.fire("element.out",{element:r,gfx:i})})),t.on("element.out",(function(){i=null,r=null})),this._findTargetGfx=function(e){var t;if(e instanceof MouseEvent)return t=$o(e),function(e){return ge(e,"svg, .djs-element",!0)}(document.elementFromPoint(t.x,t.y))}}Hc.$inject=["elementRegistry","eventBus","injector"];const Gc={__init__:["hoverFix"],hoverFix:["type",Hc]};var Wc=Math.round,Uc="djs-drag-active";function qc(e){e.preventDefault()}function Kc(e,t,n,i){var r,o={threshold:5,trapClick:!0};function a(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+(e.x-i.left)/n.scale,y:n.y+(e.y-i.top)/n.scale}}function s(t,n){n=n||r;var i=e.createEvent(ee({},n.payload,n.data,{isTouch:n.isTouch}));return!1!==e.fire("drag."+t,i)&&e.fire(n.prefix+"."+t,i)}function c(e,i){var o,c=r.payload,l=r.displacement,p=r.globalStart,u=$o(e),d=Ca(u,p),h=r.localStart,m=a(u),g=Ca(m,h);if(!r.active&&(i||(o=d,Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))>r.threshold))){if(ee(c,{x:Wc(h.x+l.x),y:Wc(h.y+l.y),dx:0,dy:0},{originalEvent:e}),!1===s("start"))return f();r.active=!0,r.keepSelection||(c.previousSelection=n.get(),n.select(null)),r.cursor&&xa(r.cursor),t.addMarker(t.getRootElement(),Uc)}Io(e),r.active&&(ee(c,{x:Wc(m.x+l.x),y:Wc(m.y+l.y),dx:Wc(g.x),dy:Wc(g.y)},{originalEvent:e}),s("move"))}function l(e){var t=!0;r.active&&(e&&(r.payload.originalEvent=e,Io(e)),t=s("end")),!1===t&&s("rejected"),s("ended",g(!0!==t))}function p(e){ca("Escape",e)&&(qc(e),f())}function u(t){var n;r.active&&(n=Ea(e),setTimeout(n,400),qc(t)),l(t)}function d(e){c(e)}function h(e){var t=r.payload;t.hoverGfx=e.gfx,t.hover=e.element,s("hover")}function m(e){s("out");var t=r.payload;t.hoverGfx=null,t.hover=null}function f(e){var t;if(r){var n=r.active;n&&s("cancel"),t=g(e),n&&s("canceled",t)}}function g(o){var a,g;s("cleanup"),_a(),g=r.trapClick?u:l,we.unbind(document,"mousemove",c),we.unbind(document,"dragstart",qc),we.unbind(document,"selectstart",qc),we.unbind(document,"mousedown",g,!0),we.unbind(document,"mouseup",g,!0),we.unbind(document,"keyup",p),we.unbind(document,"touchstart",d,!0),we.unbind(document,"touchcancel",f,!0),we.unbind(document,"touchmove",c,!0),we.unbind(document,"touchend",l,!0),e.off("element.hover",h),e.off("element.out",m),t.removeMarker(t.getRootElement(),Uc);var y=r.payload.previousSelection;return!1!==o&&y&&!n.get().length&&function(e){var t=e.filter((function(e){return i.get(e.id)}));t.length&&n.select(t)}(y),a=r,r=null,a}e.on("diagram.destroy",f),this.init=function(t,n,i,g){r&&f(!1),"string"==typeof n&&(g=i,i=n,n=null);var y,v,b,x,_,w,E=(g=ee({},o,g||{})).data||{};x=g.trapClick?u:l,t?(y=Lo(t)||t,v=$o(t),Io(t),"dragstart"===y.type&&qc(y)):(y=null,v={x:0,y:0}),b=a(v),n||(n=b),w=y,_="undefined"!=typeof TouchEvent&&w instanceof TouchEvent,r=ee({prefix:i,data:E,payload:{},globalStart:v,displacement:Ca(n,b),localStart:b,isTouch:_},g),g.manual||(_?(we.bind(document,"touchstart",d,!0),we.bind(document,"touchcancel",f,!0),we.bind(document,"touchmove",c,!0),we.bind(document,"touchend",l,!0)):(we.bind(document,"mousemove",c),we.bind(document,"dragstart",qc),we.bind(document,"selectstart",qc),we.bind(document,"mousedown",x,!0),we.bind(document,"mouseup",x,!0)),we.bind(document,"keyup",p),e.on("element.hover",h),e.on("element.out",m)),s("init"),g.autoActivate&&c(t,!0)},this.move=c,this.hover=h,this.out=m,this.end=l,this.cancel=f,this.context=function(){return r},this.setOptions=function(e){ee(o,e)}}Kc.$inject=["eventBus","canvas","selection","elementRegistry"];const Xc={__depends__:[Gc,ta],dragging:["type",Kc]};function Yc(e,t,n){this._canvas=n,this._opts=ee({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var i=this;t.on("drag.move",(function(e){var t=i._toBorderPoint(e);i.startScroll(t)})),t.on(["drag.cleanup"],(function(){i.stopScroll()}))}function Zc(e,t,n){return tg-3&&(n=Or(r.target,f),a===g-2?"intersect"===n&&(h.pop(),h[h.length-1]=f):"intersect"!==n&&h.push(u)),i.newWaypoints=r.waypoints=s(r,h),l(i,y,e),i.newSegmentStartIndex=o+y,c(e)})),t.on("connectionSegment.move.hover",(function(e){e.context.hover=e.hover,n.addMarker(e.hover,Dl)})),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],(function(e){var t=e.context.hover;t&&n.removeMarker(t,Dl)})),t.on("connectionSegment.move.cleanup",(function(e){var t=e.context,i=t.connection;t.draggerGfx&&nt(t.draggerGfx),n.removeMarker(i,Bl)})),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],(function(e){var t=e.context;t.connection.waypoints=t.originalWaypoints,c(e)})),t.on("connectionSegment.move.end",(function(e){var t=e.context,n=t.connection,i=t.newWaypoints,r=t.newSegmentStartIndex,a=function(e,t){var n=0;return{waypoints:e.filter((function(i,r){return!Wi(e[r-1],e[r+1],i)||(n=r<=t?n-1:n,!1)})),segmentOffset:n}}(i=i.map((function(e){return{original:e.original,x:Math.round(e.x),y:Math.round(e.y)}})),r),c=s(n,a.waypoints),l=a.segmentOffset,p={segmentMove:{segmentStartIndex:t.segmentStartIndex,newSegmentStartIndex:r+l}};o.updateWaypoints(n,c,p)}))}Il.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var $l=Math.abs,zl=Math.round;function Fl(e){return{x:e.x,y:e.y}}function Vl(e){return{x:e.x+e.width,y:e.y+e.height}}function Hl(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:zl(e.x+e.width/2),y:zl(e.y+e.height/2)}}function Gl(e,t){var n=e.snapped;return!!n&&("string"==typeof t?n[t]:n.x&&n.y)}function Wl(e,t,n){if("string"!=typeof t)throw new Error("axis must be in [x, y]");if("number"!=typeof n&&!1!==n)throw new Error("value must be Number or false");var i,r=e[t],o=e.snapped=e.snapped||{};return!1===n?o[t]=!1:(o[t]=!0,i=n-r,e[t]+=i,e["d"+t]+=i),r}function Ul(e){return e.children||[]}var ql=Math.abs,Kl=Math.round;function Xl(e){function t(e,t){if(A(e)){for(var n=e.length;n--;)if(ql(e[n]-t)<=10)return e[n]}else{var i=t%(e=+e);if(i<10)return t-i;if(i>e-10)return t-i+e}return t}function n(e,t){return e.waypoints?yl(t,e):e.width?{x:Kl(e.width/2+e.x),y:Kl(e.height/2+e.y)}:void 0}e.on("connectionSegment.move.move",1500,(function(e){var i,r,o=function(e){var t=e.context,i=t.snapPoints,r=t.connection,o=r.waypoints,a=t.segmentStart,s=t.segmentStartIndex,c=t.segmentEnd,l=t.segmentEndIndex,p=t.axis;if(i)return i;var u=[o[s-1],a,c,o[l+1]];return s<2&&u.unshift(n(r.source,e)),l>o.length-3&&u.unshift(n(r.target,e)),t.snapPoints=i={horizontal:[],vertical:[]},j(u,(function(e){e&&(e=e.original||e,"y"===p&&i.horizontal.push(e.y),"x"===p&&i.vertical.push(e.x))})),i}(e),a=e.x,s=e.y;if(o){var c=a-(i=t(o.vertical,a)),l=s-(r=t(o.horizontal,s));ee(e,{dx:e.dx-c,dy:e.dy-l,x:i,y:r}),(c||-1!==o.vertical.indexOf(a))&&Wl(e,"x",i),(l||-1!==o.horizontal.indexOf(s))&&Wl(e,"y",r)}})),e.on(["connect.hover","connect.move","connect.end"],1500,(function(e){var t=e.context.hover,i=t&&n(t,e);Qn(t)&&i&&i.x&&i.y&&(Wl(e,"x",i.x),Wl(e,"y",i.y))})),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,(function(e){var i,r,o=e.context,a=function(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var r=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},j(r,(function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))})),t}(o),s=o.hover,c=s&&n(s,e),l=e.x,p=e.y;if(a){var u=l-(i=t(c?a.vertical.concat([c.x]):a.vertical,l)),d=p-(r=t(c?a.horizontal.concat([c.y]):a.horizontal,p));ee(e,{dx:e.dx-u,dy:e.dy-d,x:e.x-u,y:e.y-d}),(u||-1!==a.vertical.indexOf(l))&&Wl(e,"x",i),(d||-1!==a.horizontal.indexOf(p))&&Wl(e,"y",r)}}))}Xl.$inject=["eventBus"];const Yl={__depends__:[Xc,el],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",vl],bendpointMove:["type",El],bendpointMovePreview:["type",Tl],connectionSegmentMove:["type",Il],bendpointSnapping:["type",Xl]};function Zl(e,t,n,i){function r(e,t){return i.allowed("connection.create",{source:e,target:t})}e.on("connect.hover",(function(e){var t,n=e.context,i=n.start,o=e.hover;if(n.hover=o,!k(t=n.canExecute=r(i,o))){if(!1!==t)return n.source=i,void(n.target=o);k(t=n.canExecute=r(o,i))||!1!==t&&(n.source=o,n.target=i)}})),e.on(["connect.out","connect.cleanup"],(function(e){var t=e.context;t.hover=null,t.source=null,t.target=null,t.canExecute=!1})),e.on("connect.end",(function(e){var t=e.context,i=t.canExecute,r=t.connectionStart,o={x:e.x,y:e.y},a=t.source,s=t.target;if(!i)return!1;var c=null,l={connectionStart:Ql(t)?o:r,connectionEnd:Ql(t)?r:o};P(i)&&(c=i),t.connection=n.connect(a,s,c,l)})),this.start=function(e,n,i,r){P(i)||(r=i,i=Nr(n)),t.init(e,"connect",{autoActivate:r,data:{shape:n,context:{start:n,connectionStart:i}}})}}function Ql(e){var t=e.hover,n=e.source,i=e.target;return t&&n&&t===n&&n!==i}Zl.$inject=["eventBus","dragging","modeling","rules"];var Jl="connect-ok",ep="connect-not-ok";function tp(e,t,n){var i=e.get("connectionPreview",!1);i&&t.on("connect.move",(function(e){var t=e.context,n=t.canExecute,r=t.hover,o=t.source,a=t.start,s=t.startPosition,c=t.target,l=t.connectionStart||s,p=t.connectionEnd||{x:e.x,y:e.y},u=l,d=p;Ql(t)&&(u=p,d=l),i.drawPreview(t,n,{source:o||a,target:c||r,connectionStart:u,connectionEnd:d})})),t.on("connect.hover",900,(function(e){var t=e.context,i=e.hover,r=t.canExecute;null!==r&&n.addMarker(i,r?Jl:ep)})),t.on(["connect.out","connect.cleanup"],1100,(function(e){var t=e.hover;t&&(n.removeMarker(t,Jl),n.removeMarker(t,ep))})),i&&t.on("connect.cleanup",(function(e){i.cleanUp(e.context)}))}tp.$inject=["injector","eventBus","canvas"];const np={__depends__:[ta,el,Xc],__init__:["connectPreview"],connect:["type",Zl],connectPreview:["type",tp]};function ip(e,t,n,i){this._canvas=t,this._graphicsFactory=n,this._elementFactory=i,this._connectionDocking=e.get("connectionDocking",!1),this._layouter=e.get("layouter",!1)}ip.$inject=["injector","canvas","graphicsFactory","elementFactory"],ip.prototype.drawPreview=function(e,t,n){n=n||{};var i,r,o,a=e.connectionPreviewGfx,s=e.getConnection,c=n.source,l=n.target,p=n.waypoints,u=n.connectionStart,d=n.connectionEnd,h=n.noLayout,m=n.noCropping,f=n.noNoop,g=this;a||(a=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),Ve(a),s||(s=e.getConnection=(r=function(e,t,n){return g.getConnection(e,t,n)},o={},function(e){var t=JSON.stringify(e),n=o[t];return n||(n=o[t]=r.apply(null,arguments)),n})),t&&(i=s(t,c,l)),i?(i.waypoints=p||[],this._layouter&&!h&&(i.waypoints=this._layouter.layoutConnection(i,{source:c,target:l,connectionStart:u,connectionEnd:d,waypoints:n.waypoints||i.waypoints})),i.waypoints&&i.waypoints.length||(i.waypoints=[c?Nr(c):u,l?Nr(l):d]),this._connectionDocking&&(c||l)&&!m&&(i.waypoints=this._connectionDocking.getCroppedWaypoints(i,c,l)),this._graphicsFactory.drawConnection(a,i,{stroke:"var(--element-dragger-color)"})):!f&&this.drawNoopPreview(a,n)},ip.prototype.drawNoopPreview=function(e,t){var n=t.source,i=t.target,r=t.connectionStart||Nr(n),o=t.connectionEnd||Nr(i),a=this.cropWaypoints(r,o,n,i);Ne(e,this.createNoopConnection(a[0],a[1]))},ip.prototype.cropWaypoints=function(e,t,n,i){var r=this._graphicsFactory,o=n&&r.getShapePath(n),a=i&&r.getShapePath(i),s=r.getConnectionPath({waypoints:[e,t]});return[e=n&&jr(o,s,!0)||e,t=i&&jr(a,s,!1)||t]},ip.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&nt(e.connectionPreviewGfx)},ip.prototype.getConnection=function(e){var t=function(e){return P(e)?e:{}}(e);return this._elementFactory.createConnection(t)},ip.prototype.createConnectionPreviewGfx=function(){var e=qe("g");return Ie(e,{pointerEvents:"none"}),ze(e).add("djs-dragger"),Ne(this._canvas.getActiveLayer(),e),e},ip.prototype.createNoopConnection=function(e,t){return hi([e,t],{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"})};const rp={__init__:["connectionPreview"],connectionPreview:["type",ip]};function op(e){return e.childNodes[0]}const ap=new Xr("ps");var sp=["marker-start","marker-mid","marker-end"],cp=["circle","ellipse","line","path","polygon","polyline","path","rect"];function lp(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._styles=i}lp.$inject=["elementRegistry","eventBus","canvas","styles"],lp.prototype.cleanUp=function(){},lp.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},lp.prototype.addDragger=function(e,t,n,i="djs-dragger"){var r=He(n=n||this.getGfx(e)),o=n.getBoundingClientRect();return this._cloneMarkers(op(r),i),Ie(r,this._styles.cls(i,[],{x:o.top,y:o.left})),Ne(t,r),Ie(r,"data-preview-support-element-id",e.id),r},lp.prototype.addFrame=function(e,t){var n=qe("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return Ne(t,n),Ie(n,"data-preview-support-element-id",e.id),n},lp.prototype._cloneMarkers=function(e,t="djs-dragger",n=e){var i,r=this;if(e.childNodes)for(var o=0;o defs",e);c||Ne(e,c=qe("defs")),Ne(c,s),Ie(t,i,"url(#"+s.id+")")};const pp={__init__:["previewSupport"],previewSupport:["type",lp]},up="complex-preview";class ComplexPreview{constructor(e,t,n){this._canvas=e,this._graphicsFactory=t,this._previewSupport=n,this._markers=[]}create(e){this.cleanUp();const{created:t=[],moved:n=[],removed:i=[],resized:r=[]}=e,o=this._canvas.getLayer(up);t.filter((e=>!function(e){return e.hidden}(e))).forEach((e=>{let t;Qn(e)?(t=this._graphicsFactory._createContainer("connection",qe("g")),this._graphicsFactory.drawConnection(op(t),e)):(t=this._graphicsFactory._createContainer("shape",qe("g")),this._graphicsFactory.drawShape(op(t),e),Ci(t,e.x,e.y)),this._previewSupport.addDragger(e,o,t)})),n.forEach((({element:e,delta:t})=>{this._previewSupport.addDragger(e,o,void 0,"djs-dragging"),this._canvas.addMarker(e,"djs-element-hidden"),this._markers.push([e,"djs-element-hidden"]);const n=this._previewSupport.addDragger(e,o);Qn(e)?Ci(n,t.x,t.y):Ci(n,e.x+t.x,e.y+t.y)})),i.forEach((e=>{this._previewSupport.addDragger(e,o,void 0,"djs-dragging"),this._canvas.addMarker(e,"djs-element-hidden"),this._markers.push([e,"djs-element-hidden"])})),r.forEach((({shape:e,bounds:t})=>{this._canvas.addMarker(e,"djs-hidden"),this._markers.push([e,"djs-hidden"]),this._previewSupport.addDragger(e,o,void 0,"djs-dragging");const n=this._graphicsFactory._createContainer("shape",qe("g"));this._graphicsFactory.drawShape(op(n),e,{width:t.width,height:t.height}),Ci(n,t.x,t.y),this._previewSupport.addDragger(e,o,n)}))}cleanUp(){Ve(this._canvas.getLayer(up)),this._markers.forEach((([e,t])=>this._canvas.removeMarker(e,t))),this._markers=[]}show(){this._canvas.showLayer(up)}hide(){this._canvas.hideLayer(up)}}ComplexPreview.$inject=["canvas","graphicsFactory","previewSupport"];const dp={__depends__:[pp],__init__:["complexPreview"],complexPreview:["type",ComplexPreview]};var hp=["top","bottom","left","right"],mp=10;function fp(e,t){function n(e){if(ii(e)){var n=function(e){var t=Nr(e.label),n=Nr(e),i=gp(n,t);if(r=i,-1===hp.indexOf(r))return;var r;var o=function(e){var t=Nr(e),n=[].concat(e.incoming.map((function(e){return e.waypoints[e.waypoints.length-2]})),e.outgoing.map((function(e){return e.waypoints[1]}))).map((function(e){return gp(t,e)}));return n}(e);if(e.host){var a=function(e){var t,n=e.host,i=Nr(e),r=Or(i,n);t=r.indexOf("-")>=0?r.split("-"):[r];var o=hp.filter((function(e){return-1===t.indexOf(e)}));return o}(e);o=o.concat(a)}var s=hp.filter((function(e){return-1===o.indexOf(e)}));if(-1!==s.indexOf(i))return;return s[0]}(e);n&&function(e,n){var i=Nr(e),r=e.label,o=Nr(r);if(!r.parent)return;var a,s=Tr(e);switch(n){case"top":a={x:i.x,y:s.top-mp-r.height/2};break;case"left":a={x:s.left-mp-r.width/2,y:i.y};break;case"bottom":a={x:i.x,y:s.bottom+mp+r.height/2};break;case"right":a={x:s.right+mp+r.width/2,y:i.y}}var c=Ca(a,o);t.moveShape(r,c)}(e,n)}}ro.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],(function(e){var t=e.context,i=t.connection,r=i.source,o=i.target;!1!==(t.hints||{}).createElementsBehavior&&(n(r),n(o))})),this.postExecuted(["label.create"],(function(e){var t=e.context,i=t.shape;!1!==(t.hints||{}).createElementsBehavior&&n(i.labelTarget)})),this.postExecuted(["elements.create"],(function(e){var t=e.context,i=t.elements;!1!==(t.hints||{}).createElementsBehavior&&i.forEach((function(e){n(e)}))}))}function gp(e,t){return Or(t,e,5)}function yp(e){ro.call(this,e),this.preExecute("shape.append",(function(e){var t=e.source,n=e.shape;e.position||(kn(n,"bpmn:TextAnnotation")?e.position={x:t.x+t.width/2+75,y:t.y-50-n.height/2}:e.position={x:t.x+t.width+80+n.width/2,y:t.y+t.height/2})}),!0)}function vp(e,t){e.invoke(ro,this),this.postExecute("shape.move",(function(e){var n=e.newParent,i=e.shape;j(O(i.incoming.concat(i.outgoing),(function(e){return kn(e,"bpmn:Association")})),(function(e){t.moveConnection(e,{x:0,y:0},n)}))}),!0)}x(fp,ro),fp.$inject=["eventBus","modeling"],x(yp,ro),yp.$inject=["eventBus"],x(vp,ro),vp.$inject=["injector","modeling"];function bp(e,t){t.invoke(ro,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;1===(t=t.filter((function(e){return xp(e,e.host)}))).length&&t.map((function(e){return t.indexOf(e)})).forEach((function(i){var r=t[i];e.elements[i]=n._replaceShape(t[i],r)}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;if(1===t.length){var r=t[0];xp(r,i)&&(e.shapes=[n._replaceShape(r,i)])}}),!0)}function xp(e,t){return!Jn(e)&&An(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t}function _p(e,t){function n(e){return O(e.attachers,(function(e){return kn(e,"bpmn:BoundaryEvent")}))}ro.call(this,e),this.postExecute("connection.create",(function(e){var i=e.context.source,r=e.context.target,o=n(r);kn(i,"bpmn:EventBasedGateway")&&kn(r,"bpmn:ReceiveTask")&&o.length>0&&t.removeElements(o)})),this.postExecute("connection.reconnect",(function(e){var i=e.context.oldSource,r=e.context.newSource;kn(i,"bpmn:Gateway")&&kn(r,"bpmn:EventBasedGateway")&&j(r.outgoing,(function(e){var i=e.target,r=n(i);kn(i,"bpmn:ReceiveTask")&&r.length>0&&t.removeElements(r)}))}))}function wp(e,t,n){function i(e){t.updateProperties(e,{isForCompensation:!0})}function r(e){t.updateProperties(e,{isForCompensation:void 0})}ro.call(this,e),this.preExecute("shape.replace",(function(e){const{newData:n,oldShape:i}=e;if(Sp(e.oldShape)&&"bpmn:CompensateEventDefinition"!==n.eventDefinitionType||"bpmn:BoundaryEvent"!==n.type){const t=i.outgoing.find((({target:e})=>Ep(e)));t&&t.target&&(e._connectionTarget=t.target)}else if(!Sp(e.oldShape)&&"bpmn:CompensateEventDefinition"===n.eventDefinitionType&&"bpmn:BoundaryEvent"===n.type){const n=i.outgoing.find((({target:e})=>Cp(e)));n&&n.target&&(e._connectionTarget=n.target),function(e){const n=e.outgoing.filter((e=>kn(e,"bpmn:SequenceFlow")));t.removeElements(n)}(i)}}),!0),this.postExecuted("shape.replace",(function(e){const{_connectionTarget:n,newShape:i}=e;n&&t.connect(i,n)}),!0),this.preExecute("connection.create",(function(e){const n=e.connection,r=e.source,o=e.target;Sp(r)&&Cp(o)&&(i(o),function(e,n){const i=e.outgoing.filter((e=>kn(e,"bpmn:Association")));i.filter((e=>Ep(e.target)&&!n.includes(e))).forEach((e=>t.removeConnection(e)))}(r,[n]))}),!0),this.postExecuted("connection.delete",(function(e){const t=e.source,n=e.target;Sp(t)&&Ep(n)&&r(n)}),!0),this.postExecuted("connection.reconnect",(function(e){const t=e.newTarget,n=e.oldSource,o=e.oldTarget;if(o!==t){const e=n;Ep(o)&&r(o),Sp(e)&&Cp(t)&&i(t)}}),!0),this.postExecuted("element.updateProperties",(function(e){const{element:i}=e;Ep(i)?(function(e){for(const i of e.incoming)n.canConnect(i.source,e)||t.removeConnection(i);for(const i of e.outgoing)n.canConnect(e,i.target)||t.removeConnection(i)}(i),function(e){const n=e.attachers.slice();if(!n.length)return;t.removeElements(n)}(i)):Cp(i)&&function(e){const n=e.incoming.filter((e=>Sp(e.source)));t.removeElements(n)}(i)}),!0)}function Ep(e){const t=Pn(e);return t&&t.get("isForCompensation")}function Sp(e){return e&&kn(e,"bpmn:BoundaryEvent")&&Zn(e,"bpmn:CompensateEventDefinition")}function Cp(e){return e&&kn(e,"bpmn:Activity")&&!Yn(e)}function kp(e){e.invoke(ro,this),this.preExecute("shape.create",1500,(function(e){var t=e.context,n=t.parent,i=t.shape;kn(n,"bpmn:Lane")&&!kn(i,"bpmn:Lane")&&(t.parent=Dc(n,"bpmn:Participant"))}))}function Ap(e,t){ro.call(this,e),this.preExecute("shape.create",(function(e){var n=e.context.shape;if(kn(n,"bpmn:DataObjectReference")&&"label"!==n.type){var i=t.create("bpmn:DataObject");n.businessObject.dataObjectRef=i}}))}bp.$inject=["bpmnReplace","injector"],x(bp,ro),bp.prototype._replaceShape=function(e,t){var n,i=(n=Pn(e).eventDefinitions)&&n[0],r={type:"bpmn:BoundaryEvent",host:t};return i&&(r.eventDefinitionType=i.$type),this._bpmnReplace.replaceElement(e,r,{layoutConnection:!1})},_p.$inject=["eventBus","modeling"],x(_p,ro),x(wp,ro),wp.$inject=["eventBus","modeling","bpmnRules"],kp.$inject=["injector"],x(kp,ro),Ap.$inject=["eventBus","bpmnFactory"],x(Ap,ro);var Pp=20,Rp=20,Mp=30,Tp=2e3;function Dp(e,t,n){function i(){var t=e.getRootElement();return kn(t,"bpmn:Collaboration")?t:n.makeCollaboration()}ro.call(this,t),t.on(["create.start","shape.move.start"],Tp,(function(t){var n=t.context,i=n.shape,r=e.getRootElement();if(kn(i,"bpmn:Participant")&&kn(r,"bpmn:Process")&&r.children.length){var o=r.children.filter((function(e){return!kn(e,"bpmn:Group")&&!Jn(e)&&!Qn(e)}));if(o.length){var a=qr(o),s=function(e,t){t={width:t.width+2*Pp+Mp,height:t.height+2*Rp};var n=Math.max(e.width,t.width),i=Math.max(e.height,t.height);return{x:-n/2,y:-i/2,width:n,height:i}}(i,a);ee(i,s),n.createConstraints=function(e,t){return t=Tr(t),{bottom:t.top+e.height/2-Rp,left:t.right-e.width/2+Pp,top:t.bottom-e.height/2+Rp,right:t.left+e.width/2-Pp-Mp}}(i,a)}}})),t.on("create.start",Tp,(function(n){var i=n.context.shape,r=e.getRootElement(),o=e.getGraphics(r);function a(e){e.element=r,e.gfx=o}kn(i,"bpmn:Participant")&&kn(r,"bpmn:Process")&&(t.on("element.hover",Tp,a),t.once("create.cleanup",(function(){t.off("element.hover",a)})))})),this.preExecute("elements.create",Tp,(function(e){var t,n=e.elements,r=e.parent,o=function(e){return B(e,(function(e){return kn(e,"bpmn:Participant")}))}(n);o&&kn(r,"bpmn:Process")&&(e.parent=i(),(t=e.hints=e.hints||{}).participant=o,t.process=r,t.processRef=Pn(o).get("processRef"))}),!0),this.preExecute("shape.create",(function(e){var t=e.parent,n=e.shape;kn(n,"bpmn:Participant")&&kn(t,"bpmn:Process")&&(e.parent=i(),e.process=t,e.processRef=Pn(n).get("processRef"))}),!0),this.execute("shape.create",(function(e){var t=e.hints||{},n=e.process||t.process,i=e.shape,r=t.participant;!n||r&&i!==r||Pn(i).set("processRef",Pn(n))}),!0),this.revert("shape.create",(function(e){var t=e.hints||{},n=e.process||t.process,i=e.processRef||t.processRef,r=e.shape,o=t.participant;!n||o&&r!==o||Pn(r).set("processRef",i)}),!0),this.postExecute("shape.create",(function(e){var t=e.hints||{},i=e.process||e.hints.process,r=e.shape,o=t.participant;if(i){var a=i.children.slice();o?r===o&&n.moveElements(a,{x:0,y:0},o):n.moveElements(a,{x:0,y:0},r)}}),!0)}function Bp(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function Np(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function Op(e,t){return e&&t?e.indexOf(t):-1}Dp.$inject=["canvas","eventBus","modeling"],x(Dp,ro);var jp="__targetRef_placeholder";function Lp(e,t){function n(e,n){var i=e.get("properties"),r=B(i,(function(e){return e.name===jp}));return!r&&n&&Np(i,r=t.create("bpmn:Property",{name:jp})),r}function i(e,t){var i=n(e);i&&(function(e,t,n){return B(e.get("dataInputAssociations"),(function(e){return e!==n&&e.targetRef===t}))}(e,i,t)||Bp(e.get("properties"),i))}function r(e){var t,r=e.context,o=r.connection,a=o.businessObject,s=o.target,c=s&&s.businessObject,l=r.newTarget,p=l&&l.businessObject,u=r.oldTarget||r.target,d=u&&u.businessObject,h=o.businessObject;d&&d!==c&&i(d,a),p&&p!==c&&i(p,a),c?(t=n(c,!0),h.targetRef=t):h.targetRef=null}ro.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],Ip(r)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],Ip(r))}function Ip(e){return function(t){if(kn(t.context.connection,"bpmn:DataInputAssociation"))return e(t)}}function $p(e){this._bpmnUpdater=e}function zp(e,t,n,i){function r(e){return e.children.filter((function(e){return kn(e,"bpmn:DataStoreReference")&&!e.labelTarget}))}function o(e,i){var r=e.businessObject||e;if(i=i||n.filter((function(e){return kn(e,"bpmn:Participant")&&Pn(e).processRef}))[0]){var o=i.businessObject||i;t.execute("dataStore.updateContainment",{dataStoreBo:r,dataStoreDi:Rn(e),newSemanticParent:o.processRef||o,newDiParent:Rn(i)})}}ro.call(this,i),t.registerHandler("dataStore.updateContainment",$p),this.preExecute("shape.create",(function(e){var t=e.context,n=t.shape;kn(n,"bpmn:DataStoreReference")&&"label"!==n.type&&(t.hints||(t.hints={}),t.hints.autoResize=!1)})),this.preExecute("elements.move",(function(e){var t=e.context,n=t.shapes;n.filter((function(e){return kn(e,"bpmn:DataStoreReference")})).length&&(t.hints||(t.hints={}),t.hints.autoResize=n.filter((function(e){return!kn(e,"bpmn:DataStoreReference")})))})),this.postExecute("shape.create",(function(e){var t=e.context.shape,n=t.parent;kn(t,"bpmn:DataStoreReference")&&"label"!==t.type&&kn(n,"bpmn:Collaboration")&&o(t)})),this.postExecute("shape.move",(function(e){var t=e.context,n=t.shape,i=t.oldParent,r=n.parent;kn(i,"bpmn:Collaboration")||kn(n,"bpmn:DataStoreReference")&&"label"!==n.type&&kn(r,"bpmn:Collaboration")&&o(n,kn(i,"bpmn:Participant")?i:function(e,t){for(;e.parent;){if(kn(e.parent,t))return e.parent;e=e.parent}}(i,"bpmn:Participant"))})),this.postExecute("shape.delete",(function(t){var n=t.context.shape,i=e.getRootElement();An(n,["bpmn:Participant","bpmn:SubProcess"])&&kn(i,"bpmn:Collaboration")&&r(i).filter((function(e){return function(e,t){var n=e.businessObject||e,i=t.businessObject||t;for(;n.$parent;){if(n.$parent===i.processRef||i)return!0;n=n.$parent}return!1}(e,n)})).forEach((function(e){o(e)}))})),this.postExecute("canvas.updateRoot",(function(e){var t=e.context,n=t.oldRoot,i=t.newRoot;r(n).forEach((function(e){kn(i,"bpmn:Process")&&o(e,i)}))}))}Lp.$inject=["eventBus","bpmnFactory"],x(Lp,ro),$p.$inject=["bpmnUpdater"],$p.prototype.execute=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,i=e.newSemanticParent,r=e.newDiParent;return e.oldSemanticParent=t.$parent,e.oldDiParent=n.$parent,this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(n,r),[]},$p.prototype.revert=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,i=e.oldSemanticParent,r=e.oldDiParent;return this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(n,r),[]},zp.$inject=["canvas","commandStack","elementRegistry","eventBus"],x(zp,ro);var Fp=Math.max,Vp=Math.min,Hp=20;function Gp(e,t){return{top:e.top-t.top,right:e.right-t.right,bottom:e.bottom-t.bottom,left:e.left-t.left}}function Wp(e,t,n){var i=t[e],r=n.min&&n.min[e],o=n.max&&n.max[e];return R(r)&&(i=(/top|left/.test(e)?Vp:Fp)(i,r)),R(o)&&(i=(/top|left/.test(e)?Fp:Vp)(i,o)),i}function Up(e,t){return void 0!==e?e:Hp}function qp(e){return!e.waypoints&&"label"!==e.type}function Kp(e,t){var n;if((n=void 0===e.length?O(e.children,qp):e).length)return function(e,t){var n,i,r,o;return"object"==typeof t?(n=Up(t.left),i=Up(t.right),r=Up(t.top),o=Up(t.bottom)):n=i=r=o=Up(t),{x:e.x-n,y:e.y-r,width:e.width+n+i,height:e.height+r+o}}(qr(n),t)}var Xp=Math.abs;var Yp=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"],Zp=30;function Qp(e,t){return t=t||[],e.children.filter((function(e){kn(e,"bpmn:Lane")&&(Qp(e,t),t.push(e))})),t}function Jp(e){return e.children.filter((function(e){return kn(e,"bpmn:Lane")}))}function eu(e){return Dc(e,Yp)||e}function tu(e,t){var n=eu(e),i=Qp(n,kn(n,"bpmn:Process")?[]:[n]),r=Tr(e),o=Tr(t),a=function(e,t){return Gp(Tr(t),Tr(e))}(e,t),s=[],c=Xn(e);return i.forEach((function(t){if(t!==e){var n,i,l=c?0:a.top,p=c?a.right:0,u=c?0:a.bottom,d=c?a.left:0,h=Tr(t);a.top&&(Xp(h.bottom-r.top)<10&&(u=o.top-h.bottom),Xp(h.top-r.top)<5&&(l=o.top-h.top)),a.left&&(Xp(h.right-r.left)<10&&(p=o.left-h.right),Xp(h.left-r.left)<5&&(d=o.left-h.left)),a.bottom&&(Xp(h.top-r.bottom)<10&&(l=o.bottom-h.top),Xp(h.bottom-r.bottom)<5&&(u=o.bottom-h.bottom)),a.right&&(Xp(h.left-r.right)<10&&(d=o.right-h.left),Xp(h.right-r.right)<5&&(p=o.right-h.right)),(l||p||u||d)&&s.push({shape:t,newBounds:(n=t,i={top:l,right:p,bottom:u,left:d},{x:n.x+(i.left||0),y:n.y+(i.top||0),width:n.width-(i.left||0)+(i.right||0),height:n.height-(i.top||0)+(i.bottom||0)})})}})),s}function nu(e,t){ro.call(this,e),this.postExecuted("shape.delete",500,(function(e){var n=e.context,i=n.hints,r=n.shape,o=n.oldParent;kn(r,"bpmn:Lane")&&(i&&i.nested||function(e,n){var i,r,o,a,s,c=Xn(e),l=Jp(n),p=[],u=[],d=[],h=[];Wr(l,(function(t){return c?t.y>e.y?u.push(t):p.push(t):t.x>e.x?h.push(t):d.push(t),t.children})),l.length&&(i=c?u.length&&p.length?e.height/2:e.height:h.length&&d.length?e.width/2:e.width,p.length&&(r=t.calculateAdjustments(p,"y",i,e.y-10),t.makeSpace(r.movingShapes,r.resizingShapes,{x:0,y:i},"s")),u.length&&(o=t.calculateAdjustments(u,"y",-i,e.y+e.height+10),t.makeSpace(o.movingShapes,o.resizingShapes,{x:0,y:-i},"n")),d.length&&(a=t.calculateAdjustments(d,"x",i,e.x-10),t.makeSpace(a.movingShapes,a.resizingShapes,{x:i,y:0},"e")),h.length&&(s=t.calculateAdjustments(h,"x",-i,e.x+e.width+10),t.makeSpace(s.movingShapes,s.resizingShapes,{x:-i,y:0},"w")))}(r,o))}))}nu.$inject=["eventBus","spaceTool"],x(nu,ro);function iu(e,t){t.invoke(ro,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;t.filter((function(e){return ru(e,e.host)})).map((function(e){return t.indexOf(e)})).forEach((function(i){e.elements[i]=n._replaceShape(t[i])}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;t.forEach((function(e,r){var o,a=e.host;ru(e,(o=a,-1!==t.indexOf(o)?a:i))&&(t[r]=n._replaceShape(e))}))}),!0)}function ru(e,t){return!Jn(e)&&kn(e,"bpmn:BoundaryEvent")&&!t}function ou(e,t,n){function i(e,i,r){var o,a,s,c,l,p,u,d,h=i.waypoints,m=e.outgoing.slice(),f=e.incoming.slice(),g=rl(h,d=R(r.width)?Nr(r):r);if(g){if(o=h.slice(0,g.index),a=h.slice(g.index+(g.bendpoint?1:0)),!o.length||!a.length)return;s=g.bendpoint?h[g.index]:d,1!==o.length&&au(e,o[o.length-1])||o.push(su(s)),1!==a.length&&au(e,a[0])||a.unshift(su(s))}c=i.source,l=i.target,t.canConnect(c,e,i)&&(n.reconnectEnd(i,e,o||d),p=i),t.canConnect(e,l,i)&&(p?u=n.connect(e,l,{type:i.type,waypoints:a}):(n.reconnectStart(i,e,a||d),u=i));var y=[].concat(p&&O(f,(function(e){return e.source===p.source}))||[],u&&O(m,(function(e){return e.target===u.target}))||[]);y.length&&n.removeElements(y)}ro.call(this,e),this.preExecute("elements.move",(function(e){var n=e.newParent,i=e.shapes,r=e.delta,o=i[0];if(o&&n){n&&n.waypoints&&(e.newParent=n=n.parent);var a=Nr(o),s={x:a.x+r.x,y:a.y+r.y},c=B(n.children,(function(e){return t.canInsert(i,e)&&rl(e.waypoints,s)}));c&&(e.targetFlow=c,e.position=s)}}),!0),this.postExecuted("elements.move",(function(e){var t=e.shapes,n=e.targetFlow,r=e.position;n&&i(t[0],n,r)}),!0),this.preExecute("shape.create",(function(e){var n=e.parent,i=e.shape;t.canInsert(i,n)&&(e.targetFlow=n,e.parent=n.parent)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.targetFlow,r=e.position;n&&i(t,n,r)}),!0)}function au(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function su(e){return ee({},e)}function cu(e,t){ro.call(this,e),this.preExecuted("connection.create",(function(e){var n=e.context,i=n.connection,r=n.source,o=n.target,a=n.hints;if((!a||!1!==a.createElementsBehavior)&&lu(i)){(kn(r,"bpmn:EventBasedGateway")?o.incoming.filter((e=>e!==i&&lu(e))):o.incoming.filter((e=>e!==i&&lu(e)&&kn(e.source,"bpmn:EventBasedGateway")))).forEach((function(e){t.removeConnection(e)}))}})),this.preExecuted("shape.replace",(function(e){var n=e.context.newShape;kn(n,"bpmn:EventBasedGateway")&&n.outgoing.filter(lu).reduce((function(e,t){return e.includes(t.target)?e:e.concat(t.target)}),[]).forEach((function(e){e.incoming.filter(lu).forEach((function(i){const r=e.incoming.filter(lu).filter((function(e){return e.source===n}));(i.source!==n||r.length>1)&&t.removeConnection(i)}))}))}))}function lu(e){return kn(e,"bpmn:SequenceFlow")}iu.$inject=["bpmnReplace","injector"],x(iu,ro),iu.prototype._replaceShape=function(e){var t,n,i=(n=Pn(e).eventDefinitions)&&n[0];return t=i?{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:i.$type}:{type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(e,t,{layoutConnection:!1})},x(ou,ro),ou.$inject=["eventBus","bpmnRules","modeling"],cu.$inject=["eventBus","modeling"],x(cu,ro);var pu=1500;function uu(e,t,n){t.on(["create.hover","create.move","create.out","create.end","shape.move.hover","shape.move.move","shape.move.out","shape.move.end"],pu,(function(t){var i=t.context.shape||t.shape,r=t.hover;kn(r,"bpmn:Lane")&&!An(i,["bpmn:Lane","bpmn:Participant"])&&(t.hover=eu(r),t.hoverGfx=e.getGraphics(t.hover));var o=n.getRootElement();r!==o&&(i.labelTarget||An(i,["bpmn:Group","bpmn:TextAnnotation"]))&&(t.hover=o,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],pu,(function(t){var n=t.hover;kn(n,"bpmn:Lane")&&(t.hover=eu(n)||n,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["bendpoint.move.hover"],pu,(function(t){var n=t.context,i=t.hover,r=n.type;kn(i,"bpmn:Lane")&&/reconnect/.test(r)&&(t.hover=eu(i)||i,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.start"],pu,(function(e){var t=e.context,n=t.start;kn(n,"bpmn:Lane")&&(t.start=eu(n)||n)})),t.on("shape.move.start",2e3,(function(e){var t=e.shape;kn(t,"bpmn:Lane")&&(e.shape=eu(t)||t)})),t.on("spaceTool.move",2e3,(function(e){var t=e.hover;t&&kn(t,"bpmn:Lane")&&(e.hover=eu(t))}))}uu.$inject=["elementRegistry","eventBus","canvas"];function du(e,t,n,i,r,o){function a(e,t,i){var r=n.filter((function(e){return kn(e,"bpmn:Group")})).filter((function(e){return e.businessObject!==i}));t&&!function(e,t){return e.some((function(e){var n=Pn(e);return(n.categoryValueRef&&n.categoryValueRef.$parent)===t}))}(r,t)&&function(e){var t=e.$parent;t&&(Bp(t.get("rootElements"),e),e.$parent=null)}(t),e&&!function(e,t){return e.some((function(e){return Pn(e).categoryValueRef===t}))}(r,e)&&function(e){var t=e.$parent;t&&(Bp(t.get("categoryValue"),e),e.$parent=null)}(e)}function s(e,n){return function(e,t,n){return Np(t.get("categoryValue"),e),e.$parent=t,Np(n.get("rootElements"),t),t.$parent=n,e}(e,n,t.getDefinitions())}function c(n,i){var r=Pn(n),o=r.categoryValueRef;o||(o=r.categoryValueRef=i.categoryValue=i.categoryValue||function(e){return e.create("bpmn:CategoryValue")}(e));var a=o.$parent;a||(a=o.$parent=i.category=i.category||function(e){return e.create("bpmn:Category")}(e)),s(o,a,t.getDefinitions())}function l(e,t){var n=t.category,i=t.categoryValue,r=Pn(e);i?(r.categoryValueRef=null,a(i,n,r)):a(null,r.categoryValueRef.$parent,r)}function p(t,n){var i=e.create(t.$type);return o.copyElement(t,i,null,n)}r.invoke(ro,this),this.execute("label.create",(function(e){var t=e.context,n=t.labelTarget;kn(n,"bpmn:Group")&&c(n,t)})),this.revert("label.create",(function(e){var t=e.context,n=t.labelTarget;kn(n,"bpmn:Group")&&l(n,t)})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=Pn(n);if(kn(n,"bpmn:Group")&&!n.labelTarget){var r=t.categoryValue=i.categoryValueRef;r&&(a(r,t.category=r.$parent,i),i.categoryValueRef=null)}})),this.reverted("shape.delete",(function(e){var t=e.context,n=t.shape;if(kn(n,"bpmn:Group")&&!n.labelTarget){var i=t.category,r=t.categoryValue,o=Pn(n);r&&(o.categoryValueRef=r,s(r,i))}})),this.execute("shape.create",(function(e){var t=e.context,n=t.shape;kn(n,"bpmn:Group")&&!n.labelTarget&&Pn(n).categoryValueRef&&c(n,t)})),this.reverted("shape.create",(function(e){var t=e.context,n=t.shape;kn(n,"bpmn:Group")&&!n.labelTarget&&Pn(n).categoryValueRef&&l(n,t)})),i.on("copyPaste.copyElement",770,(function(e){var t=e.descriptor,n=e.element;if(kn(n,"bpmn:Group")&&!n.labelTarget){var i=Pn(n);if(i.categoryValueRef){var r=i.categoryValueRef;t.categoryValue=p(r,!0),r.$parent&&(t.category=p(r.$parent,!0))}}})),i.on("copyPaste.pasteElement",770,(function(e){var t=e.descriptor,n=t.businessObject,i=t.categoryValue,r=t.category;i&&(i=n.categoryValueRef=p(i)),r&&(i.$parent=p(r)),delete t.category,delete t.categoryValue}))}function hu(e,t,n,i){var r,o,a,s;return 0==(r=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y))?null:(o=e.y-n.y,a=e.x-n.x,s=((i.x-n.x)*o-(i.y-n.y)*a)/r,{x:Math.round(e.x+s*(t.x-e.x)),y:Math.round(e.y+s*(t.y-e.y))})}function mu(e){function t(e,t,n){var i,r={x:n.x,y:n.y-50},o={x:n.x-50,y:n.y},a=hu(e,t,n,r),s=hu(e,t,n,o);i=a&&s?fu(a,n)>fu(s,n)?s:a:a||s,e.original=i}e.on("bpmnElement.added",(function(e){var n,i,r=e.element;r.waypoints&&(t((i=(n=r).waypoints)[0],i[1],Nr(n.source)),t(i[i.length-1],i[i.length-2],Nr(n.target)))}))}function fu(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function gu(e){ro.call(this,e);var t=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],(function(e){var n=e.context.shape,i=Pn(n),r=Rn(n);if(An(i,t)){var o=r.get("isHorizontal");void 0===o&&(o=!0),r.set("isHorizontal",o)}}))}du.$inject=["bpmnFactory","bpmnjs","elementRegistry","eventBus","injector","moddleCopy"],x(du,ro),mu.$inject=["eventBus"],gu.$inject=["eventBus"],x(gu,ro);var yu=Math.sqrt,vu=Math.min,bu=Math.max,xu=Math.abs;function _u(e){return Math.pow(e,2)}function wu(e,t){return yu(_u(e.x-t.x)+_u(e.y-t.y))}function Eu(e,t,n,i){var r=t.x-e.x,o=t.y-e.y,a=n.x-e.x,s=n.y-e.y,c=r*r+o*o,l=(r*a+o*s)/c,p=l*l-(a*a+s*s-i*i)/c;if(p<0&&p>-1e-6&&(p=0),p<0)return[];var u=yu(p),d=-l+u,h=-l-u,m={x:e.x-r*d,y:e.y-o*d};return 0===p?[m]:[m,{x:e.x-r*h,y:e.y-o*h}].filter((function(n){return function(e,t,n){return Su(e.x,t.x,n.x)&&Su(e.y,t.y,n.y)}(n,e,t)}))}function Su(e,t,n){return e>=vu(t,n)-Cu&&e<=bu(t,n)+Cu}var Cu=.1;function ku(e,t){return xu(e.x-t.x)<=Cu&&xu(e.y-t.y)<=Cu}function Au(e,t,n,i){var r=0,o=0,a={point:e,delta:{x:0,y:0}},s=function(e,t){var n,i,r,o,a,s,c,l,p,u,d,h,m=0;for(m=0;m line intersections");1===s.length&&(c={type:"bendpoint",position:s[0],segmentIndex:m,bendpointIndex:ku(n,s[0])?m:m+1}),2===s.length&&(d=s[0],h=s[1],c={type:"segment",position:a={x:(d.x+h.x)/2,y:(d.y+h.y)/2},segmentIndex:m,relativeLocation:wu(n,a)/wu(n,i)}),l=wu(c.position,e),(!u||p>l)&&(u=c,p=l)}return u}(e,n),c=s.segmentIndex,l=function(e,t,n,i){var r=n.segmentIndex,o=t.length-e.length;if(i.segmentMove){var a=i.segmentMove.segmentStartIndex,s=i.segmentMove.newSegmentStartIndex;return r===a?s:r>=s?r+o=p&&(c=l?r+1:r-1),rt.length-2||null===l)return a;var p,u,d,h,m,f,g=Ru(n,c),y=Ru(t,l),v=s.position,b=(h=v,m=ll((d=g)[0],d[1]),f=ll(d[0],h),0===m?0:f/m),x=(p=y,u=al(g),al(p)-u);if("bendpoint"===s.type){var _=t.length-n.length,w=s.bendpointIndex,E=n[w];if(-1!==t.indexOf(E))return a;if(0===_){var S=t[w];return{delta:{x:r=S.x-s.position.x,y:o=S.y-s.position.y},point:{x:e.x+r,y:e.y+o}}}_<0&&0!==w&&w{Pn(e.context.element)===e.context.moddleElement&&r(e)})),this.postExecute(["shape.create","connection.create"],(function(e){var n=e.context;if(!1!==(n.hints||{}).createElementsBehavior){var i=n.shape||n.connection;!Jn(i)&&ni(i)&&si(i)&&t.updateLabel(i,si(i))}})),this.postExecute("shape.delete",(function(e){var n=e.context,i=n.labelTarget,r=n.hints||{};i&&!1!==r.unsetLabel&&t.updateLabel(i,null,null,{removeShape:!1})})),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var n=e.context;if(!1!==(n.hints||{}).labelBehavior){var i,r=n.connection.label;r&&r.parent&&(i=o(e),t.moveShape(r,i))}})),this.postExecute(["shape.replace"],(function(e){var t=e.context,n=t.newShape,i=t.oldShape,r=Pn(n);r&&ni(r)&&i.label&&n.label&&(n.label.x=i.label.x,n.label.y=i.label.y)})),this.postExecute("shape.resize",(function(e){var n,i=e.context,r=i.shape,o=i.newBounds,a=i.oldBounds;if(ii(r)){var s=r.label,c=function(e,t,n){var i=Mu(e,t,n);return Mr(Ca(i,e))}(function(e,t){if(!t.length)return;var n=function(e,t){var n=t.map((function(t){return{line:t,distance:cl(e,t)}}));return q(n,"distance")[0].line}(e,t);return sl(e,n)}(Nr(s),[[{x:(n=a).x,y:n.y},{x:n.x+(n.width||0),y:n.y}],[{x:n.x+(n.width||0),y:n.y},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y+(n.height||0)},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y},{x:n.x,y:n.y+(n.height||0)}]]),a,o);t.moveShape(s,c)}}))}function Ou(e,t){function n(e,t){var n=e.context,i=n.connection,r=ee({},n.hints),o=n.newWaypoints||i.waypoints,a=n.oldWaypoints;return void 0===r.startChanged&&(r.startChanged=!!r.connectionStart),void 0===r.endChanged&&(r.endChanged=!!r.connectionEnd),function(e,t,n,i){return Au(e,t,n,i).point}(t,o,a,r)}ro.call(this,e),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var i=e.context.connection,r=i.outgoing;i.incoming.forEach((function(i){var r=i.waypoints[i.waypoints.length-1],o=n(e,r),a=[].concat(i.waypoints.slice(0,-1),[o]);t.updateWaypoints(i,a)})),r.forEach((function(i){var r=i.waypoints[0],o=n(e,r),a=[].concat([o],i.waypoints.slice(1));t.updateWaypoints(i,a)}))})),this.postExecute(["connection.move"],(function(e){var n=e.context,i=n.connection,r=i.outgoing,o=i.incoming,a=n.delta;o.forEach((function(e){var n=e.waypoints[e.waypoints.length-1],i={x:n.x+a.x,y:n.y+a.y},r=[].concat(e.waypoints.slice(0,-1),[i]);t.updateWaypoints(e,r)})),r.forEach((function(e){var n=e.waypoints[0],i={x:n.x+a.x,y:n.y+a.y},r=[].concat([i],e.waypoints.slice(1));t.updateWaypoints(e,r)}))}))}function ju(e,t,n){var i=Fu(e),r=Vu(i,t),o=i[0];return r.length?r[r.length-1]:Mu(o.original||o,n,t)}function Lu(e,t,n){var i=Fu(e),r=Vu(i,t),o=i[i.length-1];return r.length?r[0]:Mu(o.original||o,n,t)}function Iu(e,t,n){var i=Fu(e),r=zu(t,n),o=i[0];return Mu(o.original||o,r,t)}function $u(e,t,n){var i=Fu(e),r=zu(t,n),o=i[i.length-1];return Mu(o.original||o,r,t)}function zu(e,t){return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function Fu(e){var t=e.waypoints;if(!t.length)throw new Error("connection#"+e.id+": no waypoints");return t}function Vu(e,t){return O(F(e,Hu),(function(e){return function(e,t){return"intersect"===Or(t,e,1)}(e,t)}))}function Hu(e){return e.original||e}function Gu(e,t){ro.call(this,e),this.postExecute("shape.replace",(function(e){var n=e.oldShape,i=e.newShape;if(function(e,t){return kn(e,"bpmn:Participant")&&Kn(e)&&kn(t,"bpmn:Participant")&&!Kn(t)}(n,i)){var r,o,a,s,c=(o=Ur([r=n],!1),a=[],s=[],o.forEach((function(e){e!==r&&(e.incoming.forEach((function(e){kn(e,"bpmn:MessageFlow")&&a.push(e)})),e.outgoing.forEach((function(e){kn(e,"bpmn:MessageFlow")&&s.push(e)})))}),[]),{incoming:a,outgoing:s});c.incoming.forEach((function(e){var r=Lu(e,i,n);t.reconnectEnd(e,i,r)})),c.outgoing.forEach((function(e){var r=ju(e,i,n);t.reconnectStart(e,i,r)}))}}),!0)}x(Nu,ro),Nu.$inject=["eventBus","modeling","bpmnFactory","textRenderer"],x(Ou,ro),Ou.$inject=["eventBus","modeling"],Gu.$inject=["eventBus","modeling"],x(Gu,ro);const Wu=["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:EscalationEventDefinition","bpmn:ConditionalEventDefinition","bpmn:SignalEventDefinition"];function Uu(e){const t=Pn(e);if(!(kn(t,"bpmn:BoundaryEvent")||kn(t,"bpmn:StartEvent")&&Yn(t.$parent)))return!1;const n=t.get("eventDefinitions");return!(!n||!n.length)&&Wu.some((e=>kn(n[0],e)))}function qu(e){return kn(e,"bpmn:BoundaryEvent")?"cancelActivity":"isInterrupting"}function Ku(e,t){e.invoke(ro,this),this.postExecuted("shape.replace",(function(e){const n=e.context.oldShape,i=e.context.newShape,r=e.context.hints;if(!Uu(i))return;const o=qu(i);if(r.targetElement&&void 0!==r.targetElement[o])return;const a=Pn(n).get(o);a!==Pn(i).get(o)&&t.updateProperties(i,{[o]:a})}))}function Xu(e,t){ro.call(this,e),this.preExecute("shape.resize",(function(e){var n=e.shape,i=Rn(n),r=i&&i.get("label");r&&r.get("bounds")&&t.updateModdleProperties(n,r,{bounds:void 0})}),!0)}function Yu(e,t,n){ro.call(this,e),this.preExecute("shape.delete",(function(e){var i=e.context.shape;if(1===i.incoming.length&&1===i.outgoing.length){var r,o,a,s=i.incoming[0],c=i.outgoing[0];if(kn(s,"bpmn:SequenceFlow")&&kn(c,"bpmn:SequenceFlow"))if(t.canConnect(s.source,c.target,s)){var l=(r=s.waypoints,o=c.waypoints,(a=hu(Zu(r[r.length-2]),Zu(r[r.length-1]),Zu(o[1]),Zu(o[0])))?[].concat(r.slice(0,r.length-1),[a],o.slice(1)):[Zu(r[0]),Zu(o[o.length-1])]);n.reconnectEnd(s,c.target,l)}}}))}function Zu(e){return e.original||e}function Qu(e,t){ro.call(this,e),this.preExecute("shape.delete",(function(e){var t=e.shape,n=t.parent;kn(t,"bpmn:Participant")&&(e.collaborationRoot=n)}),!0),this.postExecute("shape.delete",(function(e){var n=e.collaborationRoot;if(n&&!n.businessObject.participants.length){var i=t.makeProcess(),r=n.children.slice();t.moveElements(r,{x:0,y:0},i)}}),!0)}function Ju(e,t,n,i){ro.call(this,e);var r=i.get("dragging",!1);function o(e){var i,r,o=e.source,a=e.target;e.parent&&(kn(e,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(o,a)||(r=!0),n.canConnectMessageFlow(o,a)&&(i="bpmn:MessageFlow")),kn(e,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(o,a)||(r=!0),n.canConnectSequenceFlow(o,a)&&(i="bpmn:SequenceFlow")),r&&t.removeConnection(e),i&&t.connect(o,a,{type:i,waypoints:e.waypoints.slice()}))}this.postExecuted("elements.move",(function(e){j(e.closure.allConnections,o)}),!0),this.preExecute("connection.reconnect",(function(e){var i,o,a=e.context,s=a.connection,c=a.newSource||s.source,l=a.newTarget||s.target;(i=n.canConnect(c,l))&&i.type!==s.type&&(o=t.connect(c,l,{type:i.type,associationDirection:i.associationDirection,waypoints:s.waypoints.slice()}),s.parent&&t.removeConnection(s),a.connection=o,r&&function(e,t){var n,i=r.context(),o=i&&i.payload.previousSelection;if(!o||!o.length)return;if(-1===(n=o.indexOf(e)))return;o.splice(n,1,t)}(s,o))})),this.postExecuted("element.updateProperties",(function(e){var n,i=e.context,r=i.properties,o=i.element,a=o.businessObject;r.default&&(n=B(o.outgoing,K({id:o.businessObject.default.id})))&&t.updateProperties(n,{conditionExpression:void 0}),r.conditionExpression&&a.sourceRef.default===a&&t.updateProperties(o.source,{default:void 0})}))}function ed(e,t,n,i,r,o){i.invoke(ro,this),this._bpmnReplace=e,this._elementRegistry=n,this._selection=o,this.postExecuted(["elements.create"],500,(function(e){var n=e.context,i=n.parent,r=n.elements,o=I(r,(function(e,n){var r=t.canReplace([n],n.host||n.parent||i);return r?e.concat(r.replacements):e}),[]);o.length&&this._replaceElements(r,o)}),this),this.postExecuted(["elements.move"],500,(function(e){var n=e.context,i=n.newParent,r=n.newHost,o=[];j(n.closure.topLevel,(function(e){o=Yn(e)?o.concat(e.children):o.concat(e)})),1===o.length&&r&&(i=r);var a=t.canReplace(o,i);a&&this._replaceElements(o,a.replacements,r)}),this),this.postExecute(["shape.replace"],1500,(function(e){var n,i=e.context,r=i.oldShape,o=i.newShape,a=r.attachers;a&&a.length&&(n=t.canReplace(a,o),this._replaceElements(a,n.replacements))}),this),this.postExecuted(["shape.replace"],1500,(function(e){var t=e.context,n=t.oldShape,i=t.newShape;r.unclaimId(n.businessObject.id,n.businessObject),r.updateProperties(i,{id:n.id})}))}Ku.$inject=["injector","modeling"],x(Ku,ro),x(Xu,ro),Xu.$inject=["eventBus","modeling"],x(Yu,ro),Yu.$inject=["eventBus","bpmnRules","modeling"],Qu.$inject=["eventBus","modeling"],x(Qu,ro),x(Ju,ro),Ju.$inject=["eventBus","modeling","bpmnRules","injector"],x(ed,ro),ed.prototype._replaceElements=function(e,t){var n=this._elementRegistry,i=this._bpmnReplace,r=this._selection;j(t,(function(t){var r={type:t.newElementType},o=n.get(t.oldElementId),a=e.indexOf(o);e[a]=i.replaceElement(o,r,{select:!1})})),t&&r.select(e)},ed.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var td={width:140,height:120},nd={width:300,height:60},id={width:60,height:300},rd={width:300,height:150},od={width:150,height:300},ad={width:140,height:120},sd={width:50,height:30};function cd(e){e.on("resize.start",1500,(function(e){var t=e.context,n=t.shape,i=t.direction,r=t.balanced;(kn(n,"bpmn:Lane")||kn(n,"bpmn:Participant"))&&(t.resizeConstraints=function(e,t,n){var i=eu(e),r=!0,o=!0,a=Qp(i,[i]),s=Tr(e),c={},l={},p=Xn(e),u=p?nd:id;/n/.test(t)?l.top=s.bottom-u.height:/e/.test(t)?l.right=s.left+u.width:/s/.test(t)?l.bottom=s.top+u.height:/w/.test(t)&&(l.left=s.right-u.width);a.forEach((function(e){var i=Tr(e);/n/.test(t)&&(p&&i.tops.right+10&&(o=!1),n&&ld(s.right-i.left)<10&&hd(c,"right",i.right-u.width),ld(s.right-i.right)<5&&md(l,"right",i.left+u.width)),/s/.test(t)&&(p&&i.bottom>s.bottom+10&&(o=!1),n&&ld(s.bottom-i.top)<10&&hd(c,"bottom",i.bottom-u.height),ld(s.bottom-i.bottom)<5&&md(l,"bottom",i.top+u.height)),/w/.test(t)&&(!p&&i.left=r.y&&t<=r.y+r.height||n&&t>=r.x&&t<=r.x+r.width)return(o=Jp(r)).length?Ed(o,t,n):r}xd.$inject=["eventBus"];var Sd=180,Cd=160;function kd(e,t,n,i,r,o,a){ro.call(this,t),this._canvas=e,this._eventBus=t,this._modeling=n,this._elementFactory=i,this._bpmnFactory=r,this._bpmnjs=o,this._elementRegistry=a;var s=this;function c(e){return kn(e,"bpmn:SubProcess")&&!Kn(e)}function l(t){var n=t.shape,i=t.newRootElement,r=Pn(n);i=s._addDiagram(i||r),t.newRootElement=e.addRootElement(i)}function p(t){var n=Pn(t.shape);s._removeDiagram(n);var i=t.newRootElement=a.get(mo(n));e.removeRootElement(i)}this.executed("shape.create",(function(e){c(e.shape)&&l(e)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.newRootElement;n&&t.children&&(s._showRecursively(t.children),s._moveChildrenToShape(t,n))}),!0),this.reverted("shape.create",(function(e){c(e.shape)&&p(e)}),!0),this.preExecuted("shape.delete",(function(e){var t=e.shape;if(c(t)){var i=a.get(mo(t));i&&n.removeElements(i.children.slice())}}),!0),this.executed("shape.delete",(function(e){c(e.shape)&&p(e)}),!0),this.reverted("shape.delete",(function(e){c(e.shape)&&l(e)}),!0),this.preExecuted("shape.replace",(function(t){var n=t.oldShape,i=t.newShape;c(n)&&c(i)&&(t.oldRoot=e.removeRootElement(mo(n)))}),!0),this.postExecuted("shape.replace",(function(t){var i=t.newShape,r=t.oldRoot,o=e.findRoot(mo(i));if(r&&o){var a=r.children;n.moveElements(a,{x:0,y:0},o)}}),!0),this.executed("element.updateProperties",(function(e){var t=e.element;if(kn(t,"bpmn:SubProcess")){var n=e.properties,i=e.oldProperties.id,r=n.id;if(i!==r){if(go(t))return a.updateId(t,fo(r)),void a.updateId(i,r);a.get(fo(i))&&a.updateId(fo(i),fo(r))}}}),!0),this.reverted("element.updateProperties",(function(e){var t=e.element;if(kn(t,"bpmn:SubProcess")){var n=e.properties,i=e.oldProperties.id,r=n.id;if(i!==r){if(go(t))return a.updateId(t,fo(i)),void a.updateId(r,i);var o=a.get(fo(r));o&&a.updateId(o,fo(i))}}}),!0),t.on("element.changed",(function(e){var n=e.element;if(go(n)){var i=n,r=a.get(ho(i));r&&r!==i&&t.fire("element.changed",{element:r})}})),this.executed("shape.toggleCollapse",400,(function(e){var t=e.shape;kn(t,"bpmn:SubProcess")&&(Kn(t)?p(e):(l(e),s._showRecursively(t.children)))}),!0),this.reverted("shape.toggleCollapse",400,(function(e){var t=e.shape;kn(t,"bpmn:SubProcess")&&(Kn(t)?p(e):(l(e),s._showRecursively(t.children)))}),!0),this.postExecuted("shape.toggleCollapse",600,(function(e){var t=e.shape;if(kn(t,"bpmn:SubProcess")){var n=e.newRootElement;n&&(Kn(t)?s._moveChildrenToShape(n,t):s._moveChildrenToShape(t,n))}}),!0),t.on("copyPaste.createTree",(function(e){var t=e.element,n=e.children;if(c(t)){var i=mo(t),r=a.get(i);r&&n.push.apply(n,r.children)}})),t.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element,i=e.elements,r=n.parent;if(kn(Rn(r),"bpmndi:BPMNPlane")){var o=ho(r),a=B(i,(function(e){return e.id===o}));a&&(t.parent=a.id)}})),t.on("copyPaste.pasteElement",(function(e){var t=e.descriptor;t.parent&&(c(t.parent)||t.parent.hidden)&&(t.hidden=!0)}))}function Ad(e,t){e.invoke(ro,this),this.postExecuted("shape.replace",(function(e){var n=e.context.oldShape,i=e.context.newShape;if(kn(i,"bpmn:SubProcess")&&(kn(n,"bpmn:Task")||kn(n,"bpmn:CallActivity"))&&Kn(i)){var r,o={x:(r=i).x+r.width/6,y:r.y+r.height/2};t.createShape({type:"bpmn:StartEvent"},o,i)}}))}function Pd(e){ro.call(this,e),this.preExecute("connection.create",(function(e){const{target:t}=e;kn(t,"bpmn:TextAnnotation")&&(e.parent=t.parent)}),!0),this.preExecute(["shape.create","shape.resize","elements.move"],(function(e){const t=e.shapes||[e.shape];1===t.length&&kn(t[0],"bpmn:TextAnnotation")&&(e.hints=e.hints||{},e.hints.autoResize=!1)}),!0)}function Rd(e,t){ro.call(this,e),this.postExecuted("shape.toggleCollapse",1500,(function(e){var n=e.shape;if(!Kn(n)){var i=Ur(n);i.forEach((function(e){var t=e.incoming.slice(),n=e.outgoing.slice();j(t,(function(e){r(e,!0)})),j(n,(function(e){r(e,!1)}))}))}function r(e,r){-1!==i.indexOf(e.source)&&-1!==i.indexOf(e.target)||(r?t.reconnectEnd(e,n,Nr(n)):t.reconnectStart(e,n,Nr(n)))}}),!0)}x(kd,ro),kd.prototype._moveChildrenToShape=function(e,t){var n,i=this._modeling,r=e.children;if(r){var o=(r=r.concat(r.reduce((function(t,n){return n.label&&n.label.parent!==e?t.concat(n.label):t}),[]))).filter((function(e){return!e.hidden}));if(o.length){var a=qr(o);if(t.x){var s=Nr(t),c=Nr(a);n={x:s.x-c.x,y:s.y-c.y}}else n={x:Sd-a.x,y:Cd-a.y};i.moveElements(r,n,t,{autoResize:!1})}else i.moveElements(r,{x:0,y:0},t,{autoResize:!1})}},kd.prototype._showRecursively=function(e,t){var n=this,i=[];return e.forEach((function(e){e.hidden=!!t,i=i.concat(e),e.children&&(i=i.concat(n._showRecursively(e.children,e.collapsed||t)))})),i},kd.prototype._addDiagram=function(e){var t=this._bpmnjs.getDefinitions().diagrams;return e.businessObject||(e=this._createNewDiagram(e)),t.push(e.di.$parent),e},kd.prototype._createNewDiagram=function(e){var t=this._bpmnFactory,n=this._elementFactory,i=t.create("bpmndi:BPMNPlane",{bpmnElement:e}),r=t.create("bpmndi:BPMNDiagram",{plane:i});return i.$parent=r,n.createRoot({id:mo(e),type:e.$type,di:i,businessObject:e,collapsed:!0})},kd.prototype._removeDiagram=function(e){var t=this._bpmnjs.getDefinitions().diagrams,n=B(t,(function(t){return t.plane.bpmnElement.id===e.id}));return t.splice(t.indexOf(n),1),n},kd.$inject=["canvas","eventBus","modeling","elementFactory","bpmnFactory","bpmnjs","elementRegistry"],Ad.$inject=["injector","modeling"],x(Ad,ro),x(Pd,ro),Pd.$inject=["eventBus"],x(Rd,ro),Rd.$inject=["eventBus","modeling"];function Md(e,t,n){ro.call(this,e),this.executed(["shape.toggleCollapse"],500,(function(e){var t,n=e.context.shape;kn(n,"bpmn:SubProcess")&&(n.collapsed?Rn(n).isExpanded=!1:((t=n.children).length&&t.forEach((function(e){"label"!==e.type||e.businessObject.name||(e.hidden=!0)})),Rn(n).isExpanded=!0))})),this.reverted(["shape.toggleCollapse"],500,(function(e){var t=e.context.shape;t.collapsed?Rn(t).isExpanded=!1:Rn(t).isExpanded=!0})),this.postExecuted(["shape.toggleCollapse"],500,(function(e){var i,r=e.context.shape,o=t.getDefaultSize(r);i=r.collapsed?function(e,t){return{x:e.x+(e.width-t.width)/2,y:e.y+(e.height-t.height)/2,width:t.width,height:t.height}}(r,o):function(e,t){var n,i,r=e.children,o=t;return(n=Kp((i=r,i.filter((function(e){return!e.hidden}))).concat([e])))?(o.width=Math.max(n.width,o.width),o.height=Math.max(n.height,o.height),o.x=n.x+(n.width-o.width)/2,o.y=n.y+(n.height-o.height)/2):(o.x=e.x+(e.width-o.width)/2,o.y=e.y+(e.height-o.height)/2),o}(r,o),n.resizeShape(r,i,null,{autoResize:!r.collapsed&&"nwse"})}))}function Td(e,t,n,i){t.invoke(ro,this),this.preExecute("shape.delete",(function(e){var t=e.context.shape,r=t.businessObject;Jn(t)||(kn(t,"bpmn:Participant")&&Kn(t)&&n.ids.unclaim(r.processRef.id),i.unclaimId(r.id,r))})),this.preExecute("connection.delete",(function(e){var t=e.context.connection.businessObject;i.unclaimId(t.id,t)})),this.preExecute("canvas.updateRoot",(function(){var t=e.getRootElement(),i=t.businessObject;kn(t,"bpmn:Collaboration")&&n.ids.unclaim(i.id)}))}function Dd(e,t){ro.call(this,e),this.preExecute("connection.delete",(function(e){var n=e.context.connection,i=n.source;(function(e,t){if(!kn(e,"bpmn:SequenceFlow"))return!1;var n=Pn(t),i=Pn(e);return n.get("default")===i})(n,i)&&t.updateProperties(i,{default:null})}))}x(Md,ro),Md.$inject=["eventBus","elementFactory","modeling"],x(Td,ro),Td.$inject=["canvas","injector","moddle","modeling"],x(Dd,ro),Dd.$inject=["eventBus","modeling"];function Bd(e,t){var n;ro.call(this,e);var i=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(i,5e3,(function(e){(n=n||new Nd).enter()})),this.postExecuted(i,500,(function(e){!function(){if(!n)throw new Error("out of bounds release");var e=n.leave();e&&(t.updateLaneRefs(n.flowNodes,n.lanes),n=null)}()})),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],(function(e){var t=e.context.shape,i=function(){if(!n)throw new Error("out of bounds release");return n}();t.labelTarget||(kn(t,"bpmn:Lane")&&i.addLane(t),kn(t,"bpmn:FlowNode")&&i.addFlowNode(t))}))}function Nd(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}Bd.$inject=["eventBus","modeling"],x(Bd,ro);const Od={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","compensateBoundaryEventBehaviour","createBehavior","createDataObjectBehavior","createParticipantBehavior","dataInputAssociationBehavior","dataStoreBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","fixHoverBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","layoutConnectionBehavior","messageFlowBehavior","nonInterruptingBehavior","removeElementBehavior","removeEmbeddedLabelBoundsBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","rootElementReferenceBehavior","spaceToolBehavior","subProcessPlaneBehavior","subProcessStartEventBehavior","textAnnotationBehavior","toggleCollapseConnectionBehaviour","toggleElementCollapseBehaviour","unclaimIdBehavior","updateFlowNodeRefsBehavior","unsetDefaultFlowBehavior"],adaptiveLabelPositioningBehavior:["type",fp],appendBehavior:["type",yp],associationBehavior:["type",vp],attachEventBehavior:["type",bp],boundaryEventBehavior:["type",_p],compensateBoundaryEventBehaviour:["type",wp],createBehavior:["type",kp],createDataObjectBehavior:["type",Ap],createParticipantBehavior:["type",Dp],dataInputAssociationBehavior:["type",Lp],dataStoreBehavior:["type",zp],deleteLaneBehavior:["type",nu],detachEventBehavior:["type",iu],dropOnFlowBehavior:["type",ou],eventBasedGatewayBehavior:["type",cu],fixHoverBehavior:["type",uu],groupBehavior:["type",du],importDockingFix:["type",mu],isHorizontalFix:["type",gu],labelBehavior:["type",Nu],layoutConnectionBehavior:["type",Ou],messageFlowBehavior:["type",Gu],nonInterruptingBehavior:["type",Ku],removeElementBehavior:["type",Yu],removeEmbeddedLabelBoundsBehavior:["type",Xu],removeParticipantBehavior:["type",Qu],replaceConnectionBehavior:["type",Ju],replaceElementBehaviour:["type",ed],resizeBehavior:["type",cd],resizeLaneBehavior:["type",yd],rootElementReferenceBehavior:["type",vd],spaceToolBehavior:["type",xd],subProcessPlaneBehavior:["type",kd],subProcessStartEventBehavior:["type",Ad],textAnnotationBehavior:["type",Pd],toggleCollapseConnectionBehaviour:["type",Rd],toggleElementCollapseBehaviour:["type",Md],unclaimIdBehavior:["type",Td],unsetDefaultFlowBehavior:["type",Dd],updateFlowNodeRefsBehavior:["type",Bd]};function jd(e,t){var n=Or(e,t,-15);return"intersect"!==n?n:null}function Ld(e){vc.call(this,e)}function Id(e){return!e||Jn(e)}function $d(e){do{if(kn(e,"bpmn:Process"))return Pn(e);if(kn(e,"bpmn:Participant"))return Pn(e).processRef||Pn(e)}while(e=e.parent)}function zd(e){return kn(e,"bpmn:TextAnnotation")}function Fd(e){return kn(e,"bpmn:Group")&&!e.labelTarget}function Vd(e){return kn(e,"bpmn:BoundaryEvent")&&Ud(e,"bpmn:CompensateEventDefinition")}function Hd(e){return Pn(e).isForCompensation}function Gd(e){for(var t=e;t=t.parent;){if(kn(t,"bpmn:FlowElementsContainer"))return Pn(t);if(kn(t,"bpmn:Participant"))return Pn(t).processRef}return null}function Wd(e,t){return Gd(e)===Gd(t)}function Ud(e,t){return!!B(Pn(e).eventDefinitions||[],(function(e){return kn(e,t)}))}function qd(e,t){return(Pn(e).eventDefinitions||[]).every((function(e){return kn(e,t)}))}function Kd(e,t){var n=function(e){for(var t=[];e;)(e=e.parent)&&t.push(e);return t}(t);return-1!==n.indexOf(e)}function Xd(e,t,n){if(Id(e)||Id(t))return null;if(!kn(n,"bpmn:DataAssociation")){if(lh(e,t))return{type:"bpmn:MessageFlow"};if(ph(e,t))return{type:"bpmn:SequenceFlow"}}var i=uh(e,t);return i||(ch(e,t)?{type:"bpmn:Association",associationDirection:"One"}:!!sh(e,t)&&{type:"bpmn:Association",associationDirection:"None"})}function Yd(e,t){return!(!Jn(e)&&!Fd(e))||!(kn(t,"bpmn:Participant")&&!Kn(t))&&(kn(e,"bpmn:Participant")?kn(t,"bpmn:Process")||kn(t,"bpmn:Collaboration"):An(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?t===e.parent:kn(e,"bpmn:Lane")?kn(t,"bpmn:Participant")||kn(t,"bpmn:Lane"):!(kn(e,"bpmn:BoundaryEvent")&&(n=e,!Pn(n).cancelActivity||!Jd(n)&&!eh(n)))&&(kn(e,"bpmn:FlowElement")&&!kn(e,"bpmn:DataStoreReference")?kn(t,"bpmn:FlowElementsContainer")?Kn(t):An(t,["bpmn:Participant","bpmn:Lane"]):kn(e,"bpmn:DataStoreReference")&&kn(t,"bpmn:Collaboration")?z(Pn(t).get("participants"),(function(e){return!!e.get("processRef")})):An(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?An(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):!!kn(e,"bpmn:MessageFlow")&&(kn(t,"bpmn:Collaboration")||e.source.parent==t||e.target.parent==t)));var n}function Zd(e){return kn(e,"bpmn:Lane")}function Qd(e){return!!function(e){return!Jn(e)&&kn(e,"bpmn:BoundaryEvent")}(e)||(!(!kn(e,"bpmn:IntermediateThrowEvent")||!Jd(e))||kn(e,"bpmn:IntermediateCatchEvent")&&eh(e))}function Jd(e){var t=Pn(e);return t&&!(t.eventDefinitions&&t.eventDefinitions.length)}function eh(e){return th(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function th(e,t){return t.some((function(t){return Ud(e,t)}))}function nh(e,t,n,i){if(Array.isArray(e)||(e=[e]),1!==e.length)return!1;var r=e[0];return!Jn(r)&&(!!Qd(r)&&(!Yn(t)&&(!(!kn(t,"bpmn:Activity")||Hd(t))&&(!(i&&!jd(i,t))&&(!function(e){return kn(e,"bpmn:ReceiveTask")&&B(e.incoming,(function(e){return kn(e.source,"bpmn:EventBasedGateway")}))}(t)&&"attach")))))}function ih(e,t,n){if(!t)return!1;var i={replacements:[]};return j(e,(function(e){Yn(t)||kn(e,"bpmn:StartEvent")&&"label"!==e.type&&Yd(e,t)&&(function(e){return e&&!1!==Pn(e).isInterrupting}(e)||i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),(function(e){return Zn(e,"bpmn:ErrorEventDefinition")}(e)||function(e){return Zn(e,"bpmn:EscalationEventDefinition")}(e)||function(e){return Zn(e,"bpmn:CompensateEventDefinition")}(e))&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),th(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&kn(t,"bpmn:SubProcess")&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"})),kn(t,"bpmn:Transaction")||Ud(e,"bpmn:CancelEventDefinition")&&"label"!==e.type&&(kn(e,"bpmn:EndEvent")&&Yd(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:EndEvent"}),kn(e,"bpmn:BoundaryEvent")&&nh(e,t,0,n)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:BoundaryEvent"}))})),!!i.replacements.length&&i}function rh(e,t){return!z(e,Zd)&&(!t||e.every((function(e){return Yd(e,t)})))}function oh(e,t,n,i){return!!t&&(!(!Jn(e)&&!Fd(e))||n!==t&&((!n||!Kd(n,t))&&(Yd(e,t)||dh(e,t))))}function ah(e,t){return kn(e,"bpmn:SubProcess")?Kn(e)&&(!t||t.width>=100&&t.height>=80):!!kn(e,"bpmn:Lane")||(!!kn(e,"bpmn:Participant")||(!!zd(e)||!!Fd(e)))}function sh(e,t){return!Kd(t,e)&&!Kd(e,t)&&(!!function(e,t){var n=zd(e),i=zd(t);return(n||i)&&n!==i}(e,t)||!!uh(e,t))}function ch(e,t){return Wd(e,t)&&Vd(e)&&kn(t,"bpmn:Activity")&&(n=e,!t.attachers.includes(n))&&!Yn(t);var n}function lh(e,t){return!(mh(e)&&!mh(t))&&(kn(i=e,"bpmn:InteractionNode")&&!kn(i,"bpmn:BoundaryEvent")&&(!kn(i,"bpmn:Event")||kn(i,"bpmn:ThrowEvent")&&qd(i,"bpmn:MessageEventDefinition"))&&function(e){return kn(e,"bpmn:InteractionNode")&&!Hd(e)&&(!kn(e,"bpmn:Event")||kn(e,"bpmn:CatchEvent")&&qd(e,"bpmn:MessageEventDefinition"))&&!(kn(e,"bpmn:BoundaryEvent")&&!Ud(e,"bpmn:MessageEventDefinition"))}(t)&&(n=t,!($d(e)===$d(n))));var n,i}function ph(e,t){return kn(n=e,"bpmn:FlowNode")&&!kn(n,"bpmn:EndEvent")&&!Yn(n)&&!(kn(n,"bpmn:IntermediateThrowEvent")&&Ud(n,"bpmn:LinkEventDefinition"))&&!Vd(n)&&!Hd(n)&&function(e){return kn(e,"bpmn:FlowNode")&&!kn(e,"bpmn:StartEvent")&&!kn(e,"bpmn:BoundaryEvent")&&!Yn(e)&&!(kn(e,"bpmn:IntermediateCatchEvent")&&Ud(e,"bpmn:LinkEventDefinition"))&&!Hd(e)}(t)&&Wd(e,t)&&!(kn(e,"bpmn:EventBasedGateway")&&!function(e){return kn(e,"bpmn:ReceiveTask")||kn(e,"bpmn:IntermediateCatchEvent")&&(Ud(e,"bpmn:MessageEventDefinition")||Ud(e,"bpmn:TimerEventDefinition")||Ud(e,"bpmn:ConditionalEventDefinition")||Ud(e,"bpmn:SignalEventDefinition"))}(t));var n}function uh(e,t){return An(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&An(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:!(!An(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])||!An(e,["bpmn:Activity","bpmn:CatchEvent"]))&&{type:"bpmn:DataOutputAssociation"}}function dh(e,t,n){if(!t)return!1;if(Array.isArray(e)){if(1!==e.length)return!1;e=e[0]}return t.source!==e&&t.target!==e&&(An(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!Jn(t)&&kn(e,"bpmn:FlowNode")&&!kn(e,"bpmn:BoundaryEvent")&&Yd(e,t.parent))}function hh(e,t){return!!Jn(t)||!(kn(t,"bpmn:Lane")&&!function(e,t){return e&&t&&-1!==e.indexOf(t)}(e,t.parent))}function mh(e){return Dc(e,"bpmn:Process")||Dc(e,"bpmn:Collaboration")}x(Ld,vc),Ld.$inject=["eventBus"],Ld.prototype.init=function(){this.addRule("connection.start",(function(e){return function(e){if(Id(e))return null;return An(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"])}(e.source)})),this.addRule("connection.create",(function(e){var t=e.source,n=e.target,i=e.hints||{},r=i.targetParent;if(i.targetAttach)return!1;r&&(n.parent=r);try{return Xd(t,n)}finally{r&&(n.parent=null)}})),this.addRule("connection.reconnect",(function(e){var t=e.connection;return Xd(e.source,e.target,t)})),this.addRule("connection.updateWaypoints",(function(e){return{type:e.connection.type}})),this.addRule("shape.resize",(function(e){return ah(e.shape,e.newBounds)})),this.addRule("elements.create",(function(e){var t=e.elements,n=e.position,i=e.target;return!(Qn(i)&&!dh(t,i))&&$(t,(function(e){return Qn(e)?Xd(e.source,e.target,e):e.host?nh(e,e.host,null,n):oh(e,i,null)}))})),this.addRule("elements.move",(function(e){var t=e.target,n=e.shapes,i=e.position;return nh(n,t,null,i)||ih(n,t,i)||rh(n,t)||dh(n,t)})),this.addRule("shape.create",(function(e){return oh(e.shape,e.target,e.source,e.position)})),this.addRule("shape.attach",(function(e){return nh(e.shape,e.target,null,e.position)})),this.addRule("element.copy",(function(e){var t=e.element;return hh(e.elements,t)}))},Ld.prototype.canConnectMessageFlow=lh,Ld.prototype.canConnectSequenceFlow=ph,Ld.prototype.canConnectDataAssociation=uh,Ld.prototype.canConnectAssociation=sh,Ld.prototype.canConnectCompensationAssociation=ch,Ld.prototype.canMove=rh,Ld.prototype.canAttach=nh,Ld.prototype.canReplace=ih,Ld.prototype.canDrop=Yd,Ld.prototype.canInsert=dh,Ld.prototype.canCreate=oh,Ld.prototype.canConnect=Xd,Ld.prototype.canResize=ah,Ld.prototype.canCopy=hh;const fh={__depends__:[el],__init__:["bpmnRules"],bpmnRules:["type",Ld]};function gh(e,t){e.on("saveXML.start",2e3,(function(){j(t.getRootElements(),(function(e){var t,n=Rn(e);t=F(O(Ur([e],!1),(function(t){return t!==e&&!t.labelTarget})),Rn),n.set("planeElement",t)}))}))}gh.$inject=["eventBus","canvas"];const yh={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",gh]};function vh(e){ro.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.parent=o.parent),n.parentIndex=o.index)})),this.preExecute(["shape.move","connection.move"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.newParent||i.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.newParent=o.parent),n.newParentIndex=o.index)}))}function bh(e,t){vh.call(this,e);var n=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:9,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:TextAnnotation",order:{level:9}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function i(e){var t=e.order;if(t||(e.order=t=function(e){if(e.labelTarget)return{level:10};var t=B(n,(function(t){return An(e,[t.type])}));return t&&t.order||{level:1}}(e)),!t)throw new Error(`no order for <${e.id}>`);return t}this.getOrdering=function(e,n){if(e.labelTarget||kn(e,"bpmn:TextAnnotation"))return{parent:t.findRoot(n)||t.getRootElement(),index:-1};var r=i(e);r.containers&&(n=function(e,t,n){for(var i=t;i&&!An(i,n);)i=i.parent;if(!i)throw new Error(`no parent for <${e.id}> in <${t&&t.id}>`);return i}(e,n,r.containers));var o=n.children.indexOf(e),a=N(n.children,(function(t){return!(!e.labelTarget&&t.labelTarget)&&r.levelim(e.dy)?"x":"y",i=e["d"+n],r=e[n]-i;if(im(i)<5)return!1;i<0&&(i*=-1),Ho(e)&&(i*=-1);var o=function(e,t){if("x"===e){if(t>0)return"e";if(t<0)return"w"}if("y"===e){if(t>0)return"s";if(t<0)return"n"}return null}(n,i),a=this._canvas.getRootElement();!Go(e)&&e.hover&&(a=e.hover);var s=[...Ur(a,!0),...a.attachers||[]],c=this.calculateAdjustments(s,n,i,r),l=function(e,t,n,i,r){var o=e.movingShapes,a=e.resizingShapes;if(!a.length)return;var s,c,l={};return j(a,(function(e){var p,u,d,h,m,f,g=e.attachers,y=e.children,v=Tr(e),b=O(y,(function(e){return!(Qn(e)||Jn(e)||mm(o,e)||mm(a,e))})),x=O(y,(function(e){return!Qn(e)&&!Jn(e)&&mm(o,e)})),_=[],w=[];b.length&&(u=dm(Tr(qr(b))),p=i-v[sm[n]]+u[sm[n]],"n"===n?l.bottom=c=R(c)?Math.min(c,p):p:"w"===n?l.right=c=R(c)?Math.min(c,p):p:"s"===n?l.top=s=R(s)?Math.max(s,p):p:"e"===n&&(l.left=s=R(s)?Math.max(s,p):p)),x.length&&(d=dm(Tr(qr(x))),p=i-d[sm[lm[n]]]+v[sm[lm[n]]],"n"===n?l.bottom=c=R(c)?Math.min(c,p):p:"w"===n?l.right=c=R(c)?Math.min(c,p):p:"s"===n?l.top=s=R(s)?Math.max(s,p):p:"e"===n&&(l.left=s=R(s)?Math.max(s,p):p)),g&&g.length&&(g.forEach((function(e){mm(o,e)?_.push(e):w.push(e)})),_.length&&(h=Tr(qr(_.map(Nr))),m=v[sm[lm[n]]]-(h[sm[lm[n]]]-i)),w.length&&(f=Tr(qr(w.map(Nr)))[sm[n]]-(v[sm[n]]-i)),"n"===n?(p=Math.min(m||1/0,f||1/0),l.bottom=c=R(c)?Math.min(c,p):p):"w"===n?(p=Math.min(m||1/0,f||1/0),l.right=c=R(c)?Math.min(c,p):p):"s"===n?(p=Math.max(m||-1/0,f||-1/0),l.top=s=R(s)?Math.max(s,p):p):"e"===n&&(p=Math.max(m||-1/0,f||-1/0),l.left=s=R(s)?Math.max(s,p):p));var E=r&&r[e.id];E&&("n"===n?(p=i+e[om[t]]-E[om[t]],l.bottom=c=R(c)?Math.min(c,p):p):"w"===n?(p=i+e[om[t]]-E[om[t]],l.right=c=R(c)?Math.min(c,p):p):"s"===n?(p=i-e[om[t]]+E[om[t]],l.top=s=R(s)?Math.max(s,p):p):"e"===n&&(p=i-e[om[t]]+E[om[t]],l.left=s=R(s)?Math.max(s,p):p))})),l}(c,n,o,r,this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:o,shapes:c.resizingShapes,start:r}));return ee(t,c,{axis:n,direction:o,spaceToolConstraints:l,start:r}),xa("resize-"+("x"===n?"ew":"ns")),!0},um.prototype.calculateAdjustments=function(e,t,n,i){var r=this._rules,o=[],a=[],s=[],c=[];function l(e){o.includes(e)||o.push(e);var t=e.label;t&&!o.includes(t)&&o.push(t)}j(e,(function(e){if(e.parent&&!Jn(e))if(Qn(e))c.push(e);else{var o=e[t],p=o+e[om[t]];if(function(e){return!!e.host}(e)&&(n>0&&Nr(e)[t]>i||n<0&&Nr(e)[t]0&&o>i||n<0&&pi&&r.allowed("shape.resize",{shape:e})?(u=e,void(a.includes(u)||a.push(u))):void 0;l(e)}}})),j(o,(function(e){var t=e.attachers;t&&j(t,(function(e){l(e)}))}));var p=o.concat(a);return j(s,(function(e){var t=e.host;mm(p,t)&&l(e)})),p=o.concat(a),j(c,(function(e){var t=e.source,n=e.target,i=e.label;mm(p,t)&&mm(p,n)&&i&&l(i)})),{movingShapes:o,resizingShapes:a}},um.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},um.prototype.isActive=function(){var e=this._dragging.context();return!!e&&/^spaceTool/.test(e.prefix)};var fm="djs-dragging",gm="djs-resizing",ym=Math.max;function vm(e,t,n,i,r){function o(e,t){j(e,(function(e){r.addDragger(e,t),n.addMarker(e,fm)}))}e.on("spaceTool.selection.start",(function(e){var t=n.getLayer("space"),r=e.context,o="M 0,-10000 L 0,10000",a="M -10000,0 L 10000,0",s=qe("g");Ie(s,i.cls("djs-crosshair-group",["no-events"])),Ne(t,s);var c=qe("path");Ie(c,"d",o),ze(c).add("djs-crosshair"),Ne(s,c);var l=qe("path");Ie(l,"d",a),ze(l).add("djs-crosshair"),Ne(s,l),r.crosshairGroup=s})),e.on("spaceTool.selection.move",(function(e){Ci(e.context.crosshairGroup,e.x,e.y)})),e.on("spaceTool.selection.cleanup",(function(e){var t=e.context.crosshairGroup;t&&nt(t)})),e.on("spaceTool.move",250,(function(e){var a=e.context,s=a.line,c=a.axis,l=a.movingShapes,p=a.resizingShapes;if(a.initialized){if(!a.dragGroup){var u=n.getLayer("space");Ie(s=qe("path"),"d","M0,0 L0,0"),ze(s).add("djs-crosshair"),Ne(u,s),a.line=s;var d=qe("g");Ie(d,i.cls("djs-drag-group",["no-events"])),Ne(n.getActiveLayer(),d),o(l,d),o(a.movingConnections=t.filter((function(e){var t=!1;j(l,(function(n){j(n.outgoing,(function(n){e===n&&(t=!0)}))}));var n=!1;j(l,(function(t){j(t.incoming,(function(t){e===t&&(n=!0)}))}));var i=!1;j(p,(function(t){j(t.outgoing,(function(t){e===t&&(i=!0)}))}));var r=!1;return j(p,(function(t){j(t.incoming,(function(t){e===t&&(r=!0)}))})),Qn(e)&&(t||i)&&(n||r)})),d),a.dragGroup=d}if(!a.frameGroup){var h=qe("g");Ie(h,i.cls("djs-frame-group",["no-events"])),Ne(n.getActiveLayer(),h);var m=[];j(p,(function(e){var t=r.addFrame(e,h),i=t.getBBox();m.push({element:t,initialBounds:i}),n.addMarker(e,gm)})),a.frameGroup=h,a.frames=m}Ie(s,{d:{x:"M"+e.x+", -10000 L"+e.x+", 10000",y:"M -10000, "+e.y+" L 10000, "+e.y}[c]});var f={x:e.dx,y:e.dy};f[{x:"y",y:"x"}[a.axis]]=0,Ci(a.dragGroup,f.x,f.y),j(a.frames,(function(e){var t,n,i=e.element,r=e.initialBounds;"e"===a.direction?Ie(i,{width:ym(r.width+f.x,5)}):Ie(i,{width:t=ym(r.width-f.x,5),x:r.x+r.width-t}),"s"===a.direction?Ie(i,{height:ym(r.height+f.y,5)}):Ie(i,{height:n=ym(r.height-f.y,5),y:r.y+r.height-n})}))}})),e.on("spaceTool.cleanup",(function(e){var t=e.context,i=t.movingShapes,r=t.movingConnections,o=t.resizingShapes,a=t.line,s=t.dragGroup,c=t.frameGroup;j(i,(function(e){n.removeMarker(e,fm)})),j(r,(function(e){n.removeMarker(e,fm)})),s&&(nt(a),nt(s)),j(o,(function(e){n.removeMarker(e,gm)})),c&&nt(c)}))}vm.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];const bm={__init__:["spaceToolPreview"],__depends__:[Xc,el,tm,pp,Nh],spaceTool:["type",um],spaceToolPreview:["type",vm]};function xm(e){e.invoke(um,this)}xm.$inject=["injector"],x(xm,um),xm.prototype.calculateAdjustments=function(e,t,n,i){var r=um.prototype.calculateAdjustments.call(this,e,t,n,i);return r.resizingShapes=r.resizingShapes.filter((function(e){return!kn(e,"bpmn:TextAnnotation")&&(!function(e){return kn(e,"bpmn:Participant")&&!Pn(e).processRef}(e)||!("y"===t&&Xn(e)||"x"===t&&!Xn(e)))})),r};const _m={__depends__:[bm],spaceTool:["type",xm]};function wm(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],(function(){this.clear(!1)}),this)}wm.$inject=["eventBus","injector"],wm.prototype.execute=function(e,t){if(!e)throw new Error("command required");this._currentExecution.trigger="execute";const n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction()},wm.prototype.canExecute=function(e,t){const n={command:e,context:t},i=this._getHandler(e);let r=this._fire(e,"canExecute",n);if(void 0===r){if(!i)return!1;i.canExecute&&(r=i.canExecute(t))}return r},wm.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,!1!==e&&this._fire("changed",{trigger:"clear"})},wm.prototype.undo=function(){let e,t=this._getUndoAction();if(t){for(this._currentExecution.trigger="undo",this._pushAction(t);t&&(this._internalUndo(t),e=this._getUndoAction(),e&&e.id===t.id);)t=e;this._popAction()}},wm.prototype.redo=function(){let e,t=this._getRedoAction();if(t){for(this._currentExecution.trigger="redo",this._pushAction(t);t&&(this._internalExecute(t,!0),e=this._getRedoAction(),e&&e.id===t.id);)t=e;this._popAction()}},wm.prototype.register=function(e,t){this._setHandler(e,t)},wm.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");const n=this._injector.instantiate(t);this.register(e,n)},wm.prototype.canUndo=function(){return!!this._getUndoAction()},wm.prototype.canRedo=function(){return!!this._getRedoAction()},wm.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},wm.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},wm.prototype._internalUndo=function(e){const t=e.command,n=e.context,i=this._getHandler(t);this._atomicDo((()=>{this._fire(t,"revert",e),i.revert&&this._markDirty(i.revert(n)),this._revertedAction(e),this._fire(t,"reverted",e)}))},wm.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);const i=t?[e+"."+t,t]:[e];let r;n=this._eventBus.createEvent(n);for(const o of i)if(r=this._eventBus.fire("commandStack."+o,n),n.cancelBubble)break;return r},wm.prototype._createId=function(){return this._uid++},wm.prototype._atomicDo=function(e){const t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}},wm.prototype._internalExecute=function(e,t){const n=e.command,i=e.context,r=this._getHandler(n);if(!r)throw new Error("no command handler registered for <"+n+">");this._pushAction(e),t||(this._fire(n,"preExecute",e),r.preExecute&&r.preExecute(i),this._fire(n,"preExecuted",e)),this._atomicDo((()=>{this._fire(n,"execute",e),r.execute&&this._markDirty(r.execute(i)),this._executedAction(e,t),this._fire(n,"executed",e)})),t||(this._fire(n,"postExecute",e),r.postExecute&&r.postExecute(i),this._fire(n,"postExecuted",e)),this._popAction()},wm.prototype._pushAction=function(e){const t=this._currentExecution,n=t.actions,i=n[0];if(t.atomic)throw new Error("illegal invocation in or phase (action: "+e.command+")");e.id||(e.id=i&&i.id||this._createId()),n.push(e)},wm.prototype._popAction=function(){const e=this._currentExecution,t=e.trigger,n=e.actions,i=e.dirty;n.pop(),n.length||(this._eventBus.fire("elements.changed",{elements:W("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:t}),e.trigger=null)},wm.prototype._markDirty=function(e){const t=this._currentExecution;e&&(e=A(e)?e:[e],t.dirty=t.dirty.concat(e))},wm.prototype._executedAction=function(e,t){const n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},wm.prototype._revertedAction=function(e){this._stackIdx--},wm.prototype._getHandler=function(e){return this._handlerMap[e]},wm.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t};const Em={commandStack:["type",wm]};function Sm(e,t){if("function"!=typeof t)throw new Error("removeFn iterator must be a function");if(e){for(var n;n=e[0];)t(n);return e}}function Cm(e,t,n){ro.call(this,t);var i=e.get("movePreview",!1);t.on("shape.move.start",1400,(function(e){var t=e.context,n=t.shapes,i=t.validatedShapes;t.shapes=km(n),t.validatedShapes=km(i)})),i&&t.on("shape.move.start",250,(function(e){var t=e.context,n=t.shapes,r=[];j(n,(function(e){j(e.labels,(function(n){n.hidden||-1!==t.shapes.indexOf(n)||r.push(n),e.labelTarget&&r.push(e)}))})),j(r,(function(e){i.makeDraggable(t,e,!0)}))})),this.preExecuted("elements.move",1400,(function(e){var t=e.context.closure,n=t.enclosedElements,i=[];j(n,(function(e){j(e.labels,(function(e){n[e.id]||i.push(e)}))})),t.addAll(i)})),this.preExecute(["connection.delete","shape.delete"],(function(e){var t=e.context;Sm((t.connection||t.shape).labels,(function(e){n.removeShape(e,{nested:!0})}))})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=n.labelTarget;i&&(t.labelTargetIndex=Op(i.labels,n),t.labelTarget=i,n.labelTarget=null)})),this.revert("shape.delete",(function(e){var t=e.context,n=t.shape,i=t.labelTarget,r=t.labelTargetIndex;i&&(Np(i.labels,n,r),n.labelTarget=i)}))}function km(e){return O(e,(function(t){return-1===e.indexOf(t.labelTarget)}))}x(Cm,ro),Cm.$inject=["injector","eventBus","modeling"];const Am={__init__:["labelSupport"],labelSupport:["type",Cm]};var Pm="attach-ok";function Rm(e,t,n,i,r){ro.call(this,t);var o=e.get("movePreview",!1);t.on("shape.move.start",1401,(function(e){var t,n,i=e.context,r=i.shapes,o=i.validatedShapes;i.shapes=(n=Mm(t=r),U("id",t,n)),i.validatedShapes=function(e){var t=G(e,"id");return O(e,(function(e){for(;e;){if(e.host&&t[e.host.id])return!1;e=e.parent}return!0}))}(o)})),o&&t.on("shape.move.start",251,(function(e){var t=e.context;j(Mm(t.shapes),(function(e){o.makeDraggable(t,e,!0),j(e.labels,(function(e){o.makeDraggable(t,e,!0)}))}))})),o&&t.on("shape.move.start",(function(e){var i=e.context.shapes;if(1===i.length){var r=i[0].host;r&&(n.addMarker(r,Pm),t.once(["shape.move.out","shape.move.cleanup"],(function(){n.removeMarker(r,Pm)})))}})),this.preExecuted("elements.move",1401,(function(e){var t=e.context,n=t.closure;j(Mm(t.shapes),(function(e){n.add(e,n.topLevel[e.host.id])}))})),this.postExecuted("elements.move",(function(e){var t=e.context,n=t.shapes,i=t.newHost;i&&1!==n.length||j(i?n:O(n,(function(e){var t,i=e.host;return function(e){return!!e.host}(e)&&(t=i,!(-1!==n.indexOf(t)))})),(function(e){r.updateAttachment(e,i)}))})),this.postExecuted("elements.move",(function(e){j(e.context.shapes,(function(e){j(e.attachers,(function(e){j(e.outgoing.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)})),j(e.incoming.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)}))}))}))})),this.postExecute("shape.create",(function(e){var t=e.context,n=t.shape,i=t.host;i&&r.updateAttachment(n,i)})),this.postExecute("shape.replace",(function(e){var t=e.context,n=t.oldShape,o=t.newShape;Sm(n.attachers,(function(e){"attach"===i.allowed("elements.move",{target:o,shapes:[e]})?r.updateAttachment(e,o):r.removeShape(e)})),o.attachers.length&&j(o.attachers,(function(e){var t=Tu(e,n,o);r.moveShape(e,t,e.parent)}))})),this.postExecute("shape.resize",(function(e){var t=e.context,n=t.shape,i=t.oldBounds,o=t.newBounds,a=n.attachers;!1!==(t.hints||{}).attachSupport&&j(a,(function(e){var t=Tu(e,i,o);r.moveShape(e,t,e.parent),j(e.labels,(function(e){r.moveShape(e,t,e.parent)}))}))})),this.preExecute("shape.delete",(function(e){var t=e.context.shape;Sm(t.attachers,(function(e){r.removeShape(e)})),t.host&&r.updateAttachment(t,null)}))}function Mm(e){return _(F(e,(function(e){return e.attachers||[]})))}x(Rm,ro),Rm.$inject=["injector","eventBus","canvas","rules","modeling"];const Tm={__depends__:[el],__init__:["attachSupport"],attachSupport:["type",Rm]};function Dm(e){this._model=e}function Bm(e,t,n){ro.call(this,e),this._bpmnFactory=t;var i=this;function r(e){j(e.context.oldRoot.children,(function(e){kn(e,"bpmn:BaseElement")&&i.updateParent(e)}))}function o(e){var t=e.context.shape;kn(t,"bpmn:BaseElement")&&i.updateBounds(t)}function a(e){i.updateConnection(e.context)}function s(e){i.updateConnectionWaypoints(e.context.connection)}function c(e){i.updateAttachment(e.context)}function l(e){const{element:n}=e.context,i=si(n),r=Rn(n),o=r&&r.get("label");ni(n)||go(n)||(i&&!o?r.set("label",t.create("bpmndi:BPMNLabel")):!i&&o&&r.set("label",void 0))}this.executed(["connection.layout","connection.create"],(function(e){var t,i=e.context,r=i.hints||{};i.cropped||!1===r.createElementsBehavior||((t=i.connection).waypoints=n.getCroppedWaypoints(t),i.cropped=!0)})),this.reverted(["connection.layout"],(function(e){delete e.context.cropped})),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Nm((function(e){var t=e.context;i.updateParent(t.shape||t.connection,t.oldParent)}))),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Nm((function(e){var t=e.context,n=t.shape||t.connection,r=t.parent||t.newParent;i.updateParent(n,r)}))),this.executed(["canvas.updateRoot"],r),this.reverted(["canvas.updateRoot"],r),this.executed(["shape.move","shape.create","shape.resize"],Nm((function(e){"label"!==e.context.shape.type&&o(e)}))),this.reverted(["shape.move","shape.create","shape.resize"],Nm((function(e){"label"!==e.context.shape.type&&o(e)}))),e.on("shape.changed",(function(e){"label"===e.element.type&&o({context:{shape:e.element}})})),this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],Nm(a)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],Nm(a)),this.executed(["connection.layout","connection.move","connection.updateWaypoints"],Nm(s)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],Nm(s)),this.executed("connection.reconnect",Nm((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=Pn(n),a=Pn(i),s=Pn(r);o.conditionExpression&&!An(s,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(t.oldConditionExpression=o.conditionExpression,delete o.conditionExpression),i!==r&&a.default===o&&(t.oldDefault=a.default,delete a.default)}))),this.reverted("connection.reconnect",Nm((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=Pn(n),a=Pn(i),s=Pn(r);t.oldConditionExpression&&(o.conditionExpression=t.oldConditionExpression),t.oldDefault&&(a.default=t.oldDefault,delete s.default)}))),this.executed(["element.updateAttachment"],Nm(c)),this.reverted(["element.updateAttachment"],Nm(c)),this.executed("element.updateLabel",Nm(l)),this.reverted("element.updateLabel",Nm(l))}function Nm(e){return function(t){var n=t.context;kn(n.shape||n.connection||n.element,"bpmn:BaseElement")&&e(t)}}function Om(e,t,n){var i=function(e,t,n,i){var r=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,r,i)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e,n){var o=this.indexOf(e);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,e),-1===o&&t.set(e,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function jm(e,t){if(!(this instanceof jm))return new jm(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Dm.$inject=["moddle"],Dm.prototype._needsId=function(e){return An(e,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"])},Dm.prototype._ensureId=function(e){var t;e.id?this._model.ids.claim(e.id,e):(t=kn(e,"bpmn:Activity")?"Activity":kn(e,"bpmn:Event")?"Event":kn(e,"bpmn:Gateway")?"Gateway":An(e,["bpmn:SequenceFlow","bpmn:MessageFlow"])?"Flow":(e.$type||"").replace(/^[^:]*:/g,""),t+="_",!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e)))},Dm.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},Dm.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},Dm.prototype.createDiShape=function(e,t){return this.create("bpmndi:BPMNShape",ee({bpmnElement:e,bounds:this.createDiBounds()},t))},Dm.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},Dm.prototype.createDiWaypoints=function(e){var t=this;return F(e,(function(e){return t.createDiWaypoint(e)}))},Dm.prototype.createDiWaypoint=function(e){return this.create("dc:Point",te(e,["x","y"]))},Dm.prototype.createDiEdge=function(e,t){return this.create("bpmndi:BPMNEdge",ee({bpmnElement:e,waypoint:this.createDiWaypoints([])},t))},Dm.prototype.createDiPlane=function(e,t){return this.create("bpmndi:BPMNPlane",ee({bpmnElement:e},t))},x(Bm,ro),Bm.$inject=["eventBus","bpmnFactory","connectionDocking"],Bm.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,i=t.host;n.attachedToRef=i&&i.businessObject},Bm.prototype.updateParent=function(e,t){if(!(Jn(e)||kn(e,"bpmn:DataStoreReference")&&e.parent&&kn(e.parent,"bpmn:Collaboration"))){var n=e.parent,i=e.businessObject,r=Rn(e),o=n&&n.businessObject,a=Rn(n);kn(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,o,t&&t.businessObject),kn(e,"bpmn:DataOutputAssociation")&&(o=e.source?e.source.businessObject:null),kn(e,"bpmn:DataInputAssociation")&&(o=e.target?e.target.businessObject:null),this.updateSemanticParent(i,o),kn(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,o),this.updateDiParent(r,a)}},Bm.prototype.updateBounds=function(e){var t=Rn(e),n=function(e){if(!kn(e,"bpmn:Activity"))return;var t=Rn(e);if(!t)return;var n=t.get("label");if(!n)return;return n.get("bounds")}(e);if(n){var i=Ca(n,t.get("bounds"));ee(n,{x:e.x+i.x,y:e.y+i.y})}var r=Jn(e)?this._getLabel(t):t,o=r.bounds;o||(o=this._bpmnFactory.createDiBounds(),r.set("bounds",o)),ee(o,{x:e.x,y:e.y,width:e.width,height:e.height})},Bm.prototype.updateFlowNodeRefs=function(e,t,n){n!==t&&(kn(n,"bpmn:Lane")&&Bp(n.get("flowNodeRef"),e),kn(t,"bpmn:Lane")&&Np(t.get("flowNodeRef"),e))},Bm.prototype.updateDiConnection=function(e,t,n){var i=Rn(e),r=Rn(t),o=Rn(n);i.sourceElement&&i.sourceElement.bpmnElement!==Pn(t)&&(i.sourceElement=t&&r),i.targetElement&&i.targetElement.bpmnElement!==Pn(n)&&(i.targetElement=n&&o)},Bm.prototype.updateDiParent=function(e,t){if(t&&!kn(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(Bp(n,e),e.$parent=null)}},Bm.prototype.getLaneSet=function(e){var t,n;return kn(e,"bpmn:Lane")?((t=e.childLaneSet)||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(kn(e,"bpmn:Participant")&&(e=e.processRef),(t=(n=e.get("laneSets"))[0])||((t=this._bpmnFactory.create("bpmn:LaneSet")).$parent=e,n.push(t)),t)},Bm.prototype.updateSemanticParent=function(e,t,n){var i;if(e.$parent!==t&&(!kn(e,"bpmn:DataInput")&&!kn(e,"bpmn:DataOutput")||(kn(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),!("ioSpecification"in t)||t.ioSpecification!==e.$parent))){if(kn(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),i="lanes";else if(kn(e,"bpmn:FlowElement")){if(t)if(kn(t,"bpmn:Participant"))t=t.processRef;else if(kn(t,"bpmn:Lane"))do{t=t.$parent.$parent}while(kn(t,"bpmn:Lane"));i="flowElements"}else if(kn(e,"bpmn:Artifact")){for(;t&&!kn(t,"bpmn:Process")&&!kn(t,"bpmn:SubProcess")&&!kn(t,"bpmn:Collaboration");){if(kn(t,"bpmn:Participant")){t=t.processRef;break}t=t.$parent}i="artifacts"}else if(kn(e,"bpmn:MessageFlow"))i="messageFlows";else if(kn(e,"bpmn:Participant")){i="participants";var r,o=e.processRef;o&&(r=function(e){for(;e&&!kn(e,"bpmn:Definitions");)e=e.$parent;return e}(e.$parent||t),e.$parent&&(Bp(r.get("rootElements"),o),o.$parent=null),t&&(Np(r.get("rootElements"),o),o.$parent=r))}else kn(e,"bpmn:DataOutputAssociation")?i="dataOutputAssociations":kn(e,"bpmn:DataInputAssociation")&&(i="dataInputAssociations");if(!i)throw new Error(`no parent for <${e.id}> in <${t.id}>`);var a;if(e.$parent&&Bp(a=e.$parent.get(i),e),t?((a=t.get(i)).push(e),e.$parent=t):e.$parent=null,n){var s=n.get(i);Bp(a,e),t&&(s||(s=[],t.set(i,s)),s.push(e))}}},Bm.prototype.updateConnectionWaypoints=function(e){Rn(e).set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},Bm.prototype.updateConnection=function(e){var t,n=e.connection,i=Pn(n),r=n.source,o=Pn(r),a=n.target,s=Pn(n.target);if(kn(i,"bpmn:DataAssociation"))kn(i,"bpmn:DataInputAssociation")?(i.get("sourceRef")[0]=o,t=e.parent||e.newParent||s,this.updateSemanticParent(i,s,t)):kn(i,"bpmn:DataOutputAssociation")&&(t=e.parent||e.newParent||o,this.updateSemanticParent(i,o,t),i.targetRef=s);else{var c=kn(i,"bpmn:SequenceFlow");i.sourceRef!==o&&(c&&(Bp(i.sourceRef&&i.sourceRef.get("outgoing"),i),o&&o.get("outgoing")&&o.get("outgoing").push(i)),i.sourceRef=o),i.targetRef!==s&&(c&&(Bp(i.targetRef&&i.targetRef.get("incoming"),i),s&&s.get("incoming")&&s.get("incoming").push(i)),i.targetRef=s)}this.updateConnectionWaypoints(n),this.updateDiConnection(n,r,a)},Bm.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label},jm.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Om(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},jm.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||Om(this,t,e),n},jm.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},jm.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},jm.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Lm=new jm({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Im=new jm({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),$m=new jm({name:"attachers",collection:!0},{name:"host"}),zm=new jm({name:"outgoing",collection:!0},{name:"source"}),Fm=new jm({name:"incoming",collection:!0},{name:"target"});function Vm(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),Lm.bind(this,"parent"),Im.bind(this,"labels"),zm.bind(this,"outgoing"),Fm.bind(this,"incoming")}function Hm(){Vm.call(this),Lm.bind(this,"children"),$m.bind(this,"host"),$m.bind(this,"attachers")}function Gm(){Vm.call(this),Lm.bind(this,"children")}function Wm(){Hm.call(this),Im.bind(this,"labelTarget")}function Um(){Vm.call(this),zm.bind(this,"source"),Fm.bind(this,"target")}x(Hm,Vm),x(Gm,Hm),x(Wm,Hm),x(Um,Vm);var qm={connection:Um,shape:Hm,label:Wm,root:Gm};function Km(){this._uid=12}function Xm(e,t){Km.call(this),this._bpmnFactory=e,this._moddle=t}function Ym(e,t,n){return void 0===t[n]?t:(e[n]=t[n],ne(t,[n]))}function Zm(e,t){this._modeling=e,this._canvas=t}function Qm(e){this._modeling=e}function Jm(e,t){this._canvas=e,this._layouter=t}Km.prototype.createRoot=function(e){return this.create("root",e)},Km.prototype.createLabel=function(e){return this.create("label",e)},Km.prototype.createShape=function(e){return this.create("shape",e)},Km.prototype.createConnection=function(e){return this.create("connection",e)},Km.prototype.create=function(e,t){return(t=ee({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=qm[e];if(!n)throw new Error("unknown type: <"+e+">");return ee(new n,t)}(e,t)},x(Xm,Km),Xm.$inject=["bpmnFactory","moddle"],Xm.prototype._baseCreate=Km.prototype.create,Xm.prototype.create=function(e,t){if("label"===e){var n=t.di||this._bpmnFactory.createDiLabel();return this._baseCreate(e,ee({type:"label",di:n},ei,t))}return this.createElement(e,t)},Xm.prototype.createElement=function(e,t){var n,i,r,o=(t=ee({},t||{})).businessObject,a=t.di;if(!o){if(!t.type)throw new Error("no shape type specified");En(o=this._bpmnFactory.create(t.type))}if(!An(a,["bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane"])){var s=ee({},a||{},{id:o.id+"_di"});a="root"===e?this._bpmnFactory.createDiPlane(o,s):"connection"===e?this._bpmnFactory.createDiEdge(o,s):this._bpmnFactory.createDiShape(o,s)}return kn(o,"bpmn:Group")&&(t=ee({isFrame:!0},t)),t=function(e,t,n){return j(n,(function(n){t=Ym(e,t,n)})),t}(o,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&(t=Ym(a,t,"isExpanded")),An(o,["bpmn:Lane","bpmn:Participant"])&&(t=Ym(a,t,"isHorizontal")),kn(o,"bpmn:SubProcess")&&(t.collapsed=!Kn(o,a)),kn(o,"bpmn:ExclusiveGateway")&&(D(a,"isMarkerVisible")?void 0===a.isMarkerVisible&&(a.isMarkerVisible=!1):a.isMarkerVisible=!0),C(t.triggeredByEvent)&&(o.triggeredByEvent=t.triggeredByEvent,delete t.triggeredByEvent),C(t.cancelActivity)&&(o.cancelActivity=t.cancelActivity,delete t.cancelActivity),t.eventDefinitionType&&(i=o.get("eventDefinitions")||[],r=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),"bpmn:ConditionalEventDefinition"===t.eventDefinitionType&&(r.condition=this._bpmnFactory.create("bpmn:FormalExpression")),i.push(r),r.$parent=o,o.eventDefinitions=i,delete t.eventDefinitionType),n=this.getDefaultSize(o,a),t=ee({id:o.id},n,t,{businessObject:o,di:a}),this._baseCreate(e,t)},Xm.prototype.getDefaultSize=function(e,t){var n=Pn(e);return t=t||Rn(e),kn(n,"bpmn:SubProcess")?Kn(n,t)?{width:350,height:200}:{width:100,height:80}:kn(n,"bpmn:Task")?{width:100,height:80}:kn(n,"bpmn:Gateway")?{width:50,height:50}:kn(n,"bpmn:Event")?{width:36,height:36}:kn(n,"bpmn:Participant")?Kn(n,t)?{width:600,height:250}:{width:400,height:60}:kn(n,"bpmn:Lane")?{width:400,height:100}:kn(n,"bpmn:DataObjectReference")?{width:36,height:50}:kn(n,"bpmn:DataStoreReference")?{width:50,height:50}:kn(n,"bpmn:TextAnnotation")?{width:100,height:30}:kn(n,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}},Xm.prototype.createParticipantShape=function(e){return P(e)||(e={isExpanded:e}),!1!==(e=ee({type:"bpmn:Participant"},e||{})).isExpanded&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)},Zm.$inject=["modeling","canvas"],Zm.prototype.preExecute=function(e){var t=this._modeling,n=e.elements,i=e.alignment;j(n,(function(e){var n={x:0,y:0};C(i.left)?n.x=i.left-e.x:C(i.right)?n.x=i.right-e.width-e.x:C(i.center)?n.x=i.center-Math.round(e.width/2)-e.x:C(i.top)?n.y=i.top-e.y:C(i.bottom)?n.y=i.bottom-e.height-e.y:C(i.middle)&&(n.y=i.middle-Math.round(e.height/2)-e.y),t.moveElements([e],n,e.parent)}))},Zm.prototype.postExecute=function(e){},Qm.$inject=["modeling"],Qm.prototype.preExecute=function(e){var t=e.source;if(!t)throw new Error("source required");var n=e.target||t.parent,i=e.shape,r=e.hints||{};i=e.shape=this._modeling.createShape(i,e.position,n,{attach:r.attach}),e.shape=i},Qm.prototype.postExecute=function(e){var t,n,i=e.hints||{};t=e.source,n=e.shape,z(t.outgoing,(function(e){return e.target===n}))||(i.connectionTarget===e.source?this._modeling.connect(e.shape,e.source,e.connection):this._modeling.connect(e.source,e.shape,e.connection))},Jm.$inject=["canvas","layouter"],Jm.prototype.execute=function(e){var t=e.connection,n=e.source,i=e.target,r=e.parent,o=e.parentIndex,a=e.hints;if(!n||!i)throw new Error("source and target required");if(!r)throw new Error("parent required");return t.source=n,t.target=i,t.waypoints||(t.waypoints=this._layouter.layoutConnection(t,a)),this._canvas.addConnection(t,r,o),t},Jm.prototype.revert=function(e){var t=e.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t};var ef=Math.round;function tf(e){this._modeling=e}tf.$inject=["modeling"],tf.prototype.preExecute=function(e){var t=e.elements,n=e.parent,i=e.parentIndex,r=e.position,o=e.hints,a=this._modeling;j(t,(function(e){R(e.x)||(e.x=0),R(e.y)||(e.y=0)}));var s=qr(O(t,(function(e){return!e.hidden})));j(t,(function(e){Qn(e)&&(e.waypoints=F(e.waypoints,(function(e){return{x:ef(e.x-s.x-s.width/2+r.x),y:ef(e.y-s.y-s.height/2+r.y)}}))),ee(e,{x:ef(e.x-s.x-s.width/2+r.x),y:ef(e.y-s.y-s.height/2+r.y)})}));var c=Vr(t),l={};j(t,(function(e){if(Qn(e))l[e.id]=R(i)?a.createConnection(l[e.source.id],l[e.target.id],i,e,e.parent||n,o):a.createConnection(l[e.source.id],l[e.target.id],e,e.parent||n,o);else{var t=ee({},o);-1===c.indexOf(e)&&(t.autoResize=!1),Jn(e)&&(t=ne(t,["attach"])),l[e.id]=R(i)?a.createShape(e,te(e,["x","y","width","height"]),e.parent||n,i,t):a.createShape(e,te(e,["x","y","width","height"]),e.parent||n,t)}})),e.elements=H(l)};var nf=Math.round;function rf(e){this._canvas=e}function of(e){rf.call(this,e)}rf.$inject=["canvas"],rf.prototype.execute=function(e){var t=e.shape,n=e.position,i=e.parent,r=e.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?ee(t,n):ee(t,{x:n.x-nf(t.width/2),y:n.y-nf(t.height/2)}),this._canvas.addShape(t,i,r),t},rf.prototype.revert=function(e){var t=e.shape;return this._canvas.removeShape(t),t},x(of,rf),of.$inject=["canvas"];var af=rf.prototype.execute;of.prototype.execute=function(e){var t=e.shape;return function(e){["width","height"].forEach((function(t){void 0===e[t]&&(e[t]=0)}))}(t),t.labelTarget=e.labelTarget,af.call(this,e)};var sf=rf.prototype.revert;function cf(e,t){this._canvas=e,this._modeling=t}function lf(e,t){this._modeling=e,this._elementRegistry=t}function pf(e,t){this._canvas=e,this._modeling=t}function uf(e){this._modeling=e}of.prototype.revert=function(e){return e.shape.labelTarget=null,sf.call(this,e)},cf.$inject=["canvas","modeling"],cf.prototype.preExecute=function(e){var t=this._modeling,n=e.connection;Sm(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),Sm(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})}))},cf.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=Op(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t},cf.prototype.revert=function(e){var t=e.connection,n=e.parent,i=e.parentIndex;return t.source=e.source,t.target=e.target,Np(n.children,t,i),this._canvas.addConnection(t,n),t},lf.$inject=["modeling","elementRegistry"],lf.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry;j(e.elements,(function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))}))},pf.$inject=["canvas","modeling"],pf.prototype.preExecute=function(e){var t=this._modeling,n=e.shape;Sm(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),Sm(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})})),Sm(n.children,(function(e){Qn(e)?t.removeConnection(e,{nested:!0}):t.removeShape(e,{nested:!0})}))},pf.prototype.execute=function(e){var t=this._canvas,n=e.shape,i=n.parent;return e.oldParent=i,e.oldParentIndex=Op(i.children,n),t.removeShape(n),n},pf.prototype.revert=function(e){var t=this._canvas,n=e.shape,i=e.oldParent,r=e.oldParentIndex;return Np(i.children,n,r),t.addShape(n,i),n},uf.$inject=["modeling"];var df={x:"y",y:"x"};function hf(e,t){this._layouter=e,this._canvas=t}function mf(){}function ff(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}function gf(e){this._modeling=e}function yf(e){this._helper=new gf(e)}function vf(e){this._modeling=e,this._helper=new gf(e)}function bf(e){this._modeling=e}function xf(e){return e.original||e}function _f(e,t){this._modeling=e,this._rules=t}function wf(e){this._modeling=e}function Ef(e){this._modeling=e}function Sf(e){return ee({},e)}function Cf(e){switch(e){case"n":case"s":return"y";case"w":case"e":return"x"}}function kf(e,t,n){var i=Cf(n);return/e|s/.test(n)?e[i]>t:/n|w/.test(n)?e[i] required");var r=e.changed||this._getVisualReferences(n).concat(t),o=e.oldProperties||function(e,t){return I(t,(function(t,n){return t[n]=e.get(n),t}),{})}(n,V(i));return If(n,i),e.oldProperties=o,e.changed=r,r},Lf.prototype.revert=function(e){var t=e.oldProperties,n=e.moddleElement,i=e.changed;return If(n,t),i},Lf.prototype._getVisualReferences=function(e){var t=this._elementRegistry;return kn(e,"bpmn:DataObject")?function(e,t){return t.filter((function(t){return kn(t,"bpmn:DataObjectReference")&&Pn(t).dataObjectRef===e}))}(e,t):[]};var $f="default",zf="id",Ff="di",Vf={width:0,height:0};function Hf(e,t,n,i){this._elementRegistry=e,this._moddle=t,this._modeling=n,this._textRenderer=i}function Gf(e,t){return zf in e&&e[zf]!==t[zf]}function Wf(e,t){var n=e.businessObject,i=Rn(e);j(t,(function(e,t){t!==Ff?n.set(t,e):i&&function(e,t){j(t,(function(t,n){e.set(n,t)}))}(i,e)}))}Hf.$inject=["elementRegistry","moddle","modeling","textRenderer"],Hf.prototype.execute=function(e){var t=e.element,n=[t];if(!t)throw new Error("element required");var i=this._elementRegistry,r=this._moddle.ids,o=t.businessObject,a=function(e){var t=ee({},e);return Uf.forEach((function(n){n in e&&(t[n]=Pn(t[n]))})),t}(e.properties),s=e.oldProperties||function(e,t){var n=V(t),i=e.businessObject,r=Rn(e);return I(n,(function(e,n){return e[n]=n!==Ff?i.get(n):function(e,t){return I(t,(function(t,n){return t[n]=e&&e.get(n),t}),{})}(r,V(t.di)),e}),{})}(t,a);return Gf(a,o)&&(r.unclaim(o[zf]),i.updateId(t,a[zf]),r.claim(a[zf],o)),$f in a&&(a[$f]&&n.push(i.get(a[$f].id)),o[$f]&&n.push(i.get(o[$f].id))),Wf(t,a),e.oldProperties=s,e.changed=n,n},Hf.prototype.postExecute=function(e){var t=e.element.label,n=t&&Pn(t).name;if(n){var i=this._textRenderer.getExternalLabelBounds(t,n);this._modeling.resizeShape(t,i,Vf)}},Hf.prototype.revert=function(e){var t=e.element,n=e.properties,i=e.oldProperties,r=t.businessObject,o=this._elementRegistry,a=this._moddle.ids;return Wf(t,i),Gf(n,r)&&(a.unclaim(n[zf]),o.updateId(t,i[zf]),a.claim(i[zf],r)),e.changed};var Uf=["default"];function qf(e,t){this._canvas=e,this._modeling=t}function Kf(e,t){this._modeling=e,this._spaceTool=t}function Xf(e){this._modeling=e}function Yf(e,t){this._modeling=e,this._spaceTool=t}qf.$inject=["canvas","modeling"],qf.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=t.getRootElement(),o=r.businessObject,a=o.$parent,s=Rn(r);return t.setRootElement(n),t.removeRootElement(r),Np(a.rootElements,i),i.$parent=a,Bp(a.rootElements,o),o.$parent=null,r.di=null,s.bpmnElement=i,n.di=s,e.oldRoot=r,[]},qf.prototype.revert=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=e.oldRoot,o=r.businessObject,a=i.$parent,s=Rn(n);return t.setRootElement(r),t.removeRootElement(n),Bp(a.rootElements,i),i.$parent=null,Np(a.rootElements,o),o.$parent=a,n.di=null,s.bpmnElement=o,r.di=s,[]},Kf.$inject=["modeling","spaceTool"],Kf.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,i=e.shape,r=e.location,o=eu(i),a=o===i,s=a?i:i.parent,c=Jp(s),l=Xn(i);if(l?"left"===r?r="top":"right"===r&&(r="bottom"):"top"===r?r="left":"bottom"===r&&(r="right"),!c.length){var p=l?{x:i.x+Zp,y:i.y,width:i.width-Zp,height:i.height}:{x:i.x,y:i.y+Zp,width:i.width,height:i.height-Zp};n.createShape({type:"bpmn:Lane",isHorizontal:l},p,s)}var u,d,h,m,f,g=[];Wr(o,(function(e){return g.push(e),e.label&&g.push(e.label),e===i?[]:O(e.children,(function(e){return e!==i}))})),"top"===r?(u=-120,h=(d=i.y)+10,m="n",f="y"):"left"===r?(u=-120,h=(d=i.x)+10,m="w",f="x"):"bottom"===r?(u=120,h=(d=i.y+i.height)-10,m="s",f="y"):"right"===r&&(u=120,h=(d=i.x+i.width)-10,m="e",f="x");var y=t.calculateAdjustments(g,f,u,h),v=l?{x:0,y:u}:{x:u,y:0};t.makeSpace(y.movingShapes,y.resizingShapes,v,m,h);var b=l?{x:i.x+(a?Zp:0),y:d-("top"===r?120:0),width:i.width-(a?Zp:0),height:120}:{x:d-("left"===r?120:0),y:i.y+(a?Zp:0),width:120,height:i.height-(a?Zp:0)};e.newLane=n.createShape({type:"bpmn:Lane",isHorizontal:l},b,s)},Xf.$inject=["modeling"],Xf.prototype.preExecute=function(e){var t=this._modeling,n=e.shape,i=e.count,r=Jp(n),o=r.length;if(o>i)throw new Error(`more than <${i}> child lanes`);var a,s,c,l,p=Xn(n),u=p?n.height:n.width,d=Math.round(u/i);for(l=0;l0||l.bottom<0?-n:n,a=s.calculateAdjustments(u,"y",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:0,y:n},r)),(l.left||l.right)&&(n=l.right||l.left,i=e.x+(l.right?e.width:0)+(l.right?-10:100),r=l.right?"e":"w",o=l.left>0||l.right<0?-n:n,a=s.calculateAdjustments(d,"x",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:n,y:0},r))};var Zf="flowNodeRef",Qf="lanes";function Jf(e){this._elementRegistry=e}function eg(e){this._moddle=e}Jf.$inject=["elementRegistry"],Jf.prototype._computeUpdates=function(e,t){var n=[],i=[],r={},o=[];function a(e){-1===n.indexOf(e)&&(o.push(e),n.push(e))}function s(e){if(!e.parent)return[];var t=function(e){var t=eu(e);return r[t.id]||(r[t.id]=Qp(t)),r[t.id]}(e);return t.filter((function(t){return n=e,i=Tr(t),r=n.x+n.width/2,o=n.y+n.height/2,r>i.left&&ri.top&&o: must be specified as : with start/end in { h,v,t,r,b,l }");if(xg(n)){var i=function(e,t,n){return hg(e,t,n)}(e,t,n),r=function(e,t,n){var i=hg(t,e,mg(n));return{waypoints:i.waypoints.slice().reverse(),directions:mg(i.directions),turnNextDirections:i.turnNextDirections}}(e,t,n),o=function(e,t){var n=e.directions.split(":")[1],i=t.directions.split(":")[0];e.turnNextDirections&&(n="h"==n?"v":"h"),t.turnNextDirections&&(i="h"==i?"v":"h");var r=n+":"+i;return{waypoints:fg(e.waypoints[e.waypoints.length-1],t.waypoints[0],r),directions:r}}(i,r);return[].concat(i.waypoints,o.waypoints,r.waypoints)}return function(e,t,n){var i=pg((t.x-e.x)/2+e.x),r=pg((t.y-e.y)/2+e.y);if("h:v"===n)return[{x:t.x,y:e.y}];if("v:h"===n)return[{x:e.x,y:t.y}];if("h:h"===n)return[{x:i,y:e.y},{x:i,y:t.y}];if("v:v"===n)return[{x:e.x,y:r},{x:t.x,y:r}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]")}(e,t,n)}function gg(e,t,n,i,r){var o=L(r&&r.preferredLayouts||[],"straight")[0]||"h:h",a=Or(e,t,dg[o]||0),s=function(e,t){if(xg(t))return t;switch(e){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t}}(a,o);n=n||Nr(e),i=i||Nr(t);var c=s.split(":"),l=_g(n,e,c[0],function(e){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[e]}(a));return function(e,t,n){var i=fg(e,t,n);return i.unshift(e),i.push(t),wg(i)}(l,_g(i,t,c[1],a),s)}function yg(e,t,n,i,r,o){var a;return A(n)&&(r=n,o=i,n=Nr(e),i=Nr(t)),r=r||[],a=-1!==(o=ee({preferredLayouts:[]},o)).preferredLayouts.indexOf("straight")&&function(e,t,n,i,r){var o,a,s={};if(a=Or(e,t),!/^(top|bottom|left|right)$/.test(a))return null;/top|bottom/.test(a)&&(o="x");/left|right/.test(a)&&(o="y");return"target"===r.preserveDocking?vg(o,i,e)?(s[o]=i[o],[{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y,original:{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y}},{x:i.x,y:i.y}]):null:vg(o,n,t)?(s[o]=n[o],[{x:n.x,y:n.y},{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y,original:{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y}}]):null}(e,t,n,i,o),a||(a=o.connectionEnd&&function(e,t,n,i){var r=i.slice().reverse();return r=bg(e,t,n,r),r?r.reverse():null}(t,e,i,r),a||((a=o.connectionStart&&bg(e,t,n,r))||(!o.connectionStart&&!o.connectionEnd&&r&&r.length?r:gg(e,t,n,i,o))))}function vg(e,t,n){return function(e,t,n){return e>=t&&e<=n}(t[e],n[e],n[e]+n[{x:"width",y:"height"}[e]])}function bg(e,t,n,i){if((r=i).length<3||!(r.length>4)&&B(r,(function(e,t){var n=r[t-1];return n&&Gi(e,n)<3})))return null;var r,o,a=i[0],s=i.slice();return s[0]=n,s[1]=function(e,t,n){switch(qi(t,e)){case"v":return{x:n.x,y:e.y};case"h":return{x:e.x,y:n.y}}return{x:e.x,y:e.y}}(s[1],a,n),o=function(e,t,n){var i;for(i=e.length-2;0!==i;i--)if(Xi(e[i],t,ug)||Xi(e[i],n,ug))return e.slice(i);return e}(s,e,t),o!==s&&(s=bg(e,t,n,o)),s&&qi(s)?null:s}function xg(e){return e&&/t|r|b|l/.test(e)}function _g(e,t,n,i){if("h"===n&&(n=/left/.test(i)?"l":"r"),"v"===n&&(n=/top/.test(i)?"t":"b"),"t"===n)return{original:e,x:e.x,y:t.y};if("r"===n)return{original:e,x:t.x+t.width,y:e.y};if("b"===n)return{original:e,x:e.x,y:t.y+t.height};if("l"===n)return{original:e,x:t.x,y:e.y};throw new Error("unexpected dockingDirection: <"+n+">")}function wg(e){return e.reduce((function(t,n,i){return Wi(t[t.length-1],e[i+1],n,0)||t.push(n),t}),[])}var Eg=-10,Sg=40,Cg={default:["h:h"],fromGateway:["v:h"],toGateway:["h:v"],loop:{fromTop:["t:r"],fromRight:["r:b"],fromLeft:["l:t"],fromBottom:["b:l"]},boundaryLoop:{alternateHorizontalSide:"b",alternateVerticalSide:"l",default:"v"},messageFlow:["straight","v:v"],subProcess:["straight","h:h"],isHorizontal:!0},kg={default:["v:v"],fromGateway:["h:v"],toGateway:["v:h"],loop:{fromTop:["t:l"],fromRight:["r:t"],fromLeft:["l:b"],fromBottom:["b:r"]},boundaryLoop:{alternateHorizontalSide:"t",alternateVerticalSide:"r",default:"h"},messageFlow:["straight","h:h"],subProcess:["straight","v:v"],isHorizontal:!1},Ag={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},Pg={top:"t",right:"r",bottom:"b",left:"l"};function Rg(){}function Mg(e,t){return kn(t,"bpmn:Participant")?"source":kn(e,"bpmn:Participant")?"target":Ng(t)?"source":Ng(e)||kn(t,"bpmn:Event")?"target":kn(e,"bpmn:Event")?"source":null}function Tg(e){return Ng(e)?"target":"source"}function Dg(e,t){return e?e.original||e:Nr(t)}function Bg(e,t){return kn(t,"bpmn:Activity")&&kn(e,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation}function Ng(e){return kn(e,"bpmn:SubProcess")&&Kn(e)}function Og(e,t){return e===t}function jg(e){var t=/right|left/.exec(e);return t&&t[0]}function Lg(e){var t=/top|bottom/.exec(e);return t&&t[0]}function Ig(e,t){return Ag[e]===t}function $g(e){return"right"===e||"left"===e}function zg(e,t,n){var i=t.waypoints,r=i&&i.length&&Or(i[0],e);return"top"===r?n.loop.fromTop:"right"===r?n.loop.fromRight:"left"===r?n.loop.fromLeft:n.loop.fromBottom}function Fg(e,t,n,i){var r,o,a,s,c=Nr(e),l=Nr(t),p=(s=(a=e).host,Or(Nr(a),s,Eg)),u=Og(e.host,t),d=-1!==["top","right","bottom","left"].indexOf(p),h=Or(l,c,{x:e.width/2+t.width/2,y:e.height/2+t.height/2});return u?function(e,t,n,i,r,o){var a,s=t?e:o.isHorizontal?Lg(e):jg(e),c=Pg[s];a=t?$g(e)?Vg("y",n,i,r)?"h":o.boundaryLoop.alternateHorizontalSide:Vg("x",n,i,r)?"v":o.boundaryLoop.alternateVerticalSide:o.boundaryLoop.default;return[c+":"+a]}(p,d,e,t,n,i):(r=function(e,t,n,i){if(n)return Pg[e];var r=Lg(e),o=jg(e),a=Lg(t),s=jg(t);if(i){if(Og(r,a)||Ig(o,s))return Pg[r]}else if(Og(o,s)||Ig(r,a))return Pg[o];return Pg[i?o:r]}(p,h,d,i.isHorizontal),o=function(e,t,n,i){if(n)return $g(e)?(r=t,o=jg(e),a=Ag[o],-1!==r.indexOf(a)||Og(e,t)?"h":"v"):function(e,t){var n=Lg(e),i=Ag[n];return-1!==t.indexOf(i)}(e,t)||Og(e,t)?"v":"h";var r,o,a;return i?Og(Lg(e),Lg(t))?"h":"v":Og(jg(e),jg(t))?"v":"h"}(p,h,d,i.isHorizontal),[r+":"+o])}function Vg(e,t,n,i){var r=Sg;return!(Hg(e,i,n,r)||Hg(e,i,{x:n.x+n.width,y:n.y+n.height},r)||Hg(e,i,Nr(t),r))}function Hg(e,t,n,i){return Math.abs(t[e]-n[e])!k(e)))})},Kg.prototype.cleanUp=function(){this._complexPreview.cleanUp()},Kg.$inject=["complexPreview","connectionDocking","elementFactory","eventBus","layouter","rules"];const Xg={__depends__:[Lc,dp,Ug],__init__:["appendPreview"],appendPreview:["type",Kg]};var Yg=Math.min,Zg=Math.max;function Qg(e){e.preventDefault()}function Jg(e){e.stopPropagation()}function ey(e){this.container=e.container,this.parent=Re('
      '),this.content=Te("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=J(this.autoResize,this),this.handlePaste=J(this.handlePaste,this)}function ty(e,t){this._eventBus=e,this._providers=[],this._textbox=new ey({container:t.getContainer(),keyHandler:J(this._handleKey,this),resizeHandler:J(this._handleResize,this)})}ey.prototype.create=function(e,t,n,i){var r=this.parent,o=this.content,a=this.container;i=this.options=i||{};var s=te(t=this.style=t||{},["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);ee(r.style,{width:e.width+"px",height:e.height+"px",maxWidth:e.maxWidth+"px",maxHeight:e.maxHeight+"px",minWidth:e.minWidth+"px",minHeight:e.minHeight+"px",left:e.x+"px",top:e.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},s);var c=te(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return ee(o.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},c),i.centerVertically&&ee(o.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},c),o.innerText=n,we.bind(o,"keydown",this.keyHandler),we.bind(o,"mousedown",Jg),we.bind(o,"paste",this.handlePaste),i.autoResize&&we.bind(o,"input",this.autoResize),i.resizable&&this.resizable(t),a.appendChild(r),this.setSelection(o.lastChild,o.lastChild&&o.lastChild.length),r},ey.prototype.handlePaste=function(e){var t,n=this.options,i=this.style;if(e.preventDefault(),t=e.clipboardData?e.clipboardData.getData("text/plain"):window.clipboardData.getData("Text"),this.insertText(t),n.autoResize){var r=this.autoResize(i);r&&this.resizeHandler(r)}},ey.prototype.insertText=function(e){e=e.replace(/\r\n|\r|\n/g,"\n"),document.execCommand("insertText",!1,e)||this._insertTextIE(e)},ey.prototype._insertTextIE=function(e){var t,n,i,r=this.getSelection(),o=r.startContainer,a=r.endContainer,s=r.startOffset,c=r.endOffset,l=r.commonAncestorContainer,p=(t=l.childNodes,[].slice.call(t));if(l.nodeType===Node.TEXT_NODE){var u=o.textContent;o.textContent=u.substring(0,s)+e+u.substring(c),n=o,i=s+e.length}else if(o===this.content&&a===this.content){var d=document.createTextNode(e);this.content.insertBefore(d,p[s]),n=d,i=d.textContent.length}else{var h=p.indexOf(o),m=p.indexOf(a);p.forEach((function(t,n){n===h?t.textContent=o.textContent.substring(0,s)+e+a.textContent.substring(c):n>h&&n<=m&&Be(t)})),n=o,i=s+e.length}n&&void 0!==i&&setTimeout((function(){self.setSelection(n,i)}))},ey.prototype.autoResize=function(){var e=this.parent,t=this.content,n=parseInt(this.style.fontSize)||12;if(t.scrollHeight>e.offsetHeight||t.scrollHeight
      ');var u=function(n){Qg(n),Jg(n);var u=Yg(Zg(l+n.clientX-s,i),o),d=Yg(Zg(p+n.clientY-c,r),a);t.style.width=u+"px",t.style.height=d+"px",e.resizeHandler({width:l,height:p,dx:n.clientX-s,dy:n.clientY-c})},d=function(e){Qg(e),Jg(e),we.unbind(document,"mousemove",u,!1),we.unbind(document,"mouseup",d,!1)};we.bind(n,"mousedown",(function(e){Qg(e),Jg(e),s=e.clientX,c=e.clientY;var n=t.getBoundingClientRect();l=n.width,p=n.height,we.bind(document,"mousemove",u),we.bind(document,"mouseup",d)}))}ee(n.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(n)},ey.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),we.unbind(t,"keydown",this.keyHandler),we.unbind(t,"mousedown",Jg),we.unbind(t,"input",this.autoResize),we.unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),Be(n)),Be(e)},ey.prototype.getValue=function(){return this.content.innerText.trim()},ey.prototype.getSelection=function(){return window.getSelection().getRangeAt(0)},ey.prototype.setSelection=function(e,t){var n=document.createRange();null===e?n.selectNodeContents(this.content):(n.setStart(e,t),n.setEnd(e,t));var i=window.getSelection();i.removeAllRanges(),i.addRange(n)},ty.$inject=["eventBus","canvas"],ty.prototype.registerProvider=function(e){this._providers.push(e)},ty.prototype.isActive=function(e){return!(!this._active||e&&this._active.element!==e)},ty.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},ty.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})},ty.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},ty.prototype.complete=function(){var e=this._active;if(e){var t,n=e.context.bounds,i=this.$textbox.getBoundingClientRect(),r=this.getValue();r===e.context.text&&i.height===n.height&&i.width===n.width||(t=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,r,e.context.text,{x:i.left-t.left,y:i.top-t.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}},ty.prototype.getValue=function(){return this._textbox.getValue()},ty.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},ty.prototype._handleResize=function(e){this._fire("resize",e)},ty.prototype.activate=function(e){var t;this.isActive()&&this.cancel();var n=B(this._providers,(function(n){return(t=n.activate(e))?n:null}));return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:e,context:t,provider:n},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t};const ny={__depends__:[Ko],__init__:["directEditing"],directEditing:["type",ty]};function iy(e){return function(t){var n=t.target,i=Pn(e),r=i.eventDefinitions&&i.eventDefinitions[0],o=i.$type===n.type,a=(r&&r.$type)===n.eventDefinitionType,s=!!n.triggeredByEvent==!!i.triggeredByEvent,c=void 0===n.isExpanded||n.isExpanded===Kn(e);return!(o&&a&&s&&c)}}var ry=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],oy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}],ay=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message intermediate catch event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message intermediate throw event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer intermediate catch event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation intermediate throw event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional intermediate catch event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link intermediate catch event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link intermediate throw event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation intermediate throw event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal intermediate catch event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal intermediate throw event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],sy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message end event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation end event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error end event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel end event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation end event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal end event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate end event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],cy=[{label:"Exclusive gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event-based gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],ly=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],py=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Sub-process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],uy=py,dy=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"User task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Service task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Send task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"Manual task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business rule task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Script task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub-process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],hy=[{label:"Data store reference",actionName:"replace-with-data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}}],my=[{label:"Data object reference",actionName:"replace-with-data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}],fy=[{label:"Message boundary event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!0}},{label:"Timer boundary event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!0}},{label:"Escalation boundary event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!0}},{label:"Conditional boundary event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!0}},{label:"Error boundary event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",cancelActivity:!0}},{label:"Cancel boundary event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition",cancelActivity:!0}},{label:"Signal boundary event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!0}},{label:"Compensation boundary event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",cancelActivity:!0}},{label:"Message boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],gy=[{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!0}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!0}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!0}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!0}},{label:"Error start event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",isInterrupting:!0}},{label:"Escalation start event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!0}},{label:"Compensation start event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",isInterrupting:!0}},{label:"Message start event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer start event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional start event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal start event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation start event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],yy=[{label:"Sequence flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],vy=[{label:"Expanded pool/participant",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:function(e){var t="Empty pool/participant";return e.children&&e.children.length&&(t+=" (removes content)"),t},actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}];const by={"start-event-non-interrupting":'\n \n \n \n \n ',"intermediate-event-non-interrupting":'\n \n \n \n \n \n '};function xy(e,t,n,i,r,o,a,s){this._bpmnFactory=e,this._popupMenu=t,this._modeling=n,this._moddle=i,this._bpmnReplace=r,this._rules=o,this._translate=a,this._moddleCopy=s,this._register()}xy.$inject=["bpmnFactory","popupMenu","modeling","moddle","bpmnReplace","rules","translate","moddleCopy"],xy.prototype._register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},xy.prototype.getPopupMenuEntries=function(e){var t=e.businessObject,n=this._rules,i=[];if(A(e)||!n.allowed("shape.replace",{element:e}))return{};var r=iy(e);return kn(t,"bpmn:DataObjectReference")?this._createEntries(e,hy):kn(t,"bpmn:DataStoreReference")&&!kn(e.parent,"bpmn:Collaboration")?this._createEntries(e,my):kn(t,"bpmn:StartEvent")&&!kn(t.$parent,"bpmn:SubProcess")?(i=O(ry,r),this._createEntries(e,i)):kn(t,"bpmn:Participant")?(i=O(vy,(function(t){return Kn(e)!==t.target.isExpanded})),this._createEntries(e,i)):kn(t,"bpmn:StartEvent")&&Yn(t.$parent)?(i=O(gy,(function(e){var n=!1!==e.target.isInterrupting,i=t.isInterrupting===n;return r(e)||!r(e)&&!i})),this._createEntries(e,i)):kn(t,"bpmn:StartEvent")&&!Yn(t.$parent)&&kn(t.$parent,"bpmn:SubProcess")?(i=O(oy,r),this._createEntries(e,i)):kn(t,"bpmn:EndEvent")?(i=O(sy,(function(e){return!("bpmn:CancelEventDefinition"==e.target.eventDefinitionType&&!kn(t.$parent,"bpmn:Transaction"))&&r(e)})),this._createEntries(e,i)):kn(t,"bpmn:BoundaryEvent")?(i=O(fy,(function(e){var n=e.target;if("bpmn:CancelEventDefinition"==n.eventDefinitionType&&!kn(t.attachedToRef,"bpmn:Transaction"))return!1;var i=!1!==n.cancelActivity,o=t.cancelActivity==i;return r(e)||!r(e)&&!o})),this._createEntries(e,i)):kn(t,"bpmn:IntermediateCatchEvent")||kn(t,"bpmn:IntermediateThrowEvent")?(i=O(ay,r),this._createEntries(e,i)):kn(t,"bpmn:Gateway")?(i=O(cy,r),this._createEntries(e,i)):kn(t,"bpmn:Transaction")?(i=O(py,r),this._createEntries(e,i)):Yn(t)&&Kn(e)?(i=O(uy,r),this._createEntries(e,i)):kn(t,"bpmn:SubProcess")&&Kn(e)?(i=O(ly,r),this._createEntries(e,i)):kn(t,"bpmn:AdHocSubProcess")&&!Kn(e)?(i=O(dy,(function(e){var t=e.target,n="bpmn:SubProcess"===t.type,i=!0===t.isExpanded;return iy(t)&&(!n||i)})),this._createEntries(e,i)):kn(t,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,yy):kn(t,"bpmn:FlowNode")?(i=O(dy,r),kn(t,"bpmn:SubProcess")&&!Kn(e)&&(i=O(i,(function(e){return"Sub-process (collapsed)"!==e.label}))),this._createEntries(e,i)):{}},xy.prototype.getPopupMenuHeaderEntries=function(e){var t={};return kn(e,"bpmn:Activity")&&!Yn(e)&&(t={...t,...this._getLoopCharacteristicsHeaderEntries(e)}),kn(e,"bpmn:DataObjectReference")&&(t={...t,...this._getCollectionHeaderEntries(e)}),kn(e,"bpmn:Participant")&&(t={...t,...this._getParticipantMultiplicityHeaderEntries(e)}),!kn(e,"bpmn:SubProcess")||kn(e,"bpmn:Transaction")||Yn(e)||(t={...t,...this._getAdHocHeaderEntries(e)}),Uu(e)&&(t={...t,...this._getNonInterruptingHeaderEntries(e)}),t},xy.prototype._createEntries=function(e,t){var n={},i=this;return j(t,(function(t){n[t.actionName]=i._createEntry(t,e)})),n},xy.prototype._createSequenceFlowEntries=function(e,t){var n=Pn(e),i={},r=this._modeling,o=this._moddle,a=this;return j(t,(function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef.default!==n&&(kn(n.sourceRef,"bpmn:ExclusiveGateway")||kn(n.sourceRef,"bpmn:InclusiveGateway")||kn(n.sourceRef,"bpmn:ComplexGateway")||kn(n.sourceRef,"bpmn:Activity"))&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e.source,{default:n})}))});break;case"replace-with-conditional-flow":!n.conditionExpression&&kn(n.sourceRef,"bpmn:Activity")&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){var t=o.create("bpmn:FormalExpression",{body:""});r.updateProperties(e,{conditionExpression:t})}))});break;default:kn(n.sourceRef,"bpmn:Activity")&&n.conditionExpression&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e,{conditionExpression:void 0})}))}),(kn(n.sourceRef,"bpmn:ExclusiveGateway")||kn(n.sourceRef,"bpmn:InclusiveGateway")||kn(n.sourceRef,"bpmn:ComplexGateway")||kn(n.sourceRef,"bpmn:Activity"))&&n.sourceRef.default===n&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e.source,{default:void 0})}))})}})),i},xy.prototype._createEntry=function(e,t,n){var i=this._translate,r=this._bpmnReplace.replaceElement,o=e.label;return o&&"function"==typeof o&&(o=o(t)),n=n||function(){return r(t,e.target)},{label:i(o),className:e.className,action:n}},xy.prototype._getLoopCharacteristicsHeaderEntries=function(e){var t=this,n=this._translate;function i(n,i){if(i.active)return void t._modeling.updateProperties(e,{loopCharacteristics:void 0});const r=e.businessObject.get("loopCharacteristics"),o=t._moddle.create(i.options.loopCharacteristics);r&&t._moddleCopy.copyElement(r,o),o.set("isSequential",i.options.isSequential),t._modeling.updateProperties(e,{loopCharacteristics:o})}var r,o,a,s=Pn(e).loopCharacteristics;return s&&(r=s.isSequential,o=void 0===s.isSequential,a=void 0!==s.isSequential&&!s.isSequential),{"toggle-parallel-mi":{className:"bpmn-icon-parallel-mi-marker",title:n("Parallel multi-instance"),active:a,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},"toggle-sequential-mi":{className:"bpmn-icon-sequential-mi-marker",title:n("Sequential multi-instance"),active:r,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},"toggle-loop":{className:"bpmn-icon-loop-marker",title:n("Loop"),active:o,action:i,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}}},xy.prototype._getCollectionHeaderEntries=function(e){var t=this,n=this._translate,i=e.businessObject.dataObjectRef;if(!i)return{};var r=i.isCollection;return{"toggle-is-collection":{className:"bpmn-icon-parallel-mi-marker",title:n("Collection"),active:r,action:function(n,r){t._modeling.updateModdleProperties(e,i,{isCollection:!r.active})}}}},xy.prototype._getParticipantMultiplicityHeaderEntries=function(e){var t=this,n=this._bpmnFactory,i=this._translate;var r=e.businessObject.participantMultiplicity;return{"toggle-participant-multiplicity":{className:"bpmn-icon-parallel-mi-marker",title:i("Participant multiplicity"),active:!!r,action:function(i,r){var o;r.active||(o=n.create("bpmn:ParticipantMultiplicity")),t._modeling.updateProperties(e,{participantMultiplicity:o})}}}},xy.prototype._getAdHocHeaderEntries=function(e){var t=this._translate,n=kn(Pn(e),"bpmn:AdHocSubProcess"),i=this._bpmnReplace.replaceElement;return{"toggle-adhoc":{className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:n,action:function(t,r){return i(e,n?{type:"bpmn:SubProcess"}:{type:"bpmn:AdHocSubProcess"},{autoResize:!1,layoutConnection:!1})}}}},xy.prototype._getNonInterruptingHeaderEntries=function(e){const t=this._translate,n=Pn(e),i=this,r=qu(e),o=kn(e,"bpmn:BoundaryEvent")?by["intermediate-event-non-interrupting"]:by["start-event-non-interrupting"],a=!n[r];return{"toggle-non-interrupting":{imageHtml:o,title:t("Toggle non-interrupting"),active:a,action:function(){i._modeling.updateProperties(e,{[r]:!!a})}}}};const _y={__depends__:[hc,Jh,Lc],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",xy]};function wy(e,t,n,i,r,o,a,s,c,l,p,u,d){e=e||{},i.registerProvider(this),this._contextPad=i,this._modeling=r,this._elementFactory=o,this._connect=a,this._create=s,this._popupMenu=c,this._canvas=l,this._rules=p,this._translate=u,this._eventBus=n,this._appendPreview=d,!1!==e.autoPlace&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,(function(e){var t=e.context.shape;if(Ho(e)&&i.isOpen(t)){var n=i.getEntries(t);n.replace&&n.replace.action.click(e,t)}})),n.on("contextPad.close",(function(){d.cleanUp()}))}function Ey(e,t,n){var i=e.$instanceOf(t),r=!1;return j(e.eventDefinitions||[],(function(e){e.$type===n&&(r=!0)})),i&&r}wy.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate","appendPreview"],wy.prototype.getMultiElementContextPadEntries=function(e){var t=this._modeling,n={};return this._isDeleteAllowed(e)&&ee(n,{delete:{group:"edit",className:"bpmn-icon-trash",title:this._translate("Delete"),action:{click:function(e,n){t.removeElements(n.slice())}}}}),n},wy.prototype._isDeleteAllowed=function(e){var t=this._rules.allowed("elements.delete",{elements:e});return A(t)?$(t,(function(e){return n=e,-1!==t.indexOf(n);var n})):t},wy.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,i=this._elementFactory,r=this._connect,o=this._create,a=this._popupMenu,s=this._rules,c=this._autoPlace,l=this._translate,p=this._appendPreview,u={};if("label"===e.type)return u;var d=e.businessObject;function h(e,t){r.start(e,t)}function m(e,t,n,r){function a(t,n){var a=i.createShape(ee({type:e},r));o.start(t,a,{source:n})}return{group:"model",className:t,title:n,action:{dragstart:a,click:c?function(t,n){var o=i.createShape(ee({type:e},r));c.append(n,o)}:a,hover:c?function(t,n){return p.create(n,e,r),()=>{p.cleanUp()}}:null}}}function f(e){return function(i,r){n.splitLane(r,e),t.open(r,!0)}}if(An(d,["bpmn:Lane","bpmn:Participant"])&&Kn(e)){var g=Jp(e);ee(u,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:l("Add lane above"),action:{click:function(e,t){n.addLane(t,"top")}}}}),g.length<2&&((Xn(e)?e.height>=120:e.width>=120)&&ee(u,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:l("Divide into two lanes"),action:{click:f(2)}}}),(Xn(e)?e.height>=180:e.width>=180)&&ee(u,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:l("Divide into three lanes"),action:{click:f(3)}}})),ee(u,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:l("Add lane below"),action:{click:function(e,t){n.addLane(t,"bottom")}}}})}kn(d,"bpmn:FlowNode")&&(kn(d,"bpmn:EventBasedGateway")?ee(u,{"append.receive-task":m("bpmn:ReceiveTask","bpmn-icon-receive-task",l("Append receive task")),"append.message-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",l("Append message intermediate catch event"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",l("Append timer intermediate catch event"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",l("Append conditional intermediate catch event"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",l("Append signal intermediate catch event"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):Ey(d,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?ee(u,{"append.compensation-activity":m("bpmn:Task","bpmn-icon-task",l("Append compensation activity"),{isForCompensation:!0})}):kn(d,"bpmn:EndEvent")||d.isForCompensation||Ey(d,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||Yn(d)||ee(u,{"append.end-event":m("bpmn:EndEvent","bpmn-icon-end-event-none",l("Append end event")),"append.gateway":m("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",l("Append gateway")),"append.append-task":m("bpmn:Task","bpmn-icon-task",l("Append task")),"append.intermediate-event":m("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",l("Append intermediate/boundary event"))})),a.isEmpty(e,"bpmn-replace")||ee(u,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:l("Change element"),action:{click:function(e,n){var i=ee(function(e){var n=t.getPad(e).html.getBoundingClientRect();return{x:n.left,y:n.bottom+5}}(n),{cursor:{x:e.x,y:e.y}});a.open(n,"bpmn-replace",i,{title:l("Change element"),width:300,search:!0})}}}}),kn(d,"bpmn:SequenceFlow")&&ee(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Add text annotation"))}),An(d,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&ee(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Add text annotation")),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect to other element"),action:{click:h,dragstart:h}}}),kn(d,"bpmn:TextAnnotation")&&ee(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using association"),action:{click:h,dragstart:h}}}),An(d,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&ee(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using data input association"),action:{click:h,dragstart:h}}}),kn(d,"bpmn:Group")&&ee(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Add text annotation"))});var y=s.allowed("elements.delete",{elements:[e]});return A(y)&&(y=y[0]===e),y&&ee(u,{delete:{group:"edit",className:"bpmn-icon-trash",title:l("Delete"),action:{click:function(e,t){n.removeElements([t])}}}}),u};const Sy={__depends__:[Xg,ny,Ga,ta,np,Dh,_y],__init__:["contextPadProvider"],contextPadProvider:["type",wy]};var Cy={horizontal:["x","width"],vertical:["y","height"]};function ky(e,t){this._modeling=e,this._filters=[],this.registerFilter((function(e){var n=t.allowed("elements.distribute",{elements:e});return A(n)?n:n?e:[]}))}ky.$inject=["modeling","rules"],ky.prototype.registerFilter=function(e){if("function"!=typeof e)throw new Error("the filter has to be a function");this._filters.push(e)},ky.prototype.trigger=function(e,t){var n,i,r=this._modeling;if(!(e.length<3||(this._setOrientation(t),i=this._filterElements(e),(n=this._createGroups(i)).length<=2)))return r.distributeElements(n,this._axis,this._dimension),n},ky.prototype._filterElements=function(e){var t=this._filters,n=this._axis,i=this._dimension,r=[].concat(e);return t.length?(j(t,(function(e){r=e(r,n,i)})),r):e},ky.prototype._createGroups=function(e){var t=[],n=this,i=this._axis,r=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');return j(q(e,i),(function(e,o){var a,s=n._findRange(e,i,r),c=t[t.length-1];c&&n._hasIntersection(c.range,s)?t[t.length-1].elements.push(e):(a={range:s,elements:[e]},t.push(a))})),t},ky.prototype._setOrientation=function(e){var t=Cy[e];this._axis=t[0],this._dimension=t[1]},ky.prototype._hasIntersection=function(e,t){return Math.max(e.min,e.max)>=Math.min(t.min,t.max)&&Math.min(e.min,e.max)<=Math.max(t.min,t.max)},ky.prototype._findRange=function(e){var t=e[this._axis];return{min:t+5,max:t+e[this._dimension]-5}};const Ay={__init__:["distributeElements"],distributeElements:["type",ky]};function Py(e){vc.call(this,e)}Py.$inject=["eventBus"],x(Py,vc),Py.prototype.init=function(){this.addRule("elements.distribute",(function(e){var t=e.elements;return!((t=Vr(t=O(t,(function(e){var t=An(e,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(e.labelTarget||t)})))).length<3)&&t}))};var Ry={horizontal:'\n \n \n \n ',vertical:'\n \n \n \n '};function My(e,t,n,i){this._distributeElements=t,this._translate=n,this._popupMenu=e,this._rules=i,e.registerProvider("align-elements",900,this)}My.$inject=["popupMenu","distributeElements","translate","rules"],My.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&ee(t,this._getEntries(e)),t},My.prototype._isAllowed=function(e){return this._rules.allowed("elements.distribute",{elements:e})},My.prototype._getEntries=function(e){var t=this._distributeElements,n=this._translate,i=this._popupMenu;return{"distribute-elements-horizontal":{group:"distribute",title:n("Distribute elements horizontally"),className:"bjs-align-elements-menu-entry",imageHtml:Ry.horizontal,action:function(n,r){t.trigger(e,"horizontal"),i.close()}},"distribute-elements-vertical":{group:"distribute",title:n("Distribute elements vertically"),imageHtml:Ry.vertical,action:function(n,r){t.trigger(e,"vertical"),i.close()}}}};const Ty={__depends__:[hc,Ay],__init__:["bpmnDistributeElements","distributeElementsMenuProvider"],bpmnDistributeElements:["type",Py],distributeElementsMenuProvider:["type",My]};var Dy="is not a registered action";function By(e,t){this._actions={};var n=this;e.on("diagram.init",(function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})}))}function Ny(e,t){return new Error(e+" "+t)}By.$inject=["eventBus","injector"],By.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),i=e.get("selection",!1),r=e.get("zoomScroll",!1),o=e.get("copyPaste",!1),a=e.get("canvas",!1),s=e.get("rules",!1),c=e.get("keyboardMove",!1),l=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",(function(){t.undo()})),this.register("redo",(function(){t.redo()}))),o&&i&&this.register("copy",(function(){var e=i.get();if(e.length)return o.copy(e)})),o&&this.register("paste",(function(){o.paste()})),r&&this.register("stepZoom",(function(e){r.stepZoom(e.value)})),a&&this.register("zoom",(function(e){a.zoom(e.value)})),n&&i&&s&&this.register("removeSelection",(function(){var e=i.get();if(e.length){var t,r=s.allowed("elements.delete",{elements:e});!1!==r&&(t=A(r)?r:e).length&&n.removeElements(t.slice())}})),c&&this.register("moveCanvas",(function(e){c.moveCanvas(e)})),l&&this.register("moveSelection",(function(e){l.moveSelection(e.direction,e.accelerated)}))},By.prototype.trigger=function(e,t){if(!this._actions[e])throw Ny(e,Dy);return this._actions[e](t)},By.prototype.register=function(e,t){var n=this;if("string"==typeof e)return this._registerAction(e,t);j(e,(function(e,t){n._registerAction(t,e)}))},By.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw Ny(e,"is already registered");this._actions[e]=t},By.prototype.unregister=function(e){if(!this.isRegistered(e))throw Ny(e,Dy);this._actions[e]=void 0},By.prototype.getActions=function(){return Object.keys(this._actions)},By.prototype.isRegistered=function(e){return!!this._actions[e]};const Oy={__init__:["editorActions"],editorActions:["type",By]};function jy(e){e.invoke(By,this)}x(jy,By),jy.$inject=["injector"],jy.prototype._registerDefaultActions=function(e){By.prototype._registerDefaultActions.call(this,e);var t=e.get("canvas",!1),n=e.get("elementRegistry",!1),i=e.get("selection",!1),r=e.get("spaceTool",!1),o=e.get("lassoTool",!1),a=e.get("handTool",!1),s=e.get("globalConnect",!1),c=e.get("distributeElements",!1),l=e.get("alignElements",!1),p=e.get("directEditing",!1),u=e.get("searchPad",!1),d=e.get("modeling",!1),h=e.get("contextPad",!1);t&&n&&i&&this._registerAction("selectElements",(function(){var e=t.getRootElement(),r=n.filter((function(t){return t!==e}));return i.select(r),r})),r&&this._registerAction("spaceTool",(function(){r.toggle()})),o&&this._registerAction("lassoTool",(function(){o.toggle()})),a&&this._registerAction("handTool",(function(){a.toggle()})),s&&this._registerAction("globalConnectTool",(function(){s.toggle()})),i&&c&&this._registerAction("distributeElements",(function(e){var t=i.get(),n=e.type;t.length&&c.trigger(t,n)})),i&&l&&this._registerAction("alignElements",(function(e){var t=i.get(),n=[],r=e.type;t.length&&(n=O(t,(function(e){return!kn(e,"bpmn:Lane")})),l.trigger(n,r))})),i&&d&&this._registerAction("setColor",(function(e){var t=i.get();t.length&&d.setColor(t,e)})),i&&p&&this._registerAction("directEditing",(function(){var e=i.get();e.length&&p.activate(e[0])})),u&&this._registerAction("find",(function(){u.toggle()})),t&&d&&this._registerAction("moveToOrigin",(function(){var e,i,r=t.getRootElement();e=qr(i=kn(r,"bpmn:Collaboration")?n.filter((function(e){return kn(e.parent,"bpmn:Collaboration")})):n.filter((function(e){return e!==r&&!kn(e.parent,"bpmn:SubProcess")}))),d.moveElements(i,{x:-e.x,y:-e.y},r)})),i&&h&&this._registerAction("replaceElement",(function(e){h.triggerEntry("replace","click",e)}))};const Ly={__depends__:[Oy],editorActions:["type",jy]};function Iy(e){e.on(["create.init","shape.move.init"],(function(e){var t=e.context;An(e.shape,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(t.gridSnappingContext||(t.gridSnappingContext={}),t.gridSnappingContext.snapLocation="top-left")}))}Iy.$inject=["eventBus"];function $y(e,t,n){return n||(n="round"),Math[n](e/t)*t}function zy(e,t,n){var i=!n||!1!==n.active;this._eventBus=t;var r=this;t.on("diagram.init",800,(function(){r.setActive(i)})),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],1200,(function(t){var n=t.originalEvent;if(!(!r.active||n&&sa(n))){var i=t.context,o=i.gridSnappingContext;o||(o=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},o=function(e,t,n){var i=e.context,r=e.shape,o=i.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;if(s&&R(s[t]))return s[t];s||(s=o.snapOffset={});R(s[t])||(s[t]=0);if(!r)return s[t];n.get(r.id)||(Fy(t)?s[t]+=r[t]+r.width/2:s[t]+=r[t]+r.height/2);if(!a)return s[t];"x"===t?/left/.test(a)?s[t]-=r.width/2:/right/.test(a)&&(s[t]+=r.width/2):/top/.test(a)?s[t]-=r.height/2:/bottom/.test(a)&&(s[t]+=r.height/2);return s[t]}(t,n,e);o&&(i.offset=o);var a=function(e,t){var n=e.context,i=n.createConstraints,r=n.resizeConstraints||{},o=n.gridSnappingContext,a=o.snapConstraints;if(a&&a[t])return a[t];a||(a=o.snapConstraints={});a[t]||(a[t]={});var s=n.direction;i&&(Fy(t)?(a.x.min=i.left,a.x.max=i.right):(a.y.min=i.top,a.y.max=i.bottom));var c=r.min,l=r.max;c&&(Fy(t)?Hy(s)?a.x.max=c.left:a.x.min=c.right:Vy(s)?a.y.max=c.top:a.y.min=c.bottom);l&&(Fy(t)?Hy(s)?a.x.min=l.left:a.x.max=l.right:Vy(s)?a.y.min=l.top:a.y.max=l.bottom);return a[t]}(t,n);a&&ee(i,a),Gl(t,n)||r.snapEvent(t,n,i)}))}}))}function Fy(e){return"x"===e}function Vy(e){return-1!==e.indexOf("n")}function Hy(e){return-1!==e.indexOf("w")}function Gy(e,t){ro.call(this,e),this._gridSnapping=t;var n=this;this.preExecute("shape.resize",(function(e){var t=e.context,i=(t.hints||{}).autoResize;if(i){var r=t.shape,o=t.newBounds;T(i)?t.newBounds=n.snapComplex(o,i):t.newBounds=n.snapSimple(r,o)}}))}zy.prototype.snapEvent=function(e,t,n){Wl(e,t,this.snapValue(e[t],n))},zy.prototype.getGridSpacing=function(){return 10},zy.prototype.snapValue=function(e,t){var n,i,r=0;return t&&t.offset&&(r=t.offset),e=$y(e+=r,10),t&&t.min&&R(n=t.min)&&(n=$y(n+r,10,"ceil"),e=Math.max(e,n)),t&&t.max&&R(i=t.max)&&(i=$y(i+r,10,"floor"),e=Math.min(e,i)),e-=r},zy.prototype.isActive=function(){return this.active},zy.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},zy.prototype.toggleActive=function(){this.setActive(!this.active)},zy.$inject=["elementRegistry","eventBus","config.gridSnapping"],Gy.$inject=["eventBus","gridSnapping","modeling"],x(Gy,ro),Gy.prototype.snapSimple=function(e,t){var n=this._gridSnapping;return t.width=n.snapValue(t.width,{min:t.width}),t.height=n.snapValue(t.height,{min:t.height}),t.x=e.x+e.width/2-t.width/2,t.y=e.y+e.height/2-t.height/2,t},Gy.prototype.snapComplex=function(e,t){return/w|e/.test(t)&&(e=this.snapHorizontally(e,t)),/n|s/.test(t)&&(e=this.snapVertically(e,t)),e},Gy.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,i=/w/.test(t),r=/e/.test(t),o={};return o.width=n.snapValue(e.width,{min:e.width}),r&&(i?(o.x=n.snapValue(e.x,{max:e.x}),o.width+=n.snapValue(e.x-o.x,{min:e.x-o.x})):e.x=e.x+e.width-o.width),ee(e,o),e},Gy.prototype.snapVertically=function(e,t){var n=this._gridSnapping,i=/n/.test(t),r=/s/.test(t),o={};return o.height=n.snapValue(e.height,{min:e.height}),i&&(r?(o.y=n.snapValue(e.y,{max:e.y}),o.height+=n.snapValue(e.y-o.y,{min:e.y-o.y})):e.y=e.y+e.height-o.height),ee(e,o),e};function Wy(e,t){e.on(["spaceTool.move","spaceTool.end"],2e3,(function(e){var n,i=e.context;i.initialized&&("x"===i.axis?(n=t.snapValue(e.dx),e.x=e.x+n-e.dx,e.dx=n):(n=t.snapValue(e.dy),e.y=e.y+n-e.dy,e.dy=n))}))}Wy.$inject=["eventBus","gridSnapping"];const Uy={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Gy],gridSnappingSpaceToolBehavior:["type",Wy]}],__init__:["gridSnapping"],gridSnapping:["type",zy]};function qy(e,t){e.on("autoPlace",2e3,(function(e){var n=e.source,i=Nr(n),r=e.shape,o=Nc(n,r);return["x","y"].forEach((function(e){var n={};o[e]!==i[e]&&(o[e]>i[e]?n.min=o[e]:n.max=o[e],kn(r,"bpmn:TextAnnotation")&&(!function(e){return"x"===e}(e)?n.offset=-r.height/2:n.offset=-r.width/2),o[e]=t.snapValue(o[e],n))})),o}))}qy.$inject=["eventBus","gridSnapping"];function Ky(e,t,n){t.on(["create.start","shape.move.start"],1750,(function(t){var i=t.context,r=i.shape,o=e.getRootElement();kn(r,"bpmn:Participant")&&kn(o,"bpmn:Process")&&o.children.length&&(i.createConstraints&&(r.width=n.snapValue(r.width,{min:r.width}),r.height=n.snapValue(r.height,{min:r.height})))}))}Ky.$inject=["canvas","eventBus","gridSnapping"];function Xy(e,t,n){ro.call(this,e),this._gridSnapping=t;var i=this;this.postExecuted(["connection.create","connection.layout"],3e3,(function(e){var t=e.context,r=t.connection,o=t.hints||{},a=r.waypoints;o.connectionStart||o.connectionEnd||!1===o.createElementsBehavior||function(e){return e.length>3}(a)&&n.updateWaypoints(r,i.snapMiddleSegments(a))}))}function Yy(e,t,n){var i=qi(t,n),r={};return function(e){return"h"===e}(i)&&(r.y=e.snapValue(t.y)),function(e){return"v"===e}(i)&&(r.x=e.snapValue(t.x)),("x"in r||"y"in r)&&(t=ee({},t,r),n=ee({},n,r)),[t,n]}Xy.$inject=["eventBus","gridSnapping","modeling"],x(Xy,ro),Xy.prototype.snapMiddleSegments=function(e){var t,n=this._gridSnapping;e=e.slice();for(var i=1;i5&&Ie(a,{x:o.x,width:o.width}),o.height>5&&Ie(a,{y:o.y,height:o.height}),i.canExecute?ze(a).remove(mv):ze(a).add(mv)})),e.on("resize.cleanup",(function(e){var n,i;n=e.context,i=n.shape,n.frame&&nt(n.frame),t.removeMarker(i,hv)}))}fv.$inject=["eventBus","canvas","previewSupport"];var gv=-6,yv="djs-resizer",vv=["n","w","s","e","nw","ne","se","sw"];function bv(e,t,n,i){this._resize=i,this._canvas=t;var r=this;e.on("selection.changed",(function(e){var t=e.newSelection;r.removeResizers(),1===t.length&&j(t,J(r.addResizer,r))})),e.on("shape.changed",(function(e){var t=e.element;n.isSelected(t)&&(r.removeResizers(),r.addResizer(t))}))}bv.prototype.makeDraggable=function(e,t,n){var i=this._resize;function r(t){Vo(t)&&i.activate(t,e,n)}we.bind(t,"mousedown",r),we.bind(t,"touchstart",r)},bv.prototype._createResizer=function(e,t,n,i){var r=this._getResizersParent(),o=function(e){var t={x:0,y:0};-1!==e.indexOf("e")?t.x=6:-1!==e.indexOf("w")&&(t.x=gv);-1!==e.indexOf("s")?t.y=6:-1!==e.indexOf("n")&&(t.y=gv);return t}(i),a=qe("g");ze(a).add(yv),ze(a).add(yv+"-"+e.id),ze(a).add(yv+"-"+i),Ne(r,a);var s=qe("rect");Ie(s,{x:-4+o.x,y:-4+o.y,width:8,height:8}),ze(s).add(yv+"-visual"),Ne(a,s);var c=qe("rect");return Ie(c,{x:-10+o.x,y:-10+o.y,width:20,height:20}),ze(c).add(yv+"-hit"),Ne(a,c),Si(a,t,n),a},bv.prototype.createResizer=function(e,t){var n=uv(e,t),i=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,i,t)},bv.prototype.addResizer=function(e){var t=this;!Qn(e)&&this._resize.canResize({shape:e})&&j(vv,(function(n){t.createResizer(e,n)}))},bv.prototype.removeResizers=function(){Ve(this._getResizersParent())},bv.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},bv.$inject=["eventBus","canvas","selection","resize"];const xv={__depends__:[el,Xc,pp],__init__:["resize","resizePreview","resizeHandles"],resize:["type",pv],resizePreview:["type",fv],resizeHandles:["type",bv]};function _v(e,t,n,i,r,o,a){function s(e,t){(t||An(e,["bpmn:Task","bpmn:TextAnnotation","bpmn:Participant"])||wv(e))&&i.activate(e)}this._bpmnFactory=t,this._canvas=n,this._modeling=r,this._textRenderer=a,i.registerProvider(this),e.on("element.dblclick",(function(e){s(e.element,!0)})),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open","root.set","selection.changed"],(function(){i.isActive()&&i.complete()})),e.on(["shape.remove","connection.remove"],2e3,(function(e){i.isActive(e.element)&&i.cancel()})),e.on(["commandStack.changed"],(function(e){i.isActive()&&i.cancel()})),e.on("directEditing.activate",(function(e){o.removeResizers()})),e.on("create.end",500,(function(e){var t=e.context,n=t.shape,i=e.context.canExecute;e.isTouch||i&&(t.hints&&!1===t.hints.createElementsBehavior||s(n))})),e.on("autoPlace.end",500,(function(e){s(e.shape)}))}function wv(e){return kn(e,"bpmn:SubProcess")&&!Kn(e)}_v.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],_v.prototype.activate=function(e){var t=si(e);if(void 0!==t){var n={text:t};ee(n,this.getEditingBBox(e));var i={},r=n.style||{};return ee(r,{backgroundColor:null,border:null}),(An(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||wv(e))&&ee(i,{centerVertically:!0}),ni(e)&&(ee(i,{autoResize:!0}),ee(r,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),kn(e,"bpmn:TextAnnotation")&&(ee(i,{resizable:!0,autoResize:!0}),ee(r,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),ee(n,{options:i,style:r}),n}},_v.prototype.getEditingBBox=function(e){var t=this._canvas,n=e.label||e,i=t.getAbsoluteBBox(n),r=i.x+i.width/2,o=i.y+i.height/2,a={x:i.x,y:i.y},s=t.zoom(),c=this._textRenderer.getDefaultStyle(),l=this._textRenderer.getExternalStyle(),p=l.fontSize*s,u=l.lineHeight,d=c.fontSize*s,h=c.lineHeight,m={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};if(kn(e,"bpmn:Lane")||function(e){return kn(e,"bpmn:Participant")&&Kn(e)}(e)){var f=Xn(e);ee(a,f?{width:i.height,height:30*s,x:i.x-i.height/2+15*s,y:o-30*s/2}:{width:i.width,height:30*s}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:f?"rotate(-90deg)":null})}if(function(e){return kn(e,"bpmn:Participant")&&!Kn(e)}(e)){var g=Xn(e);ee(a,g?{width:i.width,height:i.height}:{width:i.height,height:i.width,x:r-i.height/2,y:o-i.width/2}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:g?null:"rotate(-90deg)"})}(An(e,["bpmn:Task","bpmn:CallActivity"])||wv(e))&&(ee(a,{width:i.width,height:i.height}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"})),function(e){return kn(e,"bpmn:SubProcess")&&Kn(e)}(e)&&(ee(a,{width:i.width,x:i.x}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"}));var y=90*s,v=7*s,b=4*s;if(n.labelTarget&&(ee(a,{width:y,height:i.height+v+b,x:r-y/2,y:i.y-v}),ee(m,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:b+"px"})),ni(n)&&!ii(n)&&!Jn(n)){var x=oi(e),_=t.getAbsoluteBBox({x:x.x,y:x.y,width:0,height:0}),w=p+v+b;ee(a,{width:y,height:w,x:_.x-y/2,y:_.y-w/2}),ee(m,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:b+"px"})}return kn(e,"bpmn:TextAnnotation")&&(ee(a,{width:i.width,height:i.height,minWidth:30*s,minHeight:10*s}),ee(m,{textAlign:"left",paddingTop:5*s+"px",paddingBottom:7*s+"px",paddingLeft:7*s+"px",paddingRight:5*s+"px",fontSize:d+"px",lineHeight:h})),{bounds:a,style:m}},_v.prototype.update=function(e,t,n,i){var r,o,a;kn(e,"bpmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(e),r={x:e.x,y:e.y,width:e.width/o.width*i.width,height:e.height/o.height*i.height}),(a=t)&&a.trim()||(t=null),this._modeling.updateLabel(e,t,r)};var Ev="djs-element-hidden",Sv="djs-label-hidden";function Cv(e,t,n){var i,r,o,a=this,s=t.getDefaultLayer();e.on("directEditing.activate",(function(e){var c=e.active;if(kn(i=c.element.label||c.element,"bpmn:TextAnnotation")){r=t.getAbsoluteBBox(i),o=qe("g");var l=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i.width,containerHeight:i.height,position:{mx:0,my:0}}),p=a.path=qe("path");Ie(p,{d:l,strokeWidth:2,stroke:kv(i)}),Ne(o,p),Ne(s,o),Ci(o,i.x,i.y)}kn(i,"bpmn:TextAnnotation")||i.labelTarget?t.addMarker(i,Ev):(kn(i,"bpmn:Task")||kn(i,"bpmn:CallActivity")||kn(i,"bpmn:SubProcess")||kn(i,"bpmn:Participant"))&&t.addMarker(i,Sv)})),e.on("directEditing.resize",(function(e){if(kn(i,"bpmn:TextAnnotation")){var t=e.height,o=e.dy,s=Math.max(i.height/r.height*(t+o),0),c=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i.width,containerHeight:s,position:{mx:0,my:0}});Ie(a.path,{d:c})}})),e.on(["directEditing.complete","directEditing.cancel"],(function(e){var n=e.active;n&&(t.removeMarker(n.element.label||n.element,Ev),t.removeMarker(i,Sv)),i=void 0,r=void 0,o&&(nt(o),o=void 0)}))}function kv(e,t){return Rn(e).get("stroke")||t||"black"}Cv.$inject=["eventBus","canvas","pathMap"];const Av={__depends__:[io,xv,ny],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",_v],labelEditingPreview:["type",Cv]};var Pv=new Xr("tt");function Rv(e,t){e.style.display=!1===t?"none":""}var Mv="djs-tooltip",Tv="."+Mv;function Dv(e,t){var n,i;this._eventBus=e,this._canvas=t,this._ids=Pv,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=(n=t.getContainer(),pe(i=Re('
      '),{position:"absolute",width:"0",height:"0"}),n.insertBefore(i,n.firstChild),i);var r=this;Ce.bind(this._tooltipRoot,Tv,"mousedown",(function(e){e.stopPropagation()})),Ce.bind(this._tooltipRoot,Tv,"mouseover",(function(e){r.trigger("mouseover",e)})),Ce.bind(this._tooltipRoot,Tv,"mouseout",(function(e){r.trigger("mouseout",e)})),this._init()}Dv.$inject=["eventBus","canvas"],Dv.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=ee({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},Dv.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,i=this.get(ue(n,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},Dv.prototype.get=function(e){return"string"!=typeof e&&(e=e.id),this._tooltips[e]},Dv.prototype.clearTimeout=function(e){if(e=this.get(e)){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},Dv.prototype.setTimeout=function(e){if(e=this.get(e)){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout((function(){t.remove(e)}),e.timeout)}},Dv.prototype.remove=function(e){var t=this.get(e);t&&(Be(t.html),Be(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},Dv.prototype.show=function(){Rv(this._tooltipRoot)},Dv.prototype.hide=function(){Rv(this._tooltipRoot,!1)},Dv.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},Dv.prototype._addTooltip=function(e){var t,n=e.id,i=e.html,r=this._tooltipRoot;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),T(i)&&(i=Re(i)),pe(t=Re('
      '),{position:"absolute"}),t.appendChild(i),e.type&&he(t).add("djs-tooltip-"+e.type),e.className&&he(t).add(e.className),e.htmlContainer=t,r.appendChild(t),this._tooltips[n]=e,this._updateTooltip(e)},Dv.prototype._updateTooltip=function(e){var t,n,i,r=e.position,o=e.htmlContainer;t=o,n=r.x,i=r.y,pe(t,{left:n+"px",top:i+"px"})},Dv.prototype._updateTooltipVisibilty=function(e){j(this._tooltips,(function(t){var n=t.show,i=t.htmlContainer,r=!0;n&&((n.minZoom>e.scale||n.maxZoom"+r+"
      "}))}))}Nv.$inject=["eventBus","tooltips","translate"];const Ov={__depends__:[Bv],__init__:["modelingFeedback"],modelingFeedback:["type",Nv]};var jv=Math.round;function Lv(e,t,n,i,r){function o(e,t,n,i){return r.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function a(e,n,i,r){if(P(i)&&(r=i,i=!1),!n.waypoints&&n.parent&&!ze(e.target).has("djs-hit-no-move")){var o=function(e){return{x:e.x+jv(e.width/2),y:e.y+jv(e.height/2)}}(n);return t.init(e,o,"shape.move",{cursor:"grabbing",autoActivate:i,data:{shape:n,context:r||{}}}),!0}}e.on("shape.move.start",1500,(function(e){var t,n,r=e.context,o=e.shape,a=i.get().slice();-1===a.indexOf(o)&&(a=[o]),n=G(t=a,"id"),ee(r,{shapes:a=O(t,(function(e){for(;e=e.parent;)if(n[e.id])return!1;return!0})),validatedShapes:a,shape:o})})),e.on("shape.move.start",1250,(function(e){var t=e.context,n=t.validatedShapes;if(!(t.canExecute=o(n)))return!1})),e.on("shape.move.move",500,(function(e){var t,n=e.context,i=n.validatedShapes,r=e.hover,a={x:e.dx,y:e.dy};t=o(i,a,{x:e.x,y:e.y},r),n.delta=a,n.canExecute=t,n.target=null!==t?r:null})),e.on("shape.move.end",(function(e){var t=e.context,i=t.delta,r=t.canExecute,o="attach"===r,a=t.shapes;if(!1===r)return!1;i.x=jv(i.x),i.y=jv(i.y),0===i.x&&0===i.y||n.moveElements(a,i,t.target,{primaryShape:t.shape,attach:o})})),e.on("element.mousedown",(function(e){if(Vo(e)){var t=Lo(e);if(!t)throw new Error("must supply DOM mousedown event");return a(t,e.element)}})),this.start=a}Lv.$inject=["eventBus","dragging","modeling","selection","rules"];var Iv="djs-dragging",$v="drop-ok",zv="drop-not-ok",Fv="new-parent",Vv="attach-ok";function Hv(e,t,n,i){function r(e){var t=function(e){var t=O(e,(function(t){return!Qn(t)||B(e,K({id:t.source.id}))&&B(e,K({id:t.target.id}))}));return t}(o(e));return t}function o(e){var t=Ur(e,!0),n=t.flatMap((e=>(e.incoming||[]).concat(e.outgoing||[]))),i=t.concat(n);return[...new Set(i)]}function a(e,n){[Vv,$v,zv,Fv].forEach((function(i){i===n?t.addMarker(e,i):t.removeMarker(e,i)}))}e.on("shape.move.start",499,(function(e){var a=e.context,s=a.shapes,c=a.allDraggedElements,l=r(s);if(!a.dragGroup){var p=qe("g");Ie(p,n.cls("djs-drag-group",["no-events"])),Ne(t.getActiveLayer(),p),a.dragGroup=p}l.forEach((function(e){i.addDragger(e,a.dragGroup)})),j(c=c?_([c,o(s)]):o(s),(function(e){t.addMarker(e,Iv)})),a.allDraggedElements=c,a.differentParents=1!==V(G(s,(function(e){return e.parent&&e.parent.id}))).length})),e.on("shape.move.move",499,(function(e){var t=e.context,n=t.dragGroup,i=t.target,r=t.shape.parent,o=t.canExecute;i&&("attach"===o?a(i,Vv):t.canExecute&&r&&i.id!==r.id?a(i,Fv):a(i,t.canExecute?$v:zv)),Ci(n,e.dx,e.dy)})),e.on(["shape.move.out","shape.move.cleanup"],(function(e){var t=e.context.target;t&&a(t,null)})),e.on("shape.move.cleanup",(function(e){var n=e.context,i=n.allDraggedElements,r=n.dragGroup;j(i,(function(e){t.removeMarker(e,Iv)})),r&&nt(r)})),this.makeDraggable=function(e,n,r){i.addDragger(n,e.dragGroup),r&&t.addMarker(n,Iv),e.allDraggedElements?e.allDraggedElements.push(n):e.allDraggedElements=[n]}}Hv.$inject=["eventBus","canvas","styles","previewSupport"];const Gv={__depends__:[Ko,ta,Ro,el,Xc,pp],__init__:["move","movePreview"],move:["type",Lv],movePreview:["type",Hv]};var Wv=".djs-palette-toggle",Uv=".entry",qv=Wv+", "+Uv,Kv="djs-palette-",Xv="open",Yv="two-column";function Zv(e,t){this._eventBus=e,this._canvas=t;var n=this;e.on("tool-manager.update",(function(e){var t=e.tool;n.updateToolHighlight(t)})),e.on("i18n.changed",(function(){n._update()})),e.on("diagram.init",(function(){n._diagramInitialized=!0,n._rebuild()}))}function Qv(e,t){var n=t.getPaletteEntries();return M(n)?n(e):(j(n,(function(t,n){e[n]=t})),e)}Zv.$inject=["eventBus","canvas"],Zv.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("palette.getProviders",e,(function(e){e.providers.push(t)})),this._rebuild()},Zv.prototype.getEntries=function(){return this._getProviders().reduce(Qv,{})},Zv.prototype._rebuild=function(){this._diagramInitialized&&(this._getProviders().length&&(this._container||this._init(),this._update()))},Zv.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),i=this._container=Re(Zv.HTML_MARKUP);n.appendChild(i),he(n).add(Kv+"shown"),Ce.bind(i,qv,"click",(function(t){if(Me(t.delegateTarget,Wv))return e.toggle();e.trigger("click",t)})),we.bind(i,"mousedown",(function(e){e.stopPropagation()})),Ce.bind(i,Uv,"dragstart",(function(t){e.trigger("dragstart",t)})),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:i})},Zv.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},Zv.prototype._toggleState=function(e){e=e||{};var t,n=this._getParentContainer(),i=this._container,r=this._eventBus,o=he(i),a=he(n);t="twoColumn"in e?e.twoColumn:this._needsCollapse(n.clientHeight,this._entries||{}),o.toggle(Yv,t),a.toggle(Kv+Yv,t),"open"in e&&(o.toggle(Xv,e.open),a.toggle(Kv+Xv,e.open)),r.fire("palette.changed",{twoColumn:t,open:this.isOpen()})},Zv.prototype._update=function(){var e=Te(".djs-palette-entries",this._container),t=this._entries=this.getEntries();fe(e),j(t,(function(t,n){var i=t.group||"default",r=Te("[data-group="+co(i)+"]",e);r||(ue(r=Re('
      '),"data-group",i),e.appendChild(r));var o,a,s,c=t.html||(t.separator?'
      ':'
      '),l=Re(c);if(r.appendChild(l),!t.separator&&(ue(l,"data-action",n),t.title&&ue(l,"title",t.title),t.className&&(o=l,a=t.className,s=he(o),(A(a)?a:a.split(/\s+/g)).forEach((function(e){s.add(e)}))),t.imageUrl)){var p=Re("");ue(p,"src",t.imageUrl),l.appendChild(p)}})),this.open()},Zv.prototype.trigger=function(e,t,n){var i,r,o=t.delegateTarget||t.target;return o?(i=ue(o,"data-action"),r=t.originalEvent||t,this.triggerEntry(i,e,r,n)):t.preventDefault()},Zv.prototype.triggerEntry=function(e,t,n,i){var r,o;if((r=this._entries[e])&&(o=r.action,!1!==this._eventBus.fire("palette.trigger",{entry:r,event:n}))){if(M(o)){if("click"===t)return o(n,i)}else if(o[t])return o[t](n,i);n.preventDefault()}},Zv.prototype._layoutChanged=function(){this._toggleState({})},Zv.prototype._needsCollapse=function(e,t){return e<46*Object.keys(t).length+50},Zv.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},Zv.prototype.open=function(){this._toggleState({open:!0})},Zv.prototype.toggle=function(){this.isOpen()?this.close():this.open()},Zv.prototype.isActiveTool=function(e){return e&&this._activeTool===e},Zv.prototype.updateToolHighlight=function(e){var t;this._toolsContainer||(t=Te(".djs-palette-entries",this._container),this._toolsContainer=Te("[data-group=tools]",t)),j(this._toolsContainer.children,(function(t){var n=t.getAttribute("data-action");if(n){var i=he(t);n=n.replace("-tool",""),i.contains("entry")&&n===e?i.add("highlighted-entry"):i.remove("highlighted-entry")}}))},Zv.prototype.isOpen=function(){return he(this._container).has(Xv)},Zv.prototype._getParentContainer=function(){return this._canvas.getContainer()},Zv.HTML_MARKUP='
      ';const Jv={__init__:["palette"],palette:["type",Zv]};var eb="crosshair";function tb(e,t,n,i,r,o,a){this._selection=r,this._dragging=n,this._mouse=a;var s=this,c=function(e){var n,i=t.getActiveLayer();Ie(n=e.frame=qe("rect"),{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),Ne(i,n)},l=function(e){var t=e.frame,n=e.bbox;Ie(t,{x:n.x,y:n.y,width:n.width,height:n.height})},p=function(e){e.frame&&nt(e.frame)};o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",(function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",(function(){s.activateLasso(t.originalEvent,!0)}))})),e.on("lasso.end",0,(function(e){var t=e.context,n=nb(e),r=i.filter((function(e){return e})),o=Go(e);s.select(r,n,o?t.selection:[])})),e.on("lasso.start",(function(e){var t=e.context;t.bbox=nb(e),c(t),t.selection=r.get()})),e.on("lasso.move",(function(e){var t=e.context;t.bbox=nb(e),l(t)})),e.on("lasso.cleanup",(function(e){var t=e.context;p(t)})),e.on("element.mousedown",1500,(function(e){if(Go(e))return s.activateLasso(e.originalEvent),!0}))}function nb(e){var t={x:e.x-e.dx,y:e.y-e.dy},n={x:e.x,y:e.y};return t.x<=n.x&&t.y=n.x&&t.yn.x&&t.y<=n.y?{x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:t.x<=n.x&&t.y>n.y||t.x=n.y?{x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:t.x>=n.x&&t.y>n.y||t.x>n.x&&t.y>=n.y?{x:n.x,y:n.y,width:t.x-n.x,height:t.y-n.y}:{x:n.x,y:n.y,width:0,height:0}}tb.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],tb.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:eb,data:{context:{}}})},tb.prototype.activateSelection=function(e,t){this._dragging.init(e,"lasso.selection",{trapClick:!1,autoActivate:t,cursor:eb,data:{context:{}},keepSelection:!0})},tb.prototype.select=function(e,t,n=[]){var i=function(e,t){var n={};return j(e,(function(e){var i=e;i.waypoints&&(i=qr(i)),!R(t.y)&&i.x>t.x&&(n[e.id]=e),!R(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(R(t.width)&&R(t.height)&&i.width+i.xt[i]+r-n&&Wl(e,i,t[i]+r-n)}))}(e,o,function(e){return kn(e,"bpmn:Task")?bb:vb}(o)),o&&(t=i,z(["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"],(function(e){return Cb(t,e)})))?(n.connectionStart=Hl(r),An(o,["bpmn:Event","bpmn:Gateway"])&&Sb(e,Hl(o)),An(o,["bpmn:Task","bpmn:SubProcess"])&&function(e,t){var n=Hl(t);_b.forEach((function(i){(function(e,t,n){return e[n]>t[n]+xb&&e[n]r[t]?r[t]+yb:r[t]-yb,Wl(e,t,n))}))}(e)):Cb(i,"bpmn:MessageFlow")?(kn(r,"bpmn:Event")&&(n.connectionStart=Hl(r)),kn(o,"bpmn:Event")&&Sb(e,Hl(o))):n.connectionStart=n.initialConnectionStart)}))}function Sb(e,t){Wl(e,"x",t.x),Wl(e,"y",t.y)}function Cb(e,t){return e&&e.type===t}function kb(e,t){return"x"===e?t.width:t.height}function Ab(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function Pb(){this._snapValues={}}Eb.$inject=["eventBus"],Ab.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},Ab.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},Ab.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},Ab.prototype.getSnapLocations=function(){return this._snapLocations},Ab.prototype.setSnapLocations=function(e){this._snapLocations=e},Ab.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new Pb).initDefaults(this._defaultSnaps),n},Pb.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),-1===n.x.indexOf(t.x)&&n.x.push(t.x),-1===n.y.indexOf(t.y)&&n.y.push(t.y)},Pb.prototype.snap=function(e,t,n,i){var r=this._snapValues[t];return r&&function(e,t,n){var i,r;for(n=void 0===n?10:n,i=0;i=e.x||i&&i<=e.x)&&Wl(e,"x",e.x),(n&&n>=e.y||r&&r<=e.y)&&Wl(e,"y",e.y)}}function Bb(e,t){return-1!==e.indexOf(t)}function Nb(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}x(Tb,Mb),Tb.$inject=["eventBus","injector"],Tb.prototype.initSnap=function(e){var t=Mb.prototype.initSnap.call(this,e),n=e.shape,i=!!this._elementRegistry.get(n.id);return j(n.outgoing,(function(n){var r=n.waypoints[0];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Nb(r,i,e))})),j(n.incoming,(function(n){var r=n.waypoints[n.waypoints.length-1];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Nb(r,i,e))})),kn(n,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t},Tb.prototype.addSnapTargetPoints=function(e,t,n){Mb.prototype.addSnapTargetPoints.call(this,e,t,n);var i=this.getSnapTargets(t,n);j(i,(function(n){var i;(function(e){if(kn(e,"bpmn:SubProcess")&&Kn(e))return!0;return kn(e,"bpmn:Participant")}(n)||(i="bpmn:TextAnnotation",[t,n].every((function(e){return kn(e,i)}))))&&(e.add("top-left",Fl(n)),e.add("bottom-right",Vl(n)))}));var r=this._elementRegistry;return j(t.incoming,(function(n){if(r.get(t.id)){Bb(i,n.source)||e.add("mid",Nr(n.source));var o=n.waypoints[0];e.add(n.id+"-docking",o.original||o)}})),j(t.outgoing,(function(n){if(r.get(t.id)){Bb(i,n.target)||e.add("mid",Nr(n.target));var o=n.waypoints[n.waypoints.length-1];e.add(n.id+"-docking",o.original||o)}})),kn(n,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,t,n.parent)),e},Tb.prototype.getSnapTargets=function(e,t){return Mb.prototype.getSnapTargets.call(this,e,t).filter((function(e){return!kn(e,"bpmn:Lane")}))};function Ob(e,t){var n=this;e.on(["resize.start"],(function(e){n.initSnap(e)})),e.on(["resize.move","resize.end"],1250,(function(e){var i=e.context,r=i.shape,o=r.parent,a=i.direction,s=i.snapContext;if(!(e.originalEvent&&sa(e.originalEvent)||Gl(e))){var c=s.pointsForTarget(o);c.initialized||((c=n.addSnapTargetPoints(c,r,o,a)).initialized=!0),function(e){return"n"===e||"s"===e}(a)&&Wl(e,"x",e.x),function(e){return"e"===e||"w"===e}(a)&&Wl(e,"y",e.y),t.snap(e,c)}})),e.on(["resize.cleanup"],(function(){t.hide()}))}function jb(e,t){var n=Nr(e),i=Tr(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}Ob.prototype.initSnap=function(e){var t=e.context,n=t.shape,i=t.direction,r=t.snapContext;r||(r=t.snapContext=new Ab);var o=jb(n,i);return r.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),r},Ob.prototype.addSnapTargetPoints=function(e,t,n,i){return j(this.getSnapTargets(t,n),(function(t){e.add("corner",Vl(t)),e.add("corner",Fl(t))})),e.add("corner",jb(t,i)),e},Ob.$inject=["eventBus","snapping"],Ob.prototype.getSnapTargets=function(e,t){return Ul(t).filter((function(t){return!(n=t,i=e,n.host===i||Qn(t)||function(e){return!!e.hidden}(t)||Jn(t));var n,i}))};function Lb(e){this._canvas=e,this._asyncHide=function(e,t){let n,i,r,o;function a(n){let a=Date.now(),l=n?0:o+t-a;if(l>0)return s(l);e.apply(r,i),c()}function s(e){n=setTimeout(a,e)}function c(){n&&clearTimeout(n),n=o=i=r=void 0}function l(...e){o=Date.now(),i=e,r=this,n||s(t)}return l.flush=function(){n&&a(!0),c()},l.cancel=c,l}(J(this.hide,this),1e3)}Lb.$inject=["canvas"],Lb.prototype.snap=function(e,t){var n=e.context.snapContext,i=n.getSnapLocations(),r={x:Gl(e,"x"),y:Gl(e,"y")};j(i,(function(i){var o=n.getSnapOrigin(i),a={x:e.x+o.x,y:e.y+o.y};if(j(["x","y"],(function(e){var n;r[e]||void 0!==(n=t.snap(a,i,e,7))&&(r[e]={value:n,originValue:n-o[e]})})),r.x&&r.y)return!1})),this.showSnapLine("vertical",r.x&&r.x.value),this.showSnapLine("horizontal",r.y&&r.y.value),j(["x","y"],(function(t){var n=r[t];P(n)&&Wl(e,t,n.originValue)}))},Lb.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=qe("path");return Ie(n,{d:"M0,0 L0,0"}),ze(n).add("djs-snap-line"),Ne(t,n),{update:function(t){R(t)?Ie(n,"horizontal"===e?{d:"M-100000,"+t+" L+100000,"+t,display:""}:{d:"M "+t+",-100000 L "+t+", +100000",display:""}):Ie(n,{display:"none"})}}},Lb.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},Lb.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},Lb.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},Lb.prototype.hide=function(){j(this._snapLines,(function(e){e.update()}))};const Ib={__depends__:[{__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",Mb],resizeSnapping:["type",Ob],snapping:["type",Lb]}],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",Eb],createMoveSnapping:["type",Tb]};function $b(e,t,n,i,r){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=t,this._overlays=n,this._selection=i,this._translate=r,this._container=this._getBoxHtml(),this._searchInput=Te($b.INPUT_SELECTOR,this._container),this._resultsContainer=Te($b.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy"],this.close,this)}function zb(e,t,n){var i=function(e){var t="";return e.forEach((function(e){e.matched?t+=''+po(e.matched)+"":t+=po(e.normal)})),""!==t?t:null}(t),r=Re(n);r.innerHTML=i,e.appendChild(r)}$b.$inject=["canvas","eventBus","overlays","selection","translate"],$b.prototype._bindEvents=function(){var e=this;function t(t,n,i,r){e._eventMaps.push({el:t,type:i,listener:Ce.bind(t,n,i,r)})}t(document,"html","click",(function(t){e.close()})),t(this._container,$b.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,$b.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,$b.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,$b.INPUT_SELECTOR,"keydown",(function(e){ca("ArrowUp",e)&&e.preventDefault(),ca("ArrowDown",e)&&e.preventDefault()})),t(this._container,$b.INPUT_SELECTOR,"keyup",(function(t){if(ca("Escape",t))return e.close();if(ca("Enter",t)){var n=e._getCurrentResult();return n?e._select(n):e.close()}return ca("ArrowUp",t)?e._scrollToDirection(!0):ca("ArrowDown",t)?e._scrollToDirection():void(ca(["ArrowLeft","ArrowRight"],t)||e._search(t.delegateTarget.value))}))},$b.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){Ce.unbind(e.el,e.type,e.listener)}))},$b.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if(n.length){n.forEach((function(e){var n=e.element.id,i=t._createResultNode(e,n);t._results[n]={element:e.element,node:i}}));var i=Te($b.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}}},$b.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},$b.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var t=e.offsetTop,n=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+e.clientHeight;t0&&zb(n,e.primaryTokens,$b.RESULT_PRIMARY_HTML),zb(n,e.secondaryTokens,$b.RESULT_SECONDARY_HTML),ue(n,$b.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},$b.prototype.registerProvider=function(e){this._searchProvider=e},$b.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,he(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},$b.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,he(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))},$b.prototype.toggle=function(){this.isOpen()?this.close():this.open()},$b.prototype.isOpen=function(){return this._open},$b.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&he(t).remove($b.RESULT_SELECTED_CLASS);var n=ue(e,$b.RESULT_ID_ATTRIBUTE),i=this._results[n].element;he(e).add($b.RESULT_SELECTED_CLASS),this._resetOverlay(i),this._canvas.scrollToElement(i,{top:400}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},$b.prototype._select=function(e){var t=ue(e,$b.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this.close(),this._resetOverlay(),this._canvas.scrollToElement(n,{top:400}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},$b.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=function(e){var t=6,n=e.width+2*t,i=e.height+2*t,r={width:n+"px",height:i+"px"},o=Re('
      ');return pe(o,r),{position:{bottom:i-t,right:n-t},show:!0,html:o}}(qr(e));this._overlayId=this._overlays.add(e,t)}},$b.prototype._getBoxHtml=function(){const e=Re($b.BOX_HTML),t=Te($b.INPUT_SELECTOR,e);return t&&t.setAttribute("aria-label",this._translate("Search in diagram")),e},$b.CONTAINER_SELECTOR=".djs-search-container",$b.INPUT_SELECTOR=".djs-search-input input",$b.RESULTS_CONTAINER_SELECTOR=".djs-search-results",$b.RESULT_SELECTOR=".djs-search-result",$b.RESULT_SELECTED_CLASS="djs-search-result-selected",$b.RESULT_SELECTED_SELECTOR="."+$b.RESULT_SELECTED_CLASS,$b.RESULT_ID_ATTRIBUTE="data-result-id",$b.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",$b.OVERLAY_CLASS="djs-search-overlay",$b.BOX_HTML='
      ',$b.RESULT_HTML='
      ',$b.RESULT_PRIMARY_HTML='
      ',$b.RESULT_SECONDARY_HTML='

      ';const Fb={__depends__:[Hi,to,ta],searchPad:["type",$b]};function Vb(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function Hb(e){return O(e,(function(e){return!!e.matched})).length>0}function Gb(e,t){var n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();var r=e.indexOf(t);return r>-1?(0!==r&&n.push({normal:i.substr(0,r)}),n.push({matched:i.substr(r,t.length)}),t.length+r')},Ub.prototype._interactionModules=[va,Aa,Ba],Ub.prototype._modelingModules=[xc,Lc,Qc,Vc,Yl,np,rp,Sy,Gh,Dh,Ty,Ly,Zy,Jy,tv,lv,Av,Ug,Ov,Gv,mb,gb,xv,Ib,Wb],Ub.prototype._modules=[].concat(na.prototype._modules,Ub.prototype._interactionModules,Ub.prototype._modelingModules);const qb={name:"Camunda",uri:"http://camunda.org/schema/1.0/bpmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:[{name:"Definitions",isAbstract:!0,extends:["bpmn:Definitions"],properties:[{name:"diagramRelationId",isAttr:!0,type:"String"}]},{name:"InOutBinding",superClass:["Element"],isAbstract:!0,properties:[{name:"source",isAttr:!0,type:"String"},{name:"sourceExpression",isAttr:!0,type:"String"},{name:"target",isAttr:!0,type:"String"},{name:"businessKey",isAttr:!0,type:"String"},{name:"local",isAttr:!0,type:"Boolean",default:!1},{name:"variables",isAttr:!0,type:"String"}]},{name:"In",superClass:["InOutBinding"],meta:{allowedIn:["bpmn:CallActivity","bpmn:SignalEventDefinition"]}},{name:"Out",superClass:["InOutBinding"],meta:{allowedIn:["bpmn:CallActivity"]}},{name:"AsyncCapable",isAbstract:!0,extends:["bpmn:Activity","bpmn:Gateway","bpmn:Event"],properties:[{name:"async",isAttr:!0,type:"Boolean",default:!1},{name:"asyncBefore",isAttr:!0,type:"Boolean",default:!1},{name:"asyncAfter",isAttr:!0,type:"Boolean",default:!1},{name:"exclusive",isAttr:!0,type:"Boolean",default:!0}]},{name:"JobPriorized",isAbstract:!0,extends:["bpmn:Process","camunda:AsyncCapable"],properties:[{name:"jobPriority",isAttr:!0,type:"String"}]},{name:"SignalEventDefinitionExtension",isAbstract:!0,extends:["bpmn:SignalEventDefinition"],properties:[{name:"async",isAttr:!0,type:"Boolean",default:!1}]},{name:"ErrorEventDefinitionExtension",isAbstract:!0,extends:["bpmn:ErrorEventDefinition"],properties:[{name:"errorCodeVariable",isAttr:!0,type:"String"},{name:"errorMessageVariable",isAttr:!0,type:"String"}]},{name:"ErrorEventDefinition",superClass:["bpmn:ErrorEventDefinition","Element"],properties:[{name:"expression",isAttr:!0,type:"String"}],meta:{allowedIn:["bpmn:ServiceTask"]}},{name:"Error",isAbstract:!0,extends:["bpmn:Error"],properties:[{name:"camunda:errorMessage",isAttr:!0,type:"String"}]},{name:"PotentialStarter",superClass:["Element"],properties:[{name:"resourceAssignmentExpression",type:"bpmn:ResourceAssignmentExpression"}]},{name:"FormSupported",isAbstract:!0,extends:["bpmn:StartEvent","bpmn:UserTask"],properties:[{name:"formHandlerClass",isAttr:!0,type:"String"},{name:"formKey",isAttr:!0,type:"String"},{name:"formRef",isAttr:!0,type:"String"},{name:"formRefBinding",isAttr:!0,type:"String"},{name:"formRefVersion",isAttr:!0,type:"String"}]},{name:"TemplateSupported",isAbstract:!0,extends:["bpmn:Collaboration","bpmn:Process","bpmn:FlowElement"],properties:[{name:"modelerTemplate",isAttr:!0,type:"String"},{name:"modelerTemplateVersion",isAttr:!0,type:"Integer"}]},{name:"Initiator",isAbstract:!0,extends:["bpmn:StartEvent"],properties:[{name:"initiator",isAttr:!0,type:"String"}]},{name:"ScriptTask",isAbstract:!0,extends:["bpmn:ScriptTask"],properties:[{name:"resultVariable",isAttr:!0,type:"String"},{name:"resource",isAttr:!0,type:"String"}]},{name:"Process",isAbstract:!0,extends:["bpmn:Process"],properties:[{name:"candidateStarterGroups",isAttr:!0,type:"String"},{name:"candidateStarterUsers",isAttr:!0,type:"String"},{name:"versionTag",isAttr:!0,type:"String"},{name:"historyTimeToLive",isAttr:!0,type:"String"},{name:"isStartableInTasklist",isAttr:!0,type:"Boolean",default:!0}]},{name:"EscalationEventDefinitionExtension",isAbstract:!0,extends:["bpmn:EscalationEventDefinition"],properties:[{name:"escalationCodeVariable",isAttr:!0,type:"String"}]},{name:"FormalExpression",isAbstract:!0,extends:["bpmn:FormalExpression"],properties:[{name:"resource",isAttr:!0,type:"String"}]},{name:"Assignable",extends:["bpmn:UserTask"],properties:[{name:"assignee",isAttr:!0,type:"String"},{name:"candidateUsers",isAttr:!0,type:"String"},{name:"candidateGroups",isAttr:!0,type:"String"},{name:"dueDate",isAttr:!0,type:"String"},{name:"followUpDate",isAttr:!0,type:"String"},{name:"priority",isAttr:!0,type:"String"}]},{name:"CallActivity",extends:["bpmn:CallActivity"],properties:[{name:"calledElementBinding",isAttr:!0,type:"String",default:"latest"},{name:"calledElementVersion",isAttr:!0,type:"String"},{name:"calledElementVersionTag",isAttr:!0,type:"String"},{name:"calledElementTenantId",isAttr:!0,type:"String"},{name:"caseRef",isAttr:!0,type:"String"},{name:"caseBinding",isAttr:!0,type:"String",default:"latest"},{name:"caseVersion",isAttr:!0,type:"String"},{name:"caseTenantId",isAttr:!0,type:"String"},{name:"variableMappingClass",isAttr:!0,type:"String"},{name:"variableMappingDelegateExpression",isAttr:!0,type:"String"}]},{name:"ServiceTaskLike",extends:["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"resultVariable",isAttr:!0,type:"String"}]},{name:"DmnCapable",extends:["bpmn:BusinessRuleTask"],properties:[{name:"decisionRef",isAttr:!0,type:"String"},{name:"decisionRefBinding",isAttr:!0,type:"String",default:"latest"},{name:"decisionRefVersion",isAttr:!0,type:"String"},{name:"mapDecisionResult",isAttr:!0,type:"String",default:"resultList"},{name:"decisionRefTenantId",isAttr:!0,type:"String"}]},{name:"ExternalCapable",extends:["camunda:ServiceTaskLike"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"topic",isAttr:!0,type:"String"}]},{name:"TaskPriorized",extends:["bpmn:Process","camunda:ExternalCapable"],properties:[{name:"taskPriority",isAttr:!0,type:"String"}]},{name:"Properties",superClass:["Element"],meta:{allowedIn:["*"]},properties:[{name:"values",type:"Property",isMany:!0}]},{name:"Property",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"name",type:"String",isAttr:!0},{name:"value",type:"String",isAttr:!0}]},{name:"Connector",superClass:["Element"],meta:{allowedIn:["camunda:ServiceTaskLike"]},properties:[{name:"inputOutput",type:"InputOutput"},{name:"connectorId",type:"String"}]},{name:"InputOutput",superClass:["Element"],meta:{allowedIn:["bpmn:FlowNode","camunda:Connector"]},properties:[{name:"inputOutput",type:"InputOutput"},{name:"connectorId",type:"String"},{name:"inputParameters",isMany:!0,type:"InputParameter"},{name:"outputParameters",isMany:!0,type:"OutputParameter"}]},{name:"InputOutputParameter",properties:[{name:"name",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"},{name:"definition",type:"InputOutputParameterDefinition"}]},{name:"InputOutputParameterDefinition",isAbstract:!0},{name:"List",superClass:["InputOutputParameterDefinition"],properties:[{name:"items",isMany:!0,type:"InputOutputParameterDefinition"}]},{name:"Map",superClass:["InputOutputParameterDefinition"],properties:[{name:"entries",isMany:!0,type:"Entry"}]},{name:"Entry",properties:[{name:"key",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"},{name:"definition",type:"InputOutputParameterDefinition"}]},{name:"Value",superClass:["InputOutputParameterDefinition"],properties:[{name:"id",isAttr:!0,type:"String"},{name:"name",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"}]},{name:"Script",superClass:["InputOutputParameterDefinition"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"resource",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"}]},{name:"Field",superClass:["Element"],meta:{allowedIn:["camunda:ServiceTaskLike","camunda:ExecutionListener","camunda:TaskListener"]},properties:[{name:"name",isAttr:!0,type:"String"},{name:"expression",type:"String"},{name:"stringValue",isAttr:!0,type:"String"},{name:"string",type:"String"}]},{name:"InputParameter",superClass:["InputOutputParameter"]},{name:"OutputParameter",superClass:["InputOutputParameter"]},{name:"Collectable",isAbstract:!0,extends:["bpmn:MultiInstanceLoopCharacteristics"],superClass:["camunda:AsyncCapable"],properties:[{name:"collection",isAttr:!0,type:"String"},{name:"elementVariable",isAttr:!0,type:"String"}]},{name:"FailedJobRetryTimeCycle",superClass:["Element"],meta:{allowedIn:["camunda:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},properties:[{name:"body",isBody:!0,type:"String"}]},{name:"ExecutionListener",superClass:["Element"],meta:{allowedIn:["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"event",isAttr:!0,type:"String"},{name:"script",type:"Script"},{name:"fields",type:"Field",isMany:!0}]},{name:"TaskListener",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"event",isAttr:!0,type:"String"},{name:"script",type:"Script"},{name:"fields",type:"Field",isMany:!0},{name:"id",type:"String",isAttr:!0},{name:"eventDefinitions",type:"bpmn:TimerEventDefinition",isMany:!0}]},{name:"FormProperty",superClass:["Element"],meta:{allowedIn:["bpmn:StartEvent","bpmn:UserTask"]},properties:[{name:"id",type:"String",isAttr:!0},{name:"name",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0},{name:"required",type:"String",isAttr:!0},{name:"readable",type:"String",isAttr:!0},{name:"writable",type:"String",isAttr:!0},{name:"variable",type:"String",isAttr:!0},{name:"expression",type:"String",isAttr:!0},{name:"datePattern",type:"String",isAttr:!0},{name:"default",type:"String",isAttr:!0},{name:"values",type:"Value",isMany:!0}]},{name:"FormData",superClass:["Element"],meta:{allowedIn:["bpmn:StartEvent","bpmn:UserTask"]},properties:[{name:"fields",type:"FormField",isMany:!0},{name:"businessKey",type:"String",isAttr:!0}]},{name:"FormField",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"label",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0},{name:"datePattern",type:"String",isAttr:!0},{name:"defaultValue",type:"String",isAttr:!0},{name:"properties",type:"Properties"},{name:"validation",type:"Validation"},{name:"values",type:"Value",isMany:!0}]},{name:"Validation",superClass:["Element"],properties:[{name:"constraints",type:"Constraint",isMany:!0}]},{name:"Constraint",superClass:["Element"],properties:[{name:"name",type:"String",isAttr:!0},{name:"config",type:"String",isAttr:!0}]},{name:"ConditionalEventDefinitionExtension",isAbstract:!0,extends:["bpmn:ConditionalEventDefinition"],properties:[{name:"variableName",isAttr:!0,type:"String"},{name:"variableEvents",isAttr:!0,type:"String"}]}],emumerations:[]};function Kb(e,t,i="camunda"){let r={};const c=n.ref(1);n.ref(!1);const{createBpmnModeler:l}=function(e,t,n="camunda"){const i=()=>{const e=[],t={translate:["value",b]};return e.push(t),e.push(s),e.push(a.BpmnPropertiesPanelModule),e.push(a.BpmnPropertiesProviderModule),e.push(a.CamundaPlatformPropertiesProviderModule),e},r=()=>{const e={};return"camunda"===n&&(e.camunda=qb),e};return{createBpmnModeler:()=>new Ub({container:e,propertiesPanel:{parent:t},keyboard:{bindTo:document},additionalModules:i(),moddleExtensions:r()})}}(e,t,i),p=e=>r.get(e),u=()=>p("canvas"),d=()=>p("commandStack"),h=async e=>{try{const t=await r.importXML(e),{warnings:n}=t}catch(t){f("Could not create BPMN 2.0 diagram!",t)}},m=()=>{const e=p("eventBus");["diagram.init","element.hover","element.out","element.click","element.dblclick","element.mousedown","element.mouseup"].forEach((t=>{e.on(t,(e=>{t.replace(/\./g,"-"),e&&e.element}))}))},v=async(e,t="diagram")=>{try{if("xml"===e||"bpmn"===e){const{xml:n}=await r.saveXML(),{href:i,filename:o}=y(e,t,n);g(i,o)}else{const{svg:e}=await r.saveSVG(),{href:n,filename:i}=y("svg",t,e);g(n,i)}}catch(n){f("Could not download diagram!",n)}},x=e=>{const t=p("alignElements"),n=p("selection").get();!n||n.length<=1?o.toast.warning("请按住 Ctrl 键选择多个元素对齐"):o.standardDeleteNotify((()=>{t.trigger(n,e)}))};return{init:e=>{r=l(),m(),h(e)},destroy:()=>{o.lodash.isEmpty(r)||(r.destroy(),r={})},importDiagram:h,downloadAsXml:(e="diagram")=>{v("xml",e)},downloadAsBpmn:(e="diagram")=>{v("bpmn",e)},downloadAsSvg:(e="diagram")=>{v("svg",e)},undo:()=>d().undo(),redo:()=>d().redo(),zoom:c,zoomMinus:(e=.1)=>{const t=Math.floor(100*c.value-100*e)/100;c.value=t,u().zoom(c.value)},zoomPlus:(e=.1)=>{const t=Math.floor(100*c.value+100*e)/100;c.value=t,u().zoom(c.value)},zoomReset:()=>{c.value=1,u().zoom("fit-viewport","auto")},alignLeft:()=>{x("left")},alignRight:()=>{x("right")},alignTop:()=>{x("top")},alignBottom:()=>{x("bottom")},alignHorizontalCenter:()=>{x("center")},alignVerticalCenter:()=>{x("middle")},playSimulation:()=>{p("toggleMode").toggleMode()}}}function Xb(e,t,n){let i={};return{init:r=>{i=new na({container:e,height:t}),(async e=>{await i.importXML(e);const t=i.get("canvas");t.zoom("fit-viewport","auto"),o.lodash.isEmpty(n)||n.forEach((e=>{var n;t.addMarker(e,"highlight");const i=null==(n=document.querySelector(".highlight"))?void 0:n.querySelector(".djs-visual rect");i&&i.setAttribute("stroke-dasharray","4,4")}))})(r)},destroy:()=>{o.lodash.isEmpty(i)||(i.destroy(),i={})}}}const Yb=n.defineComponent({name:"HBpmnDesigner",props:{diagram:{type:String,default:""},type:{type:String,default:"camunda"},service:{type:Object,required:!0},height:{type:String,default:"90vh"}},setup(e){const t=n.ref(""),{init:i,destroy:r,importDiagram:a,downloadAsXml:s,downloadAsBpmn:c,downloadAsSvg:l,undo:p,redo:u,zoom:d,zoomPlus:h,zoomMinus:f,zoomReset:g,alignLeft:y,alignRight:v,alignTop:b,alignBottom:x,alignHorizontalCenter:_,alignVerticalCenter:w,playSimulation:E}=Kb("#bpmn-canvas","#bpmn-properties-panel",e.type);n.onBeforeUnmount((()=>{r()})),n.onMounted((()=>{try{i(m)}catch(e){}})),n.watch(t,(e=>{a(e)}));return{openedDiagram:t,onReset:()=>{a(m)},importDiagram:a,downloadAsXml:s,downloadAsBpmn:c,downloadAsSvg:l,undo:p,redo:u,zoom:d,zoomPlus:h,zoomMinus:f,zoomReset:g,alignLeft:y,alignRight:v,alignTop:b,alignBottom:x,alignHorizontalCenter:_,alignVerticalCenter:w,playSimulation:E,onSave:t=>{e.service.create(t).then((e=>{o.toast.success("模型部署成功!")})).catch((e=>{o.toast.error("模型部署失败!")}))}}}}),Zb=n.createElementVNode("div",{class:"bpmn-container full-height"},[n.createElementVNode("div",{id:"bpmn-canvas",class:"bpmn-canvas"})],-1),Qb=n.createElementVNode("div",{id:"bpmn-properties-panel",class:"full-height"},null,-1);const Jb=u(Yb,[["render",function(e,i,r,o,a,s){const c=h,l=n.resolveComponent("h-column"),p=n.resolveComponent("h-row"),u=t.QCard;return n.openBlock(),n.createBlock(u,null,{default:n.withCtx((()=>[n.createVNode(p,{style:n.normalizeStyle(`height: ${e.height}`)},{default:n.withCtx((()=>[n.createVNode(l,{cols:10},{default:n.withCtx((()=>[n.createVNode(c,{file:e.openedDiagram,"onUpdate:file":i[0]||(i[0]=t=>e.openedDiagram=t),zoom:e.zoom,onDownloadXml:i[1]||(i[1]=t=>e.downloadAsXml()),onDownloadSvg:i[2]||(i[2]=t=>e.downloadAsSvg()),onDownloadBpmn:i[3]||(i[3]=t=>e.downloadAsBpmn()),onAlignRight:i[4]||(i[4]=t=>e.alignRight()),onAlignLeft:i[5]||(i[5]=t=>e.alignLeft()),onAlignTop:i[6]||(i[6]=t=>e.alignTop()),onAlignBottom:i[7]||(i[7]=t=>e.alignBottom()),onAlignHorizontalCenter:i[8]||(i[8]=t=>e.alignHorizontalCenter()),onAlignVerticalCenter:i[9]||(i[9]=t=>e.alignVerticalCenter()),onZoomPlus:i[10]||(i[10]=t=>e.zoomPlus()),onZoomMinus:i[11]||(i[11]=t=>e.zoomMinus()),onZoomReset:i[12]||(i[12]=t=>e.zoomReset()),onRedo:i[13]||(i[13]=t=>e.redo()),onUndo:i[14]||(i[14]=t=>e.undo()),onRefresh:i[15]||(i[15]=t=>e.onReset()),onSimulation:i[16]||(i[16]=t=>e.playSimulation()),onSave:e.onSave},null,8,["file","zoom","onSave"]),Zb])),_:1}),n.createVNode(l,{cols:2},{default:n.withCtx((()=>[Qb])),_:1})])),_:1},8,["style"])])),_:1})}]]),ex=n.defineComponent({name:"HBpmnViewer",props:{diagram:{type:String,default:""},nodes:{type:Array,default:()=>[]},height:{type:[String,Number],default:"500px"}},setup(e){const{init:t,destroy:i}=Xb("#bpmn-viewer",e.height,e.nodes);return n.onBeforeUnmount((()=>{i()})),n.onMounted((()=>{try{t(e.diagram)}catch(n){}})),{}}}),tx={id:"bpmn-viewer",class:"bpmn-viewer-canvas"};const nx=u(ex,[["render",function(e,t,i,r,o,a){return n.openBlock(),n.createElementBlock("div",tx)}]]);Jb.install=e=>{e.component(Jb.name,Jb)},nx.install=e=>{e.component(nx.name,nx)};const ix=[Jb,nx],rx={install:e=>{ix.map((t=>e.component(t.name,t)))}};Object.defineProperty(e,"DeploymentService",{enumerable:!0,get:()=>r.DeploymentService}),Object.defineProperty(e,"Swal",{enumerable:!0,get:()=>o.Swal}),Object.defineProperty(e,"lodash",{enumerable:!0,get:()=>o.lodash}),Object.defineProperty(e,"standardDeleteNotify",{enumerable:!0,get:()=>o.standardDeleteNotify}),Object.defineProperty(e,"toast",{enumerable:!0,get:()=>o.toast}),e.Translator=b,e.default=rx,e.download=g,e.downloadEncode=y,e.error=(e,...t)=>{},e.exception=f,e.log=(e,...t)=>{},Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})); + `,this._current.container)},hc.prototype.open=function(e,t,n,i){if(!e)throw new Error("target is missing");if(!t)throw new Error("providers for <"+t+"> not found");if(!n)throw new Error("position is missing");this.isOpen()&&this.close();const{entries:r,headerEntries:o,emptyPlaceholder:a}=this._getContext(e,t);this._current={position:n,providerId:t,target:e,entries:r,headerEntries:o,emptyPlaceholder:a,container:this._createContainer({provider:t}),options:i},this._emit("open"),this._bindAutoClose(),this._render()},hc.prototype.refresh=function(){if(!this.isOpen())return;const{target:e,providerId:t}=this._current,{entries:n,headerEntries:i,emptyPlaceholder:r}=this._getContext(e,t);this._current={...this._current,entries:n,headerEntries:i,emptyPlaceholder:r},this._emit("refresh"),this._render()},hc.prototype._getContext=function(e,t){const n=this._getProviders(t);if(!n||!n.length)throw new Error("provider for <"+t+"> not found");const i=this._getEntries(e,n),r=this._getHeaderEntries(e,n);return{entries:i,headerEntries:r,emptyPlaceholder:this._getEmptyPlaceholder(n),empty:!(Object.keys(i).length||Object.keys(r).length)}},hc.prototype.close=function(){this.isOpen()&&(this._emit("close"),this.reset(),this._current=null)},hc.prototype.reset=function(){const e=this._current.container;Ps(null,e),Be(e)},hc.prototype._emit=function(e,t){this._eventBus.fire(`popupMenu.${e}`,t)},hc.prototype._onOpened=function(){this._emit("opened")},hc.prototype._onClosed=function(){this._emit("closed")},hc.prototype._createContainer=function(e){var t=this._canvas.getContainer();const n=Re(`
      `);return t.appendChild(n),n},hc.prototype._bindAutoClose=function(){this._eventBus.once(dc,this.close,this)},hc.prototype._unbindAutoClose=function(){this._eventBus.off(dc,this.close,this)},hc.prototype._updateScale=function(){var e,t,n=this._canvas.zoom(),i=this._config.scale,r=n;return!0!==i&&(!1===i?(e=1,t=1):(e=i.min,t=i.max),C(e)&&nt&&(r=t)),r},hc.prototype._ensureVisible=function(e,t){var n=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect(),r={},o=t.x,a=t.y;return t.x+i.width>n.width&&(r.x=!0),t.y+i.height>n.height&&(r.y=!0),r.x&&r.y?(o=t.x-i.width,a=t.y-i.height):r.x?(o=t.x-i.width,a=t.y):r.y&&t.yM(e.getEmptyPlaceholder)));return t&&t.getEmptyPlaceholder()},hc.prototype.isOpen=function(){return!!this._current},hc.prototype.trigger=function(e,t,n="click"){if(e.preventDefault(),!t){let n=ue(ge(e.delegateTarget||e.target,".entry",!0),"data-id");t={id:n,...this._getEntry(n)}}const i=t.action;if(!1!==this._emit("trigger",{entry:t,event:e}))if(M(i)){if("click"===n)return i(e,t)}else if(i[n])return i[n](e,t)},hc.prototype._getEntry=function(e){var t=this._current.entries[e]||this._current.headerEntries[e];if(!t)throw new Error("entry not found");return t};const mc={__init__:["popupMenu"],popupMenu:["type",hc]};var fc={align:'\n \n \n \n ',bottom:'\n \n \n \n ',center:'\n \n \n \n ',left:'\n \n \n \n ',right:'\n \n \n \n ',top:'\n \n \n \n ',middle:'\n \n \n \n '};function gc(e,t,n,i){e.registerProvider(900,this),this._contextPad=e,this._popupMenu=t,this._translate=n,this._canvas=i}gc.$inject=["contextPad","popupMenu","translate","canvas"],gc.prototype.getMultiElementContextPadEntries=function(e){var t={};return this._isAllowed(e)&&ee(t,this._getEntries(e)),t},gc.prototype._isAllowed=function(e){return!this._popupMenu.isEmpty(e,"align-elements")},gc.prototype._getEntries=function(){var e=this;return{"align-elements":{group:"align-elements",title:e._translate("Align elements"),html:`
      ${fc.align}
      `,action:{click:function(t,n){var i=e._getMenuPosition(n);ee(i,{cursor:{x:t.x,y:t.y}}),e._popupMenu.open(n,"align-elements",i)}}}}},gc.prototype._getMenuPosition=function(e){var t=this._contextPad.getPad(e).html.getBoundingClientRect();return{x:t.left,y:t.bottom+5}};var yc=["left","center","right","top","middle","bottom"];function vc(e,t,n,i){this._alignElements=t,this._translate=n,this._popupMenu=e,this._rules=i,e.registerProvider("align-elements",this)}function bc(e){ro.call(this,e),this.init()}function xc(e){bc.call(this,e)}vc.$inject=["popupMenu","alignElements","translate","rules"],vc.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&ee(t,this._getEntries(e)),t},vc.prototype._isAllowed=function(e){return this._rules.allowed("elements.align",{elements:e})},vc.prototype._getEntries=function(e){var t=this._alignElements,n=this._translate,i=this._popupMenu,r={};return j(yc,(function(o){r["align-elements-"+o]={group:"align",title:n("Align elements "+o),className:"bjs-align-elements-menu-entry",imageHtml:fc[o],action:function(){t.trigger(e,o),i.close()}}})),r},bc.$inject=["eventBus"],x(bc,ro),bc.prototype.addRule=function(e,t,n){var i=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){i.canExecute(e,t,(function(e,t,i){return n(e)}),!0)}))},bc.prototype.init=function(){},xc.$inject=["eventBus"],x(xc,bc),xc.prototype.init=function(){this.addRule("elements.align",(function(e){var t=O(e.elements,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));return!((t=Hr(t)).length<2)&&t}))};const _c={__depends__:[za,Ua,mc],__init__:["alignElementsContextPadProvider","alignElementsMenuProvider","bpmnAlignElements"],alignElementsContextPadProvider:["type",gc],alignElementsMenuProvider:["type",vc],bpmnAlignElements:["type",xc]};var wc=10,Ec=50,Sc=250;function Cc(e,t,n,i){for(var r;r=Ac(e,n,t);)n=i(t,n,r);return n}function kc(e){return function(t,n,i){var r={x:n.x,y:n.y};return["x","y"].forEach((function(o){var a=e[o];if(a){var s="x"===o?"width":"height",c=a.margin,l=a.minDistance;r[o]=c<0?Math.min(i[o]+c-t[s]/2,n[o]-l+c):Math.max(i[o]+i[s]+c+t[s]/2,n[o]+l+c)}})),r}}function Ac(e,t,n){var i={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height},r=function(e){var t=Pc(e);e.host&&(t=t.concat(Pc(e.host)));e.attachers&&(t=t.concat(e.attachers.reduce((function(e,t){return e.concat(Pc(t))}),[])));return t}(e);return B(r,(function(e){return e!==n&&"intersect"===Or(e,i,wc)}))}function Pc(e){return(t=e,t.outgoing.map((function(e){return e.target}))).concat(function(e){return e.incoming.map((function(e){return e.source}))}(e));var t}function Rc(){return!0}function Mc(e,t,n){e.on("autoPlace",100,(function(e){var t=e.shape;return function(e,t,n){n||(n={});var i=n.defaultDistance||Ec,r=Nr(e),o=Tr(e);return{x:o.right+i+t.width/2,y:r.y}}(e.source,t)})),e.on("autoPlace.end",(function(e){n.scrollToElement(e.shape)})),this.append=function(n,i,r){e.fire("autoPlace.start",{source:n,shape:i});var o=e.fire("autoPlace",{source:n,shape:i}),a=t.appendShape(n,i,o,n.parent,r);return e.fire("autoPlace.end",{source:n,shape:a}),a}}function Tc(e,t){e.on("autoPlace.end",500,(function(e){t.select(e.shape)}))}Mc.$inject=["eventBus","modeling","canvas"],Tc.$inject=["eventBus","selection"];const Dc={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",Mc],autoPlaceSelectionBehavior:["type",Tc]};function Bc(e,t){for(T(t)&&(t=[t]);e=e.parent;)if(An(e,t))return e;return null}function Nc(e){var t=["bpmn:Participant","bpmn:Lane"],n=Bc(e,t);return n?Xn(n):!An(e,t)||Xn(e)}function Oc(e,t){return kn(t,"bpmn:TextAnnotation")?function(e,t){var n=Tr(e),i=Nc(e),r=i?{x:n.right+t.width/2,y:n.top-50-t.height/2}:{x:n.right+50+t.width/2,y:n.bottom+t.height/2};Qn(e)&&(r=Nr(e),i?(r.x+=100,r.y-=50):(r.x+=100,r.y+=50));var o={margin:i?-30:30,minDistance:20};return Cc(e,t,r,kc(i?{y:o}:{x:o}))}(e,t):An(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])?function(e,t){var n=Tr(e),i=Nc(e),r=i?{x:n.right-10+t.width/2,y:n.bottom+40+t.width/2}:{x:n.left-40-t.width/2,y:n.bottom-10+t.height/2},o={margin:30,minDistance:30};return Cc(e,t,r,kc(i?{x:o}:{y:o}))}(e,t):kn(t,"bpmn:FlowNode")?function(e,t){var n=Tr(e),i=Nr(e),r=Nc(e),o=r?{directionHint:"e",minDistance:80,baseOrientation:"left",boundaryOrientation:"top",start:"top",end:"bottom"}:{directionHint:"s",minDistance:90,baseOrientation:"top",boundaryOrientation:"left",start:"left",end:"right"},a=function(e,t){t||(t={});var n=t.defaultDistance||Ec,i=t.direction||"e",r=t.filter,o=t.getWeight||function(t){return t.source===e?1:-1},a=t.maxDistance||Sc,s=t.reference||"start";function c(e,t){return"n"===i?"start"===s?Tr(e).top-Tr(t).bottom:"center"===s?Tr(e).top-Nr(t).y:Tr(e).top-Tr(t).top:"w"===i?"start"===s?Tr(e).left-Tr(t).right:"center"===s?Tr(e).left-Nr(t).x:Tr(e).left-Tr(t).left:"s"===i?"start"===s?Tr(t).top-Tr(e).bottom:"center"===s?Nr(t).y-Tr(e).bottom:Tr(t).bottom-Tr(e).bottom:"start"===s?Tr(t).left-Tr(e).right:"center"===s?Nr(t).x-Tr(e).right:Tr(t).right-Tr(e).right}r||(r=Rc);var l=e.incoming.filter(r).map((function(t){var n=o(t),i=n<0?c(t.source,e):c(e,t.source);return{id:t.source.id,distance:i,weight:n}})),p=e.outgoing.filter(r).map((function(t){var n=o(t),i=n>0?c(e,t.target):c(t.target,e);return{id:t.target.id,distance:i,weight:n}}));return I(l.concat(p).reduce((function(e,t){return e[t.id+"__weight_"+t.weight]=t,e}),{}),(function(e,t){var n=t.distance,i=t.weight;return n<0||n>a||(e[String(n)]||(e[String(n)]=0),e[String(n)]+=1*i,(!e.distance||e[e.distance]t.top&&(n=n.concat("n"));e.rightt.left&&(n=n.concat("e"));return n}(te(t,["x","y","width","height"]),n);this.resize(t,n,{autoResize:i});var r=t.parent;r&&this._expand([t],r)}}},$c.prototype.getOffset=function(e){return{top:60,bottom:60,left:100,right:100}},$c.prototype.getPadding=function(e){return{top:2,bottom:2,left:15,right:15}},$c.prototype.resize=function(e,t,n){this._modeling.resizeShape(e,t,null,n)},zc.$inject=["injector"],x(zc,$c),zc.prototype.resize=function(e,t,n){kn(e,"bpmn:Participant")?this._modeling.resizeLane(e,t,null,n):this._modeling.resizeShape(e,t,null,n)},Fc.$inject=["eventBus"],x(Fc,bc),Fc.prototype.canResize=function(e,t){return!1},x(Hc,Fc),Hc.$inject=["eventBus","modeling"],Hc.prototype.canResize=function(e,t){if(kn(t.di,"bpmndi:BPMNPlane"))return!1;if(!kn(t,"bpmn:Participant")&&!kn(t,"bpmn:Lane")&&!kn(t,"bpmn:SubProcess"))return!1;var n=!0;return j(e,(function(e){(kn(e,"bpmn:Lane")||Jn(e))&&(n=!1)})),n};const Vc={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",zc],bpmnAutoResizeProvider:["type",Hc]};function Gc(e,t,n){var i,r,o=this,a=n.get("dragging",!1);a&&t.on("drag.start",(function(n){t.once("drag.move",1500,(function(t){!function(t){if(!t.hover){var n=t.originalEvent,i=o._findTargetGfx(n),r=i&&e.get(i);i&&r&&(t.stopPropagation(),a.hover({element:r,gfx:i}),a.move(n))}}(t)}))})),t.on("element.hover",(function(e){i=e.gfx,r=e.element})),t.on("element.hover",1500,(function(e){r&&t.fire("element.out",{element:r,gfx:i})})),t.on("element.out",(function(){i=null,r=null})),this._findTargetGfx=function(e){var t;if(e instanceof MouseEvent)return t=$o(e),function(e){return ge(e,"svg, .djs-element",!0)}(document.elementFromPoint(t.x,t.y))}}Gc.$inject=["elementRegistry","eventBus","injector"];const Wc={__init__:["hoverFix"],hoverFix:["type",Gc]};var Uc=Math.round,qc="djs-drag-active";function Kc(e){e.preventDefault()}function Xc(e,t,n,i){var r,o={threshold:5,trapClick:!0};function a(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+(e.x-i.left)/n.scale,y:n.y+(e.y-i.top)/n.scale}}function s(t,n){n=n||r;var i=e.createEvent(ee({},n.payload,n.data,{isTouch:n.isTouch}));return!1!==e.fire("drag."+t,i)&&e.fire(n.prefix+"."+t,i)}function c(e,i){var o,c=r.payload,l=r.displacement,p=r.globalStart,u=$o(e),d=Ca(u,p),h=r.localStart,m=a(u),g=Ca(m,h);if(!r.active&&(i||(o=d,Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))>r.threshold))){if(ee(c,{x:Uc(h.x+l.x),y:Uc(h.y+l.y),dx:0,dy:0},{originalEvent:e}),!1===s("start"))return f();r.active=!0,r.keepSelection||(c.previousSelection=n.get(),n.select(null)),r.cursor&&xa(r.cursor),t.addMarker(t.getRootElement(),qc)}Io(e),r.active&&(ee(c,{x:Uc(m.x+l.x),y:Uc(m.y+l.y),dx:Uc(g.x),dy:Uc(g.y)},{originalEvent:e}),s("move"))}function l(e){var t=!0;r.active&&(e&&(r.payload.originalEvent=e,Io(e)),t=s("end")),!1===t&&s("rejected"),s("ended",g(!0!==t))}function p(e){ca("Escape",e)&&(Kc(e),f())}function u(t){var n;r.active&&(n=Ea(e),setTimeout(n,400),Kc(t)),l(t)}function d(e){c(e)}function h(e){var t=r.payload;t.hoverGfx=e.gfx,t.hover=e.element,s("hover")}function m(e){s("out");var t=r.payload;t.hoverGfx=null,t.hover=null}function f(e){var t;if(r){var n=r.active;n&&s("cancel"),t=g(e),n&&s("canceled",t)}}function g(o){var a,g;s("cleanup"),_a(),g=r.trapClick?u:l,we.unbind(document,"mousemove",c),we.unbind(document,"dragstart",Kc),we.unbind(document,"selectstart",Kc),we.unbind(document,"mousedown",g,!0),we.unbind(document,"mouseup",g,!0),we.unbind(document,"keyup",p),we.unbind(document,"touchstart",d,!0),we.unbind(document,"touchcancel",f,!0),we.unbind(document,"touchmove",c,!0),we.unbind(document,"touchend",l,!0),e.off("element.hover",h),e.off("element.out",m),t.removeMarker(t.getRootElement(),qc);var y=r.payload.previousSelection;return!1!==o&&y&&!n.get().length&&function(e){var t=e.filter((function(e){return i.get(e.id)}));t.length&&n.select(t)}(y),a=r,r=null,a}e.on("diagram.destroy",f),this.init=function(t,n,i,g){r&&f(!1),"string"==typeof n&&(g=i,i=n,n=null);var y,v,b,x,_,w,E=(g=ee({},o,g||{})).data||{};x=g.trapClick?u:l,t?(y=Lo(t)||t,v=$o(t),Io(t),"dragstart"===y.type&&Kc(y)):(y=null,v={x:0,y:0}),b=a(v),n||(n=b),w=y,_="undefined"!=typeof TouchEvent&&w instanceof TouchEvent,r=ee({prefix:i,data:E,payload:{},globalStart:v,displacement:Ca(n,b),localStart:b,isTouch:_},g),g.manual||(_?(we.bind(document,"touchstart",d,!0),we.bind(document,"touchcancel",f,!0),we.bind(document,"touchmove",c,!0),we.bind(document,"touchend",l,!0)):(we.bind(document,"mousemove",c),we.bind(document,"dragstart",Kc),we.bind(document,"selectstart",Kc),we.bind(document,"mousedown",x,!0),we.bind(document,"mouseup",x,!0)),we.bind(document,"keyup",p),e.on("element.hover",h),e.on("element.out",m)),s("init"),g.autoActivate&&c(t,!0)},this.move=c,this.hover=h,this.out=m,this.end=l,this.cancel=f,this.context=function(){return r},this.setOptions=function(e){ee(o,e)}}Xc.$inject=["eventBus","canvas","selection","elementRegistry"];const Yc={__depends__:[Wc,ta],dragging:["type",Xc]};function Zc(e,t,n){this._canvas=n,this._opts=ee({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var i=this;t.on("drag.move",(function(e){var t=i._toBorderPoint(e);i.startScroll(t)})),t.on(["drag.cleanup"],(function(){i.stopScroll()}))}function Qc(e,t,n){return tg-3&&(n=Or(r.target,f),a===g-2?"intersect"===n&&(h.pop(),h[h.length-1]=f):"intersect"!==n&&h.push(u)),i.newWaypoints=r.waypoints=s(r,h),l(i,y,e),i.newSegmentStartIndex=o+y,c(e)})),t.on("connectionSegment.move.hover",(function(e){e.context.hover=e.hover,n.addMarker(e.hover,Bl)})),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],(function(e){var t=e.context.hover;t&&n.removeMarker(t,Bl)})),t.on("connectionSegment.move.cleanup",(function(e){var t=e.context,i=t.connection;t.draggerGfx&&nt(t.draggerGfx),n.removeMarker(i,Nl)})),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],(function(e){var t=e.context;t.connection.waypoints=t.originalWaypoints,c(e)})),t.on("connectionSegment.move.end",(function(e){var t=e.context,n=t.connection,i=t.newWaypoints,r=t.newSegmentStartIndex,a=function(e,t){var n=0;return{waypoints:e.filter((function(i,r){return!Wi(e[r-1],e[r+1],i)||(n=r<=t?n-1:n,!1)})),segmentOffset:n}}(i=i.map((function(e){return{original:e.original,x:Math.round(e.x),y:Math.round(e.y)}})),r),c=s(n,a.waypoints),l=a.segmentOffset,p={segmentMove:{segmentStartIndex:t.segmentStartIndex,newSegmentStartIndex:r+l}};o.updateWaypoints(n,c,p)}))}$l.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var zl=Math.abs,Fl=Math.round;function Hl(e){return{x:e.x,y:e.y}}function Vl(e){return{x:e.x+e.width,y:e.y+e.height}}function Gl(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:Fl(e.x+e.width/2),y:Fl(e.y+e.height/2)}}function Wl(e,t){var n=e.snapped;return!!n&&("string"==typeof t?n[t]:n.x&&n.y)}function Ul(e,t,n){if("string"!=typeof t)throw new Error("axis must be in [x, y]");if("number"!=typeof n&&!1!==n)throw new Error("value must be Number or false");var i,r=e[t],o=e.snapped=e.snapped||{};return!1===n?o[t]=!1:(o[t]=!0,i=n-r,e[t]+=i,e["d"+t]+=i),r}function ql(e){return e.children||[]}var Kl=Math.abs,Xl=Math.round;function Yl(e){function t(e,t){if(A(e)){for(var n=e.length;n--;)if(Kl(e[n]-t)<=10)return e[n]}else{var i=t%(e=+e);if(i<10)return t-i;if(i>e-10)return t-i+e}return t}function n(e,t){return e.waypoints?vl(t,e):e.width?{x:Xl(e.width/2+e.x),y:Xl(e.height/2+e.y)}:void 0}e.on("connectionSegment.move.move",1500,(function(e){var i,r,o=function(e){var t=e.context,i=t.snapPoints,r=t.connection,o=r.waypoints,a=t.segmentStart,s=t.segmentStartIndex,c=t.segmentEnd,l=t.segmentEndIndex,p=t.axis;if(i)return i;var u=[o[s-1],a,c,o[l+1]];return s<2&&u.unshift(n(r.source,e)),l>o.length-3&&u.unshift(n(r.target,e)),t.snapPoints=i={horizontal:[],vertical:[]},j(u,(function(e){e&&(e=e.original||e,"y"===p&&i.horizontal.push(e.y),"x"===p&&i.vertical.push(e.x))})),i}(e),a=e.x,s=e.y;if(o){var c=a-(i=t(o.vertical,a)),l=s-(r=t(o.horizontal,s));ee(e,{dx:e.dx-c,dy:e.dy-l,x:i,y:r}),(c||-1!==o.vertical.indexOf(a))&&Ul(e,"x",i),(l||-1!==o.horizontal.indexOf(s))&&Ul(e,"y",r)}})),e.on(["connect.hover","connect.move","connect.end"],1500,(function(e){var t=e.context.hover,i=t&&n(t,e);Qn(t)&&i&&i.x&&i.y&&(Ul(e,"x",i.x),Ul(e,"y",i.y))})),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,(function(e){var i,r,o=e.context,a=function(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var r=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},j(r,(function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))})),t}(o),s=o.hover,c=s&&n(s,e),l=e.x,p=e.y;if(a){var u=l-(i=t(c?a.vertical.concat([c.x]):a.vertical,l)),d=p-(r=t(c?a.horizontal.concat([c.y]):a.horizontal,p));ee(e,{dx:e.dx-u,dy:e.dy-d,x:e.x-u,y:e.y-d}),(u||-1!==a.vertical.indexOf(l))&&Ul(e,"x",i),(d||-1!==a.horizontal.indexOf(p))&&Ul(e,"y",r)}}))}Yl.$inject=["eventBus"];const Zl={__depends__:[Yc,tl],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",bl],bendpointMove:["type",Sl],bendpointMovePreview:["type",Dl],connectionSegmentMove:["type",$l],bendpointSnapping:["type",Yl]};function Ql(e,t,n,i){function r(e,t){return i.allowed("connection.create",{source:e,target:t})}e.on("connect.hover",(function(e){var t,n=e.context,i=n.start,o=e.hover;if(n.hover=o,!k(t=n.canExecute=r(i,o))){if(!1!==t)return n.source=i,void(n.target=o);k(t=n.canExecute=r(o,i))||!1!==t&&(n.source=o,n.target=i)}})),e.on(["connect.out","connect.cleanup"],(function(e){var t=e.context;t.hover=null,t.source=null,t.target=null,t.canExecute=!1})),e.on("connect.end",(function(e){var t=e.context,i=t.canExecute,r=t.connectionStart,o={x:e.x,y:e.y},a=t.source,s=t.target;if(!i)return!1;var c=null,l={connectionStart:Jl(t)?o:r,connectionEnd:Jl(t)?r:o};P(i)&&(c=i),t.connection=n.connect(a,s,c,l)})),this.start=function(e,n,i,r){P(i)||(r=i,i=Nr(n)),t.init(e,"connect",{autoActivate:r,data:{shape:n,context:{start:n,connectionStart:i}}})}}function Jl(e){var t=e.hover,n=e.source,i=e.target;return t&&n&&t===n&&n!==i}Ql.$inject=["eventBus","dragging","modeling","rules"];var ep="connect-ok",tp="connect-not-ok";function np(e,t,n){var i=e.get("connectionPreview",!1);i&&t.on("connect.move",(function(e){var t=e.context,n=t.canExecute,r=t.hover,o=t.source,a=t.start,s=t.startPosition,c=t.target,l=t.connectionStart||s,p=t.connectionEnd||{x:e.x,y:e.y},u=l,d=p;Jl(t)&&(u=p,d=l),i.drawPreview(t,n,{source:o||a,target:c||r,connectionStart:u,connectionEnd:d})})),t.on("connect.hover",900,(function(e){var t=e.context,i=e.hover,r=t.canExecute;null!==r&&n.addMarker(i,r?ep:tp)})),t.on(["connect.out","connect.cleanup"],1100,(function(e){var t=e.hover;t&&(n.removeMarker(t,ep),n.removeMarker(t,tp))})),i&&t.on("connect.cleanup",(function(e){i.cleanUp(e.context)}))}np.$inject=["injector","eventBus","canvas"];const ip={__depends__:[ta,tl,Yc],__init__:["connectPreview"],connect:["type",Ql],connectPreview:["type",np]};function rp(e,t,n,i){this._canvas=t,this._graphicsFactory=n,this._elementFactory=i,this._connectionDocking=e.get("connectionDocking",!1),this._layouter=e.get("layouter",!1)}rp.$inject=["injector","canvas","graphicsFactory","elementFactory"],rp.prototype.drawPreview=function(e,t,n){n=n||{};var i,r,o,a=e.connectionPreviewGfx,s=e.getConnection,c=n.source,l=n.target,p=n.waypoints,u=n.connectionStart,d=n.connectionEnd,h=n.noLayout,m=n.noCropping,f=n.noNoop,g=this;a||(a=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),He(a),s||(s=e.getConnection=(r=function(e,t,n){return g.getConnection(e,t,n)},o={},function(e){var t=JSON.stringify(e),n=o[t];return n||(n=o[t]=r.apply(null,arguments)),n})),t&&(i=s(t,c,l)),i?(i.waypoints=p||[],this._layouter&&!h&&(i.waypoints=this._layouter.layoutConnection(i,{source:c,target:l,connectionStart:u,connectionEnd:d,waypoints:n.waypoints||i.waypoints})),i.waypoints&&i.waypoints.length||(i.waypoints=[c?Nr(c):u,l?Nr(l):d]),this._connectionDocking&&(c||l)&&!m&&(i.waypoints=this._connectionDocking.getCroppedWaypoints(i,c,l)),this._graphicsFactory.drawConnection(a,i,{stroke:"var(--element-dragger-color)"})):!f&&this.drawNoopPreview(a,n)},rp.prototype.drawNoopPreview=function(e,t){var n=t.source,i=t.target,r=t.connectionStart||Nr(n),o=t.connectionEnd||Nr(i),a=this.cropWaypoints(r,o,n,i);Ne(e,this.createNoopConnection(a[0],a[1]))},rp.prototype.cropWaypoints=function(e,t,n,i){var r=this._graphicsFactory,o=n&&r.getShapePath(n),a=i&&r.getShapePath(i),s=r.getConnectionPath({waypoints:[e,t]});return[e=n&&jr(o,s,!0)||e,t=i&&jr(a,s,!1)||t]},rp.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&nt(e.connectionPreviewGfx)},rp.prototype.getConnection=function(e){var t=function(e){return P(e)?e:{}}(e);return this._elementFactory.createConnection(t)},rp.prototype.createConnectionPreviewGfx=function(){var e=qe("g");return Ie(e,{pointerEvents:"none"}),ze(e).add("djs-dragger"),Ne(this._canvas.getActiveLayer(),e),e},rp.prototype.createNoopConnection=function(e,t){return hi([e,t],{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"})};const op={__init__:["connectionPreview"],connectionPreview:["type",rp]};function ap(e){return e.childNodes[0]}const sp=new Xr("ps");var cp=["marker-start","marker-mid","marker-end"],lp=["circle","ellipse","line","path","polygon","polyline","path","rect"];function pp(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._styles=i}pp.$inject=["elementRegistry","eventBus","canvas","styles"],pp.prototype.cleanUp=function(){},pp.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},pp.prototype.addDragger=function(e,t,n,i="djs-dragger"){var r=Ve(n=n||this.getGfx(e)),o=n.getBoundingClientRect();return this._cloneMarkers(ap(r),i),Ie(r,this._styles.cls(i,[],{x:o.top,y:o.left})),Ne(t,r),Ie(r,"data-preview-support-element-id",e.id),r},pp.prototype.addFrame=function(e,t){var n=qe("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return Ne(t,n),Ie(n,"data-preview-support-element-id",e.id),n},pp.prototype._cloneMarkers=function(e,t="djs-dragger",n=e){var i,r=this;if(e.childNodes)for(var o=0;o defs",e);c||Ne(e,c=qe("defs")),Ne(c,s),Ie(t,i,"url(#"+s.id+")")};const up={__init__:["previewSupport"],previewSupport:["type",pp]},dp="complex-preview";class ComplexPreview{constructor(e,t,n){this._canvas=e,this._graphicsFactory=t,this._previewSupport=n,this._markers=[]}create(e){this.cleanUp();const{created:t=[],moved:n=[],removed:i=[],resized:r=[]}=e,o=this._canvas.getLayer(dp);t.filter((e=>!function(e){return e.hidden}(e))).forEach((e=>{let t;Qn(e)?(t=this._graphicsFactory._createContainer("connection",qe("g")),this._graphicsFactory.drawConnection(ap(t),e)):(t=this._graphicsFactory._createContainer("shape",qe("g")),this._graphicsFactory.drawShape(ap(t),e),Ci(t,e.x,e.y)),this._previewSupport.addDragger(e,o,t)})),n.forEach((({element:e,delta:t})=>{this._previewSupport.addDragger(e,o,void 0,"djs-dragging"),this._canvas.addMarker(e,"djs-element-hidden"),this._markers.push([e,"djs-element-hidden"]);const n=this._previewSupport.addDragger(e,o);Qn(e)?Ci(n,t.x,t.y):Ci(n,e.x+t.x,e.y+t.y)})),i.forEach((e=>{this._previewSupport.addDragger(e,o,void 0,"djs-dragging"),this._canvas.addMarker(e,"djs-element-hidden"),this._markers.push([e,"djs-element-hidden"])})),r.forEach((({shape:e,bounds:t})=>{this._canvas.addMarker(e,"djs-hidden"),this._markers.push([e,"djs-hidden"]),this._previewSupport.addDragger(e,o,void 0,"djs-dragging");const n=this._graphicsFactory._createContainer("shape",qe("g"));this._graphicsFactory.drawShape(ap(n),e,{width:t.width,height:t.height}),Ci(n,t.x,t.y),this._previewSupport.addDragger(e,o,n)}))}cleanUp(){He(this._canvas.getLayer(dp)),this._markers.forEach((([e,t])=>this._canvas.removeMarker(e,t))),this._markers=[]}show(){this._canvas.showLayer(dp)}hide(){this._canvas.hideLayer(dp)}}ComplexPreview.$inject=["canvas","graphicsFactory","previewSupport"];const hp={__depends__:[up],__init__:["complexPreview"],complexPreview:["type",ComplexPreview]};var mp=["top","bottom","left","right"],fp=10;function gp(e,t){function n(e){if(ii(e)){var n=function(e){var t=Nr(e.label),n=Nr(e),i=yp(n,t);if(r=i,-1===mp.indexOf(r))return;var r;var o=function(e){var t=Nr(e),n=[].concat(e.incoming.map((function(e){return e.waypoints[e.waypoints.length-2]})),e.outgoing.map((function(e){return e.waypoints[1]}))).map((function(e){return yp(t,e)}));return n}(e);if(e.host){var a=function(e){var t,n=e.host,i=Nr(e),r=Or(i,n);t=r.indexOf("-")>=0?r.split("-"):[r];var o=mp.filter((function(e){return-1===t.indexOf(e)}));return o}(e);o=o.concat(a)}var s=mp.filter((function(e){return-1===o.indexOf(e)}));if(-1!==s.indexOf(i))return;return s[0]}(e);n&&function(e,n){var i=Nr(e),r=e.label,o=Nr(r);if(!r.parent)return;var a,s=Tr(e);switch(n){case"top":a={x:i.x,y:s.top-fp-r.height/2};break;case"left":a={x:s.left-fp-r.width/2,y:i.y};break;case"bottom":a={x:i.x,y:s.bottom+fp+r.height/2};break;case"right":a={x:s.right+fp+r.width/2,y:i.y}}var c=Ca(a,o);t.moveShape(r,c)}(e,n)}}ro.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],(function(e){var t=e.context,i=t.connection,r=i.source,o=i.target;!1!==(t.hints||{}).createElementsBehavior&&(n(r),n(o))})),this.postExecuted(["label.create"],(function(e){var t=e.context,i=t.shape;!1!==(t.hints||{}).createElementsBehavior&&n(i.labelTarget)})),this.postExecuted(["elements.create"],(function(e){var t=e.context,i=t.elements;!1!==(t.hints||{}).createElementsBehavior&&i.forEach((function(e){n(e)}))}))}function yp(e,t){return Or(t,e,5)}function vp(e){ro.call(this,e),this.preExecute("shape.append",(function(e){var t=e.source,n=e.shape;e.position||(kn(n,"bpmn:TextAnnotation")?e.position={x:t.x+t.width/2+75,y:t.y-50-n.height/2}:e.position={x:t.x+t.width+80+n.width/2,y:t.y+t.height/2})}),!0)}function bp(e,t){e.invoke(ro,this),this.postExecute("shape.move",(function(e){var n=e.newParent,i=e.shape;j(O(i.incoming.concat(i.outgoing),(function(e){return kn(e,"bpmn:Association")})),(function(e){t.moveConnection(e,{x:0,y:0},n)}))}),!0)}x(gp,ro),gp.$inject=["eventBus","modeling"],x(vp,ro),vp.$inject=["eventBus"],x(bp,ro),bp.$inject=["injector","modeling"];function xp(e,t){t.invoke(ro,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;1===(t=t.filter((function(e){return _p(e,e.host)}))).length&&t.map((function(e){return t.indexOf(e)})).forEach((function(i){var r=t[i];e.elements[i]=n._replaceShape(t[i],r)}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;if(1===t.length){var r=t[0];_p(r,i)&&(e.shapes=[n._replaceShape(r,i)])}}),!0)}function _p(e,t){return!Jn(e)&&An(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t}function wp(e,t){function n(e){return O(e.attachers,(function(e){return kn(e,"bpmn:BoundaryEvent")}))}ro.call(this,e),this.postExecute("connection.create",(function(e){var i=e.context.source,r=e.context.target,o=n(r);kn(i,"bpmn:EventBasedGateway")&&kn(r,"bpmn:ReceiveTask")&&o.length>0&&t.removeElements(o)})),this.postExecute("connection.reconnect",(function(e){var i=e.context.oldSource,r=e.context.newSource;kn(i,"bpmn:Gateway")&&kn(r,"bpmn:EventBasedGateway")&&j(r.outgoing,(function(e){var i=e.target,r=n(i);kn(i,"bpmn:ReceiveTask")&&r.length>0&&t.removeElements(r)}))}))}function Ep(e,t,n){function i(e){t.updateProperties(e,{isForCompensation:!0})}function r(e){t.updateProperties(e,{isForCompensation:void 0})}ro.call(this,e),this.preExecute("shape.replace",(function(e){const{newData:n,oldShape:i}=e;if(Cp(e.oldShape)&&"bpmn:CompensateEventDefinition"!==n.eventDefinitionType||"bpmn:BoundaryEvent"!==n.type){const t=i.outgoing.find((({target:e})=>Sp(e)));t&&t.target&&(e._connectionTarget=t.target)}else if(!Cp(e.oldShape)&&"bpmn:CompensateEventDefinition"===n.eventDefinitionType&&"bpmn:BoundaryEvent"===n.type){const n=i.outgoing.find((({target:e})=>kp(e)));n&&n.target&&(e._connectionTarget=n.target),function(e){const n=e.outgoing.filter((e=>kn(e,"bpmn:SequenceFlow")));t.removeElements(n)}(i)}}),!0),this.postExecuted("shape.replace",(function(e){const{_connectionTarget:n,newShape:i}=e;n&&t.connect(i,n)}),!0),this.preExecute("connection.create",(function(e){const n=e.connection,r=e.source,o=e.target;Cp(r)&&kp(o)&&(i(o),function(e,n){const i=e.outgoing.filter((e=>kn(e,"bpmn:Association")));i.filter((e=>Sp(e.target)&&!n.includes(e))).forEach((e=>t.removeConnection(e)))}(r,[n]))}),!0),this.postExecuted("connection.delete",(function(e){const t=e.source,n=e.target;Cp(t)&&Sp(n)&&r(n)}),!0),this.postExecuted("connection.reconnect",(function(e){const t=e.newTarget,n=e.oldSource,o=e.oldTarget;if(o!==t){const e=n;Sp(o)&&r(o),Cp(e)&&kp(t)&&i(t)}}),!0),this.postExecuted("element.updateProperties",(function(e){const{element:i}=e;Sp(i)?(function(e){for(const i of e.incoming)n.canConnect(i.source,e)||t.removeConnection(i);for(const i of e.outgoing)n.canConnect(e,i.target)||t.removeConnection(i)}(i),function(e){const n=e.attachers.slice();if(!n.length)return;t.removeElements(n)}(i)):kp(i)&&function(e){const n=e.incoming.filter((e=>Cp(e.source)));t.removeElements(n)}(i)}),!0)}function Sp(e){const t=Pn(e);return t&&t.get("isForCompensation")}function Cp(e){return e&&kn(e,"bpmn:BoundaryEvent")&&Zn(e,"bpmn:CompensateEventDefinition")}function kp(e){return e&&kn(e,"bpmn:Activity")&&!Yn(e)}function Ap(e){e.invoke(ro,this),this.preExecute("shape.create",1500,(function(e){var t=e.context,n=t.parent,i=t.shape;kn(n,"bpmn:Lane")&&!kn(i,"bpmn:Lane")&&(t.parent=Bc(n,"bpmn:Participant"))}))}function Pp(e,t){ro.call(this,e),this.preExecute("shape.create",(function(e){var n=e.context.shape;if(kn(n,"bpmn:DataObjectReference")&&"label"!==n.type){var i=t.create("bpmn:DataObject");n.businessObject.dataObjectRef=i}}))}xp.$inject=["bpmnReplace","injector"],x(xp,ro),xp.prototype._replaceShape=function(e,t){var n,i=(n=Pn(e).eventDefinitions)&&n[0],r={type:"bpmn:BoundaryEvent",host:t};return i&&(r.eventDefinitionType=i.$type),this._bpmnReplace.replaceElement(e,r,{layoutConnection:!1})},wp.$inject=["eventBus","modeling"],x(wp,ro),x(Ep,ro),Ep.$inject=["eventBus","modeling","bpmnRules"],Ap.$inject=["injector"],x(Ap,ro),Pp.$inject=["eventBus","bpmnFactory"],x(Pp,ro);var Rp=20,Mp=20,Tp=30,Dp=2e3;function Bp(e,t,n){function i(){var t=e.getRootElement();return kn(t,"bpmn:Collaboration")?t:n.makeCollaboration()}ro.call(this,t),t.on(["create.start","shape.move.start"],Dp,(function(t){var n=t.context,i=n.shape,r=e.getRootElement();if(kn(i,"bpmn:Participant")&&kn(r,"bpmn:Process")&&r.children.length){var o=r.children.filter((function(e){return!kn(e,"bpmn:Group")&&!Jn(e)&&!Qn(e)}));if(o.length){var a=qr(o),s=function(e,t){t={width:t.width+2*Rp+Tp,height:t.height+2*Mp};var n=Math.max(e.width,t.width),i=Math.max(e.height,t.height);return{x:-n/2,y:-i/2,width:n,height:i}}(i,a);ee(i,s),n.createConstraints=function(e,t){return t=Tr(t),{bottom:t.top+e.height/2-Mp,left:t.right-e.width/2+Rp,top:t.bottom-e.height/2+Mp,right:t.left+e.width/2-Rp-Tp}}(i,a)}}})),t.on("create.start",Dp,(function(n){var i=n.context.shape,r=e.getRootElement(),o=e.getGraphics(r);function a(e){e.element=r,e.gfx=o}kn(i,"bpmn:Participant")&&kn(r,"bpmn:Process")&&(t.on("element.hover",Dp,a),t.once("create.cleanup",(function(){t.off("element.hover",a)})))})),this.preExecute("elements.create",Dp,(function(e){var t,n=e.elements,r=e.parent,o=function(e){return B(e,(function(e){return kn(e,"bpmn:Participant")}))}(n);o&&kn(r,"bpmn:Process")&&(e.parent=i(),(t=e.hints=e.hints||{}).participant=o,t.process=r,t.processRef=Pn(o).get("processRef"))}),!0),this.preExecute("shape.create",(function(e){var t=e.parent,n=e.shape;kn(n,"bpmn:Participant")&&kn(t,"bpmn:Process")&&(e.parent=i(),e.process=t,e.processRef=Pn(n).get("processRef"))}),!0),this.execute("shape.create",(function(e){var t=e.hints||{},n=e.process||t.process,i=e.shape,r=t.participant;!n||r&&i!==r||Pn(i).set("processRef",Pn(n))}),!0),this.revert("shape.create",(function(e){var t=e.hints||{},n=e.process||t.process,i=e.processRef||t.processRef,r=e.shape,o=t.participant;!n||o&&r!==o||Pn(r).set("processRef",i)}),!0),this.postExecute("shape.create",(function(e){var t=e.hints||{},i=e.process||e.hints.process,r=e.shape,o=t.participant;if(i){var a=i.children.slice();o?r===o&&n.moveElements(a,{x:0,y:0},o):n.moveElements(a,{x:0,y:0},r)}}),!0)}function Np(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function Op(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function jp(e,t){return e&&t?e.indexOf(t):-1}Bp.$inject=["canvas","eventBus","modeling"],x(Bp,ro);var Lp="__targetRef_placeholder";function Ip(e,t){function n(e,n){var i=e.get("properties"),r=B(i,(function(e){return e.name===Lp}));return!r&&n&&Op(i,r=t.create("bpmn:Property",{name:Lp})),r}function i(e,t){var i=n(e);i&&(function(e,t,n){return B(e.get("dataInputAssociations"),(function(e){return e!==n&&e.targetRef===t}))}(e,i,t)||Np(e.get("properties"),i))}function r(e){var t,r=e.context,o=r.connection,a=o.businessObject,s=o.target,c=s&&s.businessObject,l=r.newTarget,p=l&&l.businessObject,u=r.oldTarget||r.target,d=u&&u.businessObject,h=o.businessObject;d&&d!==c&&i(d,a),p&&p!==c&&i(p,a),c?(t=n(c,!0),h.targetRef=t):h.targetRef=null}ro.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],$p(r)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],$p(r))}function $p(e){return function(t){if(kn(t.context.connection,"bpmn:DataInputAssociation"))return e(t)}}function zp(e){this._bpmnUpdater=e}function Fp(e,t,n,i){function r(e){return e.children.filter((function(e){return kn(e,"bpmn:DataStoreReference")&&!e.labelTarget}))}function o(e,i){var r=e.businessObject||e;if(i=i||n.filter((function(e){return kn(e,"bpmn:Participant")&&Pn(e).processRef}))[0]){var o=i.businessObject||i;t.execute("dataStore.updateContainment",{dataStoreBo:r,dataStoreDi:Rn(e),newSemanticParent:o.processRef||o,newDiParent:Rn(i)})}}ro.call(this,i),t.registerHandler("dataStore.updateContainment",zp),this.preExecute("shape.create",(function(e){var t=e.context,n=t.shape;kn(n,"bpmn:DataStoreReference")&&"label"!==n.type&&(t.hints||(t.hints={}),t.hints.autoResize=!1)})),this.preExecute("elements.move",(function(e){var t=e.context,n=t.shapes;n.filter((function(e){return kn(e,"bpmn:DataStoreReference")})).length&&(t.hints||(t.hints={}),t.hints.autoResize=n.filter((function(e){return!kn(e,"bpmn:DataStoreReference")})))})),this.postExecute("shape.create",(function(e){var t=e.context.shape,n=t.parent;kn(t,"bpmn:DataStoreReference")&&"label"!==t.type&&kn(n,"bpmn:Collaboration")&&o(t)})),this.postExecute("shape.move",(function(e){var t=e.context,n=t.shape,i=t.oldParent,r=n.parent;kn(i,"bpmn:Collaboration")||kn(n,"bpmn:DataStoreReference")&&"label"!==n.type&&kn(r,"bpmn:Collaboration")&&o(n,kn(i,"bpmn:Participant")?i:function(e,t){for(;e.parent;){if(kn(e.parent,t))return e.parent;e=e.parent}}(i,"bpmn:Participant"))})),this.postExecute("shape.delete",(function(t){var n=t.context.shape,i=e.getRootElement();An(n,["bpmn:Participant","bpmn:SubProcess"])&&kn(i,"bpmn:Collaboration")&&r(i).filter((function(e){return function(e,t){var n=e.businessObject||e,i=t.businessObject||t;for(;n.$parent;){if(n.$parent===i.processRef||i)return!0;n=n.$parent}return!1}(e,n)})).forEach((function(e){o(e)}))})),this.postExecute("canvas.updateRoot",(function(e){var t=e.context,n=t.oldRoot,i=t.newRoot;r(n).forEach((function(e){kn(i,"bpmn:Process")&&o(e,i)}))}))}Ip.$inject=["eventBus","bpmnFactory"],x(Ip,ro),zp.$inject=["bpmnUpdater"],zp.prototype.execute=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,i=e.newSemanticParent,r=e.newDiParent;return e.oldSemanticParent=t.$parent,e.oldDiParent=n.$parent,this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(n,r),[]},zp.prototype.revert=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,i=e.oldSemanticParent,r=e.oldDiParent;return this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(n,r),[]},Fp.$inject=["canvas","commandStack","elementRegistry","eventBus"],x(Fp,ro);var Hp=Math.max,Vp=Math.min,Gp=20;function Wp(e,t){return{top:e.top-t.top,right:e.right-t.right,bottom:e.bottom-t.bottom,left:e.left-t.left}}function Up(e,t,n){var i=t[e],r=n.min&&n.min[e],o=n.max&&n.max[e];return R(r)&&(i=(/top|left/.test(e)?Vp:Hp)(i,r)),R(o)&&(i=(/top|left/.test(e)?Hp:Vp)(i,o)),i}function qp(e,t){return void 0!==e?e:Gp}function Kp(e){return!e.waypoints&&"label"!==e.type}function Xp(e,t){var n;if((n=void 0===e.length?O(e.children,Kp):e).length)return function(e,t){var n,i,r,o;return"object"==typeof t?(n=qp(t.left),i=qp(t.right),r=qp(t.top),o=qp(t.bottom)):n=i=r=o=qp(t),{x:e.x-n,y:e.y-r,width:e.width+n+i,height:e.height+r+o}}(qr(n),t)}var Yp=Math.abs;var Zp=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"],Qp=30;function Jp(e,t){return t=t||[],e.children.filter((function(e){kn(e,"bpmn:Lane")&&(Jp(e,t),t.push(e))})),t}function eu(e){return e.children.filter((function(e){return kn(e,"bpmn:Lane")}))}function tu(e){return Bc(e,Zp)||e}function nu(e,t){var n=tu(e),i=Jp(n,kn(n,"bpmn:Process")?[]:[n]),r=Tr(e),o=Tr(t),a=function(e,t){return Wp(Tr(t),Tr(e))}(e,t),s=[],c=Xn(e);return i.forEach((function(t){if(t!==e){var n,i,l=c?0:a.top,p=c?a.right:0,u=c?0:a.bottom,d=c?a.left:0,h=Tr(t);a.top&&(Yp(h.bottom-r.top)<10&&(u=o.top-h.bottom),Yp(h.top-r.top)<5&&(l=o.top-h.top)),a.left&&(Yp(h.right-r.left)<10&&(p=o.left-h.right),Yp(h.left-r.left)<5&&(d=o.left-h.left)),a.bottom&&(Yp(h.top-r.bottom)<10&&(l=o.bottom-h.top),Yp(h.bottom-r.bottom)<5&&(u=o.bottom-h.bottom)),a.right&&(Yp(h.left-r.right)<10&&(d=o.right-h.left),Yp(h.right-r.right)<5&&(p=o.right-h.right)),(l||p||u||d)&&s.push({shape:t,newBounds:(n=t,i={top:l,right:p,bottom:u,left:d},{x:n.x+(i.left||0),y:n.y+(i.top||0),width:n.width-(i.left||0)+(i.right||0),height:n.height-(i.top||0)+(i.bottom||0)})})}})),s}function iu(e,t){ro.call(this,e),this.postExecuted("shape.delete",500,(function(e){var n=e.context,i=n.hints,r=n.shape,o=n.oldParent;kn(r,"bpmn:Lane")&&(i&&i.nested||function(e,n){var i,r,o,a,s,c=Xn(e),l=eu(n),p=[],u=[],d=[],h=[];Wr(l,(function(t){return c?t.y>e.y?u.push(t):p.push(t):t.x>e.x?h.push(t):d.push(t),t.children})),l.length&&(i=c?u.length&&p.length?e.height/2:e.height:h.length&&d.length?e.width/2:e.width,p.length&&(r=t.calculateAdjustments(p,"y",i,e.y-10),t.makeSpace(r.movingShapes,r.resizingShapes,{x:0,y:i},"s")),u.length&&(o=t.calculateAdjustments(u,"y",-i,e.y+e.height+10),t.makeSpace(o.movingShapes,o.resizingShapes,{x:0,y:-i},"n")),d.length&&(a=t.calculateAdjustments(d,"x",i,e.x-10),t.makeSpace(a.movingShapes,a.resizingShapes,{x:i,y:0},"e")),h.length&&(s=t.calculateAdjustments(h,"x",-i,e.x+e.width+10),t.makeSpace(s.movingShapes,s.resizingShapes,{x:-i,y:0},"w")))}(r,o))}))}iu.$inject=["eventBus","spaceTool"],x(iu,ro);function ru(e,t){t.invoke(ro,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;t.filter((function(e){return ou(e,e.host)})).map((function(e){return t.indexOf(e)})).forEach((function(i){e.elements[i]=n._replaceShape(t[i])}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;t.forEach((function(e,r){var o,a=e.host;ou(e,(o=a,-1!==t.indexOf(o)?a:i))&&(t[r]=n._replaceShape(e))}))}),!0)}function ou(e,t){return!Jn(e)&&kn(e,"bpmn:BoundaryEvent")&&!t}function au(e,t,n){function i(e,i,r){var o,a,s,c,l,p,u,d,h=i.waypoints,m=e.outgoing.slice(),f=e.incoming.slice(),g=ol(h,d=R(r.width)?Nr(r):r);if(g){if(o=h.slice(0,g.index),a=h.slice(g.index+(g.bendpoint?1:0)),!o.length||!a.length)return;s=g.bendpoint?h[g.index]:d,1!==o.length&&su(e,o[o.length-1])||o.push(cu(s)),1!==a.length&&su(e,a[0])||a.unshift(cu(s))}c=i.source,l=i.target,t.canConnect(c,e,i)&&(n.reconnectEnd(i,e,o||d),p=i),t.canConnect(e,l,i)&&(p?u=n.connect(e,l,{type:i.type,waypoints:a}):(n.reconnectStart(i,e,a||d),u=i));var y=[].concat(p&&O(f,(function(e){return e.source===p.source}))||[],u&&O(m,(function(e){return e.target===u.target}))||[]);y.length&&n.removeElements(y)}ro.call(this,e),this.preExecute("elements.move",(function(e){var n=e.newParent,i=e.shapes,r=e.delta,o=i[0];if(o&&n){n&&n.waypoints&&(e.newParent=n=n.parent);var a=Nr(o),s={x:a.x+r.x,y:a.y+r.y},c=B(n.children,(function(e){return t.canInsert(i,e)&&ol(e.waypoints,s)}));c&&(e.targetFlow=c,e.position=s)}}),!0),this.postExecuted("elements.move",(function(e){var t=e.shapes,n=e.targetFlow,r=e.position;n&&i(t[0],n,r)}),!0),this.preExecute("shape.create",(function(e){var n=e.parent,i=e.shape;t.canInsert(i,n)&&(e.targetFlow=n,e.parent=n.parent)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.targetFlow,r=e.position;n&&i(t,n,r)}),!0)}function su(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function cu(e){return ee({},e)}function lu(e,t){ro.call(this,e),this.preExecuted("connection.create",(function(e){var n=e.context,i=n.connection,r=n.source,o=n.target,a=n.hints;if((!a||!1!==a.createElementsBehavior)&&pu(i)){(kn(r,"bpmn:EventBasedGateway")?o.incoming.filter((e=>e!==i&&pu(e))):o.incoming.filter((e=>e!==i&&pu(e)&&kn(e.source,"bpmn:EventBasedGateway")))).forEach((function(e){t.removeConnection(e)}))}})),this.preExecuted("shape.replace",(function(e){var n=e.context.newShape;kn(n,"bpmn:EventBasedGateway")&&n.outgoing.filter(pu).reduce((function(e,t){return e.includes(t.target)?e:e.concat(t.target)}),[]).forEach((function(e){e.incoming.filter(pu).forEach((function(i){const r=e.incoming.filter(pu).filter((function(e){return e.source===n}));(i.source!==n||r.length>1)&&t.removeConnection(i)}))}))}))}function pu(e){return kn(e,"bpmn:SequenceFlow")}ru.$inject=["bpmnReplace","injector"],x(ru,ro),ru.prototype._replaceShape=function(e){var t,n,i=(n=Pn(e).eventDefinitions)&&n[0];return t=i?{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:i.$type}:{type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(e,t,{layoutConnection:!1})},x(au,ro),au.$inject=["eventBus","bpmnRules","modeling"],lu.$inject=["eventBus","modeling"],x(lu,ro);var uu=1500;function du(e,t,n){t.on(["create.hover","create.move","create.out","create.end","shape.move.hover","shape.move.move","shape.move.out","shape.move.end"],uu,(function(t){var i=t.context.shape||t.shape,r=t.hover;kn(r,"bpmn:Lane")&&!An(i,["bpmn:Lane","bpmn:Participant"])&&(t.hover=tu(r),t.hoverGfx=e.getGraphics(t.hover));var o=n.getRootElement();r!==o&&(i.labelTarget||An(i,["bpmn:Group","bpmn:TextAnnotation"]))&&(t.hover=o,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],uu,(function(t){var n=t.hover;kn(n,"bpmn:Lane")&&(t.hover=tu(n)||n,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["bendpoint.move.hover"],uu,(function(t){var n=t.context,i=t.hover,r=n.type;kn(i,"bpmn:Lane")&&/reconnect/.test(r)&&(t.hover=tu(i)||i,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.start"],uu,(function(e){var t=e.context,n=t.start;kn(n,"bpmn:Lane")&&(t.start=tu(n)||n)})),t.on("shape.move.start",2e3,(function(e){var t=e.shape;kn(t,"bpmn:Lane")&&(e.shape=tu(t)||t)})),t.on("spaceTool.move",2e3,(function(e){var t=e.hover;t&&kn(t,"bpmn:Lane")&&(e.hover=tu(t))}))}du.$inject=["elementRegistry","eventBus","canvas"];function hu(e,t,n,i,r,o){function a(e,t,i){var r=n.filter((function(e){return kn(e,"bpmn:Group")})).filter((function(e){return e.businessObject!==i}));t&&!function(e,t){return e.some((function(e){var n=Pn(e);return(n.categoryValueRef&&n.categoryValueRef.$parent)===t}))}(r,t)&&function(e){var t=e.$parent;t&&(Np(t.get("rootElements"),e),e.$parent=null)}(t),e&&!function(e,t){return e.some((function(e){return Pn(e).categoryValueRef===t}))}(r,e)&&function(e){var t=e.$parent;t&&(Np(t.get("categoryValue"),e),e.$parent=null)}(e)}function s(e,n){return function(e,t,n){return Op(t.get("categoryValue"),e),e.$parent=t,Op(n.get("rootElements"),t),t.$parent=n,e}(e,n,t.getDefinitions())}function c(n,i){var r=Pn(n),o=r.categoryValueRef;o||(o=r.categoryValueRef=i.categoryValue=i.categoryValue||function(e){return e.create("bpmn:CategoryValue")}(e));var a=o.$parent;a||(a=o.$parent=i.category=i.category||function(e){return e.create("bpmn:Category")}(e)),s(o,a,t.getDefinitions())}function l(e,t){var n=t.category,i=t.categoryValue,r=Pn(e);i?(r.categoryValueRef=null,a(i,n,r)):a(null,r.categoryValueRef.$parent,r)}function p(t,n){var i=e.create(t.$type);return o.copyElement(t,i,null,n)}r.invoke(ro,this),this.execute("label.create",(function(e){var t=e.context,n=t.labelTarget;kn(n,"bpmn:Group")&&c(n,t)})),this.revert("label.create",(function(e){var t=e.context,n=t.labelTarget;kn(n,"bpmn:Group")&&l(n,t)})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=Pn(n);if(kn(n,"bpmn:Group")&&!n.labelTarget){var r=t.categoryValue=i.categoryValueRef;r&&(a(r,t.category=r.$parent,i),i.categoryValueRef=null)}})),this.reverted("shape.delete",(function(e){var t=e.context,n=t.shape;if(kn(n,"bpmn:Group")&&!n.labelTarget){var i=t.category,r=t.categoryValue,o=Pn(n);r&&(o.categoryValueRef=r,s(r,i))}})),this.execute("shape.create",(function(e){var t=e.context,n=t.shape;kn(n,"bpmn:Group")&&!n.labelTarget&&Pn(n).categoryValueRef&&c(n,t)})),this.reverted("shape.create",(function(e){var t=e.context,n=t.shape;kn(n,"bpmn:Group")&&!n.labelTarget&&Pn(n).categoryValueRef&&l(n,t)})),i.on("copyPaste.copyElement",770,(function(e){var t=e.descriptor,n=e.element;if(kn(n,"bpmn:Group")&&!n.labelTarget){var i=Pn(n);if(i.categoryValueRef){var r=i.categoryValueRef;t.categoryValue=p(r,!0),r.$parent&&(t.category=p(r.$parent,!0))}}})),i.on("copyPaste.pasteElement",770,(function(e){var t=e.descriptor,n=t.businessObject,i=t.categoryValue,r=t.category;i&&(i=n.categoryValueRef=p(i)),r&&(i.$parent=p(r)),delete t.category,delete t.categoryValue}))}function mu(e,t,n,i){var r,o,a,s;return 0==(r=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y))?null:(o=e.y-n.y,a=e.x-n.x,s=((i.x-n.x)*o-(i.y-n.y)*a)/r,{x:Math.round(e.x+s*(t.x-e.x)),y:Math.round(e.y+s*(t.y-e.y))})}function fu(e){function t(e,t,n){var i,r={x:n.x,y:n.y-50},o={x:n.x-50,y:n.y},a=mu(e,t,n,r),s=mu(e,t,n,o);i=a&&s?gu(a,n)>gu(s,n)?s:a:a||s,e.original=i}e.on("bpmnElement.added",(function(e){var n,i,r=e.element;r.waypoints&&(t((i=(n=r).waypoints)[0],i[1],Nr(n.source)),t(i[i.length-1],i[i.length-2],Nr(n.target)))}))}function gu(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function yu(e){ro.call(this,e);var t=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],(function(e){var n=e.context.shape,i=Pn(n),r=Rn(n);if(An(i,t)){var o=r.get("isHorizontal");void 0===o&&(o=!0),r.set("isHorizontal",o)}}))}hu.$inject=["bpmnFactory","bpmnjs","elementRegistry","eventBus","injector","moddleCopy"],x(hu,ro),fu.$inject=["eventBus"],yu.$inject=["eventBus"],x(yu,ro);var vu=Math.sqrt,bu=Math.min,xu=Math.max,_u=Math.abs;function wu(e){return Math.pow(e,2)}function Eu(e,t){return vu(wu(e.x-t.x)+wu(e.y-t.y))}function Su(e,t,n,i){var r=t.x-e.x,o=t.y-e.y,a=n.x-e.x,s=n.y-e.y,c=r*r+o*o,l=(r*a+o*s)/c,p=l*l-(a*a+s*s-i*i)/c;if(p<0&&p>-1e-6&&(p=0),p<0)return[];var u=vu(p),d=-l+u,h=-l-u,m={x:e.x-r*d,y:e.y-o*d};return 0===p?[m]:[m,{x:e.x-r*h,y:e.y-o*h}].filter((function(n){return function(e,t,n){return Cu(e.x,t.x,n.x)&&Cu(e.y,t.y,n.y)}(n,e,t)}))}function Cu(e,t,n){return e>=bu(t,n)-ku&&e<=xu(t,n)+ku}var ku=.1;function Au(e,t){return _u(e.x-t.x)<=ku&&_u(e.y-t.y)<=ku}function Pu(e,t,n,i){var r=0,o=0,a={point:e,delta:{x:0,y:0}},s=function(e,t){var n,i,r,o,a,s,c,l,p,u,d,h,m=0;for(m=0;m line intersections");1===s.length&&(c={type:"bendpoint",position:s[0],segmentIndex:m,bendpointIndex:Au(n,s[0])?m:m+1}),2===s.length&&(d=s[0],h=s[1],c={type:"segment",position:a={x:(d.x+h.x)/2,y:(d.y+h.y)/2},segmentIndex:m,relativeLocation:Eu(n,a)/Eu(n,i)}),l=Eu(c.position,e),(!u||p>l)&&(u=c,p=l)}return u}(e,n),c=s.segmentIndex,l=function(e,t,n,i){var r=n.segmentIndex,o=t.length-e.length;if(i.segmentMove){var a=i.segmentMove.segmentStartIndex,s=i.segmentMove.newSegmentStartIndex;return r===a?s:r>=s?r+o=p&&(c=l?r+1:r-1),rt.length-2||null===l)return a;var p,u,d,h,m,f,g=Mu(n,c),y=Mu(t,l),v=s.position,b=(h=v,m=pl((d=g)[0],d[1]),f=pl(d[0],h),0===m?0:f/m),x=(p=y,u=sl(g),sl(p)-u);if("bendpoint"===s.type){var _=t.length-n.length,w=s.bendpointIndex,E=n[w];if(-1!==t.indexOf(E))return a;if(0===_){var S=t[w];return{delta:{x:r=S.x-s.position.x,y:o=S.y-s.position.y},point:{x:e.x+r,y:e.y+o}}}_<0&&0!==w&&w{Pn(e.context.element)===e.context.moddleElement&&r(e)})),this.postExecute(["shape.create","connection.create"],(function(e){var n=e.context;if(!1!==(n.hints||{}).createElementsBehavior){var i=n.shape||n.connection;!Jn(i)&&ni(i)&&si(i)&&t.updateLabel(i,si(i))}})),this.postExecute("shape.delete",(function(e){var n=e.context,i=n.labelTarget,r=n.hints||{};i&&!1!==r.unsetLabel&&t.updateLabel(i,null,null,{removeShape:!1})})),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var n=e.context;if(!1!==(n.hints||{}).labelBehavior){var i,r=n.connection.label;r&&r.parent&&(i=o(e),t.moveShape(r,i))}})),this.postExecute(["shape.replace"],(function(e){var t=e.context,n=t.newShape,i=t.oldShape,r=Pn(n);r&&ni(r)&&i.label&&n.label&&(n.label.x=i.label.x,n.label.y=i.label.y)})),this.postExecute("shape.resize",(function(e){var n,i=e.context,r=i.shape,o=i.newBounds,a=i.oldBounds;if(ii(r)){var s=r.label,c=function(e,t,n){var i=Tu(e,t,n);return Mr(Ca(i,e))}(function(e,t){if(!t.length)return;var n=function(e,t){var n=t.map((function(t){return{line:t,distance:ll(e,t)}}));return q(n,"distance")[0].line}(e,t);return cl(e,n)}(Nr(s),[[{x:(n=a).x,y:n.y},{x:n.x+(n.width||0),y:n.y}],[{x:n.x+(n.width||0),y:n.y},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y+(n.height||0)},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y},{x:n.x,y:n.y+(n.height||0)}]]),a,o);t.moveShape(s,c)}}))}function ju(e,t){function n(e,t){var n=e.context,i=n.connection,r=ee({},n.hints),o=n.newWaypoints||i.waypoints,a=n.oldWaypoints;return void 0===r.startChanged&&(r.startChanged=!!r.connectionStart),void 0===r.endChanged&&(r.endChanged=!!r.connectionEnd),function(e,t,n,i){return Pu(e,t,n,i).point}(t,o,a,r)}ro.call(this,e),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var i=e.context.connection,r=i.outgoing;i.incoming.forEach((function(i){var r=i.waypoints[i.waypoints.length-1],o=n(e,r),a=[].concat(i.waypoints.slice(0,-1),[o]);t.updateWaypoints(i,a)})),r.forEach((function(i){var r=i.waypoints[0],o=n(e,r),a=[].concat([o],i.waypoints.slice(1));t.updateWaypoints(i,a)}))})),this.postExecute(["connection.move"],(function(e){var n=e.context,i=n.connection,r=i.outgoing,o=i.incoming,a=n.delta;o.forEach((function(e){var n=e.waypoints[e.waypoints.length-1],i={x:n.x+a.x,y:n.y+a.y},r=[].concat(e.waypoints.slice(0,-1),[i]);t.updateWaypoints(e,r)})),r.forEach((function(e){var n=e.waypoints[0],i={x:n.x+a.x,y:n.y+a.y},r=[].concat([i],e.waypoints.slice(1));t.updateWaypoints(e,r)}))}))}function Lu(e,t,n){var i=Hu(e),r=Vu(i,t),o=i[0];return r.length?r[r.length-1]:Tu(o.original||o,n,t)}function Iu(e,t,n){var i=Hu(e),r=Vu(i,t),o=i[i.length-1];return r.length?r[0]:Tu(o.original||o,n,t)}function $u(e,t,n){var i=Hu(e),r=Fu(t,n),o=i[0];return Tu(o.original||o,r,t)}function zu(e,t,n){var i=Hu(e),r=Fu(t,n),o=i[i.length-1];return Tu(o.original||o,r,t)}function Fu(e,t){return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function Hu(e){var t=e.waypoints;if(!t.length)throw new Error("connection#"+e.id+": no waypoints");return t}function Vu(e,t){return O(F(e,Gu),(function(e){return function(e,t){return"intersect"===Or(t,e,1)}(e,t)}))}function Gu(e){return e.original||e}function Wu(e,t){ro.call(this,e),this.postExecute("shape.replace",(function(e){var n=e.oldShape,i=e.newShape;if(function(e,t){return kn(e,"bpmn:Participant")&&Kn(e)&&kn(t,"bpmn:Participant")&&!Kn(t)}(n,i)){var r,o,a,s,c=(o=Ur([r=n],!1),a=[],s=[],o.forEach((function(e){e!==r&&(e.incoming.forEach((function(e){kn(e,"bpmn:MessageFlow")&&a.push(e)})),e.outgoing.forEach((function(e){kn(e,"bpmn:MessageFlow")&&s.push(e)})))}),[]),{incoming:a,outgoing:s});c.incoming.forEach((function(e){var r=Iu(e,i,n);t.reconnectEnd(e,i,r)})),c.outgoing.forEach((function(e){var r=Lu(e,i,n);t.reconnectStart(e,i,r)}))}}),!0)}x(Ou,ro),Ou.$inject=["eventBus","modeling","bpmnFactory","textRenderer"],x(ju,ro),ju.$inject=["eventBus","modeling"],Wu.$inject=["eventBus","modeling"],x(Wu,ro);const Uu=["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:EscalationEventDefinition","bpmn:ConditionalEventDefinition","bpmn:SignalEventDefinition"];function qu(e){const t=Pn(e);if(!(kn(t,"bpmn:BoundaryEvent")||kn(t,"bpmn:StartEvent")&&Yn(t.$parent)))return!1;const n=t.get("eventDefinitions");return!(!n||!n.length)&&Uu.some((e=>kn(n[0],e)))}function Ku(e){return kn(e,"bpmn:BoundaryEvent")?"cancelActivity":"isInterrupting"}function Xu(e,t){e.invoke(ro,this),this.postExecuted("shape.replace",(function(e){const n=e.context.oldShape,i=e.context.newShape,r=e.context.hints;if(!qu(i))return;const o=Ku(i);if(r.targetElement&&void 0!==r.targetElement[o])return;const a=Pn(n).get(o);a!==Pn(i).get(o)&&t.updateProperties(i,{[o]:a})}))}function Yu(e,t){ro.call(this,e),this.preExecute("shape.resize",(function(e){var n=e.shape,i=Rn(n),r=i&&i.get("label");r&&r.get("bounds")&&t.updateModdleProperties(n,r,{bounds:void 0})}),!0)}function Zu(e,t,n){ro.call(this,e),this.preExecute("shape.delete",(function(e){var i=e.context.shape;if(1===i.incoming.length&&1===i.outgoing.length){var r,o,a,s=i.incoming[0],c=i.outgoing[0];if(kn(s,"bpmn:SequenceFlow")&&kn(c,"bpmn:SequenceFlow"))if(t.canConnect(s.source,c.target,s)){var l=(r=s.waypoints,o=c.waypoints,(a=mu(Qu(r[r.length-2]),Qu(r[r.length-1]),Qu(o[1]),Qu(o[0])))?[].concat(r.slice(0,r.length-1),[a],o.slice(1)):[Qu(r[0]),Qu(o[o.length-1])]);n.reconnectEnd(s,c.target,l)}}}))}function Qu(e){return e.original||e}function Ju(e,t){ro.call(this,e),this.preExecute("shape.delete",(function(e){var t=e.shape,n=t.parent;kn(t,"bpmn:Participant")&&(e.collaborationRoot=n)}),!0),this.postExecute("shape.delete",(function(e){var n=e.collaborationRoot;if(n&&!n.businessObject.participants.length){var i=t.makeProcess(),r=n.children.slice();t.moveElements(r,{x:0,y:0},i)}}),!0)}function ed(e,t,n,i){ro.call(this,e);var r=i.get("dragging",!1);function o(e){var i,r,o=e.source,a=e.target;e.parent&&(kn(e,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(o,a)||(r=!0),n.canConnectMessageFlow(o,a)&&(i="bpmn:MessageFlow")),kn(e,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(o,a)||(r=!0),n.canConnectSequenceFlow(o,a)&&(i="bpmn:SequenceFlow")),r&&t.removeConnection(e),i&&t.connect(o,a,{type:i,waypoints:e.waypoints.slice()}))}this.postExecuted("elements.move",(function(e){j(e.closure.allConnections,o)}),!0),this.preExecute("connection.reconnect",(function(e){var i,o,a=e.context,s=a.connection,c=a.newSource||s.source,l=a.newTarget||s.target;(i=n.canConnect(c,l))&&i.type!==s.type&&(o=t.connect(c,l,{type:i.type,associationDirection:i.associationDirection,waypoints:s.waypoints.slice()}),s.parent&&t.removeConnection(s),a.connection=o,r&&function(e,t){var n,i=r.context(),o=i&&i.payload.previousSelection;if(!o||!o.length)return;if(-1===(n=o.indexOf(e)))return;o.splice(n,1,t)}(s,o))})),this.postExecuted("element.updateProperties",(function(e){var n,i=e.context,r=i.properties,o=i.element,a=o.businessObject;r.default&&(n=B(o.outgoing,K({id:o.businessObject.default.id})))&&t.updateProperties(n,{conditionExpression:void 0}),r.conditionExpression&&a.sourceRef.default===a&&t.updateProperties(o.source,{default:void 0})}))}function td(e,t,n,i,r,o){i.invoke(ro,this),this._bpmnReplace=e,this._elementRegistry=n,this._selection=o,this.postExecuted(["elements.create"],500,(function(e){var n=e.context,i=n.parent,r=n.elements,o=I(r,(function(e,n){var r=t.canReplace([n],n.host||n.parent||i);return r?e.concat(r.replacements):e}),[]);o.length&&this._replaceElements(r,o)}),this),this.postExecuted(["elements.move"],500,(function(e){var n=e.context,i=n.newParent,r=n.newHost,o=[];j(n.closure.topLevel,(function(e){o=Yn(e)?o.concat(e.children):o.concat(e)})),1===o.length&&r&&(i=r);var a=t.canReplace(o,i);a&&this._replaceElements(o,a.replacements,r)}),this),this.postExecute(["shape.replace"],1500,(function(e){var n,i=e.context,r=i.oldShape,o=i.newShape,a=r.attachers;a&&a.length&&(n=t.canReplace(a,o),this._replaceElements(a,n.replacements))}),this),this.postExecuted(["shape.replace"],1500,(function(e){var t=e.context,n=t.oldShape,i=t.newShape;r.unclaimId(n.businessObject.id,n.businessObject),r.updateProperties(i,{id:n.id})}))}Xu.$inject=["injector","modeling"],x(Xu,ro),x(Yu,ro),Yu.$inject=["eventBus","modeling"],x(Zu,ro),Zu.$inject=["eventBus","bpmnRules","modeling"],Ju.$inject=["eventBus","modeling"],x(Ju,ro),x(ed,ro),ed.$inject=["eventBus","modeling","bpmnRules","injector"],x(td,ro),td.prototype._replaceElements=function(e,t){var n=this._elementRegistry,i=this._bpmnReplace,r=this._selection;j(t,(function(t){var r={type:t.newElementType},o=n.get(t.oldElementId),a=e.indexOf(o);e[a]=i.replaceElement(o,r,{select:!1})})),t&&r.select(e)},td.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var nd={width:140,height:120},id={width:300,height:60},rd={width:60,height:300},od={width:300,height:150},ad={width:150,height:300},sd={width:140,height:120},cd={width:50,height:30};function ld(e){e.on("resize.start",1500,(function(e){var t=e.context,n=t.shape,i=t.direction,r=t.balanced;(kn(n,"bpmn:Lane")||kn(n,"bpmn:Participant"))&&(t.resizeConstraints=function(e,t,n){var i=tu(e),r=!0,o=!0,a=Jp(i,[i]),s=Tr(e),c={},l={},p=Xn(e),u=p?id:rd;/n/.test(t)?l.top=s.bottom-u.height:/e/.test(t)?l.right=s.left+u.width:/s/.test(t)?l.bottom=s.top+u.height:/w/.test(t)&&(l.left=s.right-u.width);a.forEach((function(e){var i=Tr(e);/n/.test(t)&&(p&&i.tops.right+10&&(o=!1),n&&pd(s.right-i.left)<10&&md(c,"right",i.right-u.width),pd(s.right-i.right)<5&&fd(l,"right",i.left+u.width)),/s/.test(t)&&(p&&i.bottom>s.bottom+10&&(o=!1),n&&pd(s.bottom-i.top)<10&&md(c,"bottom",i.bottom-u.height),pd(s.bottom-i.bottom)<5&&fd(l,"bottom",i.top+u.height)),/w/.test(t)&&(!p&&i.left=r.y&&t<=r.y+r.height||n&&t>=r.x&&t<=r.x+r.width)return(o=eu(r)).length?Sd(o,t,n):r}_d.$inject=["eventBus"];var Cd=180,kd=160;function Ad(e,t,n,i,r,o,a){ro.call(this,t),this._canvas=e,this._eventBus=t,this._modeling=n,this._elementFactory=i,this._bpmnFactory=r,this._bpmnjs=o,this._elementRegistry=a;var s=this;function c(e){return kn(e,"bpmn:SubProcess")&&!Kn(e)}function l(t){var n=t.shape,i=t.newRootElement,r=Pn(n);i=s._addDiagram(i||r),t.newRootElement=e.addRootElement(i)}function p(t){var n=Pn(t.shape);s._removeDiagram(n);var i=t.newRootElement=a.get(mo(n));e.removeRootElement(i)}this.executed("shape.create",(function(e){c(e.shape)&&l(e)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.newRootElement;n&&t.children&&(s._showRecursively(t.children),s._moveChildrenToShape(t,n))}),!0),this.reverted("shape.create",(function(e){c(e.shape)&&p(e)}),!0),this.preExecuted("shape.delete",(function(e){var t=e.shape;if(c(t)){var i=a.get(mo(t));i&&n.removeElements(i.children.slice())}}),!0),this.executed("shape.delete",(function(e){c(e.shape)&&p(e)}),!0),this.reverted("shape.delete",(function(e){c(e.shape)&&l(e)}),!0),this.preExecuted("shape.replace",(function(t){var n=t.oldShape,i=t.newShape;c(n)&&c(i)&&(t.oldRoot=e.removeRootElement(mo(n)))}),!0),this.postExecuted("shape.replace",(function(t){var i=t.newShape,r=t.oldRoot,o=e.findRoot(mo(i));if(r&&o){var a=r.children;n.moveElements(a,{x:0,y:0},o)}}),!0),this.executed("element.updateProperties",(function(e){var t=e.element;if(kn(t,"bpmn:SubProcess")){var n=e.properties,i=e.oldProperties.id,r=n.id;if(i!==r){if(go(t))return a.updateId(t,fo(r)),void a.updateId(i,r);a.get(fo(i))&&a.updateId(fo(i),fo(r))}}}),!0),this.reverted("element.updateProperties",(function(e){var t=e.element;if(kn(t,"bpmn:SubProcess")){var n=e.properties,i=e.oldProperties.id,r=n.id;if(i!==r){if(go(t))return a.updateId(t,fo(i)),void a.updateId(r,i);var o=a.get(fo(r));o&&a.updateId(o,fo(i))}}}),!0),t.on("element.changed",(function(e){var n=e.element;if(go(n)){var i=n,r=a.get(ho(i));r&&r!==i&&t.fire("element.changed",{element:r})}})),this.executed("shape.toggleCollapse",400,(function(e){var t=e.shape;kn(t,"bpmn:SubProcess")&&(Kn(t)?p(e):(l(e),s._showRecursively(t.children)))}),!0),this.reverted("shape.toggleCollapse",400,(function(e){var t=e.shape;kn(t,"bpmn:SubProcess")&&(Kn(t)?p(e):(l(e),s._showRecursively(t.children)))}),!0),this.postExecuted("shape.toggleCollapse",600,(function(e){var t=e.shape;if(kn(t,"bpmn:SubProcess")){var n=e.newRootElement;n&&(Kn(t)?s._moveChildrenToShape(n,t):s._moveChildrenToShape(t,n))}}),!0),t.on("copyPaste.createTree",(function(e){var t=e.element,n=e.children;if(c(t)){var i=mo(t),r=a.get(i);r&&n.push.apply(n,r.children)}})),t.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element,i=e.elements,r=n.parent;if(kn(Rn(r),"bpmndi:BPMNPlane")){var o=ho(r),a=B(i,(function(e){return e.id===o}));a&&(t.parent=a.id)}})),t.on("copyPaste.pasteElement",(function(e){var t=e.descriptor;t.parent&&(c(t.parent)||t.parent.hidden)&&(t.hidden=!0)}))}function Pd(e,t){e.invoke(ro,this),this.postExecuted("shape.replace",(function(e){var n=e.context.oldShape,i=e.context.newShape;if(kn(i,"bpmn:SubProcess")&&(kn(n,"bpmn:Task")||kn(n,"bpmn:CallActivity"))&&Kn(i)){var r,o={x:(r=i).x+r.width/6,y:r.y+r.height/2};t.createShape({type:"bpmn:StartEvent"},o,i)}}))}function Rd(e){ro.call(this,e),this.preExecute("connection.create",(function(e){const{target:t}=e;kn(t,"bpmn:TextAnnotation")&&(e.parent=t.parent)}),!0),this.preExecute(["shape.create","shape.resize","elements.move"],(function(e){const t=e.shapes||[e.shape];1===t.length&&kn(t[0],"bpmn:TextAnnotation")&&(e.hints=e.hints||{},e.hints.autoResize=!1)}),!0)}function Md(e,t){ro.call(this,e),this.postExecuted("shape.toggleCollapse",1500,(function(e){var n=e.shape;if(!Kn(n)){var i=Ur(n);i.forEach((function(e){var t=e.incoming.slice(),n=e.outgoing.slice();j(t,(function(e){r(e,!0)})),j(n,(function(e){r(e,!1)}))}))}function r(e,r){-1!==i.indexOf(e.source)&&-1!==i.indexOf(e.target)||(r?t.reconnectEnd(e,n,Nr(n)):t.reconnectStart(e,n,Nr(n)))}}),!0)}x(Ad,ro),Ad.prototype._moveChildrenToShape=function(e,t){var n,i=this._modeling,r=e.children;if(r){var o=(r=r.concat(r.reduce((function(t,n){return n.label&&n.label.parent!==e?t.concat(n.label):t}),[]))).filter((function(e){return!e.hidden}));if(o.length){var a=qr(o);if(t.x){var s=Nr(t),c=Nr(a);n={x:s.x-c.x,y:s.y-c.y}}else n={x:Cd-a.x,y:kd-a.y};i.moveElements(r,n,t,{autoResize:!1})}else i.moveElements(r,{x:0,y:0},t,{autoResize:!1})}},Ad.prototype._showRecursively=function(e,t){var n=this,i=[];return e.forEach((function(e){e.hidden=!!t,i=i.concat(e),e.children&&(i=i.concat(n._showRecursively(e.children,e.collapsed||t)))})),i},Ad.prototype._addDiagram=function(e){var t=this._bpmnjs.getDefinitions().diagrams;return e.businessObject||(e=this._createNewDiagram(e)),t.push(e.di.$parent),e},Ad.prototype._createNewDiagram=function(e){var t=this._bpmnFactory,n=this._elementFactory,i=t.create("bpmndi:BPMNPlane",{bpmnElement:e}),r=t.create("bpmndi:BPMNDiagram",{plane:i});return i.$parent=r,n.createRoot({id:mo(e),type:e.$type,di:i,businessObject:e,collapsed:!0})},Ad.prototype._removeDiagram=function(e){var t=this._bpmnjs.getDefinitions().diagrams,n=B(t,(function(t){return t.plane.bpmnElement.id===e.id}));return t.splice(t.indexOf(n),1),n},Ad.$inject=["canvas","eventBus","modeling","elementFactory","bpmnFactory","bpmnjs","elementRegistry"],Pd.$inject=["injector","modeling"],x(Pd,ro),x(Rd,ro),Rd.$inject=["eventBus"],x(Md,ro),Md.$inject=["eventBus","modeling"];function Td(e,t,n){ro.call(this,e),this.executed(["shape.toggleCollapse"],500,(function(e){var t,n=e.context.shape;kn(n,"bpmn:SubProcess")&&(n.collapsed?Rn(n).isExpanded=!1:((t=n.children).length&&t.forEach((function(e){"label"!==e.type||e.businessObject.name||(e.hidden=!0)})),Rn(n).isExpanded=!0))})),this.reverted(["shape.toggleCollapse"],500,(function(e){var t=e.context.shape;t.collapsed?Rn(t).isExpanded=!1:Rn(t).isExpanded=!0})),this.postExecuted(["shape.toggleCollapse"],500,(function(e){var i,r=e.context.shape,o=t.getDefaultSize(r);i=r.collapsed?function(e,t){return{x:e.x+(e.width-t.width)/2,y:e.y+(e.height-t.height)/2,width:t.width,height:t.height}}(r,o):function(e,t){var n,i,r=e.children,o=t;return(n=Xp((i=r,i.filter((function(e){return!e.hidden}))).concat([e])))?(o.width=Math.max(n.width,o.width),o.height=Math.max(n.height,o.height),o.x=n.x+(n.width-o.width)/2,o.y=n.y+(n.height-o.height)/2):(o.x=e.x+(e.width-o.width)/2,o.y=e.y+(e.height-o.height)/2),o}(r,o),n.resizeShape(r,i,null,{autoResize:!r.collapsed&&"nwse"})}))}function Dd(e,t,n,i){t.invoke(ro,this),this.preExecute("shape.delete",(function(e){var t=e.context.shape,r=t.businessObject;Jn(t)||(kn(t,"bpmn:Participant")&&Kn(t)&&n.ids.unclaim(r.processRef.id),i.unclaimId(r.id,r))})),this.preExecute("connection.delete",(function(e){var t=e.context.connection.businessObject;i.unclaimId(t.id,t)})),this.preExecute("canvas.updateRoot",(function(){var t=e.getRootElement(),i=t.businessObject;kn(t,"bpmn:Collaboration")&&n.ids.unclaim(i.id)}))}function Bd(e,t){ro.call(this,e),this.preExecute("connection.delete",(function(e){var n=e.context.connection,i=n.source;(function(e,t){if(!kn(e,"bpmn:SequenceFlow"))return!1;var n=Pn(t),i=Pn(e);return n.get("default")===i})(n,i)&&t.updateProperties(i,{default:null})}))}x(Td,ro),Td.$inject=["eventBus","elementFactory","modeling"],x(Dd,ro),Dd.$inject=["canvas","injector","moddle","modeling"],x(Bd,ro),Bd.$inject=["eventBus","modeling"];function Nd(e,t){var n;ro.call(this,e);var i=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(i,5e3,(function(e){(n=n||new Od).enter()})),this.postExecuted(i,500,(function(e){!function(){if(!n)throw new Error("out of bounds release");var e=n.leave();e&&(t.updateLaneRefs(n.flowNodes,n.lanes),n=null)}()})),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],(function(e){var t=e.context.shape,i=function(){if(!n)throw new Error("out of bounds release");return n}();t.labelTarget||(kn(t,"bpmn:Lane")&&i.addLane(t),kn(t,"bpmn:FlowNode")&&i.addFlowNode(t))}))}function Od(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}Nd.$inject=["eventBus","modeling"],x(Nd,ro);const jd={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","compensateBoundaryEventBehaviour","createBehavior","createDataObjectBehavior","createParticipantBehavior","dataInputAssociationBehavior","dataStoreBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","fixHoverBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","layoutConnectionBehavior","messageFlowBehavior","nonInterruptingBehavior","removeElementBehavior","removeEmbeddedLabelBoundsBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","rootElementReferenceBehavior","spaceToolBehavior","subProcessPlaneBehavior","subProcessStartEventBehavior","textAnnotationBehavior","toggleCollapseConnectionBehaviour","toggleElementCollapseBehaviour","unclaimIdBehavior","updateFlowNodeRefsBehavior","unsetDefaultFlowBehavior"],adaptiveLabelPositioningBehavior:["type",gp],appendBehavior:["type",vp],associationBehavior:["type",bp],attachEventBehavior:["type",xp],boundaryEventBehavior:["type",wp],compensateBoundaryEventBehaviour:["type",Ep],createBehavior:["type",Ap],createDataObjectBehavior:["type",Pp],createParticipantBehavior:["type",Bp],dataInputAssociationBehavior:["type",Ip],dataStoreBehavior:["type",Fp],deleteLaneBehavior:["type",iu],detachEventBehavior:["type",ru],dropOnFlowBehavior:["type",au],eventBasedGatewayBehavior:["type",lu],fixHoverBehavior:["type",du],groupBehavior:["type",hu],importDockingFix:["type",fu],isHorizontalFix:["type",yu],labelBehavior:["type",Ou],layoutConnectionBehavior:["type",ju],messageFlowBehavior:["type",Wu],nonInterruptingBehavior:["type",Xu],removeElementBehavior:["type",Zu],removeEmbeddedLabelBoundsBehavior:["type",Yu],removeParticipantBehavior:["type",Ju],replaceConnectionBehavior:["type",ed],replaceElementBehaviour:["type",td],resizeBehavior:["type",ld],resizeLaneBehavior:["type",vd],rootElementReferenceBehavior:["type",bd],spaceToolBehavior:["type",_d],subProcessPlaneBehavior:["type",Ad],subProcessStartEventBehavior:["type",Pd],textAnnotationBehavior:["type",Rd],toggleCollapseConnectionBehaviour:["type",Md],toggleElementCollapseBehaviour:["type",Td],unclaimIdBehavior:["type",Dd],unsetDefaultFlowBehavior:["type",Bd],updateFlowNodeRefsBehavior:["type",Nd]};function Ld(e,t){var n=Or(e,t,-15);return"intersect"!==n?n:null}function Id(e){bc.call(this,e)}function $d(e){return!e||Jn(e)}function zd(e){do{if(kn(e,"bpmn:Process"))return Pn(e);if(kn(e,"bpmn:Participant"))return Pn(e).processRef||Pn(e)}while(e=e.parent)}function Fd(e){return kn(e,"bpmn:TextAnnotation")}function Hd(e){return kn(e,"bpmn:Group")&&!e.labelTarget}function Vd(e){return kn(e,"bpmn:BoundaryEvent")&&qd(e,"bpmn:CompensateEventDefinition")}function Gd(e){return Pn(e).isForCompensation}function Wd(e){for(var t=e;t=t.parent;){if(kn(t,"bpmn:FlowElementsContainer"))return Pn(t);if(kn(t,"bpmn:Participant"))return Pn(t).processRef}return null}function Ud(e,t){return Wd(e)===Wd(t)}function qd(e,t){return!!B(Pn(e).eventDefinitions||[],(function(e){return kn(e,t)}))}function Kd(e,t){return(Pn(e).eventDefinitions||[]).every((function(e){return kn(e,t)}))}function Xd(e,t){var n=function(e){for(var t=[];e;)(e=e.parent)&&t.push(e);return t}(t);return-1!==n.indexOf(e)}function Yd(e,t,n){if($d(e)||$d(t))return null;if(!kn(n,"bpmn:DataAssociation")){if(ph(e,t))return{type:"bpmn:MessageFlow"};if(uh(e,t))return{type:"bpmn:SequenceFlow"}}var i=dh(e,t);return i||(lh(e,t)?{type:"bpmn:Association",associationDirection:"One"}:!!ch(e,t)&&{type:"bpmn:Association",associationDirection:"None"})}function Zd(e,t){return!(!Jn(e)&&!Hd(e))||!(kn(t,"bpmn:Participant")&&!Kn(t))&&(kn(e,"bpmn:Participant")?kn(t,"bpmn:Process")||kn(t,"bpmn:Collaboration"):An(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?t===e.parent:kn(e,"bpmn:Lane")?kn(t,"bpmn:Participant")||kn(t,"bpmn:Lane"):!(kn(e,"bpmn:BoundaryEvent")&&(n=e,!Pn(n).cancelActivity||!eh(n)&&!th(n)))&&(kn(e,"bpmn:FlowElement")&&!kn(e,"bpmn:DataStoreReference")?kn(t,"bpmn:FlowElementsContainer")?Kn(t):An(t,["bpmn:Participant","bpmn:Lane"]):kn(e,"bpmn:DataStoreReference")&&kn(t,"bpmn:Collaboration")?z(Pn(t).get("participants"),(function(e){return!!e.get("processRef")})):An(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?An(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):!!kn(e,"bpmn:MessageFlow")&&(kn(t,"bpmn:Collaboration")||e.source.parent==t||e.target.parent==t)));var n}function Qd(e){return kn(e,"bpmn:Lane")}function Jd(e){return!!function(e){return!Jn(e)&&kn(e,"bpmn:BoundaryEvent")}(e)||(!(!kn(e,"bpmn:IntermediateThrowEvent")||!eh(e))||kn(e,"bpmn:IntermediateCatchEvent")&&th(e))}function eh(e){var t=Pn(e);return t&&!(t.eventDefinitions&&t.eventDefinitions.length)}function th(e){return nh(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function nh(e,t){return t.some((function(t){return qd(e,t)}))}function ih(e,t,n,i){if(Array.isArray(e)||(e=[e]),1!==e.length)return!1;var r=e[0];return!Jn(r)&&(!!Jd(r)&&(!Yn(t)&&(!(!kn(t,"bpmn:Activity")||Gd(t))&&(!(i&&!Ld(i,t))&&(!function(e){return kn(e,"bpmn:ReceiveTask")&&B(e.incoming,(function(e){return kn(e.source,"bpmn:EventBasedGateway")}))}(t)&&"attach")))))}function rh(e,t,n){if(!t)return!1;var i={replacements:[]};return j(e,(function(e){Yn(t)||kn(e,"bpmn:StartEvent")&&"label"!==e.type&&Zd(e,t)&&(function(e){return e&&!1!==Pn(e).isInterrupting}(e)||i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),(function(e){return Zn(e,"bpmn:ErrorEventDefinition")}(e)||function(e){return Zn(e,"bpmn:EscalationEventDefinition")}(e)||function(e){return Zn(e,"bpmn:CompensateEventDefinition")}(e))&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),nh(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&kn(t,"bpmn:SubProcess")&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"})),kn(t,"bpmn:Transaction")||qd(e,"bpmn:CancelEventDefinition")&&"label"!==e.type&&(kn(e,"bpmn:EndEvent")&&Zd(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:EndEvent"}),kn(e,"bpmn:BoundaryEvent")&&ih(e,t,0,n)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:BoundaryEvent"}))})),!!i.replacements.length&&i}function oh(e,t){return!z(e,Qd)&&(!t||e.every((function(e){return Zd(e,t)})))}function ah(e,t,n,i){return!!t&&(!(!Jn(e)&&!Hd(e))||n!==t&&((!n||!Xd(n,t))&&(Zd(e,t)||hh(e,t))))}function sh(e,t){return kn(e,"bpmn:SubProcess")?Kn(e)&&(!t||t.width>=100&&t.height>=80):!!kn(e,"bpmn:Lane")||(!!kn(e,"bpmn:Participant")||(!!Fd(e)||!!Hd(e)))}function ch(e,t){return!Xd(t,e)&&!Xd(e,t)&&(!!function(e,t){var n=Fd(e),i=Fd(t);return(n||i)&&n!==i}(e,t)||!!dh(e,t))}function lh(e,t){return Ud(e,t)&&Vd(e)&&kn(t,"bpmn:Activity")&&(n=e,!t.attachers.includes(n))&&!Yn(t);var n}function ph(e,t){return!(fh(e)&&!fh(t))&&(kn(i=e,"bpmn:InteractionNode")&&!kn(i,"bpmn:BoundaryEvent")&&(!kn(i,"bpmn:Event")||kn(i,"bpmn:ThrowEvent")&&Kd(i,"bpmn:MessageEventDefinition"))&&function(e){return kn(e,"bpmn:InteractionNode")&&!Gd(e)&&(!kn(e,"bpmn:Event")||kn(e,"bpmn:CatchEvent")&&Kd(e,"bpmn:MessageEventDefinition"))&&!(kn(e,"bpmn:BoundaryEvent")&&!qd(e,"bpmn:MessageEventDefinition"))}(t)&&(n=t,!(zd(e)===zd(n))));var n,i}function uh(e,t){return kn(n=e,"bpmn:FlowNode")&&!kn(n,"bpmn:EndEvent")&&!Yn(n)&&!(kn(n,"bpmn:IntermediateThrowEvent")&&qd(n,"bpmn:LinkEventDefinition"))&&!Vd(n)&&!Gd(n)&&function(e){return kn(e,"bpmn:FlowNode")&&!kn(e,"bpmn:StartEvent")&&!kn(e,"bpmn:BoundaryEvent")&&!Yn(e)&&!(kn(e,"bpmn:IntermediateCatchEvent")&&qd(e,"bpmn:LinkEventDefinition"))&&!Gd(e)}(t)&&Ud(e,t)&&!(kn(e,"bpmn:EventBasedGateway")&&!function(e){return kn(e,"bpmn:ReceiveTask")||kn(e,"bpmn:IntermediateCatchEvent")&&(qd(e,"bpmn:MessageEventDefinition")||qd(e,"bpmn:TimerEventDefinition")||qd(e,"bpmn:ConditionalEventDefinition")||qd(e,"bpmn:SignalEventDefinition"))}(t));var n}function dh(e,t){return An(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&An(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:!(!An(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])||!An(e,["bpmn:Activity","bpmn:CatchEvent"]))&&{type:"bpmn:DataOutputAssociation"}}function hh(e,t,n){if(!t)return!1;if(Array.isArray(e)){if(1!==e.length)return!1;e=e[0]}return t.source!==e&&t.target!==e&&(An(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!Jn(t)&&kn(e,"bpmn:FlowNode")&&!kn(e,"bpmn:BoundaryEvent")&&Zd(e,t.parent))}function mh(e,t){return!!Jn(t)||!(kn(t,"bpmn:Lane")&&!function(e,t){return e&&t&&-1!==e.indexOf(t)}(e,t.parent))}function fh(e){return Bc(e,"bpmn:Process")||Bc(e,"bpmn:Collaboration")}x(Id,bc),Id.$inject=["eventBus"],Id.prototype.init=function(){this.addRule("connection.start",(function(e){return function(e){if($d(e))return null;return An(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"])}(e.source)})),this.addRule("connection.create",(function(e){var t=e.source,n=e.target,i=e.hints||{},r=i.targetParent;if(i.targetAttach)return!1;r&&(n.parent=r);try{return Yd(t,n)}finally{r&&(n.parent=null)}})),this.addRule("connection.reconnect",(function(e){var t=e.connection;return Yd(e.source,e.target,t)})),this.addRule("connection.updateWaypoints",(function(e){return{type:e.connection.type}})),this.addRule("shape.resize",(function(e){return sh(e.shape,e.newBounds)})),this.addRule("elements.create",(function(e){var t=e.elements,n=e.position,i=e.target;return!(Qn(i)&&!hh(t,i))&&$(t,(function(e){return Qn(e)?Yd(e.source,e.target,e):e.host?ih(e,e.host,null,n):ah(e,i,null)}))})),this.addRule("elements.move",(function(e){var t=e.target,n=e.shapes,i=e.position;return ih(n,t,null,i)||rh(n,t,i)||oh(n,t)||hh(n,t)})),this.addRule("shape.create",(function(e){return ah(e.shape,e.target,e.source,e.position)})),this.addRule("shape.attach",(function(e){return ih(e.shape,e.target,null,e.position)})),this.addRule("element.copy",(function(e){var t=e.element;return mh(e.elements,t)}))},Id.prototype.canConnectMessageFlow=ph,Id.prototype.canConnectSequenceFlow=uh,Id.prototype.canConnectDataAssociation=dh,Id.prototype.canConnectAssociation=ch,Id.prototype.canConnectCompensationAssociation=lh,Id.prototype.canMove=oh,Id.prototype.canAttach=ih,Id.prototype.canReplace=rh,Id.prototype.canDrop=Zd,Id.prototype.canInsert=hh,Id.prototype.canCreate=ah,Id.prototype.canConnect=Yd,Id.prototype.canResize=sh,Id.prototype.canCopy=mh;const gh={__depends__:[tl],__init__:["bpmnRules"],bpmnRules:["type",Id]};function yh(e,t){e.on("saveXML.start",2e3,(function(){j(t.getRootElements(),(function(e){var t,n=Rn(e);t=F(O(Ur([e],!1),(function(t){return t!==e&&!t.labelTarget})),Rn),n.set("planeElement",t)}))}))}yh.$inject=["eventBus","canvas"];const vh={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",yh]};function bh(e){ro.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.parent=o.parent),n.parentIndex=o.index)})),this.preExecute(["shape.move","connection.move"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.newParent||i.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.newParent=o.parent),n.newParentIndex=o.index)}))}function xh(e,t){bh.call(this,e);var n=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:9,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:TextAnnotation",order:{level:9}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function i(e){var t=e.order;if(t||(e.order=t=function(e){if(e.labelTarget)return{level:10};var t=B(n,(function(t){return An(e,[t.type])}));return t&&t.order||{level:1}}(e)),!t)throw new Error(`no order for <${e.id}>`);return t}this.getOrdering=function(e,n){if(e.labelTarget||kn(e,"bpmn:TextAnnotation"))return{parent:t.findRoot(n)||t.getRootElement(),index:-1};var r=i(e);r.containers&&(n=function(e,t,n){for(var i=t;i&&!An(i,n);)i=i.parent;if(!i)throw new Error(`no parent for <${e.id}> in <${t&&t.id}>`);return i}(e,n,r.containers));var o=n.children.indexOf(e),a=N(n.children,(function(t){return!(!e.labelTarget&&t.labelTarget)&&r.levelrm(e.dy)?"x":"y",i=e["d"+n],r=e[n]-i;if(rm(i)<5)return!1;i<0&&(i*=-1),Vo(e)&&(i*=-1);var o=function(e,t){if("x"===e){if(t>0)return"e";if(t<0)return"w"}if("y"===e){if(t>0)return"s";if(t<0)return"n"}return null}(n,i),a=this._canvas.getRootElement();!Go(e)&&e.hover&&(a=e.hover);var s=[...Ur(a,!0),...a.attachers||[]],c=this.calculateAdjustments(s,n,i,r),l=function(e,t,n,i,r){var o=e.movingShapes,a=e.resizingShapes;if(!a.length)return;var s,c,l={};return j(a,(function(e){var p,u,d,h,m,f,g=e.attachers,y=e.children,v=Tr(e),b=O(y,(function(e){return!(Qn(e)||Jn(e)||fm(o,e)||fm(a,e))})),x=O(y,(function(e){return!Qn(e)&&!Jn(e)&&fm(o,e)})),_=[],w=[];b.length&&(u=hm(Tr(qr(b))),p=i-v[cm[n]]+u[cm[n]],"n"===n?l.bottom=c=R(c)?Math.min(c,p):p:"w"===n?l.right=c=R(c)?Math.min(c,p):p:"s"===n?l.top=s=R(s)?Math.max(s,p):p:"e"===n&&(l.left=s=R(s)?Math.max(s,p):p)),x.length&&(d=hm(Tr(qr(x))),p=i-d[cm[pm[n]]]+v[cm[pm[n]]],"n"===n?l.bottom=c=R(c)?Math.min(c,p):p:"w"===n?l.right=c=R(c)?Math.min(c,p):p:"s"===n?l.top=s=R(s)?Math.max(s,p):p:"e"===n&&(l.left=s=R(s)?Math.max(s,p):p)),g&&g.length&&(g.forEach((function(e){fm(o,e)?_.push(e):w.push(e)})),_.length&&(h=Tr(qr(_.map(Nr))),m=v[cm[pm[n]]]-(h[cm[pm[n]]]-i)),w.length&&(f=Tr(qr(w.map(Nr)))[cm[n]]-(v[cm[n]]-i)),"n"===n?(p=Math.min(m||1/0,f||1/0),l.bottom=c=R(c)?Math.min(c,p):p):"w"===n?(p=Math.min(m||1/0,f||1/0),l.right=c=R(c)?Math.min(c,p):p):"s"===n?(p=Math.max(m||-1/0,f||-1/0),l.top=s=R(s)?Math.max(s,p):p):"e"===n&&(p=Math.max(m||-1/0,f||-1/0),l.left=s=R(s)?Math.max(s,p):p));var E=r&&r[e.id];E&&("n"===n?(p=i+e[am[t]]-E[am[t]],l.bottom=c=R(c)?Math.min(c,p):p):"w"===n?(p=i+e[am[t]]-E[am[t]],l.right=c=R(c)?Math.min(c,p):p):"s"===n?(p=i-e[am[t]]+E[am[t]],l.top=s=R(s)?Math.max(s,p):p):"e"===n&&(p=i-e[am[t]]+E[am[t]],l.left=s=R(s)?Math.max(s,p):p))})),l}(c,n,o,r,this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:o,shapes:c.resizingShapes,start:r}));return ee(t,c,{axis:n,direction:o,spaceToolConstraints:l,start:r}),xa("resize-"+("x"===n?"ew":"ns")),!0},dm.prototype.calculateAdjustments=function(e,t,n,i){var r=this._rules,o=[],a=[],s=[],c=[];function l(e){o.includes(e)||o.push(e);var t=e.label;t&&!o.includes(t)&&o.push(t)}j(e,(function(e){if(e.parent&&!Jn(e))if(Qn(e))c.push(e);else{var o=e[t],p=o+e[am[t]];if(function(e){return!!e.host}(e)&&(n>0&&Nr(e)[t]>i||n<0&&Nr(e)[t]0&&o>i||n<0&&pi&&r.allowed("shape.resize",{shape:e})?(u=e,void(a.includes(u)||a.push(u))):void 0;l(e)}}})),j(o,(function(e){var t=e.attachers;t&&j(t,(function(e){l(e)}))}));var p=o.concat(a);return j(s,(function(e){var t=e.host;fm(p,t)&&l(e)})),p=o.concat(a),j(c,(function(e){var t=e.source,n=e.target,i=e.label;fm(p,t)&&fm(p,n)&&i&&l(i)})),{movingShapes:o,resizingShapes:a}},dm.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},dm.prototype.isActive=function(){var e=this._dragging.context();return!!e&&/^spaceTool/.test(e.prefix)};var gm="djs-dragging",ym="djs-resizing",vm=Math.max;function bm(e,t,n,i,r){function o(e,t){j(e,(function(e){r.addDragger(e,t),n.addMarker(e,gm)}))}e.on("spaceTool.selection.start",(function(e){var t=n.getLayer("space"),r=e.context,o="M 0,-10000 L 0,10000",a="M -10000,0 L 10000,0",s=qe("g");Ie(s,i.cls("djs-crosshair-group",["no-events"])),Ne(t,s);var c=qe("path");Ie(c,"d",o),ze(c).add("djs-crosshair"),Ne(s,c);var l=qe("path");Ie(l,"d",a),ze(l).add("djs-crosshair"),Ne(s,l),r.crosshairGroup=s})),e.on("spaceTool.selection.move",(function(e){Ci(e.context.crosshairGroup,e.x,e.y)})),e.on("spaceTool.selection.cleanup",(function(e){var t=e.context.crosshairGroup;t&&nt(t)})),e.on("spaceTool.move",250,(function(e){var a=e.context,s=a.line,c=a.axis,l=a.movingShapes,p=a.resizingShapes;if(a.initialized){if(!a.dragGroup){var u=n.getLayer("space");Ie(s=qe("path"),"d","M0,0 L0,0"),ze(s).add("djs-crosshair"),Ne(u,s),a.line=s;var d=qe("g");Ie(d,i.cls("djs-drag-group",["no-events"])),Ne(n.getActiveLayer(),d),o(l,d),o(a.movingConnections=t.filter((function(e){var t=!1;j(l,(function(n){j(n.outgoing,(function(n){e===n&&(t=!0)}))}));var n=!1;j(l,(function(t){j(t.incoming,(function(t){e===t&&(n=!0)}))}));var i=!1;j(p,(function(t){j(t.outgoing,(function(t){e===t&&(i=!0)}))}));var r=!1;return j(p,(function(t){j(t.incoming,(function(t){e===t&&(r=!0)}))})),Qn(e)&&(t||i)&&(n||r)})),d),a.dragGroup=d}if(!a.frameGroup){var h=qe("g");Ie(h,i.cls("djs-frame-group",["no-events"])),Ne(n.getActiveLayer(),h);var m=[];j(p,(function(e){var t=r.addFrame(e,h),i=t.getBBox();m.push({element:t,initialBounds:i}),n.addMarker(e,ym)})),a.frameGroup=h,a.frames=m}Ie(s,{d:{x:"M"+e.x+", -10000 L"+e.x+", 10000",y:"M -10000, "+e.y+" L 10000, "+e.y}[c]});var f={x:e.dx,y:e.dy};f[{x:"y",y:"x"}[a.axis]]=0,Ci(a.dragGroup,f.x,f.y),j(a.frames,(function(e){var t,n,i=e.element,r=e.initialBounds;"e"===a.direction?Ie(i,{width:vm(r.width+f.x,5)}):Ie(i,{width:t=vm(r.width-f.x,5),x:r.x+r.width-t}),"s"===a.direction?Ie(i,{height:vm(r.height+f.y,5)}):Ie(i,{height:n=vm(r.height-f.y,5),y:r.y+r.height-n})}))}})),e.on("spaceTool.cleanup",(function(e){var t=e.context,i=t.movingShapes,r=t.movingConnections,o=t.resizingShapes,a=t.line,s=t.dragGroup,c=t.frameGroup;j(i,(function(e){n.removeMarker(e,gm)})),j(r,(function(e){n.removeMarker(e,gm)})),s&&(nt(a),nt(s)),j(o,(function(e){n.removeMarker(e,ym)})),c&&nt(c)}))}bm.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];const xm={__init__:["spaceToolPreview"],__depends__:[Yc,tl,nm,up,Oh],spaceTool:["type",dm],spaceToolPreview:["type",bm]};function _m(e){e.invoke(dm,this)}_m.$inject=["injector"],x(_m,dm),_m.prototype.calculateAdjustments=function(e,t,n,i){var r=dm.prototype.calculateAdjustments.call(this,e,t,n,i);return r.resizingShapes=r.resizingShapes.filter((function(e){return!kn(e,"bpmn:TextAnnotation")&&(!function(e){return kn(e,"bpmn:Participant")&&!Pn(e).processRef}(e)||!("y"===t&&Xn(e)||"x"===t&&!Xn(e)))})),r};const wm={__depends__:[xm],spaceTool:["type",_m]};function Em(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],(function(){this.clear(!1)}),this)}Em.$inject=["eventBus","injector"],Em.prototype.execute=function(e,t){if(!e)throw new Error("command required");this._currentExecution.trigger="execute";const n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction()},Em.prototype.canExecute=function(e,t){const n={command:e,context:t},i=this._getHandler(e);let r=this._fire(e,"canExecute",n);if(void 0===r){if(!i)return!1;i.canExecute&&(r=i.canExecute(t))}return r},Em.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,!1!==e&&this._fire("changed",{trigger:"clear"})},Em.prototype.undo=function(){let e,t=this._getUndoAction();if(t){for(this._currentExecution.trigger="undo",this._pushAction(t);t&&(this._internalUndo(t),e=this._getUndoAction(),e&&e.id===t.id);)t=e;this._popAction()}},Em.prototype.redo=function(){let e,t=this._getRedoAction();if(t){for(this._currentExecution.trigger="redo",this._pushAction(t);t&&(this._internalExecute(t,!0),e=this._getRedoAction(),e&&e.id===t.id);)t=e;this._popAction()}},Em.prototype.register=function(e,t){this._setHandler(e,t)},Em.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");const n=this._injector.instantiate(t);this.register(e,n)},Em.prototype.canUndo=function(){return!!this._getUndoAction()},Em.prototype.canRedo=function(){return!!this._getRedoAction()},Em.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},Em.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},Em.prototype._internalUndo=function(e){const t=e.command,n=e.context,i=this._getHandler(t);this._atomicDo((()=>{this._fire(t,"revert",e),i.revert&&this._markDirty(i.revert(n)),this._revertedAction(e),this._fire(t,"reverted",e)}))},Em.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);const i=t?[e+"."+t,t]:[e];let r;n=this._eventBus.createEvent(n);for(const o of i)if(r=this._eventBus.fire("commandStack."+o,n),n.cancelBubble)break;return r},Em.prototype._createId=function(){return this._uid++},Em.prototype._atomicDo=function(e){const t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}},Em.prototype._internalExecute=function(e,t){const n=e.command,i=e.context,r=this._getHandler(n);if(!r)throw new Error("no command handler registered for <"+n+">");this._pushAction(e),t||(this._fire(n,"preExecute",e),r.preExecute&&r.preExecute(i),this._fire(n,"preExecuted",e)),this._atomicDo((()=>{this._fire(n,"execute",e),r.execute&&this._markDirty(r.execute(i)),this._executedAction(e,t),this._fire(n,"executed",e)})),t||(this._fire(n,"postExecute",e),r.postExecute&&r.postExecute(i),this._fire(n,"postExecuted",e)),this._popAction()},Em.prototype._pushAction=function(e){const t=this._currentExecution,n=t.actions,i=n[0];if(t.atomic)throw new Error("illegal invocation in or phase (action: "+e.command+")");e.id||(e.id=i&&i.id||this._createId()),n.push(e)},Em.prototype._popAction=function(){const e=this._currentExecution,t=e.trigger,n=e.actions,i=e.dirty;n.pop(),n.length||(this._eventBus.fire("elements.changed",{elements:W("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:t}),e.trigger=null)},Em.prototype._markDirty=function(e){const t=this._currentExecution;e&&(e=A(e)?e:[e],t.dirty=t.dirty.concat(e))},Em.prototype._executedAction=function(e,t){const n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},Em.prototype._revertedAction=function(e){this._stackIdx--},Em.prototype._getHandler=function(e){return this._handlerMap[e]},Em.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t};const Sm={commandStack:["type",Em]};function Cm(e,t){if("function"!=typeof t)throw new Error("removeFn iterator must be a function");if(e){for(var n;n=e[0];)t(n);return e}}function km(e,t,n){ro.call(this,t);var i=e.get("movePreview",!1);t.on("shape.move.start",1400,(function(e){var t=e.context,n=t.shapes,i=t.validatedShapes;t.shapes=Am(n),t.validatedShapes=Am(i)})),i&&t.on("shape.move.start",250,(function(e){var t=e.context,n=t.shapes,r=[];j(n,(function(e){j(e.labels,(function(n){n.hidden||-1!==t.shapes.indexOf(n)||r.push(n),e.labelTarget&&r.push(e)}))})),j(r,(function(e){i.makeDraggable(t,e,!0)}))})),this.preExecuted("elements.move",1400,(function(e){var t=e.context.closure,n=t.enclosedElements,i=[];j(n,(function(e){j(e.labels,(function(e){n[e.id]||i.push(e)}))})),t.addAll(i)})),this.preExecute(["connection.delete","shape.delete"],(function(e){var t=e.context;Cm((t.connection||t.shape).labels,(function(e){n.removeShape(e,{nested:!0})}))})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=n.labelTarget;i&&(t.labelTargetIndex=jp(i.labels,n),t.labelTarget=i,n.labelTarget=null)})),this.revert("shape.delete",(function(e){var t=e.context,n=t.shape,i=t.labelTarget,r=t.labelTargetIndex;i&&(Op(i.labels,n,r),n.labelTarget=i)}))}function Am(e){return O(e,(function(t){return-1===e.indexOf(t.labelTarget)}))}x(km,ro),km.$inject=["injector","eventBus","modeling"];const Pm={__init__:["labelSupport"],labelSupport:["type",km]};var Rm="attach-ok";function Mm(e,t,n,i,r){ro.call(this,t);var o=e.get("movePreview",!1);t.on("shape.move.start",1401,(function(e){var t,n,i=e.context,r=i.shapes,o=i.validatedShapes;i.shapes=(n=Tm(t=r),U("id",t,n)),i.validatedShapes=function(e){var t=G(e,"id");return O(e,(function(e){for(;e;){if(e.host&&t[e.host.id])return!1;e=e.parent}return!0}))}(o)})),o&&t.on("shape.move.start",251,(function(e){var t=e.context;j(Tm(t.shapes),(function(e){o.makeDraggable(t,e,!0),j(e.labels,(function(e){o.makeDraggable(t,e,!0)}))}))})),o&&t.on("shape.move.start",(function(e){var i=e.context.shapes;if(1===i.length){var r=i[0].host;r&&(n.addMarker(r,Rm),t.once(["shape.move.out","shape.move.cleanup"],(function(){n.removeMarker(r,Rm)})))}})),this.preExecuted("elements.move",1401,(function(e){var t=e.context,n=t.closure;j(Tm(t.shapes),(function(e){n.add(e,n.topLevel[e.host.id])}))})),this.postExecuted("elements.move",(function(e){var t=e.context,n=t.shapes,i=t.newHost;i&&1!==n.length||j(i?n:O(n,(function(e){var t,i=e.host;return function(e){return!!e.host}(e)&&(t=i,!(-1!==n.indexOf(t)))})),(function(e){r.updateAttachment(e,i)}))})),this.postExecuted("elements.move",(function(e){j(e.context.shapes,(function(e){j(e.attachers,(function(e){j(e.outgoing.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)})),j(e.incoming.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)}))}))}))})),this.postExecute("shape.create",(function(e){var t=e.context,n=t.shape,i=t.host;i&&r.updateAttachment(n,i)})),this.postExecute("shape.replace",(function(e){var t=e.context,n=t.oldShape,o=t.newShape;Cm(n.attachers,(function(e){"attach"===i.allowed("elements.move",{target:o,shapes:[e]})?r.updateAttachment(e,o):r.removeShape(e)})),o.attachers.length&&j(o.attachers,(function(e){var t=Du(e,n,o);r.moveShape(e,t,e.parent)}))})),this.postExecute("shape.resize",(function(e){var t=e.context,n=t.shape,i=t.oldBounds,o=t.newBounds,a=n.attachers;!1!==(t.hints||{}).attachSupport&&j(a,(function(e){var t=Du(e,i,o);r.moveShape(e,t,e.parent),j(e.labels,(function(e){r.moveShape(e,t,e.parent)}))}))})),this.preExecute("shape.delete",(function(e){var t=e.context.shape;Cm(t.attachers,(function(e){r.removeShape(e)})),t.host&&r.updateAttachment(t,null)}))}function Tm(e){return _(F(e,(function(e){return e.attachers||[]})))}x(Mm,ro),Mm.$inject=["injector","eventBus","canvas","rules","modeling"];const Dm={__depends__:[tl],__init__:["attachSupport"],attachSupport:["type",Mm]};function Bm(e){this._model=e}function Nm(e,t,n){ro.call(this,e),this._bpmnFactory=t;var i=this;function r(e){j(e.context.oldRoot.children,(function(e){kn(e,"bpmn:BaseElement")&&i.updateParent(e)}))}function o(e){var t=e.context.shape;kn(t,"bpmn:BaseElement")&&i.updateBounds(t)}function a(e){i.updateConnection(e.context)}function s(e){i.updateConnectionWaypoints(e.context.connection)}function c(e){i.updateAttachment(e.context)}function l(e){const{element:n}=e.context,i=si(n),r=Rn(n),o=r&&r.get("label");ni(n)||go(n)||(i&&!o?r.set("label",t.create("bpmndi:BPMNLabel")):!i&&o&&r.set("label",void 0))}this.executed(["connection.layout","connection.create"],(function(e){var t,i=e.context,r=i.hints||{};i.cropped||!1===r.createElementsBehavior||((t=i.connection).waypoints=n.getCroppedWaypoints(t),i.cropped=!0)})),this.reverted(["connection.layout"],(function(e){delete e.context.cropped})),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Om((function(e){var t=e.context;i.updateParent(t.shape||t.connection,t.oldParent)}))),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Om((function(e){var t=e.context,n=t.shape||t.connection,r=t.parent||t.newParent;i.updateParent(n,r)}))),this.executed(["canvas.updateRoot"],r),this.reverted(["canvas.updateRoot"],r),this.executed(["shape.move","shape.create","shape.resize"],Om((function(e){"label"!==e.context.shape.type&&o(e)}))),this.reverted(["shape.move","shape.create","shape.resize"],Om((function(e){"label"!==e.context.shape.type&&o(e)}))),e.on("shape.changed",(function(e){"label"===e.element.type&&o({context:{shape:e.element}})})),this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],Om(a)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],Om(a)),this.executed(["connection.layout","connection.move","connection.updateWaypoints"],Om(s)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],Om(s)),this.executed("connection.reconnect",Om((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=Pn(n),a=Pn(i),s=Pn(r);o.conditionExpression&&!An(s,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(t.oldConditionExpression=o.conditionExpression,delete o.conditionExpression),i!==r&&a.default===o&&(t.oldDefault=a.default,delete a.default)}))),this.reverted("connection.reconnect",Om((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=Pn(n),a=Pn(i),s=Pn(r);t.oldConditionExpression&&(o.conditionExpression=t.oldConditionExpression),t.oldDefault&&(a.default=t.oldDefault,delete s.default)}))),this.executed(["element.updateAttachment"],Om(c)),this.reverted(["element.updateAttachment"],Om(c)),this.executed("element.updateLabel",Om(l)),this.reverted("element.updateLabel",Om(l))}function Om(e){return function(t){var n=t.context;kn(n.shape||n.connection||n.element,"bpmn:BaseElement")&&e(t)}}function jm(e,t,n){var i=function(e,t,n,i){var r=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,r,i)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e,n){var o=this.indexOf(e);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,e),-1===o&&t.set(e,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function Lm(e,t){if(!(this instanceof Lm))return new Lm(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Bm.$inject=["moddle"],Bm.prototype._needsId=function(e){return An(e,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"])},Bm.prototype._ensureId=function(e){var t;e.id?this._model.ids.claim(e.id,e):(t=kn(e,"bpmn:Activity")?"Activity":kn(e,"bpmn:Event")?"Event":kn(e,"bpmn:Gateway")?"Gateway":An(e,["bpmn:SequenceFlow","bpmn:MessageFlow"])?"Flow":(e.$type||"").replace(/^[^:]*:/g,""),t+="_",!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e)))},Bm.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},Bm.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},Bm.prototype.createDiShape=function(e,t){return this.create("bpmndi:BPMNShape",ee({bpmnElement:e,bounds:this.createDiBounds()},t))},Bm.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},Bm.prototype.createDiWaypoints=function(e){var t=this;return F(e,(function(e){return t.createDiWaypoint(e)}))},Bm.prototype.createDiWaypoint=function(e){return this.create("dc:Point",te(e,["x","y"]))},Bm.prototype.createDiEdge=function(e,t){return this.create("bpmndi:BPMNEdge",ee({bpmnElement:e,waypoint:this.createDiWaypoints([])},t))},Bm.prototype.createDiPlane=function(e,t){return this.create("bpmndi:BPMNPlane",ee({bpmnElement:e},t))},x(Nm,ro),Nm.$inject=["eventBus","bpmnFactory","connectionDocking"],Nm.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,i=t.host;n.attachedToRef=i&&i.businessObject},Nm.prototype.updateParent=function(e,t){if(!(Jn(e)||kn(e,"bpmn:DataStoreReference")&&e.parent&&kn(e.parent,"bpmn:Collaboration"))){var n=e.parent,i=e.businessObject,r=Rn(e),o=n&&n.businessObject,a=Rn(n);kn(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,o,t&&t.businessObject),kn(e,"bpmn:DataOutputAssociation")&&(o=e.source?e.source.businessObject:null),kn(e,"bpmn:DataInputAssociation")&&(o=e.target?e.target.businessObject:null),this.updateSemanticParent(i,o),kn(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,o),this.updateDiParent(r,a)}},Nm.prototype.updateBounds=function(e){var t=Rn(e),n=function(e){if(!kn(e,"bpmn:Activity"))return;var t=Rn(e);if(!t)return;var n=t.get("label");if(!n)return;return n.get("bounds")}(e);if(n){var i=Ca(n,t.get("bounds"));ee(n,{x:e.x+i.x,y:e.y+i.y})}var r=Jn(e)?this._getLabel(t):t,o=r.bounds;o||(o=this._bpmnFactory.createDiBounds(),r.set("bounds",o)),ee(o,{x:e.x,y:e.y,width:e.width,height:e.height})},Nm.prototype.updateFlowNodeRefs=function(e,t,n){n!==t&&(kn(n,"bpmn:Lane")&&Np(n.get("flowNodeRef"),e),kn(t,"bpmn:Lane")&&Op(t.get("flowNodeRef"),e))},Nm.prototype.updateDiConnection=function(e,t,n){var i=Rn(e),r=Rn(t),o=Rn(n);i.sourceElement&&i.sourceElement.bpmnElement!==Pn(t)&&(i.sourceElement=t&&r),i.targetElement&&i.targetElement.bpmnElement!==Pn(n)&&(i.targetElement=n&&o)},Nm.prototype.updateDiParent=function(e,t){if(t&&!kn(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(Np(n,e),e.$parent=null)}},Nm.prototype.getLaneSet=function(e){var t,n;return kn(e,"bpmn:Lane")?((t=e.childLaneSet)||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(kn(e,"bpmn:Participant")&&(e=e.processRef),(t=(n=e.get("laneSets"))[0])||((t=this._bpmnFactory.create("bpmn:LaneSet")).$parent=e,n.push(t)),t)},Nm.prototype.updateSemanticParent=function(e,t,n){var i;if(e.$parent!==t&&(!kn(e,"bpmn:DataInput")&&!kn(e,"bpmn:DataOutput")||(kn(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),!("ioSpecification"in t)||t.ioSpecification!==e.$parent))){if(kn(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),i="lanes";else if(kn(e,"bpmn:FlowElement")){if(t)if(kn(t,"bpmn:Participant"))t=t.processRef;else if(kn(t,"bpmn:Lane"))do{t=t.$parent.$parent}while(kn(t,"bpmn:Lane"));i="flowElements"}else if(kn(e,"bpmn:Artifact")){for(;t&&!kn(t,"bpmn:Process")&&!kn(t,"bpmn:SubProcess")&&!kn(t,"bpmn:Collaboration");){if(kn(t,"bpmn:Participant")){t=t.processRef;break}t=t.$parent}i="artifacts"}else if(kn(e,"bpmn:MessageFlow"))i="messageFlows";else if(kn(e,"bpmn:Participant")){i="participants";var r,o=e.processRef;o&&(r=function(e){for(;e&&!kn(e,"bpmn:Definitions");)e=e.$parent;return e}(e.$parent||t),e.$parent&&(Np(r.get("rootElements"),o),o.$parent=null),t&&(Op(r.get("rootElements"),o),o.$parent=r))}else kn(e,"bpmn:DataOutputAssociation")?i="dataOutputAssociations":kn(e,"bpmn:DataInputAssociation")&&(i="dataInputAssociations");if(!i)throw new Error(`no parent for <${e.id}> in <${t.id}>`);var a;if(e.$parent&&Np(a=e.$parent.get(i),e),t?((a=t.get(i)).push(e),e.$parent=t):e.$parent=null,n){var s=n.get(i);Np(a,e),t&&(s||(s=[],t.set(i,s)),s.push(e))}}},Nm.prototype.updateConnectionWaypoints=function(e){Rn(e).set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},Nm.prototype.updateConnection=function(e){var t,n=e.connection,i=Pn(n),r=n.source,o=Pn(r),a=n.target,s=Pn(n.target);if(kn(i,"bpmn:DataAssociation"))kn(i,"bpmn:DataInputAssociation")?(i.get("sourceRef")[0]=o,t=e.parent||e.newParent||s,this.updateSemanticParent(i,s,t)):kn(i,"bpmn:DataOutputAssociation")&&(t=e.parent||e.newParent||o,this.updateSemanticParent(i,o,t),i.targetRef=s);else{var c=kn(i,"bpmn:SequenceFlow");i.sourceRef!==o&&(c&&(Np(i.sourceRef&&i.sourceRef.get("outgoing"),i),o&&o.get("outgoing")&&o.get("outgoing").push(i)),i.sourceRef=o),i.targetRef!==s&&(c&&(Np(i.targetRef&&i.targetRef.get("incoming"),i),s&&s.get("incoming")&&s.get("incoming").push(i)),i.targetRef=s)}this.updateConnectionWaypoints(n),this.updateDiConnection(n,r,a)},Nm.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label},Lm.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?jm(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},Lm.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||jm(this,t,e),n},Lm.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},Lm.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Lm.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Im=new Lm({name:"children",enumerable:!0,collection:!0},{name:"parent"}),$m=new Lm({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),zm=new Lm({name:"attachers",collection:!0},{name:"host"}),Fm=new Lm({name:"outgoing",collection:!0},{name:"source"}),Hm=new Lm({name:"incoming",collection:!0},{name:"target"});function Vm(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),Im.bind(this,"parent"),$m.bind(this,"labels"),Fm.bind(this,"outgoing"),Hm.bind(this,"incoming")}function Gm(){Vm.call(this),Im.bind(this,"children"),zm.bind(this,"host"),zm.bind(this,"attachers")}function Wm(){Vm.call(this),Im.bind(this,"children")}function Um(){Gm.call(this),$m.bind(this,"labelTarget")}function qm(){Vm.call(this),Fm.bind(this,"source"),Hm.bind(this,"target")}x(Gm,Vm),x(Wm,Gm),x(Um,Gm),x(qm,Vm);var Km={connection:qm,shape:Gm,label:Um,root:Wm};function Xm(){this._uid=12}function Ym(e,t){Xm.call(this),this._bpmnFactory=e,this._moddle=t}function Zm(e,t,n){return void 0===t[n]?t:(e[n]=t[n],ne(t,[n]))}function Qm(e,t){this._modeling=e,this._canvas=t}function Jm(e){this._modeling=e}function ef(e,t){this._canvas=e,this._layouter=t}Xm.prototype.createRoot=function(e){return this.create("root",e)},Xm.prototype.createLabel=function(e){return this.create("label",e)},Xm.prototype.createShape=function(e){return this.create("shape",e)},Xm.prototype.createConnection=function(e){return this.create("connection",e)},Xm.prototype.create=function(e,t){return(t=ee({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Km[e];if(!n)throw new Error("unknown type: <"+e+">");return ee(new n,t)}(e,t)},x(Ym,Xm),Ym.$inject=["bpmnFactory","moddle"],Ym.prototype._baseCreate=Xm.prototype.create,Ym.prototype.create=function(e,t){if("label"===e){var n=t.di||this._bpmnFactory.createDiLabel();return this._baseCreate(e,ee({type:"label",di:n},ei,t))}return this.createElement(e,t)},Ym.prototype.createElement=function(e,t){var n,i,r,o=(t=ee({},t||{})).businessObject,a=t.di;if(!o){if(!t.type)throw new Error("no shape type specified");En(o=this._bpmnFactory.create(t.type))}if(!An(a,["bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane"])){var s=ee({},a||{},{id:o.id+"_di"});a="root"===e?this._bpmnFactory.createDiPlane(o,s):"connection"===e?this._bpmnFactory.createDiEdge(o,s):this._bpmnFactory.createDiShape(o,s)}return kn(o,"bpmn:Group")&&(t=ee({isFrame:!0},t)),t=function(e,t,n){return j(n,(function(n){t=Zm(e,t,n)})),t}(o,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&(t=Zm(a,t,"isExpanded")),An(o,["bpmn:Lane","bpmn:Participant"])&&(t=Zm(a,t,"isHorizontal")),kn(o,"bpmn:SubProcess")&&(t.collapsed=!Kn(o,a)),kn(o,"bpmn:ExclusiveGateway")&&(D(a,"isMarkerVisible")?void 0===a.isMarkerVisible&&(a.isMarkerVisible=!1):a.isMarkerVisible=!0),C(t.triggeredByEvent)&&(o.triggeredByEvent=t.triggeredByEvent,delete t.triggeredByEvent),C(t.cancelActivity)&&(o.cancelActivity=t.cancelActivity,delete t.cancelActivity),t.eventDefinitionType&&(i=o.get("eventDefinitions")||[],r=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),"bpmn:ConditionalEventDefinition"===t.eventDefinitionType&&(r.condition=this._bpmnFactory.create("bpmn:FormalExpression")),i.push(r),r.$parent=o,o.eventDefinitions=i,delete t.eventDefinitionType),n=this.getDefaultSize(o,a),t=ee({id:o.id},n,t,{businessObject:o,di:a}),this._baseCreate(e,t)},Ym.prototype.getDefaultSize=function(e,t){var n=Pn(e);return t=t||Rn(e),kn(n,"bpmn:SubProcess")?Kn(n,t)?{width:350,height:200}:{width:100,height:80}:kn(n,"bpmn:Task")?{width:100,height:80}:kn(n,"bpmn:Gateway")?{width:50,height:50}:kn(n,"bpmn:Event")?{width:36,height:36}:kn(n,"bpmn:Participant")?Kn(n,t)?{width:600,height:250}:{width:400,height:60}:kn(n,"bpmn:Lane")?{width:400,height:100}:kn(n,"bpmn:DataObjectReference")?{width:36,height:50}:kn(n,"bpmn:DataStoreReference")?{width:50,height:50}:kn(n,"bpmn:TextAnnotation")?{width:100,height:30}:kn(n,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}},Ym.prototype.createParticipantShape=function(e){return P(e)||(e={isExpanded:e}),!1!==(e=ee({type:"bpmn:Participant"},e||{})).isExpanded&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)},Qm.$inject=["modeling","canvas"],Qm.prototype.preExecute=function(e){var t=this._modeling,n=e.elements,i=e.alignment;j(n,(function(e){var n={x:0,y:0};C(i.left)?n.x=i.left-e.x:C(i.right)?n.x=i.right-e.width-e.x:C(i.center)?n.x=i.center-Math.round(e.width/2)-e.x:C(i.top)?n.y=i.top-e.y:C(i.bottom)?n.y=i.bottom-e.height-e.y:C(i.middle)&&(n.y=i.middle-Math.round(e.height/2)-e.y),t.moveElements([e],n,e.parent)}))},Qm.prototype.postExecute=function(e){},Jm.$inject=["modeling"],Jm.prototype.preExecute=function(e){var t=e.source;if(!t)throw new Error("source required");var n=e.target||t.parent,i=e.shape,r=e.hints||{};i=e.shape=this._modeling.createShape(i,e.position,n,{attach:r.attach}),e.shape=i},Jm.prototype.postExecute=function(e){var t,n,i=e.hints||{};t=e.source,n=e.shape,z(t.outgoing,(function(e){return e.target===n}))||(i.connectionTarget===e.source?this._modeling.connect(e.shape,e.source,e.connection):this._modeling.connect(e.source,e.shape,e.connection))},ef.$inject=["canvas","layouter"],ef.prototype.execute=function(e){var t=e.connection,n=e.source,i=e.target,r=e.parent,o=e.parentIndex,a=e.hints;if(!n||!i)throw new Error("source and target required");if(!r)throw new Error("parent required");return t.source=n,t.target=i,t.waypoints||(t.waypoints=this._layouter.layoutConnection(t,a)),this._canvas.addConnection(t,r,o),t},ef.prototype.revert=function(e){var t=e.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t};var tf=Math.round;function nf(e){this._modeling=e}nf.$inject=["modeling"],nf.prototype.preExecute=function(e){var t=e.elements,n=e.parent,i=e.parentIndex,r=e.position,o=e.hints,a=this._modeling;j(t,(function(e){R(e.x)||(e.x=0),R(e.y)||(e.y=0)}));var s=qr(O(t,(function(e){return!e.hidden})));j(t,(function(e){Qn(e)&&(e.waypoints=F(e.waypoints,(function(e){return{x:tf(e.x-s.x-s.width/2+r.x),y:tf(e.y-s.y-s.height/2+r.y)}}))),ee(e,{x:tf(e.x-s.x-s.width/2+r.x),y:tf(e.y-s.y-s.height/2+r.y)})}));var c=Hr(t),l={};j(t,(function(e){if(Qn(e))l[e.id]=R(i)?a.createConnection(l[e.source.id],l[e.target.id],i,e,e.parent||n,o):a.createConnection(l[e.source.id],l[e.target.id],e,e.parent||n,o);else{var t=ee({},o);-1===c.indexOf(e)&&(t.autoResize=!1),Jn(e)&&(t=ne(t,["attach"])),l[e.id]=R(i)?a.createShape(e,te(e,["x","y","width","height"]),e.parent||n,i,t):a.createShape(e,te(e,["x","y","width","height"]),e.parent||n,t)}})),e.elements=V(l)};var rf=Math.round;function of(e){this._canvas=e}function af(e){of.call(this,e)}of.$inject=["canvas"],of.prototype.execute=function(e){var t=e.shape,n=e.position,i=e.parent,r=e.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?ee(t,n):ee(t,{x:n.x-rf(t.width/2),y:n.y-rf(t.height/2)}),this._canvas.addShape(t,i,r),t},of.prototype.revert=function(e){var t=e.shape;return this._canvas.removeShape(t),t},x(af,of),af.$inject=["canvas"];var sf=of.prototype.execute;af.prototype.execute=function(e){var t=e.shape;return function(e){["width","height"].forEach((function(t){void 0===e[t]&&(e[t]=0)}))}(t),t.labelTarget=e.labelTarget,sf.call(this,e)};var cf=of.prototype.revert;function lf(e,t){this._canvas=e,this._modeling=t}function pf(e,t){this._modeling=e,this._elementRegistry=t}function uf(e,t){this._canvas=e,this._modeling=t}function df(e){this._modeling=e}af.prototype.revert=function(e){return e.shape.labelTarget=null,cf.call(this,e)},lf.$inject=["canvas","modeling"],lf.prototype.preExecute=function(e){var t=this._modeling,n=e.connection;Cm(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),Cm(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})}))},lf.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=jp(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t},lf.prototype.revert=function(e){var t=e.connection,n=e.parent,i=e.parentIndex;return t.source=e.source,t.target=e.target,Op(n.children,t,i),this._canvas.addConnection(t,n),t},pf.$inject=["modeling","elementRegistry"],pf.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry;j(e.elements,(function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))}))},uf.$inject=["canvas","modeling"],uf.prototype.preExecute=function(e){var t=this._modeling,n=e.shape;Cm(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),Cm(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})})),Cm(n.children,(function(e){Qn(e)?t.removeConnection(e,{nested:!0}):t.removeShape(e,{nested:!0})}))},uf.prototype.execute=function(e){var t=this._canvas,n=e.shape,i=n.parent;return e.oldParent=i,e.oldParentIndex=jp(i.children,n),t.removeShape(n),n},uf.prototype.revert=function(e){var t=this._canvas,n=e.shape,i=e.oldParent,r=e.oldParentIndex;return Op(i.children,n,r),t.addShape(n,i),n},df.$inject=["modeling"];var hf={x:"y",y:"x"};function mf(e,t){this._layouter=e,this._canvas=t}function ff(){}function gf(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}function yf(e){this._modeling=e}function vf(e){this._helper=new yf(e)}function bf(e){this._modeling=e,this._helper=new yf(e)}function xf(e){this._modeling=e}function _f(e){return e.original||e}function wf(e,t){this._modeling=e,this._rules=t}function Ef(e){this._modeling=e}function Sf(e){this._modeling=e}function Cf(e){return ee({},e)}function kf(e){switch(e){case"n":case"s":return"y";case"w":case"e":return"x"}}function Af(e,t,n){var i=kf(n);return/e|s/.test(n)?e[i]>t:/n|w/.test(n)?e[i] required");var r=e.changed||this._getVisualReferences(n).concat(t),o=e.oldProperties||function(e,t){return I(t,(function(t,n){return t[n]=e.get(n),t}),{})}(n,H(i));return $f(n,i),e.oldProperties=o,e.changed=r,r},If.prototype.revert=function(e){var t=e.oldProperties,n=e.moddleElement,i=e.changed;return $f(n,t),i},If.prototype._getVisualReferences=function(e){var t=this._elementRegistry;return kn(e,"bpmn:DataObject")?function(e,t){return t.filter((function(t){return kn(t,"bpmn:DataObjectReference")&&Pn(t).dataObjectRef===e}))}(e,t):[]};var zf="default",Ff="id",Hf="di",Vf={width:0,height:0};function Gf(e,t,n,i){this._elementRegistry=e,this._moddle=t,this._modeling=n,this._textRenderer=i}function Wf(e,t){return Ff in e&&e[Ff]!==t[Ff]}function Uf(e,t){var n=e.businessObject,i=Rn(e);j(t,(function(e,t){t!==Hf?n.set(t,e):i&&function(e,t){j(t,(function(t,n){e.set(n,t)}))}(i,e)}))}Gf.$inject=["elementRegistry","moddle","modeling","textRenderer"],Gf.prototype.execute=function(e){var t=e.element,n=[t];if(!t)throw new Error("element required");var i=this._elementRegistry,r=this._moddle.ids,o=t.businessObject,a=function(e){var t=ee({},e);return qf.forEach((function(n){n in e&&(t[n]=Pn(t[n]))})),t}(e.properties),s=e.oldProperties||function(e,t){var n=H(t),i=e.businessObject,r=Rn(e);return I(n,(function(e,n){return e[n]=n!==Hf?i.get(n):function(e,t){return I(t,(function(t,n){return t[n]=e&&e.get(n),t}),{})}(r,H(t.di)),e}),{})}(t,a);return Wf(a,o)&&(r.unclaim(o[Ff]),i.updateId(t,a[Ff]),r.claim(a[Ff],o)),zf in a&&(a[zf]&&n.push(i.get(a[zf].id)),o[zf]&&n.push(i.get(o[zf].id))),Uf(t,a),e.oldProperties=s,e.changed=n,n},Gf.prototype.postExecute=function(e){var t=e.element.label,n=t&&Pn(t).name;if(n){var i=this._textRenderer.getExternalLabelBounds(t,n);this._modeling.resizeShape(t,i,Vf)}},Gf.prototype.revert=function(e){var t=e.element,n=e.properties,i=e.oldProperties,r=t.businessObject,o=this._elementRegistry,a=this._moddle.ids;return Uf(t,i),Wf(n,r)&&(a.unclaim(n[Ff]),o.updateId(t,i[Ff]),a.claim(i[Ff],r)),e.changed};var qf=["default"];function Kf(e,t){this._canvas=e,this._modeling=t}function Xf(e,t){this._modeling=e,this._spaceTool=t}function Yf(e){this._modeling=e}function Zf(e,t){this._modeling=e,this._spaceTool=t}Kf.$inject=["canvas","modeling"],Kf.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=t.getRootElement(),o=r.businessObject,a=o.$parent,s=Rn(r);return t.setRootElement(n),t.removeRootElement(r),Op(a.rootElements,i),i.$parent=a,Np(a.rootElements,o),o.$parent=null,r.di=null,s.bpmnElement=i,n.di=s,e.oldRoot=r,[]},Kf.prototype.revert=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=e.oldRoot,o=r.businessObject,a=i.$parent,s=Rn(n);return t.setRootElement(r),t.removeRootElement(n),Np(a.rootElements,i),i.$parent=null,Op(a.rootElements,o),o.$parent=a,n.di=null,s.bpmnElement=o,r.di=s,[]},Xf.$inject=["modeling","spaceTool"],Xf.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,i=e.shape,r=e.location,o=tu(i),a=o===i,s=a?i:i.parent,c=eu(s),l=Xn(i);if(l?"left"===r?r="top":"right"===r&&(r="bottom"):"top"===r?r="left":"bottom"===r&&(r="right"),!c.length){var p=l?{x:i.x+Qp,y:i.y,width:i.width-Qp,height:i.height}:{x:i.x,y:i.y+Qp,width:i.width,height:i.height-Qp};n.createShape({type:"bpmn:Lane",isHorizontal:l},p,s)}var u,d,h,m,f,g=[];Wr(o,(function(e){return g.push(e),e.label&&g.push(e.label),e===i?[]:O(e.children,(function(e){return e!==i}))})),"top"===r?(u=-120,h=(d=i.y)+10,m="n",f="y"):"left"===r?(u=-120,h=(d=i.x)+10,m="w",f="x"):"bottom"===r?(u=120,h=(d=i.y+i.height)-10,m="s",f="y"):"right"===r&&(u=120,h=(d=i.x+i.width)-10,m="e",f="x");var y=t.calculateAdjustments(g,f,u,h),v=l?{x:0,y:u}:{x:u,y:0};t.makeSpace(y.movingShapes,y.resizingShapes,v,m,h);var b=l?{x:i.x+(a?Qp:0),y:d-("top"===r?120:0),width:i.width-(a?Qp:0),height:120}:{x:d-("left"===r?120:0),y:i.y+(a?Qp:0),width:120,height:i.height-(a?Qp:0)};e.newLane=n.createShape({type:"bpmn:Lane",isHorizontal:l},b,s)},Yf.$inject=["modeling"],Yf.prototype.preExecute=function(e){var t=this._modeling,n=e.shape,i=e.count,r=eu(n),o=r.length;if(o>i)throw new Error(`more than <${i}> child lanes`);var a,s,c,l,p=Xn(n),u=p?n.height:n.width,d=Math.round(u/i);for(l=0;l0||l.bottom<0?-n:n,a=s.calculateAdjustments(u,"y",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:0,y:n},r)),(l.left||l.right)&&(n=l.right||l.left,i=e.x+(l.right?e.width:0)+(l.right?-10:100),r=l.right?"e":"w",o=l.left>0||l.right<0?-n:n,a=s.calculateAdjustments(d,"x",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:n,y:0},r))};var Qf="flowNodeRef",Jf="lanes";function eg(e){this._elementRegistry=e}function tg(e){this._moddle=e}eg.$inject=["elementRegistry"],eg.prototype._computeUpdates=function(e,t){var n=[],i=[],r={},o=[];function a(e){-1===n.indexOf(e)&&(o.push(e),n.push(e))}function s(e){if(!e.parent)return[];var t=function(e){var t=tu(e);return r[t.id]||(r[t.id]=Jp(t)),r[t.id]}(e);return t.filter((function(t){return n=e,i=Tr(t),r=n.x+n.width/2,o=n.y+n.height/2,r>i.left&&ri.top&&o: must be specified as : with start/end in { h,v,t,r,b,l }");if(_g(n)){var i=function(e,t,n){return mg(e,t,n)}(e,t,n),r=function(e,t,n){var i=mg(t,e,fg(n));return{waypoints:i.waypoints.slice().reverse(),directions:fg(i.directions),turnNextDirections:i.turnNextDirections}}(e,t,n),o=function(e,t){var n=e.directions.split(":")[1],i=t.directions.split(":")[0];e.turnNextDirections&&(n="h"==n?"v":"h"),t.turnNextDirections&&(i="h"==i?"v":"h");var r=n+":"+i;return{waypoints:gg(e.waypoints[e.waypoints.length-1],t.waypoints[0],r),directions:r}}(i,r);return[].concat(i.waypoints,o.waypoints,r.waypoints)}return function(e,t,n){var i=ug((t.x-e.x)/2+e.x),r=ug((t.y-e.y)/2+e.y);if("h:v"===n)return[{x:t.x,y:e.y}];if("v:h"===n)return[{x:e.x,y:t.y}];if("h:h"===n)return[{x:i,y:e.y},{x:i,y:t.y}];if("v:v"===n)return[{x:e.x,y:r},{x:t.x,y:r}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]")}(e,t,n)}function yg(e,t,n,i,r){var o=L(r&&r.preferredLayouts||[],"straight")[0]||"h:h",a=Or(e,t,hg[o]||0),s=function(e,t){if(_g(t))return t;switch(e){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t}}(a,o);n=n||Nr(e),i=i||Nr(t);var c=s.split(":"),l=wg(n,e,c[0],function(e){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[e]}(a));return function(e,t,n){var i=gg(e,t,n);return i.unshift(e),i.push(t),Eg(i)}(l,wg(i,t,c[1],a),s)}function vg(e,t,n,i,r,o){var a;return A(n)&&(r=n,o=i,n=Nr(e),i=Nr(t)),r=r||[],a=-1!==(o=ee({preferredLayouts:[]},o)).preferredLayouts.indexOf("straight")&&function(e,t,n,i,r){var o,a,s={};if(a=Or(e,t),!/^(top|bottom|left|right)$/.test(a))return null;/top|bottom/.test(a)&&(o="x");/left|right/.test(a)&&(o="y");return"target"===r.preserveDocking?bg(o,i,e)?(s[o]=i[o],[{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y,original:{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y}},{x:i.x,y:i.y}]):null:bg(o,n,t)?(s[o]=n[o],[{x:n.x,y:n.y},{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y,original:{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y}}]):null}(e,t,n,i,o),a||(a=o.connectionEnd&&function(e,t,n,i){var r=i.slice().reverse();return r=xg(e,t,n,r),r?r.reverse():null}(t,e,i,r),a||((a=o.connectionStart&&xg(e,t,n,r))||(!o.connectionStart&&!o.connectionEnd&&r&&r.length?r:yg(e,t,n,i,o))))}function bg(e,t,n){return function(e,t,n){return e>=t&&e<=n}(t[e],n[e],n[e]+n[{x:"width",y:"height"}[e]])}function xg(e,t,n,i){if((r=i).length<3||!(r.length>4)&&B(r,(function(e,t){var n=r[t-1];return n&&Gi(e,n)<3})))return null;var r,o,a=i[0],s=i.slice();return s[0]=n,s[1]=function(e,t,n){switch(qi(t,e)){case"v":return{x:n.x,y:e.y};case"h":return{x:e.x,y:n.y}}return{x:e.x,y:e.y}}(s[1],a,n),o=function(e,t,n){var i;for(i=e.length-2;0!==i;i--)if(Xi(e[i],t,dg)||Xi(e[i],n,dg))return e.slice(i);return e}(s,e,t),o!==s&&(s=xg(e,t,n,o)),s&&qi(s)?null:s}function _g(e){return e&&/t|r|b|l/.test(e)}function wg(e,t,n,i){if("h"===n&&(n=/left/.test(i)?"l":"r"),"v"===n&&(n=/top/.test(i)?"t":"b"),"t"===n)return{original:e,x:e.x,y:t.y};if("r"===n)return{original:e,x:t.x+t.width,y:e.y};if("b"===n)return{original:e,x:e.x,y:t.y+t.height};if("l"===n)return{original:e,x:t.x,y:e.y};throw new Error("unexpected dockingDirection: <"+n+">")}function Eg(e){return e.reduce((function(t,n,i){return Wi(t[t.length-1],e[i+1],n,0)||t.push(n),t}),[])}var Sg=-10,Cg=40,kg={default:["h:h"],fromGateway:["v:h"],toGateway:["h:v"],loop:{fromTop:["t:r"],fromRight:["r:b"],fromLeft:["l:t"],fromBottom:["b:l"]},boundaryLoop:{alternateHorizontalSide:"b",alternateVerticalSide:"l",default:"v"},messageFlow:["straight","v:v"],subProcess:["straight","h:h"],isHorizontal:!0},Ag={default:["v:v"],fromGateway:["h:v"],toGateway:["v:h"],loop:{fromTop:["t:l"],fromRight:["r:t"],fromLeft:["l:b"],fromBottom:["b:r"]},boundaryLoop:{alternateHorizontalSide:"t",alternateVerticalSide:"r",default:"h"},messageFlow:["straight","h:h"],subProcess:["straight","v:v"],isHorizontal:!1},Pg={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},Rg={top:"t",right:"r",bottom:"b",left:"l"};function Mg(){}function Tg(e,t){return kn(t,"bpmn:Participant")?"source":kn(e,"bpmn:Participant")?"target":Og(t)?"source":Og(e)||kn(t,"bpmn:Event")?"target":kn(e,"bpmn:Event")?"source":null}function Dg(e){return Og(e)?"target":"source"}function Bg(e,t){return e?e.original||e:Nr(t)}function Ng(e,t){return kn(t,"bpmn:Activity")&&kn(e,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation}function Og(e){return kn(e,"bpmn:SubProcess")&&Kn(e)}function jg(e,t){return e===t}function Lg(e){var t=/right|left/.exec(e);return t&&t[0]}function Ig(e){var t=/top|bottom/.exec(e);return t&&t[0]}function $g(e,t){return Pg[e]===t}function zg(e){return"right"===e||"left"===e}function Fg(e,t,n){var i=t.waypoints,r=i&&i.length&&Or(i[0],e);return"top"===r?n.loop.fromTop:"right"===r?n.loop.fromRight:"left"===r?n.loop.fromLeft:n.loop.fromBottom}function Hg(e,t,n,i){var r,o,a,s,c=Nr(e),l=Nr(t),p=(s=(a=e).host,Or(Nr(a),s,Sg)),u=jg(e.host,t),d=-1!==["top","right","bottom","left"].indexOf(p),h=Or(l,c,{x:e.width/2+t.width/2,y:e.height/2+t.height/2});return u?function(e,t,n,i,r,o){var a,s=t?e:o.isHorizontal?Ig(e):Lg(e),c=Rg[s];a=t?zg(e)?Vg("y",n,i,r)?"h":o.boundaryLoop.alternateHorizontalSide:Vg("x",n,i,r)?"v":o.boundaryLoop.alternateVerticalSide:o.boundaryLoop.default;return[c+":"+a]}(p,d,e,t,n,i):(r=function(e,t,n,i){if(n)return Rg[e];var r=Ig(e),o=Lg(e),a=Ig(t),s=Lg(t);if(i){if(jg(r,a)||$g(o,s))return Rg[r]}else if(jg(o,s)||$g(r,a))return Rg[o];return Rg[i?o:r]}(p,h,d,i.isHorizontal),o=function(e,t,n,i){if(n)return zg(e)?(r=t,o=Lg(e),a=Pg[o],-1!==r.indexOf(a)||jg(e,t)?"h":"v"):function(e,t){var n=Ig(e),i=Pg[n];return-1!==t.indexOf(i)}(e,t)||jg(e,t)?"v":"h";var r,o,a;return i?jg(Ig(e),Ig(t))?"h":"v":jg(Lg(e),Lg(t))?"v":"h"}(p,h,d,i.isHorizontal),[r+":"+o])}function Vg(e,t,n,i){var r=Cg;return!(Gg(e,i,n,r)||Gg(e,i,{x:n.x+n.width,y:n.y+n.height},r)||Gg(e,i,Nr(t),r))}function Gg(e,t,n,i){return Math.abs(t[e]-n[e])!k(e)))})},Xg.prototype.cleanUp=function(){this._complexPreview.cleanUp()},Xg.$inject=["complexPreview","connectionDocking","elementFactory","eventBus","layouter","rules"];const Yg={__depends__:[Ic,hp,qg],__init__:["appendPreview"],appendPreview:["type",Xg]};var Zg=Math.min,Qg=Math.max;function Jg(e){e.preventDefault()}function ey(e){e.stopPropagation()}function ty(e){this.container=e.container,this.parent=Re('
      '),this.content=Te("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=J(this.autoResize,this),this.handlePaste=J(this.handlePaste,this)}function ny(e,t){this._eventBus=e,this._providers=[],this._textbox=new ty({container:t.getContainer(),keyHandler:J(this._handleKey,this),resizeHandler:J(this._handleResize,this)})}ty.prototype.create=function(e,t,n,i){var r=this.parent,o=this.content,a=this.container;i=this.options=i||{};var s=te(t=this.style=t||{},["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);ee(r.style,{width:e.width+"px",height:e.height+"px",maxWidth:e.maxWidth+"px",maxHeight:e.maxHeight+"px",minWidth:e.minWidth+"px",minHeight:e.minHeight+"px",left:e.x+"px",top:e.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},s);var c=te(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return ee(o.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},c),i.centerVertically&&ee(o.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},c),o.innerText=n,we.bind(o,"keydown",this.keyHandler),we.bind(o,"mousedown",ey),we.bind(o,"paste",this.handlePaste),i.autoResize&&we.bind(o,"input",this.autoResize),i.resizable&&this.resizable(t),a.appendChild(r),this.setSelection(o.lastChild,o.lastChild&&o.lastChild.length),r},ty.prototype.handlePaste=function(e){var t,n=this.options,i=this.style;if(e.preventDefault(),t=e.clipboardData?e.clipboardData.getData("text/plain"):window.clipboardData.getData("Text"),this.insertText(t),n.autoResize){var r=this.autoResize(i);r&&this.resizeHandler(r)}},ty.prototype.insertText=function(e){e=e.replace(/\r\n|\r|\n/g,"\n"),document.execCommand("insertText",!1,e)||this._insertTextIE(e)},ty.prototype._insertTextIE=function(e){var t,n,i,r=this.getSelection(),o=r.startContainer,a=r.endContainer,s=r.startOffset,c=r.endOffset,l=r.commonAncestorContainer,p=(t=l.childNodes,[].slice.call(t));if(l.nodeType===Node.TEXT_NODE){var u=o.textContent;o.textContent=u.substring(0,s)+e+u.substring(c),n=o,i=s+e.length}else if(o===this.content&&a===this.content){var d=document.createTextNode(e);this.content.insertBefore(d,p[s]),n=d,i=d.textContent.length}else{var h=p.indexOf(o),m=p.indexOf(a);p.forEach((function(t,n){n===h?t.textContent=o.textContent.substring(0,s)+e+a.textContent.substring(c):n>h&&n<=m&&Be(t)})),n=o,i=s+e.length}n&&void 0!==i&&setTimeout((function(){self.setSelection(n,i)}))},ty.prototype.autoResize=function(){var e=this.parent,t=this.content,n=parseInt(this.style.fontSize)||12;if(t.scrollHeight>e.offsetHeight||t.scrollHeight
      ');var u=function(n){Jg(n),ey(n);var u=Zg(Qg(l+n.clientX-s,i),o),d=Zg(Qg(p+n.clientY-c,r),a);t.style.width=u+"px",t.style.height=d+"px",e.resizeHandler({width:l,height:p,dx:n.clientX-s,dy:n.clientY-c})},d=function(e){Jg(e),ey(e),we.unbind(document,"mousemove",u,!1),we.unbind(document,"mouseup",d,!1)};we.bind(n,"mousedown",(function(e){Jg(e),ey(e),s=e.clientX,c=e.clientY;var n=t.getBoundingClientRect();l=n.width,p=n.height,we.bind(document,"mousemove",u),we.bind(document,"mouseup",d)}))}ee(n.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(n)},ty.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),we.unbind(t,"keydown",this.keyHandler),we.unbind(t,"mousedown",ey),we.unbind(t,"input",this.autoResize),we.unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),Be(n)),Be(e)},ty.prototype.getValue=function(){return this.content.innerText.trim()},ty.prototype.getSelection=function(){return window.getSelection().getRangeAt(0)},ty.prototype.setSelection=function(e,t){var n=document.createRange();null===e?n.selectNodeContents(this.content):(n.setStart(e,t),n.setEnd(e,t));var i=window.getSelection();i.removeAllRanges(),i.addRange(n)},ny.$inject=["eventBus","canvas"],ny.prototype.registerProvider=function(e){this._providers.push(e)},ny.prototype.isActive=function(e){return!(!this._active||e&&this._active.element!==e)},ny.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},ny.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})},ny.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},ny.prototype.complete=function(){var e=this._active;if(e){var t,n=e.context.bounds,i=this.$textbox.getBoundingClientRect(),r=this.getValue();r===e.context.text&&i.height===n.height&&i.width===n.width||(t=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,r,e.context.text,{x:i.left-t.left,y:i.top-t.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}},ny.prototype.getValue=function(){return this._textbox.getValue()},ny.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},ny.prototype._handleResize=function(e){this._fire("resize",e)},ny.prototype.activate=function(e){var t;this.isActive()&&this.cancel();var n=B(this._providers,(function(n){return(t=n.activate(e))?n:null}));return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:e,context:t,provider:n},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t};const iy={__depends__:[Ko],__init__:["directEditing"],directEditing:["type",ny]};function ry(e){return function(t){var n=t.target,i=Pn(e),r=i.eventDefinitions&&i.eventDefinitions[0],o=i.$type===n.type,a=(r&&r.$type)===n.eventDefinitionType,s=!!n.triggeredByEvent==!!i.triggeredByEvent,c=void 0===n.isExpanded||n.isExpanded===Kn(e);return!(o&&a&&s&&c)}}var oy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],ay=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}],sy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message intermediate catch event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message intermediate throw event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer intermediate catch event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation intermediate throw event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional intermediate catch event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link intermediate catch event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link intermediate throw event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation intermediate throw event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal intermediate catch event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal intermediate throw event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],cy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message end event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation end event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error end event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel end event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation end event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal end event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate end event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],ly=[{label:"Exclusive gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event-based gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],py=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],uy=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Sub-process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],dy=uy,hy=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"User task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Service task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Send task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"Manual task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business rule task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Script task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub-process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],my=[{label:"Data store reference",actionName:"replace-with-data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}}],fy=[{label:"Data object reference",actionName:"replace-with-data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}],gy=[{label:"Message boundary event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!0}},{label:"Timer boundary event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!0}},{label:"Escalation boundary event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!0}},{label:"Conditional boundary event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!0}},{label:"Error boundary event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",cancelActivity:!0}},{label:"Cancel boundary event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition",cancelActivity:!0}},{label:"Signal boundary event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!0}},{label:"Compensation boundary event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",cancelActivity:!0}},{label:"Message boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],yy=[{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!0}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!0}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!0}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!0}},{label:"Error start event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",isInterrupting:!0}},{label:"Escalation start event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!0}},{label:"Compensation start event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",isInterrupting:!0}},{label:"Message start event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer start event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional start event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal start event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation start event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],vy=[{label:"Sequence flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],by=[{label:"Expanded pool/participant",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:function(e){var t="Empty pool/participant";return e.children&&e.children.length&&(t+=" (removes content)"),t},actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}];const xy={"start-event-non-interrupting":'\n \n \n \n \n ',"intermediate-event-non-interrupting":'\n \n \n \n \n \n '};function _y(e,t,n,i,r,o,a,s){this._bpmnFactory=e,this._popupMenu=t,this._modeling=n,this._moddle=i,this._bpmnReplace=r,this._rules=o,this._translate=a,this._moddleCopy=s,this._register()}_y.$inject=["bpmnFactory","popupMenu","modeling","moddle","bpmnReplace","rules","translate","moddleCopy"],_y.prototype._register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},_y.prototype.getPopupMenuEntries=function(e){var t=e.businessObject,n=this._rules,i=[];if(A(e)||!n.allowed("shape.replace",{element:e}))return{};var r=ry(e);return kn(t,"bpmn:DataObjectReference")?this._createEntries(e,my):kn(t,"bpmn:DataStoreReference")&&!kn(e.parent,"bpmn:Collaboration")?this._createEntries(e,fy):kn(t,"bpmn:StartEvent")&&!kn(t.$parent,"bpmn:SubProcess")?(i=O(oy,r),this._createEntries(e,i)):kn(t,"bpmn:Participant")?(i=O(by,(function(t){return Kn(e)!==t.target.isExpanded})),this._createEntries(e,i)):kn(t,"bpmn:StartEvent")&&Yn(t.$parent)?(i=O(yy,(function(e){var n=!1!==e.target.isInterrupting,i=t.isInterrupting===n;return r(e)||!r(e)&&!i})),this._createEntries(e,i)):kn(t,"bpmn:StartEvent")&&!Yn(t.$parent)&&kn(t.$parent,"bpmn:SubProcess")?(i=O(ay,r),this._createEntries(e,i)):kn(t,"bpmn:EndEvent")?(i=O(cy,(function(e){return!("bpmn:CancelEventDefinition"==e.target.eventDefinitionType&&!kn(t.$parent,"bpmn:Transaction"))&&r(e)})),this._createEntries(e,i)):kn(t,"bpmn:BoundaryEvent")?(i=O(gy,(function(e){var n=e.target;if("bpmn:CancelEventDefinition"==n.eventDefinitionType&&!kn(t.attachedToRef,"bpmn:Transaction"))return!1;var i=!1!==n.cancelActivity,o=t.cancelActivity==i;return r(e)||!r(e)&&!o})),this._createEntries(e,i)):kn(t,"bpmn:IntermediateCatchEvent")||kn(t,"bpmn:IntermediateThrowEvent")?(i=O(sy,r),this._createEntries(e,i)):kn(t,"bpmn:Gateway")?(i=O(ly,r),this._createEntries(e,i)):kn(t,"bpmn:Transaction")?(i=O(uy,r),this._createEntries(e,i)):Yn(t)&&Kn(e)?(i=O(dy,r),this._createEntries(e,i)):kn(t,"bpmn:SubProcess")&&Kn(e)?(i=O(py,r),this._createEntries(e,i)):kn(t,"bpmn:AdHocSubProcess")&&!Kn(e)?(i=O(hy,(function(e){var t=e.target,n="bpmn:SubProcess"===t.type,i=!0===t.isExpanded;return ry(t)&&(!n||i)})),this._createEntries(e,i)):kn(t,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,vy):kn(t,"bpmn:FlowNode")?(i=O(hy,r),kn(t,"bpmn:SubProcess")&&!Kn(e)&&(i=O(i,(function(e){return"Sub-process (collapsed)"!==e.label}))),this._createEntries(e,i)):{}},_y.prototype.getPopupMenuHeaderEntries=function(e){var t={};return kn(e,"bpmn:Activity")&&!Yn(e)&&(t={...t,...this._getLoopCharacteristicsHeaderEntries(e)}),kn(e,"bpmn:DataObjectReference")&&(t={...t,...this._getCollectionHeaderEntries(e)}),kn(e,"bpmn:Participant")&&(t={...t,...this._getParticipantMultiplicityHeaderEntries(e)}),!kn(e,"bpmn:SubProcess")||kn(e,"bpmn:Transaction")||Yn(e)||(t={...t,...this._getAdHocHeaderEntries(e)}),qu(e)&&(t={...t,...this._getNonInterruptingHeaderEntries(e)}),t},_y.prototype._createEntries=function(e,t){var n={},i=this;return j(t,(function(t){n[t.actionName]=i._createEntry(t,e)})),n},_y.prototype._createSequenceFlowEntries=function(e,t){var n=Pn(e),i={},r=this._modeling,o=this._moddle,a=this;return j(t,(function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef.default!==n&&(kn(n.sourceRef,"bpmn:ExclusiveGateway")||kn(n.sourceRef,"bpmn:InclusiveGateway")||kn(n.sourceRef,"bpmn:ComplexGateway")||kn(n.sourceRef,"bpmn:Activity"))&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e.source,{default:n})}))});break;case"replace-with-conditional-flow":!n.conditionExpression&&kn(n.sourceRef,"bpmn:Activity")&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){var t=o.create("bpmn:FormalExpression",{body:""});r.updateProperties(e,{conditionExpression:t})}))});break;default:kn(n.sourceRef,"bpmn:Activity")&&n.conditionExpression&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e,{conditionExpression:void 0})}))}),(kn(n.sourceRef,"bpmn:ExclusiveGateway")||kn(n.sourceRef,"bpmn:InclusiveGateway")||kn(n.sourceRef,"bpmn:ComplexGateway")||kn(n.sourceRef,"bpmn:Activity"))&&n.sourceRef.default===n&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e.source,{default:void 0})}))})}})),i},_y.prototype._createEntry=function(e,t,n){var i=this._translate,r=this._bpmnReplace.replaceElement,o=e.label;return o&&"function"==typeof o&&(o=o(t)),n=n||function(){return r(t,e.target)},{label:i(o),className:e.className,action:n}},_y.prototype._getLoopCharacteristicsHeaderEntries=function(e){var t=this,n=this._translate;function i(n,i){if(i.active)return void t._modeling.updateProperties(e,{loopCharacteristics:void 0});const r=e.businessObject.get("loopCharacteristics"),o=t._moddle.create(i.options.loopCharacteristics);r&&t._moddleCopy.copyElement(r,o),o.set("isSequential",i.options.isSequential),t._modeling.updateProperties(e,{loopCharacteristics:o})}var r,o,a,s=Pn(e).loopCharacteristics;return s&&(r=s.isSequential,o=void 0===s.isSequential,a=void 0!==s.isSequential&&!s.isSequential),{"toggle-parallel-mi":{className:"bpmn-icon-parallel-mi-marker",title:n("Parallel multi-instance"),active:a,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},"toggle-sequential-mi":{className:"bpmn-icon-sequential-mi-marker",title:n("Sequential multi-instance"),active:r,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},"toggle-loop":{className:"bpmn-icon-loop-marker",title:n("Loop"),active:o,action:i,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}}},_y.prototype._getCollectionHeaderEntries=function(e){var t=this,n=this._translate,i=e.businessObject.dataObjectRef;if(!i)return{};var r=i.isCollection;return{"toggle-is-collection":{className:"bpmn-icon-parallel-mi-marker",title:n("Collection"),active:r,action:function(n,r){t._modeling.updateModdleProperties(e,i,{isCollection:!r.active})}}}},_y.prototype._getParticipantMultiplicityHeaderEntries=function(e){var t=this,n=this._bpmnFactory,i=this._translate;var r=e.businessObject.participantMultiplicity;return{"toggle-participant-multiplicity":{className:"bpmn-icon-parallel-mi-marker",title:i("Participant multiplicity"),active:!!r,action:function(i,r){var o;r.active||(o=n.create("bpmn:ParticipantMultiplicity")),t._modeling.updateProperties(e,{participantMultiplicity:o})}}}},_y.prototype._getAdHocHeaderEntries=function(e){var t=this._translate,n=kn(Pn(e),"bpmn:AdHocSubProcess"),i=this._bpmnReplace.replaceElement;return{"toggle-adhoc":{className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:n,action:function(t,r){return i(e,n?{type:"bpmn:SubProcess"}:{type:"bpmn:AdHocSubProcess"},{autoResize:!1,layoutConnection:!1})}}}},_y.prototype._getNonInterruptingHeaderEntries=function(e){const t=this._translate,n=Pn(e),i=this,r=Ku(e),o=kn(e,"bpmn:BoundaryEvent")?xy["intermediate-event-non-interrupting"]:xy["start-event-non-interrupting"],a=!n[r];return{"toggle-non-interrupting":{imageHtml:o,title:t("Toggle non-interrupting"),active:a,action:function(){i._modeling.updateProperties(e,{[r]:!!a})}}}};const wy={__depends__:[mc,em,Ic],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",_y]};function Ey(e,t,n,i,r,o,a,s,c,l,p,u,d){e=e||{},i.registerProvider(this),this._contextPad=i,this._modeling=r,this._elementFactory=o,this._connect=a,this._create=s,this._popupMenu=c,this._canvas=l,this._rules=p,this._translate=u,this._eventBus=n,this._appendPreview=d,!1!==e.autoPlace&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,(function(e){var t=e.context.shape;if(Vo(e)&&i.isOpen(t)){var n=i.getEntries(t);n.replace&&n.replace.action.click(e,t)}})),n.on("contextPad.close",(function(){d.cleanUp()}))}function Sy(e,t,n){var i=e.$instanceOf(t),r=!1;return j(e.eventDefinitions||[],(function(e){e.$type===n&&(r=!0)})),i&&r}Ey.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate","appendPreview"],Ey.prototype.getMultiElementContextPadEntries=function(e){var t=this._modeling,n={};return this._isDeleteAllowed(e)&&ee(n,{delete:{group:"edit",className:"bpmn-icon-trash",title:this._translate("Delete"),action:{click:function(e,n){t.removeElements(n.slice())}}}}),n},Ey.prototype._isDeleteAllowed=function(e){var t=this._rules.allowed("elements.delete",{elements:e});return A(t)?$(t,(function(e){return n=e,-1!==t.indexOf(n);var n})):t},Ey.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,i=this._elementFactory,r=this._connect,o=this._create,a=this._popupMenu,s=this._rules,c=this._autoPlace,l=this._translate,p=this._appendPreview,u={};if("label"===e.type)return u;var d=e.businessObject;function h(e,t){r.start(e,t)}function m(e,t,n,r){function a(t,n){var a=i.createShape(ee({type:e},r));o.start(t,a,{source:n})}return{group:"model",className:t,title:n,action:{dragstart:a,click:c?function(t,n){var o=i.createShape(ee({type:e},r));c.append(n,o)}:a,hover:c?function(t,n){return p.create(n,e,r),()=>{p.cleanUp()}}:null}}}function f(e){return function(i,r){n.splitLane(r,e),t.open(r,!0)}}if(An(d,["bpmn:Lane","bpmn:Participant"])&&Kn(e)){var g=eu(e);ee(u,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:l("Add lane above"),action:{click:function(e,t){n.addLane(t,"top")}}}}),g.length<2&&((Xn(e)?e.height>=120:e.width>=120)&&ee(u,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:l("Divide into two lanes"),action:{click:f(2)}}}),(Xn(e)?e.height>=180:e.width>=180)&&ee(u,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:l("Divide into three lanes"),action:{click:f(3)}}})),ee(u,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:l("Add lane below"),action:{click:function(e,t){n.addLane(t,"bottom")}}}})}kn(d,"bpmn:FlowNode")&&(kn(d,"bpmn:EventBasedGateway")?ee(u,{"append.receive-task":m("bpmn:ReceiveTask","bpmn-icon-receive-task",l("Append receive task")),"append.message-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",l("Append message intermediate catch event"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",l("Append timer intermediate catch event"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",l("Append conditional intermediate catch event"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",l("Append signal intermediate catch event"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):Sy(d,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?ee(u,{"append.compensation-activity":m("bpmn:Task","bpmn-icon-task",l("Append compensation activity"),{isForCompensation:!0})}):kn(d,"bpmn:EndEvent")||d.isForCompensation||Sy(d,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||Yn(d)||ee(u,{"append.end-event":m("bpmn:EndEvent","bpmn-icon-end-event-none",l("Append end event")),"append.gateway":m("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",l("Append gateway")),"append.append-task":m("bpmn:Task","bpmn-icon-task",l("Append task")),"append.intermediate-event":m("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",l("Append intermediate/boundary event"))})),a.isEmpty(e,"bpmn-replace")||ee(u,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:l("Change element"),action:{click:function(e,n){var i=ee(function(e){var n=t.getPad(e).html.getBoundingClientRect();return{x:n.left,y:n.bottom+5}}(n),{cursor:{x:e.x,y:e.y}});a.open(n,"bpmn-replace",i,{title:l("Change element"),width:300,search:!0})}}}}),kn(d,"bpmn:SequenceFlow")&&ee(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Add text annotation"))}),An(d,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&ee(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Add text annotation")),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect to other element"),action:{click:h,dragstart:h}}}),kn(d,"bpmn:TextAnnotation")&&ee(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using association"),action:{click:h,dragstart:h}}}),An(d,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&ee(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using data input association"),action:{click:h,dragstart:h}}}),kn(d,"bpmn:Group")&&ee(u,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Add text annotation"))});var y=s.allowed("elements.delete",{elements:[e]});return A(y)&&(y=y[0]===e),y&&ee(u,{delete:{group:"edit",className:"bpmn-icon-trash",title:l("Delete"),action:{click:function(e,t){n.removeElements([t])}}}}),u};const Cy={__depends__:[Yg,iy,Ua,ta,ip,Bh,wy],__init__:["contextPadProvider"],contextPadProvider:["type",Ey]};var ky={horizontal:["x","width"],vertical:["y","height"]};function Ay(e,t){this._modeling=e,this._filters=[],this.registerFilter((function(e){var n=t.allowed("elements.distribute",{elements:e});return A(n)?n:n?e:[]}))}Ay.$inject=["modeling","rules"],Ay.prototype.registerFilter=function(e){if("function"!=typeof e)throw new Error("the filter has to be a function");this._filters.push(e)},Ay.prototype.trigger=function(e,t){var n,i,r=this._modeling;if(!(e.length<3||(this._setOrientation(t),i=this._filterElements(e),(n=this._createGroups(i)).length<=2)))return r.distributeElements(n,this._axis,this._dimension),n},Ay.prototype._filterElements=function(e){var t=this._filters,n=this._axis,i=this._dimension,r=[].concat(e);return t.length?(j(t,(function(e){r=e(r,n,i)})),r):e},Ay.prototype._createGroups=function(e){var t=[],n=this,i=this._axis,r=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');return j(q(e,i),(function(e,o){var a,s=n._findRange(e,i,r),c=t[t.length-1];c&&n._hasIntersection(c.range,s)?t[t.length-1].elements.push(e):(a={range:s,elements:[e]},t.push(a))})),t},Ay.prototype._setOrientation=function(e){var t=ky[e];this._axis=t[0],this._dimension=t[1]},Ay.prototype._hasIntersection=function(e,t){return Math.max(e.min,e.max)>=Math.min(t.min,t.max)&&Math.min(e.min,e.max)<=Math.max(t.min,t.max)},Ay.prototype._findRange=function(e){var t=e[this._axis];return{min:t+5,max:t+e[this._dimension]-5}};const Py={__init__:["distributeElements"],distributeElements:["type",Ay]};function Ry(e){bc.call(this,e)}Ry.$inject=["eventBus"],x(Ry,bc),Ry.prototype.init=function(){this.addRule("elements.distribute",(function(e){var t=e.elements;return!((t=Hr(t=O(t,(function(e){var t=An(e,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(e.labelTarget||t)})))).length<3)&&t}))};var My={horizontal:'\n \n \n \n ',vertical:'\n \n \n \n '};function Ty(e,t,n,i){this._distributeElements=t,this._translate=n,this._popupMenu=e,this._rules=i,e.registerProvider("align-elements",900,this)}Ty.$inject=["popupMenu","distributeElements","translate","rules"],Ty.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&ee(t,this._getEntries(e)),t},Ty.prototype._isAllowed=function(e){return this._rules.allowed("elements.distribute",{elements:e})},Ty.prototype._getEntries=function(e){var t=this._distributeElements,n=this._translate,i=this._popupMenu;return{"distribute-elements-horizontal":{group:"distribute",title:n("Distribute elements horizontally"),className:"bjs-align-elements-menu-entry",imageHtml:My.horizontal,action:function(n,r){t.trigger(e,"horizontal"),i.close()}},"distribute-elements-vertical":{group:"distribute",title:n("Distribute elements vertically"),imageHtml:My.vertical,action:function(n,r){t.trigger(e,"vertical"),i.close()}}}};const Dy={__depends__:[mc,Py],__init__:["bpmnDistributeElements","distributeElementsMenuProvider"],bpmnDistributeElements:["type",Ry],distributeElementsMenuProvider:["type",Ty]};var By="is not a registered action";function Ny(e,t){this._actions={};var n=this;e.on("diagram.init",(function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})}))}function Oy(e,t){return new Error(e+" "+t)}Ny.$inject=["eventBus","injector"],Ny.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),i=e.get("selection",!1),r=e.get("zoomScroll",!1),o=e.get("copyPaste",!1),a=e.get("canvas",!1),s=e.get("rules",!1),c=e.get("keyboardMove",!1),l=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",(function(){t.undo()})),this.register("redo",(function(){t.redo()}))),o&&i&&this.register("copy",(function(){var e=i.get();if(e.length)return o.copy(e)})),o&&this.register("paste",(function(){o.paste()})),r&&this.register("stepZoom",(function(e){r.stepZoom(e.value)})),a&&this.register("zoom",(function(e){a.zoom(e.value)})),n&&i&&s&&this.register("removeSelection",(function(){var e=i.get();if(e.length){var t,r=s.allowed("elements.delete",{elements:e});!1!==r&&(t=A(r)?r:e).length&&n.removeElements(t.slice())}})),c&&this.register("moveCanvas",(function(e){c.moveCanvas(e)})),l&&this.register("moveSelection",(function(e){l.moveSelection(e.direction,e.accelerated)}))},Ny.prototype.trigger=function(e,t){if(!this._actions[e])throw Oy(e,By);return this._actions[e](t)},Ny.prototype.register=function(e,t){var n=this;if("string"==typeof e)return this._registerAction(e,t);j(e,(function(e,t){n._registerAction(t,e)}))},Ny.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw Oy(e,"is already registered");this._actions[e]=t},Ny.prototype.unregister=function(e){if(!this.isRegistered(e))throw Oy(e,By);this._actions[e]=void 0},Ny.prototype.getActions=function(){return Object.keys(this._actions)},Ny.prototype.isRegistered=function(e){return!!this._actions[e]};const jy={__init__:["editorActions"],editorActions:["type",Ny]};function Ly(e){e.invoke(Ny,this)}x(Ly,Ny),Ly.$inject=["injector"],Ly.prototype._registerDefaultActions=function(e){Ny.prototype._registerDefaultActions.call(this,e);var t=e.get("canvas",!1),n=e.get("elementRegistry",!1),i=e.get("selection",!1),r=e.get("spaceTool",!1),o=e.get("lassoTool",!1),a=e.get("handTool",!1),s=e.get("globalConnect",!1),c=e.get("distributeElements",!1),l=e.get("alignElements",!1),p=e.get("directEditing",!1),u=e.get("searchPad",!1),d=e.get("modeling",!1),h=e.get("contextPad",!1);t&&n&&i&&this._registerAction("selectElements",(function(){var e=t.getRootElement(),r=n.filter((function(t){return t!==e}));return i.select(r),r})),r&&this._registerAction("spaceTool",(function(){r.toggle()})),o&&this._registerAction("lassoTool",(function(){o.toggle()})),a&&this._registerAction("handTool",(function(){a.toggle()})),s&&this._registerAction("globalConnectTool",(function(){s.toggle()})),i&&c&&this._registerAction("distributeElements",(function(e){var t=i.get(),n=e.type;t.length&&c.trigger(t,n)})),i&&l&&this._registerAction("alignElements",(function(e){var t=i.get(),n=[],r=e.type;t.length&&(n=O(t,(function(e){return!kn(e,"bpmn:Lane")})),l.trigger(n,r))})),i&&d&&this._registerAction("setColor",(function(e){var t=i.get();t.length&&d.setColor(t,e)})),i&&p&&this._registerAction("directEditing",(function(){var e=i.get();e.length&&p.activate(e[0])})),u&&this._registerAction("find",(function(){u.toggle()})),t&&d&&this._registerAction("moveToOrigin",(function(){var e,i,r=t.getRootElement();e=qr(i=kn(r,"bpmn:Collaboration")?n.filter((function(e){return kn(e.parent,"bpmn:Collaboration")})):n.filter((function(e){return e!==r&&!kn(e.parent,"bpmn:SubProcess")}))),d.moveElements(i,{x:-e.x,y:-e.y},r)})),i&&h&&this._registerAction("replaceElement",(function(e){h.triggerEntry("replace","click",e)}))};const Iy={__depends__:[jy],editorActions:["type",Ly]};function $y(e){e.on(["create.init","shape.move.init"],(function(e){var t=e.context;An(e.shape,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(t.gridSnappingContext||(t.gridSnappingContext={}),t.gridSnappingContext.snapLocation="top-left")}))}$y.$inject=["eventBus"];function zy(e,t,n){return n||(n="round"),Math[n](e/t)*t}function Fy(e,t,n){var i=!n||!1!==n.active;this._eventBus=t;var r=this;t.on("diagram.init",800,(function(){r.setActive(i)})),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],1200,(function(t){var n=t.originalEvent;if(!(!r.active||n&&sa(n))){var i=t.context,o=i.gridSnappingContext;o||(o=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},o=function(e,t,n){var i=e.context,r=e.shape,o=i.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;if(s&&R(s[t]))return s[t];s||(s=o.snapOffset={});R(s[t])||(s[t]=0);if(!r)return s[t];n.get(r.id)||(Hy(t)?s[t]+=r[t]+r.width/2:s[t]+=r[t]+r.height/2);if(!a)return s[t];"x"===t?/left/.test(a)?s[t]-=r.width/2:/right/.test(a)&&(s[t]+=r.width/2):/top/.test(a)?s[t]-=r.height/2:/bottom/.test(a)&&(s[t]+=r.height/2);return s[t]}(t,n,e);o&&(i.offset=o);var a=function(e,t){var n=e.context,i=n.createConstraints,r=n.resizeConstraints||{},o=n.gridSnappingContext,a=o.snapConstraints;if(a&&a[t])return a[t];a||(a=o.snapConstraints={});a[t]||(a[t]={});var s=n.direction;i&&(Hy(t)?(a.x.min=i.left,a.x.max=i.right):(a.y.min=i.top,a.y.max=i.bottom));var c=r.min,l=r.max;c&&(Hy(t)?Gy(s)?a.x.max=c.left:a.x.min=c.right:Vy(s)?a.y.max=c.top:a.y.min=c.bottom);l&&(Hy(t)?Gy(s)?a.x.min=l.left:a.x.max=l.right:Vy(s)?a.y.min=l.top:a.y.max=l.bottom);return a[t]}(t,n);a&&ee(i,a),Wl(t,n)||r.snapEvent(t,n,i)}))}}))}function Hy(e){return"x"===e}function Vy(e){return-1!==e.indexOf("n")}function Gy(e){return-1!==e.indexOf("w")}function Wy(e,t){ro.call(this,e),this._gridSnapping=t;var n=this;this.preExecute("shape.resize",(function(e){var t=e.context,i=(t.hints||{}).autoResize;if(i){var r=t.shape,o=t.newBounds;T(i)?t.newBounds=n.snapComplex(o,i):t.newBounds=n.snapSimple(r,o)}}))}Fy.prototype.snapEvent=function(e,t,n){Ul(e,t,this.snapValue(e[t],n))},Fy.prototype.getGridSpacing=function(){return 10},Fy.prototype.snapValue=function(e,t){var n,i,r=0;return t&&t.offset&&(r=t.offset),e=zy(e+=r,10),t&&t.min&&R(n=t.min)&&(n=zy(n+r,10,"ceil"),e=Math.max(e,n)),t&&t.max&&R(i=t.max)&&(i=zy(i+r,10,"floor"),e=Math.min(e,i)),e-=r},Fy.prototype.isActive=function(){return this.active},Fy.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},Fy.prototype.toggleActive=function(){this.setActive(!this.active)},Fy.$inject=["elementRegistry","eventBus","config.gridSnapping"],Wy.$inject=["eventBus","gridSnapping","modeling"],x(Wy,ro),Wy.prototype.snapSimple=function(e,t){var n=this._gridSnapping;return t.width=n.snapValue(t.width,{min:t.width}),t.height=n.snapValue(t.height,{min:t.height}),t.x=e.x+e.width/2-t.width/2,t.y=e.y+e.height/2-t.height/2,t},Wy.prototype.snapComplex=function(e,t){return/w|e/.test(t)&&(e=this.snapHorizontally(e,t)),/n|s/.test(t)&&(e=this.snapVertically(e,t)),e},Wy.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,i=/w/.test(t),r=/e/.test(t),o={};return o.width=n.snapValue(e.width,{min:e.width}),r&&(i?(o.x=n.snapValue(e.x,{max:e.x}),o.width+=n.snapValue(e.x-o.x,{min:e.x-o.x})):e.x=e.x+e.width-o.width),ee(e,o),e},Wy.prototype.snapVertically=function(e,t){var n=this._gridSnapping,i=/n/.test(t),r=/s/.test(t),o={};return o.height=n.snapValue(e.height,{min:e.height}),i&&(r?(o.y=n.snapValue(e.y,{max:e.y}),o.height+=n.snapValue(e.y-o.y,{min:e.y-o.y})):e.y=e.y+e.height-o.height),ee(e,o),e};function Uy(e,t){e.on(["spaceTool.move","spaceTool.end"],2e3,(function(e){var n,i=e.context;i.initialized&&("x"===i.axis?(n=t.snapValue(e.dx),e.x=e.x+n-e.dx,e.dx=n):(n=t.snapValue(e.dy),e.y=e.y+n-e.dy,e.dy=n))}))}Uy.$inject=["eventBus","gridSnapping"];const qy={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Wy],gridSnappingSpaceToolBehavior:["type",Uy]}],__init__:["gridSnapping"],gridSnapping:["type",Fy]};function Ky(e,t){e.on("autoPlace",2e3,(function(e){var n=e.source,i=Nr(n),r=e.shape,o=Oc(n,r);return["x","y"].forEach((function(e){var n={};o[e]!==i[e]&&(o[e]>i[e]?n.min=o[e]:n.max=o[e],kn(r,"bpmn:TextAnnotation")&&(!function(e){return"x"===e}(e)?n.offset=-r.height/2:n.offset=-r.width/2),o[e]=t.snapValue(o[e],n))})),o}))}Ky.$inject=["eventBus","gridSnapping"];function Xy(e,t,n){t.on(["create.start","shape.move.start"],1750,(function(t){var i=t.context,r=i.shape,o=e.getRootElement();kn(r,"bpmn:Participant")&&kn(o,"bpmn:Process")&&o.children.length&&(i.createConstraints&&(r.width=n.snapValue(r.width,{min:r.width}),r.height=n.snapValue(r.height,{min:r.height})))}))}Xy.$inject=["canvas","eventBus","gridSnapping"];function Yy(e,t,n){ro.call(this,e),this._gridSnapping=t;var i=this;this.postExecuted(["connection.create","connection.layout"],3e3,(function(e){var t=e.context,r=t.connection,o=t.hints||{},a=r.waypoints;o.connectionStart||o.connectionEnd||!1===o.createElementsBehavior||function(e){return e.length>3}(a)&&n.updateWaypoints(r,i.snapMiddleSegments(a))}))}function Zy(e,t,n){var i=qi(t,n),r={};return function(e){return"h"===e}(i)&&(r.y=e.snapValue(t.y)),function(e){return"v"===e}(i)&&(r.x=e.snapValue(t.x)),("x"in r||"y"in r)&&(t=ee({},t,r),n=ee({},n,r)),[t,n]}Yy.$inject=["eventBus","gridSnapping","modeling"],x(Yy,ro),Yy.prototype.snapMiddleSegments=function(e){var t,n=this._gridSnapping;e=e.slice();for(var i=1;i5&&Ie(a,{x:o.x,width:o.width}),o.height>5&&Ie(a,{y:o.y,height:o.height}),i.canExecute?ze(a).remove(fv):ze(a).add(fv)})),e.on("resize.cleanup",(function(e){var n,i;n=e.context,i=n.shape,n.frame&&nt(n.frame),t.removeMarker(i,mv)}))}gv.$inject=["eventBus","canvas","previewSupport"];var yv=-6,vv="djs-resizer",bv=["n","w","s","e","nw","ne","se","sw"];function xv(e,t,n,i){this._resize=i,this._canvas=t;var r=this;e.on("selection.changed",(function(e){var t=e.newSelection;r.removeResizers(),1===t.length&&j(t,J(r.addResizer,r))})),e.on("shape.changed",(function(e){var t=e.element;n.isSelected(t)&&(r.removeResizers(),r.addResizer(t))}))}xv.prototype.makeDraggable=function(e,t,n){var i=this._resize;function r(t){Ho(t)&&i.activate(t,e,n)}we.bind(t,"mousedown",r),we.bind(t,"touchstart",r)},xv.prototype._createResizer=function(e,t,n,i){var r=this._getResizersParent(),o=function(e){var t={x:0,y:0};-1!==e.indexOf("e")?t.x=6:-1!==e.indexOf("w")&&(t.x=yv);-1!==e.indexOf("s")?t.y=6:-1!==e.indexOf("n")&&(t.y=yv);return t}(i),a=qe("g");ze(a).add(vv),ze(a).add(vv+"-"+e.id),ze(a).add(vv+"-"+i),Ne(r,a);var s=qe("rect");Ie(s,{x:-4+o.x,y:-4+o.y,width:8,height:8}),ze(s).add(vv+"-visual"),Ne(a,s);var c=qe("rect");return Ie(c,{x:-10+o.x,y:-10+o.y,width:20,height:20}),ze(c).add(vv+"-hit"),Ne(a,c),Si(a,t,n),a},xv.prototype.createResizer=function(e,t){var n=dv(e,t),i=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,i,t)},xv.prototype.addResizer=function(e){var t=this;!Qn(e)&&this._resize.canResize({shape:e})&&j(bv,(function(n){t.createResizer(e,n)}))},xv.prototype.removeResizers=function(){He(this._getResizersParent())},xv.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},xv.$inject=["eventBus","canvas","selection","resize"];const _v={__depends__:[tl,Yc,up],__init__:["resize","resizePreview","resizeHandles"],resize:["type",uv],resizePreview:["type",gv],resizeHandles:["type",xv]};function wv(e,t,n,i,r,o,a){function s(e,t){(t||An(e,["bpmn:Task","bpmn:TextAnnotation","bpmn:Participant"])||Ev(e))&&i.activate(e)}this._bpmnFactory=t,this._canvas=n,this._modeling=r,this._textRenderer=a,i.registerProvider(this),e.on("element.dblclick",(function(e){s(e.element,!0)})),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open","root.set","selection.changed"],(function(){i.isActive()&&i.complete()})),e.on(["shape.remove","connection.remove"],2e3,(function(e){i.isActive(e.element)&&i.cancel()})),e.on(["commandStack.changed"],(function(e){i.isActive()&&i.cancel()})),e.on("directEditing.activate",(function(e){o.removeResizers()})),e.on("create.end",500,(function(e){var t=e.context,n=t.shape,i=e.context.canExecute;e.isTouch||i&&(t.hints&&!1===t.hints.createElementsBehavior||s(n))})),e.on("autoPlace.end",500,(function(e){s(e.shape)}))}function Ev(e){return kn(e,"bpmn:SubProcess")&&!Kn(e)}wv.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],wv.prototype.activate=function(e){var t=si(e);if(void 0!==t){var n={text:t};ee(n,this.getEditingBBox(e));var i={},r=n.style||{};return ee(r,{backgroundColor:null,border:null}),(An(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||Ev(e))&&ee(i,{centerVertically:!0}),ni(e)&&(ee(i,{autoResize:!0}),ee(r,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),kn(e,"bpmn:TextAnnotation")&&(ee(i,{resizable:!0,autoResize:!0}),ee(r,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),ee(n,{options:i,style:r}),n}},wv.prototype.getEditingBBox=function(e){var t=this._canvas,n=e.label||e,i=t.getAbsoluteBBox(n),r=i.x+i.width/2,o=i.y+i.height/2,a={x:i.x,y:i.y},s=t.zoom(),c=this._textRenderer.getDefaultStyle(),l=this._textRenderer.getExternalStyle(),p=l.fontSize*s,u=l.lineHeight,d=c.fontSize*s,h=c.lineHeight,m={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};if(kn(e,"bpmn:Lane")||function(e){return kn(e,"bpmn:Participant")&&Kn(e)}(e)){var f=Xn(e);ee(a,f?{width:i.height,height:30*s,x:i.x-i.height/2+15*s,y:o-30*s/2}:{width:i.width,height:30*s}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:f?"rotate(-90deg)":null})}if(function(e){return kn(e,"bpmn:Participant")&&!Kn(e)}(e)){var g=Xn(e);ee(a,g?{width:i.width,height:i.height}:{width:i.height,height:i.width,x:r-i.height/2,y:o-i.width/2}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:g?null:"rotate(-90deg)"})}(An(e,["bpmn:Task","bpmn:CallActivity"])||Ev(e))&&(ee(a,{width:i.width,height:i.height}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"})),function(e){return kn(e,"bpmn:SubProcess")&&Kn(e)}(e)&&(ee(a,{width:i.width,x:i.x}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"}));var y=90*s,v=7*s,b=4*s;if(n.labelTarget&&(ee(a,{width:y,height:i.height+v+b,x:r-y/2,y:i.y-v}),ee(m,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:b+"px"})),ni(n)&&!ii(n)&&!Jn(n)){var x=oi(e),_=t.getAbsoluteBBox({x:x.x,y:x.y,width:0,height:0}),w=p+v+b;ee(a,{width:y,height:w,x:_.x-y/2,y:_.y-w/2}),ee(m,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:b+"px"})}return kn(e,"bpmn:TextAnnotation")&&(ee(a,{width:i.width,height:i.height,minWidth:30*s,minHeight:10*s}),ee(m,{textAlign:"left",paddingTop:5*s+"px",paddingBottom:7*s+"px",paddingLeft:7*s+"px",paddingRight:5*s+"px",fontSize:d+"px",lineHeight:h})),{bounds:a,style:m}},wv.prototype.update=function(e,t,n,i){var r,o,a;kn(e,"bpmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(e),r={x:e.x,y:e.y,width:e.width/o.width*i.width,height:e.height/o.height*i.height}),(a=t)&&a.trim()||(t=null),this._modeling.updateLabel(e,t,r)};var Sv="djs-element-hidden",Cv="djs-label-hidden";function kv(e,t,n){var i,r,o,a=this,s=t.getDefaultLayer();e.on("directEditing.activate",(function(e){var c=e.active;if(kn(i=c.element.label||c.element,"bpmn:TextAnnotation")){r=t.getAbsoluteBBox(i),o=qe("g");var l=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i.width,containerHeight:i.height,position:{mx:0,my:0}}),p=a.path=qe("path");Ie(p,{d:l,strokeWidth:2,stroke:Av(i)}),Ne(o,p),Ne(s,o),Ci(o,i.x,i.y)}kn(i,"bpmn:TextAnnotation")||i.labelTarget?t.addMarker(i,Sv):(kn(i,"bpmn:Task")||kn(i,"bpmn:CallActivity")||kn(i,"bpmn:SubProcess")||kn(i,"bpmn:Participant"))&&t.addMarker(i,Cv)})),e.on("directEditing.resize",(function(e){if(kn(i,"bpmn:TextAnnotation")){var t=e.height,o=e.dy,s=Math.max(i.height/r.height*(t+o),0),c=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i.width,containerHeight:s,position:{mx:0,my:0}});Ie(a.path,{d:c})}})),e.on(["directEditing.complete","directEditing.cancel"],(function(e){var n=e.active;n&&(t.removeMarker(n.element.label||n.element,Sv),t.removeMarker(i,Cv)),i=void 0,r=void 0,o&&(nt(o),o=void 0)}))}function Av(e,t){return Rn(e).get("stroke")||t||"black"}kv.$inject=["eventBus","canvas","pathMap"];const Pv={__depends__:[io,_v,iy],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",wv],labelEditingPreview:["type",kv]};var Rv=new Xr("tt");function Mv(e,t){e.style.display=!1===t?"none":""}var Tv="djs-tooltip",Dv="."+Tv;function Bv(e,t){var n,i;this._eventBus=e,this._canvas=t,this._ids=Rv,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=(n=t.getContainer(),pe(i=Re('
      '),{position:"absolute",width:"0",height:"0"}),n.insertBefore(i,n.firstChild),i);var r=this;Ce.bind(this._tooltipRoot,Dv,"mousedown",(function(e){e.stopPropagation()})),Ce.bind(this._tooltipRoot,Dv,"mouseover",(function(e){r.trigger("mouseover",e)})),Ce.bind(this._tooltipRoot,Dv,"mouseout",(function(e){r.trigger("mouseout",e)})),this._init()}Bv.$inject=["eventBus","canvas"],Bv.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=ee({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},Bv.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,i=this.get(ue(n,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},Bv.prototype.get=function(e){return"string"!=typeof e&&(e=e.id),this._tooltips[e]},Bv.prototype.clearTimeout=function(e){if(e=this.get(e)){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},Bv.prototype.setTimeout=function(e){if(e=this.get(e)){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout((function(){t.remove(e)}),e.timeout)}},Bv.prototype.remove=function(e){var t=this.get(e);t&&(Be(t.html),Be(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},Bv.prototype.show=function(){Mv(this._tooltipRoot)},Bv.prototype.hide=function(){Mv(this._tooltipRoot,!1)},Bv.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},Bv.prototype._addTooltip=function(e){var t,n=e.id,i=e.html,r=this._tooltipRoot;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),T(i)&&(i=Re(i)),pe(t=Re('
      '),{position:"absolute"}),t.appendChild(i),e.type&&he(t).add("djs-tooltip-"+e.type),e.className&&he(t).add(e.className),e.htmlContainer=t,r.appendChild(t),this._tooltips[n]=e,this._updateTooltip(e)},Bv.prototype._updateTooltip=function(e){var t,n,i,r=e.position,o=e.htmlContainer;t=o,n=r.x,i=r.y,pe(t,{left:n+"px",top:i+"px"})},Bv.prototype._updateTooltipVisibilty=function(e){j(this._tooltips,(function(t){var n=t.show,i=t.htmlContainer,r=!0;n&&((n.minZoom>e.scale||n.maxZoom"+r+"
      "}))}))}Ov.$inject=["eventBus","tooltips","translate"];const jv={__depends__:[Nv],__init__:["modelingFeedback"],modelingFeedback:["type",Ov]};var Lv=Math.round;function Iv(e,t,n,i,r){function o(e,t,n,i){return r.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function a(e,n,i,r){if(P(i)&&(r=i,i=!1),!n.waypoints&&n.parent&&!ze(e.target).has("djs-hit-no-move")){var o=function(e){return{x:e.x+Lv(e.width/2),y:e.y+Lv(e.height/2)}}(n);return t.init(e,o,"shape.move",{cursor:"grabbing",autoActivate:i,data:{shape:n,context:r||{}}}),!0}}e.on("shape.move.start",1500,(function(e){var t,n,r=e.context,o=e.shape,a=i.get().slice();-1===a.indexOf(o)&&(a=[o]),n=G(t=a,"id"),ee(r,{shapes:a=O(t,(function(e){for(;e=e.parent;)if(n[e.id])return!1;return!0})),validatedShapes:a,shape:o})})),e.on("shape.move.start",1250,(function(e){var t=e.context,n=t.validatedShapes;if(!(t.canExecute=o(n)))return!1})),e.on("shape.move.move",500,(function(e){var t,n=e.context,i=n.validatedShapes,r=e.hover,a={x:e.dx,y:e.dy};t=o(i,a,{x:e.x,y:e.y},r),n.delta=a,n.canExecute=t,n.target=null!==t?r:null})),e.on("shape.move.end",(function(e){var t=e.context,i=t.delta,r=t.canExecute,o="attach"===r,a=t.shapes;if(!1===r)return!1;i.x=Lv(i.x),i.y=Lv(i.y),0===i.x&&0===i.y||n.moveElements(a,i,t.target,{primaryShape:t.shape,attach:o})})),e.on("element.mousedown",(function(e){if(Ho(e)){var t=Lo(e);if(!t)throw new Error("must supply DOM mousedown event");return a(t,e.element)}})),this.start=a}Iv.$inject=["eventBus","dragging","modeling","selection","rules"];var $v="djs-dragging",zv="drop-ok",Fv="drop-not-ok",Hv="new-parent",Vv="attach-ok";function Gv(e,t,n,i){function r(e){var t=function(e){var t=O(e,(function(t){return!Qn(t)||B(e,K({id:t.source.id}))&&B(e,K({id:t.target.id}))}));return t}(o(e));return t}function o(e){var t=Ur(e,!0),n=t.flatMap((e=>(e.incoming||[]).concat(e.outgoing||[]))),i=t.concat(n);return[...new Set(i)]}function a(e,n){[Vv,zv,Fv,Hv].forEach((function(i){i===n?t.addMarker(e,i):t.removeMarker(e,i)}))}e.on("shape.move.start",499,(function(e){var a=e.context,s=a.shapes,c=a.allDraggedElements,l=r(s);if(!a.dragGroup){var p=qe("g");Ie(p,n.cls("djs-drag-group",["no-events"])),Ne(t.getActiveLayer(),p),a.dragGroup=p}l.forEach((function(e){i.addDragger(e,a.dragGroup)})),j(c=c?_([c,o(s)]):o(s),(function(e){t.addMarker(e,$v)})),a.allDraggedElements=c,a.differentParents=1!==H(G(s,(function(e){return e.parent&&e.parent.id}))).length})),e.on("shape.move.move",499,(function(e){var t=e.context,n=t.dragGroup,i=t.target,r=t.shape.parent,o=t.canExecute;i&&("attach"===o?a(i,Vv):t.canExecute&&r&&i.id!==r.id?a(i,Hv):a(i,t.canExecute?zv:Fv)),Ci(n,e.dx,e.dy)})),e.on(["shape.move.out","shape.move.cleanup"],(function(e){var t=e.context.target;t&&a(t,null)})),e.on("shape.move.cleanup",(function(e){var n=e.context,i=n.allDraggedElements,r=n.dragGroup;j(i,(function(e){t.removeMarker(e,$v)})),r&&nt(r)})),this.makeDraggable=function(e,n,r){i.addDragger(n,e.dragGroup),r&&t.addMarker(n,$v),e.allDraggedElements?e.allDraggedElements.push(n):e.allDraggedElements=[n]}}Gv.$inject=["eventBus","canvas","styles","previewSupport"];const Wv={__depends__:[Ko,ta,Ro,tl,Yc,up],__init__:["move","movePreview"],move:["type",Iv],movePreview:["type",Gv]};var Uv=".djs-palette-toggle",qv=".entry",Kv=Uv+", "+qv,Xv="djs-palette-",Yv="open",Zv="two-column";function Qv(e,t){this._eventBus=e,this._canvas=t;var n=this;e.on("tool-manager.update",(function(e){var t=e.tool;n.updateToolHighlight(t)})),e.on("i18n.changed",(function(){n._update()})),e.on("diagram.init",(function(){n._diagramInitialized=!0,n._rebuild()}))}function Jv(e,t){var n=t.getPaletteEntries();return M(n)?n(e):(j(n,(function(t,n){e[n]=t})),e)}Qv.$inject=["eventBus","canvas"],Qv.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("palette.getProviders",e,(function(e){e.providers.push(t)})),this._rebuild()},Qv.prototype.getEntries=function(){return this._getProviders().reduce(Jv,{})},Qv.prototype._rebuild=function(){this._diagramInitialized&&(this._getProviders().length&&(this._container||this._init(),this._update()))},Qv.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),i=this._container=Re(Qv.HTML_MARKUP);n.appendChild(i),he(n).add(Xv+"shown"),Ce.bind(i,Kv,"click",(function(t){if(Me(t.delegateTarget,Uv))return e.toggle();e.trigger("click",t)})),we.bind(i,"mousedown",(function(e){e.stopPropagation()})),Ce.bind(i,qv,"dragstart",(function(t){e.trigger("dragstart",t)})),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:i})},Qv.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},Qv.prototype._toggleState=function(e){e=e||{};var t,n=this._getParentContainer(),i=this._container,r=this._eventBus,o=he(i),a=he(n);t="twoColumn"in e?e.twoColumn:this._needsCollapse(n.clientHeight,this._entries||{}),o.toggle(Zv,t),a.toggle(Xv+Zv,t),"open"in e&&(o.toggle(Yv,e.open),a.toggle(Xv+Yv,e.open)),r.fire("palette.changed",{twoColumn:t,open:this.isOpen()})},Qv.prototype._update=function(){var e=Te(".djs-palette-entries",this._container),t=this._entries=this.getEntries();fe(e),j(t,(function(t,n){var i=t.group||"default",r=Te("[data-group="+co(i)+"]",e);r||(ue(r=Re('
      '),"data-group",i),e.appendChild(r));var o,a,s,c=t.html||(t.separator?'
      ':'
      '),l=Re(c);if(r.appendChild(l),!t.separator&&(ue(l,"data-action",n),t.title&&ue(l,"title",t.title),t.className&&(o=l,a=t.className,s=he(o),(A(a)?a:a.split(/\s+/g)).forEach((function(e){s.add(e)}))),t.imageUrl)){var p=Re("");ue(p,"src",t.imageUrl),l.appendChild(p)}})),this.open()},Qv.prototype.trigger=function(e,t,n){var i,r,o=t.delegateTarget||t.target;return o?(i=ue(o,"data-action"),r=t.originalEvent||t,this.triggerEntry(i,e,r,n)):t.preventDefault()},Qv.prototype.triggerEntry=function(e,t,n,i){var r,o;if((r=this._entries[e])&&(o=r.action,!1!==this._eventBus.fire("palette.trigger",{entry:r,event:n}))){if(M(o)){if("click"===t)return o(n,i)}else if(o[t])return o[t](n,i);n.preventDefault()}},Qv.prototype._layoutChanged=function(){this._toggleState({})},Qv.prototype._needsCollapse=function(e,t){return e<46*Object.keys(t).length+50},Qv.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},Qv.prototype.open=function(){this._toggleState({open:!0})},Qv.prototype.toggle=function(){this.isOpen()?this.close():this.open()},Qv.prototype.isActiveTool=function(e){return e&&this._activeTool===e},Qv.prototype.updateToolHighlight=function(e){var t;this._toolsContainer||(t=Te(".djs-palette-entries",this._container),this._toolsContainer=Te("[data-group=tools]",t)),j(this._toolsContainer.children,(function(t){var n=t.getAttribute("data-action");if(n){var i=he(t);n=n.replace("-tool",""),i.contains("entry")&&n===e?i.add("highlighted-entry"):i.remove("highlighted-entry")}}))},Qv.prototype.isOpen=function(){return he(this._container).has(Yv)},Qv.prototype._getParentContainer=function(){return this._canvas.getContainer()},Qv.HTML_MARKUP='
      ';const eb={__init__:["palette"],palette:["type",Qv]};var tb="crosshair";function nb(e,t,n,i,r,o,a){this._selection=r,this._dragging=n,this._mouse=a;var s=this,c=function(e){var n,i=t.getActiveLayer();Ie(n=e.frame=qe("rect"),{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),Ne(i,n)},l=function(e){var t=e.frame,n=e.bbox;Ie(t,{x:n.x,y:n.y,width:n.width,height:n.height})},p=function(e){e.frame&&nt(e.frame)};o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",(function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",(function(){s.activateLasso(t.originalEvent,!0)}))})),e.on("lasso.end",0,(function(e){var t=e.context,n=ib(e),r=i.filter((function(e){return e})),o=Go(e);s.select(r,n,o?t.selection:[])})),e.on("lasso.start",(function(e){var t=e.context;t.bbox=ib(e),c(t),t.selection=r.get()})),e.on("lasso.move",(function(e){var t=e.context;t.bbox=ib(e),l(t)})),e.on("lasso.cleanup",(function(e){var t=e.context;p(t)})),e.on("element.mousedown",1500,(function(e){if(Go(e))return s.activateLasso(e.originalEvent),!0}))}function ib(e){var t={x:e.x-e.dx,y:e.y-e.dy},n={x:e.x,y:e.y};return t.x<=n.x&&t.y=n.x&&t.yn.x&&t.y<=n.y?{x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:t.x<=n.x&&t.y>n.y||t.x=n.y?{x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:t.x>=n.x&&t.y>n.y||t.x>n.x&&t.y>=n.y?{x:n.x,y:n.y,width:t.x-n.x,height:t.y-n.y}:{x:n.x,y:n.y,width:0,height:0}}nb.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],nb.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:tb,data:{context:{}}})},nb.prototype.activateSelection=function(e,t){this._dragging.init(e,"lasso.selection",{trapClick:!1,autoActivate:t,cursor:tb,data:{context:{}},keepSelection:!0})},nb.prototype.select=function(e,t,n=[]){var i=function(e,t){var n={};return j(e,(function(e){var i=e;i.waypoints&&(i=qr(i)),!R(t.y)&&i.x>t.x&&(n[e.id]=e),!R(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(R(t.width)&&R(t.height)&&i.width+i.xt[i]+r-n&&Ul(e,i,t[i]+r-n)}))}(e,o,function(e){return kn(e,"bpmn:Task")?xb:bb}(o)),o&&(t=i,z(["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"],(function(e){return kb(t,e)})))?(n.connectionStart=Gl(r),An(o,["bpmn:Event","bpmn:Gateway"])&&Cb(e,Gl(o)),An(o,["bpmn:Task","bpmn:SubProcess"])&&function(e,t){var n=Gl(t);wb.forEach((function(i){(function(e,t,n){return e[n]>t[n]+_b&&e[n]r[t]?r[t]+vb:r[t]-vb,Ul(e,t,n))}))}(e)):kb(i,"bpmn:MessageFlow")?(kn(r,"bpmn:Event")&&(n.connectionStart=Gl(r)),kn(o,"bpmn:Event")&&Cb(e,Gl(o))):n.connectionStart=n.initialConnectionStart)}))}function Cb(e,t){Ul(e,"x",t.x),Ul(e,"y",t.y)}function kb(e,t){return e&&e.type===t}function Ab(e,t){return"x"===e?t.width:t.height}function Pb(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function Rb(){this._snapValues={}}Sb.$inject=["eventBus"],Pb.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},Pb.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},Pb.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},Pb.prototype.getSnapLocations=function(){return this._snapLocations},Pb.prototype.setSnapLocations=function(e){this._snapLocations=e},Pb.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new Rb).initDefaults(this._defaultSnaps),n},Rb.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),-1===n.x.indexOf(t.x)&&n.x.push(t.x),-1===n.y.indexOf(t.y)&&n.y.push(t.y)},Rb.prototype.snap=function(e,t,n,i){var r=this._snapValues[t];return r&&function(e,t,n){var i,r;for(n=void 0===n?10:n,i=0;i=e.x||i&&i<=e.x)&&Ul(e,"x",e.x),(n&&n>=e.y||r&&r<=e.y)&&Ul(e,"y",e.y)}}function Nb(e,t){return-1!==e.indexOf(t)}function Ob(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}x(Db,Tb),Db.$inject=["eventBus","injector"],Db.prototype.initSnap=function(e){var t=Tb.prototype.initSnap.call(this,e),n=e.shape,i=!!this._elementRegistry.get(n.id);return j(n.outgoing,(function(n){var r=n.waypoints[0];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Ob(r,i,e))})),j(n.incoming,(function(n){var r=n.waypoints[n.waypoints.length-1];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Ob(r,i,e))})),kn(n,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t},Db.prototype.addSnapTargetPoints=function(e,t,n){Tb.prototype.addSnapTargetPoints.call(this,e,t,n);var i=this.getSnapTargets(t,n);j(i,(function(n){var i;(function(e){if(kn(e,"bpmn:SubProcess")&&Kn(e))return!0;return kn(e,"bpmn:Participant")}(n)||(i="bpmn:TextAnnotation",[t,n].every((function(e){return kn(e,i)}))))&&(e.add("top-left",Hl(n)),e.add("bottom-right",Vl(n)))}));var r=this._elementRegistry;return j(t.incoming,(function(n){if(r.get(t.id)){Nb(i,n.source)||e.add("mid",Nr(n.source));var o=n.waypoints[0];e.add(n.id+"-docking",o.original||o)}})),j(t.outgoing,(function(n){if(r.get(t.id)){Nb(i,n.target)||e.add("mid",Nr(n.target));var o=n.waypoints[n.waypoints.length-1];e.add(n.id+"-docking",o.original||o)}})),kn(n,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,t,n.parent)),e},Db.prototype.getSnapTargets=function(e,t){return Tb.prototype.getSnapTargets.call(this,e,t).filter((function(e){return!kn(e,"bpmn:Lane")}))};function jb(e,t){var n=this;e.on(["resize.start"],(function(e){n.initSnap(e)})),e.on(["resize.move","resize.end"],1250,(function(e){var i=e.context,r=i.shape,o=r.parent,a=i.direction,s=i.snapContext;if(!(e.originalEvent&&sa(e.originalEvent)||Wl(e))){var c=s.pointsForTarget(o);c.initialized||((c=n.addSnapTargetPoints(c,r,o,a)).initialized=!0),function(e){return"n"===e||"s"===e}(a)&&Ul(e,"x",e.x),function(e){return"e"===e||"w"===e}(a)&&Ul(e,"y",e.y),t.snap(e,c)}})),e.on(["resize.cleanup"],(function(){t.hide()}))}function Lb(e,t){var n=Nr(e),i=Tr(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}jb.prototype.initSnap=function(e){var t=e.context,n=t.shape,i=t.direction,r=t.snapContext;r||(r=t.snapContext=new Pb);var o=Lb(n,i);return r.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),r},jb.prototype.addSnapTargetPoints=function(e,t,n,i){return j(this.getSnapTargets(t,n),(function(t){e.add("corner",Vl(t)),e.add("corner",Hl(t))})),e.add("corner",Lb(t,i)),e},jb.$inject=["eventBus","snapping"],jb.prototype.getSnapTargets=function(e,t){return ql(t).filter((function(t){return!(n=t,i=e,n.host===i||Qn(t)||function(e){return!!e.hidden}(t)||Jn(t));var n,i}))};function Ib(e){this._canvas=e,this._asyncHide=function(e,t){let n,i,r,o;function a(n){let a=Date.now(),l=n?0:o+t-a;if(l>0)return s(l);e.apply(r,i),c()}function s(e){n=setTimeout(a,e)}function c(){n&&clearTimeout(n),n=o=i=r=void 0}function l(...e){o=Date.now(),i=e,r=this,n||s(t)}return l.flush=function(){n&&a(!0),c()},l.cancel=c,l}(J(this.hide,this),1e3)}Ib.$inject=["canvas"],Ib.prototype.snap=function(e,t){var n=e.context.snapContext,i=n.getSnapLocations(),r={x:Wl(e,"x"),y:Wl(e,"y")};j(i,(function(i){var o=n.getSnapOrigin(i),a={x:e.x+o.x,y:e.y+o.y};if(j(["x","y"],(function(e){var n;r[e]||void 0!==(n=t.snap(a,i,e,7))&&(r[e]={value:n,originValue:n-o[e]})})),r.x&&r.y)return!1})),this.showSnapLine("vertical",r.x&&r.x.value),this.showSnapLine("horizontal",r.y&&r.y.value),j(["x","y"],(function(t){var n=r[t];P(n)&&Ul(e,t,n.originValue)}))},Ib.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=qe("path");return Ie(n,{d:"M0,0 L0,0"}),ze(n).add("djs-snap-line"),Ne(t,n),{update:function(t){R(t)?Ie(n,"horizontal"===e?{d:"M-100000,"+t+" L+100000,"+t,display:""}:{d:"M "+t+",-100000 L "+t+", +100000",display:""}):Ie(n,{display:"none"})}}},Ib.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},Ib.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},Ib.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},Ib.prototype.hide=function(){j(this._snapLines,(function(e){e.update()}))};const $b={__depends__:[{__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",Tb],resizeSnapping:["type",jb],snapping:["type",Ib]}],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",Sb],createMoveSnapping:["type",Db]};function zb(e,t,n,i,r){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=t,this._overlays=n,this._selection=i,this._translate=r,this._container=this._getBoxHtml(),this._searchInput=Te(zb.INPUT_SELECTOR,this._container),this._resultsContainer=Te(zb.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy"],this.close,this)}function Fb(e,t,n){var i=function(e){var t="";return e.forEach((function(e){e.matched?t+=''+po(e.matched)+"":t+=po(e.normal)})),""!==t?t:null}(t),r=Re(n);r.innerHTML=i,e.appendChild(r)}zb.$inject=["canvas","eventBus","overlays","selection","translate"],zb.prototype._bindEvents=function(){var e=this;function t(t,n,i,r){e._eventMaps.push({el:t,type:i,listener:Ce.bind(t,n,i,r)})}t(document,"html","click",(function(t){e.close()})),t(this._container,zb.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,zb.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,zb.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,zb.INPUT_SELECTOR,"keydown",(function(e){ca("ArrowUp",e)&&e.preventDefault(),ca("ArrowDown",e)&&e.preventDefault()})),t(this._container,zb.INPUT_SELECTOR,"keyup",(function(t){if(ca("Escape",t))return e.close();if(ca("Enter",t)){var n=e._getCurrentResult();return n?e._select(n):e.close()}return ca("ArrowUp",t)?e._scrollToDirection(!0):ca("ArrowDown",t)?e._scrollToDirection():void(ca(["ArrowLeft","ArrowRight"],t)||e._search(t.delegateTarget.value))}))},zb.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){Ce.unbind(e.el,e.type,e.listener)}))},zb.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if(n.length){n.forEach((function(e){var n=e.element.id,i=t._createResultNode(e,n);t._results[n]={element:e.element,node:i}}));var i=Te(zb.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}}},zb.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},zb.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var t=e.offsetTop,n=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+e.clientHeight;t0&&Fb(n,e.primaryTokens,zb.RESULT_PRIMARY_HTML),Fb(n,e.secondaryTokens,zb.RESULT_SECONDARY_HTML),ue(n,zb.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},zb.prototype.registerProvider=function(e){this._searchProvider=e},zb.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,he(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},zb.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,he(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))},zb.prototype.toggle=function(){this.isOpen()?this.close():this.open()},zb.prototype.isOpen=function(){return this._open},zb.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&he(t).remove(zb.RESULT_SELECTED_CLASS);var n=ue(e,zb.RESULT_ID_ATTRIBUTE),i=this._results[n].element;he(e).add(zb.RESULT_SELECTED_CLASS),this._resetOverlay(i),this._canvas.scrollToElement(i,{top:400}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},zb.prototype._select=function(e){var t=ue(e,zb.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this.close(),this._resetOverlay(),this._canvas.scrollToElement(n,{top:400}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},zb.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=function(e){var t=6,n=e.width+2*t,i=e.height+2*t,r={width:n+"px",height:i+"px"},o=Re('
      ');return pe(o,r),{position:{bottom:i-t,right:n-t},show:!0,html:o}}(qr(e));this._overlayId=this._overlays.add(e,t)}},zb.prototype._getBoxHtml=function(){const e=Re(zb.BOX_HTML),t=Te(zb.INPUT_SELECTOR,e);return t&&t.setAttribute("aria-label",this._translate("Search in diagram")),e},zb.CONTAINER_SELECTOR=".djs-search-container",zb.INPUT_SELECTOR=".djs-search-input input",zb.RESULTS_CONTAINER_SELECTOR=".djs-search-results",zb.RESULT_SELECTOR=".djs-search-result",zb.RESULT_SELECTED_CLASS="djs-search-result-selected",zb.RESULT_SELECTED_SELECTOR="."+zb.RESULT_SELECTED_CLASS,zb.RESULT_ID_ATTRIBUTE="data-result-id",zb.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",zb.OVERLAY_CLASS="djs-search-overlay",zb.BOX_HTML='
      ',zb.RESULT_HTML='
      ',zb.RESULT_PRIMARY_HTML='
      ',zb.RESULT_SECONDARY_HTML='

      ';const Hb={__depends__:[Vi,to,ta],searchPad:["type",zb]};function Vb(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function Gb(e){return O(e,(function(e){return!!e.matched})).length>0}function Wb(e,t){var n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();var r=e.indexOf(t);return r>-1?(0!==r&&n.push({normal:i.substr(0,r)}),n.push({matched:i.substr(r,t.length)}),t.length+r')},qb.prototype._interactionModules=[va,Aa,Ba],qb.prototype._modelingModules=[_c,Ic,Jc,Vc,Zl,ip,op,Cy,Wh,Bh,Dy,Iy,Qy,ev,nv,pv,Pv,qg,jv,Wv,fb,yb,_v,$b,Ub],qb.prototype._modules=[].concat(na.prototype._modules,qb.prototype._interactionModules,qb.prototype._modelingModules);const Kb={name:"Camunda",uri:"http://camunda.org/schema/1.0/bpmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:[{name:"Definitions",isAbstract:!0,extends:["bpmn:Definitions"],properties:[{name:"diagramRelationId",isAttr:!0,type:"String"}]},{name:"InOutBinding",superClass:["Element"],isAbstract:!0,properties:[{name:"source",isAttr:!0,type:"String"},{name:"sourceExpression",isAttr:!0,type:"String"},{name:"target",isAttr:!0,type:"String"},{name:"businessKey",isAttr:!0,type:"String"},{name:"local",isAttr:!0,type:"Boolean",default:!1},{name:"variables",isAttr:!0,type:"String"}]},{name:"In",superClass:["InOutBinding"],meta:{allowedIn:["bpmn:CallActivity","bpmn:SignalEventDefinition"]}},{name:"Out",superClass:["InOutBinding"],meta:{allowedIn:["bpmn:CallActivity"]}},{name:"AsyncCapable",isAbstract:!0,extends:["bpmn:Activity","bpmn:Gateway","bpmn:Event"],properties:[{name:"async",isAttr:!0,type:"Boolean",default:!1},{name:"asyncBefore",isAttr:!0,type:"Boolean",default:!1},{name:"asyncAfter",isAttr:!0,type:"Boolean",default:!1},{name:"exclusive",isAttr:!0,type:"Boolean",default:!0}]},{name:"JobPriorized",isAbstract:!0,extends:["bpmn:Process","camunda:AsyncCapable"],properties:[{name:"jobPriority",isAttr:!0,type:"String"}]},{name:"SignalEventDefinitionExtension",isAbstract:!0,extends:["bpmn:SignalEventDefinition"],properties:[{name:"async",isAttr:!0,type:"Boolean",default:!1}]},{name:"ErrorEventDefinitionExtension",isAbstract:!0,extends:["bpmn:ErrorEventDefinition"],properties:[{name:"errorCodeVariable",isAttr:!0,type:"String"},{name:"errorMessageVariable",isAttr:!0,type:"String"}]},{name:"ErrorEventDefinition",superClass:["bpmn:ErrorEventDefinition","Element"],properties:[{name:"expression",isAttr:!0,type:"String"}],meta:{allowedIn:["bpmn:ServiceTask"]}},{name:"Error",isAbstract:!0,extends:["bpmn:Error"],properties:[{name:"camunda:errorMessage",isAttr:!0,type:"String"}]},{name:"PotentialStarter",superClass:["Element"],properties:[{name:"resourceAssignmentExpression",type:"bpmn:ResourceAssignmentExpression"}]},{name:"FormSupported",isAbstract:!0,extends:["bpmn:StartEvent","bpmn:UserTask"],properties:[{name:"formHandlerClass",isAttr:!0,type:"String"},{name:"formKey",isAttr:!0,type:"String"},{name:"formRef",isAttr:!0,type:"String"},{name:"formRefBinding",isAttr:!0,type:"String"},{name:"formRefVersion",isAttr:!0,type:"String"}]},{name:"TemplateSupported",isAbstract:!0,extends:["bpmn:Collaboration","bpmn:Process","bpmn:FlowElement"],properties:[{name:"modelerTemplate",isAttr:!0,type:"String"},{name:"modelerTemplateVersion",isAttr:!0,type:"Integer"}]},{name:"Initiator",isAbstract:!0,extends:["bpmn:StartEvent"],properties:[{name:"initiator",isAttr:!0,type:"String"}]},{name:"ScriptTask",isAbstract:!0,extends:["bpmn:ScriptTask"],properties:[{name:"resultVariable",isAttr:!0,type:"String"},{name:"resource",isAttr:!0,type:"String"}]},{name:"Process",isAbstract:!0,extends:["bpmn:Process"],properties:[{name:"candidateStarterGroups",isAttr:!0,type:"String"},{name:"candidateStarterUsers",isAttr:!0,type:"String"},{name:"versionTag",isAttr:!0,type:"String"},{name:"historyTimeToLive",isAttr:!0,type:"String"},{name:"isStartableInTasklist",isAttr:!0,type:"Boolean",default:!0}]},{name:"EscalationEventDefinitionExtension",isAbstract:!0,extends:["bpmn:EscalationEventDefinition"],properties:[{name:"escalationCodeVariable",isAttr:!0,type:"String"}]},{name:"FormalExpression",isAbstract:!0,extends:["bpmn:FormalExpression"],properties:[{name:"resource",isAttr:!0,type:"String"}]},{name:"Assignable",extends:["bpmn:UserTask"],properties:[{name:"assignee",isAttr:!0,type:"String"},{name:"candidateUsers",isAttr:!0,type:"String"},{name:"candidateGroups",isAttr:!0,type:"String"},{name:"dueDate",isAttr:!0,type:"String"},{name:"followUpDate",isAttr:!0,type:"String"},{name:"priority",isAttr:!0,type:"String"}]},{name:"CallActivity",extends:["bpmn:CallActivity"],properties:[{name:"calledElementBinding",isAttr:!0,type:"String",default:"latest"},{name:"calledElementVersion",isAttr:!0,type:"String"},{name:"calledElementVersionTag",isAttr:!0,type:"String"},{name:"calledElementTenantId",isAttr:!0,type:"String"},{name:"caseRef",isAttr:!0,type:"String"},{name:"caseBinding",isAttr:!0,type:"String",default:"latest"},{name:"caseVersion",isAttr:!0,type:"String"},{name:"caseTenantId",isAttr:!0,type:"String"},{name:"variableMappingClass",isAttr:!0,type:"String"},{name:"variableMappingDelegateExpression",isAttr:!0,type:"String"}]},{name:"ServiceTaskLike",extends:["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"resultVariable",isAttr:!0,type:"String"}]},{name:"DmnCapable",extends:["bpmn:BusinessRuleTask"],properties:[{name:"decisionRef",isAttr:!0,type:"String"},{name:"decisionRefBinding",isAttr:!0,type:"String",default:"latest"},{name:"decisionRefVersion",isAttr:!0,type:"String"},{name:"mapDecisionResult",isAttr:!0,type:"String",default:"resultList"},{name:"decisionRefTenantId",isAttr:!0,type:"String"}]},{name:"ExternalCapable",extends:["camunda:ServiceTaskLike"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"topic",isAttr:!0,type:"String"}]},{name:"TaskPriorized",extends:["bpmn:Process","camunda:ExternalCapable"],properties:[{name:"taskPriority",isAttr:!0,type:"String"}]},{name:"Properties",superClass:["Element"],meta:{allowedIn:["*"]},properties:[{name:"values",type:"Property",isMany:!0}]},{name:"Property",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"name",type:"String",isAttr:!0},{name:"value",type:"String",isAttr:!0}]},{name:"Connector",superClass:["Element"],meta:{allowedIn:["camunda:ServiceTaskLike"]},properties:[{name:"inputOutput",type:"InputOutput"},{name:"connectorId",type:"String"}]},{name:"InputOutput",superClass:["Element"],meta:{allowedIn:["bpmn:FlowNode","camunda:Connector"]},properties:[{name:"inputOutput",type:"InputOutput"},{name:"connectorId",type:"String"},{name:"inputParameters",isMany:!0,type:"InputParameter"},{name:"outputParameters",isMany:!0,type:"OutputParameter"}]},{name:"InputOutputParameter",properties:[{name:"name",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"},{name:"definition",type:"InputOutputParameterDefinition"}]},{name:"InputOutputParameterDefinition",isAbstract:!0},{name:"List",superClass:["InputOutputParameterDefinition"],properties:[{name:"items",isMany:!0,type:"InputOutputParameterDefinition"}]},{name:"Map",superClass:["InputOutputParameterDefinition"],properties:[{name:"entries",isMany:!0,type:"Entry"}]},{name:"Entry",properties:[{name:"key",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"},{name:"definition",type:"InputOutputParameterDefinition"}]},{name:"Value",superClass:["InputOutputParameterDefinition"],properties:[{name:"id",isAttr:!0,type:"String"},{name:"name",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"}]},{name:"Script",superClass:["InputOutputParameterDefinition"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"resource",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"}]},{name:"Field",superClass:["Element"],meta:{allowedIn:["camunda:ServiceTaskLike","camunda:ExecutionListener","camunda:TaskListener"]},properties:[{name:"name",isAttr:!0,type:"String"},{name:"expression",type:"String"},{name:"stringValue",isAttr:!0,type:"String"},{name:"string",type:"String"}]},{name:"InputParameter",superClass:["InputOutputParameter"]},{name:"OutputParameter",superClass:["InputOutputParameter"]},{name:"Collectable",isAbstract:!0,extends:["bpmn:MultiInstanceLoopCharacteristics"],superClass:["camunda:AsyncCapable"],properties:[{name:"collection",isAttr:!0,type:"String"},{name:"elementVariable",isAttr:!0,type:"String"}]},{name:"FailedJobRetryTimeCycle",superClass:["Element"],meta:{allowedIn:["camunda:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},properties:[{name:"body",isBody:!0,type:"String"}]},{name:"ExecutionListener",superClass:["Element"],meta:{allowedIn:["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"event",isAttr:!0,type:"String"},{name:"script",type:"Script"},{name:"fields",type:"Field",isMany:!0}]},{name:"TaskListener",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"event",isAttr:!0,type:"String"},{name:"script",type:"Script"},{name:"fields",type:"Field",isMany:!0},{name:"id",type:"String",isAttr:!0},{name:"eventDefinitions",type:"bpmn:TimerEventDefinition",isMany:!0}]},{name:"FormProperty",superClass:["Element"],meta:{allowedIn:["bpmn:StartEvent","bpmn:UserTask"]},properties:[{name:"id",type:"String",isAttr:!0},{name:"name",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0},{name:"required",type:"String",isAttr:!0},{name:"readable",type:"String",isAttr:!0},{name:"writable",type:"String",isAttr:!0},{name:"variable",type:"String",isAttr:!0},{name:"expression",type:"String",isAttr:!0},{name:"datePattern",type:"String",isAttr:!0},{name:"default",type:"String",isAttr:!0},{name:"values",type:"Value",isMany:!0}]},{name:"FormData",superClass:["Element"],meta:{allowedIn:["bpmn:StartEvent","bpmn:UserTask"]},properties:[{name:"fields",type:"FormField",isMany:!0},{name:"businessKey",type:"String",isAttr:!0}]},{name:"FormField",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"label",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0},{name:"datePattern",type:"String",isAttr:!0},{name:"defaultValue",type:"String",isAttr:!0},{name:"properties",type:"Properties"},{name:"validation",type:"Validation"},{name:"values",type:"Value",isMany:!0}]},{name:"Validation",superClass:["Element"],properties:[{name:"constraints",type:"Constraint",isMany:!0}]},{name:"Constraint",superClass:["Element"],properties:[{name:"name",type:"String",isAttr:!0},{name:"config",type:"String",isAttr:!0}]},{name:"ConditionalEventDefinitionExtension",isAbstract:!0,extends:["bpmn:ConditionalEventDefinition"],properties:[{name:"variableName",isAttr:!0,type:"String"},{name:"variableEvents",isAttr:!0,type:"String"}]}],emumerations:[]};function Xb(e,t,i="camunda"){let r={};const c=n.ref(1);n.ref(!1);const{createBpmnModeler:l}=function(e,t,n="camunda"){const i=()=>{const e=[],t={translate:["value",b]};return e.push(t),e.push(s),e.push(a.BpmnPropertiesPanelModule),e.push(a.BpmnPropertiesProviderModule),e.push(a.CamundaPlatformPropertiesProviderModule),e},r=()=>{const e={};return"camunda"===n&&(e.camunda=Kb),e};return{createBpmnModeler:()=>new qb({container:e,propertiesPanel:{parent:t},keyboard:{bindTo:document},additionalModules:i(),moddleExtensions:r()})}}(e,t,i),p=e=>r.get(e),u=()=>p("canvas"),d=()=>p("commandStack"),h=async e=>{try{const t=await r.importXML(e),{warnings:n}=t}catch(t){f("Could not create BPMN 2.0 diagram!",t)}},m=()=>{const e=p("eventBus");["diagram.init","element.hover","element.out","element.click","element.dblclick","element.mousedown","element.mouseup"].forEach((t=>{e.on(t,(e=>{t.replace(/\./g,"-"),e&&e.element}))}))},v=async(e,t="diagram")=>{try{if("xml"===e||"bpmn"===e){const{xml:n}=await r.saveXML(),{href:i,filename:o}=y(e,t,n);g(i,o)}else{const{svg:e}=await r.saveSVG(),{href:n,filename:i}=y("svg",t,e);g(n,i)}}catch(n){f("Could not download diagram!",n)}},x=e=>{const t=p("alignElements"),n=p("selection").get();!n||n.length<=1?o.toast.warning("请按住 Ctrl 键选择多个元素对齐"):o.standardDeleteNotify((()=>{t.trigger(n,e)}))};return{init:e=>{r=l(),m(),h(e)},destroy:()=>{o.lodash.isEmpty(r)||(r.destroy(),r={})},importDiagram:h,downloadAsXml:(e="diagram")=>{v("xml",e)},downloadAsBpmn:(e="diagram")=>{v("bpmn",e)},downloadAsSvg:(e="diagram")=>{v("svg",e)},undo:()=>d().undo(),redo:()=>d().redo(),zoom:c,zoomMinus:(e=.1)=>{const t=Math.floor(100*c.value-100*e)/100;c.value=t,u().zoom(c.value)},zoomPlus:(e=.1)=>{const t=Math.floor(100*c.value+100*e)/100;c.value=t,u().zoom(c.value)},zoomReset:()=>{c.value=1,u().zoom("fit-viewport","auto")},alignLeft:()=>{x("left")},alignRight:()=>{x("right")},alignTop:()=>{x("top")},alignBottom:()=>{x("bottom")},alignHorizontalCenter:()=>{x("center")},alignVerticalCenter:()=>{x("middle")},playSimulation:()=>{p("toggleMode").toggleMode()}}}function Yb(e,t,n){let i={};return{init:r=>{i=new na({container:e,height:t}),(async e=>{await i.importXML(e);const t=i.get("canvas");t.zoom("fit-viewport","auto"),o.lodash.isEmpty(n)||n.forEach((e=>{var n;t.addMarker(e,"highlight");const i=null==(n=document.querySelector(".highlight"))?void 0:n.querySelector(".djs-visual rect");i&&i.setAttribute("stroke-dasharray","4,4")}))})(r)},destroy:()=>{o.lodash.isEmpty(i)||(i.destroy(),i={})}}}const Zb=n.defineComponent({name:"HBpmnDesigner",props:{diagram:{type:String,default:""},type:{type:String,default:"camunda"},service:{type:Object,required:!0},height:{type:String,default:"90vh"}},setup(e){const t=n.ref(""),{init:i,destroy:r,importDiagram:a,downloadAsXml:s,downloadAsBpmn:c,downloadAsSvg:l,undo:p,redo:u,zoom:d,zoomPlus:h,zoomMinus:f,zoomReset:g,alignLeft:y,alignRight:v,alignTop:b,alignBottom:x,alignHorizontalCenter:_,alignVerticalCenter:w,playSimulation:E}=Xb("#bpmn-canvas","#bpmn-properties-panel",e.type);n.onBeforeUnmount((()=>{r()})),n.onMounted((()=>{try{i(m)}catch(e){}})),n.watch(t,(e=>{a(e)}));return{openedDiagram:t,onReset:()=>{a(m)},importDiagram:a,downloadAsXml:s,downloadAsBpmn:c,downloadAsSvg:l,undo:p,redo:u,zoom:d,zoomPlus:h,zoomMinus:f,zoomReset:g,alignLeft:y,alignRight:v,alignTop:b,alignBottom:x,alignHorizontalCenter:_,alignVerticalCenter:w,playSimulation:E,onSave:t=>{e.service.create(t).then((e=>{o.toast.success("模型部署成功!")})).catch((e=>{o.toast.error("模型部署失败!")}))}}}}),Qb=n.createElementVNode("div",{class:"bpmn-container full-height"},[n.createElementVNode("div",{id:"bpmn-canvas",class:"bpmn-canvas"})],-1),Jb=n.createElementVNode("div",{id:"bpmn-properties-panel",class:"full-height"},null,-1);const ex=u(Zb,[["render",function(e,i,r,o,a,s){const c=h,l=n.resolveComponent("h-column"),p=n.resolveComponent("h-row"),u=t.QCard;return n.openBlock(),n.createBlock(u,null,{default:n.withCtx((()=>[n.createVNode(p,{style:n.normalizeStyle(`height: ${e.height}`)},{default:n.withCtx((()=>[n.createVNode(l,{cols:10},{default:n.withCtx((()=>[n.createVNode(c,{file:e.openedDiagram,"onUpdate:file":i[0]||(i[0]=t=>e.openedDiagram=t),zoom:e.zoom,onDownloadXml:i[1]||(i[1]=t=>e.downloadAsXml()),onDownloadSvg:i[2]||(i[2]=t=>e.downloadAsSvg()),onDownloadBpmn:i[3]||(i[3]=t=>e.downloadAsBpmn()),onAlignRight:i[4]||(i[4]=t=>e.alignRight()),onAlignLeft:i[5]||(i[5]=t=>e.alignLeft()),onAlignTop:i[6]||(i[6]=t=>e.alignTop()),onAlignBottom:i[7]||(i[7]=t=>e.alignBottom()),onAlignHorizontalCenter:i[8]||(i[8]=t=>e.alignHorizontalCenter()),onAlignVerticalCenter:i[9]||(i[9]=t=>e.alignVerticalCenter()),onZoomPlus:i[10]||(i[10]=t=>e.zoomPlus()),onZoomMinus:i[11]||(i[11]=t=>e.zoomMinus()),onZoomReset:i[12]||(i[12]=t=>e.zoomReset()),onRedo:i[13]||(i[13]=t=>e.redo()),onUndo:i[14]||(i[14]=t=>e.undo()),onRefresh:i[15]||(i[15]=t=>e.onReset()),onSimulation:i[16]||(i[16]=t=>e.playSimulation()),onSave:e.onSave},null,8,["file","zoom","onSave"]),Qb])),_:1}),n.createVNode(l,{cols:2},{default:n.withCtx((()=>[Jb])),_:1})])),_:1},8,["style"])])),_:1})}]]),tx=n.defineComponent({name:"HBpmnViewer",props:{diagram:{type:String,default:""},nodes:{type:Array,default:()=>[]},height:{type:[String,Number],default:"500px"}},setup(e){const{init:t,destroy:i}=Yb("#bpmn-viewer",e.height,e.nodes);return n.onBeforeUnmount((()=>{i()})),n.onMounted((()=>{try{t(e.diagram)}catch(n){}})),{}}}),nx={id:"bpmn-viewer",class:"bpmn-viewer-canvas"};const ix=u(tx,[["render",function(e,t,i,r,o,a){return n.openBlock(),n.createElementBlock("div",nx)}]]);ex.install=e=>{e.component(ex.name,ex)},ix.install=e=>{e.component(ix.name,ix)};const rx=[ex,ix],ox={install:e=>{rx.map((t=>e.component(t.name,t)))}};Object.defineProperty(e,"DeploymentService",{enumerable:!0,get:()=>r.DeploymentService}),Object.defineProperty(e,"Swal",{enumerable:!0,get:()=>o.Swal}),Object.defineProperty(e,"lodash",{enumerable:!0,get:()=>o.lodash}),Object.defineProperty(e,"standardDeleteNotify",{enumerable:!0,get:()=>o.standardDeleteNotify}),Object.defineProperty(e,"toast",{enumerable:!0,get:()=>o.toast}),e.Translator=b,e.default=ox,e.download=g,e.downloadEncode=y,e.error=(e,...t)=>{},e.exception=f,e.log=(e,...t)=>{},Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})); diff --git a/shared/bpmn-designer/package.json b/shared/bpmn-designer/package.json index c95086ff..ff889c7f 100644 --- a/shared/bpmn-designer/package.json +++ b/shared/bpmn-designer/package.json @@ -31,13 +31,13 @@ "@herodotus/bpmn-apis": "workspace:^", "@herodotus/components": "workspace:^", "@herodotus/core": "workspace:^", - "bpmn-js": "^17.8.2", + "bpmn-js": "^17.9.0", "bpmn-js-properties-panel": "^5.18.0", "bpmn-js-token-simulation": "^0.34.2", "camunda-bpmn-js-behaviors": "^1.3.0", "camunda-bpmn-moddle": "^7.0.1", - "diagram-js": "^14.7.1", - "preact": "^10.22.0", + "diagram-js": "^14.8.0", + "preact": "^10.22.1", "zeebe-bpmn-moddle": "^1.1.0" }, "devDependencies": { diff --git a/shared/components/package.json b/shared/components/package.json index ff692568..f3973f6a 100644 --- a/shared/components/package.json +++ b/shared/components/package.json @@ -29,9 +29,9 @@ "dependencies": { "@herodotus/core": "workspace:^", "@mdi/js": "^7.4.47", - "@tsparticles/basic": "^3.4.0", - "@tsparticles/engine": "^3.4.0", - "@tsparticles/interaction-particles-links": "^3.4.0", + "@tsparticles/basic": "^3.5.0", + "@tsparticles/engine": "^3.5.0", + "@tsparticles/interaction-particles-links": "^3.5.0", "quasar": "^2.16.4" } } diff --git a/shared/core/package.json b/shared/core/package.json index 9a9d1735..0ab77b43 100644 --- a/shared/core/package.json +++ b/shared/core/package.json @@ -34,7 +34,7 @@ "lodash-es": "^4.17.21", "moment": "^2.30.1", "sm-crypto": "^0.3.13", - "sweetalert2": "^11.12.0" + "sweetalert2": "^11.12.1" }, "devDependencies": { "@types/crypto-js": "^4.2.2",