From f59fe1041b885ed38765e3595ecdf104fa140297 Mon Sep 17 00:00:00 2001
From: Process Analytics Bot
<62586190+process-analytics-bot@users.noreply.github.com>
Date: Mon, 23 Jan 2023 11:52:09 +0100
Subject: [PATCH] [INFRA] Bump bpmn-visualization to 0.29.2 (#447)
https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/infra/update_bpmn_visualization_to_0.29.2/examples/index.html
---
demo/hacktoberfest-custom-themes/index.html | 2 +-
demo/load-and-navigation/assets/main.js | 18 +++++++++---------
.../index.html | 2 +-
demo/predictions/index.html | 2 +-
.../apply-css-classes/index.html | 2 +-
.../index.html | 2 +-
.../index.html | 2 +-
.../index.html | 2 +-
.../growing-sequence-flow/index.html | 2 +-
.../javascript-tooltip-and-popover/index.html | 2 +-
.../running-dashed-message-flow/index.html | 2 +-
.../select-elements-by-bpmn-kind/index.html | 2 +-
.../custom-bpmn-theme/custom-colors/index.html | 2 +-
.../custom-edge-marker-colors/index.html | 2 +-
.../custom-bpmn-theme/custom-fonts/index.html | 2 +-
.../custom-user-task-icon/index.html | 2 +-
.../diagram-fit-after-load/index.html | 2 +-
.../diagram-fit-on-load/index.html | 2 +-
.../diagram-navigation/index.html | 2 +-
.../load-local-bpmn-diagrams/index.html | 2 +-
.../load-remote-bpmn-diagrams/index.html | 2 +-
.../pools-filter-on-load/index.html | 2 +-
examples/misc/compare-with-bpmn-js/index.html | 2 +-
.../index.html | 2 +-
examples/overlays/add-remove/index.html | 2 +-
examples/overlays/add-stylized/index.html | 2 +-
.../custom-overlay-default-style/index.html | 2 +-
.../package.json | 2 +-
projects/typescript-angular/package.json | 2 +-
.../package.json | 2 +-
.../package.json | 2 +-
.../package.json | 2 +-
32 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/demo/hacktoberfest-custom-themes/index.html b/demo/hacktoberfest-custom-themes/index.html
index 228a5842..72e15765 100644
--- a/demo/hacktoberfest-custom-themes/index.html
+++ b/demo/hacktoberfest-custom-themes/index.html
@@ -35,7 +35,7 @@
-
+
diff --git a/demo/load-and-navigation/assets/main.js b/demo/load-and-navigation/assets/main.js
index efe6bd91..a6e9901b 100644
--- a/demo/load-and-navigation/assets/main.js
+++ b/demo/load-and-navigation/assets/main.js
@@ -1,4 +1,4 @@
-var Mt=Object.defineProperty;var kt=(n,e,t)=>e in n?Mt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var p=(n,e,t)=>(kt(n,typeof e!="symbol"?e+"":e,t),t);import{f as Bt,c as Y}from"./mxgraph.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function t(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(i){if(i.ep)return;i.ep=!0;const o=t(i);fetch(i.href,o)}})();function Go(n){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(n,1):document.addEventListener("DOMContentLoaded",n)}function v(n,...e){Me("[DEMO]",n,...e)}function Pe(n){return JSON.stringify(n,void 0,2)}function Me(n,e,...t){console.info(n+" "+e,...t)}function V(n,...e){Me("[DEMO STARTUP]",n,...e)}function ke(n,e){console.error("[DEMO]",n),window.alert(e??n)}function Z(n,...e){Me("[DEMO DOWNLOAD]",n,...e)}function Gt(n){return v(`Fetching BPMN content from url ${n}`),fetch(n).then(e=>{if(!e.ok)throw Error(String(e.status));return e.text()})}class Vt{constructor(e,t,s,i){p(this,"document");p(this,"head");p(this,"body");this.window=e,this.outerContainerId=t,this.containerToFade=s,this.dropCallback=i,this.document=e.document,this.head=document.head,this.body=document.body,this.initializeDragAndDrop()}initializeDragAndDrop(){this.containerToFade.classList.add("faded-container"),this.addDomElements(this.containerToFade),this.addStyle();const e=document.getElementById(this.outerContainerId);this.preventDefaultsOnEvents(["dragover","drop"],this.window),this.preventDefaultsOnEvents(["dragover","dragleave","drop"],e),this.addEventsOnDropContainer(e,this.containerToFade),this.addEventsOnDocument(this.outerContainerId,this.containerToFade)}preventDefaults(e){e.preventDefault(),e.stopPropagation()}preventDefaultsOnEvents(e,t){e.forEach(s=>t.addEventListener(s,this.preventDefaults,!1))}addDomElements(e){const t=this.document.createElement("p");t.textContent="open BPMN diagram";const s=this.document.createElement("div");s.classList.add("drop-here-text"),s.appendChild(t);const i=this.document.createElement("div");i.id=this.outerContainerId,i.appendChild(s),e.parentNode.prepend(i)}addStyle(){const e=`
+var Bt=Object.defineProperty;var Gt=(n,t,e)=>t in n?Bt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var p=(n,t,e)=>(Gt(n,typeof t!="symbol"?t+"":t,e),e);import{f as Vt,c as Y}from"./mxgraph.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function e(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(i){if(i.ep)return;i.ep=!0;const o=e(i);fetch(i.href,o)}})();function Yo(n){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(n,1):document.addEventListener("DOMContentLoaded",n)}function v(n,...t){Pe("[DEMO]",n,...t)}function Fe(n){return JSON.stringify(n,void 0,2)}function Pe(n,t,...e){console.info(n+" "+t,...e)}function V(n,...t){Pe("[DEMO STARTUP]",n,...t)}function Me(n,t){console.error("[DEMO]",n),window.alert(t??n)}function Z(n,...t){Pe("[DEMO DOWNLOAD]",n,...t)}function Yt(n){return v(`Fetching BPMN content from url ${n}`),fetch(n).then(t=>{if(!t.ok)throw Error(String(t.status));return t.text()})}class Ut{constructor(t,e,s,i){p(this,"document");p(this,"head");p(this,"body");this.window=t,this.outerContainerId=e,this.containerToFade=s,this.dropCallback=i,this.document=t.document,this.head=document.head,this.body=document.body,this.initializeDragAndDrop()}initializeDragAndDrop(){this.containerToFade.classList.add("faded-container"),this.addDomElements(this.containerToFade),this.addStyle();const t=document.getElementById(this.outerContainerId);this.preventDefaultsOnEvents(["dragover","drop"],this.window),this.preventDefaultsOnEvents(["dragover","dragleave","drop"],t),this.addEventsOnDropContainer(t,this.containerToFade),this.addEventsOnDocument(this.outerContainerId,this.containerToFade)}preventDefaults(t){t.preventDefault(),t.stopPropagation()}preventDefaultsOnEvents(t,e){t.forEach(s=>e.addEventListener(s,this.preventDefaults,!1))}addDomElements(t){const e=this.document.createElement("p");e.textContent="open BPMN diagram";const s=this.document.createElement("div");s.classList.add("drop-here-text"),s.appendChild(e);const i=this.document.createElement("div");i.id=this.outerContainerId,i.appendChild(s),t.parentNode.prepend(i)}addStyle(){const t=`
.faded-container {
opacity: 1;
}
@@ -40,13 +40,13 @@ var Mt=Object.defineProperty;var kt=(n,e,t)=>e in n?Mt(n,e,{enumerable:!0,config
align-items: center;
border: 2px dashed rgba(0,0,0,.2);
border-radius: 7px;
-}`,t=document.createElement("style");t.appendChild(document.createTextNode(e)),this.head.appendChild(t)}addEventsOnDropContainer(e,t){e.addEventListener("dragover",this.getAddClassCallback(t,!1),!1),e.addEventListener("mousedown",this.getRemoveClassCallback(t,!1),!1),e.addEventListener("drop",this.getDropCallbackForElement(t,!1,this.dropCallback),!1)}addEventsOnDocument(e,t){this.document.addEventListener("dragover",this.getAddClassCallback(t,!0,e),!1),this.document.addEventListener("dragleave",this.getRemoveClassCallback(t,!0,e),!1),this.document.addEventListener("drop",this.getDropCallbackForElement(t,!0,this.dropCallback,e),!1)}getAddClassCallback(e,t,s){return function(){t?this.querySelector("#"+s).classList.add("dragging"):this.classList.add("dragging"),e.classList.add("faded")}}getRemoveClassCallback(e,t,s){return function(){t?this.querySelector("#"+s).classList.remove("dragging"):this.classList.remove("dragging"),e.classList.remove("faded")}}getDropCallbackForElement(e,t,s,i){return function(o){try{const a=o.dataTransfer.files;s(a[0])}catch(r){ke(r)}finally{t?this.querySelector("#"+i).classList.remove("dragging"):this.classList.remove("dragging"),e.classList.remove("faded")}}}}const l=Yt();function Yt(){return window.mxForceIncludes=!1,window.mxLoadResources=!1,window.mxLoadStylesheets=!1,window.mxResourceExtension=".txt",Bt({})}class ht{constructor(e){this.graph=e}exportSvg(){return this.doSvgExport(!0)}exportSvgForPng(){const e=l.mxClient.IS_FF;return this.doSvgExport(e)}doSvgExport(e){const t=this.computeSvg({scale:1,border:25,enableForeignObjectForLabel:e});return`
+}`,e=document.createElement("style");e.appendChild(document.createTextNode(t)),this.head.appendChild(e)}addEventsOnDropContainer(t,e){t.addEventListener("dragover",this.getAddClassCallback(e,!1),!1),t.addEventListener("mousedown",this.getRemoveClassCallback(e,!1),!1),t.addEventListener("drop",this.getDropCallbackForElement(e,!1,this.dropCallback),!1)}addEventsOnDocument(t,e){this.document.addEventListener("dragover",this.getAddClassCallback(e,!0,t),!1),this.document.addEventListener("dragleave",this.getRemoveClassCallback(e,!0,t),!1),this.document.addEventListener("drop",this.getDropCallbackForElement(e,!0,this.dropCallback,t),!1)}getAddClassCallback(t,e,s){return function(){e?this.querySelector("#"+s).classList.add("dragging"):this.classList.add("dragging"),t.classList.add("faded")}}getRemoveClassCallback(t,e,s){return function(){e?this.querySelector("#"+s).classList.remove("dragging"):this.classList.remove("dragging"),t.classList.remove("faded")}}getDropCallbackForElement(t,e,s,i){return function(o){try{const a=o.dataTransfer.files;s(a[0])}catch(r){Me(r)}finally{e?this.querySelector("#"+i).classList.remove("dragging"):this.classList.remove("dragging"),t.classList.remove("faded")}}}}const l=Wt();function Wt(){return window.mxForceIncludes=!1,window.mxLoadResources=!1,window.mxLoadStylesheets=!1,window.mxResourceExtension=".txt",Vt({})}class ft{constructor(t){this.graph=t}exportSvg(){return this.doSvgExport(!0)}exportSvgForPng(){const t=l.mxClient.IS_FF;return this.doSvgExport(t)}doSvgExport(t){const e=this.computeSvg({scale:1,border:25,enableForeignObjectForLabel:t});return`
-${l.mxUtils.getXml(t)}
-`}computeSvg(e){const t=e.scale??1,s=e.border??0,i=e.crisp??!0,o=e.enableForeignObjectForLabel??!0,r=this.graph.getGraphBounds(),a=this.graph.view.scale,c=l.mxUtils.createXmlDocument(),u=c.createElementNS(l.mxConstants.NS_SVG,"svg"),f=t/a,d=Math.max(1,Math.ceil(r.width*f)+2*s),T=Math.max(1,Math.ceil(r.height*f)+2*s);u.setAttribute("version","1.1"),u.setAttribute("width",d+"px"),u.setAttribute("height",T+"px"),u.setAttribute("viewBox",(i?"-0.5 -0.5":"0 0")+" "+d+" "+T),c.appendChild(u);const g=c.createElementNS(l.mxConstants.NS_SVG,"g");u.appendChild(g);const A=this.createSvgCanvas(g);A.foEnabled=o,A.foOffset=i?-.5:0,A.textOffset=i?-.5:0,A.imageOffset=i?-.5:0,A.translate(Math.floor((s/t-r.x)/a),Math.floor((s/t-r.y)/a)),A.scale(f);const b=new l.mxImageExport;return b.includeOverlays=!0,b.drawState(this.graph.getView().getState(this.graph.model.root),A),c}createSvgCanvas(e){const t=new Ut(e);return t.pointerEvents=!0,t}}class Ut extends l.mxSvgCanvas2D{constructor(t){super(t);p(this,"htmlConverter",document.createElement("div"))}getAlternateText(t,s,i,o,r,a,c,u,f,d,T,g,A){return this.computeTruncatedText(a,o)}plainText(t,s,i,o,r,a,c,u,f,d,T,g){r=this.computeTruncatedText(r,i),super.plainText(t,s,i,o,r,a,c,u,f,d,T,g)}computeTruncatedText(t,s){if(t==null||this.state.fontSize<=0)return"";try{this.htmlConverter.innerHTML=t,t=l.mxUtils.extractTextWithWhitespace(this.htmlConverter.childNodes);const i=Math.ceil(2*s/this.state.fontSize),o=[];let r=0,a=0;for(;(i==0||r0)break}else o.push(t.charAt(a)),c<255&&r++;a++}o.length1&&(t=l.mxUtils.trim(o.join(""))+"...")}catch(i){console.warn("Error while computing txt label",i)}return t}}function ft(n,e,t){const s=document.createElement("a");e.startsWith("data:image/svg+xml")&&(t=encodeURIComponent(t),e+=","),s.setAttribute("href",e+t),s.setAttribute("download",n),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)}function Wt(n){Z("Start SVG download"),ft("diagram.svg","data:image/svg+xml",n),Z("Download completed")}function Ht(n){Z("Start PNG download");const e=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),t=URL.createObjectURL(e),s=document.createElement("img");s.setAttribute("style","position: absolute; top: -9999px"),s.crossOrigin="anonymous",document.body.appendChild(s);const i=document.createElement("canvas"),o=i.getContext("2d");s.onload=function(){const r=new Image;i.width=s.naturalWidth,i.height=s.naturalHeight,r.crossOrigin="Anonymous",r.onload=function(){o.drawImage(r,0,0),URL.revokeObjectURL(t);const a=i.toDataURL("image/png");document.body.removeChild(s),ft("diagram.png","",a),Z("Download completed")},r.src=s.src},s.src=t}var oe=(n=>(n.None="None",n.HorizontalVertical="HorizontalVertical",n.Horizontal="Horizontal",n.Vertical="Vertical",n.Center="Center",n))(oe||{}),Kt=(n=>(n.In="in",n.Out="out",n))(Kt||{}),h=(n=>(n.LANE="lane",n.POOL="pool",n.CALL_ACTIVITY="callActivity",n.SUB_PROCESS="subProcess",n.TASK="task",n.TASK_USER="userTask",n.TASK_SERVICE="serviceTask",n.TASK_RECEIVE="receiveTask",n.TASK_SEND="sendTask",n.TASK_MANUAL="manualTask",n.TASK_SCRIPT="scriptTask",n.TASK_BUSINESS_RULE="businessRuleTask",n.GLOBAL_TASK="globalTask",n.GLOBAL_TASK_USER="globalUserTask",n.GLOBAL_TASK_MANUAL="globalManualTask",n.GLOBAL_TASK_SCRIPT="globalScriptTask",n.GLOBAL_TASK_BUSINESS_RULE="globalBusinessRuleTask",n.GROUP="group",n.TEXT_ANNOTATION="textAnnotation",n.GATEWAY_PARALLEL="parallelGateway",n.GATEWAY_EXCLUSIVE="exclusiveGateway",n.GATEWAY_INCLUSIVE="inclusiveGateway",n.GATEWAY_EVENT_BASED="eventBasedGateway",n.GATEWAY_COMPLEX="complexGateway",n.EVENT_START="startEvent",n.EVENT_END="endEvent",n.EVENT_INTERMEDIATE_CATCH="intermediateCatchEvent",n.EVENT_INTERMEDIATE_THROW="intermediateThrowEvent",n.EVENT_BOUNDARY="boundaryEvent",n))(h||{}),re=(n=>(n.CALLING_PROCESS="process",n.CALLING_GLOBAL_TASK="global task",n))(re||{}),ae=(n=>(n.Exclusive="Exclusive",n.None="None",n.Parallel="Parallel",n))(ae||{}),y=(n=>(n.NONE="none",n.TERMINATE="terminate",n.CANCEL="cancel",n.COMPENSATION="compensate",n.CONDITIONAL="conditional",n.ERROR="error",n.ESCALATION="escalation",n.LINK="link",n.MESSAGE="message",n.SIGNAL="signal",n.TIMER="timer",n))(y||{}),_=(n=>(n.ADHOC="adhoc",n.COMPENSATION="compensation",n.EXPAND="expand",n.LOOP="loop",n.MULTI_INSTANCE_PARALLEL="parallel multi instance",n.MULTI_INSTANCE_SEQUENTIAL="sequential multi instance",n))(_||{}),ge=(n=>(n.EMBEDDED="embedded",n.EVENT="event",n))(ge||{});function Dt(n,e){return n===""?e?{}:void 0:n}function S(n,e=!1){return n==null?[]:(Array.isArray(n)?n:[n]).map(t=>Dt(t,e)).filter(Boolean)}function zt(n,e,t){let s="";return t!=null&&t.startingWith?s=s.concat(`^(${t.startingWith}).*`):t!=null&&t.notStartingWith&&(s=s.concat(`^(?!(${t.notStartingWith})).*`)),s=s.concat(`${e}$`),n.filter(i=>t!=null&&t.ignoreCase?new RegExp(s,"i").test(i):new RegExp(s).test(i))}class I{static isEvent(e){return he(je,e)}static eventKinds(){return[...je]}static isBoundaryEvent(e){return h.EVENT_BOUNDARY===e}static isStartEvent(e){return h.EVENT_START===e}static isCallActivity(e){return h.CALL_ACTIVITY===e}static isSubProcess(e){return h.SUB_PROCESS===e}static canHaveNoneEvent(e){return h.EVENT_INTERMEDIATE_THROW===e||h.EVENT_END===e||h.EVENT_START===e}static isActivity(e){return he(_e,e)}static activityKinds(){return[..._e]}static isWithDefaultSequenceFlow(e){return $t.includes(e)}static isTask(e){return he(Oe,e)}static taskKinds(){return[...Oe]}static gatewayKinds(){return[...qe]}static isGateway(e){return he(qe,e)}static flowNodeKinds(){return Object.values(h).filter(e=>!I.isPoolOrLane(e))}static isPoolOrLane(e){return e==h.POOL||e==h.LANE}}function Be(n,e){return zt(Object.values(h),n,e)}function he(n,e){return Object.values(n).map(t=>t).includes(e)}const je=Be("Event"),qe=Be("Gateway"),Oe=Be("Task",{ignoreCase:!0,notStartingWith:"global"}),_e=[...Oe,h.CALL_ACTIVITY,h.SUB_PROCESS],$t=[..._e,h.GATEWAY_EXCLUSIVE,h.GATEWAY_INCLUSIVE,h.GATEWAY_COMPLEX],gt=Object.values(y).filter(n=>n!=y.NONE);var X=(n=>(n.NONE="None",n.ONE="One",n.BOTH="Both",n))(X||{}),M=(n=>(n.SEQUENCE_FLOW="sequenceFlow",n.MESSAGE_FLOW="messageFlow",n.ASSOCIATION_FLOW="association",n))(M||{}),q=(n=>(n.NONE="none",n.INITIATING="initiating",n.NON_INITIATING="non_initiating",n))(q||{}),B=(n=>(n.NORMAL="normal",n.DEFAULT="default",n.CONDITIONAL_FROM_ACTIVITY="conditional_from_activity",n.CONDITIONAL_FROM_GATEWAY="conditional_from_gateway",n))(B||{});class E{}p(E,"EDGE","bpmn.edge"),p(E,"EDGE_START_FILL_COLOR","bpmn.edge.startFillColor"),p(E,"EDGE_END_FILL_COLOR","bpmn.edge.endFillColor"),p(E,"EVENT_BASED_GATEWAY_KIND","bpmn.gatewayKind"),p(E,"EVENT_DEFINITION_KIND","bpmn.eventDefinitionKind"),p(E,"GLOBAL_TASK_KIND","bpmn.globalTaskKind"),p(E,"SUB_PROCESS_KIND","bpmn.subProcessKind"),p(E,"IS_INITIATING","bpmn.isInitiating"),p(E,"IS_INSTANTIATING","bpmn.isInstantiating"),p(E,"IS_INTERRUPTING","bpmn.isInterrupting"),p(E,"EXTRA_CSS_CLASSES","bpmn.extra.css.classes"),p(E,"MARKERS","bpmn.markers"),p(E,"MESSAGE_FLOW_ICON","bpmn.messageFlowIcon");class Ge{}p(Ge,"ARROW_DASH","bpmn.dash");var m=(n=>(n[n.STROKE_WIDTH_THIN=2]="STROKE_WIDTH_THIN",n[n.STROKE_WIDTH_THICK=5]="STROKE_WIDTH_THICK",n[n.SHAPE_ACTIVITY_BOTTOM_MARGIN=7]="SHAPE_ACTIVITY_BOTTOM_MARGIN",n[n.SHAPE_ACTIVITY_TOP_MARGIN=7]="SHAPE_ACTIVITY_TOP_MARGIN",n[n.SHAPE_ACTIVITY_LEFT_MARGIN=7]="SHAPE_ACTIVITY_LEFT_MARGIN",n[n.SHAPE_ACTIVITY_FROM_CENTER_MARGIN=7]="SHAPE_ACTIVITY_FROM_CENTER_MARGIN",n[n.SHAPE_ACTIVITY_MARKER_ICON_MARGIN=5]="SHAPE_ACTIVITY_MARKER_ICON_MARGIN",n[n.SHAPE_ACTIVITY_MARKER_ICON_SIZE=20]="SHAPE_ACTIVITY_MARKER_ICON_SIZE",n[n.POOL_LABEL_SIZE=30]="POOL_LABEL_SIZE",n.POOL_LABEL_FILL_COLOR="none",n[n.LANE_LABEL_SIZE=30]="LANE_LABEL_SIZE",n.LANE_LABEL_FILL_COLOR="none",n[n.TEXT_ANNOTATION_BORDER_LENGTH=10]="TEXT_ANNOTATION_BORDER_LENGTH",n.TEXT_ANNOTATION_FILL_COLOR="none",n.GROUP_FILL_COLOR="none",n.DEFAULT_FILL_COLOR="White",n.DEFAULT_STROKE_COLOR="Black",n.DEFAULT_FONT_FAMILY="Arial, Helvetica, sans-serif",n[n.DEFAULT_FONT_SIZE=11]="DEFAULT_FONT_SIZE",n.DEFAULT_FONT_COLOR="Black",n[n.DEFAULT_MARGIN=0]="DEFAULT_MARGIN",n[n.SHAPE_ARC_SIZE=20]="SHAPE_ARC_SIZE",n.DEFAULT_OVERLAY_FILL_COLOR="White",n[n.DEFAULT_OVERLAY_FILL_OPACITY=100]="DEFAULT_OVERLAY_FILL_OPACITY",n.DEFAULT_OVERLAY_STROKE_COLOR="Black",n[n.DEFAULT_OVERLAY_STROKE_WIDTH=1]="DEFAULT_OVERLAY_STROKE_WIDTH",n[n.DEFAULT_OVERLAY_FONT_SIZE=11]="DEFAULT_OVERLAY_FONT_SIZE",n.DEFAULT_OVERLAY_FONT_COLOR="Black",n.SEQUENCE_FLOW_CONDITIONAL_FROM_ACTIVITY_MARKER_FILL_COLOR="White",n.MESSAGE_FLOW_MARKER_START_FILL_COLOR="White",n.MESSAGE_FLOW_MARKER_END_FILL_COLOR="White",n))(m||{});class x{static getFillColor(e){return l.mxUtils.getValue(e,l.mxConstants.STYLE_FILLCOLOR,"White")}static getStrokeColor(e){return l.mxUtils.getValue(e,l.mxConstants.STYLE_STROKECOLOR,"Black")}static getStrokeWidth(e){return l.mxUtils.getValue(e,l.mxConstants.STYLE_STROKEWIDTH,2)}static getMargin(e){return l.mxUtils.getValue(e,l.mxConstants.STYLE_MARGIN,0)}static getBpmnEventDefinitionKind(e){return l.mxUtils.getValue(e,E.EVENT_DEFINITION_KIND,y.NONE)}static getBpmnSubProcessKind(e){return l.mxUtils.getValue(e,E.SUB_PROCESS_KIND,void 0)}static getBpmnIsInterrupting(e){return l.mxUtils.getValue(e,E.IS_INTERRUPTING,void 0)}static getBpmnMarkers(e){return l.mxUtils.getValue(e,E.MARKERS,void 0)}static getBpmnIsInstantiating(e){return JSON.parse(l.mxUtils.getValue(e,E.IS_INSTANTIATING,!1))}static getBpmnIsInitiating(e){return l.mxUtils.getValue(e,E.IS_INITIATING,void 0)}static getBpmnIsParallelEventBasedGateway(e){return l.mxUtils.getValue(e,E.EVENT_BASED_GATEWAY_KIND,ae.Exclusive)==ae.Parallel}static getBpmnGlobalTaskKind(e){return l.mxUtils.getValue(e,E.GLOBAL_TASK_KIND,void 0)}}class le{constructor(e){p(this,"specificFlowStyles",new Ie([[M.SEQUENCE_FLOW,e=>{e[l.mxConstants.STYLE_ENDARROW]=l.mxConstants.ARROW_BLOCK_THIN}],[M.MESSAGE_FLOW,e=>{e[l.mxConstants.STYLE_DASHED]=!0,e[l.mxConstants.STYLE_DASH_PATTERN]="8 5",e[l.mxConstants.STYLE_STARTARROW]=l.mxConstants.ARROW_OVAL,e[l.mxConstants.STYLE_STARTSIZE]=8,e[l.mxConstants.STYLE_STARTFILL]=!0,e[E.EDGE_START_FILL_COLOR]=m.MESSAGE_FLOW_MARKER_START_FILL_COLOR,e[l.mxConstants.STYLE_ENDARROW]=l.mxConstants.ARROW_BLOCK_THIN,e[l.mxConstants.STYLE_ENDFILL]=!0,e[E.EDGE_END_FILL_COLOR]=m.MESSAGE_FLOW_MARKER_END_FILL_COLOR}],[M.ASSOCIATION_FLOW,e=>{e[l.mxConstants.STYLE_DASHED]=!0,e[l.mxConstants.STYLE_DASH_PATTERN]="1 2",e[l.mxConstants.STYLE_ENDARROW]=l.mxConstants.ARROW_OPEN_THIN,e[l.mxConstants.STYLE_STARTARROW]=l.mxConstants.ARROW_OPEN_THIN,e[l.mxConstants.STYLE_STARTSIZE]=12}]]));p(this,"specificSequenceFlowStyles",new Ie([[B.DEFAULT,e=>{e[l.mxConstants.STYLE_STARTARROW]=Ge.ARROW_DASH}],[B.CONDITIONAL_FROM_ACTIVITY,e=>{e[l.mxConstants.STYLE_STARTARROW]=l.mxConstants.ARROW_DIAMOND_THIN,e[l.mxConstants.STYLE_STARTSIZE]=18,e[l.mxConstants.STYLE_STARTFILL]=!0,e[E.EDGE_START_FILL_COLOR]=m.SEQUENCE_FLOW_CONDITIONAL_FROM_ACTIVITY_MARKER_FILL_COLOR}]]));p(this,"specificAssociationFlowStyles",new Ie([[X.NONE,e=>{e[l.mxConstants.STYLE_STARTARROW]=void 0,e[l.mxConstants.STYLE_ENDARROW]=void 0}],[X.ONE,e=>{e[l.mxConstants.STYLE_STARTARROW]=void 0}],[X.BOTH,e=>{}]]));this.graph=e}configureStyles(){this.configureDefaultVertexStyle(),this.configurePoolStyle(),this.configureLaneStyle(),this.configureTextAnnotationStyle(),this.configureGroupStyle(),this.configureActivityStyles(),this.configureEventStyles(),this.configureGatewayStyles(),this.configureDefaultEdgeStyle(),this.configureFlowStyles()}getStylesheet(){return this.graph.getStylesheet()}putCellStyle(e,t){this.getStylesheet().putCellStyle(e,t)}configureDefaultVertexStyle(){le.configureCommonDefaultStyle(this.getStylesheet().getDefaultVertexStyle())}configurePoolStyle(){const e={};e[l.mxConstants.STYLE_SHAPE]=l.mxConstants.SHAPE_SWIMLANE,e[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_MIDDLE,e[l.mxConstants.STYLE_ALIGN]=l.mxConstants.ALIGN_CENTER,e[l.mxConstants.STYLE_STARTSIZE]=m.POOL_LABEL_SIZE,e[l.mxConstants.STYLE_FILLCOLOR]=m.POOL_LABEL_FILL_COLOR,this.graph.getStylesheet().putCellStyle(h.POOL,e)}configureLaneStyle(){const e={};e[l.mxConstants.STYLE_SHAPE]=l.mxConstants.SHAPE_SWIMLANE,e[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_MIDDLE,e[l.mxConstants.STYLE_ALIGN]=l.mxConstants.ALIGN_CENTER,e[l.mxConstants.STYLE_SWIMLANE_LINE]=0,e[l.mxConstants.STYLE_STARTSIZE]=m.LANE_LABEL_SIZE,e[l.mxConstants.STYLE_FILLCOLOR]=m.LANE_LABEL_FILL_COLOR,this.graph.getStylesheet().putCellStyle(h.LANE,e)}configureEventStyles(){I.eventKinds().forEach(e=>{const t={};t[l.mxConstants.STYLE_SHAPE]=e,t[l.mxConstants.STYLE_PERIMETER]=l.mxPerimeter.EllipsePerimeter,t[l.mxConstants.STYLE_STROKEWIDTH]=e==h.EVENT_END?m.STROKE_WIDTH_THICK:m.STROKE_WIDTH_THIN,t[l.mxConstants.STYLE_VERTICAL_LABEL_POSITION]=l.mxConstants.ALIGN_BOTTOM,this.putCellStyle(e,t)})}configureTextAnnotationStyle(){const e={};e[l.mxConstants.STYLE_SHAPE]=h.TEXT_ANNOTATION,e[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_MIDDLE,e[l.mxConstants.STYLE_ALIGN]=l.mxConstants.ALIGN_LEFT,e[l.mxConstants.STYLE_SPACING_LEFT]=5,e[l.mxConstants.STYLE_FILLCOLOR]=m.TEXT_ANNOTATION_FILL_COLOR,e[l.mxConstants.STYLE_STROKEWIDTH]=m.STROKE_WIDTH_THIN,this.putCellStyle(h.TEXT_ANNOTATION,e)}configureGroupStyle(){const e={};e[l.mxConstants.STYLE_ROUNDED]=!0,e[l.mxConstants.STYLE_ABSOLUTE_ARCSIZE]=!0,e[l.mxConstants.STYLE_ARCSIZE]=m.SHAPE_ARC_SIZE,e[l.mxConstants.STYLE_DASHED]=!0,e[l.mxConstants.STYLE_DASH_PATTERN]="7 4 1 4",e[l.mxConstants.STYLE_STROKEWIDTH]=m.STROKE_WIDTH_THIN,e[l.mxConstants.STYLE_FILLCOLOR]=m.GROUP_FILL_COLOR,e[l.mxConstants.STYLE_ALIGN]=l.mxConstants.ALIGN_CENTER,e[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_TOP,this.putCellStyle(h.GROUP,e)}configureActivityStyles(){I.activityKinds().forEach(e=>{const t={};t[l.mxConstants.STYLE_SHAPE]=e,t[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_MIDDLE,t[l.mxConstants.STYLE_ABSOLUTE_ARCSIZE]=!0,t[l.mxConstants.STYLE_ARCSIZE]=m.SHAPE_ARC_SIZE,t[l.mxConstants.STYLE_STROKEWIDTH]=e==h.CALL_ACTIVITY?m.STROKE_WIDTH_THICK:m.STROKE_WIDTH_THIN,this.putCellStyle(e,t)})}configureGatewayStyles(){I.gatewayKinds().forEach(e=>{const t={};t[l.mxConstants.STYLE_SHAPE]=e,t[l.mxConstants.STYLE_PERIMETER]=l.mxPerimeter.RhombusPerimeter,t[l.mxConstants.STYLE_STROKEWIDTH]=m.STROKE_WIDTH_THIN,t[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_TOP,t[l.mxConstants.STYLE_LABEL_POSITION]=l.mxConstants.ALIGN_LEFT,t[l.mxConstants.STYLE_VERTICAL_LABEL_POSITION]=l.mxConstants.ALIGN_TOP,this.putCellStyle(e,t)})}configureDefaultEdgeStyle(){const e=this.getStylesheet().getDefaultEdgeStyle();e[l.mxConstants.STYLE_SHAPE]=E.EDGE,e[l.mxConstants.STYLE_ENDSIZE]=12,e[l.mxConstants.STYLE_STROKEWIDTH]=1.5,e[l.mxConstants.STYLE_ROUNDED]=1,e[l.mxConstants.STYLE_ARCSIZE]=5,e[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_BOTTOM,delete e[l.mxConstants.STYLE_ENDARROW],le.configureCommonDefaultStyle(e)}static configureCommonDefaultStyle(e){e[l.mxConstants.STYLE_FONTFAMILY]=m.DEFAULT_FONT_FAMILY,e[l.mxConstants.STYLE_FONTSIZE]=m.DEFAULT_FONT_SIZE,e[l.mxConstants.STYLE_FONTCOLOR]=m.DEFAULT_FONT_COLOR,e[l.mxConstants.STYLE_FILLCOLOR]=m.DEFAULT_FILL_COLOR,e[l.mxConstants.STYLE_STROKECOLOR]=m.DEFAULT_STROKE_COLOR,e[l.mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=l.mxConstants.NONE,e[l.mxConstants.STYLE_WHITE_SPACE]="wrap"}configureEdgeStyles(e,t){e.forEach(s=>{const i={};t.get(s)(i),this.graph.getStylesheet().putCellStyle(s.toString(),i)})}configureFlowStyles(){this.configureEdgeStyles(Object.values(M),this.specificFlowStyles),this.configureEdgeStyles(Object.values(B),this.specificSequenceFlowStyles),this.configureEdgeStyles(Object.values(X),this.specificAssociationFlowStyles)}}class Ie extends Map{get(e){return super.get(e)??(()=>{})}}function Xt(n,e,t,s){let i,o;n.heightg.setIconOriginForIconCentered(),shapeConfig:{x:e,y:t,width:s,height:i,strokeWidth:u},iconStyleConfig:{isFilled:a,fillColor:f,strokeColor:d,strokeWidth:c,margin:T}}}class K{paintEmptyIcon(){}newBpmnCanvas({canvas:e,ratioFromParent:t,setIconOriginFunct:s,shapeConfig:i,iconStyleConfig:o},r){return new Zt({canvas:e,shapeConfig:i,iconConfig:{originalSize:r,styleConfig:o,ratioFromParent:t,setIconOriginFunct:s}})}paintEnvelopeIcon(e){const t={width:485.41,height:321.76},s=this.newBpmnCanvas(e,t),i=t.width,o=t.height;s.rect(0,0,i,o),s.fillAndStroke();const{iconStyleConfig:r}=e;r.isFilled&&s.setStrokeColor(r.fillColor),s.begin(),s.moveTo(0,0),s.lineTo(i*.5,o*.6),s.lineTo(i,0),s.moveTo(0,o),s.lineTo(i/3,o*.45),s.moveTo(i,o),s.lineTo(i*2/3,o*.45),s.stroke()}paintCircleIcon(e){const t={width:e.shapeConfig.width,height:e.shapeConfig.height},s=this.newBpmnCanvas(e,t),i=t.width,o=t.height;i>0&&o>0&&s.ellipse(0,0,i,o),e.iconStyleConfig.isFilled?s.fillAndStroke():s.stroke()}paintClockIcon(e){const t=this.newBpmnCanvas(e,{height:152,width:152});t.begin(),t.moveTo(184,60),t.curveTo(188.4,60,192,56.4,192,52),t.lineTo(192,48),t.curveTo(192,40,188.4,40,184,40),t.curveTo(179.6,40,176,43.6,176,48),t.lineTo(176,52),t.curveTo(176,56.4,179.6,60,184,60),t.close(),t.moveTo(184,308),t.curveTo(179.6,308,176,311.6,176,316),t.lineTo(176,320),t.curveTo(176,324.4,179.6,328,184,328),t.curveTo(188.4,328,192,324.4,192,320),t.lineTo(192,316),t.curveTo(192,311.6,188.4,308,184,308),t.close(),t.moveTo(52,176),t.lineTo(48,176),t.curveTo(43.6,176,40,179.6,40,184),t.curveTo(40,188.4,43.6,192,48,192),t.lineTo(52,192),t.curveTo(56.4,192,69,188.4,60,184),t.curveTo(60,179.6,56.4,176,52,176),t.close(),t.moveTo(320,176),t.lineTo(316,176),t.curveTo(311.6,176,308,179.6,308,184),t.curveTo(308,188.4,311.6,192,316,192),t.lineTo(320,192),t.curveTo(324.4,192,328,188.4,328,184),t.curveTo(328,179.6,324.4,176,320,176),t.moveTo(93.6,82.4),t.curveTo(90.4,79.2,85.6,79.2,82.4,82.4),t.curveTo(79.2,85.6,79.2,90.4,82.4,93.6),t.lineTo(85.2,96.4),t.curveTo(86.8,98,88.8,98.8,90.8,98.8),t.curveTo(92.8,98.8,94.4,98,96.4,96.4),t.curveTo(99.6,93.2,99.6,88.4,96.4,85.2),t.lineTo(93.6,82.4),t.moveTo(85.2,271.6),t.lineTo(82.4,274.4),t.curveTo(79.2,277.6,79.2,282.4,82.4,285.6),t.curveTo(84,287.2,86,288,88,288),t.curveTo(90,288,92,287.2,93.6,285.6),t.lineTo(96.4,282.8),t.curveTo(99.6,279.6,99.6,274.8,96.4,271.6),t.curveTo(93.2,268.4,88.4,268.4,85.2,271.6),t.moveTo(274.4,82.4),t.lineTo(271.6,85.2),t.curveTo(268.4,88.4,268.4,93.2,271.6,96.4),t.curveTo(273.298,98,275.2,98.8,277.2,98.8),t.curveTo(279.2,98.8,281.2,98,282.8,96.4),t.lineTo(285.6,93.6),t.curveTo(288.8,90.4,288.8,85.6,285.6,82.4),t.curveTo(282.4,79.2,277.6,79.2,274.4,82.4),t.moveTo(192,180.8),t.lineTo(192,108),t.curveTo(192,103.6,188.4,100,184,100),t.curveTo(179.6,100,176,103.6,176,108),t.lineTo(176,184),t.curveTo(176,186,176.8,188,178.4,189.6),t.lineTo(266,277.2),t.curveTo(267.6,278.8,269.6,279.6,271.6,279.6),t.curveTo(273.6,279.6,275.6,278.8,277.2,277.2),t.curveTo(280.4,274,280.4,269.2,277.2,266),t.lineTo(192,180.8),t.moveTo(184,0),t.curveTo(82.4,0,0,82.4,0,184),t.curveTo(0,285.6,82.4,368,184,368),t.curveTo(285.6,368,368,285.6,368,184),t.curveTo(368,82.4,285.6,0,184,0),t.moveTo(184,352),t.curveTo(91.2,352,16,276.8,16,184),t.curveTo(16,91.2,91.2,16,184,16),t.curveTo(276.8,16,352,91.2,352,184),t.curveTo(352,276.8,276.8,352,184,352),t.fillAndStroke()}paintTriangleIcon(e){const t=this.newBpmnCanvas(e,{height:735,width:849});t.begin(),t.moveTo(497,55),t.lineTo(817,609),t.curveTo(849,665,808,735,744,735),t.lineTo(105,735),t.curveTo(40,735,0,665,32,609),t.lineTo(352,55),t.curveTo(384,0,465,0,497,55),t.close(),t.fillAndStroke()}paintUpArrowheadIcon(e){const t=this.newBpmnCanvas(e,{height:50,width:40});t.begin(),t.moveTo(0,49.5),t.lineTo(19.5,1),t.curveTo(19.75,.25,20,0,20.25,.25),t.lineTo(40,49.5),t.curveTo(40,49.5,39.75,50,39.6,49.75),t.lineTo(20,30),t.lineTo(.4,49.75),t.curveTo(.4,49.75,.25,50,0,49.5),t.close(),t.fillAndStroke()}paintDoubleLeftArrowheadsIcon(e){const t=this.newBpmnCanvas(e,{height:53.5,width:105});t.begin(),t.moveTo(91.4,0),t.curveTo(91.4,0,91.2,0,91,.2),t.lineTo(50,25),t.curveTo(47.9,25.8,46.7,26.6,46.4,27.3),t.lineTo(46.4,0),t.curveTo(46.4,0,46.2,0,46,.2),t.lineTo(4.9,25),t.curveTo(2,26.2,0,27.3,4.9,28.5),t.lineTo(45.8,53),t.curveTo(46,53.3,46.2,53.5,46.4,53.5),t.lineTo(46.4,27),t.curveTo(46.6,27.3,47.8,28.1,49.9,29.9),t.lineTo(90.8,53.3),t.curveTo(91,53.3,91.2,53.5,91.4,53.5),t.lineTo(91.4,0),t.close(),t.fillAndStroke()}drawCrossIcon(e){const t=this.newBpmnCanvas(e,{height:1,width:1});return t.begin(),t.moveTo(.38,0),t.lineTo(.62,0),t.lineTo(.62,.38),t.lineTo(1,.38),t.lineTo(1,.62),t.lineTo(.62,.62),t.lineTo(.62,1),t.lineTo(.38,1),t.lineTo(.38,.62),t.lineTo(0,.62),t.lineTo(0,.38),t.lineTo(.38,.38),t.close(),t}paintListIcon(e){const t=this.newBpmnCanvas(e,{height:60,width:60});t.begin(),t.moveTo(0,0),t.lineTo(60,0),t.lineTo(60,60),t.lineTo(0,60),t.lineTo(0,0),t.close(),t.moveTo(5,5),t.lineTo(55,5),t.close(),t.moveTo(5,21.6),t.lineTo(55,21.6),t.close(),t.moveTo(5,38.3),t.lineTo(55,38.3),t.close(),t.moveTo(5,55),t.lineTo(55,55),t.close(),t.fillAndStroke()}paintXCrossIcon(e){const t=this.drawCrossIcon(e);t.rotateOnIconCenter(45),t.fillAndStroke()}paintPlusCrossIcon(e){this.drawCrossIcon(e).fillAndStroke()}paintAsteriskIcon(e){const t=this.newBpmnCanvas(e,{height:1,width:1});Ae(e,t),t.fillAndStroke(),Ae(e,t),t.rotateOnIconCenter(60),t.fillAndStroke(),Ae(e,t),t.rotateOnIconCenter(240),t.fillAndStroke()}paintPersonIcon(e){const t=this.newBpmnCanvas({...e,iconStyleConfig:{...e.iconStyleConfig,isFilled:!0}},{height:239.68,width:143.61});t.begin(),t.moveTo(124.31,150.29),t.lineTo(99.66,141.03),t.arcTo(6.43,6.43,0,0,1,95.51,135.03),t.lineTo(95.51,130.66),t.arcTo(47.75,47.75,0,0,0,119.51,89.25),t.lineTo(119.51,71.25),t.arcTo(47.62,47.62,0,0,0,101.18,33.64),t.arcTo(29.35,29.35,0,0,0,101.52,29.14),t.arcTo(29.68,29.68,0,0,0,42.17,29.14),t.arcTo(29.24,29.24,0,0,0,42.53,33.63),t.arcTo(47.65,47.65,0,0,0,24.14,71.23),t.lineTo(24.14,89.23),t.arcTo(47.7,47.7,0,0,0,48.19,130.63),t.lineTo(48.19,135.03),t.arcTo(6.43,6.43,0,0,1,44.03,141.03),t.lineTo(19.31,150.29),t.arcTo(29.81,29.81,0,0,0,.09,178.03),t.lineTo(.09,233.51),t.arcTo(5.63,5.63,0,1,0,11.34,233.51),t.lineTo(11.34,178.03),t.arcTo(18.19,18.19,0,0,1,11.57,175.17),t.lineTo(20.5,184.11),t.arcTo(12.32,12.32,0,0,1,24.14,192.89),t.lineTo(24.14,233.51),t.arcTo(5.63,5.63,0,1,0,35.39,233.51),t.lineTo(35.39,192.93),t.arcTo(23.5,23.5,0,0,0,28.46,176.2),t.lineTo(17.04,164.78),t.arcTo(18.34,18.34,0,0,1,23.29,160.78),t.lineTo(43.65,153.15),t.lineTo(66.22,175.72),t.lineTo(66.22,233.51),t.arcTo(5.63,5.63,0,1,0,77.47,233.51),t.lineTo(77.47,175.76),t.lineTo(100.04,153.19),t.lineTo(120.4,160.82),t.arcTo(18.39,18.39,0,0,1,126.65,164.82),t.lineTo(115.24,176.24),t.arcTo(23.5,23.5,0,0,0,108.31,192.93),t.lineTo(108.31,233.55),t.arcTo(5.63,5.63,0,1,0,119.56,233.55),t.lineTo(119.56,192.93),t.arcTo(12.35,12.35,0,0,1,123.19,184.15),t.lineTo(132.13,175.22),t.arcTo(18,18,0,0,1,132.36,178.08),t.lineTo(132.36,233.56),t.arcTo(5.63,5.63,0,0,0,143.61,233.56),t.lineTo(143.61,178.03),t.arcTo(29.81,29.81,0,0,0,124.31,150.29),t.close(),t.moveTo(71.85,10.72),t.arcTo(18.46,18.46,0,0,1,90.17,27.18),t.arcTo(47.68,47.68,0,0,0,53.53,27.18),t.arcTo(18.44,18.44,0,0,1,71.85,10.72),t.close(),t.moveTo(35.39,71.23),t.arcTo(36.46,36.46,0,0,1,108.31,71.23),t.lineTo(108.31,77.4),t.curveTo(82.12,75.4,56.97,60.55,56.71,60.4),t.arcTo(5.62,5.62,0,0,0,48.78,62.71),t.curveTo(46.24,67.79,40.45,71.89,35.39,74.62),t.close(),t.moveTo(35.39,89.23),t.lineTo(35.39,87.08),t.curveTo(40.55,84.85,49.73,80.08,55.67,72.66),t.curveTo(64.83,77.46,85.92,87.21,108.31,88.66),t.lineTo(108.31,89.24),t.arcTo(36.46,36.46,0,1,1,35.39,89.24),t.close(),t.moveTo(71.85,165.45),t.lineTo(54.06,147.69),t.arcTo(17.7,17.7,0,0,0,59.43,135.32),t.arcTo(47.57,47.57,0,0,0,84.27,135.32),t.arcTo(17.7,17.7,0,0,0,89.64,147.69),t.close(),t.fill()}paintGearIcon(e){const t=this.newBpmnCanvas(e,{height:100,width:100});K.paintGearIconBackground(t),t.translateIconOrigin(14,14),K.paintGearIconForeground(t)}static paintGearIconBackground(e){e.begin(),e.moveTo(2.06,24.62),e.lineTo(10.17,30.95),e.lineTo(9.29,37.73),e.lineTo(0,41.42),e.lineTo(2.95,54.24),e.lineTo(13.41,52.92),e.lineTo(17.39,58.52),e.lineTo(13.56,67.66),e.lineTo(24.47,74.44),e.lineTo(30.81,66.33),e.lineTo(37.88,67.21),e.lineTo(41.57,76.5),e.lineTo(54.24,73.55),e.lineTo(53.06,62.94),e.lineTo(58.52,58.52),e.lineTo(67.21,63.09),e.lineTo(74.58,51.88),e.lineTo(66.03,45.25),e.lineTo(66.92,38.62),e.lineTo(76.5,34.93),e.lineTo(73.7,22.26),e.lineTo(62.64,23.44),e.lineTo(58.81,18.42),e.lineTo(62.79,8.7),e.lineTo(51.74,2.21),e.lineTo(44.81,10.47),e.lineTo(38.03,9.43),e.lineTo(33.75,0),e.lineTo(21.52,3.24),e.lineTo(22.7,13.56),e.lineTo(18.13,17.54),e.lineTo(8.7,13.56),e.close();const t=24.8,s=39;K.paintGearInnerCircle(e,t,s)}static paintGearIconForeground(e){e.begin(),e.moveTo(16.46,41.42),e.lineTo(24.57,47.75),e.lineTo(23.69,54.53),e.lineTo(14.4,58.22),e.lineTo(17.35,71.04),e.lineTo(27.81,69.72),e.lineTo(31.79,75.32),e.lineTo(27.96,84.46),e.lineTo(38.87,91.24),e.lineTo(45.21,83.13),e.lineTo(52.28,84.01),e.lineTo(55.97,93.3),e.lineTo(68.64,90.35),e.lineTo(67.46,79.74),e.lineTo(72.92,75.32),e.lineTo(81.61,79.89),e.lineTo(88.98,68.68),e.lineTo(80.43,62.05),e.lineTo(81.32,55.42),e.lineTo(90.9,51.73),e.lineTo(88.1,39.06),e.lineTo(77.04,40.24),e.lineTo(73.21,35.22),e.lineTo(77.19,25.5),e.lineTo(66.14,19.01),e.lineTo(59.21,27.27),e.lineTo(52.43,26.23),e.lineTo(48.15,16.8),e.lineTo(35.92,20.04),e.lineTo(37.1,30.36),e.lineTo(32.53,34.34),e.lineTo(23.1,30.36),e.close();const t=39.2,s=55.8;K.paintGearInnerCircle(e,t,s),e.begin(),K.paintGearInnerCircle(e,t,s)}static paintGearInnerCircle(e,t,s){e.moveTo(t,s),e.arcTo(13.5,13.5,0,1,1,t+2*13.5,s),e.arcTo(13.5,13.5,0,0,1,t,s),e.close(),e.fillAndStroke()}paintExpandIcon(e){const t={width:16,height:16},s=this.newBpmnCanvas(e,t),i=t.width,o=t.height;s.roundrect(0,0,i,o,2,2),s.stroke(),s.begin(),s.moveTo(i/2,o/4),s.lineTo(i/2,o*3/4),s.close(),s.moveTo(i/4,o/2),s.lineTo(i*3/4,o/2),s.close(),s.fillAndStroke()}paintLoopIcon(e){const{iconStyleConfig:t}=e;t.fillColor=t.strokeColor;const s=this.newBpmnCanvas(e,{width:22.49,height:21.62});s.begin(),s.moveTo(5.5,19.08),s.arcTo(8,8,0,1,1,10.5,21.08),s.stroke(),s.begin(),s.moveTo(7.5,14.08),s.lineTo(5.75,19.08),s.lineTo(0,17.08),s.close(),s.fillAndStroke()}paintSequentialMultiInstanceIcon(e){const t={width:16,height:16},s=this.newBpmnCanvas(e,t),{canvas:i,iconStyleConfig:o}=e;i.setFillColor(o.strokeColor);const r=t.width,a=t.height/5;s.rect(0,0,r,a),s.fill(),s.rect(0,2*a,r,a),s.fill(),s.rect(0,4*a,r,a),s.fill()}paintParallelMultiInstanceIcon(e){const t={width:16,height:16},s=this.newBpmnCanvas(e,t),{canvas:i,iconStyleConfig:o}=e;i.setFillColor(o.strokeColor);const r=t.width/5,a=t.height;s.begin(),s.rect(0,0,r,a),s.fill(),s.rect(2*r,0,r,a),s.fill(),s.rect(4*r,0,r,a),s.fill()}paintRightArrowIcon(e){const t=this.newBpmnCanvas(e,{width:512,height:415.23});t.setRoundLineJoin(),t.begin(),t.moveTo(512,207.61),t.lineTo(304.38,0),t.lineTo(304.38,135.39),t.lineTo(0,135.39),t.lineTo(0,279.84),t.lineTo(304.38,279.84),t.lineTo(304.38,415.23),t.lineTo(512,207.61),t.close(),t.fillAndStroke()}paintErrorIcon(e){const t=this.newBpmnCanvas(e,{width:72.44,height:71.82});t.begin(),t.moveTo(0,53.32),t.lineTo(19.48,0),t.lineTo(19.48,0),t.lineTo(50.85,40.07),t.lineTo(72.44,18.21),t.lineTo(53.12,71.82),t.lineTo(22.5,31.37),t.close(),t.fillAndStroke()}paintHandIcon(e){const t=this.newBpmnCanvas(e,{width:343.65,height:354.12});t.begin(),t.moveTo(231.66,336.39),t.curveTo(240.84,316.9,220.53,306.92,220.53,306.92),t.curveTo(215.2,303.67,188.58,287.43,140.67,258.19),t.lineTo(146.33,248.39),t.curveTo(223.98,269.38,267.12,281.04,275.75,283.38),t.curveTo(275.75,283.38,297.25,288,301.42,267.77),t.curveTo(306.34,245.29,288.32,238.63,288.32,238.63),t.curveTo(279.91,236.44,237.86,225.48,162.18,205.75),t.lineTo(165.2,194.8),t.curveTo(255.88,204.4,306.27,209.73,316.34,210.8),t.curveTo(316.34,210.8,339.89,212.16,341.76,189.55),t.curveTo(343.65,166.93,320.5,164.13,320.5,164.13),t.curveTo(310.43,163.1,260.04,157.99,169.35,148.77),t.lineTo(169.35,138.97),t.curveTo(253.41,132.12,300.11,128.32,309.45,127.56),t.curveTo(309.45,127.56,332.27,122.38,332.27,102.61),t.curveTo(332.27,82.85,305.48,81.87,305.48,81.87),t.curveTo(293.99,82.2,236.54,83.88,133.13,86.9),t.lineTo(127.61,81.87),t.curveTo(145.3,59.39,155.12,46.9,157.09,44.41),t.curveTo(157.09,44.41,171.12,26.8,156.78,12.72),t.curveTo(143.83,0,124.08,14.49,124.08,14.49),t.curveTo(116.45,19.41,78.35,44.06,9.77,88.43),t.lineTo(0,251.94),t.curveTo(122.84,308.79,191.09,340.37,204.74,346.69),t.curveTo(204.74,346.69,222.91,354.12,231.66,336.39),t.fillAndStroke()}paintScriptIcon(e){e.iconStyleConfig.fillColor=e.iconStyleConfig.strokeColor;const t=this.newBpmnCanvas(e,{width:458.75,height:461.64});t.begin(),t.moveTo(67.85,.57),t.curveTo(50.73,0,33.26,8.86,22.35,18.84),t.curveTo(8.11,32.15,0,50.77,0,70.26),t.curveTo(0,73.15,0,87.59,0,113.6),t.curveTo(55.4,113.6,86.18,113.6,92.33,113.6),t.curveTo(94.92,150.46,85.64,180.4,74.22,211.27),t.curveTo(40.16,298.07,30.77,339.83,55.56,410.87),t.curveTo(63.72,438.26,87.59,457.85,114.91,461.09),t.curveTo(216.96,460.85,294.9,461.64,388.41,461.2),t.curveTo(407.2,461.09,425.14,453.55,438.3,440.13),t.curveTo(451.46,426.71,458.75,403.06,458.46,384.26),t.curveTo(458.43,382.23,458.18,365.93,458.15,363.89),t.curveTo(432.12,364.24,406.09,364.04,380.06,364.04),t.curveTo(377.61,347.52,377.24,337.58,378.28,324.48),t.curveTo(380.5,296.47,389.08,273.36,398.59,247.1),t.curveTo(408.11,220.83,418.41,191.47,420.86,154.24),t.curveTo(422.11,135.34,421.4,110.24,417.77,86.75),t.curveTo(417.76,86.71,417.73,86.54,417.69,86.22),t.curveTo(417.64,85.95,417.61,85.79,417.6,85.76),t.curveTo(414.03,68.13,410.49,48.84,399.79,31.47),t.curveTo(389.09,14.11,366.95,.59,341.75,.59),t.curveTo(286.97,.59,122.63,.57,67.85,.57),t.close(),t.moveTo(85.04,72.68),t.curveTo(80.63,72.68,45.33,72.68,40.92,72.68),t.curveTo(40.46,58.4,47.15,51.87,50.27,48.75),t.curveTo(55.8,44.28,59.84,41,73.82,41),t.curveTo(78.45,52.13,82.23,62.71,85.04,72.68),t.close(),t.moveTo(364.94,52.9),t.curveTo(370,61.11,373.9,76.44,377.38,93.51),t.curveTo(380.35,113.1,381.01,136.42,380.02,151.57),t.curveTo(377.97,182.76,369.51,207.12,360.1,233.1),t.curveTo(350.69,259.09,340.27,286.77,337.53,321.27),t.curveTo(336.38,335.86,336.72,346.69,338.87,364.01),t.curveTo(326.35,364.01,263.75,364.01,151.06,364.01),t.curveTo(151.06,382.2,151.06,392.31,151.06,394.33),t.curveTo(147.77,404.8,138.9,418.2,127.43,419.94),t.curveTo(111.49,422.35,97.86,411.8,94.75,399.19),t.curveTo(65.14,321.99,94.93,275.54,112.57,225.47),t.curveTo(130.14,177.95,137.92,117.41,112.71,42.09),t.curveTo(192.88,41.9,274.33,42.21,342.89,41.98),t.curveTo(357.15,42.03,359.83,44.61,364.94,52.9),t.close(),t.moveTo(409.96,399.48),t.curveTo(409.96,408.42,398.54,425.67,392.02,425.67),t.curveTo(325.19,425.79,252.29,425.67,185.23,425.67),t.curveTo(189.88,424.43,194.66,405.64,194.66,399.48),t.curveTo(237.72,399.48,388.43,399.48,409.96,399.48),t.close(),t.fill(),t.begin(),t.moveTo(182.1,131.2),t.lineTo(182.1,151.68),t.lineTo(321.89,151.68),t.lineTo(321.89,131.2),t.lineTo(182.1,131.2),t.close(),t.moveTo(162.25,251.09),t.lineTo(162.25,271.49),t.lineTo(301.96,271.49),t.lineTo(301.96,251.09),t.lineTo(162.25,251.09),t.close(),t.fill()}paintTableIcon(e){const t=this.newBpmnCanvas(e,{width:640,height:640});t.begin(),t.moveTo(.19,.1),t.lineTo(298.78,.1),t.lineTo(298.78,198.88),t.lineTo(.19,198.88),t.lineTo(.19,.1),t.close(),t.fillAndStroke(),t.begin(),t.moveTo(0,0),t.lineTo(298.78,0),t.lineTo(298.78,48.88),t.lineTo(0,48.88),t.lineTo(0,0),t.close(),t.fillAndStroke(),t.begin(),t.moveTo(0,48.88),t.lineTo(98.78,48.88),t.lineTo(98.78,198.88),t.lineTo(0,198.88),t.lineTo(0,48.88),t.close(),t.fillAndStroke(),t.begin(),t.moveTo(1.09,122.69),t.lineTo(298.78,122.69),t.close(),t.fillAndStroke(),t.setFillColor(e.iconStyleConfig.strokeColor),t.begin(),t.moveTo(0,0),t.lineTo(298.78,0),t.lineTo(298.78,48.88),t.lineTo(0,48.88),t.lineTo(0,0),t.close(),t.fillAndStroke()}paintPentagon(e){const t=this.newBpmnCanvas(e,{width:16,height:16});t.begin(),t.moveTo(16,6.5),t.lineTo(8,0),t.lineTo(0,6.5),t.lineTo(3,16),t.lineTo(13,16),t.lineTo(16,6.5),t.lineTo(8,0),t.stroke()}}function Ae(n,e){e.begin(),e.moveTo(.38,0),e.lineTo(.62,0),e.lineTo(.62,1),e.lineTo(.38,1),e.close()}class Q{static get(){return this.instance}static set(e){this.instance=e}}p(Q,"instance",new K);class j extends l.mxEllipse{constructor(){super(void 0,void 0,void 0);p(this,"iconPainter",Q.get());p(this,"iconPainters",new Map([[y.MESSAGE,t=>this.iconPainter.paintEnvelopeIcon({...t,ratioFromParent:.5})],[y.TERMINATE,t=>this.iconPainter.paintCircleIcon({...t,ratioFromParent:.6})],[y.TIMER,t=>this.iconPainter.paintClockIcon({...t,setIconOriginFunct:s=>s.setIconOriginToShapeTopLeftProportionally(5)})],[y.SIGNAL,t=>this.iconPainter.paintTriangleIcon({...t,ratioFromParent:.55,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:m.STROKE_WIDTH_THIN.valueOf()},setIconOriginFunct:s=>s.setIconOriginToShapeTopLeftProportionally(4)})],[y.LINK,t=>this.iconPainter.paintRightArrowIcon({...t,ratioFromParent:.55,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:1.5}})],[y.ERROR,t=>this.iconPainter.paintErrorIcon({...t,ratioFromParent:.55,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:1.5}})],[y.COMPENSATION,t=>this.iconPainter.paintDoubleLeftArrowheadsIcon({...t,ratioFromParent:.7,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:1.5}})],[y.CANCEL,t=>this.iconPainter.paintXCrossIcon({...t,ratioFromParent:.78})],[y.ESCALATION,t=>this.iconPainter.paintUpArrowheadIcon({...t,ratioFromParent:.55,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:m.STROKE_WIDTH_THIN.valueOf()}})],[y.CONDITIONAL,t=>this.iconPainter.paintListIcon({...t,ratioFromParent:.6,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:1.5}})]]));p(this,"withFilledIcon",!1)}paintVertexShape(t,s,i,o,r){const a=J({canvas:t,x:s,y:i,width:o,height:r,shape:this,isFilled:this.withFilledIcon});j.setDashedOuterShapePattern(a,x.getBpmnIsInterrupting(this.style)),this.paintOuterShape(a),j.restoreOriginalOuterShapePattern(a),this.paintInnerShape(a)}paintOuterShape({canvas:t,shapeConfig:{x:s,y:i,width:o,height:r}}){super.paintVertexShape(t,s,i,o,r)}paintInnerShape(t){(this.iconPainters.get(x.getBpmnEventDefinitionKind(this.style))||(()=>this.iconPainter.paintEmptyIcon()))(t)}static setDashedOuterShapePattern(t,s){t.canvas.save(),s==="false"&&(t.canvas.setDashed(!0,!1),t.canvas.setDashPattern("3 2"))}static restoreOriginalOuterShapePattern(t){t.canvas.restore()}}class jt extends j{constructor(){super(),this.withFilledIcon=!0}}class ye extends j{paintOuterShape({canvas:e,shapeConfig:{x:t,y:s,width:i,height:o,strokeWidth:r}}){e.ellipse(t,s,i,o),e.fillAndStroke();const a=r*1.5;e.ellipse(i*.02+a+t,o*.02+a+s,i*.96-2*a,o*.96-2*a),e.stroke()}}class qt extends ye{constructor(){super(),this.withFilledIcon=!0}}class de extends l.mxRhombus{constructor(){super(...arguments);p(this,"iconPainter",Q.get())}paintVertexShape(t,s,i,o,r){const a=J({canvas:t,x:s,y:i,width:o,height:r,shape:this});this.paintOuterShape(a),this.paintInnerShape(a)}paintOuterShape({canvas:t,shapeConfig:{x:s,y:i,width:o,height:r}}){super.paintVertexShape(t,s,i,o,r)}}class Jt extends de{paintInnerShape(e){this.iconPainter.paintXCrossIcon({...e,iconStyleConfig:{...e.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class Qt extends de{paintInnerShape(e){this.iconPainter.paintPlusCrossIcon({...e,iconStyleConfig:{...e.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class en extends de{paintInnerShape(e){this.iconPainter.paintCircleIcon({...e,ratioFromParent:.62,iconStyleConfig:{...e.iconStyleConfig,isFilled:!1,strokeWidth:m.STROKE_WIDTH_THICK.valueOf()}})}}class tn extends de{paintInnerShape(e){this.iconPainter.paintAsteriskIcon({...e,iconStyleConfig:{...e.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class nn extends de{paintInnerShape(e){e={...e,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:1}},this.iconPainter.paintCircleIcon({...e,ratioFromParent:.55}),x.getBpmnIsInstantiating(this.style)||this.iconPainter.paintCircleIcon({...e,ratioFromParent:.45});const t={...e,ratioFromParent:.3};x.getBpmnIsParallelEventBasedGateway(this.style)?this.iconPainter.paintPlusCrossIcon(t):this.iconPainter.paintPentagon(t)}}const sn=[_.LOOP,_.MULTI_INSTANCE_PARALLEL,_.MULTI_INSTANCE_SEQUENTIAL,_.COMPENSATION,_.EXPAND,_.ADHOC];function on(n){const e=sn.filter(t=>n.includes(t));return n.filter(t=>!e.includes(t)).forEach(t=>e.push(t)),e}function Tt(n,e){Q.get().paintEnvelopeIcon({...n,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeft(),ratioFromParent:.2,iconStyleConfig:{...n.iconStyleConfig,isFilled:e}})}class Ve extends l.mxRectangleShape{constructor(){super(void 0,void 0,void 0);p(this,"iconPainter",Q.get());this.isRounded=!0}paintForeground(t,s,i,o,r){super.paintForeground(t,s,i,o,r),this.paintMarkerIcons(J({canvas:t,x:s,y:i,width:o,height:r,shape:this,ratioFromParent:0,iconStrokeWidth:1.5}))}paintMarkerIcons(t){const s=x.getBpmnMarkers(this.style);s&&on(s.split(",")).forEach((i,o,r)=>{switch(t={...t,setIconOriginFunct:this.getMarkerIconOriginFunction(r.length,o+1)},t.canvas.save(),i){case _.LOOP:this.iconPainter.paintLoopIcon(t);break;case _.MULTI_INSTANCE_SEQUENTIAL:this.iconPainter.paintSequentialMultiInstanceIcon(t);break;case _.MULTI_INSTANCE_PARALLEL:this.iconPainter.paintParallelMultiInstanceIcon(t);break;case _.EXPAND:this.iconPainter.paintExpandIcon(t);break}t.canvas.restore()})}getMarkerIconOriginFunction(t,s){let i;return t===1?i=o=>o.setIconOriginForIconBottomCentered():i=o=>{o.setIconOriginForIconBottomCentered();const r=Math.pow(-1,s)*(m.SHAPE_ACTIVITY_MARKER_ICON_SIZE/2+m.SHAPE_ACTIVITY_MARKER_ICON_MARGIN);o.translateIconOrigin(r,0)},i}}class W extends Ve{paintForeground(e,t,s,i,o){super.paintForeground(e,t,s,i,o),this.paintTaskIcon(J({canvas:e,x:t,y:s,width:i,height:o,shape:this}))}}class rn extends W{paintTaskIcon(e){this.iconPainter.paintEmptyIcon()}}class an extends W{paintTaskIcon(e){this.iconPainter.paintGearIcon({...e,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeftProportionally(20)})}}class ln extends W{paintTaskIcon(e){this.iconPainter.paintPersonIcon({...e,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeftProportionally(20)})}}class cn extends W{paintTaskIcon(e){if(!x.getBpmnIsInstantiating(this.style)){Tt(e,!1);return}const t=4,s=4,i={...e.shapeConfig,width:20,height:20};this.iconPainter.paintCircleIcon({canvas:e.canvas,shapeConfig:i,iconStyleConfig:{...e.iconStyleConfig,isFilled:!1},ratioFromParent:void 0,setIconOriginFunct:o=>o.setIconOriginToShapeTopLeft(s,t)}),i.x+=t,i.y+=s,this.iconPainter.paintEnvelopeIcon({...e,shapeConfig:i,ratioFromParent:.65,setIconOriginFunct:o=>o.setIconOriginForIconCentered()})}}class un extends W{paintTaskIcon(e){Tt(e,!0)}}class dn extends W{paintTaskIcon(e){this.iconPainter.paintHandIcon({...e,ratioFromParent:.18,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeftProportionally(20)})}}class hn extends W{paintTaskIcon(e){this.iconPainter.paintScriptIcon({...e,ratioFromParent:.22,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeftProportionally(20)})}}class fn extends Ve{paintForeground(e,t,s,i,o){super.paintForeground(e,t,s,i,o);const r=J({canvas:e,x:t,y:s,width:i,height:o,shape:this});switch(x.getBpmnGlobalTaskKind(this.style)){case h.GLOBAL_TASK_MANUAL:this.iconPainter.paintHandIcon({...r,ratioFromParent:.18,setIconOriginFunct:a=>a.setIconOriginToShapeTopLeftProportionally(20)});break;case h.GLOBAL_TASK_SCRIPT:this.iconPainter.paintScriptIcon({...r,ratioFromParent:.22,setIconOriginFunct:a=>a.setIconOriginToShapeTopLeftProportionally(20)});break;case h.GLOBAL_TASK_USER:this.iconPainter.paintPersonIcon({...r,setIconOriginFunct:a=>a.setIconOriginToShapeTopLeftProportionally(20)});break;case h.GLOBAL_TASK_BUSINESS_RULE:this.iconPainter.paintTableIcon({...r,ratioFromParent:.6,setIconOriginFunct:a=>a.setIconOriginToShapeTopLeftProportionally(15)});break;case h.GLOBAL_TASK:default:this.iconPainter.paintEmptyIcon()}}}class gn extends Ve{paintBackground(e,t,s,i,o){const r=x.getBpmnSubProcessKind(this.style);e.save(),r===ge.EVENT&&(e.setDashed(!0,!1),e.setDashPattern("1 2")),super.paintBackground(e,t,s,i,o),e.restore()}}class Tn extends W{paintTaskIcon(e){this.iconPainter.paintTableIcon({...e,ratioFromParent:.6,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeftProportionally(15)})}}class pn extends l.mxRectangleShape{paintForeground(e,t,s,i,o){e.begin(),e.moveTo(t+m.TEXT_ANNOTATION_BORDER_LENGTH,s),e.lineTo(t,s),e.lineTo(t,s+o),e.lineTo(t+m.TEXT_ANNOTATION_BORDER_LENGTH,s+o),e.stroke()}paintBackground(e,t,s,i,o){e.save(),e.setStrokeColor("none"),super.paintBackground(e,t,s,i,o),e.restore()}}class En extends l.mxRectangleShape{constructor(t,s,i,o){super(t,s,i,o);p(this,"iconPainter",Q.get())}paintVertexShape(t,s,i,o,r){const a=x.getBpmnIsInitiating(this.style)===q.NON_INITIATING,c=J({canvas:t,x:s,y:i,width:o,height:r,shape:this,ratioFromParent:1,isFilled:a});this.iconPainter.paintEnvelopeIcon(c)}}function mn(n,e){return Cn(n.style,e)}function Cn(n,e){const t=[],s=n.split(";"),o=s[0].replace(/shape=bpmn./g,""),r=new Map;return r.set("bpmn-type-activity",I.isActivity(o)),r.set("bpmn-type-container",I.isPoolOrLane(o)),r.set("bpmn-type-event",I.isEvent(o)),r.set("bpmn-type-flow",Sn(o)),r.set("bpmn-type-gateway",I.isGateway(o)),r.set("bpmn-type-task",I.isTask(o)),[...r].filter(([,a])=>a).forEach(([a])=>t.push(a)),t.push(be(o)),s.map(a=>{const c=a.split("=");return[c[0],c[1]]}).forEach(([a,c])=>{switch(a){case E.EVENT_DEFINITION_KIND:t.push(`bpmn-event-def-${c}`);break;case E.EVENT_BASED_GATEWAY_KIND:t.push(`bpmn-gateway-kind-${c.toLowerCase()}`);break;case E.IS_INITIATING:t.push(c==q.NON_INITIATING?"bpmn-icon-non-initiating":"bpmn-icon-initiating");break;case E.SUB_PROCESS_KIND:t.push(`bpmn-sub-process-${c.toLowerCase()}`);break;case E.GLOBAL_TASK_KIND:t.push(be(c));break}}),e&&t.push("bpmn-label"),t}function Sn(n){return Object.values(M).map(e=>e).includes(n)}function be(n){return n?"bpmn-"+n.replace(/([A-Z])/g,e=>"-"+e[0].toLowerCase()):""}class pt extends l.mxCellOverlay{constructor(t,s){super(null,"",s.position.horizontalAlign,s.position.verticalAlign,null,"default");p(this,"style");this.label=t,this.style=s.style}getBounds(t){const s=t.view.graph.getModel().isEdge(t.cell),i=t.view.scale;let o;const r=0,a=0;return s?o=this.computeEdgeBounds(t):(o=new l.mxPoint,this.align==l.mxConstants.ALIGN_LEFT?o.x=t.x:this.align==l.mxConstants.ALIGN_CENTER?o.x=t.x+t.width/2:o.x=t.x+t.width,this.verticalAlign==l.mxConstants.ALIGN_TOP?o.y=t.y:this.verticalAlign==l.mxConstants.ALIGN_MIDDLE?o.y=t.y+t.height/2:o.y=t.y+t.height),new l.mxRectangle(Math.round(o.x-(r*this.defaultOverlap-this.offset.x)*i),Math.round(o.y-(a*this.defaultOverlap-this.offset.y)*i),r*i,a*i)}computeEdgeBounds(t){const s=t.absolutePoints;if(this.align==l.mxConstants.ALIGN_LEFT)return s[0];if(this.align==l.mxConstants.ALIGN_CENTER){if(s.length%2==1)return s[Math.floor(s.length/2)];{const i=s.length/2,o=s[i-1],r=s[i];return new l.mxPoint(o.x+(r.x-o.x)/2,o.y+(r.y-o.y)/2)}}else return s[s.length-1]}}class Je extends l.mxText{constructor(e,t,s){super(e,t,void 0,void 0,s.font.color,void 0,s.font.size,void 0,void 0,void 0,void 0,void 0,void 0,void 0,s.fill.color,s.stroke.color),this.fillOpacity=s.fill.opacity,this.strokewidth=s.stroke.width}}class In extends l.mxConnector{constructor(e,t,s){super(e,t,s)}paintEdgeShape(e,t){const s=this.createMarker(e,t,!0),i=this.createMarker(e,t,!1);this.paintEdgeLine(e,t),e.setShadow(!1),e.setDashed(!1,!1),s!=null&&(e.setFillColor(l.mxUtils.getValue(this.style,E.EDGE_START_FILL_COLOR,this.stroke)),s()),i!=null&&(e.setFillColor(l.mxUtils.getValue(this.style,E.EDGE_END_FILL_COLOR,this.stroke)),i())}paintEdgeLine(e,t){const s=An(e);Qe(e,"stroke"),this.paintLine(e,t,this.isRounded),Qe(e,s)}}function An(n){return n instanceof l.mxSvgCanvas2D?n.pointerEventsValue:null}function Qe(n,e){n instanceof l.mxSvgCanvas2D&&(n.pointerEventsValue=e)}class Nn{configureShapes(){this.initMxSvgCanvasPrototype(),this.initMxShapePrototype(),this.registerShapes(),this.initMxCellRendererCreateCellOverlays()}registerShapes(){l.mxCellRenderer.registerShape(h.EVENT_END,jt),l.mxCellRenderer.registerShape(h.EVENT_START,j),l.mxCellRenderer.registerShape(h.EVENT_INTERMEDIATE_THROW,qt),l.mxCellRenderer.registerShape(h.EVENT_INTERMEDIATE_CATCH,ye),l.mxCellRenderer.registerShape(h.EVENT_BOUNDARY,ye),l.mxCellRenderer.registerShape(h.GATEWAY_COMPLEX,tn),l.mxCellRenderer.registerShape(h.GATEWAY_EVENT_BASED,nn),l.mxCellRenderer.registerShape(h.GATEWAY_EXCLUSIVE,Jt),l.mxCellRenderer.registerShape(h.GATEWAY_INCLUSIVE,en),l.mxCellRenderer.registerShape(h.GATEWAY_PARALLEL,Qt),l.mxCellRenderer.registerShape(h.SUB_PROCESS,gn),l.mxCellRenderer.registerShape(h.CALL_ACTIVITY,fn),l.mxCellRenderer.registerShape(h.TASK,rn),l.mxCellRenderer.registerShape(h.TASK_SERVICE,an),l.mxCellRenderer.registerShape(h.TASK_USER,ln),l.mxCellRenderer.registerShape(h.TASK_RECEIVE,cn),l.mxCellRenderer.registerShape(h.TASK_SEND,un),l.mxCellRenderer.registerShape(h.TASK_MANUAL,dn),l.mxCellRenderer.registerShape(h.TASK_SCRIPT,hn),l.mxCellRenderer.registerShape(h.TASK_BUSINESS_RULE,Tn),l.mxCellRenderer.registerShape(h.TEXT_ANNOTATION,pn),l.mxCellRenderer.registerShape(E.EDGE,In),l.mxCellRenderer.registerShape(E.MESSAGE_FLOW_ICON,En)}initMxSvgCanvasPrototype(){l.mxSvgCanvas2D.prototype.getTextCss=function(){const e=this.state,t=l.mxConstants.ABSOLUTE_LINE_HEIGHT?e.fontSize*l.mxConstants.LINE_HEIGHT+"px":l.mxConstants.LINE_HEIGHT*this.lineHeightCorrection;let s="display: inline-block; font-size: "+e.fontSize+"px; font-family: "+e.fontFamily+"; color: "+e.fontColor+"; line-height: "+t+"; pointer-events: none; ";(e.fontStyle&l.mxConstants.FONT_BOLD)==l.mxConstants.FONT_BOLD&&(s+="font-weight: bold; "),(e.fontStyle&l.mxConstants.FONT_ITALIC)==l.mxConstants.FONT_ITALIC&&(s+="font-style: italic; ");const i=[];return(e.fontStyle&l.mxConstants.FONT_UNDERLINE)==l.mxConstants.FONT_UNDERLINE&&i.push("underline"),(e.fontStyle&l.mxConstants.FONT_STRIKETHROUGH)==l.mxConstants.FONT_STRIKETHROUGH&&i.push("line-through"),i.length>0&&(s+="text-decoration: "+i.join(" ")+"; "),s}}initMxShapePrototype(){l.mxShape.prototype.createSvgCanvas=function(){const e=new l.mxSvgCanvas2D(this.node,!1);e.strokeTolerance=this.pointerEvents?this.svgStrokeTolerance:0,e.pointerEventsValue=this.svgPointerEvents;const t=this.getSvgScreenOffset();if(t!=0?this.node.setAttribute("transform","translate("+t+","+t+")"):this.node.removeAttribute("transform"),this.state&&this.state.cell){const s=this.state.cell;let i=mn(s,this.dialect===l.mxConstants.DIALECT_STRICTHTML);const o=this.state.style[E.EXTRA_CSS_CLASSES];o&&(i=i.concat(o)),this.node.setAttribute("class",i.join(" ")),this.node.setAttribute("data-bpmn-id",this.state.cell.id)}return e.minStrokeWidth=this.minSvgStrokeWidth,this.antiAlias||(e.format=function(s){return Math.round(parseFloat(s))}),e}}initMxCellRendererCreateCellOverlays(){l.mxCellRenderer.prototype.createCellOverlays=function(e){const s=e.view.graph.getCellOverlays(e.cell);let i=null;if(s!=null){i=new l.mxDictionary;for(const o of s){const r=e.overlays!=null?e.overlays.remove(o):null;if(r!=null){i.put(o,r);continue}let a;o instanceof pt?a=new Je(o.label,new l.mxRectangle(0,0,0,0),o.style):(a=new l.mxImageShape(new l.mxRectangle(0,0,0,0),o.image.src),a.preserveImageAspect=!1),a.dialect=e.view.graph.dialect,a.overlay=o,this.initializeOverlay(e,a),this.installCellOverlayListeners(e,o,a),o.cursor!=null&&(a.node.style.cursor=o.cursor),a instanceof Je&&(a.node.classList.add("overlay-badge"),a.node.setAttribute("data-bpmn-id",e.cell.id)),i.put(o,a)}}e.overlays!=null&&e.overlays.visit(function(o,r){r.destroy()}),e.overlays=i}}}class Ln{configureMarkers(){this.registerArrowDashMarker()}registerArrowDashMarker(){const e=(t,s,i,o,r,a,c,u,f)=>{const d=r*(c+f+4),T=a*(c+f+4);return function(){t.begin(),t.moveTo(o.x-d/2-T/2,o.y-T/2+d/2),t.lineTo(o.x+T/2-3*d/2,o.y-3*T/2-d/2),t.stroke()}};l.mxMarker.addMarker(Ge.ARROW_DASH,e)}}function et(n,e,t,s){let i=n??s;return i=Math.min(Math.max(i,e),t),i}function vn(n){return Math.max(n||0,0)}function On(n){const e=n??{};return e.debounceDelay=et(e.debounceDelay,0,100,50),e.throttleDelay=et(e.throttleDelay,0,100,50),e}var _n="Expected a function",tt=0/0,yn="[object Symbol]",bn=/^\s+|\s+$/g,wn=/^[-+]0x[0-9a-f]+$/i,Rn=/^0b[01]+$/i,xn=/^0o[0-7]+$/i,Fn=parseInt,Pn=typeof Y=="object"&&Y&&Y.Object===Object&&Y,Mn=typeof self=="object"&&self&&self.Object===Object&&self,kn=Pn||Mn||Function("return this")(),Bn=Object.prototype,Gn=Bn.toString,Vn=Math.max,Yn=Math.min,Ne=function(){return kn.Date.now()};function Un(n,e,t){var s,i,o,r,a,c,u=0,f=!1,d=!1,T=!0;if(typeof n!="function")throw new TypeError(_n);e=nt(e)||0,we(t)&&(f=!!t.leading,d="maxWait"in t,o=d?Vn(nt(t.maxWait)||0,e):o,T="trailing"in t?!!t.trailing:T);function g(C){var O=s,F=i;return s=i=void 0,u=C,r=n.apply(F,O),r}function A(C){return u=C,a=setTimeout(k,e),f?g(C):r}function b(C){var O=C-c,F=C-u,ne=e-O;return d?Yn(ne,o-F):ne}function P(C){var O=C-c,F=C-u;return c===void 0||O>=e||O<0||d&&F>=o}function k(){var C=Ne();if(P(C))return te(C);a=setTimeout(k,b(C))}function te(C){return a=void 0,T&&s?g(C):(s=i=void 0,r)}function Ce(){a!==void 0&&clearTimeout(a),u=0,s=c=i=a=void 0}function Se(){return a===void 0?r:te(Ne())}function H(){var C=Ne(),O=P(C);if(s=arguments,i=this,c=C,O){if(a===void 0)return A(c);if(d)return a=setTimeout(k,e),g(c)}return a===void 0&&(a=setTimeout(k,e)),r}return H.cancel=Ce,H.flush=Se,H}function we(n){var e=typeof n;return!!n&&(e=="object"||e=="function")}function Wn(n){return!!n&&typeof n=="object"}function Hn(n){return typeof n=="symbol"||Wn(n)&&Gn.call(n)==yn}function nt(n){if(typeof n=="number")return n;if(Hn(n))return tt;if(we(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=we(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=n.replace(bn,"");var t=Rn.test(n);return t||xn.test(n)?Fn(n.slice(2),t?2:8):wn.test(n)?tt:+n}var Kn=Un,Et="Expected a function",st=0/0,Dn="[object Symbol]",zn=/^\s+|\s+$/g,$n=/^[-+]0x[0-9a-f]+$/i,Xn=/^0b[01]+$/i,Zn=/^0o[0-7]+$/i,jn=parseInt,qn=typeof Y=="object"&&Y&&Y.Object===Object&&Y,Jn=typeof self=="object"&&self&&self.Object===Object&&self,Qn=qn||Jn||Function("return this")(),es=Object.prototype,ts=es.toString,ns=Math.max,ss=Math.min,Le=function(){return Qn.Date.now()};function is(n,e,t){var s,i,o,r,a,c,u=0,f=!1,d=!1,T=!0;if(typeof n!="function")throw new TypeError(Et);e=it(e)||0,Te(t)&&(f=!!t.leading,d="maxWait"in t,o=d?ns(it(t.maxWait)||0,e):o,T="trailing"in t?!!t.trailing:T);function g(C){var O=s,F=i;return s=i=void 0,u=C,r=n.apply(F,O),r}function A(C){return u=C,a=setTimeout(k,e),f?g(C):r}function b(C){var O=C-c,F=C-u,ne=e-O;return d?ss(ne,o-F):ne}function P(C){var O=C-c,F=C-u;return c===void 0||O>=e||O<0||d&&F>=o}function k(){var C=Le();if(P(C))return te(C);a=setTimeout(k,b(C))}function te(C){return a=void 0,T&&s?g(C):(s=i=void 0,r)}function Ce(){a!==void 0&&clearTimeout(a),u=0,s=c=i=a=void 0}function Se(){return a===void 0?r:te(Le())}function H(){var C=Le(),O=P(C);if(s=arguments,i=this,c=C,O){if(a===void 0)return A(c);if(d)return a=setTimeout(k,e),g(c)}return a===void 0&&(a=setTimeout(k,e)),r}return H.cancel=Ce,H.flush=Se,H}function os(n,e,t){var s=!0,i=!0;if(typeof n!="function")throw new TypeError(Et);return Te(t)&&(s="leading"in t?!!t.leading:s,i="trailing"in t?!!t.trailing:i),is(n,e,{leading:s,maxWait:e,trailing:i})}function Te(n){var e=typeof n;return!!n&&(e=="object"||e=="function")}function rs(n){return!!n&&typeof n=="object"}function as(n){return typeof n=="symbol"||rs(n)&&ts.call(n)==Dn}function it(n){if(typeof n=="number")return n;if(as(n))return st;if(Te(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Te(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=n.replace(zn,"");var t=Xn.test(n);return t||Zn.test(n)?jn(n.slice(2),t?2:8):$n.test(n)?st:+n}var ls=os;const Re=1.25,cs=1/Re;class us extends l.mxGraph{constructor(t){super(t);p(this,"currentZoomLevel",1);this.zoomFactor=Re,this.container&&(this.container.style.cursor="default")}createGraphView(){return new ds(this)}fit(t,s,i,o,r,a,c){const u=super.fit(t,s,i,o,r,a,c);return this.setCurrentZoomLevel(u),u}setCurrentZoomLevel(t){this.currentZoomLevel=t??this.view.scale}zoomActual(){super.zoomActual(),this.setCurrentZoomLevel()}zoomIn(){super.zoomIn(),this.setCurrentZoomLevel()}zoomOut(){super.zoomOut(),this.setCurrentZoomLevel()}customFit(t){this.zoomActual();const s=t==null?void 0:t.type;if(s==null||s==oe.None)return;const i=vn(t==null?void 0:t.margin);if(s!=oe.Center){let o=!1,r=!1;switch(s){case oe.Horizontal:r=!0;break;case oe.Vertical:o=!0;break}this.fit(this.border,!1,i,!0,o,r)}else{const r=this.getGraphBounds(),a=this.container.clientWidth-i,c=this.container.clientHeight-i,u=r.width/this.view.scale,f=r.height/this.view.scale,d=Math.min(3,Math.min(a/u,c/f));this.setCurrentZoomLevel(d),this.view.scaleAndTranslate(d,(i+a-u*d)/(2*d)-r.x/this.view.scale,(i+c-f*d)/(2*d)-r.y/this.view.scale)}}registerMouseWheelZoomListeners(t){t=On(t),l.mxEvent.addMouseWheelListener(Kn(this.createMouseWheelZoomListener(!0),t.debounceDelay),this.container),l.mxEvent.addMouseWheelListener(ls(this.createMouseWheelZoomListener(!1),t.throttleDelay),this.container)}manageMouseWheelZoomEvent(t,s,i){if(!i)this.currentZoomLevel*=t?Re:cs;else{const[o,r]=this.getEventRelativeCoordinates(s),[a,c,u]=this.getScaleAndTranslationDeltas(o,r);this.view.scaleAndTranslate(a,this.view.translate.x+c,this.view.translate.y+u),l.mxEvent.consume(s)}}createMouseWheelZoomListener(t){return(s,i)=>{if(l.mxEvent.isConsumed(s))return;const o=s;o.ctrlKey&&!o.altKey&&!o.shiftKey&&!o.metaKey&&this.manageMouseWheelZoomEvent(i,o,t)}}getEventRelativeCoordinates(t){const s=this.container.getBoundingClientRect(),i=t.clientX-s.left,o=t.clientY-s.top;return[i,o]}getScaleAndTranslationDeltas(t,s){const[i,o]=this.calculateFactorAndScale(),[r,a]=this.calculateTranslationDeltas(i,o,t*2,s*2);return[o,r,a]}calculateTranslationDeltas(t,s,i,o){if(t>1){const r=(t-1)/(s*2);i*=-r,o*=-r}else{const r=(1/t-1)/(this.view.scale*2);i*=r,o*=r}return[i,o]}calculateFactorAndScale(){const t=Math.round(this.currentZoomLevel*100)/100;return[t/this.view.scale,t]}}class ds extends l.mxGraphView{getFloatingTerminalPoint(e,t,s,i){if(e.absolutePoints.filter(Boolean).length<2)return super.getFloatingTerminalPoint(e,t,s,i);const a=e.absolutePoints;return i?a[1]:a[a.length-2]}}class hs{constructor(e){p(this,"graph");this.container=e,this.graph=new us(e)}configure(e){return this.configureGraph(),this.configureNavigationSupport(e),new le(this.graph).configureStyles(),new Nn().configureShapes(),new Ln().configureMarkers(),this.graph}configureGraph(){this.graph.setCellsLocked(!0),this.graph.setCellsSelectable(!1),this.graph.setEdgeLabelsMovable(!1),this.graph.setHtmlLabels(!0),this.graph.setConstrainChildren(!1),this.graph.setExtendParents(!1),this.graph.foldingEnabled=!1}configureNavigationSupport(e){var s;const t=this.graph.panningHandler;(s=e==null?void 0:e.navigation)!=null&&s.enabled?(t.addListener(l.mxEvent.PAN_START,this.getPanningHandler("grab")),t.addListener(l.mxEvent.PAN_END,this.getPanningHandler("default")),this.graph.panningHandler.usePopupTrigger=!1,t.isForcePanningEvent=i=>l.mxEvent.isLeftMouseButton(i.getEvent())||l.mxEvent.isMultiTouchEvent(i.getEvent()),this.graph.setPanning(!0),this.graph.registerMouseWheelZoomListeners(e.navigation.zoom)):(this.graph.setPanning(!1),t.setPinchEnabled(!1),t.isForcePanningEvent=i=>!1)}getPanningHandler(e){return()=>{this.graph.isEnabled()&&(this.container.style.cursor=e)}}}class Ye{constructor(e,t,s,i,o){this.id=e,this.name=t,this.kind=s,this.sourceRefId=i,this.targetRefId=o}}class mt extends Ye{constructor(e,t,s,i,o=B.NORMAL){super(e,t,M.SEQUENCE_FLOW,s,i),this.sequenceFlowKind=o}}class Ct extends Ye{constructor(e,t,s,i){super(e,t,M.MESSAGE_FLOW,s,i)}}class St extends Ye{constructor(e,t,s,i,o=X.NONE){super(e,t,M.ASSOCIATION_FLOW,s,i),this.associationDirectionKind=o}}class fs{constructor(e){this.graph=e}computeRelativeCoordinates(e,t){const s=this.getTranslateForRoot(e),i=t.x+s.x,o=t.y+s.y;return new l.mxPoint(i,o)}getTranslateForRoot(e){const t=this.graph.getModel(),s=new l.mxPoint(0,0);for(;e!=null;){const i=t.getGeometry(e);i!=null&&(s.x-=i.x,s.y-=i.y),e=t.getParent(e)}return s}computeEdgeCenter(e){const t=e.geometry.points,s=t[0],i=t[t.length-1];if(s!=null&&i!=null){const o=i.x-s.x,r=i.y-s.y;return new l.mxPoint(s.x+o/2,s.y+r/2)}}}class fe{constructor(e,t,s,i,o){this.id=e,this.bpmnElement=t,this.bounds=s,this.label=i,this.isHorizontal=o}}class G{constructor(e,t,s,i,o=!1){this.id=e,this.name=t,this.kind=s,this.parentId=i,this.instantiate=o}}class me extends G{constructor(e,t,s,i,o,r=[]){super(e,t,s,i,o),this.markers=r}}class ce extends me{constructor(e,t,s,i,o,r){super(e,t,h.CALL_ACTIVITY,i,void 0,o),this.callActivityKind=s,this.globalTaskKind=r}}class pe extends me{constructor(e,t,s,i,o){super(e,t,h.SUB_PROCESS,i,void 0,o),this.subProcessKind=s}}class ue extends G{constructor(e,t,s,i,o){super(e,t,s,o),this.eventDefinitionKind=i}}class It extends ue{constructor(e,t,s,i,o){super(e,t,h.EVENT_START,s,i),this.isInterrupting=o}}class At extends ue{constructor(e,t,s,i,o=!0){super(e,t,h.EVENT_BOUNDARY,s,i),this.isInterrupting=o}}class Nt extends G{constructor(e,t,s,i,o=ae.None){super(e,t,h.GATEWAY_EVENT_BASED,s,i),this.gatewayKind=o}}class D{computeStyle(e,t){const s=[e.bpmnElement.kind];let i;e instanceof fe?i=D.computeShapeStyle(e):(s.push(...D.computeEdgeStyle(e)),i=new Map);const o=D.computeFontStyleValues(e),r=D.computeLabelStyleValues(e,t);return[].concat([...s]).concat([...i,...o,...r].filter(([,a])=>a&&a!="undefined").map(([a,c])=>a+"="+c)).join(";")}static computeShapeStyle(e){const t=new Map,s=e.bpmnElement;return s instanceof ue?this.computeEventShapeStyle(s,t):s instanceof me?this.computeActivityShapeStyle(s,t):I.isPoolOrLane(s.kind)?t.set(l.mxConstants.STYLE_HORIZONTAL,e.isHorizontal?"0":"1"):s instanceof Nt&&(t.set(E.IS_INSTANTIATING,String(s.instantiate)),t.set(E.EVENT_BASED_GATEWAY_KIND,String(s.gatewayKind))),t}static computeEventShapeStyle(e,t){t.set(E.EVENT_DEFINITION_KIND,e.eventDefinitionKind),(e instanceof At||e instanceof It&&e.isInterrupting!==void 0)&&t.set(E.IS_INTERRUPTING,String(e.isInterrupting))}static computeActivityShapeStyle(e,t){e instanceof pe?t.set(E.SUB_PROCESS_KIND,e.subProcessKind):e.kind===h.TASK_RECEIVE?t.set(E.IS_INSTANTIATING,String(e.instantiate)):e instanceof ce&&t.set(E.GLOBAL_TASK_KIND,e.globalTaskKind);const s=e.markers;s.length>0&&t.set(E.MARKERS,s.join(","))}static computeEdgeStyle(e){const t=[],s=e.bpmnElement;return s instanceof mt&&t.push(s.sequenceFlowKind),s instanceof St&&t.push(s.associationDirectionKind),t}static computeFontStyleValues(e){var i;const t=new Map,s=(i=e.label)==null?void 0:i.font;return s&&(t.set(l.mxConstants.STYLE_FONTFAMILY,s.name),t.set(l.mxConstants.STYLE_FONTSIZE,s.size),t.set(l.mxConstants.STYLE_FONTSTYLE,D.getFontStyleValue(s))),t}static computeLabelStyleValues(e,t){const s=new Map,i=e.bpmnElement;return t?(s.set(l.mxConstants.STYLE_VERTICAL_ALIGN,l.mxConstants.ALIGN_TOP),e.bpmnElement.kind!=h.TEXT_ANNOTATION&&s.set(l.mxConstants.STYLE_ALIGN,l.mxConstants.ALIGN_CENTER),e instanceof fe&&(s.set(l.mxConstants.STYLE_LABEL_WIDTH,t.width+1),s.set(l.mxConstants.STYLE_LABEL_POSITION,l.mxConstants.ALIGN_TOP),s.set(l.mxConstants.STYLE_VERTICAL_LABEL_POSITION,l.mxConstants.ALIGN_LEFT))):e instanceof fe&&(i instanceof pe||i instanceof ce&&i.callActivityKind===re.CALLING_PROCESS)&&!i.markers.includes(_.EXPAND)&&s.set(l.mxConstants.STYLE_VERTICAL_ALIGN,l.mxConstants.ALIGN_TOP),s}computeMessageFlowIconStyle(e){return`shape=${E.MESSAGE_FLOW_ICON};${E.IS_INITIATING}=${e.messageVisibleKind}`}static getFontStyleValue(e){let t=0;return e.isBold&&(t+=l.mxConstants.FONT_BOLD),e.isItalic&&(t+=l.mxConstants.FONT_ITALIC),e.isStrikeThrough&&(t+=l.mxConstants.FONT_STRIKETHROUGH),e.isUnderline&&(t+=l.mxConstants.FONT_UNDERLINE),t}}class gs{constructor(e,t,s){this.graph=e,this.coordinatesTranslator=t,this.styleComputer=s}render(e,t){this.insertShapesAndEdges(e),this.graph.customFit(t)}insertShapesAndEdges({pools:e,lanes:t,subprocesses:s,otherFlowNodes:i,boundaryEvents:o,edges:r}){const a=this.graph.getModel();a.clear(),a.beginUpdate();try{this.insertShapes(e),this.insertShapes(t),this.insertShapes(s),this.insertShapes(i),this.insertShapes(o),this.insertEdges(r)}finally{a.endUpdate()}}insertShapes(e){e.forEach(t=>this.insertShape(t))}getParent(e){return this.getCell(e.parentId)??this.graph.getDefaultParent()}insertShape(e){var a;const t=e.bpmnElement,s=this.getParent(t),i=e.bounds;let o=(a=e.label)==null?void 0:a.bounds;o=I.isPoolOrLane(t.kind)?void 0:o;const r=this.styleComputer.computeStyle(e,o);this.insertVertex(s,t.id,t.name,i,o,r)}insertEdges(e){e.forEach(t=>{var f;const s=t.bpmnElement,i=this.graph.getDefaultParent(),o=this.getCell(s.sourceRefId),r=this.getCell(s.targetRefId),a=(f=t.label)==null?void 0:f.bounds,c=this.styleComputer.computeStyle(t,a),u=this.graph.insertEdge(i,s.id,s.name,o,r,c);if(this.insertWaypoints(t.waypoints,u),a){u.geometry.width=a.width,u.geometry.height=a.height;const d=this.coordinatesTranslator.computeEdgeCenter(u);if(d){u.geometry.relative=!1;const T=this.coordinatesTranslator.computeRelativeCoordinates(u.parent,new l.mxPoint(a.x,a.y)),g=T.x+a.width/2-d.x,A=T.y-d.y;u.geometry.offset=new l.mxPoint(g,A)}}this.insertMessageFlowIconIfNeeded(t,u)})}insertMessageFlowIconIfNeeded(e,t){if(e.bpmnElement instanceof Ct&&e.messageVisibleKind!==q.NONE){const s=this.graph.insertVertex(t,Lt(t.id),void 0,0,0,20,14,this.styleComputer.computeMessageFlowIconStyle(e));s.geometry.relative=!0,s.geometry.offset=new l.mxPoint(-10,-7)}}insertWaypoints(e,t){e&&(t.geometry.points=e.map(s=>this.coordinatesTranslator.computeRelativeCoordinates(t.parent,new l.mxPoint(s.x,s.y))))}getCell(e){return this.graph.getModel().getCell(e)}insertVertex(e,t,s,i,o,r){const a=this.coordinatesTranslator.computeRelativeCoordinates(e,new l.mxPoint(i.x,i.y)),c=this.graph.insertVertex(e,t,s,a.x,a.y,i.width,i.height,r);if(o){const u=o.x-i.x,f=o.y-i.y;c.geometry.offset=new l.mxPoint(u,f)}return c}}function Ts(n){return new gs(n,new fs(n),new D)}function Lt(n){return`messageFlowIcon_of_${n}`}var Ue={},We={};(function(n){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s="["+e+"]["+t+"]*",i=new RegExp("^"+s+"$"),o=function(a,c){const u=[];let f=c.exec(a);for(;f;){const d=[];d.startIndex=c.lastIndex-f[0].length;const T=f.length;for(let g=0;g"u")};n.isExist=function(a){return typeof a<"u"},n.isEmptyObject=function(a){return Object.keys(a).length===0},n.merge=function(a,c,u){if(c){const f=Object.keys(c),d=f.length;for(let T=0;T"&&n[o]!==" "&&n[o]!==" "&&n[o]!==`
-`&&n[o]!=="\r";o++)c+=n[o];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),o--),!Ls(c)){let d;return c.trim().length===0?d="Invalid space after '<'.":d="Tag '"+c+"' is an invalid name.",N("InvalidTag",d,w(n,o))}const u=Cs(n,o);if(u===!1)return N("InvalidAttr","Attributes for '"+c+"' have open quote.",w(n,o));let f=u.value;if(o=u.index,f[f.length-1]==="/"){const d=o-f.length;f=f.substring(0,f.length-1);const T=lt(f,e);if(T===!0)s=!0;else return N(T.err.code,T.err.msg,w(n,d+T.err.line))}else if(a)if(u.tagClosed){if(f.trim().length>0)return N("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",w(n,r));{const d=t.pop();if(c!==d.tagName){let T=w(n,d.tagStartPos);return N("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+T.line+", col "+T.col+") instead of closing tag '"+c+"'.",w(n,r))}t.length==0&&(i=!0)}}else return N("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",w(n,o));else{const d=lt(f,e);if(d!==!0)return N(d.err.code,d.err.msg,w(n,o-f.length+d.err.line));if(i===!0)return N("InvalidXml","Multiple possible root nodes found.",w(n,o));e.unpairedTags.indexOf(c)!==-1||t.push({tagName:c,tagStartPos:r}),s=!0}for(o++;o0)return N("InvalidXml","Invalid '"+JSON.stringify(t.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return N("InvalidXml","Start tag expected.",1);return!0};function ot(n){return n===" "||n===" "||n===`
-`||n==="\r"}function rt(n,e){const t=e;for(;e5&&s==="xml")return N("InvalidXml","XML declaration allowed only at the start of the document.",w(n,e));if(n[e]=="?"&&n[e+1]==">"){e++;break}else continue}return e}function at(n,e){if(n.length>e+5&&n[e+1]==="-"&&n[e+2]==="-"){for(e+=3;e"){e+=2;break}}else if(n.length>e+8&&n[e+1]==="D"&&n[e+2]==="O"&&n[e+3]==="C"&&n[e+4]==="T"&&n[e+5]==="Y"&&n[e+6]==="P"&&n[e+7]==="E"){let t=1;for(e+=8;e"&&(t--,t===0))break}else if(n.length>e+9&&n[e+1]==="["&&n[e+2]==="C"&&n[e+3]==="D"&&n[e+4]==="A"&&n[e+5]==="T"&&n[e+6]==="A"&&n[e+7]==="["){for(e+=8;e"){e+=2;break}}return e}const Es='"',ms="'";function Cs(n,e){let t="",s="",i=!1;for(;e"&&s===""){i=!0;break}t+=n[e]}return s!==""?!1:{value:t,index:e,tagClosed:i}}const Ss=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function lt(n,e){const t=He.getAllMatches(n,Ss),s={};for(let i=0;i!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1},vs=function(n){return Object.assign({},vt,n)};Ke.buildOptions=vs;Ke.defaultOptions=vt;class Os{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){this.child.push({[e]:t})}addChild(e){e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,[":@"]:e[":@"]}):this.child.push({[e.tagname]:e.child})}}var _s=Os;function ys(n,e){const t={};if(n[e+3]==="O"&&n[e+4]==="C"&&n[e+5]==="T"&&n[e+6]==="Y"&&n[e+7]==="P"&&n[e+8]==="E"){e=e+9;let s=1,i=!1,o=!1,r=!1,a="";for(;e"){if(r)if(n[e-1]==="-"&&n[e-2]==="-")r=!1;else throw new Error("Invalid XML comment in DOCTYPE");else o&&(ws(a,t),o=!1);if(s--,s===0)break}else n[e]==="["?i=!0:a+=n[e];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:t,i:e}}const bs=RegExp(`^\\s([a-zA-z0-0]+)[ ](['"])([^&]+)\\2`);function ws(n,e){const t=bs.exec(n);t&&(e[t[1]]={regx:RegExp(`&${t[1]};`,"g"),val:t[3]})}var Rs=ys;const xs=/^[-+]?0x[a-fA-F0-9]+$/,Fs=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt);!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const Ps={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function Ms(n,e={}){if(e=Object.assign({},Ps,e),!n||typeof n!="string")return n;let t=n.trim();if(e.skipLike!==void 0&&e.skipLike.test(t))return n;if(e.hex&&xs.test(t))return Number.parseInt(t,16);{const s=Fs.exec(t);if(s){const i=s[1],o=s[2];let r=ks(s[3]);const a=s[4]||s[6];if(!e.leadingZeros&&o.length>0&&i&&t[2]!==".")return n;if(!e.leadingZeros&&o.length>0&&!i&&t[1]!==".")return n;{const c=Number(t),u=""+c;return u.search(/[eE]/)!==-1||a?e.eNotation?c:n:t.indexOf(".")!==-1?u==="0"&&r===""||u===r||i&&u==="-"+r?c:n:o?r===u||i+r===u?c:n:t===u||t===i+u?c:n}}else return n}}function ks(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substr(0,n.length-1))),n}var Bs=Ms;const De=We,ie=_s,Gs=Rs,Vs=Bs;"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,De.nameRegexp);let Ys=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=Us,this.parseXml=zs,this.parseTextData=Ws,this.resolveNameSpace=Hs,this.buildAttributesMap=Ds,this.isItStopNode=Zs,this.replaceEntitiesValue=$s,this.readStopNodeData=qs,this.saveTextToParentTag=Xs}};function Us(n){const e=Object.keys(n);for(let t=0;t0)){r||(n=this.replaceEntitiesValue(n));const a=this.options.tagValueProcessor(e,n,t,i,o);return a==null?n:typeof a!=typeof n||a!==n?a:this.options.trimValues?Fe(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?Fe(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function Hs(n){if(this.options.removeNSPrefix){const e=n.split(":"),t=n.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(n=t+e[1])}return n}const Ks=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Ds(n,e){if(!this.options.ignoreAttributes&&typeof n=="string"){const t=De.getAllMatches(n,Ks),s=t.length,i={};for(let o=0;o",o,"Closing Tag is not closed.");let c=n.substring(o+2,a).trim();if(this.options.removeNSPrefix){const u=c.indexOf(":");u!==-1&&(c=c.substr(u+1))}this.options.transformTagName&&(c=this.options.transformTagName(c)),t&&(s=this.saveTextToParentTag(s,t,i)),i=i.substr(0,i.lastIndexOf(".")),t=this.tagsNodeStack.pop(),s="",o=a}else if(n[o+1]==="?"){let a=xe(n,o,!1,"?>");if(!a)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,t,i),!(this.options.ignoreDeclaration&&a.tagName==="?xml"||this.options.ignorePiTags)){const c=new ie(a.tagName);c.add(this.options.textNodeName,""),a.tagName!==a.tagExp&&a.attrExpPresent&&(c[":@"]=this.buildAttributesMap(a.tagExp,i)),t.addChild(c)}o=a.closeIndex+1}else if(n.substr(o+1,3)==="!--"){const a=z(n,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const c=n.substring(o+4,a-2);s=this.saveTextToParentTag(s,t,i),t.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}o=a}else if(n.substr(o+1,2)==="!D"){const a=Gs(n,o);this.docTypeEntities=a.entities,o=a.i}else if(n.substr(o+1,2)==="!["){const a=z(n,"]]>",o,"CDATA is not closed.")-2,c=n.substring(o+9,a);if(s=this.saveTextToParentTag(s,t,i),this.options.cdataPropName)t.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]);else{let u=this.parseTextData(c,t.tagname,i,!0,!1,!0);u==null&&(u=""),t.add(this.options.textNodeName,u)}o=a+2}else{let a=xe(n,o,this.options.removeNSPrefix),c=a.tagName,u=a.tagExp,f=a.attrExpPresent,d=a.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),t&&s&&t.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,t,i,!1)),c!==e.tagname&&(i+=i?"."+c:c);const T=t;if(T&&this.options.unpairedTags.indexOf(T.tagname)!==-1&&(t=this.tagsNodeStack.pop()),this.isItStopNode(this.options.stopNodes,i,c)){let g="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)o=a.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)o=a.closeIndex;else{const b=this.readStopNodeData(n,c,d+1);if(!b)throw new Error(`Unexpected end of ${c}`);o=b.i,g=b.tagContent}const A=new ie(c);c!==u&&f&&(A[":@"]=this.buildAttributesMap(u,i)),g&&(g=this.parseTextData(g,c,i,!0,f,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),A.add(this.options.textNodeName,g),t.addChild(A)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){c[c.length-1]==="/"?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const g=new ie(c);c!==u&&f&&(g[":@"]=this.buildAttributesMap(u,i)),i=i.substr(0,i.lastIndexOf(".")),t.addChild(g)}else{const g=new ie(c);this.tagsNodeStack.push(t),c!==u&&f&&(g[":@"]=this.buildAttributesMap(u,i)),t.addChild(g),t=g}s="",o=d}}else s+=n[o];return e.child},$s=function(n){if(this.options.processEntities){for(let e in this.docTypeEntities){const t=this.docTypeEntities[e];n=n.replace(t.regx,t.val)}for(let e in this.lastEntities){const t=this.lastEntities[e];n=n.replace(t.regex,t.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const t=this.htmlEntities[e];n=n.replace(t.regex,t.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function Xs(n,e,t,s){return n&&(s===void 0&&(s=Object.keys(e.child).length===0),n=this.parseTextData(n,e.tagname,t,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,s),n!==void 0&&n!==""&&e.add(this.options.textNodeName,n),n=""),n}function Zs(n,e,t){const s="*."+t;for(const i in n){const o=n[i];if(s===o||e===o)return!0}return!1}function js(n,e,t=">"){let s,i="";for(let o=e;o"){const i=js(n,e+1,s);if(!i)return;let o=i.data;const r=i.index,a=o.search(/\s/);let c=o,u=!0;if(a!==-1&&(c=o.substr(0,a).replace(/\s\s*$/,""),o=o.substr(a+1)),t){const f=c.indexOf(":");f!==-1&&(c=c.substr(f+1),u=c!==i.data.substr(f+1))}return{tagName:c,tagExp:o,closeIndex:r,attrExpPresent:u}}function qs(n,e,t){const s=t;let i=1;for(;t",t,`${e} is not closed`);if(n.substring(t+2,o).trim()===e&&(i--,i===0))return{tagContent:n.substring(s,t),i:o};t=o}else if(n[t+1]==="?")t=z(n,"?>",t+1,"StopNode is not closed.");else if(n.substr(t+1,3)==="!--")t=z(n,"-->",t+3,"StopNode is not closed.");else if(n.substr(t+1,2)==="![")t=z(n,"]]>",t,"StopNode is not closed.")-2;else{const o=xe(n,t,">");o&&((o&&o.tagName)===e&&o.tagExp[o.tagExp.length-1]!=="/"&&i++,t=o.closeIndex)}}function Fe(n,e,t){if(e&&typeof n=="string"){const s=n.trim();return s==="true"?!0:s==="false"?!1:Vs(n,t)}else return De.isExist(n)?n:""}var Js=Ys,Ot={};function Qs(n,e){return _t(n,e)}function _t(n,e,t){let s;const i={};for(let o=0;o0&&(i[e.textNodeName]=s):s!==void 0&&(i[e.textNodeName]=s),i}function ei(n){const e=Object.keys(n);for(let t=0;t0&&(t=ci),yt(n,e,"",t)}function yt(n,e,t,s){let i="",o=!1;for(let r=0;r`,o=!1;continue}else if(c===e.commentPropName){i+=s+``,o=!0;continue}else if(c[0]==="?"){const A=ct(a[":@"],e),b=c==="?xml"?"":s;let P=a[c][0][e.textNodeName];P=P.length!==0?" "+P:"",i+=b+`<${c}${P}${A}?>`,o=!0;continue}let f=s;f!==""&&(f+=e.indentBy);const d=ct(a[":@"],e),T=s+`<${c}${d}`,g=yt(a[c],e,u,f);e.unpairedTags.indexOf(c)!==-1?e.suppressUnpairedNode?i+=T+">":i+=T+"/>":(!g||g.length===0)&&e.suppressEmptyNode?i+=T+"/>":g&&g.endsWith(">")?i+=T+`>${g}${s}${c}>`:(i+=T+">",g&&s!==""&&(g.includes("/>")||g.includes(""))?i+=s+e.indentBy+g+s:i+=g,i+=`${c}>`),o=!0}return i}function di(n){const e=Object.keys(n);for(let t=0;t0&&e.processEntities)for(let t=0;t","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[]};function ze(n){this.options=Object.assign({},Ti,n),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ai),this.processTextOrObjNode=Ei,this.options.format?(this.indentate=Ii,this.tagEndChar=`>
+${l.mxUtils.getXml(e)}
+`}computeSvg(t){const e=t.scale??1,s=t.border??0,i=t.crisp??!0,o=t.enableForeignObjectForLabel??!0,r=this.graph.getGraphBounds(),a=this.graph.view.scale,c=l.mxUtils.createXmlDocument(),u=c.createElementNS(l.mxConstants.NS_SVG,"svg"),f=e/a,d=Math.max(1,Math.ceil(r.width*f)+2*s),T=Math.max(1,Math.ceil(r.height*f)+2*s);u.setAttribute("version","1.1"),u.setAttribute("width",d+"px"),u.setAttribute("height",T+"px"),u.setAttribute("viewBox",(i?"-0.5 -0.5":"0 0")+" "+d+" "+T),c.appendChild(u);const g=c.createElementNS(l.mxConstants.NS_SVG,"g");u.appendChild(g);const A=this.createSvgCanvas(g);A.foEnabled=o,A.foOffset=i?-.5:0,A.textOffset=i?-.5:0,A.imageOffset=i?-.5:0,A.translate(Math.floor((s/e-r.x)/a),Math.floor((s/e-r.y)/a)),A.scale(f);const b=new l.mxImageExport;return b.includeOverlays=!0,b.drawState(this.graph.getView().getState(this.graph.model.root),A),c}createSvgCanvas(t){const e=new Ht(t);return e.pointerEvents=!0,e}}class Ht extends l.mxSvgCanvas2D{constructor(e){super(e);p(this,"htmlConverter",document.createElement("div"))}getAlternateText(e,s,i,o,r,a,c,u,f,d,T,g,A){return this.computeTruncatedText(a,o)}plainText(e,s,i,o,r,a,c,u,f,d,T,g){r=this.computeTruncatedText(r,i),super.plainText(e,s,i,o,r,a,c,u,f,d,T,g)}computeTruncatedText(e,s){if(e==null||this.state.fontSize<=0)return"";try{this.htmlConverter.innerHTML=e,e=l.mxUtils.extractTextWithWhitespace(this.htmlConverter.childNodes);const i=Math.ceil(2*s/this.state.fontSize),o=[];let r=0,a=0;for(;(i==0||r0)break}else o.push(e.charAt(a)),c<255&&r++;a++}o.length1&&(e=l.mxUtils.trim(o.join(""))+"...")}catch(i){console.warn("Error while computing txt label",i)}return e}}function gt(n,t,e){const s=document.createElement("a");t.startsWith("data:image/svg+xml")&&(e=encodeURIComponent(e),t+=","),s.setAttribute("href",t+e),s.setAttribute("download",n),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)}function Kt(n){Z("Start SVG download"),gt("diagram.svg","data:image/svg+xml",n),Z("Download completed")}function Dt(n){Z("Start PNG download");const t=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t),s=document.createElement("img");s.setAttribute("style","position: absolute; top: -9999px"),s.crossOrigin="anonymous",document.body.appendChild(s);const i=document.createElement("canvas"),o=i.getContext("2d");s.onload=function(){const r=new Image;i.width=s.naturalWidth,i.height=s.naturalHeight,r.crossOrigin="Anonymous",r.onload=function(){o.drawImage(r,0,0),URL.revokeObjectURL(e);const a=i.toDataURL("image/png");document.body.removeChild(s),gt("diagram.png","",a),Z("Download completed")},r.src=s.src},s.src=e}var oe=(n=>(n.None="None",n.HorizontalVertical="HorizontalVertical",n.Horizontal="Horizontal",n.Vertical="Vertical",n.Center="Center",n))(oe||{}),zt=(n=>(n.In="in",n.Out="out",n))(zt||{}),h=(n=>(n.LANE="lane",n.POOL="pool",n.CALL_ACTIVITY="callActivity",n.SUB_PROCESS="subProcess",n.TASK="task",n.TASK_USER="userTask",n.TASK_SERVICE="serviceTask",n.TASK_RECEIVE="receiveTask",n.TASK_SEND="sendTask",n.TASK_MANUAL="manualTask",n.TASK_SCRIPT="scriptTask",n.TASK_BUSINESS_RULE="businessRuleTask",n.GLOBAL_TASK="globalTask",n.GLOBAL_TASK_USER="globalUserTask",n.GLOBAL_TASK_MANUAL="globalManualTask",n.GLOBAL_TASK_SCRIPT="globalScriptTask",n.GLOBAL_TASK_BUSINESS_RULE="globalBusinessRuleTask",n.GROUP="group",n.TEXT_ANNOTATION="textAnnotation",n.GATEWAY_PARALLEL="parallelGateway",n.GATEWAY_EXCLUSIVE="exclusiveGateway",n.GATEWAY_INCLUSIVE="inclusiveGateway",n.GATEWAY_EVENT_BASED="eventBasedGateway",n.GATEWAY_COMPLEX="complexGateway",n.EVENT_START="startEvent",n.EVENT_END="endEvent",n.EVENT_INTERMEDIATE_CATCH="intermediateCatchEvent",n.EVENT_INTERMEDIATE_THROW="intermediateThrowEvent",n.EVENT_BOUNDARY="boundaryEvent",n))(h||{}),re=(n=>(n.CALLING_PROCESS="process",n.CALLING_GLOBAL_TASK="global task",n))(re||{}),ae=(n=>(n.Exclusive="Exclusive",n.None="None",n.Parallel="Parallel",n))(ae||{}),y=(n=>(n.NONE="none",n.TERMINATE="terminate",n.CANCEL="cancel",n.COMPENSATION="compensate",n.CONDITIONAL="conditional",n.ERROR="error",n.ESCALATION="escalation",n.LINK="link",n.MESSAGE="message",n.SIGNAL="signal",n.TIMER="timer",n))(y||{}),_=(n=>(n.ADHOC="adhoc",n.COMPENSATION="compensation",n.EXPAND="expand",n.LOOP="loop",n.MULTI_INSTANCE_PARALLEL="parallel multi instance",n.MULTI_INSTANCE_SEQUENTIAL="sequential multi instance",n))(_||{}),fe=(n=>(n.EMBEDDED="embedded",n.EVENT="event",n))(fe||{});function $t(n,t){return n===""?t?{}:void 0:n}function S(n,t=!1){return n==null?[]:(Array.isArray(n)?n:[n]).map(e=>$t(e,t)).filter(Boolean)}function Xt(n,t,e){let s="";return e!=null&&e.startingWith?s=s.concat(`^(${e.startingWith}).*`):e!=null&&e.notStartingWith&&(s=s.concat(`^(?!(${e.notStartingWith})).*`)),s=s.concat(`${t}$`),n.filter(i=>e!=null&&e.ignoreCase?new RegExp(s,"i").test(i):new RegExp(s).test(i))}class I{static isEvent(t){return de(Ze,t)}static eventKinds(){return[...Ze]}static isBoundaryEvent(t){return h.EVENT_BOUNDARY===t}static isStartEvent(t){return h.EVENT_START===t}static isCallActivity(t){return h.CALL_ACTIVITY===t}static isSubProcess(t){return h.SUB_PROCESS===t}static canHaveNoneEvent(t){return h.EVENT_INTERMEDIATE_THROW===t||h.EVENT_END===t||h.EVENT_START===t}static isActivity(t){return de(Oe,t)}static activityKinds(){return[...Oe]}static isWithDefaultSequenceFlow(t){return Zt.includes(t)}static isTask(t){return de(ve,t)}static taskKinds(){return[...ve]}static gatewayKinds(){return[...je]}static isGateway(t){return de(je,t)}static flowNodeKinds(){return Object.values(h).filter(t=>!I.isPoolOrLane(t))}static isPoolOrLane(t){return t==h.POOL||t==h.LANE}}function ke(n,t){return Xt(Object.values(h),n,t)}function de(n,t){return Object.values(n).map(e=>e).includes(t)}const Ze=ke("Event"),je=ke("Gateway"),ve=ke("Task",{ignoreCase:!0,notStartingWith:"global"}),Oe=[...ve,h.CALL_ACTIVITY,h.SUB_PROCESS],Zt=[...Oe,h.GATEWAY_EXCLUSIVE,h.GATEWAY_INCLUSIVE,h.GATEWAY_COMPLEX],Tt=Object.values(y).filter(n=>n!=y.NONE);var X=(n=>(n.NONE="None",n.ONE="One",n.BOTH="Both",n))(X||{}),M=(n=>(n.SEQUENCE_FLOW="sequenceFlow",n.MESSAGE_FLOW="messageFlow",n.ASSOCIATION_FLOW="association",n))(M||{}),q=(n=>(n.NONE="none",n.INITIATING="initiating",n.NON_INITIATING="non_initiating",n))(q||{}),B=(n=>(n.NORMAL="normal",n.DEFAULT="default",n.CONDITIONAL_FROM_ACTIVITY="conditional_from_activity",n.CONDITIONAL_FROM_GATEWAY="conditional_from_gateway",n))(B||{});class E{}p(E,"EDGE","bpmn.edge"),p(E,"EDGE_START_FILL_COLOR","bpmn.edge.startFillColor"),p(E,"EDGE_END_FILL_COLOR","bpmn.edge.endFillColor"),p(E,"EVENT_BASED_GATEWAY_KIND","bpmn.gatewayKind"),p(E,"EVENT_DEFINITION_KIND","bpmn.eventDefinitionKind"),p(E,"GLOBAL_TASK_KIND","bpmn.globalTaskKind"),p(E,"SUB_PROCESS_KIND","bpmn.subProcessKind"),p(E,"IS_INITIATING","bpmn.isInitiating"),p(E,"IS_INSTANTIATING","bpmn.isInstantiating"),p(E,"IS_INTERRUPTING","bpmn.isInterrupting"),p(E,"EXTRA_CSS_CLASSES","bpmn.extra.css.classes"),p(E,"MARKERS","bpmn.markers"),p(E,"MESSAGE_FLOW_ICON","bpmn.messageFlowIcon");class Be{}p(Be,"ARROW_DASH","bpmn.dash");var m=(n=>(n[n.STROKE_WIDTH_THIN=2]="STROKE_WIDTH_THIN",n[n.STROKE_WIDTH_THICK=5]="STROKE_WIDTH_THICK",n[n.SHAPE_ACTIVITY_BOTTOM_MARGIN=7]="SHAPE_ACTIVITY_BOTTOM_MARGIN",n[n.SHAPE_ACTIVITY_TOP_MARGIN=7]="SHAPE_ACTIVITY_TOP_MARGIN",n[n.SHAPE_ACTIVITY_LEFT_MARGIN=7]="SHAPE_ACTIVITY_LEFT_MARGIN",n[n.SHAPE_ACTIVITY_FROM_CENTER_MARGIN=7]="SHAPE_ACTIVITY_FROM_CENTER_MARGIN",n[n.SHAPE_ACTIVITY_MARKER_ICON_MARGIN=5]="SHAPE_ACTIVITY_MARKER_ICON_MARGIN",n[n.SHAPE_ACTIVITY_MARKER_ICON_SIZE=20]="SHAPE_ACTIVITY_MARKER_ICON_SIZE",n[n.POOL_LABEL_SIZE=30]="POOL_LABEL_SIZE",n.POOL_LABEL_FILL_COLOR="none",n[n.LANE_LABEL_SIZE=30]="LANE_LABEL_SIZE",n.LANE_LABEL_FILL_COLOR="none",n[n.TEXT_ANNOTATION_BORDER_LENGTH=10]="TEXT_ANNOTATION_BORDER_LENGTH",n.TEXT_ANNOTATION_FILL_COLOR="none",n.GROUP_FILL_COLOR="none",n.DEFAULT_FILL_COLOR="White",n.DEFAULT_STROKE_COLOR="Black",n.DEFAULT_FONT_FAMILY="Arial, Helvetica, sans-serif",n[n.DEFAULT_FONT_SIZE=11]="DEFAULT_FONT_SIZE",n.DEFAULT_FONT_COLOR="Black",n[n.DEFAULT_MARGIN=0]="DEFAULT_MARGIN",n[n.SHAPE_ARC_SIZE=20]="SHAPE_ARC_SIZE",n.DEFAULT_OVERLAY_FILL_COLOR="White",n[n.DEFAULT_OVERLAY_FILL_OPACITY=100]="DEFAULT_OVERLAY_FILL_OPACITY",n.DEFAULT_OVERLAY_STROKE_COLOR="Black",n[n.DEFAULT_OVERLAY_STROKE_WIDTH=1]="DEFAULT_OVERLAY_STROKE_WIDTH",n[n.DEFAULT_OVERLAY_FONT_SIZE=11]="DEFAULT_OVERLAY_FONT_SIZE",n.DEFAULT_OVERLAY_FONT_COLOR="Black",n.SEQUENCE_FLOW_CONDITIONAL_FROM_ACTIVITY_MARKER_FILL_COLOR="White",n.MESSAGE_FLOW_MARKER_START_FILL_COLOR="White",n.MESSAGE_FLOW_MARKER_END_FILL_COLOR="White",n))(m||{});class x{static getFillColor(t){return l.mxUtils.getValue(t,l.mxConstants.STYLE_FILLCOLOR,"White")}static getStrokeColor(t){return l.mxUtils.getValue(t,l.mxConstants.STYLE_STROKECOLOR,"Black")}static getStrokeWidth(t){return l.mxUtils.getValue(t,l.mxConstants.STYLE_STROKEWIDTH,2)}static getMargin(t){return l.mxUtils.getValue(t,l.mxConstants.STYLE_MARGIN,0)}static getBpmnEventDefinitionKind(t){return l.mxUtils.getValue(t,E.EVENT_DEFINITION_KIND,y.NONE)}static getBpmnSubProcessKind(t){return l.mxUtils.getValue(t,E.SUB_PROCESS_KIND,void 0)}static getBpmnIsInterrupting(t){return l.mxUtils.getValue(t,E.IS_INTERRUPTING,void 0)}static getBpmnMarkers(t){return l.mxUtils.getValue(t,E.MARKERS,void 0)}static getBpmnIsInstantiating(t){return JSON.parse(l.mxUtils.getValue(t,E.IS_INSTANTIATING,!1))}static getBpmnIsInitiating(t){return l.mxUtils.getValue(t,E.IS_INITIATING,void 0)}static getBpmnIsParallelEventBasedGateway(t){return l.mxUtils.getValue(t,E.EVENT_BASED_GATEWAY_KIND,ae.Exclusive)==ae.Parallel}static getBpmnGlobalTaskKind(t){return l.mxUtils.getValue(t,E.GLOBAL_TASK_KIND,void 0)}}const qe=12;class pt{constructor(t){p(this,"specificFlowStyles",new Se([[M.SEQUENCE_FLOW,t=>{t[l.mxConstants.STYLE_ENDARROW]=l.mxConstants.ARROW_BLOCK_THIN}],[M.MESSAGE_FLOW,t=>{t[l.mxConstants.STYLE_DASHED]=!0,t[l.mxConstants.STYLE_DASH_PATTERN]="8 5",t[l.mxConstants.STYLE_STARTARROW]=l.mxConstants.ARROW_OVAL,t[l.mxConstants.STYLE_STARTSIZE]=8,t[l.mxConstants.STYLE_STARTFILL]=!0,t[E.EDGE_START_FILL_COLOR]=m.MESSAGE_FLOW_MARKER_START_FILL_COLOR,t[l.mxConstants.STYLE_ENDARROW]=l.mxConstants.ARROW_BLOCK_THIN,t[l.mxConstants.STYLE_ENDFILL]=!0,t[E.EDGE_END_FILL_COLOR]=m.MESSAGE_FLOW_MARKER_END_FILL_COLOR}],[M.ASSOCIATION_FLOW,t=>{t[l.mxConstants.STYLE_DASHED]=!0,t[l.mxConstants.STYLE_DASH_PATTERN]="1 2",t[l.mxConstants.STYLE_STARTSIZE]=qe}]]));p(this,"specificSequenceFlowStyles",new Se([[B.DEFAULT,t=>{t[l.mxConstants.STYLE_STARTARROW]=Be.ARROW_DASH}],[B.CONDITIONAL_FROM_ACTIVITY,t=>{t[l.mxConstants.STYLE_STARTARROW]=l.mxConstants.ARROW_DIAMOND_THIN,t[l.mxConstants.STYLE_STARTSIZE]=18,t[l.mxConstants.STYLE_STARTFILL]=!0,t[E.EDGE_START_FILL_COLOR]=m.SEQUENCE_FLOW_CONDITIONAL_FROM_ACTIVITY_MARKER_FILL_COLOR}]]));p(this,"specificAssociationFlowStyles",new Se([[X.NONE,t=>{}],[X.ONE,t=>{t[l.mxConstants.STYLE_ENDARROW]=l.mxConstants.ARROW_OPEN_THIN}],[X.BOTH,t=>{t[l.mxConstants.STYLE_STARTARROW]=l.mxConstants.ARROW_OPEN_THIN,t[l.mxConstants.STYLE_ENDARROW]=l.mxConstants.ARROW_OPEN_THIN}]]));this.graph=t}configureStyles(){this.configureDefaultVertexStyle(),this.configurePoolStyle(),this.configureLaneStyle(),this.configureTextAnnotationStyle(),this.configureGroupStyle(),this.configureActivityStyles(),this.configureEventStyles(),this.configureGatewayStyles(),this.configureDefaultEdgeStyle(),this.configureFlowStyles()}getStylesheet(){return this.graph.getStylesheet()}putCellStyle(t,e){this.getStylesheet().putCellStyle(t,e)}configureDefaultVertexStyle(){const t=this.getStylesheet().getDefaultVertexStyle();Je(t),t[l.mxConstants.STYLE_ABSOLUTE_ARCSIZE]=!0,t[l.mxConstants.STYLE_ARCSIZE]=m.SHAPE_ARC_SIZE}configurePoolStyle(){const t={};t[l.mxConstants.STYLE_SHAPE]=l.mxConstants.SHAPE_SWIMLANE,t[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_MIDDLE,t[l.mxConstants.STYLE_ALIGN]=l.mxConstants.ALIGN_CENTER,t[l.mxConstants.STYLE_STARTSIZE]=m.POOL_LABEL_SIZE,t[l.mxConstants.STYLE_FILLCOLOR]=m.POOL_LABEL_FILL_COLOR,this.graph.getStylesheet().putCellStyle(h.POOL,t)}configureLaneStyle(){const t={};t[l.mxConstants.STYLE_SHAPE]=l.mxConstants.SHAPE_SWIMLANE,t[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_MIDDLE,t[l.mxConstants.STYLE_ALIGN]=l.mxConstants.ALIGN_CENTER,t[l.mxConstants.STYLE_SWIMLANE_LINE]=0,t[l.mxConstants.STYLE_STARTSIZE]=m.LANE_LABEL_SIZE,t[l.mxConstants.STYLE_FILLCOLOR]=m.LANE_LABEL_FILL_COLOR,this.graph.getStylesheet().putCellStyle(h.LANE,t)}configureEventStyles(){I.eventKinds().forEach(t=>{const e={};e[l.mxConstants.STYLE_SHAPE]=t,e[l.mxConstants.STYLE_PERIMETER]=l.mxPerimeter.EllipsePerimeter,e[l.mxConstants.STYLE_STROKEWIDTH]=t==h.EVENT_END?m.STROKE_WIDTH_THICK:m.STROKE_WIDTH_THIN,e[l.mxConstants.STYLE_VERTICAL_LABEL_POSITION]=l.mxConstants.ALIGN_BOTTOM,this.putCellStyle(t,e)})}configureTextAnnotationStyle(){const t={};t[l.mxConstants.STYLE_SHAPE]=h.TEXT_ANNOTATION,t[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_MIDDLE,t[l.mxConstants.STYLE_ALIGN]=l.mxConstants.ALIGN_LEFT,t[l.mxConstants.STYLE_SPACING_LEFT]=5,t[l.mxConstants.STYLE_FILLCOLOR]=m.TEXT_ANNOTATION_FILL_COLOR,t[l.mxConstants.STYLE_STROKEWIDTH]=m.STROKE_WIDTH_THIN,this.putCellStyle(h.TEXT_ANNOTATION,t)}configureGroupStyle(){const t={};t[l.mxConstants.STYLE_ROUNDED]=!0,t[l.mxConstants.STYLE_DASHED]=!0,t[l.mxConstants.STYLE_DASH_PATTERN]="7 4 1 4",t[l.mxConstants.STYLE_STROKEWIDTH]=m.STROKE_WIDTH_THIN,t[l.mxConstants.STYLE_FILLCOLOR]=m.GROUP_FILL_COLOR,t[l.mxConstants.STYLE_ALIGN]=l.mxConstants.ALIGN_CENTER,t[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_TOP,this.putCellStyle(h.GROUP,t)}configureActivityStyles(){I.activityKinds().forEach(t=>{const e={};e[l.mxConstants.STYLE_SHAPE]=t,e[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_MIDDLE,e[l.mxConstants.STYLE_STROKEWIDTH]=t==h.CALL_ACTIVITY?m.STROKE_WIDTH_THICK:m.STROKE_WIDTH_THIN,this.putCellStyle(t,e)})}configureGatewayStyles(){I.gatewayKinds().forEach(t=>{const e={};e[l.mxConstants.STYLE_SHAPE]=t,e[l.mxConstants.STYLE_PERIMETER]=l.mxPerimeter.RhombusPerimeter,e[l.mxConstants.STYLE_STROKEWIDTH]=m.STROKE_WIDTH_THIN,e[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_TOP,e[l.mxConstants.STYLE_LABEL_POSITION]=l.mxConstants.ALIGN_LEFT,e[l.mxConstants.STYLE_VERTICAL_LABEL_POSITION]=l.mxConstants.ALIGN_TOP,this.putCellStyle(t,e)})}configureDefaultEdgeStyle(){const t=this.getStylesheet().getDefaultEdgeStyle();Je(t),t[l.mxConstants.STYLE_SHAPE]=E.EDGE,t[l.mxConstants.STYLE_ENDSIZE]=qe,t[l.mxConstants.STYLE_STROKEWIDTH]=1.5,t[l.mxConstants.STYLE_ROUNDED]=!0,t[l.mxConstants.STYLE_ARCSIZE]=5,t[l.mxConstants.STYLE_VERTICAL_ALIGN]=l.mxConstants.ALIGN_BOTTOM,delete t[l.mxConstants.STYLE_ENDARROW]}configureEdgeStyles(t,e){t.forEach(s=>{const i={};e.get(s)(i),this.graph.getStylesheet().putCellStyle(s.toString(),i)})}configureFlowStyles(){this.configureEdgeStyles(Object.values(M),this.specificFlowStyles),this.configureEdgeStyles(Object.values(B),this.specificSequenceFlowStyles),this.configureEdgeStyles(Object.values(X),this.specificAssociationFlowStyles)}}function Je(n){n[l.mxConstants.STYLE_FONTFAMILY]=m.DEFAULT_FONT_FAMILY,n[l.mxConstants.STYLE_FONTSIZE]=m.DEFAULT_FONT_SIZE,n[l.mxConstants.STYLE_FONTCOLOR]=m.DEFAULT_FONT_COLOR,n[l.mxConstants.STYLE_FILLCOLOR]=m.DEFAULT_FILL_COLOR,n[l.mxConstants.STYLE_STROKECOLOR]=m.DEFAULT_STROKE_COLOR,n[l.mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=l.mxConstants.NONE,n[l.mxConstants.STYLE_WHITE_SPACE]="wrap"}class Se extends Map{get(t){return super.get(t)??(()=>{})}}function jt(n,t,e,s){let i,o;n.heightg.setIconOriginForIconCentered(),shapeConfig:{x:t,y:e,width:s,height:i,strokeWidth:u},iconStyleConfig:{isFilled:a,fillColor:f,strokeColor:d,strokeWidth:c,margin:T}}}class K{paintEmptyIcon(){}newBpmnCanvas({canvas:t,ratioFromParent:e,setIconOriginFunct:s,shapeConfig:i,iconStyleConfig:o},r){return new qt({canvas:t,shapeConfig:i,iconConfig:{originalSize:r,styleConfig:o,ratioFromParent:e,setIconOriginFunct:s}})}paintEnvelopeIcon(t){const e={width:485.41,height:321.76},s=this.newBpmnCanvas(t,e),i=e.width,o=e.height;s.rect(0,0,i,o),s.fillAndStroke();const{iconStyleConfig:r}=t;r.isFilled&&s.setStrokeColor(r.fillColor),s.begin(),s.moveTo(0,0),s.lineTo(i*.5,o*.6),s.lineTo(i,0),s.moveTo(0,o),s.lineTo(i/3,o*.45),s.moveTo(i,o),s.lineTo(i*2/3,o*.45),s.stroke()}paintCircleIcon(t){const e={width:t.shapeConfig.width,height:t.shapeConfig.height},s=this.newBpmnCanvas(t,e),i=e.width,o=e.height;i>0&&o>0&&s.ellipse(0,0,i,o),t.iconStyleConfig.isFilled?s.fillAndStroke():s.stroke()}paintClockIcon(t){const e=this.newBpmnCanvas(t,{height:152,width:152});e.begin(),e.moveTo(184,60),e.curveTo(188.4,60,192,56.4,192,52),e.lineTo(192,48),e.curveTo(192,40,188.4,40,184,40),e.curveTo(179.6,40,176,43.6,176,48),e.lineTo(176,52),e.curveTo(176,56.4,179.6,60,184,60),e.close(),e.moveTo(184,308),e.curveTo(179.6,308,176,311.6,176,316),e.lineTo(176,320),e.curveTo(176,324.4,179.6,328,184,328),e.curveTo(188.4,328,192,324.4,192,320),e.lineTo(192,316),e.curveTo(192,311.6,188.4,308,184,308),e.close(),e.moveTo(52,176),e.lineTo(48,176),e.curveTo(43.6,176,40,179.6,40,184),e.curveTo(40,188.4,43.6,192,48,192),e.lineTo(52,192),e.curveTo(56.4,192,69,188.4,60,184),e.curveTo(60,179.6,56.4,176,52,176),e.close(),e.moveTo(320,176),e.lineTo(316,176),e.curveTo(311.6,176,308,179.6,308,184),e.curveTo(308,188.4,311.6,192,316,192),e.lineTo(320,192),e.curveTo(324.4,192,328,188.4,328,184),e.curveTo(328,179.6,324.4,176,320,176),e.moveTo(93.6,82.4),e.curveTo(90.4,79.2,85.6,79.2,82.4,82.4),e.curveTo(79.2,85.6,79.2,90.4,82.4,93.6),e.lineTo(85.2,96.4),e.curveTo(86.8,98,88.8,98.8,90.8,98.8),e.curveTo(92.8,98.8,94.4,98,96.4,96.4),e.curveTo(99.6,93.2,99.6,88.4,96.4,85.2),e.lineTo(93.6,82.4),e.moveTo(85.2,271.6),e.lineTo(82.4,274.4),e.curveTo(79.2,277.6,79.2,282.4,82.4,285.6),e.curveTo(84,287.2,86,288,88,288),e.curveTo(90,288,92,287.2,93.6,285.6),e.lineTo(96.4,282.8),e.curveTo(99.6,279.6,99.6,274.8,96.4,271.6),e.curveTo(93.2,268.4,88.4,268.4,85.2,271.6),e.moveTo(274.4,82.4),e.lineTo(271.6,85.2),e.curveTo(268.4,88.4,268.4,93.2,271.6,96.4),e.curveTo(273.298,98,275.2,98.8,277.2,98.8),e.curveTo(279.2,98.8,281.2,98,282.8,96.4),e.lineTo(285.6,93.6),e.curveTo(288.8,90.4,288.8,85.6,285.6,82.4),e.curveTo(282.4,79.2,277.6,79.2,274.4,82.4),e.moveTo(192,180.8),e.lineTo(192,108),e.curveTo(192,103.6,188.4,100,184,100),e.curveTo(179.6,100,176,103.6,176,108),e.lineTo(176,184),e.curveTo(176,186,176.8,188,178.4,189.6),e.lineTo(266,277.2),e.curveTo(267.6,278.8,269.6,279.6,271.6,279.6),e.curveTo(273.6,279.6,275.6,278.8,277.2,277.2),e.curveTo(280.4,274,280.4,269.2,277.2,266),e.lineTo(192,180.8),e.moveTo(184,0),e.curveTo(82.4,0,0,82.4,0,184),e.curveTo(0,285.6,82.4,368,184,368),e.curveTo(285.6,368,368,285.6,368,184),e.curveTo(368,82.4,285.6,0,184,0),e.moveTo(184,352),e.curveTo(91.2,352,16,276.8,16,184),e.curveTo(16,91.2,91.2,16,184,16),e.curveTo(276.8,16,352,91.2,352,184),e.curveTo(352,276.8,276.8,352,184,352),e.fillAndStroke()}paintTriangleIcon(t){const e=this.newBpmnCanvas(t,{height:735,width:849});e.begin(),e.moveTo(497,55),e.lineTo(817,609),e.curveTo(849,665,808,735,744,735),e.lineTo(105,735),e.curveTo(40,735,0,665,32,609),e.lineTo(352,55),e.curveTo(384,0,465,0,497,55),e.close(),e.fillAndStroke()}paintUpArrowheadIcon(t){const e=this.newBpmnCanvas(t,{height:50,width:40});e.begin(),e.moveTo(0,49.5),e.lineTo(19.5,1),e.curveTo(19.75,.25,20,0,20.25,.25),e.lineTo(40,49.5),e.curveTo(40,49.5,39.75,50,39.6,49.75),e.lineTo(20,30),e.lineTo(.4,49.75),e.curveTo(.4,49.75,.25,50,0,49.5),e.close(),e.fillAndStroke()}paintDoubleLeftArrowheadsIcon(t){const e=this.newBpmnCanvas(t,{height:53.5,width:105});e.begin(),e.moveTo(91.4,0),e.curveTo(91.4,0,91.2,0,91,.2),e.lineTo(50,25),e.curveTo(47.9,25.8,46.7,26.6,46.4,27.3),e.lineTo(46.4,0),e.curveTo(46.4,0,46.2,0,46,.2),e.lineTo(4.9,25),e.curveTo(2,26.2,0,27.3,4.9,28.5),e.lineTo(45.8,53),e.curveTo(46,53.3,46.2,53.5,46.4,53.5),e.lineTo(46.4,27),e.curveTo(46.6,27.3,47.8,28.1,49.9,29.9),e.lineTo(90.8,53.3),e.curveTo(91,53.3,91.2,53.5,91.4,53.5),e.lineTo(91.4,0),e.close(),e.fillAndStroke()}drawCrossIcon(t){const e=this.newBpmnCanvas(t,{height:1,width:1});return e.begin(),e.moveTo(.38,0),e.lineTo(.62,0),e.lineTo(.62,.38),e.lineTo(1,.38),e.lineTo(1,.62),e.lineTo(.62,.62),e.lineTo(.62,1),e.lineTo(.38,1),e.lineTo(.38,.62),e.lineTo(0,.62),e.lineTo(0,.38),e.lineTo(.38,.38),e.close(),e}paintListIcon(t){const e=this.newBpmnCanvas(t,{height:60,width:60});e.begin(),e.moveTo(0,0),e.lineTo(60,0),e.lineTo(60,60),e.lineTo(0,60),e.lineTo(0,0),e.close(),e.moveTo(5,5),e.lineTo(55,5),e.close(),e.moveTo(5,21.6),e.lineTo(55,21.6),e.close(),e.moveTo(5,38.3),e.lineTo(55,38.3),e.close(),e.moveTo(5,55),e.lineTo(55,55),e.close(),e.fillAndStroke()}paintXCrossIcon(t){const e=this.drawCrossIcon(t);e.rotateOnIconCenter(45),e.fillAndStroke()}paintPlusCrossIcon(t){this.drawCrossIcon(t).fillAndStroke()}paintAsteriskIcon(t){const e=this.newBpmnCanvas(t,{height:1,width:1});Ie(t,e),e.fillAndStroke(),Ie(t,e),e.rotateOnIconCenter(60),e.fillAndStroke(),Ie(t,e),e.rotateOnIconCenter(240),e.fillAndStroke()}paintPersonIcon(t){const e=this.newBpmnCanvas({...t,iconStyleConfig:{...t.iconStyleConfig,isFilled:!0}},{height:239.68,width:143.61});e.begin(),e.moveTo(124.31,150.29),e.lineTo(99.66,141.03),e.arcTo(6.43,6.43,0,0,1,95.51,135.03),e.lineTo(95.51,130.66),e.arcTo(47.75,47.75,0,0,0,119.51,89.25),e.lineTo(119.51,71.25),e.arcTo(47.62,47.62,0,0,0,101.18,33.64),e.arcTo(29.35,29.35,0,0,0,101.52,29.14),e.arcTo(29.68,29.68,0,0,0,42.17,29.14),e.arcTo(29.24,29.24,0,0,0,42.53,33.63),e.arcTo(47.65,47.65,0,0,0,24.14,71.23),e.lineTo(24.14,89.23),e.arcTo(47.7,47.7,0,0,0,48.19,130.63),e.lineTo(48.19,135.03),e.arcTo(6.43,6.43,0,0,1,44.03,141.03),e.lineTo(19.31,150.29),e.arcTo(29.81,29.81,0,0,0,.09,178.03),e.lineTo(.09,233.51),e.arcTo(5.63,5.63,0,1,0,11.34,233.51),e.lineTo(11.34,178.03),e.arcTo(18.19,18.19,0,0,1,11.57,175.17),e.lineTo(20.5,184.11),e.arcTo(12.32,12.32,0,0,1,24.14,192.89),e.lineTo(24.14,233.51),e.arcTo(5.63,5.63,0,1,0,35.39,233.51),e.lineTo(35.39,192.93),e.arcTo(23.5,23.5,0,0,0,28.46,176.2),e.lineTo(17.04,164.78),e.arcTo(18.34,18.34,0,0,1,23.29,160.78),e.lineTo(43.65,153.15),e.lineTo(66.22,175.72),e.lineTo(66.22,233.51),e.arcTo(5.63,5.63,0,1,0,77.47,233.51),e.lineTo(77.47,175.76),e.lineTo(100.04,153.19),e.lineTo(120.4,160.82),e.arcTo(18.39,18.39,0,0,1,126.65,164.82),e.lineTo(115.24,176.24),e.arcTo(23.5,23.5,0,0,0,108.31,192.93),e.lineTo(108.31,233.55),e.arcTo(5.63,5.63,0,1,0,119.56,233.55),e.lineTo(119.56,192.93),e.arcTo(12.35,12.35,0,0,1,123.19,184.15),e.lineTo(132.13,175.22),e.arcTo(18,18,0,0,1,132.36,178.08),e.lineTo(132.36,233.56),e.arcTo(5.63,5.63,0,0,0,143.61,233.56),e.lineTo(143.61,178.03),e.arcTo(29.81,29.81,0,0,0,124.31,150.29),e.close(),e.moveTo(71.85,10.72),e.arcTo(18.46,18.46,0,0,1,90.17,27.18),e.arcTo(47.68,47.68,0,0,0,53.53,27.18),e.arcTo(18.44,18.44,0,0,1,71.85,10.72),e.close(),e.moveTo(35.39,71.23),e.arcTo(36.46,36.46,0,0,1,108.31,71.23),e.lineTo(108.31,77.4),e.curveTo(82.12,75.4,56.97,60.55,56.71,60.4),e.arcTo(5.62,5.62,0,0,0,48.78,62.71),e.curveTo(46.24,67.79,40.45,71.89,35.39,74.62),e.close(),e.moveTo(35.39,89.23),e.lineTo(35.39,87.08),e.curveTo(40.55,84.85,49.73,80.08,55.67,72.66),e.curveTo(64.83,77.46,85.92,87.21,108.31,88.66),e.lineTo(108.31,89.24),e.arcTo(36.46,36.46,0,1,1,35.39,89.24),e.close(),e.moveTo(71.85,165.45),e.lineTo(54.06,147.69),e.arcTo(17.7,17.7,0,0,0,59.43,135.32),e.arcTo(47.57,47.57,0,0,0,84.27,135.32),e.arcTo(17.7,17.7,0,0,0,89.64,147.69),e.close(),e.fill()}paintGearIcon(t){const e=this.newBpmnCanvas(t,{height:100,width:100});K.paintGearIconBackground(e),e.translateIconOrigin(14,14),K.paintGearIconForeground(e)}static paintGearIconBackground(t){t.begin(),t.moveTo(2.06,24.62),t.lineTo(10.17,30.95),t.lineTo(9.29,37.73),t.lineTo(0,41.42),t.lineTo(2.95,54.24),t.lineTo(13.41,52.92),t.lineTo(17.39,58.52),t.lineTo(13.56,67.66),t.lineTo(24.47,74.44),t.lineTo(30.81,66.33),t.lineTo(37.88,67.21),t.lineTo(41.57,76.5),t.lineTo(54.24,73.55),t.lineTo(53.06,62.94),t.lineTo(58.52,58.52),t.lineTo(67.21,63.09),t.lineTo(74.58,51.88),t.lineTo(66.03,45.25),t.lineTo(66.92,38.62),t.lineTo(76.5,34.93),t.lineTo(73.7,22.26),t.lineTo(62.64,23.44),t.lineTo(58.81,18.42),t.lineTo(62.79,8.7),t.lineTo(51.74,2.21),t.lineTo(44.81,10.47),t.lineTo(38.03,9.43),t.lineTo(33.75,0),t.lineTo(21.52,3.24),t.lineTo(22.7,13.56),t.lineTo(18.13,17.54),t.lineTo(8.7,13.56),t.close();const e=24.8,s=39;K.paintGearInnerCircle(t,e,s)}static paintGearIconForeground(t){t.begin(),t.moveTo(16.46,41.42),t.lineTo(24.57,47.75),t.lineTo(23.69,54.53),t.lineTo(14.4,58.22),t.lineTo(17.35,71.04),t.lineTo(27.81,69.72),t.lineTo(31.79,75.32),t.lineTo(27.96,84.46),t.lineTo(38.87,91.24),t.lineTo(45.21,83.13),t.lineTo(52.28,84.01),t.lineTo(55.97,93.3),t.lineTo(68.64,90.35),t.lineTo(67.46,79.74),t.lineTo(72.92,75.32),t.lineTo(81.61,79.89),t.lineTo(88.98,68.68),t.lineTo(80.43,62.05),t.lineTo(81.32,55.42),t.lineTo(90.9,51.73),t.lineTo(88.1,39.06),t.lineTo(77.04,40.24),t.lineTo(73.21,35.22),t.lineTo(77.19,25.5),t.lineTo(66.14,19.01),t.lineTo(59.21,27.27),t.lineTo(52.43,26.23),t.lineTo(48.15,16.8),t.lineTo(35.92,20.04),t.lineTo(37.1,30.36),t.lineTo(32.53,34.34),t.lineTo(23.1,30.36),t.close();const e=39.2,s=55.8;K.paintGearInnerCircle(t,e,s),t.begin(),K.paintGearInnerCircle(t,e,s)}static paintGearInnerCircle(t,e,s){t.moveTo(e,s),t.arcTo(13.5,13.5,0,1,1,e+2*13.5,s),t.arcTo(13.5,13.5,0,0,1,e,s),t.close(),t.fillAndStroke()}paintExpandIcon(t){const e={width:16,height:16},s=this.newBpmnCanvas(t,e),i=e.width,o=e.height;s.roundrect(0,0,i,o,2,2),s.stroke(),s.begin(),s.moveTo(i/2,o/4),s.lineTo(i/2,o*3/4),s.close(),s.moveTo(i/4,o/2),s.lineTo(i*3/4,o/2),s.close(),s.fillAndStroke()}paintLoopIcon(t){const{iconStyleConfig:e}=t;e.fillColor=e.strokeColor;const s=this.newBpmnCanvas(t,{width:22.49,height:21.62});s.begin(),s.moveTo(5.5,19.08),s.arcTo(8,8,0,1,1,10.5,21.08),s.stroke(),s.begin(),s.moveTo(7.5,14.08),s.lineTo(5.75,19.08),s.lineTo(0,17.08),s.close(),s.fillAndStroke()}paintSequentialMultiInstanceIcon(t){const e={width:16,height:16},s=this.newBpmnCanvas(t,e),{canvas:i,iconStyleConfig:o}=t;i.setFillColor(o.strokeColor);const r=e.width,a=e.height/5;s.rect(0,0,r,a),s.fill(),s.rect(0,2*a,r,a),s.fill(),s.rect(0,4*a,r,a),s.fill()}paintParallelMultiInstanceIcon(t){const e={width:16,height:16},s=this.newBpmnCanvas(t,e),{canvas:i,iconStyleConfig:o}=t;i.setFillColor(o.strokeColor);const r=e.width/5,a=e.height;s.begin(),s.rect(0,0,r,a),s.fill(),s.rect(2*r,0,r,a),s.fill(),s.rect(4*r,0,r,a),s.fill()}paintRightArrowIcon(t){const e=this.newBpmnCanvas(t,{width:512,height:415.23});e.setRoundLineJoin(),e.begin(),e.moveTo(512,207.61),e.lineTo(304.38,0),e.lineTo(304.38,135.39),e.lineTo(0,135.39),e.lineTo(0,279.84),e.lineTo(304.38,279.84),e.lineTo(304.38,415.23),e.lineTo(512,207.61),e.close(),e.fillAndStroke()}paintErrorIcon(t){const e=this.newBpmnCanvas(t,{width:72.44,height:71.82});e.begin(),e.moveTo(0,53.32),e.lineTo(19.48,0),e.lineTo(19.48,0),e.lineTo(50.85,40.07),e.lineTo(72.44,18.21),e.lineTo(53.12,71.82),e.lineTo(22.5,31.37),e.close(),e.fillAndStroke()}paintHandIcon(t){const e=this.newBpmnCanvas(t,{width:343.65,height:354.12});e.begin(),e.moveTo(231.66,336.39),e.curveTo(240.84,316.9,220.53,306.92,220.53,306.92),e.curveTo(215.2,303.67,188.58,287.43,140.67,258.19),e.lineTo(146.33,248.39),e.curveTo(223.98,269.38,267.12,281.04,275.75,283.38),e.curveTo(275.75,283.38,297.25,288,301.42,267.77),e.curveTo(306.34,245.29,288.32,238.63,288.32,238.63),e.curveTo(279.91,236.44,237.86,225.48,162.18,205.75),e.lineTo(165.2,194.8),e.curveTo(255.88,204.4,306.27,209.73,316.34,210.8),e.curveTo(316.34,210.8,339.89,212.16,341.76,189.55),e.curveTo(343.65,166.93,320.5,164.13,320.5,164.13),e.curveTo(310.43,163.1,260.04,157.99,169.35,148.77),e.lineTo(169.35,138.97),e.curveTo(253.41,132.12,300.11,128.32,309.45,127.56),e.curveTo(309.45,127.56,332.27,122.38,332.27,102.61),e.curveTo(332.27,82.85,305.48,81.87,305.48,81.87),e.curveTo(293.99,82.2,236.54,83.88,133.13,86.9),e.lineTo(127.61,81.87),e.curveTo(145.3,59.39,155.12,46.9,157.09,44.41),e.curveTo(157.09,44.41,171.12,26.8,156.78,12.72),e.curveTo(143.83,0,124.08,14.49,124.08,14.49),e.curveTo(116.45,19.41,78.35,44.06,9.77,88.43),e.lineTo(0,251.94),e.curveTo(122.84,308.79,191.09,340.37,204.74,346.69),e.curveTo(204.74,346.69,222.91,354.12,231.66,336.39),e.fillAndStroke()}paintScriptIcon(t){t.iconStyleConfig.fillColor=t.iconStyleConfig.strokeColor;const e=this.newBpmnCanvas(t,{width:458.75,height:461.64});e.begin(),e.moveTo(67.85,.57),e.curveTo(50.73,0,33.26,8.86,22.35,18.84),e.curveTo(8.11,32.15,0,50.77,0,70.26),e.curveTo(0,73.15,0,87.59,0,113.6),e.curveTo(55.4,113.6,86.18,113.6,92.33,113.6),e.curveTo(94.92,150.46,85.64,180.4,74.22,211.27),e.curveTo(40.16,298.07,30.77,339.83,55.56,410.87),e.curveTo(63.72,438.26,87.59,457.85,114.91,461.09),e.curveTo(216.96,460.85,294.9,461.64,388.41,461.2),e.curveTo(407.2,461.09,425.14,453.55,438.3,440.13),e.curveTo(451.46,426.71,458.75,403.06,458.46,384.26),e.curveTo(458.43,382.23,458.18,365.93,458.15,363.89),e.curveTo(432.12,364.24,406.09,364.04,380.06,364.04),e.curveTo(377.61,347.52,377.24,337.58,378.28,324.48),e.curveTo(380.5,296.47,389.08,273.36,398.59,247.1),e.curveTo(408.11,220.83,418.41,191.47,420.86,154.24),e.curveTo(422.11,135.34,421.4,110.24,417.77,86.75),e.curveTo(417.76,86.71,417.73,86.54,417.69,86.22),e.curveTo(417.64,85.95,417.61,85.79,417.6,85.76),e.curveTo(414.03,68.13,410.49,48.84,399.79,31.47),e.curveTo(389.09,14.11,366.95,.59,341.75,.59),e.curveTo(286.97,.59,122.63,.57,67.85,.57),e.close(),e.moveTo(85.04,72.68),e.curveTo(80.63,72.68,45.33,72.68,40.92,72.68),e.curveTo(40.46,58.4,47.15,51.87,50.27,48.75),e.curveTo(55.8,44.28,59.84,41,73.82,41),e.curveTo(78.45,52.13,82.23,62.71,85.04,72.68),e.close(),e.moveTo(364.94,52.9),e.curveTo(370,61.11,373.9,76.44,377.38,93.51),e.curveTo(380.35,113.1,381.01,136.42,380.02,151.57),e.curveTo(377.97,182.76,369.51,207.12,360.1,233.1),e.curveTo(350.69,259.09,340.27,286.77,337.53,321.27),e.curveTo(336.38,335.86,336.72,346.69,338.87,364.01),e.curveTo(326.35,364.01,263.75,364.01,151.06,364.01),e.curveTo(151.06,382.2,151.06,392.31,151.06,394.33),e.curveTo(147.77,404.8,138.9,418.2,127.43,419.94),e.curveTo(111.49,422.35,97.86,411.8,94.75,399.19),e.curveTo(65.14,321.99,94.93,275.54,112.57,225.47),e.curveTo(130.14,177.95,137.92,117.41,112.71,42.09),e.curveTo(192.88,41.9,274.33,42.21,342.89,41.98),e.curveTo(357.15,42.03,359.83,44.61,364.94,52.9),e.close(),e.moveTo(409.96,399.48),e.curveTo(409.96,408.42,398.54,425.67,392.02,425.67),e.curveTo(325.19,425.79,252.29,425.67,185.23,425.67),e.curveTo(189.88,424.43,194.66,405.64,194.66,399.48),e.curveTo(237.72,399.48,388.43,399.48,409.96,399.48),e.close(),e.fill(),e.begin(),e.moveTo(182.1,131.2),e.lineTo(182.1,151.68),e.lineTo(321.89,151.68),e.lineTo(321.89,131.2),e.lineTo(182.1,131.2),e.close(),e.moveTo(162.25,251.09),e.lineTo(162.25,271.49),e.lineTo(301.96,271.49),e.lineTo(301.96,251.09),e.lineTo(162.25,251.09),e.close(),e.fill()}paintTableIcon(t){const e=this.newBpmnCanvas(t,{width:640,height:640});e.begin(),e.moveTo(.19,.1),e.lineTo(298.78,.1),e.lineTo(298.78,198.88),e.lineTo(.19,198.88),e.lineTo(.19,.1),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(0,0),e.lineTo(298.78,0),e.lineTo(298.78,48.88),e.lineTo(0,48.88),e.lineTo(0,0),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(0,48.88),e.lineTo(98.78,48.88),e.lineTo(98.78,198.88),e.lineTo(0,198.88),e.lineTo(0,48.88),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(1.09,122.69),e.lineTo(298.78,122.69),e.close(),e.fillAndStroke(),e.setFillColor(t.iconStyleConfig.strokeColor),e.begin(),e.moveTo(0,0),e.lineTo(298.78,0),e.lineTo(298.78,48.88),e.lineTo(0,48.88),e.lineTo(0,0),e.close(),e.fillAndStroke()}paintPentagon(t){const e=this.newBpmnCanvas(t,{width:16,height:16});e.begin(),e.moveTo(16,6.5),e.lineTo(8,0),e.lineTo(0,6.5),e.lineTo(3,16),e.lineTo(13,16),e.lineTo(16,6.5),e.lineTo(8,0),e.stroke()}}function Ie(n,t){t.begin(),t.moveTo(.38,0),t.lineTo(.62,0),t.lineTo(.62,1),t.lineTo(.38,1),t.close()}class Q{static get(){return this.instance}static set(t){this.instance=t}}p(Q,"instance",new K);class j extends l.mxEllipse{constructor(){super(void 0,void 0,void 0);p(this,"iconPainter",Q.get());p(this,"iconPainters",new Map([[y.MESSAGE,e=>this.iconPainter.paintEnvelopeIcon({...e,ratioFromParent:.5})],[y.TERMINATE,e=>this.iconPainter.paintCircleIcon({...e,ratioFromParent:.6})],[y.TIMER,e=>this.iconPainter.paintClockIcon({...e,setIconOriginFunct:s=>s.setIconOriginToShapeTopLeftProportionally(5)})],[y.SIGNAL,e=>this.iconPainter.paintTriangleIcon({...e,ratioFromParent:.55,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:m.STROKE_WIDTH_THIN.valueOf()},setIconOriginFunct:s=>s.setIconOriginToShapeTopLeftProportionally(4)})],[y.LINK,e=>this.iconPainter.paintRightArrowIcon({...e,ratioFromParent:.55,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:1.5}})],[y.ERROR,e=>this.iconPainter.paintErrorIcon({...e,ratioFromParent:.55,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:1.5}})],[y.COMPENSATION,e=>this.iconPainter.paintDoubleLeftArrowheadsIcon({...e,ratioFromParent:.7,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:1.5}})],[y.CANCEL,e=>this.iconPainter.paintXCrossIcon({...e,ratioFromParent:.78})],[y.ESCALATION,e=>this.iconPainter.paintUpArrowheadIcon({...e,ratioFromParent:.55,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:m.STROKE_WIDTH_THIN.valueOf()}})],[y.CONDITIONAL,e=>this.iconPainter.paintListIcon({...e,ratioFromParent:.6,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:1.5}})]]));p(this,"withFilledIcon",!1)}paintVertexShape(e,s,i,o,r){const a=J({canvas:e,x:s,y:i,width:o,height:r,shape:this,isFilled:this.withFilledIcon});j.setDashedOuterShapePattern(a,x.getBpmnIsInterrupting(this.style)),this.paintOuterShape(a),j.restoreOriginalOuterShapePattern(a),this.paintInnerShape(a)}paintOuterShape({canvas:e,shapeConfig:{x:s,y:i,width:o,height:r}}){super.paintVertexShape(e,s,i,o,r)}paintInnerShape(e){(this.iconPainters.get(x.getBpmnEventDefinitionKind(this.style))||(()=>this.iconPainter.paintEmptyIcon()))(e)}static setDashedOuterShapePattern(e,s){e.canvas.save(),s==="false"&&(e.canvas.setDashed(!0,!1),e.canvas.setDashPattern("3 2"))}static restoreOriginalOuterShapePattern(e){e.canvas.restore()}}class Jt extends j{constructor(){super(),this.withFilledIcon=!0}}class _e extends j{paintOuterShape({canvas:t,shapeConfig:{x:e,y:s,width:i,height:o,strokeWidth:r}}){t.ellipse(e,s,i,o),t.fillAndStroke();const a=r*1.5;t.ellipse(i*.02+a+e,o*.02+a+s,i*.96-2*a,o*.96-2*a),t.stroke()}}class Qt extends _e{constructor(){super(),this.withFilledIcon=!0}}class ue extends l.mxRhombus{constructor(){super(...arguments);p(this,"iconPainter",Q.get())}paintVertexShape(e,s,i,o,r){const a=J({canvas:e,x:s,y:i,width:o,height:r,shape:this});this.paintOuterShape(a),this.paintInnerShape(a)}paintOuterShape({canvas:e,shapeConfig:{x:s,y:i,width:o,height:r}}){super.paintVertexShape(e,s,i,o,r)}}class en extends ue{paintInnerShape(t){this.iconPainter.paintXCrossIcon({...t,iconStyleConfig:{...t.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class tn extends ue{paintInnerShape(t){this.iconPainter.paintPlusCrossIcon({...t,iconStyleConfig:{...t.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class nn extends ue{paintInnerShape(t){this.iconPainter.paintCircleIcon({...t,ratioFromParent:.62,iconStyleConfig:{...t.iconStyleConfig,isFilled:!1,strokeWidth:m.STROKE_WIDTH_THICK.valueOf()}})}}class sn extends ue{paintInnerShape(t){this.iconPainter.paintAsteriskIcon({...t,iconStyleConfig:{...t.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class on extends ue{paintInnerShape(t){t={...t,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:1}},this.iconPainter.paintCircleIcon({...t,ratioFromParent:.55}),x.getBpmnIsInstantiating(this.style)||this.iconPainter.paintCircleIcon({...t,ratioFromParent:.45});const e={...t,ratioFromParent:.3};x.getBpmnIsParallelEventBasedGateway(this.style)?this.iconPainter.paintPlusCrossIcon(e):this.iconPainter.paintPentagon(e)}}const rn=[_.LOOP,_.MULTI_INSTANCE_PARALLEL,_.MULTI_INSTANCE_SEQUENTIAL,_.COMPENSATION,_.EXPAND,_.ADHOC];function an(n){const t=rn.filter(e=>n.includes(e));return n.filter(e=>!t.includes(e)).forEach(e=>t.push(e)),t}function Et(n,t){Q.get().paintEnvelopeIcon({...n,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeft(),ratioFromParent:.2,iconStyleConfig:{...n.iconStyleConfig,isFilled:t}})}class Ge extends l.mxRectangleShape{constructor(){super(void 0,void 0,void 0);p(this,"iconPainter",Q.get());this.isRounded=!0}paintForeground(e,s,i,o,r){super.paintForeground(e,s,i,o,r),this.paintMarkerIcons(J({canvas:e,x:s,y:i,width:o,height:r,shape:this,ratioFromParent:0,iconStrokeWidth:1.5}))}paintMarkerIcons(e){const s=x.getBpmnMarkers(this.style);s&&an(s.split(",")).forEach((i,o,r)=>{switch(e={...e,setIconOriginFunct:this.getMarkerIconOriginFunction(r.length,o+1)},e.canvas.save(),i){case _.LOOP:this.iconPainter.paintLoopIcon(e);break;case _.MULTI_INSTANCE_SEQUENTIAL:this.iconPainter.paintSequentialMultiInstanceIcon(e);break;case _.MULTI_INSTANCE_PARALLEL:this.iconPainter.paintParallelMultiInstanceIcon(e);break;case _.EXPAND:this.iconPainter.paintExpandIcon(e);break}e.canvas.restore()})}getMarkerIconOriginFunction(e,s){let i;return e===1?i=o=>o.setIconOriginForIconBottomCentered():i=o=>{o.setIconOriginForIconBottomCentered();const r=Math.pow(-1,s)*(m.SHAPE_ACTIVITY_MARKER_ICON_SIZE/2+m.SHAPE_ACTIVITY_MARKER_ICON_MARGIN);o.translateIconOrigin(r,0)},i}}class W extends Ge{paintForeground(t,e,s,i,o){super.paintForeground(t,e,s,i,o),this.paintTaskIcon(J({canvas:t,x:e,y:s,width:i,height:o,shape:this}))}}class ln extends W{paintTaskIcon(t){this.iconPainter.paintEmptyIcon()}}class cn extends W{paintTaskIcon(t){this.iconPainter.paintGearIcon({...t,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeftProportionally(20)})}}class un extends W{paintTaskIcon(t){this.iconPainter.paintPersonIcon({...t,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeftProportionally(20)})}}class dn extends W{paintTaskIcon(t){if(!x.getBpmnIsInstantiating(this.style)){Et(t,!1);return}const e=4,s=4,i={...t.shapeConfig,width:20,height:20};this.iconPainter.paintCircleIcon({canvas:t.canvas,shapeConfig:i,iconStyleConfig:{...t.iconStyleConfig,isFilled:!1},ratioFromParent:void 0,setIconOriginFunct:o=>o.setIconOriginToShapeTopLeft(s,e)}),i.x+=e,i.y+=s,this.iconPainter.paintEnvelopeIcon({...t,shapeConfig:i,ratioFromParent:.65,setIconOriginFunct:o=>o.setIconOriginForIconCentered()})}}class hn extends W{paintTaskIcon(t){Et(t,!0)}}class fn extends W{paintTaskIcon(t){this.iconPainter.paintHandIcon({...t,ratioFromParent:.18,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeftProportionally(20)})}}class gn extends W{paintTaskIcon(t){this.iconPainter.paintScriptIcon({...t,ratioFromParent:.22,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeftProportionally(20)})}}class Tn extends Ge{paintForeground(t,e,s,i,o){super.paintForeground(t,e,s,i,o);const r=J({canvas:t,x:e,y:s,width:i,height:o,shape:this});switch(x.getBpmnGlobalTaskKind(this.style)){case h.GLOBAL_TASK_MANUAL:this.iconPainter.paintHandIcon({...r,ratioFromParent:.18,setIconOriginFunct:a=>a.setIconOriginToShapeTopLeftProportionally(20)});break;case h.GLOBAL_TASK_SCRIPT:this.iconPainter.paintScriptIcon({...r,ratioFromParent:.22,setIconOriginFunct:a=>a.setIconOriginToShapeTopLeftProportionally(20)});break;case h.GLOBAL_TASK_USER:this.iconPainter.paintPersonIcon({...r,setIconOriginFunct:a=>a.setIconOriginToShapeTopLeftProportionally(20)});break;case h.GLOBAL_TASK_BUSINESS_RULE:this.iconPainter.paintTableIcon({...r,ratioFromParent:.6,setIconOriginFunct:a=>a.setIconOriginToShapeTopLeftProportionally(15)});break;case h.GLOBAL_TASK:default:this.iconPainter.paintEmptyIcon()}}}class pn extends Ge{paintBackground(t,e,s,i,o){const r=x.getBpmnSubProcessKind(this.style);t.save(),r===fe.EVENT&&(t.setDashed(!0,!1),t.setDashPattern("1 2")),super.paintBackground(t,e,s,i,o),t.restore()}}class En extends W{paintTaskIcon(t){this.iconPainter.paintTableIcon({...t,ratioFromParent:.6,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeftProportionally(15)})}}class mn extends l.mxRectangleShape{paintForeground(t,e,s,i,o){t.begin(),t.moveTo(e+m.TEXT_ANNOTATION_BORDER_LENGTH,s),t.lineTo(e,s),t.lineTo(e,s+o),t.lineTo(e+m.TEXT_ANNOTATION_BORDER_LENGTH,s+o),t.stroke()}paintBackground(t,e,s,i,o){t.save(),t.setStrokeColor("none"),super.paintBackground(t,e,s,i,o),t.restore()}}class Cn extends l.mxRectangleShape{constructor(e,s,i,o){super(e,s,i,o);p(this,"iconPainter",Q.get())}paintVertexShape(e,s,i,o,r){const a=x.getBpmnIsInitiating(this.style)===q.NON_INITIATING,c=J({canvas:e,x:s,y:i,width:o,height:r,shape:this,ratioFromParent:1,isFilled:a});this.iconPainter.paintEnvelopeIcon(c)}}function Sn(n,t){return In(n.style,t)}function In(n,t){const e=[],s=n.split(";"),o=s[0].replace(/shape=bpmn./g,""),r=new Map;return r.set("bpmn-type-activity",I.isActivity(o)),r.set("bpmn-type-container",I.isPoolOrLane(o)),r.set("bpmn-type-event",I.isEvent(o)),r.set("bpmn-type-flow",An(o)),r.set("bpmn-type-gateway",I.isGateway(o)),r.set("bpmn-type-task",I.isTask(o)),[...r].filter(([,a])=>a).forEach(([a])=>e.push(a)),e.push(ye(o)),s.map(a=>{const c=a.split("=");return[c[0],c[1]]}).forEach(([a,c])=>{switch(a){case E.EVENT_DEFINITION_KIND:e.push(`bpmn-event-def-${c}`);break;case E.EVENT_BASED_GATEWAY_KIND:e.push(`bpmn-gateway-kind-${c.toLowerCase()}`);break;case E.IS_INITIATING:e.push(c==q.NON_INITIATING?"bpmn-icon-non-initiating":"bpmn-icon-initiating");break;case E.SUB_PROCESS_KIND:e.push(`bpmn-sub-process-${c.toLowerCase()}`);break;case E.GLOBAL_TASK_KIND:e.push(ye(c));break}}),t&&e.push("bpmn-label"),e}function An(n){return Object.values(M).map(t=>t).includes(n)}function ye(n){return n?"bpmn-"+n.replace(/([A-Z])/g,t=>"-"+t[0].toLowerCase()):""}class mt extends l.mxCellOverlay{constructor(e,s){super(null,"",s.position.horizontalAlign,s.position.verticalAlign,null,"default");p(this,"style");this.label=e,this.style=s.style}getBounds(e){const s=e.view.graph.getModel().isEdge(e.cell),i=e.view.scale;let o;const r=0,a=0;return s?o=this.computeEdgeBounds(e):(o=new l.mxPoint,this.align==l.mxConstants.ALIGN_LEFT?o.x=e.x:this.align==l.mxConstants.ALIGN_CENTER?o.x=e.x+e.width/2:o.x=e.x+e.width,this.verticalAlign==l.mxConstants.ALIGN_TOP?o.y=e.y:this.verticalAlign==l.mxConstants.ALIGN_MIDDLE?o.y=e.y+e.height/2:o.y=e.y+e.height),new l.mxRectangle(Math.round(o.x-(r*this.defaultOverlap-this.offset.x)*i),Math.round(o.y-(a*this.defaultOverlap-this.offset.y)*i),r*i,a*i)}computeEdgeBounds(e){const s=e.absolutePoints;if(this.align==l.mxConstants.ALIGN_LEFT)return s[0];if(this.align==l.mxConstants.ALIGN_CENTER){if(s.length%2==1)return s[Math.floor(s.length/2)];{const i=s.length/2,o=s[i-1],r=s[i];return new l.mxPoint(o.x+(r.x-o.x)/2,o.y+(r.y-o.y)/2)}}else return s[s.length-1]}}class Qe extends l.mxText{constructor(t,e,s){super(t,e,void 0,void 0,s.font.color,void 0,s.font.size,void 0,void 0,void 0,void 0,void 0,void 0,void 0,s.fill.color,s.stroke.color),this.fillOpacity=s.fill.opacity,this.strokewidth=s.stroke.width}}class Nn extends l.mxConnector{constructor(t,e,s){super(t,e,s)}paintEdgeShape(t,e){const s=this.createMarker(t,e,!0),i=this.createMarker(t,e,!1);this.paintEdgeLine(t,e),t.setShadow(!1),t.setDashed(!1,!1),s!=null&&(t.setFillColor(l.mxUtils.getValue(this.style,E.EDGE_START_FILL_COLOR,this.stroke)),s()),i!=null&&(t.setFillColor(l.mxUtils.getValue(this.style,E.EDGE_END_FILL_COLOR,this.stroke)),i())}paintEdgeLine(t,e){const s=Ln(t);et(t,"stroke"),this.paintLine(t,e,this.isRounded),et(t,s)}}function Ln(n){return n instanceof l.mxSvgCanvas2D?n.pointerEventsValue:null}function et(n,t){n instanceof l.mxSvgCanvas2D&&(n.pointerEventsValue=t)}class vn{configureShapes(){this.initMxSvgCanvasPrototype(),this.initMxShapePrototype(),this.registerShapes(),this.initMxCellRendererCreateCellOverlays()}registerShapes(){l.mxCellRenderer.registerShape(h.EVENT_END,Jt),l.mxCellRenderer.registerShape(h.EVENT_START,j),l.mxCellRenderer.registerShape(h.EVENT_INTERMEDIATE_THROW,Qt),l.mxCellRenderer.registerShape(h.EVENT_INTERMEDIATE_CATCH,_e),l.mxCellRenderer.registerShape(h.EVENT_BOUNDARY,_e),l.mxCellRenderer.registerShape(h.GATEWAY_COMPLEX,sn),l.mxCellRenderer.registerShape(h.GATEWAY_EVENT_BASED,on),l.mxCellRenderer.registerShape(h.GATEWAY_EXCLUSIVE,en),l.mxCellRenderer.registerShape(h.GATEWAY_INCLUSIVE,nn),l.mxCellRenderer.registerShape(h.GATEWAY_PARALLEL,tn),l.mxCellRenderer.registerShape(h.SUB_PROCESS,pn),l.mxCellRenderer.registerShape(h.CALL_ACTIVITY,Tn),l.mxCellRenderer.registerShape(h.TASK,ln),l.mxCellRenderer.registerShape(h.TASK_SERVICE,cn),l.mxCellRenderer.registerShape(h.TASK_USER,un),l.mxCellRenderer.registerShape(h.TASK_RECEIVE,dn),l.mxCellRenderer.registerShape(h.TASK_SEND,hn),l.mxCellRenderer.registerShape(h.TASK_MANUAL,fn),l.mxCellRenderer.registerShape(h.TASK_SCRIPT,gn),l.mxCellRenderer.registerShape(h.TASK_BUSINESS_RULE,En),l.mxCellRenderer.registerShape(h.TEXT_ANNOTATION,mn),l.mxCellRenderer.registerShape(E.EDGE,Nn),l.mxCellRenderer.registerShape(E.MESSAGE_FLOW_ICON,Cn)}initMxSvgCanvasPrototype(){l.mxSvgCanvas2D.prototype.getTextCss=function(){const t=this.state,e=l.mxConstants.ABSOLUTE_LINE_HEIGHT?t.fontSize*l.mxConstants.LINE_HEIGHT+"px":l.mxConstants.LINE_HEIGHT*this.lineHeightCorrection;let s="display: inline-block; font-size: "+t.fontSize+"px; font-family: "+t.fontFamily+"; color: "+t.fontColor+"; line-height: "+e+"; pointer-events: none; ";(t.fontStyle&l.mxConstants.FONT_BOLD)==l.mxConstants.FONT_BOLD&&(s+="font-weight: bold; "),(t.fontStyle&l.mxConstants.FONT_ITALIC)==l.mxConstants.FONT_ITALIC&&(s+="font-style: italic; ");const i=[];return(t.fontStyle&l.mxConstants.FONT_UNDERLINE)==l.mxConstants.FONT_UNDERLINE&&i.push("underline"),(t.fontStyle&l.mxConstants.FONT_STRIKETHROUGH)==l.mxConstants.FONT_STRIKETHROUGH&&i.push("line-through"),i.length>0&&(s+="text-decoration: "+i.join(" ")+"; "),s}}initMxShapePrototype(){l.mxShape.prototype.createSvgCanvas=function(){const t=new l.mxSvgCanvas2D(this.node,!1);t.strokeTolerance=this.pointerEvents?this.svgStrokeTolerance:0,t.pointerEventsValue=this.svgPointerEvents;const e=this.getSvgScreenOffset();if(e!=0?this.node.setAttribute("transform","translate("+e+","+e+")"):this.node.removeAttribute("transform"),this.state&&this.state.cell){const s=this.state.cell;let i=Sn(s,this.dialect===l.mxConstants.DIALECT_STRICTHTML);const o=this.state.style[E.EXTRA_CSS_CLASSES];o&&(i=i.concat(o)),this.node.setAttribute("class",i.join(" ")),this.node.setAttribute("data-bpmn-id",this.state.cell.id)}return t.minStrokeWidth=this.minSvgStrokeWidth,this.antiAlias||(t.format=function(s){return Math.round(parseFloat(s))}),t}}initMxCellRendererCreateCellOverlays(){l.mxCellRenderer.prototype.createCellOverlays=function(t){const s=t.view.graph.getCellOverlays(t.cell);let i=null;if(s!=null){i=new l.mxDictionary;for(const o of s){const r=t.overlays!=null?t.overlays.remove(o):null;if(r!=null){i.put(o,r);continue}let a;o instanceof mt?a=new Qe(o.label,new l.mxRectangle(0,0,0,0),o.style):(a=new l.mxImageShape(new l.mxRectangle(0,0,0,0),o.image.src),a.preserveImageAspect=!1),a.dialect=t.view.graph.dialect,a.overlay=o,this.initializeOverlay(t,a),this.installCellOverlayListeners(t,o,a),o.cursor!=null&&(a.node.style.cursor=o.cursor),a instanceof Qe&&(a.node.classList.add("overlay-badge"),a.node.setAttribute("data-bpmn-id",t.cell.id)),i.put(o,a)}}t.overlays!=null&&t.overlays.visit(function(o,r){r.destroy()}),t.overlays=i}}}class On{configureMarkers(){this.registerArrowDashMarker()}registerArrowDashMarker(){const t=(e,s,i,o,r,a,c,u,f)=>{const d=r*(c+f+4),T=a*(c+f+4);return function(){e.begin(),e.moveTo(o.x-d/2-T/2,o.y-T/2+d/2),e.lineTo(o.x+T/2-3*d/2,o.y-3*T/2-d/2),e.stroke()}};l.mxMarker.addMarker(Be.ARROW_DASH,t)}}function tt(n,t,e,s){let i=n??s;return i=Math.min(Math.max(i,t),e),i}function _n(n){return Math.max(n||0,0)}function yn(n){const t=n??{};return t.debounceDelay=tt(t.debounceDelay,0,100,50),t.throttleDelay=tt(t.throttleDelay,0,100,50),t}var bn="Expected a function",nt=0/0,wn="[object Symbol]",Rn=/^\s+|\s+$/g,xn=/^[-+]0x[0-9a-f]+$/i,Fn=/^0b[01]+$/i,Pn=/^0o[0-7]+$/i,Mn=parseInt,kn=typeof Y=="object"&&Y&&Y.Object===Object&&Y,Bn=typeof self=="object"&&self&&self.Object===Object&&self,Gn=kn||Bn||Function("return this")(),Vn=Object.prototype,Yn=Vn.toString,Un=Math.max,Wn=Math.min,Ae=function(){return Gn.Date.now()};function Hn(n,t,e){var s,i,o,r,a,c,u=0,f=!1,d=!1,T=!0;if(typeof n!="function")throw new TypeError(bn);t=st(t)||0,be(e)&&(f=!!e.leading,d="maxWait"in e,o=d?Un(st(e.maxWait)||0,t):o,T="trailing"in e?!!e.trailing:T);function g(C){var O=s,F=i;return s=i=void 0,u=C,r=n.apply(F,O),r}function A(C){return u=C,a=setTimeout(k,t),f?g(C):r}function b(C){var O=C-c,F=C-u,ne=t-O;return d?Wn(ne,o-F):ne}function P(C){var O=C-c,F=C-u;return c===void 0||O>=t||O<0||d&&F>=o}function k(){var C=Ae();if(P(C))return te(C);a=setTimeout(k,b(C))}function te(C){return a=void 0,T&&s?g(C):(s=i=void 0,r)}function me(){a!==void 0&&clearTimeout(a),u=0,s=c=i=a=void 0}function Ce(){return a===void 0?r:te(Ae())}function H(){var C=Ae(),O=P(C);if(s=arguments,i=this,c=C,O){if(a===void 0)return A(c);if(d)return a=setTimeout(k,t),g(c)}return a===void 0&&(a=setTimeout(k,t)),r}return H.cancel=me,H.flush=Ce,H}function be(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function Kn(n){return!!n&&typeof n=="object"}function Dn(n){return typeof n=="symbol"||Kn(n)&&Yn.call(n)==wn}function st(n){if(typeof n=="number")return n;if(Dn(n))return nt;if(be(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=be(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(Rn,"");var e=Fn.test(n);return e||Pn.test(n)?Mn(n.slice(2),e?2:8):xn.test(n)?nt:+n}var zn=Hn,Ct="Expected a function",it=0/0,$n="[object Symbol]",Xn=/^\s+|\s+$/g,Zn=/^[-+]0x[0-9a-f]+$/i,jn=/^0b[01]+$/i,qn=/^0o[0-7]+$/i,Jn=parseInt,Qn=typeof Y=="object"&&Y&&Y.Object===Object&&Y,es=typeof self=="object"&&self&&self.Object===Object&&self,ts=Qn||es||Function("return this")(),ns=Object.prototype,ss=ns.toString,is=Math.max,os=Math.min,Ne=function(){return ts.Date.now()};function rs(n,t,e){var s,i,o,r,a,c,u=0,f=!1,d=!1,T=!0;if(typeof n!="function")throw new TypeError(Ct);t=ot(t)||0,ge(e)&&(f=!!e.leading,d="maxWait"in e,o=d?is(ot(e.maxWait)||0,t):o,T="trailing"in e?!!e.trailing:T);function g(C){var O=s,F=i;return s=i=void 0,u=C,r=n.apply(F,O),r}function A(C){return u=C,a=setTimeout(k,t),f?g(C):r}function b(C){var O=C-c,F=C-u,ne=t-O;return d?os(ne,o-F):ne}function P(C){var O=C-c,F=C-u;return c===void 0||O>=t||O<0||d&&F>=o}function k(){var C=Ne();if(P(C))return te(C);a=setTimeout(k,b(C))}function te(C){return a=void 0,T&&s?g(C):(s=i=void 0,r)}function me(){a!==void 0&&clearTimeout(a),u=0,s=c=i=a=void 0}function Ce(){return a===void 0?r:te(Ne())}function H(){var C=Ne(),O=P(C);if(s=arguments,i=this,c=C,O){if(a===void 0)return A(c);if(d)return a=setTimeout(k,t),g(c)}return a===void 0&&(a=setTimeout(k,t)),r}return H.cancel=me,H.flush=Ce,H}function as(n,t,e){var s=!0,i=!0;if(typeof n!="function")throw new TypeError(Ct);return ge(e)&&(s="leading"in e?!!e.leading:s,i="trailing"in e?!!e.trailing:i),rs(n,t,{leading:s,maxWait:t,trailing:i})}function ge(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function ls(n){return!!n&&typeof n=="object"}function cs(n){return typeof n=="symbol"||ls(n)&&ss.call(n)==$n}function ot(n){if(typeof n=="number")return n;if(cs(n))return it;if(ge(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=ge(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(Xn,"");var e=jn.test(n);return e||qn.test(n)?Jn(n.slice(2),e?2:8):Zn.test(n)?it:+n}var us=as;const we=1.25,ds=1/we;class hs extends l.mxGraph{constructor(e){super(e);p(this,"currentZoomLevel",1);this.zoomFactor=we,this.container&&(this.container.style.cursor="default")}createGraphView(){return new fs(this)}fit(e,s,i,o,r,a,c){const u=super.fit(e,s,i,o,r,a,c);return this.setCurrentZoomLevel(u),u}setCurrentZoomLevel(e){this.currentZoomLevel=e??this.view.scale}zoomActual(){super.zoomActual(),this.setCurrentZoomLevel()}zoomIn(){super.zoomIn(),this.setCurrentZoomLevel()}zoomOut(){super.zoomOut(),this.setCurrentZoomLevel()}customFit(e){this.zoomActual();const s=e==null?void 0:e.type;if(s==null||s==oe.None)return;const i=_n(e==null?void 0:e.margin);if(s!=oe.Center){let o=!1,r=!1;switch(s){case oe.Horizontal:r=!0;break;case oe.Vertical:o=!0;break}this.fit(this.border,!1,i,!0,o,r)}else{const r=this.getGraphBounds(),a=this.container.clientWidth-i,c=this.container.clientHeight-i,u=r.width/this.view.scale,f=r.height/this.view.scale,d=Math.min(3,Math.min(a/u,c/f));this.setCurrentZoomLevel(d),this.view.scaleAndTranslate(d,(i+a-u*d)/(2*d)-r.x/this.view.scale,(i+c-f*d)/(2*d)-r.y/this.view.scale)}}registerMouseWheelZoomListeners(e){e=yn(e),l.mxEvent.addMouseWheelListener(zn(this.createMouseWheelZoomListener(!0),e.debounceDelay),this.container),l.mxEvent.addMouseWheelListener(us(this.createMouseWheelZoomListener(!1),e.throttleDelay),this.container)}manageMouseWheelZoomEvent(e,s,i){if(!i)this.currentZoomLevel*=e?we:ds;else{const[o,r]=this.getEventRelativeCoordinates(s),[a,c,u]=this.getScaleAndTranslationDeltas(o,r);this.view.scaleAndTranslate(a,this.view.translate.x+c,this.view.translate.y+u),l.mxEvent.consume(s)}}createMouseWheelZoomListener(e){return(s,i)=>{if(l.mxEvent.isConsumed(s))return;const o=s;o.ctrlKey&&!o.altKey&&!o.shiftKey&&!o.metaKey&&this.manageMouseWheelZoomEvent(i,o,e)}}getEventRelativeCoordinates(e){const s=this.container.getBoundingClientRect(),i=e.clientX-s.left,o=e.clientY-s.top;return[i,o]}getScaleAndTranslationDeltas(e,s){const[i,o]=this.calculateFactorAndScale(),[r,a]=this.calculateTranslationDeltas(i,o,e*2,s*2);return[o,r,a]}calculateTranslationDeltas(e,s,i,o){if(e>1){const r=(e-1)/(s*2);i*=-r,o*=-r}else{const r=(1/e-1)/(this.view.scale*2);i*=r,o*=r}return[i,o]}calculateFactorAndScale(){const e=Math.round(this.currentZoomLevel*100)/100;return[e/this.view.scale,e]}}class fs extends l.mxGraphView{getFloatingTerminalPoint(t,e,s,i){if(t.absolutePoints.filter(Boolean).length<2)return super.getFloatingTerminalPoint(t,e,s,i);const a=t.absolutePoints;return i?a[1]:a[a.length-2]}}class gs{constructor(t){p(this,"graph");this.container=t,this.graph=new hs(t)}configure(t){return this.configureGraph(),this.configureNavigationSupport(t),new pt(this.graph).configureStyles(),new vn().configureShapes(),new On().configureMarkers(),this.graph}configureGraph(){this.graph.setCellsLocked(!0),this.graph.setCellsSelectable(!1),this.graph.setEdgeLabelsMovable(!1),this.graph.setHtmlLabels(!0),this.graph.setConstrainChildren(!1),this.graph.setExtendParents(!1),this.graph.foldingEnabled=!1}configureNavigationSupport(t){var s;const e=this.graph.panningHandler;(s=t==null?void 0:t.navigation)!=null&&s.enabled?(e.addListener(l.mxEvent.PAN_START,this.getPanningHandler("grab")),e.addListener(l.mxEvent.PAN_END,this.getPanningHandler("default")),this.graph.panningHandler.usePopupTrigger=!1,e.isForcePanningEvent=i=>l.mxEvent.isLeftMouseButton(i.getEvent())||l.mxEvent.isMultiTouchEvent(i.getEvent()),this.graph.setPanning(!0),this.graph.registerMouseWheelZoomListeners(t.navigation.zoom)):(this.graph.setPanning(!1),e.setPinchEnabled(!1),e.isForcePanningEvent=i=>!1)}getPanningHandler(t){return()=>{this.graph.isEnabled()&&(this.container.style.cursor=t)}}}class Ve{constructor(t,e,s,i,o){this.id=t,this.name=e,this.kind=s,this.sourceRefId=i,this.targetRefId=o}}class St extends Ve{constructor(t,e,s,i,o=B.NORMAL){super(t,e,M.SEQUENCE_FLOW,s,i),this.sequenceFlowKind=o}}class It extends Ve{constructor(t,e,s,i){super(t,e,M.MESSAGE_FLOW,s,i)}}class At extends Ve{constructor(t,e,s,i,o=X.NONE){super(t,e,M.ASSOCIATION_FLOW,s,i),this.associationDirectionKind=o}}class Ts{constructor(t){this.graph=t}computeRelativeCoordinates(t,e){const s=this.getTranslateForRoot(t),i=e.x+s.x,o=e.y+s.y;return new l.mxPoint(i,o)}getTranslateForRoot(t){const e=this.graph.getModel(),s=new l.mxPoint(0,0);for(;t!=null;){const i=e.getGeometry(t);i!=null&&(s.x-=i.x,s.y-=i.y),t=e.getParent(t)}return s}computeEdgeCenter(t){const e=t.geometry.points,s=e[0],i=e[e.length-1];if(s!=null&&i!=null){const o=i.x-s.x,r=i.y-s.y;return new l.mxPoint(s.x+o/2,s.y+r/2)}}}class he{constructor(t,e,s,i,o){this.id=t,this.bpmnElement=e,this.bounds=s,this.label=i,this.isHorizontal=o}}class G{constructor(t,e,s,i,o=!1){this.id=t,this.name=e,this.kind=s,this.parentId=i,this.instantiate=o}}class Ee extends G{constructor(t,e,s,i,o,r=[]){super(t,e,s,i,o),this.markers=r}}class le extends Ee{constructor(t,e,s,i,o,r){super(t,e,h.CALL_ACTIVITY,i,void 0,o),this.callActivityKind=s,this.globalTaskKind=r}}class Te extends Ee{constructor(t,e,s,i,o){super(t,e,h.SUB_PROCESS,i,void 0,o),this.subProcessKind=s}}class ce extends G{constructor(t,e,s,i,o){super(t,e,s,o),this.eventDefinitionKind=i}}class Nt extends ce{constructor(t,e,s,i,o){super(t,e,h.EVENT_START,s,i),this.isInterrupting=o}}class Lt extends ce{constructor(t,e,s,i,o=!0){super(t,e,h.EVENT_BOUNDARY,s,i),this.isInterrupting=o}}class vt extends G{constructor(t,e,s,i,o=ae.None){super(t,e,h.GATEWAY_EVENT_BASED,s,i),this.gatewayKind=o}}class D{computeStyle(t,e){const s=[t.bpmnElement.kind];let i;t instanceof he?i=D.computeShapeStyle(t):(s.push(...D.computeEdgeStyle(t)),i=new Map);const o=D.computeFontStyleValues(t),r=D.computeLabelStyleValues(t,e);return[].concat([...s]).concat([...i,...o,...r].filter(([,a])=>a&&a!="undefined").map(([a,c])=>a+"="+c)).join(";")}static computeShapeStyle(t){const e=new Map,s=t.bpmnElement;return s instanceof ce?this.computeEventShapeStyle(s,e):s instanceof Ee?this.computeActivityShapeStyle(s,e):I.isPoolOrLane(s.kind)?e.set(l.mxConstants.STYLE_HORIZONTAL,t.isHorizontal?"0":"1"):s instanceof vt&&(e.set(E.IS_INSTANTIATING,String(s.instantiate)),e.set(E.EVENT_BASED_GATEWAY_KIND,String(s.gatewayKind))),e}static computeEventShapeStyle(t,e){e.set(E.EVENT_DEFINITION_KIND,t.eventDefinitionKind),(t instanceof Lt||t instanceof Nt&&t.isInterrupting!==void 0)&&e.set(E.IS_INTERRUPTING,String(t.isInterrupting))}static computeActivityShapeStyle(t,e){t instanceof Te?e.set(E.SUB_PROCESS_KIND,t.subProcessKind):t.kind===h.TASK_RECEIVE?e.set(E.IS_INSTANTIATING,String(t.instantiate)):t instanceof le&&e.set(E.GLOBAL_TASK_KIND,t.globalTaskKind);const s=t.markers;s.length>0&&e.set(E.MARKERS,s.join(","))}static computeEdgeStyle(t){const e=[],s=t.bpmnElement;return s instanceof St&&e.push(s.sequenceFlowKind),s instanceof At&&e.push(s.associationDirectionKind),e}static computeFontStyleValues(t){var i;const e=new Map,s=(i=t.label)==null?void 0:i.font;return s&&(e.set(l.mxConstants.STYLE_FONTFAMILY,s.name),e.set(l.mxConstants.STYLE_FONTSIZE,s.size),e.set(l.mxConstants.STYLE_FONTSTYLE,D.getFontStyleValue(s))),e}static computeLabelStyleValues(t,e){const s=new Map,i=t.bpmnElement;return e?(s.set(l.mxConstants.STYLE_VERTICAL_ALIGN,l.mxConstants.ALIGN_TOP),t.bpmnElement.kind!=h.TEXT_ANNOTATION&&s.set(l.mxConstants.STYLE_ALIGN,l.mxConstants.ALIGN_CENTER),t instanceof he&&(s.set(l.mxConstants.STYLE_LABEL_WIDTH,e.width+1),s.set(l.mxConstants.STYLE_LABEL_POSITION,l.mxConstants.ALIGN_TOP),s.set(l.mxConstants.STYLE_VERTICAL_LABEL_POSITION,l.mxConstants.ALIGN_LEFT))):t instanceof he&&(i instanceof Te||i instanceof le&&i.callActivityKind===re.CALLING_PROCESS)&&!i.markers.includes(_.EXPAND)&&s.set(l.mxConstants.STYLE_VERTICAL_ALIGN,l.mxConstants.ALIGN_TOP),s}computeMessageFlowIconStyle(t){return`shape=${E.MESSAGE_FLOW_ICON};${E.IS_INITIATING}=${t.messageVisibleKind}`}static getFontStyleValue(t){let e=0;return t.isBold&&(e+=l.mxConstants.FONT_BOLD),t.isItalic&&(e+=l.mxConstants.FONT_ITALIC),t.isStrikeThrough&&(e+=l.mxConstants.FONT_STRIKETHROUGH),t.isUnderline&&(e+=l.mxConstants.FONT_UNDERLINE),e}}class ps{constructor(t,e,s){this.graph=t,this.coordinatesTranslator=e,this.styleComputer=s}render(t,e){this.insertShapesAndEdges(t),this.graph.customFit(e)}insertShapesAndEdges({pools:t,lanes:e,subprocesses:s,otherFlowNodes:i,boundaryEvents:o,edges:r}){const a=this.graph.getModel();a.clear(),a.beginUpdate();try{this.insertShapes(t),this.insertShapes(e),this.insertShapes(s),this.insertShapes(i),this.insertShapes(o),this.insertEdges(r)}finally{a.endUpdate()}}insertShapes(t){t.forEach(e=>this.insertShape(e))}getParent(t){return this.getCell(t.parentId)??this.graph.getDefaultParent()}insertShape(t){var a;const e=t.bpmnElement,s=this.getParent(e),i=t.bounds;let o=(a=t.label)==null?void 0:a.bounds;o=I.isPoolOrLane(e.kind)?void 0:o;const r=this.styleComputer.computeStyle(t,o);this.insertVertex(s,e.id,e.name,i,o,r)}insertEdges(t){t.forEach(e=>{var f;const s=e.bpmnElement,i=this.graph.getDefaultParent(),o=this.getCell(s.sourceRefId),r=this.getCell(s.targetRefId),a=(f=e.label)==null?void 0:f.bounds,c=this.styleComputer.computeStyle(e,a),u=this.graph.insertEdge(i,s.id,s.name,o,r,c);if(this.insertWaypoints(e.waypoints,u),a){u.geometry.width=a.width,u.geometry.height=a.height;const d=this.coordinatesTranslator.computeEdgeCenter(u);if(d){u.geometry.relative=!1;const T=this.coordinatesTranslator.computeRelativeCoordinates(u.parent,new l.mxPoint(a.x,a.y)),g=T.x+a.width/2-d.x,A=T.y-d.y;u.geometry.offset=new l.mxPoint(g,A)}}this.insertMessageFlowIconIfNeeded(e,u)})}insertMessageFlowIconIfNeeded(t,e){if(t.bpmnElement instanceof It&&t.messageVisibleKind!==q.NONE){const s=this.graph.insertVertex(e,Ot(e.id),void 0,0,0,20,14,this.styleComputer.computeMessageFlowIconStyle(t));s.geometry.relative=!0,s.geometry.offset=new l.mxPoint(-10,-7)}}insertWaypoints(t,e){t&&(e.geometry.points=t.map(s=>this.coordinatesTranslator.computeRelativeCoordinates(e.parent,new l.mxPoint(s.x,s.y))))}getCell(t){return this.graph.getModel().getCell(t)}insertVertex(t,e,s,i,o,r){const a=this.coordinatesTranslator.computeRelativeCoordinates(t,new l.mxPoint(i.x,i.y)),c=this.graph.insertVertex(t,e,s,a.x,a.y,i.width,i.height,r);if(o){const u=o.x-i.x,f=o.y-i.y;c.geometry.offset=new l.mxPoint(u,f)}return c}}function Es(n){return new ps(n,new Ts(n),new D)}function Ot(n){return`messageFlowIcon_of_${n}`}var Ye={},Ue={};(function(n){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",e=t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s="["+t+"]["+e+"]*",i=new RegExp("^"+s+"$"),o=function(a,c){const u=[];let f=c.exec(a);for(;f;){const d=[];d.startIndex=c.lastIndex-f[0].length;const T=f.length;for(let g=0;g"u")};n.isExist=function(a){return typeof a<"u"},n.isEmptyObject=function(a){return Object.keys(a).length===0},n.merge=function(a,c,u){if(c){const f=Object.keys(c),d=f.length;for(let T=0;T"&&n[o]!==" "&&n[o]!==" "&&n[o]!==`
+`&&n[o]!=="\r";o++)c+=n[o];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),o--),!Os(c)){let d;return c.trim().length===0?d="Invalid space after '<'.":d="Tag '"+c+"' is an invalid name.",N("InvalidTag",d,w(n,o))}const u=Is(n,o);if(u===!1)return N("InvalidAttr","Attributes for '"+c+"' have open quote.",w(n,o));let f=u.value;if(o=u.index,f[f.length-1]==="/"){const d=o-f.length;f=f.substring(0,f.length-1);const T=ct(f,t);if(T===!0)s=!0;else return N(T.err.code,T.err.msg,w(n,d+T.err.line))}else if(a)if(u.tagClosed){if(f.trim().length>0)return N("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",w(n,r));{const d=e.pop();if(c!==d.tagName){let T=w(n,d.tagStartPos);return N("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+T.line+", col "+T.col+") instead of closing tag '"+c+"'.",w(n,r))}e.length==0&&(i=!0)}}else return N("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",w(n,o));else{const d=ct(f,t);if(d!==!0)return N(d.err.code,d.err.msg,w(n,o-f.length+d.err.line));if(i===!0)return N("InvalidXml","Multiple possible root nodes found.",w(n,o));t.unpairedTags.indexOf(c)!==-1||e.push({tagName:c,tagStartPos:r}),s=!0}for(o++;o0)return N("InvalidXml","Invalid '"+JSON.stringify(e.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return N("InvalidXml","Start tag expected.",1);return!0};function rt(n){return n===" "||n===" "||n===`
+`||n==="\r"}function at(n,t){const e=t;for(;t5&&s==="xml")return N("InvalidXml","XML declaration allowed only at the start of the document.",w(n,t));if(n[t]=="?"&&n[t+1]==">"){t++;break}else continue}return t}function lt(n,t){if(n.length>t+5&&n[t+1]==="-"&&n[t+2]==="-"){for(t+=3;t"){t+=2;break}}else if(n.length>t+8&&n[t+1]==="D"&&n[t+2]==="O"&&n[t+3]==="C"&&n[t+4]==="T"&&n[t+5]==="Y"&&n[t+6]==="P"&&n[t+7]==="E"){let e=1;for(t+=8;t"&&(e--,e===0))break}else if(n.length>t+9&&n[t+1]==="["&&n[t+2]==="C"&&n[t+3]==="D"&&n[t+4]==="A"&&n[t+5]==="T"&&n[t+6]==="A"&&n[t+7]==="["){for(t+=8;t"){t+=2;break}}return t}const Cs='"',Ss="'";function Is(n,t){let e="",s="",i=!1;for(;t"&&s===""){i=!0;break}e+=n[t]}return s!==""?!1:{value:e,index:t,tagClosed:i}}const As=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function ct(n,t){const e=We.getAllMatches(n,As),s={};for(let i=0;i!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1},_s=function(n){return Object.assign({},_t,n)};He.buildOptions=_s;He.defaultOptions=_t;class ys{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){this.child.push({[t]:e})}addChild(t){t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,[":@"]:t[":@"]}):this.child.push({[t.tagname]:t.child})}}var bs=ys;function ws(n,t){const e={};if(n[t+3]==="O"&&n[t+4]==="C"&&n[t+5]==="T"&&n[t+6]==="Y"&&n[t+7]==="P"&&n[t+8]==="E"){t=t+9;let s=1,i=!1,o=!1,r=!1,a="";for(;t"){if(r)if(n[t-1]==="-"&&n[t-2]==="-")r=!1;else throw new Error("Invalid XML comment in DOCTYPE");else o&&(xs(a,e),o=!1);if(s--,s===0)break}else n[t]==="["?i=!0:a+=n[t];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:e,i:t}}const Rs=RegExp(`^\\s([a-zA-z0-0]+)[ ](['"])([^&]+)\\2`);function xs(n,t){const e=Rs.exec(n);e&&(t[e[1]]={regx:RegExp(`&${e[1]};`,"g"),val:e[3]})}var Fs=ws;const Ps=/^[-+]?0x[a-fA-F0-9]+$/,Ms=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt);!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const ks={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function Bs(n,t={}){if(t=Object.assign({},ks,t),!n||typeof n!="string")return n;let e=n.trim();if(t.skipLike!==void 0&&t.skipLike.test(e))return n;if(t.hex&&Ps.test(e))return Number.parseInt(e,16);{const s=Ms.exec(e);if(s){const i=s[1],o=s[2];let r=Gs(s[3]);const a=s[4]||s[6];if(!t.leadingZeros&&o.length>0&&i&&e[2]!==".")return n;if(!t.leadingZeros&&o.length>0&&!i&&e[1]!==".")return n;{const c=Number(e),u=""+c;return u.search(/[eE]/)!==-1||a?t.eNotation?c:n:e.indexOf(".")!==-1?u==="0"&&r===""||u===r||i&&u==="-"+r?c:n:o?r===u||i+r===u?c:n:e===u||e===i+u?c:n}}else return n}}function Gs(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substr(0,n.length-1))),n}var Vs=Bs;const Ke=Ue,ie=bs,Ys=Fs,Us=Vs;"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,Ke.nameRegexp);let Ws=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=Hs,this.parseXml=Xs,this.parseTextData=Ks,this.resolveNameSpace=Ds,this.buildAttributesMap=$s,this.isItStopNode=qs,this.replaceEntitiesValue=Zs,this.readStopNodeData=Qs,this.saveTextToParentTag=js}};function Hs(n){const t=Object.keys(n);for(let e=0;e0)){r||(n=this.replaceEntitiesValue(n));const a=this.options.tagValueProcessor(t,n,e,i,o);return a==null?n:typeof a!=typeof n||a!==n?a:this.options.trimValues?xe(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?xe(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function Ds(n){if(this.options.removeNSPrefix){const t=n.split(":"),e=n.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(n=e+t[1])}return n}const zs=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function $s(n,t){if(!this.options.ignoreAttributes&&typeof n=="string"){const e=Ke.getAllMatches(n,zs),s=e.length,i={};for(let o=0;o",o,"Closing Tag is not closed.");let c=n.substring(o+2,a).trim();if(this.options.removeNSPrefix){const u=c.indexOf(":");u!==-1&&(c=c.substr(u+1))}this.options.transformTagName&&(c=this.options.transformTagName(c)),e&&(s=this.saveTextToParentTag(s,e,i)),i=i.substr(0,i.lastIndexOf(".")),e=this.tagsNodeStack.pop(),s="",o=a}else if(n[o+1]==="?"){let a=Re(n,o,!1,"?>");if(!a)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,e,i),!(this.options.ignoreDeclaration&&a.tagName==="?xml"||this.options.ignorePiTags)){const c=new ie(a.tagName);c.add(this.options.textNodeName,""),a.tagName!==a.tagExp&&a.attrExpPresent&&(c[":@"]=this.buildAttributesMap(a.tagExp,i)),e.addChild(c)}o=a.closeIndex+1}else if(n.substr(o+1,3)==="!--"){const a=z(n,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const c=n.substring(o+4,a-2);s=this.saveTextToParentTag(s,e,i),e.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}o=a}else if(n.substr(o+1,2)==="!D"){const a=Ys(n,o);this.docTypeEntities=a.entities,o=a.i}else if(n.substr(o+1,2)==="!["){const a=z(n,"]]>",o,"CDATA is not closed.")-2,c=n.substring(o+9,a);if(s=this.saveTextToParentTag(s,e,i),this.options.cdataPropName)e.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]);else{let u=this.parseTextData(c,e.tagname,i,!0,!1,!0);u==null&&(u=""),e.add(this.options.textNodeName,u)}o=a+2}else{let a=Re(n,o,this.options.removeNSPrefix),c=a.tagName,u=a.tagExp,f=a.attrExpPresent,d=a.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),e&&s&&e.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,e,i,!1)),c!==t.tagname&&(i+=i?"."+c:c);const T=e;if(T&&this.options.unpairedTags.indexOf(T.tagname)!==-1&&(e=this.tagsNodeStack.pop()),this.isItStopNode(this.options.stopNodes,i,c)){let g="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)o=a.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)o=a.closeIndex;else{const b=this.readStopNodeData(n,c,d+1);if(!b)throw new Error(`Unexpected end of ${c}`);o=b.i,g=b.tagContent}const A=new ie(c);c!==u&&f&&(A[":@"]=this.buildAttributesMap(u,i)),g&&(g=this.parseTextData(g,c,i,!0,f,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),A.add(this.options.textNodeName,g),e.addChild(A)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){c[c.length-1]==="/"?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const g=new ie(c);c!==u&&f&&(g[":@"]=this.buildAttributesMap(u,i)),i=i.substr(0,i.lastIndexOf(".")),e.addChild(g)}else{const g=new ie(c);this.tagsNodeStack.push(e),c!==u&&f&&(g[":@"]=this.buildAttributesMap(u,i)),e.addChild(g),e=g}s="",o=d}}else s+=n[o];return t.child},Zs=function(n){if(this.options.processEntities){for(let t in this.docTypeEntities){const e=this.docTypeEntities[t];n=n.replace(e.regx,e.val)}for(let t in this.lastEntities){const e=this.lastEntities[t];n=n.replace(e.regex,e.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const e=this.htmlEntities[t];n=n.replace(e.regex,e.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function js(n,t,e,s){return n&&(s===void 0&&(s=Object.keys(t.child).length===0),n=this.parseTextData(n,t.tagname,e,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,s),n!==void 0&&n!==""&&t.add(this.options.textNodeName,n),n=""),n}function qs(n,t,e){const s="*."+e;for(const i in n){const o=n[i];if(s===o||t===o)return!0}return!1}function Js(n,t,e=">"){let s,i="";for(let o=t;o"){const i=Js(n,t+1,s);if(!i)return;let o=i.data;const r=i.index,a=o.search(/\s/);let c=o,u=!0;if(a!==-1&&(c=o.substr(0,a).replace(/\s\s*$/,""),o=o.substr(a+1)),e){const f=c.indexOf(":");f!==-1&&(c=c.substr(f+1),u=c!==i.data.substr(f+1))}return{tagName:c,tagExp:o,closeIndex:r,attrExpPresent:u}}function Qs(n,t,e){const s=e;let i=1;for(;e",e,`${t} is not closed`);if(n.substring(e+2,o).trim()===t&&(i--,i===0))return{tagContent:n.substring(s,e),i:o};e=o}else if(n[e+1]==="?")e=z(n,"?>",e+1,"StopNode is not closed.");else if(n.substr(e+1,3)==="!--")e=z(n,"-->",e+3,"StopNode is not closed.");else if(n.substr(e+1,2)==="![")e=z(n,"]]>",e,"StopNode is not closed.")-2;else{const o=Re(n,e,">");o&&((o&&o.tagName)===t&&o.tagExp[o.tagExp.length-1]!=="/"&&i++,e=o.closeIndex)}}function xe(n,t,e){if(t&&typeof n=="string"){const s=n.trim();return s==="true"?!0:s==="false"?!1:Us(n,e)}else return Ke.isExist(n)?n:""}var ei=Ws,yt={};function ti(n,t){return bt(n,t)}function bt(n,t,e){let s;const i={};for(let o=0;o0&&(i[t.textNodeName]=s):s!==void 0&&(i[t.textNodeName]=s),i}function ni(n){const t=Object.keys(n);for(let e=0;e0&&(e=di),wt(n,t,"",e)}function wt(n,t,e,s){let i="",o=!1;for(let r=0;r`,o=!1;continue}else if(c===t.commentPropName){i+=s+``,o=!0;continue}else if(c[0]==="?"){const A=ut(a[":@"],t),b=c==="?xml"?"":s;let P=a[c][0][t.textNodeName];P=P.length!==0?" "+P:"",i+=b+`<${c}${P}${A}?>`,o=!0;continue}let f=s;f!==""&&(f+=t.indentBy);const d=ut(a[":@"],t),T=s+`<${c}${d}`,g=wt(a[c],t,u,f);t.unpairedTags.indexOf(c)!==-1?t.suppressUnpairedNode?i+=T+">":i+=T+"/>":(!g||g.length===0)&&t.suppressEmptyNode?i+=T+"/>":g&&g.endsWith(">")?i+=T+`>${g}${s}${c}>`:(i+=T+">",g&&s!==""&&(g.includes("/>")||g.includes(""))?i+=s+t.indentBy+g+s:i+=g,i+=`${c}>`),o=!0}return i}function fi(n){const t=Object.keys(n);for(let e=0;e0&&t.processEntities)for(let e=0;e","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[]};function De(n){this.options=Object.assign({},Ei,n),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Li),this.processTextOrObjNode=Ci,this.options.format?(this.indentate=Ni,this.tagEndChar=`>
`,this.newLine=`
-`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.suppressEmptyNode?(this.buildTextNode=Si,this.buildObjNode=mi):(this.buildTextNode=dt,this.buildObjNode=ut),this.buildTextValNode=dt,this.buildObjectNode=ut,this.replaceEntitiesValue=Ci,this.buildAttrPairStr=pi}ze.prototype.build=function(n){return this.options.preserveOrder?gi(n,this.options):(Array.isArray(n)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(n={[this.options.arrayNodeName]:n}),this.j2x(n,0).val)};ze.prototype.j2x=function(n,e){let t="",s="";for(let i in n)if(!(typeof n[i]>"u"))if(n[i]===null)i[0]==="?"?s+=this.indentate(e)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+i+"/"+this.tagEndChar;else if(n[i]instanceof Date)s+=this.buildTextNode(n[i],i,"",e);else if(typeof n[i]!="object"){const o=this.isAttribute(i);if(o)t+=this.buildAttrPairStr(o,""+n[i]);else if(i===this.options.textNodeName){let r=this.options.tagValueProcessor(i,""+n[i]);s+=this.replaceEntitiesValue(r)}else s+=this.buildTextNode(n[i],i,"",e)}else if(Array.isArray(n[i])){const o=n[i].length;for(let r=0;r"u"||(a===null?i[0]==="?"?s+=this.indentate(e)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+i+"/"+this.tagEndChar:typeof a=="object"?s+=this.processTextOrObjNode(a,i,e):s+=this.buildTextNode(a,i,"",e))}}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const o=Object.keys(n[i]),r=o.length;for(let a=0;a"+n+i:this.options.commentPropName!==!1&&e===this.options.commentPropName&&o.length===0?this.indentate(s)+``+this.newLine:this.indentate(s)+"<"+e+t+o+this.tagEndChar+n+this.indentate(s)+i}function mi(n,e,t,s){return n!==""?this.buildObjectNode(n,e,t,s):e[0]==="?"?this.indentate(s)+"<"+e+t+"?"+this.tagEndChar:this.indentate(s)+"<"+e+t+"/"+this.tagEndChar}function dt(n,e,t,s){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(s)+``+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(s)+``+this.newLine;{let i=this.options.tagValueProcessor(e,n);return i=this.replaceEntitiesValue(i),i===""&&this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode?this.indentate(s)+"<"+e+this.tagEndChar:this.indentate(s)+"<"+e+"/"+this.tagEndChar:this.indentate(s)+"<"+e+t+">"+i+""+e+this.tagEndChar}}function Ci(n){if(n&&n.length>0&&this.options.processEntities)for(let e=0;e65535&&(n-=65536,e+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),e+=String.fromCharCode(n),e};function Ri(n){var e;return n>=55296&&n<=57343||n>1114111?65533:(e=bi.get(n))!==null&&e!==void 0?e:n}function xi(n){return wi(Ri(n))}var R;(function(n){n[n.NUM=35]="NUM",n[n.SEMI=59]="SEMI",n[n.ZERO=48]="ZERO",n[n.NINE=57]="NINE",n[n.LOWER_A=97]="LOWER_A",n[n.LOWER_F=102]="LOWER_F",n[n.LOWER_X=120]="LOWER_X",n[n.To_LOWER_BIT=32]="To_LOWER_BIT"})(R||(R={}));var $;(function(n){n[n.VALUE_LENGTH=49152]="VALUE_LENGTH",n[n.BRANCH_LENGTH=16256]="BRANCH_LENGTH",n[n.JUMP_TABLE=127]="JUMP_TABLE"})($||($={}));function Fi(n){return function(t,s){let i="",o=0,r=0;for(;(r=t.indexOf("&",r))>=0;){if(i+=t.slice(o,r),o=r,r+=1,t.charCodeAt(r)===R.NUM){let d=r+1,T=10,g=t.charCodeAt(d);(g|R.To_LOWER_BIT)===R.LOWER_X&&(T=16,r+=1,d+=1);do g=t.charCodeAt(++r);while(g>=R.ZERO&&g<=R.NINE||T===16&&(g|R.To_LOWER_BIT)>=R.LOWER_A&&(g|R.To_LOWER_BIT)<=R.LOWER_F);if(d!==r){const A=t.substring(d,r),b=parseInt(A,T);if(t.charCodeAt(r)===R.SEMI)r+=1;else if(s)continue;i+=xi(b),o=r}continue}let a=0,c=1,u=0,f=n[u];for(;r>14)-1;if(T===0)break;u+=T}}if(a!==0){const d=(n[a]&$.VALUE_LENGTH)>>14;i+=d===1?String.fromCharCode(n[a]&~$.VALUE_LENGTH):d===2?String.fromCharCode(n[a+1]):String.fromCharCode(n[a+1],n[a+2]),o=r-c+1}}return i+t.slice(o)}}function Pi(n,e,t,s){const i=(e&$.BRANCH_LENGTH)>>7,o=e&$.JUMP_TABLE;if(i===0)return o!==0&&s===o?t:-1;if(o){const c=s-o;return c<0||c>=i?-1:n[t+c]-1}let r=t,a=r+i-1;for(;r<=a;){const c=r+a>>>1,u=n[c];if(us)a=c-1;else return n[c+i]}return-1}const Mi=Fi(yi);function ki(n){return Mi(n,!0)}class Bi{constructor(){p(this,"x2jOptions",{attributeNamePrefix:"",removeNSPrefix:!0,ignoreAttributes:!1,parseAttributeValue:!0,processEntities:!1,attributeValueProcessor:(e,t)=>ki(t)});p(this,"xmlParser",new _i.XMLParser(this.x2jOptions))}parse(e){let t;try{t=this.xmlParser.parse(e)}catch{throw new Error("XML parsing failed. Invalid BPMN source.")}if(!t.definitions)throw new Error("XML parsing failed. Unable to retrieve 'definitions' from the BPMN source.");return t}}class ee{}class Gi{warning(e){const t=e.getMessage();console.warn(t.template,...t.arguments)}}class Vi extends ee{constructor(e,t){super(),this.groupBpmnElementId=e,this.categoryValueRef=t}getMessage(){return{arguments:[this.categoryValueRef,this.groupBpmnElementId],template:"Group json deserialization: unable to find category value ref %s for bpmn element %s"}}}class Yi extends ee{constructor(e){super(),this.bpmnElementId=e}getMessage(){return{arguments:[this.bpmnElementId],template:"Shape json deserialization: unable to find bpmn element with id %s"}}}class Ui extends ee{constructor(e){super(),this.bpmnElementId=e}getMessage(){return{arguments:[this.bpmnElementId],template:"Edge json deserialization: unable to find bpmn element with id %s"}}}class Wi extends ee{constructor(e,t){super(),this.shapeOrEdgeId=e,this.labelStyleId=t}getMessage(){return{arguments:[this.labelStyleId,this.shapeOrEdgeId],template:"Unable to assign font from style %s to shape/edge %s"}}}class Hi extends ee{constructor(e,t){super(),this.laneId=e,this.flowNodeRef=t}getMessage(){return{arguments:[this.flowNodeRef,this.laneId],template:"Unable to assign lane %s as parent: flow node %s is not found"}}}class Ki extends ee{constructor(e,t,s){super(),this.bpmnElementId=e,this.attachedToRef=t,this.attachedToKind=s}getMessage(){return{arguments:[this.bpmnElementId,this.attachedToRef,this.attachedToKind],template:"The boundary event %s must be attached to an activity, and not to %s of kind %s"}}}class Di{constructor(){p(this,"poolsById",new Map);p(this,"poolsByProcessRef",new Map);p(this,"messageFlows",new Map);p(this,"flowNodes",new Map);p(this,"lanes",new Map);p(this,"sequenceFlows",new Map);p(this,"associationFlows",new Map);p(this,"eventDefinitionsOfDefinitions",new Map);p(this,"globalTasks",new Map);p(this,"categoryValues",new Map)}findPoolById(e){return this.poolsById.get(e)}findPoolByProcessRef(e){return this.poolsByProcessRef.get(e)}registerPool(e,t){this.poolsById.set(e.id,e),t&&this.poolsByProcessRef.set(t,e)}findMessageFlow(e){return this.messageFlows.get(e)}registerMessageFlow(e){this.messageFlows.set(e.id,e)}findFlowNode(e){return this.flowNodes.get(e)}registerFlowNode(e){this.flowNodes.set(e.id,e)}findLane(e){return this.lanes.get(e)}registerLane(e){this.lanes.set(e.id,e)}findSequenceFlow(e){return this.sequenceFlows.get(e)}registerSequenceFlow(e){this.sequenceFlows.set(e.id,e)}findAssociationFlow(e){return this.associationFlows.get(e)}registerAssociationFlow(e){this.associationFlows.set(e.id,e)}findEventDefinitionOfDefinition(e){return this.eventDefinitionsOfDefinitions.get(e)}registerEventDefinitionsOfDefinition(e,t){this.eventDefinitionsOfDefinitions.set(e,t)}findGlobalTask(e){return this.globalTasks.get(e)}registerGlobalTask(e,t){this.globalTasks.set(e,t)}findCategoryValue(e){return this.categoryValues.get(e)}registerCategoryValue(e,t){this.categoryValues.set(e,{value:t})}}const wt=(n,e,t,s)=>{const i=n.findCategoryValue(t.categoryValueRef);if(i)return new G(t.id,i.value,h.GROUP,s);e.warning(new Vi(t.id,t.categoryValueRef))};class zi{constructor(e,t){this.convertedElements=e,this.parsingMessageCollector=t}deserialize(e){S(e).forEach(t=>this.parseCollaboration(t))}parseCollaboration(e){this.buildParticipant(e.participant),this.buildMessageFlows(e.messageFlow),this.buildGroups(e.group)}buildParticipant(e){S(e).forEach(t=>this.convertedElements.registerPool(new G(t.id,t.name,h.POOL),t.processRef))}buildMessageFlows(e){S(e).forEach(t=>this.convertedElements.registerMessageFlow(new Ct(t.id,t.name,t.sourceRef,t.targetRef)))}buildGroups(e){S(e).forEach(t=>{const s=wt(this.convertedElements,this.parsingMessageCollector,t);s&&this.convertedElements.registerFlowNode(s)})}}class $i{constructor(e,t){p(this,"defaultSequenceFlowIds",[]);p(this,"elementsWithoutParentByProcessId",new Map);p(this,"callActivitiesCallingProcess",new Map);this.convertedElements=e,this.parsingMessageCollector=t}deserialize(e){S(e).forEach(t=>this.parseProcess(t)),S(e).forEach(t=>this.assignParentOfProcessElementsCalledByCallActivity(t.id))}assignParentOfProcessElementsCalledByCallActivity(e){const t=this.callActivitiesCallingProcess.get(e);if(t){const s=this.convertedElements.findPoolByProcessRef(e);s&&(s.parentId=t.id),this.elementsWithoutParentByProcessId.get(e).forEach(i=>{i.parentId=t.id})}}parseProcess(e){const t=e.id,s=this.convertedElements.findPoolByProcessRef(t);s&&!s.name&&this.convertedElements.registerPool(new G(s.id,e.name,h.POOL),t),this.buildProcessInnerElements(e,s==null?void 0:s.id)}buildProcessInnerElements(e,t){this.elementsWithoutParentByProcessId.set(e.id,[]),I.flowNodeKinds().filter(s=>s!=h.EVENT_BOUNDARY).forEach(s=>this.buildFlowNodeBpmnElements(e[s],s,t,e.id)),this.buildFlowNodeBpmnElements(e.boundaryEvent,h.EVENT_BOUNDARY,t,e.id),this.buildLaneBpmnElements(e[h.LANE],t,e.id),this.buildLaneSetBpmnElements(e.laneSet,t,e.id),this.buildSequenceFlows(e.sequenceFlow),this.buildAssociationFlows(e.association)}buildFlowNodeBpmnElements(e,t,s,i){S(e).forEach(o=>{let r;if(I.isEvent(t))r=this.buildShapeBpmnEvent(o,t,s);else if(I.isActivity(t))r=this.buildShapeBpmnActivity(o,t,s);else if(t==h.GATEWAY_EVENT_BASED){const c=o;r=new Nt(o.id,c.name,s,c.instantiate,ae[c.eventGatewayType])}else if(t==h.GROUP)r=wt(this.convertedElements,this.parsingMessageCollector,o,s);else{const c=t===h.TEXT_ANNOTATION?o.text:o.name;r=new G(o.id,c,t,s,o.instantiate)}const a=o.default;I.isWithDefaultSequenceFlow(t)&&a&&this.defaultSequenceFlowIds.push(a),r&&(this.convertedElements.registerFlowNode(r),s||this.elementsWithoutParentByProcessId.get(i).push(r))})}buildShapeBpmnActivity(e,t,s){const i=Xi(e);return I.isSubProcess(t)?this.buildShapeBpmnSubProcess(e,s,i):I.isCallActivity(t)?this.buildShapeBpmnCallActivity(e,s,i):new me(e.id,e.name,t,s,e.instantiate,i)}buildShapeBpmnCallActivity(e,t,s){const i=this.convertedElements.findGlobalTask(e.calledElement);if(!i){const o=new ce(e.id,e.name,re.CALLING_PROCESS,t,s);return this.callActivitiesCallingProcess.set(e.calledElement,o),o}return new ce(e.id,e.name,re.CALLING_GLOBAL_TASK,t,s,i)}buildShapeBpmnEvent(e,t,s){const i=this.getEventDefinitions(e),o=i.map(r=>r.counter).reduce((r,a)=>r+a,0);if(o==0&&I.canHaveNoneEvent(t))return new ue(e.id,e.name,t,y.NONE,s);if(o==1){const r=i[0].kind;return I.isBoundaryEvent(t)?this.buildShapeBpmnBoundaryEvent(e,r):I.isStartEvent(t)?new It(e.id,e.name,r,s,e.isInterrupting):new ue(e.id,e.name,t,r,s)}}buildShapeBpmnBoundaryEvent(e,t){const s=this.convertedElements.findFlowNode(e.attachedToRef);if(I.isActivity(s==null?void 0:s.kind))return new At(e.id,e.name,t,e.attachedToRef,e.cancelActivity);this.parsingMessageCollector.warning(new Ki(e.id,e.attachedToRef,s==null?void 0:s.kind))}getEventDefinitions(e){const t=new Map;return gt.forEach(s=>{const i=e[s+"EventDefinition"],o=S(i,!0).length;t.set(s,o)}),S(e.eventDefinitionRef).forEach(s=>{const i=this.convertedElements.findEventDefinitionOfDefinition(s);t.set(i,t.get(i)+1)}),Array.from(t.keys()).map(s=>({kind:s,counter:t.get(s)})).filter(s=>s.counter>0)}buildShapeBpmnSubProcess(e,t,s){const i=e.triggeredByEvent?ge.EVENT:ge.EMBEDDED,o=new pe(e.id,e.name,i,t,s);return this.buildProcessInnerElements(e,e.id),o}buildLaneSetBpmnElements(e,t,s){S(e).forEach(i=>this.buildLaneBpmnElements(i.lane,t,s))}buildLaneBpmnElements(e,t,s){S(e).forEach(i=>{var r;const o=new G(i.id,i.name,h.LANE,t);this.convertedElements.registerLane(o),t||this.elementsWithoutParentByProcessId.get(s).push(o),this.assignParentOfLaneFlowNodes(i),(r=i.childLaneSet)!=null&&r.lane&&this.buildLaneBpmnElements(i.childLaneSet.lane,i.id,s)})}assignParentOfLaneFlowNodes(e){S(e.flowNodeRef).forEach(t=>{const s=this.convertedElements.findFlowNode(t),i=e.id;s?I.isBoundaryEvent(s.kind)||(s.parentId=i):this.parsingMessageCollector.warning(new Hi(i,t))})}buildSequenceFlows(e){S(e).forEach(t=>{const s=this.getSequenceFlowKind(t);this.convertedElements.registerSequenceFlow(new mt(t.id,t.name,t.sourceRef,t.targetRef,s))})}buildAssociationFlows(e){S(e).forEach(t=>{const s=t.associationDirection;this.convertedElements.registerAssociationFlow(new St(t.id,void 0,t.sourceRef,t.targetRef,s))})}getSequenceFlowKind(e){if(this.defaultSequenceFlowIds.includes(e.id))return B.DEFAULT;{const t=this.convertedElements.findFlowNode(e.sourceRef);if(t&&I.isWithDefaultSequenceFlow(t.kind)&&e.conditionExpression)return I.isActivity(t.kind)?B.CONDITIONAL_FROM_ACTIVITY:B.CONDITIONAL_FROM_GATEWAY}return B.NORMAL}}const Xi=n=>{const e=[],t=n.standardLoopCharacteristics,s=S(n.multiInstanceLoopCharacteristics,!0)[0];return t||t===""?e.push(_.LOOP):s&&e.push(s.isSequential?_.MULTI_INSTANCE_SEQUENTIAL:_.MULTI_INSTANCE_PARALLEL),e};class Zi{constructor(e,t,s,i){this.x=e,this.y=t,this.width=s,this.height=i}}class ji{constructor(e,t,s,i,o=q.NONE){this.id=e,this.bpmnElement=t,this.waypoints=s,this.label=i,this.messageVisibleKind=o}}class qi{constructor(e,t){this.x=e,this.y=t}}class Ji{constructor(e,t){this.font=e,this.bounds=t}}class Qi{constructor(e,t,s,i,o,r){this.name=e,this.size=t,this.isBold=s,this.isItalic=i,this.isUnderline=o,this.isStrikeThrough=r}}class Ee{constructor(e,t){p(this,"convertedFonts",new Map);this.convertedElements=e,this.parsingMessageCollector=t}deserialize(e){const t=[],s=[],i=[],o=[],r=S(e)[0];if(r){this.deserializeFonts(r.BPMNLabelStyle);const a=r.BPMNPlane,c=this.deserializeEdges(a.BPMNEdge),u=this.deserializeShapes(a.BPMNShape);t.push(...u.flowNodes),s.push(...u.lanes),i.push(...u.pools),o.push(...c)}return{flowNodes:t,lanes:s,pools:i,edges:o}}deserializeFonts(e){this.convertedFonts=new Map,S(e).forEach(t=>S(t.Font).forEach(s=>this.convertedFonts.set(t.id,new Qi(s.name,s.size,s.isBold,s.isItalic,s.isUnderline,s.isStrikeThrough))))}deserializeShapes(e){const t={flowNodes:[],lanes:[],pools:[]};return S(e).forEach(s=>{this.deserializeShapeAndStoreIfFound(s,t.flowNodes,i=>this.convertedElements.findFlowNode(i))||this.deserializeShapeAndStoreIfFound(s,t.lanes,i=>this.convertedElements.findLane(i))||this.deserializeShapeAndStoreIfFound(s,t.pools,i=>this.convertedElements.findPoolById(i))||this.parsingMessageCollector.warning(new Yi(s.bpmnElement))}),t}deserializeShapeAndStoreIfFound(e,t,s){const i=this.deserializeShape(e,s);return i?(t.push(i),!0):!1}deserializeShape(e,t){const s=t(e.bpmnElement);if(s){const i=Ee.deserializeBounds(e);(s instanceof pe||s instanceof ce&&s.callActivityKind===re.CALLING_PROCESS)&&!e.isExpanded&&s.markers.push(_.EXPAND);let o;I.isPoolOrLane(s.kind)&&(o=e.isHorizontal!==void 0?e.isHorizontal:!0);const r=this.deserializeLabel(e.BPMNLabel,e.id);return new fe(e.id,s,i,r,o)}}static deserializeBounds(e){const t=e.Bounds;if(t)return new Zi(t.x,t.y,t.width,t.height)}deserializeEdges(e){return S(e).map(t=>{const s=this.convertedElements.findSequenceFlow(t.bpmnElement)||this.convertedElements.findMessageFlow(t.bpmnElement)||this.convertedElements.findAssociationFlow(t.bpmnElement);if(!s){this.parsingMessageCollector.warning(new Ui(t.bpmnElement));return}const i=this.deserializeWaypoints(t.waypoint),o=this.deserializeLabel(t.BPMNLabel,t.id),r=t.messageVisibleKind?t.messageVisibleKind:q.NONE;return new ji(t.id,s,i,o,r)}).filter(Boolean)}deserializeWaypoints(e){return S(e).map(t=>new qi(t.x,t.y))}deserializeLabel(e,t){if(e&&typeof e=="object"){const s=this.findFont(e.labelStyle,t),i=Ee.deserializeBounds(e);if(s||i)return new Ji(s,i)}}findFont(e,t){let s;return e&&(s=this.convertedFonts.get(e),s||this.parsingMessageCollector.warning(new Wi(t,e))),s}}class eo{constructor(e){this.convertedElements=e}deserialize(e){gt.forEach(t=>{const s=e[t+"EventDefinition"];S(s,!0).forEach(i=>this.convertedElements.registerEventDefinitionsOfDefinition(i.id,t))})}}class to{constructor(e){this.convertedElements=e}deserialize(e){this.parseGlobalTasks(e.globalTask,h.GLOBAL_TASK),this.parseGlobalTasks(e.globalBusinessRuleTask,h.GLOBAL_TASK_BUSINESS_RULE),this.parseGlobalTasks(e.globalManualTask,h.GLOBAL_TASK_MANUAL),this.parseGlobalTasks(e.globalScriptTask,h.GLOBAL_TASK_SCRIPT),this.parseGlobalTasks(e.globalUserTask,h.GLOBAL_TASK_USER)}parseGlobalTasks(e,t){S(e).forEach(s=>this.convertedElements.registerGlobalTask(s.id,t))}}class no{constructor(e){this.convertedElements=e}deserialize(e){S(e.category).forEach(t=>S(t.categoryValue).forEach(s=>this.convertedElements.registerCategoryValue(s.id,s.value)))}}class so{constructor(e,t,s,i,o,r){this.categoryConverter=e,this.collaborationConverter=t,this.eventDefinitionConverter=s,this.globalTaskConverter=i,this.processConverter=o,this.diagramConverter=r}parse(e){const t=e.definitions;return this.categoryConverter.deserialize(t),this.collaborationConverter.deserialize(t.collaboration),this.eventDefinitionConverter.deserialize(t),this.globalTaskConverter.deserialize(t),this.processConverter.deserialize(t.process),this.diagramConverter.deserialize(t.BPMNDiagram)}}function io(n){const e=new Di;return new so(new no(e),new zi(e,n),new eo(e),new to(e),new $i(e,n),new Ee(e,n))}class oo{constructor(e,t){this.jsonParser=e,this.xmlParser=t}parse(e){const t=this.xmlParser.parse(e);return this.jsonParser.parse(t)}}function ro(){return new oo(io(new Gi),new Bi)}class ao{constructor(){p(this,"classNamesByBPMNId",new Map)}clear(){this.classNamesByBPMNId.clear()}getClassNames(e){return Array.from(this.classNamesByBPMNId.get(e)??[])}addClassNames(e,t){return this.updateClassNames(e,t,(s,i)=>s.add(i))}removeClassNames(e,t){return this.updateClassNames(e,t,(s,i)=>s.delete(i))}toggleClassNames(e,t){return this.updateClassNames(e,t,(s,i)=>s.has(i)?s.delete(i):s.add(i)),t&&t.length>0}updateClassNames(e,t,s){const i=this.getOrInitializeClassNames(e),o=i.size;return S(t).forEach(r=>s(i,r)),i.size!=o}getOrInitializeClassNames(e){let t=this.classNamesByBPMNId.get(e);return t==null&&(t=new Set,this.classNamesByBPMNId.set(e,t)),t}}class $e{constructor(){p(this,"overlayPositions",new Map([["start",{horizontalAlign:"left",verticalAlign:"top"}],["middle",{horizontalAlign:"center",verticalAlign:"top"}],["end",{horizontalAlign:"right",verticalAlign:"top"}],["top-left",{horizontalAlign:"left",verticalAlign:"top"}],["top-right",{horizontalAlign:"right",verticalAlign:"top"}],["top-center",{horizontalAlign:"center",verticalAlign:"top"}],["bottom-left",{horizontalAlign:"left",verticalAlign:"bottom"}],["bottom-right",{horizontalAlign:"right",verticalAlign:"bottom"}],["bottom-center",{horizontalAlign:"center",verticalAlign:"bottom"}],["middle-left",{horizontalAlign:"left",verticalAlign:"middle"}],["middle-right",{horizontalAlign:"right",verticalAlign:"middle"}]]))}convert(e){const t=this.convertPosition(e),s=$e.convertStyle(e);return{position:t,style:s}}convertPosition(e){return this.overlayPositions.get(e.position)}static convertStyle(e){const t={fill:{color:m.DEFAULT_OVERLAY_FILL_COLOR.valueOf(),opacity:m.DEFAULT_OVERLAY_FILL_OPACITY.valueOf()},stroke:{color:m.DEFAULT_OVERLAY_STROKE_COLOR.valueOf(),width:m.DEFAULT_OVERLAY_STROKE_WIDTH.valueOf()},font:{color:m.DEFAULT_OVERLAY_FONT_COLOR.valueOf(),size:m.DEFAULT_OVERLAY_FONT_SIZE.valueOf()}},s=e.style,i={...t};return s&&(this.convertFill(i,s.fill),this.convertStroke(i,s.stroke),this.convertFont(i,s.font)),i}static convertFill(e,t){t&&(e.fill.color=t.color??e.fill.color,e.fill.opacity=t.opacity??e.fill.opacity)}static convertStroke(e,t){t&&(e.stroke.color=t.color??e.stroke.color,e.stroke.width=t.width??e.stroke.width)}static convertFont(e,t){t&&(e.font.color=t.color??e.font.color,e.font.size=t.size??e.font.size)}}function lo(n){return new co(n,new $e)}class co{constructor(e,t){this.graph=e,this.overlayConverter=t}updateAndRefreshCssClassesOfCell(e,t){this.updateAndRefreshCssClassesOfElement(e,t),this.updateAndRefreshCssClassesOfElement(Lt(e),t)}updateAndRefreshCssClassesOfElement(e,t){var r;const s=this.graph.getModel().getCell(e);if(!s)return;const o=this.graph.getView().getState(s);o.style[E.EXTRA_CSS_CLASSES]=t,o.shape.redraw(),(r=o.text)==null||r.redraw()}addOverlays(e,t){const s=this.graph.getModel().getCell(e);!s||S(t).forEach(i=>{const o=new pt(i.label,this.overlayConverter.convert(i));this.graph.addCellOverlay(s,o)})}removeAllOverlays(e){const t=this.graph.getModel().getCell(e);!t||this.graph.removeCellOverlays(t)}}class uo{element(e){return`svg > g > g > g[data-bpmn-id="${e}"]`}elementsOfKind(e){return`svg > g > g > g.${e}:not(.bpmn-label)`}}function ho(n,e){return new fo(n,new go(e.container,new uo),new ao,lo(e))}class fo{constructor(e,t,s,i){this.bpmnModelRegistry=e,this.htmlElementRegistry=t,this.cssRegistry=s,this.graphCellUpdater=i,this.bpmnModelRegistry.registerOnLoadCallback(this.cssRegistry.clear.bind(this.cssRegistry))}getElementsByIds(e){return S(e).map(t=>this.bpmnModelRegistry.getBpmnSemantic(t)).filter(Boolean).map(t=>({bpmnSemantic:t,htmlElement:this.htmlElementRegistry.getBpmnHtmlElement(t.id)}))}getElementsByKinds(e){return S(e).map(t=>this.htmlElementRegistry.getBpmnHtmlElements(t).map(s=>({htmlElement:s,bpmnSemantic:this.bpmnModelRegistry.getBpmnSemantic(s.getAttribute("data-bpmn-id"))}))).reduce((t,s)=>(t.push(...s),t),[])}addCssClasses(e,t){this.updateCssClasses(e,t,this.cssRegistry.addClassNames.bind(this.cssRegistry))}removeCssClasses(e,t){this.updateCssClasses(e,t,this.cssRegistry.removeClassNames.bind(this.cssRegistry))}toggleCssClasses(e,t){this.updateCssClasses(e,t,this.cssRegistry.toggleClassNames.bind(this.cssRegistry))}updateCssClasses(e,t,s){const i=S(t);S(e).forEach(o=>this.updateCellIfChanged(s(o,i),o))}updateCellIfChanged(e,t){if(e){const s=this.cssRegistry.getClassNames(t);this.graphCellUpdater.updateAndRefreshCssClassesOfCell(t,s)}}addOverlays(e,t){this.graphCellUpdater.addOverlays(e,t)}removeAllOverlays(e){this.graphCellUpdater.removeAllOverlays(e)}}class go{constructor(e,t){this.container=e,this.querySelectors=t}getBpmnHtmlElement(e){return this.container.querySelector(this.querySelectors.element(e))}getBpmnHtmlElements(e){const t=this.querySelectors.elementsOfKind(be(e));return[...this.container.querySelectorAll(t)]}}class To{filter(e,t){const s=[],i=[];if(S(t==null?void 0:t.pools).filter(g=>g&&Object.keys(g).length).forEach(g=>g.id?s.push(g.id):g.name&&i.push(g.name)),s.length==0&&i.length==0)return e;const{filteredPools:o,filteredPoolIds:r}=po(e,s,i),a=[...s,...r],{filteredLanes:c,filteredLaneIds:u,filteredFlowNodes:f,filteredFlowNodeIds:d}=Rt(e.lanes,e.flowNodes,a),T=mo(e.edges,[...a,...u,...d]);if(o.length==0&&c.length==0&&f.length==0&&T.length==0){let g=s.length>0?` for ids [${s}]`:"";const A=g?" and":"";throw g+=i.length>0?`${A} for names [${i}]`:"",new Error("No matching pools"+g)}return{lanes:c,flowNodes:f,pools:o,edges:T}}}function po(n,e,t){const s=n.pools.filter(o=>e.includes(o.bpmnElement.id)||t.includes(o.bpmnElement.name)),i=s.map(o=>o.bpmnElement.id);return{filteredPools:s,filteredPoolIds:i}}function Rt(n,e,t){const{filteredLanes:s,filteredLaneIds:i}=xt(n,t),{filteredLanes:o,filteredLaneIds:r,filteredFlowNodes:a,filteredFlowNodeIds:c}=Eo(e,[...t,...i],n);return s.push(...o),i.push(...r),{filteredLanes:s,filteredLaneIds:i,filteredFlowNodes:a,filteredFlowNodeIds:c}}function xt(n,e){const t=n.filter(i=>e.includes(i.bpmnElement.parentId)),s=t.map(i=>i.bpmnElement.id);if(t.length>0){const{filteredLanes:i,filteredLaneIds:o}=xt(n,s);t.push(...i),s.push(...o)}return{filteredLanes:t,filteredLaneIds:s}}function Eo(n,e,t){const s=n.filter(u=>e.includes(u.bpmnElement.parentId));if(s.length===0)return{filteredLanes:[],filteredLaneIds:[],filteredFlowNodes:[],filteredFlowNodeIds:[]};const i=s.map(u=>u.bpmnElement.id),{filteredLanes:o,filteredLaneIds:r,filteredFlowNodes:a,filteredFlowNodeIds:c}=Rt(t,n,i);return s.push(...a),i.push(...c),{filteredLanes:o,filteredLaneIds:r,filteredFlowNodes:s,filteredFlowNodeIds:i}}function mo(n,e){return n.filter(t=>e.includes(t.bpmnElement.sourceRefId)&&e.includes(t.bpmnElement.targetRefId))}class Co{constructor(){p(this,"searchableModel");p(this,"onLoadCallback")}load(e,t){var i;const s=new To().filter(e,t);return this.searchableModel=new Io(s),(i=this.onLoadCallback)==null||i.call(this),So(s)}registerOnLoadCallback(e){this.onLoadCallback=e}getBpmnSemantic(e){const t=this.searchableModel.elementById(e);if(!t)return;const s=t.bpmnElement,i=s instanceof G;return{id:e,name:s.name,isShape:i,kind:s.kind}}}function So(n){const e=n.flowNodes.filter(o=>{const r=o.bpmnElement;return I.isSubProcess(r.kind)&&r.markers.includes(_.EXPAND)}).map(o=>o.bpmnElement.id),t=[],s=[],i=[];return n.flowNodes.forEach(o=>{const r=o.bpmnElement.kind;I.isSubProcess(r)?t.push(o):I.isBoundaryEvent(r)?s.push(o):e.includes(o.bpmnElement.parentId)||i.push(o)}),{boundaryEvents:s,edges:n.edges,lanes:n.lanes,otherFlowNodes:i,pools:n.pools,subprocesses:t}}class Io{constructor(e){p(this,"elements",new Map);[].concat(e.pools,e.lanes,e.flowNodes,e.edges).forEach(t=>this.elements.set(t.bpmnElement.id,t))}elementById(e){return this.elements.get(e)}}function Ao(n){return n instanceof HTMLElement?n:document.getElementById(n)}class No{constructor(e){this.graph=e}fit(e){this.graph.customFit(e)}zoom(e){e=="in"?this.graph.zoomIn():this.graph.zoomOut()}}const Lo="0.29.1",vo=()=>({lib:Lo,dependencies:new Map([["mxGraph",l.mxClient.VERSION]])});class Oo{constructor(e){p(this,"graph");p(this,"navigation");p(this,"bpmnElementsRegistry");p(this,"bpmnModelRegistry");const t=new hs(Ao(e==null?void 0:e.container));this.graph=t.configure(e),this.navigation=new No(this.graph),this.bpmnModelRegistry=new Co,this.bpmnElementsRegistry=ho(this.bpmnModelRegistry,this.graph)}load(e,t){const s=ro().parse(e),i=this.bpmnModelRegistry.load(s,t==null?void 0:t.modelFilter);Ts(this.graph).render(i,t==null?void 0:t.fit)}getVersion(){return vo()}}const _o=new Map([["dark",{defaultFillColor:"#334352",defaultFontColor:"white",defaultStrokeColor:"#c0ddeb",endEventFillColor:"pink",endEventStrokeColor:"FireBrick",startEventFillColor:"DarkSeaGreen",startEventStrokeColor:"DarkGreen",taskAndCallActivityFillColor:"#5c8599",laneFillColor:"#2b3742",poolFillColor:"#232b33"}],["brown",{defaultFillColor:"#ede7e1",defaultFontColor:"#414666",defaultStrokeColor:"#414666",flowColor:"#666666",catchAndThrowEventStrokeColor:"#377f87",endEventFillColor:"pink",endEventStrokeColor:"FireBrick",startEventFillColor:"DarkSeaGreen",startEventStrokeColor:"DarkGreen",taskAndCallActivityFillColor:"#dadce8",laneFillColor:"#d4c3b2",poolFillColor:"#d1b9a1"}],["light-blue",{defaultFillColor:"#ffffff",defaultFontColor:"#002395",defaultStrokeColor:"#002395",endEventFillColor:"#f9dadc",endEventStrokeColor:"#e20613",startEventFillColor:"#ffffff",startEventStrokeColor:"#05d99e",taskAndCallActivityFillColor:"rgba(132,158,253,0.1)",textAnnotationFillColor:"rgba(237,237,245,0.5)",laneFillColor:"#edeef5",poolFillColor:"#dbefff"}]]);class yo extends Oo{configureTheme(e){if(e=="default")return new le(this.graph).configureStyles(),!0;const t=_o.get(e);if(!t)return!1;const s=this.graph.getStylesheet();I.eventKinds().forEach(f=>{let d,T;switch(f){case"endEvent":d=t.endEventFillColor,T=t.endEventStrokeColor;break;case"startEvent":d=t.startEventFillColor,T=t.startEventStrokeColor;break;case"intermediateCatchEvent":case"intermediateThrowEvent":case"boundaryEvent":d=t.defaultFillColor,T=t.catchAndThrowEventStrokeColor??t.defaultStrokeColor;break;default:d=t.defaultFillColor,T=t.defaultStrokeColor;break}const g=s.styles[f];g.fillColor=d,g.strokeColor=T}),I.taskKinds().forEach(f=>{const d=s.styles[f];d.fillColor=t.taskAndCallActivityFillColor});const i=s.styles[h.CALL_ACTIVITY];i.fillColor=t.taskAndCallActivityFillColor;const o=s.styles[h.TEXT_ANNOTATION];o.fillColor=t.textAnnotationFillColor??m.TEXT_ANNOTATION_FILL_COLOR;const r=s.styles[h.POOL];r.fillColor=t.poolFillColor,r.swimlaneFillColor=t.defaultFillColor;const a=s.styles[h.LANE];a.fillColor=t.laneFillColor;const c=s.getDefaultVertexStyle();c.fontColor=t.defaultFontColor,c.fillColor=t.defaultFillColor,c.strokeColor=t.defaultStrokeColor;const u=s.getDefaultEdgeStyle();return u.fontColor=t.defaultFontColor,u.fillColor=t.defaultFillColor,u.strokeColor=t.flowColor??t.defaultStrokeColor,!0}configureSequenceFlowColor(e){V(`Use dedicated ${e} color for sequence flows`);const s=this.graph.getStylesheet().styles[M.SEQUENCE_FLOW];s[l.mxConstants.STYLE_STROKECOLOR]=e,s[l.mxConstants.STYLE_FILLCOLOR]=e,V("Sequence flows style updated")}}let L,U={},Xe,Ze;function Uo(n){v("Updating load options",n),U.fit=n,v("Load options updated!",Pe(U))}function Wo(){return{...U}}function Ho(){return Ze}function Ko(n){v("Switching theme from %s to %s",Ze,n),L.configureTheme(n)&&(L.graph.refresh(),v("Theme switch done"))}function Ft(n){v("Loading bpmn...");try{L.load(n,U),v("BPMN loaded with configuration",Pe(U)),bo(Xe),document.dispatchEvent(new CustomEvent("diagramLoaded"))}catch(e){ke(e,`Cannot load the BPMN diagram: ${e.message}`)}}function Do(n){v("Fitting..."),L.navigation.fit(n),v("Fit done with configuration",Pe(n))}function zo(n){v(`Zooming '${n}'...`),L.navigation.zoom(n),v("Zoom done")}function $o(n){return L.bpmnElementsRegistry.getElementsByKinds(n)}function Xo(n,e){return L.bpmnElementsRegistry.addCssClasses(n,e)}function Zo(n,e){return L.bpmnElementsRegistry.removeCssClasses(n,e)}function jo(n,e){return L.bpmnElementsRegistry.addOverlays(n,[e])}function qo(n){return L.bpmnElementsRegistry.removeAllOverlays(n)}function bo(n){if(!Xe)return;v("Updating model, bpmnElement to collapse:",n);const e=L.graph.getModel(),t=e.getCell(n);if(!t)v("Element not found in the model, do nothing");else{e.beginUpdate();try{e.setCollapsed(t,!0)}finally{e.endUpdate()}v("Model updated")}}function Pt(n){const e=new FileReader;e.onload=()=>{Ft(e.result)},e.readAsText(n)}function Jo(n){const e=n.target.files[0];Pt(e)}function wo(n,e){Gt(n).catch(t=>{const s=`Unable to fetch ${n}. ${t}`;throw e(s),new Error(s)}).then(t=>(v("BPMN content fetched"),t)).then(t=>{Ft(t),v(`Bpmn loaded from url ${n}`)}).catch(()=>{})}function Ro(n){ke(n)}function xo(n,e){var o;const t=((o=n.loadOptions)==null?void 0:o.fit)||{},s=e.get("fitTypeOnLoad");s&&(t.type=s);const i=e.get("fitMargin");return i&&(t.margin=Number(i)),t}function Fo(n){if(n.get("style.container.alternative.background.color")=="true"){const o="yellow";V("Use alternative color for the bpmn container background, color",o);const r=L.graph.container;r.style.backgroundColor=o,V("Bpmn container style updated")}const t=n.get("style.theme");V(`Configuring the '${t}' BPMN theme`),L.configureTheme(t)?(Ze=t,V(`'${t}' BPMN theme configured`)):V(`Unknown '${t}' BPMN theme, skipping configuration`),n.get("style.seqFlow.light.colors")=="true"&&L.configureSequenceFlowColor("#E9E9E9")}function Po(n){Xe=n.get("bpmn.element.id.collapsed")}function Mo(n){const e=n.get("bpmn.filter.pool.ids");if(!e)return;const t=e.split(",");return v("Configuring load options to only include pool id: ",t),{pools:t.map(s=>({id:s}))}}function Qo(n){const e=V;e(`Initializing BpmnVisualization with container '${n.globalOptions.container}'...`),L=new yo(n.globalOptions),e("Initialization completed"),new Vt(window,"drop-container",L.graph.container,Pt),e("Drag&Drop support initialized");const t=new URLSearchParams(window.location.search);e("Configuring Load Options"),U=n.loadOptions||{},U.fit=xo(n,t),U.modelFilter=Mo(t),Fo(t),Po(t),e("Checking if an 'url to fetch BPMN content' is provided as query parameter");const s=t.get("url");if(s){const i=decodeURIComponent(s),o=n.statusFetchKoNotifier||Ro;wo(i,o);return}e("No 'url to fetch BPMN content' provided")}function er(){Z("Trigger SVG Download"),Wt(new ht(L.graph).exportSvg())}function tr(){Z("Trigger PNG Download"),Ht(new ht(L.graph).exportSvgForPng())}function nr(){const n=L.getVersion();return v("Version:",n),n}export{oe as F,I as S,Kt as Z,Ko as a,nr as b,Ho as c,Go as d,qo as e,Do as f,Wo as g,Jo as h,er as i,tr as j,$o as k,v as l,Xo as m,jo as n,Zo as r,Qo as s,Uo as u,zo as z};
+`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.suppressEmptyNode?(this.buildTextNode=Ai,this.buildObjNode=Si):(this.buildTextNode=ht,this.buildObjNode=dt),this.buildTextValNode=ht,this.buildObjectNode=dt,this.replaceEntitiesValue=Ii,this.buildAttrPairStr=mi}De.prototype.build=function(n){return this.options.preserveOrder?pi(n,this.options):(Array.isArray(n)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(n={[this.options.arrayNodeName]:n}),this.j2x(n,0).val)};De.prototype.j2x=function(n,t){let e="",s="";for(let i in n)if(!(typeof n[i]>"u"))if(n[i]===null)i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(n[i]instanceof Date)s+=this.buildTextNode(n[i],i,"",t);else if(typeof n[i]!="object"){const o=this.isAttribute(i);if(o)e+=this.buildAttrPairStr(o,""+n[i]);else if(i===this.options.textNodeName){let r=this.options.tagValueProcessor(i,""+n[i]);s+=this.replaceEntitiesValue(r)}else s+=this.buildTextNode(n[i],i,"",t)}else if(Array.isArray(n[i])){const o=n[i].length;for(let r=0;r"u"||(a===null?i[0]==="?"?s+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(t)+"<"+i+"/"+this.tagEndChar:typeof a=="object"?s+=this.processTextOrObjNode(a,i,t):s+=this.buildTextNode(a,i,"",t))}}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const o=Object.keys(n[i]),r=o.length;for(let a=0;a"+n+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(s)+``+this.newLine:this.indentate(s)+"<"+t+e+o+this.tagEndChar+n+this.indentate(s)+i}function Si(n,t,e,s){return n!==""?this.buildObjectNode(n,t,e,s):t[0]==="?"?this.indentate(s)+"<"+t+e+"?"+this.tagEndChar:this.indentate(s)+"<"+t+e+"/"+this.tagEndChar}function ht(n,t,e,s){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(s)+``+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(s)+``+this.newLine;{let i=this.options.tagValueProcessor(t,n);return i=this.replaceEntitiesValue(i),i===""&&this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode?this.indentate(s)+"<"+t+this.tagEndChar:this.indentate(s)+"<"+t+"/"+this.tagEndChar:this.indentate(s)+"<"+t+e+">"+i+""+t+this.tagEndChar}}function Ii(n){if(n&&n.length>0&&this.options.processEntities)for(let t=0;t65535&&(n-=65536,t+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),t+=String.fromCharCode(n),t};function Fi(n){var t;return n>=55296&&n<=57343||n>1114111?65533:(t=Ri.get(n))!==null&&t!==void 0?t:n}function Pi(n){return xi(Fi(n))}var R;(function(n){n[n.NUM=35]="NUM",n[n.SEMI=59]="SEMI",n[n.ZERO=48]="ZERO",n[n.NINE=57]="NINE",n[n.LOWER_A=97]="LOWER_A",n[n.LOWER_F=102]="LOWER_F",n[n.LOWER_X=120]="LOWER_X",n[n.To_LOWER_BIT=32]="To_LOWER_BIT"})(R||(R={}));var $;(function(n){n[n.VALUE_LENGTH=49152]="VALUE_LENGTH",n[n.BRANCH_LENGTH=16256]="BRANCH_LENGTH",n[n.JUMP_TABLE=127]="JUMP_TABLE"})($||($={}));function Mi(n){return function(e,s){let i="",o=0,r=0;for(;(r=e.indexOf("&",r))>=0;){if(i+=e.slice(o,r),o=r,r+=1,e.charCodeAt(r)===R.NUM){let d=r+1,T=10,g=e.charCodeAt(d);(g|R.To_LOWER_BIT)===R.LOWER_X&&(T=16,r+=1,d+=1);do g=e.charCodeAt(++r);while(g>=R.ZERO&&g<=R.NINE||T===16&&(g|R.To_LOWER_BIT)>=R.LOWER_A&&(g|R.To_LOWER_BIT)<=R.LOWER_F);if(d!==r){const A=e.substring(d,r),b=parseInt(A,T);if(e.charCodeAt(r)===R.SEMI)r+=1;else if(s)continue;i+=Pi(b),o=r}continue}let a=0,c=1,u=0,f=n[u];for(;r>14)-1;if(T===0)break;u+=T}}if(a!==0){const d=(n[a]&$.VALUE_LENGTH)>>14;i+=d===1?String.fromCharCode(n[a]&~$.VALUE_LENGTH):d===2?String.fromCharCode(n[a+1]):String.fromCharCode(n[a+1],n[a+2]),o=r-c+1}}return i+e.slice(o)}}function ki(n,t,e,s){const i=(t&$.BRANCH_LENGTH)>>7,o=t&$.JUMP_TABLE;if(i===0)return o!==0&&s===o?e:-1;if(o){const c=s-o;return c<0||c>=i?-1:n[e+c]-1}let r=e,a=r+i-1;for(;r<=a;){const c=r+a>>>1,u=n[c];if(us)a=c-1;else return n[c+i]}return-1}const Bi=Mi(wi);function Gi(n){return Bi(n,!0)}class Vi{constructor(){p(this,"x2jOptions",{attributeNamePrefix:"",removeNSPrefix:!0,ignoreAttributes:!1,parseAttributeValue:!0,processEntities:!1,attributeValueProcessor:(t,e)=>Gi(e)});p(this,"xmlParser",new bi.XMLParser(this.x2jOptions))}parse(t){let e;try{e=this.xmlParser.parse(t)}catch{throw new Error("XML parsing failed. Invalid BPMN source.")}if(!e.definitions)throw new Error("XML parsing failed. Unable to retrieve 'definitions' from the BPMN source.");return e}}class ee{}class Yi{warning(t){const e=t.getMessage();console.warn(e.template,...e.arguments)}}class Ui extends ee{constructor(t,e){super(),this.groupBpmnElementId=t,this.categoryValueRef=e}getMessage(){return{arguments:[this.categoryValueRef,this.groupBpmnElementId],template:"Group json deserialization: unable to find category value ref %s for bpmn element %s"}}}class Wi extends ee{constructor(t){super(),this.bpmnElementId=t}getMessage(){return{arguments:[this.bpmnElementId],template:"Shape json deserialization: unable to find bpmn element with id %s"}}}class Hi extends ee{constructor(t){super(),this.bpmnElementId=t}getMessage(){return{arguments:[this.bpmnElementId],template:"Edge json deserialization: unable to find bpmn element with id %s"}}}class Ki extends ee{constructor(t,e){super(),this.shapeOrEdgeId=t,this.labelStyleId=e}getMessage(){return{arguments:[this.labelStyleId,this.shapeOrEdgeId],template:"Unable to assign font from style %s to shape/edge %s"}}}class Di extends ee{constructor(t,e){super(),this.laneId=t,this.flowNodeRef=e}getMessage(){return{arguments:[this.flowNodeRef,this.laneId],template:"Unable to assign lane %s as parent: flow node %s is not found"}}}class zi extends ee{constructor(t,e,s){super(),this.bpmnElementId=t,this.attachedToRef=e,this.attachedToKind=s}getMessage(){return{arguments:[this.bpmnElementId,this.attachedToRef,this.attachedToKind],template:"The boundary event %s must be attached to an activity, and not to %s of kind %s"}}}class $i{constructor(){p(this,"poolsById",new Map);p(this,"poolsByProcessRef",new Map);p(this,"messageFlows",new Map);p(this,"flowNodes",new Map);p(this,"lanes",new Map);p(this,"sequenceFlows",new Map);p(this,"associationFlows",new Map);p(this,"eventDefinitionsOfDefinitions",new Map);p(this,"globalTasks",new Map);p(this,"categoryValues",new Map)}findPoolById(t){return this.poolsById.get(t)}findPoolByProcessRef(t){return this.poolsByProcessRef.get(t)}registerPool(t,e){this.poolsById.set(t.id,t),e&&this.poolsByProcessRef.set(e,t)}findMessageFlow(t){return this.messageFlows.get(t)}registerMessageFlow(t){this.messageFlows.set(t.id,t)}findFlowNode(t){return this.flowNodes.get(t)}registerFlowNode(t){this.flowNodes.set(t.id,t)}findLane(t){return this.lanes.get(t)}registerLane(t){this.lanes.set(t.id,t)}findSequenceFlow(t){return this.sequenceFlows.get(t)}registerSequenceFlow(t){this.sequenceFlows.set(t.id,t)}findAssociationFlow(t){return this.associationFlows.get(t)}registerAssociationFlow(t){this.associationFlows.set(t.id,t)}findEventDefinitionOfDefinition(t){return this.eventDefinitionsOfDefinitions.get(t)}registerEventDefinitionsOfDefinition(t,e){this.eventDefinitionsOfDefinitions.set(t,e)}findGlobalTask(t){return this.globalTasks.get(t)}registerGlobalTask(t,e){this.globalTasks.set(t,e)}findCategoryValue(t){return this.categoryValues.get(t)}registerCategoryValue(t,e){this.categoryValues.set(t,{value:e})}}const xt=(n,t,e,s)=>{const i=n.findCategoryValue(e.categoryValueRef);if(i)return new G(e.id,i.value,h.GROUP,s);t.warning(new Ui(e.id,e.categoryValueRef))};class Xi{constructor(t,e){this.convertedElements=t,this.parsingMessageCollector=e}deserialize(t){S(t).forEach(e=>this.parseCollaboration(e))}parseCollaboration(t){this.buildParticipant(t.participant),this.buildMessageFlows(t.messageFlow),this.buildGroups(t.group)}buildParticipant(t){S(t).forEach(e=>this.convertedElements.registerPool(new G(e.id,e.name,h.POOL),e.processRef))}buildMessageFlows(t){S(t).forEach(e=>this.convertedElements.registerMessageFlow(new It(e.id,e.name,e.sourceRef,e.targetRef)))}buildGroups(t){S(t).forEach(e=>{const s=xt(this.convertedElements,this.parsingMessageCollector,e);s&&this.convertedElements.registerFlowNode(s)})}}class Zi{constructor(t,e){p(this,"defaultSequenceFlowIds",[]);p(this,"elementsWithoutParentByProcessId",new Map);p(this,"callActivitiesCallingProcess",new Map);this.convertedElements=t,this.parsingMessageCollector=e}deserialize(t){S(t).forEach(e=>this.parseProcess(e)),S(t).forEach(e=>this.assignParentOfProcessElementsCalledByCallActivity(e.id))}assignParentOfProcessElementsCalledByCallActivity(t){const e=this.callActivitiesCallingProcess.get(t);if(e){const s=this.convertedElements.findPoolByProcessRef(t);s&&(s.parentId=e.id),this.elementsWithoutParentByProcessId.get(t).forEach(i=>{i.parentId=e.id})}}parseProcess(t){const e=t.id,s=this.convertedElements.findPoolByProcessRef(e);s&&!s.name&&this.convertedElements.registerPool(new G(s.id,t.name,h.POOL),e),this.buildProcessInnerElements(t,s==null?void 0:s.id)}buildProcessInnerElements(t,e){this.elementsWithoutParentByProcessId.set(t.id,[]),I.flowNodeKinds().filter(s=>s!=h.EVENT_BOUNDARY).forEach(s=>this.buildFlowNodeBpmnElements(t[s],s,e,t.id)),this.buildFlowNodeBpmnElements(t.boundaryEvent,h.EVENT_BOUNDARY,e,t.id),this.buildLaneBpmnElements(t[h.LANE],e,t.id),this.buildLaneSetBpmnElements(t.laneSet,e,t.id),this.buildSequenceFlows(t.sequenceFlow),this.buildAssociationFlows(t.association)}buildFlowNodeBpmnElements(t,e,s,i){S(t).forEach(o=>{let r;if(I.isEvent(e))r=this.buildShapeBpmnEvent(o,e,s);else if(I.isActivity(e))r=this.buildShapeBpmnActivity(o,e,s);else if(e==h.GATEWAY_EVENT_BASED){const c=o;r=new vt(o.id,c.name,s,c.instantiate,ae[c.eventGatewayType])}else if(e==h.GROUP)r=xt(this.convertedElements,this.parsingMessageCollector,o,s);else{const c=e===h.TEXT_ANNOTATION?o.text:o.name;r=new G(o.id,c,e,s,o.instantiate)}const a=o.default;I.isWithDefaultSequenceFlow(e)&&a&&this.defaultSequenceFlowIds.push(a),r&&(this.convertedElements.registerFlowNode(r),s||this.elementsWithoutParentByProcessId.get(i).push(r))})}buildShapeBpmnActivity(t,e,s){const i=ji(t);return I.isSubProcess(e)?this.buildShapeBpmnSubProcess(t,s,i):I.isCallActivity(e)?this.buildShapeBpmnCallActivity(t,s,i):new Ee(t.id,t.name,e,s,t.instantiate,i)}buildShapeBpmnCallActivity(t,e,s){const i=this.convertedElements.findGlobalTask(t.calledElement);if(!i){const o=new le(t.id,t.name,re.CALLING_PROCESS,e,s);return this.callActivitiesCallingProcess.set(t.calledElement,o),o}return new le(t.id,t.name,re.CALLING_GLOBAL_TASK,e,s,i)}buildShapeBpmnEvent(t,e,s){const i=this.getEventDefinitions(t),o=i.map(r=>r.counter).reduce((r,a)=>r+a,0);if(o==0&&I.canHaveNoneEvent(e))return new ce(t.id,t.name,e,y.NONE,s);if(o==1){const r=i[0].kind;return I.isBoundaryEvent(e)?this.buildShapeBpmnBoundaryEvent(t,r):I.isStartEvent(e)?new Nt(t.id,t.name,r,s,t.isInterrupting):new ce(t.id,t.name,e,r,s)}}buildShapeBpmnBoundaryEvent(t,e){const s=this.convertedElements.findFlowNode(t.attachedToRef);if(I.isActivity(s==null?void 0:s.kind))return new Lt(t.id,t.name,e,t.attachedToRef,t.cancelActivity);this.parsingMessageCollector.warning(new zi(t.id,t.attachedToRef,s==null?void 0:s.kind))}getEventDefinitions(t){const e=new Map;return Tt.forEach(s=>{const i=t[s+"EventDefinition"],o=S(i,!0).length;e.set(s,o)}),S(t.eventDefinitionRef).forEach(s=>{const i=this.convertedElements.findEventDefinitionOfDefinition(s);e.set(i,e.get(i)+1)}),Array.from(e.keys()).map(s=>({kind:s,counter:e.get(s)})).filter(s=>s.counter>0)}buildShapeBpmnSubProcess(t,e,s){const i=t.triggeredByEvent?fe.EVENT:fe.EMBEDDED,o=new Te(t.id,t.name,i,e,s);return this.buildProcessInnerElements(t,t.id),o}buildLaneSetBpmnElements(t,e,s){S(t).forEach(i=>this.buildLaneBpmnElements(i.lane,e,s))}buildLaneBpmnElements(t,e,s){S(t).forEach(i=>{var r;const o=new G(i.id,i.name,h.LANE,e);this.convertedElements.registerLane(o),e||this.elementsWithoutParentByProcessId.get(s).push(o),this.assignParentOfLaneFlowNodes(i),(r=i.childLaneSet)!=null&&r.lane&&this.buildLaneBpmnElements(i.childLaneSet.lane,i.id,s)})}assignParentOfLaneFlowNodes(t){S(t.flowNodeRef).forEach(e=>{const s=this.convertedElements.findFlowNode(e),i=t.id;s?I.isBoundaryEvent(s.kind)||(s.parentId=i):this.parsingMessageCollector.warning(new Di(i,e))})}buildSequenceFlows(t){S(t).forEach(e=>{const s=this.getSequenceFlowKind(e);this.convertedElements.registerSequenceFlow(new St(e.id,e.name,e.sourceRef,e.targetRef,s))})}buildAssociationFlows(t){S(t).forEach(e=>{const s=e.associationDirection;this.convertedElements.registerAssociationFlow(new At(e.id,void 0,e.sourceRef,e.targetRef,s))})}getSequenceFlowKind(t){if(this.defaultSequenceFlowIds.includes(t.id))return B.DEFAULT;{const e=this.convertedElements.findFlowNode(t.sourceRef);if(e&&I.isWithDefaultSequenceFlow(e.kind)&&t.conditionExpression)return I.isActivity(e.kind)?B.CONDITIONAL_FROM_ACTIVITY:B.CONDITIONAL_FROM_GATEWAY}return B.NORMAL}}const ji=n=>{const t=[],e=n.standardLoopCharacteristics,s=S(n.multiInstanceLoopCharacteristics,!0)[0];return e||e===""?t.push(_.LOOP):s&&t.push(s.isSequential?_.MULTI_INSTANCE_SEQUENTIAL:_.MULTI_INSTANCE_PARALLEL),t};class qi{constructor(t,e,s,i){this.x=t,this.y=e,this.width=s,this.height=i}}class Ji{constructor(t,e,s,i,o=q.NONE){this.id=t,this.bpmnElement=e,this.waypoints=s,this.label=i,this.messageVisibleKind=o}}class Qi{constructor(t,e){this.x=t,this.y=e}}class eo{constructor(t,e){this.font=t,this.bounds=e}}class to{constructor(t,e,s,i,o,r){this.name=t,this.size=e,this.isBold=s,this.isItalic=i,this.isUnderline=o,this.isStrikeThrough=r}}class pe{constructor(t,e){p(this,"convertedFonts",new Map);this.convertedElements=t,this.parsingMessageCollector=e}deserialize(t){const e=[],s=[],i=[],o=[],r=S(t)[0];if(r){this.deserializeFonts(r.BPMNLabelStyle);const a=r.BPMNPlane,c=this.deserializeEdges(a.BPMNEdge),u=this.deserializeShapes(a.BPMNShape);e.push(...u.flowNodes),s.push(...u.lanes),i.push(...u.pools),o.push(...c)}return{flowNodes:e,lanes:s,pools:i,edges:o}}deserializeFonts(t){this.convertedFonts=new Map,S(t).forEach(e=>S(e.Font).forEach(s=>this.convertedFonts.set(e.id,new to(s.name,s.size,s.isBold,s.isItalic,s.isUnderline,s.isStrikeThrough))))}deserializeShapes(t){const e={flowNodes:[],lanes:[],pools:[]};return S(t).forEach(s=>{this.deserializeShapeAndStoreIfFound(s,e.flowNodes,i=>this.convertedElements.findFlowNode(i))||this.deserializeShapeAndStoreIfFound(s,e.lanes,i=>this.convertedElements.findLane(i))||this.deserializeShapeAndStoreIfFound(s,e.pools,i=>this.convertedElements.findPoolById(i))||this.parsingMessageCollector.warning(new Wi(s.bpmnElement))}),e}deserializeShapeAndStoreIfFound(t,e,s){const i=this.deserializeShape(t,s);return i?(e.push(i),!0):!1}deserializeShape(t,e){const s=e(t.bpmnElement);if(s){const i=pe.deserializeBounds(t);(s instanceof Te||s instanceof le&&s.callActivityKind===re.CALLING_PROCESS)&&!t.isExpanded&&s.markers.push(_.EXPAND);let o;I.isPoolOrLane(s.kind)&&(o=t.isHorizontal!==void 0?t.isHorizontal:!0);const r=this.deserializeLabel(t.BPMNLabel,t.id);return new he(t.id,s,i,r,o)}}static deserializeBounds(t){const e=t.Bounds;if(e)return new qi(e.x,e.y,e.width,e.height)}deserializeEdges(t){return S(t).map(e=>{const s=this.convertedElements.findSequenceFlow(e.bpmnElement)||this.convertedElements.findMessageFlow(e.bpmnElement)||this.convertedElements.findAssociationFlow(e.bpmnElement);if(!s){this.parsingMessageCollector.warning(new Hi(e.bpmnElement));return}const i=this.deserializeWaypoints(e.waypoint),o=this.deserializeLabel(e.BPMNLabel,e.id),r=e.messageVisibleKind?e.messageVisibleKind:q.NONE;return new Ji(e.id,s,i,o,r)}).filter(Boolean)}deserializeWaypoints(t){return S(t).map(e=>new Qi(e.x,e.y))}deserializeLabel(t,e){if(t&&typeof t=="object"){const s=this.findFont(t.labelStyle,e),i=pe.deserializeBounds(t);if(s||i)return new eo(s,i)}}findFont(t,e){let s;return t&&(s=this.convertedFonts.get(t),s||this.parsingMessageCollector.warning(new Ki(e,t))),s}}class no{constructor(t){this.convertedElements=t}deserialize(t){Tt.forEach(e=>{const s=t[e+"EventDefinition"];S(s,!0).forEach(i=>this.convertedElements.registerEventDefinitionsOfDefinition(i.id,e))})}}class so{constructor(t){this.convertedElements=t}deserialize(t){this.parseGlobalTasks(t.globalTask,h.GLOBAL_TASK),this.parseGlobalTasks(t.globalBusinessRuleTask,h.GLOBAL_TASK_BUSINESS_RULE),this.parseGlobalTasks(t.globalManualTask,h.GLOBAL_TASK_MANUAL),this.parseGlobalTasks(t.globalScriptTask,h.GLOBAL_TASK_SCRIPT),this.parseGlobalTasks(t.globalUserTask,h.GLOBAL_TASK_USER)}parseGlobalTasks(t,e){S(t).forEach(s=>this.convertedElements.registerGlobalTask(s.id,e))}}class io{constructor(t){this.convertedElements=t}deserialize(t){S(t.category).forEach(e=>S(e.categoryValue).forEach(s=>this.convertedElements.registerCategoryValue(s.id,s.value)))}}class oo{constructor(t,e,s,i,o,r){this.categoryConverter=t,this.collaborationConverter=e,this.eventDefinitionConverter=s,this.globalTaskConverter=i,this.processConverter=o,this.diagramConverter=r}parse(t){const e=t.definitions;return this.categoryConverter.deserialize(e),this.collaborationConverter.deserialize(e.collaboration),this.eventDefinitionConverter.deserialize(e),this.globalTaskConverter.deserialize(e),this.processConverter.deserialize(e.process),this.diagramConverter.deserialize(e.BPMNDiagram)}}function ro(n){const t=new $i;return new oo(new io(t),new Xi(t,n),new no(t),new so(t),new Zi(t,n),new pe(t,n))}class ao{constructor(t,e){this.jsonParser=t,this.xmlParser=e}parse(t){const e=this.xmlParser.parse(t);return this.jsonParser.parse(e)}}function lo(){return new ao(ro(new Yi),new Vi)}class co{constructor(){p(this,"classNamesByBPMNId",new Map)}clear(){this.classNamesByBPMNId.clear()}getClassNames(t){return Array.from(this.classNamesByBPMNId.get(t)??[])}addClassNames(t,e){return this.updateClassNames(t,e,(s,i)=>s.add(i))}removeClassNames(t,e){return this.updateClassNames(t,e,(s,i)=>s.delete(i))}toggleClassNames(t,e){return this.updateClassNames(t,e,(s,i)=>s.has(i)?s.delete(i):s.add(i)),e&&e.length>0}updateClassNames(t,e,s){const i=this.getOrInitializeClassNames(t),o=i.size;return S(e).forEach(r=>s(i,r)),i.size!=o}getOrInitializeClassNames(t){let e=this.classNamesByBPMNId.get(t);return e==null&&(e=new Set,this.classNamesByBPMNId.set(t,e)),e}}class ze{constructor(){p(this,"overlayPositions",new Map([["start",{horizontalAlign:"left",verticalAlign:"top"}],["middle",{horizontalAlign:"center",verticalAlign:"top"}],["end",{horizontalAlign:"right",verticalAlign:"top"}],["top-left",{horizontalAlign:"left",verticalAlign:"top"}],["top-right",{horizontalAlign:"right",verticalAlign:"top"}],["top-center",{horizontalAlign:"center",verticalAlign:"top"}],["bottom-left",{horizontalAlign:"left",verticalAlign:"bottom"}],["bottom-right",{horizontalAlign:"right",verticalAlign:"bottom"}],["bottom-center",{horizontalAlign:"center",verticalAlign:"bottom"}],["middle-left",{horizontalAlign:"left",verticalAlign:"middle"}],["middle-right",{horizontalAlign:"right",verticalAlign:"middle"}]]))}convert(t){const e=this.convertPosition(t),s=ze.convertStyle(t);return{position:e,style:s}}convertPosition(t){return this.overlayPositions.get(t.position)}static convertStyle(t){const e={fill:{color:m.DEFAULT_OVERLAY_FILL_COLOR.valueOf(),opacity:m.DEFAULT_OVERLAY_FILL_OPACITY.valueOf()},stroke:{color:m.DEFAULT_OVERLAY_STROKE_COLOR.valueOf(),width:m.DEFAULT_OVERLAY_STROKE_WIDTH.valueOf()},font:{color:m.DEFAULT_OVERLAY_FONT_COLOR.valueOf(),size:m.DEFAULT_OVERLAY_FONT_SIZE.valueOf()}},s=t.style,i={...e};return s&&(this.convertFill(i,s.fill),this.convertStroke(i,s.stroke),this.convertFont(i,s.font)),i}static convertFill(t,e){e&&(t.fill.color=e.color??t.fill.color,t.fill.opacity=e.opacity??t.fill.opacity)}static convertStroke(t,e){e&&(t.stroke.color=e.color??t.stroke.color,t.stroke.width=e.width??t.stroke.width)}static convertFont(t,e){e&&(t.font.color=e.color??t.font.color,t.font.size=e.size??t.font.size)}}function uo(n){return new ho(n,new ze)}class ho{constructor(t,e){this.graph=t,this.overlayConverter=e}updateAndRefreshCssClassesOfCell(t,e){this.updateAndRefreshCssClassesOfElement(t,e),this.updateAndRefreshCssClassesOfElement(Ot(t),e)}updateAndRefreshCssClassesOfElement(t,e){var r;const s=this.graph.getModel().getCell(t);if(!s)return;const o=this.graph.getView().getState(s);o.style[E.EXTRA_CSS_CLASSES]=e,o.shape.redraw(),(r=o.text)==null||r.redraw()}addOverlays(t,e){const s=this.graph.getModel().getCell(t);!s||S(e).forEach(i=>{const o=new mt(i.label,this.overlayConverter.convert(i));this.graph.addCellOverlay(s,o)})}removeAllOverlays(t){const e=this.graph.getModel().getCell(t);!e||this.graph.removeCellOverlays(e)}}class fo{element(t){return`svg > g > g > g[data-bpmn-id="${t}"]`}elementsOfKind(t){return`svg > g > g > g.${t}:not(.bpmn-label)`}}function go(n,t){return new To(n,new po(t.container,new fo),new co,uo(t))}class To{constructor(t,e,s,i){this.bpmnModelRegistry=t,this.htmlElementRegistry=e,this.cssRegistry=s,this.graphCellUpdater=i,this.bpmnModelRegistry.registerOnLoadCallback(this.cssRegistry.clear.bind(this.cssRegistry))}getElementsByIds(t){return S(t).map(e=>this.bpmnModelRegistry.getBpmnSemantic(e)).filter(Boolean).map(e=>({bpmnSemantic:e,htmlElement:this.htmlElementRegistry.getBpmnHtmlElement(e.id)}))}getElementsByKinds(t){return S(t).map(e=>this.htmlElementRegistry.getBpmnHtmlElements(e).map(s=>({htmlElement:s,bpmnSemantic:this.bpmnModelRegistry.getBpmnSemantic(s.getAttribute("data-bpmn-id"))}))).reduce((e,s)=>(e.push(...s),e),[])}addCssClasses(t,e){this.updateCssClasses(t,e,this.cssRegistry.addClassNames.bind(this.cssRegistry))}removeCssClasses(t,e){this.updateCssClasses(t,e,this.cssRegistry.removeClassNames.bind(this.cssRegistry))}toggleCssClasses(t,e){this.updateCssClasses(t,e,this.cssRegistry.toggleClassNames.bind(this.cssRegistry))}updateCssClasses(t,e,s){const i=S(e);S(t).forEach(o=>this.updateCellIfChanged(s(o,i),o))}updateCellIfChanged(t,e){if(t){const s=this.cssRegistry.getClassNames(e);this.graphCellUpdater.updateAndRefreshCssClassesOfCell(e,s)}}addOverlays(t,e){this.graphCellUpdater.addOverlays(t,e)}removeAllOverlays(t){this.graphCellUpdater.removeAllOverlays(t)}}class po{constructor(t,e){this.container=t,this.querySelectors=e}getBpmnHtmlElement(t){return this.container.querySelector(this.querySelectors.element(t))}getBpmnHtmlElements(t){const e=this.querySelectors.elementsOfKind(ye(t));return[...this.container.querySelectorAll(e)]}}class Eo{filter(t,e){const s=[],i=[];if(S(e==null?void 0:e.pools).filter(g=>g&&Object.keys(g).length).forEach(g=>g.id?s.push(g.id):g.name&&i.push(g.name)),s.length==0&&i.length==0)return t;const{filteredPools:o,filteredPoolIds:r}=mo(t,s,i),a=[...s,...r],{filteredLanes:c,filteredLaneIds:u,filteredFlowNodes:f,filteredFlowNodeIds:d}=Ft(t.lanes,t.flowNodes,a),T=So(t.edges,[...a,...u,...d]);if(o.length==0&&c.length==0&&f.length==0&&T.length==0){let g=s.length>0?` for ids [${s}]`:"";const A=g?" and":"";throw g+=i.length>0?`${A} for names [${i}]`:"",new Error("No matching pools"+g)}return{lanes:c,flowNodes:f,pools:o,edges:T}}}function mo(n,t,e){const s=n.pools.filter(o=>t.includes(o.bpmnElement.id)||e.includes(o.bpmnElement.name)),i=s.map(o=>o.bpmnElement.id);return{filteredPools:s,filteredPoolIds:i}}function Ft(n,t,e){const{filteredLanes:s,filteredLaneIds:i}=Pt(n,e),{filteredLanes:o,filteredLaneIds:r,filteredFlowNodes:a,filteredFlowNodeIds:c}=Co(t,[...e,...i],n);return s.push(...o),i.push(...r),{filteredLanes:s,filteredLaneIds:i,filteredFlowNodes:a,filteredFlowNodeIds:c}}function Pt(n,t){const e=n.filter(i=>t.includes(i.bpmnElement.parentId)),s=e.map(i=>i.bpmnElement.id);if(e.length>0){const{filteredLanes:i,filteredLaneIds:o}=Pt(n,s);e.push(...i),s.push(...o)}return{filteredLanes:e,filteredLaneIds:s}}function Co(n,t,e){const s=n.filter(u=>t.includes(u.bpmnElement.parentId));if(s.length===0)return{filteredLanes:[],filteredLaneIds:[],filteredFlowNodes:[],filteredFlowNodeIds:[]};const i=s.map(u=>u.bpmnElement.id),{filteredLanes:o,filteredLaneIds:r,filteredFlowNodes:a,filteredFlowNodeIds:c}=Ft(e,n,i);return s.push(...a),i.push(...c),{filteredLanes:o,filteredLaneIds:r,filteredFlowNodes:s,filteredFlowNodeIds:i}}function So(n,t){return n.filter(e=>t.includes(e.bpmnElement.sourceRefId)&&t.includes(e.bpmnElement.targetRefId))}class Io{constructor(){p(this,"searchableModel");p(this,"onLoadCallback")}load(t,e){var i;const s=new Eo().filter(t,e);return this.searchableModel=new No(s),(i=this.onLoadCallback)==null||i.call(this),Ao(s)}registerOnLoadCallback(t){this.onLoadCallback=t}getBpmnSemantic(t){const e=this.searchableModel.elementById(t);if(!e)return;const s=e.bpmnElement,i=s instanceof G;return{id:t,name:s.name,isShape:i,kind:s.kind}}}function Ao(n){const t=n.flowNodes.filter(o=>{const r=o.bpmnElement;return I.isSubProcess(r.kind)&&r.markers.includes(_.EXPAND)}).map(o=>o.bpmnElement.id),e=[],s=[],i=[];return n.flowNodes.forEach(o=>{const r=o.bpmnElement.kind;I.isSubProcess(r)?e.push(o):I.isBoundaryEvent(r)?s.push(o):t.includes(o.bpmnElement.parentId)||i.push(o)}),{boundaryEvents:s,edges:n.edges,lanes:n.lanes,otherFlowNodes:i,pools:n.pools,subprocesses:e}}class No{constructor(t){p(this,"elements",new Map);[].concat(t.pools,t.lanes,t.flowNodes,t.edges).forEach(e=>this.elements.set(e.bpmnElement.id,e))}elementById(t){return this.elements.get(t)}}function Lo(n){return n instanceof HTMLElement?n:document.getElementById(n)}class vo{constructor(t){this.graph=t}fit(t){this.graph.customFit(t)}zoom(t){t=="in"?this.graph.zoomIn():this.graph.zoomOut()}}const Oo="0.29.2",_o=()=>({lib:Oo,dependencies:new Map([["mxGraph",l.mxClient.VERSION]])});class yo{constructor(t){p(this,"graph");p(this,"navigation");p(this,"bpmnElementsRegistry");p(this,"bpmnModelRegistry");const e=new gs(Lo(t==null?void 0:t.container));this.graph=e.configure(t),this.navigation=new vo(this.graph),this.bpmnModelRegistry=new Io,this.bpmnElementsRegistry=go(this.bpmnModelRegistry,this.graph)}load(t,e){const s=lo().parse(t),i=this.bpmnModelRegistry.load(s,e==null?void 0:e.modelFilter);Es(this.graph).render(i,e==null?void 0:e.fit)}getVersion(){return _o()}}const bo=new Map([["dark",{defaultFillColor:"#334352",defaultFontColor:"white",defaultStrokeColor:"#c0ddeb",endEventFillColor:"pink",endEventStrokeColor:"FireBrick",startEventFillColor:"DarkSeaGreen",startEventStrokeColor:"DarkGreen",taskAndCallActivityFillColor:"#5c8599",laneFillColor:"#2b3742",poolFillColor:"#232b33"}],["brown",{defaultFillColor:"#ede7e1",defaultFontColor:"#414666",defaultStrokeColor:"#414666",flowColor:"#666666",catchAndThrowEventStrokeColor:"#377f87",endEventFillColor:"pink",endEventStrokeColor:"FireBrick",startEventFillColor:"DarkSeaGreen",startEventStrokeColor:"DarkGreen",taskAndCallActivityFillColor:"#dadce8",laneFillColor:"#d4c3b2",poolFillColor:"#d1b9a1"}],["light-blue",{defaultFillColor:"#ffffff",defaultFontColor:"#002395",defaultStrokeColor:"#002395",endEventFillColor:"#f9dadc",endEventStrokeColor:"#e20613",startEventFillColor:"#ffffff",startEventStrokeColor:"#05d99e",taskAndCallActivityFillColor:"rgba(132,158,253,0.1)",textAnnotationFillColor:"rgba(237,237,245,0.5)",laneFillColor:"#edeef5",poolFillColor:"#dbefff"}]]);class wo extends yo{configureTheme(t){if(t=="default")return new pt(this.graph).configureStyles(),!0;const e=bo.get(t);if(!e)return!1;const s=this.graph.getStylesheet();I.eventKinds().forEach(f=>{let d,T;switch(f){case"endEvent":d=e.endEventFillColor,T=e.endEventStrokeColor;break;case"startEvent":d=e.startEventFillColor,T=e.startEventStrokeColor;break;case"intermediateCatchEvent":case"intermediateThrowEvent":case"boundaryEvent":d=e.defaultFillColor,T=e.catchAndThrowEventStrokeColor??e.defaultStrokeColor;break;default:d=e.defaultFillColor,T=e.defaultStrokeColor;break}const g=s.styles[f];g.fillColor=d,g.strokeColor=T}),I.taskKinds().forEach(f=>{const d=s.styles[f];d.fillColor=e.taskAndCallActivityFillColor});const i=s.styles[h.CALL_ACTIVITY];i.fillColor=e.taskAndCallActivityFillColor;const o=s.styles[h.TEXT_ANNOTATION];o.fillColor=e.textAnnotationFillColor??m.TEXT_ANNOTATION_FILL_COLOR;const r=s.styles[h.POOL];r.fillColor=e.poolFillColor,r.swimlaneFillColor=e.defaultFillColor;const a=s.styles[h.LANE];a.fillColor=e.laneFillColor;const c=s.getDefaultVertexStyle();c.fontColor=e.defaultFontColor,c.fillColor=e.defaultFillColor,c.strokeColor=e.defaultStrokeColor;const u=s.getDefaultEdgeStyle();return u.fontColor=e.defaultFontColor,u.fillColor=e.defaultFillColor,u.strokeColor=e.flowColor??e.defaultStrokeColor,!0}configureSequenceFlowColor(t){V(`Use dedicated ${t} color for sequence flows`);const s=this.graph.getStylesheet().styles[M.SEQUENCE_FLOW];s[l.mxConstants.STYLE_STROKECOLOR]=t,s[l.mxConstants.STYLE_FILLCOLOR]=t,V("Sequence flows style updated")}}let L,U={},$e,Xe;function Ho(n){v("Updating load options",n),U.fit=n,v("Load options updated!",Fe(U))}function Ko(){return{...U}}function Do(){return Xe}function zo(n){v("Switching theme from %s to %s",Xe,n),L.configureTheme(n)&&(L.graph.refresh(),v("Theme switch done"))}function Mt(n){v("Loading bpmn...");try{L.load(n,U),v("BPMN loaded with configuration",Fe(U)),Ro($e),document.dispatchEvent(new CustomEvent("diagramLoaded"))}catch(t){Me(t,`Cannot load the BPMN diagram: ${t.message}`)}}function $o(n){v("Fitting..."),L.navigation.fit(n),v("Fit done with configuration",Fe(n))}function Xo(n){v(`Zooming '${n}'...`),L.navigation.zoom(n),v("Zoom done")}function Zo(n){return L.bpmnElementsRegistry.getElementsByKinds(n)}function jo(n,t){return L.bpmnElementsRegistry.addCssClasses(n,t)}function qo(n,t){return L.bpmnElementsRegistry.removeCssClasses(n,t)}function Jo(n,t){return L.bpmnElementsRegistry.addOverlays(n,[t])}function Qo(n){return L.bpmnElementsRegistry.removeAllOverlays(n)}function Ro(n){if(!$e)return;v("Updating model, bpmnElement to collapse:",n);const t=L.graph.getModel(),e=t.getCell(n);if(!e)v("Element not found in the model, do nothing");else{t.beginUpdate();try{t.setCollapsed(e,!0)}finally{t.endUpdate()}v("Model updated")}}function kt(n){const t=new FileReader;t.onload=()=>{Mt(t.result)},t.readAsText(n)}function er(n){const t=n.target.files[0];kt(t)}function xo(n,t){Yt(n).catch(e=>{const s=`Unable to fetch ${n}. ${e}`;throw t(s),new Error(s)}).then(e=>(v("BPMN content fetched"),e)).then(e=>{Mt(e),v(`Bpmn loaded from url ${n}`)}).catch(()=>{})}function Fo(n){Me(n)}function Po(n,t){var o;const e=((o=n.loadOptions)==null?void 0:o.fit)||{},s=t.get("fitTypeOnLoad");s&&(e.type=s);const i=t.get("fitMargin");return i&&(e.margin=Number(i)),e}function Mo(n){if(n.get("style.container.alternative.background.color")=="true"){const o="yellow";V("Use alternative color for the bpmn container background, color",o);const r=L.graph.container;r.style.backgroundColor=o,V("Bpmn container style updated")}const e=n.get("style.theme");V(`Configuring the '${e}' BPMN theme`),L.configureTheme(e)?(Xe=e,V(`'${e}' BPMN theme configured`)):V(`Unknown '${e}' BPMN theme, skipping configuration`),n.get("style.seqFlow.light.colors")=="true"&&L.configureSequenceFlowColor("#E9E9E9")}function ko(n){$e=n.get("bpmn.element.id.collapsed")}function Bo(n){const t=n.get("bpmn.filter.pool.ids");if(!t)return;const e=t.split(",");return v("Configuring load options to only include pool id: ",e),{pools:e.map(s=>({id:s}))}}function tr(n){const t=V;t(`Initializing BpmnVisualization with container '${n.globalOptions.container}'...`),L=new wo(n.globalOptions),t("Initialization completed"),new Ut(window,"drop-container",L.graph.container,kt),t("Drag&Drop support initialized");const e=new URLSearchParams(window.location.search);t("Configuring Load Options"),U=n.loadOptions||{},U.fit=Po(n,e),U.modelFilter=Bo(e),Mo(e),ko(e),t("Checking if an 'url to fetch BPMN content' is provided as query parameter");const s=e.get("url");if(s){const i=decodeURIComponent(s),o=n.statusFetchKoNotifier||Fo;xo(i,o);return}t("No 'url to fetch BPMN content' provided")}function nr(){Z("Trigger SVG Download"),Kt(new ft(L.graph).exportSvg())}function sr(){Z("Trigger PNG Download"),Dt(new ft(L.graph).exportSvgForPng())}function ir(){const n=L.getVersion();return v("Version:",n),n}export{oe as F,I as S,zt as Z,zo as a,ir as b,Do as c,Yo as d,Qo as e,$o as f,Ko as g,er as h,nr as i,sr as j,Zo as k,v as l,jo as m,Jo as n,qo as r,tr as s,Ho as u,Xo as z};
diff --git a/demo/monitoring-all-process-instances/index.html b/demo/monitoring-all-process-instances/index.html
index dd015740..bc596a68 100644
--- a/demo/monitoring-all-process-instances/index.html
+++ b/demo/monitoring-all-process-instances/index.html
@@ -25,7 +25,7 @@
-
+
diff --git a/demo/predictions/index.html b/demo/predictions/index.html
index 043bb3bb..f5d304c1 100644
--- a/demo/predictions/index.html
+++ b/demo/predictions/index.html
@@ -24,7 +24,7 @@
-
+
diff --git a/examples/custom-behavior/apply-css-classes/index.html b/examples/custom-behavior/apply-css-classes/index.html
index 4db9e3b9..c96a5101 100644
--- a/examples/custom-behavior/apply-css-classes/index.html
+++ b/examples/custom-behavior/apply-css-classes/index.html
@@ -86,7 +86,7 @@
}
-
+
diff --git a/examples/custom-behavior/call-activity-with-modal-on-mouse-over/index.html b/examples/custom-behavior/call-activity-with-modal-on-mouse-over/index.html
index a8387bce..35fd7ac1 100644
--- a/examples/custom-behavior/call-activity-with-modal-on-mouse-over/index.html
+++ b/examples/custom-behavior/call-activity-with-modal-on-mouse-over/index.html
@@ -34,7 +34,7 @@
-
+
diff --git a/examples/custom-behavior/call-activity-with-reload-on-dblclick/index.html b/examples/custom-behavior/call-activity-with-reload-on-dblclick/index.html
index bff12ce2..0bd5f187 100644
--- a/examples/custom-behavior/call-activity-with-reload-on-dblclick/index.html
+++ b/examples/custom-behavior/call-activity-with-reload-on-dblclick/index.html
@@ -36,7 +36,7 @@
-
+
diff --git a/examples/custom-behavior/call-activity-with-tabs-on-click/index.html b/examples/custom-behavior/call-activity-with-tabs-on-click/index.html
index 56cce427..5b4c7d9b 100644
--- a/examples/custom-behavior/call-activity-with-tabs-on-click/index.html
+++ b/examples/custom-behavior/call-activity-with-tabs-on-click/index.html
@@ -36,7 +36,7 @@
-
+
diff --git a/examples/custom-behavior/growing-sequence-flow/index.html b/examples/custom-behavior/growing-sequence-flow/index.html
index bb513f5a..feb7039a 100644
--- a/examples/custom-behavior/growing-sequence-flow/index.html
+++ b/examples/custom-behavior/growing-sequence-flow/index.html
@@ -57,7 +57,7 @@
-
+
diff --git a/examples/custom-behavior/javascript-tooltip-and-popover/index.html b/examples/custom-behavior/javascript-tooltip-and-popover/index.html
index b44e4bcc..eebd17fb 100644
--- a/examples/custom-behavior/javascript-tooltip-and-popover/index.html
+++ b/examples/custom-behavior/javascript-tooltip-and-popover/index.html
@@ -50,7 +50,7 @@
-
+
diff --git a/examples/custom-behavior/running-dashed-message-flow/index.html b/examples/custom-behavior/running-dashed-message-flow/index.html
index fcd8dd00..3da6b059 100644
--- a/examples/custom-behavior/running-dashed-message-flow/index.html
+++ b/examples/custom-behavior/running-dashed-message-flow/index.html
@@ -57,7 +57,7 @@
-
+
diff --git a/examples/custom-behavior/select-elements-by-bpmn-kind/index.html b/examples/custom-behavior/select-elements-by-bpmn-kind/index.html
index 625287fe..4e03878f 100644
--- a/examples/custom-behavior/select-elements-by-bpmn-kind/index.html
+++ b/examples/custom-behavior/select-elements-by-bpmn-kind/index.html
@@ -55,7 +55,7 @@
}
-
+
diff --git a/examples/custom-bpmn-theme/custom-colors/index.html b/examples/custom-bpmn-theme/custom-colors/index.html
index c8a5c54e..3b1aa35a 100644
--- a/examples/custom-bpmn-theme/custom-colors/index.html
+++ b/examples/custom-bpmn-theme/custom-colors/index.html
@@ -22,7 +22,7 @@
-
+
diff --git a/examples/custom-bpmn-theme/custom-edge-marker-colors/index.html b/examples/custom-bpmn-theme/custom-edge-marker-colors/index.html
index dd1638c1..031c5334 100644
--- a/examples/custom-bpmn-theme/custom-edge-marker-colors/index.html
+++ b/examples/custom-bpmn-theme/custom-edge-marker-colors/index.html
@@ -36,7 +36,7 @@
-
+
diff --git a/examples/custom-bpmn-theme/custom-fonts/index.html b/examples/custom-bpmn-theme/custom-fonts/index.html
index b985fe9f..fecf9bc4 100644
--- a/examples/custom-bpmn-theme/custom-fonts/index.html
+++ b/examples/custom-bpmn-theme/custom-fonts/index.html
@@ -22,7 +22,7 @@
-
+
diff --git a/examples/custom-bpmn-theme/custom-user-task-icon/index.html b/examples/custom-bpmn-theme/custom-user-task-icon/index.html
index a208a7c1..8b9cb86c 100644
--- a/examples/custom-bpmn-theme/custom-user-task-icon/index.html
+++ b/examples/custom-bpmn-theme/custom-user-task-icon/index.html
@@ -22,7 +22,7 @@
-
+
diff --git a/examples/diagram-navigation/diagram-fit-after-load/index.html b/examples/diagram-navigation/diagram-fit-after-load/index.html
index 476fa45f..b20f57b7 100644
--- a/examples/diagram-navigation/diagram-fit-after-load/index.html
+++ b/examples/diagram-navigation/diagram-fit-after-load/index.html
@@ -53,7 +53,7 @@
-
+
diff --git a/examples/diagram-navigation/diagram-fit-on-load/index.html b/examples/diagram-navigation/diagram-fit-on-load/index.html
index 55d03f28..702847b5 100644
--- a/examples/diagram-navigation/diagram-fit-on-load/index.html
+++ b/examples/diagram-navigation/diagram-fit-on-load/index.html
@@ -40,7 +40,7 @@
-
+
diff --git a/examples/diagram-navigation/diagram-navigation/index.html b/examples/diagram-navigation/diagram-navigation/index.html
index 51d4e5aa..de9a4fef 100644
--- a/examples/diagram-navigation/diagram-navigation/index.html
+++ b/examples/diagram-navigation/diagram-navigation/index.html
@@ -34,7 +34,7 @@
}
-
+
diff --git a/examples/display-bpmn-diagram/load-local-bpmn-diagrams/index.html b/examples/display-bpmn-diagram/load-local-bpmn-diagrams/index.html
index 309686a9..6b524091 100644
--- a/examples/display-bpmn-diagram/load-local-bpmn-diagrams/index.html
+++ b/examples/display-bpmn-diagram/load-local-bpmn-diagrams/index.html
@@ -50,7 +50,7 @@
-
+
diff --git a/examples/display-bpmn-diagram/load-remote-bpmn-diagrams/index.html b/examples/display-bpmn-diagram/load-remote-bpmn-diagrams/index.html
index 129117e7..a2e50805 100644
--- a/examples/display-bpmn-diagram/load-remote-bpmn-diagrams/index.html
+++ b/examples/display-bpmn-diagram/load-remote-bpmn-diagrams/index.html
@@ -60,7 +60,7 @@
-
+
diff --git a/examples/display-bpmn-diagram/pools-filter-on-load/index.html b/examples/display-bpmn-diagram/pools-filter-on-load/index.html
index 1f6c984b..1840fb42 100644
--- a/examples/display-bpmn-diagram/pools-filter-on-load/index.html
+++ b/examples/display-bpmn-diagram/pools-filter-on-load/index.html
@@ -34,7 +34,7 @@
-
+
diff --git a/examples/misc/compare-with-bpmn-js/index.html b/examples/misc/compare-with-bpmn-js/index.html
index 64496cf4..6a3745f4 100644
--- a/examples/misc/compare-with-bpmn-js/index.html
+++ b/examples/misc/compare-with-bpmn-js/index.html
@@ -59,7 +59,7 @@
-
+
diff --git a/examples/misc/compare-with-kie-editors-standalone/index.html b/examples/misc/compare-with-kie-editors-standalone/index.html
index 0fec7844..ce444cc9 100644
--- a/examples/misc/compare-with-kie-editors-standalone/index.html
+++ b/examples/misc/compare-with-kie-editors-standalone/index.html
@@ -60,7 +60,7 @@
-
+
diff --git a/examples/overlays/add-remove/index.html b/examples/overlays/add-remove/index.html
index 435ca0dd..0e7f9d96 100644
--- a/examples/overlays/add-remove/index.html
+++ b/examples/overlays/add-remove/index.html
@@ -48,7 +48,7 @@
-
+
diff --git a/examples/overlays/add-stylized/index.html b/examples/overlays/add-stylized/index.html
index 3736dc2f..35099970 100644
--- a/examples/overlays/add-stylized/index.html
+++ b/examples/overlays/add-stylized/index.html
@@ -43,7 +43,7 @@
-
+
diff --git a/examples/overlays/custom-overlay-default-style/index.html b/examples/overlays/custom-overlay-default-style/index.html
index e8e8b34d..aa49b3ad 100644
--- a/examples/overlays/custom-overlay-default-style/index.html
+++ b/examples/overlays/custom-overlay-default-style/index.html
@@ -29,7 +29,7 @@
-
+
diff --git a/projects/javascript-vanilla-with-webpack/package.json b/projects/javascript-vanilla-with-webpack/package.json
index 825ebb3e..2198bd80 100644
--- a/projects/javascript-vanilla-with-webpack/package.json
+++ b/projects/javascript-vanilla-with-webpack/package.json
@@ -9,7 +9,7 @@
"serve": "webpack serve"
},
"dependencies": {
- "bpmn-visualization": "0.29.1"
+ "bpmn-visualization": "0.29.2"
},
"devDependencies": {
"html-webpack-plugin": "~5.5.0",
diff --git a/projects/typescript-angular/package.json b/projects/typescript-angular/package.json
index 55742d3b..8f81c8c9 100644
--- a/projects/typescript-angular/package.json
+++ b/projects/typescript-angular/package.json
@@ -18,7 +18,7 @@
"@angular/platform-browser": "~14.2.9",
"@angular/platform-browser-dynamic": "~14.2.9",
"@angular/router": "~14.2.9",
- "bpmn-visualization": "0.29.1",
+ "bpmn-visualization": "0.29.2",
"rxjs": "~7.5.7",
"tslib": "~2.4.1",
"zone.js": "~0.11.8"
diff --git a/projects/typescript-vanilla-with-parcel/package.json b/projects/typescript-vanilla-with-parcel/package.json
index cde13f9f..c7ef96c5 100644
--- a/projects/typescript-vanilla-with-parcel/package.json
+++ b/projects/typescript-vanilla-with-parcel/package.json
@@ -8,7 +8,7 @@
"build": "tsc && parcel build --public-url ./ index.html"
},
"dependencies": {
- "bpmn-visualization": "0.29.1"
+ "bpmn-visualization": "0.29.2"
},
"devDependencies": {
"@parcel/core": "~2.8.2",
diff --git a/projects/typescript-vanilla-with-rollup/package.json b/projects/typescript-vanilla-with-rollup/package.json
index 3c97af36..2f19095d 100644
--- a/projects/typescript-vanilla-with-rollup/package.json
+++ b/projects/typescript-vanilla-with-rollup/package.json
@@ -10,7 +10,7 @@
"start": "rollup -cw --environment devMode:true"
},
"dependencies": {
- "bpmn-visualization": "0.29.1"
+ "bpmn-visualization": "0.29.2"
},
"devDependencies": {
"@rollup/plugin-commonjs": "~22.0.2",
diff --git a/projects/typescript-vanilla-with-vitejs/package.json b/projects/typescript-vanilla-with-vitejs/package.json
index 02f8180a..f1d0b16d 100644
--- a/projects/typescript-vanilla-with-vitejs/package.json
+++ b/projects/typescript-vanilla-with-vitejs/package.json
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
- "bpmn-visualization": "0.29.1"
+ "bpmn-visualization": "0.29.2"
},
"devDependencies": {
"typescript": "~4.5.5",