UNPKG

camunda-bpmn-js

Version:

Embeddable Camunda modeling distributions based on bpmn-js

1 lines 183 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnViewer=t()}(this,(function(){"use strict";function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const t=Object.prototype.toString,n=Object.prototype.hasOwnProperty;function i(e){return void 0===e}function r(e){return void 0!==e}function o(e){return null==e}function a(e){return"[object Array]"===t.call(e)}function s(e){return"[object Object]"===t.call(e)}function l(e){return"[object Number]"===t.call(e)}function p(e){const n=t.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function c(e){return"[object String]"===t.call(e)}function u(e,t){return!o(e)&&n.call(e,t)}function h(e,t){const n=x(t);let i;return m(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function f(e,t){const n=x(t);let i=[];return m(e,(function(e,t){n(e,t)&&i.push(e)})),i}function m(e,t){let n,r;if(i(e))return;const o=a(e)?w:b;for(let i in e)if(u(e,i)&&(n=e[i],r=t(n,o(i)),!1===r))return n}function d(e,t,n){return m(e,(function(e,i){n=t(n,e,i)})),n}function y(e,t){return!!d(e,(function(e,n,i){return e&&t(n,i)}),!0)}function g(e,t){return!!h(e,t)}function v(e){return function(t){return y(e,(function(e,n){return t[n]===e}))}}function x(e){return p(e)?e:t=>t===e}function b(e){return e}function w(e){return Number(e)}function E(e,t){return e.bind(t)}function _(e,...t){return Object.assign(e,...t)}var A=1e3;function k(e,t){var n=this;t=t||A,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,a=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,a):n.drawConnection(o,r,a)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function R(e,t){var n=S(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function S(e){return e&&e.businessObject||e}function C(e){return e&&e.di}function M(e,t){return!R(e,"bpmn:CallActivity")&&(R(e,"bpmn:SubProcess")?!(!(t=t||C(e))||!R(t,"bpmndi:BPMNPlane"))||t&&!!t.isExpanded:!R(e,"bpmn:Participant")||!!S(e).processRef)}function P(e){if(R(e,"bpmn:Participant")||R(e,"bpmn:Lane")){var t=C(e).isHorizontal;return void 0===t||t}}k.prototype.canRender=function(e){},k.prototype.drawShape=function(e,t){},k.prototype.drawConnection=function(e,t){},k.prototype.getShapePath=function(e){},k.prototype.getConnectionPath=function(e){};var D={width:90,height:20},N=15;function T(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],r=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}(e),o=Math.atan((i.y-n.y)/(i.x-n.x)),a=r.x,s=r.y;return Math.abs(o)<Math.PI/2?s-=N:a+=N,{x:a,y:s}}function B(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(D.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=function(e){return e.waypoints?T(e.waypoints):R(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+D.height/2}:{x:e.x+e.width/2,y:e.y+e.height+D.height/2}}(t),i=D),_({x:n.x-i.width/2,y:n.y-i.height/2},i)}function O(e){var t=e.businessObject,n=function(e){return R(e,"bpmn:FlowElement")||R(e,"bpmn:Participant")||R(e,"bpmn:Lane")||R(e,"bpmn:SequenceFlow")||R(e,"bpmn:MessageFlow")||R(e,"bpmn:DataInput")||R(e,"bpmn:DataOutput")?"name":R(e,"bpmn:TextAnnotation")?"text":R(e,"bpmn:Group")?"categoryValueRef":void 0}(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function L(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}var I=2,F={"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":I,"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":I,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function j(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=F[i];r?(r===I&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function V(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return F[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);j(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)j(e,i,t[i])}(e,t);return e}const W=Object.prototype.toString;function $(e){return new z(e)}function z(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}z.prototype.add=function(e){return this.list.add(e),this},z.prototype.remove=function(e){return"[object RegExp]"==W.call(e)?this.removeMatching(e):(this.list.remove(e),this)},z.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},z.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},z.prototype.array=function(){return Array.from(this.list)},z.prototype.has=z.prototype.contains=function(e){return this.list.contains(e)};var G={svg:"http://www.w3.org/2000/svg"},H='<svg xmlns="'+G.svg+'"';function K(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(G.svg)&&(e=H+e.substring(4)):(e=H+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function U(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=K(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(G.svg,e),t&&V(n,t),n}var q=null;function Y(){return null===q&&(q=U("svg")),q}function X(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function Z(e){return Y().createSVGTransform()}var J=/([&<>]{1})/g,Q=/([\n\r"]{1})/g,ee={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function te(e,t){return e.replace(t,(function(e,t){return ee[t]||t}))}function ne(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(te(e.textContent,J));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',te(o.value,Q),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)ne(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",te(e.nodeValue,J),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function ie(e,t){return function(e){for(var t=e.firstChild,n=[];t;)ne(t,n),t=t.nextSibling;return n.join("")}(e)}function re(e){var t=e.parentNode;return t&&t.removeChild(e),e}function oe(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function ae(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(oe(e,i))}(n,t)),n.consolidate()}function se(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function le(e){return["L",e.x,e.y]}function pe(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,a,s;for(let r=1;r<n;r++){const n=e[r-1],l=e[r],p=e[r+1];if(!p||!t){i.push(le(l));continue}const c=Math.min(t,ue(l.x-n.x,l.y-n.y),ue(p.x-l.x,p.y-l.y));if(!c){i.push(le(l));continue}const u=ce(l,n,c),h=ce(l,n,.5*c),f=ce(l,p,c),m=ce(l,p,.5*c);i.push(le(u)),i.push((a=m,s=f,["C",(o=h).x,o.y,a.x,a.y,s.x,s.y]))}return i}function ce(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/ue(i,r);return{x:e.x+i*o,y:e.y+r*o}}function ue(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function he(e,t,n){l(t)&&(n=t,t=null),t||(t={});const i=U("path",t);return l(n)&&(i.dataset.cornerRadius=String(n)),fe(i,e)}function fe(e,t){return V(e,{d:se(pe(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}var me="hsl(225, 10%, 15%)",de="white";function ye(e,t){return g(e.eventDefinitions,(function(e){return e.$type===t}))}function ge(e,t,n){var i=C(e);return n||i.get("color:background-color")||i.get("bioc:fill")||t||de}function ve(e,t,n){var i=C(e);return n||i.get("color:border-color")||i.get("bioc:stroke")||t||me}function xe(e,t,n,i){var r=C(e).get("label");return i||r&&r.get("color:color")||t||ve(e,n)}function be(e,t={}){return{width:we(e,t),height:Ee(e,t)}}function we(e,t={}){return u(t,"width")?t.width:e.width}function Ee(e,t={}){return u(t,"height")?t.height:e.height}function _e(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const Ae=Object.prototype.toString,ke=Object.prototype.hasOwnProperty;function Re(e,t){return ke.call(e,t)}function Se(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===Ae.call(e)}(e)?Me:Ce;for(let o in e)if(Re(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function Ce(e){return e}function Me(e){return Number(e)}function Pe(e,...t){const n=e.style;return Se(t,(function(e){e&&Se(e,(function(e,t){n[t]=e}))})),e}function De(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Ne=Object.prototype.toString;function Te(e){return new Be(e)}function Be(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Oe(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}Be.prototype.add=function(e){return this.list.add(e),this},Be.prototype.remove=function(e){return"[object RegExp]"==Ne.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Be.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},Be.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Be.prototype.array=function(){return Array.from(this.list)},Be.prototype.has=Be.prototype.contains=function(e){return this.list.contains(e)};var Le,Ie,Fe,je={};function Ve(){Le=window.addEventListener?"addEventListener":"attachEvent",Ie=window.removeEventListener?"removeEventListener":"detachEvent",Fe="addEventListener"!==Le?"on":""}var We=_e({__proto__:null,bind:je.bind=function(e,t,n,i){return Le||Ve(),e[Le](Fe+t,n,i||!1),n},unbind:je.unbind=function(e,t,n,i){return Ie||Ve(),e[Ie](Fe+t,n,i||!1),n},default:je},[je]),$e=["focus","blur"];var ze,Ge={bind:function(e,t,n,i,r){return-1!==$e.indexOf(n)&&(r=!0),We.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=function(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==$e.indexOf(t)&&(i=!0),We.unbind(e,t,n,i)}},He=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=Object.prototype.hasOwnProperty.call(Ue,i)?Ue[i]:Ue._default,a=o[0],s=o[1],l=o[2];(r=t.createElement("div")).innerHTML=s+e+l;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},Ke=!1;"undefined"!=typeof document&&((ze=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',Ke=!ze.getElementsByTagName("link").length,ze=void 0);var Ue={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:Ke?[1,"X<div>","</div>"]:[0,"",""]};Ue.td=Ue.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Ue.option=Ue.optgroup=[1,'<select multiple="multiple">',"</select>"],Ue.thead=Ue.tbody=Ue.colgroup=Ue.caption=Ue.tfoot=[1,"<table>","</table>"],Ue.polyline=Ue.ellipse=Ue.polygon=Ue.circle=Ue.text=Ue.line=Ue.path=Ue.rect=Ue.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var qe=He;function Ye(e,t){return(t=t||document).querySelector(e)}function Xe(e){e.parentNode&&e.parentNode.removeChild(e)}function Ze(e,t,n,i,r){var o=Z();o.setTranslate(t,n);var a=Z();a.setRotate(i||0,0,0);var s=Z();s.setScale(1,1),ae(e,[o,a,s])}function Je(e,t,n){var i=Z();i.setTranslate(t,n),ae(e,i)}var Qe=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var l=parseInt(a,n);return l!==1/0&&l>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function et(e){if(!(this instanceof et))return new et(e);e=e||[128,36,1],this._seed=e.length?Qe.rack(e[0],e[1],e[2]):e}et.prototype.next=function(e){return this._seed(e||!0)},et.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},et.prototype.claim=function(e,t){this._seed.set(e,t||!0)},et.prototype.assigned=function(e){return this._seed.get(e)||!1},et.prototype.unclaim=function(e){delete this._seed.hats[e]},et.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var tt=new et,nt=.95;function it(e,t,n,i,r,o,a){k.call(this,t,a);var l=e&&e.defaultFillColor,p=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor;function u(e){return n.computeStyle(e,{strokeLinecap:"round",strokeLinejoin:"round",stroke:me,strokeWidth:2,fill:"white"})}function h(e){return n.computeStyle(e,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:me,strokeWidth:2})}function f(e,t){var{ref:n={x:0,y:0},scale:i=1,element:o,parentGfx:a=r._svg}=t,s=U("marker",{id:e,viewBox:"0 0 20 20",refX:n.x,refY:n.y,markerWidth:20*i,markerHeight:20*i,orient:"auto"});L(s,o);var l=Ye(":scope > defs",a);l||L(a,l=U("defs")),L(l,s)}function d(e,t,n,i){var r=tt.nextPrefixed("marker-");return function(e,t,n,i,r){if("sequenceflow-end"===n){f(t,{element:U("path",{d:"M 1 5 L 11 10 L 1 15 Z",...u({fill:r,stroke:r,strokeWidth:1})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("messageflow-start"===n){f(t,{element:U("circle",{cx:6,cy:6,r:3.5,...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:6,y:6},parentGfx:e})}if("messageflow-end"===n){f(t,{element:U("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...u({fill:i,stroke:r,strokeWidth:1,strokeDasharray:[1e4,1]})}),ref:{x:8.5,y:5},parentGfx:e})}if("association-start"===n){f(t,{element:U("path",{d:"M 11 5 L 1 10 L 11 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:1,y:10},scale:.5,parentGfx:e})}if("association-end"===n){f(t,{element:U("path",{d:"M 1 5 L 11 10 L 1 15",...h({fill:"none",stroke:r,strokeWidth:1.5,strokeDasharray:[1e4,1]})}),ref:{x:11,y:10},scale:.5,parentGfx:e})}if("conditional-flow-marker"===n){f(t,{element:U("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...u({fill:i,stroke:r})}),ref:{x:-1,y:10},scale:.5,parentGfx:e})}if("conditional-default-flow-marker"===n){f(t,{element:U("path",{d:"M 6 4 L 10 16",...u({stroke:r,fill:"none"})}),ref:{x:0,y:10},scale:.5,parentGfx:e})}}(e,r,t,n,i),"url(#"+r+")"}function y(e,t,n,i,r={}){s(i)&&(r=i,i=0),i=i||0,r=u(r);var o=U("circle",{cx:t/2,cy:n/2,r:Math.round((t+n)/4-i),...r});return L(e,o),o}function g(e,t,n,i,r,o){s(r)&&(o=r,r=0),r=r||0,o=u(o);var a=U("rect",{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i,...o});return L(e,a),a}function v(e,t,n,i){var r=he(t,n=h(n),i);return L(e,r),r}function x(e,t,n){return v(e,t,n,5)}function b(e,t,n){n=h(n);var i=U("path",{...n,d:t});return L(e,i),i}function w(e,t,n,i){return b(t,n,_({"data-marker":e},i))}function E(e){return Q[e]}function A(e){return function(t,n,i){return E(e)(t,n,i)}}var D={"bpmn:MessageEventDefinition":function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.235,my:.315}}),{fill:r?ve(t,p,n.stroke):ge(t,l,n.fill),stroke:r?ge(t,l,n.fill):ve(t,p,n.stroke),strokeWidth:1})},"bpmn:TimerEventDefinition":function(e,t,n={}){var r=n.width||t.width,o=n.height||t.height,a=n.width?1:2,s=y(e,r,o,.2*o,{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:a});b(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:r,containerHeight:o,position:{mx:.5,my:.5}}),{stroke:ve(t,p,n.stroke),strokeWidth:a});for(var c=0;c<12;c++){var u=r/2,h=o/2;b(e,i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:r,containerHeight:o,position:{mx:.5,my:.5}}),{strokeWidth:1,stroke:ve(t,p,n.stroke),transform:"rotate("+30*c+","+h+","+u+")"})}return s},"bpmn:EscalationEventDefinition":function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.5,my:.2}}),{fill:r?ve(t,p,n.stroke):ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(e,t,n={}){return b(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.5,my:.222}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{fill:r?ve(t,p,n.stroke):ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.2,my:.722}}),{fill:r?ve(t,p,n.stroke):ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(e,t,n={},r){var o=b(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{fill:r?ve(t,p,n.stroke):"none",stroke:ve(t,p,n.stroke),strokeWidth:1});return function(e,t){var n=Z();n.setRotate(t,0,0),ae(e,n)}(o,45),o},"bpmn:CompensateEventDefinition":function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.22,my:.5}}),{fill:r?ve(t,p,n.stroke):ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:r?ve(t,p,n.stroke):ge(t,l,n.fill),stroke:ve(t,p,n.stroke)})},"bpmn:MultipleEventDefinition":function(e,t,n={},r){return b(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.211,my:.36}}),{fill:r?ve(t,p,n.stroke):ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(e,t,n={}){return b(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:n.width||t.width,containerHeight:n.height||t.height,position:{mx:.458,my:.194}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(e,t,n={}){return y(e,t.width,t.height,8,{fill:ve(t,p,n.stroke),stroke:ve(t,p,n.stroke),strokeWidth:4})}};function N(e,t,n={},i){var r=S(e),o=function(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(r),a=i||e;return r.get("eventDefinitions")&&r.get("eventDefinitions").length>1?r.get("parallelMultiple")?D["bpmn:ParallelMultipleEventDefinition"](t,a,n,o):D["bpmn:MultipleEventDefinition"](t,a,n,o):ye(r,"bpmn:MessageEventDefinition")?D["bpmn:MessageEventDefinition"](t,a,n,o):ye(r,"bpmn:TimerEventDefinition")?D["bpmn:TimerEventDefinition"](t,a,n,o):ye(r,"bpmn:ConditionalEventDefinition")?D["bpmn:ConditionalEventDefinition"](t,a,n,o):ye(r,"bpmn:SignalEventDefinition")?D["bpmn:SignalEventDefinition"](t,a,n,o):ye(r,"bpmn:EscalationEventDefinition")?D["bpmn:EscalationEventDefinition"](t,a,n,o):ye(r,"bpmn:LinkEventDefinition")?D["bpmn:LinkEventDefinition"](t,a,n,o):ye(r,"bpmn:ErrorEventDefinition")?D["bpmn:ErrorEventDefinition"](t,a,n,o):ye(r,"bpmn:CancelEventDefinition")?D["bpmn:CancelEventDefinition"](t,a,n,o):ye(r,"bpmn:CompensateEventDefinition")?D["bpmn:CompensateEventDefinition"](t,a,n,o):ye(r,"bpmn:TerminateEventDefinition")?D["bpmn:TerminateEventDefinition"](t,a,n,o):null}var T={ParticipantMultiplicityMarker:function(e,t,n={}){var r=we(t,n),o=Ee(t,n);w("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2-6)/r,my:(o-15)/o}}),{strokeWidth:2,fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke)})},SubProcessMarker:function(e,t,n={}){Je(g(e,14,14,0,{strokeWidth:1,fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke)}),t.width/2-7.5,t.height-20),w("sub-process",e,i.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke)})},ParallelMarker:function(e,t,n){var r=we(t,n),o=Ee(t,n);w("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.parallel)/r,my:(o-20)/o}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke)})},SequentialMarker:function(e,t,n){w("sequential",e,i.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke)})},CompensationMarker:function(e,t,n){w("compensation",e,i.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}}),{strokeWidth:1,fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke)})},LoopMarker:function(e,t,n){var r=we(t,n),o=Ee(t,n);w("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.loop)/r,my:(o-7)/o}}),{strokeWidth:1.5,fill:"none",stroke:ve(t,p,n.stroke),strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){var r=we(t,n),o=Ee(t,n);w("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:(r/2+n.adhoc)/r,my:(o-15)/o}}),{strokeWidth:1,fill:ve(t,p,n.stroke),stroke:ve(t,p,n.stroke)})}};function B(e,t,n,i){T[e](t,n,i)}function I(e,t,n,i={}){i={fill:i.fill,stroke:i.stroke,width:we(t,i),height:Ee(t,i)};var r=S(t),o=n&&n.includes("SubProcessMarker");i=o?{...i,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{...i,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},m(n,(function(n){B(n,e,t,i)})),r.get("isForCompensation")&&B("CompensationMarker",e,t,i),R(r,"bpmn:AdHocSubProcess")&&B("AdhocMarker",e,t,i);var a=r.get("loopCharacteristics"),s=a&&a.get("isSequential");a&&(void 0===s&&B("LoopMarker",e,t,i),!1===s&&B("ParallelMarker",e,t,i),!0===s&&B("SequentialMarker",e,t,i))}function F(e,t,n={}){n=_({size:{width:100}},n);var i=o.createText(t||"",n);return $(i).add("djs-label"),L(e,i),i}function j(e,t,n,i={}){var r=S(t),o=be({x:t.x,y:t.y,width:t.width,height:t.height},i);return F(e,r.name,{align:n,box:o,padding:7,style:{fill:xe(t,c,p,i.stroke)}})}function W(e,t,n,i={}){var r=P(n),o=F(e,t,{box:{height:30,width:r?Ee(n,i):we(n,i)},align:"center-middle",style:{fill:xe(n,c,p,i.stroke)}});r&&Ze(o,0,-(-1*Ee(n,i)),270)}function z(e,t,n={}){var{width:i,height:r}=be(t,n);return g(e,i,r,10,{...n,fill:ge(t,l,n.fill),fillOpacity:nt,stroke:ve(t,p,n.stroke)})}function G(e,t,n={}){var i=S(t),r=ge(t,l,n.fill),o=ve(t,p,n.stroke);return"One"!==i.get("associationDirection")&&"Both"!==i.get("associationDirection")||(n.markerEnd=d(e,"association-end",r,o)),"Both"===i.get("associationDirection")&&(n.markerStart=d(e,"association-start",r,o)),n=rt(n,["markerStart","markerEnd"]),x(e,t.waypoints,{...n,stroke:o,strokeDasharray:"0, 5"})}function H(e,t,n={}){var r=ge(t,l,n.fill),o=ve(t,p,n.stroke),a=b(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:r,fillOpacity:nt,stroke:o});(function(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection})(S(t))&&b(e,i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.33,my:(t.height-18)/t.height}}),{strokeWidth:2,fill:r,stroke:o});return a}function K(e,t,n={}){return y(e,t.width,t.height,{fillOpacity:nt,...n,fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke)})}function q(e,t,n={}){return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=u(i);var s=U("polygon",{...i,points:a});return L(e,s),s}(e,t.width,t.height,{fill:ge(t,l,n.fill),fillOpacity:nt,stroke:ve(t,p,n.stroke)})}function Y(e,t,n={}){var i=g(e,we(t,n),Ee(t,n),0,{fill:ge(t,l,n.fill),fillOpacity:n.fillOpacity||nt,stroke:ve(t,p,n.stroke),strokeWidth:1.5}),r=S(t);R(r,"bpmn:Lane")&&W(e,r.get("name"),t,n);return i}function X(e,t,n={}){var i=z(e,t,n),r=M(t);if(function(e){return e&&!!S(e).triggeredByEvent}(t)&&(V(i,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!r)){var o=(S(t).flowElements||[]).filter((e=>R(e,"bpmn:StartEvent")));1===o.length&&function(e,t,n,i){var r=22,o={fill:ge(i,l,n.fill),stroke:ve(i,p,n.stroke),width:r,height:r},a=S(e).isInterrupting,s=a?0:3,c=a?1:1.2,u=20,h=(r-u)/2,f="translate("+h+","+h+")";y(t,u,u,{fill:o.fill,stroke:o.stroke,strokeWidth:c,strokeDasharray:s,transform:f}),N(e,t,o,i)}(o[0],e,n,t)}return j(e,t,r?"center-top":"center-middle",n),I(e,t,r?void 0:["SubProcessMarker"],n),i}function J(e,t,n={}){var i=z(e,t,n);return j(e,t,"center-middle",n),I(e,t,void 0,n),i}var Q=this.handlers={"bpmn:AdHocSubProcess":function(e,t,n={}){return X(e,t,n=M(t)?rt(n,["fill","stroke","width","height"]):rt(n,["fill","stroke"]))},"bpmn:Association":function(e,t,n={}){return G(e,t,n=rt(n,["fill","stroke"]))},"bpmn:BoundaryEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=rt(n,["fill","stroke"]);var r=S(t).get("cancelActivity");n={strokeWidth:1.5,fill:ge(t,l,n.fill),fillOpacity:1,stroke:ve(t,p,n.stroke)},r||(n.strokeDasharray="6");var o=K(e,t,n);return y(e,t.width,t.height,3,{...n,fill:"none"}),i&&N(t,e,n),o},"bpmn:BusinessRuleTask":function(e,t,n={}){var r=J(e,t,n=rt(n,["fill","stroke"]));return V(b(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}})),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1}),V(b(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}})),{fill:ve(t,p,n.stroke),stroke:ve(t,p,n.stroke),strokeWidth:1}),r},"bpmn:CallActivity":function(e,t,n={}){return n=rt(n,["fill","stroke"]),X(e,t,{strokeWidth:5,...n})},"bpmn:ComplexGateway":function(e,t,n={}){var r=q(e,t,n=rt(n,["fill","stroke"]));return b(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{fill:ve(t,p,n.stroke),stroke:ve(t,p,n.stroke),strokeWidth:1}),r},"bpmn:DataInput":function(e,t,n={}){n=rt(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=H(e,t,n);return b(e,r,{fill:"none",stroke:ve(t,p,n.stroke),strokeWidth:1}),o},"bpmn:DataInputAssociation":function(e,t,n={}){return n=rt(n,["fill","stroke"]),G(e,t,{...n,markerEnd:d(e,"association-end",ge(t,l,n.fill),ve(t,p,n.stroke))})},"bpmn:DataObject":function(e,t,n={}){return H(e,t,n=rt(n,["fill","stroke"]))},"bpmn:DataObjectReference":A("bpmn:DataObject"),"bpmn:DataOutput":function(e,t,n={}){n=rt(n,["fill","stroke"]);var r=i.getRawPath("DATA_ARROW"),o=H(e,t,n);return b(e,r,{strokeWidth:1,fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke)}),o},"bpmn:DataOutputAssociation":function(e,t,n={}){return n=rt(n,["fill","stroke"]),G(e,t,{...n,markerEnd:d(e,"association-end",ge(t,l,n.fill),ve(t,p,n.stroke))})},"bpmn:DataStoreReference":function(e,t,n={}){return n=rt(n,["fill","stroke"]),b(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{fill:ge(t,l,n.fill),fillOpacity:nt,stroke:ve(t,p,n.stroke),strokeWidth:2})},"bpmn:EndEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=rt(n,["fill","stroke"]);var r=K(e,t,{...n,strokeWidth:4});return i&&N(t,e,n),r},"bpmn:EventBasedGateway":function(e,t,n={}){n=rt(n,["fill","stroke"]);var r=S(t),o=q(e,t,n);y(e,t.width,t.height,.2*t.height,{fill:ge(t,"none",n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1});var a=r.get("eventGatewayType"),s=!!r.get("instantiate");if("Parallel"===a){var l=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}});b(e,l,{fill:"none",stroke:ve(t,p,n.stroke),strokeWidth:1})}else"Exclusive"===a&&(s||y(e,t.width,t.height,.26*t.height,{fill:"none",stroke:ve(t,p,n.stroke),strokeWidth:1}),function(){var r=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});b(e,r,{fill:"none",stroke:ve(t,p,n.stroke),strokeWidth:2})}());return o},"bpmn:ExclusiveGateway":function(e,t,n={}){var r=q(e,t,n=rt(n,["fill","stroke"])),o=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return C(t).get("isMarkerVisible")&&b(e,o,{fill:ve(t,p,n.stroke),stroke:ve(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Gateway":function(e,t,n={}){return q(e,t,n=rt(n,["fill","stroke"]))},"bpmn:Group":function(e,t,n={}){return n=rt(n,["fill","stroke","width","height"]),g(e,t.width,t.height,10,{stroke:ve(t,p,n.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:we(t,n),height:Ee(t,n)})},"bpmn:InclusiveGateway":function(e,t,n={}){var i=q(e,t,n=rt(n,["fill","stroke"]));return y(e,t.width,t.height,.24*t.height,{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:2.5}),i},"bpmn:IntermediateEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=rt(n,["fill","stroke"]);var r=K(e,t,{...n,strokeWidth:1.5});return y(e,t.width,t.height,3,{fill:"none",stroke:ve(t,p,n.stroke),strokeWidth:1.5}),i&&N(t,e,n),r},"bpmn:IntermediateCatchEvent":A("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":A("bpmn:IntermediateEvent"),"bpmn:Lane":function(e,t,n={}){return n=rt(n,["fill","stroke","width","height"]),Y(e,t,{...n,fillOpacity:.25})},"bpmn:ManualTask":function(e,t,n={}){var r=J(e,t,n=rt(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:.5}),r},"bpmn:MessageFlow":function(e,t,n={}){n=rt(n,["fill","stroke"]);var r=S(t),o=C(t),a=ge(t,l,n.fill),s=ve(t,p,n.stroke),c=x(e,t.waypoints,{markerEnd:d(e,"messageflow-end",a,s),markerStart:d(e,"messageflow-start",a,s),stroke:s,strokeDasharray:"10, 11",strokeWidth:1.5});if(r.get("messageRef")){var u=c.getPointAtLength(c.getTotalLength()/2),h=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:u.x,y:u.y}}),f={strokeWidth:1};"initiating"===o.get("messageVisibleKind")?(f.fill=a,f.stroke=s):(f.fill=s,f.stroke=a);var m=b(e,h,f),y=F(e,r.get("messageRef").get("name"),{align:"center-top",fitBox:!0,style:{fill:s}}),g=m.getBBox(),v=y.getBBox();Ze(y,u.x-v.width/2,u.y+g.height/2+10,0)}return c},"bpmn:ParallelGateway":function(e,t,n={}){var r=q(e,t,n=rt(n,["fill","stroke"]));return b(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{fill:ve(t,p,n.stroke),stroke:ve(t,p,n.stroke),strokeWidth:1}),r},"bpmn:Participant":function(e,t,n={}){var i=Y(e,t,n=rt(n,["fill","stroke","width","height"])),r=M(t),o=P(t),a=S(t),s=a.get("name");if(r){v(e,o?[{x:30,y:0},{x:30,y:Ee(t,n)}]:[{x:0,y:30},{x:we(t,n),y:30}],{stroke:ve(t,p,n.stroke),strokeWidth:1.5}),W(e,s,t,n)}else{var l=be(t,n);o||(l.height=we(t,n),l.width=Ee(t,n));var u=F(e,s,{box:l,align:"center-middle",style:{fill:xe(t,c,p,n.stroke)}});if(!o)Ze(u,0,-(-1*Ee(t,n)),270)}return a.get("participantMultiplicity")&&B("ParticipantMultiplicityMarker",e,t,n),i},"bpmn:ReceiveTask":function(e,t,n={}){n=rt(n,["fill","stroke"]);var r,o=S(t),a=J(e,t,n);return o.get("instantiate")?(y(e,28,28,4.4,{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1}),r=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):r=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),b(e,r,{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1}),a},"bpmn:ScriptTask":function(e,t,n={}){var r=J(e,t,n=rt(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1}),r},"bpmn:SendTask":function(e,t,n={}){var r=J(e,t,n=rt(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{fill:ve(t,p,n.stroke),stroke:ge(t,l,n.fill),strokeWidth:1}),r},"bpmn:SequenceFlow":function(e,t,n={}){n=rt(n,["fill","stroke"]);var i=ge(t,l,n.fill),r=ve(t,p,n.stroke),o=x(e,t.waypoints,{markerEnd:d(e,"sequenceflow-end",i,r),stroke:r}),a=S(t),{source:s}=t;if(s){var c=S(s);a.get("conditionExpression")&&R(c,"bpmn:Activity")&&V(o,{markerStart:d(e,"conditional-flow-marker",i,r)}),c.get("default")&&(R(c,"bpmn:Gateway")||R(c,"bpmn:Activity"))&&c.get("default")===a&&V(o,{markerStart:d(e,"conditional-default-flow-marker",i,r)})}return o},"bpmn:ServiceTask":function(e,t,n={}){var r=J(e,t,n=rt(n,["fill","stroke"]));return y(e,10,10,{fill:ge(t,l,n.fill),stroke:"none",transform:"translate(6, 6)"}),b(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1}),y(e,10,10,{fill:ge(t,l,n.fill),stroke:"none",transform:"translate(11, 10)"}),b(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:1}),r},"bpmn:StartEvent":function(e,t,n={}){var{renderIcon:i=!0}=n;n=rt(n,["fill","stroke"]),S(t).get("isInterrupting")||(n={...n,strokeDasharray:"6"});var r=K(e,t,n);return i&&N(t,e,n),r},"bpmn:SubProcess":function(e,t,n={}){return X(e,t,n=M(t)?rt(n,["fill","stroke","width","height"]):rt(n,["fill","stroke"]))},"bpmn:Task":function(e,t,n={}){return J(e,t,n=rt(n,["fill","stroke"]))},"bpmn:TextAnnotation":function(e,t,n={}){n=rt(n,["fill","stroke","width","height"]);var{width:r,height:o}=be(t,n),a=g(e,r,o,0,0,{fill:"none",stroke:"none"});return b(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r,containerHeight:o,position:{mx:0,my:0}}),{stroke:ve(t,p,n.stroke)}),F(e,S(t).get("text")||"",{align:"left-top",box:be(t,n),padding:7,style:{fill:xe(t,c,p,n.stroke)}}),a},"bpmn:Transaction":function(e,t,i={}){i=M(t)?rt(i,["fill","stroke","width","height"]):rt(i,["fill","stroke"]);var r=X(e,t,{strokeWidth:1.5,...i}),o=n.style(["no-fill","no-events"],{stroke:ve(t,p,i.stroke),strokeWidth:1.5});return M(t)||(i={}),g(e,we(t,i),Ee(t,i),7,3,o),r},"bpmn:UserTask":function(e,t,n={}){var r=J(e,t,n=rt(n,["fill","stroke"]));return b(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:.5}),b(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{fill:ge(t,l,n.fill),stroke:ve(t,p,n.stroke),strokeWidth:.5}),b(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{fill:ve(t,p,n.stroke),stroke:ve(t,p,n.stroke),strokeWidth:.5}),r},label:function(e,t,n={}){return function(e,t,n={}){var i={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return F(e,O(t),{box:i,fitBox:!0,style:_({},o.getExternalStyle(),{fill:xe(t,c,p,n.stroke)})})}(e,t,n)}};this._drawPath=b,this._renderer=E}function rt(e,t=[]){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}e(it,k),it.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],it.prototype.canRender=function(e){return R(e,"bpmn:BaseElement")},it.prototype.drawShape=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},it.prototype.drawConnection=function(e,t,n={}){var{type:i}=t;return this._renderer(i)(e,t,n)},it.prototype.getShapePath=function(e){return R(e,"bpmn:Event")?function(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2;return se([["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]])}(e):R(e,"bpmn:Activity")?function(e,t){var n=e.x,i=e.y,r=e.width,o=e.height;return se([["M",n+t,i],["l",r-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-r,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]])}(e,10):R(e,"bpmn:Gateway")?function(e){var t=e.width/2,n=e.height/2;return se([["M",e.x+t,e.y],["l",t,n],["l",-t,n],["l",-t,-n],["z"]])}(e):function(e){var t=e.x,n=e.y,i=e.width;return se([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])}(e)};var ot=0,at={width:150,height:50};function st(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return console.log(e),{width:0,height:0}}}function lt(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=st(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return pt(e,o,r,i);o=ut(o,i.width,t)}}function pt(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}var ct="­";function ut(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-|\u00AD)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"!==n&&n!==ct||r.pop();break}r.push(n),o+=n.length}var a=r[r.length-1];return a&&a===ct&&(r[r.length-1]="-"),r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function ht(e){this._config=_({},{size:at,padding:ot,style:{},align:"center-top"},e||{})}ht.prototype.createText=function(e,t){return this.layoutText(e,t).element},ht.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},ht.prototype.layoutText=function(e,t){var n=_({},this._config.size,t.box),i=_({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),o=function(e){return s(e)?_({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),a=t.fitBox||!1,l=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),p=e.split(/\u00AD?\r?\n/),c=[],u=n.width-o.left-o.right,h=U("text");for(V(h,{x:0,y:0}),V(h,i),L(function(){var e=document.getElementById("helper-svg");return e||(V(e=U("svg"),{id:"helper-svg"}),Pe(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}(),h);p.length;)c.push(lt(p,u,h));"middle"===r.vertical&&(o.top=o.bottom=0);var f=d(c,(function(e,t,n){return e+(l||t.height)}),0)+o.top+o.bottom,y=d(c,(function(e,t,n){return t.width>e?t.width:e}),0),g=o.top;"middle"===r.vertical&&(g+=(n.height-f)/2),g-=(l||c[0].height)/4;var v=U("text");return V(v,i),m(c,(function(e){var t;switch(g+=l||e.height,r.horizontal){case"left":t=o.left;break;case"right":t=(a?y:u)-o.right-e.width;break;default:t=Math.max(((a?y:u)-e.width)/2+o.left,0)}var n=U("tspan");V(n,{x:t,y:g}),n.textContent=e.text,L(v,n)})),re(h),{dimensions:{width:y,height:f},element:v}};function ft(e){var t=_({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=_({},t,{fontSize:n},e&&e.externalStyle||{}),r=new ht({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30},style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=r.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}ft.$inject=["config.textRenderer"];var mt=/\{([^{}]+)\}/g,dt=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var yt={__init__:["bpmnRenderer"],bpmnRenderer:["type",it],textRenderer:["type",ft],pathMap:["type",function(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.9