@jylups/flowable-bpmn-js 0.0.0 → 0.1.0-next.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/README.md +6 -2
- package/dist/flowable-bpmn-modeler.development.js +1 -1
- package/dist/flowable-bpmn-modeler.development.js.map +1 -1
- package/dist/flowable-bpmn-modeler.production.min.js +1 -1
- package/dist/flowable-bpmn-navigated-viewer.development.js +1 -1
- package/dist/flowable-bpmn-navigated-viewer.development.js.map +1 -1
- package/dist/flowable-bpmn-navigated-viewer.production.min.js +1 -1
- package/dist/flowable-bpmn-viewer.development.js +1 -1
- package/dist/flowable-bpmn-viewer.development.js.map +1 -1
- package/dist/flowable-bpmn-viewer.production.min.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @jylups/flowable-bpmn-js 0.0.0 | MIT | bpmn-js (c) Camunda Services GmbH, bpmn.io license; keep the bpmn.io watermark visible */
|
|
1
|
+
/*! @jylups/flowable-bpmn-js 0.1.0-next.0 | MIT | bpmn-js (c) Camunda Services GmbH, bpmn.io license; keep the bpmn.io watermark visible */
|
|
2
2
|
var FlowableBpmnJS=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}}))}function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,i={exports:{}};var r=function(){if(n)return i.exports;n=1;var e=i.exports=function(t,n){if(n||(n=16),void 0===t&&(t=128),t<=0)return"0";for(var i=Math.log(Math.pow(2,t))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,t/r))/Math.log(n)*r;var o=i-Math.floor(i),s="";for(r=0;r<Math.floor(i);r++){s=Math.floor(Math.random()*n).toString(n)+s}if(o){var a=Math.pow(n,o);s=Math.floor(Math.random()*a).toString(n)+s}var l=parseInt(s,n);return l!==1/0&&l>=Math.pow(2,t)?e(t,n):s};return e.rack=function(t,n,i){var r=function(r){var s=0;do{if(s++>10){if(!i)throw new Error("too many ID collisions, use more bits");t+=i}var a=e(t,n)}while(Object.hasOwnProperty.call(o,a));return o[a]=r,a},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=t||128,r.base=n||16,r},i.exports}(),o=t(r);function s(e){if(!(this instanceof s))return new s(e);e=e||[128,36,1],this._seed=e.length?o.rack(e[0],e[1],e[2]):e}function a(e){return Array.prototype.concat.apply([],e)}s.prototype.next=function(e){return this._seed(e||!0)},s.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},s.prototype.claim=function(e,t){this._seed.set(e,t||!0)},s.prototype.assigned=function(e){return this._seed.get(e)||!1},s.prototype.unclaim=function(e){delete this._seed.hats[e]},s.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};const l=Object.prototype.toString,c=Object.prototype.hasOwnProperty;function u(e){return void 0===e}function p(e){return void 0!==e}function h(e){return null==e}function d(e){return"[object Array]"===l.call(e)}function f(e){return"[object Object]"===l.call(e)}function m(e){return"[object Number]"===l.call(e)}function g(e){const t=l.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function v(e){return"[object String]"===l.call(e)}function y(e){if(!d(e))throw new Error("must supply array")}function b(e,t){return!h(e)&&c.call(e,t)}function w(e,t){const n=N(t);let i;return E(e,function(e,t){if(n(e,t))return i=e,!1}),i}function x(e,t){const n=N(t);let i=d(e)?-1:void 0;return E(e,function(e,t){if(n(e,t))return i=t,!1}),i}function _(e,t){const n=N(t);let i=[];return E(e,function(e,t){n(e,t)&&i.push(e)}),i}function E(e,t){let n,i;if(u(e))return;const r=d(e)?j:z;for(let o in e)if(b(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function S(e,t){if(u(e))return[];y(e);const n=N(t);return e.filter(function(e,t){return!n(e,t)})}function k(e,t,n){return E(e,function(e,i){n=t(n,e,i)}),n}function O(e,t){return!!k(e,function(e,n,i){return e&&t(n,i)},!0)}function C(e,t){return!!w(e,t)}function P(e,t){let n=[];return E(e,function(e,i){n.push(t(e,i))}),n}function A(e){return e&&Object.keys(e)||[]}function T(e){return A(e).length}function R(e){return P(e,e=>e)}function M(e,t,n={}){return t=I(t),E(e,function(e){let i=t(e)||"_",r=n[i];r||(r=n[i]=[]),r.push(e)}),n}function $(e,...t){e=I(e);let n={};return E(t,t=>M(t,e,n)),P(n,function(e,t){return e[0]})}const D=$;function B(e,t){t=I(t);let n=[];return E(e,function(e,i){let r=t(e,i),o={d:r,v:e};for(var s=0;s<n.length;s++){let{d:e}=n[s];if(r<e)return void n.splice(s,0,o)}n.push(o)}),P(n,e=>e.v)}function L(e){return function(t){return O(e,function(e,n){return t[n]===e})}}function I(e){return g(e)?e:t=>t[e]}function N(e){return g(e)?e:t=>t===e}function z(e){return e}function j(e){return Number(e)}function V(e,t){let n,i,r,o;function s(n){let s=Date.now(),c=n?0:o+t-s;if(c>0)return a(c);e.apply(r,i),l()}function a(e){n=setTimeout(s,e)}function l(){n&&clearTimeout(n),n=o=i=r=void 0}function c(...e){o=Date.now(),i=e,r=this,n||a(t)}return c.flush=function(){n&&s(!0),l()},c.cancel=l,c}function F(e,t){return e.bind(t)}function q(e,...t){return Object.assign(e,...t)}function H(e,t,n){let i=e;return E(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],s=i[e];p(o)&&h(s)&&(s=i[e]=isNaN(+o)?{}:[]),u(o)?u(n)?delete i[e]:i[e]=n:i=s}),e}function W(e,t,n){let i=e;return E(t,function(e){if(h(i))return i=void 0,!1;i=i[e]}),u(i)?n:i}function Q(e,t){let n={},i=Object(e);return E(t,function(t){t in i&&(n[t]=e[t])}),n}function X(e,t){let n={};return E(Object(e),function(e,i){-1===t.indexOf(i)&&(n[i]=e)}),n}var G=Object.freeze({__proto__:null,assign:q,bind:F,debounce:V,ensureArray:y,every:O,filter:_,find:w,findIndex:x,flatten:a,forEach:E,get:W,groupBy:M,has:b,isArray:d,isDefined:p,isFunction:g,isNil:h,isNumber:m,isObject:f,isString:v,isUndefined:u,keys:A,map:P,matchPattern:L,merge:function e(t,...n){return n.length?(E(n,function(n){n&&f(n)&&E(n,function(n,i){if("__proto__"===i)return;let r=t[i];f(n)?(f(r)||(r={}),t[i]=e(r,n)):t[i]=n})}),t):t},omit:X,pick:Q,reduce:k,set:H,size:T,some:C,sortBy:B,throttle:function(e,t){let n=!1;return function(...i){n||(e(...i),n=!0,setTimeout(()=>{n=!1},t))}},unionBy:D,uniqueBy:$,values:R,without:S});const U={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};function Y(e,t=globalThis.document){if("string"!=typeof e)throw new TypeError("String expected");const n=/^<!--(.*?)-->$/s.exec(e);if(n)return t.createComment(n[1]);const i=/<([\w:]+)/.exec(e)?.[1];if(!i)return t.createTextNode(e);if(e=e.trim(),"body"===i){const n=t.createElement("html");n.innerHTML=e;const{lastChild:i}=n;return i.remove(),i}let[r,o,s]=Object.hasOwn(U,i)?U[i]:U._default,a=t.createElement("div");for(a.innerHTML=o+e+s;r--;)a=a.lastChild;if(a.firstChild===a.lastChild){const{firstChild:e}=a;return e.remove(),e}const l=t.createDocumentFragment();return l.append(...a.childNodes),l}function K(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)}function Z(e,...t){const n=e.style;return E(t,function(e){e&&E(e,function(e,t){n[t]=e})}),e}function J(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}U.td=U.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],U.option=U.optgroup=[1,'<select multiple="multiple">',"</select>"],U.thead=U.tbody=U.colgroup=U.caption=U.tfoot=[1,"<table>","</table>"],U.polyline=U.ellipse=U.polygon=U.circle=U.text=U.line=U.path=U.rect=U.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];const ee=Object.prototype.toString;function te(e){return new ne(e)}function ne(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function ie(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function re(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}function oe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}ne.prototype.add=function(e){return this.list.add(e),this},ne.prototype.remove=function(e){return"[object RegExp]"==ee.call(e)?this.removeMatching(e):(this.list.remove(e),this)},ne.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},ne.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},ne.prototype.array=function(){return Array.from(this.list)},ne.prototype.has=ne.prototype.contains=function(e){return this.list.contains(e)};var se,ae={};var le=function(){if(se)return ae;var e,t,n;function i(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n="addEventListener"!==e?"on":""}return se=1,ae.bind=function(t,r,o,s){return e||i(),t[e](n+r,o,s||!1),o},ae.unbind=function(e,r,o,s){return t||i(),e[t](n+r,o,s||!1),o},ae}(),ce=K({__proto__:null,default:oe(le)},[le]),ue=["focus","blur"];var pe={bind:function(e,t,n,i,r){return-1!==ue.indexOf(n)&&(r=!0),ce.bind(e,n,function(n){var r=n.target||n.srcElement;n.delegateTarget=re(r,t,!0),n.delegateTarget&&i.call(e,n)},r)},unbind:function(e,t,n,i){return-1!==ue.indexOf(t)&&(i=!0),ce.unbind(e,t,n,i)}};function he(e,t){return e&&"function"==typeof e.matches&&e.matches(t)||!1}function de(e,t){return(t=t||document).querySelector(e)}function fe(e,t){return(t=t||document).querySelectorAll(e)}function me(e){e.parentNode&&e.parentNode.removeChild(e)}function ge(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 ve={"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":2,"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":2,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function ye(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=ve[i];r?(2===r&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function be(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return ve[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);ye(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)ye(e,i,t[i])}(e,t);return e}const we=Object.prototype.toString;function xe(e){return new _e(e)}function _e(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Ee(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Se(e){return e.cloneNode(!0)}_e.prototype.add=function(e){return this.list.add(e),this},_e.prototype.remove=function(e){return"[object RegExp]"==we.call(e)?this.removeMatching(e):(this.list.remove(e),this)},_e.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},_e.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},_e.prototype.array=function(){return Array.from(this.list)},_e.prototype.has=_e.prototype.contains=function(e){return this.list.contains(e)};var ke="http://www.w3.org/2000/svg",Oe='<svg xmlns="'+ke+'"';function Ce(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(ke)&&(e=Oe+e.substring(4)):(e=Oe+">"+e+"</svg>",t=!0);var n=function(e){var t;return t=new DOMParser,t.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 Pe(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=Ce(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(ke,e),t&&be(n,t),n}var Ae=null;function Te(){return null===Ae&&(Ae=Pe("svg")),Ae}function Re(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function Me(e){return Te().createSVGTransform()}var $e=/([&<>]{1})/g,De=/([&<>\n\r"]{1})/g,Be={"&":"&","<":"<",">":">",'"':"'"};function Le(e,t){return e.replace(t,function(e,t){return Be[t]||t})}function Ie(e,t){var n,i,r,o,s;switch(e.nodeType){case 3:t.push(Le(e.textContent,$e));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,'="',Le(o.value,De),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(s=e.childNodes).length;n<i;++n)Ie(s.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Le(e.nodeValue,$e),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Ne(e,t){return function(e){for(var t=e.firstChild,n=[];t;)Ie(t,n),t=t.nextSibling;return n.join("")}(e)}function ze(e){var t=e.parentNode;return t&&t.removeChild(e),e}function je(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Ve(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(je(e,i))}(n,t)),n.consolidate()}const Fe=/^class[ {]/;function qe(e){return Array.isArray(e)}function He(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function We(...e){1===e.length&&qe(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const Qe=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Xe=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Ge=/\/\*([^*]*)\*\//m;function Ue(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return Fe.test(e.toString())}(e)?Qe:Xe);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(e=>{const t=e.match(Ge),[n,i]=e.replace(Ge,"").split("="),r=(t&&t[1]||n).trim();return void 0===i||r.endsWith("?")?r:r+"?"})||[]}function Ye(e,t){const n=t||{get:function(e,t){if(!1!==t)throw i.push(e),a(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),s=o.injector=this,a=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function l(e,t){const s=e.lastIndexOf("?");if(-1!==s){const t=l(e.slice(0,s),!1),n=e.slice(s+2);if(n&&null==t)return;return n?n.split(".").reduce((e,t)=>e[t],t):t}if(!r[e]&&e.includes(".")){const n=e.split(".");let i=l(n.shift(),t);for(;n.length;){const e=n.shift();i=!1===t?i?.[e]:i[e]}return i}if(He(o,e))return o[e];if(He(r,e)){if(-1!==i.indexOf(e))throw i.push(e),a("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 c(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!qe(e))throw a(`Cannot invoke "${e}". Expected a function!`);e=We(e.slice())}return{fn:e,dependencies:(e.$inject||Ue(e)).map(e=>{const n=e.replace(/\?$/,"");return He(t,n)?t[n]:l(e)})}}function u(e){const{fn:t,dependencies:n}=c(e);return new(Function.prototype.bind.call(t,null,...n))}function p(e,t,n){const{fn:i,dependencies:r}=c(e,n);return i.apply(t,r)}function h(e){return We(t=>e.get(t))}function d(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],s=[],a=[];let l,c,u,p;for(let e in r)l=r[e],-1!==t.indexOf(e)&&("private"===l[2]?(c=o.indexOf(l[3]),-1===c?(u=l[3].createChild([],t),p=h(u),o.push(l[3]),s.push(u),a.push(p),n[e]=[p,e,"private",u]):n[e]=[a[c],e,"private",s[c]]):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 Ye(e,s)}const f={factory:p,type:u,value:function(e){return e}};function m(e,t){const n=e.__init__||[];return function(){n.forEach(e=>{"string"==typeof e?t.get(e):t.invoke(e)})}}function g(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=d((n||[]).concat(i)),s=We(function(e){return o.get(e)});t.forEach(function(e){r[e]=[s,e,"private",o]});const a=(e.__init__||[]).slice();return a.unshift(function(){o.init()}),m(e=Object.assign({},e,{__init__:a}),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],Ke(i,o),i]}),m(e,s)}function v(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(v,e)).indexOf(t)?e:e.concat(t)}this.get=l,this.invoke=p,this.instantiate=u,this.createChild=d,this.init=function(e){const t=e.reduce(v,[]).map(g);let n=!1;return function(){n||(n=!0,t.forEach(e=>e()))}}(e)}function Ke(e,t){return"value"!==e&&qe(t)&&(t=We(t.slice())),t}function Ze(e,t){var n=this;t=t||1e3,e.on(["render.shape","render.connection"],t,function(e,t){var i=e.type,r=t.element,o=t.gfx,s=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,s):n.drawConnection(o,r,s)}),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 Je(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function et(e){return["L",e.x,e.y]}function tt(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function nt(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r;for(let r=1;r<n;r++){const n=e[r-1],o=e[r],s=e[r+1];if(!s||!t){i.push(et(o));continue}const a=Math.min(t,rt(o.x-n.x,o.y-n.y),rt(s.x-o.x,s.y-o.y));if(!a){i.push(et(o));continue}const l=it(o,n,a),c=it(o,n,.5*a),u=it(o,s,a),p=it(o,s,.5*a);i.push(et(l)),i.push(tt(c,p,u))}return i}function it(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/rt(i,r);return{x:e.x+i*o,y:e.y+r*o}}function rt(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function ot(e,t,n){m(t)&&(n=t,t=null),t||(t={});const i=Pe("path",t);return m(n)&&(i.dataset.cornerRadius=String(n)),st(i,e)}function st(e,t){return be(e,{d:Je(nt(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}function at(e){var t=new Set(e);return _(e,function(e){for(var n=e.parent;n;){if(t.has(n))return!1;n=n.parent}return!0})}function lt(e,t,n){n=n||0,d(e)||(e=[e]),E(e,function(e,i){var r=t(e,i,n);d(r)&&r.length&<(r,t,n+1)})}function ct(e,t,n){var i=new Set,r=new Set;return lt(e,function(e,t,n){i.add(e);var o=e.children;if(o&&!r.has(o))return r.add(o),o}),Array.from(i)}function ut(e,t){return ct(e)}function pt(e,t,n){u(t)&&(t=!0),f(t)&&(n=t,t=!0);var i=gt((n=n||{}).allShapes),r=gt(n.allConnections),o=gt(n.enclosedElements),s=gt(n.enclosedConnections),a=gt(n.topLevel,t&&M(e,function(e){return e.id}));function l(e){a[e.source.id]&&a[e.target.id]&&(a[e.id]=[e]),i[e.source.id]&&i[e.target.id]&&(s[e.id]=o[e.id]=e),r[e.id]=e}return lt(e,function(e){if(!e.waypoints)return o[e.id]=i[e.id]=e,E(e.incoming,l),E(e.outgoing,l),e.children;r[e.id]=e}),{allShapes:i,allConnections:r,topLevel:a,enclosedConnections:s,enclosedElements:o}}function ht(e,t){var n,i,r,o;return t=!!t,d(e)||(e=[e]),E(e,function(e){var s=e;e.waypoints&&!t&&(s=ht(e.waypoints,!0));var a=s.x,l=s.y,c=s.height||0,u=s.width||0;(a<n||void 0===n)&&(n=a),(l<i||void 0===i)&&(i=l),(a+u>r||void 0===r)&&(r=a+u),(l+c>o||void 0===o)&&(o=l+c)}),{x:n,y:i,height:o-i,width:r-n}}function dt(e,t){var n={};return E(e,function(e){var i=e;i.waypoints&&(i=ht(i)),!m(t.y)&&i.x>t.x&&(n[e.id]=e),!m(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(m(t.width)&&m(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y?n[e.id]=e:m(t.width)&&m(t.height)||(n[e.id]=e))}),n}function ft(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function mt(e){return!(!e||!e.isFrame)}function gt(e,t){return q({},e||{},t||{})}Ze.prototype.canRender=function(e){},Ze.prototype.drawShape=function(e,t){},Ze.prototype.drawConnection=function(e,t){},Ze.prototype.getShapePath=function(e){},Ze.prototype.getConnectionPath=function(e){};function vt(e,t){Ze.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(vt,Ze),vt.prototype.canRender=function(){return!0},vt.prototype.drawShape=function(e,t,n){var i=Pe("rect");return be(i,{x:0,y:0,width:t.width||0,height:t.height||0}),mt(t)?be(i,q({},this.FRAME_STYLE,n||{})):be(i,q({},this.SHAPE_STYLE,n||{})),ge(e,i),i},vt.prototype.drawConnection=function(e,t,n){var i=ot(t.waypoints,q({},this.CONNECTION_STYLE,n||{}));return ge(e,i),i},vt.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return Je([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},vt.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 Je(r)},vt.$inject=["eventBus","styles"];var yt={__init__:["defaultRenderer"],defaultRenderer:["type",vt],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 q(this.style(t,n),{class:e})},this.style=function(t,n){d(t)||n||(n=t,t=[]);var i=k(t,function(t,n){return q(t,e[n]||{})},{});return n?q(i,n):i},this.computeStyle=function(e,n,i){return d(n)||(i=n,n=[]),t.style(n||[],q({},i,e||{}))}}]};function bt(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function wt(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function xt(e,t){return e&&t?e.indexOf(t):-1}function _t(e,t){return e&&t?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):-1}function Et(e,t,n,i){if(void 0===i&&(i=5),!e||!t||!n)return!1;var r=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),o=_t(e,t);return Math.abs(r/o)<=i}function St(e,t){var n=Array.from(arguments).flat();const i={x:"v",y:"h"};for(const[e,t]of Object.entries(i))if(kt(e,n))return t;return!1}function kt(e,t){const n=t[0];return O(t,function(t){return Math.abs(n[e]-t[e])<=2})}function Ot(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}function Ct(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var Pt=/,?([a-z]),?/gi,At=parseFloat,Tt=Math,Rt=Tt.PI,Mt=Tt.min,$t=Tt.max,Dt=Tt.pow,Bt=Tt.abs,Lt=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,It=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,Nt="-?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][-+]?\\d+)?",zt="[\\s]*,?[\\s]*",jt=new RegExp("(?=("+Nt+"))\\1"+zt+"(?=("+Nt+"))\\2"+zt+"(?=("+Nt+"))\\3"+zt+"([01])"+zt+"([01])"+zt+"(?=("+Nt+"))\\6"+zt+"(?=("+Nt+"))\\7"+zt,"g"),Vt=Array.isArray||function(e){return e instanceof Array};function Ft(e){if(!e)return null;var t={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},n=[];return String(e).replace(Lt,function(e,i,r){var o=[],s=i.toLowerCase();for(r.replace("a"==s?jt:It,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]&&o.push(+arguments[e])}),"m"==s&&o.length>2&&(n.push([i,...o.splice(0,2)]),s="l",i="m"==i?"l":"L");o.length>=t[s]&&(n.push([i,...o.splice(0,t[s])]),t[s]););}),n.toString=qt,n}function qt(){return this.join(",").replace(Pt,"$1")}function Ht(e,t,n,i,r,o,s,a,l){var c=1-l,u=Dt(c,3),p=Dt(c,2),h=l*l*l,d=u*t+3*p*l*i+3*c*l*l*o+h*a;return{x:Kt(u*e+3*p*l*n+3*c*l*l*r+h*s),y:Kt(d)}}function Wt(e){var t=function(e,t,n,i,r,o,s,a){for(var l,c,u,p,h,d,f,m,g=[],v=[[],[]],y=0;y<2;++y)if(0==y?(c=6*e-12*n+6*r,l=-3*e+9*n-9*r+3*s,u=3*n-3*e):(c=6*t-12*i+6*o,l=-3*t+9*i-9*o+3*a,u=3*i-3*t),Bt(l)<1e-12){if(Bt(c)<1e-12)continue;0<(p=-u/c)&&p<1&&g.push(p)}else f=c*c-4*u*l,m=Tt.sqrt(f),f<0||(0<(h=(-c+m)/(2*l))&&h<1&&g.push(h),0<(d=(-c-m)/(2*l))&&d<1&&g.push(d));var b,w=g.length,x=w;for(;w--;)b=1-(p=g[w]),v[0][w]=b*b*b*e+3*b*b*p*n+3*b*p*p*r+p*p*p*s,v[1][w]=b*b*b*t+3*b*b*p*i+3*b*p*p*o+p*p*p*a;return v[0][x]=e,v[1][x]=t,v[0][x+1]=s,v[1][x+1]=a,v[0].length=v[1].length=x+2,{x0:Mt(...v[0]),y0:Mt(...v[1]),x1:$t(...v[0]),y1:$t(...v[1])}}(...e);return function(e,t,n,i){return 1===arguments.length&&(t=e.y,n=e.width,i=e.height,e=e.x),{x:e,y:t,width:n,height:i,x2:e+n,y2:t+i}}(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Qt(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Xt(e,t){return Qt(t,e.x,e.y)||Qt(t,e.x2,e.y)||Qt(t,e.x,e.y2)||Qt(t,e.x2,e.y2)||Qt(e,t.x,t.y)||Qt(e,t.x2,t.y)||Qt(e,t.x,t.y2)||Qt(e,t.x2,t.y2)||(e.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}function Gt(e,t,n,i,r){return e*(e*(-3*t+9*n-9*i+3*r)+6*t-12*n+6*i)-3*t+3*n}function Ut(e,t,n,i,r,o,s,a,l){null==l&&(l=1);for(var c=(l=l>1?1:l<0?0:l)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0,d=0;d<12;d++){var f=c*u[d]+c,m=Gt(f,e,n,r,s),g=Gt(f,t,i,o,a),v=m*m+g*g;h+=p[d]*Tt.sqrt(v)}return c*h}function Yt(e,t,n,i,r,o,s,a){if(!($t(e,n)<Mt(r,s)||Mt(e,n)>$t(r,s)||$t(t,i)<Mt(o,a)||Mt(t,i)>$t(o,a))){var l=(e*i-t*n)*(o-a)-(t-i)*(r*a-o*s),c=(e-n)*(o-a)-(t-i)*(r-s);if(c){var u=Kt(((e*i-t*n)*(r-s)-(e-n)*(r*a-o*s))/c),p=Kt(l/c),h=+u.toFixed(2),d=+p.toFixed(2);if(!(h<+Mt(e,n).toFixed(2)||h>+$t(e,n).toFixed(2)||h<+Mt(r,s).toFixed(2)||h>+$t(r,s).toFixed(2)||d<+Mt(t,i).toFixed(2)||d>+$t(t,i).toFixed(2)||d<+Mt(o,a).toFixed(2)||d>+$t(o,a).toFixed(2)))return{x:u,y:p}}}}function Kt(e){return Math.round(1e11*e)/1e11}function Zt(e,t,n,i,r){if(!Xt(i=i||Wt(e),r=r||Wt(t)))return[];var o,s,a=Ut(...e),l=Ut(...t),c=tn(e)?1:~~(a/5)||1,u=tn(t)?1:~~(l/5)||1,p=new Array(c+1),h=new Array(u+1),d={},f=[];for(o=0;o<c+1;o++){var m=o/c,g=Ht(...e,m);p[o]={x:g.x,y:g.y,t:m}}for(o=0;o<u+1;o++)m=o/u,g=Ht(...t,m),h[o]={x:g.x,y:g.y,t:m};for(o=0;o<c;o++)for(s=0;s<u;s++){var v,y=p[o],b=p[o+1],w=h[s],x=h[s+1],_=Bt(b.x-y.x)<.01?"y":"x",E=Bt(x.x-w.x)<.01?"y":"x",S=Yt(y.x,y.y,b.x,b.y,w.x,w.y,x.x,x.y);if(S){if(d[v=S.x.toFixed(9)+"#"+S.y.toFixed(9)])continue;d[v]=!0;var k=y.t+Bt((S[_]-y[_])/(b[_]-y[_]))*(b.t-y.t),O=w.t+Bt((S[E]-w[E])/(x[E]-w[E]))*(x.t-w.t);k>=0&&k<=1&&O>=0&&O<=1&&f.push({x:S.x,y:S.y,t1:k,t2:O})}}return f}function Jt(e,t,n){for(var i=en(sn(e)),r=en(sn(t)),o=n?0:[],s=0,a=i.length;s<a;s++)for(var l=i[s],c=0,u=r.length;c<u;c++){var p=r[c];if(Xt(l.bbox,p.bbox))for(var h=Zt(l.bez,p.bez,0,l.bbox,p.bbox),d=0,f=h.length;d<f;d++)h[d].segment1=l.segment,h[d].segment2=p.segment,h[d].bez1=l.bez,h[d].bez2=p.bez,o.push(h[d])}return o}function en(e){for(var t=[],n=0,i=0,r=0,o=0,s=0,a=e.length;s<a;s++){var l,c=e[s];"M"!=c[0]?("C"==c[0]?(l=[n,i,c[1],c[2],c[3],c[4],c[5],c[6]],n=c[5],i=c[6]):(l=[n,i,n,i,r,o,r,o],n=r,i=o),t.push({bez:l,bbox:Wt(l),segment:s})):(n=r=c[1],i=o=c[2])}return t}function tn(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function nn(e,t,n,i){return[e,t,n,i,n,i]}function rn(e,t,n,i,r,o){var s=1/3,a=2/3;return[s*e+a*n,s*t+a*i,s*r+a*n,s*o+a*i,r,o]}function on(e,t,n,i,r,o,s,a,l,c){var u,p=120*Rt/180,h=Rt/180*(+r||0),d=[],f=Tt.cos(h),m=Tt.sin(h),g=function(e,t){return{x:e*f-t*m,y:e*m+t*f}};if(c)k=c[0],O=c[1],E=c[2],S=c[3];else{e=(u=g(e,-t)).x,t=-u.y;var v=(e-(a=(u=g(a,-l)).x))/2,y=(t-(l=-u.y))/2,b=v*v/(n*n)+y*y/(i*i);b>1&&(n*=b=Tt.sqrt(b),i*=b);var w=n*n,x=i*i,_=(o==s?-1:1)*Tt.sqrt(Bt((w*x-w*y*y-x*v*v)/(w*y*y+x*v*v))),E=_*n*y/i+(e+a)/2,S=_*-i*v/n+(t+l)/2,k=Tt.asin(((t-S)/i).toFixed(9)),O=Tt.asin(((l-S)/i).toFixed(9));(k=e<E?Rt-k:k)<0&&(k=2*Rt+k),(O=a<E?Rt-O:O)<0&&(O=2*Rt+O),s&&k>O&&(k-=2*Rt),!s&&O>k&&(O-=2*Rt)}var C=O-k;if(Bt(C)>p){var P=O,A=a,T=l;O=k+p*(s&&O>k?1:-1),d=on(a=E+n*Tt.cos(O),l=S+i*Tt.sin(O),n,i,r,0,s,A,T,[O,P,E,S])}C=O-k;var R=Tt.cos(k),M=Tt.sin(k),$=Tt.cos(O),D=Tt.sin(O),B=Tt.tan(C/4),L=4/3*n*B,I=4/3*i*B,N=[e,t],z=[e+L*M,t-I*R],j=[a+L*D,l-I*$],V=[a,l];if(z[0]=2*N[0]-z[0],z[1]=2*N[1]-z[1],c)return[z,j,V].concat(d);for(var F=[],q=0,H=(d=[z,j,V].concat(d).join().split(",")).length;q<H;q++)F[q]=q%2?g(d[q-1],d[q]).y:g(d[q],d[q+1]).x;return F}function sn(e){if(function(e){return Vt(e)&&Vt(e[0])}(e)||(e=Ft(e)),function(e){for(var t=0,n=e.length;t<n;t++){var i=e[t][0];if("M"!==i&&"C"!==i)return!1}return!0}(e))return e;for(var t=function(e){for(var t=new Array(e.length),n=0,i=e.length;n<i;n++)for(var r=e[n],o=t[n]=new Array(r.length),s=0,a=r.length;s<a;s++)o[s]=r[s];return t.toString=qt,t}(function(e){if(function(e){for(var t=0,n=e.length;t<n;t++){var i=e[t][0];if("string"==typeof i&&i!==i.toUpperCase())return!1}return!0}(e))return e;var t,n=new Array(e.length),i=0,r=0,o=0,s=0,a=0;"M"==e[0][0]&&(o=i=+e[0][1],s=r=+e[0][2],a++,n[0]=["M",i,r]);for(var l,c,u=a,p=e.length;u<p;u++){if(t=(c=e[u])[0],n[u]=l=new Array(c.length),t!=t.toUpperCase())switch(l[0]=t.toUpperCase(),l[0]){case"A":l[1]=c[1],l[2]=c[2],l[3]=c[3],l[4]=c[4],l[5]=c[5],l[6]=+c[6]+i,l[7]=+c[7]+r;break;case"V":l[1]=+c[1]+r;break;case"H":l[1]=+c[1]+i;break;case"M":o=+c[1]+i,s=+c[2]+r;default:for(var h=1,d=c.length;h<d;h++)l[h]=+c[h]+(h%2?i:r)}else for(var f=0,m=c.length;f<m;f++)l[f]=c[f];switch(t=t.toUpperCase(),l[0]){case"Z":i=+o,r=+s;break;case"H":i=l[1];break;case"V":r=l[1];break;case"M":o=l[l.length-2],s=l[l.length-1];default:i=l[l.length-2],r=l[l.length-1]}}return n.toString=qt,n}(e)),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i=function(e,t,n){var i,r;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C",...on(t.x,t.y,...e.slice(1))];break;case"S":"C"==n||"S"==n?(i=2*t.x-t.bx,r=2*t.y-t.by):(i=t.x,r=t.y),e=["C",i,r,...e.slice(1)];break;case"T":"Q"==n||"T"==n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C",...rn(t.x,t.y,t.qx,t.qy,e[1],e[2])];break;case"Q":t.qx=e[1],t.qy=e[2],e=["C",...rn(t.x,t.y,e[1],e[2],e[3],e[4])];break;case"L":e=["C",...nn(t.x,t.y,e[1],e[2])];break;case"H":e=["C",...nn(t.x,t.y,e[1],t.y)];break;case"V":e=["C",...nn(t.x,t.y,t.x,e[1])];break;case"Z":e=["C",...nn(t.x,t.y,t.X,t.Y)]}return e},r=function(e,n){if(e[n].length>7){e[n].shift();for(var i=e[n];i.length;)o[n]="A",e.splice(n++,0,["C",...i.splice(0,6)]);e.splice(n,1),c=t.length}},o=[],s="",a="",l=0,c=t.length;l<c;l++){t[l]&&(s=t[l][0]),"C"!=s&&(o[l]=s,l&&(a=o[l-1])),t[l]=i(t[l],n,a),"A"!=o[l]&&"C"==s&&(o[l]="C"),r(t,l);var u=t[l],p=u.length;n.x=u[p-2],n.y=u[p-1],n.bx=At(u[p-4])||n.x,n.by=At(u[p-3])||n.y}return t}function an(e){return f(e)&&b(e,"waypoints")}function ln(e){return f(e)&&b(e,"labelTarget")}function cn(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function un(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function pn(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function hn(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function dn(e){for(var t=e.waypoints,n=t.reduce(function(e,n,i){var r=t[i-1];if(r){var o=e[e.length-1],s=o&&o.endLength||0,a=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}(r,n);e.push({start:r,end:n,startLength:s,endLength:s+a,length:a})}return e},[]),i=n.reduce(function(e,t){return e+t.length},0),r=i/2,o=0,s=n[o];s.endLength<r;)s=n[++o];var a=(r-s.startLength)/s.length;return{x:s.start.x+(s.end.x-s.start.x)*a,y:s.start.y+(s.end.y-s.start.y)*a}}function fn(e){return an(e)?dn(e):un({x:(t=e).x+(t.width||0)/2,y:t.y+(t.height||0)/2});var t}function mn(e,t,n){f(n=n||0)||(n={x:n,y:n});var i=pn(e),r=pn(t),o=i.bottom+n.y<=r.top,s=i.left-n.x>=r.right,a=i.top-n.y>=r.bottom,l=o?"top":a?"bottom":null,c=i.right+n.x<=r.left?"left":s?"right":null;return c&&l?l+"-"+c:c||l||"intersect"}function gn(e,t,n){var i=function(e,t){return Jt(e,t)}(e,t);return 1===i.length||2===i.length&&_t(i[0],i[1])<1?un(i[0]):i.length>1?(i=B(i,function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t}),un(i[n?0:i.length-1])):null}function vn(e,t){return Math.round(e*t)/t}function yn(e){return m(e)?e+"px":e}function bn(e){for(;e.parent;)e=e.parent;return e}function wn(e,t,n){const i=Pe("g");xe(i).add(t);const r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}const xn={shape:["x","y","width","height"],connection:["waypoints"]};function _n(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 En(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}_n.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],_n.prototype._init=function(e){const t=this._eventBus,n=this._container=function(e){const t=(e=q({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent bio-theme-parent"),Z(n,{position:"relative",overflow:"hidden",width:yn(e.width),height:yn(e.height)}),t.appendChild(n),n}(e),i=this._svg=Pe("svg");be(i,{width:"100%",height:"100%"}),J(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)}),i.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),i.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),ge(n,i);const r=this._viewport=wn(i,"viewport");e.deferUpdate&&(this._viewboxChanged=V(this._viewboxChanged,300)),this._restoreFocus=V(this._restoreFocus,0),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)},_n.prototype._destroy=function(){this._restoreFocus.cancel(),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},_n.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},_n.prototype._clear=function(){this._elementRegistry.getAll().forEach(e=>{const t=ft(e);"root"===t?this.removeRootElement(e):this._removeElement(e,t)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},_n.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},_n.prototype.restoreFocus=function(){this._restoreFocus()},_n.prototype._restoreFocus=function(){document.activeElement===document.body&&this.focus()},_n.prototype.isFocused=function(){return this._focused},_n.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},_n.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},_n.prototype._getChildIndex=function(e){return k(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},_n.prototype._createLayer=function(e,t){void 0===t&&(t=1);const n=this._getChildIndex(t);return{group:wn(this._viewport,"layer-"+e,n),index:t,visible:!0}},_n.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},_n.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?(ze(n),t.visible=!1,n):n},_n.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],ze(t.group))},_n.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},_n.prototype.findRoot=function(e){const t=this._resolveElements(e);let n;for(const e of t){const t=this._findPlaneForRoot(bn(e));if(!t)return;if(n&&t.rootElement!==n)return;n=t.rootElement}return n},_n.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},_n.prototype._findPlaneForRoot=function(e){return w(this._planes,function(t){return t.rootElement===e})},_n.prototype._resolveElement=function(e){return"string"==typeof e?this._elementRegistry.get(e):e},_n.prototype._resolveElements=function(e){return d(e)||(e=[e]),e.map(e=>this._resolveElement(e)).filter(Boolean)},_n.prototype.getContainer=function(){return this._container},_n.prototype._updateMarker=function(e,t,n){let i;(e=this._resolveElement(e)).markers=e.markers||new Set,i=this._elementRegistry._elements[e.id],i&&(E([i.gfx,i.secondaryGfx],function(i){i&&(n?(e.markers.add(t),xe(i).add(t)):(e.markers.delete(t),xe(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},_n.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},_n.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},_n.prototype.hasMarker=function(e,t){return!!(e=this._resolveElement(e)).markers&&e.markers.has(t)},_n.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},_n.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},_n.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},_n.prototype.removeRootElement=function(e){e=this._resolveElement(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},_n.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},_n.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)},_n.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})},_n.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})},_n.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=xn[e],i=O(n,function(e){return void 0!==t[e]});if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},_n.prototype._setParent=function(e,t,n){wt(t.children,e,n),e.parent=t},_n.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 s=o.create(e,t,i);return this._elementRegistry.add(t,s),o.update(e,t,s),r.fire(e+".added",{element:t,gfx:s}),t},_n.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},_n.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},_n.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),bt(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},_n.prototype.removeShape=function(e){return this._removeElement(e,"shape")},_n.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},_n.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},_n.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},_n.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},_n.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,s,a,l,c;return e?(this._changeViewbox(function(){a=Math.min(n.width/e.width,n.height/e.height);const i=this._svg.createSVGMatrix().scale(a).translate(-e.x,-e.y);Ve(t,i)}),e):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},s=Ve(t),r=s?s.matrix:function(e,t,n,i,r,o){var s=Te().createSVGMatrix();switch(arguments.length){case 0:return s;case 1:return Re(s,e);case 6:return Re(s,{a:e,b:t,c:n,d:i,e:r,f:o})}}(),a=vn(r.a,1e3),l=vn(-r.e||0,1e3),c=vn(-r.f||0,1e3),e=this._cachedViewbox={x:l?l/a:0,y:c?c/a:0,width:n.width/a,height:n.height/a,scale:a,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},_n.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=q({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),En(t,n)}),{x:n.e,y:n.f}},_n.prototype.scrollToElement=function(e,t){let n=100;const i=this._resolveElements(e);if(!i.length)return;const r=this.findRoot(i);if(!r)return;r!==this.getRootElement()&&this.setRootElement(r);const o=i.filter(e=>e!=r);if(!o.length)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 s=ht(o),a=pn(s),l=this.viewbox(),c=this.zoom();let u,p;l.y+=t.top/c,l.x+=t.left/c,l.width-=(t.right+t.left)/c,l.height-=(t.bottom+t.top)/c;const h=pn(l);if(s.width<l.width&&s.height<l.height){const e=Math.max(0,a.right-h.right),t=Math.min(0,a.left-h.left),n=Math.max(0,a.bottom-h.bottom),i=Math.min(0,a.top-h.top);u=e||t,p=n||i}else u=s.x-l.x,p=s.y-l.y;this.scroll({dx:-u*c,dy:-p*c})},_n.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)}),vn(i.a,1e3)},_n.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},_n.prototype._setZoom=function(e,t){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let s,a,l,c,u;l=i.getCTM();const p=l.a;return t?(s=q(o,t),a=s.matrixTransform(l.inverse()),c=r.translate(a.x,a.y).scale(1/p*e).translate(-a.x,-a.y),u=l.multiply(c)):u=r.scale(e),En(this._viewport,u),u},_n.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},_n.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}},_n.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Sn="data-element-id";function kn(e){this._elements={},this._eventBus=e}function On(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 Cn(e,t){if(!(this instanceof Cn))return new Cn(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}kn.$inject=["eventBus"],kn.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),be(t,Sn,i),n&&be(n,Sn,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},kn.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(be(i.gfx,Sn,""),i.secondaryGfx&&be(i.secondaryGfx,Sn,""),delete t[n])},kn.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)},kn.prototype.updateGraphics=function(e,t,n){var i=e.id||e,r=this._elements[i];return n?r.secondaryGfx=t:r.gfx=t,t&&be(t,Sn,i),t},kn.prototype.get=function(e){var t;t="string"==typeof e?e:e&&be(e,Sn);var n=this._elements[t];return n&&n.element},kn.prototype.filter=function(e){var t=[];return this.forEach(function(n,i){e(n,i)&&t.push(n)}),t},kn.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}},kn.prototype.getAll=function(){return this.filter(function(e){return e})},kn.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)})},kn.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},kn.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")},Cn.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?On(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)},Cn.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||On(this,t,e),n},Cn.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},Cn.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Cn.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Pn=new Cn({name:"children",enumerable:!0,collection:!0},{name:"parent"}),An=new Cn({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Tn=new Cn({name:"attachers",collection:!0},{name:"host"}),Rn=new Cn({name:"outgoing",collection:!0},{name:"source"}),Mn=new Cn({name:"incoming",collection:!0},{name:"target"});function $n(){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)}}),Pn.bind(this,"parent"),An.bind(this,"labels"),Rn.bind(this,"outgoing"),Mn.bind(this,"incoming")}function Dn(){$n.call(this),Pn.bind(this,"children"),Tn.bind(this,"host"),Tn.bind(this,"attachers")}function Bn(){$n.call(this),Pn.bind(this,"children")}function Ln(){Dn.call(this),An.bind(this,"labelTarget")}function In(){$n.call(this),Rn.bind(this,"source"),Mn.bind(this,"target")}e(Dn,$n),e(Bn,Dn),e(Ln,Dn),e(In,$n);var Nn={connection:In,shape:Dn,label:Ln,root:Bn};function zn(){this._uid=12}zn.prototype.createRoot=function(e){return this.create("root",e)},zn.prototype.createLabel=function(e){return this.create("label",e)},zn.prototype.createShape=function(e){return this.create("shape",e)},zn.prototype.createConnection=function(e){return this.create("connection",e)},zn.prototype.create=function(e,t){return(t=q({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Nn[e];if(!n)throw new Error("unknown type: <"+e+">");return q(new n,t)}(e,t)};var jn="__fn",Vn=Array.prototype.slice;function Fn(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function qn(){}function Hn(e){return e.childNodes[0]}function Wn(e,t,n,i,r){var o=Me();o.setTranslate(t,n);var s=Me();s.setRotate(i||0,0,0);var a=Me();a.setScale(1,1),Ve(e,[o,s,a])}function Qn(e,t,n){var i=Me();i.setTranslate(t,n),Ve(e,i)}function Xn(e,t){var n=Me();n.setRotate(t,0,0),Ve(e,n)}function Gn(e,t){this._eventBus=e,this._elementRegistry=t}Fn.prototype.on=function(e,t,n,i){if(e=d(e)?e:[e],g(t)&&(i=n,n=t,t=1e3),!m(t))throw new Error("priority must be a number");var r=n;i&&((r=F(n,i))[jn]=n[jn]||n);var o=this;e.forEach(function(e){o._addListener(e,{priority:t,callback:r,next:null})})},Fn.prototype.once=function(e,t,n,i){var r=this;if(g(t)&&(i=n,n=t,t=1e3),!m(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[jn]=n,this.on(e,t,o)},Fn.prototype.off=function(e,t){e=d(e)?e:[e];var n=this;e.forEach(function(e){n._removeListener(e,t)})},Fn.prototype.createEvent=function(e){var t=new qn;return t.init(e),t},Fn.prototype.fire=function(e,t){var n,i,r,o;if(o=Vn.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 qn?t:this.createEvent(t),o[0]=n;var s=n.type;e!==s&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==s&&(n.type=s)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},Fn.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},Fn.prototype._destroy=function(){this._listeners={}},Fn.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},Fn.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},Fn.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)},Fn.prototype._getListeners=function(e){return this._listeners[e]},Fn.prototype._setListeners=function(e,t){this._listeners[e]=t},Fn.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[jn]!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},qn.prototype.stopPropagation=function(){this.cancelBubble=!0},qn.prototype.preventDefault=function(){this.defaultPrevented=!0},qn.prototype.init=function(e){q(this,e||{})},Gn.$inject=["eventBus","elementRegistry"],Gn.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=function(e){return e.parentNode.childNodes[1]}(n),t||(xe(t=Pe("g")).add("djs-children"),ge(n.parentNode,t))):t=n,t},Gn.prototype._clear=function(e){var t=Hn(e);return ie(t),t},Gn.prototype._createContainer=function(e,t,n,i){var r=Pe("g");xe(r).add("djs-group"),void 0!==n?function(e,t,n){var i=n||t.firstChild;if(e===i)return;t.insertBefore(e,i)}(r,t,t.childNodes[n]):ge(t,r);var o=Pe("g");xe(o).add("djs-element"),xe(o).add("djs-"+e),i&&xe(o).add("djs-frame"),ge(r,o);var s=Pe("g");return xe(s).add("djs-visual"),ge(o,s),o},Gn.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,mt(t))},Gn.prototype.updateContainments=function(e){var t,n=this,i=this._elementRegistry;t=k(e,function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e},{}),E(t,function(e){var t=e.children;if(t){var r=n._getChildrenContainer(e),o=r.firstChild;E(t,function(e){var t=i.getGraphics(e).parentNode;t===o?o=o.nextSibling:r.insertBefore(t,o)})}})},Gn.prototype.drawShape=function(e,t,n={}){return this._eventBus.fire("render.shape",{gfx:e,element:t,attrs:n})},Gn.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},Gn.prototype.drawConnection=function(e,t,n={}){return this._eventBus.fire("render.connection",{gfx:e,element:t,attrs:n})},Gn.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},Gn.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),Qn(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?be(n,"display","none"):be(n,"display","block")}},Gn.prototype.remove=function(e){ze(this._elementRegistry.getGraphics(e).parentNode)};var Un={__depends__:[yt],__init__:["canvas"],canvas:["type",_n],elementRegistry:["type",kn],elementFactory:["type",zn],eventBus:["type",Fn],graphicsFactory:["type",Gn]};function Yn(e){return function(e){var t=new Ye(e);return t.init(),t}([{config:["value",e=e||{}]},Un].concat(e.modules||[]))}function Kn(e,t){this._injector=t||Yn(e),this.get("eventBus").fire("diagram.init")}function Zn(){}function Jn(e,t){this.model=e,this.properties=t}Kn.prototype.get=function(e,t){return this._injector.get(e,t)},Kn.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Kn.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Kn.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")},Zn.prototype.get=function(e){return this.$model.properties.get(this,e)},Zn.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},Jn.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(Zn.prototype);E(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}),E(e,F(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 ei=q(Object.create(null),{String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0}),ti=q(Object.create(null),{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 ni(e,t){var n=ti[e];return n?n(t):t}function ii(e){return!!ei[e]}function ri(e){return!!ti[e]}function oi(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 si(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName=Object.create(null),this.properties=[],this.propertiesByName=Object.create(null)}function ai(e,t){this.packageMap=Object.create(null),this.typeMap=Object.create(null),this.packages=[],this.properties=t,E(e,F(this.registerPackage,this))}function li(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function ci(e){this.model=e}function ui(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function pi(e){return e.replace(/^:/,"")}function hi(e,t={}){this.properties=new ci(this),this.factory=new Jn(this,this.properties),this.registry=new ai(e,this.properties),this.typeCache=Object.create(null),this.config=t}si.prototype.build=function(){return Q(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},si.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)},si.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,s=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 a=r.indexOf(e);if(-1===a)throw new Error("property <"+i.name+"> not found in property list");r.splice(a,1),this.addProperty(t,n?void 0:a,s),o[i.name]=o[i.localName]=t},si.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=oi(r[0],i),s=oi(r[1],o.prefix).name,a=this.propertiesByName[s];if(!a)throw new Error("refined property <"+s+"> not found");this.replaceProperty(a,e,n),delete e.redefines},si.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},si.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},si.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},si.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},si.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},si.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")},si.prototype.hasProperty=function(e){return this.propertiesByName[e]},si.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(E(e.properties,F(function(n){n=q({},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)},ai.prototype.getPackage=function(e){return this.packageMap[e]},ai.prototype.getPackages=function(){return this.packages},ai.prototype.registerPackage=function(e){e=q({},e);var t=this.packageMap;li(t,e,"prefix"),li(t,e,"uri"),E(e.types,F(function(t){this.registerType(t,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},ai.prototype.registerType=function(e,t){var n=oi((e=q({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:q({},e.meta||{})})).name,t.prefix),i=n.name,r=Object.create(null);E(e.properties,F(function(e){var t=oi(e.name,n.prefix),i=t.name;ii(e.type)||(e.type=oi(e.type,t.prefix).name),q(e,{ns:t,name:i}),r[i]=e},this)),q(e,{ns:n,name:i,propertiesByName:r}),E(e.extends,F(function(e){var t=oi(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},ai.prototype.mapTypes=function(e,t,n){var i=ii(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(n,i){var o=oi(n,ii(n)?"":e.prefix);r.mapTypes(o,t,i)}function s(e){return o(e,!0)}if(!i)throw new Error("unknown type <"+e.name+">");E(i.superClass,n?s:function(e){return o(e,!1)}),t(i,!n),E(i.traits,s)},ai.prototype.getEffectiveDescriptor=function(e){var t=oi(e),n=new si(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},ai.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},ci.prototype.set=function(e,t,n){if(!v(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[pi(t)]:i?r in e?e[r]=n:ui(e,i,n):e.$attrs[pi(t)]=n},ci.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[pi(t)];var i=n.name;return!e[i]&&n.isMany&&ui(e,n,[]),e[i]},ci.prototype.define=function(e,t,n){if(!n.writable){var i=n.value;delete(n=q({},n,{get:function(){return i}})).value}Object.defineProperty(e,t,n)},ci.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},ci.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},ci.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},hi.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},hi.prototype.getType=function(e){var t=this.typeCache,n=v(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},hi.prototype.createAny=function(e,t,n){var i=oi(e),r={$type:e,$instanceOf:function(e){return e===this.$type},get:function(e){return this[e]},set:function(e,t){H(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}),E(n,function(e,t){f(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e}),r},hi.prototype.getPackage=function(e){return this.registry.getPackage(e)},hi.prototype.getPackages=function(){return this.registry.getPackages()},hi.prototype.getElementDescriptor=function(e){return e.$descriptor},hi.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},hi.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},hi.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var di=String.fromCharCode,fi=Object.prototype.hasOwnProperty,mi=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,gi={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function vi(e,t,n,i){return i?fi.call(gi,i)?gi[i]:"&"+i+";":di(t||parseInt(n,16))}function yi(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(mi,vi):e}Object.keys(gi).forEach(function(e){gi[e.toUpperCase()]=gi[e]});var bi="non-whitespace outside of root node";function wi(e){return new Error(e)}function xi(e){return{get:e,enumerable:!0}}function _i(e,t,n,i){n in t||(t[n]=n in e?e[n]:null),e[n]=i}function Ei(e,t){var n,i;for(n in t)null===(i=t[n])?delete e[n]:e[n]=i}function Si(e){return e+"$uri"}function ki(){return{line:0,column:0}}function Oi(e){throw e}function Ci(e){if(!this)return new Ci(e);var t,n,i,r,o,s,a,l,c,u,p,h,d=e&&e.proxy,f=Oi,m=ki,g=!1,v=!1,y="",b=!1,w=!1,x=null,_=!1;function E(e){e instanceof Error||(e=wi(e)),x=e,f(e,m)}function S(e){o&&(e instanceof Error||(e=wi(e)),o(e,m))}function k(){c=w?[]:null,u=w?function(e){var t,n,i=Object.create(null);for(t in e)i[n=e[t]]=n,i[Si(n)]=t;return i}(h):null,p=[],m=ki,_=!1,x=null,v=!1,y=""}function O(e,o=!1){var f,g,y,x,k,O,C,P,A,T,R,M,$=null,D=0,B=!1,L=!1,I=0,N=0,z="",j=0;function V(e,t){var n=e.indexOf(":");if(-1===n)return e;var i=u[e.substring(0,n)];return i?t===i?e.substr(n+1):i+e.substr(n):(S(function(e){return"missing namespace for prefix <"+e+">"}(e.substring(0,n))),null)}function F(){if(null!==M)return M;var e,t,n,i,r,o,s,a,l,c=w&&u.xmlns,p=w&&b?[]:null,d=j,m=z,v=m.length,y={},x=new Set;e:for(;d<v;d++)if(s=!1,!(32===(a=m.charCodeAt(d))||a<14&&a>8)){for((a<65||a>122||a>90&&a<97)&&95!==a&&58!==a&&(S("illegal first char attribute name"),s=!0),l=d+1;l<v;l++)if(!((a=m.charCodeAt(l))>96&&a<123||a>64&&a<91||a>47&&a<59||46===a||45===a||95===a)){if(32===a||a<14&&a>8){S("missing attribute value"),d=l;continue e}if(61===a)break;S("illegal attribute name char"),s=!0}if("xmlns:xmlns"===(o=m.substring(d,l))&&(S("illegal declaration of xmlns"),s=!0),34===(a=m.charCodeAt(l+1)))-1===(l=m.indexOf('"',d=l+2))&&-1!==(l=m.indexOf("'",d))&&(S("attribute value quote missmatch"),s=!0);else if(39===a)-1===(l=m.indexOf("'",d=l+2))&&-1!==(l=m.indexOf('"',d))&&(S("attribute value quote missmatch"),s=!0);else for(S("missing attribute value quotes"),s=!0,l+=1;l<v&&!(32===(a=m.charCodeAt(l+1))||a<14&&a>8);l++);for(-1===l&&(S("missing closing quotes"),l=v,s=!0),s||(i=m.substring(d,l)),"xmlns:xml"===o&&"http://www.w3.org/XML/1998/namespace"!==i&&E("illegal value of xmlns:xml"),d=l;l+1<v&&!(32===(a=m.charCodeAt(l+1))||a<14&&a>8);l++)d===l&&(S("illegal character after attribute end"),s=!0);if(d=l+1,!s)if(x.has(o))S("attribute <"+o+"> already defined");else if(x.add(o),w)if(b){if(null!==(n="xmlns"===o?"xmlns":120===o.charCodeAt(0)&&"xmlns:"===o.substr(0,6)?o.substr(6):null)){if(e=yi(i),t=Si(n),!(r=h[e])){if("xmlns"===n||t in u&&u[t]!==e)do{r="ns"+D++}while(void 0!==u[r]);else r=n;h[e]=r}u[n]!==r&&(f||(f=Object.create(null)),$=null,g=null,_i(u,f,n,r),"xmlns"===n&&(_i(u,f,Si(r),e),c=r),_i(u,f,t,e)),y[o]=i;continue}p.push(o,i)}else null!==(o=V(o,c))&&(y[o]=i);else y[o]=i}if(b)for(d=0,v=p.length;d<v;d++)o=V(p[d++],c),i=p[d],null!==o&&(y[o]=i);return M=y}for(m=function(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,s=0,a=N;I>=s&&(t=i.exec(e))&&!((a=t[0].length+t.index)>I);)r+=1,s=a;return-1==I?(o=a,n=e.substring(N)):0===N?n=e.substring(N,I):(o=I-s,n=-1==N?e.substring(I):e.substring(I,N+1)),{data:n,line:r,column:o}},d&&(R=Object.create({},{name:xi(function(){return A}),originalName:xi(function(){return T}),attrs:xi(F),ns:xi(function(){return g||(g=Object.assign(Object.create(null),u)),g})}));-1!==N;){if(-1===(I=60===e.charCodeAt(N)?N:e.indexOf("<",N)))return o?e.substring(N):p.length?E("unexpected end of file"):v?void(N<e.length&&e.substring(N).trim()&&S(bi)):E("missing start tag");if(v||(v=!0),N!==I)if(p.length){if(t&&(t(e.substring(N,I),yi,m),_))return}else if(e.substring(N,I).trim()&&(S(bi),_))return;if(33===(O=e.charCodeAt(I+1))){if(91===(k=e.charCodeAt(I+2))&&"CDATA["===e.substr(I+3,6)){if(-1===(N=e.indexOf("]]>",I)))return o?e.substring(I):E("unclosed cdata");if(r&&(r(e.substring(I+9,N),m),_))return;N+=3;continue}if(45===k&&45===e.charCodeAt(I+3)){if(-1===(N=e.indexOf("--\x3e",I)))return o?e.substring(I):E("unclosed comment");if(s&&(s(e.substring(I+4,N),yi,m),_))return;N+=3;continue}}if(63!==O){for(y=I+1;;y++){if(C=e.charCodeAt(y),isNaN(C))return o?e.substring(I):(N=-1,E("unclosed tag"));if(34===C)y=-1!==(k=e.indexOf('"',y+1))?k:y;else if(39===C)y=-1!==(k=e.indexOf("'",y+1))?k:y;else if(62===C){N=y;break}}if(33!==O){if(M={},47===O){if(B=!1,L=!0,!p.length)return E("missing open tag");if(y=A=p.pop(),k=I+2+y.length,e.substring(I+2,k)!==y)return E("closing tag mismatch");for(;k<N;k++)if(!(32===(O=e.charCodeAt(k))||O>8&&O<14))return E("close tag")}else{if(47===e.charCodeAt(N-1)?(y=A=e.substring(I+1,N-1),B=!0,L=!0):(y=A=e.substring(I+1,N),B=!0,L=!1),!(O>96&&O<123||O>64&&O<91||95===O||58===O))return E("illegal first char nodeName");for(k=1,x=y.length;k<x;k++)if(!((O=y.charCodeAt(k))>96&&O<123||O>64&&O<91||O>47&&O<59||45===O||95===O||46==O)){if(32===O||O<14&&O>8){A=y.substring(0,k),M=null;break}return E("invalid nodeName")}L||p.push(A)}if(w){B&&(f=null,null===M&&(b=-1!==y.indexOf("xmlns",k))&&(j=k,z=y,F(),b=!1),L||c.push(f)),T=A,null===$&&($=Object.create(null));var q=$[A];if(void 0!==q)A=q;else{if(-1!==(O=A.indexOf(":"))){if(!(P=u[A.substring(0,O)]))return E("missing namespace on <"+T+">");A=A.substr(O+1)}else P=u.xmlns;P&&(A=P+":"+A),$[T]=A}}if(B&&(j=k,z=y,n&&(d?n(R,yi,L,m):n(A,F,yi,L,m),_)))return;if(L){if(i&&(i(d?R:A,yi,B,m),_))return;w&&(B||(f=c.pop()),f&&(Ei(u,f),f=null,$=null,g=null))}N+=1}else{if(l&&(l(e.substring(I,N+1),yi,m),_))return;N+=1}}else{if(-1===(N=e.indexOf("?>",I)))return o?e.substring(I):E("unclosed question");if(a&&(a(e.substring(I,N+2),m),_))return;N+=2}}}this.on=function(e,c){if("function"!=typeof c)throw wi("required args <name, cb>");switch(e){case"openTag":n=c;break;case"text":t=c;break;case"closeTag":i=c;break;case"error":f=c;break;case"warn":o=c;break;case"cdata":r=c;break;case"attention":l=c;break;case"question":a=c;break;case"comment":s=c;break;default:throw wi("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw wi("required args <nsMap={}>");var t,n=Object.create(null);for(t in e)n[t]=e[t];return w=!0,h=n,this},this.parse=function(e){if("string"!=typeof e)throw wi("required args <xml=string>");if(g)throw wi("parse during stream; call end() first");return k(),O(e),m=ki,_=!1,x},this.write=function(e){if("string"!=typeof e)throw wi("required args <xml=string>");return g||(k(),g=!0),x||(y=O(y+e,!0)||""),this},this.end=function(){return g||k(),g=!1,x||O(y),y="",m=ki,_=!1,x},this.stop=function(){_=!0}}function Pi(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Ai={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Ti="property";function Ri(e){return e.xml&&e.xml.serialize}function Mi(e,t){return Pi(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function $i(e){return new Error(e)}function Di(e){return e.$descriptor}function Bi(e){q(this,e),this.elementsById=Object.create(null),this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw $i("expected element");var t,n=this.elementsById,i=Di(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 $i("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Li(){}function Ii(){}function Ni(){}function zi(e,t){this.property=e,this.context=t}function ji(e,t){this.element=t,this.propertyDesc=e}function Vi(){}function Fi(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function qi(e,t,n){Fi.call(this,e,t,n)}function Hi(e,t,n){this.model=e,this.context=n}function Wi(e){e instanceof hi&&(e={model:e}),q(this,{lax:!1},e)}Li.prototype.handleEnd=function(){},Li.prototype.handleText=function(){},Li.prototype.handleNode=function(){},Ii.prototype=Object.create(Li.prototype),Ii.prototype.handleNode=function(){return this},Ni.prototype=Object.create(Li.prototype),Ni.prototype.handleText=function(e){this.body=(this.body||"")+e},zi.prototype=Object.create(Ni.prototype),zi.prototype.handleNode=function(e){if(this.element)throw $i("expected no sub nodes");return this.element=this.createReference(e),this},zi.prototype.handleEnd=function(){this.element.id=this.body},zi.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},ji.prototype=Object.create(Ni.prototype),ji.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=ni(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Vi.prototype=Object.create(Ni.prototype),Vi.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},Fi.prototype=Object.create(Vi.prototype),Fi.prototype.addReference=function(e){this.context.addReference(e)},Fi.prototype.handleText=function(e){if(!Di(this.element).bodyProperty)throw $i("unexpected body text <"+e+">");Ni.prototype.handleText.call(this,e)},Fi.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Di(t).bodyProperty;n&&void 0!==e&&(e=ni(n.type,e),t.set(n.name,e))},Fi.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Di(i),o=this.context,s=new i({}),a=this.model;return E(n,function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?E(e.split(" "),function(e){o.addReference({element:s,property:i.ns.name,id:e})}):o.addReference({element:s,property:i.ns.name,id:e}):(i?e=ni(i.type,e):"xmlns"===n?n=":"+n:(t=oi(n,r.ns.prefix),a.getPackage(t.prefix)&&o.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))}),s},Fi.prototype.getPropertyForNode=function(e){var t=oi(e.name),n=this.type,i=this.model,r=Di(n),o=t.name,s=r.propertiesByName[o];if(s&&!s.isAttr){const t=function(e){const t=Ri(e);return t!==Ti&&(t||null)}(s);if(t){const n=e.attributes[t];if(n){const t=function(e,t,n){const i=oi(e,t.xmlns),r=oi(`${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 q({},s,{effectiveType:Di(i.getType(t)).name})}}return s}var a=i.getPackage(t.prefix);if(a){const e=Mi(t,a),n=i.getType(e);if(s=w(r.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}),s)return q({},s,{effectiveType:Di(n).name})}else if(s=w(r.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}),s)return s;throw $i("unrecognized element <"+t.name+">")},Fi.prototype.toString=function(){return"ElementDescriptor["+Di(this.type).name+"]"},Fi.prototype.valueHandler=function(e,t){return new ji(e,t)},Fi.prototype.referenceHandler=function(e){return new zi(e,this.context)},Fi.prototype.handler=function(e){return"Element"===e?new Hi(this.model,e,this.context):new Fi(this.model,e,this.context)},Fi.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,ri(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?(q(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},qi.prototype=Object.create(Fi.prototype),qi.prototype.createElement=function(e){var t=e.name,n=oi(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),s=o&&Mi(n,o)||t;if(!r.hasType(s))throw $i("unexpected element <"+e.originalName+">");return Fi.prototype.createElement.call(this,e)},Hi.prototype=Object.create(Vi.prototype),Hi.prototype.createElement=function(e){var t=e.name,n=oi(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Hi.prototype.handleChild=function(e){var t=new Hi(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},Hi.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Wi.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof Fi?(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,s=new Bi(q({},t,{rootHandler:i})),a=new Ci({proxy:!0}),l=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function c(e,t,n){var i=t(),r=i.line,o=i.column,a=i.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var l="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:l,error:e}),!0;throw $i(l)}function u(e,t){return c(e,t,!0)}i.context=s,l.push(i);var p=/^<\?xml /i,h=/ encoding="([^"]+)"/i,d=/^utf-8$/i;function f(e,t){try{l.peek().handleText(e)}catch(e){u(e,t)}}var m=r.getPackages().reduce(function(e,t){return e[t.uri]=t.prefix,e},Object.entries(Ai).reduce(function(e,[t,n]){return e[n]=t,e},r.config&&r.config.nsMap||{}));return a.ns(m).on("openTag",function(e,t,n,i){var r=e.attrs||{},s=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){c(e,t,o)&&l.push(new Ii)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},i)}).on("question",function(e){if(p.test(e)){var t=h.exec(e),n=t&&t[1];n&&!d.test(n)&&s.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",c).on("warn",u),new Promise(function(t,n){var r;try{a.parse(e),function(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],a=Di(r).propertiesByName[t.property];if(o||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var l=r.get(a.name),c=l.indexOf(t);-1===c&&(c=l.length),o?l[c]=o:l.splice(c,1)}else r.set(a.name,o)}}()}catch(e){r=e}var o=i.element;r||o||(r=$i("failed to parse document as <"+i.type.$descriptor.name+">"));var l=s.warnings,c=s.references,u=s.elementsById;return r?(r.warnings=l,n(r)):t({rootElement:o,elementsById:u,references:c,warnings:l})})},Wi.prototype.handler=function(e){return new qi(this.model,e)};var Qi=/<|>|'|"|&|\n\r|\n/g,Xi=/<|>|&/g;function Gi(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}function Ui(e,t){return Pi(t)?function(e){return e.charAt(0).toLowerCase()+e.slice(1)}(e):e}function Yi(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Ki(e){return v(e)?e:(e.prefix?e.prefix+":":"")+e.localName}Gi.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},Gi.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},Gi.prototype.resolve=function(e){for(var t=this;t;){var n=e(t);if(n)return n;t=t.parent}},Gi.prototype.eachScope=function(e){for(var t=this;t;)e(t),t=t.parent},Gi.prototype.byUri=function(e){return this.resolve(function(t){return t.uriMap[e]})},Gi.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)},Gi.prototype.uriByPrefix=function(e){var t=e||"xmlns";return this.resolve(function(e){return e.prefixMap[t]})},Gi.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},Gi.prototype.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},Gi.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e),i=this.byUri(t);this.eachScope(function(e){e.used[n]=i})},Gi.prototype.getUsed=function(e){return[].concat(this.wellknown,this.custom).filter(e=>{var t=this.getNSKey(e);return this.used[t]})};var Zi={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ji={"<":"lt",">":"gt","&":"amp"};function er(e,t,n){return(e=v(e)?e:""+e).replace(t,function(e){return"&"+n[e]+";"})}function tr(e){return er(e,Qi,Zi)}function nr(e){return er(e,Xi,Ji)}function ir(e){this.tagName=e}function rr(){}function or(e){this.tagName=e}function sr(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function ar(e,t,n){sr.call(this,e,t),this.serialization=n}function lr(){this.value="",this.write=function(e){this.value+=e}}function cr(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 ur(e){return e=q({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new lr,r=new cr(i,e.format);e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n');var o=new sr,s=t.$model;if(o.getNamespaces().mapDefaultPrefixes(function(e){const t=e.config&&e.config.nsMap||{},n={};for(const e in Ai)n[e]=Ai[e];for(const e in t){n[t[e]]=e}for(const t of e.getPackages())n[t.prefix]=t.uri;return n}(s)),o.build(t).serializeTo(r),!n)return i.value}}}function pr(e,t){hi.call(this,e,t)}ir.prototype.build=function(e){return this.element=e,this},ir.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+nr(this.element.id)+"</"+this.tagName+">").appendNewLine()},rr.prototype.serializeValue=rr.prototype.serializeTo=function(e){e.append(this.escape?nr(this.value):this.value)},rr.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Xi)&&(this.escape=!0),this},Yi(or,rr),or.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},sr.prototype.build=function(e){return function(e,t){var n=[{serializer:e,children:e.enter(t),index:0}];for(;n.length;){var i=n[n.length-1];if(i.index>=i.children.length)i.serializer.exit(),n.pop();else{var r=i.children[i.index++],o=r.create();i.serializer.body.push(o),r.element&&n.push({serializer:o,children:o.enter(r.element),index:0})}}}(this,e),this},sr.prototype.enter=function(e){this.element=e;var t=e.$descriptor,n=this.propertyDescriptor,i=t.isGeneric;if(this.otherAttrs=i?this.parseGenericNsAttributes(e):this.parseNsAttributes(e),this.ns=n?this.nsPropertyTagName(n):this.nsTagName(t),this.tagName=this.addTagName(this.ns),i)return this.collectGenericContainments(e);var r=function(e){return _(e.$descriptor.properties,function(t){var n=t.name;if(t.isVirtual)return!1;if(!b(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)})}(e);return this.parseAttributes(_(r,function(e){return e.isAttr})),this.collectContainments(function(e){return _(e,function(e){return!e.isAttr})}(r))},sr.prototype.exit=function(){this.parseGenericAttributes(this.element,this.otherAttrs)},sr.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?q({localName:t.ns.localName},e):q({localName:Ui(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},sr.prototype.nsPropertyTagName=function(e){return function(e,t){return q({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},sr.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},sr.prototype.nsAttributeName=function(e){var t;if(t=v(e)?oi(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}:q({localName:t.localName},n)},sr.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}))},sr.prototype.collectGenericContainments=function(e){var t=this,n=[],i=e.$body;i&&n.push({create:function(){return(new rr).build({type:"String"},i)}});var r=e.$children;return r&&E(r,function(e){n.push({create:function(){return new sr(t)},element:e})}),n},sr.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=oi(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 s=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(s)}},sr.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return E(n,function(n,r){var o=t.parseNsAttribute(e,r,n);o&&i.push(o)}),i},sr.prototype.parseGenericAttributes=function(e,t){var n=this;E(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)}})},sr.prototype.collectContainments=function(e){var t=this,n=this.element,i=[];return E(e,function(e){var r=n.get(e.name),o=e.isReference;if(e.isMany||(r=[r]),e.isBody)i.push({create:function(){return(new rr).build(e,r[0])}});else if(ri(e.type))E(r,function(n){i.push({create:function(){return new or(t.addTagName(t.nsPropertyTagName(e))).build(e,n)}})});else if(o)E(r,function(n){i.push({create:function(){return new ir(t.addTagName(t.nsPropertyTagName(e))).build(n)}})});else{var s=Ri(e);E(r,function(n){i.push({create:function(){return s?s===Ti?new sr(t,e):new ar(t,e,s):new sr(t)},element:n})})}}),i},sr.prototype.getNamespaces=function(e){var t=this.namespaces;if(!t){var n=this.getParentNamespaces();e||!n?this.namespaces=t=new Gi(n):t=n}return t},sr.prototype.getParentNamespaces=function(){if(void 0!==this.parentNamespaces)return this.parentNamespaces;for(var e=null,t=this.parent;t;){if(t.namespaces){e=t.namespaces;break}if(void 0!==t.parentNamespaces){e=t.parentNamespaces;break}t=t.parent}return this.parentNamespaces=e},sr.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},sr.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.getNamespaces(t),s=e.prefix,a=e.uri;if(!s&&!a)return{localName:e.localName};if(r=o.defaultUriByPrefix(s),!(a=a||r||o.uriByPrefix(s)))throw new Error("no namespace uri given for prefix <"+s+">");if((e=o.byUri(a))||s||(e=this.logNamespace({uri:a},r===a,!0)),!e){for(n=s,i=1;o.uriByPrefix(n);)n=s+"_"+i++;e=this.logNamespace({prefix:n,uri:a},r===a)}return s&&o.mapPrefix(s,a),e},sr.prototype.parseAttributes=function(e){var t=this,n=this.element;E(e,function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];E(i,function(e){r.push(e.id)}),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)})},sr.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),Ki(e)},sr.prototype.addAttribute=function(e,t){var n=this.attrs;v(t)&&(t=tr(t));var i=x(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)},sr.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:tr(e.uri)}})}(n).concat(t)),E(t,function(t){e.append(" ").append(Ki(t.name)).append('="').append(t.value).append('"')})},sr.prototype.serializeTo=function(e){!function(e,t){var n=[{serializer:e,index:0,opened:!1,indent:!1}];for(;n.length;){var i=n[n.length-1],r=i.serializer;if(!i.opened){var o=r.body[0];if(i.indent=o&&o.constructor!==rr,t.appendIndent().append("<"+r.tagName),r.serializeAttributes(t),t.append(o?">":" />"),i.opened=!0,!o){t.appendNewLine(),n.pop();continue}i.indent&&t.appendNewLine().indent()}if(i.index<r.body.length){var s=r.body[i.index++];s instanceof sr?n.push({serializer:s,index:0,opened:!1,indent:!1}):s.serializeTo(t)}else i.indent&&t.unindent().appendIndent(),t.append("</"+r.tagName+">").appendNewLine(),n.pop()}}(this,e)},Yi(ar,sr),ar.prototype.parseNsAttributes=function(e){var t=sr.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},ar.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},pr.prototype=Object.create(hi.prototype),pr.prototype.fromXML=function(e,t,n){v(t)||(n=t,t="bpmn:Definitions");var i=new Wi(q({model:this,lax:!0},n)),r=i.handler(t);return i.fromXML(e,r)},pr.prototype.toXML=function(e,t){var n=new ur(t);return new Promise(function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}})};const hr={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 dr(e,t){return new pr(q({},hr,e),t)}function fr(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function mr(e,t){return e.$instanceOf(t)}function gr(e){var t={},n=[],i={};function r(e,t){return function(n){e(n,t)}}function o(e){t[e.id]=e}function s(t,n){try{var r=i[t.id]&&function(t,n){if(t.gfx)throw new Error(`already rendered ${fr(t)}`);return e.element(t,i[t.id],n)}(t,n);return o(t),r}catch(e){a(e.message,{element:t,error:e}),console.error(`failed to import ${fr(t)}`,e)}}function a(t,n){e.error(t,n)}var l=this.registerDi=function(e){var t=e.bpmnElement;t?i[t.id]?a(`multiple DI elements defined for ${fr(t)}`,{element:t}):i[t.id]=e:a(`no bpmnElement referenced in ${fr(e)}`,{element:e})};function c(e){var t;t=e.plane,l(t),E(t.planeElement,u)}function u(e){l(e)}this.handleDefinitions=function(o,s){var u=o.diagrams;if(s&&-1===u.indexOf(s))throw new Error("diagram not part of <bpmn:Definitions />");if(!s&&u&&u.length&&(s=u[0]),!s)throw new Error("no diagram to display");i={},c(s);var f=s.plane;if(!f)throw new Error(`no plane for ${fr(s)}`);var m=f.bpmnElement;if(!m){if(m=function(e){return w(e.rootElements,function(e){return mr(e,"bpmn:Process")||mr(e,"bpmn:Collaboration")})}(o),!m)throw new Error("no process or collaboration to display");a(`correcting missing bpmnElement on ${fr(f)} to ${fr(m)}`),f.bpmnElement=m,l(f)}var g,v,b=function(t,n){return e.root(t,i[t.id],n)}(m,f);if(mr(m,"bpmn:Process")||mr(m,"bpmn:SubProcess"))h(m,b);else{if(!mr(m,"bpmn:Collaboration"))throw new Error(`unsupported bpmnElement for ${fr(f)}: ${fr(m)}`);v=b,E((g=m).participants,r(A,v)),n.push(function(){!function(e,t){E(e,r(d,t))}(g.messageFlows,v)}),y(g.artifacts,v),function(e,n){var i=_(e,function(e){return!t[e.id]&&mr(e,"bpmn:Process")&&e.laneSets});i.forEach(r(h,n))}(o.rootElements,b)}p(n)};var p=this.handleDeferred=function(){for(;n.length;)n.shift()()};function h(e,t){P(e,t),b(e.ioSpecification,t),y(e.artifacts,t),o(e)}function d(e,t){s(e,t)}function f(e,t){s(e,t)}function m(e,t){s(e,t)}function g(e,t){s(e,t)}function v(e,t){s(e,t)}function y(e,t){E(e,function(e){mr(e,"bpmn:Association")?n.push(function(){v(e,t)}):v(e,t)})}function b(e,t){e&&(E(e.dataInputs,r(m,t)),E(e.dataOutputs,r(g,t)))}var x=this.handleSubProcess=function(e,t){P(e,t),y(e.artifacts,t)};function S(e,t){var i=s(e,t);mr(e,"bpmn:SubProcess")&&x(e,i||t),mr(e,"bpmn:Activity")&&b(e.ioSpecification,t),n.push(function(){E(e.dataInputAssociations,r(f,t)),E(e.dataOutputAssociations,r(f,t))})}function k(e,t){s(e,t)}function O(e,t){n.push(function(){var n=s(e,t);e.childLaneSet&&C(e.childLaneSet,n||t),function(e){E(e.flowNodeRef,function(t){var n=t.get("lanes");n&&n.push(e)})}(e)})}function C(e,t){E(e.lanes,r(O,t))}function P(e,t){!function(e,t){E(e,function(e){mr(e,"bpmn:SequenceFlow")?n.push(function(){!function(e,t){s(e,t)}(e,t)}):mr(e,"bpmn:BoundaryEvent")?n.unshift(function(){S(e,t)}):mr(e,"bpmn:FlowNode")?S(e,t):mr(e,"bpmn:DataObject")||(mr(e,"bpmn:DataStoreReference")||mr(e,"bpmn:DataObjectReference")?k(e,t):a(`unrecognized flowElement ${fr(e)} in context ${fr(t&&t.businessObject)}`,{element:e,context:t}))})}(e.flowElements,t),e.laneSets&&function(e,t){E(e,r(C,t))}(e.laneSets,t)}function A(e,t){var n=s(e,t),i=e.processRef;i&&h(i,n||t)}}function vr(e,t){var n=br(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function yr(e,t){return C(t,function(t){return vr(e,t)})}function br(e){return e&&e.businessObject||e}function wr(e){return e&&e.di}function xr(e,t,n){var i,r,o,s=[];function a(e,t){var n=new gr({root:function(e,t){return i.add(e,t)},element:function(e,t,n){return i.add(e,t,n)},error:function(e,t){s.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;vr(i,"bpmn:Process")||vr(i,"bpmn:Collaboration")||(r=function(e){var t=e;for(;t;){if(vr(t,"bpmn:Process"))return t;t=t.$parent}}(i));n=vr(r,"bpmn:Collaboration")?r:w(e.rootElements,function(e){if(vr(e,"bpmn:Collaboration"))return w(e.participants,function(e){return e.processRef===r})});var o=[r];n&&(o=P(n.participants,function(e){return e.processRef})).push(n);var s=_r(o),a=[t],l=[i];return E(e.diagrams,function(e){if(e.plane){var t=e.plane.bpmnElement;-1!==s.indexOf(t)&&-1===l.indexOf(t)&&(a.push(e),l.push(t))}}),a}(e,t);if(!r)throw new Error("no diagram to display");E(r,function(t){n.handleDefinitions(e,t)});var a=t.plane.bpmnElement.id;o.setRootElement(o.findRoot(a+"_plane")||o.findRoot(a))}return new Promise(function(l,c){try{return i=e.get("bpmnImporter"),r=e.get("eventBus"),o=e.get("canvas"),r.fire("import.render.start",{definitions:t}),a(t,n),r.fire("import.render.complete",{error:void 0,warnings:s}),l({warnings:s})}catch(e){return e.warnings=s,c(e)}})}function _r(e){var t=[];return E(e,function(e){e&&(t.push(e),t=t.concat(_r(e.flowElements)))}),t}var Er,Sr='<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>',kr={verticalAlign:"middle"},Or={color:"#404040"},Cr={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},Pr={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},Ar={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"},Tr='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+Sr+'</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 Rr(){Er||(Z(Er=Y(Tr),Cr),Z(de("svg",Er),kr),Z(de(".backdrop",Er),Pr),Z(de(".notice",Er),Ar),Z(de(".link",Er),Or,{margin:"15px 20px 15px 10px",alignSelf:"center"}),pe.bind(Er,".backdrop","click",function(e){document.body.removeChild(Er)})),document.body.appendChild(Er)}const Mr="djs-outline-hidden";function $r(e){e=q({},Br,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),function(e){const t=Y('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Sr+"</a>");Z(de("svg",t),kr),Z(t,Or,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(t),ce.bind(t,"click",function(e){Rr(),e.preventDefault()})}(this._container)}function Dr(e,t){return e.warnings=t,e}e($r,Kn),$r.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 s=o.rootElement;const a=o.references,l=o.warnings,c=o.elementsById;i=i.concat(l),s=this._emit("import.parse.complete",(r={error:null,definitions:s,elementsById:c,references:a,warnings:i},n.get("eventBus").createEvent(r)))||s;const u=await this.importDefinitions(s,t);return i=i.concat(u.warnings),this._emit("import.done",{error:null,warnings:i}),{warnings:i}}catch(e){let t=e;throw i=i.concat(t.warnings||[]),Dr(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},$r.prototype.importDefinitions=async function(e,t){this._setDefinitions(e);return{warnings:(await this.open(t)).warnings}},$r.prototype.open=async function(e){const t=this._definitions;let n=e;if(!t){const e=new Error("no XML imported");throw Dr(e,[]),e}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return w(e.diagrams,function(e){return e.id===t})||null}(t,e),!n)){const t=new Error("BPMNDiagram <"+e+"> not found");throw Dr(t,[]),t}try{this.clear()}catch(e){throw Dr(e,[]),e}const{warnings:i}=await xr(this,t,n);return{warnings:i}},$r.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},$r.prototype.saveSVG=async function(){let e,t;this._emit("saveSVG.start");try{const t=this.get("canvas"),n=t.getActiveLayer(),i=de(":scope > defs",t._svg),r=Ne(n),o=i?"<defs>"+Ne(i)+"</defs>":"",s=t.getContainer();let a;te(s).add(Mr);try{a=n.getBBox()}finally{te(s).remove(Mr)}const l=a.x-5,c=a.y-5,u=a.width+10,p=a.height+10;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="'+u+'" height="'+p+'" viewBox="'+l+" "+c+" "+u+" "+p+'" 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}},$r.prototype._setDefinitions=function(e){this._definitions=e},$r.prototype.getModules=function(){return this._modules},$r.prototype.clear=function(){this.getDefinitions()&&Kn.prototype.clear.call(this)},$r.prototype.destroy=function(){Kn.prototype.destroy.call(this),me(this._container)},$r.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},$r.prototype.off=function(e,t){this.get("eventBus").off(e,t)},$r.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=de(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},$r.prototype.getDefinitions=function(){return this._definitions},$r.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},$r.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=q(X(n,["additionalModules"]),{canvas:q({},n.canvas,{container:e}),modules:o});Kn.call(this,s),n&&n.container&&this.attachTo(n.container)},$r.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},$r.prototype._createContainer=function(e){const t=Y('<div class="bjs-container bio-theme-parent"></div>');return Z(t,{width:Lr(e.width),height:Lr(e.height),position:e.position}),t},$r.prototype._createModdle=function(e){return new dr(q({},this._moddleExtensions,e.moddleExtensions))},$r.prototype._modules=[];const Br={width:"100%",height:"100%",position:"relative"};function Lr(e){return e+(m(e)?"px":"")}function Ir(e){$r.call(this,e),this.on("import.parse.complete",function(e){e.error||this._collectIds(e.definitions,e.elementsById)},this),this.on("diagram.destroy",function(){this.get("moddle").ids.clear()},this)}function Nr(e,t){return!vr(e,"bpmn:CallActivity")&&(vr(e,"bpmn:SubProcess")?!(!(t=t||wr(e))||!vr(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!vr(e,"bpmn:Participant")||!!br(e).processRef)}function zr(e){if(vr(e,"bpmn:Participant")||vr(e,"bpmn:Lane")){var t=wr(e).isHorizontal;return void 0===t||t}}function jr(e){return e&&!1!==br(e).isInterrupting}function Vr(e){return e&&!!br(e).triggeredByEvent}function Fr(e,t){return C(br(e).eventDefinitions,function(e){return vr(e,t)})}e(Ir,$r),Ir.prototype._createModdle=function(e){var t=$r.prototype._createModdle.call(this,e);return t.ids=new s([32,36,1]),t},Ir.prototype._collectIds=function(e,t){var n,i=e.$model.ids;for(n in i.clear(),t)i.claim(n,t[n])};var qr={width:90,height:20};function Hr(e){return vr(e,"bpmn:Event")||vr(e,"bpmn:Gateway")||vr(e,"bpmn:DataStoreReference")||vr(e,"bpmn:DataObjectReference")||vr(e,"bpmn:DataInput")||vr(e,"bpmn:DataOutput")||vr(e,"bpmn:SequenceFlow")||vr(e,"bpmn:MessageFlow")||vr(e,"bpmn:Group")}function Wr(e){return ln(e.label)}function Qr(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)),s=r.x,a=r.y;return Math.abs(o)<Math.PI/2?a-=15:s+=15,{x:s,y:a}}function Xr(e){return e.waypoints?Qr(e.waypoints):vr(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+qr.height/2}:{x:e.x+e.width/2,y:e.y+e.height+qr.height/2}}function Gr(e){return vr(e,"bpmn:FlowElement")||vr(e,"bpmn:Participant")||vr(e,"bpmn:Lane")||vr(e,"bpmn:SequenceFlow")||vr(e,"bpmn:MessageFlow")||vr(e,"bpmn:DataInput")||vr(e,"bpmn:DataOutput")?"name":vr(e,"bpmn:TextAnnotation")?"text":vr(e,"bpmn:Group")?"categoryValueRef":void 0}function Ur(e){var t=e.businessObject,n=Gr(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function Yr(e){let t=[];return E(e.incoming,e=>{vr(e,"bpmn:Association")&&vr(e.source,"bpmn:TextAnnotation")&&t.push({annotation:e.source,association:e})}),E(e.outgoing,e=>{vr(e,"bpmn:Association")&&vr(e.target,"bpmn:TextAnnotation")&&t.push({annotation:e.target,association:e})}),t}function Kr(e){const t=new Map;return E(ct(e),e=>{E(Yr(e),e=>{t.has(e.annotation)||t.set(e.annotation,{annotation:e.annotation,associations:[]}),t.get(e.annotation).associations.push(e.association)})}),[...t.values()]}var Zr="hsl(225, 10%, 15%)";function Jr(e,t){return C(e.eventDefinitions,function(e){return e.$type===t})}function eo(e,t,n){var i=wr(e);return n||i.get("color:background-color")||i.get("bioc:fill")||t||"white"}function to(e,t,n){var i=wr(e);return n||i.get("color:border-color")||i.get("bioc:stroke")||t||Zr}function no(e,t,n,i){var r=wr(e).get("label");return i||r&&r.get("color:color")||t||to(e,n)}function io(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2;return Je([["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"]])}function ro(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return Je([["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 oo(e,t={}){return{width:so(e,t),height:ao(e,t)}}function so(e,t={}){return b(t,"width")?t.width:e.width}function ao(e,t={}){return b(t,"height")?t.height:e.height}var lo=new s,co=.95;function uo(e,t,n,i,r,o,s){Ze.call(this,t,s);var a=e&&e.defaultFillColor,l=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor;function u(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Zr,strokeWidth:2,fill:"white"})}function p(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Zr,strokeWidth:2})}function h(e,t){var{ref:n={x:0,y:0},scale:i=1,element:o,parentGfx:s=r._svg}=t,a=Pe("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*i,markerHeight:20*i,orient:"auto"});ge(a,o);var l=de(":scope > defs",s);l||ge(s,l=Pe("defs")),ge(l,a)}function d(e,t,n,i){var r=lo.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){h(t,{element:Pe("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:Pe("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:Pe("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:Pe("path",{d:"M 11 5 L 1 10 L 11 15",...p({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:Pe("path",{d:"M 1 5 L 11 10 L 1 15",...p({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:Pe("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:Pe("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 m(e,t,n,i,r={}){f(i)&&(r=i,i=0),i=i||0,r=u(r);var o=Pe("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return ge(e,o),o}function g(e,t,n,i,r,o){f(r)&&(o=r,r=0),r=r||0,o=u(o);var s=Pe("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return ge(e,s),s}function v(e,t,n,i){var r=ot(t,n=p(n),i);return ge(e,r),r}function y(e,t,n){return v(e,t,n,5)}function b(e,t,n){n=p(n);var i=Pe("path",{...n,d:t});return ge(e,i),i}function w(e,t,n,i){return b(t,n,q({"data-marker":e},i))}function x(e){return Z[e]}function _(e){return function(t,n,i){return x(e)(t,n,i)}}var S=function(e,t,n={},r){return b(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?to(t,l,n.stroke):eo(t,a,n.fill),stroke:r?eo(t,a,n.fill):to(t,l,n.stroke),strokeWidth:1})},k=function(e,t,n={}){var r=n.width||t.width,o=n.height||t.height,s=n.width?1:2,c=m(e,r,o,.2*o,{fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:s});b(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:r,containerHeight:o,position:{mx:.5,my:.5}}),{stroke:to(t,l,n.stroke),strokeWidth:s});for(var u=0;u<12;u++){var p=r/2,h=o/2;b(e,i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:r,containerHeight:o,position:{mx:.5,my:.5}}),{strokeWidth:1,stroke:to(t,l,n.stroke),transform:"rotate("+30*u+","+h+","+p+")"})}return c},O=function(e,t,n={},r){return b(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?to(t,l,n.stroke):eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1})},C=function(e,t,n={}){return b(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:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1})},P=function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?to(t,l,n.stroke):eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1})},A=function(e,t,n={},r){return b(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?to(t,l,n.stroke):eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1})},T=function(e,t,n={},r){var o=b(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?to(t,l,n.stroke):"none",stroke:to(t,l,n.stroke),strokeWidth:1});return Xn(o,45),o},R=function(e,t,n={},r){return b(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?to(t,l,n.stroke):eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1})},M=function(e,t,n={},r){return b(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?to(t,l,n.stroke):eo(t,a,n.fill),stroke:to(t,l,n.stroke)})},$=function(e,t,n={},r){return b(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?to(t,l,n.stroke):eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1})},D=function(e,t,n={}){return b(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:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1})},B=function(e,t,n={}){return m(e,t.width,t.height,8,{fill:to(t,l,n.stroke),stroke:to(t,l,n.stroke),strokeWidth:4})};function L(e,t,n={},i){var r=br(e),o=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(r),s=i||e;return r.get("eventDefinitions")&&r.get("eventDefinitions").length>1?r.get("parallelMultiple")?D(t,s,n):$(t,s,n,o):Jr(r,"bpmn:MessageEventDefinition")?S(t,s,n,o):Jr(r,"bpmn:TimerEventDefinition")?k(t,s,n):Jr(r,"bpmn:ConditionalEventDefinition")?C(t,s,n):Jr(r,"bpmn:SignalEventDefinition")?M(t,s,n,o):Jr(r,"bpmn:EscalationEventDefinition")?O(t,s,n,o):Jr(r,"bpmn:LinkEventDefinition")?P(t,s,n,o):Jr(r,"bpmn:ErrorEventDefinition")?A(t,s,n,o):Jr(r,"bpmn:CancelEventDefinition")?T(t,s,n,o):Jr(r,"bpmn:CompensateEventDefinition")?R(t,s,n,o):Jr(r,"bpmn:TerminateEventDefinition")?B(t,s,n):null}var I={ParticipantMultiplicityMarker:function(e,t,n={}){var r=so(t,n),o=ao(t,n);w("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:eo(t,a,n.fill),stroke:to(t,l,n.stroke)})},SubProcessMarker:function(e,t,n={}){Qn(g(e,14,14,0,{strokeWidth:1,fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke)}),t.width/2-7.5,t.height-20),w("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:eo(t,a,n.fill),stroke:to(t,l,n.stroke)})},ParallelMarker:function(e,t,n){var r=so(t,n),o=ao(t,n);w("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:eo(t,a,n.fill),stroke:to(t,l,n.stroke)})},SequentialMarker:function(e,t,n){w("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:eo(t,a,n.fill),stroke:to(t,l,n.stroke)})},CompensationMarker:function(e,t,n){w("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:eo(t,a,n.fill),stroke:to(t,l,n.stroke)})},LoopMarker:function(e,t,n){var r=so(t,n),o=ao(t,n);w("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:to(t,l,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=so(t,n),o=ao(t,n);w("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:to(t,l,n.stroke),stroke:to(t,l,n.stroke)})}};function N(e,t,n,i){I[e](t,n,i)}function z(e,t,n=[],i={}){i={fill:i.fill,stroke:i.stroke,width:so(t,i),height:ao(t,i)};var r=br(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"),vr(r,"bpmn:AdHocSubProcess")&&(n.push("AdhocMarker"),o||q(i,{compensation:i.compensation-18}));var s=r.get("loopCharacteristics"),a=s&&s.get("isSequential");s&&(q(i,{compensation:i.compensation-18}),n.includes("AdhocMarker")&&q(i,{seq:-23,loop:-18,parallel:-24}),void 0===a&&n.push("LoopMarker"),!1===a&&n.push("ParallelMarker"),!0===a&&n.push("SequentialMarker")),n.includes("CompensationMarker")&&1===n.length&&q(i,{compensation:-8}),E(n,function(n){N(n,e,t,i)})}function j(e,t,n={}){n=q({size:{width:100}},n);var i=o.createText(t||"",n);return xe(i).add("djs-label"),ge(e,i),i}function V(e,t,n,i={}){var r=br(t),o=oo({x:t.x,y:t.y,width:t.width,height:t.height},i);return j(e,r.name,{align:n,box:o,padding:7,style:{fill:no(t,c,l,i.stroke)}})}function F(e,t,n,i={}){var r=zr(n),o=j(e,t,{box:{height:30,width:r?ao(n,i):so(n,i)},align:"center-middle",style:{fill:no(n,c,l,i.stroke)}});r&&Wn(o,0,-(-1*ao(n,i)),270)}function H(e,t,n={}){var{width:i,height:r}=oo(t,n);return g(e,i,r,10,{...n,fill:eo(t,a,n.fill),fillOpacity:co,stroke:to(t,l,n.stroke)})}function W(e,t,n={}){var i=br(t),r=eo(t,a,n.fill),o=to(t,l,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=po(n,["markerStart","markerEnd"]),y(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function Q(e,t,n={}){var r=eo(t,a,n.fill),o=to(t,l,n.stroke),s=b(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:co,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(br(t))&&b(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 s}function X(e,t,n={}){return m(e,t.width,t.height,{fillOpacity:co,...n,fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke)})}function G(e,t,n={}){return function(e,t,n,i){var r=t/2,o=n/2,s=[{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 a=Pe("polygon",{...i,points:s});return ge(e,a),a}(e,t.width,t.height,{fill:eo(t,a,n.fill),fillOpacity:co,stroke:to(t,l,n.stroke)})}function U(e,t,n={}){var i=g(e,so(t,n),ao(t,n),0,{fill:eo(t,a,n.fill),fillOpacity:n.fillOpacity||co,stroke:to(t,l,n.stroke),strokeWidth:1.5}),r=br(t);vr(r,"bpmn:Lane")&&F(e,r.get("name"),t,n);return i}function Y(e,t,n={}){var i=H(e,t,n),r=Nr(t);if(Vr(t)&&(be(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!r)){var o=(br(t).flowElements||[]).filter(e=>vr(e,"bpmn:StartEvent"));1===o.length&&function(e,t,n,i){var r=22,o={fill:eo(i,a,n.fill),stroke:to(i,l,n.stroke),width:r,height:r},s=br(e).isInterrupting,c=s?0:3,u=s?1:1.2,p=20,h=(r-p)/2,d="translate("+h+","+h+")";m(t,p,p,{fill:o.fill,stroke:o.stroke,strokeWidth:u,strokeDasharray:c,transform:d}),L(e,t,o,i)}(o[0],e,n,t)}return V(e,t,r?"center-top":"center-middle",n),z(e,t,r?void 0:["SubProcessMarker"],n),i}function K(e,t,n={}){var i=H(e,t,n);return V(e,t,"center-middle",n),z(e,t,void 0,n),i}var Z=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return Y(e,t,n=Nr(t)?po(n,["fill","stroke","width","height"]):po(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return W(e,t,n=po(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=po(n,["fill","stroke"]);var r=br(t).get("cancelActivity");n={strokeWidth:1.5,fill:eo(t,a,n.fill),fillOpacity:1,stroke:to(t,l,n.stroke)},r||(n.strokeDasharray="6");var o=X(e,t,n);return m(e,t.width,t.height,3,{...n,fill:"none"}),i&&L(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=K(e,t,n=po(n,["fill","stroke"]));return be(b(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1}),be(b(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:to(t,l,n.stroke),stroke:to(t,l,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=po(n,["fill","stroke"]),Y(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=G(e,t,n=po(n,["fill","stroke"]));return b(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:to(t,l,n.stroke),stroke:to(t,l,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=po(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=Q(e,t,n);return b(e,r,{fill:"none",stroke:to(t,l,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=po(n,["fill","stroke"]),W(e,t,{...n,markerEnd:d(e,"association-end",eo(t,a,n.fill),to(t,l,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return Q(e,t,n=po(n,["fill","stroke"]))},"bpmn:DataObjectReference":_("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=po(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=Q(e,t,n);return b(e,r,{strokeWidth:1,fill:to(t,l,n.stroke),stroke:to(t,l,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=po(n,["fill","stroke"]),W(e,t,{...n,markerEnd:d(e,"association-end",eo(t,a,n.fill),to(t,l,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=po(n,["fill","stroke"]),b(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:eo(t,a,n.fill),fillOpacity:co,stroke:to(t,l,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=po(n,["fill","stroke"]);var r=X(e,t,{...n,strokeWidth:4});return i&&L(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=po(n,["fill","stroke"]);var r=br(t),o=G(e,t,n);m(e,t.width,t.height,.2*t.height,{fill:eo(t,"none",n.fill),stroke:to(t,l,n.stroke),strokeWidth:1});var s=r.get("eventGatewayType"),a=!!r.get("instantiate");if("Parallel"===s){var c=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});b(e,c,{fill:"none",stroke:to(t,l,n.stroke),strokeWidth:1})}else"Exclusive"===s&&(a||m(e,t.width,t.height,.26*t.height,{fill:"none",stroke:to(t,l,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}});b(e,r,{fill:"none",stroke:to(t,l,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=G(e,t,n=po(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return wr(t).get("isMarkerVisible")&&b(e,o,{fill:to(t,l,n.stroke),stroke:to(t,l,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return G(e,t,n=po(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=po(n,["fill","stroke","width","height"]),g(e,t.width,t.height,10,{stroke:to(t,l,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:so(t,n),height:ao(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=G(e,t,n=po(n,["fill","stroke"]));return m(e,t.width,t.height,.24*t.height,{fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=po(n,["fill","stroke"]);var r=X(e,t,{...n,strokeWidth:1.5});return m(e,t.width,t.height,3,{fill:"none",stroke:to(t,l,n.stroke),strokeWidth:1.5}),i&&L(t,e,n),r},"bpmn:IntermediateCatchEvent":_("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":_("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=po(n,["fill","stroke","width","height"]),U(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=K(e,t,n=po(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=po(n,["fill","stroke"]);var r=br(t),s=wr(t),c=eo(t,a,n.fill),u=to(t,l,n.stroke),p=y(e,t.waypoints,{markerEnd:d(e,"messageflow-end",c,u),markerStart:d(e,"messageflow-start",c,u),stroke:u,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var h=p.getPointAtLength(p.getTotalLength()/2),f=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:h.x,y:h.y}}),m={strokeWidth:1};"initiating"===s.get("messageVisibleKind")?(m.fill=c,m.stroke=u):(m.fill=u,m.stroke=c),b(e,f,m);var g=r.get("messageRef").get("name")||"",v={align:"center-top",fitBox:!0,style:{fill:u}},w=j(e,g,v),x=o.getDimensions(g,v).width;Wn(w,h.x-x/2,h.y+7+10,0)}return p},"bpmn:ParallelGateway":function(e,t,n={}){var r=G(e,t,n=po(n,["fill","stroke"]));return b(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:to(t,l,n.stroke),stroke:to(t,l,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=U(e,t,n=po(n,["fill","stroke","width","height"])),r=Nr(t),o=zr(t),s=br(t),a=s.get("name");if(r){v(e,o?[{x:30,y:0},{x:30,y:ao(t,n)}]:[{x:0,y:30},{x:so(t,n),y:30}],{stroke:to(t,l,n.stroke),strokeWidth:1.5}),F(e,a,t,n)}else{var u=oo(t,n);o||(u.height=so(t,n),u.width=ao(t,n));var p=j(e,a,{box:u,align:"center-middle",style:{fill:no(t,c,l,n.stroke)}});if(!o)Wn(p,0,-(-1*ao(t,n)),270)}return s.get("participantMultiplicity")&&N("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=po(n,["fill","stroke"]);var r,o=br(t),s=K(e,t,n);return o.get("instantiate")?(m(e,28,28,4.4,{fill:eo(t,a,n.fill),stroke:to(t,l,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}}),b(e,r,{fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1}),s},"bpmn:ScriptTask":function(e,t,n={}){var r=K(e,t,n=po(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=K(e,t,n=po(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:to(t,l,n.stroke),stroke:eo(t,a,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=po(n,["fill","stroke"]);var i=eo(t,a,n.fill),r=to(t,l,n.stroke),o=y(e,t.waypoints,{markerEnd:d(e,"sequenceflow-end",i,r),stroke:r}),s=br(t),{source:c}=t;if(c){var u=br(c);s.get("conditionExpression")&&vr(u,"bpmn:Activity")&&be(o,{markerStart:d(e,"conditional-flow-marker",i,r)}),u.get("default")&&(vr(u,"bpmn:Gateway")||vr(u,"bpmn:Activity"))&&u.get("default")===s&&be(o,{markerStart:d(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=K(e,t,n=po(n,["fill","stroke"]));return m(e,10,10,{fill:eo(t,a,n.fill),stroke:"none",transform:"translate(6, 6)"}),b(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1}),m(e,10,10,{fill:eo(t,a,n.fill),stroke:"none",transform:"translate(11, 10)"}),b(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=po(n,["fill","stroke"]),br(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=X(e,t,n);return i&&L(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return Y(e,t,n=Nr(t)?po(n,["fill","stroke","width","height"]):po(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return K(e,t,n=po(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=po(n,["fill","stroke"]);var{width:r,height:o}=oo(t,n),s=g(e,r,o,0,0,{fill:"none",stroke:"none"});return b(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:to(t,l,n.stroke)}),j(e,br(t).get("text")||"",{align:"left-top",box:oo(t,n),padding:7,style:{fill:no(t,c,l,n.stroke)}}),s},"bpmn:Transaction":function(e,t,i={}){i=Nr(t)?po(i,["fill","stroke","width","height"]):po(i,["fill","stroke"]);var r=Y(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:to(t,l,i.stroke),strokeWidth:1.5});return Nr(t)||(i={}),g(e,so(t,i),ao(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=K(e,t,n=po(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:.5}),b(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:eo(t,a,n.fill),stroke:to(t,l,n.stroke),strokeWidth:.5}),b(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:to(t,l,n.stroke),stroke:to(t,l,n.stroke),strokeWidth:.5}),r},label:function(e,t,n={}){return function(e,t,n={}){var i={width:t.width,height:t.height,x:t.width/2+t.x,y:t.height/2+t.y};return j(e,Ur(t),{box:i,style:q({},o.getExternalStyle(),{fill:no(t,c,l,n.stroke)})})}(e,t,n)}};this._drawPath=b,this._renderer=x}function po(e,t=[]){return t.reduce((t,n)=>(e[n]&&(t[n]=e[n]),t),{})}e(uo,Ze),uo.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],uo.prototype.canRender=function(e){return vr(e,"bpmn:BaseElement")},uo.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},uo.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},uo.prototype.getShapePath=function(e){return ln(e)?ro(e,4):vr(e,"bpmn:Event")?io(e):vr(e,"bpmn:Activity")?ro(e,10):vr(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return Je([["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 Je([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e)};var ho={width:150,height:50};var fo=null;function mo(e){if(null!=e)return"number"==typeof e||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function go(e,t){var n=(fo||(fo=document.createElement("canvas").getContext("2d")),fo);if(!n)return{width:0,height:0};n.font=function(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(mo(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}(t),"letterSpacing"in n&&(n.letterSpacing=mo(t.letterSpacing)||"0px");var i=""===e,r=i?"dummy":e.trimEnd(),o=n.measureText(r);return{width:i?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function vo(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=go(o,n)).width=o?i.width:0," "===o||""===o||i.width<=t||o.length<2)return yo(e,o,r,i);o=wo(o,i.width,t)}}function yo(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 bo="";function wo(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!==bo||r.pop();break}r.push(n),o+=n.length}var s=r[r.length-1];return s&&s===bo&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function xo(e){this._config=q({},{size:ho,padding:0,style:{},align:"center-top"},e||{})}xo.prototype.createText=function(e,t){return this.layoutText(e,t).element},xo.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},xo.prototype.layoutText=function(e,t){for(var n=q({},this._config.size,t.box),i=q({},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 f(e)?q({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),s=t.fitBox||!1,a=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),l=e.split(/\u00AD?\r?\n/),c=[],u=n.width-o.left-o.right;l.length;)c.push(vo(l,u,i));"middle"===r.vertical&&(o.top=o.bottom=0);var p=k(c,function(e,t,n){return e+(a||t.height)},0)+o.top+o.bottom,h=k(c,function(e,t,n){return t.width>e?t.width:e},0),d=o.top;"middle"===r.vertical&&(d+=(n.height-p)/2),d-=(a||c[0].height)/4;var m=Pe("text");return be(m,i),E(c,function(e){var t;switch(d+=a||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(s?h:u)-o.right-e.width;break;default:t=Math.max(((s?h:u)-e.width)/2+o.left,0)}var n=Pe("tspan");be(n,{x:t,y:d}),n.textContent=e.text,ge(m,n)}),{dimensions:{width:h,height:p},element:m}};function _o(e){var t=q({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=q({},t,{fontSize:n},e&&e.externalStyle||{}),r=new xo({style:t});function o(e,t,n){return r.getDimensions(e,q({box:t},n))}this.getExternalLabelBounds=function(e,t){var n=o(t,{width:Math.max(e.width,qr.width),height:30},{style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:e.y,width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=o(n,e,{style:t,align:"left-top",padding:7});return{x:e.x,y:e.y,width:e.width,height:Math.max(40,Math.round(i.height))}},this.getDimensions=function(e,t){return r.getDimensions(e,t||{})},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}_o.$inject=["config.textRenderer"];var Eo=/\{([^{}]+)\}/g,So=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var ko={__init__:["bpmnRenderer"],bpmnRenderer:["type",uo],textRenderer:["type",_o],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 s=t.containerHeight/r.height*t.yScaleFactor,a=t.containerWidth/r.width*t.xScaleFactor,l=0;l<r.heightElements.length;l++)o["y"+l]=r.heightElements[l]*s;for(var c=0;c<r.widthElements.length;c++)o["x"+c]=r.widthElements[c]*a}var u,p,h=(u=r.d,p={mx:n,my:i,e:o},String(u).replace(Eo,function(e,t){return function(e,t,n){var i=n;return t.replace(So,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,p)}));return h}}]};var Oo={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(e,n){return t[n]||"{"+n+"}"})}]};function Co(e,t,n){return q({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Po(e,t,n){var i=e.waypoint;return!i||i.length<2?[fn(t),fn(n)]:i.map(function(e){return{x:e.x,y:e.y}})}function Ao(e,t,n){return new Error(`element ${fr(t)} referenced by ${fr(e)}#${n} not yet drawn`)}function To(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}To.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],To.prototype.add=function(e,t,n){var i,r,o;if(vr(t,"bpmndi:BPMNPlane")){var s=vr(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(Co(e,t,s)),this._canvas.addRootElement(i)}else if(vr(t,"bpmndi:BPMNShape")){var a=!Nr(e,t),l=function(e){return vr(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var c=t.bounds;i=this._elementFactory.createShape(Co(e,t,{collapsed:a,hidden:r,x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),isFrame:l})),vr(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),vr(e,"bpmn:Lane")&&(o=0),vr(e,"bpmn:DataStoreReference")&&(function(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}(n,fn(c))||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!vr(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${fr(t)} for element ${fr(e)}`);var u=this._getSource(e),p=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(Co(e,t,{hidden:r,source:u,target:p,waypoints:Po(t,u,p)})),vr(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return Hr(e)&&Ur(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},To.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${fr(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw Ao(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},To.prototype.addLabel=function(e,t,n){var i,r,o;if(i=function(e,t){var n,i,r,o=e.label;return o&&o.bounds?(i={width:(r=o.bounds).width,height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=Xr(t),i=qr),q({x:n.x-i.width/2,y:n.y-i.height/2},i)}(t,n),(r=Ur(n))&&t.label&&t.label.bounds&&i.width>0){var s=this._textRenderer.getDimensions(r,{box:i,style:this._textRenderer.getExternalStyle()});i=q({},i,{height:Math.ceil(s.height)})}else r&&(i=this._textRenderer.getExternalLabelBounds(i,r));return o=this._elementFactory.createLabel(Co(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Ur(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)},To.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?Ao(e,i,t+"Ref"):new Error(`${fr(e)}#${t} Ref not specified`)},To.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},To.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},To.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var Ro={__depends__:[ko,{__depends__:[Oo],bpmnImporter:["type",To]}]};function Mo(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}Mo.prototype.next=function(){return this._prefix+ ++this._counter};var $o=new Mo("ov");function Do(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=$o,this._overlayDefaults=q({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),Z(o=Y('<div class="djs-overlay-container" />'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function Bo(e,t,n){Z(e,{left:t+"px",top:n+"px"})}function Lo(e,t){e.style.display=!1===t?"none":""}function Io(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}Do.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Do.prototype.get=function(e){if(v(e)&&(e={id:e}),v(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?_(t.overlays,L({type:e.type})):t.overlays.slice():[]}return e.type?_(this._overlays,L({type:e.type})):e.id?this._overlays[e.id]:null},Do.prototype.add=function(e,t,n){if(f(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=q({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},Do.prototype.remove=function(e){var t=this.get(e)||[];d(t)||(t=[t]);var n=this;E(t,function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(me(e.html),me(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)}})},Do.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},Do.prototype.show=function(){Lo(this._overlayRoot)},Do.prototype.hide=function(){Lo(this._overlayRoot,!1)},Do.prototype.clear=function(){this._overlays={},this._overlayContainers=[],ie(this._overlayRoot)},Do.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=ht(t);i=o.x,r=o.y}Bo(n,i,r),J(e.html,"data-container-id",t.id)},Do.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,s=i.left,a=i.top;void 0!==i.right&&(t=o.waypoints?ht(o).width:o.width,s=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?ht(o).height:o.height,a=-1*i.bottom+n);Bo(r,s||0,a||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Do.prototype._createOverlayContainer=function(e){var t=Y('<div class="djs-overlays" />');Z(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Do.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Io(this._overlayRoot,n)},Do.prototype._getOverlayContainer=function(e,t){var n=w(this._overlayContainers,function(t){return t.element===e});return n||t?n:this._createOverlayContainer(e)},Do.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)),v(o)&&(o=Y(o)),n=this._getOverlayContainer(r),Z(t=Y('<div class="djs-overlay" data-overlay-id="'+i+'">'),{position:"absolute"}),t.appendChild(o),e.type&&te(t).add("djs-overlay-"+e.type),Lo(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())},Do.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),r=n&&n.minZoom,o=n&&n.maxZoom,s=e.htmlContainer,a=!0;(i!==this._canvas.getRootElement()||n&&(p(r)&&r>t.scale||p(o)&&o<t.scale))&&(a=!1),Lo(s,a),this._updateOverlayScale(e,t)},Do.prototype._updateOverlayScale=function(e,t){var n,i,r,o=e.scale,s=e.htmlContainer,a="";!0!==o&&(!1===o?(n=1,i=1):(n=o.min,i=o.max),p(n)&&t.scale<n&&(r=(1/t.scale||1)*n),p(i)&&t.scale>i&&(r=(1/t.scale||1)*i)),p(r)&&(a="scale("+r+","+r+")"),Io(s,a)},Do.prototype._updateOverlaysVisibilty=function(e){var t=this;E(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},Do.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;E(t.get({element:n}),function(e){t.remove(e.id)});var i=t._getOverlayContainer(n);if(i){me(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&&(E(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&&te(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 No={__init__:["overlays"],overlays:["type",Do]};function zo(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(ft(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)})}zo.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var jo={__init__:["changeSupport"],changeSupport:["type",zo]};function Vo(e){this._eventBus=e}function Fo(e){return function(t,n,i,r,o){(g(t)||m(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function qo(e,t){t.invoke(Vo,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)})}Vo.$inject=["eventBus"],Vo.prototype.on=function(e,t,n,i,r,o){if((g(t)||m(t))&&(o=r,r=i,i=n,n=t,t=null),g(n)&&(o=r,r=i,i=n,n=1e3),f(r)&&(o=r,r=!1),!g(i))throw new Error("handlerFn must be a function");d(e)||(e=[e]);var s=this._eventBus;E(e,function(e){var a=["commandStack",e,t].filter(function(e){return e}).join(".");s.on(a,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)})},Vo.prototype.canExecute=Fo("canExecute"),Vo.prototype.preExecute=Fo("preExecute"),Vo.prototype.preExecuted=Fo("preExecuted"),Vo.prototype.execute=Fo("execute"),Vo.prototype.executed=Fo("executed"),Vo.prototype.postExecute=Fo("postExecute"),Vo.prototype.postExecuted=Fo("postExecuted"),Vo.prototype.revert=Fo("revert"),Vo.prototype.reverted=Fo("reverted"),e(qo,Vo),qo.$inject=["canvas","injector"];var Ho={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",qo]};function Wo(e){return CSS.escape(e)}var Qo={"&":"&","<":"<",">":">",'"':""","'":"'"};function Xo(e){return(e=""+e)&&e.replace(/[&<>"']/g,function(e){return Qo[e]})}var Go="_plane";function Uo(e){return function(e){return e.replace(new RegExp(Go+"$"),"")}(e.id)}function Yo(e){var t=e.id;return vr(e,"bpmn:SubProcess")?Jo(t):t}function Ko(e){return Jo(e)}function Zo(e){return vr(wr(e),"bpmndi:BPMNPlane")}function Jo(e){return e+Go}function es(e,t,n){var i=Y('<ul class="bjs-breadcrumbs"></ul>'),r=n.getContainer(),o=te(r);r.appendChild(i);var s=[];function a(e){e&&(s=function(e){for(var t=br(e),n=[],i=t;i;i=i.$parent)(vr(i,"bpmn:SubProcess")||vr(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=s.flatMap(function(e){var i=n.findRoot(Yo(e))||n.findRoot(e.id);if(!i&&vr(e,"bpmn:Process")){var r=t.find(function(t){var n=br(t);return n&&n.get("processRef")===e});i=r&&n.findRoot(r.id)}return i?[{parent:e,parentPlane:i}]:[]});i.innerHTML="";var a=r.length>1;o.toggle("bjs-breadcrumbs-shown",a),r.forEach(function(e,t){var o,s=e.parent,a=e.parentPlane,l=Xo(s.name||s.id);t===r.length-1?o=Y('<li><span class="bjs-crumb" title="'+l+'">'+l+"</span></li>"):(o=Y('<li><a class="bjs-crumb" href="'+("#"+Xo(s.id))+'" title="'+l+'">'+l+"</a></li>")).addEventListener("click",function(e){e.preventDefault(),n.setRootElement(a)});i.appendChild(o)})}e.on("element.changed",function(e){var t=br(e.element);w(s,function(e){return e===t})&&a()}),e.on("root.set",function(e){a(e.element)})}function ts(e,t){var n=null,i=new ns;e.on("root.set",function(e){var r=e.element,o=t.viewbox(),s=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,vr(r,"bpmn:SubProcess")||s){s=s||{x:0,y:0,zoom:1};var a=(o.x-s.x)*o.scale,l=(o.y-s.y)*o.scale;0===a&&0===l||t.scroll({dx:a,dy:l}),s.zoom!==o.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){i.clear(),n=null})}function ns(){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)}}es.$inject=["eventBus","elementRegistry","canvas"],ts.$inject=["eventBus","canvas"];var is=180,rs=160;function os(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 ss(e){return vr(e,"bpmndi:BPMNDiagram")?e:ss(e.$parent)}os.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)})}},os.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;vr(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!vr(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(yr(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},os.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=pn(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}}),hn(t)}(e),i=n.x-is,r=n.y-rs;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)})},os.prototype._moveToDiPlane=function(e,t){var n=ss(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},os.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},os.$inject=["eventBus","moddle"];var as=250;function ls(e,t,n,i,r){Vo.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",as,function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)},!0),this.reverted("shape.toggleCollapse",as,function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)},!0),this.executed(["shape.create","shape.move","shape.delete"],as,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"],as,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(ls,Vo),ls.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},ls.prototype._canDrillDown=function(e){var t=this._canvas;return vr(e,"bpmn:SubProcess")&&t.findRoot(Yo(e))},ls.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=br(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;te(i.html).toggle("bjs-drilldown-empty",!r)}},ls.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,i=br(e);n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=Y('<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"),s=this._translate("Open {element}",{element:o});r.setAttribute("title",s),r.addEventListener("click",function(){t.setRootElement(t.findRoot(Yo(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},ls.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},ls.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var cs={__depends__:[No,jo,Ho],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",es],drilldownCentering:["type",ts],drilldownOverlayBehavior:["type",ls],subprocessCompatibility:["type",os]};function us(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function ps(e){return e.originalEvent||e.srcEvent}function hs(e){us(e),us(ps(e))}function ds(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function fs(){return/mac/i.test(navigator.platform)}function ms(e,t){return(ps(e)||e).button===t}function gs(e){return ms(e,0)}function vs(e){var t=ps(e)||e;return!!gs(e)&&(fs()?t.metaKey:t.ctrlKey)}function ys(e){var t=ps(e)||e;return gs(e)&&t.shiftKey}function bs(e){return!0}function ws(e){return gs(e)||function(e){return ms(e,1)}(e)}function xs(e,t,n){var i=this;function r(n,i,r){var o,s;(function(e,t){var n=l[e]||gs;return!n(t)})(n,i)||(r?s=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(s=o,r=t.get(s)),s&&r&&!1===e.fire(n,{element:r,gfx:s,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function s(e){return o[e]}var a={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":bs,"element.mousedown":ws,"element.mouseup":ws,"element.click":ws,"element.dblclick":ws};function c(e,t,n,i){var s=o[n]=function(e){r(n,e)};i&&(l[n]=i),s.$delegate=pe.bind(e,"svg, .djs-element",t,s)}function u(e,t,n){var i=s(n);i&&pe.unbind(e,t,i.$delegate)}e.on("canvas.destroy",function(e){!function(e){E(a,function(t,n){u(e,n,t)})}(e.svg)}),e.on("canvas.init",function(e){!function(e){E(a,function(t,n){c(e,n,t)})}(e.svg)}),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 p=f("djs-hit djs-hit-stroke"),h=f("djs-hit djs-hit-click-stroke"),d={all:f("djs-hit djs-hit-all"),"click-stroke":h,stroke:p,"no-move":f("djs-hit djs-hit-no-move")};function f(e,t){return t=q({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function m(e,t){var n=d[t];if(!n)throw new Error("invalid hit type <"+t+">");return be(e,n),e}function g(e,t){ge(e,t)}this.removeHits=function(e){E(fe(".djs-hit",e),ze)},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=ot(t);return m(n,"stroke"),g(e,n),n},this.createBoxHit=function(e,t,n){n=q({x:0,y:0},n);var i=Pe("rect");return m(i,t),be(i,n),g(e,i),i},this.updateDefaultHit=function(e,t){var n=de(".djs-hit",t);if(n)return e.waypoints?st(n,e.waypoints):be(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=a[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=s,this.registerEvent=c,this.unregisterEvent=u}xs.$inject=["eventBus","elementRegistry","styles"];var _s={__init__:["interactionEvents"],interactionEvents:["type",xs]};function Es(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=new Set;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)})}Es.$inject=["eventBus","canvas"],Es.prototype.deselect=function(e){if(this._selectedElements.has(e)){var t=this.get();this._selectedElements.delete(e),this._eventBus.fire("selection.changed",{oldSelection:t,newSelection:this.get()})}},Es.prototype.get=function(){return Array.from(this._selectedElements)},Es.prototype.isSelected=function(e){return this._selectedElements.has(e)},Es.prototype.select=function(e,t){var n=this.get();d(e)||(e=e?[e]:[]);var i=this._canvas,r=i.getRootElement();e=e.filter(function(e){var t=i.findRoot(e);return r===t}),t?E(e,e=>{this._selectedElements.add(e)}):this._selectedElements=new Set(e),this._eventBus.fire("selection.changed",{oldSelection:n,newSelection:this.get()})};var Ss="hover",ks="selected";function Os(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,Ss)}),t.on("element.out",function(e){i(e.element,Ss)}),t.on("selection.changed",function(e){function t(e){i(e,ks)}function r(e){n(e,ks)}var o=new Set(e.oldSelection),s=new Set(e.newSelection);for(let e of o)s.has(e)||t(e);for(let e of s)o.has(e)||r(e)})}function Cs(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;d(o)?t.select(o):t.select(r.filter(Ps))}}),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);w(n,function(e){return r.id===e.id})||t.select(r)}),e.on("element.click",function(e){if(gs(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,s=ys(e);if(r&&o)return s?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,s)}})}function Ps(e){return!e.hidden}Os.$inject=["canvas","eventBus"],Cs.$inject=["eventBus","selection","canvas","elementRegistry"];var As={__init__:["selectionVisuals","selectionBehavior"],__depends__:[_s],selection:["type",Es],selectionVisuals:["type",Os],selectionBehavior:["type",Cs]};function Ts(e){$r.call(this,e)}e(Ts,$r),Ts.prototype._modules=[Ro,cs,No,As,Oo],Ts.prototype._moddleExtensions={};function Rs(e,t,n){this._selectionWasVisible=!1;const i=V(()=>{this._selectionWasVisible=r()},300);function r(){var e=n.get();if(!e.length)return!1;var i=ht(e),r=t.viewbox(),o=pn(i),s=pn(r);return o.left>=s.left&&o.right<=s.right&&o.top>=s.top&&o.bottom<=s.bottom}e.on("canvas.viewbox.changed",i),e.on("selection.changed",i),e.on("diagram.destroy",()=>{i.cancel()}),e.on("canvas.resized",()=>{var e=n.get();if(e.length&&this._selectionWasVisible&&!r()){var i=t.getRootElement();t.scrollToElement(e.concat(i))}}),this._flush=i.flush}Rs.$inject=["eventBus","canvas","selection"];var Ms={__init__:["keepSelectionVisible"],__depends__:[As],keepSelectionVisible:["type",Rs]},$s=["c","C"],Ds=["v","V"],Bs=["d","D"],Ls=["x","X"],Is=["y","Y"],Ns=["z","Z"];function zs(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function js(e,t){return-1!==(e=d(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)||-1!==e.indexOf(function(e){var t=e.key,n=/^Key([A-Z])$/.exec(e.code||"");if(!n||"string"!=typeof t)return null;var i=n[1];if(Vs.test(t))return e.shiftKey?i:i.toLowerCase();if(e.shiftKey&&Fs.test(t)&&e.keyCode===i.charCodeAt(0))return i;return null}(t))}var Vs=/^(?!\p{Script_Extensions=Latin}|\p{Script=Common})\p{Letter}$/u,Fs=/^\P{Letter}$/u;function qs(e){return e.shiftKey}function Hs(e){return zs(e)&&!qs(e)&&js(Ns,e)}function Ws(e){return zs(e)&&(js(Is,e)||js(Ns,e)&&qs(e))}var Qs="keyboard.keydown",Xs="Keyboard binding is now implicit; explicit binding to an element got removed. For more information, see https://github.com/bpmn-io/diagram-js/issues/661";function Gs(e,t){var n=this;this._config=e=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",function(){n._fire("destroy"),n.unbind()}),e.bindTo&&console.error("unsupported configuration <keyboard.bindTo>",new Error(Xs));var i=e&&!1!==e.bind;t.on("canvas.init",function(e){n._target=e.svg,i&&n.bind(),n._fire("init")})}Gs.$inject=["config.keyboard","eventBus"],Gs.prototype._keydownHandler=function(e){this._keyHandler(e,Qs)},Gs.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},Gs.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||Qs,n)&&e.preventDefault()}},Gs.prototype._isEventIgnored=function(e){return!1},Gs.prototype.bind=function(e){e&&console.error("unsupported argument <node>",new Error(Xs)),this.unbind(),e=this._node=this._target,ce.bind(e,"keydown",this._keydownHandler),ce.bind(e,"keyup",this._keyupHandler),this._fire("bind")},Gs.prototype.getBinding=function(){return this._node},Gs.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),ce.unbind(e,"keydown",this._keydownHandler),ce.unbind(e,"keyup",this._keyupHandler)),this._node=null},Gs.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},Gs.prototype.addListener=function(e,t,n){g(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||Qs,e,t)},Gs.prototype.removeListener=function(e,t){this._eventBus.off(t||Qs,e)},Gs.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},Gs.prototype.isCmd=zs,Gs.prototype.isShift=qs,Gs.prototype.isKey=js;function Us(e,t){var n=this;e.on("editorActions.init",500,function(e){var i=e.editorActions;n.registerBindings(t,i)})}Us.$inject=["eventBus","keyboard"],Us.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",function(e){if(Hs(e.keyEvent))return t.trigger("undo"),!0}),n("redo",function(e){if(Ws(e.keyEvent))return t.trigger("redo"),!0}),n("copy",function(e){if(function(e){return zs(e)&&js($s,e)}(e.keyEvent))return t.trigger("copy"),!0}),n("paste",function(e){if(function(e){return zs(e)&&js(Ds,e)}(e.keyEvent))return t.trigger("paste"),!0}),n("duplicate",function(e){if(function(e){return zs(e)&&js(Bs,e)}(e.keyEvent))return t.trigger("duplicate"),!0}),n("cut",function(e){if(function(e){return zs(e)&&js(Ls,e)}(e.keyEvent))return t.trigger("cut"),!0}),n("stepZoom",function(e){var n=e.keyEvent;if(js(["+","="],n)&&zs(n))return t.trigger("stepZoom",{value:1}),!0}),n("stepZoom",function(e){var n=e.keyEvent;if(js("-",n)&&zs(n))return t.trigger("stepZoom",{value:-1}),!0}),n("zoom",function(e){var n=e.keyEvent;if(js("0",n)&&zs(n))return t.trigger("zoom",{value:1}),!0}),n("removeSelection",function(e){if(js(["Backspace","Delete"],e.keyEvent))return t.trigger("removeSelection"),!0})};var Ys={__init__:["keyboard","keyboardBindings"],keyboard:["type",Gs],keyboardBindings:["type",Us]},Ks={moveSpeed:50,moveSpeedAccelerated:200};function Zs(e,t,n){var i=this;this._config=q({},Ks,e||{}),t.addListener(function(e){var n=e.keyEvent,r=i._config;if(!t.isCmd(n))return;if(t.isKey(["ArrowLeft","ArrowUp","ArrowDown","ArrowRight"],n)){var o,s=t.isShift(n)?r.moveSpeedAccelerated:r.moveSpeed;switch(n.key){case"ArrowLeft":o="left";break;case"ArrowUp":o="up";break;case"ArrowRight":o="right";break;case"ArrowDown":o="down"}return i.moveCanvas({speed:s,direction:o}),!0}}),this.moveCanvas=function(e){var t=0,i=0,r=e.speed/Math.min(Math.sqrt(n.viewbox().scale),1);switch(e.direction){case"left":t=r;break;case"up":i=r;break;case"right":t=-r;break;case"down":i=-r}n.scroll({dx:t,dy:i})}}Zs.$inject=["config.keyboardMove","keyboard","canvas"];var Js={__depends__:[Ys],__init__:["keyboardMove"],keyboardMove:["type",Zs]},ea=/^djs-cursor-.*$/;function ta(e){var t=te(document.body);t.removeMatching(ea),e&&t.add("djs-cursor-"+e)}function na(){ta(null)}function ia(e,t){function n(){return!1}return t=t||"element.click",e.once(t,5e3,n),function(){e.off(t,n)}}function ra(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function oa(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sa(e,t,n){var i,r=!1!==(e=e||{}).enabled;function o(e){return l(e.originalEvent)}function s(e){var r,o=i.start,s=i.button,a=ds(e),l=oa(a,o);(!i.dragging&&(r=l,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(i.dragging=!0,0===s&&(i.untrap=ia(t)),ta("grab")),i.dragging)&&(l=oa(a,i.last||i.start),i.last=a,n.scroll({dx:l.x,dy:l.y}));e.preventDefault()}function a(e){ce.unbind(document,"mousemove",s),ce.unbind(document,"mouseup",a),!e&&i.untrap&&i.untrap(),i=null,na()}function l(e){if(r&&!re(e.target,".djs-draggable")){var t=e.button;if(!(t>=2||e.ctrlKey||e.shiftKey||e.altKey))return i={button:t,start:ds(e)},ce.bind(document,"mousemove",s),ce.bind(document,"mouseup",a),!0}}t.on("canvas.focus.changed",function(e){e.focused?t.on("element.mousedown",500,o):t.off("element.mousedown",o)}),t.on("diagram.destroy",function(){i&&a()}),this.isActive=function(){return!!i},this.toggle=function(e){return void 0===e&&(e=!r),!(r=e)&&i&&a(),r}}sa.$inject=["config.moveCanvas","eventBus","canvas"];var aa={__init__:["moveCanvas"],moveCanvas:["type",sa]};function la(e){return Math.log(e)/Math.log(10)}function ca(e,t){var n=la(e.min),i=la(e.max);return(Math.abs(n)+Math.abs(i))/t}var ua=Math.sign||function(e){return e>=0?1:-1},pa={min:.2,max:4};function ha(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=F(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75,this.toggle(!1!==e.enabled)}ha.$inject=["config.zoomScroll","eventBus","canvas"],ha.prototype.scroll=function(e){this._canvas.scroll(e)},ha.prototype.reset=function(){this._canvas.zoom("fit-viewport")},ha.prototype.zoom=function(e,t){var n=ca(pa,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},ha.prototype._handleWheel=function(e){if(this._enabled&&!re(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey||fs()&&e.metaKey,r=e.shiftKey,o=-1*this._scale;if(o*=i?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,i){var s=t.getBoundingClientRect(),a={x:e.clientX-s.left,y:e.clientY-s.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*ua(e.deltaY)*o,this.zoom(n,a)}else n=r?{dx:o*e.deltaY,dy:0}:{dx:o*e.deltaX,dy:o*e.deltaY},this.scroll(n)}},ha.prototype.stepZoom=function(e,t){var n=ca(pa,10);this._zoom(e,t,n)},ha.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=la(i.zoom()),s=Math.round(o/n)*n;s+=n*r;var a=Math.pow(10,s);i.zoom(function(e,t){return Math.max(e.min,Math.min(e.max,t))}(pa,a),t)},ha.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&ce[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e};var da={__init__:["zoomScroll"],zoomScroll:["type",ha]};function fa(e){Ts.call(this,e)}function ma(e){return e&&e[e.length-1]}function ga(e){return e.y}function va(e){return e.x}e(fa,Ts),fa.prototype._navigationModules=[Ms,Js,aa,da],fa.prototype._modules=[].concat(Ts.prototype._modules,fa.prototype._navigationModules);var ya={left:va,center:va,right:function(e){return e.x+e.width},top:ga,middle:ga,bottom:function(e){return e.y+e.height}};function ba(e,t){this._modeling=e,this._rules=t}ba.$inject=["modeling","rules"],ba.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},ba.prototype._isType=function(e,t){return-1!==t.indexOf(e)},ba.prototype._alignmentPosition=function(e,t){var n,i,r,o=this._getOrientationDetails(e),s=o.axis,a=o.dimension,l={},c={},u=!1;if(this._isType(e,["left","top"]))l[e]=t[0][s];else if(this._isType(e,["right","bottom"]))r=ma(t),l[e]=r[s]+r[a];else if(this._isType(e,["center","middle"])){if(E(t,function(e){var t=e[s]+Math.round(e[a]/2);c[t]?c[t].elements.push(e):c[t]={elements:[e],center:t}}),n=B(c,function(e){return e.elements.length>1&&(u=!0),e.elements.length}),u)return l[e]=ma(n).center,l;i=t[0],r=ma(t=B(t,function(e){return e[s]+e[a]})),l[e]=function(e,t){return Math.round((e[s]+t[s]+t[a])/2)}(i,r)}return l},ba.prototype.trigger=function(e,t){var n,i=this._modeling,r=_(e,function(e){return!(e.waypoints||e.host||e.labelTarget)});if(d(n=this._rules.allowed("elements.align",{elements:r}))&&(r=n),!(r.length<2)&&n){var o=B(r,ya[t]),s=this._alignmentPosition(t,o);i.alignElements(o,s)}};var wa={__init__:["alignElements"],alignElements:["type",ba]};const xa=new Mo;function _a(e){this._scheduled={},e.on("diagram.destroy",()=>{Object.keys(this._scheduled).forEach(e=>{this.cancel(e)})})}_a.$inject=["eventBus"],_a.prototype.schedule=function(e,t=xa.next()){this.cancel(t);const n=this._schedule(e,t);return this._scheduled[t]=n,n.promise},_a.prototype._schedule=function(e,t){const n=function(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}(),i=setTimeout(()=>{try{this._scheduled[t]=null;try{n.resolve(e())}catch(e){n.reject(e)}}catch(e){console.error("Scheduler#_schedule execution failed",e)}});return{executionId:i,promise:n.promise}},_a.prototype.cancel=function(e){const t=this._scheduled[e];t&&(this._cancel(t),this._scheduled[e]=null)},_a.prototype._cancel=function(e){clearTimeout(e.executionId)};var Ea={scheduler:["type",_a]},Sa=".entry";function ka(e,t,n,i){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._scheduler=i,this._current=null,this._init()}ka.$inject=["canvas","elementRegistry","eventBus","scheduler"],ka.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",function(t){var n=t.newSelection,i=n.length?1===n.length?n[0]:n:null;i?e.open(i,!0):e.close()}),this._eventBus.on("elements.changed",function(t){var n=t.elements,i=e._current;if(i){var r=i.target,o=d(r)?r:[r];if(o.filter(function(e){return n.includes(e)}).length){e.close();var s=o.filter(function(t){return e._elementRegistry.get(t.id)});s.length&&e._updateAndOpen(s.length>1?s:s[0])}}}),this._eventBus.on("canvas.viewbox.changed",function(){e._updatePosition()}),this._eventBus.on("element.marker.update",function(t){if(e.isOpen()){var n=t.element,i=e._current;(d(i.target)?i.target:[i.target]).includes(n)&&e._updateVisibility()}}),this._container=this._createContainer()},ka.prototype._createContainer=function(){var e=Y('<div class="djs-context-pad-parent"></div>');return this._canvas.getContainer().appendChild(e),e},ka.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,function(e){e.providers.push(t)})},ka.prototype.getEntries=function(e){var t=this._getProviders(),n=d(e)?"getMultiElementContextPadEntries":"getContextPadEntries",i={};return E(t,function(t){if(g(t[n])){var r=t[n](e);g(r)?i=r(i):E(r,function(e,t){i[t]=e})}}),i},ka.prototype.trigger=function(e,t,n){var i,r,o=this,s=t.delegateTarget||t.target;return s?(i=J(s,"data-action"),r=t.originalEvent||t,"mouseover"!==e?"mouseout"===e?(clearTimeout(this._timeout),void(this._mouseout&&(this._mouseout(),this._mouseout=null))):this.triggerEntry(i,e,r,n):void(this._timeout=setTimeout(function(){o._mouseout=o.triggerEntry(i,"hover",r,n)},300))):t.preventDefault()},ka.prototype.triggerEntry=function(e,t,n,i){if(this.isShown()){var r=this._current.target,o=this._current.entries[e];if(o){var s=o.action;if(!1!==this._eventBus.fire("contextPad.trigger",{entry:o,event:n})){if(g(s)){if("click"===t)return s(n,r,i)}else if(s[t])return s[t](n,r,i);n.preventDefault()}}}},ka.prototype.open=function(e,t){!t&&this.isOpen(e)||!1!==this._eventBus.fire("contextPad.open.allowed",{target:e})&&(this.close(),this._updateAndOpen(e))},ka.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},ka.prototype._updateAndOpen=function(e){var t,n=this.getEntries(e),i=this._createHtml(e);E(n,function(e,n){var r,o=e.group||"default",s=Y(e.html||'<div class="entry" draggable="true"></div>');J(s,"data-action",n),(r=de("[data-group="+Wo(o)+"]",i))||(J(r=Y('<div class="group"></div>'),"data-group",o),i.appendChild(r)),r.appendChild(s),e.className&&function(e,t){var n=te(e);(t=d(t)?t:t.split(/\s+/g)).forEach(function(e){n.add(e)})}(s,e.className),e.title&&J(s,"title",e.title),e.imageUrl&&(J(t=Y("<img>"),"src",e.imageUrl),t.style.width="100%",t.style.height="100%",s.appendChild(t))}),te(i).add("open"),this._current={entries:n,html:i,target:e},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current})},ka.prototype._createHtml=function(e){var t=this,n=Y('<div class="djs-context-pad"></div>');return pe.bind(n,Sa,"click",function(e){t.trigger("click",e)}),pe.bind(n,Sa,"dragstart",function(e){t.trigger("dragstart",e)}),pe.bind(n,Sa,"mouseover",function(e){t.trigger("mouseover",e)}),pe.bind(n,Sa,"mouseout",function(e){t.trigger("mouseout",e)}),ce.bind(n,"mousedown",function(e){e.stopPropagation()}),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n},ka.prototype.getPad=function(e){let t;return console.warn(new Error("ContextPad#getPad is deprecated and will be removed in future library versions, cf. https://github.com/bpmn-io/diagram-js/pull/888")),t=this.isOpen()&&function(e,t){return e=d(e)?e:[e],t=d(t)?t:[t],e.length===t.length&&O(e,function(e){return t.includes(e)})}(this._current.target,e)?this._current.html:this._createHtml(e),{html:t}},ka.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},ka.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return d(e)===d(n)&&(d(e)?e.length===n.length&&O(e,function(e){return n.includes(e)}):n===e)},ka.prototype.isShown=function(){return this.isOpen()&&te(this._current.html).has("open")},ka.prototype.show=function(){this.isOpen()&&(te(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}))},ka.prototype.hide=function(){this.isOpen()&&(te(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))},ka.prototype._getPosition=function(e){if(!d(e)&&an(e)){var t=this._canvas.viewbox(),n=(o=e).waypoints[o.waypoints.length-1],i=n.x*t.scale-t.x*t.scale,r=n.y*t.scale-t.y*t.scale;return{left:i+8*this._canvas.zoom(),top:r}}var o,s=this._canvas.getContainer().getBoundingClientRect(),a=this._getTargetBounds(e);return{left:a.right-s.left+8*this._canvas.zoom(),top:a.top-s.top}},ka.prototype._updatePosition=function(){this._scheduler.schedule(()=>{if(this.isOpen()){var e=this._current.html,t=this._getPosition(this._current.target);"x"in t&&"y"in t?(e.style.left=t.x+"px",e.style.top=t.y+"px"):["top","right","bottom","left"].forEach(function(n){n in t&&(e.style[n]=t[n]+"px")})}},"ContextPad#_updatePosition")},ka.prototype._updateVisibility=function(){this._scheduler.schedule(()=>{if(this.isOpen()){var e=this,t=this._current.target;(d(t)?t:[t]).some(function(t){return e._canvas.hasMarker(t,"djs-element-hidden")})?e.hide():e.show()}},"ContextPad#_updateVisibility")},ka.prototype._getTargetBounds=function(e){var t=this;return(d(e)?e:[e]).map(function(e){return t._canvas.getGraphics(e)}).reduce(function(e,t){const n=t.getBoundingClientRect();return e.top=Math.min(e.top,n.top),e.right=Math.max(e.right,n.right),e.bottom=Math.max(e.bottom,n.bottom),e.left=Math.min(e.left,n.left),e.x=e.left,e.y=e.top,e.width=e.right-e.left,e.height=e.bottom-e.top,e},{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};var Oa,Ca,Pa,Aa,Ta,Ra,Ma,$a,Da,Ba,La,Ia,Na,za,ja={__depends__:[_s,Ea,No],contextPad:["type",ka]},Va={},Fa=[],qa=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ha=Array.isArray;function Wa(e,t){for(var n in t)e[n]=t[n];return e}function Qa(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Xa(e,t,n){var i,r,o,s={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Oa.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return Ga(e,s,i,r,null)}function Ga(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++Pa:r,__i:-1,__u:0};return null==r&&null!=Ca.vnode&&Ca.vnode(o),o}function Ua(e){return e.children}function Ya(e,t){this.props=e,this.context=t}function Ka(e,t){if(null==t)return e.__?Ka(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Ka(e):null}function Za(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,i=[],r=[],o=Wa({},t);o.__v=t.__v+1,Ca.vnode&&Ca.vnode(o),ll(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,i,null==n?Ka(t):n,!!(32&t.__u),r),o.__v=t.__v,o.__.__k[o.__i]=o,ul(i,o,r),t.__e=t.__=null,o.__e!=n&&Ja(o)}}function Ja(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),Ja(e)}function el(e){(!e.__d&&(e.__d=!0)&&Aa.push(e)&&!tl.__r++||Ta!=Ca.debounceRendering)&&((Ta=Ca.debounceRendering)||Ra)(tl)}function tl(){try{for(var e,t=1;Aa.length;)Aa.length>t&&Aa.sort(Ma),e=Aa.shift(),t=Aa.length,Za(e)}finally{Aa.length=tl.__r=0}}function nl(e,t,n,i,r,o,s,a,l,c,u){var p,h,d,f,m,g,v=i&&i.__k||Fa,y=t.length;for(l=function(e,t,n,i,r){var o,s,a,l,c,u=n.length,p=u,h=0;for(e.__k=new Array(r),o=0;o<r;o++)null!=(s=t[o])&&"boolean"!=typeof s&&"function"!=typeof s?("string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?s=e.__k[o]=Ga(null,s,null,null,null):Ha(s)?s=e.__k[o]=Ga(Ua,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?s=e.__k[o]=Ga(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[o]=s,l=o+h,s.__=e,s.__b=e.__b+1,a=null,-1!=(c=s.__i=rl(s,n,l,p))&&(p--,(a=n[c])&&(a.__u|=2)),null==a||null==a.__v?(-1==c&&(r>u?h--:r<u&&h++),"function"!=typeof s.type&&(s.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,s.__u|=4))):e.__k[o]=null;if(p)for(o=0;o<u;o++)null!=(a=n[o])&&!(2&a.__u)&&(a.__e==i&&(i=Ka(a)),dl(a,a));return i}(n,t,v,l,y),p=0;p<y;p++)null!=(d=n.__k[p])&&(h=-1!=d.__i&&v[d.__i]||Va,d.__i=p,g=ll(e,d,h,r,o,s,a,l,c,u),f=d.__e,d.ref&&h.ref!=d.ref&&(h.ref&&hl(h.ref,null,d),u.push(d.ref,d.__c||f,d)),null==m&&null!=f&&(m=f),4&d.__u?(l=il(d,l,e),h.__e&&(h.__e=null)):"function"==typeof d.type&&void 0!==g?l=g:f&&(l=f.nextSibling),d.__u&=-7);return n.__e=m,l}function il(e,t,n){var i,r;if("function"==typeof e.type){for(i=e.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=e,t=il(i[r],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=Ka(e)),t=n.insertBefore(e.__e,t||null));do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function rl(e,t,n,i){var r,o,s,a=e.key,l=e.type,c=t[n],u=null!=c&&!(2&c.__u);if(null===c&&null==a||u&&a==c.key&&l==c.type)return n;if(i>(u?1:0))for(r=n-1,o=n+1;r>=0||o<t.length;)if(null!=(c=t[s=r>=0?r--:o++])&&!(2&c.__u)&&a==c.key&&l==c.type)return s;return-1}function ol(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||qa.test(t)?n:n+"px"}function sl(e,t,n,i,r){var o,s;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||ol(e.style,t,"");if(n)for(t in n)i&&n[t]==i[t]||ol(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(La,"$1")),s=t.toLowerCase(),t=s in e||"onFocusOut"==t||"onFocusIn"==t?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n[Ba]=i[Ba]:(n[Ba]=Ia,e.addEventListener(t,o?za:Na,o)):e.removeEventListener(t,o?za:Na,o);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function al(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t[Da])t[Da]=Ia++;else if(t[Da]<n[Ba])return;return n(Ca.event?Ca.event(t):t)}}}function ll(e,t,n,i,r,o,s,a,l,c){var u,p,h,d,f,m,g,v,y,b,w,x,_,E,S,k,O=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(u=Ca.__b)&&u(t);e:if("function"==typeof O){p=s.length;try{if(y=t.props,b=O.prototype&&O.prototype.render,w=(u=O.contextType)&&i[u.__c],x=u?w?w.props.value:u.__:i,n.__c?v=(h=t.__c=n.__c).__=h.__E:(b?t.__c=h=new O(y,x):(t.__c=h=new Ya(y,x),h.constructor=O,h.render=fl),w&&w.sub(h),h.state||(h.state={}),h.__n=i,d=h.__d=!0,h.__h=[],h._sb=[]),b&&null==h.__s&&(h.__s=h.state),b&&null!=O.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=Wa({},h.__s)),Wa(h.__s,O.getDerivedStateFromProps(y,h.__s))),f=h.props,m=h.state,h.__v=t,d)b&&null==O.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),b&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(b&&null==O.getDerivedStateFromProps&&y!==f&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(y,x),t.__v==n.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(y,h.__s,x)){t.__v!=n.__v&&(h.props=y,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),Fa.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&s.push(h),a=Ka(n);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(y,h.__s,x),b&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(f,m,g)})}if(h.context=x,h.props=y,h.__P=e,h.__e=!1,_=Ca.__r,E=0,b)h.state=h.__s,h.__d=!1,_&&_(t),u=h.render(h.props,h.state,h.context),Fa.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,_&&_(t),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++E<25);h.state=h.__s,null!=h.getChildContext&&(i=Wa(Wa({},i),h.getChildContext())),b&&!d&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(f,m)),S=null!=u&&u.type===Ua&&null==u.key?pl(u.props.children):u,a=nl(e,Ha(S)?S:[S],t,n,i,r,o,s,a,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&s.push(h),v&&(h.__E=h.__=null)}catch(e){if(s.length=p,t.__v=null,l||null!=o){if(e.then){for(t.__u|=l?160:128;a&&8==a.nodeType&&a.nextSibling;)a=a.nextSibling;null!=o&&(o[o.indexOf(a)]=null),t.__e=a}else if(null!=o)for(k=o.length;k--;)Qa(o[k])}else t.__e=n.__e;null==t.__k&&(t.__k=n.__k||[]),e.then||cl(t),Ca.__e(e,t,n)}}else null==o&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=function(e,t,n,i,r,o,s,a,l){var c,u,p,h,d,f,m,g=n.props||Va,v=t.props,y=t.type;if("svg"==y?r="http://www.w3.org/2000/svg":"math"==y?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=o)for(c=0;c<o.length;c++)if((d=o[c])&&"setAttribute"in d==!!y&&(y?d.localName==y:3==d.nodeType)){e=d,o[c]=null;break}if(null==e){if(null==y)return document.createTextNode(v);e=document.createElementNS(r,y,v.is&&v),a&&(Ca.__m&&Ca.__m(t,o),a=!1),o=null}if(null==y)g===v||a&&e.data==v||(e.data=v);else{if(o="textarea"==y&&null!=v.defaultValue?null:o&&Oa.call(e.childNodes),!a&&null!=o)for(g={},c=0;c<e.attributes.length;c++)g[(d=e.attributes[c]).name]=d.value;for(c in g)d=g[c],"dangerouslySetInnerHTML"==c?p=d:"children"==c||c in v||"value"==c&&"defaultValue"in v||"checked"==c&&"defaultChecked"in v||sl(e,c,null,d,r);for(c in v)d=v[c],"children"==c?h=d:"dangerouslySetInnerHTML"==c?u=d:"value"==c?f=d:"checked"==c?m=d:a&&"function"!=typeof d||g[c]===d||sl(e,c,d,g[c],r);if(u)a||p&&(u.__html==p.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(p&&(e.innerHTML=""),nl("template"==t.type?e.content:e,Ha(h)?h:[h],t,n,i,"foreignObject"==y?"http://www.w3.org/1999/xhtml":r,o,s,o?o[0]:n.__k&&Ka(n,0),a,l),null!=o)for(c=o.length;c--;)Qa(o[c]);a&&"textarea"!=y||(c="value","progress"==y&&null==f?e.removeAttribute("value"):null!=f&&(f!==e[c]||"progress"==y&&!f||"option"==y&&f!=g[c])&&sl(e,c,f,g[c],r),c="checked",null!=m&&m!=e[c]&&sl(e,c,m,g[c],r))}return e}(n.__e,t,n,i,r,o,s,l,c);return(u=Ca.diffed)&&u(t),128&t.__u?void 0:a}function cl(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(cl))}function ul(e,t,n){for(var i=0;i<n.length;i++)hl(n[i],n[++i],n[++i]);Ca.__c&&Ca.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){Ca.__e(e,t.__v)}})}function pl(e){return"object"!=typeof e||null==e||e.__b>0?e:Ha(e)?e.map(pl):void 0!==e.constructor?null:Wa({},e)}function hl(e,t,n){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==t||(e.__u=e(t))}else e.current=t}catch(e){Ca.__e(e,n)}}function dl(e,t,n){var i,r;if(Ca.unmount&&Ca.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||hl(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){Ca.__e(e,t)}i.base=i.__P=i.__n=null}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&dl(i[r],t,n||"function"!=typeof e.type);n||Qa(e.__e),e.__c=e.__=e.__e=void 0}function fl(e,t,n){return this.constructor(e,n)}function ml(e,t,n){var i,r,o;t==document&&(t=document.documentElement),Ca.__&&Ca.__(e,t),i=!1?null:t.__k,r=[],o=[],ll(t,e=t.__k=Xa(Ua,null,[e]),i||Va,Va,t.namespaceURI,i?null:t.firstChild?Oa.call(t.childNodes):null,r,i?i.__e:t.firstChild,false,o),ul(r,e,o),e.props.children=null}Oa=Fa.slice,Ca={__e:function(e,t,n,i){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),s=r.__d),s)return r.__E=r}catch(t){e=t}throw e}},Pa=0,Ya.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=Wa({},this.state),"function"==typeof e&&(e=e(Wa({},n),this.props)),e&&Wa(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),el(this))},Ya.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),el(this))},Ya.prototype.render=Ua,Aa=[],Ra="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ma=function(e,t){return e.__v.__b-t.__v.__b},tl.__r=0,$a=Math.random().toString(8),Da="__d"+$a,Ba="__a"+$a,La=/(PointerCapture)$|Capture$/i,Ia=0,Na=al(!1),za=al(!0);var gl=function(e,t,n,i){var r;t[0]=0;for(var o=1;o<t.length;o++){var s=t[o++],a=t[o]?(t[0]|=s?1:2,n[t[o++]]):t[++o];3===s?i[0]=a:4===s?i[1]=Object.assign(i[1]||{},a):5===s?(i[1]=i[1]||{})[t[++o]]=a:6===s?i[1][t[++o]]+=a+"":s?(r=e.apply(a,gl(e,a,n,["",null])),i.push(r),a[0]?t[0]|=2:(t[o-2]=0,t[o]=r)):i.push(a)}return i},vl=new Map;var yl,bl,wl,xl,_l=function(e){var t=vl.get(this);return t||(t=new Map,vl.set(this,t)),(t=gl(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,i=1,r="",o="",s=[0],a=function(e){1===i&&(e||(r=r.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,e,r):3===i&&(e||r)?(s.push(3,e,r),i=2):2===i&&"..."===r&&e?s.push(4,e,0):2===i&&r&&!e?s.push(5,0,!0,r):i>=5&&((r||!e&&5===i)&&(s.push(i,0,r,n),i=6),e&&(s.push(i,e,0,n),i=6)),r=""},l=0;l<e.length;l++){l&&(1===i&&a(),a(l));for(var c=0;c<e[l].length;c++)t=e[l][c],1===i?"<"===t?(a(),s=[s],i=3):r+=t:4===i?"--"===r&&">"===t?(i=1,r=""):r=t+r[0]:o?t===o?o="":r+=t:'"'===t||"'"===t?o=t:">"===t?(a(),i=1):i&&("="===t?(i=5,n=r,r=""):"/"===t&&(i<5||">"===e[l][c+1])?(a(),3===i&&(s=s[0]),i=s,(s=s[0]).push(2,0,i),i=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),i=2):r+=t),3===i&&"!--"===r&&(i=4,s=s[0])}return a(),s}(e)),t),arguments,[])).length>1?t:t[0]}.bind(Xa),El=0,Sl=[],kl=Ca,Ol=kl.__b,Cl=kl.__r,Pl=kl.diffed,Al=kl.__c,Tl=kl.unmount,Rl=kl.__;function Ml(e,t){kl.__h&&kl.__h(bl,e,El||t),El=0;var n=bl.__H||(bl.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function $l(e){return El=1,function(e,t){var n=Ml(yl++,2);if(n.t=e,!n.__c&&(n.__=[Wl(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],i=n.t(t,e);t!==i&&(n.__N=[i,n.__[1]],n.__c.setState({}))}],n.__c=bl,!bl.__f)){var i=function(e,t,i){if(!n.__c.__H)return!0;var o=!1,s=n.__c.props!==e;if(n.__c.__H.__.some(function(e){if(e.__N){o=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}}),r){var a=r.call(this,e,t,i);return o?a||s:a}return!o||s};bl.__f=!0;var r=bl.shouldComponentUpdate,o=bl.componentWillUpdate;bl.componentWillUpdate=function(e,t,n){if(this.__e){var s=r;r=void 0,i(e,t,n),r=s}o&&o.call(this,e,t,n)},bl.shouldComponentUpdate=i}return n.__N||n.__}(Wl,e)}function Dl(e,t){var n=Ml(yl++,3);!kl.__s&&Hl(n.__H,t)&&(n.__=e,n.u=t,bl.__H.__h.push(n))}function Bl(e,t){var n=Ml(yl++,4);!kl.__s&&Hl(n.__H,t)&&(n.__=e,n.u=t,bl.__h.push(n))}function Ll(e){return El=5,Il(function(){return{current:e}},[])}function Il(e,t){var n=Ml(yl++,7);return Hl(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Nl(e,t){return El=8,Il(function(){return e},t)}function zl(){for(var e;e=Sl.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Fl),t.__h.some(ql),t.__h=[]}catch(n){t.__h=[],kl.__e(n,e.__v)}}}kl.__b=function(e){bl=null,Ol&&Ol(e)},kl.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Rl&&Rl(e,t)},kl.__r=function(e){Cl&&Cl(e),yl=0;var t=(bl=e.__c).__H;t&&(wl===bl?(t.__h=[],bl.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Fl),t.__h.some(ql),t.__h=[],yl=0)),wl=bl},kl.diffed=function(e){Pl&&Pl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Sl.push(t)&&xl===kl.requestAnimationFrame||((xl=kl.requestAnimationFrame)||Vl)(zl)),t.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0)})),wl=bl=null},kl.__c=function(e,t){t.some(function(e){try{e.__h.some(Fl),e.__h=e.__h.filter(function(e){return!e.__||ql(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],kl.__e(n,e.__v)}}),Al&&Al(e,t)},kl.unmount=function(e){Tl&&Tl(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Fl(e)}catch(e){t=e}}),n.__H=void 0,t&&kl.__e(t,n.__v))};var jl="function"==typeof requestAnimationFrame;function Vl(e){var t,n=function(){clearTimeout(i),jl&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,35);jl&&(t=requestAnimationFrame(n))}function Fl(e){var t=bl,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),bl=t}function ql(e){var t=bl;e.__c=e.__(),bl=t}function Hl(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Wl(e,t){return"function"==typeof t?t(e):t}function Ql(e){const{navigationStack:t,setNavigationStack:n}=e,i=Il(()=>t.length<=1?[]:t.slice(0,-1).map((e,t)=>({label:e.label,onClick:()=>n(e=>e.slice(0,t+1))})),[t,n]),r=t.length>0?()=>n([]):null,o=t.length>0?t[t.length-1].label:null;return _l`
|
|
3
3
|
<div class="djs-popup-breadcrumbs">
|
|
4
4
|
${r&&_l`
|