UNPKG

@5minds/processcube_app_sdk

Version:
1 lines • 329 kB
"use client";import{a as ba,b as Ut}from"./chunk-YEKQJ4YC.mjs";var $t=ba((kh,Ea)=>{Ea.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}});var Bs=ba(Zo=>{function Ms(e,t,r,n){var o=r.inverse;return Object.defineProperty(e,"remove",{value:function(i){var a=this.indexOf(i);return a!==-1&&(this.splice(a,1),t.unset(i,o,n)),i}}),Object.defineProperty(e,"contains",{value:function(i){return this.indexOf(i)!==-1}}),Object.defineProperty(e,"add",{value:function(i,a){var p=this.indexOf(i);if(typeof a>"u"){if(p!==-1)return;a=this.length}p!==-1&&this.splice(p,1),this.splice(a,0,i),p===-1&&t.set(i,o,n)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function Rs(e){return e.__refs_collection===!0}var vc={__proto__:null,extend:Ms,isExtended:Rs};function kc(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Os(e,t,r){var n=Ms(r[t.name]||[],e,t,r);Object.defineProperty(r,t.name,{enumerable:t.enumerable,value:n}),n.length&&n.forEach(function(o){e.set(o,t.inverse,r)})}function wc(e,t,r){var n=t.inverse,o=r[t.name];Object.defineProperty(r,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return o},set:function(i){if(i!==o){var a=o;o=null,a&&e.unset(a,n,r),o=i,e.set(o,n,r)}}})}function Gt(e,t){if(!(this instanceof Gt))return new Gt(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Gt.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?Os(this,t,e):wc(this,t,e)};Gt.prototype.ensureRefsCollection=function(e,t){var r=e[t.name];return Rs(r)||Os(this,t,e),r};Gt.prototype.ensureBound=function(e,t){kc(e,t)||this.bind(e,t)};Gt.prototype.unset=function(e,t,r){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(r):e[t.name]=void 0)};Gt.prototype.set=function(e,t,r){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(r):e[t.name]=r)};Zo.Collection=vc;Zo.Refs=Gt});import"client-only";var xp=Ut($t());var ts=Ut($t());var Fr=Object.prototype.toString,Il=Object.prototype.hasOwnProperty;function wn(e){return e===void 0}function Qt(e){return e!==void 0}function No(e){return e==null}function Fe(e){return Fr.call(e)==="[object Array]"}function $e(e){return Fr.call(e)==="[object Object]"}function Ge(e){return Fr.call(e)==="[object Number]"}function at(e){let t=Fr.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function qe(e){return Fr.call(e)==="[object String]"}function st(e,t){return!No(e)&&Il.call(e,t)}function Ce(e,t){let r=Io(t),n;return O(e,function(o,i){if(r(o,i))return n=o,!1}),n}function Ca(e,t){let r=Io(t),n=Fe(e)?-1:void 0;return O(e,function(o,i){if(r(o,i))return n=i,!1}),n}function mt(e,t){let r=Io(t),n=[];return O(e,function(o,i){r(o,i)&&n.push(o)}),n}function O(e,t){let r,n;if(wn(e))return;let o=Fe(e)?Fl:Pl;for(let i in e)if(st(e,i)&&(r=e[i],n=t(r,o(i)),n===!1))return r}function ht(e,t,r){return O(e,function(n,o){r=t(r,n,o)}),r}function So(e,t){return!!ht(e,function(r,n,o){return r&&t(n,o)},!0)}function xn(e,t){return!!Ce(e,t)}function Na(e,t){let r=[];return O(e,function(n,o){r.push(t(n,o))}),r}function _o(e){return function(t){return So(e,function(r,n){return t[n]===r})}}function Io(e){return at(e)?e:t=>t===e}function Pl(e){return e}function Fl(e){return Number(e)}function Sa(e,t){let r,n,o,i;function a(g){let E=Date.now(),_=g?0:i+t-E;if(_>0)return p(_);e.apply(o,n),d()}function p(g){r=setTimeout(a,g)}function d(){r&&clearTimeout(r),r=i=n=o=void 0}function u(){r&&a(!0),d()}function m(...g){i=Date.now(),n=g,o=this,r||p(t)}return m.flush=u,m.cancel=d,m}function Je(e,t){return e.bind(t)}function R(e,...t){return Object.assign(e,...t)}function _a(e,t,r){let n=e;return O(t,function(o,i){if(typeof o!="number"&&typeof o!="string")throw new Error("illegal key type: "+typeof o+". Key should be of type number or string.");if(o==="constructor")throw new Error("illegal key: constructor");if(o==="__proto__")throw new Error("illegal key: __proto__");let a=t[i+1],p=n[o];Qt(a)&&No(p)&&(p=n[o]=isNaN(+a)?{}:[]),wn(a)?wn(r)?delete n[o]:n[o]=r:n=p}),e}function Ia(e,t){let r={},n=Object(e);return O(t,function(o){o in n&&(r[o]=e[o])}),r}function Pa(e,t){let r={},n=Object(e);return O(n,function(o,i){t.indexOf(i)===-1&&(r[i]=o)}),r}var Al=1e3;function rt(e,t){var r=this;t=t||Al,e.on(["render.shape","render.connection"],t,function(n,o){var i=n.type,a=o.element,p=o.gfx,d=o.attrs;if(r.canRender(a))return i==="render.shape"?r.drawShape(p,a,d):r.drawConnection(p,a,d)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(n,o){if(r.canRender(o))return n.type==="render.getShapePath"?r.getShapePath(o):r.getConnectionPath(o)})}rt.prototype.canRender=function(e){};rt.prototype.drawShape=function(e,t){};rt.prototype.drawConnection=function(e,t){};rt.prototype.getShapePath=function(e){};rt.prototype.getConnectionPath=function(e){};function U(e,t){var r=oe(e);return r&&typeof r.$instanceOf=="function"&&r.$instanceOf(t)}function sr(e,t){return xn(t,function(r){return U(e,r)})}function oe(e){return e&&e.businessObject||e}function nt(e){return e&&e.di}function St(e,t){return U(e,"bpmn:CallActivity")?!1:U(e,"bpmn:SubProcess")?(t=t||nt(e),t&&U(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):U(e,"bpmn:Participant")?!!oe(e).processRef:!0}function Po(e){if(!(!U(e,"bpmn:Participant")&&!U(e,"bpmn:Lane"))){var t=nt(e).isHorizontal;return t===void 0?!0:t}}function Fa(e){return e&&!!oe(e).triggeredByEvent}function Aa(e){return $e(e)&&st(e,"waypoints")}function jt(e){return $e(e)&&st(e,"labelTarget")}var bn={width:90,height:20},Ta=15;function Fo(e){return U(e,"bpmn:Event")||U(e,"bpmn:Gateway")||U(e,"bpmn:DataStoreReference")||U(e,"bpmn:DataObjectReference")||U(e,"bpmn:DataInput")||U(e,"bpmn:DataOutput")||U(e,"bpmn:SequenceFlow")||U(e,"bpmn:MessageFlow")||U(e,"bpmn:Group")}function Tl(e){var t=e.length/2-1,r=e[Math.floor(t)],n=e[Math.ceil(t+.01)],o=Dl(e),i=Math.atan((n.y-r.y)/(n.x-r.x)),a=o.x,p=o.y;return Math.abs(i)<Math.PI/2?p-=Ta:a+=Ta,{x:a,y:p}}function Dl(e){var t=e.length/2-1,r=e[Math.floor(t)],n=e[Math.ceil(t+.01)];return{x:r.x+(n.x-r.x)/2,y:r.y+(n.y-r.y)/2}}function Ml(e){return e.waypoints?Tl(e.waypoints):U(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+bn.height/2}:{x:e.x+e.width/2,y:e.y+e.height+bn.height/2}}function Da(e,t){var r,n,o,i=e.label;return i&&i.bounds?(o=i.bounds,n={width:Math.max(bn.width,o.width),height:o.height},r={x:o.x+o.width/2,y:o.y+o.height/2}):(r=Ml(t),n=bn),R({x:r.x-n.width/2,y:r.y-n.height/2},n)}function Rl(e){if(U(e,"bpmn:FlowElement")||U(e,"bpmn:Participant")||U(e,"bpmn:Lane")||U(e,"bpmn:SequenceFlow")||U(e,"bpmn:MessageFlow")||U(e,"bpmn:DataInput")||U(e,"bpmn:DataOutput"))return"name";if(U(e,"bpmn:TextAnnotation"))return"text";if(U(e,"bpmn:Group"))return"categoryValueRef"}function Ol(e){var t=e.categoryValueRef;return t&&t.value||""}function pr(e){var t=e.businessObject,r=Rl(t);if(r)return r==="categoryValueRef"?Ol(t):t[r]||""}function Ma(e){return jt(e)&&Fo(e.labelTarget)}function Bl(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function La(e,t){return t.appendChild(Bl(e,t))}function pe(e,t){return La(t,e),e}var Do=2,Va={"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":Do,"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":Do,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Ll(e,t){return Va[t]?e.style[t]:e.getAttributeNS(null,t)}function Ua(e,t,r){var n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=Va[n];o?(o===Do&&typeof r=="number"&&(r=String(r)+"px"),e.style[n]=r):e.setAttributeNS(null,t,r)}function Vl(e,t){var r=Object.keys(t),n,o;for(n=0,o;o=r[n];n++)Ua(e,o,t[o])}function J(e,t,r){if(typeof t=="string")if(r!==void 0)Ua(e,t,r);else return Ll(e,t);else Vl(e,t);return e}var Ul=Object.prototype.toString;function Be(e){return new Ht(e)}function Ht(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Ht.prototype.add=function(e){return this.list.add(e),this};Ht.prototype.remove=function(e){return Ul.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};Ht.prototype.removeMatching=function(e){let t=this.array();for(let r=0;r<t.length;r++)e.test(t[r])&&this.remove(t[r]);return this};Ht.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};Ht.prototype.array=function(){return Array.from(this.list)};Ht.prototype.has=Ht.prototype.contains=function(e){return this.list.contains(e)};function Ro(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}var Oo={svg:"http://www.w3.org/2000/svg"},Ra='<svg xmlns="'+Oo.svg+'"';function $a(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(Oo.svg)===-1&&(e=Ra+e.substring(4)):(e=Ra+">"+e+"</svg>",t=!0);var r=$l(e);if(!t)return r;for(var n=document.createDocumentFragment(),o=r.firstChild;o.firstChild;)n.appendChild(o.firstChild);return n}function $l(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function Q(e,t){var r;return e=e.trim(),e.charAt(0)==="<"?(r=$a(e).firstChild,r=document.importNode(r,!0)):r=document.createElementNS(Oo.svg,e),t&&J(r,t),r}var Ao=null;function Mo(){return Ao===null&&(Ao=Q("svg")),Ao}function Oa(e,t){var r,n,o=Object.keys(t);for(r=0;n=o[r];r++)e[n]=t[n];return e}function ja(e,t,r,n,o,i){var a=Mo().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return Oa(a,e);case 6:return Oa(a,{a:e,b:t,c:r,d:n,e:o,f:i})}}function lr(e){return e?Mo().createSVGTransformFromMatrix(e):Mo().createSVGTransform()}var Ba=/([&<>]{1})/g,jl=/([&<>\n\r"]{1})/g,Hl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function To(e,t){function r(n,o){return Hl[o]||o}return e.replace(t,r)}function Ha(e,t){var r,n,o,i,a;switch(e.nodeType){case 3:t.push(To(e.textContent,Ba));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(o=e.attributes,r=0,n=o.length;r<n;++r)i=o.item(r),t.push(" ",i.name,'="',To(i.value,jl),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,r=0,n=a.length;r<n;++r)Ha(a.item(r),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",To(e.nodeValue,Ba),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function zl(e,t){var r=$a(t);if(Ro(e),!!t){Gl(r)||(r=r.documentElement);for(var n=ql(r.childNodes),o=0;o<n.length;o++)La(n[o],e)}}function Wl(e){for(var t=e.firstChild,r=[];t;)Ha(t,r),t=t.nextSibling;return r.join("")}function Gl(e){return e.nodeName==="#document-fragment"}function Bo(e,t){if(t!==void 0){try{zl(e,t)}catch(r){throw new Error("error parsing SVG: "+r.message)}return e}else return Wl(e)}function ql(e){return Array.prototype.slice.call(e)}function _t(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Yl(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Kl(e,t){var r,n;for(e.clear(),r=0;n=t[r];r++)e.appendItem(Yl(e,n))}function er(e,t){var r=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),Kl(r,t)),r.consolidate()}function It(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function Xl(e){return["M",e.x,e.y]}function Lo(e){return["L",e.x,e.y]}function Jl(e,t,r){return["C",e.x,e.y,t.x,t.y,r.x,r.y]}function Zl(e,t){let r=e.length,n=[Xl(e[0])];for(let o=1;o<r;o++){let i=e[o-1],a=e[o],p=e[o+1];if(!p||!t){n.push(Lo(a));continue}let d=Math.min(t,Vo(a.x-i.x,a.y-i.y),Vo(p.x-a.x,p.y-a.y));if(!d){n.push(Lo(a));continue}let u=En(a,i,d),m=En(a,i,d*.5),g=En(a,p,d),E=En(a,p,d*.5);n.push(Lo(u)),n.push(Jl(m,E,g))}return n}function En(e,t,r){let n=t.x-e.x,o=t.y-e.y,i=Vo(n,o),a=r/i;return{x:e.x+n*a,y:e.y+o*a}}function Vo(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function dr(e,t,r){Ge(t)&&(r=t,t=null),t||(t={});let n=Q("path",t);return Ge(r)&&(n.dataset.cornerRadius=String(r)),Uo(n,e)}function Uo(e,t){let r=parseInt(e.dataset.cornerRadius,10)||0;return J(e,{d:It(Zl(t,r))}),e}var Cn="hsl(225, 10%, 15%)",Ql="white";function pt(e,t){return xn(e.eventDefinitions,function(r){return r.$type===t})}function za(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function Wa(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function ee(e,t,r){var n=nt(e);return r||n.get("color:background-color")||n.get("bioc:fill")||t||Ql}function V(e,t,r){var n=nt(e);return r||n.get("color:border-color")||n.get("bioc:stroke")||t||Cn}function cr(e,t,r,n){var o=nt(e),i=o.get("label");return n||i&&i.get("color:color")||t||V(e,r)}function Ga(e){var t=e.x+e.width/2,r=e.y+e.height/2,n=e.width/2,o=[["M",t,r],["m",0,-n],["a",n,n,0,1,1,0,2*n],["a",n,n,0,1,1,0,-2*n],["z"]];return It(o)}function $o(e,t){var r=e.x,n=e.y,o=e.width,i=e.height,a=[["M",r+t,n],["l",o-t*2,0],["a",t,t,0,0,1,t,t],["l",0,i-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-o,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-i],["a",t,t,0,0,1,t,-t],["z"]];return It(a)}function qa(e){var t=e.width,r=e.height,n=e.x,o=e.y,i=t/2,a=r/2,p=[["M",n+i,o],["l",i,a],["l",-i,a],["l",-i,-a],["z"]];return It(p)}function Ya(e){var t=e.x,r=e.y,n=e.width,o=e.height,i=[["M",t,r],["l",n,0],["l",0,o],["l",-n,0],["z"]];return It(i)}function ur(e,t={}){return{width:Ze(e,t),height:je(e,t)}}function Ze(e,t={}){return st(t,"width")?t.width:e.width}function je(e,t={}){return st(t,"height")?t.height:e.height}var we={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};we.td=we.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];we.option=we.optgroup=[1,'<select multiple="multiple">',"</select>"];we.thead=we.tbody=we.colgroup=we.caption=we.tfoot=[1,"<table>","</table>"];we.polyline=we.ellipse=we.polygon=we.circle=we.text=we.line=we.path=we.rect=we.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function Re(e,t=globalThis.document){if(typeof e!="string")throw new TypeError("String expected");let r=/^<!--(.*?)-->$/s.exec(e);if(r)return t.createComment(r[1]);let n=/<([\w:]+)/.exec(e)?.[1];if(!n)return t.createTextNode(e);if(e=e.trim(),n==="body"){let u=t.createElement("html");u.innerHTML=e;let{lastChild:m}=u;return m.remove(),m}let[o,i,a]=Object.hasOwn(we,n)?we[n]:we._default,p=t.createElement("div");for(p.innerHTML=i+e+a;o--;)p=p.lastChild;if(p.firstChild===p.lastChild){let{firstChild:u}=p;return u.remove(),u}let d=t.createDocumentFragment();return d.append(...p.childNodes),d}function ed(e,t){return t.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in e)){var o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(e)}function Se(e,...t){let r=e.style;return O(t,function(n){n&&O(n,function(o,i){r[i]=o})}),e}function Sn(e,t,r){return arguments.length==2?e.getAttribute(t):r===null?e.removeAttribute(t):(e.setAttribute(t,r),e)}var td=Object.prototype.toString;function Pt(e){return new zt(e)}function zt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}zt.prototype.add=function(e){return this.list.add(e),this};zt.prototype.remove=function(e){return td.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};zt.prototype.removeMatching=function(e){let t=this.array();for(let r=0;r<t.length;r++)e.test(t[r])&&this.remove(t[r]);return this};zt.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};zt.prototype.array=function(){return Array.from(this.list)};zt.prototype.has=zt.prototype.contains=function(e){return this.list.contains(e)};function _n(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function jo(e,t,r){var n=r?e:e.parentNode;return n&&typeof n.closest=="function"&&n.closest(t)||null}function rd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nn={},Ka;function nd(){if(Ka)return Nn;Ka=1;var e,t,r;function n(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",r=e!=="addEventListener"?"on":""}return Nn.bind=function(o,i,a,p){return e||n(),o[e](r+i,a,p||!1),a},Nn.unbind=function(o,i,a,p){return t||n(),o[t](r+i,a,p||!1),a},Nn}var Xa=nd(),od=rd(Xa),lt=ed({__proto__:null,default:od},[Xa]),Ja=["focus","blur"];function id(e,t,r,n,o){return Ja.indexOf(r)!==-1&&(o=!0),lt.bind(e,r,function(i){var a=i.target||i.srcElement;i.delegateTarget=jo(a,t,!0),i.delegateTarget&&n.call(e,i)},o)}function ad(e,t,r,n){return Ja.indexOf(t)!==-1&&(n=!0),lt.unbind(e,t,r,n)}var Ar={bind:id,unbind:ad};function Le(e,t){return t=t||document,t.querySelector(e)}function Za(e,t){return t=t||document,t.querySelectorAll(e)}function fr(e){e.parentNode&&e.parentNode.removeChild(e)}function In(e,t,r,n,o){var i=lr();i.setTranslate(t,r);var a=lr();a.setRotate(n||0,0,0);var p=lr();p.setScale(o||1,o||1),er(e,[i,a,p])}function Pn(e,t,r){var n=lr();n.setTranslate(t,r),er(e,n)}function Qa(e,t){var r=lr();r.setRotate(t,0,0),er(e,r)}function sd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ho={exports:{}},es;function pd(){if(es)return Ho.exports;es=1;var e=Ho.exports=function(t,r){if(r||(r=16),t===void 0&&(t=128),t<=0)return"0";for(var n=Math.log(Math.pow(2,t))/Math.log(r),o=2;n===1/0;o*=2)n=Math.log(Math.pow(2,t/o))/Math.log(r)*o;for(var i=n-Math.floor(n),a="",o=0;o<Math.floor(n);o++){var p=Math.floor(Math.random()*r).toString(r);a=p+a}if(i){var d=Math.pow(r,i),p=Math.floor(Math.random()*d).toString(r);a=p+a}var u=parseInt(a,r);return u!==1/0&&u>=Math.pow(2,t)?e(t,r):a};return e.rack=function(t,r,n){var o=function(a){var p=0;do{if(p++>10)if(n)t+=n;else throw new Error("too many ID collisions, use more bits");var d=e(t,r)}while(Object.hasOwnProperty.call(i,d));return i[d]=a,d},i=o.hats={};return o.get=function(a){return o.hats[a]},o.set=function(a,p){return o.hats[a]=p,o},o.bits=t||128,o.base=r||16,o},Ho.exports}var ld=pd(),dd=sd(ld);function yt(e){if(!(this instanceof yt))return new yt(e);e=e||[128,36,1],this._seed=e.length?dd.rack(e[0],e[1],e[2]):e}yt.prototype.next=function(e){return this._seed(e||!0)};yt.prototype.nextPrefixed=function(e,t){var r;do r=e+this.next(!0);while(this.assigned(r));return this.claim(r,t),r};yt.prototype.claim=function(e,t){this._seed.set(e,t||!0)};yt.prototype.assigned=function(e){return this._seed.get(e)||!1};yt.prototype.unclaim=function(e){delete this._seed.hats[e]};yt.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var cd=new yt,ud=10,Fn=3,fd=1.5,An=10,md=4,mr=.95,hd=1,yd=.25;function Ft(e,t,r,n,o,i,a){rt.call(this,t,a);var p=e&&e.defaultFillColor,d=e&&e.defaultStrokeColor,u=e&&e.defaultLabelColor;function m(c){return r.computeStyle(c,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Cn,strokeWidth:2,fill:"white"})}function g(c){return r.computeStyle(c,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Cn,strokeWidth:2})}function E(c,l){var{ref:s={x:0,y:0},scale:f=1,element:h,parentGfx:x=o._svg}=l,F=Q("marker",{id:c,viewBox:"0 0 20 20",refX:s.x,refY:s.y,markerWidth:20*f,markerHeight:20*f,orient:"auto"});pe(F,h);var H=Le(":scope > defs",x);H||(H=Q("defs"),pe(x,H)),pe(H,F)}function _(c,l,s,f){var h=cd.nextPrefixed("marker-");return A(c,h,l,s,f),"url(#"+h+")"}function A(c,l,s,f,h){if(s==="sequenceflow-end"){var x=Q("path",{d:"M 1 5 L 11 10 L 1 15 Z",...m({fill:h,stroke:h,strokeWidth:1})});E(l,{element:x,ref:{x:11,y:10},scale:.5,parentGfx:c})}if(s==="messageflow-start"){var F=Q("circle",{cx:6,cy:6,r:3.5,...m({fill:f,stroke:h,strokeWidth:1,strokeDasharray:[1e4,1]})});E(l,{element:F,ref:{x:6,y:6},parentGfx:c})}if(s==="messageflow-end"){var H=Q("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...m({fill:f,stroke:h,strokeWidth:1,strokeDasharray:[1e4,1]})});E(l,{element:H,ref:{x:8.5,y:5},parentGfx:c})}if(s==="association-start"){var te=Q("path",{d:"M 11 5 L 1 10 L 11 15",...g({fill:"none",stroke:h,strokeWidth:1.5,strokeDasharray:[1e4,1]})});E(l,{element:te,ref:{x:1,y:10},scale:.5,parentGfx:c})}if(s==="association-end"){var ke=Q("path",{d:"M 1 5 L 11 10 L 1 15",...g({fill:"none",stroke:h,strokeWidth:1.5,strokeDasharray:[1e4,1]})});E(l,{element:ke,ref:{x:11,y:10},scale:.5,parentGfx:c})}if(s==="conditional-flow-marker"){var ye=Q("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...m({fill:f,stroke:h})});E(l,{element:ye,ref:{x:-1,y:10},scale:.5,parentGfx:c})}if(s==="conditional-default-flow-marker"){var Ne=Q("path",{d:"M 6 4 L 10 16",...m({stroke:h,fill:"none"})});E(l,{element:Ne,ref:{x:0,y:10},scale:.5,parentGfx:c})}}function k(c,l,s,f,h={}){$e(f)&&(h=f,f=0),f=f||0,h=m(h);var x=l/2,F=s/2,H=Q("circle",{cx:x,cy:F,r:Math.round((l+s)/4-f),...h});return pe(c,H),H}function L(c,l,s,f,h,x){$e(h)&&(x=h,h=0),h=h||0,x=m(x);var F=Q("rect",{x:h,y:h,width:l-h*2,height:s-h*2,rx:f,ry:f,...x});return pe(c,F),F}function z(c,l,s,f){var h=l/2,x=s/2,F=[{x:h,y:0},{x:l,y:x},{x:h,y:s},{x:0,y:x}],H=F.map(function(ke){return ke.x+","+ke.y}).join(" ");f=m(f);var te=Q("polygon",{...f,points:H});return pe(c,te),te}function q(c,l,s,f){s=g(s);var h=dr(l,s,f);return pe(c,h),h}function T(c,l,s){return q(c,l,s,5)}function y(c,l,s){s=g(s);var f=Q("path",{...s,d:l});return pe(c,f),f}function I(c,l,s,f){return y(l,s,R({"data-marker":c},f))}function D(c){return Pe[c]}function M(c){return function(l,s,f){return D(c)(l,s,f)}}var v={"bpmn:MessageEventDefinition":function(c,l,s={},f){var h=n.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:s.width||l.width,containerHeight:s.height||l.height,position:{mx:.235,my:.315}}),x=f?V(l,d,s.stroke):ee(l,p,s.fill),F=f?ee(l,p,s.fill):V(l,d,s.stroke),H=y(c,h,{fill:x,stroke:F,strokeWidth:1});return H},"bpmn:TimerEventDefinition":function(c,l,s={}){var f=s.width||l.width,h=s.height||l.height,x=s.width?1:2,F=k(c,f,h,.2*h,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:x}),H=n.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:f,containerHeight:h,position:{mx:.5,my:.5}});y(c,H,{stroke:V(l,d,s.stroke),strokeWidth:x});for(var te=0;te<12;te++){var ke=n.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:f,containerHeight:h,position:{mx:.5,my:.5}}),ye=f/2,Ne=h/2;y(c,ke,{strokeWidth:1,stroke:V(l,d,s.stroke),transform:"rotate("+te*30+","+Ne+","+ye+")"})}return F},"bpmn:EscalationEventDefinition":function(c,l,s={},f){var h=n.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width||l.width,containerHeight:s.height||l.height,position:{mx:.5,my:.2}}),x=f?V(l,d,s.stroke):ee(l,p,s.fill);return y(c,h,{fill:x,stroke:V(l,d,s.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(c,l,s={}){var f=n.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width||l.width,containerHeight:s.height||l.height,position:{mx:.5,my:.222}});return y(c,f,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(c,l,s={},f){var h=n.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.57,my:.263}}),x=f?V(l,d,s.stroke):ee(l,p,s.fill);return y(c,h,{fill:x,stroke:V(l,d,s.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(c,l,s={},f){var h=n.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:s.width||l.width,containerHeight:s.height||l.height,position:{mx:.2,my:.722}}),x=f?V(l,d,s.stroke):ee(l,p,s.fill);return y(c,h,{fill:x,stroke:V(l,d,s.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(c,l,s={},f){var h=n.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.638,my:-.055}}),x=f?V(l,d,s.stroke):"none",F=y(c,h,{fill:x,stroke:V(l,d,s.stroke),strokeWidth:1});return Qa(F,45),F},"bpmn:CompensateEventDefinition":function(c,l,s={},f){var h=n.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width||l.width,containerHeight:s.height||l.height,position:{mx:.22,my:.5}}),x=f?V(l,d,s.stroke):ee(l,p,s.fill);return y(c,h,{fill:x,stroke:V(l,d,s.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(c,l,s={},f){var h=n.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:s.width||l.width,containerHeight:s.height||l.height,position:{mx:.5,my:.2}}),x=f?V(l,d,s.stroke):ee(l,p,s.fill);return y(c,h,{strokeWidth:1,fill:x,stroke:V(l,d,s.stroke)})},"bpmn:MultipleEventDefinition":function(c,l,s={},f){var h=n.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:s.width||l.width,containerHeight:s.height||l.height,position:{mx:.211,my:.36}}),x=f?V(l,d,s.stroke):ee(l,p,s.fill);return y(c,h,{fill:x,stroke:V(l,d,s.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(c,l,s={}){var f=n.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:s.width||l.width,containerHeight:s.height||l.height,position:{mx:.458,my:.194}});return y(c,f,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(c,l,s={}){var f=k(c,l.width,l.height,8,{fill:V(l,d,s.stroke),stroke:V(l,d,s.stroke),strokeWidth:4});return f}};function S(c,l,s={},f){var h=oe(c),x=za(h),F=f||c;return h.get("eventDefinitions")&&h.get("eventDefinitions").length>1?h.get("parallelMultiple")?v["bpmn:ParallelMultipleEventDefinition"](l,F,s,x):v["bpmn:MultipleEventDefinition"](l,F,s,x):pt(h,"bpmn:MessageEventDefinition")?v["bpmn:MessageEventDefinition"](l,F,s,x):pt(h,"bpmn:TimerEventDefinition")?v["bpmn:TimerEventDefinition"](l,F,s,x):pt(h,"bpmn:ConditionalEventDefinition")?v["bpmn:ConditionalEventDefinition"](l,F,s,x):pt(h,"bpmn:SignalEventDefinition")?v["bpmn:SignalEventDefinition"](l,F,s,x):pt(h,"bpmn:EscalationEventDefinition")?v["bpmn:EscalationEventDefinition"](l,F,s,x):pt(h,"bpmn:LinkEventDefinition")?v["bpmn:LinkEventDefinition"](l,F,s,x):pt(h,"bpmn:ErrorEventDefinition")?v["bpmn:ErrorEventDefinition"](l,F,s,x):pt(h,"bpmn:CancelEventDefinition")?v["bpmn:CancelEventDefinition"](l,F,s,x):pt(h,"bpmn:CompensateEventDefinition")?v["bpmn:CompensateEventDefinition"](l,F,s,x):pt(h,"bpmn:TerminateEventDefinition")?v["bpmn:TerminateEventDefinition"](l,F,s,x):null}var P={ParticipantMultiplicityMarker:function(c,l,s={}){var f=Ze(l,s),h=je(l,s),x=n.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:f,containerHeight:h,position:{mx:(f/2-6)/f,my:(h-15)/h}});I("participant-multiplicity",c,x,{strokeWidth:2,fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke)})},SubProcessMarker:function(c,l,s={}){var f=L(c,14,14,0,{strokeWidth:1,fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke)});Pn(f,l.width/2-7.5,l.height-20);var h=n.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:l.width,containerHeight:l.height,position:{mx:(l.width/2-7.5)/l.width,my:(l.height-20)/l.height}});I("sub-process",c,h,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke)})},ParallelMarker:function(c,l,s){var f=Ze(l,s),h=je(l,s),x=n.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:f,containerHeight:h,position:{mx:(f/2+s.parallel)/f,my:(h-20)/h}});I("parallel",c,x,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke)})},SequentialMarker:function(c,l,s){var f=n.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:(l.width/2+s.seq)/l.width,my:(l.height-19)/l.height}});I("sequential",c,f,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke)})},CompensationMarker:function(c,l,s){var f=n.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:(l.width/2+s.compensation)/l.width,my:(l.height-13)/l.height}});I("compensation",c,f,{strokeWidth:1,fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke)})},LoopMarker:function(c,l,s){var f=Ze(l,s),h=je(l,s),x=n.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:f,containerHeight:h,position:{mx:(f/2+s.loop)/f,my:(h-7)/h}});I("loop",c,x,{strokeWidth:1.5,fill:"none",stroke:V(l,d,s.stroke),strokeMiterlimit:.5})},AdhocMarker:function(c,l,s){var f=Ze(l,s),h=je(l,s),x=n.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:f,containerHeight:h,position:{mx:(f/2+s.adhoc)/f,my:(h-15)/h}});I("adhoc",c,x,{strokeWidth:1,fill:V(l,d,s.stroke),stroke:V(l,d,s.stroke)})}};function b(c,l,s,f){P[c](l,s,f)}function N(c,l,s=[],f={}){f={fill:f.fill,stroke:f.stroke,width:Ze(l,f),height:je(l,f)};var h=oe(l),x=s.includes("SubProcessMarker");x?f={...f,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:f={...f,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},h.get("isForCompensation")&&s.push("CompensationMarker"),U(h,"bpmn:AdHocSubProcess")&&(s.push("AdhocMarker"),x||R(f,{compensation:f.compensation-18}));var F=h.get("loopCharacteristics"),H=F&&F.get("isSequential");F&&(R(f,{compensation:f.compensation-18}),s.includes("AdhocMarker")&&R(f,{seq:-23,loop:-18,parallel:-24}),H===void 0&&s.push("LoopMarker"),H===!1&&s.push("ParallelMarker"),H===!0&&s.push("SequentialMarker")),s.includes("CompensationMarker")&&s.length===1&&R(f,{compensation:-8}),O(s,function(te){b(te,c,l,f)})}function B(c,l,s={}){s=R({size:{width:100}},s);var f=i.createText(l||"",s);return Be(f).add("djs-label"),pe(c,f),f}function $(c,l,s,f={}){var h=oe(l),x=ur({x:l.x,y:l.y,width:l.width,height:l.height},f);return B(c,h.name,{align:s,box:x,padding:7,style:{fill:cr(l,u,d,f.stroke)}})}function le(c,l,s={}){var f={width:90,height:30,x:l.width/2+l.x,y:l.height/2+l.y};return B(c,pr(l),{box:f,fitBox:!0,style:R({},i.getExternalStyle(),{fill:cr(l,u,d,s.stroke)})})}function K(c,l,s,f={}){var h=Po(s),x=B(c,l,{box:{height:30,width:h?je(s,f):Ze(s,f)},align:"center-middle",style:{fill:cr(s,u,d,f.stroke)}});if(h){var F=-1*je(s,f);In(x,0,-F,270)}}function W(c,l,s={}){var{width:f,height:h}=ur(l,s);return L(c,f,h,An,{...s,fill:ee(l,p,s.fill),fillOpacity:mr,stroke:V(l,d,s.stroke)})}function Me(c,l,s={}){var f=oe(l),h=ee(l,p,s.fill),x=V(l,d,s.stroke);return(f.get("associationDirection")==="One"||f.get("associationDirection")==="Both")&&(s.markerEnd=_(c,"association-end",h,x)),f.get("associationDirection")==="Both"&&(s.markerStart=_(c,"association-start",h,x)),s=re(s,["markerStart","markerEnd"]),T(c,l.waypoints,{...s,stroke:x,strokeDasharray:"0, 5"})}function ge(c,l,s={}){var f=ee(l,p,s.fill),h=V(l,d,s.stroke),x=n.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.474,my:.296}}),F=y(c,x,{fill:f,fillOpacity:mr,stroke:h}),H=oe(l);if(Wa(H)){var te=n.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.33,my:(l.height-18)/l.height}});y(c,te,{strokeWidth:2,fill:f,stroke:h})}return F}function ae(c,l,s={}){return k(c,l.width,l.height,{fillOpacity:mr,...s,fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke)})}function ce(c,l,s={}){return z(c,l.width,l.height,{fill:ee(l,p,s.fill),fillOpacity:mr,stroke:V(l,d,s.stroke)})}function w(c,l,s={}){var f=L(c,Ze(l,s),je(l,s),0,{fill:ee(l,p,s.fill),fillOpacity:s.fillOpacity||mr,stroke:V(l,d,s.stroke),strokeWidth:1.5}),h=oe(l);if(U(h,"bpmn:Lane")){var x=h.get("name");K(c,x,l,s)}return f}function C(c,l,s={}){var f=W(c,l,s),h=St(l);if(Fa(l)&&(J(f,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!h)){var x=oe(l).flowElements||[],F=x.filter(H=>U(H,"bpmn:StartEvent"));F.length===1&&j(F[0],c,s,l)}return $(c,l,h?"center-top":"center-middle",s),h?N(c,l,void 0,s):N(c,l,["SubProcessMarker"],s),f}function j(c,l,s,f){var h=22,x={fill:ee(f,p,s.fill),stroke:V(f,d,s.stroke),width:h,height:h},F=oe(c).isInterrupting,H=F?0:3,te=F?1:1.2,ke=20,ye=(h-ke)/2,Ne="translate("+ye+","+ye+")";k(l,ke,ke,{fill:x.fill,stroke:x.stroke,strokeWidth:te,strokeDasharray:H,transform:Ne}),S(c,l,x,f)}function ne(c,l,s={}){var f=W(c,l,s);return $(c,l,"center-middle",s),N(c,l,void 0,s),f}var Pe=this.handlers={"bpmn:AdHocSubProcess":function(c,l,s={}){return St(l)?s=re(s,["fill","stroke","width","height"]):s=re(s,["fill","stroke"]),C(c,l,s)},"bpmn:Association":function(c,l,s={}){return s=re(s,["fill","stroke"]),Me(c,l,s)},"bpmn:BoundaryEvent":function(c,l,s={}){var{renderIcon:f=!0}=s;s=re(s,["fill","stroke"]);var h=oe(l),x=h.get("cancelActivity");s={strokeWidth:1.5,fill:ee(l,p,s.fill),fillOpacity:hd,stroke:V(l,d,s.stroke)},x||(s.strokeDasharray="6");var F=ae(c,l,s);return k(c,l.width,l.height,Fn,{...s,fill:"none"}),f&&S(l,c,s),F},"bpmn:BusinessRuleTask":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ne(c,l,s),h=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),x=y(c,h);J(x,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:1});var F=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),H=y(c,F);return J(H,{fill:V(l,d,s.stroke),stroke:V(l,d,s.stroke),strokeWidth:1}),f},"bpmn:CallActivity":function(c,l,s={}){return s=re(s,["fill","stroke"]),C(c,l,{strokeWidth:5,...s})},"bpmn:ComplexGateway":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ce(c,l,s),h=n.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:l.width,containerHeight:l.height,position:{mx:.46,my:.26}});return y(c,h,{fill:V(l,d,s.stroke),stroke:V(l,d,s.stroke),strokeWidth:1}),f},"bpmn:DataInput":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=n.getRawPath("DATA_ARROW"),h=ge(c,l,s);return y(c,f,{fill:"none",stroke:V(l,d,s.stroke),strokeWidth:1}),h},"bpmn:DataInputAssociation":function(c,l,s={}){return s=re(s,["fill","stroke"]),Me(c,l,{...s,markerEnd:_(c,"association-end",ee(l,p,s.fill),V(l,d,s.stroke))})},"bpmn:DataObject":function(c,l,s={}){return s=re(s,["fill","stroke"]),ge(c,l,s)},"bpmn:DataObjectReference":M("bpmn:DataObject"),"bpmn:DataOutput":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=n.getRawPath("DATA_ARROW"),h=ge(c,l,s);return y(c,f,{strokeWidth:1,fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke)}),h},"bpmn:DataOutputAssociation":function(c,l,s={}){return s=re(s,["fill","stroke"]),Me(c,l,{...s,markerEnd:_(c,"association-end",ee(l,p,s.fill),V(l,d,s.stroke))})},"bpmn:DataStoreReference":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=n.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:0,my:.133}});return y(c,f,{fill:ee(l,p,s.fill),fillOpacity:mr,stroke:V(l,d,s.stroke),strokeWidth:2})},"bpmn:EndEvent":function(c,l,s={}){var{renderIcon:f=!0}=s;s=re(s,["fill","stroke"]);var h=ae(c,l,{...s,strokeWidth:4});return f&&S(l,c,s),h},"bpmn:EventBasedGateway":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=oe(l),h=ce(c,l,s);k(c,l.width,l.height,l.height*.2,{fill:ee(l,"none",s.fill),stroke:V(l,d,s.stroke),strokeWidth:1});var x=f.get("eventGatewayType"),F=!!f.get("instantiate");function H(){var ke=n.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:l.width,containerHeight:l.height,position:{mx:.36,my:.44}});y(c,ke,{fill:"none",stroke:V(l,d,s.stroke),strokeWidth:2})}if(x==="Parallel"){var te=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:l.width,containerHeight:l.height,position:{mx:.474,my:.296}});y(c,te,{fill:"none",stroke:V(l,d,s.stroke),strokeWidth:1})}else x==="Exclusive"&&(F||k(c,l.width,l.height,l.height*.26,{fill:"none",stroke:V(l,d,s.stroke),strokeWidth:1}),H());return h},"bpmn:ExclusiveGateway":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ce(c,l,s),h=n.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:l.width,containerHeight:l.height,position:{mx:.32,my:.3}}),x=nt(l);return x.get("isMarkerVisible")&&y(c,h,{fill:V(l,d,s.stroke),stroke:V(l,d,s.stroke),strokeWidth:1}),f},"bpmn:Gateway":function(c,l,s={}){return s=re(s,["fill","stroke"]),ce(c,l,s)},"bpmn:Group":function(c,l,s={}){return s=re(s,["fill","stroke","width","height"]),L(c,l.width,l.height,An,{stroke:V(l,d,s.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:Ze(l,s),height:je(l,s)})},"bpmn:InclusiveGateway":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ce(c,l,s);return k(c,l.width,l.height,l.height*.24,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:2.5}),f},"bpmn:IntermediateEvent":function(c,l,s={}){var{renderIcon:f=!0}=s;s=re(s,["fill","stroke"]);var h=ae(c,l,{...s,strokeWidth:1.5});return k(c,l.width,l.height,Fn,{fill:"none",stroke:V(l,d,s.stroke),strokeWidth:1.5}),f&&S(l,c,s),h},"bpmn:IntermediateCatchEvent":M("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":M("bpmn:IntermediateEvent"),"bpmn:Lane":function(c,l,s={}){return s=re(s,["fill","stroke","width","height"]),w(c,l,{...s,fillOpacity:yd})},"bpmn:ManualTask":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ne(c,l,s),h=n.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return y(c,h,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:.5}),f},"bpmn:MessageFlow":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=oe(l),h=nt(l),x=ee(l,p,s.fill),F=V(l,d,s.stroke),H=T(c,l.waypoints,{markerEnd:_(c,"messageflow-end",x,F),markerStart:_(c,"messageflow-start",x,F),stroke:F,strokeDasharray:"10, 11",strokeWidth:1.5});if(f.get("messageRef")){var te=H.getPointAtLength(H.getTotalLength()/2),ke=n.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:te.x,y:te.y}}),ye={strokeWidth:1};h.get("messageVisibleKind")==="initiating"?(ye.fill=x,ye.stroke=F):(ye.fill=F,ye.stroke=x);var Ne=y(c,ke,ye),tt=f.get("messageRef"),se=tt.get("name"),Nt=B(c,se,{align:"center-top",fitBox:!0,style:{fill:F}}),kn=Ne.getBBox(),Xe=Nt.getBBox(),X=te.x-Xe.width/2,ie=te.y+kn.height/2+ud;In(Nt,X,ie,0)}return H},"bpmn:ParallelGateway":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ce(c,l,s),h=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:l.width,containerHeight:l.height,position:{mx:.46,my:.2}});return y(c,h,{fill:V(l,d,s.stroke),stroke:V(l,d,s.stroke),strokeWidth:1}),f},"bpmn:Participant":function(c,l,s={}){s=re(s,["fill","stroke","width","height"]);var f=w(c,l,s),h=St(l),x=Po(l),F=oe(l),H=F.get("name");if(h){var te=x?[{x:30,y:0},{x:30,y:je(l,s)}]:[{x:0,y:30},{x:Ze(l,s),y:30}];q(c,te,{stroke:V(l,d,s.stroke),strokeWidth:fd}),K(c,H,l,s)}else{var ke=ur(l,s);x||(ke.height=Ze(l,s),ke.width=je(l,s));var ye=B(c,H,{box:ke,align:"center-middle",style:{fill:cr(l,u,d,s.stroke)}});if(!x){var Ne=-1*je(l,s);In(ye,0,-Ne,270)}}return F.get("participantMultiplicity")&&b("ParticipantMultiplicityMarker",c,l,s),f},"bpmn:ReceiveTask":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=oe(l),h=ne(c,l,s),x;return f.get("instantiate")?(k(c,28,28,20*.22,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:1}),x=n.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):x=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),y(c,x,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:1}),h},"bpmn:ScriptTask":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ne(c,l,s),h=n.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return y(c,h,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:1}),f},"bpmn:SendTask":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ne(c,l,s),h=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return y(c,h,{fill:V(l,d,s.stroke),stroke:ee(l,p,s.fill),strokeWidth:1}),f},"bpmn:SequenceFlow":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ee(l,p,s.fill),h=V(l,d,s.stroke),x=T(c,l.waypoints,{markerEnd:_(c,"sequenceflow-end",f,h),stroke:h}),F=oe(l),{source:H}=l;if(H){var te=oe(H);F.get("conditionExpression")&&U(te,"bpmn:Activity")&&J(x,{markerStart:_(c,"conditional-flow-marker",f,h)}),te.get("default")&&(U(te,"bpmn:Gateway")||U(te,"bpmn:Activity"))&&te.get("default")===F&&J(x,{markerStart:_(c,"conditional-default-flow-marker",f,h)})}return x},"bpmn:ServiceTask":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ne(c,l,s);k(c,10,10,{fill:ee(l,p,s.fill),stroke:"none",transform:"translate(6, 6)"});var h=n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});y(c,h,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:1}),k(c,10,10,{fill:ee(l,p,s.fill),stroke:"none",transform:"translate(11, 10)"});var x=n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return y(c,x,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:1}),f},"bpmn:StartEvent":function(c,l,s={}){var{renderIcon:f=!0}=s;s=re(s,["fill","stroke"]);var h=oe(l);h.get("isInterrupting")||(s={...s,strokeDasharray:"6"});var x=ae(c,l,s);return f&&S(l,c,s),x},"bpmn:SubProcess":function(c,l,s={}){return St(l)?s=re(s,["fill","stroke","width","height"]):s=re(s,["fill","stroke"]),C(c,l,s)},"bpmn:Task":function(c,l,s={}){return s=re(s,["fill","stroke"]),ne(c,l,s)},"bpmn:TextAnnotation":function(c,l,s={}){s=re(s,["fill","stroke","width","height"]);var{width:f,height:h}=ur(l,s),x=L(c,f,h,0,0,{fill:"none",stroke:"none"}),F=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:f,containerHeight:h,position:{mx:0,my:0}});y(c,F,{stroke:V(l,d,s.stroke)});var H=oe(l),te=H.get("text")||"";return B(c,te,{align:"left-top",box:ur(l,s),padding:7,style:{fill:cr(l,u,d,s.stroke)}}),x},"bpmn:Transaction":function(c,l,s={}){St(l)?s=re(s,["fill","stroke","width","height"]):s=re(s,["fill","stroke"]);var f=C(c,l,{strokeWidth:1.5,...s}),h=r.style(["no-fill","no-events"],{stroke:V(l,d,s.stroke),strokeWidth:1.5}),x=St(l);return x||(s={}),L(c,Ze(l,s),je(l,s),An-Fn,Fn,h),f},"bpmn:UserTask":function(c,l,s={}){s=re(s,["fill","stroke"]);var f=ne(c,l,s),h=15,x=12,F=n.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:h,y:x}});y(c,F,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:.5});var H=n.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:h,y:x}});y(c,H,{fill:ee(l,p,s.fill),stroke:V(l,d,s.stroke),strokeWidth:.5});var te=n.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:h,y:x}});return y(c,te,{fill:V(l,d,s.stroke),stroke:V(l,d,s.stroke),strokeWidth:.5}),f},label:function(c,l,s={}){return le(c,l,s)}};this._drawPath=y,this._renderer=D}(0,ts.default)(Ft,rt);Ft.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"];Ft.prototype.canRender=function(e){return U(e,"bpmn:BaseElement")};Ft.prototype.drawShape=function(e,t,r={}){var{type:n}=t,o=this._renderer(n);return o(e,t,r)};Ft.prototype.drawConnection=function(e,t,r={}){var{type:n}=t,o=this._renderer(n);return o(e,t,r)};Ft.prototype.getShapePath=function(e){return jt(e)?$o(e,md):U(e,"bpmn:Event")?Ga(e):U(e,"bpmn:Activity")?$o(e,An):U(e,"bpmn:Gateway")?qa(e):Ya(e)};function re(e,t=[]){return t.reduce((r,n)=>(e[n]&&(r[n]=e[n]),r),{})}var gd=0,vd={width:150,height:50};function kd(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function wd(e){return $e(e)?R({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}function xd(e,t){t.textContent=e;var r;try{var n,o=e==="";return t.textContent=o?"dummy":e,r=t.getBBox(),n={width:r.width+r.x*2,height:r.height},o&&(n.width=0),n}catch(i){return console.log(i),{width:0,height:0}}}function bd(e,t,r){for(var n=e.shift(),o=n,i;;){if(i=xd(o,r),i.width=o?i.width:0,o===" "||o===""||i.width<Math.round(t)||o.length<2)return Ed(e,o,n,i);o=Nd(o,i.width,t)}}function Ed(e,t,r,n){if(t.length<r.length){var o=r.slice(t.length).trim();e.unshift(o)}return{width:n.width,height:n.height,text:t}}var rs="\xAD";function Cd(e,t){var r=e.split(/(\s|-|\u00AD)/g),n,o=[],i=0;if(r.length>1)for(;n=r.shift();)if(n.length+i<t)o.push(n),i+=n.length;else{(n==="-"||n===rs)&&o.pop();break}var a=o[o.length-1];return a&&a===rs&&(o[o.length-1]="-"),o.join("")}function Nd(e,t,r){var n=Math.max(e.length*(r/t),1),o=Cd(e,n);return o||(o=e.slice(0,Math.max(Math.round(n-1),1))),o}function Sd(){var e=document.getElementById("helper-svg");return e||(e=Q("svg"),J(e,{id:"helper-svg"}),Se(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}function hr(e){this._config=R({},{size:vd,padding:gd,style:{},align:"center-top"},e||{})}hr.prototype.createText=function(e,t){return this.layoutText(e,t).element};hr.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions};hr.prototype.layoutText=function(e,t){var r=R({},this._config.size,t.box),n=R({},this._config.style,t.style),o=kd(t.align||this._config.align),i=wd(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,p=_d(n),d=e.split(/\u00AD?\r?\n/),u=[],m=r.width-i.left-i.right,g=Q("text");J(g,{x:0,y:0}),J(g,n);var E=Sd();for(pe(E,g);d.length;)u.push(bd(d,m,g));o.vertical==="middle"&&(i.top=i.bottom=0);var _=ht(u,function(q,T,y){return q+(p||T.height)},0)+i.top+i.bottom,A=ht(u,function(q,T,y){return T.width>q?T.width:q},0),k=i.top;o.vertical==="middle"&&(k+=(r.height-_)/2),k-=(p||u[0].height)/4;var L=Q("text");J(L,n),O(u,function(q){var T;switch(k+=p||q.height,o.horizontal){case"left":T=i.left;break;case"right":T=(a?A:m)-i.right-q.width;break;default:T=Math.max(((a?A:m)-q.width)/2+i.left,0)}var y=Q("tspan");J(y,{x:T,y:k}),y.textContent=q.text,pe(L,y)}),_t(g);var z={width:A,height:_};return{dimensions:z,element:L}};function _d(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Id=12,Pd=1.2,Fd=30;function Tn(e){var t=R({fontFamily:"Arial, sans-serif",fontSize:Id,fontWeight:"normal",lineHeight:Pd},e&&e.defaultStyle||{}),r=parseInt(t.fontSize,10)-1,n=R({},t,{fontSize:r},e&&e.externalStyle||{}),o=new hr({style:t});this.getExternalLabelBounds=function(i,a){var p=o.getDimensions(a,{box:{width:90,height:30},style:n});return{x:Math.round(i.x+i.width/2-p.width/2),y:Math.round(i.y),width:Math.ceil(p.width),height:Math.ceil(p.height)}},this.getTextAnnotationBounds=function(i,a){var p=o.getDimensions(a,{box:i,style:t,align:"left-top",padding:5});return{x:i.x,y:i.y,width:i.width,height:Math.max(Fd,Math.round(p.height))}},this.createText=function(i,a){return o.createText(i,a||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return n}}Tn.$inject=["config.textRenderer"];function zo(){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