camunda-bpmn-js 5.16.0 → 5.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-modeler.development.js +57150 -53965
- package/dist/base-modeler.production.min.js +45 -45
- package/dist/base-navigated-viewer.development.js +1958 -1314
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +1221 -599
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +11564 -7177
- package/dist/camunda-cloud-modeler.production.min.js +47 -47
- package/dist/camunda-cloud-navigated-viewer.development.js +1850 -1171
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +1842 -1185
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +9064 -4379
- package/dist/camunda-platform-modeler.production.min.js +45 -45
- package/dist/camunda-platform-navigated-viewer.development.js +1839 -1183
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +1818 -1184
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/lib/base/Modeler.js +12 -0
- package/lib/base/NavigatedViewer.js +10 -0
- package/lib/base/Viewer.js +10 -0
- package/lib/camunda-cloud/ElementTemplatesValidator.js +10 -0
- package/lib/camunda-cloud/Modeler.js +10 -0
- package/lib/camunda-cloud/NavigatedViewer.js +10 -0
- package/lib/camunda-cloud/Viewer.js +10 -0
- package/lib/camunda-cloud/features/external-resources/README.md +1 -1
- package/lib/camunda-cloud/features/external-resources/ResourceLoader.d.ts +9 -0
- package/lib/camunda-cloud/features/external-resources/ResourceLoader.js +10 -0
- package/lib/camunda-cloud/features/external-resources/Resources.d.ts +9 -0
- package/lib/camunda-cloud/features/external-resources/Resources.js +10 -0
- package/lib/camunda-cloud/features/external-resources/cmd/ComposedCommandHandler.d.ts +9 -0
- package/lib/camunda-cloud/features/external-resources/cmd/ComposedCommandHandler.js +10 -0
- package/lib/camunda-cloud/features/external-resources/cmd/index.js +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/AppendMenuProvider.js +11 -1
- package/lib/camunda-cloud/features/external-resources/handlers/decision/CreateMenuProvider.js +11 -1
- package/lib/camunda-cloud/features/external-resources/handlers/decision/ReplaceMenuProvider.js +11 -1
- package/lib/camunda-cloud/features/external-resources/handlers/decision/createElement.d.ts +15 -5
- package/lib/camunda-cloud/features/external-resources/handlers/decision/createElement.js +29 -4
- package/lib/camunda-cloud/features/external-resources/handlers/decision/index.js +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/replaceElement.js +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/searchTerms.d.ts +9 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/searchTerms.js +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/AppendMenuProvider.js +11 -1
- package/lib/camunda-cloud/features/external-resources/handlers/form/CreateMenuProvider.js +11 -1
- package/lib/camunda-cloud/features/external-resources/handlers/form/ReplaceMenuProvider.js +11 -1
- package/lib/camunda-cloud/features/external-resources/handlers/form/createElement.d.ts +15 -1
- package/lib/camunda-cloud/features/external-resources/handlers/form/createElement.js +28 -3
- package/lib/camunda-cloud/features/external-resources/handlers/form/index.js +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/replaceElement.js +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/searchTerms.d.ts +9 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/searchTerms.js +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/AppendMenuProvider.js +11 -1
- package/lib/camunda-cloud/features/external-resources/handlers/process/CreateMenuProvider.js +11 -1
- package/lib/camunda-cloud/features/external-resources/handlers/process/ReplaceMenuProvider.js +11 -1
- package/lib/camunda-cloud/features/external-resources/handlers/process/createElement.d.ts +14 -5
- package/lib/camunda-cloud/features/external-resources/handlers/process/createElement.js +35 -4
- package/lib/camunda-cloud/features/external-resources/handlers/process/index.js +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/replaceElement.js +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/searchTerms.d.ts +9 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/searchTerms.js +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/AppendMenuProvider.d.ts +6 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/AppendMenuProvider.js +41 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/CreateMenuProvider.d.ts +6 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/CreateMenuProvider.js +41 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/ReplaceMenuProvider.d.ts +6 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/ReplaceMenuProvider.js +41 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/constants.d.ts +12 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/constants.js +14 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/createElement.d.ts +14 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/createElement.js +61 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/index.d.ts +8 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/index.js +20 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/replaceElement.d.ts +15 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/replaceElement.js +59 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/searchTerms.d.ts +10 -0
- package/lib/camunda-cloud/features/external-resources/handlers/rpa/searchTerms.js +11 -0
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseAppendMenuProvider.d.ts +21 -4
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseAppendMenuProvider.js +26 -8
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseCreateMenuProvider.d.ts +19 -3
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseCreateMenuProvider.js +24 -7
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseReplaceMenuProvider.d.ts +6 -2
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseReplaceMenuProvider.js +19 -6
- package/lib/camunda-cloud/features/external-resources/index.d.ts +4 -0
- package/lib/camunda-cloud/features/external-resources/index.js +13 -1
- package/lib/camunda-cloud/features/popup-menu/CamundaDetailsPopupMenuProvider.js +10 -0
- package/lib/camunda-cloud/features/popup-menu/index.js +10 -0
- package/lib/camunda-cloud/util/commonModules.js +10 -0
- package/lib/camunda-platform/Modeler.js +10 -0
- package/lib/camunda-platform/NavigatedViewer.js +10 -0
- package/lib/camunda-platform/Viewer.js +10 -0
- package/lib/camunda-platform/util/commonModules.js +10 -0
- package/lib/util/ExtensionElementsUtil.js +10 -0
- package/package.json +20 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnViewer=t()}(this,(function(){"use strict";function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const t=Object.prototype.toString,n=Object.prototype.hasOwnProperty;function i(e){return void 0===e}function r(e){return void 0!==e}function o(e){return null==e}function a(e){return"[object Array]"===t.call(e)}function s(e){return"[object Object]"===t.call(e)}function l(e){return"[object Number]"===t.call(e)}function p(e){const n=t.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function c(e){return"[object String]"===t.call(e)}function u(e,t){return!o(e)&&n.call(e,t)}function m(e,t){const n=b(t);let i;return f(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function h(e,t){const n=b(t);let i=[];return f(e,(function(e,t){n(e,t)&&i.push(e)})),i}function f(e,t){let n,r;if(i(e))return;const o=a(e)?E:x;for(let i in e)if(u(e,i)&&(n=e[i],r=t(n,o(i)),!1===r))return n}function d(e,t,n){return f(e,(function(e,i){n=t(n,e,i)})),n}function y(e,t){return!!d(e,(function(e,n,i){return e&&t(n,i)}),!0)}function g(e,t){return!!m(e,t)}function v(e){return function(t){return y(e,(function(e,n){return t[n]===e}))}}function b(e){return p(e)?e:t=>t===e}function x(e){return e}function E(e){return Number(e)}function w(e,t){return e.bind(t)}function _(e,...t){return Object.assign(e,...t)}var A=1e3;function S(e,t){var n=this;t=t||A,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 k(e,t){var n=C(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function R(e,t){return g(t,(function(t){return k(e,t)}))}function C(e){return e&&e.businessObject||e}function M(e){return e&&e.di}function P(e,t){return!k(e,"bpmn:CallActivity")&&(k(e,"bpmn:SubProcess")?!(!(t=t||M(e))||!k(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!k(e,"bpmn:Participant")||!!C(e).processRef)}function T(e){if(k(e,"bpmn:Participant")||k(e,"bpmn:Lane")){var t=M(e).isHorizontal;return void 0===t||t}}function D(e){return s(e)&&u(e,"labelTarget")}S.prototype.canRender=function(e){},S.prototype.drawShape=function(e,t){},S.prototype.drawConnection=function(e,t){},S.prototype.getShapePath=function(e){},S.prototype.getConnectionPath=function(e){};var N={width:90,height:20},O=15;function B(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)<Math.PI/2?s-=O:a+=O,{x:a,y:s}}function I(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(N.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=function(e){return e.waypoints?B(e.waypoints):k(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+N.height/2}:{x:e.x+e.width/2,y:e.y+e.height+N.height/2}}(t),i=N),_({x:n.x-i.width/2,y:n.y-i.height/2},i)}function L(e){var t=e.businessObject,n=function(e){return k(e,"bpmn:FlowElement")||k(e,"bpmn:Participant")||k(e,"bpmn:Lane")||k(e,"bpmn:SequenceFlow")||k(e,"bpmn:MessageFlow")||k(e,"bpmn:DataInput")||k(e,"bpmn:DataOutput")?"name":k(e,"bpmn:TextAnnotation")?"text":k(e,"bpmn:Group")?"categoryValueRef":void 0}(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function F(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}var j=2,V={"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":j,"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":j,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function z(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=V[i];r?(r===j&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function W(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return V[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);z(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)z(e,i,t[i])}(e,t);return e}const $=Object.prototype.toString;function G(e){return new H(e)}function H(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}H.prototype.add=function(e){return this.list.add(e),this},H.prototype.remove=function(e){return"[object RegExp]"==$.call(e)?this.removeMatching(e):(this.list.remove(e),this)},H.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},H.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},H.prototype.array=function(){return Array.from(this.list)},H.prototype.has=H.prototype.contains=function(e){return this.list.contains(e)};var U={svg:"http://www.w3.org/2000/svg"},K='<svg xmlns="'+U.svg+'"';function q(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(U.svg)&&(e=K+e.substring(4)):(e=K+">"+e+"</svg>",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 Y(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=q(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(U.svg,e),t&&W(n,t),n}var X=null;function Z(){return null===X&&(X=Y("svg")),X}function J(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function Q(e){return Z().createSVGTransform()}var ee=/([&<>]{1})/g,te=/([\n\r"]{1})/g,ne={"&":"&","<":"<",">":">",'"':"'"};function ie(e,t){return e.replace(t,(function(e,t){return ne[t]||t}))}function re(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(ie(e.textContent,ee));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',ie(o.value,te),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)re(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",ie(e.nodeValue,ee),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function oe(e,t){return function(e){for(var t=e.firstChild,n=[];t;)re(t,n),t=t.nextSibling;return n.join("")}(e)}function ae(e){var t=e.parentNode;return t&&t.removeChild(e),e}function se(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function le(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(se(e,i))}(n,t)),n.consolidate()}function pe(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function ce(e){return["L",e.x,e.y]}function ue(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,a,s;for(let r=1;r<n;r++){const n=e[r-1],l=e[r],p=e[r+1];if(!p||!t){i.push(ce(l));continue}const c=Math.min(t,he(l.x-n.x,l.y-n.y),he(p.x-l.x,p.y-l.y));if(!c){i.push(ce(l));continue}const u=me(l,n,c),m=me(l,n,.5*c),h=me(l,p,c),f=me(l,p,.5*c);i.push(ce(u)),i.push((a=f,s=h,["C",(o=m).x,o.y,a.x,a.y,s.x,s.y]))}return i}function me(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/he(i,r);return{x:e.x+i*o,y:e.y+r*o}}function he(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function fe(e,t,n){l(t)&&(n=t,t=null),t||(t={});const i=Y("path",t);return l(n)&&(i.dataset.cornerRadius=String(n)),de(i,e)}function de(e,t){return W(e,{d:pe(ue(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}var ye="hsl(225, 10%, 15%)",ge="white";function ve(e,t){return g(e.eventDefinitions,(function(e){return e.$type===t}))}function be(e,t,n){var i=M(e);return n||i.get("color:background-color")||i.get("bioc:fill")||t||ge}function xe(e,t,n){var i=M(e);return n||i.get("color:border-color")||i.get("bioc:stroke")||t||ye}function Ee(e,t,n,i){var r=M(e).get("label");return i||r&&r.get("color:color")||t||xe(e,n)}function we(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return pe([["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"]])}function _e(e,t={}){return{width:Ae(e,t),height:Se(e,t)}}function Ae(e,t={}){return u(t,"width")?t.width:e.width}function Se(e,t={}){return u(t,"height")?t.height:e.height}function ke(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,Ce=Object.prototype.hasOwnProperty;function Me(e,t){return Ce.call(e,t)}function Pe(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===Re.call(e)}(e)?De:Te;for(let o in e)if(Me(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function Te(e){return e}function De(e){return Number(e)}function Ne(e,...t){const n=e.style;return Pe(t,(function(e){e&&Pe(e,(function(e,t){n[t]=e}))})),e}const Oe=Object.prototype.toString;function Be(e){return new Ie(e)}function Ie(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Ie.prototype.add=function(e){return this.list.add(e),this},Ie.prototype.remove=function(e){return"[object RegExp]"==Oe.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Ie.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Ie.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Ie.prototype.array=function(){return Array.from(this.list)},Ie.prototype.has=Ie.prototype.contains=function(e){return this.list.contains(e)};var Le,Fe,je,Ve={};function ze(){Le=window.addEventListener?"addEventListener":"attachEvent",Fe=window.removeEventListener?"removeEventListener":"detachEvent",je="addEventListener"!==Le?"on":""}var We=ke({__proto__:null,bind:Ve.bind=function(e,t,n,i){return Le||ze(),e[Le](je+t,n,i||!1),n},unbind:Ve.unbind=function(e,t,n,i){return Fe||ze(),e[Fe](je+t,n,i||!1),n},default:Ve},[Ve]),$e=["focus","blur"];var Ge,He={bind:function(e,t,n,i,r){return-1!==$e.indexOf(n)&&(r=!0),We.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=function(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==$e.indexOf(t)&&(i=!0),We.unbind(e,t,n,i)}},Ue=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=Object.prototype.hasOwnProperty.call(qe,i)?qe[i]:qe._default,a=o[0],s=o[1],l=o[2];(r=t.createElement("div")).innerHTML=s+e+l;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},Ke=!1;"undefined"!=typeof document&&((Ge=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',Ke=!Ge.getElementsByTagName("link").length,Ge=void 0);var qe={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:Ke?[1,"X<div>","</div>"]:[0,"",""]};qe.td=qe.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],qe.option=qe.optgroup=[1,'<select multiple="multiple">',"</select>"],qe.thead=qe.tbody=qe.colgroup=qe.caption=qe.tfoot=[1,"<table>","</table>"],qe.polyline=qe.ellipse=qe.polygon=qe.circle=qe.text=qe.line=qe.path=qe.rect=qe.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var Ye=Ue;function Xe(e,t){return(t=t||document).querySelector(e)}function Ze(e,t,n,i,r){var o=Q();o.setTranslate(t,n);var a=Q();a.setRotate(i||0,0,0);var s=Q();s.setScale(1,1),le(e,[o,a,s])}function Je(e,t,n){var i=Q();i.setTranslate(t,n),le(e,i)}var Qe=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var l=parseInt(a,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function et(e){if(!(this instanceof et))return new et(e);e=e||[128,36,1],this._seed=e.length?Qe.rack(e[0],e[1],e[2]):e}et.prototype.next=function(e){return this._seed(e||!0)},et.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},et.prototype.claim=function(e,t){this._seed.set(e,t||!0)},et.prototype.assigned=function(e){return this._seed.get(e)||!1},et.prototype.unclaim=function(e){delete this._seed.hats[e]},et.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var tt=new et,nt=.95;function it(e,t,n,i,r,o,a){S.call(this,t,a);var l=e&&e.defaultFillColor,p=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor;function u(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:ye,strokeWidth:2,fill:"white"})}function m(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:ye,strokeWidth:2})}function h(e,t){var{ref:n={x:0,y:0},scale:i=1,element:o,parentGfx:a=r._svg}=t,s=Y("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*i,markerHeight:20*i,orient:"auto"});F(s,o);var l=Xe(":scope > defs",a);l||F(a,l=Y("defs")),F(l,s)}function d(e,t,n,i){var r=tt.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){h(t,{element:Y("path",{d:"M 1 5 L 11 10 L 1 15 Z",...u({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("messageflow-start"===n){h(t,{element:Y("circle",{cx:6,cy:6,r:3.5,...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6},parentGfx:e})}if("messageflow-end"===n){h(t,{element:Y("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5},parentGfx:e})}if("association-start"===n){h(t,{element:Y("path",{d:"M 11 5 L 1 10 L 11 15",...m({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5,parentGfx:e})}if("association-end"===n){h(t,{element:Y("path",{d:"M 1 5 L 11 10 L 1 15",...m({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("conditional-flow-marker"===n){h(t,{element:Y("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...u({fill:i,stroke:r})}),ref:{x:-1,y:10},scale:.5,parentGfx:e})}if("conditional-default-flow-marker"===n){h(t,{element:Y("path",{d:"M 6 4 L 10 16",...u({stroke:r,fill:"none"})}),ref:{x:0,y:10},scale:.5,parentGfx:e})}}(e,r,t,n,i),"url(#"+r+")"}function y(e,t,n,i,r={}){s(i)&&(r=i,i=0),i=i||0,r=u(r);var o=Y("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return F(e,o),o}function g(e,t,n,i,r,o){s(r)&&(o=r,r=0),r=r||0,o=u(o);var a=Y("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return F(e,a),a}function v(e,t,n,i){var r=fe(t,n=m(n),i);return F(e,r),r}function b(e,t,n){return v(e,t,n,5)}function x(e,t,n){n=m(n);var i=Y("path",{...n,d:t});return F(e,i),i}function E(e,t,n,i){return x(t,n,_({"data-marker":e},i))}function w(e){return J[e]}function A(e){return function(t,n,i){return w(e)(t,n,i)}}var R={"bpmn:MessageEventDefinition":function(e,t,n={},r){return x(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.235,my:.315}}),{fill:r?xe(t,p,n.stroke):be(t,l,n.fill),stroke:r?be(t,l,n.fill):xe(t,p,n.stroke),strokeWidth:1})},"bpmn:TimerEventDefinition":function(e,t,n={}){var r=n.width||t.width,o=n.height||t.height,a=n.width?1:2,s=y(e,r,o,.2*o,{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:a});x(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:r,containerHeight:o,position:{mx:.5,my:.5}}),{stroke:xe(t,p,n.stroke),strokeWidth:a});for(var c=0;c<12;c++){var u=r/2,m=o/2;x(e,i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:r,containerHeight:o,position:{mx:.5,my:.5}}),{strokeWidth:1,stroke:xe(t,p,n.stroke),transform:"rotate("+30*c+","+m+","+u+")"})}return s},"bpmn:EscalationEventDefinition":function(e,t,n={},r){return x(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.5,my:.2}}),{fill:r?xe(t,p,n.stroke):be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(e,t,n={}){return x(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.5,my:.222}}),{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(e,t,n={},r){return x(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?xe(t,p,n.stroke):be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(e,t,n={},r){return x(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.2,my:.722}}),{fill:r?xe(t,p,n.stroke):be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(e,t,n={},r){var o=x(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?xe(t,p,n.stroke):"none",stroke:xe(t,p,n.stroke),strokeWidth:1});return function(e,t){var n=Q();n.setRotate(t,0,0),le(e,n)}(o,45),o},"bpmn:CompensateEventDefinition":function(e,t,n={},r){return x(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.22,my:.5}}),{fill:r?xe(t,p,n.stroke):be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(e,t,n={},r){return x(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:r?xe(t,p,n.stroke):be(t,l,n.fill),stroke:xe(t,p,n.stroke)})},"bpmn:MultipleEventDefinition":function(e,t,n={},r){return x(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.211,my:.36}}),{fill:r?xe(t,p,n.stroke):be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(e,t,n={}){return x(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.458,my:.194}}),{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(e,t,n={}){return y(e,t.width,t.height,8,{fill:xe(t,p,n.stroke),stroke:xe(t,p,n.stroke),strokeWidth:4})}};function D(e,t,n={},i){var r=C(e),o=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(r),a=i||e;return r.get("eventDefinitions")&&r.get("eventDefinitions").length>1?r.get("parallelMultiple")?R["bpmn:ParallelMultipleEventDefinition"](t,a,n,o):R["bpmn:MultipleEventDefinition"](t,a,n,o):ve(r,"bpmn:MessageEventDefinition")?R["bpmn:MessageEventDefinition"](t,a,n,o):ve(r,"bpmn:TimerEventDefinition")?R["bpmn:TimerEventDefinition"](t,a,n,o):ve(r,"bpmn:ConditionalEventDefinition")?R["bpmn:ConditionalEventDefinition"](t,a,n,o):ve(r,"bpmn:SignalEventDefinition")?R["bpmn:SignalEventDefinition"](t,a,n,o):ve(r,"bpmn:EscalationEventDefinition")?R["bpmn:EscalationEventDefinition"](t,a,n,o):ve(r,"bpmn:LinkEventDefinition")?R["bpmn:LinkEventDefinition"](t,a,n,o):ve(r,"bpmn:ErrorEventDefinition")?R["bpmn:ErrorEventDefinition"](t,a,n,o):ve(r,"bpmn:CancelEventDefinition")?R["bpmn:CancelEventDefinition"](t,a,n,o):ve(r,"bpmn:CompensateEventDefinition")?R["bpmn:CompensateEventDefinition"](t,a,n,o):ve(r,"bpmn:TerminateEventDefinition")?R["bpmn:TerminateEventDefinition"](t,a,n,o):null}var N={ParticipantMultiplicityMarker:function(e,t,n={}){var r=Ae(t,n),o=Se(t,n);E("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:be(t,l,n.fill),stroke:xe(t,p,n.stroke)})},SubProcessMarker:function(e,t,n={}){Je(g(e,14,14,0,{strokeWidth:1,fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke)}),t.width/2-7.5,t.height-20),E("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:be(t,l,n.fill),stroke:xe(t,p,n.stroke)})},ParallelMarker:function(e,t,n){var r=Ae(t,n),o=Se(t,n);E("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:be(t,l,n.fill),stroke:xe(t,p,n.stroke)})},SequentialMarker:function(e,t,n){E("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:be(t,l,n.fill),stroke:xe(t,p,n.stroke)})},CompensationMarker:function(e,t,n){E("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:be(t,l,n.fill),stroke:xe(t,p,n.stroke)})},LoopMarker:function(e,t,n){var r=Ae(t,n),o=Se(t,n);E("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:xe(t,p,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=Ae(t,n),o=Se(t,n);E("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:xe(t,p,n.stroke),stroke:xe(t,p,n.stroke)})}};function O(e,t,n,i){N[e](t,n,i)}function B(e,t,n=[],i={}){i={fill:i.fill,stroke:i.stroke,width:Ae(t,i),height:Se(t,i)};var r=C(t),o=n.includes("SubProcessMarker");i=o?{...i,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:{...i,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},r.get("isForCompensation")&&n.push("CompensationMarker"),k(r,"bpmn:AdHocSubProcess")&&(n.push("AdhocMarker"),o||_(i,{compensation:i.compensation-18}));var a=r.get("loopCharacteristics"),s=a&&a.get("isSequential");a&&(_(i,{compensation:i.compensation-18}),n.includes("AdhocMarker")&&_(i,{seq:-23,loop:-18,parallel:-24}),void 0===s&&n.push("LoopMarker"),!1===s&&n.push("ParallelMarker"),!0===s&&n.push("SequentialMarker")),n.includes("CompensationMarker")&&1===n.length&&_(i,{compensation:-8}),f(n,(function(n){O(n,e,t,i)}))}function I(e,t,n={}){n=_({size:{width:100}},n);var i=o.createText(t||"",n);return G(i).add("djs-label"),F(e,i),i}function j(e,t,n,i={}){var r=C(t),o=_e({x:t.x,y:t.y,width:t.width,height:t.height},i);return I(e,r.name,{align:n,box:o,padding:7,style:{fill:Ee(t,c,p,i.stroke)}})}function V(e,t,n,i={}){var r=T(n),o=I(e,t,{box:{height:30,width:r?Se(n,i):Ae(n,i)},align:"center-middle",style:{fill:Ee(n,c,p,i.stroke)}});r&&Ze(o,0,-(-1*Se(n,i)),270)}function z(e,t,n={}){var{width:i,height:r}=_e(t,n);return g(e,i,r,10,{...n,fill:be(t,l,n.fill),fillOpacity:nt,stroke:xe(t,p,n.stroke)})}function $(e,t,n={}){var i=C(t),r=be(t,l,n.fill),o=xe(t,p,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=d(e,"association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=d(e,"association-start",r,o)),n=rt(n,["markerStart","markerEnd"]),b(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function H(e,t,n={}){var r=be(t,l,n.fill),o=xe(t,p,n.stroke),a=x(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:nt,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(C(t))&&x(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 y(e,t.width,t.height,{fillOpacity:nt,...n,fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke)})}function K(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=u(i);var s=Y("polygon",{...i,points:a});return F(e,s),s}(e,t.width,t.height,{fill:be(t,l,n.fill),fillOpacity:nt,stroke:xe(t,p,n.stroke)})}function q(e,t,n={}){var i=g(e,Ae(t,n),Se(t,n),0,{fill:be(t,l,n.fill),fillOpacity:n.fillOpacity||nt,stroke:xe(t,p,n.stroke),strokeWidth:1.5}),r=C(t);k(r,"bpmn:Lane")&&V(e,r.get("name"),t,n);return i}function X(e,t,n={}){var i=z(e,t,n),r=P(t);if(function(e){return e&&!!C(e).triggeredByEvent}(t)&&(W(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!r)){var o=(C(t).flowElements||[]).filter((e=>k(e,"bpmn:StartEvent")));1===o.length&&function(e,t,n,i){var r=22,o={fill:be(i,l,n.fill),stroke:xe(i,p,n.stroke),width:r,height:r},a=C(e).isInterrupting,s=a?0:3,c=a?1:1.2,u=20,m=(r-u)/2,h="translate("+m+","+m+")";y(t,u,u,{fill:o.fill,stroke:o.stroke,strokeWidth:c,strokeDasharray:s,transform:h}),D(e,t,o,i)}(o[0],e,n,t)}return j(e,t,r?"center-top":"center-middle",n),B(e,t,r?void 0:["SubProcessMarker"],n),i}function Z(e,t,n={}){var i=z(e,t,n);return j(e,t,"center-middle",n),B(e,t,void 0,n),i}var J=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return X(e,t,n=P(t)?rt(n,["fill","stroke","width","height"]):rt(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return $(e,t,n=rt(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=rt(n,["fill","stroke"]);var r=C(t).get("cancelActivity");n={strokeWidth:1.5,fill:be(t,l,n.fill),fillOpacity:1,stroke:xe(t,p,n.stroke)},r||(n.strokeDasharray="6");var o=U(e,t,n);return y(e,t.width,t.height,3,{...n,fill:"none"}),i&&D(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=Z(e,t,n=rt(n,["fill","stroke"]));return W(x(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1}),W(x(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:xe(t,p,n.stroke),stroke:xe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=rt(n,["fill","stroke"]),X(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=K(e,t,n=rt(n,["fill","stroke"]));return x(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:xe(t,p,n.stroke),stroke:xe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=rt(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=H(e,t,n);return x(e,r,{fill:"none",stroke:xe(t,p,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=rt(n,["fill","stroke"]),$(e,t,{...n,markerEnd:d(e,"association-end",be(t,l,n.fill),xe(t,p,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return H(e,t,n=rt(n,["fill","stroke"]))},"bpmn:DataObjectReference":A("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=rt(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=H(e,t,n);return x(e,r,{strokeWidth:1,fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=rt(n,["fill","stroke"]),$(e,t,{...n,markerEnd:d(e,"association-end",be(t,l,n.fill),xe(t,p,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=rt(n,["fill","stroke"]),x(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:be(t,l,n.fill),fillOpacity:nt,stroke:xe(t,p,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=rt(n,["fill","stroke"]);var r=U(e,t,{...n,strokeWidth:4});return i&&D(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=rt(n,["fill","stroke"]);var r=C(t),o=K(e,t,n);y(e,t.width,t.height,.2*t.height,{fill:be(t,"none",n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1});var a=r.get("eventGatewayType"),s=!!r.get("instantiate");if("Parallel"===a){var l=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});x(e,l,{fill:"none",stroke:xe(t,p,n.stroke),strokeWidth:1})}else"Exclusive"===a&&(s||y(e,t.width,t.height,.26*t.height,{fill:"none",stroke:xe(t,p,n.stroke),strokeWidth:1}),function(){var r=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});x(e,r,{fill:"none",stroke:xe(t,p,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=K(e,t,n=rt(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return M(t).get("isMarkerVisible")&&x(e,o,{fill:xe(t,p,n.stroke),stroke:xe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return K(e,t,n=rt(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=rt(n,["fill","stroke","width","height"]),g(e,t.width,t.height,10,{stroke:xe(t,p,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:Ae(t,n),height:Se(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=K(e,t,n=rt(n,["fill","stroke"]));return y(e,t.width,t.height,.24*t.height,{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=rt(n,["fill","stroke"]);var r=U(e,t,{...n,strokeWidth:1.5});return y(e,t.width,t.height,3,{fill:"none",stroke:xe(t,p,n.stroke),strokeWidth:1.5}),i&&D(t,e,n),r},"bpmn:IntermediateCatchEvent":A("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":A("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=rt(n,["fill","stroke","width","height"]),q(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=Z(e,t,n=rt(n,["fill","stroke"]));return x(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=rt(n,["fill","stroke"]);var r=C(t),o=M(t),a=be(t,l,n.fill),s=xe(t,p,n.stroke),c=b(e,t.waypoints,{markerEnd:d(e,"messageflow-end",a,s),markerStart:d(e,"messageflow-start",a,s),stroke:s,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var u=c.getPointAtLength(c.getTotalLength()/2),m=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),h={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(h.fill=a,h.stroke=s):(h.fill=s,h.stroke=a);var f=x(e,m,h),y=I(e,r.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:s}}),g=f.getBBox(),v=y.getBBox();Ze(y,u.x-v.width/2,u.y+g.height/2+10,0)}return c},"bpmn:ParallelGateway":function(e,t,n={}){var r=K(e,t,n=rt(n,["fill","stroke"]));return x(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:xe(t,p,n.stroke),stroke:xe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=q(e,t,n=rt(n,["fill","stroke","width","height"])),r=P(t),o=T(t),a=C(t),s=a.get("name");if(r){v(e,o?[{x:30,y:0},{x:30,y:Se(t,n)}]:[{x:0,y:30},{x:Ae(t,n),y:30}],{stroke:xe(t,p,n.stroke),strokeWidth:1.5}),V(e,s,t,n)}else{var l=_e(t,n);o||(l.height=Ae(t,n),l.width=Se(t,n));var u=I(e,s,{box:l,align:"center-middle",style:{fill:Ee(t,c,p,n.stroke)}});if(!o)Ze(u,0,-(-1*Se(t,n)),270)}return a.get("participantMultiplicity")&&O("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=rt(n,["fill","stroke"]);var r,o=C(t),a=Z(e,t,n);return o.get("instantiate")?(y(e,28,28,4.4,{fill:be(t,l,n.fill),stroke:xe(t,p,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}}),x(e,r,{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1}),a},"bpmn:ScriptTask":function(e,t,n={}){var r=Z(e,t,n=rt(n,["fill","stroke"]));return x(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=Z(e,t,n=rt(n,["fill","stroke"]));return x(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:xe(t,p,n.stroke),stroke:be(t,l,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=rt(n,["fill","stroke"]);var i=be(t,l,n.fill),r=xe(t,p,n.stroke),o=b(e,t.waypoints,{markerEnd:d(e,"sequenceflow-end",i,r),stroke:r}),a=C(t),{source:s}=t;if(s){var c=C(s);a.get("conditionExpression")&&k(c,"bpmn:Activity")&&W(o,{markerStart:d(e,"conditional-flow-marker",i,r)}),c.get("default")&&(k(c,"bpmn:Gateway")||k(c,"bpmn:Activity"))&&c.get("default")===a&&W(o,{markerStart:d(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=Z(e,t,n=rt(n,["fill","stroke"]));return y(e,10,10,{fill:be(t,l,n.fill),stroke:"none",transform:"translate(6, 6)"}),x(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1}),y(e,10,10,{fill:be(t,l,n.fill),stroke:"none",transform:"translate(11, 10)"}),x(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=rt(n,["fill","stroke"]),C(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=U(e,t,n);return i&&D(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return X(e,t,n=P(t)?rt(n,["fill","stroke","width","height"]):rt(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return Z(e,t,n=rt(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=rt(n,["fill","stroke","width","height"]);var{width:r,height:o}=_e(t,n),a=g(e,r,o,0,0,{fill:"none",stroke:"none"});return x(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:xe(t,p,n.stroke)}),I(e,C(t).get("text")||"",{align:"left-top",box:_e(t,n),padding:7,style:{fill:Ee(t,c,p,n.stroke)}}),a},"bpmn:Transaction":function(e,t,i={}){i=P(t)?rt(i,["fill","stroke","width","height"]):rt(i,["fill","stroke"]);var r=X(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:xe(t,p,i.stroke),strokeWidth:1.5});return P(t)||(i={}),g(e,Ae(t,i),Se(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=Z(e,t,n=rt(n,["fill","stroke"]));return x(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:.5}),x(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:be(t,l,n.fill),stroke:xe(t,p,n.stroke),strokeWidth:.5}),x(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:xe(t,p,n.stroke),stroke:xe(t,p,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 I(e,L(t),{box:i,fitBox:!0,style:_({},o.getExternalStyle(),{fill:Ee(t,c,p,n.stroke)})})}(e,t,n)}};this._drawPath=x,this._renderer=w}function rt(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}function ot(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)}e(it,S),it.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],it.prototype.canRender=function(e){return k(e,"bpmn:BaseElement")},it.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},it.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},it.prototype.getShapePath=function(e){return D(e)?we(e,4):k(e,"bpmn:Event")?function(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2;return pe([["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]])}(e):k(e,"bpmn:Activity")?we(e,10):k(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return pe([["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 pe([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e)};const at=Object.prototype.toString,st=Object.prototype.hasOwnProperty;function lt(e,t){return st.call(e,t)}function pt(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===at.call(e)}(e)?ut:ct;for(let o in e)if(lt(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function ct(e){return e}function ut(e){return Number(e)}function mt(e,...t){const n=e.style;return pt(t,(function(e){e&&pt(e,(function(e,t){n[t]=e}))})),e}function ht(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const ft=Object.prototype.toString;function dt(e){return new yt(e)}function yt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function gt(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}yt.prototype.add=function(e){return this.list.add(e),this},yt.prototype.remove=function(e){return"[object RegExp]"==ft.call(e)?this.removeMatching(e):(this.list.remove(e),this)},yt.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},yt.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},yt.prototype.array=function(){return Array.from(this.list)},yt.prototype.has=yt.prototype.contains=function(e){return this.list.contains(e)};var vt,bt,xt,Et={};function wt(){vt=window.addEventListener?"addEventListener":"attachEvent",bt=window.removeEventListener?"removeEventListener":"detachEvent",xt="addEventListener"!==vt?"on":""}var _t=ot({__proto__:null,bind:Et.bind=function(e,t,n,i){return vt||wt(),e[vt](xt+t,n,i||!1),n},unbind:Et.unbind=function(e,t,n,i){return bt||wt(),e[bt](xt+t,n,i||!1),n},default:Et},[Et]),At=["focus","blur"];var St,kt={bind:function(e,t,n,i,r){return-1!==At.indexOf(n)&&(r=!0),_t.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=function(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==At.indexOf(t)&&(i=!0),_t.unbind(e,t,n,i)}},Rt=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=Object.prototype.hasOwnProperty.call(Mt,i)?Mt[i]:Mt._default,a=o[0],s=o[1],l=o[2];(r=t.createElement("div")).innerHTML=s+e+l;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},Ct=!1;"undefined"!=typeof document&&((St=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',Ct=!St.getElementsByTagName("link").length,St=void 0);var Mt={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:Ct?[1,"X<div>","</div>"]:[0,"",""]};Mt.td=Mt.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Mt.option=Mt.optgroup=[1,'<select multiple="multiple">',"</select>"],Mt.thead=Mt.tbody=Mt.colgroup=Mt.caption=Mt.tfoot=[1,"<table>","</table>"],Mt.polyline=Mt.ellipse=Mt.polygon=Mt.circle=Mt.text=Mt.line=Mt.path=Mt.rect=Mt.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var Pt=Rt;function Tt(e){e.parentNode&&e.parentNode.removeChild(e)}var Dt=0,Nt={width:150,height:50};function Ot(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(e){return console.log(e),{width:0,height:0}}}function Bt(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=Ot(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return It(e,o,r,i);o=Ft(o,i.width,t)}}function It(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var Lt="";function Ft(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"!==n&&n!==Lt||r.pop();break}r.push(n),o+=n.length}var a=r[r.length-1];return a&&a===Lt&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function jt(e){this._config=_({},{size:Nt,padding:Dt,style:{},align:"center-top"},e||{})}jt.prototype.createText=function(e,t){return this.layoutText(e,t).element},jt.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},jt.prototype.layoutText=function(e,t){var n=_({},this._config.size,t.box),i=_({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return s(e)?_({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),a=t.fitBox||!1,l=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),p=e.split(/\u00AD?\r?\n/),c=[],u=n.width-o.left-o.right,m=Y("text");for(W(m,{x:0,y:0}),W(m,i),F(function(){var e=document.getElementById("helper-svg");return e||(W(e=Y("svg"),{id:"helper-svg"}),mt(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),m);p.length;)c.push(Bt(p,u,m));"middle"===r.vertical&&(o.top=o.bottom=0);var h=d(c,(function(e,t,n){return e+(l||t.height)}),0)+o.top+o.bottom,y=d(c,(function(e,t,n){return t.width>e?t.width:e}),0),g=o.top;"middle"===r.vertical&&(g+=(n.height-h)/2),g-=(l||c[0].height)/4;var v=Y("text");return W(v,i),f(c,(function(e){var t;switch(g+=l||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(a?y:u)-o.right-e.width;break;default:t=Math.max(((a?y:u)-e.width)/2+o.left,0)}var n=Y("tspan");W(n,{x:t,y:g}),n.textContent=e.text,F(v,n)})),ae(m),{dimensions:{width:y,height:h},element:v}};function Vt(e){var t=_({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=_({},t,{fontSize:n},e&&e.externalStyle||{}),r=new jt({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}}Vt.$inject=["config.textRenderer"];var zt=/\{([^{}]+)\}/g,Wt=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var $t={__init__:["bpmnRenderer"],bpmnRenderer:["type",it],textRenderer:["type",Vt],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={};if(t.position){for(var a=t.containerHeight/r.height*t.yScaleFactor,s=t.containerWidth/r.width*t.xScaleFactor,l=0;l<r.heightElements.length;l++)o["y"+l]=r.heightElements[l]*a;for(var p=0;p<r.widthElements.length;p++)o["x"+p]=r.widthElements[p]*s}var c,u,m=(c=r.d,u={mx:n,my:i,e:o},String(c).replace(zt,(function(e,t){return function(e,t,n){var i=n;return t.replace(Wt,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,u)})));return m}}]};var Gt={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function Ht(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function Ut(e){return t={x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2},{x:Math.round(t.x),y:Math.round(t.y)};var t}function Kt(e){for(var t=e.waypoints,n=t.reduce((function(e,n,i){var r,o,a=t[i-1];if(a){var s=e[e.length-1],l=s&&s.endLength||0,p=(r=a,o=n,Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)));e.push({start:a,end:n,startLength:l,endLength:l+p,length:p})}return e}),[]),i=n.reduce((function(e,t){return e+t.length}),0)/2,r=0,o=n[r];o.endLength<i;)o=n[++r];var a=(i-o.startLength)/o.length;return{x:o.start.x+(o.end.x-o.start.x)*a,y:o.start.y+(o.end.y-o.start.y)*a}}function qt(e){return s(t=e)&&u(t,"waypoints")?Kt(e):Ut(e);var t}function Yt(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function Xt(e,t,n){return _({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Zt(e,t,n){var i=e.waypoint;return!i||i.length<2?[qt(t),qt(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function Jt(e,t,n){return new Error(`element ${Yt(t)} referenced by ${Yt(e)}#${n} not yet drawn`)}function Qt(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}Qt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],Qt.prototype.add=function(e,t,n){var i,r,o,a,s,l,p;if(k(t,"bpmndi:BPMNPlane")){var c=k(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(Xt(e,t,c)),this._canvas.addRootElement(i)}else if(k(t,"bpmndi:BPMNShape")){var u=!P(e,t),m=function(e){return k(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var h=t.bounds;i=this._elementFactory.createShape(Xt(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:m})),k(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),k(e,"bpmn:Lane")&&(o=0),k(e,"bpmn:DataStoreReference")&&(a=n,s=qt(h),l=s.x,p=s.y,l>=a.x&&l<=a.x+a.width&&p>=a.y&&p<=a.y+a.height||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!k(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${Yt(t)} for element ${Yt(e)}`);var f=this._getSource(e),d=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(Xt(e,t,{hidden:r,source:f,target:d,waypoints:Zt(t,f,d)})),k(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return function(e){return k(e,"bpmn:Event")||k(e,"bpmn:Gateway")||k(e,"bpmn:DataStoreReference")||k(e,"bpmn:DataObjectReference")||k(e,"bpmn:DataInput")||k(e,"bpmn:DataOutput")||k(e,"bpmn:SequenceFlow")||k(e,"bpmn:MessageFlow")||k(e,"bpmn:Group")}(e)&&L(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},Qt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Yt(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw Jt(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},Qt.prototype.addLabel=function(e,t,n){var i,r,o;return i=I(t,n),(r=L(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(Xt(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!L(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)},Qt.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?Jt(e,i,t+"Ref"):new Error(`${Yt(e)}#${t} Ref not specified`)},Qt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},Qt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},Qt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var en={__depends__:[$t,{__depends__:[Gt],bpmnImporter:["type",Qt]}]};function tn(e,t){var n,i,r,o;return t=!!t,a(e)||(e=[e]),f(e,(function(e){var a=e;e.waypoints&&!t&&(a=tn(e.waypoints,!0));var s=a.x,l=a.y,p=a.height||0,c=a.width||0;(s<n||void 0===n)&&(n=s),(l<i||void 0===i)&&(i=l),(s+c>r||void 0===r)&&(r=s+c),(l+p>o||void 0===o)&&(o=l+p)})),{x:n,y:i,height:o-i,width:r-n}}function nn(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function rn(e){return!(!e||!e.isFrame)}function on(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}on.prototype.next=function(){return this._prefix+ ++this._counter};var an=new on("ov");function sn(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=an,this._overlayDefaults=_({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),mt(o=Pt('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function ln(e,t,n){mt(e,{left:t+"px",top:n+"px"})}function pn(e,t){e.style.display=!1===t?"none":""}function cn(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}sn.$inject=["config.overlays","eventBus","canvas","elementRegistry"],sn.prototype.get=function(e){if(c(e)&&(e={id:e}),c(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?h(t.overlays,v({type:e.type})):t.overlays.slice():[]}return e.type?h(this._overlays,v({type:e.type})):e.id?this._overlays[e.id]:null},sn.prototype.add=function(e,t,n){if(s(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=_({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},sn.prototype.remove=function(e){var t=this.get(e)||[];a(t)||(t=[t]);var n=this;f(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Tt(e.html),Tt(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)}}))},sn.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},sn.prototype.show=function(){pn(this._overlayRoot)},sn.prototype.hide=function(){pn(this._overlayRoot,!1)},sn.prototype.clear=function(){this._overlays={},this._overlayContainers=[],gt(this._overlayRoot)},sn.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=tn(t);i=o.x,r=o.y}ln(n,i,r),ht(e.html,"data-container-id",t.id)},sn.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?tn(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?tn(o).height:o.height,s=-1*i.bottom+n);ln(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},sn.prototype._createOverlayContainer=function(e){var t=Pt('<div class="djs-overlays" />');mt(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},sn.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";cn(this._overlayRoot,n)},sn.prototype._getOverlayContainer=function(e,t){var n=m(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},sn.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)),c(o)&&(o=Pt(o)),n=this._getOverlayContainer(r),mt(t=Pt('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(o),e.type&&dt(t).add("djs-overlay-"+e.type),pn(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())},sn.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),o=n&&n.minZoom,a=n&&n.maxZoom,s=e.htmlContainer,l=!0;(i!==this._canvas.getRootElement()||n&&(r(o)&&o>t.scale||r(a)&&a<t.scale))&&(l=!1),pn(s,l),this._updateOverlayScale(e,t)},sn.prototype._updateOverlayScale=function(e,t){var n,i,o,a=e.scale,s=e.htmlContainer,l="";!0!==a&&(!1===a?(n=1,i=1):(n=a.min,i=a.max),r(n)&&t.scale<n&&(o=(1/t.scale||1)*n),r(i)&&t.scale>i&&(o=(1/t.scale||1)*i)),r(o)&&(l="scale("+o+","+o+")"),cn(s,l)},sn.prototype._updateOverlaysVisibilty=function(e){var t=this;f(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},sn.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;f(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){Tt(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&&(f(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&&dt(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)};var un={__init__:["overlays"],overlays:["type",sn]};function mn(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(nn(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)}))}mn.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var hn={__init__:["changeSupport"],changeSupport:["type",mn]};function fn(e){this._eventBus=e}function dn(e){return function(t,n,i,r,o){(p(t)||l(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function yn(e,t){t.invoke(fn,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)}))}fn.$inject=["eventBus"],fn.prototype.on=function(e,t,n,i,r,o){if((p(t)||l(t))&&(o=r,r=i,i=n,n=t,t=null),p(n)&&(o=r,r=i,i=n,n=1e3),s(r)&&(o=r,r=!1),!p(i))throw new Error("handlerFn must be a function");a(e)||(e=[e]);var c=this._eventBus;f(e,(function(e){var a=["commandStack",e,t].filter((function(e){return e})).join(".");c.on(a,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)}))},fn.prototype.canExecute=dn("canExecute"),fn.prototype.preExecute=dn("preExecute"),fn.prototype.preExecuted=dn("preExecuted"),fn.prototype.execute=dn("execute"),fn.prototype.executed=dn("executed"),fn.prototype.postExecute=dn("postExecute"),fn.prototype.postExecuted=dn("postExecuted"),fn.prototype.revert=dn("revert"),fn.prototype.reverted=dn("reverted"),e(yn,fn),yn.$inject=["canvas","injector"];var gn={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",yn]},vn={"&":"&","<":"<",">":">",'"':""","'":"'"};var bn="_plane";function xn(e){var t=e.id;return k(e,"bpmn:SubProcess")?function(e){return e+bn}(t):t}function En(e,t,n){var i=Ye('<ul class="bjs-breadcrumbs"></ul>'),r=n.getContainer(),o=Be(r);r.appendChild(i);var a=[];function s(e){e&&(a=function(e){for(var t=C(e),n=[],i=t;i;i=i.$parent)(k(i,"bpmn:SubProcess")||k(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=a.flatMap((function(e){var i=n.findRoot(xn(e))||n.findRoot(e.id);if(!i&&k(e,"bpmn:Process")){var r=t.find((function(t){var n=C(t);return n&&n.get("processRef")===e}));i=r&&n.findRoot(r.id)}if(!i)return[];var o,a=(o=""+(o=e.name||e.id))&&o.replace(/[&<>"']/g,(function(e){return vn[e]})),s=Ye('<li><span class="bjs-crumb"><a title="'+a+'">'+a+"</a></span></li>");return s.addEventListener("click",(function(){n.setRootElement(i)})),s}));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=C(e.element);m(a,(function(e){return e===t}))&&s()})),e.on("root.set",(function(e){s(e.element)}))}function wn(e,t){var n=null,i=new _n;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,k(r,"bpmn:SubProcess")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,l=(o.y-a.y)*o.scale;0===s&&0===l||t.scroll({dx:s,dy:l}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function _n(){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)}}En.$inject=["eventBus","elementRegistry","canvas"],wn.$inject=["eventBus","canvas"];var An=180,Sn=160;function kn(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 Rn(e){return k(e,"bpmndi:BPMNDiagram")?e:Rn(e.$parent)}kn.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)}))}},kn.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;k(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!k(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(R(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},kn.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=Ht(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),function(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}(t)}(e),i=n.x-An,r=n.y-Sn;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)}))},kn.prototype._moveToDiPlane=function(e,t){var n=Rn(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},kn.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},kn.$inject=["eventBus","moddle"];var Cn=250;function Mn(e,t,n,i,r){fn.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",Cn,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",Cn,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],Cn,(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"],Cn,(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)}))}))}e(Mn,fn),Mn.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Mn.prototype._canDrillDown=function(e){var t=this._canvas;return k(e,"bpmn:SubProcess")&&t.findRoot(xn(e))},Mn.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=C(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;Be(i.html).toggle("bjs-drilldown-empty",!r)}},Mn.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,i=C(e);n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=Ye('<button type="button" class="bjs-drilldown"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg></button>'),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(xn(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},Mn.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},Mn.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var Pn={__depends__:[un,hn,gn],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",En],drilldownCentering:["type",wn],drilldownOverlayBehavior:["type",Mn],subprocessCompatibility:["type",kn]};function Tn(e){return e.originalEvent||e.srcEvent}function Dn(e,t){return(Tn(e)||e).button===t}function Nn(e){return Dn(e,0)}function On(e){return!0}function Bn(e){return Nn(e)||function(e){return Dn(e,1)}(e)}function In(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){var n=l[e]||Nn;return!n(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"},l={"element.contextmenu":On,"element.mousedown":Bn,"element.mouseup":Bn,"element.click":Bn,"element.dblclick":Bn};var p="svg, .djs-element";function c(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(l[n]=i),a.$delegate=kt.bind(e,p,t,a)}function u(e,t,n){var i=a(n);i&&kt.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,f(s,(function(e,n){u(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,f(s,(function(e,n){c(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 m=y("djs-hit djs-hit-stroke"),h=y("djs-hit djs-hit-click-stroke"),d={all:y("djs-hit djs-hit-all"),"click-stroke":h,stroke:m,"no-move":y("djs-hit djs-hit-no-move")};function y(e,t){return t=_({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function g(e,t){var n=d[t];if(!n)throw new Error("invalid hit type <"+t+">");return W(e,n),e}function v(e,t){F(e,t)}this.removeHits=function(e){var t;f((t=".djs-hit",(e||document).querySelectorAll(t)),ae)},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=fe(t);return g(n,"stroke"),v(e,n),n},this.createBoxHit=function(e,t,n){n=_({x:0,y:0},n);var i=Y("rect");return g(i,t),W(i,n),v(e,i),i},this.updateDefaultHit=function(e,t){var n,i=(n=".djs-hit",(t||document).querySelector(n));if(i)return e.waypoints?de(i,e.waypoints):W(i,{width:e.width,height:e.height}),i},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=c,this.unregisterEvent=u}In.$inject=["eventBus","elementRegistry","styles"];var Ln={__init__:["interactionEvents"],interactionEvents:["type",In]};function Fn(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)}))}Fn.$inject=["eventBus","canvas"],Fn.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})}},Fn.prototype.get=function(){return this._selectedElements},Fn.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},Fn.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?f(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 jn="hover",Vn="selected";function zn(e,t){function n(t,n){e.addMarker(t,n)}function i(t,n){e.removeMarker(t,n)}this._canvas=e,t.on("element.hover",(function(e){n(e.element,jn)})),t.on("element.out",(function(e){i(e.element,jn)})),t.on("selection.changed",(function(e){var t=e.oldSelection,r=e.newSelection;f(t,(function(e){-1===r.indexOf(e)&&i(e,Vn)})),f(r,(function(e){-1===t.indexOf(e)&&n(e,Vn)}))}))}function Wn(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($n))}})),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);m(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(Nn(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=function(e){var t=Tn(e)||e;return Nn(e)&&t.shiftKey}(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function $n(e){return!e.hidden}zn.$inject=["canvas","eventBus"],Wn.$inject=["eventBus","selection","canvas","elementRegistry"];var Gn={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Ln],selection:["type",Fn],selectionVisuals:["type",zn],selectionBehavior:["type",Wn]};const Hn=/^class[ {]/;function Un(e){return Array.isArray(e)}function Kn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qn(...e){1===e.length&&Un(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const Yn=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Xn=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Zn=/\/\*([^*]*)\*\//m;function Jn(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return Hn.test(e.toString())}(e)?Yn:Xn);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(Zn);return(t&&t[1]||e).trim()}))||[]}function Qn(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw s(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!r[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(Kn(o,e))return o[e];if(Kn(r,e)){if(-1!==i.indexOf(e))throw i.push(e),s("Cannot resolve circular dependency!");return i.push(e),o[e]=r[e][0](r[e][1]),i.pop(),o[e]}return n.get(e,t)}function p(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!Un(e))throw s(`Cannot invoke "${e}". Expected a function!`);e=qn(e.slice())}return{fn:e,dependencies:(e.$inject||Jn(e)).map((e=>Kn(t,e)?t[e]:l(e)))}}function c(e){const{fn:t,dependencies:n}=p(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:i,dependencies:r}=p(e,n);return i.apply(t,r)}function m(e){return qn((t=>e.get(t)))}function h(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],a=[],s=[];let l,p,c,u;for(let e in r)l=r[e],-1!==t.indexOf(e)&&("private"===l[2]?(p=o.indexOf(l[3]),-1===p?(c=l[3].createChild([],t),u=m(c),o.push(l[3]),a.push(c),s.push(u),n[e]=[u,e,"private",c]):n[e]=[s[p],e,"private",a[p]]):n[e]=[l[2],l[1]],i[e]=!0),"factory"!==l[2]&&"type"!==l[2]||!l[1].$scope||t.forEach((t=>{-1!==l[1].$scope.indexOf(t)&&(n[e]=[l[2],l[1]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new Qn(e,a)}const f={factory:u,type:c,value:function(e){return e}};function d(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function y(e){const t=e.__exports__;if(t){const n=e.__modules__,i=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=h((n||[]).concat(i)),a=qn((function(e){return o.get(e)}));t.forEach((function(e){r[e]=[a,e,"private",o]}));const s=(e.__init__||[]).slice();return s.unshift((function(){o.init()})),d(e=Object.assign({},e,{__init__:s}),o)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(r[t]=n);const i=n[0],o=n[1];r[t]=[f[i],ei(i,o),i]})),d(e,a)}function g(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(g,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=u,this.instantiate=c,this.createChild=h,this.init=function(e){const t=e.reduce(g,[]).map(y);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function ei(e,t){return"value"!==e&&Un(t)&&(t=qn(t.slice())),t}function ti(e,t){S.call(this,e,1),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}e(ti,S),ti.prototype.canRender=function(){return!0},ti.prototype.drawShape=function(e,t,n){var i=Y("rect");return W(i,{x:0,y:0,width:t.width||0,height:t.height||0}),rn(t)?W(i,_({},this.FRAME_STYLE,n||{})):W(i,_({},this.SHAPE_STYLE,n||{})),F(e,i),i},ti.prototype.drawConnection=function(e,t,n){var i=fe(t.waypoints,_({},this.CONNECTION_STYLE,n||{}));return F(e,i),i},ti.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return pe([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},ti.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return pe(r)},ti.$inject=["eventBus","styles"];var ni={__init__:["defaultRenderer"],defaultRenderer:["type",ti],styles:["type",function(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){return _(this.style(t,n),{class:e})},this.style=function(t,n){a(t)||n||(n=t,t=[]);var i=d(t,(function(t,n){return _(t,e[n]||{})}),{});return n?_(i,n):i},this.computeStyle=function(e,n,i){return a(n)||(i=n,n=[]),t.style(n||[],_({},i,e||{}))}}]};function ii(e,t){return Math.round(e*t)/t}function ri(e){return l(e)?e+"px":e}function oi(e,t,n){const i=Y("g");G(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const ai={shape:["x","y","width","height"],connection:["waypoints"]};function si(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}function li(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}si.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],si.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=_({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),mt(n,{position:"relative",overflow:"hidden",width:ri(e.width),height:ri(e.height)}),t.appendChild(n),n}(e),i=this._svg=Y("svg");W(i,{width:"100%",height:"100%"}),ht(i,"tabindex",0),e.autoFocus&&t.on("element.hover",(()=>{this.restoreFocus()})),t.on("element.mousedown",500,(e=>{this.focus()})),i.addEventListener("focusin",(()=>{this._setFocused(!0)})),i.addEventListener("focusout",(()=>{this._setFocused(!1)})),F(n,i);const r=this._viewport=oi(i,"viewport");e.deferUpdate&&(this._viewboxChanged=function(e,t){let n,i,r,o;function a(n){let a=Date.now(),p=n?0:o+t-a;if(p>0)return s(p);e.apply(r,i),l()}function s(e){n=setTimeout(a,e)}function l(){n&&clearTimeout(n),n=o=i=r=void 0}function p(...e){o=Date.now(),i=e,r=this,n||s(t)}return p.flush=function(){n&&a(!0),l()},p.cancel=l,p}(w(this._viewboxChanged,this),300)),t.on("diagram.init",(()=>{t.fire("canvas.init",{svg:i,viewport:r})})),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],(()=>{delete this._cachedViewbox})),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},si.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport},si.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},si.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=nn(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},si.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},si.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},si.prototype.isFocused=function(){return this._focused},si.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},si.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");let n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),void 0!==t&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},si.prototype._getChildIndex=function(e){return d(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},si.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:oi(this._viewport,"layer-"+e,n),index:t,visible:!0}},si.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=this._viewport,i=t.group,r=t.index;if(t.visible)return i;const o=this._getChildIndex(r);return n.insertBefore(i,n.childNodes[o]||null),t.visible=!0,i},si.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=t.group;return t.visible?(ae(n),t.visible=!1,n):n},si.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],ae(t.group))},si.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},si.prototype.findRoot=function(e){if("string"==typeof e&&(e=this._elementRegistry.get(e)),!e)return;const t=this._findPlaneForRoot(function(e){for(;e.parent;)e=e.parent;return e}(e))||{};return t.rootElement},si.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},si.prototype._findPlaneForRoot=function(e){return m(this._planes,(function(t){return t.rootElement===e}))},si.prototype.getContainer=function(){return this._container},si.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(f([i.gfx,i.secondaryGfx],(function(i){i&&(n?(e.markers.add(t),G(i).add(t)):(e.markers.delete(t),G(i).remove(t)))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},si.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},si.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},si.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),!!e.markers&&e.markers.has(t)},si.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},si.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},si.prototype.addRootElement=function(e){const t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});const n=e.layer="root-"+t;this._ensureValid("root",e);const i=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},si.prototype.removeRootElement=function(e){"string"==typeof e&&(e=this._elementRegistry.get(e));if(this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter((function(t){return t.rootElement!==e})),this._rootElement===e&&(this._rootElement=null),e},si.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e},si.prototype._removeRoot=function(e){const t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)},si.prototype._addRoot=function(e,t){const n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:e}),n.add(e,t),i.fire("root.added",{element:e,gfx:t})},si.prototype._setRoot=function(e,t){const n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),this.hideLayer(n.layer)),e&&(t||(t=this._findPlaneForRoot(e).layer),this._elementRegistry.updateGraphics(e,this._svg,!0),this.showLayer(e.layer)),this._rootElement=e,this._eventBus.fire("root.set",{element:e})},si.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element <"+t.id+"> already exists");const n=ai[e],i=y(n,(function(e){return void 0!==t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},si.prototype._setParent=function(e,t,n){!function(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)}}(t.children,e,n),e.parent=t},si.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const a=o.create(e,t,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},si.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},si.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},si.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);-1!==n&&e.splice(n,1)}(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},si.prototype.removeShape=function(e){return this._removeElement(e,"shape")},si.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},si.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},si.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},si.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},si.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,a,s,l,p;return e?(this._changeViewbox((function(){s=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);le(t,i)})),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},a=le(t),r=a?a.matrix:function(e,t,n,i,r,o){var a=Z().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return J(a,e);case 6:return J(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),s=ii(r.a,1e3),l=ii(-r.e||0,1e3),p=ii(-r.f||0,1e3),e=this._cachedViewbox={x:l?l/s:0,y:p?p/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},si.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=_({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),li(t,n)})),{x:n.e,y:n.f}},si.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===e)return;t||(t={}),"number"==typeof t&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const r=tn(e),o=Ht(r),a=this.viewbox(),s=this.zoom();let l,p;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;const c=Ht(a);if(r.width<a.width&&r.height<a.height){const e=Math.max(0,o.right-c.right),t=Math.min(0,o.left-c.left),n=Math.max(0,o.bottom-c.bottom),i=Math.min(0,o.top-c.top);l=e||t,p=n||i}else l=r.x-a.x,p=r.y-a.y;this.scroll({dx:-l*s,dy:-p*s})},si.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,i;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),ii(i.a,1e3)},si.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,i=t.inner;let r,o;return i.x>=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(e?i.width/2-n.width/r/2:0),y:i.y+(e?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},si.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,l,p,c;l=i.getCTM();const u=l.a;return t?(a=_(o,t),s=a.matrixTransform(l.inverse()),p=r.translate(s.x,s.y).scale(1/u*e).translate(-s.x,-s.y),c=l.multiply(p)):c=r.scale(e),li(this._viewport,c),c},si.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},si.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;if(e.waypoints){n=this.getGraphics(e).getBBox()}else n=e;return{x:n.x*t.scale-t.x*t.scale,y:n.y*t.scale-t.y*t.scale,width:n.width*t.scale,height:n.height*t.scale}},si.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var pi="data-element-id";function ci(e){this._elements={},this._eventBus=e}function ui(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 mi(e,t){if(!(this instanceof mi))return new mi(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}ci.$inject=["eventBus"],ci.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),W(t,pi,i),n&&W(n,pi,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},ci.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(W(i.gfx,pi,""),i.secondaryGfx&&W(i.secondaryGfx,pi,""),delete t[n])},ci.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},ci.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&W(t,pi,i),t},ci.prototype.get=function(e){var t;t="string"==typeof e?e:e&&W(e,pi);var n=this._elements[t];return n&&n.element},ci.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},ci.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},ci.prototype.getAll=function(){return this.filter((function(e){return e}))},ci.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},ci.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},ci.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")},mi.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?ui(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)},mi.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||ui(this,t,e),n},mi.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},mi.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},mi.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var hi=new mi({name:"children",enumerable:!0,collection:!0},{name:"parent"}),fi=new mi({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),di=new mi({name:"attachers",collection:!0},{name:"host"}),yi=new mi({name:"outgoing",collection:!0},{name:"source"}),gi=new mi({name:"incoming",collection:!0},{name:"target"});function vi(){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)}}),hi.bind(this,"parent"),fi.bind(this,"labels"),yi.bind(this,"outgoing"),gi.bind(this,"incoming")}function bi(){vi.call(this),hi.bind(this,"children"),di.bind(this,"host"),di.bind(this,"attachers")}function xi(){vi.call(this),hi.bind(this,"children")}function Ei(){bi.call(this),fi.bind(this,"labelTarget")}function wi(){vi.call(this),yi.bind(this,"source"),gi.bind(this,"target")}e(bi,vi),e(xi,bi),e(Ei,bi),e(wi,vi);var _i={connection:wi,shape:bi,label:Ei,root:xi};function Ai(){this._uid=12}Ai.prototype.createRoot=function(e){return this.create("root",e)},Ai.prototype.createLabel=function(e){return this.create("label",e)},Ai.prototype.createShape=function(e){return this.create("shape",e)},Ai.prototype.createConnection=function(e){return this.create("connection",e)},Ai.prototype.create=function(e,t){return(t=_({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=_i[e];if(!n)throw new Error("unknown type: <"+e+">");return _(new n,t)}(e,t)};var Si="__fn",ki=Array.prototype.slice;function Ri(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Ci(){}function Mi(e,t){this._eventBus=e,this._elementRegistry=t}function Pi(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}Ri.prototype.on=function(e,t,n,i){if(e=a(e)?e:[e],p(t)&&(i=n,n=t,t=1e3),!l(t))throw new Error("priority must be a number");var r=n;i&&((r=w(n,i))[Si]=n[Si]||n);var o=this;e.forEach((function(e){o._addListener(e,{priority:t,callback:r,next:null})}))},Ri.prototype.once=function(e,t,n,i){var r=this;if(p(t)&&(i=n,n=t,t=1e3),!l(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,o),t}o[Si]=n,this.on(e,t,o)},Ri.prototype.off=function(e,t){e=a(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},Ri.prototype.createEvent=function(e){var t=new Ci;return t.init(e),t},Ri.prototype.fire=function(e,t){var n,i,r,o;if(o=ki.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof Ci?t:this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},Ri.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},Ri.prototype._destroy=function(){this._listeners={}},Ri.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},Ri.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},Ri.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},Ri.prototype._getListeners=function(e){return this._listeners[e]},Ri.prototype._setListeners=function(e,t){this._listeners[e]=t},Ri.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r[Si]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},Ci.prototype.stopPropagation=function(){this.cancelBubble=!0},Ci.prototype.preventDefault=function(){this.defaultPrevented=!0},Ci.prototype.init=function(e){_(this,e||{})},Mi.$inject=["eventBus","elementRegistry"],Mi.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(G(t=Y("g")).add("djs-children"),F(n.parentNode,t))):t=n,t},Mi.prototype._clear=function(e){var t=function(e){return e.childNodes[0]}(e);return gt(t),t},Mi.prototype._createContainer=function(e,t,n,i){var r=Y("g");G(r).add("djs-group"),void 0!==n?Pi(r,t,t.childNodes[n]):F(t,r);var o=Y("g");G(o).add("djs-element"),G(o).add("djs-"+e),i&&G(o).add("djs-frame"),F(r,o);var a=Y("g");return G(a).add("djs-visual"),F(o,a),o},Mi.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,rn(t))},Mi.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=d(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),f(t,(function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e);f(t.slice().reverse(),(function(e){Pi(i.getGraphics(e).parentNode,r)}))}}))},Mi.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},Mi.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Mi.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},Mi.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Mi.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),Je(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?W(n,"display","none"):W(n,"display","block")}},Mi.prototype.remove=function(e){ae(this._elementRegistry.getGraphics(e).parentNode)};var Ti={__depends__:[ni],__init__:["canvas"],canvas:["type",si],elementRegistry:["type",ci],elementFactory:["type",Ai],eventBus:["type",Ri],graphicsFactory:["type",Mi]};function Di(e){return function(e){var t=new Qn(e);return t.init(),t}([{config:["value",e=e||{}]},Ti].concat(e.modules||[]))}function Ni(e,t){this._injector=t||Di(e),this.get("eventBus").fire("diagram.init")}function Oi(){}function Bi(e,t){this.model=e,this.properties=t}Ni.prototype.get=function(e,t){return this._injector.get(e,t)},Ni.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Ni.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Ni.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},Oi.prototype.get=function(e){return this.$model.properties.get(this,e)},Oi.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},Bi.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(Oi.prototype);f(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}),f(e,w((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 Ii={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},Li={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 Fi(e,t){var n=Li[e];return n?n(t):t}function ji(e){return!!Ii[e]}function Vi(e){return!!Li[e]}function zi(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 <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function Wi(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function $i(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,f(e,w(this.registerPackage,this))}function Gi(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function Hi(e){this.model=e}function Ui(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Ki(e){return e.replace(/^:/,"")}function qi(e,t={}){this.properties=new Hi(this),this.factory=new Bi(this,this.properties),this.registry=new $i(e,this.properties),this.typeCache={},this.config=t}Wi.prototype.build=function(){return function(e,t){let n={},i=Object(e);return f(t,(function(t){t in i&&(n[t]=e[t])})),n}(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},Wi.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)},Wi.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},Wi.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=zi(r[0],i),a=zi(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},Wi.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},Wi.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},Wi.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},Wi.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},Wi.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},Wi.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")},Wi.prototype.hasProperty=function(e){return this.propertiesByName[e]},Wi.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(f(e.properties,w((function(n){n=_({},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)},$i.prototype.getPackage=function(e){return this.packageMap[e]},$i.prototype.getPackages=function(){return this.packages},$i.prototype.registerPackage=function(e){e=_({},e);var t=this.packageMap;Gi(t,e,"prefix"),Gi(t,e,"uri"),f(e.types,w((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},$i.prototype.registerType=function(e,t){var n=zi((e=_({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:_(e.meta||{})})).name,t.prefix),i=n.name,r={};f(e.properties,w((function(e){var t=zi(e.name,n.prefix),i=t.name;ji(e.type)||(e.type=zi(e.type,t.prefix).name),_(e,{ns:t,name:i}),r[i]=e}),this)),_(e,{ns:n,name:i,propertiesByName:r}),f(e.extends,w((function(e){var t=zi(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},$i.prototype.mapTypes=function(e,t,n){var i=ji(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=zi(n,ji(n)?"":e.prefix);r.mapTypes(o,t,i)}function a(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");f(i.superClass,n?a:function(e){return o(e,!1)}),t(i,!n),f(i.traits,a)},$i.prototype.getEffectiveDescriptor=function(e){var t=zi(e),n=new Wi(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},$i.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},Hi.prototype.set=function(e,t,n){if(!c(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[Ki(t)]:i?r in e?e[r]=n:Ui(e,i,n):e.$attrs[Ki(t)]=n},Hi.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Ki(t)];var i=n.name;return!e[i]&&n.isMany&&Ui(e,n,[]),e[i]},Hi.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=_({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},Hi.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},Hi.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},Hi.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;"undefined"!=typeof console&&console.warn(n)}return null},qi.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},qi.prototype.getType=function(e){var t=this.typeCache,n=c(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},qi.prototype.createAny=function(e,t,n){var a=zi(e),l={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){!function(e,t,n){let a=e;f(t,(function(e,s){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 l=t[s+1],p=a[e];r(l)&&o(p)&&(p=a[e]=isNaN(+l)?{}:[]),i(l)?i(n)?delete a[e]:a[e]=n:a=p}))}(this,[e],t)}},p={name:e,isGeneric:!0,ns:{prefix:a.prefix,localName:a.localName,uri:t}};return this.properties.defineDescriptor(l,p),this.properties.defineModel(l,this),this.properties.define(l,"get",{enumerable:!1,writable:!0}),this.properties.define(l,"set",{enumerable:!1,writable:!0}),this.properties.define(l,"$parent",{enumerable:!1,writable:!0}),this.properties.define(l,"$instanceOf",{enumerable:!1,writable:!0}),f(n,(function(e,t){s(e)&&void 0!==e.value?l[e.name]=e.value:l[t]=e})),l},qi.prototype.getPackage=function(e){return this.registry.getPackage(e)},qi.prototype.getPackages=function(){return this.registry.getPackages()},qi.prototype.getElementDescriptor=function(e){return e.$descriptor},qi.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},qi.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},qi.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var Yi=String.fromCharCode,Xi=Object.prototype.hasOwnProperty,Zi=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,Ji={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function Qi(e,t,n,i){return i?Xi.call(Ji,i)?Ji[i]:"&"+i+";":Yi(t||parseInt(n,16))}function er(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(Zi,Qi):e}Object.keys(Ji).forEach((function(e){Ji[e.toUpperCase()]=Ji[e]}));var tr="non-whitespace outside of root node";function nr(e){return new Error(e)}function ir(e){return"missing namespace for prefix <"+e+">"}function rr(e){return{get:e,enumerable:!0}}function or(e){var t,n={};for(t in e)n[t]=e[t];return n}function ar(e){return e+"$uri"}function sr(){return{line:0,column:0}}function lr(e){throw e}function pr(e){if(!this)return new pr(e);var t,n,i,r,o,a,s,l,p,c=e&&e.proxy,u=lr,m=sr,h=!1,f=!1,d=null,y=!1;function g(e){e instanceof Error||(e=nr(e)),d=e,u(e,m)}function v(e){o&&(e instanceof Error||(e=nr(e)),o(e,m))}this.on=function(e,p){if("function"!=typeof p)throw nr("required args <name, cb>");switch(e){case"openTag":n=p;break;case"text":t=p;break;case"closeTag":i=p;break;case"error":u=p;break;case"warn":o=p;break;case"cdata":r=p;break;case"attention":l=p;break;case"question":s=p;break;case"comment":a=p;break;default:throw nr("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw nr("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return f=!0,p=n,this},this.parse=function(e){if("string"!=typeof e)throw nr("required args <xml=string>");return d=null,function(e){var o,u,d,b,x,E,w,_,A,S,k,R=f?[]:null,C=f?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[ar(n)]=t;return i}(p):null,M=[],P=0,T=!1,D=!1,N=0,O=0,B="",I=0;function L(){if(null!==k)return k;var e,t,n,i,r,o,a,s,l,c,u,m=f&&C.xmlns,d=f&&h?[]:null,y=I,g=B,b=g.length,x={},E={};e:for(;y<b;y++)if(l=!1,!(32===(c=g.charCodeAt(y))||c<14&&c>8)){for((c<65||c>122||c>90&&c<97)&&95!==c&&58!==c&&(v("illegal first char attribute name"),l=!0),u=y+1;u<b;u++)if(!((c=g.charCodeAt(u))>96&&c<123||c>64&&c<91||c>47&&c<59||46===c||45===c||95===c)){if(32===c||c<14&&c>8){v("missing attribute value"),y=u;continue e}if(61===c)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(s=g.substring(y,u))&&(v("illegal declaration of xmlns"),l=!0),34===(c=g.charCodeAt(u+1)))-1===(u=g.indexOf('"',y=u+2))&&-1!==(u=g.indexOf("'",y))&&(v("attribute value quote missmatch"),l=!0);else if(39===c)-1===(u=g.indexOf("'",y=u+2))&&-1!==(u=g.indexOf('"',y))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u<b&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++);for(-1===u&&(v("missing closing quotes"),u=b,l=!0),l||(o=g.substring(y,u)),y=u;u+1<b&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++)y===u&&(v("illegal character after attribute end"),l=!0);if(y=u+1,!l)if(s in E)v("attribute <"+s+"> already defined");else if(E[s]=!0,f)if(h){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=er(o),t=ar(r),!(a=p[e])){if("xmlns"===r||t in C&&C[t]!==e)do{a="ns"+P++}while(void 0!==C[a]);else a=r;p[e]=a}C[r]!==a&&(i||(C=or(C),i=!0),C[r]=a,"xmlns"===r&&(C[ar(a)]=e,m=a),C[t]=e),x[s]=o;continue}d.push(s,o)}else-1!==(c=s.indexOf(":"))?(n=C[s.substring(0,c)])?x[s=m===n?s.substr(c+1):n+s.substr(c)]=o:v(ir(s.substring(0,c))):x[s]=o;else x[s]=o}if(h)for(y=0,b=d.length;y<b;y++){if(s=d[y++],o=d[y],-1!==(c=s.indexOf(":"))){if(!(n=C[s.substring(0,c)])){v(ir(s.substring(0,c)));continue}s=m===n?s.substr(c+1):n+s.substr(c)}x[s]=o}return k=x}function F(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=O;N>=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>N);)r+=1,a=s;return-1==N?(o=s,n=e.substring(O)):0===O?n=e.substring(O,N):(o=N-a,n=-1==O?e.substring(N):e.substring(N,O+1)),{data:n,line:r,column:o}}m=F,c&&(S=Object.create({},{name:rr((function(){return _})),originalName:rr((function(){return A})),attrs:rr(L),ns:rr((function(){return C}))}));for(;-1!==O;){if(-1===(N=60===e.charCodeAt(O)?O:e.indexOf("<",O)))return M.length?g("unexpected end of file"):0===O?g("missing start tag"):void(O<e.length&&e.substring(O).trim()&&v(tr));if(O!==N)if(M.length){if(t&&(t(e.substring(O,N),er,m),y))return}else if(e.substring(O,N).trim()&&(v(tr),y))return;if(33===(x=e.charCodeAt(N+1))){if(91===(b=e.charCodeAt(N+2))&&"CDATA["===e.substr(N+3,6)){if(-1===(O=e.indexOf("]]>",N)))return g("unclosed cdata");if(r&&(r(e.substring(N+9,O),m),y))return;O+=3;continue}if(45===b&&45===e.charCodeAt(N+3)){if(-1===(O=e.indexOf("--\x3e",N)))return g("unclosed comment");if(a&&(a(e.substring(N+4,O),er,m),y))return;O+=3;continue}}if(63!==x){for(u=N+1;;u++){if(E=e.charCodeAt(u),isNaN(E))return O=-1,g("unclosed tag");if(34===E)u=-1!==(b=e.indexOf('"',u+1))?b:u;else if(39===E)u=-1!==(b=e.indexOf("'",u+1))?b:u;else if(62===E){O=u;break}}if(33!==x){if(k={},47===x){if(T=!1,D=!0,!M.length)return g("missing open tag");if(u=_=M.pop(),b=N+2+u.length,e.substring(N+2,b)!==u)return g("closing tag mismatch");for(;b<O;b++)if(!(32===(x=e.charCodeAt(b))||x>8&&x<14))return g("close tag")}else{if(47===e.charCodeAt(O-1)?(u=_=e.substring(N+1,O-1),T=!0,D=!0):(u=_=e.substring(N+1,O),T=!0,D=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return g("illegal first char nodeName");for(b=1,d=u.length;b<d;b++)if(!((x=u.charCodeAt(b))>96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46==x)){if(32===x||x<14&&x>8){_=u.substring(0,b),k=null;break}return g("invalid nodeName")}D||M.push(_)}if(f){if(o=C,T&&(D||R.push(o),null===k&&(h=-1!==u.indexOf("xmlns",b))&&(I=b,B=u,L(),h=!1)),A=_,-1!==(x=_.indexOf(":"))){if(!(w=C[_.substring(0,x)]))return g("missing namespace on <"+A+">");_=_.substr(x+1)}else w=C.xmlns;w&&(_=w+":"+_)}if(T&&(I=b,B=u,n&&(c?n(S,er,D,m):n(_,L,er,D,m),y)))return;if(D){if(i&&(i(c?S:_,er,T,m),y))return;f&&(C=T?o:R.pop())}O+=1}else{if(l&&(l(e.substring(N,O+1),er,m),y))return;O+=1}}else{if(-1===(O=e.indexOf("?>",N)))return g("unclosed question");if(s&&(s(e.substring(N,O+2),m),y))return;O+=2}}}(e),m=sr,y=!1,d},this.stop=function(){y=!0}}function cr(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var ur={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},mr="property";function hr(e){return e.xml&&e.xml.serialize}function fr(e,t){return cr(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function dr(e){return new Error(e)}function yr(e){return e.$descriptor}function gr(e){_(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw dr("expected element");var t,n=this.elementsById,i=yr(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 dr("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function vr(){}function br(){}function xr(){}function Er(e,t){this.property=e,this.context=t}function wr(e,t){this.element=t,this.propertyDesc=e}function _r(){}function Ar(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function Sr(e,t,n){Ar.call(this,e,t,n)}function kr(e,t,n){this.model=e,this.context=n}function Rr(e){e instanceof qi&&(e={model:e}),_(this,{lax:!1},e)}vr.prototype.handleEnd=function(){},vr.prototype.handleText=function(){},vr.prototype.handleNode=function(){},br.prototype=Object.create(vr.prototype),br.prototype.handleNode=function(){return this},xr.prototype=Object.create(vr.prototype),xr.prototype.handleText=function(e){this.body=(this.body||"")+e},Er.prototype=Object.create(xr.prototype),Er.prototype.handleNode=function(e){if(this.element)throw dr("expected no sub nodes");return this.element=this.createReference(e),this},Er.prototype.handleEnd=function(){this.element.id=this.body},Er.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},wr.prototype=Object.create(xr.prototype),wr.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Fi(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},_r.prototype=Object.create(xr.prototype),_r.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},Ar.prototype=Object.create(_r.prototype),Ar.prototype.addReference=function(e){this.context.addReference(e)},Ar.prototype.handleText=function(e){if(!yr(this.element).bodyProperty)throw dr("unexpected body text <"+e+">");xr.prototype.handleText.call(this,e)},Ar.prototype.handleEnd=function(){var e=this.body,t=this.element,n=yr(t).bodyProperty;n&&void 0!==e&&(e=Fi(n.type,e),t.set(n.name,e))},Ar.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=yr(i),o=this.context,a=new i({}),s=this.model;return f(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?f(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=Fi(i.type,e):"xmlns"===n?n=":"+n:(t=zi(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},Ar.prototype.getPropertyForNode=function(e){var t=zi(e.name),n=this.type,i=this.model,r=yr(n),o=t.name,a=r.propertiesByName[o];if(a&&!a.isAttr){const t=function(e){const t=hr(e);return t!==mr&&(t||null)}(a);if(t){const n=e.attributes[t];if(n){const t=function(e,t,n){const i=zi(e,t.xmlns),r=zi(`${t[i.prefix]||i.prefix}:${i.localName}`);return function(e,t){var n=e.name,i=e.localName,r=t&&t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(r,n.getPackage(r.prefix))}(n,e.ns,i);return _({},a,{effectiveType:yr(i.getType(t)).name})}}return a}var s=i.getPackage(t.prefix);if(s){const e=fr(t,s),n=i.getType(e);if(a=m(r.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return _({},a,{effectiveType:yr(n).name})}else if(a=m(r.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return a;throw dr("unrecognized element <"+t.name+">")},Ar.prototype.toString=function(){return"ElementDescriptor["+yr(this.type).name+"]"},Ar.prototype.valueHandler=function(e,t){return new wr(e,t)},Ar.prototype.referenceHandler=function(e){return new Er(e,this.context)},Ar.prototype.handler=function(e){return"Element"===e?new kr(this.model,e,this.context):new Ar(this.model,e,this.context)},Ar.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,Vi(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?(_(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},Sr.prototype=Object.create(Ar.prototype),Sr.prototype.createElement=function(e){var t=e.name,n=zi(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&fr(n,o)||t;if(!r.hasType(a))throw dr("unexpected element <"+e.originalName+">");return Ar.prototype.createElement.call(this,e)},kr.prototype=Object.create(_r.prototype),kr.prototype.createElement=function(e){var t=e.name,n=zi(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},kr.prototype.handleChild=function(e){var t=new kr(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},kr.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Rr.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Ar?(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 gr(_({},t,{rootHandler:i})),s=new pr({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function p(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 l="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:l,error:e}),!0;throw dr(l)}function c(e,t){return p(e,t,!0)}i.context=a,l.push(i);var u=/^<\?xml /i,m=/ encoding="([^"]+)"/i,h=/^utf-8$/i;function f(e,t){try{l.peek().handleText(e)}catch(e){c(e,t)}}var d=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),Object.entries(ur).reduce((function(e,[t,n]){return e[n]=t,e}),r.config&&r.config.nsMap||{}));return s.ns(d).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=l.peek();try{l.push(n.handleNode(e))}catch(e){p(e,t,o)&&l.push(new br)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=m.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(){l.pop().handleEnd()})).on("cdata",f).on("text",(function(e,t,n){!function(e,t){e.trim()&&f(e,t)}(t(e),n)})).on("error",p).on("warn",c),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=yr(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 l=r.get(s.name),p=l.indexOf(t);-1===p&&(p=l.length),o?l[p]=o:l.splice(p,1)}else r.set(s.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=dr("failed to parse document as <"+i.type.$descriptor.name+">"));var l=a.warnings,p=a.references,c=a.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:c,references:p,warnings:l})}))},Rr.prototype.handler=function(e){return new Sr(this.model,e)};var Cr=/<|>|'|"|&|\n\r|\n/g,Mr=/<|>|&/g;function Pr(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}function Tr(e,t){return cr(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function Dr(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Nr(e){return c(e)?e:(e.prefix?e.prefix+":":"")+e.localName}Pr.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},Pr.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},Pr.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},Pr.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},Pr.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},Pr.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},Pr.prototype.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},Pr.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},Pr.prototype.getUsed=function(e){return[].concat(this.wellknown,this.custom).filter((e=>{var t=this.getNSKey(e);return this.used[t]}))};var Or={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Br={"<":"lt",">":"gt","&":"amp"};function Ir(e,t,n){return(e=c(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function Lr(e){this.tagName=e}function Fr(){}function jr(e){this.tagName=e}function Vr(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function zr(e,t,n){Vr.call(this,e,t),this.serialization=n}function Wr(){this.value="",this.write=function(e){this.value+=e}}function $r(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 Gr(e){return e=_({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new Wr,r=new $r(i,e.format);e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n');var o=new Vr,a=t.$model;if(o.getNamespaces().mapDefaultPrefixes(function(e){const t=e.config&&e.config.nsMap||{},n={};for(const e in ur)n[e]=ur[e];for(const e in t){n[t[e]]=e}for(const t of e.getPackages())n[t.prefix]=t.uri;return n}(a)),o.build(t).serializeTo(r),!n)return i.value}}}function Hr(e,t){qi.call(this,e,t)}Lr.prototype.build=function(e){return this.element=e,this},Lr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},Fr.prototype.serializeValue=Fr.prototype.serializeTo=function(e){e.append(this.escape?Ir(this.value,Mr,Br):this.value)},Fr.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Mr)&&(this.escape=!0),this},Dr(jr,Fr),jr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},Vr.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGenericNsAttributes(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(n=function(e){return h(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!u(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(h(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return h(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},Vr.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?_({localName:t.ns.localName},e):_({localName:Tr(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},Vr.prototype.nsPropertyTagName=function(e){return function(e,t){return _({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},Vr.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},Vr.prototype.nsAttributeName=function(e){var t;if(t=c(e)?zi(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}:_({localName:t.localName},n)},Vr.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter((([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n))).map((([e,t])=>({name:e,value:t})))},Vr.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push((new Fr).build({type:"String"},t));var n=e.$children;n&&f(n,(e=>{this.body.push(new Vr(this).build(e))}))},Vr.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=zi(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)}},Vr.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return f(n,(function(n,r){var o=t.parseNsAttribute(e,r,n);o&&i.push(o)})),i},Vr.prototype.parseGenericAttributes=function(e,t){var n=this;f(t,(function(t){try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){"undefined"!=typeof console&&console.warn(`missing namespace information for <${t.name}=${t.value}> on`,e,n)}}))},Vr.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;f(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new Fr).build(e,r[0]));else if(Vi(e.type))f(r,(function(i){n.push(new jr(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)f(r,(function(i){n.push(new Lr(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=hr(e);f(r,(function(i){var r;r=a?a===mr?new Vr(t,e):new zr(t,e,a):new Vr(t),n.push(r.build(i))}))}}))},Vr.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new Pr(t):n=t),n},Vr.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},Vr.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.getNamespaces(t),a=e.prefix,s=e.uri;if(!a&&!s)return{localName:e.localName};if(r=o.defaultUriByPrefix(a),!(s=s||r||o.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if((e=o.byUri(s))||a||(e=this.logNamespace({uri:s},r===s,!0)),!e){for(n=a,i=1;o.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:s},r===s)}return a&&o.mapPrefix(a,s),e},Vr.prototype.parseAttributes=function(e){var t=this,n=this.element;f(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];f(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},Vr.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),Nr(e)},Vr.prototype.addAttribute=function(e,t){var n=this.attrs;c(t)&&(t=Ir(t,Cr,Or));var i=function(e,t){const n=b(t);let i=a(e)?-1:void 0;return f(e,(function(e,t){if(n(e,t))return i=t,!1})),i}(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)},Vr.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)),f(t,(function(t){e.append(" ").append(Nr(t.name)).append('="').append(t.value).append('"')}))},Vr.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==Fr;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),f(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},Dr(zr,Vr),zr.prototype.parseNsAttributes=function(e){var t=Vr.prototype.parseNsAttributes.call(this,e).filter((e=>e.name!==this.serialization)),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(this.serialization),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},zr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},Hr.prototype=Object.create(qi.prototype),Hr.prototype.fromXML=function(e,t,n){c(t)||(n=t,t="bpmn:Definitions");var i=new Rr(_({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},Hr.prototype.toXML=function(e,t){var n=new Gr(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};const Ur={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",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 Kr(e,t){return new Hr(_({},Ur,e),t)}var qr="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 Yr(e,t){return e.$instanceOf(t)}function Xr(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 ${Yt(t)}`);return e.element(t,i[t.id],n)}(t,n);return o(t),r}catch(e){s(e.message,{element:t,error:e}),console.error(`failed to import ${Yt(t)}`,e)}}function s(t,n){e.error(t,n)}var l=this.registerDi=function(e){var t,n=e.bpmnElement;n?i[n.id]?s(`multiple DI elements defined for ${Yt(n)}`,{element:n}):(i[n.id]=e,u(t=n,"di")||Object.defineProperty(t,"di",{enumerable:!1,get:function(){throw new Error(qr)}})):s(`no bpmnElement referenced in ${Yt(e)}`,{element:e})};function p(e){var t;t=e.plane,l(t),f(t.planeElement,c)}function c(e){l(e)}this.handleDefinitions=function(o,a){var c=o.diagrams;if(a&&-1===c.indexOf(a))throw new Error("diagram not part of <bpmn:Definitions />");if(!a&&c&&c.length&&(a=c[0]),!a)throw new Error("no diagram to display");i={},p(a);var u=a.plane;if(!u)throw new Error(`no plane for ${Yt(a)}`);var v=u.bpmnElement;if(!v){if(v=function(e){return m(e.rootElements,(function(e){return Yr(e,"bpmn:Process")||Yr(e,"bpmn:Collaboration")}))}(o),!v)throw new Error("no process or collaboration to display");s(`correcting missing bpmnElement on ${Yt(u)} to ${Yt(v)}`),u.bpmnElement=v,l(u)}var b,x,E=function(t,n){return e.root(t,i[t.id],n)}(v,u);if(Yr(v,"bpmn:Process")||Yr(v,"bpmn:SubProcess"))y(v,E);else{if(!Yr(v,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${Yt(u)}: ${Yt(v)}`);x=E,f((b=v).participants,r(P,x)),n.push((function(){!function(e,t){f(e,r(g,t))}(b.messageFlows,x)})),w(b.artifacts,x),function(e,n){var i=h(e,(function(e){return!t[e.id]&&Yr(e,"bpmn:Process")&&e.laneSets}));i.forEach(r(y,n))}(o.rootElements,E)}d(n)};var d=this.handleDeferred=function(){for(;n.length;)n.shift()()};function y(e,t){M(e,t),_(e.ioSpecification,t),w(e.artifacts,t),o(e)}function g(e,t){a(e,t)}function v(e,t){a(e,t)}function b(e,t){a(e,t)}function x(e,t){a(e,t)}function E(e,t){a(e,t)}function w(e,t){f(e,(function(e){Yr(e,"bpmn:Association")?n.push((function(){E(e,t)})):E(e,t)}))}function _(e,t){e&&(f(e.dataInputs,r(b,t)),f(e.dataOutputs,r(x,t)))}var A=this.handleSubProcess=function(e,t){M(e,t),w(e.artifacts,t)};function S(e,t){var i=a(e,t);Yr(e,"bpmn:SubProcess")&&A(e,i||t),Yr(e,"bpmn:Activity")&&_(e.ioSpecification,t),n.push((function(){f(e.dataInputAssociations,r(v,t)),f(e.dataOutputAssociations,r(v,t))}))}function k(e,t){a(e,t)}function R(e,t){n.push((function(){var n=a(e,t);e.childLaneSet&&C(e.childLaneSet,n||t),function(e){f(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function C(e,t){f(e.lanes,r(R,t))}function M(e,t){!function(e,t){f(e,(function(e){Yr(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){a(e,t)}(e,t)})):Yr(e,"bpmn:BoundaryEvent")?n.unshift((function(){S(e,t)})):Yr(e,"bpmn:FlowNode")?S(e,t):Yr(e,"bpmn:DataObject")||(Yr(e,"bpmn:DataStoreReference")||Yr(e,"bpmn:DataObjectReference")?k(e,t):s(`unrecognized flowElement ${Yt(e)} in context ${Yt(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){f(e,r(C,t))}(e.laneSets,t)}function P(e,t){var n=a(e,t),i=e.processRef;i&&y(i,n||t)}}function Zr(e,t,n){var i,r,o,a=[];function s(e,t){var n=new Xr({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;k(i,"bpmn:Process")||k(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(k(t,"bpmn:Process"))return t;t=t.$parent}}(i));n=k(r,"bpmn:Collaboration")?r:m(e.rootElements,(function(e){if(k(e,"bpmn:Collaboration"))return m(e.participants,(function(e){return e.processRef===r}))}));var o=[r];n&&(o=function(e,t){let n=[];return f(e,(function(e,i){n.push(t(e,i))})),n}(n.participants,(function(e){return e.processRef}))).push(n);var a=Jr(o),s=[t],l=[i];return f(e.diagrams,(function(e){if(e.plane){var t=e.plane.bpmnElement;-1!==a.indexOf(t)&&-1===l.indexOf(t)&&(s.push(e),l.push(t))}})),s}(e,t);if(!r)throw new Error("no diagram to display");f(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(l,p){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}),l({warnings:a})}catch(e){return e.warnings=a,p(e)}}))}function Jr(e){var t=[];return f(e,(function(e){e&&(t.push(e),t=t.concat(Jr(e.flowElements)))})),t}var Qr,eo='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',to={verticalAlign:"middle"},no={color:"#404040"},io={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},ro={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},oo={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"},ao='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+eo+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>';function so(){Qr||(Ne(Qr=Ye(ao),io),Ne(Xe("svg",Qr),to),Ne(Xe(".backdrop",Qr),ro),Ne(Xe(".notice",Qr),oo),Ne(Xe(".link",Qr),no,{margin:"15px 20px 15px 10px",alignSelf:"center"}),He.bind(Qr,".backdrop","click",(function(e){document.body.removeChild(Qr)}))),document.body.appendChild(Qr)}function lo(e){e=_({},co,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),function(e){const t=Ye('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+eo+"</a>");Ne(Xe("svg",t),to),Ne(t,no,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(t),We.bind(t,"click",(function(e){so(),e.preventDefault()}))}(this._container)}function po(e,t){return e.warnings=t,e}e(lo,Ni),lo.prototype.importXML=async function(e,t){const n=this;let i=[];try{let o;e=this._emit("import.parse.start",{xml:e})||e;try{o=await this._moddle.fromXML(e,"bpmn:Definitions")}catch(e){throw this._emit("import.parse.complete",{error:e}),e}let a=o.rootElement;const s=o.references,l=o.warnings,p=o.elementsById;i=i.concat(l),a=this._emit("import.parse.complete",(r={error:null,definitions:a,elementsById:p,references:s,warnings:i},n.get("eventBus").createEvent(r)))||a;const c=await this.importDefinitions(a,t);return i=i.concat(c.warnings),this._emit("import.done",{error:null,warnings:i}),{warnings:i}}catch(e){let t=e;throw i=i.concat(t.warnings||[]),po(t,i),t=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}(t),this._emit("import.done",{error:t,warnings:t.warnings}),t}var r},lo.prototype.importDefinitions=async function(e,t){this._setDefinitions(e);return{warnings:(await this.open(t)).warnings}},lo.prototype.open=async function(e){const t=this._definitions;let n=e;if(!t){const e=new Error("no XML imported");throw po(e,[]),e}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return m(e.diagrams,(function(e){return e.id===t}))||null}(t,e),!n)){const t=new Error("BPMNDiagram <"+e+"> not found");throw po(t,[]),t}try{this.clear()}catch(e){throw po(e,[]),e}const{warnings:i}=await Zr(this,t,n);return{warnings:i}},lo.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(e){t=e}const r=t?{error:t}:{xml:n};if(this._emit("saveXML.done",r),t)throw t;return r},lo.prototype.saveSVG=async function(){let e,t;this._emit("saveSVG.start");try{const t=this.get("canvas"),n=t.getActiveLayer(),i=Xe(":scope > defs",t._svg),r=oe(n),o=i?"<defs>"+oe(i)+"</defs>":"",a=n.getBBox();e='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a.width+'" height="'+a.height+'" viewBox="'+a.x+" "+a.y+" "+a.width+" "+a.height+'" version="1.1">'+o+r+"</svg>"}catch(e){t=e}if(this._emit("saveSVG.done",{error:t,svg:e}),t)throw t;return{svg:e}},lo.prototype._setDefinitions=function(e){this._definitions=e},lo.prototype.getModules=function(){return this._modules},lo.prototype.clear=function(){this.getDefinitions()&&Ni.prototype.clear.call(this)},lo.prototype.destroy=function(){var e;Ni.prototype.destroy.call(this),(e=this._container).parentNode&&e.parentNode.removeChild(e)},lo.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},lo.prototype.off=function(e,t){this.get("eventBus").off(e,t)},lo.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=Xe(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},lo.prototype.getDefinitions=function(){return this._definitions},lo.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},lo.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=_(function(e,t){let n={};return f(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}(n,["additionalModules"]),{canvas:_({},n.canvas,{container:e}),modules:o});Ni.call(this,a),n&&n.container&&this.attachTo(n.container)},lo.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},lo.prototype._createContainer=function(e){const t=Ye('<div class="bjs-container"></div>');return Ne(t,{width:uo(e.width),height:uo(e.height),position:e.position}),t},lo.prototype._createModdle=function(e){return new Kr(_({},this._moddleExtensions,e.moddleExtensions))},lo.prototype._modules=[];const co={width:"100%",height:"100%",position:"relative"};function uo(e){return e+(l(e)?"px":"")}function mo(e){lo.call(this,e)}e(mo,lo),mo.prototype._modules=[en,Pn,un,Gn,Gt],mo.prototype._moddleExtensions={};function ho(e,t,n){this._bpmnRenderer=t,this._iconProperty=e&&e.iconProperty,S.call(this,n,1250)}e(ho,S),ho.prototype.canRender=function(e){return!D(e)&&!(!R(e,["bpmn:Activity","bpmn:Event"])||!this._getIcon(e))},ho.prototype._getIcon=function(e){return function(e,t){return t=t||"zeebe:modelerTemplateIcon",C(e).get(t)}(e,this._iconProperty)},ho.prototype.drawShape=function(e,t,n={}){var i=(0,this._bpmnRenderer.handlers[["bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:EndEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:StartEvent","bpmn:Task","bpmn:AdHocSubProcess","bpmn:Transaction","bpmn:SubProcess"].find((e=>k(t,e)))])(e,t,{...n,renderIcon:!1}),r=this._getIcon(t),o=k(t,"bpmn:Activity")?{x:5,y:5}:{x:(t.width-18)/2,y:(t.height-18)/2},a=Y("image");return W(a,{href:r,width:18,height:18,...o}),F(e,a),i},ho.$inject=["config.elementTemplateIconRenderer","bpmnRenderer","eventBus"];const fo=[{__init__:["elementTemplateIconRenderer"],elementTemplateIconRenderer:["type",ho]}],yo={zeebe:{name:"zeebe",prefix:"zeebe",uri:"http://camunda.org/schema/zeebe/1.0",xml:{tagAlias:"lowerCase"},associations:[],types:[{name:"ZeebeServiceTask",extends:["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:SendTask","bpmn:EndEvent","bpmn:IntermediateThrowEvent","bpmn:AdHocSubProcess"],properties:[{name:"retryCounter",type:"String",isAttr:!0}]},{name:"IoMapping",superClass:["Element"],properties:[{name:"ioMapping",type:"IoMapping"},{name:"inputParameters",isMany:!0,type:"Input"},{name:"outputParameters",isMany:!0,type:"Output"}],meta:{allowedIn:["bpmn:CallActivity","bpmn:Event","bpmn:ReceiveTask","zeebe:ZeebeServiceTask","bpmn:SubProcess","bpmn:UserTask"]}},{name:"InputOutputParameter",properties:[{name:"source",isAttr:!0,type:"String"},{name:"target",isAttr:!0,type:"String"}]},{name:"Subscription",superClass:["Element"],properties:[{name:"correlationKey",isAttr:!0,type:"String"}]},{name:"Input",superClass:["InputOutputParameter"],meta:{allowedIn:["bpmn:CallActivity","zeebe:ZeebeServiceTask","bpmn:SubProcess","bpmn:UserTask"]}},{name:"Output",superClass:["InputOutputParameter"],meta:{allowedIn:["bpmn:CallActivity","bpmn:Event","bpmn:ReceiveTask","zeebe:ZeebeServiceTask","bpmn:SubProcess","bpmn:UserTask"]}},{name:"TaskHeaders",superClass:["Element"],meta:{allowedIn:["zeebe:ZeebeServiceTask","bpmn:UserTask"]},properties:[{name:"values",type:"Header",isMany:!0}]},{name:"Header",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"key",type:"String",isAttr:!0},{name:"value",type:"String",isAttr:!0}]},{name:"TaskDefinition",superClass:["Element"],meta:{allowedIn:["zeebe:ZeebeServiceTask"]},properties:[{name:"type",type:"String",isAttr:!0},{name:"retries",type:"String",isAttr:!0}]},{name:"LoopCharacteristics",superClass:["Element"],meta:{allowedIn:["bpmn:MultiInstanceLoopCharacteristics"]},properties:[{name:"inputCollection",type:"String",isAttr:!0},{name:"inputElement",type:"String",isAttr:!0},{name:"outputCollection",type:"String",isAttr:!0},{name:"outputElement",type:"String",isAttr:!0}]},{name:"CalledElement",superClass:["Element"],meta:{allowedIn:["bpmn:CallActivity"]},properties:[{name:"processId",type:"String",isAttr:!0},{name:"processIdExpression",type:"String",isAttr:!0},{name:"propagateAllChildVariables",isAttr:!0,type:"Boolean"},{name:"propagateAllParentVariables",isAttr:!0,type:"Boolean",default:!0}]},{name:"UserTaskForm",superClass:["Element"],meta:{allowedIn:["bpmn:Process"]},properties:[{name:"id",type:"String",isAttr:!0},{name:"body",type:"String",isBody:!0}]},{name:"FormDefinition",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"formKey",type:"String",isAttr:!0},{name:"formId",type:"String",isAttr:!0},{name:"externalReference",type:"String",isAttr:!0}]},{name:"LinkedResource",superClass:["Element"],meta:{allowedIn:["bpmn:ServiceTask"]},properties:[{name:"resourceId",type:"String",isAttr:!0},{name:"resourceType",type:"String",isAttr:!0},{name:"linkName",type:"String",isAttr:!0}]},{name:"LinkedResources",superClass:["Element"],meta:{allowedIn:["bpmn:ServiceTask"]},properties:[{name:"values",type:"LinkedResource",isMany:!0}]},{name:"UserTask",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[]},{name:"CalledDecision",superClass:["Element"],meta:{allowedIn:["bpmn:BusinessRuleTask"]},properties:[{name:"decisionId",type:"String",isAttr:!0},{name:"resultVariable",type:"String",isAttr:!0}]},{name:"AssignmentDefinition",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"assignee",type:"String",isAttr:!0},{name:"candidateGroups",type:"String",isAttr:!0},{name:"candidateUsers",type:"String",isAttr:!0}]},{name:"PriorityDefinition",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"priority",type:"String",isAttr:!0}]},{name:"TaskSchedule",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"dueDate",type:"String",isAttr:!0},{name:"followUpDate",type:"String",isAttr:!0}]},{name:"Properties",superClass:["Element"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"Property",properties:[{name:"name",type:"String",isAttr:!0},{name:"value",type:"String",isAttr:!0}]},{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:"modelerTemplateIcon",isAttr:!0,type:"String"}]},{name:"TemplatedRootElement",isAbstract:!0,extends:["bpmn:Error","bpmn:Escalation","bpmn:Message","bpmn:Signal"],properties:[{name:"modelerTemplate",isAttr:!0,type:"String"}]},{name:"Script",superClass:["Element"],meta:{allowedIn:["bpmn:ScriptTask"]},properties:[{name:"expression",type:"String",isAttr:!0},{name:"resultVariable",type:"String",isAttr:!0}]},{name:"ExecutionListeners",superClass:["Element"],meta:{allowedIn:["bpmn:Event","bpmn:Activity","bpmn:Process","bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:ParallelGateway","bpmn:EventBasedGateway"]},properties:[{name:"listeners",type:"ExecutionListener",isMany:!0}]},{name:"ExecutionListener",superClass:["Element"],meta:{allowedIn:["zeebe:ExecutionListeners"]},properties:[{name:"eventType",type:"String",isAttr:!0},{name:"retries",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0}]},{name:"TaskListeners",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"listeners",type:"TaskListener",isMany:!0}]},{name:"TaskListener",superClass:["Element"],meta:{allowedIn:["zeebe:TaskListeners"]},properties:[{name:"eventType",type:"String",isAttr:!0},{name:"retries",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0}]},{name:"VersionTag",superClass:["Element"],meta:{allowedIn:["bpmn:Process"]},properties:[{name:"value",type:"String",isAttr:!0}]},{name:"BindingTypeSupported",isAbstract:!0,extends:["zeebe:CalledDecision","zeebe:CalledElement","zeebe:FormDefinition","zeebe:LinkedResource"],properties:[{name:"bindingType",isAttr:!0,type:"String",default:"latest"},{name:"versionTag",isAttr:!0,type:"String"}]},{name:"AdHoc",superClass:["Element"],meta:{allowedIn:["bpmn:AdHocSubProcess"]},properties:[{name:"activeElementsCollection",isAttr:!0,type:"String"},{name:"outputCollection",isAttr:!0,type:"String"},{name:"outputElement",isAttr:!0,type:"String"}]}]}};function go(e={}){e={...e,moddleExtensions:{...yo,...e.moddleExtensions}},mo.call(this,e)}return e(go,mo),go.prototype._camundaCloudModules=[...fo],go.prototype._modules=[].concat(mo.prototype._modules,go.prototype._camundaCloudModules),go}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnViewer=t()}(this,(function(){"use strict";function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const t=Object.prototype.toString,n=Object.prototype.hasOwnProperty;function i(e){return"[object Object]"===t.call(e)}function r(e,t){return!(null==e)&&n.call(e,t)}function o(e,t){const n=l(t);let i;return a(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function a(e,n){let i,o;if(void 0===e)return;const a=function(e){return"[object Array]"===t.call(e)}(e)?c:p;for(let t in e)if(r(e,t)&&(i=e[t],o=n(i,a(t)),!1===o))return i}function s(e,t){return!!o(e,t)}function l(e){return function(e){const n=t.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}(e)?e:t=>t===e}function p(e){return e}function c(e){return Number(e)}function u(e,...t){return Object.assign(e,...t)}var m=1e3;function f(e,t){var n=this;t=t||m,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 h(e,t){var n=y(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function d(e,t){return s(t,(function(t){return h(e,t)}))}function y(e){return e&&e.businessObject||e}function g(e){return e&&e.di}function v(e,t){return!h(e,"bpmn:CallActivity")&&(h(e,"bpmn:SubProcess")?!(!(t=t||g(e))||!h(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!h(e,"bpmn:Participant")||!!y(e).processRef)}function b(e){if(h(e,"bpmn:Participant")||h(e,"bpmn:Lane")){var t=g(e).isHorizontal;return void 0===t||t}}f.prototype.canRender=function(e){},f.prototype.drawShape=function(e,t){},f.prototype.drawConnection=function(e,t){},f.prototype.getShapePath=function(e){},f.prototype.getConnectionPath=function(e){};const x=Object.prototype.toString,E=Object.prototype.hasOwnProperty;function w(e){return void 0!==e}function _(e){return"[object Array]"===x.call(e)}function A(e){return"[object Object]"===x.call(e)}function S(e){return"[object Number]"===x.call(e)}function k(e){const t=x.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function C(e){return"[object String]"===x.call(e)}function R(e,t){return!(null==e)&&E.call(e,t)}function M(e,t){const n=B(t);let i;return T(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function P(e,t){const n=B(t);let i=[];return T(e,(function(e,t){n(e,t)&&i.push(e)})),i}function T(e,t){let n,i;if(void 0===e)return;const r=_(e)?L:I;for(let o in e)if(R(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function D(e,t,n){return T(e,(function(e,i){n=t(n,e,i)})),n}function O(e,t){return!!D(e,(function(e,n,i){return e&&t(n,i)}),!0)}function N(e){return function(t){return O(e,(function(e,n){return t[n]===e}))}}function B(e){return k(e)?e:t=>t===e}function I(e){return e}function L(e){return Number(e)}function j(e,t){return e.bind(t)}function F(e,...t){return Object.assign(e,...t)}function V(e){return A(e)&&R(e,"labelTarget")}var z={width:90,height:20},W=15;function $(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)<Math.PI/2?s-=W:a+=W,{x:a,y:s}}function G(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(z.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=function(e){return e.waypoints?$(e.waypoints):h(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+z.height/2}:{x:e.x+e.width/2,y:e.y+e.height+z.height/2}}(t),i=z),u({x:n.x-i.width/2,y:n.y-i.height/2},i)}function H(e){var t=e.businessObject,n=function(e){return h(e,"bpmn:FlowElement")||h(e,"bpmn:Participant")||h(e,"bpmn:Lane")||h(e,"bpmn:SequenceFlow")||h(e,"bpmn:MessageFlow")||h(e,"bpmn:DataInput")||h(e,"bpmn:DataOutput")?"name":h(e,"bpmn:TextAnnotation")?"text":h(e,"bpmn:Group")?"categoryValueRef":void 0}(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function U(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}var K=2,q={"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":K,"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":K,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Y(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=q[i];r?(r===K&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function X(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return q[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);Y(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)Y(e,i,t[i])}(e,t);return e}const Z=Object.prototype.toString;function J(e){return new Q(e)}function Q(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Q.prototype.add=function(e){return this.list.add(e),this},Q.prototype.remove=function(e){return"[object RegExp]"==Z.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Q.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Q.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Q.prototype.array=function(){return Array.from(this.list)},Q.prototype.has=Q.prototype.contains=function(e){return this.list.contains(e)};var ee={svg:"http://www.w3.org/2000/svg"},te='<svg xmlns="'+ee.svg+'"';function ne(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(ee.svg)&&(e=te+e.substring(4)):(e=te+">"+e+"</svg>",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 ie(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=ne(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(ee.svg,e),t&&X(n,t),n}var re=null;function oe(){return null===re&&(re=ie("svg")),re}function ae(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function se(e){return oe().createSVGTransform()}var le=/([&<>]{1})/g,pe=/([&<>\n\r"]{1})/g,ce={"&":"&","<":"<",">":">",'"':"'"};function ue(e,t){return e.replace(t,(function(e,t){return ce[t]||t}))}function me(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(ue(e.textContent,le));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',ue(o.value,pe),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)me(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",ue(e.nodeValue,le),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function fe(e,t){return function(e){for(var t=e.firstChild,n=[];t;)me(t,n),t=t.nextSibling;return n.join("")}(e)}function he(e){var t=e.parentNode;return t&&t.removeChild(e),e}function de(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function ye(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(de(e,i))}(n,t)),n.consolidate()}function ge(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function ve(e){return["L",e.x,e.y]}function be(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,a,s;for(let r=1;r<n;r++){const n=e[r-1],l=e[r],p=e[r+1];if(!p||!t){i.push(ve(l));continue}const c=Math.min(t,Ee(l.x-n.x,l.y-n.y),Ee(p.x-l.x,p.y-l.y));if(!c){i.push(ve(l));continue}const u=xe(l,n,c),m=xe(l,n,.5*c),f=xe(l,p,c),h=xe(l,p,.5*c);i.push(ve(u)),i.push((a=h,s=f,["C",(o=m).x,o.y,a.x,a.y,s.x,s.y]))}return i}function xe(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/Ee(i,r);return{x:e.x+i*o,y:e.y+r*o}}function Ee(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function we(e,t,n){S(t)&&(n=t,t=null),t||(t={});const i=ie("path",t);return S(n)&&(i.dataset.cornerRadius=String(n)),_e(i,e)}function _e(e,t){return X(e,{d:ge(be(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}var Ae="hsl(225, 10%, 15%)",Se="white";function ke(e,t){return s(e.eventDefinitions,(function(e){return e.$type===t}))}function Ce(e,t,n){var i=g(e);return n||i.get("color:background-color")||i.get("bioc:fill")||t||Se}function Re(e,t,n){var i=g(e);return n||i.get("color:border-color")||i.get("bioc:stroke")||t||Ae}function Me(e,t,n,i){var r=g(e).get("label");return i||r&&r.get("color:color")||t||Re(e,n)}function Pe(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return ge([["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"]])}function Te(e,t={}){return{width:De(e,t),height:Oe(e,t)}}function De(e,t={}){return r(t,"width")?t.width:e.width}function Oe(e,t={}){return r(t,"height")?t.height:e.height}function Ne(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 Be=Object.prototype.toString,Ie=Object.prototype.hasOwnProperty;function Le(e,t){return Ie.call(e,t)}function je(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===Be.call(e)}(e)?Ve:Fe;for(let o in e)if(Le(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function Fe(e){return e}function Ve(e){return Number(e)}function ze(e,...t){const n=e.style;return je(t,(function(e){e&&je(e,(function(e,t){n[t]=e}))})),e}const We=Object.prototype.toString;function $e(e){return new Ge(e)}function Ge(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Ge.prototype.add=function(e){return this.list.add(e),this},Ge.prototype.remove=function(e){return"[object RegExp]"==We.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Ge.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Ge.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Ge.prototype.array=function(){return Array.from(this.list)},Ge.prototype.has=Ge.prototype.contains=function(e){return this.list.contains(e)};var He,Ue,Ke,qe={};function Ye(){He=window.addEventListener?"addEventListener":"attachEvent",Ue=window.removeEventListener?"removeEventListener":"detachEvent",Ke="addEventListener"!==He?"on":""}var Xe=Ne({__proto__:null,bind:qe.bind=function(e,t,n,i){return He||Ye(),e[He](Ke+t,n,i||!1),n},unbind:qe.unbind=function(e,t,n,i){return Ue||Ye(),e[Ue](Ke+t,n,i||!1),n},default:qe},[qe]),Ze=["focus","blur"];var Je,Qe={bind:function(e,t,n,i,r){return-1!==Ze.indexOf(n)&&(r=!0),Xe.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=function(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==Ze.indexOf(t)&&(i=!0),Xe.unbind(e,t,n,i)}},et=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=Object.prototype.hasOwnProperty.call(nt,i)?nt[i]:nt._default,a=o[0],s=o[1],l=o[2];(r=t.createElement("div")).innerHTML=s+e+l;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},tt=!1;"undefined"!=typeof document&&((Je=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',tt=!Je.getElementsByTagName("link").length,Je=void 0);var nt={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:tt?[1,"X<div>","</div>"]:[0,"",""]};nt.td=nt.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],nt.option=nt.optgroup=[1,'<select multiple="multiple">',"</select>"],nt.thead=nt.tbody=nt.colgroup=nt.caption=nt.tfoot=[1,"<table>","</table>"],nt.polyline=nt.ellipse=nt.polygon=nt.circle=nt.text=nt.line=nt.path=nt.rect=nt.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var it=et;function rt(e,t){return(t=t||document).querySelector(e)}function ot(e,t,n,i,r){var o=se();o.setTranslate(t,n);var a=se();a.setRotate(i||0,0,0);var s=se();s.setScale(1,1),ye(e,[o,a,s])}function at(e,t,n){var i=se();i.setTranslate(t,n),ye(e,i)}var st=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var l=parseInt(a,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function lt(e){if(!(this instanceof lt))return new lt(e);e=e||[128,36,1],this._seed=e.length?st.rack(e[0],e[1],e[2]):e}lt.prototype.next=function(e){return this._seed(e||!0)},lt.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},lt.prototype.claim=function(e,t){this._seed.set(e,t||!0)},lt.prototype.assigned=function(e){return this._seed.get(e)||!1},lt.prototype.unclaim=function(e){delete this._seed.hats[e]},lt.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var pt=new lt,ct=.95;function ut(e,t,n,r,o,s,l){f.call(this,t,l);var p=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,m=e&&e.defaultLabelColor;function d(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Ae,strokeWidth:2,fill:"white"})}function x(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Ae,strokeWidth:2})}function E(e,t){var{ref:n={x:0,y:0},scale:i=1,element:r,parentGfx:a=o._svg}=t,s=ie("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*i,markerHeight:20*i,orient:"auto"});U(s,r);var l=rt(":scope > defs",a);l||U(a,l=ie("defs")),U(l,s)}function w(e,t,n,i){var r=pt.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){E(t,{element:ie("path",{d:"M 1 5 L 11 10 L 1 15 Z",...d({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("messageflow-start"===n){E(t,{element:ie("circle",{cx:6,cy:6,r:3.5,...d({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6},parentGfx:e})}if("messageflow-end"===n){E(t,{element:ie("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...d({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5},parentGfx:e})}if("association-start"===n){E(t,{element:ie("path",{d:"M 11 5 L 1 10 L 11 15",...x({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5,parentGfx:e})}if("association-end"===n){E(t,{element:ie("path",{d:"M 1 5 L 11 10 L 1 15",...x({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("conditional-flow-marker"===n){E(t,{element:ie("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...d({fill:i,stroke:r})}),ref:{x:-1,y:10},scale:.5,parentGfx:e})}if("conditional-default-flow-marker"===n){E(t,{element:ie("path",{d:"M 6 4 L 10 16",...d({stroke:r,fill:"none"})}),ref:{x:0,y:10},scale:.5,parentGfx:e})}}(e,r,t,n,i),"url(#"+r+")"}function _(e,t,n,r,o={}){i(r)&&(o=r,r=0),r=r||0,o=d(o);var a=ie("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-r),...o});return U(e,a),a}function A(e,t,n,r,o,a){i(o)&&(a=o,o=0),o=o||0,a=d(a);var s=ie("rect",{x:o,y:o,width:t-2*o,height:n-2*o,rx:r,ry:r,...a});return U(e,s),s}function S(e,t,n,i){var r=we(t,n=x(n),i);return U(e,r),r}function k(e,t,n){return S(e,t,n,5)}function C(e,t,n){n=x(n);var i=ie("path",{...n,d:t});return U(e,i),i}function R(e,t,n,i){return C(t,n,u({"data-marker":e},i))}function M(e){return Y[e]}function P(e){return function(t,n,i){return M(e)(t,n,i)}}var T={"bpmn:MessageEventDefinition":function(e,t,n={},i){return C(e,r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.235,my:.315}}),{fill:i?Re(t,c,n.stroke):Ce(t,p,n.fill),stroke:i?Ce(t,p,n.fill):Re(t,c,n.stroke),strokeWidth:1})},"bpmn:TimerEventDefinition":function(e,t,n={}){var i=n.width||t.width,o=n.height||t.height,a=n.width?1:2,s=_(e,i,o,.2*o,{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:a});C(e,r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:i,containerHeight:o,position:{mx:.5,my:.5}}),{stroke:Re(t,c,n.stroke),strokeWidth:a});for(var l=0;l<12;l++){var u=i/2,m=o/2;C(e,r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:i,containerHeight:o,position:{mx:.5,my:.5}}),{strokeWidth:1,stroke:Re(t,c,n.stroke),transform:"rotate("+30*l+","+m+","+u+")"})}return s},"bpmn:EscalationEventDefinition":function(e,t,n={},i){return C(e,r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.5,my:.2}}),{fill:i?Re(t,c,n.stroke):Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(e,t,n={}){return C(e,r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.5,my:.222}}),{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(e,t,n={},i){return C(e,r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:i?Re(t,c,n.stroke):Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(e,t,n={},i){return C(e,r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.2,my:.722}}),{fill:i?Re(t,c,n.stroke):Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(e,t,n={},i){var o=C(e,r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:i?Re(t,c,n.stroke):"none",stroke:Re(t,c,n.stroke),strokeWidth:1});return function(e,t){var n=se();n.setRotate(t,0,0),ye(e,n)}(o,45),o},"bpmn:CompensateEventDefinition":function(e,t,n={},i){return C(e,r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.22,my:.5}}),{fill:i?Re(t,c,n.stroke):Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(e,t,n={},i){return C(e,r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:i?Re(t,c,n.stroke):Ce(t,p,n.fill),stroke:Re(t,c,n.stroke)})},"bpmn:MultipleEventDefinition":function(e,t,n={},i){return C(e,r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.211,my:.36}}),{fill:i?Re(t,c,n.stroke):Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(e,t,n={}){return C(e,r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.458,my:.194}}),{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(e,t,n={}){return _(e,t.width,t.height,8,{fill:Re(t,c,n.stroke),stroke:Re(t,c,n.stroke),strokeWidth:4})}};function D(e,t,n={},i){var r=y(e),o=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(r),a=i||e;return r.get("eventDefinitions")&&r.get("eventDefinitions").length>1?r.get("parallelMultiple")?T["bpmn:ParallelMultipleEventDefinition"](t,a,n,o):T["bpmn:MultipleEventDefinition"](t,a,n,o):ke(r,"bpmn:MessageEventDefinition")?T["bpmn:MessageEventDefinition"](t,a,n,o):ke(r,"bpmn:TimerEventDefinition")?T["bpmn:TimerEventDefinition"](t,a,n,o):ke(r,"bpmn:ConditionalEventDefinition")?T["bpmn:ConditionalEventDefinition"](t,a,n,o):ke(r,"bpmn:SignalEventDefinition")?T["bpmn:SignalEventDefinition"](t,a,n,o):ke(r,"bpmn:EscalationEventDefinition")?T["bpmn:EscalationEventDefinition"](t,a,n,o):ke(r,"bpmn:LinkEventDefinition")?T["bpmn:LinkEventDefinition"](t,a,n,o):ke(r,"bpmn:ErrorEventDefinition")?T["bpmn:ErrorEventDefinition"](t,a,n,o):ke(r,"bpmn:CancelEventDefinition")?T["bpmn:CancelEventDefinition"](t,a,n,o):ke(r,"bpmn:CompensateEventDefinition")?T["bpmn:CompensateEventDefinition"](t,a,n,o):ke(r,"bpmn:TerminateEventDefinition")?T["bpmn:TerminateEventDefinition"](t,a,n,o):null}var O={ParticipantMultiplicityMarker:function(e,t,n={}){var i=De(t,n),o=Oe(t,n);R("participant-multiplicity",e,r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2-6)/i,my:(o-15)/o}}),{strokeWidth:2,fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke)})},SubProcessMarker:function(e,t,n={}){at(A(e,14,14,0,{strokeWidth:1,fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke)}),t.width/2-7.5,t.height-20),R("sub-process",e,r.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:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke)})},ParallelMarker:function(e,t,n){var i=De(t,n),o=Oe(t,n);R("parallel",e,r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2+n.parallel)/i,my:(o-20)/o}}),{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke)})},SequentialMarker:function(e,t,n){R("sequential",e,r.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:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke)})},CompensationMarker:function(e,t,n){R("compensation",e,r.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:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke)})},LoopMarker:function(e,t,n){var i=De(t,n),o=Oe(t,n);R("loop",e,r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2+n.loop)/i,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:Re(t,c,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var i=De(t,n),o=Oe(t,n);R("adhoc",e,r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:(i/2+n.adhoc)/i,my:(o-15)/o}}),{strokeWidth:1,fill:Re(t,c,n.stroke),stroke:Re(t,c,n.stroke)})}};function N(e,t,n,i){O[e](t,n,i)}function B(e,t,n=[],i={}){i={fill:i.fill,stroke:i.stroke,width:De(t,i),height:Oe(t,i)};var r=y(t),o=n.includes("SubProcessMarker");i=o?{...i,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:{...i,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},r.get("isForCompensation")&&n.push("CompensationMarker"),h(r,"bpmn:AdHocSubProcess")&&(n.push("AdhocMarker"),o||u(i,{compensation:i.compensation-18}));var s=r.get("loopCharacteristics"),l=s&&s.get("isSequential");s&&(u(i,{compensation:i.compensation-18}),n.includes("AdhocMarker")&&u(i,{seq:-23,loop:-18,parallel:-24}),void 0===l&&n.push("LoopMarker"),!1===l&&n.push("ParallelMarker"),!0===l&&n.push("SequentialMarker")),n.includes("CompensationMarker")&&1===n.length&&u(i,{compensation:-8}),a(n,(function(n){N(n,e,t,i)}))}function I(e,t,n={}){n=u({size:{width:100}},n);var i=s.createText(t||"",n);return J(i).add("djs-label"),U(e,i),i}function L(e,t,n,i={}){var r=y(t),o=Te({x:t.x,y:t.y,width:t.width,height:t.height},i);return I(e,r.name,{align:n,box:o,padding:7,style:{fill:Me(t,m,c,i.stroke)}})}function j(e,t,n,i={}){var r=b(n),o=I(e,t,{box:{height:30,width:r?Oe(n,i):De(n,i)},align:"center-middle",style:{fill:Me(n,m,c,i.stroke)}});r&&ot(o,0,-(-1*Oe(n,i)),270)}function F(e,t,n={}){var{width:i,height:r}=Te(t,n);return A(e,i,r,10,{...n,fill:Ce(t,p,n.fill),fillOpacity:ct,stroke:Re(t,c,n.stroke)})}function V(e,t,n={}){var i=y(t),r=Ce(t,p,n.fill),o=Re(t,c,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=w(e,"association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=w(e,"association-start",r,o)),n=mt(n,["markerStart","markerEnd"]),k(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function z(e,t,n={}){var i=Ce(t,p,n.fill),o=Re(t,c,n.stroke),a=C(e,r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:i,fillOpacity:ct,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(y(t))&&C(e,r.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:i,stroke:o});return a}function W(e,t,n={}){return _(e,t.width,t.height,{fillOpacity:ct,...n,fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke)})}function $(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=d(i);var s=ie("polygon",{...i,points:a});return U(e,s),s}(e,t.width,t.height,{fill:Ce(t,p,n.fill),fillOpacity:ct,stroke:Re(t,c,n.stroke)})}function G(e,t,n={}){var i=A(e,De(t,n),Oe(t,n),0,{fill:Ce(t,p,n.fill),fillOpacity:n.fillOpacity||ct,stroke:Re(t,c,n.stroke),strokeWidth:1.5}),r=y(t);h(r,"bpmn:Lane")&&j(e,r.get("name"),t,n);return i}function K(e,t,n={}){var i=F(e,t,n),r=v(t);if(function(e){return e&&!!y(e).triggeredByEvent}(t)&&(X(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!r)){var o=(y(t).flowElements||[]).filter((e=>h(e,"bpmn:StartEvent")));1===o.length&&function(e,t,n,i){var r=22,o={fill:Ce(i,p,n.fill),stroke:Re(i,c,n.stroke),width:r,height:r},a=y(e).isInterrupting,s=a?0:3,l=a?1:1.2,u=20,m=(r-u)/2,f="translate("+m+","+m+")";_(t,u,u,{fill:o.fill,stroke:o.stroke,strokeWidth:l,strokeDasharray:s,transform:f}),D(e,t,o,i)}(o[0],e,n,t)}return L(e,t,r?"center-top":"center-middle",n),B(e,t,r?void 0:["SubProcessMarker"],n),i}function q(e,t,n={}){var i=F(e,t,n);return L(e,t,"center-middle",n),B(e,t,void 0,n),i}var Y=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return K(e,t,n=v(t)?mt(n,["fill","stroke","width","height"]):mt(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return V(e,t,n=mt(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=mt(n,["fill","stroke"]);var r=y(t).get("cancelActivity");n={strokeWidth:1.5,fill:Ce(t,p,n.fill),fillOpacity:1,stroke:Re(t,c,n.stroke)},r||(n.strokeDasharray="6");var o=W(e,t,n);return _(e,t.width,t.height,3,{...n,fill:"none"}),i&&D(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var i=q(e,t,n=mt(n,["fill","stroke"]));return X(C(e,r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1}),X(C(e,r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:Re(t,c,n.stroke),stroke:Re(t,c,n.stroke),strokeWidth:1}),i},"bpmn:CallActivity":function(e,t,n={}){return n=mt(n,["fill","stroke"]),K(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var i=$(e,t,n=mt(n,["fill","stroke"]));return C(e,r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:Re(t,c,n.stroke),stroke:Re(t,c,n.stroke),strokeWidth:1}),i},"bpmn:DataInput":function(e,t,n={}){n=mt(n,["fill","stroke"]);var i=r.getRawPath("DATA_ARROW"),o=z(e,t,n);return C(e,i,{fill:"none",stroke:Re(t,c,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=mt(n,["fill","stroke"]),V(e,t,{...n,markerEnd:w(e,"association-end",Ce(t,p,n.fill),Re(t,c,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return z(e,t,n=mt(n,["fill","stroke"]))},"bpmn:DataObjectReference":P("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=mt(n,["fill","stroke"]);var i=r.getRawPath("DATA_ARROW"),o=z(e,t,n);return C(e,i,{strokeWidth:1,fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=mt(n,["fill","stroke"]),V(e,t,{...n,markerEnd:w(e,"association-end",Ce(t,p,n.fill),Re(t,c,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=mt(n,["fill","stroke"]),C(e,r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:Ce(t,p,n.fill),fillOpacity:ct,stroke:Re(t,c,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=mt(n,["fill","stroke"]);var r=W(e,t,{...n,strokeWidth:4});return i&&D(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=mt(n,["fill","stroke"]);var i=y(t),o=$(e,t,n);_(e,t.width,t.height,.2*t.height,{fill:Ce(t,"none",n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1});var a=i.get("eventGatewayType"),s=!!i.get("instantiate");if("Parallel"===a){var l=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});C(e,l,{fill:"none",stroke:Re(t,c,n.stroke),strokeWidth:1})}else"Exclusive"===a&&(s||_(e,t.width,t.height,.26*t.height,{fill:"none",stroke:Re(t,c,n.stroke),strokeWidth:1}),function(){var i=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});C(e,i,{fill:"none",stroke:Re(t,c,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var i=$(e,t,n=mt(n,["fill","stroke"])),o=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return g(t).get("isMarkerVisible")&&C(e,o,{fill:Re(t,c,n.stroke),stroke:Re(t,c,n.stroke),strokeWidth:1}),i},"bpmn:Gateway":function(e,t,n={}){return $(e,t,n=mt(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=mt(n,["fill","stroke","width","height"]),A(e,t.width,t.height,10,{stroke:Re(t,c,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:De(t,n),height:Oe(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=$(e,t,n=mt(n,["fill","stroke"]));return _(e,t.width,t.height,.24*t.height,{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=mt(n,["fill","stroke"]);var r=W(e,t,{...n,strokeWidth:1.5});return _(e,t.width,t.height,3,{fill:"none",stroke:Re(t,c,n.stroke),strokeWidth:1.5}),i&&D(t,e,n),r},"bpmn:IntermediateCatchEvent":P("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":P("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=mt(n,["fill","stroke","width","height"]),G(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var i=q(e,t,n=mt(n,["fill","stroke"]));return C(e,r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:.5}),i},"bpmn:MessageFlow":function(e,t,n={}){n=mt(n,["fill","stroke"]);var i=y(t),o=g(t),a=Ce(t,p,n.fill),s=Re(t,c,n.stroke),l=k(e,t.waypoints,{markerEnd:w(e,"messageflow-end",a,s),markerStart:w(e,"messageflow-start",a,s),stroke:s,strokeDasharray:"10, 11",strokeWidth:1.5});if(i.get("messageRef")){var u=l.getPointAtLength(l.getTotalLength()/2),m=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),f={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(f.fill=a,f.stroke=s):(f.fill=s,f.stroke=a);var h=C(e,m,f),d=I(e,i.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:s}}),v=h.getBBox(),b=d.getBBox();ot(d,u.x-b.width/2,u.y+v.height/2+10,0)}return l},"bpmn:ParallelGateway":function(e,t,n={}){var i=$(e,t,n=mt(n,["fill","stroke"]));return C(e,r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:Re(t,c,n.stroke),stroke:Re(t,c,n.stroke),strokeWidth:1}),i},"bpmn:Participant":function(e,t,n={}){var i=G(e,t,n=mt(n,["fill","stroke","width","height"])),r=v(t),o=b(t),a=y(t),s=a.get("name");if(r){S(e,o?[{x:30,y:0},{x:30,y:Oe(t,n)}]:[{x:0,y:30},{x:De(t,n),y:30}],{stroke:Re(t,c,n.stroke),strokeWidth:1.5}),j(e,s,t,n)}else{var l=Te(t,n);o||(l.height=De(t,n),l.width=Oe(t,n));var p=I(e,s,{box:l,align:"center-middle",style:{fill:Me(t,m,c,n.stroke)}});if(!o)ot(p,0,-(-1*Oe(t,n)),270)}return a.get("participantMultiplicity")&&N("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=mt(n,["fill","stroke"]);var i,o=y(t),a=q(e,t,n);return o.get("instantiate")?(_(e,28,28,4.4,{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1}),i=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):i=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),C(e,i,{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1}),a},"bpmn:ScriptTask":function(e,t,n={}){var i=q(e,t,n=mt(n,["fill","stroke"]));return C(e,r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1}),i},"bpmn:SendTask":function(e,t,n={}){var i=q(e,t,n=mt(n,["fill","stroke"]));return C(e,r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:Re(t,c,n.stroke),stroke:Ce(t,p,n.fill),strokeWidth:1}),i},"bpmn:SequenceFlow":function(e,t,n={}){n=mt(n,["fill","stroke"]);var i=Ce(t,p,n.fill),r=Re(t,c,n.stroke),o=k(e,t.waypoints,{markerEnd:w(e,"sequenceflow-end",i,r),stroke:r}),a=y(t),{source:s}=t;if(s){var l=y(s);a.get("conditionExpression")&&h(l,"bpmn:Activity")&&X(o,{markerStart:w(e,"conditional-flow-marker",i,r)}),l.get("default")&&(h(l,"bpmn:Gateway")||h(l,"bpmn:Activity"))&&l.get("default")===a&&X(o,{markerStart:w(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var i=q(e,t,n=mt(n,["fill","stroke"]));return _(e,10,10,{fill:Ce(t,p,n.fill),stroke:"none",transform:"translate(6, 6)"}),C(e,r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1}),_(e,10,10,{fill:Ce(t,p,n.fill),stroke:"none",transform:"translate(11, 10)"}),C(e,r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:1}),i},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=mt(n,["fill","stroke"]),y(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=W(e,t,n);return i&&D(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return K(e,t,n=v(t)?mt(n,["fill","stroke","width","height"]):mt(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return q(e,t,n=mt(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=mt(n,["fill","stroke","width","height"]);var{width:i,height:o}=Te(t,n),a=A(e,i,o,0,0,{fill:"none",stroke:"none"});return C(e,r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i,containerHeight:o,position:{mx:0,my:0}}),{stroke:Re(t,c,n.stroke)}),I(e,y(t).get("text")||"",{align:"left-top",box:Te(t,n),padding:7,style:{fill:Me(t,m,c,n.stroke)}}),a},"bpmn:Transaction":function(e,t,i={}){i=v(t)?mt(i,["fill","stroke","width","height"]):mt(i,["fill","stroke"]);var r=K(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:Re(t,c,i.stroke),strokeWidth:1.5});return v(t)||(i={}),A(e,De(t,i),Oe(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var i=q(e,t,n=mt(n,["fill","stroke"]));return C(e,r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:.5}),C(e,r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:Ce(t,p,n.fill),stroke:Re(t,c,n.stroke),strokeWidth:.5}),C(e,r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:Re(t,c,n.stroke),stroke:Re(t,c,n.stroke),strokeWidth:.5}),i},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 I(e,H(t),{box:i,fitBox:!0,style:u({},s.getExternalStyle(),{fill:Me(t,m,c,n.stroke)})})}(e,t,n)}};this._drawPath=C,this._renderer=M}function mt(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}function ft(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)}e(ut,f),ut.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],ut.prototype.canRender=function(e){return h(e,"bpmn:BaseElement")},ut.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},ut.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},ut.prototype.getShapePath=function(e){return V(e)?Pe(e,4):h(e,"bpmn:Event")?function(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2;return ge([["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]])}(e):h(e,"bpmn:Activity")?Pe(e,10):h(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return ge([["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 ge([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e)};const ht=Object.prototype.toString,dt=Object.prototype.hasOwnProperty;function yt(e,t){return dt.call(e,t)}function gt(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===ht.call(e)}(e)?bt:vt;for(let o in e)if(yt(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function vt(e){return e}function bt(e){return Number(e)}function xt(e,...t){const n=e.style;return gt(t,(function(e){e&>(e,(function(e,t){n[t]=e}))})),e}function Et(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const wt=Object.prototype.toString;function _t(e){return new At(e)}function At(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function St(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}At.prototype.add=function(e){return this.list.add(e),this},At.prototype.remove=function(e){return"[object RegExp]"==wt.call(e)?this.removeMatching(e):(this.list.remove(e),this)},At.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},At.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},At.prototype.array=function(){return Array.from(this.list)},At.prototype.has=At.prototype.contains=function(e){return this.list.contains(e)};var kt,Ct,Rt,Mt={};function Pt(){kt=window.addEventListener?"addEventListener":"attachEvent",Ct=window.removeEventListener?"removeEventListener":"detachEvent",Rt="addEventListener"!==kt?"on":""}var Tt=ft({__proto__:null,bind:Mt.bind=function(e,t,n,i){return kt||Pt(),e[kt](Rt+t,n,i||!1),n},unbind:Mt.unbind=function(e,t,n,i){return Ct||Pt(),e[Ct](Rt+t,n,i||!1),n},default:Mt},[Mt]),Dt=["focus","blur"];var Ot,Nt={bind:function(e,t,n,i,r){return-1!==Dt.indexOf(n)&&(r=!0),Tt.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=function(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==Dt.indexOf(t)&&(i=!0),Tt.unbind(e,t,n,i)}},Bt=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=Object.prototype.hasOwnProperty.call(Lt,i)?Lt[i]:Lt._default,a=o[0],s=o[1],l=o[2];(r=t.createElement("div")).innerHTML=s+e+l;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},It=!1;"undefined"!=typeof document&&((Ot=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',It=!Ot.getElementsByTagName("link").length,Ot=void 0);var Lt={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:It?[1,"X<div>","</div>"]:[0,"",""]};Lt.td=Lt.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Lt.option=Lt.optgroup=[1,'<select multiple="multiple">',"</select>"],Lt.thead=Lt.tbody=Lt.colgroup=Lt.caption=Lt.tfoot=[1,"<table>","</table>"],Lt.polyline=Lt.ellipse=Lt.polygon=Lt.circle=Lt.text=Lt.line=Lt.path=Lt.rect=Lt.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var jt=Bt;function Ft(e){e.parentNode&&e.parentNode.removeChild(e)}var Vt=0,zt={width:150,height:50};function Wt(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(e){return console.log(e),{width:0,height:0}}}function $t(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=Wt(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return Gt(e,o,r,i);o=Ut(o,i.width,t)}}function Gt(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var Ht="";function Ut(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"!==n&&n!==Ht||r.pop();break}r.push(n),o+=n.length}var a=r[r.length-1];return a&&a===Ht&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function Kt(e){this._config=F({},{size:zt,padding:Vt,style:{},align:"center-top"},e||{})}Kt.prototype.createText=function(e,t){return this.layoutText(e,t).element},Kt.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},Kt.prototype.layoutText=function(e,t){var n=F({},this._config.size,t.box),i=F({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return A(e)?F({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),a=t.fitBox||!1,s=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),l=e.split(/\u00AD?\r?\n/),p=[],c=n.width-o.left-o.right,u=ie("text");for(X(u,{x:0,y:0}),X(u,i),U(function(){var e=document.getElementById("helper-svg");return e||(X(e=ie("svg"),{id:"helper-svg"}),xt(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),u);l.length;)p.push($t(l,c,u));"middle"===r.vertical&&(o.top=o.bottom=0);var m=D(p,(function(e,t,n){return e+(s||t.height)}),0)+o.top+o.bottom,f=D(p,(function(e,t,n){return t.width>e?t.width:e}),0),h=o.top;"middle"===r.vertical&&(h+=(n.height-m)/2),h-=(s||p[0].height)/4;var d=ie("text");return X(d,i),T(p,(function(e){var t;switch(h+=s||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(a?f:c)-o.right-e.width;break;default:t=Math.max(((a?f:c)-e.width)/2+o.left,0)}var n=ie("tspan");X(n,{x:t,y:h}),n.textContent=e.text,U(d,n)})),he(u),{dimensions:{width:f,height:m},element:d}};function qt(e){var t=u({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=u({},t,{fontSize:n},e&&e.externalStyle||{}),r=new Kt({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}}qt.$inject=["config.textRenderer"];var Yt=/\{([^{}]+)\}/g,Xt=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var Zt={__init__:["bpmnRenderer"],bpmnRenderer:["type",ut],textRenderer:["type",qt],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={};if(t.position){for(var a=t.containerHeight/r.height*t.yScaleFactor,s=t.containerWidth/r.width*t.xScaleFactor,l=0;l<r.heightElements.length;l++)o["y"+l]=r.heightElements[l]*a;for(var p=0;p<r.widthElements.length;p++)o["x"+p]=r.widthElements[p]*s}var c,u,m=(c=r.d,u={mx:n,my:i,e:o},String(c).replace(Yt,(function(e,t){return function(e,t,n){var i=n;return t.replace(Xt,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,u)})));return m}}]};var Jt={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]};function Qt(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function en(e){return t={x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2},{x:Math.round(t.x),y:Math.round(t.y)};var t}function tn(e){for(var t=e.waypoints,n=t.reduce((function(e,n,i){var r,o,a=t[i-1];if(a){var s=e[e.length-1],l=s&&s.endLength||0,p=(r=a,o=n,Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)));e.push({start:a,end:n,startLength:l,endLength:l+p,length:p})}return e}),[]),i=n.reduce((function(e,t){return e+t.length}),0)/2,r=0,o=n[r];o.endLength<i;)o=n[++r];var a=(i-o.startLength)/o.length;return{x:o.start.x+(o.end.x-o.start.x)*a,y:o.start.y+(o.end.y-o.start.y)*a}}function nn(e){return A(t=e)&&R(t,"waypoints")?tn(e):en(e);var t}function rn(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function on(e,t,n){return u({id:e.id,type:e.$type,businessObject:e,di:t},n)}function an(e,t,n){var i=e.waypoint;return!i||i.length<2?[nn(t),nn(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function sn(e,t,n){return new Error(`element ${rn(t)} referenced by ${rn(e)}#${n} not yet drawn`)}function ln(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}ln.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],ln.prototype.add=function(e,t,n){var i,r,o,a,s,l,p;if(h(t,"bpmndi:BPMNPlane")){var c=h(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(on(e,t,c)),this._canvas.addRootElement(i)}else if(h(t,"bpmndi:BPMNShape")){var u=!v(e,t),m=function(e){return h(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var f=t.bounds;i=this._elementFactory.createShape(on(e,t,{collapsed:u,hidden:r,x:Math.round(f.x),y:Math.round(f.y),width:Math.round(f.width),height:Math.round(f.height),isFrame:m})),h(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),h(e,"bpmn:Lane")&&(o=0),h(e,"bpmn:DataStoreReference")&&(a=n,s=nn(f),l=s.x,p=s.y,l>=a.x&&l<=a.x+a.width&&p>=a.y&&p<=a.y+a.height||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!h(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${rn(t)} for element ${rn(e)}`);var d=this._getSource(e),y=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(on(e,t,{hidden:r,source:d,target:y,waypoints:an(t,d,y)})),h(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return function(e){return h(e,"bpmn:Event")||h(e,"bpmn:Gateway")||h(e,"bpmn:DataStoreReference")||h(e,"bpmn:DataObjectReference")||h(e,"bpmn:DataInput")||h(e,"bpmn:DataOutput")||h(e,"bpmn:SequenceFlow")||h(e,"bpmn:MessageFlow")||h(e,"bpmn:Group")}(e)&&H(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},ln.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${rn(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw sn(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},ln.prototype.addLabel=function(e,t,n){var i,r,o;return i=G(t,n),(r=H(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(on(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!H(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)},ln.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?sn(e,i,t+"Ref"):new Error(`${rn(e)}#${t} Ref not specified`)},ln.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},ln.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},ln.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var pn={__depends__:[Zt,{__depends__:[Jt],bpmnImporter:["type",ln]}]};function cn(e,t){var n,i,r,o;return t=!!t,_(e)||(e=[e]),T(e,(function(e){var a=e;e.waypoints&&!t&&(a=cn(e.waypoints,!0));var s=a.x,l=a.y,p=a.height||0,c=a.width||0;(s<n||void 0===n)&&(n=s),(l<i||void 0===i)&&(i=l),(s+c>r||void 0===r)&&(r=s+c),(l+p>o||void 0===o)&&(o=l+p)})),{x:n,y:i,height:o-i,width:r-n}}function un(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function mn(e){return!(!e||!e.isFrame)}function fn(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}fn.prototype.next=function(){return this._prefix+ ++this._counter};var hn=new fn("ov");function dn(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=hn,this._overlayDefaults=F({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),xt(o=jt('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function yn(e,t,n){xt(e,{left:t+"px",top:n+"px"})}function gn(e,t){e.style.display=!1===t?"none":""}function vn(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}dn.$inject=["config.overlays","eventBus","canvas","elementRegistry"],dn.prototype.get=function(e){if(C(e)&&(e={id:e}),C(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?P(t.overlays,N({type:e.type})):t.overlays.slice():[]}return e.type?P(this._overlays,N({type:e.type})):e.id?this._overlays[e.id]:null},dn.prototype.add=function(e,t,n){if(A(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=F({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},dn.prototype.remove=function(e){var t=this.get(e)||[];_(t)||(t=[t]);var n=this;T(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Ft(e.html),Ft(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)}}))},dn.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},dn.prototype.show=function(){gn(this._overlayRoot)},dn.prototype.hide=function(){gn(this._overlayRoot,!1)},dn.prototype.clear=function(){this._overlays={},this._overlayContainers=[],St(this._overlayRoot)},dn.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=cn(t);i=o.x,r=o.y}yn(n,i,r),Et(e.html,"data-container-id",t.id)},dn.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?cn(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?cn(o).height:o.height,s=-1*i.bottom+n);yn(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},dn.prototype._createOverlayContainer=function(e){var t=jt('<div class="djs-overlays" />');xt(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},dn.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";vn(this._overlayRoot,n)},dn.prototype._getOverlayContainer=function(e,t){var n=M(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},dn.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)),C(o)&&(o=jt(o)),n=this._getOverlayContainer(r),xt(t=jt('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(o),e.type&&_t(t).add("djs-overlay-"+e.type),gn(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())},dn.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&&(w(r)&&r>t.scale||w(o)&&o<t.scale))&&(s=!1),gn(a,s),this._updateOverlayScale(e,t)},dn.prototype._updateOverlayScale=function(e,t){var n,i,r,o=e.scale,a=e.htmlContainer,s="";!0!==o&&(!1===o?(n=1,i=1):(n=o.min,i=o.max),w(n)&&t.scale<n&&(r=(1/t.scale||1)*n),w(i)&&t.scale>i&&(r=(1/t.scale||1)*i)),w(r)&&(s="scale("+r+","+r+")"),vn(a,s)},dn.prototype._updateOverlaysVisibilty=function(e){var t=this;T(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},dn.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;T(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){Ft(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&&(T(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&&_t(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)};var bn={__init__:["overlays"],overlays:["type",dn]};function xn(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(un(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)}))}xn.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var En={__init__:["changeSupport"],changeSupport:["type",xn]};function wn(e){this._eventBus=e}function _n(e){return function(t,n,i,r,o){(k(t)||S(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function An(e,t){t.invoke(wn,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)}))}wn.$inject=["eventBus"],wn.prototype.on=function(e,t,n,i,r,o){if((k(t)||S(t))&&(o=r,r=i,i=n,n=t,t=null),k(n)&&(o=r,r=i,i=n,n=1e3),A(r)&&(o=r,r=!1),!k(i))throw new Error("handlerFn must be a function");_(e)||(e=[e]);var a=this._eventBus;T(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)}))},wn.prototype.canExecute=_n("canExecute"),wn.prototype.preExecute=_n("preExecute"),wn.prototype.preExecuted=_n("preExecuted"),wn.prototype.execute=_n("execute"),wn.prototype.executed=_n("executed"),wn.prototype.postExecute=_n("postExecute"),wn.prototype.postExecuted=_n("postExecuted"),wn.prototype.revert=_n("revert"),wn.prototype.reverted=_n("reverted"),e(An,wn),An.$inject=["canvas","injector"];var Sn={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",An]},kn={"&":"&","<":"<",">":">",'"':""","'":"'"};var Cn="_plane";function Rn(e){var t=e.id;return h(e,"bpmn:SubProcess")?function(e){return e+Cn}(t):t}function Mn(e,t,n){var i=it('<ul class="bjs-breadcrumbs"></ul>'),r=n.getContainer(),a=$e(r);r.appendChild(i);var s=[];function l(e){e&&(s=function(e){for(var t=y(e),n=[],i=t;i;i=i.$parent)(h(i,"bpmn:SubProcess")||h(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=s.flatMap((function(e){var i=n.findRoot(Rn(e))||n.findRoot(e.id);if(!i&&h(e,"bpmn:Process")){var r=t.find((function(t){var n=y(t);return n&&n.get("processRef")===e}));i=r&&n.findRoot(r.id)}if(!i)return[];var o,a=(o=""+(o=e.name||e.id))&&o.replace(/[&<>"']/g,(function(e){return kn[e]})),s=it('<li><span class="bjs-crumb"><a title="'+a+'">'+a+"</a></span></li>");return s.addEventListener("click",(function(){n.setRootElement(i)})),s}));i.innerHTML="";var o=r.length>1;a.toggle("bjs-breadcrumbs-shown",o),r.forEach((function(e){i.appendChild(e)}))}e.on("element.changed",(function(e){var t=y(e.element);o(s,(function(e){return e===t}))&&l()})),e.on("root.set",(function(e){l(e.element)}))}function Pn(e,t){var n=null,i=new Tn;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,h(r,"bpmn:SubProcess")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,l=(o.y-a.y)*o.scale;0===s&&0===l||t.scroll({dx:s,dy:l}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function Tn(){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)}}Mn.$inject=["eventBus","elementRegistry","canvas"],Pn.$inject=["eventBus","canvas"];var Dn=180,On=160;function Nn(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 Bn(e){return h(e,"bpmndi:BPMNDiagram")?e:Bn(e.$parent)}Nn.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)}))}},Nn.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;h(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!h(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(d(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},Nn.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=Qt(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),function(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}(t)}(e),i=n.x-Dn,r=n.y-On;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)}))},Nn.prototype._moveToDiPlane=function(e,t){var n=Bn(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},Nn.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},Nn.$inject=["eventBus","moddle"];var In=250;function Ln(e,t,n,i,r){wn.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",In,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",In,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],In,(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"],In,(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)}))}))}e(Ln,wn),Ln.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Ln.prototype._canDrillDown=function(e){var t=this._canvas;return h(e,"bpmn:SubProcess")&&t.findRoot(Rn(e))},Ln.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=y(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;$e(i.html).toggle("bjs-drilldown-empty",!r)}},Ln.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,i=y(e);n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=it('<button type="button" class="bjs-drilldown"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg></button>'),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(Rn(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},Ln.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},Ln.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var jn={__depends__:[bn,En,Sn],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",Mn],drilldownCentering:["type",Pn],drilldownOverlayBehavior:["type",Ln],subprocessCompatibility:["type",Nn]};function Fn(e){return e.originalEvent||e.srcEvent}function Vn(e,t){return(Fn(e)||e).button===t}function zn(e){return Vn(e,0)}function Wn(e){return!0}function $n(e){return zn(e)||function(e){return Vn(e,1)}(e)}function Gn(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){var n=l[e]||zn;return!n(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"},l={"element.contextmenu":Wn,"element.mousedown":$n,"element.mouseup":$n,"element.click":$n,"element.dblclick":$n};var p="svg, .djs-element";function c(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(l[n]=i),a.$delegate=Nt.bind(e,p,t,a)}function u(e,t,n){var i=a(n);i&&Nt.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,T(s,(function(e,n){u(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,T(s,(function(e,n){c(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 m=d("djs-hit djs-hit-stroke"),f=d("djs-hit djs-hit-click-stroke"),h={all:d("djs-hit djs-hit-all"),"click-stroke":f,stroke:m,"no-move":d("djs-hit djs-hit-no-move")};function d(e,t){return t=F({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function y(e,t){var n=h[t];if(!n)throw new Error("invalid hit type <"+t+">");return X(e,n),e}function g(e,t){U(e,t)}this.removeHits=function(e){var t;T((t=".djs-hit",(e||document).querySelectorAll(t)),he)},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=we(t);return y(n,"stroke"),g(e,n),n},this.createBoxHit=function(e,t,n){n=F({x:0,y:0},n);var i=ie("rect");return y(i,t),X(i,n),g(e,i),i},this.updateDefaultHit=function(e,t){var n,i=(n=".djs-hit",(t||document).querySelector(n));if(i)return e.waypoints?_e(i,e.waypoints):X(i,{width:e.width,height:e.height}),i},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=c,this.unregisterEvent=u}Gn.$inject=["eventBus","elementRegistry","styles"];var Hn={__init__:["interactionEvents"],interactionEvents:["type",Gn]};function Un(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)}))}Un.$inject=["eventBus","canvas"],Un.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})}},Un.prototype.get=function(){return this._selectedElements},Un.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},Un.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();_(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?T(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 Kn="hover",qn="selected";function Yn(e,t){function n(t,n){e.addMarker(t,n)}function i(t,n){e.removeMarker(t,n)}this._canvas=e,t.on("element.hover",(function(e){n(e.element,Kn)})),t.on("element.out",(function(e){i(e.element,Kn)})),t.on("selection.changed",(function(e){var t=e.oldSelection,r=e.newSelection;T(t,(function(e){-1===r.indexOf(e)&&i(e,qn)})),T(r,(function(e){-1===t.indexOf(e)&&n(e,qn)}))}))}function Xn(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;_(o)?t.select(o):t.select(r.filter(Zn))}})),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);M(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(zn(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=function(e){var t=Fn(e)||e;return zn(e)&&t.shiftKey}(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function Zn(e){return!e.hidden}Yn.$inject=["canvas","eventBus"],Xn.$inject=["eventBus","selection","canvas","elementRegistry"];var Jn={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Hn],selection:["type",Un],selectionVisuals:["type",Yn],selectionBehavior:["type",Xn]};const Qn=/^class[ {]/;function ei(e){return Array.isArray(e)}function ti(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ni(...e){1===e.length&&ei(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const ii=/constructor\s*[^(]*\(\s*([^)]*)\)/m,ri=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,oi=/\/\*([^*]*)\*\//m;function ai(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return Qn.test(e.toString())}(e)?ii:ri);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(oi);return(t&&t[1]||e).trim()}))||[]}function si(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw s(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){if(!r[e]&&e.includes(".")){const t=e.split(".");let n=l(t.shift());for(;t.length;)n=n[t.shift()];return n}if(ti(o,e))return o[e];if(ti(r,e)){if(-1!==i.indexOf(e))throw i.push(e),s("Cannot resolve circular dependency!");return i.push(e),o[e]=r[e][0](r[e][1]),i.pop(),o[e]}return n.get(e,t)}function p(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!ei(e))throw s(`Cannot invoke "${e}". Expected a function!`);e=ni(e.slice())}return{fn:e,dependencies:(e.$inject||ai(e)).map((e=>ti(t,e)?t[e]:l(e)))}}function c(e){const{fn:t,dependencies:n}=p(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:i,dependencies:r}=p(e,n);return i.apply(t,r)}function m(e){return ni((t=>e.get(t)))}function f(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],a=[],s=[];let l,p,c,u;for(let e in r)l=r[e],-1!==t.indexOf(e)&&("private"===l[2]?(p=o.indexOf(l[3]),-1===p?(c=l[3].createChild([],t),u=m(c),o.push(l[3]),a.push(c),s.push(u),n[e]=[u,e,"private",c]):n[e]=[s[p],e,"private",a[p]]):n[e]=[l[2],l[1]],i[e]=!0),"factory"!==l[2]&&"type"!==l[2]||!l[1].$scope||t.forEach((t=>{-1!==l[1].$scope.indexOf(t)&&(n[e]=[l[2],l[1]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new si(e,a)}const h={factory:u,type:c,value:function(e){return e}};function d(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function y(e){const t=e.__exports__;if(t){const n=e.__modules__,i=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=f((n||[]).concat(i)),a=ni((function(e){return o.get(e)}));t.forEach((function(e){r[e]=[a,e,"private",o]}));const s=(e.__init__||[]).slice();return s.unshift((function(){o.init()})),d(e=Object.assign({},e,{__init__:s}),o)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(r[t]=n);const i=n[0],o=n[1];r[t]=[h[i],li(i,o),i]})),d(e,a)}function g(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(g,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=u,this.instantiate=c,this.createChild=f,this.init=function(e){const t=e.reduce(g,[]).map(y);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function li(e,t){return"value"!==e&&ei(t)&&(t=ni(t.slice())),t}function pi(e,t){f.call(this,e,1),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}e(pi,f),pi.prototype.canRender=function(){return!0},pi.prototype.drawShape=function(e,t,n){var i=ie("rect");return X(i,{x:0,y:0,width:t.width||0,height:t.height||0}),mn(t)?X(i,F({},this.FRAME_STYLE,n||{})):X(i,F({},this.SHAPE_STYLE,n||{})),U(e,i),i},pi.prototype.drawConnection=function(e,t,n){var i=we(t.waypoints,F({},this.CONNECTION_STYLE,n||{}));return U(e,i),i},pi.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return ge([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},pi.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return ge(r)},pi.$inject=["eventBus","styles"];var ci={__init__:["defaultRenderer"],defaultRenderer:["type",pi],styles:["type",function(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){return F(this.style(t,n),{class:e})},this.style=function(t,n){_(t)||n||(n=t,t=[]);var i=D(t,(function(t,n){return F(t,e[n]||{})}),{});return n?F(i,n):i},this.computeStyle=function(e,n,i){return _(n)||(i=n,n=[]),t.style(n||[],F({},i,e||{}))}}]};function ui(e,t){return Math.round(e*t)/t}function mi(e){return S(e)?e+"px":e}function fi(e,t,n){const i=ie("g");J(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const hi={shape:["x","y","width","height"],connection:["waypoints"]};function di(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}function yi(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}di.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],di.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=F({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),xt(n,{position:"relative",overflow:"hidden",width:mi(e.width),height:mi(e.height)}),t.appendChild(n),n}(e),i=this._svg=ie("svg");X(i,{width:"100%",height:"100%"}),Et(i,"tabindex",0),e.autoFocus&&t.on("element.hover",(()=>{this.restoreFocus()})),t.on("element.mousedown",500,(e=>{this.focus()})),i.addEventListener("focusin",(()=>{this._setFocused(!0)})),i.addEventListener("focusout",(()=>{this._setFocused(!1)})),U(n,i);const r=this._viewport=fi(i,"viewport");e.deferUpdate&&(this._viewboxChanged=function(e,t){let n,i,r,o;function a(n){let a=Date.now(),p=n?0:o+t-a;if(p>0)return s(p);e.apply(r,i),l()}function s(e){n=setTimeout(a,e)}function l(){n&&clearTimeout(n),n=o=i=r=void 0}function p(...e){o=Date.now(),i=e,r=this,n||s(t)}return p.flush=function(){n&&a(!0),l()},p.cancel=l,p}(j(this._viewboxChanged,this),300)),t.on("diagram.init",(()=>{t.fire("canvas.init",{svg:i,viewport:r})})),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],(()=>{delete this._cachedViewbox})),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},di.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport},di.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},di.prototype._clear=function(){this._elementRegistry.getAll().forEach((e=>{const t=un(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},di.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},di.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()},di.prototype.isFocused=function(){return this._focused},di.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},di.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");let n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),void 0!==t&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},di.prototype._getChildIndex=function(e){return D(this._layers,(function(t,n){return n.visible&&e>=n.index&&t++,t}),0)},di.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:fi(this._viewport,"layer-"+e,n),index:t,visible:!0}},di.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=this._viewport,i=t.group,r=t.index;if(t.visible)return i;const o=this._getChildIndex(r);return n.insertBefore(i,n.childNodes[o]||null),t.visible=!0,i},di.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=t.group;return t.visible?(he(n),t.visible=!1,n):n},di.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],he(t.group))},di.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},di.prototype.findRoot=function(e){if("string"==typeof e&&(e=this._elementRegistry.get(e)),!e)return;const t=this._findPlaneForRoot(function(e){for(;e.parent;)e=e.parent;return e}(e))||{};return t.rootElement},di.prototype.getRootElements=function(){return this._planes.map((function(e){return e.rootElement}))},di.prototype._findPlaneForRoot=function(e){return M(this._planes,(function(t){return t.rootElement===e}))},di.prototype.getContainer=function(){return this._container},di.prototype._updateMarker=function(e,t,n){let i;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(T([i.gfx,i.secondaryGfx],(function(i){i&&(n?(e.markers.add(t),J(i).add(t)):(e.markers.delete(t),J(i).remove(t)))})),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},di.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},di.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},di.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),!!e.markers&&e.markers.has(t)},di.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},di.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},di.prototype.addRootElement=function(e){const t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});const n=e.layer="root-"+t;this._ensureValid("root",e);const i=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(e,i),this._planes.push({rootElement:e,layer:i}),e},di.prototype.removeRootElement=function(e){"string"==typeof e&&(e=this._elementRegistry.get(e));if(this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter((function(t){return t.rootElement!==e})),this._rootElement===e&&(this._rootElement=null),e},di.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e},di.prototype._removeRoot=function(e){const t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)},di.prototype._addRoot=function(e,t){const n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:e}),n.add(e,t),i.fire("root.added",{element:e,gfx:t})},di.prototype._setRoot=function(e,t){const n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),this.hideLayer(n.layer)),e&&(t||(t=this._findPlaneForRoot(e).layer),this._elementRegistry.updateGraphics(e,this._svg,!0),this.showLayer(e.layer)),this._rootElement=e,this._eventBus.fire("root.set",{element:e})},di.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element <"+t.id+"> already exists");const n=hi[e],i=O(n,(function(e){return void 0!==t[e]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},di.prototype._setParent=function(e,t,n){!function(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)}}(t.children,e,n),e.parent=t},di.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);const a=o.create(e,t,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},di.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},di.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},di.prototype._removeElement=function(e,t){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),function(e,t){if(!e||!t)return-1;var n=e.indexOf(t);-1!==n&&e.splice(n,1)}(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},di.prototype.removeShape=function(e){return this._removeElement(e,"shape")},di.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},di.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},di.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},di.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},di.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let i,r,o,a,s,l,p;return e?(this._changeViewbox((function(){s=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);ye(t,i)})),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},a=ye(t),r=a?a.matrix:function(e,t,n,i,r,o){var a=oe().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return ae(a,e);case 6:return ae(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),s=ui(r.a,1e3),l=ui(-r.e||0,1e3),p=ui(-r.f||0,1e3),e=this._cachedViewbox={x:l?l/s:0,y:p?p/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},di.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox((function(){e=F({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),yi(t,n)})),{x:n.e,y:n.f}},di.prototype.scrollToElement=function(e,t){let n=100;"string"==typeof e&&(e=this._elementRegistry.get(e));const i=this.findRoot(e);if(i!==this.getRootElement()&&this.setRootElement(i),i===e)return;t||(t={}),"number"==typeof t&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const r=cn(e),o=Qt(r),a=this.viewbox(),s=this.zoom();let l,p;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;const c=Qt(a);if(r.width<a.width&&r.height<a.height){const e=Math.max(0,o.right-c.right),t=Math.min(0,o.left-c.left),n=Math.max(0,o.bottom-c.bottom),i=Math.min(0,o.top-c.top);l=e||t,p=n||i}else l=r.x-a.x,p=r.y-a.y;this.scroll({dx:-l*s,dy:-p*s})},di.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);let n,i;return this._changeViewbox((function(){"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),ui(i.a,1e3)},di.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,i=t.inner;let r,o;return i.x>=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(e?i.width/2-n.width/r/2:0),y:i.y+(e?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},di.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,l,p,c;l=i.getCTM();const u=l.a;return t?(a=F(o,t),s=a.matrixTransform(l.inverse()),p=r.translate(s.x,s.y).scale(1/u*e).translate(-s.x,-s.y),c=l.multiply(p)):c=r.scale(e),yi(this._viewport,c),c},di.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},di.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;if(e.waypoints){n=this.getGraphics(e).getBBox()}else n=e;return{x:n.x*t.scale-t.x*t.scale,y:n.y*t.scale-t.y*t.scale,width:n.width*t.scale,height:n.height*t.scale}},di.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var gi="data-element-id";function vi(e){this._elements={},this._eventBus=e}function bi(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 xi(e,t){if(!(this instanceof xi))return new xi(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}vi.$inject=["eventBus"],vi.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),X(t,gi,i),n&&X(n,gi,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},vi.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(X(i.gfx,gi,""),i.secondaryGfx&&X(i.secondaryGfx,gi,""),delete t[n])},vi.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},vi.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&X(t,gi,i),t},vi.prototype.get=function(e){var t;t="string"==typeof e?e:e&&X(e,gi);var n=this._elements[t];return n&&n.element},vi.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},vi.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},vi.prototype.getAll=function(){return this.filter((function(e){return e}))},vi.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},vi.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},vi.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")},xi.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?bi(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)},xi.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||bi(this,t,e),n},xi.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},xi.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},xi.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Ei=new xi({name:"children",enumerable:!0,collection:!0},{name:"parent"}),wi=new xi({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),_i=new xi({name:"attachers",collection:!0},{name:"host"}),Ai=new xi({name:"outgoing",collection:!0},{name:"source"}),Si=new xi({name:"incoming",collection:!0},{name:"target"});function ki(){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)}}),Ei.bind(this,"parent"),wi.bind(this,"labels"),Ai.bind(this,"outgoing"),Si.bind(this,"incoming")}function Ci(){ki.call(this),Ei.bind(this,"children"),_i.bind(this,"host"),_i.bind(this,"attachers")}function Ri(){ki.call(this),Ei.bind(this,"children")}function Mi(){Ci.call(this),wi.bind(this,"labelTarget")}function Pi(){ki.call(this),Ai.bind(this,"source"),Si.bind(this,"target")}e(Ci,ki),e(Ri,Ci),e(Mi,Ci),e(Pi,ki);var Ti={connection:Pi,shape:Ci,label:Mi,root:Ri};function Di(){this._uid=12}Di.prototype.createRoot=function(e){return this.create("root",e)},Di.prototype.createLabel=function(e){return this.create("label",e)},Di.prototype.createShape=function(e){return this.create("shape",e)},Di.prototype.createConnection=function(e){return this.create("connection",e)},Di.prototype.create=function(e,t){return(t=F({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Ti[e];if(!n)throw new Error("unknown type: <"+e+">");return F(new n,t)}(e,t)};var Oi="__fn",Ni=Array.prototype.slice;function Bi(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Ii(){}function Li(e,t){this._eventBus=e,this._elementRegistry=t}function ji(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}Bi.prototype.on=function(e,t,n,i){if(e=_(e)?e:[e],k(t)&&(i=n,n=t,t=1e3),!S(t))throw new Error("priority must be a number");var r=n;i&&((r=j(n,i))[Oi]=n[Oi]||n);var o=this;e.forEach((function(e){o._addListener(e,{priority:t,callback:r,next:null})}))},Bi.prototype.once=function(e,t,n,i){var r=this;if(k(t)&&(i=n,n=t,t=1e3),!S(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var t=n.apply(i,arguments);return r.off(e,o),t}o[Oi]=n,this.on(e,t,o)},Bi.prototype.off=function(e,t){e=_(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},Bi.prototype.createEvent=function(e){var t=new Ii;return t.init(e),t},Bi.prototype.fire=function(e,t){var n,i,r,o;if(o=Ni.call(arguments),"object"==typeof e&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof Ii?t:this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==a&&(n.type=a)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},Bi.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},Bi.prototype._destroy=function(){this._listeners={}},Bi.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},Bi.prototype._invokeListener=function(e,t,n){var i;if(n.callback.__isTomb)return i;try{i=function(e,t){return e.apply(null,t)}(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener",e),e}return i},Bi.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},Bi.prototype._getListeners=function(e){return this._listeners[e]},Bi.prototype._setListeners=function(e,t){this._listeners[e]=t},Bi.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r[Oi]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},Ii.prototype.stopPropagation=function(){this.cancelBubble=!0},Ii.prototype.preventDefault=function(){this.defaultPrevented=!0},Ii.prototype.init=function(e){F(this,e||{})},Li.$inject=["eventBus","elementRegistry"],Li.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(J(t=ie("g")).add("djs-children"),U(n.parentNode,t))):t=n,t},Li.prototype._clear=function(e){var t=function(e){return e.childNodes[0]}(e);return St(t),t},Li.prototype._createContainer=function(e,t,n,i){var r=ie("g");J(r).add("djs-group"),void 0!==n?ji(r,t,t.childNodes[n]):U(t,r);var o=ie("g");J(o).add("djs-element"),J(o).add("djs-"+e),i&&J(o).add("djs-frame"),U(r,o);var a=ie("g");return J(a).add("djs-visual"),U(o,a),o},Li.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,mn(t))},Li.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=D(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),T(t,(function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e);T(t.slice().reverse(),(function(e){ji(i.getGraphics(e).parentNode,r)}))}}))},Li.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},Li.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Li.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},Li.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Li.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),at(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?X(n,"display","none"):X(n,"display","block")}},Li.prototype.remove=function(e){he(this._elementRegistry.getGraphics(e).parentNode)};var Fi={__depends__:[ci],__init__:["canvas"],canvas:["type",di],elementRegistry:["type",vi],elementFactory:["type",Di],eventBus:["type",Bi],graphicsFactory:["type",Li]};function Vi(e){return function(e){var t=new si(e);return t.init(),t}([{config:["value",e=e||{}]},Fi].concat(e.modules||[]))}function zi(e,t){this._injector=t||Vi(e),this.get("eventBus").fire("diagram.init")}zi.prototype.get=function(e,t){return this._injector.get(e,t)},zi.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},zi.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},zi.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};const Wi=Object.prototype.toString;function $i(e,...t){return Object.assign(e,...t)}const Gi=Object.prototype.toString,Hi=Object.prototype.hasOwnProperty;function Ui(e){return void 0===e}function Ki(e){return null==e}function qi(e){return"[object String]"===Gi.call(e)}function Yi(e,t){return!Ki(e)&&Hi.call(e,t)}function Xi(e,t){let n,i;if(Ui(e))return;const r=(o=e,"[object Array]"===Gi.call(o)?Ji:Zi);var o;for(let o in e)if(Yi(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function Zi(e){return e}function Ji(e){return Number(e)}function Qi(e,t){return e.bind(t)}function er(e,...t){return Object.assign(e,...t)}function tr(){}function nr(e,t){this.model=e,this.properties=t}tr.prototype.get=function(e){return this.$model.properties.get(this,e)},tr.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},nr.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(tr.prototype);Xi(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}),Xi(e,Qi((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 ir={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},rr={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 or(e,t){var n=rr[e];return n?n(t):t}function ar(e){return!!ir[e]}function sr(e){return!!rr[e]}function lr(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 <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function pr(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function cr(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,Xi(e,Qi(this.registerPackage,this))}function ur(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function mr(e){this.model=e}function fr(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function hr(e){return e.replace(/^:/,"")}function dr(e,t={}){this.properties=new mr(this),this.factory=new nr(this,this.properties),this.registry=new cr(e,this.properties),this.typeCache={},this.config=t}pr.prototype.build=function(){return function(e,t){let n={},i=Object(e);return Xi(t,(function(t){t in i&&(n[t]=e[t])})),n}(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},pr.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)},pr.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},pr.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=lr(r[0],i),a=lr(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},pr.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},pr.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},pr.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},pr.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},pr.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},pr.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")},pr.prototype.hasProperty=function(e){return this.propertiesByName[e]},pr.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(Xi(e.properties,Qi((function(n){n=er({},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)},cr.prototype.getPackage=function(e){return this.packageMap[e]},cr.prototype.getPackages=function(){return this.packages},cr.prototype.registerPackage=function(e){e=er({},e);var t=this.packageMap;ur(t,e,"prefix"),ur(t,e,"uri"),Xi(e.types,Qi((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},cr.prototype.registerType=function(e,t){var n=lr((e=er({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:er(e.meta||{})})).name,t.prefix),i=n.name,r={};Xi(e.properties,Qi((function(e){var t=lr(e.name,n.prefix),i=t.name;ar(e.type)||(e.type=lr(e.type,t.prefix).name),er(e,{ns:t,name:i}),r[i]=e}),this)),er(e,{ns:n,name:i,propertiesByName:r}),Xi(e.extends,Qi((function(e){var t=lr(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},cr.prototype.mapTypes=function(e,t,n){var i=ar(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=lr(n,ar(n)?"":e.prefix);r.mapTypes(o,t,i)}function a(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");Xi(i.superClass,n?a:function(e){return o(e,!1)}),t(i,!n),Xi(i.traits,a)},cr.prototype.getEffectiveDescriptor=function(e){var t=lr(e),n=new pr(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},cr.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},mr.prototype.set=function(e,t,n){if(!qi(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[hr(t)]:i?r in e?e[r]=n:fr(e,i,n):e.$attrs[hr(t)]=n},mr.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[hr(t)];var i=n.name;return!e[i]&&n.isMany&&fr(e,n,[]),e[i]},mr.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=er({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},mr.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},mr.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},mr.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;"undefined"!=typeof console&&console.warn(n)}return null},dr.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},dr.prototype.getType=function(e){var t=this.typeCache,n=qi(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},dr.prototype.createAny=function(e,t,n){var i=lr(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;Xi(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];void 0!==o&&Ki(a)&&(a=i[e]=isNaN(+o)?{}:[]),Ui(o)?Ui(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}),Xi(n,(function(e,t){var n;n=e,"[object Object]"===Gi.call(n)&&void 0!==e.value?r[e.name]=e.value:r[t]=e})),r},dr.prototype.getPackage=function(e){return this.registry.getPackage(e)},dr.prototype.getPackages=function(){return this.registry.getPackages()},dr.prototype.getElementDescriptor=function(e){return e.$descriptor},dr.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},dr.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},dr.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};const yr=Object.prototype.toString,gr=Object.prototype.hasOwnProperty;function vr(e){return"[object Array]"===yr.call(e)}function br(e){return"[object String]"===yr.call(e)}function xr(e,t){return!(null==e)&&gr.call(e,t)}function Er(e,t){const n=Ar(t);let i;return _r(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function wr(e,t){const n=Ar(t);let i=[];return _r(e,(function(e,t){n(e,t)&&i.push(e)})),i}function _r(e,t){let n,i;if(void 0===e)return;const r=vr(e)?kr:Sr;for(let o in e)if(xr(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function Ar(e){return function(e){const t=yr.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}(e)?e:t=>t===e}function Sr(e){return e}function kr(e){return Number(e)}function Cr(e,...t){return Object.assign(e,...t)}var Rr=String.fromCharCode,Mr=Object.prototype.hasOwnProperty,Pr=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,Tr={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function Dr(e,t,n,i){return i?Mr.call(Tr,i)?Tr[i]:"&"+i+";":Rr(t||parseInt(n,16))}function Or(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(Pr,Dr):e}Object.keys(Tr).forEach((function(e){Tr[e.toUpperCase()]=Tr[e]}));var Nr="non-whitespace outside of root node";function Br(e){return new Error(e)}function Ir(e){return"missing namespace for prefix <"+e+">"}function Lr(e){return{get:e,enumerable:!0}}function jr(e){var t,n={};for(t in e)n[t]=e[t];return n}function Fr(e){return e+"$uri"}function Vr(){return{line:0,column:0}}function zr(e){throw e}function Wr(e){if(!this)return new Wr(e);var t,n,i,r,o,a,s,l,p,c=e&&e.proxy,u=zr,m=Vr,f=!1,h=!1,d=null,y=!1;function g(e){e instanceof Error||(e=Br(e)),d=e,u(e,m)}function v(e){o&&(e instanceof Error||(e=Br(e)),o(e,m))}this.on=function(e,p){if("function"!=typeof p)throw Br("required args <name, cb>");switch(e){case"openTag":n=p;break;case"text":t=p;break;case"closeTag":i=p;break;case"error":u=p;break;case"warn":o=p;break;case"cdata":r=p;break;case"attention":l=p;break;case"question":s=p;break;case"comment":a=p;break;default:throw Br("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw Br("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return h=!0,p=n,this},this.parse=function(e){if("string"!=typeof e)throw Br("required args <xml=string>");return d=null,function(e){var o,u,d,b,x,E,w,_,A,S,k,C=h?[]:null,R=h?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[Fr(n)]=t;return i}(p):null,M=[],P=0,T=!1,D=!1,O=0,N=0,B="",I=0;function L(){if(null!==k)return k;var e,t,n,i,r,o,a,s,l,c,u,m=h&&R.xmlns,d=h&&f?[]:null,y=I,g=B,b=g.length,x={},E={};e:for(;y<b;y++)if(l=!1,!(32===(c=g.charCodeAt(y))||c<14&&c>8)){for((c<65||c>122||c>90&&c<97)&&95!==c&&58!==c&&(v("illegal first char attribute name"),l=!0),u=y+1;u<b;u++)if(!((c=g.charCodeAt(u))>96&&c<123||c>64&&c<91||c>47&&c<59||46===c||45===c||95===c)){if(32===c||c<14&&c>8){v("missing attribute value"),y=u;continue e}if(61===c)break;v("illegal attribute name char"),l=!0}if("xmlns:xmlns"===(s=g.substring(y,u))&&(v("illegal declaration of xmlns"),l=!0),34===(c=g.charCodeAt(u+1)))-1===(u=g.indexOf('"',y=u+2))&&-1!==(u=g.indexOf("'",y))&&(v("attribute value quote missmatch"),l=!0);else if(39===c)-1===(u=g.indexOf("'",y=u+2))&&-1!==(u=g.indexOf('"',y))&&(v("attribute value quote missmatch"),l=!0);else for(v("missing attribute value quotes"),l=!0,u+=1;u<b&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++);for(-1===u&&(v("missing closing quotes"),u=b,l=!0),l||(o=g.substring(y,u)),y=u;u+1<b&&!(32===(c=g.charCodeAt(u+1))||c<14&&c>8);u++)y===u&&(v("illegal character after attribute end"),l=!0);if(y=u+1,!l)if(s in E)v("attribute <"+s+"> already defined");else if(E[s]=!0,h)if(f){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=Or(o),t=Fr(r),!(a=p[e])){if("xmlns"===r||t in R&&R[t]!==e)do{a="ns"+P++}while(void 0!==R[a]);else a=r;p[e]=a}R[r]!==a&&(i||(R=jr(R),i=!0),R[r]=a,"xmlns"===r&&(R[Fr(a)]=e,m=a),R[t]=e),x[s]=o;continue}d.push(s,o)}else-1!==(c=s.indexOf(":"))?(n=R[s.substring(0,c)])?x[s=m===n?s.substr(c+1):n+s.substr(c)]=o:v(Ir(s.substring(0,c))):x[s]=o;else x[s]=o}if(f)for(y=0,b=d.length;y<b;y++){if(s=d[y++],o=d[y],-1!==(c=s.indexOf(":"))){if(!(n=R[s.substring(0,c)])){v(Ir(s.substring(0,c)));continue}s=m===n?s.substr(c+1):n+s.substr(c)}x[s]=o}return k=x}function j(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=N;O>=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>O);)r+=1,a=s;return-1==O?(o=s,n=e.substring(N)):0===N?n=e.substring(N,O):(o=O-a,n=-1==N?e.substring(O):e.substring(O,N+1)),{data:n,line:r,column:o}}m=j,c&&(S=Object.create({},{name:Lr((function(){return _})),originalName:Lr((function(){return A})),attrs:Lr(L),ns:Lr((function(){return R}))}));for(;-1!==N;){if(-1===(O=60===e.charCodeAt(N)?N:e.indexOf("<",N)))return M.length?g("unexpected end of file"):0===N?g("missing start tag"):void(N<e.length&&e.substring(N).trim()&&v(Nr));if(N!==O)if(M.length){if(t&&(t(e.substring(N,O),Or,m),y))return}else if(e.substring(N,O).trim()&&(v(Nr),y))return;if(33===(x=e.charCodeAt(O+1))){if(91===(b=e.charCodeAt(O+2))&&"CDATA["===e.substr(O+3,6)){if(-1===(N=e.indexOf("]]>",O)))return g("unclosed cdata");if(r&&(r(e.substring(O+9,N),m),y))return;N+=3;continue}if(45===b&&45===e.charCodeAt(O+3)){if(-1===(N=e.indexOf("--\x3e",O)))return g("unclosed comment");if(a&&(a(e.substring(O+4,N),Or,m),y))return;N+=3;continue}}if(63!==x){for(u=O+1;;u++){if(E=e.charCodeAt(u),isNaN(E))return N=-1,g("unclosed tag");if(34===E)u=-1!==(b=e.indexOf('"',u+1))?b:u;else if(39===E)u=-1!==(b=e.indexOf("'",u+1))?b:u;else if(62===E){N=u;break}}if(33!==x){if(k={},47===x){if(T=!1,D=!0,!M.length)return g("missing open tag");if(u=_=M.pop(),b=O+2+u.length,e.substring(O+2,b)!==u)return g("closing tag mismatch");for(;b<N;b++)if(!(32===(x=e.charCodeAt(b))||x>8&&x<14))return g("close tag")}else{if(47===e.charCodeAt(N-1)?(u=_=e.substring(O+1,N-1),T=!0,D=!0):(u=_=e.substring(O+1,N),T=!0,D=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return g("illegal first char nodeName");for(b=1,d=u.length;b<d;b++)if(!((x=u.charCodeAt(b))>96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46==x)){if(32===x||x<14&&x>8){_=u.substring(0,b),k=null;break}return g("invalid nodeName")}D||M.push(_)}if(h){if(o=R,T&&(D||C.push(o),null===k&&(f=-1!==u.indexOf("xmlns",b))&&(I=b,B=u,L(),f=!1)),A=_,-1!==(x=_.indexOf(":"))){if(!(w=R[_.substring(0,x)]))return g("missing namespace on <"+A+">");_=_.substr(x+1)}else w=R.xmlns;w&&(_=w+":"+_)}if(T&&(I=b,B=u,n&&(c?n(S,Or,D,m):n(_,L,Or,D,m),y)))return;if(D){if(i&&(i(c?S:_,Or,T,m),y))return;h&&(R=T?o:C.pop())}N+=1}else{if(l&&(l(e.substring(O,N+1),Or,m),y))return;N+=1}}else{if(-1===(N=e.indexOf("?>",O)))return g("unclosed question");if(s&&(s(e.substring(O,N+2),m),y))return;N+=2}}}(e),m=Vr,y=!1,d},this.stop=function(){y=!0}}function $r(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Gr={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Hr="property";function Ur(e){return e.xml&&e.xml.serialize}function Kr(e,t){return $r(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function qr(e){return new Error(e)}function Yr(e){return e.$descriptor}function Xr(e){Cr(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw qr("expected element");var t,n=this.elementsById,i=Yr(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 qr("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Zr(){}function Jr(){}function Qr(){}function eo(e,t){this.property=e,this.context=t}function to(e,t){this.element=t,this.propertyDesc=e}function no(){}function io(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function ro(e,t,n){io.call(this,e,t,n)}function oo(e,t,n){this.model=e,this.context=n}function ao(e){e instanceof dr&&(e={model:e}),Cr(this,{lax:!1},e)}Zr.prototype.handleEnd=function(){},Zr.prototype.handleText=function(){},Zr.prototype.handleNode=function(){},Jr.prototype=Object.create(Zr.prototype),Jr.prototype.handleNode=function(){return this},Qr.prototype=Object.create(Zr.prototype),Qr.prototype.handleText=function(e){this.body=(this.body||"")+e},eo.prototype=Object.create(Qr.prototype),eo.prototype.handleNode=function(e){if(this.element)throw qr("expected no sub nodes");return this.element=this.createReference(e),this},eo.prototype.handleEnd=function(){this.element.id=this.body},eo.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},to.prototype=Object.create(Qr.prototype),to.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=or(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},no.prototype=Object.create(Qr.prototype),no.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},io.prototype=Object.create(no.prototype),io.prototype.addReference=function(e){this.context.addReference(e)},io.prototype.handleText=function(e){if(!Yr(this.element).bodyProperty)throw qr("unexpected body text <"+e+">");Qr.prototype.handleText.call(this,e)},io.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Yr(t).bodyProperty;n&&void 0!==e&&(e=or(n.type,e),t.set(n.name,e))},io.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Yr(i),o=this.context,a=new i({}),s=this.model;return _r(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?_r(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=or(i.type,e):"xmlns"===n?n=":"+n:(t=lr(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},io.prototype.getPropertyForNode=function(e){var t=lr(e.name),n=this.type,i=this.model,r=Yr(n),o=t.name,a=r.propertiesByName[o];if(a&&!a.isAttr){const t=function(e){const t=Ur(e);return t!==Hr&&(t||null)}(a);if(t){const n=e.attributes[t];if(n){const t=function(e,t,n){const i=lr(e,t.xmlns),r=lr(`${t[i.prefix]||i.prefix}:${i.localName}`);return function(e,t){var n=e.name,i=e.localName,r=t&&t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(r,n.getPackage(r.prefix))}(n,e.ns,i);return Cr({},a,{effectiveType:Yr(i.getType(t)).name})}}return a}var s=i.getPackage(t.prefix);if(s){const e=Kr(t,s),n=i.getType(e);if(a=Er(r.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return Cr({},a,{effectiveType:Yr(n).name})}else if(a=Er(r.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return a;throw qr("unrecognized element <"+t.name+">")},io.prototype.toString=function(){return"ElementDescriptor["+Yr(this.type).name+"]"},io.prototype.valueHandler=function(e,t){return new to(e,t)},io.prototype.referenceHandler=function(e){return new eo(e,this.context)},io.prototype.handler=function(e){return"Element"===e?new oo(this.model,e,this.context):new io(this.model,e,this.context)},io.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,sr(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?(Cr(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},ro.prototype=Object.create(io.prototype),ro.prototype.createElement=function(e){var t=e.name,n=lr(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&Kr(n,o)||t;if(!r.hasType(a))throw qr("unexpected element <"+e.originalName+">");return io.prototype.createElement.call(this,e)},oo.prototype=Object.create(no.prototype),oo.prototype.createElement=function(e){var t=e.name,n=lr(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},oo.prototype.handleChild=function(e){var t=new oo(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},oo.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},ao.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof io?(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 Xr(Cr({},t,{rootHandler:i})),s=new Wr({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function p(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 l="unparsable content "+(s?s+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return a.addWarning({message:l,error:e}),!0;throw qr(l)}function c(e,t){return p(e,t,!0)}i.context=a,l.push(i);var u=/^<\?xml /i,m=/ encoding="([^"]+)"/i,f=/^utf-8$/i;function h(e,t){try{l.peek().handleText(e)}catch(e){c(e,t)}}var d=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),Object.entries(Gr).reduce((function(e,[t,n]){return e[n]=t,e}),r.config&&r.config.nsMap||{}));return s.ns(d).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=l.peek();try{l.push(n.handleNode(e))}catch(e){p(e,t,o)&&l.push(new Jr)}}({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=m.exec(e),n=t&&t[1];n&&!f.test(n)&&a.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){l.pop().handleEnd()})).on("cdata",h).on("text",(function(e,t,n){!function(e,t){e.trim()&&h(e,t)}(t(e),n)})).on("error",p).on("warn",c),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=Yr(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 l=r.get(s.name),p=l.indexOf(t);-1===p&&(p=l.length),o?l[p]=o:l.splice(p,1)}else r.set(s.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=qr("failed to parse document as <"+i.type.$descriptor.name+">"));var l=a.warnings,p=a.references,c=a.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:c,references:p,warnings:l})}))},ao.prototype.handler=function(e){return new ro(this.model,e)};var so=/<|>|'|"|&|\n\r|\n/g,lo=/<|>|&/g;function po(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}function co(e,t){return $r(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function uo(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function mo(e){return br(e)?e:(e.prefix?e.prefix+":":"")+e.localName}po.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},po.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},po.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},po.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},po.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},po.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},po.prototype.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},po.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},po.prototype.getUsed=function(e){return[].concat(this.wellknown,this.custom).filter((e=>{var t=this.getNSKey(e);return this.used[t]}))};var fo={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},ho={"<":"lt",">":"gt","&":"amp"};function yo(e,t,n){return(e=br(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function go(e){this.tagName=e}function vo(){}function bo(e){this.tagName=e}function xo(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function Eo(e,t,n){xo.call(this,e,t),this.serialization=n}function wo(){this.value="",this.write=function(e){this.value+=e}}function _o(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 Ao(e){return e=Cr({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new wo,r=new _o(i,e.format);e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n');var o=new xo,a=t.$model;if(o.getNamespaces().mapDefaultPrefixes(function(e){const t=e.config&&e.config.nsMap||{},n={};for(const e in Gr)n[e]=Gr[e];for(const e in t){n[t[e]]=e}for(const t of e.getPackages())n[t.prefix]=t.uri;return n}(a)),o.build(t).serializeTo(r),!n)return i.value}}}function So(e,t){dr.call(this,e,t)}go.prototype.build=function(e){return this.element=e,this},go.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},vo.prototype.serializeValue=vo.prototype.serializeTo=function(e){e.append(this.escape?yo(this.value,lo,ho):this.value)},vo.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(lo)&&(this.escape=!0),this},uo(bo,vo),bo.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},xo.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGenericNsAttributes(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(n=function(e){return wr(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!xr(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(wr(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return wr(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},xo.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?Cr({localName:t.ns.localName},e):Cr({localName:co(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},xo.prototype.nsPropertyTagName=function(e){return function(e,t){return Cr({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},xo.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},xo.prototype.nsAttributeName=function(e){var t;if(t=br(e)?lr(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}:Cr({localName:t.localName},n)},xo.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter((([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n))).map((([e,t])=>({name:e,value:t})))},xo.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push((new vo).build({type:"String"},t));var n=e.$children;n&&_r(n,(e=>{this.body.push(new xo(this).build(e))}))},xo.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=lr(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)}},xo.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return _r(n,(function(n,r){var o=t.parseNsAttribute(e,r,n);o&&i.push(o)})),i},xo.prototype.parseGenericAttributes=function(e,t){var n=this;_r(t,(function(t){try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){"undefined"!=typeof console&&console.warn(`missing namespace information for <${t.name}=${t.value}> on`,e,n)}}))},xo.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;_r(e,(function(e){var r=i.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new vo).build(e,r[0]));else if(sr(e.type))_r(r,(function(i){n.push(new bo(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(o)_r(r,(function(i){n.push(new go(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var a=Ur(e);_r(r,(function(i){var r;r=a?a===Hr?new xo(t,e):new Eo(t,e,a):new xo(t),n.push(r.build(i))}))}}))},xo.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new po(t):n=t),n},xo.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},xo.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.getNamespaces(t),a=e.prefix,s=e.uri;if(!a&&!s)return{localName:e.localName};if(r=o.defaultUriByPrefix(a),!(s=s||r||o.uriByPrefix(a)))throw new Error("no namespace uri given for prefix <"+a+">");if((e=o.byUri(s))||a||(e=this.logNamespace({uri:s},r===s,!0)),!e){for(n=a,i=1;o.uriByPrefix(n);)n=a+"_"+i++;e=this.logNamespace({prefix:n,uri:s},r===s)}return a&&o.mapPrefix(a,s),e},xo.prototype.parseAttributes=function(e){var t=this,n=this.element;_r(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];_r(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},xo.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),mo(e)},xo.prototype.addAttribute=function(e,t){var n=this.attrs;br(t)&&(t=yo(t,so,fo));var i=function(e,t){const n=Ar(t);let i=vr(e)?-1:void 0;return _r(e,(function(e,t){if(n(e,t))return i=t,!1})),i}(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)},xo.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)),_r(t,(function(t){e.append(" ").append(mo(t.name)).append('="').append(t.value).append('"')}))},xo.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==vo;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),_r(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},uo(Eo,xo),Eo.prototype.parseNsAttributes=function(e){var t=xo.prototype.parseNsAttributes.call(this,e).filter((e=>e.name!==this.serialization)),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(this.serialization),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},Eo.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},So.prototype=Object.create(dr.prototype),So.prototype.fromXML=function(e,t,n){var i;i=t,"[object String]"!==Wi.call(i)&&(n=t,t="bpmn:Definitions");var r=new ao($i({model:this,lax:!0},n)),o=r.handler(t);return r.fromXML(e,o)},So.prototype.toXML=function(e,t){var n=new Ao(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};const ko={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",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 Co(e,t){return new So($i({},ko,e),t)}var Ro="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 Mo(e,t){return e.$instanceOf(t)}function Po(e){var t={},n=[],i={};function s(e,t){return function(n){e(n,t)}}function p(e){t[e.id]=e}function c(t,n){try{var r=i[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${rn(t)}`);return e.element(t,i[t.id],n)}(t,n);return p(t),r}catch(e){u(e.message,{element:t,error:e}),console.error(`failed to import ${rn(t)}`,e)}}function u(t,n){e.error(t,n)}var m=this.registerDi=function(e){var t,n=e.bpmnElement;n?i[n.id]?u(`multiple DI elements defined for ${rn(n)}`,{element:n}):(i[n.id]=e,r(t=n,"di")||Object.defineProperty(t,"di",{enumerable:!1,get:function(){throw new Error(Ro)}})):u(`no bpmnElement referenced in ${rn(e)}`,{element:e})};function f(e){var t;t=e.plane,m(t),a(t.planeElement,h)}function h(e){m(e)}this.handleDefinitions=function(r,p){var c=r.diagrams;if(p&&-1===c.indexOf(p))throw new Error("diagram not part of <bpmn:Definitions />");if(!p&&c&&c.length&&(p=c[0]),!p)throw new Error("no diagram to display");i={},f(p);var h=p.plane;if(!h)throw new Error(`no plane for ${rn(p)}`);var v=h.bpmnElement;if(!v){if(v=function(e){return o(e.rootElements,(function(e){return Mo(e,"bpmn:Process")||Mo(e,"bpmn:Collaboration")}))}(r),!v)throw new Error("no process or collaboration to display");u(`correcting missing bpmnElement on ${rn(h)} to ${rn(v)}`),h.bpmnElement=v,m(h)}var b,x,E=function(t,n){return e.root(t,i[t.id],n)}(v,h);if(Mo(v,"bpmn:Process")||Mo(v,"bpmn:SubProcess"))y(v,E);else{if(!Mo(v,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${rn(h)}: ${rn(v)}`);x=E,a((b=v).participants,s(P,x)),n.push((function(){!function(e,t){a(e,s(g,t))}(b.messageFlows,x)})),w(b.artifacts,x),function(e,n){var i=function(e,t){const n=l(t);let i=[];return a(e,(function(e,t){n(e,t)&&i.push(e)})),i}(e,(function(e){return!t[e.id]&&Mo(e,"bpmn:Process")&&e.laneSets}));i.forEach(s(y,n))}(r.rootElements,E)}d(n)};var d=this.handleDeferred=function(){for(;n.length;)n.shift()()};function y(e,t){M(e,t),_(e.ioSpecification,t),w(e.artifacts,t),p(e)}function g(e,t){c(e,t)}function v(e,t){c(e,t)}function b(e,t){c(e,t)}function x(e,t){c(e,t)}function E(e,t){c(e,t)}function w(e,t){a(e,(function(e){Mo(e,"bpmn:Association")?n.push((function(){E(e,t)})):E(e,t)}))}function _(e,t){e&&(a(e.dataInputs,s(b,t)),a(e.dataOutputs,s(x,t)))}var A=this.handleSubProcess=function(e,t){M(e,t),w(e.artifacts,t)};function S(e,t){var i=c(e,t);Mo(e,"bpmn:SubProcess")&&A(e,i||t),Mo(e,"bpmn:Activity")&&_(e.ioSpecification,t),n.push((function(){a(e.dataInputAssociations,s(v,t)),a(e.dataOutputAssociations,s(v,t))}))}function k(e,t){c(e,t)}function C(e,t){n.push((function(){var n=c(e,t);e.childLaneSet&&R(e.childLaneSet,n||t),function(e){a(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function R(e,t){a(e.lanes,s(C,t))}function M(e,t){!function(e,t){a(e,(function(e){Mo(e,"bpmn:SequenceFlow")?n.push((function(){!function(e,t){c(e,t)}(e,t)})):Mo(e,"bpmn:BoundaryEvent")?n.unshift((function(){S(e,t)})):Mo(e,"bpmn:FlowNode")?S(e,t):Mo(e,"bpmn:DataObject")||(Mo(e,"bpmn:DataStoreReference")||Mo(e,"bpmn:DataObjectReference")?k(e,t):u(`unrecognized flowElement ${rn(e)} in context ${rn(t&&t.businessObject)}`,{element:e,context:t}))}))}(e.flowElements,t),e.laneSets&&function(e,t){a(e,s(R,t))}(e.laneSets,t)}function P(e,t){var n=c(e,t),i=e.processRef;i&&y(i,n||t)}}function To(e,t,n){var i,r,s,l=[];function p(e,t){var n=new Po({root:function(e,t){return i.add(e,t)},element:function(e,t,n){return i.add(e,t,n)},error:function(e,t){l.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;h(i,"bpmn:Process")||h(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(h(t,"bpmn:Process"))return t;t=t.$parent}}(i));n=h(r,"bpmn:Collaboration")?r:o(e.rootElements,(function(e){if(h(e,"bpmn:Collaboration"))return o(e.participants,(function(e){return e.processRef===r}))}));var s=[r];n&&(s=function(e,t){let n=[];return a(e,(function(e,i){n.push(t(e,i))})),n}(n.participants,(function(e){return e.processRef}))).push(n);var l=Do(s),p=[t],c=[i];return a(e.diagrams,(function(e){if(e.plane){var t=e.plane.bpmnElement;-1!==l.indexOf(t)&&-1===c.indexOf(t)&&(p.push(e),c.push(t))}})),p}(e,t);if(!r)throw new Error("no diagram to display");a(r,(function(t){n.handleDefinitions(e,t)}));var p=t.plane.bpmnElement.id;s.setRootElement(s.findRoot(p+"_plane")||s.findRoot(p))}return new Promise((function(o,a){try{return i=e.get("bpmnImporter"),r=e.get("eventBus"),s=e.get("canvas"),r.fire("import.render.start",{definitions:t}),p(t,n),r.fire("import.render.complete",{error:undefined,warnings:l}),o({warnings:l})}catch(e){return e.warnings=l,a(e)}}))}function Do(e){var t=[];return a(e,(function(e){e&&(t.push(e),t=t.concat(Do(e.flowElements)))})),t}var Oo,No='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',Bo={verticalAlign:"middle"},Io={color:"#404040"},Lo={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},jo={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},Fo={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"},Vo='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+No+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>';function zo(){Oo||(ze(Oo=it(Vo),Lo),ze(rt("svg",Oo),Bo),ze(rt(".backdrop",Oo),jo),ze(rt(".notice",Oo),Fo),ze(rt(".link",Oo),Io,{margin:"15px 20px 15px 10px",alignSelf:"center"}),Qe.bind(Oo,".backdrop","click",(function(e){document.body.removeChild(Oo)}))),document.body.appendChild(Oo)}function Wo(e){e=u({},Go,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),function(e){const t=it('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+No+"</a>");ze(rt("svg",t),Bo),ze(t,Io,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(t),Xe.bind(t,"click",(function(e){zo(),e.preventDefault()}))}(this._container)}function $o(e,t){return e.warnings=t,e}e(Wo,zi),Wo.prototype.importXML=async function(e,t){const n=this;let i=[];try{let o;e=this._emit("import.parse.start",{xml:e})||e;try{o=await this._moddle.fromXML(e,"bpmn:Definitions")}catch(e){throw this._emit("import.parse.complete",{error:e}),e}let a=o.rootElement;const s=o.references,l=o.warnings,p=o.elementsById;i=i.concat(l),a=this._emit("import.parse.complete",(r={error:null,definitions:a,elementsById:p,references:s,warnings:i},n.get("eventBus").createEvent(r)))||a;const c=await this.importDefinitions(a,t);return i=i.concat(c.warnings),this._emit("import.done",{error:null,warnings:i}),{warnings:i}}catch(e){let t=e;throw i=i.concat(t.warnings||[]),$o(t,i),t=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}(t),this._emit("import.done",{error:t,warnings:t.warnings}),t}var r},Wo.prototype.importDefinitions=async function(e,t){this._setDefinitions(e);return{warnings:(await this.open(t)).warnings}},Wo.prototype.open=async function(e){const t=this._definitions;let n=e;if(!t){const e=new Error("no XML imported");throw $o(e,[]),e}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return o(e.diagrams,(function(e){return e.id===t}))||null}(t,e),!n)){const t=new Error("BPMNDiagram <"+e+"> not found");throw $o(t,[]),t}try{this.clear()}catch(e){throw $o(e,[]),e}const{warnings:i}=await To(this,t,n);return{warnings:i}},Wo.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(e){t=e}const r=t?{error:t}:{xml:n};if(this._emit("saveXML.done",r),t)throw t;return r},Wo.prototype.saveSVG=async function(){let e,t;this._emit("saveSVG.start");try{const t=this.get("canvas"),n=t.getActiveLayer(),i=rt(":scope > defs",t._svg),r=fe(n),o=i?"<defs>"+fe(i)+"</defs>":"",a=n.getBBox();e='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a.width+'" height="'+a.height+'" viewBox="'+a.x+" "+a.y+" "+a.width+" "+a.height+'" version="1.1">'+o+r+"</svg>"}catch(e){t=e}if(this._emit("saveSVG.done",{error:t,svg:e}),t)throw t;return{svg:e}},Wo.prototype._setDefinitions=function(e){this._definitions=e},Wo.prototype.getModules=function(){return this._modules},Wo.prototype.clear=function(){this.getDefinitions()&&zi.prototype.clear.call(this)},Wo.prototype.destroy=function(){var e;zi.prototype.destroy.call(this),(e=this._container).parentNode&&e.parentNode.removeChild(e)},Wo.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},Wo.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Wo.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=rt(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Wo.prototype.getDefinitions=function(){return this._definitions},Wo.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Wo.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),s=u(function(e,t){let n={};return a(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}(n,["additionalModules"]),{canvas:u({},n.canvas,{container:e}),modules:o});zi.call(this,s),n&&n.container&&this.attachTo(n.container)},Wo.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Wo.prototype._createContainer=function(e){const t=it('<div class="bjs-container"></div>');return ze(t,{width:Ho(e.width),height:Ho(e.height),position:e.position}),t},Wo.prototype._createModdle=function(e){return new Co(u({},this._moddleExtensions,e.moddleExtensions))},Wo.prototype._modules=[];const Go={width:"100%",height:"100%",position:"relative"};function Ho(e){return e+(n=e,"[object Number]"===t.call(n)?"px":"");var n}function Uo(e){Wo.call(this,e)}e(Uo,Wo),Uo.prototype._modules=[pn,jn,bn,Jn,Jt],Uo.prototype._moddleExtensions={};function Ko(e,t,n){this._bpmnRenderer=t,this._iconProperty=e&&e.iconProperty,f.call(this,n,1250)}e(Ko,f),Ko.prototype.canRender=function(e){return!V(e)&&!(!d(e,["bpmn:Activity","bpmn:Event"])||!this._getIcon(e))},Ko.prototype._getIcon=function(e){return function(e,t){return t=t||"zeebe:modelerTemplateIcon",y(e).get(t)}(e,this._iconProperty)},Ko.prototype.drawShape=function(e,t,n={}){var i=(0,this._bpmnRenderer.handlers[["bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:EndEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:StartEvent","bpmn:Task","bpmn:AdHocSubProcess","bpmn:Transaction","bpmn:SubProcess"].find((e=>h(t,e)))])(e,t,{...n,renderIcon:!1}),r=this._getIcon(t),o=h(t,"bpmn:Activity")?{x:5,y:5}:{x:(t.width-18)/2,y:(t.height-18)/2},a=ie("image");return X(a,{href:r,width:18,height:18,...o}),U(e,a),i},Ko.$inject=["config.elementTemplateIconRenderer","bpmnRenderer","eventBus"];const qo=[{__init__:["elementTemplateIconRenderer"],elementTemplateIconRenderer:["type",Ko]}],Yo={zeebe:{name:"zeebe",prefix:"zeebe",uri:"http://camunda.org/schema/zeebe/1.0",xml:{tagAlias:"lowerCase"},associations:[],types:[{name:"ZeebeServiceTask",extends:["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:SendTask","bpmn:EndEvent","bpmn:IntermediateThrowEvent","bpmn:AdHocSubProcess"],properties:[{name:"retryCounter",type:"String",isAttr:!0}]},{name:"IoMapping",superClass:["Element"],properties:[{name:"ioMapping",type:"IoMapping"},{name:"inputParameters",isMany:!0,type:"Input"},{name:"outputParameters",isMany:!0,type:"Output"}],meta:{allowedIn:["bpmn:CallActivity","bpmn:Event","bpmn:ReceiveTask","zeebe:ZeebeServiceTask","bpmn:SubProcess","bpmn:UserTask"]}},{name:"InputOutputParameter",properties:[{name:"source",isAttr:!0,type:"String"},{name:"target",isAttr:!0,type:"String"}]},{name:"Subscription",superClass:["Element"],properties:[{name:"correlationKey",isAttr:!0,type:"String"}]},{name:"Input",superClass:["InputOutputParameter"],meta:{allowedIn:["bpmn:CallActivity","zeebe:ZeebeServiceTask","bpmn:SubProcess","bpmn:UserTask"]}},{name:"Output",superClass:["InputOutputParameter"],meta:{allowedIn:["bpmn:CallActivity","bpmn:Event","bpmn:ReceiveTask","zeebe:ZeebeServiceTask","bpmn:SubProcess","bpmn:UserTask"]}},{name:"TaskHeaders",superClass:["Element"],meta:{allowedIn:["zeebe:ZeebeServiceTask","bpmn:UserTask"]},properties:[{name:"values",type:"Header",isMany:!0}]},{name:"Header",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"key",type:"String",isAttr:!0},{name:"value",type:"String",isAttr:!0}]},{name:"TaskDefinition",superClass:["Element"],meta:{allowedIn:["zeebe:ZeebeServiceTask"]},properties:[{name:"type",type:"String",isAttr:!0},{name:"retries",type:"String",isAttr:!0}]},{name:"LoopCharacteristics",superClass:["Element"],meta:{allowedIn:["bpmn:MultiInstanceLoopCharacteristics"]},properties:[{name:"inputCollection",type:"String",isAttr:!0},{name:"inputElement",type:"String",isAttr:!0},{name:"outputCollection",type:"String",isAttr:!0},{name:"outputElement",type:"String",isAttr:!0}]},{name:"CalledElement",superClass:["Element"],meta:{allowedIn:["bpmn:CallActivity"]},properties:[{name:"processId",type:"String",isAttr:!0},{name:"processIdExpression",type:"String",isAttr:!0},{name:"propagateAllChildVariables",isAttr:!0,type:"Boolean"},{name:"propagateAllParentVariables",isAttr:!0,type:"Boolean",default:!0}]},{name:"UserTaskForm",superClass:["Element"],meta:{allowedIn:["bpmn:Process"]},properties:[{name:"id",type:"String",isAttr:!0},{name:"body",type:"String",isBody:!0}]},{name:"FormDefinition",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"formKey",type:"String",isAttr:!0},{name:"formId",type:"String",isAttr:!0},{name:"externalReference",type:"String",isAttr:!0}]},{name:"LinkedResource",superClass:["Element"],meta:{allowedIn:["bpmn:ServiceTask"]},properties:[{name:"resourceId",type:"String",isAttr:!0},{name:"resourceType",type:"String",isAttr:!0},{name:"linkName",type:"String",isAttr:!0}]},{name:"LinkedResources",superClass:["Element"],meta:{allowedIn:["bpmn:ServiceTask"]},properties:[{name:"values",type:"LinkedResource",isMany:!0}]},{name:"UserTask",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[]},{name:"CalledDecision",superClass:["Element"],meta:{allowedIn:["bpmn:BusinessRuleTask"]},properties:[{name:"decisionId",type:"String",isAttr:!0},{name:"resultVariable",type:"String",isAttr:!0}]},{name:"AssignmentDefinition",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"assignee",type:"String",isAttr:!0},{name:"candidateGroups",type:"String",isAttr:!0},{name:"candidateUsers",type:"String",isAttr:!0}]},{name:"PriorityDefinition",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"priority",type:"String",isAttr:!0}]},{name:"TaskSchedule",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"dueDate",type:"String",isAttr:!0},{name:"followUpDate",type:"String",isAttr:!0}]},{name:"Properties",superClass:["Element"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"Property",properties:[{name:"name",type:"String",isAttr:!0},{name:"value",type:"String",isAttr:!0}]},{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:"modelerTemplateIcon",isAttr:!0,type:"String"}]},{name:"TemplatedRootElement",isAbstract:!0,extends:["bpmn:Error","bpmn:Escalation","bpmn:Message","bpmn:Signal"],properties:[{name:"modelerTemplate",isAttr:!0,type:"String"}]},{name:"Script",superClass:["Element"],meta:{allowedIn:["bpmn:ScriptTask"]},properties:[{name:"expression",type:"String",isAttr:!0},{name:"resultVariable",type:"String",isAttr:!0}]},{name:"ExecutionListeners",superClass:["Element"],meta:{allowedIn:["bpmn:Event","bpmn:Activity","bpmn:Process","bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:ParallelGateway","bpmn:EventBasedGateway"]},properties:[{name:"listeners",type:"ExecutionListener",isMany:!0}]},{name:"ExecutionListener",superClass:["Element"],meta:{allowedIn:["zeebe:ExecutionListeners"]},properties:[{name:"eventType",type:"String",isAttr:!0},{name:"retries",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0}]},{name:"TaskListeners",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"listeners",type:"TaskListener",isMany:!0}]},{name:"TaskListener",superClass:["Element"],meta:{allowedIn:["zeebe:TaskListeners"]},properties:[{name:"eventType",type:"String",isAttr:!0},{name:"retries",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0}]},{name:"VersionTag",superClass:["Element"],meta:{allowedIn:["bpmn:Process"]},properties:[{name:"value",type:"String",isAttr:!0}]},{name:"BindingTypeSupported",isAbstract:!0,extends:["zeebe:CalledDecision","zeebe:CalledElement","zeebe:FormDefinition","zeebe:LinkedResource"],properties:[{name:"bindingType",isAttr:!0,type:"String",default:"latest"},{name:"versionTag",isAttr:!0,type:"String"}]},{name:"AdHoc",superClass:["Element"],meta:{allowedIn:["bpmn:AdHocSubProcess"]},properties:[{name:"activeElementsCollection",isAttr:!0,type:"String"},{name:"outputCollection",isAttr:!0,type:"String"},{name:"outputElement",isAttr:!0,type:"String"}]},{name:"ConditionalFilter",superClass:["Element"],meta:{allowedIn:["bpmn:ConditionalEventDefinition"]},properties:[{name:"variableNames",isAttr:!0,type:"String"},{name:"variableEvents",isAttr:!0,type:"String"}]}]}};function Xo(e={}){e={...e,moddleExtensions:{...Yo,...e.moddleExtensions}},Uo.call(this,e)}return e(Xo,Uo),Xo.prototype._camundaCloudModules=[...qo],Xo.prototype._modules=[].concat(Uo.prototype._modules,Xo.prototype._camundaCloudModules),Xo}));
|