Files
aiot-platform-ui/apps/web-antd/dist/js/Viewer-CVLdohs9.js

10 lines
199 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var wa=Object.defineProperty,xa=Object.defineProperties;var _a=Object.getOwnPropertyDescriptors;var Rr=Object.getOwnPropertySymbols;var ba=Object.prototype.hasOwnProperty,Aa=Object.prototype.propertyIsEnumerable;var Cr=(e,t,n)=>t in e?wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ie=(e,t)=>{for(var n in t||(t={}))ba.call(t,n)&&Cr(e,n,t[n]);if(Rr)for(var n of Rr(t))Aa.call(t,n)&&Cr(e,n,t[n]);return e},Ee=(e,t)=>xa(e,_a(t));var Pt=(e,t,n)=>new Promise((r,i)=>{var a=c=>{try{l(n.next(c))}catch(p){i(p)}},s=c=>{try{l(n.throw(c))}catch(p){i(p)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(a,s);l((n=n.apply(e,t)).next())});function Sa(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Ra=Sa(function(e){var t=e.exports=function(n,r){if(r||(r=16),n===void 0&&(n=128),n<=0)return"0";for(var i=Math.log(Math.pow(2,n))/Math.log(r),a=2;i===1/0;a*=2)i=Math.log(Math.pow(2,n/a))/Math.log(r)*a;for(var s=i-Math.floor(i),l="",a=0;a<Math.floor(i);a++){var c=Math.floor(Math.random()*r).toString(r);l=c+l}if(s){var p=Math.pow(r,s),c=Math.floor(Math.random()*p).toString(r);l=c+l}var d=parseInt(l,r);return d!==1/0&&d>=Math.pow(2,n)?t(n,r):l};t.rack=function(n,r,i){var a=function(l){var c=0;do{if(c++>10)if(i)n+=i;else throw new Error("too many ID collisions, use more bits");var p=t(n,r)}while(Object.hasOwnProperty.call(s,p));return s[p]=l,p},s=a.hats={};return a.get=function(l){return a.hats[l]},a.set=function(l,c){return a.hats[l]=c,a},a.bits=n||128,a.base=r||16,a}});function Je(e){if(!(this instanceof Je))return new Je(e);e=e||[128,36,1],this._seed=e.length?Ra.rack(e[0],e[1],e[2]):e}Je.prototype.next=function(e){return this._seed(e||!0)};Je.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n};Je.prototype.claim=function(e,t){this._seed.set(e,t||!0)};Je.prototype.assigned=function(e){return this._seed.get(e)||!1};Je.prototype.unclaim=function(e){delete this._seed.hats[e]};Je.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};function Bc(e){return Array.prototype.concat.apply([],e)}const Gt=Object.prototype.toString,Ca=Object.prototype.hasOwnProperty;function Yt(e){return e===void 0}function Mt(e){return e!==void 0}function li(e){return e==null}function Pe(e){return Gt.call(e)==="[object Array]"}function Ke(e){return Gt.call(e)==="[object Object]"}function Re(e){return Gt.call(e)==="[object Number]"}function Ze(e){const t=Gt.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function qe(e){return Gt.call(e)==="[object String]"}function Pa(e){if(!Pe(e))throw new Error("must supply array")}function _t(e,t){return!li(e)&&Ca.call(e,t)}function $e(e,t){const n=Tn(t);let r;return N(e,function(i,a){if(n(i,a))return r=i,!1}),r}function Ta(e,t){const n=Tn(t);let r=Pe(e)?-1:void 0;return N(e,function(i,a){if(n(i,a))return r=a,!1}),r}function wt(e,t){const n=Tn(t);let r=[];return N(e,function(i,a){n(i,a)&&r.push(i)}),r}function N(e,t){let n,r;if(Yt(e))return;const i=Pe(e)?Na:Oa;for(let a in e)if(_t(e,a)&&(n=e[a],r=t(n,i(a)),r===!1))return n}function Lc(e,t){if(Yt(e))return[];Pa(e);const n=Tn(t);return e.filter(function(r,i){return!n(r,i)})}function Dt(e,t,n){return N(e,function(r,i){n=t(n,r,i)}),n}function er(e,t){return!!Dt(e,function(n,r,i){return n&&t(r,i)},!0)}function tr(e,t){return!!$e(e,t)}function Pn(e,t){let n=[];return N(e,function(r,i){n.push(t(r,i))}),n}function ka(e){return e&&Object.keys(e)||[]}function Ic(e){return ka(e).length}function Fc(e){return Pn(e,t=>t)}function ci(e,t,n={}){return t=nr(t),N(e,function(r){let i=t(r)||"_",a=n[i];a||(a=n[i]=[]),a.push(r)}),n}function Ma(e,...t){e=nr(e);let n={};return N(t,i=>ci(i,e,n)),Pn(n,function(i,a){return i[0]})}const $c=Ma;function Da(e,t){t=nr(t);let n=[];return N(e,function(r,i){let a=t(r,i),s={d:a,v:r};for(var l=0;l<n.length;l++){let{d:c}=n[l];if(a<c){n.splice(l,0,s);return}}n.push(s)}),Pn(n,r=>r.v)}function Pr(e){return function(t){return er(e,function(n,r){return t[r]===n})}}function nr(e){return Ze(e)?e:t=>t[e]}function Tn(e){return Ze(e)?e:t=>t===e}function Oa(e){return e}function Na(e){return Number(e)}function Ba(e,t){let n,r,i,a;function s(g){let T=Date.now(),v=g?0:a+t-T;if(v>0)return l(v);e.apply(i,r),c()}function l(g){n=setTimeout(s,g)}function c(){n&&clearTimeout(n),n=a=r=i=void 0}function p(){n&&s(!0),c()}function d(...g){a=Date.now(),r=g,i=this,n||l(t)}return d.flush=p,d.cancel=c,d}function ut(e,t){return e.bind(t)}function V(e,...t){return Object.assign(e,...t)}function La(e,t,n){let r=e;return N(t,function(i,a){if(typeof i!="number"&&typeof i!="string")throw new Error("illegal key type: "+typeof i+". Key should be of type number or string.");if(i==="constructor")throw new Error("illegal key: constructor");if(i==="__proto__")throw new Error("illegal key: __proto__");let s=t[a+1],l=r[i];Mt(s)&&li(l)&&(l=r[i]=isNaN(+s)?{}:[]),Yt(s)?Yt(n)?delete r[i]:r[i]=n:r=l}),e}function Ia(e,t){let n={},r=Object(e);return N(t,function(i){i in r&&(n[i]=e[i])}),n}function Fa(e,t){let n={},r=Object(e);return N(r,function(i,a){t.indexOf(a)===-1&&(n[a]=i)}),n}function $(e,t){var n=oe(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function vn(e,t){return tr(t,function(n){return $(e,n)})}function oe(e){return e&&e.businessObject||e}function lt(e){return e&&e.di}var fi="_plane";function jc(e){var t=e.id;return $a(t)}function rr(e){var t=e.id;return $(e,"bpmn:SubProcess")?pi(t):t}function Vc(e){return pi(e)}function Wc(e){var t=lt(e);return $(t,"bpmndi:BPMNPlane")}function pi(e){return e+fi}function $a(e){return e.replace(new RegExp(fi+"$"),"")}function Xe(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}function ja(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}const Va=Object.prototype.toString,Wa=Object.prototype.hasOwnProperty;function Ha(e){return e===void 0}function za(e){return Va.call(e)==="[object Array]"}function Ua(e,t){return Wa.call(e,t)}function Tr(e,t){let n,r;if(Ha(e))return;const i=za(e)?Ka:Ya;for(let a in e)if(Ua(e,a)&&(n=e[a],r=t(n,i(a)),r===!1))return n}function Ya(e){return e}function Ka(e){return Number(e)}function Ce(e,...t){const n=e.style;return Tr(t,function(r){r&&Tr(r,function(i,a){n[a]=i})}),e}function qa(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Ga=Object.prototype.toString;function kn(e){return new ct(e)}function ct(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}ct.prototype.add=function(e){return this.list.add(e),this};ct.prototype.remove=function(e){return Ga.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};ct.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};ct.prototype.toggle=function(e,t){return typeof t!="undefined"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};ct.prototype.array=function(){return Array.from(this.list)};ct.prototype.has=ct.prototype.contains=function(e){return this.list.contains(e)};function hi(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Xa(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}var En={},wn,zn,ir;function di(){wn=window.addEventListener?"addEventListener":"attachEvent",zn=window.removeEventListener?"removeEventListener":"detachEvent",ir=wn!=="addEventListener"?"on":""}var Za=En.bind=function(e,t,n,r){return wn||di(),e[wn](ir+t,n,r||!1),n},Qa=En.unbind=function(e,t,n,r){return zn||di(),e[zn](ir+t,n,r||!1),n},ar=ja({__proto__:null,bind:Za,unbind:Qa,default:En},[En]),mi=["focus","blur"];function Ja(e,t,n,r,i){return mi.indexOf(n)!==-1&&(i=!0),ar.bind(e,n,function(a){var s=a.target||a.srcElement;a.delegateTarget=Xa(s,t,!0),a.delegateTarget&&r.call(e,a)},i)}function eo(e,t,n,r){return mi.indexOf(t)!==-1&&(r=!0),ar.unbind(e,t,n,r)}var Un={bind:Ja,unbind:eo},to=no,yi=!1,rn;typeof document!="undefined"&&(rn=document.createElement("div"),rn.innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',yi=!rn.getElementsByTagName("link").length,rn=void 0);var pe={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:yi?[1,"X<div>","</div>"]:[0,"",""]};pe.td=pe.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];pe.option=pe.optgroup=[1,'<select multiple="multiple">',"</select>"];pe.thead=pe.tbody=pe.colgroup=pe.caption=pe.tfoot=[1,"<table>","</table>"];pe.polyline=pe.ellipse=pe.polygon=pe.circle=pe.text=pe.line=pe.path=pe.rect=pe.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function no(e,t){if(typeof e!="string")throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var r=n[1];if(r=="body"){var c=t.createElement("html");return c.innerHTML=e,c.removeChild(c.lastChild)}var i=Object.prototype.hasOwnProperty.call(pe,r)?pe[r]:pe._default,a=i[0],s=i[1],l=i[2],c=t.createElement("div");for(c.innerHTML=s+e+l;a--;)c=c.lastChild;if(c.firstChild==c.lastChild)return c.removeChild(c.firstChild);for(var p=t.createDocumentFragment();c.firstChild;)p.appendChild(c.removeChild(c.firstChild));return p}var Ge=to;function Hc(e,t){return e&&typeof e.matches=="function"&&e.matches(t)||!1}function We(e,t){return t=t||document,t.querySelector(e)}function ro(e,t){return t=t||document,t.querySelectorAll(e)}function xn(e){e.parentNode&&e.parentNode.removeChild(e)}function io(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(n){}return e}function ao(e,t){return t.appendChild(io(e,t))}function ce(e,t){return ao(t,e),e}var Yn=2,gi={"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":Yn,"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":Yn,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function oo(e,t){return gi[t]?e.style[t]:e.getAttributeNS(null,t)}function vi(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=gi[r];i?(i===Yn&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function so(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)vi(e,i,t[i])}function Q(e,t,n){if(typeof t=="string")if(n!==void 0)vi(e,t,n);else return oo(e,t);else so(e,t);return e}const uo=Object.prototype.toString;function Fe(e){return new ft(e)}function ft(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}ft.prototype.add=function(e){return this.list.add(e),this};ft.prototype.remove=function(e){return uo.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};ft.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};ft.prototype.toggle=function(e,t){return typeof t!="undefined"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};ft.prototype.array=function(){return Array.from(this.list)};ft.prototype.has=ft.prototype.contains=function(e){return this.list.contains(e)};function lo(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function zc(e){return e.cloneNode(!0)}var or={svg:"http://www.w3.org/2000/svg"},kr='<svg xmlns="'+or.svg+'"';function co(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(or.svg)===-1&&(e=kr+e.substring(4)):(e=kr+">"+e+"</svg>",t=!0);var n=fo(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function fo(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function J(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=co(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(or.svg,e),t&&Q(n,t),n}var $n=null;function Ei(){return $n===null&&($n=J("svg")),$n}function Mr(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function po(e,t,n,r,i,a){var s=Ei().createSVGMatrix();switch(arguments.length){case 0:return s;case 1:return Mr(s,e);case 6:return Mr(s,{a:e,b:t,c:n,d:r,e:i,f:a})}}function Ht(e){return Ei().createSVGTransform()}var Dr=/([&<>]{1})/g,ho=/([&<>\n\r"]{1})/g,mo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function jn(e,t){function n(r,i){return mo[i]||i}return e.replace(t,n)}function wi(e,t){var n,r,i,a,s;switch(e.nodeType){case 3:t.push(jn(e.textContent,Dr));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,n=0,r=i.length;n<r;++n)a=i.item(n),t.push(" ",a.name,'="',jn(a.value,ho),'"');if(e.hasChildNodes()){for(t.push(">"),s=e.childNodes,n=0,r=s.length;n<r;++n)wi(s.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",jn(e.nodeValue,Dr),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function yo(e){for(var t=e.firstChild,n=[];t;)wi(t,n),t=t.nextSibling;return n.join("")}function Or(e,t){return yo(e)}function Xt(e){var t=e.parentNode;return t&&t.removeChild(e),e}function go(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function vo(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(go(e,r))}function Kt(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),vo(n,t)),n.consolidate()}const Eo=/^class[ {]/;function wo(e){return Eo.test(e.toString())}function sr(e){return Array.isArray(e)}function Vn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function pn(...e){e.length===1&&sr(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const xo=/constructor\s*[^(]*\(\s*([^)]*)\)/m,_o=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,bo=/\/\*([^*]*)\*\//m;function Ao(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(wo(e)?xo:_o);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(bo);return(i&&i[1]||r).trim()})||[]}function xi(e,t){const n=t||{get:function(_,y){if(r.push(_),y===!1)return null;throw l(`No provider for "${_}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),a=this._instances=Object.create(null),s=a.injector=this,l=function(_){const y=r.join(" -> ");return r.length=0,new Error(y?`${_} (Resolving: ${y})`:_)};function c(_,y){if(!i[_]&&_.includes(".")){const w=_.split(".");let S=c(w.shift());for(;w.length;)S=S[w.shift()];return S}if(Vn(a,_))return a[_];if(Vn(i,_)){if(r.indexOf(_)!==-1)throw r.push(_),l("Cannot resolve circular dependency!");return r.push(_),a[_]=i[_][0](i[_][1]),r.pop(),a[_]}return n.get(_,y)}function p(_,y){if(typeof y=="undefined"&&(y={}),typeof _!="function")if(sr(_))_=pn(_.slice());else throw l(`Cannot invoke "${_}". Expected a function!`);const S=(_.$inject||Ao(_)).map(D=>Vn(y,D)?y[D]:c(D));return{fn:_,dependencies:S}}function d(_){const{fn:y,dependencies:w}=p(_),S=Function.prototype.bind.call(y,null,...w);return new S}function g(_,y,w){const{fn:S,dependencies:D}=p(_,w);return S.apply(y,D)}function T(_){return pn(y=>_.get(y))}function v(_,y){if(y&&y.length){const w=Object.create(null),S=Object.create(null),D=[],E=[],k=[];let P,B,O,F;for(let G in i)P=i[G],y.indexOf(G)!==-1&&(P[2]==="private"?(B=D.indexOf(P[3]),B===-1?(O=P[3].createChild([],y),F=T(O),D.push(P[3]),E.push(O),k.push(F),w[G]=[F,G,"private",O]):w[G]=[k[B],G,"private",E[B]]):w[G]=[P[2],P[1]],S[G]=!0),(P[2]==="factory"||P[2]==="type")&&P[1].$scope&&y.forEach(Ne=>{P[1].$scope.indexOf(Ne)!==-1&&(w[G]=[P[2],P[1]],S[Ne]=!0)});y.forEach(G=>{if(!S[G])throw new Error('No provider for "'+G+'". Cannot use provider from the parent!')}),_.unshift(w)}return new xi(_,s)}const x={factory:g,type:d,value:function(_){return _}};function C(_,y){const w=_.__init__||[];return function(){w.forEach(S=>{typeof S=="string"?y.get(S):y.invoke(S)})}}function I(_){const y=_.__exports__;if(y){const w=_.__modules__,S=Object.keys(_).reduce((B,O)=>(O!=="__exports__"&&O!=="__modules__"&&O!=="__init__"&&O!=="__depends__"&&(B[O]=_[O]),B),Object.create(null)),D=(w||[]).concat(S),E=v(D),k=pn(function(B){return E.get(B)});y.forEach(function(B){i[B]=[k,B,"private",E]});const P=(_.__init__||[]).slice();return P.unshift(function(){E.init()}),_=Object.assign({},_,{__init__:P}),C(_,E)}return Object.keys(_).forEach(function(w){if(w==="__init__"||w==="__depends__")return;const S=_[w];if(S[2]==="private"){i[w]=S;return}const D=S[0],E=S[1];i[w]=[x[D],So(D,E),D]}),C(_,s)}function H(_,y){return _.indexOf(y)!==-1||(_=(y.__depends__||[]).reduce(H,_),_.indexOf(y)!==-1)?_:_.concat(y)}function U(_){const y=_.reduce(H,[]).map(I);let w=!1;return function(){w||(w=!0,y.forEach(S=>S()))}}this.get=c,this.invoke=g,this.instantiate=d,this.createChild=v,this.init=U(e)}function So(e,t){return e!=="value"&&sr(t)&&(t=pn(t.slice())),t}var Ro=1e3;function et(e,t){var n=this;t=t||Ro,e.on(["render.shape","render.connection"],t,function(r,i){var a=r.type,s=i.element,l=i.gfx,c=i.attrs;if(n.canRender(s))return a==="render.shape"?n.drawShape(l,s,c):n.drawConnection(l,s,c)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(r,i){if(n.canRender(i))return r.type==="render.getShapePath"?n.getShapePath(i):n.getConnectionPath(i)})}et.prototype.canRender=function(e){};et.prototype.drawShape=function(e,t){};et.prototype.drawConnection=function(e,t){};et.prototype.getShapePath=function(e){};et.prototype.getConnectionPath=function(e){};function bt(e){return e.flat().join(",").replace(/,?([A-z]),?/g,"$1")}function Co(e){return["M",e.x,e.y]}function Wn(e){return["L",e.x,e.y]}function Po(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function To(e,t){const n=e.length,r=[Co(e[0])];for(let i=1;i<n;i++){const a=e[i-1],s=e[i],l=e[i+1];if(!l||!t){r.push(Wn(s));continue}const c=Math.min(t,Kn(s.x-a.x,s.y-a.y),Kn(l.x-s.x,l.y-s.y));if(!c){r.push(Wn(s));continue}const p=an(s,a,c),d=an(s,a,c*.5),g=an(s,l,c),T=an(s,l,c*.5);r.push(Wn(p)),r.push(Po(d,T,g))}return r}function an(e,t,n){const r=t.x-e.x,i=t.y-e.y,a=Kn(r,i),s=n/a;return{x:e.x+r*s,y:e.y+i*s}}function Kn(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function ur(e,t,n){Re(t)&&(n=t,t=null),t||(t={});const r=J("path",t);return Re(n)&&(r.dataset.cornerRadius=String(n)),_i(r,e)}function _i(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return Q(e,{d:bt(To(t,n))}),e}function Uc(e){return wt(e,function(t){return!$e(e,function(n){return n!==t&&bi(t,n)})})}function bi(e,t){if(t){if(e===t)return t;if(e.parent)return bi(e.parent,t)}}function Nr(e,t,n){var r=!n||e.indexOf(t)===-1;return r&&e.push(t),r}function lr(e,t,n){n=n||0,Pe(e)||(e=[e]),N(e,function(r,i){var a=t(r,i,n);Pe(a)&&a.length&&lr(a,t,n+1)})}function ko(e,t,n){var r=[],i=[];return lr(e,function(a,s,l){Nr(r,a,t);var c=a.children;if(c&&Nr(i,c,t))return c}),r}function Yc(e,t){return ko(e,!t)}function Kc(e,t,n){Yt(t)&&(t=!0),Ke(t)&&(n=t,t=!0),n=n||{};var r=jt(n.allShapes),i=jt(n.allConnections),a=jt(n.enclosedElements),s=jt(n.enclosedConnections),l=jt(n.topLevel,t&&ci(e,function(d){return d.id}));function c(d){l[d.source.id]&&l[d.target.id]&&(l[d.id]=[d]),r[d.source.id]&&r[d.target.id]&&(s[d.id]=a[d.id]=d),i[d.id]=d}function p(d){if(a[d.id]=d,d.waypoints)s[d.id]=i[d.id]=d;else return r[d.id]=d,N(d.incoming,c),N(d.outgoing,c),d.children}return lr(e,p),{allShapes:r,allConnections:i,topLevel:l,enclosedConnections:s,enclosedElements:a}}function pt(e,t){t=!!t,Pe(e)||(e=[e]);var n,r,i,a;return N(e,function(s){var l=s;s.waypoints&&!t&&(l=pt(s.waypoints,!0));var c=l.x,p=l.y,d=l.height||0,g=l.width||0;(c<n||n===void 0)&&(n=c),(p<r||r===void 0)&&(r=p),(c+g>i||i===void 0)&&(i=c+g),(p+d>a||a===void 0)&&(a=p+d)}),{x:n,y:r,height:a-r,width:i-n}}function qc(e,t){var n={};return N(e,function(r){var i=r;i.waypoints&&(i=pt(i)),!Re(t.y)&&i.x>t.x&&(n[r.id]=r),!Re(t.x)&&i.y>t.y&&(n[r.id]=r),i.x>t.x&&i.y>t.y&&(Re(t.width)&&Re(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y||!Re(t.width)||!Re(t.height))&&(n[r.id]=r)}),n}function Ai(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function Si(e){return!!(e&&e.isFrame)}function jt(e,t){return V({},e||{},t||{})}var Mo=1;function dt(e,t){et.call(this,e,Mo),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})}Xe(dt,et);dt.prototype.canRender=function(){return!0};dt.prototype.drawShape=function(t,n,r){var i=J("rect");return Q(i,{x:0,y:0,width:n.width||0,height:n.height||0}),Si(n)?Q(i,V({},this.FRAME_STYLE,r||{})):Q(i,V({},this.SHAPE_STYLE,r||{})),ce(t,i),i};dt.prototype.drawConnection=function(t,n,r){var i=ur(n.waypoints,V({},this.CONNECTION_STYLE,r||{}));return ce(t,i),i};dt.prototype.getShapePath=function(t){var n=t.x,r=t.y,i=t.width,a=t.height,s=[["M",n,r],["l",i,0],["l",0,a],["l",-i,0],["z"]];return bt(s)};dt.prototype.getConnectionPath=function(t){var n=t.waypoints,r,i,a=[];for(r=0;i=n[r];r++)i=i.original||i,a.push([r===0?"M":"L",i.x,i.y]);return bt(a)};dt.$inject=["eventBus","styles"];function Do(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,r,i){var a=this.style(r,i);return V(a,{class:n})},this.style=function(n,r){!Pe(n)&&!r&&(r=n,n=[]);var i=Dt(n,function(a,s){return V(a,e[s]||{})},{});return r?V(i,r):i},this.computeStyle=function(n,r,i){return Pe(r)||(i=r,r=[]),t.style(r||[],V({},i,n||{}))}}const Oo={__init__:["defaultRenderer"],defaultRenderer:["type",dt],styles:["type",Do]};function No(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function Bo(e,t,n){if(!(!e||!t)){typeof n!="number"&&(n=-1);var r=e.indexOf(t);if(r!==-1){if(r===n)return;if(n!==-1)e.splice(r,1);else return}n!==-1?e.splice(n,0,t):e.push(t)}}function Gc(e,t){return!e||!t?-1:e.indexOf(t)}function cr(e,t){return!e||!t?-1:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Lo(e,t,n,r){if(typeof r=="undefined"&&(r=5),!e||!t||!n)return!1;var i=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),a=cr(e,t);return Math.abs(i/a)<=r}var Io=2;function Xc(e,t){var n=Array.from(arguments).flat();const r={x:"v",y:"h"};for(const[i,a]of Object.entries(r))if(Fo(i,n))return a;return!1}function Fo(e,t){const n=t[0];return er(t,function(r){return Math.abs(n[e]-r[e])<=Io})}function Zc(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 Qc(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var $o=/,?([a-z]),?/gi,Br=parseFloat,le=Math,it=le.PI,ze=le.min,Ue=le.max,Lr=le.pow,st=le.abs,jo=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig,Vo=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig,_n=Array.isArray||function(e){return e instanceof Array};function fr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function zt(e){if(typeof e=="function"||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)fr(e,n)&&(t[n]=zt(e[n]));return t}function Wo(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function Ho(e){function t(){var n=Array.prototype.slice.call(arguments,0),r=n.join("␀"),i=t.cache=t.cache||{},a=t.count=t.count||[];return fr(i,r)?(Wo(a,r),i[r]):(a.length>=1e3&&delete i[a.shift()],a.push(r),i[r]=e(...arguments),i[r])}return t}function zo(e){if(!e)return null;var t=Ot(e);if(t.arr)return zt(t.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=[];return _n(e)&&_n(e[0])&&(r=zt(e)),r.length||String(e).replace(jo,function(i,a,s){var l=[],c=a.toLowerCase();for(s.replace(Vo,function(p,d){d&&l.push(+d)}),c=="m"&&l.length>2&&(r.push([a,...l.splice(0,2)]),c="l",a=a=="m"?"l":"L");l.length>=n[c]&&(r.push([a,...l.splice(0,n[c])]),!!n[c]););}),r.toString=Ot.toString,t.arr=zt(r),r}function Ot(e){var t=Ot.ps=Ot.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout(function(){for(var n in t)fr(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])}),t[e]}function qn(e,t,n,r){return arguments.length===1&&(t=e.y,n=e.width,r=e.height,e=e.x),{x:e,y:t,width:n,height:r,x2:e+n,y2:t+r}}function Ri(){return this.join(",").replace($o,"$1")}function bn(e){var t=zt(e);return t.toString=Ri,t}function Ir(e,t,n,r,i,a,s,l,c){var p=1-c,d=Lr(p,3),g=Lr(p,2),T=c*c,v=T*c,x=d*e+g*3*c*n+p*3*c*c*i+v*s,C=d*t+g*3*c*r+p*3*c*c*a+v*l;return{x:An(x),y:An(C)}}function Fr(e){var t=Xo(...e);return qn(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function at(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Uo(e,t){return e=qn(e),t=qn(t),at(t,e.x,e.y)||at(t,e.x2,e.y)||at(t,e.x,e.y2)||at(t,e.x2,e.y2)||at(e,t.x,t.y)||at(e,t.x2,t.y)||at(e,t.x,t.y2)||at(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 $r(e,t,n,r,i){var a=-3*t+9*n-9*r+3*i,s=e*a+6*t-12*n+6*r;return e*s-3*t+3*n}function jr(e,t,n,r,i,a,s,l,c){c==null&&(c=1),c=c>1?1:c<0?0:c;for(var p=c/2,d=12,g=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],T=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],v=0,x=0;x<d;x++){var C=p*g[x]+p,I=$r(C,e,n,i,s),H=$r(C,t,r,a,l),U=I*I+H*H;v+=T[x]*le.sqrt(U)}return p*v}function Yo(e,t,n,r,i,a,s,l){if(!(Ue(e,n)<ze(i,s)||ze(e,n)>Ue(i,s)||Ue(t,r)<ze(a,l)||ze(t,r)>Ue(a,l))){var c=(e*r-t*n)*(i-s)-(e-n)*(i*l-a*s),p=(e*r-t*n)*(a-l)-(t-r)*(i*l-a*s),d=(e-n)*(a-l)-(t-r)*(i-s);if(d){var g=An(c/d),T=An(p/d),v=+g.toFixed(2),x=+T.toFixed(2);if(!(v<+ze(e,n).toFixed(2)||v>+Ue(e,n).toFixed(2)||v<+ze(i,s).toFixed(2)||v>+Ue(i,s).toFixed(2)||x<+ze(t,r).toFixed(2)||x>+Ue(t,r).toFixed(2)||x<+ze(a,l).toFixed(2)||x>+Ue(a,l).toFixed(2)))return{x:g,y:T}}}}function An(e){return Math.round(e*1e11)/1e11}function Ko(e,t,n){var r=Fr(e),i=Fr(t);if(!Uo(r,i))return[];for(var a=jr(...e),s=jr(...t),l=Vr(e)?1:~~(a/5)||1,c=Vr(t)?1:~~(s/5)||1,p=[],d=[],g={},T=[],v=0;v<l+1;v++){var x=Ir(...e,v/l);p.push({x:x.x,y:x.y,t:v/l})}for(v=0;v<c+1;v++)x=Ir(...t,v/c),d.push({x:x.x,y:x.y,t:v/c});for(v=0;v<l;v++)for(var C=0;C<c;C++){var I=p[v],H=p[v+1],U=d[C],_=d[C+1],y=st(H.x-I.x)<.01?"y":"x",w=st(_.x-U.x)<.01?"y":"x",S=Yo(I.x,I.y,H.x,H.y,U.x,U.y,_.x,_.y),D;if(S){if(D=S.x.toFixed(9)+"#"+S.y.toFixed(9),g[D])continue;g[D]=!0;var E=I.t+st((S[y]-I[y])/(H[y]-I[y]))*(H.t-I.t),k=U.t+st((S[w]-U[w])/(_[w]-U[w]))*(_.t-U.t);E>=0&&E<=1&&k>=0&&k<=1&&T.push({x:S.x,y:S.y,t1:E,t2:k})}}return T}function qo(e,t,n){e=Hr(e),t=Hr(t);for(var r,i,a,s,l,c,p,d,g,T,v=n?0:[],x=0,C=e.length;x<C;x++){var I=e[x];if(I[0]=="M")r=l=I[1],i=c=I[2];else{I[0]=="C"?(g=[r,i,...I.slice(1)],r=g[6],i=g[7]):(g=[r,i,r,i,l,c,l,c],r=l,i=c);for(var H=0,U=t.length;H<U;H++){var _=t[H];if(_[0]=="M")a=p=_[1],s=d=_[2];else{_[0]=="C"?(T=[a,s,..._.slice(1)],a=T[6],s=T[7]):(T=[a,s,a,s,p,d,p,d],a=p,s=d);var y=Ko(g,T);{for(var w=0,S=y.length;w<S;w++)y[w].segment1=x,y[w].segment2=H,y[w].bez1=g,y[w].bez2=T;v=v.concat(y)}}}}}return v}function Go(e){var t=Ot(e);if(t.abs)return bn(t.abs);if((!_n(e)||!_n(e&&e[0]))&&(e=zo(e)),!e||!e.length)return[["M",0,0]];var n=[],r=0,i=0,a=0,s=0,l=0,c;e[0][0]=="M"&&(r=+e[0][1],i=+e[0][2],a=r,s=i,l++,n[0]=["M",r,i]);for(var p,d,g=l,T=e.length;g<T;g++){if(n.push(p=[]),d=e[g],c=d[0],c!=c.toUpperCase())switch(p[0]=c.toUpperCase(),p[0]){case"A":p[1]=d[1],p[2]=d[2],p[3]=d[3],p[4]=d[4],p[5]=d[5],p[6]=+d[6]+r,p[7]=+d[7]+i;break;case"V":p[1]=+d[1]+i;break;case"H":p[1]=+d[1]+r;break;case"M":a=+d[1]+r,s=+d[2]+i;default:for(var v=1,x=d.length;v<x;v++)p[v]=+d[v]+(v%2?r:i)}else for(var C=0,I=d.length;C<I;C++)p[C]=d[C];switch(c=c.toUpperCase(),p[0]){case"Z":r=+a,i=+s;break;case"H":r=p[1];break;case"V":i=p[1];break;case"M":a=p[p.length-2],s=p[p.length-1];default:r=p[p.length-2],i=p[p.length-1]}}return n.toString=Ri,t.abs=bn(n),n}function Vr(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function on(e,t,n,r){return[e,t,n,r,n,r]}function Wr(e,t,n,r,i,a){var s=.3333333333333333,l=2/3;return[s*e+l*n,s*t+l*r,s*i+l*n,s*a+l*r,i,a]}function Ci(e,t,n,r,i,a,s,l,c,p){var d=it*120/180,g=it/180*(+i||0),T=[],v,x=Ho(function(o,u,h){var m=o*le.cos(h)-u*le.sin(h),b=o*le.sin(h)+u*le.cos(h);return{x:m,y:b}});if(p)D=p[0],E=p[1],w=p[2],S=p[3];else{v=x(e,t,-g),e=v.x,t=v.y,v=x(l,c,-g),l=v.x,c=v.y;var C=(e-l)/2,I=(t-c)/2,H=C*C/(n*n)+I*I/(r*r);H>1&&(H=le.sqrt(H),n=H*n,r=H*r);var U=n*n,_=r*r,y=(a==s?-1:1)*le.sqrt(st((U*_-U*I*I-_*C*C)/(U*I*I+_*C*C))),w=y*n*I/r+(e+l)/2,S=y*-r*C/n+(t+c)/2,D=le.asin(((t-S)/r).toFixed(9)),E=le.asin(((c-S)/r).toFixed(9));D=e<w?it-D:D,E=l<w?it-E:E,D<0&&(D=it*2+D),E<0&&(E=it*2+E),s&&D>E&&(D=D-it*2),!s&&E>D&&(E=E-it*2)}var k=E-D;if(st(k)>d){var P=E,B=l,O=c;E=D+d*(s&&E>D?1:-1),l=w+n*le.cos(E),c=S+r*le.sin(E),T=Ci(l,c,n,r,i,0,s,B,O,[E,P,w,S])}k=E-D;var F=le.cos(D),G=le.sin(D),Ne=le.cos(E),re=le.sin(E),X=le.tan(k/4),_e=4/3*n*X,be=4/3*r*X,ae=[e,t],de=[e+_e*G,t-be*F],A=[l+_e*re,c-be*Ne],R=[l,c];if(de[0]=2*ae[0]-de[0],de[1]=2*ae[1]-de[1],p)return[de,A,R].concat(T);T=[de,A,R].concat(T).join().split(",");for(var L=[],ee=0,f=T.length;ee<f;ee++)L[ee]=ee%2?x(T[ee-1],T[ee],g).y:x(T[ee],T[ee+1],g).x;return L}function Xo(e,t,n,r,i,a,s,l){for(var c=[],p=[[],[]],d,g,T,v,x,C,I,H,U=0;U<2;++U){if(U==0?(g=6*e-12*n+6*i,d=-3*e+9*n-9*i+3*s,T=3*n-3*e):(g=6*t-12*r+6*a,d=-3*t+9*r-9*a+3*l,T=3*r-3*t),st(d)<1e-12){if(st(g)<1e-12)continue;v=-T/g,0<v&&v<1&&c.push(v);continue}I=g*g-4*T*d,H=le.sqrt(I),!(I<0)&&(x=(-g+H)/(2*d),0<x&&x<1&&c.push(x),C=(-g-H)/(2*d),0<C&&C<1&&c.push(C))}for(var _=c.length,y=_,w;_--;)v=c[_],w=1-v,p[0][_]=w*w*w*e+3*w*w*v*n+3*w*v*v*i+v*v*v*s,p[1][_]=w*w*w*t+3*w*w*v*r+3*w*v*v*a+v*v*v*l;return p[0][y]=e,p[1][y]=t,p[0][y+1]=s,p[1][y+1]=l,p[0].length=p[1].length=y+2,{x0:ze(...p[0]),y0:ze(...p[1]),x1:Ue(...p[0]),y1:Ue(...p[1])}}function Hr(e){var t=Ot(e);if(t.curve)return bn(t.curve);for(var n=Go(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i=function(v,x,C){var I,H;if(!v)return["C",x.x,x.y,x.x,x.y,x.x,x.y];switch(!(v[0]in{T:1,Q:1})&&(x.qx=x.qy=null),v[0]){case"M":x.X=v[1],x.Y=v[2];break;case"A":v=["C",...Ci(x.x,x.y,...v.slice(1))];break;case"S":C=="C"||C=="S"?(I=x.x*2-x.bx,H=x.y*2-x.by):(I=x.x,H=x.y),v=["C",I,H,...v.slice(1)];break;case"T":C=="Q"||C=="T"?(x.qx=x.x*2-x.qx,x.qy=x.y*2-x.qy):(x.qx=x.x,x.qy=x.y),v=["C",...Wr(x.x,x.y,x.qx,x.qy,v[1],v[2])];break;case"Q":x.qx=v[1],x.qy=v[2],v=["C",...Wr(x.x,x.y,v[1],v[2],v[3],v[4])];break;case"L":v=["C",...on(x.x,x.y,v[1],v[2])];break;case"H":v=["C",...on(x.x,x.y,v[1],x.y)];break;case"V":v=["C",...on(x.x,x.y,x.x,v[1])];break;case"Z":v=["C",...on(x.x,x.y,x.X,x.Y)];break}return v},a=function(v,x){if(v[x].length>7){v[x].shift();for(var C=v[x];C.length;)s[x]="A",v.splice(x++,0,["C",...C.splice(0,6)]);v.splice(x,1),d=n.length}},s=[],l="",c="",p=0,d=n.length;p<d;p++){n[p]&&(l=n[p][0]),l!="C"&&(s[p]=l,p&&(c=s[p-1])),n[p]=i(n[p],r,c),s[p]!="A"&&l=="C"&&(s[p]="C"),a(n,p);var g=n[p],T=g.length;r.x=g[T-2],r.y=g[T-1],r.bx=Br(g[T-4])||r.x,r.by=Br(g[T-3])||r.y}return t.curve=bn(n),n}function Zo(e){return Ke(e)&&_t(e,"waypoints")}function pr(e){return Ke(e)&&_t(e,"labelTarget")}function Jc(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function hn(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function qt(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function Qo(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Jo(e){return hn({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function es(e){for(var t=e.waypoints,n=t.reduce(function(p,d,g){var T=t[g-1];if(T){var v=p[p.length-1],x=v&&v.endLength||0,C=ns(T,d);p.push({start:T,end:d,startLength:x,endLength:x+C,length:C})}return p},[]),r=n.reduce(function(p,d){return p+d.length},0),i=r/2,a=0,s=n[a];s.endLength<i;)s=n[++a];var l=(i-s.startLength)/s.length,c={x:s.start.x+(s.end.x-s.start.x)*l,y:s.start.y+(s.end.y-s.start.y)*l};return c}function Gn(e){return Zo(e)?es(e):Jo(e)}function ef(e,t,n){n=n||0,Ke(n)||(n={x:n,y:n});var r=qt(e),i=qt(t),a=r.bottom+n.y<=i.top,s=r.left-n.x>=i.right,l=r.top-n.y>=i.bottom,c=r.right+n.x<=i.left,p=a?"top":l?"bottom":null,d=c?"left":s?"right":null;return d&&p?p+"-"+d:d||p||"intersect"}function tf(e,t,n){var r=ts(e,t);return r.length===1||r.length===2&&cr(r[0],r[1])<1?hn(r[0]):r.length>1?(r=Da(r,function(i){var a=Math.floor(i.t2*100)||1;return a=100-a,a=(a<10?"0":"")+a,i.segment2+"#"+a}),hn(r[n?0:r.length-1])):null}function ts(e,t){return qo(e,t)}function nf(e){e=e.slice();for(var t=0,n,r,i;e[t];)n=e[t],r=e[t-1],i=e[t+1],cr(n,i)===0||Lo(r,i,n)?e.splice(t,1):t++;return e}function ns(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function dn(e,t){return Math.round(e*t)/t}function zr(e){return Re(e)?e+"px":e}function rs(e){for(;e.parent;)e=e.parent;return e}function is(e){e=V({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Ce(n,{position:"relative",overflow:"hidden",width:zr(e.width),height:zr(e.height)}),t.appendChild(n),n}function Pi(e,t,n){const r=J("g");Fe(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const as="base",Ti=0,os=1,ss={shape:["x","y","width","height"],connection:["waypoints"]};function Y(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._init(e||{})}Y.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"];Y.prototype._init=function(e){const t=this._eventBus,n=this._container=is(e),r=this._svg=J("svg");Q(r,{width:"100%",height:"100%"}),ce(n,r);const i=this._viewport=Pi(r,"viewport");e.deferUpdate&&(this._viewboxChanged=Ba(ut(this._viewboxChanged,this),300)),t.on("diagram.init",()=>{t.fire("canvas.init",{svg:r,viewport:i})}),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)};Y.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport};Y.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=Ai(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox};Y.prototype.getDefaultLayer=function(){return this.getLayer(as,Ti)};Y.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)),typeof t!="undefined"&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group};Y.prototype._getChildIndex=function(e){return Dt(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)};Y.prototype._createLayer=function(e,t){typeof t=="undefined"&&(t=os);const n=this._getChildIndex(t);return{group:Pi(this._viewport,"layer-"+e,n),index:t,visible:!0}};Y.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,r=t.group,i=t.index;if(t.visible)return r;const a=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[a]||null),t.visible=!0,r};Y.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&&(Xt(n),t.visible=!1),n};Y.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Xt(t.group))};Y.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null};Y.prototype.findRoot=function(e){return typeof e=="string"&&(e=this._elementRegistry.get(e)),e?(this._findPlaneForRoot(rs(e))||{}).rootElement:void 0};Y.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})};Y.prototype._findPlaneForRoot=function(e){return $e(this._planes,function(t){return t.rootElement===e})};Y.prototype.getContainer=function(){return this._container};Y.prototype._updateMarker=function(e,t,n){let r;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,r=this._elementRegistry._elements[e.id],r&&(N([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),Fe(i).add(t)):(e.markers.delete(t),Fe(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))};Y.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)};Y.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)};Y.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),e.markers?e.markers.has(t):!1};Y.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)};Y.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))};Y.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 r=this.getLayer(n,Ti);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e};Y.prototype.removeRootElement=function(e){if(typeof e=="string"&&(e=this._elementRegistry.get(e)),!!this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter(function(n){return n.rootElement!==e}),this._rootElement===e&&(this._rootElement=null),e};Y.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};Y.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)};Y.prototype._addRoot=function(e,t){const n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})};Y.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})};Y.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=ss[e];if(!er(n,function(i){return typeof t[i]!="undefined"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)};Y.prototype._setParent=function(e,t,n){Bo(t.children,e,n),e.parent=t};Y.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();const i=this._eventBus,a=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);const s=a.create(e,t,r);return this._elementRegistry.add(t,s),a.update(e,t,s),i.fire(e+".added",{element:t,gfx:s}),t};Y.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)};Y.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)};Y.prototype._removeElement=function(e,t){const n=this._elementRegistry,r=this._graphicsFactory,i=this._eventBus;if(e=n.get(e.id||e),!!e)return i.fire(t+".remove",{element:e}),r.remove(e),No(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e};Y.prototype.removeShape=function(e){return this._removeElement(e,"shape")};Y.prototype.removeConnection=function(e){return this._removeElement(e,"connection")};Y.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)};Y.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()};Y.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})};Y.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let r,i,a,s,l,c,p;if(e)this._changeViewbox(function(){l=Math.min(n.width/e.width,n.height/e.height);const d=this._svg.createSVGMatrix().scale(l).translate(-e.x,-e.y);Kt(t,d)});else return a=this._rootElement?this.getActiveLayer():null,r=a&&a.getBBox()||{},s=Kt(t),i=s?s.matrix:po(),l=dn(i.a,1e3),c=dn(-i.e||0,1e3),p=dn(-i.f||0,1e3),e=this._cachedViewbox={x:c?c/l:0,y:p?p/l:0,width:n.width/l,height:n.height/l,scale:l,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n},e;return e};Y.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=V({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),ki(t,n)}),{x:n.e,y:n.f}};Y.prototype.scrollToElement=function(e,t){let n=100;typeof e=="string"&&(e=this._elementRegistry.get(e));const r=this.findRoot(e);if(r!==this.getRootElement()&&this.setRootElement(r),r===e)return;t||(t={}),typeof t=="number"&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const i=pt(e),a=qt(i),s=this.viewbox(),l=this.zoom();let c,p;s.y+=t.top/l,s.x+=t.left/l,s.width-=(t.right+t.left)/l,s.height-=(t.bottom+t.top)/l;const d=qt(s);if(!(i.width<s.width&&i.height<s.height))c=i.x-s.x,p=i.y-s.y;else{const T=Math.max(0,a.right-d.right),v=Math.min(0,a.left-d.left),x=Math.max(0,a.bottom-d.bottom),C=Math.min(0,a.top-d.top);c=T||v,p=x||C}this.scroll({dx:-c*l,dy:-p*l})};Y.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let n,r;return this._changeViewbox(function(){typeof t!="object"&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t)}),dn(r.a,1e3)};function ki(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}Y.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,r=t.inner;let i,a;return r.x>=0&&r.y>=0&&r.x+r.width<=n.width&&r.y+r.height<=n.height&&!e?a={x:0,y:0,width:Math.max(r.width+r.x,n.width),height:Math.max(r.height+r.y,n.height)}:(i=Math.min(1,n.width/r.width,n.height/r.height),a={x:r.x+(e?r.width/2-n.width/i/2:0),y:r.y+(e?r.height/2-n.height/i/2:0),width:n.width/i,height:n.height/i}),this.viewbox(a),this.viewbox(!1).scale};Y.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),a=n.createSVGPoint();let s,l,c,p,d;c=r.getCTM();const g=c.a;return t?(s=V(a,t),l=s.matrixTransform(c.inverse()),p=i.translate(l.x,l.y).scale(1/g*e).translate(-l.x,-l.y),d=c.multiply(p)):d=i.scale(e),ki(this._viewport,d),d};Y.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}};Y.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;const r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale,a=n.width*t.scale,s=n.height*t.scale;return{x:r,y:i,width:a,height:s}};Y.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Nt="data-element-id";function Me(e){this._elements={},this._eventBus=e}Me.$inject=["eventBus"];Me.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),Q(t,Nt,r),n&&Q(n,Nt,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}};Me.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(Q(r.gfx,Nt,""),r.secondaryGfx&&Q(r.secondaryGfx,Nt,""),delete t[n])};Me.prototype.updateId=function(e,t){this._validateId(t),typeof e=="string"&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),r=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,r)};Me.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&Q(t,Nt,r),t};Me.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&Q(e,Nt);var n=this._elements[t];return n&&n.element};Me.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t};Me.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],a=t[i],s=a.element,l=a.gfx;if(e(s,l))return s}};Me.prototype.getAll=function(){return this.filter(function(e){return e})};Me.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var r=t[n],i=r.element,a=r.gfx;return e(i,a)})};Me.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)};Me.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")};function us(e,t,n,r){var i=n.inverse;return Object.defineProperty(e,"remove",{value:function(a){var s=this.indexOf(a);return s!==-1&&(this.splice(s,1),t.unset(a,i,r)),a}}),Object.defineProperty(e,"contains",{value:function(a){return this.indexOf(a)!==-1}}),Object.defineProperty(e,"add",{value:function(a,s){var l=this.indexOf(a);if(typeof s=="undefined"){if(l!==-1)return;s=this.length}l!==-1&&this.splice(l,1),this.splice(s,0,a),l===-1&&t.set(a,i,r)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function ls(e){return e.__refs_collection===!0}function cs(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Mi(e,t,n){var r=us(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach(function(i){e.set(i,t.inverse,n)})}function fs(e,t,n){var r=t.inverse,i=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return i},set:function(a){if(a!==i){var s=i;i=null,s&&e.unset(s,r,n),i=a,e.set(i,r,n)}}})}function je(e,t){if(!(this instanceof je))return new je(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}je.prototype.bind=function(e,t){if(typeof t=="string"){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Mi(this,t,e):fs(this,t,e)};je.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return ls(n)||Mi(this,t,e),n};je.prototype.ensureBound=function(e,t){cs(e,t)||this.bind(e,t)};je.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)};je.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var hr=new je({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Di=new je({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Ur=new je({name:"attachers",collection:!0},{name:"host"}),Oi=new je({name:"outgoing",collection:!0},{name:"source"}),Ni=new je({name:"incoming",collection:!0},{name:"target"});function Lt(){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)}}),hr.bind(this,"parent"),Di.bind(this,"labels"),Oi.bind(this,"outgoing"),Ni.bind(this,"incoming")}function Zt(){Lt.call(this),hr.bind(this,"children"),Ur.bind(this,"host"),Ur.bind(this,"attachers")}Xe(Zt,Lt);function Bi(){Lt.call(this),hr.bind(this,"children")}Xe(Bi,Zt);function Li(){Zt.call(this),Di.bind(this,"labelTarget")}Xe(Li,Zt);function Ii(){Lt.call(this),Oi.bind(this,"source"),Ni.bind(this,"target")}Xe(Ii,Lt);var ps={connection:Ii,shape:Zt,label:Li,root:Bi};function hs(e,t){var n=ps[e];if(!n)throw new Error("unknown type: <"+e+">");return V(new n,t)}function rf(e){return e instanceof Lt}function It(){this._uid=12}It.prototype.createRoot=function(e){return this.create("root",e)};It.prototype.createLabel=function(e){return this.create("label",e)};It.prototype.createShape=function(e){return this.create("shape",e)};It.prototype.createConnection=function(e){return this.create("connection",e)};It.prototype.create=function(e,t){return t=V({},t||{}),t.id||(t.id=e+"_"+this._uid++),hs(e,t)};var Sn="__fn",Fi=1e3,ds=Array.prototype.slice;function Te(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}Te.prototype.on=function(e,t,n,r){if(e=Pe(e)?e:[e],Ze(t)&&(r=n,n=t,t=Fi),!Re(t))throw new Error("priority must be a number");var i=n;r&&(i=ut(n,r),i[Sn]=n[Sn]||n);var a=this;e.forEach(function(s){a._addListener(s,{priority:t,callback:i,next:null})})};Te.prototype.once=function(e,t,n,r){var i=this;if(Ze(t)&&(r=n,n=t,t=Fi),!Re(t))throw new Error("priority must be a number");function a(){a.__isTomb=!0;var s=n.apply(r,arguments);return i.off(e,a),s}a[Sn]=n,this.on(e,t,a)};Te.prototype.off=function(e,t){e=Pe(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})};Te.prototype.createEvent=function(e){var t=new Qt;return t.init(e),t};Te.prototype.fire=function(e,t){var n,r,i,a;if(a=ds.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(r=this._listeners[e],!!r){t instanceof Qt?n=t:n=this.createEvent(t),a[0]=n;var s=n.type;e!==s&&(n.type=e);try{i=this._invokeListeners(n,a,r)}finally{e!==s&&(n.type=s)}return i===void 0&&n.defaultPrevented&&(i=!1),i}};Te.prototype.handleError=function(e){return this.fire("error",{error:e})===!1};Te.prototype._destroy=function(){this._listeners={}};Te.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r};Te.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=ms(n.callback,t),r!==void 0&&(e.returnValue=r,e.stopPropagation()),r===!1&&e.preventDefault()}catch(i){if(!this.handleError(i))throw console.error("unhandled error in event listener",i),i}return r};Te.prototype._addListener=function(e,t){var n=this._getListeners(e),r;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority<t.priority){t.next=n,r?r.next=t:this._setListeners(e,t);return}r=n,n=n.next}r.next=t};Te.prototype._getListeners=function(e){return this._listeners[e]};Te.prototype._setListeners=function(e,t){this._listeners[e]=t};Te.prototype._removeListener=function(e,t){var n=this._getListeners(e),r,i,a;if(!t){this._setListeners(e,null);return}for(;n;)r=n.next,a=n.callback,(a===t||a[Sn]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function Qt(){}Qt.prototype.stopPropagation=function(){this.cancelBubble=!0};Qt.prototype.preventDefault=function(){this.defaultPrevented=!0};Qt.prototype.init=function(e){V(this,e||{})};function ms(e,t){return e.apply(null,t)}function ys(e){return e.childNodes[0]}function gs(e){return e.parentNode.childNodes[1]}function Hn(e,t,n,r,i){var a=Ht();a.setTranslate(t,n);var s=Ht();s.setRotate(r||0,0,0);var l=Ht();l.setScale(1,1),Kt(e,[a,s,l])}function $i(e,t,n){var r=Ht();r.setTranslate(t,n),Kt(e,r)}function vs(e,t){var n=Ht();n.setRotate(t,0,0),Kt(e,n)}function De(e,t){this._eventBus=e,this._elementRegistry=t}De.$inject=["eventBus","elementRegistry"];De.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=gs(t),n||(n=J("g"),Fe(n).add("djs-children"),ce(t.parentNode,n))):n=t,n};De.prototype._clear=function(e){var t=ys(e);return hi(t),t};De.prototype._createContainer=function(e,t,n,r){var i=J("g");Fe(i).add("djs-group"),typeof n!="undefined"?ji(i,t,t.childNodes[n]):ce(t,i);var a=J("g");Fe(a).add("djs-element"),Fe(a).add("djs-"+e),r&&Fe(a).add("djs-frame"),ce(i,a);var s=J("g");return Fe(s).add("djs-visual"),ce(a,s),a};De.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,Si(t))};De.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=Dt(e,function(i,a){return a.parent&&(i[a.parent.id]=a.parent),i},{}),N(r,function(i){var a=i.children;if(a){var s=t._getChildrenContainer(i);N(a.slice().reverse(),function(l){var c=n.getGraphics(l);ji(c.parentNode,s)})}})};De.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})};De.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)};De.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})};De.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)};De.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),$i(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?Q(n,"display","none"):Q(n,"display","block")}};De.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);Xt(t.parentNode)};function ji(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const Es={__depends__:[Oo],__init__:["canvas"],canvas:["type",Y],elementRegistry:["type",Me],elementFactory:["type",It],eventBus:["type",Te],graphicsFactory:["type",De]};function ws(e){var t=new xi(e);return t.init(),t}function xs(e){e=e||{};var t={config:["value",e]},n=[t,Es].concat(e.modules||[]);return ws(n)}function mt(e,t){this._injector=t||xs(e),this.get("eventBus").fire("diagram.init")}mt.prototype.get=function(e,t){return this._injector.get(e,t)};mt.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)};mt.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")};mt.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function dr(){}dr.prototype.get=function(e){return this.$model.properties.get(this,e)};dr.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function Vi(e,t){this.model=e,this.properties=t}Vi.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(dr.prototype);N(e.properties,function(s){!s.isMany&&s.default!==void 0&&(r[s.name]=s.default)}),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function a(s){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),N(s,ut(function(l,c){this.set(c,l)},this))}return a.prototype=r,a.hasType=r.$instanceOf=this.model.hasType,n.defineModel(a,t),n.defineDescriptor(a,e),a};var _s={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},Wi={String:function(e){return e},Boolean:function(e){return e==="true"},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function mr(e,t){var n=Wi[e];return n?n(t):t}function Xn(e){return!!_s[e]}function Hi(e){return!!Wi[e]}function ge(e,t){var n=e.split(/:/),r,i;if(n.length===1)r=e,i=t;else if(n.length===2)r=n[1],i=n[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(i?i+":":"")+r,{name:e,prefix:i,localName:r}}function Oe(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}Oe.prototype.build=function(){return Ia(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])};Oe.prototype.addProperty=function(e,t,n){typeof t=="boolean"&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var r=this.properties;t!==void 0?r.splice(t,0,e):r.push(e)};Oe.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=this.properties,a=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 l=i.indexOf(e);if(l===-1)throw new Error("property <"+r.name+"> not found in property list");i.splice(l,1),this.addProperty(t,n?void 0:l,s),a[r.name]=a[r.localName]=t};Oe.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),a=ge(i[0],r),s=ge(i[1],a.prefix).name,l=this.propertiesByName[s];if(l)this.replaceProperty(l,e,n);else throw new Error("refined property <"+s+"> not found");delete e.redefines};Oe.prototype.addNamedProperty=function(e,t){var n=e.ns,r=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),r[n.name]=r[n.localName]=e};Oe.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]};Oe.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};Oe.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};Oe.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)};Oe.prototype.assertNotDefined=function(e,t){var n=e.name,r=this.propertiesByName[n];if(r)throw new Error("property <"+n+"> already defined; override of <"+r.definedBy.ns.name+"#"+r.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")};Oe.prototype.hasProperty=function(e){return this.propertiesByName[e]};Oe.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(N(e.properties,ut(function(a){a=V({},a,{name:a.ns.localName,inherited:t}),Object.defineProperty(a,"definedBy",{value:e});var s=a.replaces,l=a.redefines;s||l?this.redefineProperty(a,s||l,s):(a.isBody&&this.setBodyProperty(a),a.isId&&this.setIdProperty(a),this.addProperty(a))},this)),r.push(e),n[i]=e)};function yt(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,N(e,ut(this.registerPackage,this))}yt.prototype.getPackage=function(e){return this.packageMap[e]};yt.prototype.getPackages=function(){return this.packages};yt.prototype.registerPackage=function(e){e=V({},e);var t=this.packageMap;Yr(t,e,"prefix"),Yr(t,e,"uri"),N(e.types,ut(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)};yt.prototype.registerType=function(e,t){e=V({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:V(e.meta||{})});var n=ge(e.name,t.prefix),r=n.name,i={};N(e.properties,ut(function(a){var s=ge(a.name,n.prefix),l=s.name;Xn(a.type)||(a.type=ge(a.type,s.prefix).name),V(a,{ns:s,name:l}),i[l]=a},this)),V(e,{ns:n,name:r,propertiesByName:i}),N(e.extends,ut(function(a){var s=ge(a,n.prefix),l=this.typeMap[s.name];l.traits=l.traits||[],l.traits.push(r)},this)),this.definePackage(e,t),this.typeMap[r]=e};yt.prototype.mapTypes=function(e,t,n){var r=Xn(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function a(c,p){var d=ge(c,Xn(c)?"":e.prefix);i.mapTypes(d,t,p)}function s(c){return a(c,!0)}function l(c){return a(c,!1)}if(!r)throw new Error("unknown type <"+e.name+">");N(r.superClass,n?s:l),t(r,!n),N(r.traits,s)};yt.prototype.getEffectiveDescriptor=function(e){var t=ge(e),n=new Oe(t);this.mapTypes(t,function(i,a){n.addTrait(i,a)});var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r};yt.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function Yr(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function At(e){this.model=e}At.prototype.set=function(e,t,n){if(!qe(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;bs(n)?r?delete e[i]:delete e.$attrs[Zn(t)]:r?i in e?e[i]=n:zi(e,r,n):e.$attrs[Zn(t)]=n};At.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Zn(t)];var r=n.name;return!e[r]&&n.isMany&&zi(e,n,[]),e[r]};At.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=V({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)};At.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})};At.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})};At.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;const i=n.config.strict;if(typeof i!="undefined"){const a=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw a;typeof console!="undefined"&&console.warn(a)}return null};function bs(e){return typeof e=="undefined"}function zi(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Zn(e){return e.replace(/^:/,"")}function Ve(e,t={}){this.properties=new At(this),this.factory=new Vi(this,this.properties),this.registry=new yt(e,this.properties),this.typeCache={},this.config=t}Ve.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)};Ve.prototype.getType=function(e){var t=this.typeCache,n=qe(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r};Ve.prototype.createAny=function(e,t,n){var r=ge(e),i={$type:e,$instanceOf:function(s){return s===this.$type},get:function(s){return this[s]},set:function(s,l){La(this,[s],l)}},a={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(i,a),this.properties.defineModel(i,this),this.properties.define(i,"get",{enumerable:!1,writable:!0}),this.properties.define(i,"set",{enumerable:!1,writable:!0}),this.properties.define(i,"$parent",{enumerable:!1,writable:!0}),this.properties.define(i,"$instanceOf",{enumerable:!1,writable:!0}),N(n,function(s,l){Ke(s)&&s.value!==void 0?i[s.name]=s.value:i[l]=s}),i};Ve.prototype.getPackage=function(e){return this.registry.getPackage(e)};Ve.prototype.getPackages=function(){return this.registry.getPackages()};Ve.prototype.getElementDescriptor=function(e){return e.$descriptor};Ve.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName};Ve.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]};Ve.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var Kr=String.fromCharCode,As=Object.prototype.hasOwnProperty,Ss=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,Ut={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(Ut).forEach(function(e){Ut[e.toUpperCase()]=Ut[e]});function Rs(e,t,n,r){return r?As.call(Ut,r)?Ut[r]:"&"+r+";":Kr(t||parseInt(n,16))}function vt(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(Ss,Rs):e}var Cs="http://www.w3.org/2001/XMLSchema-instance",Ps="xsi",qr="xsi:type",Gr="non-whitespace outside of root node";function Tt(e){return new Error(e)}function Xr(e){return"missing namespace for prefix <"+e+">"}function sn(e){return{get:e,enumerable:!0}}function Ts(e){var t={},n;for(n in e)t[n]=e[n];return t}function Qn(e){return e+"$uri"}function ks(e){var t={},n,r;for(n in e)r=e[n],t[r]=r,t[Qn(r)]=n;return t}function Zr(){return{line:0,column:0}}function Ms(e){throw e}function Ui(e){if(!this)return new Ui(e);var t=e&&e.proxy,n,r,i,a,s=Ms,l,c,p,d,g=Zr,T=!1,v=!1,x=null,C=!1,I;function H(y){y instanceof Error||(y=Tt(y)),x=y,s(y,g)}function U(y){l&&(y instanceof Error||(y=Tt(y)),l(y,g))}this.on=function(y,w){if(typeof w!="function")throw Tt("required args <name, cb>");switch(y){case"openTag":r=w;break;case"text":n=w;break;case"closeTag":i=w;break;case"error":s=w;break;case"warn":l=w;break;case"cdata":a=w;break;case"attention":d=w;break;case"question":p=w;break;case"comment":c=w;break;default:throw Tt("unsupported event: "+y)}return this},this.ns=function(y){if(typeof y=="undefined"&&(y={}),typeof y!="object")throw Tt("required args <nsMap={}>");var w={},S;for(S in y)w[S]=y[S];return w[Cs]=Ps,v=!0,I=w,this},this.parse=function(y){if(typeof y!="string")throw Tt("required args <xml=string>");return x=null,_(y),g=Zr,C=!1,x},this.stop=function(){C=!0};function _(y){var w=v?[]:null,S=v?ks(I):null,D,E=[],k=0,P=!1,B=!1,O=0,F=0,G,Ne,re,X,_e,be,ae,de,A,R="",L=0,ee;function f(){if(ee!==null)return ee;var u,h,m,b=v&&S.xmlns,W=v&&T?[]:null,j=L,K=R,he=K.length,Be,Ae,ue,Le,te,rt={},nn={},ke,z,ne;e:for(;j<he;j++)if(ke=!1,z=K.charCodeAt(j),!(z===32||z<14&&z>8)){for((z<65||z>122||z>90&&z<97)&&z!==95&&z!==58&&(U("illegal first char attribute name"),ke=!0),ne=j+1;ne<he;ne++)if(z=K.charCodeAt(ne),!(z>96&&z<123||z>64&&z<91||z>47&&z<59||z===46||z===45||z===95)){if(z===32||z<14&&z>8){U("missing attribute value"),j=ne;continue e}if(z===61)break;U("illegal attribute name char"),ke=!0}if(te=K.substring(j,ne),te==="xmlns:xmlns"&&(U("illegal declaration of xmlns"),ke=!0),z=K.charCodeAt(ne+1),z===34)ne=K.indexOf('"',j=ne+2),ne===-1&&(ne=K.indexOf("'",j),ne!==-1&&(U("attribute value quote missmatch"),ke=!0));else if(z===39)ne=K.indexOf("'",j=ne+2),ne===-1&&(ne=K.indexOf('"',j),ne!==-1&&(U("attribute value quote missmatch"),ke=!0));else for(U("missing attribute value quotes"),ke=!0,ne=ne+1;ne<he&&(z=K.charCodeAt(ne+1),!(z===32||z<14&&z>8));ne++);for(ne===-1&&(U("missing closing quotes"),ne=he,ke=!0),ke||(ue=K.substring(j,ne)),j=ne;ne+1<he&&(z=K.charCodeAt(ne+1),!(z===32||z<14&&z>8));ne++)j===ne&&(U("illegal character after attribute end"),ke=!0);if(j=ne+1,ke)continue e;if(te in nn){U("attribute <"+te+"> already defined");continue}if(nn[te]=!0,!v){rt[te]=ue;continue}if(T){if(Ae=te==="xmlns"?"xmlns":te.charCodeAt(0)===120&&te.substr(0,6)==="xmlns:"?te.substr(6):null,Ae!==null){if(u=vt(ue),h=Qn(Ae),Le=I[u],!Le){if(Ae==="xmlns"||h in S&&S[h]!==u)do Le="ns"+k++;while(typeof S[Le]!="undefined");else Le=Ae;I[u]=Le}S[Ae]!==Le&&(Be||(S=Ts(S),Be=!0),S[Ae]=Le,Ae==="xmlns"&&(S[Qn(Le)]=u,b=Le),S[h]=u),rt[te]=ue;continue}W.push(te,ue);continue}if(z=te.indexOf(":"),z===-1){rt[te]=ue;continue}if(!(m=S[te.substring(0,z)])){U(Xr(te.substring(0,z)));continue}te=b===m?te.substr(z+1):m+te.substr(z),te===qr&&(z=ue.indexOf(":"),z!==-1?(m=ue.substring(0,z),m=S[m]||m,ue=m+ue.substring(z)):ue=b+":"+ue),rt[te]=ue}if(T)for(j=0,he=W.length;j<he;j++){if(te=W[j++],ue=W[j],z=te.indexOf(":"),z!==-1){if(!(m=S[te.substring(0,z)])){U(Xr(te.substring(0,z)));continue}te=b===m?te.substr(z+1):m+te.substr(z),te===qr&&(z=ue.indexOf(":"),z!==-1?(m=ue.substring(0,z),m=S[m]||m,ue=m+ue.substring(z)):ue=b+":"+ue)}rt[te]=ue}return ee=rt}function o(){for(var u=/(\r\n|\r|\n)/g,h=0,m=0,b=0,W=F,j,K;O>=b&&(j=u.exec(y),!(!j||(W=j[0].length+j.index,W>O)));)h+=1,b=W;return O==-1?(m=W,K=y.substring(F)):F===0?K=y.substring(F,O):(m=O-b,K=F==-1?y.substring(O):y.substring(O,F+1)),{data:K,line:h,column:m}}for(g=o,t&&(A=Object.create({},{name:sn(function(){return ae}),originalName:sn(function(){return de}),attrs:sn(f),ns:sn(function(){return S})}));F!==-1;){if(y.charCodeAt(F)===60?O=F:O=y.indexOf("<",F),O===-1){if(E.length)return H("unexpected end of file");if(F===0)return H("missing start tag");F<y.length&&y.substring(F).trim()&&U(Gr);return}if(F!==O){if(E.length){if(n&&(n(y.substring(F,O),vt,g),C))return}else if(y.substring(F,O).trim()&&(U(Gr),C))return}if(X=y.charCodeAt(O+1),X===33){if(re=y.charCodeAt(O+2),re===91&&y.substr(O+3,6)==="CDATA["){if(F=y.indexOf("]]>",O),F===-1)return H("unclosed cdata");if(a&&(a(y.substring(O+9,F),g),C))return;F+=3;continue}if(re===45&&y.charCodeAt(O+3)===45){if(F=y.indexOf("-->",O),F===-1)return H("unclosed comment");if(c&&(c(y.substring(O+4,F),vt,g),C))return;F+=3;continue}}if(X===63){if(F=y.indexOf("?>",O),F===-1)return H("unclosed question");if(p&&(p(y.substring(O,F+2),g),C))return;F+=2;continue}for(G=O+1;;G++){if(_e=y.charCodeAt(G),isNaN(_e))return F=-1,H("unclosed tag");if(_e===34)re=y.indexOf('"',G+1),G=re!==-1?re:G;else if(_e===39)re=y.indexOf("'",G+1),G=re!==-1?re:G;else if(_e===62){F=G;break}}if(X===33){if(d&&(d(y.substring(O,F+1),vt,g),C))return;F+=1;continue}if(ee={},X===47){if(P=!1,B=!0,!E.length)return H("missing open tag");if(G=ae=E.pop(),re=O+2+G.length,y.substring(O+2,re)!==G)return H("closing tag mismatch");for(;re<F;re++)if(X=y.charCodeAt(re),!(X===32||X>8&&X<14))return H("close tag")}else{if(y.charCodeAt(F-1)===47?(G=ae=y.substring(O+1,F-1),P=!0,B=!0):(G=ae=y.substring(O+1,F),P=!0,B=!1),!(X>96&&X<123||X>64&&X<91||X===95||X===58))return H("illegal first char nodeName");for(re=1,Ne=G.length;re<Ne;re++)if(X=G.charCodeAt(re),!(X>96&&X<123||X>64&&X<91||X>47&&X<59||X===45||X===95||X==46)){if(X===32||X<14&&X>8){ae=G.substring(0,re),ee=null;break}return H("invalid nodeName")}B||E.push(ae)}if(v){if(D=S,P&&(B||w.push(D),ee===null&&(T=G.indexOf("xmlns",re)!==-1)&&(L=re,R=G,f(),T=!1)),de=ae,X=ae.indexOf(":"),X!==-1){if(be=S[ae.substring(0,X)],!be)return H("missing namespace on <"+de+">");ae=ae.substr(X+1)}else be=S.xmlns;be&&(ae=be+":"+ae)}if(P&&(L=re,R=G,r&&(t?r(A,vt,B,g):r(ae,f,vt,B,g),C)))return;if(B){if(i&&(i(t?A:ae,vt,P,g),C))return;v&&(P?S=D:S=w.pop())}F+=1}}}function Yi(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Ds={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Mn="xsi:type";function Ki(e){return e.xml&&e.xml.serialize}function qi(e){return Ki(e)===Mn}function Os(e){return Ki(e)==="property"}function Ns(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Gi(e,t){return Yi(t)?e.prefix+":"+Ns(e.localName):e.name}function Bs(e,t){var n=e.name,r=e.localName,i=t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function Ls(e,t){var n=ge(e),r=t.getPackage(n.prefix);return Bs(n,r)}function ht(e){return new Error(e)}function Qe(e){return e.$descriptor}function Is(e){V(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw ht("expected element");var n=this.elementsById,r=Qe(t),i=r.idProperty,a;if(i&&(a=t.get(i.name),a)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(a))throw new Error("illegal ID <"+a+">");if(n[a])throw ht("duplicate ID <"+a+">");n[a]=t}},this.addWarning=function(t){this.warnings.push(t)}}function Jt(){}Jt.prototype.handleEnd=function(){};Jt.prototype.handleText=function(){};Jt.prototype.handleNode=function(){};function yr(){}yr.prototype=Object.create(Jt.prototype);yr.prototype.handleNode=function(){return this};function Ft(){}Ft.prototype=Object.create(Jt.prototype);Ft.prototype.handleText=function(e){this.body=(this.body||"")+e};function en(e,t){this.property=e,this.context=t}en.prototype=Object.create(Ft.prototype);en.prototype.handleNode=function(e){if(this.element)throw ht("expected no sub nodes");return this.element=this.createReference(e),this};en.prototype.handleEnd=function(){this.element.id=this.body};en.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function gr(e,t){this.element=t,this.propertyDesc=e}gr.prototype=Object.create(Ft.prototype);gr.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=mr(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function Dn(){}Dn.prototype=Object.create(Ft.prototype);Dn.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};function ve(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}ve.prototype=Object.create(Dn.prototype);ve.prototype.addReference=function(e){this.context.addReference(e)};ve.prototype.handleText=function(e){var t=this.element,n=Qe(t),r=n.bodyProperty;if(!r)throw ht("unexpected body text <"+e+">");Ft.prototype.handleText.call(this,e)};ve.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Qe(t),r=n.bodyProperty;r&&e!==void 0&&(e=mr(r.type,e),t.set(r.name,e))};ve.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=Qe(n),i=this.context,a=new n({}),s=this.model,l;return N(t,function(c,p){var d=r.propertiesByName[p],g;d&&d.isReference?d.isMany?(g=c.split(" "),N(g,function(T){i.addReference({element:a,property:d.ns.name,id:T})})):i.addReference({element:a,property:d.ns.name,id:c}):(d?c=mr(d.type,c):p!=="xmlns"&&(l=ge(p,r.ns.prefix),s.getPackage(l.prefix)&&i.addWarning({message:"unknown attribute <"+p+">",element:a,property:p,value:c})),a.set(p,c))}),a};ve.prototype.getPropertyForNode=function(e){var t=e.name,n=ge(t),r=this.type,i=this.model,a=Qe(r),s=n.name,l=a.propertiesByName[s],c,p;if(l&&!l.isAttr)return qi(l)&&(c=e.attributes[Mn],c)?(c=Ls(c,i),p=i.getType(c),V({},l,{effectiveType:Qe(p).name})):l;var d=i.getPackage(n.prefix);if(d){if(c=Gi(n,d),p=i.getType(c),l=$e(a.properties,function(g){return!g.isVirtual&&!g.isReference&&!g.isAttribute&&p.hasType(g.type)}),l)return V({},l,{effectiveType:Qe(p).name})}else if(l=$e(a.properties,function(g){return!g.isReference&&!g.isAttribute&&g.type==="Element"}),l)return l;throw ht("unrecognized element <"+n.name+">")};ve.prototype.toString=function(){return"ElementDescriptor["+Qe(this.type).name+"]"};ve.prototype.valueHandler=function(e,t){return new gr(e,t)};ve.prototype.referenceHandler=function(e){return new en(e,this.context)};ve.prototype.handler=function(e){return e==="Element"?new Bt(this.model,e,this.context):new ve(this.model,e,this.context)};ve.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,Hi(n))return this.valueHandler(t,r);t.isReference?i=this.referenceHandler(t).handleNode(e):i=this.handler(n).handleNode(e);var a=i.element;return a!==void 0&&(t.isMany?r.get(t.name).push(a):r.set(t.name,a),t.isReference?(V(a,{element:r}),this.context.addReference(a)):a.$parent=r),i};function vr(e,t,n){ve.call(this,e,t,n)}vr.prototype=Object.create(ve.prototype);vr.prototype.createElement=function(e){var t=e.name,n=ge(t),r=this.model,i=this.type,a=r.getPackage(n.prefix),s=a&&Gi(n,a)||t;if(!i.hasType(s))throw ht("unexpected element <"+e.originalName+">");return ve.prototype.createElement.call(this,e)};function Bt(e,t,n){this.model=e,this.context=n}Bt.prototype=Object.create(Dn.prototype);Bt.prototype.createElement=function(e){var t=e.name,n=ge(t),r=n.prefix,i=e.ns[r+"$uri"],a=e.attributes;return this.model.createAny(t,i,a)};Bt.prototype.handleChild=function(e){var t=new Bt(this.model,"Element",this.context).handleNode(e),n=this.element,r=t.element,i;return r!==void 0&&(i=n.$children=n.$children||[],i.push(r),r.$parent=n),t};Bt.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Er(e){e instanceof Ve&&(e={model:e}),V(this,{lax:!1},e)}Er.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof ve?(r=t,t={}):typeof t=="string"?(r=this.handler(t),t={}):typeof r=="string"&&(r=this.handler(r));var i=this.model,a=this.lax,s=new Is(V({},t,{rootHandler:r})),l=new Ui({proxy:!0}),c=Fs();r.context=s,c.push(r);function p(w,S,D){var E=S(),k=E.line,P=E.column,B=E.data;B.charAt(0)==="<"&&B.indexOf(" ")!==-1&&(B=B.slice(0,B.indexOf(" "))+">");var O="unparsable content "+(B?B+" ":"")+`detected
line: `+k+`
column: `+P+`
nested error: `+w.message;if(D)return s.addWarning({message:O,error:w}),!0;throw ht(O)}function d(w,S){return p(w,S,!0)}function g(){var w=s.elementsById,S=s.references,D,E;for(D=0;E=S[D];D++){var k=E.element,P=w[E.id],B=Qe(k).propertiesByName[E.property];if(P||s.addWarning({message:"unresolved reference <"+E.id+">",element:E.element,property:E.property,value:E.id}),B.isMany){var O=k.get(B.name),F=O.indexOf(E);F===-1&&(F=O.length),P?O[F]=P:O.splice(F,1)}else k.set(B.name,P)}}function T(){c.pop().handleEnd()}var v=/^<\?xml /i,x=/ encoding="([^"]+)"/i,C=/^utf-8$/i;function I(w){if(v.test(w)){var S=x.exec(w),D=S&&S[1];!D||C.test(D)||s.addWarning({message:"unsupported document encoding <"+D+">, falling back to UTF-8"})}}function H(w,S){var D=c.peek();try{c.push(D.handleNode(w))}catch(E){p(E,S,a)&&c.push(new yr)}}function U(w,S){try{c.peek().handleText(w)}catch(D){d(D,S)}}function _(w,S){w.trim()&&U(w,S)}var y=i.getPackages().reduce(function(w,S){return w[S.uri]=S.prefix,w},{"http://www.w3.org/XML/1998/namespace":"xml"});return l.ns(y).on("openTag",function(w,S,D,E){var k=w.attrs||{},P=Object.keys(k).reduce(function(O,F){var G=S(k[F]);return O[F]=G,O},{}),B={name:w.name,originalName:w.originalName,attributes:P,ns:w.ns};H(B,E)}).on("question",I).on("closeTag",T).on("cdata",U).on("text",function(w,S,D){_(S(w),D)}).on("error",p).on("warn",d),new Promise(function(w,S){var D;try{l.parse(e),g()}catch(O){D=O}var E=r.element;!D&&!E&&(D=ht("failed to parse document as <"+r.type.$descriptor.name+">"));var k=s.warnings,P=s.references,B=s.elementsById;return D?(D.warnings=k,S(D)):w({rootElement:E,elementsById:B,references:P,warnings:k})})};Er.prototype.handler=function(e){return new vr(this.model,e)};function Fs(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var $s=`<?xml version="1.0" encoding="UTF-8"?>
`,js=/<|>|'|"|&|\n\r|\n/g,Xi=/<|>|&/g;function Vs(e){var t={},n={},r={},i=[],a=[];this.byUri=function(s){return n[s]||e&&e.byUri(s)},this.add=function(s,l){n[s.uri]=s,l?i.push(s):a.push(s),this.mapPrefix(s.prefix,s.uri)},this.uriByPrefix=function(s){return t[s||"xmlns"]},this.mapPrefix=function(s,l){t[s||"xmlns"]=l},this.getNSKey=function(s){return s.prefix!==void 0?s.uri+"|"+s.prefix:s.uri},this.logUsed=function(s){var l=s.uri,c=this.getNSKey(s);r[c]=this.byUri(l),e&&e.logUsed(s)},this.getUsed=function(s){function l(d){var g=c.getNSKey(d);return r[g]}var c=this,p=[].concat(i,a);return p.filter(l)}}function Ws(e){return e.charAt(0).toLowerCase()+e.slice(1)}function Hs(e,t){return Yi(t)?Ws(e):e}function Zi(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Qi(e){return qe(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function zs(e){return e.getUsed().filter(function(t){return t.prefix!=="xml"}).map(function(t){var n="xmlns"+(t.prefix?":"+t.prefix:"");return{name:n,value:t.uri}})}function Us(e,t){return t.isGeneric?V({localName:t.ns.localName},e):V({localName:Hs(t.ns.localName,t.$pkg)},e)}function Ys(e,t){return V({localName:t.ns.localName},e)}function Ks(e){var t=e.$descriptor;return wt(t.properties,function(n){var r=n.name;if(n.isVirtual||!_t(e,r))return!1;var i=e[r];return i===n.default||i===null?!1:n.isMany?i.length:!0})}var qs={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Gs={"<":"lt",">":"gt","&":"amp"};function Ji(e,t,n){return e=qe(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function Xs(e){return Ji(e,js,qs)}function Zs(e){return Ji(e,Xi,Gs)}function Qs(e){return wt(e,function(t){return t.isAttr})}function Js(e){return wt(e,function(t){return!t.isAttr})}function wr(e){this.tagName=e}wr.prototype.build=function(e){return this.element=e,this};wr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()};function xt(){}xt.prototype.serializeValue=xt.prototype.serializeTo=function(e){e.append(this.escape?Zs(this.value):this.value)};xt.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(Xi)!==-1&&(this.escape=!0),this};function xr(e){this.tagName=e}Zi(xr,xt);xr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()};function se(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}se.prototype.build=function(e){this.element=e;var t=e.$descriptor,n=this.propertyDescriptor,r,i,a=t.isGeneric;return a?r=this.parseGeneric(e):r=this.parseNsAttributes(e),n?this.ns=this.nsPropertyTagName(n):this.ns=this.nsTagName(t),this.tagName=this.addTagName(this.ns),a||(i=Ks(e),this.parseAttributes(Qs(i)),this.parseContainments(Js(i))),this.parseGenericAttributes(e,r),this};se.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Us(t,e)};se.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Ys(t,e)};se.prototype.isLocalNs=function(e){return e.uri===this.ns.uri};se.prototype.nsAttributeName=function(e){var t;if(qe(e)?t=ge(e):t=e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:V({localName:t.localName},n)};se.prototype.parseGeneric=function(e){var t=this,n=this.body,r=[];return N(e,function(i,a){var s;a==="$body"?n.push(new xt().build({type:"String"},i)):a==="$children"?N(i,function(l){n.push(new se(t).build(l))}):a.indexOf("$")!==0&&(s=t.parseNsAttribute(e,a,i),s&&r.push({name:a,value:i}))}),r};se.prototype.parseNsAttribute=function(e,t,n){var r=e.$model,i=ge(t),a;if(i.prefix==="xmlns"&&(a={prefix:i.localName,uri:n}),!i.prefix&&i.localName==="xmlns"&&(a={uri:n}),!a)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(a,!0,!0);else{var s=this.logNamespaceUsed(a,!0);this.getNamespaces().logUsed(s)}};se.prototype.parseNsAttributes=function(e,t){var n=this,r=e.$attrs,i=[];return N(r,function(a,s){var l=n.parseNsAttribute(e,s,a);l&&i.push(l)}),i};se.prototype.parseGenericAttributes=function(e,t){var n=this;N(t,function(r){if(r.name!==Mn)try{n.addAttribute(n.nsAttributeName(r.name),r.value)}catch(i){console.warn("missing namespace information for ",r.name,"=",r.value,"on",e,i)}})};se.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;N(e,function(i){var a=r.get(i.name),s=i.isReference,l=i.isMany;if(l||(a=[a]),i.isBody)n.push(new xt().build(i,a[0]));else if(Hi(i.type))N(a,function(d){n.push(new xr(t.addTagName(t.nsPropertyTagName(i))).build(i,d))});else if(s)N(a,function(d){n.push(new wr(t.addTagName(t.nsPropertyTagName(i))).build(d))});else{var c=qi(i),p=Os(i);N(a,function(d){var g;c?g=new On(t,i):p?g=new se(t,i):g=new se(t),n.push(g.build(d))})}})};se.prototype.getNamespaces=function(e){var t=this.namespaces,n=this.parent,r;return t||(r=n&&n.getNamespaces(),e||!r?this.namespaces=t=new Vs(r):t=r),t};se.prototype.logNamespace=function(e,t,n){var r=this.getNamespaces(n),i=e.uri,a=e.prefix,s=r.byUri(i);return(!s||n)&&r.add(e,t),r.mapPrefix(a,i),e};se.prototype.logNamespaceUsed=function(e,t){var n=this.element,r=n.$model,i=this.getNamespaces(t),a=e.prefix,s=e.uri,l,c,p;if(!a&&!s)return{localName:e.localName};if(p=Ds[a]||r&&(r.getPackage(a)||{}).uri,s=s||p||i.uriByPrefix(a),!s)throw new Error("no namespace uri given for prefix <"+a+">");if(e=i.byUri(s),!e){for(l=a,c=1;i.uriByPrefix(l);)l=a+"_"+c++;e=this.logNamespace({prefix:l,uri:s},p===s)}return a&&i.mapPrefix(a,s),e};se.prototype.parseAttributes=function(e){var t=this,n=this.element;N(e,function(r){var i=n.get(r.name);if(r.isReference)if(!r.isMany)i=i.id;else{var a=[];N(i,function(s){a.push(s.id)}),i=a.join(" ")}t.addAttribute(t.nsAttributeName(r),i)})};se.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),Qi(e)};se.prototype.addAttribute=function(e,t){var n=this.attrs;qe(t)&&(t=Xs(t));var r=Ta(n,function(a){return a.name.localName===e.localName&&a.name.uri===e.uri&&a.name.prefix===e.prefix}),i={name:e,value:t};r!==-1?n.splice(r,1,i):n.push(i)};se.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=zs(n).concat(t)),N(t,function(r){e.append(" ").append(Qi(r.name)).append('="').append(r.value).append('"')})};se.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==xt;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),N(this.body,function(r){r.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()};function On(e,t){se.call(this,e,t)}Zi(On,se);On.prototype.parseNsAttributes=function(e){var t=se.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var r=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var i=e.$model.getPackage(r.uri),a=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(Mn),(r.prefix?r.prefix+":":"")+a+n.ns.localName),t};On.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function eu(){this.value="",this.write=function(e){this.value+=e}}function tu(e,t){var n=[""];this.append=function(r){return e.write(r),this},this.appendNewLine=function(){return t&&e.write(`
`),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 nu(e){e=V({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new eu,a=new tu(i,e.format);if(e.preamble&&a.append($s),new se().build(n).serializeTo(a),!r)return i.value}return{toXML:t}}function Nn(e,t){Ve.call(this,e,t)}Nn.prototype=Object.create(Ve.prototype);Nn.prototype.fromXML=function(e,t,n){qe(t)||(n=t,t="bpmn:Definitions");var r=new Er(V({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)};Nn.prototype.toXML=function(e,t){var n=new nu(t);return new Promise(function(r,i){try{var a=n.toXML(e);return r({xml:a})}catch(s){return i(s)}})};var ru="BPMN20",iu="http://www.omg.org/spec/BPMN/20100524/MODEL",au="bpmn",ou=[],su=[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],uu=[{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"}]}],lu={tagAlias:"lowerCase",typePrefix:"t"},cu={name:ru,uri:iu,prefix:au,associations:ou,types:su,enumerations:uu,xml:lu},fu="BPMNDI",pu="http://www.omg.org/spec/BPMN/20100524/DI",hu="bpmndi",du=[{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"]}],mu=[{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"}]}],yu=[],gu={name:fu,uri:pu,prefix:hu,types:du,enumerations:mu,associations:yu},vu="DC",Eu="http://www.omg.org/spec/DD/20100524/DC",wu="dc",xu=[{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}]}],_u=[],bu={name:vu,uri:Eu,prefix:wu,types:xu,associations:_u},Au="DI",Su="http://www.omg.org/spec/DD/20100524/DI",Ru="di",Cu=[{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"}]}],Pu=[],Tu={tagAlias:"lowerCase"},ku={name:Au,uri:Su,prefix:Ru,types:Cu,associations:Pu,xml:Tu},Mu="bpmn.io colors for BPMN",Du="http://bpmn.io/schema/bpmn/biocolor/1.0",Ou="bioc",Nu=[{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"}]}],Bu=[],Lu=[],Iu={name:Mu,uri:Du,prefix:Ou,types:Nu,enumerations:Bu,associations:Lu},Fu="BPMN in Color",$u="http://www.omg.org/spec/BPMN/non-normative/color/1.0",ju="color",Vu=[{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"}]}],Wu=[],Hu=[],zu={name:Fu,uri:$u,prefix:ju,types:Vu,enumerations:Wu,associations:Hu},Uu={bpmn:cu,bpmndi:gu,dc:bu,di:ku,bioc:Iu,color:zu};function Yu(e,t){var n=V({},Uu,e);return new Nn(n,t)}function ye(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}var Ku="Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472";function qu(e){_t(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error(Ku)}})}function we(e,t){return e.$instanceOf(t)}function Gu(e){return $e(e.rootElements,function(t){return we(t,"bpmn:Process")||we(t,"bpmn:Collaboration")})}function Xu(e){var t={},n=[],r={};function i(A,R){return function(L){A(L,R)}}function a(A){t[A.id]=A}function s(A){return t[A.id]}function l(A,R){var L=A.gfx;if(L)throw new Error(`already rendered ${ye(A)}`);return e.element(A,r[A.id],R)}function c(A,R){return e.root(A,r[A.id],R)}function p(A,R){try{var L=r[A.id]&&l(A,R);return a(A),L}catch(ee){d(ee.message,{element:A,error:ee}),console.error(`failed to import ${ye(A)}`,ee)}}function d(A,R){e.error(A,R)}var g=this.registerDi=function(R){var L=R.bpmnElement;L?r[L.id]?d(`multiple DI elements defined for ${ye(L)}`,{element:L}):(r[L.id]=R,qu(L)):d(`no bpmnElement referenced in ${ye(R)}`,{element:R})};function T(A){v(A.plane)}function v(A){g(A),N(A.planeElement,x)}function x(A){g(A)}this.handleDefinitions=function(R,L){var ee=R.diagrams;if(L&&ee.indexOf(L)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!L&&ee&&ee.length&&(L=ee[0]),!L)throw new Error("no diagram to display");r={},T(L);var f=L.plane;if(!f)throw new Error(`no plane for ${ye(L)}`);var o=f.bpmnElement;if(!o)if(o=Gu(R),o)d(`correcting missing bpmnElement on ${ye(f)} to ${ye(o)}`),f.bpmnElement=o,g(f);else throw new Error("no process or collaboration to display");var u=c(o,f);if(we(o,"bpmn:Process")||we(o,"bpmn:SubProcess"))I(o,u);else if(we(o,"bpmn:Collaboration"))ae(o,u),H(R.rootElements,u);else throw new Error(`unsupported bpmnElement for ${ye(f)}: ${ye(o)}`);C(n)};var C=this.handleDeferred=function(){for(var R;n.length;)R=n.shift(),R()};function I(A,R){X(A,R),k(A.ioSpecification,R),E(A.artifacts,R),a(A)}function H(A,R){var L=wt(A,function(ee){return!s(ee)&&we(ee,"bpmn:Process")&&ee.laneSets});L.forEach(i(I,R))}function U(A,R){p(A,R)}function _(A,R){N(A,i(U,R))}function y(A,R){p(A,R)}function w(A,R){p(A,R)}function S(A,R){p(A,R)}function D(A,R){p(A,R)}function E(A,R){N(A,function(L){we(L,"bpmn:Association")?n.push(function(){D(L,R)}):D(L,R)})}function k(A,R){A&&(N(A.dataInputs,i(w,R)),N(A.dataOutputs,i(S,R)))}var P=this.handleSubProcess=function(R,L){X(R,L),E(R.artifacts,L)};function B(A,R){var L=p(A,R);we(A,"bpmn:SubProcess")&&P(A,L||R),we(A,"bpmn:Activity")&&k(A.ioSpecification,R),n.push(function(){N(A.dataInputAssociations,i(y,R)),N(A.dataOutputAssociations,i(y,R))})}function O(A,R){p(A,R)}function F(A,R){p(A,R)}function G(A,R){n.push(function(){var L=p(A,R);A.childLaneSet&&Ne(A.childLaneSet,L||R),de(A)})}function Ne(A,R){N(A.lanes,i(G,R))}function re(A,R){N(A,i(Ne,R))}function X(A,R){_e(A.flowElements,R),A.laneSets&&re(A.laneSets,R)}function _e(A,R){N(A,function(L){we(L,"bpmn:SequenceFlow")?n.push(function(){O(L,R)}):we(L,"bpmn:BoundaryEvent")?n.unshift(function(){B(L,R)}):we(L,"bpmn:FlowNode")?B(L,R):we(L,"bpmn:DataObject")||(we(L,"bpmn:DataStoreReference")||we(L,"bpmn:DataObjectReference")?F(L,R):d(`unrecognized flowElement ${ye(L)} in context ${ye(R&&R.businessObject)}`,{element:L,context:R}))})}function be(A,R){var L=p(A,R),ee=A.processRef;ee&&I(ee,L||R)}function ae(A,R){N(A.participants,i(be,R)),E(A.artifacts,R),n.push(function(){_(A.messageFlows,R)})}function de(A){N(A.flowNodeRef,function(R){var L=R.get("lanes");L&&L.push(A)})}}function Zu(e,t,n){var r,i,a,s,l=[];function c(p,d){var g={root:function(C,I){return r.add(C,I)},element:function(C,I,H){return r.add(C,I,H)},error:function(C,I){l.push({message:C,context:I})}},T=new Xu(g);d=d||p.diagrams&&p.diagrams[0];var v=Qu(p,d);if(!v)throw new Error("no diagram to display");N(v,function(C){T.handleDefinitions(p,C)});var x=d.plane.bpmnElement.id;a.setRootElement(a.findRoot(x+"_plane")||a.findRoot(x))}return new Promise(function(p,d){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),a=e.get("canvas"),i.fire("import.render.start",{definitions:t}),c(t,n),i.fire("import.render.complete",{error:s,warnings:l}),p({warnings:l})}catch(g){return g.warnings=l,d(g)}})}function Qu(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!$(n,"bpmn:Process")&&!$(n,"bpmn:Collaboration")&&(r=Ju(n));var i;$(r,"bpmn:Collaboration")?i=r:i=$e(e.rootElements,function(p){if($(p,"bpmn:Collaboration"))return $e(p.participants,function(d){return d.processRef===r})});var a=[r];i&&(a=Pn(i.participants,function(p){return p.processRef}),a.push(i));var s=ea(a),l=[t],c=[n];return N(e.diagrams,function(p){if(p.plane){var d=p.plane.bpmnElement;s.indexOf(d)!==-1&&c.indexOf(d)===-1&&(l.push(p),c.push(d))}}),l}}function ea(e){var t=[];return N(e,function(n){n&&(t.push(n),t=t.concat(ea(n.flowElements)))}),t}function Ju(e){for(var t=e;t;){if($(t,"bpmn:Process"))return t;t=t.$parent}}var el='<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>',ta=el,na={verticalAlign:"middle"},ra={color:"#404040"},tl={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},nl={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},rl={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"},il='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+ta+'</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>',Ye;function al(){Ye=Ge(il),Ce(Ye,tl),Ce(We("svg",Ye),na),Ce(We(".backdrop",Ye),nl),Ce(We(".notice",Ye),rl),Ce(We(".link",Ye),ra,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function ol(){Ye||(al(),Un.bind(Ye,".backdrop","click",function(e){document.body.removeChild(Ye)})),document.body.appendChild(Ye)}function fe(e){e=V({},ul,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),cl(this._container),this._init(this._container,this._moddle,e)}Xe(fe,mt);fe.prototype.importXML=function(t,n){return Pt(this,null,function*(){const r=this;function i(s){return r.get("eventBus").createEvent(s)}let a=[];try{t=this._emit("import.parse.start",{xml:t})||t;let s;try{s=yield this._moddle.fromXML(t,"bpmn:Definitions")}catch(T){throw this._emit("import.parse.complete",{error:T}),T}let l=s.rootElement;const c=s.references,p=s.warnings,d=s.elementsById;a=a.concat(p),l=this._emit("import.parse.complete",i({error:null,definitions:l,elementsById:d,references:c,warnings:a}))||l;const g=yield this.importDefinitions(l,n);return a=a.concat(g.warnings),this._emit("import.done",{error:null,warnings:a}),{warnings:a}}catch(s){let l=s;throw a=a.concat(l.warnings||[]),mn(l,a),l=sl(l),this._emit("import.done",{error:l,warnings:l.warnings}),l}})};fe.prototype.importDefinitions=function(t,n){return Pt(this,null,function*(){return this._setDefinitions(t),{warnings:(yield this.open(n)).warnings}})};fe.prototype.open=function(t){return Pt(this,null,function*(){const n=this._definitions;let r=t;if(!n){const a=new Error("no XML imported");throw mn(a,[]),a}if(typeof t=="string"&&(r=ll(n,t),!r)){const a=new Error("BPMNDiagram <"+t+"> not found");throw mn(a,[]),a}try{this.clear()}catch(a){throw mn(a,[]),a}const{warnings:i}=yield Zu(this,n,r);return{warnings:i}})};fe.prototype.saveXML=function(t){return Pt(this,null,function*(){t=t||{};let n=this._definitions,r,i;try{if(!n)throw new Error("no definitions loaded");n=this._emit("saveXML.start",{definitions:n})||n,i=(yield this._moddle.toXML(n,t)).xml,i=this._emit("saveXML.serialized",{xml:i})||i}catch(s){r=s}const a=r?{error:r}:{xml:i};if(this._emit("saveXML.done",a),r)throw r;return a})};fe.prototype.saveSVG=function(){return Pt(this,null,function*(){this._emit("saveSVG.start");let t,n;try{const r=this.get("canvas"),i=r.getActiveLayer(),a=We(":scope > defs",r._svg),s=Or(i),l=a?"<defs>"+Or(a)+"</defs>":"",c=i.getBBox();t=`<?xml version="1.0" encoding="utf-8"?>
<!-- created with bpmn-js / http://bpmn.io -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+c.width+'" height="'+c.height+'" viewBox="'+c.x+" "+c.y+" "+c.width+" "+c.height+'" version="1.1">'+l+s+"</svg>"}catch(r){n=r}if(this._emit("saveSVG.done",{error:n,svg:t}),n)throw n;return{svg:t}})};fe.prototype._setDefinitions=function(e){this._definitions=e};fe.prototype.getModules=function(){return this._modules};fe.prototype.clear=function(){this.getDefinitions()&&mt.prototype.clear.call(this)};fe.prototype.destroy=function(){mt.prototype.destroy.call(this),xn(this._container)};fe.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)};fe.prototype.off=function(e,t){this.get("eventBus").off(e,t)};fe.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=We(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()};fe.prototype.getDefinitions=function(){return this._definitions};fe.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))};fe.prototype._init=function(e,t,n){const r=n.modules||this.getModules(n),i=n.additionalModules||[],a=[{bpmnjs:["value",this],moddle:["value",t]}],s=[].concat(a,r,i),l=V(Fa(n,["additionalModules"]),{canvas:V({},n.canvas,{container:e}),modules:s});mt.call(this,l),n&&n.container&&this.attachTo(n.container)};fe.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)};fe.prototype._createContainer=function(e){const t=Ge('<div class="bjs-container"></div>');return Ce(t,{width:Qr(e.width),height:Qr(e.height),position:e.position}),t};fe.prototype._createModdle=function(e){const t=V({},this._moddleExtensions,e.moddleExtensions);return new Yu(t)};fe.prototype._modules=[];function mn(e,t){return e.warnings=t,e}function sl(e){const n=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}const ul={width:"100%",height:"100%",position:"relative"};function Qr(e){return e+(Re(e)?"px":"")}function ll(e,t){return t&&$e(e.diagrams,function(n){return n.id===t})||null}function cl(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+ta+"</a>",r=Ge(n);Ce(We("svg",r),na),Ce(r,ra,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),ar.bind(r,"click",function(i){ol(),i.preventDefault()})}function Et(e,t){return $(e,"bpmn:CallActivity")?!1:$(e,"bpmn:SubProcess")?(t=t||lt(e),t&&$(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):$(e,"bpmn:Participant")?!!oe(e).processRef:!0}function Jr(e){if(!(!$(e,"bpmn:Participant")&&!$(e,"bpmn:Lane"))){var t=lt(e).isHorizontal;return t===void 0?!0:t}}function af(e){return e&&oe(e).isInterrupting!==!1}function fl(e){return e&&!!oe(e).triggeredByEvent}function _r(e,t){var n=oe(e).eventDefinitions;return tr(n,function(r){return $(r,t)})}function of(e){return _r(e,"bpmn:ErrorEventDefinition")}function sf(e){return _r(e,"bpmn:EscalationEventDefinition")}function uf(e){return _r(e,"bpmn:CompensateEventDefinition")}var Rn={width:90,height:20},ei=15;function pl(e){return $(e,"bpmn:Event")||$(e,"bpmn:Gateway")||$(e,"bpmn:DataStoreReference")||$(e,"bpmn:DataObjectReference")||$(e,"bpmn:DataInput")||$(e,"bpmn:DataOutput")||$(e,"bpmn:SequenceFlow")||$(e,"bpmn:MessageFlow")||$(e,"bpmn:Group")}function lf(e){return pr(e.label)}function hl(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=dl(e),a=Math.atan((r.y-n.y)/(r.x-n.x)),s=i.x,l=i.y;return Math.abs(a)<Math.PI/2?l-=ei:s+=ei,{x:s,y:l}}function dl(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)];return{x:n.x+(r.x-n.x)/2,y:n.y+(r.y-n.y)/2}}function ml(e){return e.waypoints?hl(e.waypoints):$(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+Rn.height/2}:{x:e.x+e.width/2,y:e.y+e.height+Rn.height/2}}function yl(e,t){var n,r,i,a=e.label;return a&&a.bounds?(i=a.bounds,r={width:Math.max(Rn.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=ml(t),r=Rn),V({x:n.x-r.width/2,y:n.y-r.height/2},r)}function ia(e){if($(e,"bpmn:FlowElement")||$(e,"bpmn:Participant")||$(e,"bpmn:Lane")||$(e,"bpmn:SequenceFlow")||$(e,"bpmn:MessageFlow")||$(e,"bpmn:DataInput")||$(e,"bpmn:DataOutput"))return"name";if($(e,"bpmn:TextAnnotation"))return"text";if($(e,"bpmn:Group"))return"categoryValueRef"}function gl(e){var t=e.categoryValueRef;return t&&t.value||""}function Cn(e){var t=e.businessObject,n=ia(t);if(n)return n==="categoryValueRef"?gl(t):t[n]||""}function cf(e,t){var n=e.businessObject,r=ia(n);return r&&(r==="categoryValueRef"?n.categoryValueRef.value=t:n[r]=t),e}var Jn="hsl(225, 10%, 15%)",vl="white";function He(e,t){return tr(e.eventDefinitions,function(n){return n.$type===t})}function El(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function wl(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function q(e,t,n){var r=lt(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||vl}function M(e,t,n){var r=lt(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||Jn}function Vt(e,t,n,r){var i=lt(e),a=i.get("label");return r||a&&a.get("color:color")||t||M(e,n)}function xl(e){var t=e.x+e.width/2,n=e.y+e.height/2,r=e.width/2,i=[["M",t,n],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]];return bt(i)}function _l(e,t){var n=e.x,r=e.y,i=e.width,a=e.height,s=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,a-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-a],["a",t,t,0,0,1,t,-t],["z"]];return bt(s)}function bl(e){var t=e.width,n=e.height,r=e.x,i=e.y,a=t/2,s=n/2,l=[["M",r+a,i],["l",a,s],["l",-a,s],["l",-a,-s],["z"]];return bt(l)}function Al(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return bt(a)}function Wt(e,t={}){return{width:Ie(e,t),height:Se(e,t)}}function Ie(e,t={}){return _t(t,"width")?t.width:e.width}function Se(e,t={}){return _t(t,"height")?t.height:e.height}var Sl=new Je,Rl=10,un=3,Cl=1.5,yn=10,kt=.95,Pl=1,Tl=.25;function St(e,t,n,r,i,a,s){et.call(this,t,s);var l=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,p=e&&e.defaultLabelColor;function d(f){return n.computeStyle(f,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Jn,strokeWidth:2,fill:"white"})}function g(f){return n.computeStyle(f,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Jn,strokeWidth:2})}function T(f,o){var{ref:u={x:0,y:0},scale:h=1,element:m,parentGfx:b=i._svg}=o,W=J("marker",{id:f,viewBox:"0 0 20 20",refX:u.x,refY:u.y,markerWidth:20*h,markerHeight:20*h,orient:"auto"});ce(W,m);var j=We(":scope > defs",b);j||(j=J("defs"),ce(b,j)),ce(j,W)}function v(f,o,u,h){var m=Sl.nextPrefixed("marker-");return x(f,m,o,u,h),"url(#"+m+")"}function x(f,o,u,h,m){if(u==="sequenceflow-end"){var b=J("path",ie({d:"M 1 5 L 11 10 L 1 15 Z"},d({fill:m,stroke:m,strokeWidth:1})));T(o,{element:b,ref:{x:11,y:10},scale:.5,parentGfx:f})}if(u==="messageflow-start"){var W=J("circle",ie({cx:6,cy:6,r:3.5},d({fill:h,stroke:m,strokeWidth:1,strokeDasharray:[1e4,1]})));T(o,{element:W,ref:{x:6,y:6},parentGfx:f})}if(u==="messageflow-end"){var j=J("path",ie({d:"m 1 5 l 0 -3 l 7 3 l -7 3 z"},d({fill:h,stroke:m,strokeWidth:1,strokeDasharray:[1e4,1]})));T(o,{element:j,ref:{x:8.5,y:5},parentGfx:f})}if(u==="association-start"){var K=J("path",ie({d:"M 11 5 L 1 10 L 11 15"},g({fill:"none",stroke:m,strokeWidth:1.5,strokeDasharray:[1e4,1]})));T(o,{element:K,ref:{x:1,y:10},scale:.5,parentGfx:f})}if(u==="association-end"){var he=J("path",ie({d:"M 1 5 L 11 10 L 1 15"},g({fill:"none",stroke:m,strokeWidth:1.5,strokeDasharray:[1e4,1]})));T(o,{element:he,ref:{x:11,y:10},scale:.5,parentGfx:f})}if(u==="conditional-flow-marker"){var Be=J("path",ie({d:"M 0 10 L 8 6 L 16 10 L 8 14 Z"},d({fill:h,stroke:m})));T(o,{element:Be,ref:{x:-1,y:10},scale:.5,parentGfx:f})}if(u==="conditional-default-flow-marker"){var Ae=J("path",ie({d:"M 6 4 L 10 16"},d({stroke:m,fill:"none"})));T(o,{element:Ae,ref:{x:0,y:10},scale:.5,parentGfx:f})}}function C(f,o,u,h,m={}){Ke(h)&&(m=h,h=0),h=h||0,m=d(m);var b=o/2,W=u/2,j=J("circle",ie({cx:b,cy:W,r:Math.round((o+u)/4-h)},m));return ce(f,j),j}function I(f,o,u,h,m,b){Ke(m)&&(b=m,m=0),m=m||0,b=d(b);var W=J("rect",ie({x:m,y:m,width:o-m*2,height:u-m*2,rx:h,ry:h},b));return ce(f,W),W}function H(f,o,u,h){var m=o/2,b=u/2,W=[{x:m,y:0},{x:o,y:b},{x:m,y:u},{x:0,y:b}],j=W.map(function(he){return he.x+","+he.y}).join(" ");h=d(h);var K=J("polygon",Ee(ie({},h),{points:j}));return ce(f,K),K}function U(f,o,u,h){u=g(u);var m=ur(o,u,h);return ce(f,m),m}function _(f,o,u){return U(f,o,u,5)}function y(f,o,u){u=g(u);var h=J("path",Ee(ie({},u),{d:o}));return ce(f,h),h}function w(f,o,u,h){return y(o,u,V({"data-marker":f},h))}function S(f){return ee[f]}function D(f){return function(o,u,h){return S(f)(o,u,h)}}var E={"bpmn:MessageEventDefinition":function(f,o,u={},h){var m=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:o.width,containerHeight:o.height,position:{mx:.235,my:.315}}),b=h?M(o,c,u.stroke):q(o,l,u.fill),W=h?q(o,l,u.fill):M(o,c,u.stroke),j=y(f,m,{fill:b,stroke:W,strokeWidth:1});return j},"bpmn:TimerEventDefinition":function(f,o,u={}){var h=C(f,o.width,o.height,.2*o.height,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:2}),m=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:o.width,containerHeight:o.height,position:{mx:.5,my:.5}});y(f,m,{stroke:M(o,c,u.stroke),strokeWidth:2});for(var b=0;b<12;b++){var W=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:o.width,containerHeight:o.height,position:{mx:.5,my:.5}}),j=o.width/2,K=o.height/2;y(f,W,{strokeWidth:1,stroke:M(o,c,u.stroke),transform:"rotate("+b*30+","+K+","+j+")"})}return h},"bpmn:EscalationEventDefinition":function(f,o,u={},h){var m=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:.5,my:.2}}),b=h?M(o,c,u.stroke):q(o,l,u.fill);return y(f,m,{fill:b,stroke:M(o,c,u.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(f,o,u={}){var h=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:.5,my:.222}});return y(f,h,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(f,o,u={},h){var m=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:.57,my:.263}}),b=h?M(o,c,u.stroke):q(o,l,u.fill);return y(f,m,{fill:b,stroke:M(o,c,u.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(f,o,u={},h){var m=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:o.width,containerHeight:o.height,position:{mx:.2,my:.722}}),b=h?M(o,c,u.stroke):q(o,l,u.fill);return y(f,m,{fill:b,stroke:M(o,c,u.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(f,o,u={},h){var m=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:.638,my:-.055}}),b=h?M(o,c,u.stroke):"none",W=y(f,m,{fill:b,stroke:M(o,c,u.stroke),strokeWidth:1});return vs(W,45),W},"bpmn:CompensateEventDefinition":function(f,o,u={},h){var m=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:.22,my:.5}}),b=h?M(o,c,u.stroke):q(o,l,u.fill);return y(f,m,{fill:b,stroke:M(o,c,u.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(f,o,u={},h){var m=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:o.width,containerHeight:o.height,position:{mx:.5,my:.2}}),b=h?M(o,c,u.stroke):q(o,l,u.fill);return y(f,m,{strokeWidth:1,fill:b,stroke:M(o,c,u.stroke)})},"bpmn:MultipleEventDefinition":function(f,o,u={},h){var m=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:o.width,containerHeight:o.height,position:{mx:.222,my:.36}}),b=h?M(o,c,u.stroke):q(o,l,u.fill);return y(f,m,{fill:b,strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(f,o,u={}){var h=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:o.width,containerHeight:o.height,position:{mx:.458,my:.194}});return y(f,h,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(f,o,u={}){var h=C(f,o.width,o.height,8,{fill:M(o,c,u.stroke),stroke:M(o,c,u.stroke),strokeWidth:4});return h}};function k(f,o,u={}){var h=oe(f),m=El(h);return h.get("eventDefinitions")&&h.get("eventDefinitions").length>1?h.get("parallelMultiple")?E["bpmn:ParallelMultipleEventDefinition"](o,f,u,m):E["bpmn:MultipleEventDefinition"](o,f,u,m):He(h,"bpmn:MessageEventDefinition")?E["bpmn:MessageEventDefinition"](o,f,u,m):He(h,"bpmn:TimerEventDefinition")?E["bpmn:TimerEventDefinition"](o,f,u,m):He(h,"bpmn:ConditionalEventDefinition")?E["bpmn:ConditionalEventDefinition"](o,f,u,m):He(h,"bpmn:SignalEventDefinition")?E["bpmn:SignalEventDefinition"](o,f,u,m):He(h,"bpmn:EscalationEventDefinition")?E["bpmn:EscalationEventDefinition"](o,f,u,m):He(h,"bpmn:LinkEventDefinition")?E["bpmn:LinkEventDefinition"](o,f,u,m):He(h,"bpmn:ErrorEventDefinition")?E["bpmn:ErrorEventDefinition"](o,f,u,m):He(h,"bpmn:CancelEventDefinition")?E["bpmn:CancelEventDefinition"](o,f,u,m):He(h,"bpmn:CompensateEventDefinition")?E["bpmn:CompensateEventDefinition"](o,f,u,m):He(h,"bpmn:TerminateEventDefinition")?E["bpmn:TerminateEventDefinition"](o,f,u,m):null}var P={ParticipantMultiplicityMarker:function(f,o,u={}){var h=Ie(o,u),m=Se(o,u),b=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:h,containerHeight:m,position:{mx:(h/2-6)/h,my:(m-15)/m}});w("participant-multiplicity",f,b,{strokeWidth:2,fill:q(o,l,u.fill),stroke:M(o,c,u.stroke)})},SubProcessMarker:function(f,o,u={}){var h=I(f,14,14,0,{strokeWidth:1,fill:q(o,l,u.fill),stroke:M(o,c,u.stroke)});$i(h,o.width/2-7.5,o.height-20);var m=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:o.width,containerHeight:o.height,position:{mx:(o.width/2-7.5)/o.width,my:(o.height-20)/o.height}});w("sub-process",f,m,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke)})},ParallelMarker:function(f,o,u){var h=Ie(o,u),m=Se(o,u),b=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:h,containerHeight:m,position:{mx:(h/2+u.parallel)/h,my:(m-20)/m}});w("parallel",f,b,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke)})},SequentialMarker:function(f,o,u){var h=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:(o.width/2+u.seq)/o.width,my:(o.height-19)/o.height}});w("sequential",f,h,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke)})},CompensationMarker:function(f,o,u){var h=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:(o.width/2+u.compensation)/o.width,my:(o.height-13)/o.height}});w("compensation",f,h,{strokeWidth:1,fill:q(o,l,u.fill),stroke:M(o,c,u.stroke)})},LoopMarker:function(f,o,u){var h=Ie(o,u),m=Se(o,u),b=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:h,containerHeight:m,position:{mx:(h/2+u.loop)/h,my:(m-7)/m}});w("loop",f,b,{strokeWidth:1.5,fill:"none",stroke:M(o,c,u.stroke),strokeMiterlimit:.5})},AdhocMarker:function(f,o,u){var h=Ie(o,u),m=Se(o,u),b=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:h,containerHeight:m,position:{mx:(h/2+u.adhoc)/h,my:(m-15)/m}});w("adhoc",f,b,{strokeWidth:1,fill:M(o,c,u.stroke),stroke:M(o,c,u.stroke)})}};function B(f,o,u,h){P[f](o,u,h)}function O(f,o,u,h={}){h={fill:h.fill,stroke:h.stroke,width:Ie(o,h),height:Se(o,h)};var m=oe(o),b=u&&u.includes("SubProcessMarker");b?h=Ee(ie({},h),{seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}):h=Ee(ie({},h),{seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10}),N(u,function(K){B(K,f,o,h)}),m.get("isForCompensation")&&B("CompensationMarker",f,o,h),$(m,"bpmn:AdHocSubProcess")&&B("AdhocMarker",f,o,h);var W=m.get("loopCharacteristics"),j=W&&W.get("isSequential");W&&(j===void 0&&B("LoopMarker",f,o,h),j===!1&&B("ParallelMarker",f,o,h),j===!0&&B("SequentialMarker",f,o,h))}function F(f,o,u={}){u=V({size:{width:100}},u);var h=a.createText(o||"",u);return Fe(h).add("djs-label"),ce(f,h),h}function G(f,o,u,h={}){var m=oe(o),b=Wt({x:o.x,y:o.y,width:o.width,height:o.height},h);return F(f,m.name,{align:u,box:b,padding:7,style:{fill:Vt(o,p,c,h.stroke)}})}function Ne(f,o,u={}){var h={width:90,height:30,x:o.width/2+o.x,y:o.height/2+o.y};return F(f,Cn(o),{box:h,fitBox:!0,style:V({},a.getExternalStyle(),{fill:Vt(o,p,c,u.stroke)})})}function re(f,o,u,h={}){var m=Jr(u),b=F(f,o,{box:{height:30,width:m?Se(u,h):Ie(u,h)},align:"center-middle",style:{fill:Vt(u,p,c,h.stroke)}});if(m){var W=-1*Se(u,h);Hn(b,0,-W,270)}}function X(f,o,u={}){var{width:h,height:m}=Wt(o,u);return I(f,h,m,yn,Ee(ie({},u),{fill:q(o,l,u.fill),fillOpacity:kt,stroke:M(o,c,u.stroke)}))}function _e(f,o,u={}){var h=oe(o),m=q(o,l,u.fill),b=M(o,c,u.stroke);return(h.get("associationDirection")==="One"||h.get("associationDirection")==="Both")&&(u.markerEnd=v(f,"association-end",m,b)),h.get("associationDirection")==="Both"&&(u.markerStart=v(f,"association-start",m,b)),u=Z(u,["markerStart","markerEnd"]),_(f,o.waypoints,Ee(ie({},u),{stroke:b,strokeDasharray:"0, 5"}))}function be(f,o,u={}){var h=q(o,l,u.fill),m=M(o,c,u.stroke),b=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:.474,my:.296}}),W=y(f,b,{fill:h,fillOpacity:kt,stroke:m}),j=oe(o);if(wl(j)){var K=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:.33,my:(o.height-18)/o.height}});y(f,K,{strokeWidth:2,fill:h,stroke:m})}return W}function ae(f,o,u={}){return C(f,o.width,o.height,Ee(ie({fillOpacity:kt},u),{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke)}))}function de(f,o,u={}){return H(f,o.width,o.height,{fill:q(o,l,u.fill),fillOpacity:kt,stroke:M(o,c,u.stroke)})}function A(f,o,u={}){var h=I(f,Ie(o,u),Se(o,u),0,{fill:q(o,l,u.fill),fillOpacity:u.fillOpacity||kt,stroke:M(o,c,u.stroke),strokeWidth:1.5}),m=oe(o);if($(m,"bpmn:Lane")){var b=m.get("name");re(f,b,o,u)}return h}function R(f,o,u={}){var h=X(f,o,u);fl(o)&&Q(h,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var m=Et(o);return G(f,o,m?"center-top":"center-middle",u),m?O(f,o,void 0,u):O(f,o,["SubProcessMarker"],u),h}function L(f,o,u={}){var h=X(f,o,u);return G(f,o,"center-middle",u),O(f,o,void 0,u),h}var ee=this.handlers={"bpmn:AdHocSubProcess":function(f,o,u={}){return Et(o)?u=Z(u,["fill","stroke","width","height"]):u=Z(u,["fill","stroke"]),R(f,o,u)},"bpmn:Association":function(f,o,u={}){return u=Z(u,["fill","stroke"]),_e(f,o,u)},"bpmn:BoundaryEvent":function(f,o,u={}){var{renderIcon:h=!0}=u;u=Z(u,["fill","stroke"]);var m=oe(o),b=m.get("cancelActivity");u={strokeWidth:1.5,fill:q(o,l,u.fill),fillOpacity:Pl,stroke:M(o,c,u.stroke)},b||(u.strokeDasharray="6");var W=ae(f,o,u);return C(f,o.width,o.height,un,Ee(ie({},u),{fill:"none"})),h&&k(o,f,u),W},"bpmn:BusinessRuleTask":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=L(f,o,u),m=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),b=y(f,m);Q(b,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:1});var W=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),j=y(f,W);return Q(j,{fill:M(o,c,u.stroke),stroke:M(o,c,u.stroke),strokeWidth:1}),h},"bpmn:CallActivity":function(f,o,u={}){return u=Z(u,["fill","stroke"]),R(f,o,ie({strokeWidth:5},u))},"bpmn:ComplexGateway":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=de(f,o,u),m=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:o.width,containerHeight:o.height,position:{mx:.46,my:.26}});return y(f,m,{fill:M(o,c,u.stroke),stroke:M(o,c,u.stroke),strokeWidth:1}),h},"bpmn:DataInput":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=r.getRawPath("DATA_ARROW"),m=be(f,o,u);return y(f,h,{fill:"none",stroke:M(o,c,u.stroke),strokeWidth:1}),m},"bpmn:DataInputAssociation":function(f,o,u={}){return u=Z(u,["fill","stroke"]),_e(f,o,Ee(ie({},u),{markerEnd:v(f,"association-end",q(o,l,u.fill),M(o,c,u.stroke))}))},"bpmn:DataObject":function(f,o,u={}){return u=Z(u,["fill","stroke"]),be(f,o,u)},"bpmn:DataObjectReference":D("bpmn:DataObject"),"bpmn:DataOutput":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=r.getRawPath("DATA_ARROW"),m=be(f,o,u);return y(f,h,{strokeWidth:1,fill:q(o,l,u.fill),stroke:M(o,c,u.stroke)}),m},"bpmn:DataOutputAssociation":function(f,o,u={}){return u=Z(u,["fill","stroke"]),_e(f,o,Ee(ie({},u),{markerEnd:v(f,"association-end",q(o,l,u.fill),M(o,c,u.stroke))}))},"bpmn:DataStoreReference":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:0,my:.133}});return y(f,h,{fill:q(o,l,u.fill),fillOpacity:kt,stroke:M(o,c,u.stroke),strokeWidth:2})},"bpmn:EndEvent":function(f,o,u={}){var{renderIcon:h=!0}=u;u=Z(u,["fill","stroke"]);var m=ae(f,o,Ee(ie({},u),{strokeWidth:4}));return h&&k(o,f,u),m},"bpmn:EventBasedGateway":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=oe(o),m=de(f,o,u);C(f,o.width,o.height,o.height*.2,{fill:q(o,"none",u.fill),stroke:M(o,c,u.stroke),strokeWidth:1});var b=h.get("eventGatewayType"),W=!!h.get("instantiate");function j(){var he=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:o.width,containerHeight:o.height,position:{mx:.36,my:.44}});y(f,he,{fill:"none",stroke:M(o,c,u.stroke),strokeWidth:2})}if(b==="Parallel"){var K=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:o.width,containerHeight:o.height,position:{mx:.474,my:.296}});y(f,K,{fill:"none",stroke:M(o,c,u.stroke),strokeWidth:1})}else b==="Exclusive"&&(W||C(f,o.width,o.height,o.height*.26,{fill:"none",stroke:M(o,c,u.stroke),strokeWidth:1}),j());return m},"bpmn:ExclusiveGateway":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=de(f,o,u),m=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:o.width,containerHeight:o.height,position:{mx:.32,my:.3}}),b=lt(o);return b.get("isMarkerVisible")&&y(f,m,{fill:M(o,c,u.stroke),stroke:M(o,c,u.stroke),strokeWidth:1}),h},"bpmn:Gateway":function(f,o,u={}){return u=Z(u,["fill","stroke"]),de(f,o,u)},"bpmn:Group":function(f,o,u={}){return u=Z(u,["fill","stroke","width","height"]),I(f,o.width,o.height,yn,{stroke:M(o,c,u.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:Ie(o,u),height:Se(o,u)})},"bpmn:InclusiveGateway":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=de(f,o,u);return C(f,o.width,o.height,o.height*.24,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:2.5}),h},"bpmn:IntermediateEvent":function(f,o,u={}){var{renderIcon:h=!0}=u;u=Z(u,["fill","stroke"]);var m=ae(f,o,Ee(ie({},u),{strokeWidth:1.5}));return C(f,o.width,o.height,un,{fill:"none",stroke:M(o,c,u.stroke),strokeWidth:1.5}),h&&k(o,f,u),m},"bpmn:IntermediateCatchEvent":D("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":D("bpmn:IntermediateEvent"),"bpmn:Lane":function(f,o,u={}){return u=Z(u,["fill","stroke","width","height"]),A(f,o,Ee(ie({},u),{fillOpacity:Tl}))},"bpmn:ManualTask":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=L(f,o,u),m=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return y(f,m,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:.5}),h},"bpmn:MessageFlow":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=oe(o),m=lt(o),b=q(o,l,u.fill),W=M(o,c,u.stroke),j=_(f,o.waypoints,{markerEnd:v(f,"messageflow-end",b,W),markerStart:v(f,"messageflow-start",b,W),stroke:W,strokeDasharray:"10, 11",strokeWidth:1.5});if(h.get("messageRef")){var K=j.getPointAtLength(j.getTotalLength()/2),he=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:K.x,y:K.y}}),Be={strokeWidth:1};m.get("messageVisibleKind")==="initiating"?(Be.fill=b,Be.stroke=W):(Be.fill=W,Be.stroke=b);var Ae=y(f,he,Be),ue=h.get("messageRef"),Le=ue.get("name"),te=F(f,Le,{align:"center-top",fitBox:!0,style:{fill:W}}),rt=Ae.getBBox(),nn=te.getBBox(),ke=K.x-nn.width/2,z=K.y+rt.height/2+Rl;Hn(te,ke,z,0)}return j},"bpmn:ParallelGateway":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=de(f,o,u),m=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:o.width,containerHeight:o.height,position:{mx:.46,my:.2}});return y(f,m,{fill:M(o,c,u.stroke),stroke:M(o,c,u.stroke),strokeWidth:1}),h},"bpmn:Participant":function(f,o,u={}){u=Z(u,["fill","stroke","width","height"]);var h=A(f,o,u),m=Et(o),b=Jr(o),W=oe(o),j=W.get("name");if(m){var K=b?[{x:30,y:0},{x:30,y:Se(o,u)}]:[{x:0,y:30},{x:Ie(o,u),y:30}];U(f,K,{stroke:M(o,c,u.stroke),strokeWidth:Cl}),re(f,j,o,u)}else{var he=Wt(o,u);b||(he.height=Ie(o,u),he.width=Se(o,u));var Be=F(f,j,{box:he,align:"center-middle",style:{fill:Vt(o,p,c,u.stroke)}});if(!b){var Ae=-1*Se(o,u);Hn(Be,0,-Ae,270)}}return W.get("participantMultiplicity")&&B("ParticipantMultiplicityMarker",f,o,u),h},"bpmn:ReceiveTask":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=oe(o),m=L(f,o,u),b;return h.get("instantiate")?(C(f,28,28,20*.22,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:1}),b=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):b=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),y(f,b,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:1}),m},"bpmn:ScriptTask":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=L(f,o,u),m=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return y(f,m,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:1}),h},"bpmn:SendTask":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=L(f,o,u),m=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return y(f,m,{fill:M(o,c,u.stroke),stroke:q(o,l,u.fill),strokeWidth:1}),h},"bpmn:SequenceFlow":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=q(o,l,u.fill),m=M(o,c,u.stroke),b=_(f,o.waypoints,{markerEnd:v(f,"sequenceflow-end",h,m),stroke:m}),W=oe(o),{source:j}=o;if(j){var K=oe(j);W.get("conditionExpression")&&$(K,"bpmn:Activity")&&Q(b,{markerStart:v(f,"conditional-flow-marker",h,m)}),K.get("default")&&($(K,"bpmn:Gateway")||$(K,"bpmn:Activity"))&&K.get("default")===W&&Q(b,{markerStart:v(f,"conditional-default-flow-marker",h,m)})}return b},"bpmn:ServiceTask":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=L(f,o,u);C(f,10,10,{fill:q(o,l,u.fill),stroke:"none",transform:"translate(6, 6)"});var m=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});y(f,m,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:1}),C(f,10,10,{fill:q(o,l,u.fill),stroke:"none",transform:"translate(11, 10)"});var b=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return y(f,b,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:1}),h},"bpmn:StartEvent":function(f,o,u={}){var{renderIcon:h=!0}=u;u=Z(u,["fill","stroke"]);var m=oe(o);m.get("isInterrupting")||(u=Ee(ie({},u),{strokeDasharray:"6"}));var b=ae(f,o,u);return h&&k(o,f,u),b},"bpmn:SubProcess":function(f,o,u={}){return Et(o)?u=Z(u,["fill","stroke","width","height"]):u=Z(u,["fill","stroke"]),R(f,o,u)},"bpmn:Task":function(f,o,u={}){return u=Z(u,["fill","stroke"]),L(f,o,u)},"bpmn:TextAnnotation":function(f,o,u={}){u=Z(u,["fill","stroke","width","height"]);var{width:h,height:m}=Wt(o,u),b=I(f,h,m,0,0,{fill:"none",stroke:"none"}),W=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:h,containerHeight:m,position:{mx:0,my:0}});y(f,W,{stroke:M(o,c,u.stroke)});var j=oe(o),K=j.get("text")||"";return F(f,K,{align:"left-top",box:Wt(o,u),padding:7,style:{fill:Vt(o,p,c,u.stroke)}}),b},"bpmn:Transaction":function(f,o,u={}){Et(o)?u=Z(u,["fill","stroke","width","height"]):u=Z(u,["fill","stroke"]);var h=R(f,o,ie({strokeWidth:1.5},u)),m=n.style(["no-fill","no-events"],{stroke:M(o,c,u.stroke),strokeWidth:1.5}),b=Et(o);return b||(u={}),I(f,Ie(o,u),Se(o,u),yn-un,un,m),h},"bpmn:UserTask":function(f,o,u={}){u=Z(u,["fill","stroke"]);var h=L(f,o,u),m=15,b=12,W=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:m,y:b}});y(f,W,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:.5});var j=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:m,y:b}});y(f,j,{fill:q(o,l,u.fill),stroke:M(o,c,u.stroke),strokeWidth:.5});var K=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:m,y:b}});return y(f,K,{fill:M(o,c,u.stroke),stroke:M(o,c,u.stroke),strokeWidth:.5}),h},label:function(f,o,u={}){return Ne(f,o,u)}};this._drawPath=y,this._renderer=S}Xe(St,et);St.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"];St.prototype.canRender=function(e){return $(e,"bpmn:BaseElement")};St.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)};St.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)};St.prototype.getShapePath=function(e){return $(e,"bpmn:Event")?xl(e):$(e,"bpmn:Activity")?_l(e,yn):$(e,"bpmn:Gateway")?bl(e):Al(e)};function Z(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}var kl=0,Ml={width:150,height:50};function Dl(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function Ol(e){return Ke(e)?V({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}function Nl(e,t){t.textContent=e;var n;try{var r,i=e==="";return t.textContent=i?"dummy":e,n=t.getBBox(),r={width:n.width+n.x*2,height:n.height},i&&(r.width=0),r}catch(a){return{width:0,height:0}}}function Bl(e,t,n){for(var r=e.shift(),i=r,a;;){if(a=Nl(i,n),a.width=i?a.width:0,i===" "||i===""||a.width<Math.round(t)||i.length<2)return Ll(e,i,r,a);i=Fl(i,a.width,t)}}function Ll(e,t,n,r){if(t.length<n.length){var i=n.slice(t.length).trim();e.unshift(i)}return{width:r.width,height:r.height,text:t}}var ti="­";function Il(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],a=0;if(n.length>1)for(;r=n.shift();)if(r.length+a<t)i.push(r),a+=r.length;else{(r==="-"||r===ti)&&i.pop();break}var s=i[i.length-1];return s&&s===ti&&(i[i.length-1]="-"),i.join("")}function Fl(e,t,n){var r=Math.max(e.length*(n/t),1),i=Il(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function $l(){var e=document.getElementById("helper-svg");return e||(e=J("svg"),Q(e,{id:"helper-svg"}),Ce(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}function Bn(e){this._config=V({},{size:Ml,padding:kl,style:{},align:"center-top"},e||{})}Bn.prototype.createText=function(e,t){return this.layoutText(e,t).element};Bn.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions};Bn.prototype.layoutText=function(e,t){var n=V({},this._config.size,t.box),r=V({},this._config.style,t.style),i=Dl(t.align||this._config.align),a=Ol(t.padding!==void 0?t.padding:this._config.padding),s=t.fitBox||!1,l=jl(r),c=e.split(/\u00AD?\r?\n/),p=[],d=n.width-a.left-a.right,g=J("text");Q(g,{x:0,y:0}),Q(g,r);var T=$l();for(ce(T,g);c.length;)p.push(Bl(c,d,g));i.vertical==="middle"&&(a.top=a.bottom=0);var v=Dt(p,function(U,_,y){return U+(l||_.height)},0)+a.top+a.bottom,x=Dt(p,function(U,_,y){return _.width>U?_.width:U},0),C=a.top;i.vertical==="middle"&&(C+=(n.height-v)/2),C-=(l||p[0].height)/4;var I=J("text");Q(I,r),N(p,function(U){var _;switch(C+=l||U.height,i.horizontal){case"left":_=a.left;break;case"right":_=(s?x:d)-a.right-U.width;break;default:_=Math.max(((s?x:d)-U.width)/2+a.left,0)}var y=J("tspan");Q(y,{x:_,y:C}),y.textContent=U.text,ce(I,y)}),Xt(g);var H={width:x,height:v};return{dimensions:H,element:I}};function jl(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Vl=12,Wl=1.2,Hl=30;function aa(e){var t=V({fontFamily:"Arial, sans-serif",fontSize:Vl,fontWeight:"normal",lineHeight:Wl},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=V({},t,{fontSize:n},e&&e.externalStyle||{}),i=new Bn({style:t});this.getExternalLabelBounds=function(a,s){var l=i.getDimensions(s,{box:{width:90,height:30},style:r});return{x:Math.round(a.x+a.width/2-l.width/2),y:Math.round(a.y),width:Math.ceil(l.width),height:Math.ceil(l.height)}},this.getTextAnnotationBounds=function(a,s){var l=i.getDimensions(s,{box:a,style:t,align:"left-top",padding:5});return{x:a.x,y:a.y,width:a.width,height:Math.max(Hl,Math.round(l.height))}},this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}aa.$inject=["config.textRenderer"];function zl(){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(t){return this.pathMap[t].d},this.getScaledPath=function(t,n){var r=this.pathMap[t],i,a;n.abspos?(i=n.abspos.x,a=n.abspos.y):(i=n.containerWidth*n.position.mx,a=n.containerHeight*n.position.my);var s={};if(n.position){for(var l=n.containerHeight/r.height*n.yScaleFactor,c=n.containerWidth/r.width*n.xScaleFactor,p=0;p<r.heightElements.length;p++)s["y"+p]=r.heightElements[p]*l;for(var d=0;d<r.widthElements.length;d++)s["x"+d]=r.widthElements[d]*c}var g=ql(r.d,{mx:i,my:a,e:s});return g}}var Ul=/\{([^{}]+)\}/g,Yl=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function Kl(e,t,n){var r=n;return t.replace(Yl,function(i,a,s,l,c){a=a||l,r&&(a in r&&(r=r[a]),typeof r=="function"&&c&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function ql(e,t){return String(e).replace(Ul,function(n,r){return Kl(n,r,t)})}const Gl={__init__:["bpmnRenderer"],bpmnRenderer:["type",St],textRenderer:["type",aa],pathMap:["type",zl]};function Xl(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const oa={translate:["value",Xl]};function gn(e,t,n){return V({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Zl(e,t,n){var r=e.waypoint;return!r||r.length<2?[Gn(t),Gn(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function sa(e,t,n){return new Error(`element ${ye(t)} referenced by ${ye(e)}#${n} not yet drawn`)}function tt(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}tt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"];tt.prototype.add=function(e,t,n){var r,i,a;if($(t,"bpmndi:BPMNPlane")){var s=$(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(gn(e,t,s)),this._canvas.addRootElement(r)}else if($(t,"bpmndi:BPMNShape")){var l=!Et(e,t),c=Jl(e);i=n&&(n.hidden||n.collapsed);var p=t.bounds;r=this._elementFactory.createShape(gn(e,t,{collapsed:l,hidden:i,x:Math.round(p.x),y:Math.round(p.y),width:Math.round(p.width),height:Math.round(p.height),isFrame:c})),$(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),$(e,"bpmn:Lane")&&(a=0),$(e,"bpmn:DataStoreReference")&&(Ql(n,Gn(p))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,a)}else if($(t,"bpmndi:BPMNEdge")){var d=this._getSource(e),g=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(gn(e,t,{hidden:i,source:d,target:g,waypoints:Zl(t,d,g)})),$(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,a)}else throw new Error(`unknown di ${ye(t)} for element ${ye(e)}`);return pl(e)&&Cn(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r};tt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${ye(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw sa(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)};tt.prototype.addLabel=function(e,t,n){var r,i,a;return r=yl(t,n),i=Cn(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),a=this._elementFactory.createLabel(gn(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Cn(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(a,n.parent)};tt.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;if(r=e[t+"Ref"],t==="source"&&i==="bpmn:DataInputAssociation"&&(r=r&&r[0]),(t==="source"&&i==="bpmn:DataOutputAssociation"||t==="target"&&i==="bpmn:DataInputAssociation")&&(r=e.$parent),n=r&&this._getElement(r),n)return n;throw r?sa(e,r,t+"Ref"):new Error(`${ye(e)}#${t} Ref not specified`)};tt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")};tt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")};tt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function Ql(e,t){var n=t.x,r=t.y;return n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height}function Jl(e){return $(e,"bpmn:Group")}const ec={__depends__:[oa],bpmnImporter:["type",tt]},tc={__depends__:[Gl,ec]};function ua(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}ua.prototype.next=function(){return this._prefix+ ++this._counter};var nc=new ua("ov"),rc=500;function me(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=nc,this._overlayDefaults=V({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=ic(n.getContainer()),this._init()}me.$inject=["config.overlays","eventBus","canvas","elementRegistry"];me.prototype.get=function(e){if(qe(e)&&(e={id:e}),qe(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?wt(t.overlays,Pr({type:e.type})):t.overlays.slice():[]}else return e.type?wt(this._overlays,Pr({type:e.type})):e.id?this._overlays[e.id]:null};me.prototype.add=function(e,t,n){if(Ke(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 r=this._ids.next();return n=V({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r};me.prototype.remove=function(e){var t=this.get(e)||[];Pe(t)||(t=[t]);var n=this;N(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(xn(r.html),xn(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var a=i.overlays.indexOf(r);a!==-1&&i.overlays.splice(a,1)}})};me.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"};me.prototype.show=function(){Ln(this._overlayRoot)};me.prototype.hide=function(){Ln(this._overlayRoot,!1)};me.prototype.clear=function(){this._overlays={},this._overlayContainers=[],hi(this._overlayRoot)};me.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var a=pt(t);r=a.x,i=a.y}la(n,r,i),qa(e.html,"data-container-id",t.id)};me.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,a=t.top;if(t.right!==void 0){var s;r.waypoints?s=pt(r).width:s=r.width,i=t.right*-1+s}if(t.bottom!==void 0){var l;r.waypoints?l=pt(r).height:l=r.height,a=t.bottom*-1+l}la(n,i||0,a||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())};me.prototype._createOverlayContainer=function(e){var t=Ge('<div class="djs-overlays" />');Ce(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n};me.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";ca(this._overlayRoot,n)};me.prototype._getOverlayContainer=function(e,t){var n=$e(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n};me.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,a;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),qe(r)&&(r=Ge(r)),a=this._getOverlayContainer(n),i=Ge('<div class="djs-overlay" data-overlay-id="'+t+'">'),Ce(i,{position:"absolute"}),i.appendChild(r),e.type&&kn(i).add("djs-overlay-"+e.type);var s=this._canvas.findRoot(n),l=this._canvas.getRootElement();Ln(i,s===l),e.htmlContainer=i,a.overlays.push(e),a.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())};me.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,a=n&&n.maxZoom,s=e.htmlContainer,l=this._canvas.getRootElement(),c=!0;(r!==l||n&&(Mt(i)&&i>t.scale||Mt(a)&&a<t.scale))&&(c=!1),Ln(s,c),this._updateOverlayScale(e,t)};me.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,a=e.htmlContainer,s,l="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),Mt(r)&&t.scale<r&&(s=(1/t.scale||1)*r),Mt(i)&&t.scale>i&&(s=(1/t.scale||1)*i)),Mt(s)&&(l="scale("+s+","+s+")"),ca(a,l)};me.prototype._updateOverlaysVisibilty=function(e){var t=this;N(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})};me.prototype._init=function(){var e=this._eventBus,t=this;function n(r){t._updateRoot(r),t._updateOverlaysVisibilty(r),t.show()}e.on("canvas.viewbox.changing",function(r){t.hide()}),e.on("canvas.viewbox.changed",function(r){n(r.viewbox)}),e.on(["shape.remove","connection.remove"],function(r){var i=r.element,a=t.get({element:i});N(a,function(c){t.remove(c.id)});var s=t._getOverlayContainer(i);if(s){xn(s.html);var l=t._overlayContainers.indexOf(s);l!==-1&&t._overlayContainers.splice(l,1)}}),e.on("element.changed",rc,function(r){var i=r.element,a=t._getOverlayContainer(i,!0);a&&(N(a.overlays,function(s){t._updateOverlay(s)}),t._updateOverlayContainer(a))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&kn(i.html)[r.add?"add":"remove"](r.marker)}),e.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox())}),e.on("diagram.clear",this.clear,this)};function ic(e){var t=Ge('<div class="djs-overlay-container" />');return Ce(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function la(e,t,n){Ce(e,{left:t+"px",top:n+"px"})}function Ln(e,t){e.style.display=t===!1?"none":""}function ca(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const fa={__init__:["overlays"],overlays:["type",me]};function pa(e,t,n,r){e.on("element.changed",function(i){var a=i.element;(a.parent||a===t.getRootElement())&&(i.gfx=n.getGraphics(a)),i.gfx&&e.fire(Ai(a)+".changed",i)}),e.on("elements.changed",function(i){var a=i.elements;a.forEach(function(s){e.fire("element.changed",{element:s})}),r.updateContainments(a)}),e.on("shape.changed",function(i){r.update("shape",i.element,i.gfx)}),e.on("connection.changed",function(i){r.update("connection",i.element,i.gfx)})}pa.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const ac={__init__:["changeSupport"],changeSupport:["type",pa]};var oc=1e3;function xe(e){this._eventBus=e}xe.$inject=["eventBus"];function sc(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}xe.prototype.on=function(e,t,n,r,i,a){if((Ze(t)||Re(t))&&(a=i,i=r,r=n,n=t,t=null),Ze(n)&&(a=i,i=r,r=n,n=oc),Ke(i)&&(a=i,i=!1),!Ze(r))throw new Error("handlerFn must be a function");Pe(e)||(e=[e]);var s=this._eventBus;N(e,function(l){var c=["commandStack",l,t].filter(function(p){return p}).join(".");s.on(c,n,i?sc(r,a):r,a)})};xe.prototype.canExecute=nt("canExecute");xe.prototype.preExecute=nt("preExecute");xe.prototype.preExecuted=nt("preExecuted");xe.prototype.execute=nt("execute");xe.prototype.executed=nt("executed");xe.prototype.postExecute=nt("postExecute");xe.prototype.postExecuted=nt("postExecuted");xe.prototype.revert=nt("revert");xe.prototype.reverted=nt("reverted");function nt(e){return function(n,r,i,a,s){(Ze(n)||Re(n))&&(s=a,a=i,i=r,r=n,n=null),this.on(n,e,r,i,a,s)}}function br(e,t){t.invoke(xe,this),this.executed(function(n){var r=n.context;r.rootElement?e.setRootElement(r.rootElement):r.rootElement=e.getRootElement()}),this.revert(function(n){var r=n.context;r.rootElement&&e.setRootElement(r.rootElement)})}Xe(br,xe);br.$inject=["canvas","injector"];const uc={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",br]};function ff(e){return CSS.escape(e)}var lc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function cc(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return lc[t]})}var fc="bjs-breadcrumbs-shown";function ha(e,t,n){var r=Ge('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),a=kn(i);i.appendChild(r);var s=[];e.on("element.changed",function(c){var p=c.element,d=oe(p),g=$e(s,function(T){return T===d});g&&l()});function l(c){c&&(s=pc(c));var p=s.flatMap(function(g){var T=n.findRoot(rr(g))||n.findRoot(g.id);if(!T&&$(g,"bpmn:Process")){var v=t.find(function(I){var H=oe(I);return H&&H.get("processRef")===g});T=v&&n.findRoot(v.id)}if(!T)return[];var x=cc(g.name||g.id),C=Ge('<li><span class="bjs-crumb"><a title="'+x+'">'+x+"</a></span></li>");return C.addEventListener("click",function(){n.setRootElement(T)}),C});r.innerHTML="";var d=p.length>1;a.toggle(fc,d),p.forEach(function(g){r.appendChild(g)})}e.on("root.set",function(c){l(c.element)})}ha.$inject=["eventBus","elementRegistry","canvas"];function pc(e){for(var t=oe(e),n=[],r=t;r;r=r.$parent)($(r,"bpmn:SubProcess")||$(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function da(e,t){var n=null,r=new hc;e.on("root.set",function(i){var a=i.element,s=t.viewbox(),l=r.get(a);if(r.set(n,{x:s.x,y:s.y,zoom:s.scale}),n=a,!(!$(a,"bpmn:SubProcess")&&!l)){l=l||{x:0,y:0,zoom:1};var c=(s.x-l.x)*s.scale,p=(s.y-l.y)*s.scale;(c!==0||p!==0)&&t.scroll({dx:c,dy:p}),l.zoom!==s.scale&&t.zoom(l.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}da.$inject=["eventBus","canvas"];function hc(){this._entries=[],this.set=function(e,t){var n=!1;for(var r in this._entries)if(this._entries[r][0]===e){this._entries[r][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}t!==-1&&this._entries.splice(t,1)}}var ni={x:180,y:160};function Rt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}Rt.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(r){!r.plane||!r.plane.bpmnElement||(t._processToDiagramMap[r.plane.bpmnElement.id]=r)});var n=e.diagrams.filter(r=>r.plane).flatMap(r=>t._createNewDiagrams(r.plane));n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}};Rt.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(a){var s=a.bpmnElement;if(s){var l=s.$parent;$(s,"bpmn:SubProcess")&&!a.isExpanded&&n.push(s),mc(s,e)&&r.push({diElement:a,parent:l})}});var i=[];return n.forEach(function(a){if(!t._processToDiagramMap[a.id]){var s=t._createDiagram(a);t._processToDiagramMap[a.id]=s,i.push(s)}}),r.forEach(function(a){for(var s=a.diElement,l=a.parent;l&&n.indexOf(l)===-1;)l=l.$parent;if(l){var c=t._processToDiagramMap[l.id];t._moveToDiPlane(s,c.plane)}}),i};Rt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=dc(e),r={x:n.x-ni.x,y:n.y-ni.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(a){a.x=a.x-r.x,a.y=a.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})};Rt.prototype._moveToDiPlane=function(e,t){var n=ma(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)};Rt.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};Rt.$inject=["eventBus","moddle"];function ma(e){return $(e,"bpmndi:BPMNDiagram")?e:ma(e.$parent)}function dc(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach(function(n){if(n.bounds){var r=qt(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),Qo(t)}function mc(e,t){var n=e.$parent;return!(!$(n,"bpmn:SubProcess")||n===t.bpmnElement||vn(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var ln=250,yc='<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>',gc="bjs-drilldown-empty";function gt(e,t,n,r,i){xe.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r,this._translate=i;var a=this;this.executed("shape.toggleCollapse",ln,function(s){var l=s.shape;a._canDrillDown(l)?a._addOverlay(l):a._removeOverlay(l)},!0),this.reverted("shape.toggleCollapse",ln,function(s){var l=s.shape;a._canDrillDown(l)?a._addOverlay(l):a._removeOverlay(l)},!0),this.executed(["shape.create","shape.move","shape.delete"],ln,function(s){var l=s.oldParent,c=s.newParent||s.parent,p=s.shape;a._canDrillDown(p)&&a._addOverlay(p),a._updateDrilldownOverlay(l),a._updateDrilldownOverlay(c),a._updateDrilldownOverlay(p)},!0),this.reverted(["shape.create","shape.move","shape.delete"],ln,function(s){var l=s.oldParent,c=s.newParent||s.parent,p=s.shape;a._canDrillDown(p)&&a._addOverlay(p),a._updateDrilldownOverlay(l),a._updateDrilldownOverlay(c),a._updateDrilldownOverlay(p)},!0),t.on("import.render.complete",function(){n.filter(function(s){return a._canDrillDown(s)}).map(function(s){a._addOverlay(s)})})}Xe(gt,xe);gt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}};gt.prototype._canDrillDown=function(e){var t=this._canvas;return $(e,"bpmn:SubProcess")&&t.findRoot(rr(e))};gt.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=oe(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;kn(r.html).toggle(gc,!i)}};gt.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=oe(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var a=Ge('<button type="button" class="bjs-drilldown">'+yc+"</button>"),s=r.get("name")||r.get("id"),l=this._translate("Open {element}",{element:s});a.setAttribute("title",l),a.addEventListener("click",function(){t.setRootElement(t.findRoot(rr(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:a}),this._updateOverlayVisibility(e)};gt.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})};gt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const vc={__depends__:[fa,ac,uc],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",ha],drilldownCentering:["type",da],drilldownOverlayBehavior:["type",gt],subprocessCompatibility:["type",Rt]};var Ec=500,wc=1e3;function Ct(e,t){this._eventBus=e,this.offset=5;var n=t.cls("djs-outline",["no-fill"]),r=this;function i(a){var s=J("rect");return Q(s,V({x:0,y:0,rx:4,width:100,height:100},n)),s}e.on(["shape.added","shape.changed"],Ec,function(a){var s=a.element,l=a.gfx,c=We(".djs-outline",l);c||(c=r.getOutline(s)||i(),ce(l,c)),r.updateShapeOutline(c,s)}),e.on(["connection.added","connection.changed"],function(a){var s=a.element,l=a.gfx,c=We(".djs-outline",l);c||(c=i(),ce(l,c)),r.updateConnectionOutline(c,s)})}Ct.prototype.updateShapeOutline=function(e,t){var n=!1,r=this._getProviders();r.length&&N(r,function(i){n=n||i.updateOutline(t,e)}),n||Q(e,{x:-this.offset,y:-this.offset,width:t.width+this.offset*2,height:t.height+this.offset*2})};Ct.prototype.updateConnectionOutline=function(e,t){var n=pt(t);Q(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+this.offset*2,height:n.height+this.offset*2})};Ct.prototype.registerProvider=function(e,t){t||(t=e,e=wc),this._eventBus.on("outline.getProviders",e,function(n){n.providers.push(t)})};Ct.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"outline.getProviders",providers:[]});return this._eventBus.fire(e),e.providers};Ct.prototype.getOutline=function(e){var t,n=this._getProviders();return N(n,function(r){Ze(r.getOutline)&&(t=t||r.getOutline(e))}),t};Ct.$inject=["eventBus","styles","elementRegistry"];const ya={__init__:["outline"],outline:["type",Ct]},xc="M44.7648 11.3263L36.9892 2.64074C36.0451 1.58628 34.5651 0.988708 33.1904 0.988708H5.98667C3.22688 0.988708 0.989624 3.34892 0.989624 6.26039V55.0235C0.989624 57.9349 3.22688 60.2952 5.98667 60.2952H40.966C43.7257 60.2952 45.963 57.9349 45.963 55.0235V14.9459C45.963 13.5998 45.6407 12.3048 44.7648 11.3263Z",_c="M1.03845 48.1347C1.03845 49.3511 1.07295 50.758 1.38342 52.064C1.69949 53.3938 2.32428 54.7154 3.56383 55.6428C6.02533 57.4841 10.1161 58.7685 14.8212 59.6067C19.5772 60.4538 25.1388 60.8738 30.6831 60.8738C36.2276 60.8738 41.7891 60.4538 46.545 59.6067C51.2504 58.7687 55.3412 57.4842 57.8028 55.6429C59.0424 54.7156 59.6673 53.3938 59.9834 52.064C60.2938 50.7579 60.3285 49.351 60.3285 48.1344V13.8415C60.3285 12.6249 60.2938 11.218 59.9834 9.91171C59.6673 8.58194 59.0423 7.2602 57.8027 6.33294C55.341 4.49168 51.2503 3.20723 46.545 2.36914C41.7891 1.522 36.2276 1.10204 30.6831 1.10205C25.1388 1.10206 19.5772 1.52206 14.8213 2.36923C10.1162 3.20734 6.02543 4.49183 3.5639 6.33314C2.32433 7.26038 1.69951 8.58206 1.38343 9.91181C1.07295 11.2179 1.03845 12.6247 1.03845 13.8411V48.1347Z",bc={width:36,height:50},Ac={width:50,height:50};function ri(e,t,n){return J("path",ie({d:e,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`},n))}const ot=5;function In(e,t){this._styles=t,e.registerProvider(this)}In.$inject=["outline","styles"];In.prototype.getOutline=function(e){const t=this._styles.cls("djs-outline",["no-fill"]);var n;if(!pr(e))return $(e,"bpmn:Gateway")?(n=J("rect"),V(n.style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),Q(n,V({x:2,y:2,rx:4,width:e.width-4,height:e.height-4},t))):vn(e,["bpmn:Task","bpmn:SubProcess","bpmn:Group","bpmn:CallActivity"])?(n=J("rect"),Q(n,V({x:-ot,y:-ot,rx:14,width:e.width+ot*2,height:e.height+ot*2},t))):$(e,"bpmn:EndEvent")?(n=J("circle"),Q(n,V({cx:e.width/2,cy:e.height/2,r:e.width/2+ot+1},t))):$(e,"bpmn:Event")?(n=J("circle"),Q(n,V({cx:e.width/2,cy:e.height/2,r:e.width/2+ot},t))):$(e,"bpmn:DataObjectReference")&&ii(e,"bpmn:DataObjectReference")?n=ri(xc,{x:-6,y:-6},t):$(e,"bpmn:DataStoreReference")&&ii(e,"bpmn:DataStoreReference")&&(n=ri(_c,{x:-6,y:-6},t)),n};In.prototype.updateOutline=function(e,t){if(!pr(e))return vn(e,["bpmn:SubProcess","bpmn:Group"])?(Q(t,{width:e.width+ot*2,height:e.height+ot*2}),!0):!!vn(e,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"])};function ii(e,t){var n;return t==="bpmn:DataObjectReference"?n=bc:t==="bpmn:DataStoreReference"&&(n=Ac),e.width===n.width&&e.height===n.height}const Sc={__depends__:[ya],__init__:["outlineProvider"],outlineProvider:["type",In]};function ai(e){!e||typeof e.stopPropagation!="function"||e.stopPropagation()}function Fn(e){return e.originalEvent||e.srcEvent}function pf(e){ai(e),ai(Fn(e))}function hf(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 Rc(){return/mac/i.test(navigator.platform)}function ga(e,t){return(Fn(e)||e).button===t}function tn(e){return ga(e,0)}function Cc(e){return ga(e,1)}function df(e){var t=Fn(e)||e;return tn(e)?Rc()?t.metaKey:t.ctrlKey:!1}function Pc(e){var t=Fn(e)||e;return tn(e)&&t.shiftKey}function Tc(e){return!0}function cn(e){return tn(e)||Cc(e)}var oi=500;function va(e,t,n){var r=this;function i(E,k,P){if(!l(E,k)){var B,O,F;P?O=t.getGraphics(P):(B=k.delegateTarget||k.target,B&&(O=B,P=t.get(O))),!(!O||!P)&&(F=e.fire(E,{element:P,gfx:O,originalEvent:k}),F===!1&&(k.stopPropagation(),k.preventDefault()))}}var a={};function s(E){return a[E]}function l(E,k){var P=p[E]||tn;return!P(k)}var c={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},p={"element.contextmenu":Tc,"element.mousedown":cn,"element.mouseup":cn,"element.click":cn,"element.dblclick":cn};function d(E,k,P){var B=c[E];if(!B)throw new Error("unmapped DOM event name <"+E+">");return i(B,k,P)}var g="svg, .djs-element";function T(E,k,P,B){var O=a[P]=function(F){i(P,F)};B&&(p[P]=B),O.$delegate=Un.bind(E,g,k,O)}function v(E,k,P){var B=s(P);B&&Un.unbind(E,k,B.$delegate)}function x(E){N(c,function(k,P){T(E,P,k)})}function C(E){N(c,function(k,P){v(E,P,k)})}e.on("canvas.destroy",function(E){C(E.svg)}),e.on("canvas.init",function(E){x(E.svg)}),e.on(["shape.added","connection.added"],function(E){var k=E.element,P=E.gfx;e.fire("interactionEvents.createHit",{element:k,gfx:P})}),e.on(["shape.changed","connection.changed"],oi,function(E){var k=E.element,P=E.gfx;e.fire("interactionEvents.updateHit",{element:k,gfx:P})}),e.on("interactionEvents.createHit",oi,function(E){var k=E.element,P=E.gfx;r.createDefaultHit(k,P)}),e.on("interactionEvents.updateHit",function(E){var k=E.element,P=E.gfx;r.updateDefaultHit(k,P)});var I=w("djs-hit djs-hit-stroke"),H=w("djs-hit djs-hit-click-stroke"),U=w("djs-hit djs-hit-all"),_=w("djs-hit djs-hit-no-move"),y={all:U,"click-stroke":H,stroke:I,"no-move":_};function w(E,k){return k=V({stroke:"white",strokeWidth:15},k||{}),n.cls(E,["no-fill","no-border"],k)}function S(E,k){var P=y[k];if(!P)throw new Error("invalid hit type <"+k+">");return Q(E,P),E}function D(E,k){ce(E,k)}this.removeHits=function(E){var k=ro(".djs-hit",E);N(k,Xt)},this.createDefaultHit=function(E,k){var P=E.waypoints,B=E.isFrame,O;return P?this.createWaypointsHit(k,P):(O=B?"stroke":"all",this.createBoxHit(k,O,{width:E.width,height:E.height}))},this.createWaypointsHit=function(E,k){var P=ur(k);return S(P,"stroke"),D(E,P),P},this.createBoxHit=function(E,k,P){P=V({x:0,y:0},P);var B=J("rect");return S(B,k),Q(B,P),D(E,B),B},this.updateDefaultHit=function(E,k){var P=We(".djs-hit",k);if(P)return E.waypoints?_i(P,E.waypoints):Q(P,{width:E.width,height:E.height}),P},this.fire=i,this.triggerMouseEvent=d,this.mouseHandler=s,this.registerEvent=T,this.unregisterEvent=v}va.$inject=["eventBus","elementRegistry","styles"];const kc={__init__:["interactionEvents"],interactionEvents:["type",va]};function $t(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],function(r){var i=r.element;n.deselect(i)}),e.on(["diagram.clear","root.set"],function(r){n.select(null)})}$t.$inject=["eventBus","canvas"];$t.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(n!==-1){var r=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:t})}};$t.prototype.get=function(){return this._selectedElements};$t.prototype.isSelected=function(e){return this._selectedElements.indexOf(e)!==-1};$t.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();Pe(e)||(e=e?[e]:[]);var i=this._canvas,a=i.getRootElement();e=e.filter(function(s){var l=i.findRoot(s);return a===l}),t?N(e,function(s){n.indexOf(s)===-1&&n.push(s)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};var si="hover",ui="selected",fn=6;function Ar(e,t,n){this._canvas=e;var r=this;this._multiSelectionBox=null;function i(s,l){e.addMarker(s,l)}function a(s,l){e.removeMarker(s,l)}t.on("element.hover",function(s){i(s.element,si)}),t.on("element.out",function(s){a(s.element,si)}),t.on("selection.changed",function(s){function l(g){a(g,ui)}function c(g){i(g,ui)}var p=s.oldSelection,d=s.newSelection;N(p,function(g){d.indexOf(g)===-1&&l(g)}),N(d,function(g){p.indexOf(g)===-1&&c(g)}),r._updateSelectionOutline(d)}),t.on("element.changed",function(s){n.isSelected(s.element)&&r._updateSelectionOutline(n.get())})}Ar.$inject=["canvas","eventBus","selection"];Ar.prototype._updateSelectionOutline=function(e){var t=this._canvas.getLayer("selectionOutline");lo(t);var n=e.length>1,r=this._canvas.getContainer();if(Fe(r)[n?"add":"remove"]("djs-multi-select"),!!n){var i=Mc(pt(e)),a=J("rect");Q(a,V({rx:3},i)),Fe(a).add("djs-selection-outline"),ce(t,a)}};function Mc(e){return{x:e.x-fn,y:e.y-fn,width:e.width+fn*2,height:e.height+fn*2}}function Ea(e,t,n,r){e.on("create.end",500,function(i){var a=i.context,s=a.canExecute,l=a.elements,c=a.hints||{},p=c.autoSelect;if(s){if(p===!1)return;Pe(p)?t.select(p):t.select(l.filter(Dc))}}),e.on("connect.end",500,function(i){var a=i.context,s=a.connection;s&&t.select(s)}),e.on("shape.move.end",500,function(i){var a=i.previousSelection||[],s=r.get(i.context.shape.id),l=$e(a,function(c){return s.id===c.id});l||t.select(s)}),e.on("element.click",function(i){if(tn(i)){var a=i.element;a===n.getRootElement()&&(a=null);var s=t.isSelected(a),l=t.get().length>1,c=Pc(i);if(s&&l)return c?t.deselect(a):t.select(a);s?t.deselect(a):t.select(a,c)}})}Ea.$inject=["eventBus","selection","canvas","elementRegistry"];function Dc(e){return!e.hidden}const Oc={__init__:["selectionVisuals","selectionBehavior"],__depends__:[kc,ya],selection:["type",$t],selectionVisuals:["type",Ar],selectionBehavior:["type",Ea]};function Sr(e){fe.call(this,e)}Xe(Sr,fe);Sr.prototype._modules=[tc,vc,Sc,fa,Oc,oa];Sr.prototype._moddleExtensions={};export{ci as $,Rc as A,fe as B,N as C,Da as D,wt as E,ua as F,qa as G,ff as H,Je as I,er as J,Zo as K,kc as L,Mt as M,xn as N,fa as O,Fa as P,xe as Q,Uc as R,Dt as S,ef as T,qt as U,Sr as V,Gn as W,qe as X,Jr as Y,Bc as Z,Fc as _,rr as a,Lc as a$,Pr as a0,pt as a1,Qo as a2,Ia as a3,pr as a4,pf as a5,Fn as a6,Oc as a7,cr as a8,qo as a9,Pn as aA,Et as aB,Yc as aC,df as aD,Jc as aE,Wc as aF,Vc as aG,jc as aH,af as aI,of as aJ,sf as aK,uf as aL,Ta as aM,Yt as aN,_t as aO,Pc as aP,Ma as aQ,Gc as aR,$c as aS,It as aT,Rn as aU,qu as aV,Kc as aW,rf as aX,ka as aY,ml as aZ,cf as a_,Qc as aa,Xc as ab,ce as ac,Fe as ad,$i as ae,vs as af,tn as ag,nf as ah,Lo as ai,li as aj,Ke as ak,lo as al,tf as am,ur as an,zc as ao,ys as ap,lf as aq,_r as ar,fl as as,No as at,Bo as au,Re as av,lr as aw,hn as ax,pl as ay,Cn as az,ao as b,Zc as b0,ac as b1,Hn as b2,Ce as b3,Ic as b4,ya as b5,qc as b6,oa as b7,Ba as b8,cc as b9,J as c,Q as d,Xe as e,$e as f,oe as g,ro as h,$ as i,kn as j,Ge as k,ar as l,hi as m,Un as n,lt as o,vn as p,We as q,Xt as r,tr as s,Pe as t,Xa as u,Ze as v,Hc as w,V as x,hf as y,ut as z};