7){e[t].shift();for(var i=e[t];i.length;)a[t]="A",e.splice(t++,0,["C",...i.splice(0,6)]);e.splice(t,1),p=n.length}},a=[],s="",c="",l=0,p=n.length;l=r.right,s=i.top-n.y>=r.bottom,c=o?"top":s?"bottom":null,l=i.right+n.x<=r.left?"left":a?"right":null;return l&&c?c+"-"+l:l||c||"intersect"}function Nr(e,t,n){var i=xr(e,t);return 1===i.length||2===i.length&&Hi(i[0],i[1])<1?Pr(i[0]):i.length>1?Pr((i=W(i,(function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t})))[n?0:i.length-1]):null}function Or(e,t,n){return Q({id:e.id,type:e.$type,businessObject:e,di:t},n)}function jr(e,t,n){var i=e.waypoint;return!i||i.length<2?[Dr(t),Dr(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function Lr(e,t,n){return new Error(`element ${bn(t)} referenced by ${bn(e)}#${n} not yet drawn`)}function Ir(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._textRenderer=r}Ir.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],Ir.prototype.add=function(e,t,n){var i,r,o,a,s,c,l;if(Sn(t,"bpmndi:BPMNPlane")){var p=Sn(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};i=this._elementFactory.createRoot(Or(e,t,p)),this._canvas.addRootElement(i)}else if(Sn(t,"bpmndi:BPMNShape")){var u=!Un(e,t),d=function(e){return Sn(e,"bpmn:Group")}(e);r=n&&(n.hidden||n.collapsed);var h=t.bounds;i=this._elementFactory.createShape(Or(e,t,{collapsed:u,hidden:r,x:Math.round(h.x),y:Math.round(h.y),width:Math.round(h.width),height:Math.round(h.height),isFrame:d})),Sn(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,i),Sn(e,"bpmn:Lane")&&(o=0),Sn(e,"bpmn:DataStoreReference")&&(a=n,s=Dr(h),c=s.x,l=s.y,c>=a.x&&c<=a.x+a.width&&l>=a.y&&l<=a.y+a.height||(n=this._canvas.findRoot(n))),this._canvas.addShape(i,n,o)}else{if(!Sn(t,"bpmndi:BPMNEdge"))throw new Error(`unknown di ${bn(t)} for element ${bn(e)}`);var m=this._getSource(e),f=this._getTarget(e);r=n&&(n.hidden||n.collapsed),i=this._elementFactory.createConnection(Or(e,t,{hidden:r,source:m,target:f,waypoints:jr(t,m,f)})),Sn(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(i,n,o)}return ei(e)&&oi(i)&&this.addLabel(e,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},Ir.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${bn(e)}#attachedToRef`);var i=this._elementRegistry.get(n.id),r=i&&i.attachers;if(!i)throw Lr(e,n,"attachedToRef");t.host=i,r||(i.attachers=r=[]),-1===r.indexOf(t)&&r.push(t)},Ir.prototype.addLabel=function(e,t,n){var i,r,o;return i=function(e,t){var n,i,r,o=e.label;return o&&o.bounds?(r=o.bounds,i={width:Math.max(Qn.width,r.width),height:r.height},n={x:r.x+r.width/2,y:r.y+r.height/2}):(n=ii(t),i=Qn),Q({x:n.x-i.width/2,y:n.y-i.height/2},i)}(t,n),(r=oi(n))&&(i=this._textRenderer.getExternalLabelBounds(i,r)),o=this._elementFactory.createLabel(Or(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!oi(n),x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)})),this._canvas.addShape(o,n.parent)},Ir.prototype._getConnectedElement=function(e,t){var n,i,r=e.$type;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?Lr(e,i,t+"Ref"):new Error(`${bn(e)}#${t} Ref not specified`)},Ir.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},Ir.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},Ir.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};const $r={__depends__:[zi,{__depends__:[Fi],bpmnImporter:["type",Ir]}]};function zr(e){return B(e,(function(t){return!T(e,(function(e){return e!==t&&Fr(t,e)}))}))}function Fr(e,t){if(t){if(e===t)return t;if(e.parent)return Fr(e.parent,t)}}function Hr(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function Vr(e,t,n){n=n||0,C(e)||(e=[e]),N(e,(function(e,i){var r=t(e,i,n);C(r)&&r.length&&Vr(r,t,n+1)}))}function Gr(e,t){return function(e,t){var n=[],i=[];return Vr(e,(function(e,r,o){Hr(n,e,t);var a=e.children;if(a&&Hr(i,a,t))return a})),n}(e,!t)}function Wr(e,t){var n,i,r,o;return t=!!t,C(e)||(e=[e]),N(e,(function(e){var a=e;e.waypoints&&!t&&(a=Wr(e.waypoints,!0));var s=a.x,c=a.y,l=a.height||0,p=a.width||0;(sr||void 0===r)&&(r=s+p),(c+l>o||void 0===o)&&(o=c+l)})),{x:n,y:i,height:o-i,width:r-n}}function Ur(e,t){return Q({},e||{},t||{})}function qr(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}qr.prototype.next=function(){return this._prefix+ ++this._counter};var Kr=new qr("ov");function Xr(e,t,n,i){var r,o;this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=Kr,this._overlayDefaults=Q({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(r=n.getContainer(),ce(o=Ae(''),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function Yr(e,t,n){ce(e,{left:t+"px",top:n+"px"})}function Zr(e,t){e.style.display=!1===t?"none":""}function Qr(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}Xr.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Xr.prototype.get=function(e){if(R(e)&&(e={id:e}),R(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?B(t.overlays,U({type:e.type})):t.overlays.slice():[]}return e.type?B(this._overlays,U({type:e.type})):e.id?this._overlays[e.id]:null},Xr.prototype.add=function(e,t,n){if(k(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return n=Q({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},Xr.prototype.remove=function(e){var t=this.get(e)||[];C(t)||(t=[t]);var n=this;N(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Te(e.html),Te(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},Xr.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},Xr.prototype.show=function(){Zr(this._overlayRoot)},Xr.prototype.hide=function(){Zr(this._overlayRoot,!1)},Xr.prototype.clear=function(){this._overlays={},this._overlayContainers=[],he(this._overlayRoot)},Xr.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=Wr(t);i=o.x,r=o.y}Yr(n,i,r),le(e.html,"data-container-id",t.id)},Xr.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,o=e.element,a=i.left,s=i.top;void 0!==i.right&&(t=o.waypoints?Wr(o).width:o.width,a=-1*i.right+t);void 0!==i.bottom&&(n=o.waypoints?Wr(o).height:o.height,s=-1*i.bottom+n);Yr(r,a||0,s||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Xr.prototype._createOverlayContainer=function(e){var t=Ae('');ce(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Xr.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Qr(this._overlayRoot,n)},Xr.prototype._getOverlayContainer=function(e,t){var n=T(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},Xr.prototype._addOverlay=function(e){var t,n,i=e.id,r=e.element,o=e.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),R(o)&&(o=Ae(o)),n=this._getOverlayContainer(r),ce(t=Ae(''),{position:"absolute"}),t.appendChild(o),e.type&&ue(t).add("djs-overlay-"+e.type),Zr(t,this._canvas.findRoot(r)===this._canvas.getRootElement()),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Xr.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=this._canvas.findRoot(e.element),r=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=!0;(i!==this._canvas.getRootElement()||n&&(E(r)&&r>t.scale||E(o)&&o
i&&(r=(1/t.scale||1)*i)),E(r)&&(s="scale("+r+","+r+")"),Qr(a,s)},Xr.prototype._updateOverlaysVisibilty=function(e){var t=this;N(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},Xr.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){var n;n=e.viewbox,t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element;N(t.get({element:n}),(function(e){t.remove(e.id)}));var i=t._getOverlayContainer(n);if(i){Te(i.html);var r=t._overlayContainers.indexOf(i);-1!==r&&t._overlayContainers.splice(r,1)}})),e.on("element.changed",500,(function(e){var n=e.element,i=t._getOverlayContainer(n,!0);i&&(N(i.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(i))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&ue(n.html)[e.add?"add":"remove"](e.marker)})),e.on("root.set",(function(){t._updateOverlaysVisibilty(t._canvas.viewbox())})),e.on("diagram.clear",this.clear,this)};const Jr={__init__:["overlays"],overlays:["type",Xr]};function eo(e,t,n,i){e.on("element.changed",(function(i){var r=i.element;(r.parent||r===t.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&e.fire(function(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}(r)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}eo.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const to={__init__:["changeSupport"],changeSupport:["type",eo]};function no(e){this._eventBus=e}function io(e){return function(t,n,i,r,o){(P(t)||A(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}}function ro(e,t){t.invoke(no,this),this.executed((function(t){var n=t.context;n.rootElement?e.setRootElement(n.rootElement):n.rootElement=e.getRootElement()})),this.revert((function(t){var n=t.context;n.rootElement&&e.setRootElement(n.rootElement)}))}no.$inject=["eventBus"],no.prototype.on=function(e,t,n,i,r,o){if((P(t)||A(t))&&(o=r,r=i,i=n,n=t,t=null),P(n)&&(o=r,r=i,i=n,n=1e3),k(r)&&(o=r,r=!1),!P(i))throw new Error("handlerFn must be a function");C(e)||(e=[e]);var a=this._eventBus;N(e,(function(e){var s=["commandStack",e,t].filter((function(e){return e})).join(".");a.on(s,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)}))},no.prototype.canExecute=io("canExecute"),no.prototype.preExecute=io("preExecute"),no.prototype.preExecuted=io("preExecuted"),no.prototype.execute=io("execute"),no.prototype.executed=io("executed"),no.prototype.postExecute=io("postExecute"),no.prototype.postExecuted=io("postExecuted"),no.prototype.revert=io("revert"),no.prototype.reverted=io("reverted"),v(ro,no),ro.$inject=["canvas","injector"];const oo={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",ro]};function ao(e){return CSS.escape(e)}var so={"&":"&","<":"<",">":">",'"':""","'":"'"};function co(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return so[e]}))}var lo="_plane";function po(e){return function(e){return e.replace(new RegExp(lo+"$"),"")}(e.id)}function uo(e){var t=e.id;return Sn(e,"bpmn:SubProcess")?fo(t):t}function ho(e){return fo(e)}function mo(e){return Sn(An(e),"bpmndi:BPMNPlane")}function fo(e){return e+lo}function go(e,t,n){var i=Ae(''),r=n.getContainer(),o=ue(r);r.appendChild(i);var a=[];function s(e){e&&(a=function(e){for(var t=kn(e),n=[],i=t;i;i=i.$parent)(Sn(i,"bpmn:SubProcess")||Sn(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var r=a.flatMap((function(e){var i=n.findRoot(uo(e))||n.findRoot(e.id);if(!i&&Sn(e,"bpmn:Process")){var r=t.find((function(t){var n=kn(t);return n&&n.get("processRef")===e}));i=r&&n.findRoot(r.id)}if(!i)return[];var o=co(e.name||e.id),a=Ae(''+o+"");return a.addEventListener("click",(function(){n.setRootElement(i)})),a}));i.innerHTML="";var s=r.length>1;o.toggle("bjs-breadcrumbs-shown",s),r.forEach((function(e){i.appendChild(e)}))}e.on("element.changed",(function(e){var t=kn(e.element);T(a,(function(e){return e===t}))&&s()})),e.on("root.set",(function(e){s(e.element)}))}function yo(e,t){var n=null,i=new vo;e.on("root.set",(function(e){var r=e.element,o=t.viewbox(),a=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,Sn(r,"bpmn:SubProcess")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,c=(o.y-a.y)*o.scale;0===s&&0===c||t.scroll({dx:s,dy:c}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function vo(){this._entries=[],this.set=function(e,t){var n=!1;for(var i in this._entries)if(this._entries[i][0]===e){this._entries[i][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}-1!==t&&this._entries.splice(t,1)}}go.$inject=["eventBus","elementRegistry","canvas"],yo.$inject=["eventBus","canvas"];var bo=180,xo=160;function _o(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,(function(e,t){n._handleImport(t.definitions)}))}function wo(e){return Sn(e,"bpmndi:BPMNDiagram")?e:wo(e.$parent)}_o.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)})),e.diagrams.filter((e=>e.plane)).flatMap((e=>t._createNewDiagrams(e.plane))).forEach((function(e){t._movePlaneElementsToOrigin(e.plane)}))}},_o.prototype._createNewDiagrams=function(e){var t=this,n=[],i=[];e.get("planeElement").forEach((function(t){var r=t.bpmnElement;if(r){var o=r.$parent;Sn(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!Sn(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(Cn(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(r,e)&&i.push({diElement:t,parent:o})}}));var r=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t._createDiagram(e);t._processToDiagramMap[e.id]=n,r.push(n)}})),i.forEach((function(e){for(var i=e.diElement,r=e.parent;r&&-1===n.indexOf(r);)r=r.$parent;if(r){var o=t._processToDiagramMap[r.id];t._moveToDiPlane(i,o.plane)}})),r},_o.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=function(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach((function(e){if(e.bounds){var n=Rr(e.bounds);t.top=Math.min(n.top,t.top),t.left=Math.min(n.left,t.left)}})),Mr(t)}(e),i=n.x-bo,r=n.y-xo;t.forEach((function(e){e.waypoint?e.waypoint.forEach((function(e){e.x=e.x-i,e.y=e.y-r})):e.bounds&&(e.bounds.x=e.bounds.x-i,e.bounds.y=e.bounds.y-r)}))},_o.prototype._moveToDiPlane=function(e,t){var n=wo(e).plane.get("planeElement");n.splice(n.indexOf(e),1),t.get("planeElement").push(e)},_o.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n},_o.$inject=["eventBus","moddle"];var Eo=250;function So(e,t,n,i,r){no.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=i,this._translate=r;var o=this;this.executed("shape.toggleCollapse",Eo,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.reverted("shape.toggleCollapse",Eo,(function(e){var t=e.shape;o._canDrillDown(t)?o._addOverlay(t):o._removeOverlay(t)}),!0),this.executed(["shape.create","shape.move","shape.delete"],Eo,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),this.reverted(["shape.create","shape.move","shape.delete"],Eo,(function(e){var t=e.oldParent,n=e.newParent||e.parent,i=e.shape;o._canDrillDown(i)&&o._addOverlay(i),o._updateDrilldownOverlay(t),o._updateDrilldownOverlay(n),o._updateDrilldownOverlay(i)}),!0),t.on("import.render.complete",(function(){n.filter((function(e){return o._canDrillDown(e)})).map((function(e){o._addOverlay(e)}))}))}v(So,no),So.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},So.prototype._canDrillDown=function(e){var t=this._canvas;return Sn(e,"bpmn:SubProcess")&&t.findRoot(uo(e))},So.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=kn(e),i=t.get({element:n.id,type:"drilldown"})[0];if(i){var r=n&&n.get("flowElements")&&n.get("flowElements").length;ue(i.html).toggle("bjs-drilldown-empty",!r)}},So.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,i=kn(e);n.get({element:e,type:"drilldown"}).length&&this._removeOverlay(e);var r=Ae(''),o=i.get("name")||i.get("id"),a=this._translate("Open {element}",{element:o});r.setAttribute("title",a),r.addEventListener("click",(function(){t.setRootElement(t.findRoot(uo(e)))})),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:r}),this._updateOverlayVisibility(e)},So.prototype._removeOverlay=function(e){this._overlays.remove({element:e,type:"drilldown"})},So.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const Co={__depends__:[Jr,to,oo],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",go],drilldownCentering:["type",yo],drilldownOverlayBehavior:["type",So],subprocessCompatibility:["type",_o]};function ko(e,t){this._eventBus=e,this.offset=5;var n=t.cls("djs-outline",["no-fill"]),i=this;function r(e){var t=We("rect");return je(t,Q({x:0,y:0,rx:4,width:100,height:100},n)),t}e.on(["shape.added","shape.changed"],500,(function(e){var t=e.element,n=e.gfx,o=Re(".djs-outline",n);o||De(n,o=i.getOutline(t)||r()),i.updateShapeOutline(o,t)})),e.on(["connection.added","connection.changed"],(function(e){var t=e.element,n=e.gfx,o=Re(".djs-outline",n);o||De(n,o=r()),i.updateConnectionOutline(o,t)}))}ko.prototype.updateShapeOutline=function(e,t){var n=!1,i=this._getProviders();i.length&&N(i,(function(i){n=n||i.updateOutline(t,e)})),n||je(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},ko.prototype.updateConnectionOutline=function(e,t){var n=Wr(t);je(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},ko.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("outline.getProviders",e,(function(e){e.providers.push(t)}))},ko.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"outline.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},ko.prototype.getOutline=function(e){var t;return N(this._getProviders(),(function(n){P(n.getOutline)&&(t=t||n.getOutline(e))})),t},ko.$inject=["eventBus","styles","elementRegistry"];const Ao={__init__:["outline"],outline:["type",ko]},Po={width:36,height:50},Ro={width:50,height:50};function Mo(e,t,n){return We("path",{d:e,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`,...n})}function To(e,t){this._styles=t,e.registerProvider(this)}function Do(e,t){var n;return"bpmn:DataObjectReference"===t?n=Po:"bpmn:DataStoreReference"===t&&(n=Ro),e.width===n.width&&e.height===n.height}To.$inject=["outline","styles"],To.prototype.getOutline=function(e){const t=this._styles.cls("djs-outline",["no-fill"]);var n;if(!Zn(e))return Sn(e,"bpmn:Gateway")?(Q((n=We("rect")).style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),je(n,Q({x:2,y:2,rx:4,width:e.width-4,height:e.height-4},t))):Cn(e,["bpmn:Task","bpmn:SubProcess","bpmn:Group","bpmn:CallActivity"])?je(n=We("rect"),Q({x:-5,y:-5,rx:14,width:e.width+10,height:e.height+10},t)):Sn(e,"bpmn:EndEvent")?je(n=We("circle"),Q({cx:e.width/2,cy:e.height/2,r:e.width/2+5+1},t)):Sn(e,"bpmn:Event")?je(n=We("circle"),Q({cx:e.width/2,cy:e.height/2,r:e.width/2+5},t)):Sn(e,"bpmn:DataObjectReference")&&Do(e,"bpmn:DataObjectReference")?n=Mo("M44.7648 11.3263L36.9892 2.64074C36.0451 1.58628 34.5651 0.988708 33.1904 0.988708H5.98667C3.22688 0.988708 0.989624 3.34892 0.989624 6.26039V55.0235C0.989624 57.9349 3.22688 60.2952 5.98667 60.2952H40.966C43.7257 60.2952 45.963 57.9349 45.963 55.0235V14.9459C45.963 13.5998 45.6407 12.3048 44.7648 11.3263Z",{x:-6,y:-6},t):Sn(e,"bpmn:DataStoreReference")&&Do(e,"bpmn:DataStoreReference")&&(n=Mo("M1.03845 48.1347C1.03845 49.3511 1.07295 50.758 1.38342 52.064C1.69949 53.3938 2.32428 54.7154 3.56383 55.6428C6.02533 57.4841 10.1161 58.7685 14.8212 59.6067C19.5772 60.4538 25.1388 60.8738 30.6831 60.8738C36.2276 60.8738 41.7891 60.4538 46.545 59.6067C51.2504 58.7687 55.3412 57.4842 57.8028 55.6429C59.0424 54.7156 59.6673 53.3938 59.9834 52.064C60.2938 50.7579 60.3285 49.351 60.3285 48.1344V13.8415C60.3285 12.6249 60.2938 11.218 59.9834 9.91171C59.6673 8.58194 59.0423 7.2602 57.8027 6.33294C55.341 4.49168 51.2503 3.20723 46.545 2.36914C41.7891 1.522 36.2276 1.10204 30.6831 1.10205C25.1388 1.10206 19.5772 1.52206 14.8213 2.36923C10.1162 3.20734 6.02543 4.49183 3.5639 6.33314C2.32433 7.26038 1.69951 8.58206 1.38343 9.91181C1.07295 11.2179 1.03845 12.6247 1.03845 13.8411V48.1347Z",{x:-6,y:-6},t)),n},To.prototype.updateOutline=function(e,t){if(!Zn(e))return Cn(e,["bpmn:SubProcess","bpmn:Group"])?(je(t,{width:e.width+10,height:e.height+10}),!0):!!Cn(e,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"])};const Bo={__depends__:[Ao],__init__:["outlineProvider"],outlineProvider:["type",To]};function No(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function Oo(e){return e.originalEvent||e.srcEvent}function jo(e){No(e),No(Oo(e))}function Lo(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function Io(){return/mac/i.test(navigator.platform)}function $o(e,t){return(Oo(e)||e).button===t}function zo(e){return $o(e,0)}function Fo(e){var t=Oo(e)||e;return!!zo(e)&&(Io()?t.metaKey:t.ctrlKey)}function Ho(e){var t=Oo(e)||e;return zo(e)&&t.shiftKey}function Vo(e){return!0}function Go(e){return zo(e)||function(e){return $o(e,1)}(e)}function Wo(e,t,n){var i=this;function r(n,i,r){var o,a;(function(e,t){return!(c[e]||zo)(t)})(n,i)||(r?a=t.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=t.get(a)),a&&r&&!1===e.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(e){return o[e]}var s={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":Vo,"element.mousedown":Go,"element.mouseup":Go,"element.click":Go,"element.dblclick":Go};var l="svg, .djs-element";function p(e,t,n,i){var a=o[n]=function(e){r(n,e)};i&&(c[n]=i),a.$delegate=Ee.bind(e,l,t,a)}function u(e,t,n){var i=a(n);i&&Ee.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,N(s,(function(e,n){u(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,N(s,(function(e,n){p(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;i.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;i.updateDefaultHit(t,n)}));var d=f("djs-hit djs-hit-stroke"),h=f("djs-hit djs-hit-click-stroke"),m={all:f("djs-hit djs-hit-all"),"click-stroke":h,stroke:d,"no-move":f("djs-hit djs-hit-no-move")};function f(e,t){return t=Q({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function g(e,t){var n=m[t];if(!n)throw new Error("invalid hit type <"+t+">");return je(e,n),e}function y(e,t){De(e,t)}this.removeHits=function(e){N(Me(".djs-hit",e),et)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=ui(t);return g(n,"stroke"),y(e,n),n},this.createBoxHit=function(e,t,n){n=Q({x:0,y:0},n);var i=We("rect");return g(i,t),je(i,n),y(e,i),i},this.updateDefaultHit=function(e,t){var n=Re(".djs-hit",t);if(n)return e.waypoints?di(n,e.waypoints):je(n,{width:e.width,height:e.height}),n},this.fire=r,this.triggerMouseEvent=function(e,t,n){var i=s[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return r(i,t,n)},this.mouseHandler=a,this.registerEvent=p,this.unregisterEvent=u}Wo.$inject=["eventBus","elementRegistry","styles"];const Uo={__init__:["interactionEvents"],interactionEvents:["type",Wo]};function qo(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],(function(e){var t=e.element;n.deselect(t)})),e.on(["diagram.clear","root.set"],(function(e){n.select(null)}))}qo.$inject=["eventBus","canvas"],qo.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},qo.prototype.get=function(){return this._selectedElements},qo.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},qo.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();C(e)||(e=e?[e]:[]);var r=this._canvas,o=r.getRootElement();e=e.filter((function(e){var t=r.findRoot(e);return o===t})),t?N(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};var Ko="hover",Xo="selected";function Yo(e,t,n){this._canvas=e;var i=this;function r(t,n){e.addMarker(t,n)}function o(t,n){e.removeMarker(t,n)}this._multiSelectionBox=null,t.on("element.hover",(function(e){r(e.element,Ko)})),t.on("element.out",(function(e){o(e.element,Ko)})),t.on("selection.changed",(function(e){var t=e.oldSelection,n=e.newSelection;N(t,(function(e){-1===n.indexOf(e)&&o(e,Xo)})),N(n,(function(e){-1===t.indexOf(e)&&r(e,Xo)})),i._updateSelectionOutline(n)})),t.on("element.changed",(function(e){n.isSelected(e.element)&&i._updateSelectionOutline(n.get())}))}function Zo(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,o=(n.hints||{}).autoSelect;if(i){if(!1===o)return;C(o)?t.select(o):t.select(r.filter(Qo))}})),e.on("connect.end",500,(function(e){var n=e.context.connection;n&&t.select(n)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);T(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){if(zo(e)){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=Ho(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}}))}function Qo(e){return!e.hidden}Yo.$inject=["canvas","eventBus","selection"],Yo.prototype._updateSelectionOutline=function(e){var t=this._canvas.getLayer("selectionOutline");ze(t);var n=e.length>1;if(Ie(this._canvas.getContainer())[n?"add":"remove"]("djs-multi-select"),n){var i=function(e){return{x:e.x-6,y:e.y-6,width:e.width+12,height:e.height+12}}(Wr(e)),r=We("rect");je(r,Q({rx:3},i)),Ie(r).add("djs-selection-outline"),De(t,r)}},Zo.$inject=["eventBus","selection","canvas","elementRegistry"];const Jo={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Uo,Ao],selection:["type",qo],selectionVisuals:["type",Yo],selectionBehavior:["type",Zo]};function ea(e){$n.call(this,e)}v(ea,$n),ea.prototype._modules=[$r,Co,Bo,Jr,Jo,Fi],ea.prototype._moddleExtensions={};var ta=["c","C"],na=["v","V"],ia=["y","Y"],ra=["z","Z"];function oa(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function aa(e,t){return-1!==(e=C(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.code)}function sa(e){return e.shiftKey}var ca="keyboard.keydown",la="input-handle-modified-keys";function pa(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),t.on("diagram.init",(function(){n._fire("init")})),t.on("attach",(function(){e&&e.bindTo&&n.bind(e.bindTo)})),t.on("detach",(function(){n.unbind()}))}pa.$inject=["config.keyboard","eventBus"],pa.prototype._keydownHandler=function(e){this._keyHandler(e,ca)},pa.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},pa.prototype._keyHandler=function(e,t){if(!this._isEventIgnored(e)){var n={keyEvent:e};this._eventBus.fire(t||ca,n)&&e.preventDefault()}},pa.prototype._isEventIgnored=function(e){return!!e.defaultPrevented||((t=e.target)&&(Pe(t,"input, textarea")||"true"===t.contentEditable)||function(e){return e&&Pe(e,"button, input[type=submit], input[type=button], a[href], [aria-role=button]")}(e.target)&&aa([" ","Enter"],e))&&this._isModifiedKeyIgnored(e);var t},pa.prototype._isModifiedKeyIgnored=function(e){return!oa(e)||-1===this._getAllowedModifiers(e.target).indexOf(e.key)},pa.prototype._getAllowedModifiers=function(e){var t=me(e,"["+la+"]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(la).split(",")},pa.prototype.bind=function(e){this.unbind(),this._node=e,xe.bind(e,"keydown",this._keydownHandler),xe.bind(e,"keyup",this._keyupHandler),this._fire("bind")},pa.prototype.getBinding=function(){return this._node},pa.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),xe.unbind(e,"keydown",this._keydownHandler),xe.unbind(e,"keyup",this._keyupHandler)),this._node=null},pa.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},pa.prototype.addListener=function(e,t,n){P(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||ca,e,t)},pa.prototype.removeListener=function(e,t){this._eventBus.off(t||ca,e)},pa.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},pa.prototype.isCmd=oa,pa.prototype.isShift=sa,pa.prototype.isKey=aa;var ua=500;function da(e,t){var n=this;e.on("editorActions.init",ua,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}da.$inject=["eventBus","keyboard"],da.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){if(function(e){return oa(e)&&!sa(e)&&aa(ra,e)}(e.keyEvent))return t.trigger("undo"),!0})),n("redo",(function(e){if(function(e){return oa(e)&&(aa(ia,e)||aa(ra,e)&&sa(e))}(e.keyEvent))return t.trigger("redo"),!0})),n("copy",(function(e){if(function(e){return oa(e)&&aa(ta,e)}(e.keyEvent))return t.trigger("copy"),!0})),n("paste",(function(e){if(function(e){return oa(e)&&aa(na,e)}(e.keyEvent))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(aa(["+","Add","="],n)&&oa(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(aa(["-","Subtract"],n)&&oa(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(aa("0",n)&&oa(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(aa(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};const ha={__init__:["keyboard","keyboardBindings"],keyboard:["type",pa],keyboardBindings:["type",da]};var ma={moveSpeed:50,moveSpeedAccelerated:200};function fa(e,t,n){var i=this;this._config=Q({},ma,e||{}),t.addListener((function(e){var n=e.keyEvent,r=i._config;if(!t.isCmd(n))return;if(t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],n)){var o,a=t.isShift(n)?r.moveSpeedAccelerated:r.moveSpeed;switch(n.key){case"ArrowLeft":case"Left":o="left";break;case"ArrowUp":case"Up":o="up";break;case"ArrowRight":case"Right":o="right";break;case"ArrowDown":case"Down":o="down"}return i.moveCanvas({speed:a,direction:o}),!0}})),this.moveCanvas=function(e){var t=0,i=0,r=e.speed/Math.min(Math.sqrt(n.viewbox().scale),1);switch(e.direction){case"left":t=r;break;case"up":i=r;break;case"right":t=-r;break;case"down":i=-r}n.scroll({dx:t,dy:i})}}fa.$inject=["config.keyboardMove","keyboard","canvas"];const ga={__depends__:[ha],__init__:["keyboardMove"],keyboardMove:["type",fa]};var ya=/^djs-cursor-.*$/;function va(e){var t=ue(document.body);t.removeMatching(ya),e&&t.add("djs-cursor-"+e)}function ba(){va(null)}var xa=5e3;function _a(e,t){function n(){return!1}return t=t||"element.click",e.once(t,xa,n),function(){e.off(t,n)}}function wa(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Ea(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sa(e,t){var n;function i(i){var r,o=n.start,a=n.button,s=Lo(i),c=Ea(s,o);(!n.dragging&&(r=c,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,0===a&&_a(e),va("grab")),n.dragging)&&(c=Ea(s,n.last||n.start),t.scroll({dx:c.x,dy:c.y}),n.last=s);i.preventDefault()}function r(e){xe.unbind(document,"mousemove",i),xe.unbind(document,"mouseup",r),n=null,ba()}e.on("element.mousedown",500,(function(e){return function(e){if(me(e.target,".djs-draggable"))return;var t=e.button;if(t>=2||e.ctrlKey||e.shiftKey||e.altKey)return;return n={button:t,start:Lo(e)},xe.bind(document,"mousemove",i),xe.bind(document,"mouseup",r),!0}(e.originalEvent)})),this.isActive=function(){return!!n}}Sa.$inject=["eventBus","canvas"];const Ca={__init__:["moveCanvas"],moveCanvas:["type",Sa]};function ka(e){return Math.log(e)/Math.log(10)}function Aa(e,t){var n=ka(e.min),i=ka(e.max);return(Math.abs(n)+Math.abs(i))/t}var Pa=Math.sign||function(e){return e>=0?1:-1},Ra={min:.2,max:4};function Ma(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=Z(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var i=this;t.on("canvas.init",(function(t){i._init(!1!==e.enabled)}))}Ma.$inject=["config.zoomScroll","eventBus","canvas"],Ma.prototype.scroll=function(e){this._canvas.scroll(e)},Ma.prototype.reset=function(){this._canvas.zoom("fit-viewport")},Ma.prototype.zoom=function(e,t){var n=Aa(Ra,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},Ma.prototype._handleWheel=function(e){if(!me(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey||Io()&&e.metaKey,r=e.shiftKey,o=-1*this._scale;if(o*=i?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,i){var a=t.getBoundingClientRect(),s={x:e.clientX-a.left,y:e.clientY-a.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*Pa(e.deltaY)*o,this.zoom(n,s)}else n=r?{dx:o*e.deltaY,dy:0}:{dx:o*e.deltaX,dy:o*e.deltaY},this.scroll(n)}},Ma.prototype.stepZoom=function(e,t){var n=Aa(Ra,10);this._zoom(e,t,n)},Ma.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=ka(i.zoom()),a=Math.round(o/n)*n;a+=n*r;var s,c,l=Math.pow(10,a);i.zoom((s=Ra,c=l,Math.max(s.min,Math.min(s.max,c))),t)},Ma.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&xe[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},Ma.prototype._init=function(e){this.toggle(e)};const Ta={__init__:["zoomScroll"],zoomScroll:["type",Ma]};function Da(e){ea.call(this,e)}function Ba(e){return e&&e[e.length-1]}function Na(e){return e.y}function Oa(e){return e.x}v(Da,ea),Da.prototype._navigationModules=[ga,Ca,Ta],Da.prototype._modules=[].concat(ea.prototype._modules,Da.prototype._navigationModules);var ja={left:Oa,center:Oa,right:function(e){return e.x+e.width},top:Na,middle:Na,bottom:function(e){return e.y+e.height}};function La(e,t){this._modeling=e,this._rules=t}La.$inject=["modeling","rules"],La.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},La.prototype._isType=function(e,t){return-1!==t.indexOf(e)},La.prototype._alignmentPosition=function(e,t){var n,i,r,o,a,s=this._getOrientationDetails(e),c=s.axis,l=s.dimension,p={},u={},d=!1;if(this._isType(e,["left","top"]))p[e]=t[0][c];else if(this._isType(e,["right","bottom"]))r=Ba(t),p[e]=r[c]+r[l];else if(this._isType(e,["center","middle"])){if(N(t,(function(e){var t=e[c]+Math.round(e[l]/2);u[t]?u[t].elements.push(e):u[t]={elements:[e],center:t}})),n=W(u,(function(e){return e.elements.length>1&&(d=!0),e.elements.length})),d)return p[e]=Ba(n).center,p;i=t[0],r=Ba(t=W(t,(function(e){return e[c]+e[l]}))),p[e]=(o=i,a=r,Math.round((o[c]+a[c]+a[l])/2))}return p},La.prototype.trigger=function(e,t){var n,i=this._modeling,r=B(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));if(C(n=this._rules.allowed("elements.align",{elements:r}))&&(r=n),!(r.length<2)&&n){var o=W(r,ja[t]),a=this._alignmentPosition(t,o);i.alignElements(o,a)}};const Ia={__init__:["alignElements"],alignElements:["type",La]},$a=new qr;function za(e){this._scheduled={},e.on("diagram.destroy",(()=>{Object.keys(this._scheduled).forEach((e=>{this.cancel(e)}))}))}za.$inject=["eventBus"],za.prototype.schedule=function(e,t=$a.next()){this.cancel(t);const n=this._schedule(e,t);return this._scheduled[t]=n,n.promise},za.prototype._schedule=function(e,t){const{promise:n,resolve:i,reject:r}=function(){let e,t;const n=new Promise(((n,i)=>{e=n,t=i}));return{promise:n,resolve:e,reject:t}}();return{executionId:requestAnimationFrame((()=>{try{i(e())}catch(t){r(t)}})),promise:n}},za.prototype.cancel=function(e){const t=this._scheduled[e];t&&(this._cancel(t),this._scheduled[e]=null)},za.prototype._cancel=function(e){cancelAnimationFrame(e.executionId)};const Fa={scheduler:["type",za]};var Ha=".entry";function Va(e,t,n,i){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._scheduler=i,this._current=null,this._init()}Va.$inject=["canvas","elementRegistry","eventBus","scheduler"],Va.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",(function(t){var n=t.newSelection,i=n.length?1===n.length?n[0]:n:null;i?e.open(i,!0):e.close()})),this._eventBus.on("elements.changed",(function(t){var n=t.elements,i=e._current;if(i){var r=i.target,o=C(r)?r:[r];if(o.filter((function(e){return n.includes(e)})).length){e.close();var a=o.filter((function(t){return e._elementRegistry.get(t.id)}));a.length&&e._updateAndOpen(a.length>1?a:a[0])}}})),this._eventBus.on("canvas.viewbox.changed",(function(){e._updatePosition()})),this._eventBus.on("element.marker.update",(function(t){if(e.isOpen()){var n=t.element,i=e._current;(C(i.target)?i.target:[i.target]).includes(n)&&e._updateVisibility()}})),this._container=this._createContainer()},Va.prototype._createContainer=function(){var e=Ae('');return this._canvas.getContainer().appendChild(e),e},Va.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},Va.prototype.getEntries=function(e){var t=this._getProviders(),n=C(e)?"getMultiElementContextPadEntries":"getContextPadEntries",i={};return N(t,(function(t){if(P(t[n])){var r=t[n](e);P(r)?i=r(i):N(r,(function(e,t){i[t]=e}))}})),i},Va.prototype.trigger=function(e,t,n){var i,r,o=this,a=t.delegateTarget||t.target;return a?(i=le(a,"data-action"),r=t.originalEvent||t,"mouseover"!==e?"mouseout"===e?(clearTimeout(this._timeout),void(this._mouseout&&(this._mouseout(),this._mouseout=null))):this.triggerEntry(i,e,r,n):void(this._timeout=setTimeout((function(){o._mouseout=o.triggerEntry(i,"hover",r,n)}),300))):t.preventDefault()},Va.prototype.triggerEntry=function(e,t,n,i){if(this.isShown()){var r=this._current.target,o=this._current.entries[e];if(o){var a=o.action;if(!1!==this._eventBus.fire("contextPad.trigger",{entry:o,event:n})){if(P(a)){if("click"===t)return a(n,r,i)}else if(a[t])return a[t](n,r,i);n.preventDefault()}}}},Va.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},Va.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Va.prototype._updateAndOpen=function(e){var t,n=this.getEntries(e),i=this._createHtml(e);N(n,(function(e,n){var r,o,a,s,c=e.group||"default",l=Ae(e.html||'');le(l,"data-action",n),(r=Re("[data-group="+ao(c)+"]",i))||(le(r=Ae(''),"data-group",c),i.appendChild(r)),r.appendChild(l),e.className&&(o=l,a=e.className,s=ue(o),(a=C(a)?a:a.split(/\s+/g)).forEach((function(e){s.add(e)}))),e.title&&le(l,"title",e.title),e.imageUrl&&(le(t=Ae(""),"src",e.imageUrl),t.style.width="100%",t.style.height="100%",l.appendChild(t))})),ue(i).add("open"),this._current={entries:n,html:i,target:e},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current})},Va.prototype._createHtml=function(e){var t=this,n=Ae('');return Ee.bind(n,Ha,"click",(function(e){t.trigger("click",e)})),Ee.bind(n,Ha,"dragstart",(function(e){t.trigger("dragstart",e)})),Ee.bind(n,Ha,"mouseover",(function(e){t.trigger("mouseover",e)})),Ee.bind(n,Ha,"mouseout",(function(e){t.trigger("mouseout",e)})),xe.bind(n,"mousedown",(function(e){e.stopPropagation()})),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n},Va.prototype.getPad=function(e){let t;return t=this.isOpen()&&function(e,t){return e=C(e)?e:[e],t=C(t)?t:[t],e.length===t.length&&L(e,(function(e){return t.includes(e)}))}(this._current.target,e)?this._current.html:this._createHtml(e),{html:t}},Va.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},Va.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return C(e)===C(n)&&(C(e)?e.length===n.length&&L(e,(function(e){return n.includes(e)})):n===e)},Va.prototype.isShown=function(){return this.isOpen()&&ue(this._current.html).has("open")},Va.prototype.show=function(){this.isOpen()&&(ue(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}))},Va.prototype.hide=function(){this.isOpen()&&(ue(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))},Va.prototype._getPosition=function(e){if(!C(e)&&Yn(e)){var t=this._canvas.viewbox(),n=(o=e).waypoints[o.waypoints.length-1],i=n.x*t.scale-t.x*t.scale,r=n.y*t.scale-t.y*t.scale;return{left:i+8*this._canvas.zoom(),top:r}}var o,a=this._canvas.getContainer().getBoundingClientRect(),s=this._getTargetBounds(e);return{left:s.right-a.left+8*this._canvas.zoom(),top:s.top-a.top}},Va.prototype._updatePosition=function(){this._scheduler.schedule((()=>{if(this.isOpen()){var e=this._current.html,t=this._getPosition(this._current.target);"x"in t&&"y"in t?(e.style.left=t.x+"px",e.style.top=t.y+"px"):["top","right","bottom","left"].forEach((function(n){n in t&&(e.style[n]=t[n]+"px")}))}}),"ContextPad#_updatePosition")},Va.prototype._updateVisibility=function(){this._scheduler.schedule((()=>{if(this.isOpen()){var e=this,t=this._current.target;(C(t)?t:[t]).some((function(t){return e._canvas.hasMarker(t,"djs-element-hidden")}))?e.hide():e.show()}}),"ContextPad#_updateVisibility")},Va.prototype._getTargetBounds=function(e){var t=this;return(C(e)?e:[e]).map((function(e){return t._canvas.getGraphics(e)})).reduce((function(e,t){const n=t.getBoundingClientRect();return e.top=Math.min(e.top,n.top),e.right=Math.max(e.right,n.right),e.bottom=Math.max(e.bottom,n.bottom),e.left=Math.min(e.left,n.left),e.x=e.left,e.y=e.top,e.width=e.right-e.left,e.height=e.bottom-e.top,e}),{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};const Ga={__depends__:[Uo,Fa,Jr],contextPad:["type",Va]};var Wa,Ua,qa,Ka,Xa,Ya,Za,Qa,Ja,es,ts={},ns=[],is=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,rs=Array.isArray;function os(e,t){for(var n in t)e[n]=t[n];return e}function as(e){var t=e.parentNode;t&&t.removeChild(e)}function ss(e,t,n){var i,r,o,a={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Wa.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return cs(e,a,i,r,null)}function cs(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++qa:r,__i:-1,__u:0};return null==r&&null!=Ua.vnode&&Ua.vnode(o),o}function ls(e){return e.children}function ps(e,t){this.props=e,this.context=t}function us(e,t){if(null==t)return e.__?us(e.__,e.__i+1):null;for(var n;tt&&Ka.sort(Za));ms.__r=0}function fs(e,t,n,i,r,o,a,s,c,l,p){var u,d,h,m,f,g=i&&i.__k||ns,y=t.length;for(n.__d=c,function(e,t,n){var i,r,o,a,s,c=t.length,l=n.length,p=l,u=0;for(e.__k=[],i=0;i0?cs(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,s=ys(r,n,a,p),r.__i=s,o=null,-1!==s&&(p--,(o=n[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&u--,"function"!=typeof r.type&&(r.__u|=65536)):s!==a&&(s==a-1?u--:s==a+1?u++:s>a?p>c-a?u+=s-a:u--:s(null==c||131072&c.__u?0:1))for(;a>=0||s=0){if((c=t[a])&&!(131072&c.__u)&&r==c.key&&o===c.type)return a;a--}if(s=5&&((r||!e&&5===i)&&(a.push(i,0,r,n),i=6),e&&(a.push(i,e,0,n),i=6)),r=""},c=0;c"===t?(i=1,r=""):r=t+r[0]:o?t===o?o="":r+=t:'"'===t||"'"===t?o=t:">"===t?(s(),i=1):i&&("="===t?(i=5,n=r,r=""):"/"===t&&(i<5||">"===e[c][l+1])?(s(),3===i&&(a=a[0]),i=a,(a=a[0]).push(2,0,i),i=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),i=2):r+=t),3===i&&"!--"===r&&(i=4,a=a[0])}return s(),a}(e)),t),arguments,[])).length>1?t:t[0]}.bind(ss),Ns=0,Os=[],js=Ua,Ls=js.__b,Is=js.__r,$s=js.diffed,zs=js.__c,Fs=js.unmount,Hs=js.__;function Vs(e,t){js.__h&&js.__h(Ms,e,Ns||t),Ns=0;var n=Ms.__H||(Ms.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Gs(e){return Ns=1,function(e,t){var n=Vs(Rs++,2);if(n.t=e,!n.__c&&(n.__=[nc(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],i=n.t(t,e);t!==i&&(n.__N=[i,n.__[1]],n.__c.setState({}))}],n.__c=Ms,!Ms.u)){var i=function(e,t,i){if(!n.__c.__H)return!0;var o=n.__c.__H.__.filter((function(e){return!!e.__c}));if(o.every((function(e){return!e.__N})))return!r||r.call(this,e,t,i);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&n.__c.props===e)&&(!r||r.call(this,e,t,i))};Ms.u=!0;var r=Ms.shouldComponentUpdate,o=Ms.componentWillUpdate;Ms.componentWillUpdate=function(e,t,n){if(this.__e){var a=r;r=void 0,i(e,t,n),r=a}o&&o.call(this,e,t,n)},Ms.shouldComponentUpdate=i}return n.__N||n.__}(nc,e)}function Ws(e,t){var n=Vs(Rs++,3);!js.__s&&tc(n.__H,t)&&(n.__=e,n.i=t,Ms.__H.__h.push(n))}function Us(e,t){var n=Vs(Rs++,4);!js.__s&&tc(n.__H,t)&&(n.__=e,n.i=t,Ms.__h.push(n))}function qs(e){return Ns=5,Ks((function(){return{current:e}}),[])}function Ks(e,t){var n=Vs(Rs++,7);return tc(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Xs(e,t){return Ns=8,Ks((function(){return e}),t)}function Ys(){for(var e;e=Os.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Js),e.__H.__h.forEach(ec),e.__H.__h=[]}catch(t){e.__H.__h=[],js.__e(t,e.__v)}}js.__b=function(e){Ms=null,Ls&&Ls(e)},js.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Hs&&Hs(e,t)},js.__r=function(e){Is&&Is(e),Rs=0;var t=(Ms=e.__c).__H;t&&(Ts===Ms?(t.__h=[],Ms.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(Js),t.__h.forEach(ec),t.__h=[],Rs=0)),Ts=Ms},js.diffed=function(e){$s&&$s(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Os.push(t)&&Ds===js.requestAnimationFrame||((Ds=js.requestAnimationFrame)||Qs)(Ys)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),Ts=Ms=null},js.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Js),e.__h=e.__h.filter((function(e){return!e.__||ec(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],js.__e(n,e.__v)}})),zs&&zs(e,t)},js.unmount=function(e){Fs&&Fs(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Js(e)}catch(n){t=n}})),n.__H=void 0,t&&js.__e(t,n.__v))};var Zs="function"==typeof requestAnimationFrame;function Qs(e){var t,n=function(){clearTimeout(i),Zs&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);Zs&&(t=requestAnimationFrame(n))}function Js(e){var t=Ms,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ms=t}function ec(e){var t=Ms;e.__c=e.__(),Ms=t}function tc(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function nc(e,t){return"function"==typeof t?t(e):t}function ic(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;tt.reduce(((e,t)=>{const n=t.group||"default",i=e.find((e=>e.id===n));return i?i.entries.push(t):e.push({id:n,entries:[t]}),e}),[])),[t]);return Bs`
- `}function cc(e){const{entry:t,selected:n,onMouseEnter:i,onMouseLeave:r,onAction:o}=e;return Os`
+ `}function ac(e){const{entry:t,selected:n,onMouseEnter:i,onMouseLeave:r,onAction:o}=e;return Bs`
- ${t.documentationRef&&Os`
+ ${t.documentationRef&&Bs`
');var u=function(n){Jg(n),ey(n);var u=Zg(Qg(l+n.clientX-s,i),o),d=Zg(Qg(p+n.clientY-c,r),a);t.style.width=u+"px",t.style.height=d+"px",e.resizeHandler({width:l,height:p,dx:n.clientX-s,dy:n.clientY-c})},d=function(e){Jg(e),ey(e),we.unbind(document,"mousemove",u,!1),we.unbind(document,"mouseup",d,!1)};we.bind(n,"mousedown",(function(e){Jg(e),ey(e),s=e.clientX,c=e.clientY;var n=t.getBoundingClientRect();l=n.width,p=n.height,we.bind(document,"mousemove",u),we.bind(document,"mouseup",d)}))}ee(n.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(n)},ty.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),we.unbind(t,"keydown",this.keyHandler),we.unbind(t,"mousedown",ey),we.unbind(t,"input",this.autoResize),we.unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),Be(n)),Be(e)},ty.prototype.getValue=function(){return this.content.innerText.trim()},ty.prototype.getSelection=function(){return window.getSelection().getRangeAt(0)},ty.prototype.setSelection=function(e,t){var n=document.createRange();null===e?n.selectNodeContents(this.content):(n.setStart(e,t),n.setEnd(e,t));var i=window.getSelection();i.removeAllRanges(),i.addRange(n)},ny.$inject=["eventBus","canvas"],ny.prototype.registerProvider=function(e){this._providers.push(e)},ny.prototype.isActive=function(e){return!(!this._active||e&&this._active.element!==e)},ny.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},ny.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})},ny.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},ny.prototype.complete=function(){var e=this._active;if(e){var t,n=e.context.bounds,i=this.$textbox.getBoundingClientRect(),r=this.getValue();r===e.context.text&&i.height===n.height&&i.width===n.width||(t=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,r,e.context.text,{x:i.left-t.left,y:i.top-t.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}},ny.prototype.getValue=function(){return this._textbox.getValue()},ny.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},ny.prototype._handleResize=function(e){this._fire("resize",e)},ny.prototype.activate=function(e){var t;this.isActive()&&this.cancel();var n=B(this._providers,(function(n){return(t=n.activate(e))?n:null}));return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:e,context:t,provider:n},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t};const iy={__depends__:[Ko],__init__:["directEditing"],directEditing:["type",ny]};function ry(e){return function(t){var n=t.target,i=Pn(e),r=i.eventDefinitions&&i.eventDefinitions[0],o=i.$type===n.type,a=(r&&r.$type)===n.eventDefinitionType,s=!!n.triggeredByEvent==!!i.triggeredByEvent,c=void 0===n.isExpanded||n.isExpanded===Kn(e);return!(o&&a&&s&&c)}}var oy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],ay=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}],sy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message intermediate catch event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message intermediate throw event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer intermediate catch event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation intermediate throw event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional intermediate catch event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link intermediate catch event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link intermediate throw event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation intermediate throw event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal intermediate catch event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal intermediate throw event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],cy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message end event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation end event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error end event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel end event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation end event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal end event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate end event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],ly=[{label:"Exclusive gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event-based gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],py=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],uy=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Sub-process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],dy=uy,hy=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"User task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Service task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Send task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"Manual task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business rule task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Script task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub-process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],my=[{label:"Data store reference",actionName:"replace-with-data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}}],fy=[{label:"Data object reference",actionName:"replace-with-data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}],gy=[{label:"Message boundary event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!0}},{label:"Timer boundary event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!0}},{label:"Escalation boundary event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!0}},{label:"Conditional boundary event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!0}},{label:"Error boundary event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",cancelActivity:!0}},{label:"Cancel boundary event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition",cancelActivity:!0}},{label:"Signal boundary event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!0}},{label:"Compensation boundary event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",cancelActivity:!0}},{label:"Message boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],yy=[{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!0}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!0}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!0}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!0}},{label:"Error start event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",isInterrupting:!0}},{label:"Escalation start event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!0}},{label:"Compensation start event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",isInterrupting:!0}},{label:"Message start event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer start event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional start event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal start event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation start event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],vy=[{label:"Sequence flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],by=[{label:"Expanded pool/participant",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:function(e){var t="Empty pool/participant";return e.children&&e.children.length&&(t+=" (removes content)"),t},actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}];const xy={"start-event-non-interrupting":'\n ',"intermediate-event-non-interrupting":'\n '};function _y(e,t,n,i,r,o,a,s){this._bpmnFactory=e,this._popupMenu=t,this._modeling=n,this._moddle=i,this._bpmnReplace=r,this._rules=o,this._translate=a,this._moddleCopy=s,this._register()}_y.$inject=["bpmnFactory","popupMenu","modeling","moddle","bpmnReplace","rules","translate","moddleCopy"],_y.prototype._register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},_y.prototype.getPopupMenuEntries=function(e){var t=e.businessObject,n=this._rules,i=[];if(A(e)||!n.allowed("shape.replace",{element:e}))return{};var r=ry(e);return kn(t,"bpmn:DataObjectReference")?this._createEntries(e,my):kn(t,"bpmn:DataStoreReference")&&!kn(e.parent,"bpmn:Collaboration")?this._createEntries(e,fy):kn(t,"bpmn:StartEvent")&&!kn(t.$parent,"bpmn:SubProcess")?(i=O(oy,r),this._createEntries(e,i)):kn(t,"bpmn:Participant")?(i=O(by,(function(t){return Kn(e)!==t.target.isExpanded})),this._createEntries(e,i)):kn(t,"bpmn:StartEvent")&&Yn(t.$parent)?(i=O(yy,(function(e){var n=!1!==e.target.isInterrupting,i=t.isInterrupting===n;return r(e)||!r(e)&&!i})),this._createEntries(e,i)):kn(t,"bpmn:StartEvent")&&!Yn(t.$parent)&&kn(t.$parent,"bpmn:SubProcess")?(i=O(ay,r),this._createEntries(e,i)):kn(t,"bpmn:EndEvent")?(i=O(cy,(function(e){return!("bpmn:CancelEventDefinition"==e.target.eventDefinitionType&&!kn(t.$parent,"bpmn:Transaction"))&&r(e)})),this._createEntries(e,i)):kn(t,"bpmn:BoundaryEvent")?(i=O(gy,(function(e){var n=e.target;if("bpmn:CancelEventDefinition"==n.eventDefinitionType&&!kn(t.attachedToRef,"bpmn:Transaction"))return!1;var i=!1!==n.cancelActivity,o=t.cancelActivity==i;return r(e)||!r(e)&&!o})),this._createEntries(e,i)):kn(t,"bpmn:IntermediateCatchEvent")||kn(t,"bpmn:IntermediateThrowEvent")?(i=O(sy,r),this._createEntries(e,i)):kn(t,"bpmn:Gateway")?(i=O(ly,r),this._createEntries(e,i)):kn(t,"bpmn:Transaction")?(i=O(uy,r),this._createEntries(e,i)):Yn(t)&&Kn(e)?(i=O(dy,r),this._createEntries(e,i)):kn(t,"bpmn:SubProcess")&&Kn(e)?(i=O(py,r),this._createEntries(e,i)):kn(t,"bpmn:AdHocSubProcess")&&!Kn(e)?(i=O(hy,(function(e){var t=e.target,n="bpmn:SubProcess"===t.type,i=!0===t.isExpanded;return ry(t)&&(!n||i)})),this._createEntries(e,i)):kn(t,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,vy):kn(t,"bpmn:FlowNode")?(i=O(hy,r),kn(t,"bpmn:SubProcess")&&!Kn(e)&&(i=O(i,(function(e){return"Sub-process (collapsed)"!==e.label}))),this._createEntries(e,i)):{}},_y.prototype.getPopupMenuHeaderEntries=function(e){var t={};return kn(e,"bpmn:Activity")&&!Yn(e)&&(t={...t,...this._getLoopCharacteristicsHeaderEntries(e)}),kn(e,"bpmn:DataObjectReference")&&(t={...t,...this._getCollectionHeaderEntries(e)}),kn(e,"bpmn:Participant")&&(t={...t,...this._getParticipantMultiplicityHeaderEntries(e)}),!kn(e,"bpmn:SubProcess")||kn(e,"bpmn:Transaction")||Yn(e)||(t={...t,...this._getAdHocHeaderEntries(e)}),qu(e)&&(t={...t,...this._getNonInterruptingHeaderEntries(e)}),t},_y.prototype._createEntries=function(e,t){var n={},i=this;return j(t,(function(t){n[t.actionName]=i._createEntry(t,e)})),n},_y.prototype._createSequenceFlowEntries=function(e,t){var n=Pn(e),i={},r=this._modeling,o=this._moddle,a=this;return j(t,(function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef.default!==n&&(kn(n.sourceRef,"bpmn:ExclusiveGateway")||kn(n.sourceRef,"bpmn:InclusiveGateway")||kn(n.sourceRef,"bpmn:ComplexGateway")||kn(n.sourceRef,"bpmn:Activity"))&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e.source,{default:n})}))});break;case"replace-with-conditional-flow":!n.conditionExpression&&kn(n.sourceRef,"bpmn:Activity")&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){var t=o.create("bpmn:FormalExpression",{body:""});r.updateProperties(e,{conditionExpression:t})}))});break;default:kn(n.sourceRef,"bpmn:Activity")&&n.conditionExpression&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e,{conditionExpression:void 0})}))}),(kn(n.sourceRef,"bpmn:ExclusiveGateway")||kn(n.sourceRef,"bpmn:InclusiveGateway")||kn(n.sourceRef,"bpmn:ComplexGateway")||kn(n.sourceRef,"bpmn:Activity"))&&n.sourceRef.default===n&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e.source,{default:void 0})}))})}})),i},_y.prototype._createEntry=function(e,t,n){var i=this._translate,r=this._bpmnReplace.replaceElement,o=e.label;return o&&"function"==typeof o&&(o=o(t)),n=n||function(){return r(t,e.target)},{label:i(o),className:e.className,action:n}},_y.prototype._getLoopCharacteristicsHeaderEntries=function(e){var t=this,n=this._translate;function i(n,i){if(i.active)return void t._modeling.updateProperties(e,{loopCharacteristics:void 0});const r=e.businessObject.get("loopCharacteristics"),o=t._moddle.create(i.options.loopCharacteristics);r&&t._moddleCopy.copyElement(r,o),o.set("isSequential",i.options.isSequential),t._modeling.updateProperties(e,{loopCharacteristics:o})}var r,o,a,s=Pn(e).loopCharacteristics;return s&&(r=s.isSequential,o=void 0===s.isSequential,a=void 0!==s.isSequential&&!s.isSequential),{"toggle-parallel-mi":{className:"bpmn-icon-parallel-mi-marker",title:n("Parallel multi-instance"),active:a,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},"toggle-sequential-mi":{className:"bpmn-icon-sequential-mi-marker",title:n("Sequential multi-instance"),active:r,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},"toggle-loop":{className:"bpmn-icon-loop-marker",title:n("Loop"),active:o,action:i,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}}},_y.prototype._getCollectionHeaderEntries=function(e){var t=this,n=this._translate,i=e.businessObject.dataObjectRef;if(!i)return{};var r=i.isCollection;return{"toggle-is-collection":{className:"bpmn-icon-parallel-mi-marker",title:n("Collection"),active:r,action:function(n,r){t._modeling.updateModdleProperties(e,i,{isCollection:!r.active})}}}},_y.prototype._getParticipantMultiplicityHeaderEntries=function(e){var t=this,n=this._bpmnFactory,i=this._translate;var r=e.businessObject.participantMultiplicity;return{"toggle-participant-multiplicity":{className:"bpmn-icon-parallel-mi-marker",title:i("Participant multiplicity"),active:!!r,action:function(i,r){var o;r.active||(o=n.create("bpmn:ParticipantMultiplicity")),t._modeling.updateProperties(e,{participantMultiplicity:o})}}}},_y.prototype._getAdHocHeaderEntries=function(e){var t=this._translate,n=kn(Pn(e),"bpmn:AdHocSubProcess"),i=this._bpmnReplace.replaceElement;return{"toggle-adhoc":{className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:n,action:function(t,r){return i(e,n?{type:"bpmn:SubProcess"}:{type:"bpmn:AdHocSubProcess"},{autoResize:!1,layoutConnection:!1})}}}},_y.prototype._getNonInterruptingHeaderEntries=function(e){const t=this._translate,n=Pn(e),i=this,r=Ku(e),o=kn(e,"bpmn:BoundaryEvent")?xy["intermediate-event-non-interrupting"]:xy["start-event-non-interrupting"],a=!n[r];return{"toggle-non-interrupting":{imageHtml:o,title:t("Toggle non-interrupting"),active:a,action:function(){i._modeling.updateProperties(e,{[r]:!!a})}}}};const wy={__depends__:[mc,em,Ic],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",_y]};function Ey(e,t,n,i,r,o,a,s,c,l,p,u,d){e=e||{},i.registerProvider(this),this._contextPad=i,this._modeling=r,this._elementFactory=o,this._connect=a,this._create=s,this._popupMenu=c,this._canvas=l,this._rules=p,this._translate=u,this._eventBus=n,this._appendPreview=d,!1!==e.autoPlace&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,(function(e){var t=e.context.shape;if(Vo(e)&&i.isOpen(t)){var n=i.getEntries(t);n.replace&&n.replace.action.click(e,t)}})),n.on("contextPad.close",(function(){d.cleanUp()}))}function Sy(e,t,n){var i=e.$instanceOf(t),r=!1;return j(e.eventDefinitions||[],(function(e){e.$type===n&&(r=!0)})),i&&r}Ey.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate","appendPreview"],Ey.prototype.getMultiElementContextPadEntries=function(e){var t=this._modeling,n={};return this._isDeleteAllowed(e)&&ee(n,{delete:{group:"edit",className:"bpmn-icon-trash",title:this._translate("Delete"),action:{click:function(e,n){t.removeElements(n.slice())}}}}),n},Ey.prototype._isDeleteAllowed=function(e){var t=this._rules.allowed("elements.delete",{elements:e});return A(t)?$(e,(e=>t.includes(e))):t},Ey.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,i=this._elementFactory,r=this._connect,o=this._create,a=this._popupMenu,s=this._autoPlace,c=this._translate,l=this._appendPreview,p={};if("label"===e.type)return this._isDeleteAllowed([e])&&ee(p,m()),p;var u=e.businessObject;function d(e,t){r.start(e,t)}function h(e,t){n.removeElements([t])}function m(){return{delete:{group:"edit",className:"bpmn-icon-trash",title:c("Delete"),action:{click:h}}}}function f(e,t,n,r){function a(t,n){var a=i.createShape(ee({type:e},r));o.start(t,a,{source:n})}return{group:"model",className:t,title:n,action:{dragstart:a,click:s?function(t,n){var o=i.createShape(ee({type:e},r));s.append(n,o)}:a,hover:s?function(t,n){return l.create(n,e,r),()=>{l.cleanUp()}}:null}}}function g(e){return function(i,r){n.splitLane(r,e),t.open(r,!0)}}if(An(u,["bpmn:Lane","bpmn:Participant"])&&Kn(e)){var y=eu(e);ee(p,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:c("Add lane above"),action:{click:function(e,t){n.addLane(t,"top")}}}}),y.length<2&&((Xn(e)?e.height>=120:e.width>=120)&&ee(p,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:c("Divide into two lanes"),action:{click:g(2)}}}),(Xn(e)?e.height>=180:e.width>=180)&&ee(p,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:c("Divide into three lanes"),action:{click:g(3)}}})),ee(p,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:c("Add lane below"),action:{click:function(e,t){n.addLane(t,"bottom")}}}})}return kn(u,"bpmn:FlowNode")&&(kn(u,"bpmn:EventBasedGateway")?ee(p,{"append.receive-task":f("bpmn:ReceiveTask","bpmn-icon-receive-task",c("Append receive task")),"append.message-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",c("Append message intermediate catch event"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",c("Append timer intermediate catch event"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",c("Append conditional intermediate catch event"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",c("Append signal intermediate catch event"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):Sy(u,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?ee(p,{"append.compensation-activity":f("bpmn:Task","bpmn-icon-task",c("Append compensation activity"),{isForCompensation:!0})}):kn(u,"bpmn:EndEvent")||u.isForCompensation||Sy(u,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||Yn(u)||ee(p,{"append.end-event":f("bpmn:EndEvent","bpmn-icon-end-event-none",c("Append end event")),"append.gateway":f("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",c("Append gateway")),"append.append-task":f("bpmn:Task","bpmn-icon-task",c("Append task")),"append.intermediate-event":f("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",c("Append intermediate/boundary event"))})),a.isEmpty(e,"bpmn-replace")||ee(p,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:c("Change element"),action:{click:function(e,n){var i=ee(function(e){var n=t.getPad(e).html.getBoundingClientRect();return{x:n.left,y:n.bottom+5}}(n),{cursor:{x:e.x,y:e.y}});a.open(n,"bpmn-replace",i,{title:c("Change element"),width:300,search:!0})}}}}),kn(u,"bpmn:SequenceFlow")&&ee(p,{"append.text-annotation":f("bpmn:TextAnnotation","bpmn-icon-text-annotation",c("Add text annotation"))}),An(u,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&ee(p,{"append.text-annotation":f("bpmn:TextAnnotation","bpmn-icon-text-annotation",c("Add text annotation")),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:c("Connect to other element"),action:{click:d,dragstart:d}}}),kn(u,"bpmn:TextAnnotation")&&ee(p,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:c("Connect using association"),action:{click:d,dragstart:d}}}),An(u,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&ee(p,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:c("Connect using data input association"),action:{click:d,dragstart:d}}}),kn(u,"bpmn:Group")&&ee(p,{"append.text-annotation":f("bpmn:TextAnnotation","bpmn-icon-text-annotation",c("Add text annotation"))}),this._isDeleteAllowed([e])&&ee(p,m()),p};const Cy={__depends__:[Yg,iy,Ua,ta,ip,Bh,wy],__init__:["contextPadProvider"],contextPadProvider:["type",Ey]};var ky={horizontal:["x","width"],vertical:["y","height"]};function Ay(e,t){this._modeling=e,this._filters=[],this.registerFilter((function(e){var n=t.allowed("elements.distribute",{elements:e});return A(n)?n:n?e:[]}))}Ay.$inject=["modeling","rules"],Ay.prototype.registerFilter=function(e){if("function"!=typeof e)throw new Error("the filter has to be a function");this._filters.push(e)},Ay.prototype.trigger=function(e,t){var n,i,r=this._modeling;if(!(e.length<3||(this._setOrientation(t),i=this._filterElements(e),(n=this._createGroups(i)).length<=2)))return r.distributeElements(n,this._axis,this._dimension),n},Ay.prototype._filterElements=function(e){var t=this._filters,n=this._axis,i=this._dimension,r=[].concat(e);return t.length?(j(t,(function(e){r=e(r,n,i)})),r):e},Ay.prototype._createGroups=function(e){var t=[],n=this,i=this._axis,r=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');return j(q(e,i),(function(e,o){var a,s=n._findRange(e,i,r),c=t[t.length-1];c&&n._hasIntersection(c.range,s)?t[t.length-1].elements.push(e):(a={range:s,elements:[e]},t.push(a))})),t},Ay.prototype._setOrientation=function(e){var t=ky[e];this._axis=t[0],this._dimension=t[1]},Ay.prototype._hasIntersection=function(e,t){return Math.max(e.min,e.max)>=Math.min(t.min,t.max)&&Math.min(e.min,e.max)<=Math.max(t.min,t.max)},Ay.prototype._findRange=function(e){var t=e[this._axis];return{min:t+5,max:t+e[this._dimension]-5}};const Py={__init__:["distributeElements"],distributeElements:["type",Ay]};function Ry(e){bc.call(this,e)}Ry.$inject=["eventBus"],x(Ry,bc),Ry.prototype.init=function(){this.addRule("elements.distribute",(function(e){var t=e.elements;return!((t=Hr(t=O(t,(function(e){var t=An(e,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(e.labelTarget||t)})))).length<3)&&t}))};var My={horizontal:'',vertical:''};function Ty(e,t,n,i){this._distributeElements=t,this._translate=n,this._popupMenu=e,this._rules=i,e.registerProvider("align-elements",900,this)}Ty.$inject=["popupMenu","distributeElements","translate","rules"],Ty.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&ee(t,this._getEntries(e)),t},Ty.prototype._isAllowed=function(e){return this._rules.allowed("elements.distribute",{elements:e})},Ty.prototype._getEntries=function(e){var t=this._distributeElements,n=this._translate,i=this._popupMenu;return{"distribute-elements-horizontal":{group:"distribute",title:n("Distribute elements horizontally"),className:"bjs-align-elements-menu-entry",imageHtml:My.horizontal,action:function(n,r){t.trigger(e,"horizontal"),i.close()}},"distribute-elements-vertical":{group:"distribute",title:n("Distribute elements vertically"),imageHtml:My.vertical,action:function(n,r){t.trigger(e,"vertical"),i.close()}}}};const Dy={__depends__:[mc,Py],__init__:["bpmnDistributeElements","distributeElementsMenuProvider"],bpmnDistributeElements:["type",Ry],distributeElementsMenuProvider:["type",Ty]};var By="is not a registered action";function Ny(e,t){this._actions={};var n=this;e.on("diagram.init",(function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})}))}function Oy(e,t){return new Error(e+" "+t)}Ny.$inject=["eventBus","injector"],Ny.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),i=e.get("selection",!1),r=e.get("zoomScroll",!1),o=e.get("copyPaste",!1),a=e.get("canvas",!1),s=e.get("rules",!1),c=e.get("keyboardMove",!1),l=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",(function(){t.undo()})),this.register("redo",(function(){t.redo()}))),o&&i&&this.register("copy",(function(){var e=i.get();if(e.length)return o.copy(e)})),o&&this.register("paste",(function(){o.paste()})),r&&this.register("stepZoom",(function(e){r.stepZoom(e.value)})),a&&this.register("zoom",(function(e){a.zoom(e.value)})),n&&i&&s&&this.register("removeSelection",(function(){var e=i.get();if(e.length){var t,r=s.allowed("elements.delete",{elements:e});!1!==r&&(t=A(r)?r:e).length&&n.removeElements(t.slice())}})),c&&this.register("moveCanvas",(function(e){c.moveCanvas(e)})),l&&this.register("moveSelection",(function(e){l.moveSelection(e.direction,e.accelerated)}))},Ny.prototype.trigger=function(e,t){if(!this._actions[e])throw Oy(e,By);return this._actions[e](t)},Ny.prototype.register=function(e,t){var n=this;if("string"==typeof e)return this._registerAction(e,t);j(e,(function(e,t){n._registerAction(t,e)}))},Ny.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw Oy(e,"is already registered");this._actions[e]=t},Ny.prototype.unregister=function(e){if(!this.isRegistered(e))throw Oy(e,By);this._actions[e]=void 0},Ny.prototype.getActions=function(){return Object.keys(this._actions)},Ny.prototype.isRegistered=function(e){return!!this._actions[e]};const jy={__init__:["editorActions"],editorActions:["type",Ny]};function Ly(e){e.invoke(Ny,this)}x(Ly,Ny),Ly.$inject=["injector"],Ly.prototype._registerDefaultActions=function(e){Ny.prototype._registerDefaultActions.call(this,e);var t=e.get("canvas",!1),n=e.get("elementRegistry",!1),i=e.get("selection",!1),r=e.get("spaceTool",!1),o=e.get("lassoTool",!1),a=e.get("handTool",!1),s=e.get("globalConnect",!1),c=e.get("distributeElements",!1),l=e.get("alignElements",!1),p=e.get("directEditing",!1),u=e.get("searchPad",!1),d=e.get("modeling",!1),h=e.get("contextPad",!1);t&&n&&i&&this._registerAction("selectElements",(function(){var e=t.getRootElement(),r=n.filter((function(t){return t!==e}));return i.select(r),r})),r&&this._registerAction("spaceTool",(function(){r.toggle()})),o&&this._registerAction("lassoTool",(function(){o.toggle()})),a&&this._registerAction("handTool",(function(){a.toggle()})),s&&this._registerAction("globalConnectTool",(function(){s.toggle()})),i&&c&&this._registerAction("distributeElements",(function(e){var t=i.get(),n=e.type;t.length&&c.trigger(t,n)})),i&&l&&this._registerAction("alignElements",(function(e){var t=i.get(),n=[],r=e.type;t.length&&(n=O(t,(function(e){return!kn(e,"bpmn:Lane")})),l.trigger(n,r))})),i&&d&&this._registerAction("setColor",(function(e){var t=i.get();t.length&&d.setColor(t,e)})),i&&p&&this._registerAction("directEditing",(function(){var e=i.get();e.length&&p.activate(e[0])})),u&&this._registerAction("find",(function(){u.toggle()})),t&&d&&this._registerAction("moveToOrigin",(function(){var e,i,r=t.getRootElement();e=qr(i=kn(r,"bpmn:Collaboration")?n.filter((function(e){return kn(e.parent,"bpmn:Collaboration")})):n.filter((function(e){return e!==r&&!kn(e.parent,"bpmn:SubProcess")}))),d.moveElements(i,{x:-e.x,y:-e.y},r)})),i&&h&&this._registerAction("replaceElement",(function(e){h.triggerEntry("replace","click",e)}))};const Iy={__depends__:[jy],editorActions:["type",Ly]};function $y(e){e.on(["create.init","shape.move.init"],(function(e){var t=e.context;An(e.shape,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(t.gridSnappingContext||(t.gridSnappingContext={}),t.gridSnappingContext.snapLocation="top-left")}))}$y.$inject=["eventBus"];function zy(e,t,n){return n||(n="round"),Math[n](e/t)*t}function Fy(e,t,n){var i=!n||!1!==n.active;this._eventBus=t;var r=this;t.on("diagram.init",800,(function(){r.setActive(i)})),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],1200,(function(t){var n=t.originalEvent;if(!(!r.active||n&&sa(n))){var i=t.context,o=i.gridSnappingContext;o||(o=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},o=function(e,t,n){var i=e.context,r=e.shape,o=i.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;if(s&&R(s[t]))return s[t];s||(s=o.snapOffset={});R(s[t])||(s[t]=0);if(!r)return s[t];n.get(r.id)||(Hy(t)?s[t]+=r[t]+r.width/2:s[t]+=r[t]+r.height/2);if(!a)return s[t];"x"===t?/left/.test(a)?s[t]-=r.width/2:/right/.test(a)&&(s[t]+=r.width/2):/top/.test(a)?s[t]-=r.height/2:/bottom/.test(a)&&(s[t]+=r.height/2);return s[t]}(t,n,e);o&&(i.offset=o);var a=function(e,t){var n=e.context,i=n.createConstraints,r=n.resizeConstraints||{},o=n.gridSnappingContext,a=o.snapConstraints;if(a&&a[t])return a[t];a||(a=o.snapConstraints={});a[t]||(a[t]={});var s=n.direction;i&&(Hy(t)?(a.x.min=i.left,a.x.max=i.right):(a.y.min=i.top,a.y.max=i.bottom));var c=r.min,l=r.max;c&&(Hy(t)?Gy(s)?a.x.max=c.left:a.x.min=c.right:Vy(s)?a.y.max=c.top:a.y.min=c.bottom);l&&(Hy(t)?Gy(s)?a.x.min=l.left:a.x.max=l.right:Vy(s)?a.y.min=l.top:a.y.max=l.bottom);return a[t]}(t,n);a&&ee(i,a),Wl(t,n)||r.snapEvent(t,n,i)}))}}))}function Hy(e){return"x"===e}function Vy(e){return-1!==e.indexOf("n")}function Gy(e){return-1!==e.indexOf("w")}function Wy(e,t){ro.call(this,e),this._gridSnapping=t;var n=this;this.preExecute("shape.resize",(function(e){var t=e.context,i=(t.hints||{}).autoResize;if(i){var r=t.shape,o=t.newBounds;T(i)?t.newBounds=n.snapComplex(o,i):t.newBounds=n.snapSimple(r,o)}}))}Fy.prototype.snapEvent=function(e,t,n){Ul(e,t,this.snapValue(e[t],n))},Fy.prototype.getGridSpacing=function(){return 10},Fy.prototype.snapValue=function(e,t){var n,i,r=0;return t&&t.offset&&(r=t.offset),e=zy(e+=r,10),t&&t.min&&R(n=t.min)&&(n=zy(n+r,10,"ceil"),e=Math.max(e,n)),t&&t.max&&R(i=t.max)&&(i=zy(i+r,10,"floor"),e=Math.min(e,i)),e-=r},Fy.prototype.isActive=function(){return this.active},Fy.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},Fy.prototype.toggleActive=function(){this.setActive(!this.active)},Fy.$inject=["elementRegistry","eventBus","config.gridSnapping"],Wy.$inject=["eventBus","gridSnapping","modeling"],x(Wy,ro),Wy.prototype.snapSimple=function(e,t){var n=this._gridSnapping;return t.width=n.snapValue(t.width,{min:t.width}),t.height=n.snapValue(t.height,{min:t.height}),t.x=e.x+e.width/2-t.width/2,t.y=e.y+e.height/2-t.height/2,t},Wy.prototype.snapComplex=function(e,t){return/w|e/.test(t)&&(e=this.snapHorizontally(e,t)),/n|s/.test(t)&&(e=this.snapVertically(e,t)),e},Wy.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,i=/w/.test(t),r=/e/.test(t),o={};return o.width=n.snapValue(e.width,{min:e.width}),r&&(i?(o.x=n.snapValue(e.x,{max:e.x}),o.width+=n.snapValue(e.x-o.x,{min:e.x-o.x})):e.x=e.x+e.width-o.width),ee(e,o),e},Wy.prototype.snapVertically=function(e,t){var n=this._gridSnapping,i=/n/.test(t),r=/s/.test(t),o={};return o.height=n.snapValue(e.height,{min:e.height}),i&&(r?(o.y=n.snapValue(e.y,{max:e.y}),o.height+=n.snapValue(e.y-o.y,{min:e.y-o.y})):e.y=e.y+e.height-o.height),ee(e,o),e};function Uy(e,t){e.on(["spaceTool.move","spaceTool.end"],2e3,(function(e){var n,i=e.context;i.initialized&&("x"===i.axis?(n=t.snapValue(e.dx),e.x=e.x+n-e.dx,e.dx=n):(n=t.snapValue(e.dy),e.y=e.y+n-e.dy,e.dy=n))}))}Uy.$inject=["eventBus","gridSnapping"];const qy={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Wy],gridSnappingSpaceToolBehavior:["type",Uy]}],__init__:["gridSnapping"],gridSnapping:["type",Fy]};function Ky(e,t){e.on("autoPlace",2e3,(function(e){var n=e.source,i=Nr(n),r=e.shape,o=Oc(n,r);return["x","y"].forEach((function(e){var n={};o[e]!==i[e]&&(o[e]>i[e]?n.min=o[e]:n.max=o[e],kn(r,"bpmn:TextAnnotation")&&(!function(e){return"x"===e}(e)?n.offset=-r.height/2:n.offset=-r.width/2),o[e]=t.snapValue(o[e],n))})),o}))}Ky.$inject=["eventBus","gridSnapping"];function Xy(e,t,n){t.on(["create.start","shape.move.start"],1750,(function(t){var i=t.context,r=i.shape,o=e.getRootElement();kn(r,"bpmn:Participant")&&kn(o,"bpmn:Process")&&o.children.length&&(i.createConstraints&&(r.width=n.snapValue(r.width,{min:r.width}),r.height=n.snapValue(r.height,{min:r.height})))}))}Xy.$inject=["canvas","eventBus","gridSnapping"];function Yy(e,t,n){ro.call(this,e),this._gridSnapping=t;var i=this;this.postExecuted(["connection.create","connection.layout"],3e3,(function(e){var t=e.context,r=t.connection,o=t.hints||{},a=r.waypoints;o.connectionStart||o.connectionEnd||!1===o.createElementsBehavior||function(e){return e.length>3}(a)&&n.updateWaypoints(r,i.snapMiddleSegments(a))}))}function Zy(e,t,n){var i=qi(t,n),r={};return function(e){return"h"===e}(i)&&(r.y=e.snapValue(t.y)),function(e){return"v"===e}(i)&&(r.x=e.snapValue(t.x)),("x"in r||"y"in r)&&(t=ee({},t,r),n=ee({},n,r)),[t,n]}Yy.$inject=["eventBus","gridSnapping","modeling"],x(Yy,ro),Yy.prototype.snapMiddleSegments=function(e){var t,n=this._gridSnapping;e=e.slice();for(var i=1;i5&&Ie(a,{x:o.x,width:o.width}),o.height>5&&Ie(a,{y:o.y,height:o.height}),i.canExecute?ze(a).remove(fv):ze(a).add(fv)})),e.on("resize.cleanup",(function(e){var n,i;n=e.context,i=n.shape,n.frame&&nt(n.frame),t.removeMarker(i,mv)}))}gv.$inject=["eventBus","canvas","previewSupport"];var yv=-6,vv="djs-resizer",bv=["n","w","s","e","nw","ne","se","sw"];function xv(e,t,n,i){this._resize=i,this._canvas=t;var r=this;e.on("selection.changed",(function(e){var t=e.newSelection;r.removeResizers(),1===t.length&&j(t,J(r.addResizer,r))})),e.on("shape.changed",(function(e){var t=e.element;n.isSelected(t)&&(r.removeResizers(),r.addResizer(t))}))}xv.prototype.makeDraggable=function(e,t,n){var i=this._resize;function r(t){Ho(t)&&i.activate(t,e,n)}we.bind(t,"mousedown",r),we.bind(t,"touchstart",r)},xv.prototype._createResizer=function(e,t,n,i){var r=this._getResizersParent(),o=function(e){var t={x:0,y:0};-1!==e.indexOf("e")?t.x=6:-1!==e.indexOf("w")&&(t.x=yv);-1!==e.indexOf("s")?t.y=6:-1!==e.indexOf("n")&&(t.y=yv);return t}(i),a=qe("g");ze(a).add(vv),ze(a).add(vv+"-"+e.id),ze(a).add(vv+"-"+i),Ne(r,a);var s=qe("rect");Ie(s,{x:-4+o.x,y:-4+o.y,width:8,height:8}),ze(s).add(vv+"-visual"),Ne(a,s);var c=qe("rect");return Ie(c,{x:-10+o.x,y:-10+o.y,width:20,height:20}),ze(c).add(vv+"-hit"),Ne(a,c),Si(a,t,n),a},xv.prototype.createResizer=function(e,t){var n=dv(e,t),i=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,i,t)},xv.prototype.addResizer=function(e){var t=this;!Qn(e)&&this._resize.canResize({shape:e})&&j(bv,(function(n){t.createResizer(e,n)}))},xv.prototype.removeResizers=function(){He(this._getResizersParent())},xv.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},xv.$inject=["eventBus","canvas","selection","resize"];const _v={__depends__:[tl,Yc,up],__init__:["resize","resizePreview","resizeHandles"],resize:["type",uv],resizePreview:["type",gv],resizeHandles:["type",xv]};function wv(e,t,n,i,r,o,a){function s(e,t){(t||An(e,["bpmn:Task","bpmn:TextAnnotation","bpmn:Participant"])||Ev(e))&&i.activate(e)}this._bpmnFactory=t,this._canvas=n,this._modeling=r,this._textRenderer=a,i.registerProvider(this),e.on("element.dblclick",(function(e){s(e.element,!0)})),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open","root.set","selection.changed"],(function(){i.isActive()&&i.complete()})),e.on(["shape.remove","connection.remove"],2e3,(function(e){i.isActive(e.element)&&i.cancel()})),e.on(["commandStack.changed"],(function(e){i.isActive()&&i.cancel()})),e.on("directEditing.activate",(function(e){o.removeResizers()})),e.on("create.end",500,(function(e){var t=e.context,n=t.shape,i=e.context.canExecute;e.isTouch||i&&(t.hints&&!1===t.hints.createElementsBehavior||s(n))})),e.on("autoPlace.end",500,(function(e){s(e.shape)}))}function Ev(e){return kn(e,"bpmn:SubProcess")&&!Kn(e)}wv.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],wv.prototype.activate=function(e){var t=si(e);if(void 0!==t){var n={text:t};ee(n,this.getEditingBBox(e));var i={},r=n.style||{};return ee(r,{backgroundColor:null,border:null}),(An(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||Ev(e))&&ee(i,{centerVertically:!0}),ni(e)&&(ee(i,{autoResize:!0}),ee(r,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),kn(e,"bpmn:TextAnnotation")&&(ee(i,{resizable:!0,autoResize:!0}),ee(r,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),ee(n,{options:i,style:r}),n}},wv.prototype.getEditingBBox=function(e){var t=this._canvas,n=e.label||e,i=t.getAbsoluteBBox(n),r=i.x+i.width/2,o=i.y+i.height/2,a={x:i.x,y:i.y},s=t.zoom(),c=this._textRenderer.getDefaultStyle(),l=this._textRenderer.getExternalStyle(),p=l.fontSize*s,u=l.lineHeight,d=c.fontSize*s,h=c.lineHeight,m={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};if(kn(e,"bpmn:Lane")||function(e){return kn(e,"bpmn:Participant")&&Kn(e)}(e)){var f=Xn(e);ee(a,f?{width:i.height,height:30*s,x:i.x-i.height/2+15*s,y:o-30*s/2}:{width:i.width,height:30*s}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:f?"rotate(-90deg)":null})}if(function(e){return kn(e,"bpmn:Participant")&&!Kn(e)}(e)){var g=Xn(e);ee(a,g?{width:i.width,height:i.height}:{width:i.height,height:i.width,x:r-i.height/2,y:o-i.width/2}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:g?null:"rotate(-90deg)"})}(An(e,["bpmn:Task","bpmn:CallActivity"])||Ev(e))&&(ee(a,{width:i.width,height:i.height}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"})),function(e){return kn(e,"bpmn:SubProcess")&&Kn(e)}(e)&&(ee(a,{width:i.width,x:i.x}),ee(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"}));var y=90*s,v=7*s,b=4*s;if(n.labelTarget&&(ee(a,{width:y,height:i.height+v+b,x:r-y/2,y:i.y-v}),ee(m,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:b+"px"})),ni(n)&&!ii(n)&&!Jn(n)){var x=oi(e),_=t.getAbsoluteBBox({x:x.x,y:x.y,width:0,height:0}),w=p+v+b;ee(a,{width:y,height:w,x:_.x-y/2,y:_.y-w/2}),ee(m,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:b+"px"})}return kn(e,"bpmn:TextAnnotation")&&(ee(a,{width:i.width,height:i.height,minWidth:30*s,minHeight:10*s}),ee(m,{textAlign:"left",paddingTop:5*s+"px",paddingBottom:7*s+"px",paddingLeft:7*s+"px",paddingRight:5*s+"px",fontSize:d+"px",lineHeight:h})),{bounds:a,style:m}},wv.prototype.update=function(e,t,n,i){var r,o,a;kn(e,"bpmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(e),r={x:e.x,y:e.y,width:e.width/o.width*i.width,height:e.height/o.height*i.height}),(a=t)&&a.trim()||(t=null),this._modeling.updateLabel(e,t,r)};var Sv="djs-element-hidden",Cv="djs-label-hidden";function kv(e,t,n){var i,r,o,a=this,s=t.getDefaultLayer();e.on("directEditing.activate",(function(e){var c=e.active;if(kn(i=c.element.label||c.element,"bpmn:TextAnnotation")){r=t.getAbsoluteBBox(i),o=qe("g");var l=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i.width,containerHeight:i.height,position:{mx:0,my:0}}),p=a.path=qe("path");Ie(p,{d:l,strokeWidth:2,stroke:Av(i)}),Ne(o,p),Ne(s,o),Ci(o,i.x,i.y)}kn(i,"bpmn:TextAnnotation")||i.labelTarget?t.addMarker(i,Sv):(kn(i,"bpmn:Task")||kn(i,"bpmn:CallActivity")||kn(i,"bpmn:SubProcess")||kn(i,"bpmn:Participant"))&&t.addMarker(i,Cv)})),e.on("directEditing.resize",(function(e){if(kn(i,"bpmn:TextAnnotation")){var t=e.height,o=e.dy,s=Math.max(i.height/r.height*(t+o),0),c=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i.width,containerHeight:s,position:{mx:0,my:0}});Ie(a.path,{d:c})}})),e.on(["directEditing.complete","directEditing.cancel"],(function(e){var n=e.active;n&&(t.removeMarker(n.element.label||n.element,Sv),t.removeMarker(i,Cv)),i=void 0,r=void 0,o&&(nt(o),o=void 0)}))}function Av(e,t){return Rn(e).get("stroke")||t||"black"}kv.$inject=["eventBus","canvas","pathMap"];const Pv={__depends__:[io,_v,iy],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",wv],labelEditingPreview:["type",kv]};var Rv=new Xr("tt");function Mv(e,t){e.style.display=!1===t?"none":""}var Tv="djs-tooltip",Dv="."+Tv;function Bv(e,t){var n,i;this._eventBus=e,this._canvas=t,this._ids=Rv,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=(n=t.getContainer(),pe(i=Re(''),{position:"absolute",width:"0",height:"0"}),n.insertBefore(i,n.firstChild),i);var r=this;Ce.bind(this._tooltipRoot,Dv,"mousedown",(function(e){e.stopPropagation()})),Ce.bind(this._tooltipRoot,Dv,"mouseover",(function(e){r.trigger("mouseover",e)})),Ce.bind(this._tooltipRoot,Dv,"mouseout",(function(e){r.trigger("mouseout",e)})),this._init()}Bv.$inject=["eventBus","canvas"],Bv.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=ee({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},Bv.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,i=this.get(ue(n,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},Bv.prototype.get=function(e){return"string"!=typeof e&&(e=e.id),this._tooltips[e]},Bv.prototype.clearTimeout=function(e){if(e=this.get(e)){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},Bv.prototype.setTimeout=function(e){if(e=this.get(e)){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout((function(){t.remove(e)}),e.timeout)}},Bv.prototype.remove=function(e){var t=this.get(e);t&&(Be(t.html),Be(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},Bv.prototype.show=function(){Mv(this._tooltipRoot)},Bv.prototype.hide=function(){Mv(this._tooltipRoot,!1)},Bv.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},Bv.prototype._addTooltip=function(e){var t,n=e.id,i=e.html,r=this._tooltipRoot;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),T(i)&&(i=Re(i)),pe(t=Re(''),{position:"absolute"}),t.appendChild(i),e.type&&he(t).add("djs-tooltip-"+e.type),e.className&&he(t).add(e.className),e.htmlContainer=t,r.appendChild(t),this._tooltips[n]=e,this._updateTooltip(e)},Bv.prototype._updateTooltip=function(e){var t,n,i,r=e.position,o=e.htmlContainer;t=o,n=r.x,i=r.y,pe(t,{left:n+"px",top:i+"px"})},Bv.prototype._updateTooltipVisibilty=function(e){j(this._tooltips,(function(t){var n=t.show,i=t.htmlContainer,r=!0;n&&((n.minZoom>e.scale||n.maxZoom"+r+"
"}))}))}Ov.$inject=["eventBus","tooltips","translate"];const jv={__depends__:[Nv],__init__:["modelingFeedback"],modelingFeedback:["type",Ov]};var Lv=Math.round;function Iv(e,t,n,i,r){function o(e,t,n,i){return r.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function a(e,n,i,r){if(P(i)&&(r=i,i=!1),!n.waypoints&&n.parent&&!ze(e.target).has("djs-hit-no-move")){var o=function(e){return{x:e.x+Lv(e.width/2),y:e.y+Lv(e.height/2)}}(n);return t.init(e,o,"shape.move",{cursor:"grabbing",autoActivate:i,data:{shape:n,context:r||{}}}),!0}}e.on("shape.move.start",1500,(function(e){var t,n,r=e.context,o=e.shape,a=i.get().slice();-1===a.indexOf(o)&&(a=[o]),n=G(t=a,"id"),ee(r,{shapes:a=O(t,(function(e){for(;e=e.parent;)if(n[e.id])return!1;return!0})),validatedShapes:a,shape:o})})),e.on("shape.move.start",1250,(function(e){var t=e.context,n=t.validatedShapes;if(!(t.canExecute=o(n)))return!1})),e.on("shape.move.move",500,(function(e){var t,n=e.context,i=n.validatedShapes,r=e.hover,a={x:e.dx,y:e.dy};t=o(i,a,{x:e.x,y:e.y},r),n.delta=a,n.canExecute=t,n.target=null!==t?r:null})),e.on("shape.move.end",(function(e){var t=e.context,i=t.delta,r=t.canExecute,o="attach"===r,a=t.shapes;if(!1===r)return!1;i.x=Lv(i.x),i.y=Lv(i.y),0===i.x&&0===i.y||n.moveElements(a,i,t.target,{primaryShape:t.shape,attach:o})})),e.on("element.mousedown",(function(e){if(Ho(e)){var t=Lo(e);if(!t)throw new Error("must supply DOM mousedown event");return a(t,e.element)}})),this.start=a}Iv.$inject=["eventBus","dragging","modeling","selection","rules"];var $v="djs-dragging",zv="drop-ok",Fv="drop-not-ok",Hv="new-parent",Vv="attach-ok";function Gv(e,t,n,i){function r(e){var t=function(e){var t=O(e,(function(t){return!Qn(t)||B(e,K({id:t.source.id}))&&B(e,K({id:t.target.id}))}));return t}(o(e));return t}function o(e){var t=Ur(e,!0),n=t.flatMap((e=>(e.incoming||[]).concat(e.outgoing||[]))),i=t.concat(n);return[...new Set(i)]}function a(e,n){[Vv,zv,Fv,Hv].forEach((function(i){i===n?t.addMarker(e,i):t.removeMarker(e,i)}))}e.on("shape.move.start",499,(function(e){var a=e.context,s=a.shapes,c=a.allDraggedElements,l=r(s);if(!a.dragGroup){var p=qe("g");Ie(p,n.cls("djs-drag-group",["no-events"])),Ne(t.getActiveLayer(),p),a.dragGroup=p}l.forEach((function(e){i.addDragger(e,a.dragGroup)})),j(c=c?_([c,o(s)]):o(s),(function(e){t.addMarker(e,$v)})),a.allDraggedElements=c,a.differentParents=1!==H(G(s,(function(e){return e.parent&&e.parent.id}))).length})),e.on("shape.move.move",499,(function(e){var t=e.context,n=t.dragGroup,i=t.target,r=t.shape.parent,o=t.canExecute;i&&("attach"===o?a(i,Vv):t.canExecute&&r&&i.id!==r.id?a(i,Hv):a(i,t.canExecute?zv:Fv)),Ci(n,e.dx,e.dy)})),e.on(["shape.move.out","shape.move.cleanup"],(function(e){var t=e.context.target;t&&a(t,null)})),e.on("shape.move.cleanup",(function(e){var n=e.context,i=n.allDraggedElements,r=n.dragGroup;j(i,(function(e){t.removeMarker(e,$v)})),r&&nt(r)})),this.makeDraggable=function(e,n,r){i.addDragger(n,e.dragGroup),r&&t.addMarker(n,$v),e.allDraggedElements?e.allDraggedElements.push(n):e.allDraggedElements=[n]}}Gv.$inject=["eventBus","canvas","styles","previewSupport"];const Wv={__depends__:[Ko,ta,Ro,tl,Yc,up],__init__:["move","movePreview"],move:["type",Iv],movePreview:["type",Gv]};var Uv=".djs-palette-toggle",qv=".entry",Kv=Uv+", "+qv,Xv="djs-palette-",Yv="open",Zv="two-column";function Qv(e,t){this._eventBus=e,this._canvas=t;var n=this;e.on("tool-manager.update",(function(e){var t=e.tool;n.updateToolHighlight(t)})),e.on("i18n.changed",(function(){n._update()})),e.on("diagram.init",(function(){n._diagramInitialized=!0,n._rebuild()}))}function Jv(e,t){var n=t.getPaletteEntries();return M(n)?n(e):(j(n,(function(t,n){e[n]=t})),e)}Qv.$inject=["eventBus","canvas"],Qv.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("palette.getProviders",e,(function(e){e.providers.push(t)})),this._rebuild()},Qv.prototype.getEntries=function(){return this._getProviders().reduce(Jv,{})},Qv.prototype._rebuild=function(){this._diagramInitialized&&(this._getProviders().length&&(this._container||this._init(),this._update()))},Qv.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),i=this._container=Re(Qv.HTML_MARKUP);n.appendChild(i),he(n).add(Xv+"shown"),Ce.bind(i,Kv,"click",(function(t){if(Me(t.delegateTarget,Uv))return e.toggle();e.trigger("click",t)})),we.bind(i,"mousedown",(function(e){e.stopPropagation()})),Ce.bind(i,qv,"dragstart",(function(t){e.trigger("dragstart",t)})),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:i})},Qv.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},Qv.prototype._toggleState=function(e){e=e||{};var t,n=this._getParentContainer(),i=this._container,r=this._eventBus,o=he(i),a=he(n);t="twoColumn"in e?e.twoColumn:this._needsCollapse(n.clientHeight,this._entries||{}),o.toggle(Zv,t),a.toggle(Xv+Zv,t),"open"in e&&(o.toggle(Yv,e.open),a.toggle(Xv+Yv,e.open)),r.fire("palette.changed",{twoColumn:t,open:this.isOpen()})},Qv.prototype._update=function(){var e=Te(".djs-palette-entries",this._container),t=this._entries=this.getEntries();fe(e),j(t,(function(t,n){var i=t.group||"default",r=Te("[data-group="+co(i)+"]",e);r||(ue(r=Re(''),"data-group",i),e.appendChild(r));var o,a,s,c=t.html||(t.separator?'
':''),l=Re(c);if(r.appendChild(l),!t.separator&&(ue(l,"data-action",n),t.title&&ue(l,"title",t.title),t.className&&(o=l,a=t.className,s=he(o),(A(a)?a:a.split(/\s+/g)).forEach((function(e){s.add(e)}))),t.imageUrl)){var p=Re("");ue(p,"src",t.imageUrl),l.appendChild(p)}})),this.open()},Qv.prototype.trigger=function(e,t,n){var i,r,o=t.delegateTarget||t.target;return o?(i=ue(o,"data-action"),r=t.originalEvent||t,this.triggerEntry(i,e,r,n)):t.preventDefault()},Qv.prototype.triggerEntry=function(e,t,n,i){var r,o;if((r=this._entries[e])&&(o=r.action,!1!==this._eventBus.fire("palette.trigger",{entry:r,event:n}))){if(M(o)){if("click"===t)return o(n,i)}else if(o[t])return o[t](n,i);n.preventDefault()}},Qv.prototype._layoutChanged=function(){this._toggleState({})},Qv.prototype._needsCollapse=function(e,t){return e<46*Object.keys(t).length+50},Qv.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},Qv.prototype.open=function(){this._toggleState({open:!0})},Qv.prototype.toggle=function(){this.isOpen()?this.close():this.open()},Qv.prototype.isActiveTool=function(e){return e&&this._activeTool===e},Qv.prototype.updateToolHighlight=function(e){var t;this._toolsContainer||(t=Te(".djs-palette-entries",this._container),this._toolsContainer=Te("[data-group=tools]",t)),j(this._toolsContainer.children,(function(t){var n=t.getAttribute("data-action");if(n){var i=he(t);n=n.replace("-tool",""),i.contains("entry")&&n===e?i.add("highlighted-entry"):i.remove("highlighted-entry")}}))},Qv.prototype.isOpen=function(){return he(this._container).has(Yv)},Qv.prototype._getParentContainer=function(){return this._canvas.getContainer()},Qv.HTML_MARKUP='';const eb={__init__:["palette"],palette:["type",Qv]};var tb="crosshair";function nb(e,t,n,i,r,o,a){this._selection=r,this._dragging=n,this._mouse=a;var s=this,c=function(e){var n,i=t.getActiveLayer();Ie(n=e.frame=qe("rect"),{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),Ne(i,n)},l=function(e){var t=e.frame,n=e.bbox;Ie(t,{x:n.x,y:n.y,width:n.width,height:n.height})},p=function(e){e.frame&&nt(e.frame)};o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",(function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",(function(){s.activateLasso(t.originalEvent,!0)}))})),e.on("lasso.end",0,(function(e){var t=e.context,n=ib(e),r=i.filter((function(e){return e})),o=Go(e);s.select(r,n,o?t.selection:[])})),e.on("lasso.start",(function(e){var t=e.context;t.bbox=ib(e),c(t),t.selection=r.get()})),e.on("lasso.move",(function(e){var t=e.context;t.bbox=ib(e),l(t)})),e.on("lasso.cleanup",(function(e){var t=e.context;p(t)})),e.on("element.mousedown",1500,(function(e){if(Go(e))return s.activateLasso(e.originalEvent),!0}))}function ib(e){var t={x:e.x-e.dx,y:e.y-e.dy},n={x:e.x,y:e.y};return t.x<=n.x&&t.y=n.x&&t.yn.x&&t.y<=n.y?{x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:t.x<=n.x&&t.y>n.y||t.x=n.y?{x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:t.x>=n.x&&t.y>n.y||t.x>n.x&&t.y>=n.y?{x:n.x,y:n.y,width:t.x-n.x,height:t.y-n.y}:{x:n.x,y:n.y,width:0,height:0}}nb.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],nb.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:tb,data:{context:{}}})},nb.prototype.activateSelection=function(e,t){this._dragging.init(e,"lasso.selection",{trapClick:!1,autoActivate:t,cursor:tb,data:{context:{}},keepSelection:!0})},nb.prototype.select=function(e,t,n=[]){var i=function(e,t){var n={};return j(e,(function(e){var i=e;i.waypoints&&(i=qr(i)),!R(t.y)&&i.x>t.x&&(n[e.id]=e),!R(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(R(t.width)&&R(t.height)&&i.width+i.xt[i]+r-n&&Ul(e,i,t[i]+r-n)}))}(e,o,function(e){return kn(e,"bpmn:Task")?xb:bb}(o)),o&&(t=i,z(["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"],(function(e){return kb(t,e)})))?(n.connectionStart=Gl(r),An(o,["bpmn:Event","bpmn:Gateway"])&&Cb(e,Gl(o)),An(o,["bpmn:Task","bpmn:SubProcess"])&&function(e,t){var n=Gl(t);wb.forEach((function(i){(function(e,t,n){return e[n]>t[n]+_b&&e[n]r[t]?r[t]+vb:r[t]-vb,Ul(e,t,n))}))}(e)):kb(i,"bpmn:MessageFlow")?(kn(r,"bpmn:Event")&&(n.connectionStart=Gl(r)),kn(o,"bpmn:Event")&&Cb(e,Gl(o))):n.connectionStart=n.initialConnectionStart)}))}function Cb(e,t){Ul(e,"x",t.x),Ul(e,"y",t.y)}function kb(e,t){return e&&e.type===t}function Ab(e,t){return"x"===e?t.width:t.height}function Pb(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function Rb(){this._snapValues={}}Sb.$inject=["eventBus"],Pb.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},Pb.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},Pb.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},Pb.prototype.getSnapLocations=function(){return this._snapLocations},Pb.prototype.setSnapLocations=function(e){this._snapLocations=e},Pb.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new Rb).initDefaults(this._defaultSnaps),n},Rb.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),-1===n.x.indexOf(t.x)&&n.x.push(t.x),-1===n.y.indexOf(t.y)&&n.y.push(t.y)},Rb.prototype.snap=function(e,t,n,i){var r=this._snapValues[t];return r&&function(e,t,n){var i,r;for(n=void 0===n?10:n,i=0;i=e.x||i&&i<=e.x)&&Ul(e,"x",e.x),(n&&n>=e.y||r&&r<=e.y)&&Ul(e,"y",e.y)}}function Nb(e,t){return-1!==e.indexOf(t)}function Ob(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}x(Db,Tb),Db.$inject=["eventBus","injector"],Db.prototype.initSnap=function(e){var t=Tb.prototype.initSnap.call(this,e),n=e.shape,i=!!this._elementRegistry.get(n.id);return j(n.outgoing,(function(n){var r=n.waypoints[0];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Ob(r,i,e))})),j(n.incoming,(function(n){var r=n.waypoints[n.waypoints.length-1];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Ob(r,i,e))})),kn(n,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t},Db.prototype.addSnapTargetPoints=function(e,t,n){Tb.prototype.addSnapTargetPoints.call(this,e,t,n);var i=this.getSnapTargets(t,n);j(i,(function(n){var i;(function(e){if(kn(e,"bpmn:SubProcess")&&Kn(e))return!0;return kn(e,"bpmn:Participant")}(n)||(i="bpmn:TextAnnotation",[t,n].every((function(e){return kn(e,i)}))))&&(e.add("top-left",Hl(n)),e.add("bottom-right",Vl(n)))}));var r=this._elementRegistry;return j(t.incoming,(function(n){if(r.get(t.id)){Nb(i,n.source)||e.add("mid",Nr(n.source));var o=n.waypoints[0];e.add(n.id+"-docking",o.original||o)}})),j(t.outgoing,(function(n){if(r.get(t.id)){Nb(i,n.target)||e.add("mid",Nr(n.target));var o=n.waypoints[n.waypoints.length-1];e.add(n.id+"-docking",o.original||o)}})),kn(n,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,t,n.parent)),e},Db.prototype.getSnapTargets=function(e,t){return Tb.prototype.getSnapTargets.call(this,e,t).filter((function(e){return!kn(e,"bpmn:Lane")}))};function jb(e,t){var n=this;e.on(["resize.start"],(function(e){n.initSnap(e)})),e.on(["resize.move","resize.end"],1250,(function(e){var i=e.context,r=i.shape,o=r.parent,a=i.direction,s=i.snapContext;if(!(e.originalEvent&&sa(e.originalEvent)||Wl(e))){var c=s.pointsForTarget(o);c.initialized||((c=n.addSnapTargetPoints(c,r,o,a)).initialized=!0),function(e){return"n"===e||"s"===e}(a)&&Ul(e,"x",e.x),function(e){return"e"===e||"w"===e}(a)&&Ul(e,"y",e.y),t.snap(e,c)}})),e.on(["resize.cleanup"],(function(){t.hide()}))}function Lb(e,t){var n=Nr(e),i=Tr(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}jb.prototype.initSnap=function(e){var t=e.context,n=t.shape,i=t.direction,r=t.snapContext;r||(r=t.snapContext=new Pb);var o=Lb(n,i);return r.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),r},jb.prototype.addSnapTargetPoints=function(e,t,n,i){return j(this.getSnapTargets(t,n),(function(t){e.add("corner",Vl(t)),e.add("corner",Hl(t))})),e.add("corner",Lb(t,i)),e},jb.$inject=["eventBus","snapping"],jb.prototype.getSnapTargets=function(e,t){return ql(t).filter((function(t){return!(n=t,i=e,n.host===i||Qn(t)||function(e){return!!e.hidden}(t)||Jn(t));var n,i}))};function Ib(e){this._canvas=e,this._asyncHide=function(e,t){let n,i,r,o;function a(n){let a=Date.now(),l=n?0:o+t-a;if(l>0)return s(l);e.apply(r,i),c()}function s(e){n=setTimeout(a,e)}function c(){n&&clearTimeout(n),n=o=i=r=void 0}function l(...e){o=Date.now(),i=e,r=this,n||s(t)}return l.flush=function(){n&&a(!0),c()},l.cancel=c,l}(J(this.hide,this),1e3)}Ib.$inject=["canvas"],Ib.prototype.snap=function(e,t){var n=e.context.snapContext,i=n.getSnapLocations(),r={x:Wl(e,"x"),y:Wl(e,"y")};j(i,(function(i){var o=n.getSnapOrigin(i),a={x:e.x+o.x,y:e.y+o.y};if(j(["x","y"],(function(e){var n;r[e]||void 0!==(n=t.snap(a,i,e,7))&&(r[e]={value:n,originValue:n-o[e]})})),r.x&&r.y)return!1})),this.showSnapLine("vertical",r.x&&r.x.value),this.showSnapLine("horizontal",r.y&&r.y.value),j(["x","y"],(function(t){var n=r[t];P(n)&&Ul(e,t,n.originValue)}))},Ib.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=qe("path");return Ie(n,{d:"M0,0 L0,0"}),ze(n).add("djs-snap-line"),Ne(t,n),{update:function(t){R(t)?Ie(n,"horizontal"===e?{d:"M-100000,"+t+" L+100000,"+t,display:""}:{d:"M "+t+",-100000 L "+t+", +100000",display:""}):Ie(n,{display:"none"})}}},Ib.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},Ib.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},Ib.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},Ib.prototype.hide=function(){j(this._snapLines,(function(e){e.update()}))};const $b={__depends__:[{__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",Tb],resizeSnapping:["type",jb],snapping:["type",Ib]}],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",Sb],createMoveSnapping:["type",Db]};function zb(e,t,n,i,r){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=t,this._overlays=n,this._selection=i,this._translate=r,this._container=this._getBoxHtml(),this._searchInput=Te(zb.INPUT_SELECTOR,this._container),this._resultsContainer=Te(zb.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy"],this.close,this)}function Fb(e,t,n){var i=function(e){var t="";return e.forEach((function(e){e.matched?t+=''+po(e.matched)+"":t+=po(e.normal)})),""!==t?t:null}(t),r=Re(n);r.innerHTML=i,e.appendChild(r)}zb.$inject=["canvas","eventBus","overlays","selection","translate"],zb.prototype._bindEvents=function(){var e=this;function t(t,n,i,r){e._eventMaps.push({el:t,type:i,listener:Ce.bind(t,n,i,r)})}t(document,"html","click",(function(t){e.close()})),t(this._container,zb.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,zb.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,zb.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,zb.INPUT_SELECTOR,"keydown",(function(e){ca("ArrowUp",e)&&e.preventDefault(),ca("ArrowDown",e)&&e.preventDefault()})),t(this._container,zb.INPUT_SELECTOR,"keyup",(function(t){if(ca("Escape",t))return e.close();if(ca("Enter",t)){var n=e._getCurrentResult();return n?e._select(n):e.close()}return ca("ArrowUp",t)?e._scrollToDirection(!0):ca("ArrowDown",t)?e._scrollToDirection():void(ca(["ArrowLeft","ArrowRight"],t)||e._search(t.delegateTarget.value))}))},zb.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){Ce.unbind(e.el,e.type,e.listener)}))},zb.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if(n.length){n.forEach((function(e){var n=e.element.id,i=t._createResultNode(e,n);t._results[n]={element:e.element,node:i}}));var i=Te(zb.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}}},zb.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},zb.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var t=e.offsetTop,n=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+e.clientHeight;t0&&Fb(n,e.primaryTokens,zb.RESULT_PRIMARY_HTML),Fb(n,e.secondaryTokens,zb.RESULT_SECONDARY_HTML),ue(n,zb.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},zb.prototype.registerProvider=function(e){this._searchProvider=e},zb.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,he(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},zb.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,he(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))},zb.prototype.toggle=function(){this.isOpen()?this.close():this.open()},zb.prototype.isOpen=function(){return this._open},zb.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&he(t).remove(zb.RESULT_SELECTED_CLASS);var n=ue(e,zb.RESULT_ID_ATTRIBUTE),i=this._results[n].element;he(e).add(zb.RESULT_SELECTED_CLASS),this._resetOverlay(i),this._canvas.scrollToElement(i,{top:400}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},zb.prototype._select=function(e){var t=ue(e,zb.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this.close(),this._resetOverlay(),this._canvas.scrollToElement(n,{top:400}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},zb.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=function(e){var t=6,n=e.width+2*t,i=e.height+2*t,r={width:n+"px",height:i+"px"},o=Re('');return pe(o,r),{position:{bottom:i-t,right:n-t},show:!0,html:o}}(qr(e));this._overlayId=this._overlays.add(e,t)}},zb.prototype._getBoxHtml=function(){const e=Re(zb.BOX_HTML),t=Te(zb.INPUT_SELECTOR,e);return t&&t.setAttribute("aria-label",this._translate("Search in diagram")),e},zb.CONTAINER_SELECTOR=".djs-search-container",zb.INPUT_SELECTOR=".djs-search-input input",zb.RESULTS_CONTAINER_SELECTOR=".djs-search-results",zb.RESULT_SELECTOR=".djs-search-result",zb.RESULT_SELECTED_CLASS="djs-search-result-selected",zb.RESULT_SELECTED_SELECTOR="."+zb.RESULT_SELECTED_CLASS,zb.RESULT_ID_ATTRIBUTE="data-result-id",zb.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",zb.OVERLAY_CLASS="djs-search-overlay",zb.BOX_HTML='',zb.RESULT_HTML='',zb.RESULT_PRIMARY_HTML='',zb.RESULT_SECONDARY_HTML='';const Hb={__depends__:[Vi,to,ta],searchPad:["type",zb]};function Vb(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function Gb(e){return O(e,(function(e){return!!e.matched})).length>0}function Wb(e,t){var n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();var r=e.indexOf(t);return r>-1?(0!==r&&n.push({normal:i.substr(0,r)}),n.push({matched:i.substr(r,t.length)}),t.length+r')},qb.prototype._interactionModules=[va,Aa,Ba],qb.prototype._modelingModules=[_c,Ic,Jc,Vc,Zl,ip,op,Cy,Wh,Bh,Dy,Iy,Qy,ev,nv,pv,Pv,qg,jv,Wv,fb,yb,_v,$b,Ub],qb.prototype._modules=[].concat(na.prototype._modules,qb.prototype._interactionModules,qb.prototype._modelingModules);const Kb={name:"Camunda",uri:"http://camunda.org/schema/1.0/bpmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:[{name:"Definitions",isAbstract:!0,extends:["bpmn:Definitions"],properties:[{name:"diagramRelationId",isAttr:!0,type:"String"}]},{name:"InOutBinding",superClass:["Element"],isAbstract:!0,properties:[{name:"source",isAttr:!0,type:"String"},{name:"sourceExpression",isAttr:!0,type:"String"},{name:"target",isAttr:!0,type:"String"},{name:"businessKey",isAttr:!0,type:"String"},{name:"local",isAttr:!0,type:"Boolean",default:!1},{name:"variables",isAttr:!0,type:"String"}]},{name:"In",superClass:["InOutBinding"],meta:{allowedIn:["bpmn:CallActivity","bpmn:SignalEventDefinition"]}},{name:"Out",superClass:["InOutBinding"],meta:{allowedIn:["bpmn:CallActivity"]}},{name:"AsyncCapable",isAbstract:!0,extends:["bpmn:Activity","bpmn:Gateway","bpmn:Event"],properties:[{name:"async",isAttr:!0,type:"Boolean",default:!1},{name:"asyncBefore",isAttr:!0,type:"Boolean",default:!1},{name:"asyncAfter",isAttr:!0,type:"Boolean",default:!1},{name:"exclusive",isAttr:!0,type:"Boolean",default:!0}]},{name:"JobPriorized",isAbstract:!0,extends:["bpmn:Process","camunda:AsyncCapable"],properties:[{name:"jobPriority",isAttr:!0,type:"String"}]},{name:"SignalEventDefinitionExtension",isAbstract:!0,extends:["bpmn:SignalEventDefinition"],properties:[{name:"async",isAttr:!0,type:"Boolean",default:!1}]},{name:"ErrorEventDefinitionExtension",isAbstract:!0,extends:["bpmn:ErrorEventDefinition"],properties:[{name:"errorCodeVariable",isAttr:!0,type:"String"},{name:"errorMessageVariable",isAttr:!0,type:"String"}]},{name:"ErrorEventDefinition",superClass:["bpmn:ErrorEventDefinition","Element"],properties:[{name:"expression",isAttr:!0,type:"String"}],meta:{allowedIn:["bpmn:ServiceTask"]}},{name:"Error",isAbstract:!0,extends:["bpmn:Error"],properties:[{name:"camunda:errorMessage",isAttr:!0,type:"String"}]},{name:"PotentialStarter",superClass:["Element"],properties:[{name:"resourceAssignmentExpression",type:"bpmn:ResourceAssignmentExpression"}]},{name:"FormSupported",isAbstract:!0,extends:["bpmn:StartEvent","bpmn:UserTask"],properties:[{name:"formHandlerClass",isAttr:!0,type:"String"},{name:"formKey",isAttr:!0,type:"String"},{name:"formRef",isAttr:!0,type:"String"},{name:"formRefBinding",isAttr:!0,type:"String"},{name:"formRefVersion",isAttr:!0,type:"String"}]},{name:"TemplateSupported",isAbstract:!0,extends:["bpmn:Collaboration","bpmn:Process","bpmn:FlowElement"],properties:[{name:"modelerTemplate",isAttr:!0,type:"String"},{name:"modelerTemplateVersion",isAttr:!0,type:"Integer"}]},{name:"Initiator",isAbstract:!0,extends:["bpmn:StartEvent"],properties:[{name:"initiator",isAttr:!0,type:"String"}]},{name:"ScriptTask",isAbstract:!0,extends:["bpmn:ScriptTask"],properties:[{name:"resultVariable",isAttr:!0,type:"String"},{name:"resource",isAttr:!0,type:"String"}]},{name:"Process",isAbstract:!0,extends:["bpmn:Process"],properties:[{name:"candidateStarterGroups",isAttr:!0,type:"String"},{name:"candidateStarterUsers",isAttr:!0,type:"String"},{name:"versionTag",isAttr:!0,type:"String"},{name:"historyTimeToLive",isAttr:!0,type:"String"},{name:"isStartableInTasklist",isAttr:!0,type:"Boolean",default:!0}]},{name:"EscalationEventDefinitionExtension",isAbstract:!0,extends:["bpmn:EscalationEventDefinition"],properties:[{name:"escalationCodeVariable",isAttr:!0,type:"String"}]},{name:"FormalExpression",isAbstract:!0,extends:["bpmn:FormalExpression"],properties:[{name:"resource",isAttr:!0,type:"String"}]},{name:"Assignable",extends:["bpmn:UserTask"],properties:[{name:"assignee",isAttr:!0,type:"String"},{name:"candidateUsers",isAttr:!0,type:"String"},{name:"candidateGroups",isAttr:!0,type:"String"},{name:"dueDate",isAttr:!0,type:"String"},{name:"followUpDate",isAttr:!0,type:"String"},{name:"priority",isAttr:!0,type:"String"}]},{name:"CallActivity",extends:["bpmn:CallActivity"],properties:[{name:"calledElementBinding",isAttr:!0,type:"String",default:"latest"},{name:"calledElementVersion",isAttr:!0,type:"String"},{name:"calledElementVersionTag",isAttr:!0,type:"String"},{name:"calledElementTenantId",isAttr:!0,type:"String"},{name:"caseRef",isAttr:!0,type:"String"},{name:"caseBinding",isAttr:!0,type:"String",default:"latest"},{name:"caseVersion",isAttr:!0,type:"String"},{name:"caseTenantId",isAttr:!0,type:"String"},{name:"variableMappingClass",isAttr:!0,type:"String"},{name:"variableMappingDelegateExpression",isAttr:!0,type:"String"}]},{name:"ServiceTaskLike",extends:["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"resultVariable",isAttr:!0,type:"String"}]},{name:"DmnCapable",extends:["bpmn:BusinessRuleTask"],properties:[{name:"decisionRef",isAttr:!0,type:"String"},{name:"decisionRefBinding",isAttr:!0,type:"String",default:"latest"},{name:"decisionRefVersion",isAttr:!0,type:"String"},{name:"mapDecisionResult",isAttr:!0,type:"String",default:"resultList"},{name:"decisionRefTenantId",isAttr:!0,type:"String"}]},{name:"ExternalCapable",extends:["camunda:ServiceTaskLike"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"topic",isAttr:!0,type:"String"}]},{name:"TaskPriorized",extends:["bpmn:Process","camunda:ExternalCapable"],properties:[{name:"taskPriority",isAttr:!0,type:"String"}]},{name:"Properties",superClass:["Element"],meta:{allowedIn:["*"]},properties:[{name:"values",type:"Property",isMany:!0}]},{name:"Property",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"name",type:"String",isAttr:!0},{name:"value",type:"String",isAttr:!0}]},{name:"Connector",superClass:["Element"],meta:{allowedIn:["camunda:ServiceTaskLike"]},properties:[{name:"inputOutput",type:"InputOutput"},{name:"connectorId",type:"String"}]},{name:"InputOutput",superClass:["Element"],meta:{allowedIn:["bpmn:FlowNode","camunda:Connector"]},properties:[{name:"inputOutput",type:"InputOutput"},{name:"connectorId",type:"String"},{name:"inputParameters",isMany:!0,type:"InputParameter"},{name:"outputParameters",isMany:!0,type:"OutputParameter"}]},{name:"InputOutputParameter",properties:[{name:"name",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"},{name:"definition",type:"InputOutputParameterDefinition"}]},{name:"InputOutputParameterDefinition",isAbstract:!0},{name:"List",superClass:["InputOutputParameterDefinition"],properties:[{name:"items",isMany:!0,type:"InputOutputParameterDefinition"}]},{name:"Map",superClass:["InputOutputParameterDefinition"],properties:[{name:"entries",isMany:!0,type:"Entry"}]},{name:"Entry",properties:[{name:"key",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"},{name:"definition",type:"InputOutputParameterDefinition"}]},{name:"Value",superClass:["InputOutputParameterDefinition"],properties:[{name:"id",isAttr:!0,type:"String"},{name:"name",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"}]},{name:"Script",superClass:["InputOutputParameterDefinition"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"resource",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"}]},{name:"Field",superClass:["Element"],meta:{allowedIn:["camunda:ServiceTaskLike","camunda:ExecutionListener","camunda:TaskListener"]},properties:[{name:"name",isAttr:!0,type:"String"},{name:"expression",type:"String"},{name:"stringValue",isAttr:!0,type:"String"},{name:"string",type:"String"}]},{name:"InputParameter",superClass:["InputOutputParameter"]},{name:"OutputParameter",superClass:["InputOutputParameter"]},{name:"Collectable",isAbstract:!0,extends:["bpmn:MultiInstanceLoopCharacteristics"],superClass:["camunda:AsyncCapable"],properties:[{name:"collection",isAttr:!0,type:"String"},{name:"elementVariable",isAttr:!0,type:"String"}]},{name:"FailedJobRetryTimeCycle",superClass:["Element"],meta:{allowedIn:["camunda:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},properties:[{name:"body",isBody:!0,type:"String"}]},{name:"ExecutionListener",superClass:["Element"],meta:{allowedIn:["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"event",isAttr:!0,type:"String"},{name:"script",type:"Script"},{name:"fields",type:"Field",isMany:!0}]},{name:"TaskListener",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"event",isAttr:!0,type:"String"},{name:"script",type:"Script"},{name:"fields",type:"Field",isMany:!0},{name:"id",type:"String",isAttr:!0},{name:"eventDefinitions",type:"bpmn:TimerEventDefinition",isMany:!0}]},{name:"FormProperty",superClass:["Element"],meta:{allowedIn:["bpmn:StartEvent","bpmn:UserTask"]},properties:[{name:"id",type:"String",isAttr:!0},{name:"name",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0},{name:"required",type:"String",isAttr:!0},{name:"readable",type:"String",isAttr:!0},{name:"writable",type:"String",isAttr:!0},{name:"variable",type:"String",isAttr:!0},{name:"expression",type:"String",isAttr:!0},{name:"datePattern",type:"String",isAttr:!0},{name:"default",type:"String",isAttr:!0},{name:"values",type:"Value",isMany:!0}]},{name:"FormData",superClass:["Element"],meta:{allowedIn:["bpmn:StartEvent","bpmn:UserTask"]},properties:[{name:"fields",type:"FormField",isMany:!0},{name:"businessKey",type:"String",isAttr:!0}]},{name:"FormField",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"label",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0},{name:"datePattern",type:"String",isAttr:!0},{name:"defaultValue",type:"String",isAttr:!0},{name:"properties",type:"Properties"},{name:"validation",type:"Validation"},{name:"values",type:"Value",isMany:!0}]},{name:"Validation",superClass:["Element"],properties:[{name:"constraints",type:"Constraint",isMany:!0}]},{name:"Constraint",superClass:["Element"],properties:[{name:"name",type:"String",isAttr:!0},{name:"config",type:"String",isAttr:!0}]},{name:"ConditionalEventDefinitionExtension",isAbstract:!0,extends:["bpmn:ConditionalEventDefinition"],properties:[{name:"variableName",isAttr:!0,type:"String"},{name:"variableEvents",isAttr:!0,type:"String"}]}],emumerations:[]};function Xb(e,t,i="camunda"){let r={};const c=n.ref(1);n.ref(!1);const{createBpmnModeler:l}=function(e,t,n="camunda"){const i=()=>{const e=[],t={translate:["value",b]};return e.push(t),e.push(s),e.push(a.BpmnPropertiesPanelModule),e.push(a.BpmnPropertiesProviderModule),e.push(a.CamundaPlatformPropertiesProviderModule),e},r=()=>{const e={};return"camunda"===n&&(e.camunda=Kb),e};return{createBpmnModeler:()=>new qb({container:e,propertiesPanel:{parent:t},keyboard:{bindTo:document},additionalModules:i(),moddleExtensions:r()})}}(e,t,i),p=e=>r.get(e),u=()=>p("canvas"),d=()=>p("commandStack"),h=async e=>{try{const t=await r.importXML(e),{warnings:n}=t}catch(t){f("Could not create BPMN 2.0 diagram!",t)}},m=()=>{const e=p("eventBus");["diagram.init","element.hover","element.out","element.click","element.dblclick","element.mousedown","element.mouseup"].forEach((t=>{e.on(t,(e=>{t.replace(/\./g,"-"),e&&e.element}))}))},v=async(e,t="diagram")=>{try{if("xml"===e||"bpmn"===e){const{xml:n}=await r.saveXML(),{href:i,filename:o}=y(e,t,n);g(i,o)}else{const{svg:e}=await r.saveSVG(),{href:n,filename:i}=y("svg",t,e);g(n,i)}}catch(n){f("Could not download diagram!",n)}},x=e=>{const t=p("alignElements"),n=p("selection").get();!n||n.length<=1?o.toast.warning("请按住 Ctrl 键选择多个元素对齐"):o.standardDeleteNotify((()=>{t.trigger(n,e)}))};return{init:e=>{r=l(),m(),h(e)},destroy:()=>{o.lodash.isEmpty(r)||(r.destroy(),r={})},importDiagram:h,downloadAsXml:(e="diagram")=>{v("xml",e)},downloadAsBpmn:(e="diagram")=>{v("bpmn",e)},downloadAsSvg:(e="diagram")=>{v("svg",e)},undo:()=>d().undo(),redo:()=>d().redo(),zoom:c,zoomMinus:(e=.1)=>{const t=Math.floor(100*c.value-100*e)/100;c.value=t,u().zoom(c.value)},zoomPlus:(e=.1)=>{const t=Math.floor(100*c.value+100*e)/100;c.value=t,u().zoom(c.value)},zoomReset:()=>{c.value=1,u().zoom("fit-viewport","auto")},alignLeft:()=>{x("left")},alignRight:()=>{x("right")},alignTop:()=>{x("top")},alignBottom:()=>{x("bottom")},alignHorizontalCenter:()=>{x("center")},alignVerticalCenter:()=>{x("middle")},playSimulation:()=>{p("toggleMode").toggleMode()}}}function Yb(e,t,n){let i={};return{init:r=>{i=new na({container:e,height:t}),(async e=>{await i.importXML(e);const t=i.get("canvas");t.zoom("fit-viewport","auto"),o.lodash.isEmpty(n)||n.forEach((e=>{var n;t.addMarker(e,"highlight");const i=null==(n=document.querySelector(".highlight"))?void 0:n.querySelector(".djs-visual rect");i&&i.setAttribute("stroke-dasharray","4,4")}))})(r)},destroy:()=>{o.lodash.isEmpty(i)||(i.destroy(),i={})}}}const Zb=n.defineComponent({name:"HBpmnDesigner",props:{diagram:{type:String,default:""},type:{type:String,default:"camunda"},service:{type:Object,required:!0},height:{type:String,default:"90vh"}},setup(e){const t=n.ref(""),{init:i,destroy:r,importDiagram:a,downloadAsXml:s,downloadAsBpmn:c,downloadAsSvg:l,undo:p,redo:u,zoom:d,zoomPlus:h,zoomMinus:f,zoomReset:g,alignLeft:y,alignRight:v,alignTop:b,alignBottom:x,alignHorizontalCenter:_,alignVerticalCenter:w,playSimulation:E}=Xb("#bpmn-canvas","#bpmn-properties-panel",e.type);n.onBeforeUnmount((()=>{r()})),n.onMounted((()=>{try{i(m)}catch(e){}})),n.watch(t,(e=>{a(e)}));return{openedDiagram:t,onReset:()=>{a(m)},importDiagram:a,downloadAsXml:s,downloadAsBpmn:c,downloadAsSvg:l,undo:p,redo:u,zoom:d,zoomPlus:h,zoomMinus:f,zoomReset:g,alignLeft:y,alignRight:v,alignTop:b,alignBottom:x,alignHorizontalCenter:_,alignVerticalCenter:w,playSimulation:E,onSave:t=>{e.service.create(t).then((e=>{o.toast.success("模型部署成功!")})).catch((e=>{o.toast.error("模型部署失败!")}))}}}}),Qb=n.createElementVNode("div",{class:"bpmn-container full-height"},[n.createElementVNode("div",{id:"bpmn-canvas",class:"bpmn-canvas"})],-1),Jb=n.createElementVNode("div",{id:"bpmn-properties-panel",class:"full-height"},null,-1);const ex=u(Zb,[["render",function(e,i,r,o,a,s){const c=h,l=n.resolveComponent("h-column"),p=n.resolveComponent("h-row"),u=t.QCard;return n.openBlock(),n.createBlock(u,null,{default:n.withCtx((()=>[n.createVNode(p,{style:n.normalizeStyle(`height: ${e.height}`)},{default:n.withCtx((()=>[n.createVNode(l,{cols:10},{default:n.withCtx((()=>[n.createVNode(c,{file:e.openedDiagram,"onUpdate:file":i[0]||(i[0]=t=>e.openedDiagram=t),zoom:e.zoom,onDownloadXml:i[1]||(i[1]=t=>e.downloadAsXml()),onDownloadSvg:i[2]||(i[2]=t=>e.downloadAsSvg()),onDownloadBpmn:i[3]||(i[3]=t=>e.downloadAsBpmn()),onAlignRight:i[4]||(i[4]=t=>e.alignRight()),onAlignLeft:i[5]||(i[5]=t=>e.alignLeft()),onAlignTop:i[6]||(i[6]=t=>e.alignTop()),onAlignBottom:i[7]||(i[7]=t=>e.alignBottom()),onAlignHorizontalCenter:i[8]||(i[8]=t=>e.alignHorizontalCenter()),onAlignVerticalCenter:i[9]||(i[9]=t=>e.alignVerticalCenter()),onZoomPlus:i[10]||(i[10]=t=>e.zoomPlus()),onZoomMinus:i[11]||(i[11]=t=>e.zoomMinus()),onZoomReset:i[12]||(i[12]=t=>e.zoomReset()),onRedo:i[13]||(i[13]=t=>e.redo()),onUndo:i[14]||(i[14]=t=>e.undo()),onRefresh:i[15]||(i[15]=t=>e.onReset()),onSimulation:i[16]||(i[16]=t=>e.playSimulation()),onSave:e.onSave},null,8,["file","zoom","onSave"]),Qb])),_:1}),n.createVNode(l,{cols:2},{default:n.withCtx((()=>[Jb])),_:1})])),_:1},8,["style"])])),_:1})}]]),tx=n.defineComponent({name:"HBpmnViewer",props:{diagram:{type:String,default:""},nodes:{type:Array,default:()=>[]},height:{type:[String,Number],default:"500px"}},setup(e){const{init:t,destroy:i}=Yb("#bpmn-viewer",e.height,e.nodes);return n.onBeforeUnmount((()=>{i()})),n.onMounted((()=>{try{t(e.diagram)}catch(n){}})),{}}}),nx={id:"bpmn-viewer",class:"bpmn-viewer-canvas"};const ix=u(tx,[["render",function(e,t,i,r,o,a){return n.openBlock(),n.createElementBlock("div",nx)}]]);ex.install=e=>{e.component(ex.name,ex)},ix.install=e=>{e.component(ix.name,ix)};const rx=[ex,ix],ox={install:e=>{rx.map((t=>e.component(t.name,t)))}};Object.defineProperty(e,"DeploymentService",{enumerable:!0,get:()=>r.DeploymentService}),Object.defineProperty(e,"Swal",{enumerable:!0,get:()=>o.Swal}),Object.defineProperty(e,"lodash",{enumerable:!0,get:()=>o.lodash}),Object.defineProperty(e,"standardDeleteNotify",{enumerable:!0,get:()=>o.standardDeleteNotify}),Object.defineProperty(e,"toast",{enumerable:!0,get:()=>o.toast}),e.Translator=b,e.default=ox,e.download=g,e.downloadEncode=y,e.error=(e,...t)=>{},e.exception=f,e.log=(e,...t)=>{},Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
+ `,this._current.container)},uc.prototype.open=function(e,t,n,i){if(!e)throw new Error("target is missing");if(!t)throw new Error("providers for <"+t+"> not found");if(!n)throw new Error("position is missing");this.isOpen()&&this.close();const{entries:r,headerEntries:o,emptyPlaceholder:a}=this._getContext(e,t);this._current={position:n,providerId:t,target:e,entries:r,headerEntries:o,emptyPlaceholder:a,container:this._createContainer({provider:t}),options:i},this._emit("open"),this._bindAutoClose(),this._render()},uc.prototype.refresh=function(){if(!this.isOpen())return;const{target:e,providerId:t}=this._current,{entries:n,headerEntries:i,emptyPlaceholder:r}=this._getContext(e,t);this._current={...this._current,entries:n,headerEntries:i,emptyPlaceholder:r},this._emit("refresh"),this._render()},uc.prototype._getContext=function(e,t){const n=this._getProviders(t);if(!n||!n.length)throw new Error("provider for <"+t+"> not found");const i=this._getEntries(e,n),r=this._getHeaderEntries(e,n);return{entries:i,headerEntries:r,emptyPlaceholder:this._getEmptyPlaceholder(n),empty:!(Object.keys(i).length||Object.keys(r).length)}},uc.prototype.close=function(){this.isOpen()&&(this._emit("close"),this.reset(),this._current=null)},uc.prototype.reset=function(){const e=this._current.container;ks(null,e),Te(e)},uc.prototype._emit=function(e,t){this._eventBus.fire(`popupMenu.${e}`,t)},uc.prototype._onOpened=function(){this._emit("opened")},uc.prototype._onClosed=function(){this._emit("closed")},uc.prototype._createContainer=function(e){var t=this._canvas.getContainer();const n=Ae(``);return t.appendChild(n),n},uc.prototype._bindAutoClose=function(){this._eventBus.once(pc,this.close,this)},uc.prototype._unbindAutoClose=function(){this._eventBus.off(pc,this.close,this)},uc.prototype._updateScale=function(){var e,t,n=this._canvas.zoom(),i=this._config.scale,r=n;return!0!==i&&(!1===i?(e=1,t=1):(e=i.min,t=i.max),E(e)&&nt&&(r=t)),r},uc.prototype._ensureVisible=function(e,t){var n=document.documentElement.getBoundingClientRect(),i=e.getBoundingClientRect(),r={},o=t.x,a=t.y;return t.x+i.width>n.width&&(r.x=!0),t.y+i.height>n.height&&(r.y=!0),r.x&&r.y?(o=t.x-i.width,a=t.y-i.height):r.x?(o=t.x-i.width,a=t.y):r.y&&t.yP(e.getEmptyPlaceholder)));return t&&t.getEmptyPlaceholder()},uc.prototype.isOpen=function(){return!!this._current},uc.prototype.trigger=function(e,t,n="click"){if(e.preventDefault(),!t){let n=le(me(e.delegateTarget||e.target,".entry",!0),"data-id");t={id:n,...this._getEntry(n)}}const i=t.action;if(!1!==this._emit("trigger",{entry:t,event:e}))if(P(i)){if("click"===n)return i(e,t)}else if(i[n])return i[n](e,t)},uc.prototype._getEntry=function(e){var t=this._current.entries[e]||this._current.headerEntries[e];if(!t)throw new Error("entry not found");return t};const dc={__init__:["popupMenu"],popupMenu:["type",uc]};var hc={align:'',bottom:'',center:'',left:'',right:'',top:'',middle:''};function mc(e,t,n,i){e.registerProvider(900,this),this._contextPad=e,this._popupMenu=t,this._translate=n,this._canvas=i}mc.$inject=["contextPad","popupMenu","translate","canvas"],mc.prototype.getMultiElementContextPadEntries=function(e){var t={};return this._isAllowed(e)&&Q(t,this._getEntries(e)),t},mc.prototype._isAllowed=function(e){return!this._popupMenu.isEmpty(e,"align-elements")},mc.prototype._getEntries=function(){var e=this;return{"align-elements":{group:"align-elements",title:e._translate("Align elements"),html:`${hc.align}
`,action:{click:function(t,n){var i=e._getMenuPosition(n);Q(i,{cursor:{x:t.x,y:t.y}}),e._popupMenu.open(n,"align-elements",i)}}}}},mc.prototype._getMenuPosition=function(e){var t=this._contextPad.getPad(e).html.getBoundingClientRect();return{x:t.left,y:t.bottom+5}};var fc=["left","center","right","top","middle","bottom"];function gc(e,t,n,i){this._alignElements=t,this._translate=n,this._popupMenu=e,this._rules=i,e.registerProvider("align-elements",this)}function yc(e){no.call(this,e),this.init()}function vc(e){yc.call(this,e)}gc.$inject=["popupMenu","alignElements","translate","rules"],gc.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&Q(t,this._getEntries(e)),t},gc.prototype._isAllowed=function(e){return this._rules.allowed("elements.align",{elements:e})},gc.prototype._getEntries=function(e){var t=this._alignElements,n=this._translate,i=this._popupMenu,r={};return N(fc,(function(o){r["align-elements-"+o]={group:"align",title:n("Align elements "+o),className:"bjs-align-elements-menu-entry",imageHtml:hc[o],action:function(){t.trigger(e,o),i.close()}}})),r},yc.$inject=["eventBus"],v(yc,no),yc.prototype.addRule=function(e,t,n){var i=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){i.canExecute(e,t,(function(e,t,i){return n(e)}),!0)}))},yc.prototype.init=function(){},vc.$inject=["eventBus"],v(vc,yc),vc.prototype.init=function(){this.addRule("elements.align",(function(e){var t=B(e.elements,(function(e){return!(e.waypoints||e.host||e.labelTarget)}));return!((t=zr(t)).length<2)&&t}))};const bc={__depends__:[Ia,Ga,dc],__init__:["alignElementsContextPadProvider","alignElementsMenuProvider","bpmnAlignElements"],alignElementsContextPadProvider:["type",mc],alignElementsMenuProvider:["type",gc],bpmnAlignElements:["type",vc]};var xc=10,_c=50,wc=250;function Ec(e,t,n,i){for(var r;r=Cc(e,n,t);)n=i(t,n,r);return n}function Sc(e){return function(t,n,i){var r={x:n.x,y:n.y};return["x","y"].forEach((function(o){var a=e[o];if(a){var s="x"===o?"width":"height",c=a.margin,l=a.minDistance;r[o]=c<0?Math.min(i[o]+c-t[s]/2,n[o]-l+c):Math.max(i[o]+i[s]+c+t[s]/2,n[o]+l+c)}})),r}}function Cc(e,t,n){var i={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height},r=function(e){var t=kc(e);e.host&&(t=t.concat(kc(e.host)));e.attachers&&(t=t.concat(e.attachers.reduce((function(e,t){return e.concat(kc(t))}),[])));return t}(e);return T(r,(function(e){return e!==n&&"intersect"===Br(e,i,xc)}))}function kc(e){return(t=e,t.outgoing.map((function(e){return e.target}))).concat(function(e){return e.incoming.map((function(e){return e.source}))}(e));var t}function Ac(){return!0}function Pc(e,t,n){e.on("autoPlace",100,(function(e){var t=e.shape;return function(e,t,n){n||(n={});var i=n.defaultDistance||_c,r=Dr(e),o=Rr(e);return{x:o.right+i+t.width/2,y:r.y}}(e.source,t)})),e.on("autoPlace.end",(function(e){n.scrollToElement(e.shape)})),this.append=function(n,i,r){e.fire("autoPlace.start",{source:n,shape:i});var o=e.fire("autoPlace",{source:n,shape:i}),a=t.appendShape(n,i,o,n.parent,r);return e.fire("autoPlace.end",{source:n,shape:a}),a}}function Rc(e,t){e.on("autoPlace.end",500,(function(e){t.select(e.shape)}))}Pc.$inject=["eventBus","modeling","canvas"],Rc.$inject=["eventBus","selection"];const Mc={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",Pc],autoPlaceSelectionBehavior:["type",Rc]};function Tc(e,t){for(R(t)&&(t=[t]);e=e.parent;)if(Cn(e,t))return e;return null}function Dc(e){var t=["bpmn:Participant","bpmn:Lane"],n=Tc(e,t);return n?qn(n):!Cn(e,t)||qn(e)}function Bc(e,t){return Sn(t,"bpmn:TextAnnotation")?function(e,t){var n=Rr(e),i=Dc(e),r=i?{x:n.right+t.width/2,y:n.top-50-t.height/2}:{x:n.right+50+t.width/2,y:n.bottom+t.height/2};Yn(e)&&(r=Dr(e),i?(r.x+=100,r.y-=50):(r.x+=100,r.y+=50));var o={margin:i?-30:30,minDistance:20};return Ec(e,t,r,Sc(i?{y:o}:{x:o}))}(e,t):Cn(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])?function(e,t){var n=Rr(e),i=Dc(e),r=i?{x:n.right-10+t.width/2,y:n.bottom+40+t.width/2}:{x:n.left-40-t.width/2,y:n.bottom-10+t.height/2},o={margin:30,minDistance:30};return Ec(e,t,r,Sc(i?{x:o}:{y:o}))}(e,t):Sn(t,"bpmn:FlowNode")?function(e,t){var n=Rr(e),i=Dr(e),r=Dc(e),o=r?{directionHint:"e",minDistance:80,baseOrientation:"left",boundaryOrientation:"top",start:"top",end:"bottom"}:{directionHint:"s",minDistance:90,baseOrientation:"top",boundaryOrientation:"left",start:"left",end:"right"},a=function(e,t){t||(t={});var n=t.defaultDistance||_c,i=t.direction||"e",r=t.filter,o=t.getWeight||function(t){return t.source===e?1:-1},a=t.maxDistance||wc,s=t.reference||"start";function c(e,t){return"n"===i?"start"===s?Rr(e).top-Rr(t).bottom:"center"===s?Rr(e).top-Dr(t).y:Rr(e).top-Rr(t).top:"w"===i?"start"===s?Rr(e).left-Rr(t).right:"center"===s?Rr(e).left-Dr(t).x:Rr(e).left-Rr(t).left:"s"===i?"start"===s?Rr(t).top-Rr(e).bottom:"center"===s?Dr(t).y-Rr(e).bottom:Rr(t).bottom-Rr(e).bottom:"start"===s?Rr(t).left-Rr(e).right:"center"===s?Dr(t).x-Rr(e).right:Rr(t).right-Rr(e).right}r||(r=Ac);var l=e.incoming.filter(r).map((function(t){var n=o(t),i=n<0?c(t.source,e):c(e,t.source);return{id:t.source.id,distance:i,weight:n}})),p=e.outgoing.filter(r).map((function(t){var n=o(t),i=n>0?c(e,t.target):c(t.target,e);return{id:t.target.id,distance:i,weight:n}}));return j(l.concat(p).reduce((function(e,t){return e[t.id+"__weight_"+t.weight]=t,e}),{}),(function(e,t){var n=t.distance,i=t.weight;return n<0||n>a||(e[String(n)]||(e[String(n)]=0),e[String(n)]+=1*i,(!e.distance||e[e.distance]t.top&&(n=n.concat("n"));e.rightt.left&&(n=n.concat("e"));return n}(J(t,["x","y","width","height"]),n);this.resize(t,n,{autoResize:i});var r=t.parent;r&&this._expand([t],r)}}},Lc.prototype.getOffset=function(e){return{top:60,bottom:60,left:100,right:100}},Lc.prototype.getPadding=function(e){return{top:2,bottom:2,left:15,right:15}},Lc.prototype.resize=function(e,t,n){this._modeling.resizeShape(e,t,null,n)},Ic.$inject=["injector"],v(Ic,Lc),Ic.prototype.resize=function(e,t,n){Sn(e,"bpmn:Participant")?this._modeling.resizeLane(e,t,null,n):this._modeling.resizeShape(e,t,null,n)},$c.$inject=["eventBus"],v($c,yc),$c.prototype.canResize=function(e,t){return!1},v(zc,$c),zc.$inject=["eventBus","modeling"],zc.prototype.canResize=function(e,t){if(Sn(t.di,"bpmndi:BPMNPlane"))return!1;if(!Sn(t,"bpmn:Participant")&&!Sn(t,"bpmn:Lane")&&!Sn(t,"bpmn:SubProcess"))return!1;var n=!0;return N(e,(function(e){(Sn(e,"bpmn:Lane")||Zn(e))&&(n=!1)})),n};const Fc={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",Ic],bpmnAutoResizeProvider:["type",zc]};function Hc(e,t,n){var i,r,o=this,a=n.get("dragging",!1);a&&t.on("drag.start",(function(n){t.once("drag.move",1500,(function(t){!function(t){if(!t.hover){var n=t.originalEvent,i=o._findTargetGfx(n),r=i&&e.get(i);i&&r&&(t.stopPropagation(),a.hover({element:r,gfx:i}),a.move(n))}}(t)}))})),t.on("element.hover",(function(e){i=e.gfx,r=e.element})),t.on("element.hover",1500,(function(e){r&&t.fire("element.out",{element:r,gfx:i})})),t.on("element.out",(function(){i=null,r=null})),this._findTargetGfx=function(e){var t;if(e instanceof MouseEvent)return t=Lo(e),function(e){return me(e,"svg, .djs-element",!0)}(document.elementFromPoint(t.x,t.y))}}Hc.$inject=["elementRegistry","eventBus","injector"];const Vc={__init__:["hoverFix"],hoverFix:["type",Hc]};var Gc=Math.round,Wc="djs-drag-active";function Uc(e){e.preventDefault()}function qc(e,t,n,i){var r,o={threshold:5,trapClick:!0};function a(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+(e.x-i.left)/n.scale,y:n.y+(e.y-i.top)/n.scale}}function s(t,n){n=n||r;var i=e.createEvent(Q({},n.payload,n.data,{isTouch:n.isTouch}));return!1!==e.fire("drag."+t,i)&&e.fire(n.prefix+"."+t,i)}function c(e,i){var o,c=r.payload,l=r.displacement,p=r.globalStart,u=Lo(e),d=Ea(u,p),h=r.localStart,m=a(u),g=Ea(m,h);if(!r.active&&(i||(o=d,Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))>r.threshold))){if(Q(c,{x:Gc(h.x+l.x),y:Gc(h.y+l.y),dx:0,dy:0},{originalEvent:e}),!1===s("start"))return f();r.active=!0,r.keepSelection||(c.previousSelection=n.get(),n.select(null)),r.cursor&&va(r.cursor),t.addMarker(t.getRootElement(),Wc)}jo(e),r.active&&(Q(c,{x:Gc(m.x+l.x),y:Gc(m.y+l.y),dx:Gc(g.x),dy:Gc(g.y)},{originalEvent:e}),s("move"))}function l(e){var t=!0;r.active&&(e&&(r.payload.originalEvent=e,jo(e)),t=s("end")),!1===t&&s("rejected"),s("ended",g(!0!==t))}function p(e){aa("Escape",e)&&(Uc(e),f())}function u(t){var n;r.active&&(n=_a(e),setTimeout(n,400),Uc(t)),l(t)}function d(e){c(e)}function h(e){var t=r.payload;t.hoverGfx=e.gfx,t.hover=e.element,s("hover")}function m(e){s("out");var t=r.payload;t.hoverGfx=null,t.hover=null}function f(e){var t;if(r){var n=r.active;n&&s("cancel"),t=g(e),n&&s("canceled",t)}}function g(o){var a,g;s("cleanup"),ba(),g=r.trapClick?u:l,xe.unbind(document,"mousemove",c),xe.unbind(document,"dragstart",Uc),xe.unbind(document,"selectstart",Uc),xe.unbind(document,"mousedown",g,!0),xe.unbind(document,"mouseup",g,!0),xe.unbind(document,"keyup",p),xe.unbind(document,"touchstart",d,!0),xe.unbind(document,"touchcancel",f,!0),xe.unbind(document,"touchmove",c,!0),xe.unbind(document,"touchend",l,!0),e.off("element.hover",h),e.off("element.out",m),t.removeMarker(t.getRootElement(),Wc);var y=r.payload.previousSelection;return!1!==o&&y&&!n.get().length&&function(e){var t=e.filter((function(e){return i.get(e.id)}));t.length&&n.select(t)}(y),a=r,r=null,a}e.on("diagram.destroy",f),this.init=function(t,n,i,g){r&&f(!1),"string"==typeof n&&(g=i,i=n,n=null);var y,v,b,x,_,w,E=(g=Q({},o,g||{})).data||{};x=g.trapClick?u:l,t?(y=Oo(t)||t,v=Lo(t),jo(t),"dragstart"===y.type&&Uc(y)):(y=null,v={x:0,y:0}),b=a(v),n||(n=b),w=y,_="undefined"!=typeof TouchEvent&&w instanceof TouchEvent,r=Q({prefix:i,data:E,payload:{},globalStart:v,displacement:Ea(n,b),localStart:b,isTouch:_},g),g.manual||(_?(xe.bind(document,"touchstart",d,!0),xe.bind(document,"touchcancel",f,!0),xe.bind(document,"touchmove",c,!0),xe.bind(document,"touchend",l,!0)):(xe.bind(document,"mousemove",c),xe.bind(document,"dragstart",Uc),xe.bind(document,"selectstart",Uc),xe.bind(document,"mousedown",x,!0),xe.bind(document,"mouseup",x,!0)),xe.bind(document,"keyup",p),e.on("element.hover",h),e.on("element.out",m)),s("init"),g.autoActivate&&c(t,!0)},this.move=c,this.hover=h,this.out=m,this.end=l,this.cancel=f,this.context=function(){return r},this.setOptions=function(e){Q(o,e)}}qc.$inject=["eventBus","canvas","selection","elementRegistry"];const Kc={__depends__:[Vc,Jo],dragging:["type",qc]};function Xc(e,t,n){this._canvas=n,this._opts=Q({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var i=this;t.on("drag.move",(function(e){var t=i._toBorderPoint(e);i.startScroll(t)})),t.on(["drag.cleanup"],(function(){i.stopScroll()}))}function Yc(e,t,n){return tg-3&&(n=Br(r.target,f),a===g-2?"intersect"===n&&(h.pop(),h[h.length-1]=f):"intersect"!==n&&h.push(u)),i.newWaypoints=r.waypoints=s(r,h),l(i,y,e),i.newSegmentStartIndex=o+y,c(e)})),t.on("connectionSegment.move.hover",(function(e){e.context.hover=e.hover,n.addMarker(e.hover,Tl)})),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],(function(e){var t=e.context.hover;t&&n.removeMarker(t,Tl)})),t.on("connectionSegment.move.cleanup",(function(e){var t=e.context,i=t.connection;t.draggerGfx&&et(t.draggerGfx),n.removeMarker(i,Dl)})),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],(function(e){var t=e.context;t.connection.waypoints=t.originalWaypoints,c(e)})),t.on("connectionSegment.move.end",(function(e){var t=e.context,n=t.connection,i=t.newWaypoints,r=t.newSegmentStartIndex,a=function(e,t){var n=0;return{waypoints:e.filter((function(i,r){return!Vi(e[r-1],e[r+1],i)||(n=r<=t?n-1:n,!1)})),segmentOffset:n}}(i=i.map((function(e){return{original:e.original,x:Math.round(e.x),y:Math.round(e.y)}})),r),c=s(n,a.waypoints),l=a.segmentOffset,p={segmentMove:{segmentStartIndex:t.segmentStartIndex,newSegmentStartIndex:r+l}};o.updateWaypoints(n,c,p)}))}Ll.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var Il=Math.abs,$l=Math.round;function zl(e){return{x:e.x,y:e.y}}function Fl(e){return{x:e.x+e.width,y:e.y+e.height}}function Hl(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:$l(e.x+e.width/2),y:$l(e.y+e.height/2)}}function Vl(e,t){var n=e.snapped;return!!n&&("string"==typeof t?n[t]:n.x&&n.y)}function Gl(e,t,n){if("string"!=typeof t)throw new Error("axis must be in [x, y]");if("number"!=typeof n&&!1!==n)throw new Error("value must be Number or false");var i,r=e[t],o=e.snapped=e.snapped||{};return!1===n?o[t]=!1:(o[t]=!0,i=n-r,e[t]+=i,e["d"+t]+=i),r}function Wl(e){return e.children||[]}var Ul=Math.abs,ql=Math.round;function Kl(e){function t(e,t){if(C(e)){for(var n=e.length;n--;)if(Ul(e[n]-t)<=10)return e[n]}else{var i=t%(e=+e);if(i<10)return t-i;if(i>e-10)return t-i+e}return t}function n(e,t){return e.waypoints?gl(t,e):e.width?{x:ql(e.width/2+e.x),y:ql(e.height/2+e.y)}:void 0}e.on("connectionSegment.move.move",1500,(function(e){var i,r,o=function(e){var t=e.context,i=t.snapPoints,r=t.connection,o=r.waypoints,a=t.segmentStart,s=t.segmentStartIndex,c=t.segmentEnd,l=t.segmentEndIndex,p=t.axis;if(i)return i;var u=[o[s-1],a,c,o[l+1]];return s<2&&u.unshift(n(r.source,e)),l>o.length-3&&u.unshift(n(r.target,e)),t.snapPoints=i={horizontal:[],vertical:[]},N(u,(function(e){e&&(e=e.original||e,"y"===p&&i.horizontal.push(e.y),"x"===p&&i.vertical.push(e.x))})),i}(e),a=e.x,s=e.y;if(o){var c=a-(i=t(o.vertical,a)),l=s-(r=t(o.horizontal,s));Q(e,{dx:e.dx-c,dy:e.dy-l,x:i,y:r}),(c||-1!==o.vertical.indexOf(a))&&Gl(e,"x",i),(l||-1!==o.horizontal.indexOf(s))&&Gl(e,"y",r)}})),e.on(["connect.hover","connect.move","connect.end"],1500,(function(e){var t=e.context.hover,i=t&&n(t,e);Yn(t)&&i&&i.x&&i.y&&(Gl(e,"x",i.x),Gl(e,"y",i.y))})),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,(function(e){var i,r,o=e.context,a=function(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var r=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},N(r,(function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))})),t}(o),s=o.hover,c=s&&n(s,e),l=e.x,p=e.y;if(a){var u=l-(i=t(c?a.vertical.concat([c.x]):a.vertical,l)),d=p-(r=t(c?a.horizontal.concat([c.y]):a.horizontal,p));Q(e,{dx:e.dx-u,dy:e.dy-d,x:e.x-u,y:e.y-d}),(u||-1!==a.vertical.indexOf(l))&&Gl(e,"x",i),(d||-1!==a.horizontal.indexOf(p))&&Gl(e,"y",r)}}))}Kl.$inject=["eventBus"];const Xl={__depends__:[Kc,Jc],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",yl],bendpointMove:["type",wl],bendpointMovePreview:["type",Ml],connectionSegmentMove:["type",Ll],bendpointSnapping:["type",Kl]};function Yl(e,t,n,i){function r(e,t){return i.allowed("connection.create",{source:e,target:t})}e.on("connect.hover",(function(e){var t,n=e.context,i=n.start,o=e.hover;if(n.hover=o,!S(t=n.canExecute=r(i,o))){if(!1!==t)return n.source=i,void(n.target=o);S(t=n.canExecute=r(o,i))||!1!==t&&(n.source=o,n.target=i)}})),e.on(["connect.out","connect.cleanup"],(function(e){var t=e.context;t.hover=null,t.source=null,t.target=null,t.canExecute=!1})),e.on("connect.end",(function(e){var t=e.context,i=t.canExecute,r=t.connectionStart,o={x:e.x,y:e.y},a=t.source,s=t.target;if(!i)return!1;var c=null,l={connectionStart:Zl(t)?o:r,connectionEnd:Zl(t)?r:o};k(i)&&(c=i),t.connection=n.connect(a,s,c,l)})),this.start=function(e,n,i,r){k(i)||(r=i,i=Dr(n)),t.init(e,"connect",{autoActivate:r,data:{shape:n,context:{start:n,connectionStart:i}}})}}function Zl(e){var t=e.hover,n=e.source,i=e.target;return t&&n&&t===n&&n!==i}Yl.$inject=["eventBus","dragging","modeling","rules"];var Ql="connect-ok",Jl="connect-not-ok";function ep(e,t,n){var i=e.get("connectionPreview",!1);i&&t.on("connect.move",(function(e){var t=e.context,n=t.canExecute,r=t.hover,o=t.source,a=t.start,s=t.startPosition,c=t.target,l=t.connectionStart||s,p=t.connectionEnd||{x:e.x,y:e.y},u=l,d=p;Zl(t)&&(u=p,d=l),i.drawPreview(t,n,{source:o||a,target:c||r,connectionStart:u,connectionEnd:d})})),t.on("connect.hover",900,(function(e){var t=e.context,i=e.hover,r=t.canExecute;null!==r&&n.addMarker(i,r?Ql:Jl)})),t.on(["connect.out","connect.cleanup"],1100,(function(e){var t=e.hover;t&&(n.removeMarker(t,Ql),n.removeMarker(t,Jl))})),i&&t.on("connect.cleanup",(function(e){i.cleanUp(e.context)}))}ep.$inject=["injector","eventBus","canvas"];const tp={__depends__:[Jo,Jc,Kc],__init__:["connectPreview"],connect:["type",Yl],connectPreview:["type",ep]};function np(e,t,n,i){this._canvas=t,this._graphicsFactory=n,this._elementFactory=i,this._connectionDocking=e.get("connectionDocking",!1),this._layouter=e.get("layouter",!1)}np.$inject=["injector","canvas","graphicsFactory","elementFactory"],np.prototype.drawPreview=function(e,t,n){n=n||{};var i,r,o,a=e.connectionPreviewGfx,s=e.getConnection,c=n.source,l=n.target,p=n.waypoints,u=n.connectionStart,d=n.connectionEnd,h=n.noLayout,m=n.noCropping,f=n.noNoop,g=this;a||(a=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),ze(a),s||(s=e.getConnection=(r=function(e,t,n){return g.getConnection(e,t,n)},o={},function(e){var t=JSON.stringify(e),n=o[t];return n||(n=o[t]=r.apply(null,arguments)),n})),t&&(i=s(t,c,l)),i?(i.waypoints=p||[],this._layouter&&!h&&(i.waypoints=this._layouter.layoutConnection(i,{source:c,target:l,connectionStart:u,connectionEnd:d,waypoints:n.waypoints||i.waypoints})),i.waypoints&&i.waypoints.length||(i.waypoints=[c?Dr(c):u,l?Dr(l):d]),this._connectionDocking&&(c||l)&&!m&&(i.waypoints=this._connectionDocking.getCroppedWaypoints(i,c,l)),this._graphicsFactory.drawConnection(a,i,{stroke:"var(--element-dragger-color)"})):!f&&this.drawNoopPreview(a,n)},np.prototype.drawNoopPreview=function(e,t){var n=t.source,i=t.target,r=t.connectionStart||Dr(n),o=t.connectionEnd||Dr(i),a=this.cropWaypoints(r,o,n,i);De(e,this.createNoopConnection(a[0],a[1]))},np.prototype.cropWaypoints=function(e,t,n,i){var r=this._graphicsFactory,o=n&&r.getShapePath(n),a=i&&r.getShapePath(i),s=r.getConnectionPath({waypoints:[e,t]});return[e=n&&Nr(o,s,!0)||e,t=i&&Nr(a,s,!1)||t]},np.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&et(e.connectionPreviewGfx)},np.prototype.getConnection=function(e){var t=function(e){return k(e)?e:{}}(e);return this._elementFactory.createConnection(t)},np.prototype.createConnectionPreviewGfx=function(){var e=We("g");return je(e,{pointerEvents:"none"}),Ie(e).add("djs-dragger"),De(this._canvas.getActiveLayer(),e),e},np.prototype.createNoopConnection=function(e,t){return ui([e,t],{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"})};const ip={__init__:["connectionPreview"],connectionPreview:["type",np]};function rp(e){return e.childNodes[0]}const op=new qr("ps");var ap=["marker-start","marker-mid","marker-end"],sp=["circle","ellipse","line","path","polygon","polyline","path","rect"];function cp(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._styles=i}cp.$inject=["elementRegistry","eventBus","canvas","styles"],cp.prototype.cleanUp=function(){},cp.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},cp.prototype.addDragger=function(e,t,n,i="djs-dragger"){var r=Fe(n=n||this.getGfx(e)),o=n.getBoundingClientRect();return this._cloneMarkers(rp(r),i),je(r,this._styles.cls(i,[],{x:o.top,y:o.left})),De(t,r),je(r,"data-preview-support-element-id",e.id),r},cp.prototype.addFrame=function(e,t){var n=We("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return De(t,n),je(n,"data-preview-support-element-id",e.id),n},cp.prototype._cloneMarkers=function(e,t="djs-dragger",n=e){var i,r=this;if(e.childNodes)for(var o=0;o defs",e);c||De(e,c=We("defs")),De(c,s),je(t,i,"url(#"+s.id+")")};const lp={__init__:["previewSupport"],previewSupport:["type",cp]},pp="complex-preview";class ComplexPreview{constructor(e,t,n){this._canvas=e,this._graphicsFactory=t,this._previewSupport=n,this._markers=[]}create(e){this.cleanUp();const{created:t=[],moved:n=[],removed:i=[],resized:r=[]}=e,o=this._canvas.getLayer(pp);t.filter((e=>!function(e){return e.hidden}(e))).forEach((e=>{let t;Yn(e)?(t=this._graphicsFactory._createContainer("connection",We("g")),this._graphicsFactory.drawConnection(rp(t),e)):(t=this._graphicsFactory._createContainer("shape",We("g")),this._graphicsFactory.drawShape(rp(t),e),Ei(t,e.x,e.y)),this._previewSupport.addDragger(e,o,t)})),n.forEach((({element:e,delta:t})=>{this._previewSupport.addDragger(e,o,void 0,"djs-dragging"),this._canvas.addMarker(e,"djs-element-hidden"),this._markers.push([e,"djs-element-hidden"]);const n=this._previewSupport.addDragger(e,o);Yn(e)?Ei(n,t.x,t.y):Ei(n,e.x+t.x,e.y+t.y)})),i.forEach((e=>{this._previewSupport.addDragger(e,o,void 0,"djs-dragging"),this._canvas.addMarker(e,"djs-element-hidden"),this._markers.push([e,"djs-element-hidden"])})),r.forEach((({shape:e,bounds:t})=>{this._canvas.addMarker(e,"djs-hidden"),this._markers.push([e,"djs-hidden"]),this._previewSupport.addDragger(e,o,void 0,"djs-dragging");const n=this._graphicsFactory._createContainer("shape",We("g"));this._graphicsFactory.drawShape(rp(n),e,{width:t.width,height:t.height}),Ei(n,t.x,t.y),this._previewSupport.addDragger(e,o,n)}))}cleanUp(){ze(this._canvas.getLayer(pp)),this._markers.forEach((([e,t])=>this._canvas.removeMarker(e,t))),this._markers=[]}show(){this._canvas.showLayer(pp)}hide(){this._canvas.hideLayer(pp)}}ComplexPreview.$inject=["canvas","graphicsFactory","previewSupport"];const up={__depends__:[lp],__init__:["complexPreview"],complexPreview:["type",ComplexPreview]};var dp=["top","bottom","left","right"],hp=10;function mp(e,t){function n(e){if(ti(e)){var n=function(e){var t=Dr(e.label),n=Dr(e),i=fp(n,t);if(r=i,-1===dp.indexOf(r))return;var r;var o=function(e){var t=Dr(e),n=[].concat(e.incoming.map((function(e){return e.waypoints[e.waypoints.length-2]})),e.outgoing.map((function(e){return e.waypoints[1]}))).map((function(e){return fp(t,e)}));return n}(e);if(e.host){var a=function(e){var t,n=e.host,i=Dr(e),r=Br(i,n);t=r.indexOf("-")>=0?r.split("-"):[r];var o=dp.filter((function(e){return-1===t.indexOf(e)}));return o}(e);o=o.concat(a)}var s=dp.filter((function(e){return-1===o.indexOf(e)}));if(-1!==s.indexOf(i))return;return s[0]}(e);n&&function(e,n){var i=Dr(e),r=e.label,o=Dr(r);if(!r.parent)return;var a,s=Rr(e);switch(n){case"top":a={x:i.x,y:s.top-hp-r.height/2};break;case"left":a={x:s.left-hp-r.width/2,y:i.y};break;case"bottom":a={x:i.x,y:s.bottom+hp+r.height/2};break;case"right":a={x:s.right+hp+r.width/2,y:i.y}}var c=Ea(a,o);t.moveShape(r,c)}(e,n)}}no.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],(function(e){var t=e.context,i=t.connection,r=i.source,o=i.target;!1!==(t.hints||{}).createElementsBehavior&&(n(r),n(o))})),this.postExecuted(["label.create"],(function(e){var t=e.context,i=t.shape;!1!==(t.hints||{}).createElementsBehavior&&n(i.labelTarget)})),this.postExecuted(["elements.create"],(function(e){var t=e.context,i=t.elements;!1!==(t.hints||{}).createElementsBehavior&&i.forEach((function(e){n(e)}))}))}function fp(e,t){return Br(t,e,5)}function gp(e){no.call(this,e),this.preExecute("shape.append",(function(e){var t=e.source,n=e.shape;e.position||(Sn(n,"bpmn:TextAnnotation")?e.position={x:t.x+t.width/2+75,y:t.y-50-n.height/2}:e.position={x:t.x+t.width+80+n.width/2,y:t.y+t.height/2})}),!0)}function yp(e,t){e.invoke(no,this),this.postExecute("shape.move",(function(e){var n=e.newParent,i=e.shape;N(B(i.incoming.concat(i.outgoing),(function(e){return Sn(e,"bpmn:Association")})),(function(e){t.moveConnection(e,{x:0,y:0},n)}))}),!0)}v(mp,no),mp.$inject=["eventBus","modeling"],v(gp,no),gp.$inject=["eventBus"],v(yp,no),yp.$inject=["injector","modeling"];function vp(e,t){t.invoke(no,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;1===(t=t.filter((function(e){return bp(e,e.host)}))).length&&t.map((function(e){return t.indexOf(e)})).forEach((function(i){var r=t[i];e.elements[i]=n._replaceShape(t[i],r)}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;if(1===t.length){var r=t[0];bp(r,i)&&(e.shapes=[n._replaceShape(r,i)])}}),!0)}function bp(e,t){return!Zn(e)&&Cn(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t}function xp(e,t){function n(e){return B(e.attachers,(function(e){return Sn(e,"bpmn:BoundaryEvent")}))}no.call(this,e),this.postExecute("connection.create",(function(e){var i=e.context.source,r=e.context.target,o=n(r);Sn(i,"bpmn:EventBasedGateway")&&Sn(r,"bpmn:ReceiveTask")&&o.length>0&&t.removeElements(o)})),this.postExecute("connection.reconnect",(function(e){var i=e.context.oldSource,r=e.context.newSource;Sn(i,"bpmn:Gateway")&&Sn(r,"bpmn:EventBasedGateway")&&N(r.outgoing,(function(e){var i=e.target,r=n(i);Sn(i,"bpmn:ReceiveTask")&&r.length>0&&t.removeElements(r)}))}))}function _p(e,t,n){function i(e){t.updateProperties(e,{isForCompensation:!0})}function r(e){t.updateProperties(e,{isForCompensation:void 0})}no.call(this,e),this.preExecute("shape.replace",(function(e){const{newData:n,oldShape:i}=e;if(Ep(e.oldShape)&&"bpmn:CompensateEventDefinition"!==n.eventDefinitionType||"bpmn:BoundaryEvent"!==n.type){const t=i.outgoing.find((({target:e})=>wp(e)));t&&t.target&&(e._connectionTarget=t.target)}else if(!Ep(e.oldShape)&&"bpmn:CompensateEventDefinition"===n.eventDefinitionType&&"bpmn:BoundaryEvent"===n.type){const n=i.outgoing.find((({target:e})=>Sp(e)));n&&n.target&&(e._connectionTarget=n.target),function(e){const n=e.outgoing.filter((e=>Sn(e,"bpmn:SequenceFlow")));t.removeElements(n)}(i)}}),!0),this.postExecuted("shape.replace",(function(e){const{_connectionTarget:n,newShape:i}=e;n&&t.connect(i,n)}),!0),this.preExecute("connection.create",(function(e){const n=e.connection,r=e.source,o=e.target;Ep(r)&&Sp(o)&&(i(o),function(e,n){const i=e.outgoing.filter((e=>Sn(e,"bpmn:Association")));i.filter((e=>wp(e.target)&&!n.includes(e))).forEach((e=>t.removeConnection(e)))}(r,[n]))}),!0),this.postExecuted("connection.delete",(function(e){const t=e.source,n=e.target;Ep(t)&&wp(n)&&r(n)}),!0),this.postExecuted("connection.reconnect",(function(e){const t=e.newTarget,n=e.oldSource,o=e.oldTarget;if(o!==t){const e=n;wp(o)&&r(o),Ep(e)&&Sp(t)&&i(t)}}),!0),this.postExecuted("element.updateProperties",(function(e){const{element:i}=e;wp(i)?(function(e){for(const i of e.incoming)n.canConnect(i.source,e)||t.removeConnection(i);for(const i of e.outgoing)n.canConnect(e,i.target)||t.removeConnection(i)}(i),function(e){const n=e.attachers.slice();if(!n.length)return;t.removeElements(n)}(i)):Sp(i)&&function(e){const n=e.incoming.filter((e=>Ep(e.source)));t.removeElements(n)}(i)}),!0)}function wp(e){const t=kn(e);return t&&t.get("isForCompensation")}function Ep(e){return e&&Sn(e,"bpmn:BoundaryEvent")&&Xn(e,"bpmn:CompensateEventDefinition")}function Sp(e){return e&&Sn(e,"bpmn:Activity")&&!Kn(e)}function Cp(e){e.invoke(no,this),this.preExecute("shape.create",1500,(function(e){var t=e.context,n=t.parent,i=t.shape;Sn(n,"bpmn:Lane")&&!Sn(i,"bpmn:Lane")&&(t.parent=Tc(n,"bpmn:Participant"))}))}function kp(e,t){no.call(this,e),this.preExecute("shape.create",(function(e){var n=e.context.shape;if(Sn(n,"bpmn:DataObjectReference")&&"label"!==n.type){var i=t.create("bpmn:DataObject");n.businessObject.dataObjectRef=i}}))}vp.$inject=["bpmnReplace","injector"],v(vp,no),vp.prototype._replaceShape=function(e,t){var n,i=(n=kn(e).eventDefinitions)&&n[0],r={type:"bpmn:BoundaryEvent",host:t};return i&&(r.eventDefinitionType=i.$type),this._bpmnReplace.replaceElement(e,r,{layoutConnection:!1})},xp.$inject=["eventBus","modeling"],v(xp,no),v(_p,no),_p.$inject=["eventBus","modeling","bpmnRules"],Cp.$inject=["injector"],v(Cp,no),kp.$inject=["eventBus","bpmnFactory"],v(kp,no);var Ap=20,Pp=20,Rp=30,Mp=2e3;function Tp(e,t,n){function i(){var t=e.getRootElement();return Sn(t,"bpmn:Collaboration")?t:n.makeCollaboration()}no.call(this,t),t.on(["create.start","shape.move.start"],Mp,(function(t){var n=t.context,i=n.shape,r=e.getRootElement();if(Sn(i,"bpmn:Participant")&&Sn(r,"bpmn:Process")&&r.children.length){var o=r.children.filter((function(e){return!Sn(e,"bpmn:Group")&&!Zn(e)&&!Yn(e)}));if(o.length){var a=Wr(o),s=function(e,t){t={width:t.width+2*Ap+Rp,height:t.height+2*Pp};var n=Math.max(e.width,t.width),i=Math.max(e.height,t.height);return{x:-n/2,y:-i/2,width:n,height:i}}(i,a);Q(i,s),n.createConstraints=function(e,t){return t=Rr(t),{bottom:t.top+e.height/2-Pp,left:t.right-e.width/2+Ap,top:t.bottom-e.height/2+Pp,right:t.left+e.width/2-Ap-Rp}}(i,a)}}})),t.on("create.start",Mp,(function(n){var i=n.context.shape,r=e.getRootElement(),o=e.getGraphics(r);function a(e){e.element=r,e.gfx=o}Sn(i,"bpmn:Participant")&&Sn(r,"bpmn:Process")&&(t.on("element.hover",Mp,a),t.once("create.cleanup",(function(){t.off("element.hover",a)})))})),this.preExecute("elements.create",Mp,(function(e){var t,n=e.elements,r=e.parent,o=function(e){return T(e,(function(e){return Sn(e,"bpmn:Participant")}))}(n);o&&Sn(r,"bpmn:Process")&&(e.parent=i(),(t=e.hints=e.hints||{}).participant=o,t.process=r,t.processRef=kn(o).get("processRef"))}),!0),this.preExecute("shape.create",(function(e){var t=e.parent,n=e.shape;Sn(n,"bpmn:Participant")&&Sn(t,"bpmn:Process")&&(e.parent=i(),e.process=t,e.processRef=kn(n).get("processRef"))}),!0),this.execute("shape.create",(function(e){var t=e.hints||{},n=e.process||t.process,i=e.shape,r=t.participant;!n||r&&i!==r||kn(i).set("processRef",kn(n))}),!0),this.revert("shape.create",(function(e){var t=e.hints||{},n=e.process||t.process,i=e.processRef||t.processRef,r=e.shape,o=t.participant;!n||o&&r!==o||kn(r).set("processRef",i)}),!0),this.postExecute("shape.create",(function(e){var t=e.hints||{},i=e.process||e.hints.process,r=e.shape,o=t.participant;if(i){var a=i.children.slice();o?r===o&&n.moveElements(a,{x:0,y:0},o):n.moveElements(a,{x:0,y:0},r)}}),!0)}function Dp(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function Bp(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function Np(e,t){return e&&t?e.indexOf(t):-1}Tp.$inject=["canvas","eventBus","modeling"],v(Tp,no);var Op="__targetRef_placeholder";function jp(e,t){function n(e,n){var i=e.get("properties"),r=T(i,(function(e){return e.name===Op}));return!r&&n&&Bp(i,r=t.create("bpmn:Property",{name:Op})),r}function i(e,t){var i=n(e);i&&(function(e,t,n){return T(e.get("dataInputAssociations"),(function(e){return e!==n&&e.targetRef===t}))}(e,i,t)||Dp(e.get("properties"),i))}function r(e){var t,r=e.context,o=r.connection,a=o.businessObject,s=o.target,c=s&&s.businessObject,l=r.newTarget,p=l&&l.businessObject,u=r.oldTarget||r.target,d=u&&u.businessObject,h=o.businessObject;d&&d!==c&&i(d,a),p&&p!==c&&i(p,a),c?(t=n(c,!0),h.targetRef=t):h.targetRef=null}no.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],Lp(r)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],Lp(r))}function Lp(e){return function(t){if(Sn(t.context.connection,"bpmn:DataInputAssociation"))return e(t)}}function Ip(e){this._bpmnUpdater=e}function $p(e,t,n,i){function r(e){return e.children.filter((function(e){return Sn(e,"bpmn:DataStoreReference")&&!e.labelTarget}))}function o(e,i){var r=e.businessObject||e;if(i=i||n.filter((function(e){return Sn(e,"bpmn:Participant")&&kn(e).processRef}))[0]){var o=i.businessObject||i;t.execute("dataStore.updateContainment",{dataStoreBo:r,dataStoreDi:An(e),newSemanticParent:o.processRef||o,newDiParent:An(i)})}}no.call(this,i),t.registerHandler("dataStore.updateContainment",Ip),this.preExecute("shape.create",(function(e){var t=e.context,n=t.shape;Sn(n,"bpmn:DataStoreReference")&&"label"!==n.type&&(t.hints||(t.hints={}),t.hints.autoResize=!1)})),this.preExecute("elements.move",(function(e){var t=e.context,n=t.shapes;n.filter((function(e){return Sn(e,"bpmn:DataStoreReference")})).length&&(t.hints||(t.hints={}),t.hints.autoResize=n.filter((function(e){return!Sn(e,"bpmn:DataStoreReference")})))})),this.postExecute("shape.create",(function(e){var t=e.context.shape,n=t.parent;Sn(t,"bpmn:DataStoreReference")&&"label"!==t.type&&Sn(n,"bpmn:Collaboration")&&o(t)})),this.postExecute("shape.move",(function(e){var t=e.context,n=t.shape,i=t.oldParent,r=n.parent;Sn(i,"bpmn:Collaboration")||Sn(n,"bpmn:DataStoreReference")&&"label"!==n.type&&Sn(r,"bpmn:Collaboration")&&o(n,Sn(i,"bpmn:Participant")?i:function(e,t){for(;e.parent;){if(Sn(e.parent,t))return e.parent;e=e.parent}}(i,"bpmn:Participant"))})),this.postExecute("shape.delete",(function(t){var n=t.context.shape,i=e.getRootElement();Cn(n,["bpmn:Participant","bpmn:SubProcess"])&&Sn(i,"bpmn:Collaboration")&&r(i).filter((function(e){return function(e,t){var n=e.businessObject||e,i=t.businessObject||t;for(;n.$parent;){if(n.$parent===i.processRef||i)return!0;n=n.$parent}return!1}(e,n)})).forEach((function(e){o(e)}))})),this.postExecute("canvas.updateRoot",(function(e){var t=e.context,n=t.oldRoot,i=t.newRoot;r(n).forEach((function(e){Sn(i,"bpmn:Process")&&o(e,i)}))}))}jp.$inject=["eventBus","bpmnFactory"],v(jp,no),Ip.$inject=["bpmnUpdater"],Ip.prototype.execute=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,i=e.newSemanticParent,r=e.newDiParent;return e.oldSemanticParent=t.$parent,e.oldDiParent=n.$parent,this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(n,r),[]},Ip.prototype.revert=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,i=e.oldSemanticParent,r=e.oldDiParent;return this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(n,r),[]},$p.$inject=["canvas","commandStack","elementRegistry","eventBus"],v($p,no);var zp=Math.max,Fp=Math.min,Hp=20;function Vp(e,t){return{top:e.top-t.top,right:e.right-t.right,bottom:e.bottom-t.bottom,left:e.left-t.left}}function Gp(e,t,n){var i=t[e],r=n.min&&n.min[e],o=n.max&&n.max[e];return A(r)&&(i=(/top|left/.test(e)?Fp:zp)(i,r)),A(o)&&(i=(/top|left/.test(e)?zp:Fp)(i,o)),i}function Wp(e,t){return void 0!==e?e:Hp}function Up(e){return!e.waypoints&&"label"!==e.type}function qp(e,t){var n;if((n=void 0===e.length?B(e.children,Up):e).length)return function(e,t){var n,i,r,o;return"object"==typeof t?(n=Wp(t.left),i=Wp(t.right),r=Wp(t.top),o=Wp(t.bottom)):n=i=r=o=Wp(t),{x:e.x-n,y:e.y-r,width:e.width+n+i,height:e.height+r+o}}(Wr(n),t)}var Kp=Math.abs;var Xp=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"],Yp=30;function Zp(e,t){return t=t||[],e.children.filter((function(e){Sn(e,"bpmn:Lane")&&(Zp(e,t),t.push(e))})),t}function Qp(e){return e.children.filter((function(e){return Sn(e,"bpmn:Lane")}))}function Jp(e){return Tc(e,Xp)||e}function eu(e,t){var n=Jp(e),i=Zp(n,Sn(n,"bpmn:Process")?[]:[n]),r=Rr(e),o=Rr(t),a=function(e,t){return Vp(Rr(t),Rr(e))}(e,t),s=[],c=qn(e);return i.forEach((function(t){if(t!==e){var n,i,l=c?0:a.top,p=c?a.right:0,u=c?0:a.bottom,d=c?a.left:0,h=Rr(t);a.top&&(Kp(h.bottom-r.top)<10&&(u=o.top-h.bottom),Kp(h.top-r.top)<5&&(l=o.top-h.top)),a.left&&(Kp(h.right-r.left)<10&&(p=o.left-h.right),Kp(h.left-r.left)<5&&(d=o.left-h.left)),a.bottom&&(Kp(h.top-r.bottom)<10&&(l=o.bottom-h.top),Kp(h.bottom-r.bottom)<5&&(u=o.bottom-h.bottom)),a.right&&(Kp(h.left-r.right)<10&&(d=o.right-h.left),Kp(h.right-r.right)<5&&(p=o.right-h.right)),(l||p||u||d)&&s.push({shape:t,newBounds:(n=t,i={top:l,right:p,bottom:u,left:d},{x:n.x+(i.left||0),y:n.y+(i.top||0),width:n.width-(i.left||0)+(i.right||0),height:n.height-(i.top||0)+(i.bottom||0)})})}})),s}function tu(e,t){no.call(this,e),this.postExecuted("shape.delete",500,(function(e){var n=e.context,i=n.hints,r=n.shape,o=n.oldParent;Sn(r,"bpmn:Lane")&&(i&&i.nested||function(e,n){var i,r,o,a,s,c=qn(e),l=Qp(n),p=[],u=[],d=[],h=[];Vr(l,(function(t){return c?t.y>e.y?u.push(t):p.push(t):t.x>e.x?h.push(t):d.push(t),t.children})),l.length&&(i=c?u.length&&p.length?e.height/2:e.height:h.length&&d.length?e.width/2:e.width,p.length&&(r=t.calculateAdjustments(p,"y",i,e.y-10),t.makeSpace(r.movingShapes,r.resizingShapes,{x:0,y:i},"s")),u.length&&(o=t.calculateAdjustments(u,"y",-i,e.y+e.height+10),t.makeSpace(o.movingShapes,o.resizingShapes,{x:0,y:-i},"n")),d.length&&(a=t.calculateAdjustments(d,"x",i,e.x-10),t.makeSpace(a.movingShapes,a.resizingShapes,{x:i,y:0},"e")),h.length&&(s=t.calculateAdjustments(h,"x",-i,e.x+e.width+10),t.makeSpace(s.movingShapes,s.resizingShapes,{x:-i,y:0},"w")))}(r,o))}))}tu.$inject=["eventBus","spaceTool"],v(tu,no);function nu(e,t){t.invoke(no,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;t.filter((function(e){return iu(e,e.host)})).map((function(e){return t.indexOf(e)})).forEach((function(i){e.elements[i]=n._replaceShape(t[i])}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;t.forEach((function(e,r){var o,a=e.host;iu(e,(o=a,-1!==t.indexOf(o)?a:i))&&(t[r]=n._replaceShape(e))}))}),!0)}function iu(e,t){return!Zn(e)&&Sn(e,"bpmn:BoundaryEvent")&&!t}function ru(e,t,n){function i(e,i,r){var o,a,s,c,l,p,u,d,h=i.waypoints,m=e.outgoing.slice(),f=e.incoming.slice(),g=il(h,d=A(r.width)?Dr(r):r);if(g){if(o=h.slice(0,g.index),a=h.slice(g.index+(g.bendpoint?1:0)),!o.length||!a.length)return;s=g.bendpoint?h[g.index]:d,1!==o.length&&ou(e,o[o.length-1])||o.push(au(s)),1!==a.length&&ou(e,a[0])||a.unshift(au(s))}c=i.source,l=i.target,t.canConnect(c,e,i)&&(n.reconnectEnd(i,e,o||d),p=i),t.canConnect(e,l,i)&&(p?u=n.connect(e,l,{type:i.type,waypoints:a}):(n.reconnectStart(i,e,a||d),u=i));var y=[].concat(p&&B(f,(function(e){return e.source===p.source}))||[],u&&B(m,(function(e){return e.target===u.target}))||[]);y.length&&n.removeElements(y)}no.call(this,e),this.preExecute("elements.move",(function(e){var n=e.newParent,i=e.shapes,r=e.delta,o=i[0];if(o&&n){n&&n.waypoints&&(e.newParent=n=n.parent);var a=Dr(o),s={x:a.x+r.x,y:a.y+r.y},c=T(n.children,(function(e){return t.canInsert(i,e)&&il(e.waypoints,s)}));c&&(e.targetFlow=c,e.position=s)}}),!0),this.postExecuted("elements.move",(function(e){var t=e.shapes,n=e.targetFlow,r=e.position;n&&i(t[0],n,r)}),!0),this.preExecute("shape.create",(function(e){var n=e.parent,i=e.shape;t.canInsert(i,n)&&(e.targetFlow=n,e.parent=n.parent)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.targetFlow,r=e.position;n&&i(t,n,r)}),!0)}function ou(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function au(e){return Q({},e)}function su(e,t){no.call(this,e),this.preExecuted("connection.create",(function(e){var n=e.context,i=n.connection,r=n.source,o=n.target,a=n.hints;if((!a||!1!==a.createElementsBehavior)&&cu(i)){(Sn(r,"bpmn:EventBasedGateway")?o.incoming.filter((e=>e!==i&&cu(e))):o.incoming.filter((e=>e!==i&&cu(e)&&Sn(e.source,"bpmn:EventBasedGateway")))).forEach((function(e){t.removeConnection(e)}))}})),this.preExecuted("shape.replace",(function(e){var n=e.context.newShape;Sn(n,"bpmn:EventBasedGateway")&&n.outgoing.filter(cu).reduce((function(e,t){return e.includes(t.target)?e:e.concat(t.target)}),[]).forEach((function(e){e.incoming.filter(cu).forEach((function(i){const r=e.incoming.filter(cu).filter((function(e){return e.source===n}));(i.source!==n||r.length>1)&&t.removeConnection(i)}))}))}))}function cu(e){return Sn(e,"bpmn:SequenceFlow")}nu.$inject=["bpmnReplace","injector"],v(nu,no),nu.prototype._replaceShape=function(e){var t,n,i=(n=kn(e).eventDefinitions)&&n[0];return t=i?{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:i.$type}:{type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(e,t,{layoutConnection:!1})},v(ru,no),ru.$inject=["eventBus","bpmnRules","modeling"],su.$inject=["eventBus","modeling"],v(su,no);var lu=1500;function pu(e,t,n){t.on(["create.hover","create.move","create.out","create.end","shape.move.hover","shape.move.move","shape.move.out","shape.move.end"],lu,(function(t){var i=t.context.shape||t.shape,r=t.hover;Sn(r,"bpmn:Lane")&&!Cn(i,["bpmn:Lane","bpmn:Participant"])&&(t.hover=Jp(r),t.hoverGfx=e.getGraphics(t.hover));var o=n.getRootElement();r!==o&&(i.labelTarget||Cn(i,["bpmn:Group","bpmn:TextAnnotation"]))&&(t.hover=o,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],lu,(function(t){var n=t.hover;Sn(n,"bpmn:Lane")&&(t.hover=Jp(n)||n,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["bendpoint.move.hover"],lu,(function(t){var n=t.context,i=t.hover,r=n.type;Sn(i,"bpmn:Lane")&&/reconnect/.test(r)&&(t.hover=Jp(i)||i,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.start"],lu,(function(e){var t=e.context,n=t.start;Sn(n,"bpmn:Lane")&&(t.start=Jp(n)||n)})),t.on("shape.move.start",2e3,(function(e){var t=e.shape;Sn(t,"bpmn:Lane")&&(e.shape=Jp(t)||t)})),t.on("spaceTool.move",2e3,(function(e){var t=e.hover;t&&Sn(t,"bpmn:Lane")&&(e.hover=Jp(t))}))}pu.$inject=["elementRegistry","eventBus","canvas"];function uu(e,t,n,i,r,o){function a(e,t,i){var r=n.filter((function(e){return Sn(e,"bpmn:Group")})).filter((function(e){return e.businessObject!==i}));t&&!function(e,t){return e.some((function(e){var n=kn(e);return(n.categoryValueRef&&n.categoryValueRef.$parent)===t}))}(r,t)&&function(e){var t=e.$parent;t&&(Dp(t.get("rootElements"),e),e.$parent=null)}(t),e&&!function(e,t){return e.some((function(e){return kn(e).categoryValueRef===t}))}(r,e)&&function(e){var t=e.$parent;t&&(Dp(t.get("categoryValue"),e),e.$parent=null)}(e)}function s(e,n){return function(e,t,n){return Bp(t.get("categoryValue"),e),e.$parent=t,Bp(n.get("rootElements"),t),t.$parent=n,e}(e,n,t.getDefinitions())}function c(n,i){var r=kn(n),o=r.categoryValueRef;o||(o=r.categoryValueRef=i.categoryValue=i.categoryValue||function(e){return e.create("bpmn:CategoryValue")}(e));var a=o.$parent;a||(a=o.$parent=i.category=i.category||function(e){return e.create("bpmn:Category")}(e)),s(o,a,t.getDefinitions())}function l(e,t){var n=t.category,i=t.categoryValue,r=kn(e);i?(r.categoryValueRef=null,a(i,n,r)):a(null,r.categoryValueRef.$parent,r)}function p(t,n){var i=e.create(t.$type);return o.copyElement(t,i,null,n)}r.invoke(no,this),this.execute("label.create",(function(e){var t=e.context,n=t.labelTarget;Sn(n,"bpmn:Group")&&c(n,t)})),this.revert("label.create",(function(e){var t=e.context,n=t.labelTarget;Sn(n,"bpmn:Group")&&l(n,t)})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=kn(n);if(Sn(n,"bpmn:Group")&&!n.labelTarget){var r=t.categoryValue=i.categoryValueRef;r&&(a(r,t.category=r.$parent,i),i.categoryValueRef=null)}})),this.reverted("shape.delete",(function(e){var t=e.context,n=t.shape;if(Sn(n,"bpmn:Group")&&!n.labelTarget){var i=t.category,r=t.categoryValue,o=kn(n);r&&(o.categoryValueRef=r,s(r,i))}})),this.execute("shape.create",(function(e){var t=e.context,n=t.shape;Sn(n,"bpmn:Group")&&!n.labelTarget&&kn(n).categoryValueRef&&c(n,t)})),this.reverted("shape.create",(function(e){var t=e.context,n=t.shape;Sn(n,"bpmn:Group")&&!n.labelTarget&&kn(n).categoryValueRef&&l(n,t)})),i.on("copyPaste.copyElement",770,(function(e){var t=e.descriptor,n=e.element;if(Sn(n,"bpmn:Group")&&!n.labelTarget){var i=kn(n);if(i.categoryValueRef){var r=i.categoryValueRef;t.categoryValue=p(r,!0),r.$parent&&(t.category=p(r.$parent,!0))}}})),i.on("copyPaste.pasteElement",770,(function(e){var t=e.descriptor,n=t.businessObject,i=t.categoryValue,r=t.category;i&&(i=n.categoryValueRef=p(i)),r&&(i.$parent=p(r)),delete t.category,delete t.categoryValue}))}function du(e,t,n,i){var r,o,a,s;return 0==(r=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y))?null:(o=e.y-n.y,a=e.x-n.x,s=((i.x-n.x)*o-(i.y-n.y)*a)/r,{x:Math.round(e.x+s*(t.x-e.x)),y:Math.round(e.y+s*(t.y-e.y))})}function hu(e){function t(e,t,n){var i,r={x:n.x,y:n.y-50},o={x:n.x-50,y:n.y},a=du(e,t,n,r),s=du(e,t,n,o);i=a&&s?mu(a,n)>mu(s,n)?s:a:a||s,e.original=i}e.on("bpmnElement.added",(function(e){var n,i,r=e.element;r.waypoints&&(t((i=(n=r).waypoints)[0],i[1],Dr(n.source)),t(i[i.length-1],i[i.length-2],Dr(n.target)))}))}function mu(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function fu(e){no.call(this,e);var t=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],(function(e){var n=e.context.shape,i=kn(n),r=An(n);if(Cn(i,t)){var o=r.get("isHorizontal");void 0===o&&(o=!0),r.set("isHorizontal",o)}}))}uu.$inject=["bpmnFactory","bpmnjs","elementRegistry","eventBus","injector","moddleCopy"],v(uu,no),hu.$inject=["eventBus"],fu.$inject=["eventBus"],v(fu,no);var gu=Math.sqrt,yu=Math.min,vu=Math.max,bu=Math.abs;function xu(e){return Math.pow(e,2)}function _u(e,t){return gu(xu(e.x-t.x)+xu(e.y-t.y))}function wu(e,t,n,i){var r=t.x-e.x,o=t.y-e.y,a=n.x-e.x,s=n.y-e.y,c=r*r+o*o,l=(r*a+o*s)/c,p=l*l-(a*a+s*s-i*i)/c;if(p<0&&p>-1e-6&&(p=0),p<0)return[];var u=gu(p),d=-l+u,h=-l-u,m={x:e.x-r*d,y:e.y-o*d};return 0===p?[m]:[m,{x:e.x-r*h,y:e.y-o*h}].filter((function(n){return function(e,t,n){return Eu(e.x,t.x,n.x)&&Eu(e.y,t.y,n.y)}(n,e,t)}))}function Eu(e,t,n){return e>=yu(t,n)-Su&&e<=vu(t,n)+Su}var Su=.1;function Cu(e,t){return bu(e.x-t.x)<=Su&&bu(e.y-t.y)<=Su}function ku(e,t,n,i){var r=0,o=0,a={point:e,delta:{x:0,y:0}},s=function(e,t){var n,i,r,o,a,s,c,l,p,u,d,h,m=0;for(m=0;m line intersections");1===s.length&&(c={type:"bendpoint",position:s[0],segmentIndex:m,bendpointIndex:Cu(n,s[0])?m:m+1}),2===s.length&&(d=s[0],h=s[1],c={type:"segment",position:a={x:(d.x+h.x)/2,y:(d.y+h.y)/2},segmentIndex:m,relativeLocation:_u(n,a)/_u(n,i)}),l=_u(c.position,e),(!u||p>l)&&(u=c,p=l)}return u}(e,n),c=s.segmentIndex,l=function(e,t,n,i){var r=n.segmentIndex,o=t.length-e.length;if(i.segmentMove){var a=i.segmentMove.segmentStartIndex,s=i.segmentMove.newSegmentStartIndex;return r===a?s:r>=s?r+o=p&&(c=l?r+1:r-1),rt.length-2||null===l)return a;var p,u,d,h,m,f,g=Pu(n,c),y=Pu(t,l),v=s.position,b=(h=v,m=cl((d=g)[0],d[1]),f=cl(d[0],h),0===m?0:f/m),x=(p=y,u=ol(g),ol(p)-u);if("bendpoint"===s.type){var _=t.length-n.length,w=s.bendpointIndex,E=n[w];if(-1!==t.indexOf(E))return a;if(0===_){var S=t[w];return{delta:{x:r=S.x-s.position.x,y:o=S.y-s.position.y},point:{x:e.x+r,y:e.y+o}}}_<0&&0!==w&&w{kn(e.context.element)===e.context.moddleElement&&r(e)})),this.postExecute(["shape.create","connection.create"],(function(e){var n=e.context;if(!1!==(n.hints||{}).createElementsBehavior){var i=n.shape||n.connection;!Zn(i)&&ei(i)&&oi(i)&&t.updateLabel(i,oi(i))}})),this.postExecute("shape.delete",(function(e){var n=e.context,i=n.labelTarget,r=n.hints||{};i&&!1!==r.unsetLabel&&t.updateLabel(i,null,null,{removeShape:!1})})),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var n=e.context;if(!1!==(n.hints||{}).labelBehavior){var i,r=n.connection.label;r&&r.parent&&(i=o(e),t.moveShape(r,i))}})),this.postExecute(["shape.replace"],(function(e){var t=e.context,n=t.newShape,i=t.oldShape,r=kn(n);r&&ei(r)&&i.label&&n.label&&(n.label.x=i.label.x,n.label.y=i.label.y)})),this.postExecute("shape.resize",(function(e){var n,i=e.context,r=i.shape,o=i.newBounds,a=i.oldBounds;if(ti(r)){var s=r.label,c=function(e,t,n){var i=Ru(e,t,n);return Pr(Ea(i,e))}(function(e,t){if(!t.length)return;var n=function(e,t){var n=t.map((function(t){return{line:t,distance:sl(e,t)}}));return W(n,"distance")[0].line}(e,t);return al(e,n)}(Dr(s),[[{x:(n=a).x,y:n.y},{x:n.x+(n.width||0),y:n.y}],[{x:n.x+(n.width||0),y:n.y},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y+(n.height||0)},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y},{x:n.x,y:n.y+(n.height||0)}]]),a,o);t.moveShape(s,c)}}))}function Nu(e,t){function n(e,t){var n=e.context,i=n.connection,r=Q({},n.hints),o=n.newWaypoints||i.waypoints,a=n.oldWaypoints;return void 0===r.startChanged&&(r.startChanged=!!r.connectionStart),void 0===r.endChanged&&(r.endChanged=!!r.connectionEnd),function(e,t,n,i){return ku(e,t,n,i).point}(t,o,a,r)}no.call(this,e),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var i=e.context.connection,r=i.outgoing;i.incoming.forEach((function(i){var r=i.waypoints[i.waypoints.length-1],o=n(e,r),a=[].concat(i.waypoints.slice(0,-1),[o]);t.updateWaypoints(i,a)})),r.forEach((function(i){var r=i.waypoints[0],o=n(e,r),a=[].concat([o],i.waypoints.slice(1));t.updateWaypoints(i,a)}))})),this.postExecute(["connection.move"],(function(e){var n=e.context,i=n.connection,r=i.outgoing,o=i.incoming,a=n.delta;o.forEach((function(e){var n=e.waypoints[e.waypoints.length-1],i={x:n.x+a.x,y:n.y+a.y},r=[].concat(e.waypoints.slice(0,-1),[i]);t.updateWaypoints(e,r)})),r.forEach((function(e){var n=e.waypoints[0],i={x:n.x+a.x,y:n.y+a.y},r=[].concat([i],e.waypoints.slice(1));t.updateWaypoints(e,r)}))}))}function Ou(e,t,n){var i=zu(e),r=Fu(i,t),o=i[0];return r.length?r[r.length-1]:Ru(o.original||o,n,t)}function ju(e,t,n){var i=zu(e),r=Fu(i,t),o=i[i.length-1];return r.length?r[0]:Ru(o.original||o,n,t)}function Lu(e,t,n){var i=zu(e),r=$u(t,n),o=i[0];return Ru(o.original||o,r,t)}function Iu(e,t,n){var i=zu(e),r=$u(t,n),o=i[i.length-1];return Ru(o.original||o,r,t)}function $u(e,t){return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function zu(e){var t=e.waypoints;if(!t.length)throw new Error("connection#"+e.id+": no waypoints");return t}function Fu(e,t){return B($(e,Hu),(function(e){return function(e,t){return"intersect"===Br(t,e,1)}(e,t)}))}function Hu(e){return e.original||e}function Vu(e,t){no.call(this,e),this.postExecute("shape.replace",(function(e){var n=e.oldShape,i=e.newShape;if(function(e,t){return Sn(e,"bpmn:Participant")&&Un(e)&&Sn(t,"bpmn:Participant")&&!Un(t)}(n,i)){var r,o,a,s,c=(o=Gr([r=n],!1),a=[],s=[],o.forEach((function(e){e!==r&&(e.incoming.forEach((function(e){Sn(e,"bpmn:MessageFlow")&&a.push(e)})),e.outgoing.forEach((function(e){Sn(e,"bpmn:MessageFlow")&&s.push(e)})))}),[]),{incoming:a,outgoing:s});c.incoming.forEach((function(e){var r=ju(e,i,n);t.reconnectEnd(e,i,r)})),c.outgoing.forEach((function(e){var r=Ou(e,i,n);t.reconnectStart(e,i,r)}))}}),!0)}v(Bu,no),Bu.$inject=["eventBus","modeling","bpmnFactory","textRenderer"],v(Nu,no),Nu.$inject=["eventBus","modeling"],Vu.$inject=["eventBus","modeling"],v(Vu,no);const Gu=["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:EscalationEventDefinition","bpmn:ConditionalEventDefinition","bpmn:SignalEventDefinition"];function Wu(e){const t=kn(e);if(!(Sn(t,"bpmn:BoundaryEvent")||Sn(t,"bpmn:StartEvent")&&Kn(t.$parent)))return!1;const n=t.get("eventDefinitions");return!(!n||!n.length)&&Gu.some((e=>Sn(n[0],e)))}function Uu(e){return Sn(e,"bpmn:BoundaryEvent")?"cancelActivity":"isInterrupting"}function qu(e,t){e.invoke(no,this),this.postExecuted("shape.replace",(function(e){const n=e.context.oldShape,i=e.context.newShape,r=e.context.hints;if(!Wu(i))return;const o=Uu(i);if(r.targetElement&&void 0!==r.targetElement[o])return;const a=kn(n).get(o);a!==kn(i).get(o)&&t.updateProperties(i,{[o]:a})}))}function Ku(e,t){no.call(this,e),this.preExecute("shape.resize",(function(e){var n=e.shape,i=An(n),r=i&&i.get("label");r&&r.get("bounds")&&t.updateModdleProperties(n,r,{bounds:void 0})}),!0)}function Xu(e,t,n){no.call(this,e),this.preExecute("shape.delete",(function(e){var i=e.context.shape;if(1===i.incoming.length&&1===i.outgoing.length){var r,o,a,s=i.incoming[0],c=i.outgoing[0];if(Sn(s,"bpmn:SequenceFlow")&&Sn(c,"bpmn:SequenceFlow"))if(t.canConnect(s.source,c.target,s)){var l=(r=s.waypoints,o=c.waypoints,(a=du(Yu(r[r.length-2]),Yu(r[r.length-1]),Yu(o[1]),Yu(o[0])))?[].concat(r.slice(0,r.length-1),[a],o.slice(1)):[Yu(r[0]),Yu(o[o.length-1])]);n.reconnectEnd(s,c.target,l)}}}))}function Yu(e){return e.original||e}function Zu(e,t){no.call(this,e),this.preExecute("shape.delete",(function(e){var t=e.shape,n=t.parent;Sn(t,"bpmn:Participant")&&(e.collaborationRoot=n)}),!0),this.postExecute("shape.delete",(function(e){var n=e.collaborationRoot;if(n&&!n.businessObject.participants.length){var i=t.makeProcess(),r=n.children.slice();t.moveElements(r,{x:0,y:0},i)}}),!0)}function Qu(e,t,n,i){no.call(this,e);var r=i.get("dragging",!1);function o(e){var i,r,o=e.source,a=e.target;e.parent&&(Sn(e,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(o,a)||(r=!0),n.canConnectMessageFlow(o,a)&&(i="bpmn:MessageFlow")),Sn(e,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(o,a)||(r=!0),n.canConnectSequenceFlow(o,a)&&(i="bpmn:SequenceFlow")),r&&t.removeConnection(e),i&&t.connect(o,a,{type:i,waypoints:e.waypoints.slice()}))}this.postExecuted("elements.move",(function(e){N(e.closure.allConnections,o)}),!0),this.preExecute("connection.reconnect",(function(e){var i,o,a=e.context,s=a.connection,c=a.newSource||s.source,l=a.newTarget||s.target;(i=n.canConnect(c,l))&&i.type!==s.type&&(o=t.connect(c,l,{type:i.type,associationDirection:i.associationDirection,waypoints:s.waypoints.slice()}),s.parent&&t.removeConnection(s),a.connection=o,r&&function(e,t){var n,i=r.context(),o=i&&i.payload.previousSelection;if(!o||!o.length)return;if(-1===(n=o.indexOf(e)))return;o.splice(n,1,t)}(s,o))})),this.postExecuted("element.updateProperties",(function(e){var n,i=e.context,r=i.properties,o=i.element,a=o.businessObject;r.default&&(n=T(o.outgoing,U({id:o.businessObject.default.id})))&&t.updateProperties(n,{conditionExpression:void 0}),r.conditionExpression&&a.sourceRef.default===a&&t.updateProperties(o.source,{default:void 0})}))}function Ju(e,t,n,i,r,o){i.invoke(no,this),this._bpmnReplace=e,this._elementRegistry=n,this._selection=o,this.postExecuted(["elements.create"],500,(function(e){var n=e.context,i=n.parent,r=n.elements,o=j(r,(function(e,n){var r=t.canReplace([n],n.host||n.parent||i);return r?e.concat(r.replacements):e}),[]);o.length&&this._replaceElements(r,o)}),this),this.postExecuted(["elements.move"],500,(function(e){var n=e.context,i=n.newParent,r=n.newHost,o=[];N(n.closure.topLevel,(function(e){o=Kn(e)?o.concat(e.children):o.concat(e)})),1===o.length&&r&&(i=r);var a=t.canReplace(o,i);a&&this._replaceElements(o,a.replacements,r)}),this),this.postExecute(["shape.replace"],1500,(function(e){var n,i=e.context,r=i.oldShape,o=i.newShape,a=r.attachers;a&&a.length&&(n=t.canReplace(a,o),this._replaceElements(a,n.replacements))}),this),this.postExecuted(["shape.replace"],1500,(function(e){var t=e.context,n=t.oldShape,i=t.newShape;r.unclaimId(n.businessObject.id,n.businessObject),r.updateProperties(i,{id:n.id})}))}qu.$inject=["injector","modeling"],v(qu,no),v(Ku,no),Ku.$inject=["eventBus","modeling"],v(Xu,no),Xu.$inject=["eventBus","bpmnRules","modeling"],Zu.$inject=["eventBus","modeling"],v(Zu,no),v(Qu,no),Qu.$inject=["eventBus","modeling","bpmnRules","injector"],v(Ju,no),Ju.prototype._replaceElements=function(e,t){var n=this._elementRegistry,i=this._bpmnReplace,r=this._selection;N(t,(function(t){var r={type:t.newElementType},o=n.get(t.oldElementId),a=e.indexOf(o);e[a]=i.replaceElement(o,r,{select:!1})})),t&&r.select(e)},Ju.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var ed={width:140,height:120},td={width:300,height:60},nd={width:60,height:300},id={width:300,height:150},rd={width:150,height:300},od={width:140,height:120},ad={width:50,height:30};function sd(e){e.on("resize.start",1500,(function(e){var t=e.context,n=t.shape,i=t.direction,r=t.balanced;(Sn(n,"bpmn:Lane")||Sn(n,"bpmn:Participant"))&&(t.resizeConstraints=function(e,t,n){var i=Jp(e),r=!0,o=!0,a=Zp(i,[i]),s=Rr(e),c={},l={},p=qn(e),u=p?td:nd;/n/.test(t)?l.top=s.bottom-u.height:/e/.test(t)?l.right=s.left+u.width:/s/.test(t)?l.bottom=s.top+u.height:/w/.test(t)&&(l.left=s.right-u.width);a.forEach((function(e){var i=Rr(e);/n/.test(t)&&(p&&i.tops.right+10&&(o=!1),n&&cd(s.right-i.left)<10&&dd(c,"right",i.right-u.width),cd(s.right-i.right)<5&&hd(l,"right",i.left+u.width)),/s/.test(t)&&(p&&i.bottom>s.bottom+10&&(o=!1),n&&cd(s.bottom-i.top)<10&&dd(c,"bottom",i.bottom-u.height),cd(s.bottom-i.bottom)<5&&hd(l,"bottom",i.top+u.height)),/w/.test(t)&&(!p&&i.left=r.y&&t<=r.y+r.height||n&&t>=r.x&&t<=r.x+r.width)return(o=Qp(r)).length?wd(o,t,n):r}bd.$inject=["eventBus"];var Ed=180,Sd=160;function Cd(e,t,n,i,r,o,a){no.call(this,t),this._canvas=e,this._eventBus=t,this._modeling=n,this._elementFactory=i,this._bpmnFactory=r,this._bpmnjs=o,this._elementRegistry=a;var s=this;function c(e){return Sn(e,"bpmn:SubProcess")&&!Un(e)}function l(t){var n=t.shape,i=t.newRootElement,r=kn(n);i=s._addDiagram(i||r),t.newRootElement=e.addRootElement(i)}function p(t){var n=kn(t.shape);s._removeDiagram(n);var i=t.newRootElement=a.get(uo(n));e.removeRootElement(i)}this.executed("shape.create",(function(e){c(e.shape)&&l(e)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.newRootElement;n&&t.children&&(s._showRecursively(t.children),s._moveChildrenToShape(t,n))}),!0),this.reverted("shape.create",(function(e){c(e.shape)&&p(e)}),!0),this.preExecuted("shape.delete",(function(e){var t=e.shape;if(c(t)){var i=a.get(uo(t));i&&n.removeElements(i.children.slice())}}),!0),this.executed("shape.delete",(function(e){c(e.shape)&&p(e)}),!0),this.reverted("shape.delete",(function(e){c(e.shape)&&l(e)}),!0),this.preExecuted("shape.replace",(function(t){var n=t.oldShape,i=t.newShape;c(n)&&c(i)&&(t.oldRoot=e.removeRootElement(uo(n)))}),!0),this.postExecuted("shape.replace",(function(t){var i=t.newShape,r=t.oldRoot,o=e.findRoot(uo(i));if(r&&o){var a=r.children;n.moveElements(a,{x:0,y:0},o)}}),!0),this.executed("element.updateProperties",(function(e){var t=e.element;if(Sn(t,"bpmn:SubProcess")){var n=e.properties,i=e.oldProperties.id,r=n.id;if(i!==r){if(mo(t))return a.updateId(t,ho(r)),void a.updateId(i,r);a.get(ho(i))&&a.updateId(ho(i),ho(r))}}}),!0),this.reverted("element.updateProperties",(function(e){var t=e.element;if(Sn(t,"bpmn:SubProcess")){var n=e.properties,i=e.oldProperties.id,r=n.id;if(i!==r){if(mo(t))return a.updateId(t,ho(i)),void a.updateId(r,i);var o=a.get(ho(r));o&&a.updateId(o,ho(i))}}}),!0),t.on("element.changed",(function(e){var n=e.element;if(mo(n)){var i=n,r=a.get(po(i));r&&r!==i&&t.fire("element.changed",{element:r})}})),this.executed("shape.toggleCollapse",400,(function(e){var t=e.shape;Sn(t,"bpmn:SubProcess")&&(Un(t)?p(e):(l(e),s._showRecursively(t.children)))}),!0),this.reverted("shape.toggleCollapse",400,(function(e){var t=e.shape;Sn(t,"bpmn:SubProcess")&&(Un(t)?p(e):(l(e),s._showRecursively(t.children)))}),!0),this.postExecuted("shape.toggleCollapse",600,(function(e){var t=e.shape;if(Sn(t,"bpmn:SubProcess")){var n=e.newRootElement;n&&(Un(t)?s._moveChildrenToShape(n,t):s._moveChildrenToShape(t,n))}}),!0),t.on("copyPaste.createTree",(function(e){var t=e.element,n=e.children;if(c(t)){var i=uo(t),r=a.get(i);r&&n.push.apply(n,r.children)}})),t.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element,i=e.elements,r=n.parent;if(Sn(An(r),"bpmndi:BPMNPlane")){var o=po(r),a=T(i,(function(e){return e.id===o}));a&&(t.parent=a.id)}})),t.on("copyPaste.pasteElement",(function(e){var t=e.descriptor;t.parent&&(c(t.parent)||t.parent.hidden)&&(t.hidden=!0)}))}function kd(e,t){e.invoke(no,this),this.postExecuted("shape.replace",(function(e){var n=e.context.oldShape,i=e.context.newShape;if(Sn(i,"bpmn:SubProcess")&&(Sn(n,"bpmn:Task")||Sn(n,"bpmn:CallActivity"))&&Un(i)){var r,o={x:(r=i).x+r.width/6,y:r.y+r.height/2};t.createShape({type:"bpmn:StartEvent"},o,i)}}))}function Ad(e){no.call(this,e),this.preExecute("connection.create",(function(e){const{target:t}=e;Sn(t,"bpmn:TextAnnotation")&&(e.parent=t.parent)}),!0),this.preExecute(["shape.create","shape.resize","elements.move"],(function(e){const t=e.shapes||[e.shape];1===t.length&&Sn(t[0],"bpmn:TextAnnotation")&&(e.hints=e.hints||{},e.hints.autoResize=!1)}),!0)}function Pd(e,t){no.call(this,e),this.postExecuted("shape.toggleCollapse",1500,(function(e){var n=e.shape;if(!Un(n)){var i=Gr(n);i.forEach((function(e){var t=e.incoming.slice(),n=e.outgoing.slice();N(t,(function(e){r(e,!0)})),N(n,(function(e){r(e,!1)}))}))}function r(e,r){-1!==i.indexOf(e.source)&&-1!==i.indexOf(e.target)||(r?t.reconnectEnd(e,n,Dr(n)):t.reconnectStart(e,n,Dr(n)))}}),!0)}v(Cd,no),Cd.prototype._moveChildrenToShape=function(e,t){var n,i=this._modeling,r=e.children;if(r){var o=(r=r.concat(r.reduce((function(t,n){return n.label&&n.label.parent!==e?t.concat(n.label):t}),[]))).filter((function(e){return!e.hidden}));if(o.length){var a=Wr(o);if(t.x){var s=Dr(t),c=Dr(a);n={x:s.x-c.x,y:s.y-c.y}}else n={x:Ed-a.x,y:Sd-a.y};i.moveElements(r,n,t,{autoResize:!1})}else i.moveElements(r,{x:0,y:0},t,{autoResize:!1})}},Cd.prototype._showRecursively=function(e,t){var n=this,i=[];return e.forEach((function(e){e.hidden=!!t,i=i.concat(e),e.children&&(i=i.concat(n._showRecursively(e.children,e.collapsed||t)))})),i},Cd.prototype._addDiagram=function(e){var t=this._bpmnjs.getDefinitions().diagrams;return e.businessObject||(e=this._createNewDiagram(e)),t.push(e.di.$parent),e},Cd.prototype._createNewDiagram=function(e){var t=this._bpmnFactory,n=this._elementFactory,i=t.create("bpmndi:BPMNPlane",{bpmnElement:e}),r=t.create("bpmndi:BPMNDiagram",{plane:i});return i.$parent=r,n.createRoot({id:uo(e),type:e.$type,di:i,businessObject:e,collapsed:!0})},Cd.prototype._removeDiagram=function(e){var t=this._bpmnjs.getDefinitions().diagrams,n=T(t,(function(t){return t.plane.bpmnElement.id===e.id}));return t.splice(t.indexOf(n),1),n},Cd.$inject=["canvas","eventBus","modeling","elementFactory","bpmnFactory","bpmnjs","elementRegistry"],kd.$inject=["injector","modeling"],v(kd,no),v(Ad,no),Ad.$inject=["eventBus"],v(Pd,no),Pd.$inject=["eventBus","modeling"];function Rd(e,t,n){no.call(this,e),this.executed(["shape.toggleCollapse"],500,(function(e){var t,n=e.context.shape;Sn(n,"bpmn:SubProcess")&&(n.collapsed?An(n).isExpanded=!1:((t=n.children).length&&t.forEach((function(e){"label"!==e.type||e.businessObject.name||(e.hidden=!0)})),An(n).isExpanded=!0))})),this.reverted(["shape.toggleCollapse"],500,(function(e){var t=e.context.shape;t.collapsed?An(t).isExpanded=!1:An(t).isExpanded=!0})),this.postExecuted(["shape.toggleCollapse"],500,(function(e){var i,r=e.context.shape,o=t.getDefaultSize(r);i=r.collapsed?function(e,t){return{x:e.x+(e.width-t.width)/2,y:e.y+(e.height-t.height)/2,width:t.width,height:t.height}}(r,o):function(e,t){var n,i,r=e.children,o=t;return(n=qp((i=r,i.filter((function(e){return!e.hidden}))).concat([e])))?(o.width=Math.max(n.width,o.width),o.height=Math.max(n.height,o.height),o.x=n.x+(n.width-o.width)/2,o.y=n.y+(n.height-o.height)/2):(o.x=e.x+(e.width-o.width)/2,o.y=e.y+(e.height-o.height)/2),o}(r,o),n.resizeShape(r,i,null,{autoResize:!r.collapsed&&"nwse"})}))}function Md(e,t,n,i){t.invoke(no,this),this.preExecute("shape.delete",(function(e){var t=e.context.shape,r=t.businessObject;Zn(t)||(Sn(t,"bpmn:Participant")&&Un(t)&&n.ids.unclaim(r.processRef.id),i.unclaimId(r.id,r))})),this.preExecute("connection.delete",(function(e){var t=e.context.connection.businessObject;i.unclaimId(t.id,t)})),this.preExecute("canvas.updateRoot",(function(){var t=e.getRootElement(),i=t.businessObject;Sn(t,"bpmn:Collaboration")&&n.ids.unclaim(i.id)}))}function Td(e,t){no.call(this,e),this.preExecute("connection.delete",(function(e){var n=e.context.connection,i=n.source;(function(e,t){if(!Sn(e,"bpmn:SequenceFlow"))return!1;var n=kn(t),i=kn(e);return n.get("default")===i})(n,i)&&t.updateProperties(i,{default:null})}))}v(Rd,no),Rd.$inject=["eventBus","elementFactory","modeling"],v(Md,no),Md.$inject=["canvas","injector","moddle","modeling"],v(Td,no),Td.$inject=["eventBus","modeling"];function Dd(e,t){var n;no.call(this,e);var i=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(i,5e3,(function(e){(n=n||new Bd).enter()})),this.postExecuted(i,500,(function(e){!function(){if(!n)throw new Error("out of bounds release");var e=n.leave();e&&(t.updateLaneRefs(n.flowNodes,n.lanes),n=null)}()})),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],(function(e){var t=e.context.shape,i=function(){if(!n)throw new Error("out of bounds release");return n}();t.labelTarget||(Sn(t,"bpmn:Lane")&&i.addLane(t),Sn(t,"bpmn:FlowNode")&&i.addFlowNode(t))}))}function Bd(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}Dd.$inject=["eventBus","modeling"],v(Dd,no);const Nd={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","compensateBoundaryEventBehaviour","createBehavior","createDataObjectBehavior","createParticipantBehavior","dataInputAssociationBehavior","dataStoreBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","fixHoverBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","layoutConnectionBehavior","messageFlowBehavior","nonInterruptingBehavior","removeElementBehavior","removeEmbeddedLabelBoundsBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","rootElementReferenceBehavior","spaceToolBehavior","subProcessPlaneBehavior","subProcessStartEventBehavior","textAnnotationBehavior","toggleCollapseConnectionBehaviour","toggleElementCollapseBehaviour","unclaimIdBehavior","updateFlowNodeRefsBehavior","unsetDefaultFlowBehavior"],adaptiveLabelPositioningBehavior:["type",mp],appendBehavior:["type",gp],associationBehavior:["type",yp],attachEventBehavior:["type",vp],boundaryEventBehavior:["type",xp],compensateBoundaryEventBehaviour:["type",_p],createBehavior:["type",Cp],createDataObjectBehavior:["type",kp],createParticipantBehavior:["type",Tp],dataInputAssociationBehavior:["type",jp],dataStoreBehavior:["type",$p],deleteLaneBehavior:["type",tu],detachEventBehavior:["type",nu],dropOnFlowBehavior:["type",ru],eventBasedGatewayBehavior:["type",su],fixHoverBehavior:["type",pu],groupBehavior:["type",uu],importDockingFix:["type",hu],isHorizontalFix:["type",fu],labelBehavior:["type",Bu],layoutConnectionBehavior:["type",Nu],messageFlowBehavior:["type",Vu],nonInterruptingBehavior:["type",qu],removeElementBehavior:["type",Xu],removeEmbeddedLabelBoundsBehavior:["type",Ku],removeParticipantBehavior:["type",Zu],replaceConnectionBehavior:["type",Qu],replaceElementBehaviour:["type",Ju],resizeBehavior:["type",sd],resizeLaneBehavior:["type",gd],rootElementReferenceBehavior:["type",yd],spaceToolBehavior:["type",bd],subProcessPlaneBehavior:["type",Cd],subProcessStartEventBehavior:["type",kd],textAnnotationBehavior:["type",Ad],toggleCollapseConnectionBehaviour:["type",Pd],toggleElementCollapseBehaviour:["type",Rd],unclaimIdBehavior:["type",Md],unsetDefaultFlowBehavior:["type",Td],updateFlowNodeRefsBehavior:["type",Dd]};function Od(e,t){var n=Br(e,t,-15);return"intersect"!==n?n:null}function jd(e){yc.call(this,e)}function Ld(e){return!e||Zn(e)}function Id(e){do{if(Sn(e,"bpmn:Process"))return kn(e);if(Sn(e,"bpmn:Participant"))return kn(e).processRef||kn(e)}while(e=e.parent)}function $d(e){return Sn(e,"bpmn:TextAnnotation")}function zd(e){return Sn(e,"bpmn:Group")&&!e.labelTarget}function Fd(e){return Sn(e,"bpmn:BoundaryEvent")&&Wd(e,"bpmn:CompensateEventDefinition")}function Hd(e){return kn(e).isForCompensation}function Vd(e){for(var t=e;t=t.parent;){if(Sn(t,"bpmn:FlowElementsContainer"))return kn(t);if(Sn(t,"bpmn:Participant"))return kn(t).processRef}return null}function Gd(e,t){return Vd(e)===Vd(t)}function Wd(e,t){return!!T(kn(e).eventDefinitions||[],(function(e){return Sn(e,t)}))}function Ud(e,t){return(kn(e).eventDefinitions||[]).every((function(e){return Sn(e,t)}))}function qd(e,t){var n=function(e){for(var t=[];e;)(e=e.parent)&&t.push(e);return t}(t);return-1!==n.indexOf(e)}function Kd(e,t,n){if(Ld(e)||Ld(t))return null;if(!Sn(n,"bpmn:DataAssociation")){if(ch(e,t))return{type:"bpmn:MessageFlow"};if(lh(e,t))return{type:"bpmn:SequenceFlow"}}var i=ph(e,t);return i||(sh(e,t)?{type:"bpmn:Association",associationDirection:"One"}:!!ah(e,t)&&{type:"bpmn:Association",associationDirection:"None"})}function Xd(e,t){return!(!Zn(e)&&!zd(e))||!(Sn(t,"bpmn:Participant")&&!Un(t))&&(Sn(e,"bpmn:Participant")?Sn(t,"bpmn:Process")||Sn(t,"bpmn:Collaboration"):Cn(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?t===e.parent:Sn(e,"bpmn:Lane")?Sn(t,"bpmn:Participant")||Sn(t,"bpmn:Lane"):!(Sn(e,"bpmn:BoundaryEvent")&&(n=e,!kn(n).cancelActivity||!Qd(n)&&!Jd(n)))&&(Sn(e,"bpmn:FlowElement")&&!Sn(e,"bpmn:DataStoreReference")?Sn(t,"bpmn:FlowElementsContainer")?Un(t):Cn(t,["bpmn:Participant","bpmn:Lane"]):Sn(e,"bpmn:DataStoreReference")&&Sn(t,"bpmn:Collaboration")?I(kn(t).get("participants"),(function(e){return!!e.get("processRef")})):Cn(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?Cn(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):!!Sn(e,"bpmn:MessageFlow")&&(Sn(t,"bpmn:Collaboration")||e.source.parent==t||e.target.parent==t)));var n}function Yd(e){return Sn(e,"bpmn:Lane")}function Zd(e){return!!function(e){return!Zn(e)&&Sn(e,"bpmn:BoundaryEvent")}(e)||(!(!Sn(e,"bpmn:IntermediateThrowEvent")||!Qd(e))||Sn(e,"bpmn:IntermediateCatchEvent")&&Jd(e))}function Qd(e){var t=kn(e);return t&&!(t.eventDefinitions&&t.eventDefinitions.length)}function Jd(e){return eh(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function eh(e,t){return t.some((function(t){return Wd(e,t)}))}function th(e,t,n,i){if(Array.isArray(e)||(e=[e]),1!==e.length)return!1;var r=e[0];return!Zn(r)&&(!!Zd(r)&&(!Kn(t)&&(!(!Sn(t,"bpmn:Activity")||Hd(t))&&(!(i&&!Od(i,t))&&(!function(e){return Sn(e,"bpmn:ReceiveTask")&&T(e.incoming,(function(e){return Sn(e.source,"bpmn:EventBasedGateway")}))}(t)&&"attach")))))}function nh(e,t,n){if(!t)return!1;var i={replacements:[]};return N(e,(function(e){Kn(t)||Sn(e,"bpmn:StartEvent")&&"label"!==e.type&&Xd(e,t)&&(function(e){return e&&!1!==kn(e).isInterrupting}(e)||i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),(function(e){return Xn(e,"bpmn:ErrorEventDefinition")}(e)||function(e){return Xn(e,"bpmn:EscalationEventDefinition")}(e)||function(e){return Xn(e,"bpmn:CompensateEventDefinition")}(e))&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),eh(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&Sn(t,"bpmn:SubProcess")&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"})),Sn(t,"bpmn:Transaction")||Wd(e,"bpmn:CancelEventDefinition")&&"label"!==e.type&&(Sn(e,"bpmn:EndEvent")&&Xd(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:EndEvent"}),Sn(e,"bpmn:BoundaryEvent")&&th(e,t,0,n)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:BoundaryEvent"}))})),!!i.replacements.length&&i}function ih(e,t){return!I(e,Yd)&&(!t||e.every((function(e){return Xd(e,t)})))}function rh(e,t,n,i){return!!t&&(!(!Zn(e)&&!zd(e))||n!==t&&((!n||!qd(n,t))&&(Xd(e,t)||uh(e,t))))}function oh(e,t){return Sn(e,"bpmn:SubProcess")?Un(e)&&(!t||t.width>=100&&t.height>=80):!!Sn(e,"bpmn:Lane")||(!!Sn(e,"bpmn:Participant")||(!!$d(e)||!!zd(e)))}function ah(e,t){return!qd(t,e)&&!qd(e,t)&&(!!function(e,t){var n=$d(e),i=$d(t);return(n||i)&&n!==i}(e,t)||!!ph(e,t))}function sh(e,t){return Gd(e,t)&&Fd(e)&&Sn(t,"bpmn:Activity")&&(n=e,!t.attachers.includes(n))&&!Kn(t);var n}function ch(e,t){return!(hh(e)&&!hh(t))&&(Sn(i=e,"bpmn:InteractionNode")&&!Sn(i,"bpmn:BoundaryEvent")&&(!Sn(i,"bpmn:Event")||Sn(i,"bpmn:ThrowEvent")&&Ud(i,"bpmn:MessageEventDefinition"))&&function(e){return Sn(e,"bpmn:InteractionNode")&&!Hd(e)&&(!Sn(e,"bpmn:Event")||Sn(e,"bpmn:CatchEvent")&&Ud(e,"bpmn:MessageEventDefinition"))&&!(Sn(e,"bpmn:BoundaryEvent")&&!Wd(e,"bpmn:MessageEventDefinition"))}(t)&&(n=t,!(Id(e)===Id(n))));var n,i}function lh(e,t){return Sn(n=e,"bpmn:FlowNode")&&!Sn(n,"bpmn:EndEvent")&&!Kn(n)&&!(Sn(n,"bpmn:IntermediateThrowEvent")&&Wd(n,"bpmn:LinkEventDefinition"))&&!Fd(n)&&!Hd(n)&&function(e){return Sn(e,"bpmn:FlowNode")&&!Sn(e,"bpmn:StartEvent")&&!Sn(e,"bpmn:BoundaryEvent")&&!Kn(e)&&!(Sn(e,"bpmn:IntermediateCatchEvent")&&Wd(e,"bpmn:LinkEventDefinition"))&&!Hd(e)}(t)&&Gd(e,t)&&!(Sn(e,"bpmn:EventBasedGateway")&&!function(e){return Sn(e,"bpmn:ReceiveTask")||Sn(e,"bpmn:IntermediateCatchEvent")&&(Wd(e,"bpmn:MessageEventDefinition")||Wd(e,"bpmn:TimerEventDefinition")||Wd(e,"bpmn:ConditionalEventDefinition")||Wd(e,"bpmn:SignalEventDefinition"))}(t));var n}function ph(e,t){return Cn(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Cn(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:!(!Cn(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])||!Cn(e,["bpmn:Activity","bpmn:CatchEvent"]))&&{type:"bpmn:DataOutputAssociation"}}function uh(e,t,n){if(!t)return!1;if(Array.isArray(e)){if(1!==e.length)return!1;e=e[0]}return t.source!==e&&t.target!==e&&(Cn(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!Zn(t)&&Sn(e,"bpmn:FlowNode")&&!Sn(e,"bpmn:BoundaryEvent")&&Xd(e,t.parent))}function dh(e,t){return!!Zn(t)||!(Sn(t,"bpmn:Lane")&&!function(e,t){return e&&t&&-1!==e.indexOf(t)}(e,t.parent))}function hh(e){return Tc(e,"bpmn:Process")||Tc(e,"bpmn:Collaboration")}v(jd,yc),jd.$inject=["eventBus"],jd.prototype.init=function(){this.addRule("connection.start",(function(e){return function(e){if(Ld(e))return null;return Cn(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"])}(e.source)})),this.addRule("connection.create",(function(e){var t=e.source,n=e.target,i=e.hints||{},r=i.targetParent;if(i.targetAttach)return!1;r&&(n.parent=r);try{return Kd(t,n)}finally{r&&(n.parent=null)}})),this.addRule("connection.reconnect",(function(e){var t=e.connection;return Kd(e.source,e.target,t)})),this.addRule("connection.updateWaypoints",(function(e){return{type:e.connection.type}})),this.addRule("shape.resize",(function(e){return oh(e.shape,e.newBounds)})),this.addRule("elements.create",(function(e){var t=e.elements,n=e.position,i=e.target;return!(Yn(i)&&!uh(t,i))&&L(t,(function(e){return Yn(e)?Kd(e.source,e.target,e):e.host?th(e,e.host,null,n):rh(e,i,null)}))})),this.addRule("elements.move",(function(e){var t=e.target,n=e.shapes,i=e.position;return th(n,t,null,i)||nh(n,t,i)||ih(n,t)||uh(n,t)})),this.addRule("shape.create",(function(e){return rh(e.shape,e.target,e.source,e.position)})),this.addRule("shape.attach",(function(e){return th(e.shape,e.target,null,e.position)})),this.addRule("element.copy",(function(e){var t=e.element;return dh(e.elements,t)}))},jd.prototype.canConnectMessageFlow=ch,jd.prototype.canConnectSequenceFlow=lh,jd.prototype.canConnectDataAssociation=ph,jd.prototype.canConnectAssociation=ah,jd.prototype.canConnectCompensationAssociation=sh,jd.prototype.canMove=ih,jd.prototype.canAttach=th,jd.prototype.canReplace=nh,jd.prototype.canDrop=Xd,jd.prototype.canInsert=uh,jd.prototype.canCreate=rh,jd.prototype.canConnect=Kd,jd.prototype.canResize=oh,jd.prototype.canCopy=dh;const mh={__depends__:[Jc],__init__:["bpmnRules"],bpmnRules:["type",jd]};function fh(e,t){e.on("saveXML.start",2e3,(function(){N(t.getRootElements(),(function(e){var t,n=An(e);t=$(B(Gr([e],!1),(function(t){return t!==e&&!t.labelTarget})),An),n.set("planeElement",t)}))}))}fh.$inject=["eventBus","canvas"];const gh={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",fh]};function yh(e){no.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.parent=o.parent),n.parentIndex=o.index)})),this.preExecute(["shape.move","connection.move"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.newParent||i.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.newParent=o.parent),n.newParentIndex=o.index)}))}function vh(e,t){yh.call(this,e);var n=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:9,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:TextAnnotation",order:{level:9}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function i(e){var t=e.order;if(t||(e.order=t=function(e){if(e.labelTarget)return{level:10};var t=T(n,(function(t){return Cn(e,[t.type])}));return t&&t.order||{level:1}}(e)),!t)throw new Error(`no order for <${e.id}>`);return t}this.getOrdering=function(e,n){if(e.labelTarget||Sn(e,"bpmn:TextAnnotation"))return{parent:t.findRoot(n)||t.getRootElement(),index:-1};var r=i(e);r.containers&&(n=function(e,t,n){for(var i=t;i&&!Cn(i,n);)i=i.parent;if(!i)throw new Error(`no parent for <${e.id}> in <${t&&t.id}>`);return i}(e,n,r.containers));var o=n.children.indexOf(e),a=D(n.children,(function(t){return!(!e.labelTarget&&t.labelTarget)&&r.levelnm(e.dy)?"x":"y",i=e["d"+n],r=e[n]-i;if(nm(i)<5)return!1;i<0&&(i*=-1),Fo(e)&&(i*=-1);var o=function(e,t){if("x"===e){if(t>0)return"e";if(t<0)return"w"}if("y"===e){if(t>0)return"s";if(t<0)return"n"}return null}(n,i),a=this._canvas.getRootElement();!Ho(e)&&e.hover&&(a=e.hover);var s=[...Gr(a,!0),...a.attachers||[]],c=this.calculateAdjustments(s,n,i,r),l=function(e,t,n,i,r){var o=e.movingShapes,a=e.resizingShapes;if(!a.length)return;var s,c,l={};return N(a,(function(e){var p,u,d,h,m,f,g=e.attachers,y=e.children,v=Rr(e),b=B(y,(function(e){return!(Yn(e)||Zn(e)||hm(o,e)||hm(a,e))})),x=B(y,(function(e){return!Yn(e)&&!Zn(e)&&hm(o,e)})),_=[],w=[];b.length&&(u=um(Rr(Wr(b))),p=i-v[am[n]]+u[am[n]],"n"===n?l.bottom=c=A(c)?Math.min(c,p):p:"w"===n?l.right=c=A(c)?Math.min(c,p):p:"s"===n?l.top=s=A(s)?Math.max(s,p):p:"e"===n&&(l.left=s=A(s)?Math.max(s,p):p)),x.length&&(d=um(Rr(Wr(x))),p=i-d[am[cm[n]]]+v[am[cm[n]]],"n"===n?l.bottom=c=A(c)?Math.min(c,p):p:"w"===n?l.right=c=A(c)?Math.min(c,p):p:"s"===n?l.top=s=A(s)?Math.max(s,p):p:"e"===n&&(l.left=s=A(s)?Math.max(s,p):p)),g&&g.length&&(g.forEach((function(e){hm(o,e)?_.push(e):w.push(e)})),_.length&&(h=Rr(Wr(_.map(Dr))),m=v[am[cm[n]]]-(h[am[cm[n]]]-i)),w.length&&(f=Rr(Wr(w.map(Dr)))[am[n]]-(v[am[n]]-i)),"n"===n?(p=Math.min(m||1/0,f||1/0),l.bottom=c=A(c)?Math.min(c,p):p):"w"===n?(p=Math.min(m||1/0,f||1/0),l.right=c=A(c)?Math.min(c,p):p):"s"===n?(p=Math.max(m||-1/0,f||-1/0),l.top=s=A(s)?Math.max(s,p):p):"e"===n&&(p=Math.max(m||-1/0,f||-1/0),l.left=s=A(s)?Math.max(s,p):p));var E=r&&r[e.id];E&&("n"===n?(p=i+e[rm[t]]-E[rm[t]],l.bottom=c=A(c)?Math.min(c,p):p):"w"===n?(p=i+e[rm[t]]-E[rm[t]],l.right=c=A(c)?Math.min(c,p):p):"s"===n?(p=i-e[rm[t]]+E[rm[t]],l.top=s=A(s)?Math.max(s,p):p):"e"===n&&(p=i-e[rm[t]]+E[rm[t]],l.left=s=A(s)?Math.max(s,p):p))})),l}(c,n,o,r,this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:o,shapes:c.resizingShapes,start:r}));return Q(t,c,{axis:n,direction:o,spaceToolConstraints:l,start:r}),va("resize-"+("x"===n?"ew":"ns")),!0},pm.prototype.calculateAdjustments=function(e,t,n,i){var r=this._rules,o=[],a=[],s=[],c=[];function l(e){o.includes(e)||o.push(e);var t=e.label;t&&!o.includes(t)&&o.push(t)}N(e,(function(e){if(e.parent&&!Zn(e))if(Yn(e))c.push(e);else{var o=e[t],p=o+e[rm[t]];if(function(e){return!!e.host}(e)&&(n>0&&Dr(e)[t]>i||n<0&&Dr(e)[t]0&&o>i||n<0&&pi&&r.allowed("shape.resize",{shape:e})?(u=e,void(a.includes(u)||a.push(u))):void 0;l(e)}}})),N(o,(function(e){var t=e.attachers;t&&N(t,(function(e){l(e)}))}));var p=o.concat(a);return N(s,(function(e){var t=e.host;hm(p,t)&&l(e)})),p=o.concat(a),N(c,(function(e){var t=e.source,n=e.target,i=e.label;hm(p,t)&&hm(p,n)&&i&&l(i)})),{movingShapes:o,resizingShapes:a}},pm.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},pm.prototype.isActive=function(){var e=this._dragging.context();return!!e&&/^spaceTool/.test(e.prefix)};var mm="djs-dragging",fm="djs-resizing",gm=Math.max;function ym(e,t,n,i,r){function o(e,t){N(e,(function(e){r.addDragger(e,t),n.addMarker(e,mm)}))}e.on("spaceTool.selection.start",(function(e){var t=n.getLayer("space"),r=e.context,o="M 0,-10000 L 0,10000",a="M -10000,0 L 10000,0",s=We("g");je(s,i.cls("djs-crosshair-group",["no-events"])),De(t,s);var c=We("path");je(c,"d",o),Ie(c).add("djs-crosshair"),De(s,c);var l=We("path");je(l,"d",a),Ie(l).add("djs-crosshair"),De(s,l),r.crosshairGroup=s})),e.on("spaceTool.selection.move",(function(e){Ei(e.context.crosshairGroup,e.x,e.y)})),e.on("spaceTool.selection.cleanup",(function(e){var t=e.context.crosshairGroup;t&&et(t)})),e.on("spaceTool.move",250,(function(e){var a=e.context,s=a.line,c=a.axis,l=a.movingShapes,p=a.resizingShapes;if(a.initialized){if(!a.dragGroup){var u=n.getLayer("space");je(s=We("path"),"d","M0,0 L0,0"),Ie(s).add("djs-crosshair"),De(u,s),a.line=s;var d=We("g");je(d,i.cls("djs-drag-group",["no-events"])),De(n.getActiveLayer(),d),o(l,d),o(a.movingConnections=t.filter((function(e){var t=!1;N(l,(function(n){N(n.outgoing,(function(n){e===n&&(t=!0)}))}));var n=!1;N(l,(function(t){N(t.incoming,(function(t){e===t&&(n=!0)}))}));var i=!1;N(p,(function(t){N(t.outgoing,(function(t){e===t&&(i=!0)}))}));var r=!1;return N(p,(function(t){N(t.incoming,(function(t){e===t&&(r=!0)}))})),Yn(e)&&(t||i)&&(n||r)})),d),a.dragGroup=d}if(!a.frameGroup){var h=We("g");je(h,i.cls("djs-frame-group",["no-events"])),De(n.getActiveLayer(),h);var m=[];N(p,(function(e){var t=r.addFrame(e,h),i=t.getBBox();m.push({element:t,initialBounds:i}),n.addMarker(e,fm)})),a.frameGroup=h,a.frames=m}je(s,{d:{x:"M"+e.x+", -10000 L"+e.x+", 10000",y:"M -10000, "+e.y+" L 10000, "+e.y}[c]});var f={x:e.dx,y:e.dy};f[{x:"y",y:"x"}[a.axis]]=0,Ei(a.dragGroup,f.x,f.y),N(a.frames,(function(e){var t,n,i=e.element,r=e.initialBounds;"e"===a.direction?je(i,{width:gm(r.width+f.x,5)}):je(i,{width:t=gm(r.width-f.x,5),x:r.x+r.width-t}),"s"===a.direction?je(i,{height:gm(r.height+f.y,5)}):je(i,{height:n=gm(r.height-f.y,5),y:r.y+r.height-n})}))}})),e.on("spaceTool.cleanup",(function(e){var t=e.context,i=t.movingShapes,r=t.movingConnections,o=t.resizingShapes,a=t.line,s=t.dragGroup,c=t.frameGroup;N(i,(function(e){n.removeMarker(e,mm)})),N(r,(function(e){n.removeMarker(e,mm)})),s&&(et(a),et(s)),N(o,(function(e){n.removeMarker(e,fm)})),c&&et(c)}))}ym.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];const vm={__init__:["spaceToolPreview"],__depends__:[Kc,Jc,em,lp,Bh],spaceTool:["type",pm],spaceToolPreview:["type",ym]};function bm(e){e.invoke(pm,this)}bm.$inject=["injector"],v(bm,pm),bm.prototype.calculateAdjustments=function(e,t,n,i){var r=pm.prototype.calculateAdjustments.call(this,e,t,n,i);return r.resizingShapes=r.resizingShapes.filter((function(e){return!Sn(e,"bpmn:TextAnnotation")&&(!function(e){return Sn(e,"bpmn:Participant")&&!kn(e).processRef}(e)||!("y"===t&&qn(e)||"x"===t&&!qn(e)))})),r};const xm={__depends__:[vm],spaceTool:["type",bm]};function _m(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],(function(){this.clear(!1)}),this)}_m.$inject=["eventBus","injector"],_m.prototype.execute=function(e,t){if(!e)throw new Error("command required");this._currentExecution.trigger="execute";const n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction()},_m.prototype.canExecute=function(e,t){const n={command:e,context:t},i=this._getHandler(e);let r=this._fire(e,"canExecute",n);if(void 0===r){if(!i)return!1;i.canExecute&&(r=i.canExecute(t))}return r},_m.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,!1!==e&&this._fire("changed",{trigger:"clear"})},_m.prototype.undo=function(){let e,t=this._getUndoAction();if(t){for(this._currentExecution.trigger="undo",this._pushAction(t);t&&(this._internalUndo(t),e=this._getUndoAction(),e&&e.id===t.id);)t=e;this._popAction()}},_m.prototype.redo=function(){let e,t=this._getRedoAction();if(t){for(this._currentExecution.trigger="redo",this._pushAction(t);t&&(this._internalExecute(t,!0),e=this._getRedoAction(),e&&e.id===t.id);)t=e;this._popAction()}},_m.prototype.register=function(e,t){this._setHandler(e,t)},_m.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");const n=this._injector.instantiate(t);this.register(e,n)},_m.prototype.canUndo=function(){return!!this._getUndoAction()},_m.prototype.canRedo=function(){return!!this._getRedoAction()},_m.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},_m.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},_m.prototype._internalUndo=function(e){const t=e.command,n=e.context,i=this._getHandler(t);this._atomicDo((()=>{this._fire(t,"revert",e),i.revert&&this._markDirty(i.revert(n)),this._revertedAction(e),this._fire(t,"reverted",e)}))},_m.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);const i=t?[e+"."+t,t]:[e];let r;n=this._eventBus.createEvent(n);for(const o of i)if(r=this._eventBus.fire("commandStack."+o,n),n.cancelBubble)break;return r},_m.prototype._createId=function(){return this._uid++},_m.prototype._atomicDo=function(e){const t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}},_m.prototype._internalExecute=function(e,t){const n=e.command,i=e.context,r=this._getHandler(n);if(!r)throw new Error("no command handler registered for <"+n+">");this._pushAction(e),t||(this._fire(n,"preExecute",e),r.preExecute&&r.preExecute(i),this._fire(n,"preExecuted",e)),this._atomicDo((()=>{this._fire(n,"execute",e),r.execute&&this._markDirty(r.execute(i)),this._executedAction(e,t),this._fire(n,"executed",e)})),t||(this._fire(n,"postExecute",e),r.postExecute&&r.postExecute(i),this._fire(n,"postExecuted",e)),this._popAction()},_m.prototype._pushAction=function(e){const t=this._currentExecution,n=t.actions,i=n[0];if(t.atomic)throw new Error("illegal invocation in or phase (action: "+e.command+")");e.id||(e.id=i&&i.id||this._createId()),n.push(e)},_m.prototype._popAction=function(){const e=this._currentExecution,t=e.trigger,n=e.actions,i=e.dirty;n.pop(),n.length||(this._eventBus.fire("elements.changed",{elements:V("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:t}),e.trigger=null)},_m.prototype._markDirty=function(e){const t=this._currentExecution;e&&(e=C(e)?e:[e],t.dirty=t.dirty.concat(e))},_m.prototype._executedAction=function(e,t){const n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},_m.prototype._revertedAction=function(e){this._stackIdx--},_m.prototype._getHandler=function(e){return this._handlerMap[e]},_m.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t};const wm={commandStack:["type",_m]};function Em(e,t){if("function"!=typeof t)throw new Error("removeFn iterator must be a function");if(e){for(var n;n=e[0];)t(n);return e}}function Sm(e,t,n){no.call(this,t);var i=e.get("movePreview",!1);t.on("shape.move.start",1400,(function(e){var t=e.context,n=t.shapes,i=t.validatedShapes;t.shapes=Cm(n),t.validatedShapes=Cm(i)})),i&&t.on("shape.move.start",250,(function(e){var t=e.context,n=t.shapes,r=[];N(n,(function(e){N(e.labels,(function(n){n.hidden||-1!==t.shapes.indexOf(n)||r.push(n),e.labelTarget&&r.push(e)}))})),N(r,(function(e){i.makeDraggable(t,e,!0)}))})),this.preExecuted("elements.move",1400,(function(e){var t=e.context.closure,n=t.enclosedElements,i=[];N(n,(function(e){N(e.labels,(function(e){n[e.id]||i.push(e)}))})),t.addAll(i)})),this.preExecute(["connection.delete","shape.delete"],(function(e){var t=e.context;Em((t.connection||t.shape).labels,(function(e){n.removeShape(e,{nested:!0})}))})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=n.labelTarget;i&&(t.labelTargetIndex=Np(i.labels,n),t.labelTarget=i,n.labelTarget=null)})),this.revert("shape.delete",(function(e){var t=e.context,n=t.shape,i=t.labelTarget,r=t.labelTargetIndex;i&&(Bp(i.labels,n,r),n.labelTarget=i)}))}function Cm(e){return B(e,(function(t){return-1===e.indexOf(t.labelTarget)}))}v(Sm,no),Sm.$inject=["injector","eventBus","modeling"];const km={__init__:["labelSupport"],labelSupport:["type",Sm]};var Am="attach-ok";function Pm(e,t,n,i,r){no.call(this,t);var o=e.get("movePreview",!1);t.on("shape.move.start",1401,(function(e){var t,n,i=e.context,r=i.shapes,o=i.validatedShapes;i.shapes=(n=Rm(t=r),G("id",t,n)),i.validatedShapes=function(e){var t=H(e,"id");return B(e,(function(e){for(;e;){if(e.host&&t[e.host.id])return!1;e=e.parent}return!0}))}(o)})),o&&t.on("shape.move.start",251,(function(e){var t=e.context;N(Rm(t.shapes),(function(e){o.makeDraggable(t,e,!0),N(e.labels,(function(e){o.makeDraggable(t,e,!0)}))}))})),o&&t.on("shape.move.start",(function(e){var i=e.context.shapes;if(1===i.length){var r=i[0].host;r&&(n.addMarker(r,Am),t.once(["shape.move.out","shape.move.cleanup"],(function(){n.removeMarker(r,Am)})))}})),this.preExecuted("elements.move",1401,(function(e){var t=e.context,n=t.closure;N(Rm(t.shapes),(function(e){n.add(e,n.topLevel[e.host.id])}))})),this.postExecuted("elements.move",(function(e){var t=e.context,n=t.shapes,i=t.newHost;i&&1!==n.length||N(i?n:B(n,(function(e){var t,i=e.host;return function(e){return!!e.host}(e)&&(t=i,!(-1!==n.indexOf(t)))})),(function(e){r.updateAttachment(e,i)}))})),this.postExecuted("elements.move",(function(e){N(e.context.shapes,(function(e){N(e.attachers,(function(e){N(e.outgoing.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)})),N(e.incoming.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)}))}))}))})),this.postExecute("shape.create",(function(e){var t=e.context,n=t.shape,i=t.host;i&&r.updateAttachment(n,i)})),this.postExecute("shape.replace",(function(e){var t=e.context,n=t.oldShape,o=t.newShape;Em(n.attachers,(function(e){"attach"===i.allowed("elements.move",{target:o,shapes:[e]})?r.updateAttachment(e,o):r.removeShape(e)})),o.attachers.length&&N(o.attachers,(function(e){var t=Mu(e,n,o);r.moveShape(e,t,e.parent)}))})),this.postExecute("shape.resize",(function(e){var t=e.context,n=t.shape,i=t.oldBounds,o=t.newBounds,a=n.attachers;!1!==(t.hints||{}).attachSupport&&N(a,(function(e){var t=Mu(e,i,o);r.moveShape(e,t,e.parent),N(e.labels,(function(e){r.moveShape(e,t,e.parent)}))}))})),this.preExecute("shape.delete",(function(e){var t=e.context.shape;Em(t.attachers,(function(e){r.removeShape(e)})),t.host&&r.updateAttachment(t,null)}))}function Rm(e){return b($(e,(function(e){return e.attachers||[]})))}v(Pm,no),Pm.$inject=["injector","eventBus","canvas","rules","modeling"];const Mm={__depends__:[Jc],__init__:["attachSupport"],attachSupport:["type",Pm]};function Tm(e){this._model=e}function Dm(e,t,n){no.call(this,e),this._bpmnFactory=t;var i=this;function r(e){N(e.context.oldRoot.children,(function(e){Sn(e,"bpmn:BaseElement")&&i.updateParent(e)}))}function o(e){var t=e.context.shape;Sn(t,"bpmn:BaseElement")&&i.updateBounds(t)}function a(e){i.updateConnection(e.context)}function s(e){i.updateConnectionWaypoints(e.context.connection)}function c(e){i.updateAttachment(e.context)}function l(e){const{element:n}=e.context,i=oi(n),r=An(n),o=r&&r.get("label");ei(n)||mo(n)||(i&&!o?r.set("label",t.create("bpmndi:BPMNLabel")):!i&&o&&r.set("label",void 0))}this.executed(["connection.layout","connection.create"],(function(e){var t,i=e.context,r=i.hints||{};i.cropped||!1===r.createElementsBehavior||((t=i.connection).waypoints=n.getCroppedWaypoints(t),i.cropped=!0)})),this.reverted(["connection.layout"],(function(e){delete e.context.cropped})),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Bm((function(e){var t=e.context;i.updateParent(t.shape||t.connection,t.oldParent)}))),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Bm((function(e){var t=e.context,n=t.shape||t.connection,r=t.parent||t.newParent;i.updateParent(n,r)}))),this.executed(["canvas.updateRoot"],r),this.reverted(["canvas.updateRoot"],r),this.executed(["shape.move","shape.create","shape.resize"],Bm((function(e){"label"!==e.context.shape.type&&o(e)}))),this.reverted(["shape.move","shape.create","shape.resize"],Bm((function(e){"label"!==e.context.shape.type&&o(e)}))),e.on("shape.changed",(function(e){"label"===e.element.type&&o({context:{shape:e.element}})})),this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],Bm(a)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],Bm(a)),this.executed(["connection.layout","connection.move","connection.updateWaypoints"],Bm(s)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],Bm(s)),this.executed("connection.reconnect",Bm((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=kn(n),a=kn(i),s=kn(r);o.conditionExpression&&!Cn(s,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(t.oldConditionExpression=o.conditionExpression,delete o.conditionExpression),i!==r&&a.default===o&&(t.oldDefault=a.default,delete a.default)}))),this.reverted("connection.reconnect",Bm((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=kn(n),a=kn(i),s=kn(r);t.oldConditionExpression&&(o.conditionExpression=t.oldConditionExpression),t.oldDefault&&(a.default=t.oldDefault,delete s.default)}))),this.executed(["element.updateAttachment"],Bm(c)),this.reverted(["element.updateAttachment"],Bm(c)),this.executed("element.updateLabel",Bm(l)),this.reverted("element.updateLabel",Bm(l))}function Bm(e){return function(t){var n=t.context;Sn(n.shape||n.connection||n.element,"bpmn:BaseElement")&&e(t)}}function Nm(e,t,n){var i=function(e,t,n,i){var r=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,r,i)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e,n){var o=this.indexOf(e);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,e),-1===o&&t.set(e,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach((function(i){e.set(i,t.inverse,n)}))}function Om(e,t){if(!(this instanceof Om))return new Om(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Tm.$inject=["moddle"],Tm.prototype._needsId=function(e){return Cn(e,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"])},Tm.prototype._ensureId=function(e){var t;e.id?this._model.ids.claim(e.id,e):(t=Sn(e,"bpmn:Activity")?"Activity":Sn(e,"bpmn:Event")?"Event":Sn(e,"bpmn:Gateway")?"Gateway":Cn(e,["bpmn:SequenceFlow","bpmn:MessageFlow"])?"Flow":(e.$type||"").replace(/^[^:]*:/g,""),t+="_",!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e)))},Tm.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},Tm.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},Tm.prototype.createDiShape=function(e,t){return this.create("bpmndi:BPMNShape",Q({bpmnElement:e,bounds:this.createDiBounds()},t))},Tm.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},Tm.prototype.createDiWaypoints=function(e){var t=this;return $(e,(function(e){return t.createDiWaypoint(e)}))},Tm.prototype.createDiWaypoint=function(e){return this.create("dc:Point",J(e,["x","y"]))},Tm.prototype.createDiEdge=function(e,t){return this.create("bpmndi:BPMNEdge",Q({bpmnElement:e,waypoint:this.createDiWaypoints([])},t))},Tm.prototype.createDiPlane=function(e,t){return this.create("bpmndi:BPMNPlane",Q({bpmnElement:e},t))},v(Dm,no),Dm.$inject=["eventBus","bpmnFactory","connectionDocking"],Dm.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,i=t.host;n.attachedToRef=i&&i.businessObject},Dm.prototype.updateParent=function(e,t){if(!(Zn(e)||Sn(e,"bpmn:DataStoreReference")&&e.parent&&Sn(e.parent,"bpmn:Collaboration"))){var n=e.parent,i=e.businessObject,r=An(e),o=n&&n.businessObject,a=An(n);Sn(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,o,t&&t.businessObject),Sn(e,"bpmn:DataOutputAssociation")&&(o=e.source?e.source.businessObject:null),Sn(e,"bpmn:DataInputAssociation")&&(o=e.target?e.target.businessObject:null),this.updateSemanticParent(i,o),Sn(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,o),this.updateDiParent(r,a)}},Dm.prototype.updateBounds=function(e){var t=An(e),n=function(e){if(!Sn(e,"bpmn:Activity"))return;var t=An(e);if(!t)return;var n=t.get("label");if(!n)return;return n.get("bounds")}(e);if(n){var i=Ea(n,t.get("bounds"));Q(n,{x:e.x+i.x,y:e.y+i.y})}var r=Zn(e)?this._getLabel(t):t,o=r.bounds;o||(o=this._bpmnFactory.createDiBounds(),r.set("bounds",o)),Q(o,{x:e.x,y:e.y,width:e.width,height:e.height})},Dm.prototype.updateFlowNodeRefs=function(e,t,n){n!==t&&(Sn(n,"bpmn:Lane")&&Dp(n.get("flowNodeRef"),e),Sn(t,"bpmn:Lane")&&Bp(t.get("flowNodeRef"),e))},Dm.prototype.updateDiConnection=function(e,t,n){var i=An(e),r=An(t),o=An(n);i.sourceElement&&i.sourceElement.bpmnElement!==kn(t)&&(i.sourceElement=t&&r),i.targetElement&&i.targetElement.bpmnElement!==kn(n)&&(i.targetElement=n&&o)},Dm.prototype.updateDiParent=function(e,t){if(t&&!Sn(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(Dp(n,e),e.$parent=null)}},Dm.prototype.getLaneSet=function(e){var t,n;return Sn(e,"bpmn:Lane")?((t=e.childLaneSet)||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(Sn(e,"bpmn:Participant")&&(e=e.processRef),(t=(n=e.get("laneSets"))[0])||((t=this._bpmnFactory.create("bpmn:LaneSet")).$parent=e,n.push(t)),t)},Dm.prototype.updateSemanticParent=function(e,t,n){var i;if(e.$parent!==t&&(!Sn(e,"bpmn:DataInput")&&!Sn(e,"bpmn:DataOutput")||(Sn(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),!("ioSpecification"in t)||t.ioSpecification!==e.$parent))){if(Sn(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),i="lanes";else if(Sn(e,"bpmn:FlowElement")){if(t)if(Sn(t,"bpmn:Participant"))t=t.processRef;else if(Sn(t,"bpmn:Lane"))do{t=t.$parent.$parent}while(Sn(t,"bpmn:Lane"));i="flowElements"}else if(Sn(e,"bpmn:Artifact")){for(;t&&!Sn(t,"bpmn:Process")&&!Sn(t,"bpmn:SubProcess")&&!Sn(t,"bpmn:Collaboration");){if(Sn(t,"bpmn:Participant")){t=t.processRef;break}t=t.$parent}i="artifacts"}else if(Sn(e,"bpmn:MessageFlow"))i="messageFlows";else if(Sn(e,"bpmn:Participant")){i="participants";var r,o=e.processRef;o&&(r=function(e){for(;e&&!Sn(e,"bpmn:Definitions");)e=e.$parent;return e}(e.$parent||t),e.$parent&&(Dp(r.get("rootElements"),o),o.$parent=null),t&&(Bp(r.get("rootElements"),o),o.$parent=r))}else Sn(e,"bpmn:DataOutputAssociation")?i="dataOutputAssociations":Sn(e,"bpmn:DataInputAssociation")&&(i="dataInputAssociations");if(!i)throw new Error(`no parent for <${e.id}> in <${t.id}>`);var a;if(e.$parent&&Dp(a=e.$parent.get(i),e),t?((a=t.get(i)).push(e),e.$parent=t):e.$parent=null,n){var s=n.get(i);Dp(a,e),t&&(s||(s=[],t.set(i,s)),s.push(e))}}},Dm.prototype.updateConnectionWaypoints=function(e){An(e).set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},Dm.prototype.updateConnection=function(e){var t,n=e.connection,i=kn(n),r=n.source,o=kn(r),a=n.target,s=kn(n.target);if(Sn(i,"bpmn:DataAssociation"))Sn(i,"bpmn:DataInputAssociation")?(i.get("sourceRef")[0]=o,t=e.parent||e.newParent||s,this.updateSemanticParent(i,s,t)):Sn(i,"bpmn:DataOutputAssociation")&&(t=e.parent||e.newParent||o,this.updateSemanticParent(i,o,t),i.targetRef=s);else{var c=Sn(i,"bpmn:SequenceFlow");i.sourceRef!==o&&(c&&(Dp(i.sourceRef&&i.sourceRef.get("outgoing"),i),o&&o.get("outgoing")&&o.get("outgoing").push(i)),i.sourceRef=o),i.targetRef!==s&&(c&&(Dp(i.targetRef&&i.targetRef.get("incoming"),i),s&&s.get("incoming")&&s.get("incoming").push(i)),i.targetRef=s)}this.updateConnectionWaypoints(n),this.updateDiConnection(n,r,a)},Dm.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label},Om.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Nm(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},Om.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return function(e){return!0===e.__refs_collection}(n)||Nm(this,t,e),n},Om.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},Om.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Om.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var jm=new Om({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Lm=new Om({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Im=new Om({name:"attachers",collection:!0},{name:"host"}),$m=new Om({name:"outgoing",collection:!0},{name:"source"}),zm=new Om({name:"incoming",collection:!0},{name:"target"});function Fm(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),jm.bind(this,"parent"),Lm.bind(this,"labels"),$m.bind(this,"outgoing"),zm.bind(this,"incoming")}function Hm(){Fm.call(this),jm.bind(this,"children"),Im.bind(this,"host"),Im.bind(this,"attachers")}function Vm(){Fm.call(this),jm.bind(this,"children")}function Gm(){Hm.call(this),Lm.bind(this,"labelTarget")}function Wm(){Fm.call(this),$m.bind(this,"source"),zm.bind(this,"target")}v(Hm,Fm),v(Vm,Hm),v(Gm,Hm),v(Wm,Fm);var Um={connection:Wm,shape:Hm,label:Gm,root:Vm};function qm(){this._uid=12}function Km(e,t){qm.call(this),this._bpmnFactory=e,this._moddle=t}function Xm(e,t,n){return void 0===t[n]?t:(e[n]=t[n],ee(t,[n]))}function Ym(e,t){this._modeling=e,this._canvas=t}function Zm(e){this._modeling=e}function Qm(e,t){this._canvas=e,this._layouter=t}qm.prototype.createRoot=function(e){return this.create("root",e)},qm.prototype.createLabel=function(e){return this.create("label",e)},qm.prototype.createShape=function(e){return this.create("shape",e)},qm.prototype.createConnection=function(e){return this.create("connection",e)},qm.prototype.create=function(e,t){return(t=Q({},t||{})).id||(t.id=e+"_"+this._uid++),function(e,t){var n=Um[e];if(!n)throw new Error("unknown type: <"+e+">");return Q(new n,t)}(e,t)},v(Km,qm),Km.$inject=["bpmnFactory","moddle"],Km.prototype._baseCreate=qm.prototype.create,Km.prototype.create=function(e,t){if("label"===e){var n=t.di||this._bpmnFactory.createDiLabel();return this._baseCreate(e,Q({type:"label",di:n},Qn,t))}return this.createElement(e,t)},Km.prototype.createElement=function(e,t){var n,i,r,o=(t=Q({},t||{})).businessObject,a=t.di;if(!o){if(!t.type)throw new Error("no shape type specified");_n(o=this._bpmnFactory.create(t.type))}if(!Cn(a,["bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane"])){var s=Q({},a||{},{id:o.id+"_di"});a="root"===e?this._bpmnFactory.createDiPlane(o,s):"connection"===e?this._bpmnFactory.createDiEdge(o,s):this._bpmnFactory.createDiShape(o,s)}return Sn(o,"bpmn:Group")&&(t=Q({isFrame:!0},t)),t=function(e,t,n){return N(n,(function(n){t=Xm(e,t,n)})),t}(o,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&(t=Xm(a,t,"isExpanded")),Cn(o,["bpmn:Lane","bpmn:Participant"])&&(t=Xm(a,t,"isHorizontal")),Sn(o,"bpmn:SubProcess")&&(t.collapsed=!Un(o,a)),Sn(o,"bpmn:ExclusiveGateway")&&(M(a,"isMarkerVisible")?void 0===a.isMarkerVisible&&(a.isMarkerVisible=!1):a.isMarkerVisible=!0),E(t.triggeredByEvent)&&(o.triggeredByEvent=t.triggeredByEvent,delete t.triggeredByEvent),E(t.cancelActivity)&&(o.cancelActivity=t.cancelActivity,delete t.cancelActivity),t.eventDefinitionType&&(i=o.get("eventDefinitions")||[],r=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),"bpmn:ConditionalEventDefinition"===t.eventDefinitionType&&(r.condition=this._bpmnFactory.create("bpmn:FormalExpression")),i.push(r),r.$parent=o,o.eventDefinitions=i,delete t.eventDefinitionType),n=this.getDefaultSize(o,a),t=Q({id:o.id},n,t,{businessObject:o,di:a}),this._baseCreate(e,t)},Km.prototype.getDefaultSize=function(e,t){var n=kn(e);if(t=t||An(e),Sn(n,"bpmn:SubProcess"))return Un(n,t)?{width:350,height:200}:{width:100,height:80};if(Sn(n,"bpmn:Task"))return{width:100,height:80};if(Sn(n,"bpmn:Gateway"))return{width:50,height:50};if(Sn(n,"bpmn:Event"))return{width:36,height:36};if(Sn(n,"bpmn:Participant")){var i=void 0===t.isHorizontal||!0===t.isHorizontal;return Un(n,t)?i?{width:600,height:250}:{width:250,height:600}:i?{width:400,height:60}:{width:60,height:400}}return Sn(n,"bpmn:Lane")?{width:400,height:100}:Sn(n,"bpmn:DataObjectReference")?{width:36,height:50}:Sn(n,"bpmn:DataStoreReference")?{width:50,height:50}:Sn(n,"bpmn:TextAnnotation")?{width:100,height:30}:Sn(n,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}},Km.prototype.createParticipantShape=function(e){return k(e)||(e={isExpanded:e}),!1!==(e=Q({type:"bpmn:Participant"},e||{})).isExpanded&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)},Ym.$inject=["modeling","canvas"],Ym.prototype.preExecute=function(e){var t=this._modeling,n=e.elements,i=e.alignment;N(n,(function(e){var n={x:0,y:0};E(i.left)?n.x=i.left-e.x:E(i.right)?n.x=i.right-e.width-e.x:E(i.center)?n.x=i.center-Math.round(e.width/2)-e.x:E(i.top)?n.y=i.top-e.y:E(i.bottom)?n.y=i.bottom-e.height-e.y:E(i.middle)&&(n.y=i.middle-Math.round(e.height/2)-e.y),t.moveElements([e],n,e.parent)}))},Ym.prototype.postExecute=function(e){},Zm.$inject=["modeling"],Zm.prototype.preExecute=function(e){var t=e.source;if(!t)throw new Error("source required");var n=e.target||t.parent,i=e.shape,r=e.hints||{};i=e.shape=this._modeling.createShape(i,e.position,n,{attach:r.attach}),e.shape=i},Zm.prototype.postExecute=function(e){var t,n,i=e.hints||{};t=e.source,n=e.shape,I(t.outgoing,(function(e){return e.target===n}))||(i.connectionTarget===e.source?this._modeling.connect(e.shape,e.source,e.connection):this._modeling.connect(e.source,e.shape,e.connection))},Qm.$inject=["canvas","layouter"],Qm.prototype.execute=function(e){var t=e.connection,n=e.source,i=e.target,r=e.parent,o=e.parentIndex,a=e.hints;if(!n||!i)throw new Error("source and target required");if(!r)throw new Error("parent required");return t.source=n,t.target=i,t.waypoints||(t.waypoints=this._layouter.layoutConnection(t,a)),this._canvas.addConnection(t,r,o),t},Qm.prototype.revert=function(e){var t=e.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t};var Jm=Math.round;function ef(e){this._modeling=e}ef.$inject=["modeling"],ef.prototype.preExecute=function(e){var t=e.elements,n=e.parent,i=e.parentIndex,r=e.position,o=e.hints,a=this._modeling;N(t,(function(e){A(e.x)||(e.x=0),A(e.y)||(e.y=0)}));var s=Wr(B(t,(function(e){return!e.hidden})));N(t,(function(e){Yn(e)&&(e.waypoints=$(e.waypoints,(function(e){return{x:Jm(e.x-s.x-s.width/2+r.x),y:Jm(e.y-s.y-s.height/2+r.y)}}))),Q(e,{x:Jm(e.x-s.x-s.width/2+r.x),y:Jm(e.y-s.y-s.height/2+r.y)})}));var c=zr(t),l={};N(t,(function(e){if(Yn(e))l[e.id]=A(i)?a.createConnection(l[e.source.id],l[e.target.id],i,e,e.parent||n,o):a.createConnection(l[e.source.id],l[e.target.id],e,e.parent||n,o);else{var t=Q({},o);-1===c.indexOf(e)&&(t.autoResize=!1),Zn(e)&&(t=ee(t,["attach"])),l[e.id]=A(i)?a.createShape(e,J(e,["x","y","width","height"]),e.parent||n,i,t):a.createShape(e,J(e,["x","y","width","height"]),e.parent||n,t)}})),e.elements=F(l)};var tf=Math.round;function nf(e){this._canvas=e}function rf(e){nf.call(this,e)}nf.$inject=["canvas"],nf.prototype.execute=function(e){var t=e.shape,n=e.position,i=e.parent,r=e.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?Q(t,n):Q(t,{x:n.x-tf(t.width/2),y:n.y-tf(t.height/2)}),this._canvas.addShape(t,i,r),t},nf.prototype.revert=function(e){var t=e.shape;return this._canvas.removeShape(t),t},v(rf,nf),rf.$inject=["canvas"];var of=nf.prototype.execute;rf.prototype.execute=function(e){var t=e.shape;return function(e){["width","height"].forEach((function(t){void 0===e[t]&&(e[t]=0)}))}(t),t.labelTarget=e.labelTarget,of.call(this,e)};var af=nf.prototype.revert;function sf(e,t){this._canvas=e,this._modeling=t}function cf(e,t){this._modeling=e,this._elementRegistry=t}function lf(e,t){this._canvas=e,this._modeling=t}function pf(e){this._modeling=e}rf.prototype.revert=function(e){return e.shape.labelTarget=null,af.call(this,e)},sf.$inject=["canvas","modeling"],sf.prototype.preExecute=function(e){var t=this._modeling,n=e.connection;Em(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),Em(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})}))},sf.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=Np(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t},sf.prototype.revert=function(e){var t=e.connection,n=e.parent,i=e.parentIndex;return t.source=e.source,t.target=e.target,Bp(n.children,t,i),this._canvas.addConnection(t,n),t},cf.$inject=["modeling","elementRegistry"],cf.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry;N(e.elements,(function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))}))},lf.$inject=["canvas","modeling"],lf.prototype.preExecute=function(e){var t=this._modeling,n=e.shape;Em(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),Em(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})})),Em(n.children,(function(e){Yn(e)?t.removeConnection(e,{nested:!0}):t.removeShape(e,{nested:!0})}))},lf.prototype.execute=function(e){var t=this._canvas,n=e.shape,i=n.parent;return e.oldParent=i,e.oldParentIndex=Np(i.children,n),t.removeShape(n),n},lf.prototype.revert=function(e){var t=this._canvas,n=e.shape,i=e.oldParent,r=e.oldParentIndex;return Bp(i.children,n,r),t.addShape(n,i),n},pf.$inject=["modeling"];var uf={x:"y",y:"x"};function df(e,t){this._layouter=e,this._canvas=t}function hf(){}function mf(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}function ff(e){this._modeling=e}function gf(e){this._helper=new ff(e)}function yf(e){this._modeling=e,this._helper=new ff(e)}function vf(e){this._modeling=e}function bf(e){return e.original||e}function xf(e,t){this._modeling=e,this._rules=t}function _f(e){this._modeling=e}function wf(e){this._modeling=e}function Ef(e){return Q({},e)}function Sf(e){switch(e){case"n":case"s":return"y";case"w":case"e":return"x"}}function Cf(e,t,n){var i=Sf(n);return/e|s/.test(n)?e[i]>t:/n|w/.test(n)?e[i] required");var r=e.changed||this._getVisualReferences(n).concat(t),o=e.oldProperties||function(e,t){return j(t,(function(t,n){return t[n]=e.get(n),t}),{})}(n,z(i));return Lf(n,i),e.oldProperties=o,e.changed=r,r},jf.prototype.revert=function(e){var t=e.oldProperties,n=e.moddleElement,i=e.changed;return Lf(n,t),i},jf.prototype._getVisualReferences=function(e){var t=this._elementRegistry;return Sn(e,"bpmn:DataObject")?function(e,t){return t.filter((function(t){return Sn(t,"bpmn:DataObjectReference")&&kn(t).dataObjectRef===e}))}(e,t):[]};var If="default",$f="id",zf="di",Ff={width:0,height:0};function Hf(e,t,n,i){this._elementRegistry=e,this._moddle=t,this._modeling=n,this._textRenderer=i}function Vf(e,t){return $f in e&&e[$f]!==t[$f]}function Gf(e,t){var n=e.businessObject,i=An(e);N(t,(function(e,t){t!==zf?n.set(t,e):i&&function(e,t){N(t,(function(t,n){e.set(n,t)}))}(i,e)}))}Hf.$inject=["elementRegistry","moddle","modeling","textRenderer"],Hf.prototype.execute=function(e){var t=e.element,n=[t];if(!t)throw new Error("element required");var i=this._elementRegistry,r=this._moddle.ids,o=t.businessObject,a=function(e){var t=Q({},e);return Wf.forEach((function(n){n in e&&(t[n]=kn(t[n]))})),t}(e.properties),s=e.oldProperties||function(e,t){var n=z(t),i=e.businessObject,r=An(e);return j(n,(function(e,n){return e[n]=n!==zf?i.get(n):function(e,t){return j(t,(function(t,n){return t[n]=e&&e.get(n),t}),{})}(r,z(t.di)),e}),{})}(t,a);return Vf(a,o)&&(r.unclaim(o[$f]),i.updateId(t,a[$f]),r.claim(a[$f],o)),If in a&&(a[If]&&n.push(i.get(a[If].id)),o[If]&&n.push(i.get(o[If].id))),Gf(t,a),e.oldProperties=s,e.changed=n,n},Hf.prototype.postExecute=function(e){var t=e.element.label,n=t&&kn(t).name;if(n){var i=this._textRenderer.getExternalLabelBounds(t,n);this._modeling.resizeShape(t,i,Ff)}},Hf.prototype.revert=function(e){var t=e.element,n=e.properties,i=e.oldProperties,r=t.businessObject,o=this._elementRegistry,a=this._moddle.ids;return Gf(t,i),Vf(n,r)&&(a.unclaim(n[$f]),o.updateId(t,i[$f]),a.claim(i[$f],r)),e.changed};var Wf=["default"];function Uf(e,t){this._canvas=e,this._modeling=t}function qf(e,t){this._modeling=e,this._spaceTool=t}function Kf(e){this._modeling=e}function Xf(e,t){this._modeling=e,this._spaceTool=t}Uf.$inject=["canvas","modeling"],Uf.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=t.getRootElement(),o=r.businessObject,a=o.$parent,s=An(r);return t.setRootElement(n),t.removeRootElement(r),Bp(a.rootElements,i),i.$parent=a,Dp(a.rootElements,o),o.$parent=null,r.di=null,s.bpmnElement=i,n.di=s,e.oldRoot=r,[]},Uf.prototype.revert=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=e.oldRoot,o=r.businessObject,a=i.$parent,s=An(n);return t.setRootElement(r),t.removeRootElement(n),Dp(a.rootElements,i),i.$parent=null,Bp(a.rootElements,o),o.$parent=a,n.di=null,s.bpmnElement=o,r.di=s,[]},qf.$inject=["modeling","spaceTool"],qf.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,i=e.shape,r=e.location,o=Jp(i),a=o===i,s=a?i:i.parent,c=Qp(s),l=qn(i);if(l?"left"===r?r="top":"right"===r&&(r="bottom"):"top"===r?r="left":"bottom"===r&&(r="right"),!c.length){var p=l?{x:i.x+Yp,y:i.y,width:i.width-Yp,height:i.height}:{x:i.x,y:i.y+Yp,width:i.width,height:i.height-Yp};n.createShape({type:"bpmn:Lane",isHorizontal:l},p,s)}var u,d,h,m,f,g=[];Vr(o,(function(e){return g.push(e),e.label&&g.push(e.label),e===i?[]:B(e.children,(function(e){return e!==i}))})),"top"===r?(u=-120,h=(d=i.y)+10,m="n",f="y"):"left"===r?(u=-120,h=(d=i.x)+10,m="w",f="x"):"bottom"===r?(u=120,h=(d=i.y+i.height)-10,m="s",f="y"):"right"===r&&(u=120,h=(d=i.x+i.width)-10,m="e",f="x");var y=t.calculateAdjustments(g,f,u,h),v=l?{x:0,y:u}:{x:u,y:0};t.makeSpace(y.movingShapes,y.resizingShapes,v,m,h);var b=l?{x:i.x+(a?Yp:0),y:d-("top"===r?120:0),width:i.width-(a?Yp:0),height:120}:{x:d-("left"===r?120:0),y:i.y+(a?Yp:0),width:120,height:i.height-(a?Yp:0)};e.newLane=n.createShape({type:"bpmn:Lane",isHorizontal:l},b,s)},Kf.$inject=["modeling"],Kf.prototype.preExecute=function(e){var t=this._modeling,n=e.shape,i=e.count,r=Qp(n),o=r.length;if(o>i)throw new Error(`more than <${i}> child lanes`);var a,s,c,l,p=qn(n),u=p?n.height:n.width,d=Math.round(u/i);for(l=0;l0||l.bottom<0?-n:n,a=s.calculateAdjustments(u,"y",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:0,y:n},r)),(l.left||l.right)&&(n=l.right||l.left,i=e.x+(l.right?e.width:0)+(l.right?-10:100),r=l.right?"e":"w",o=l.left>0||l.right<0?-n:n,a=s.calculateAdjustments(d,"x",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:n,y:0},r))};var Yf="flowNodeRef",Zf="lanes";function Qf(e){this._elementRegistry=e}function Jf(e){this._moddle=e}Qf.$inject=["elementRegistry"],Qf.prototype._computeUpdates=function(e,t){var n=[],i=[],r={},o=[];function a(e){-1===n.indexOf(e)&&(o.push(e),n.push(e))}function s(e){if(!e.parent)return[];var t=function(e){var t=Jp(e);return r[t.id]||(r[t.id]=Zp(t)),r[t.id]}(e);return t.filter((function(t){return n=e,i=Rr(t),r=n.x+n.width/2,o=n.y+n.height/2,r>i.left&&ri.top&&o: must be specified as : with start/end in { h,v,t,r,b,l }");if(bg(n)){var i=function(e,t,n){return dg(e,t,n)}(e,t,n),r=function(e,t,n){var i=dg(t,e,hg(n));return{waypoints:i.waypoints.slice().reverse(),directions:hg(i.directions),turnNextDirections:i.turnNextDirections}}(e,t,n),o=function(e,t){var n=e.directions.split(":")[1],i=t.directions.split(":")[0];e.turnNextDirections&&(n="h"==n?"v":"h"),t.turnNextDirections&&(i="h"==i?"v":"h");var r=n+":"+i;return{waypoints:mg(e.waypoints[e.waypoints.length-1],t.waypoints[0],r),directions:r}}(i,r);return[].concat(i.waypoints,o.waypoints,r.waypoints)}return function(e,t,n){var i=lg((t.x-e.x)/2+e.x),r=lg((t.y-e.y)/2+e.y);if("h:v"===n)return[{x:t.x,y:e.y}];if("v:h"===n)return[{x:e.x,y:t.y}];if("h:h"===n)return[{x:i,y:e.y},{x:i,y:t.y}];if("v:v"===n)return[{x:e.x,y:r},{x:t.x,y:r}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]")}(e,t,n)}function fg(e,t,n,i,r){var o=O(r&&r.preferredLayouts||[],"straight")[0]||"h:h",a=Br(e,t,ug[o]||0),s=function(e,t){if(bg(t))return t;switch(e){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t}}(a,o);n=n||Dr(e),i=i||Dr(t);var c=s.split(":"),l=xg(n,e,c[0],function(e){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[e]}(a));return function(e,t,n){var i=mg(e,t,n);return i.unshift(e),i.push(t),_g(i)}(l,xg(i,t,c[1],a),s)}function gg(e,t,n,i,r,o){var a;return C(n)&&(r=n,o=i,n=Dr(e),i=Dr(t)),r=r||[],a=-1!==(o=Q({preferredLayouts:[]},o)).preferredLayouts.indexOf("straight")&&function(e,t,n,i,r){var o,a,s={};if(a=Br(e,t),!/^(top|bottom|left|right)$/.test(a))return null;/top|bottom/.test(a)&&(o="x");/left|right/.test(a)&&(o="y");return"target"===r.preserveDocking?yg(o,i,e)?(s[o]=i[o],[{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y,original:{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y}},{x:i.x,y:i.y}]):null:yg(o,n,t)?(s[o]=n[o],[{x:n.x,y:n.y},{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y,original:{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y}}]):null}(e,t,n,i,o),a||(a=o.connectionEnd&&function(e,t,n,i){var r=i.slice().reverse();return r=vg(e,t,n,r),r?r.reverse():null}(t,e,i,r),a||((a=o.connectionStart&&vg(e,t,n,r))||(!o.connectionStart&&!o.connectionEnd&&r&&r.length?r:fg(e,t,n,i,o))))}function yg(e,t,n){return function(e,t,n){return e>=t&&e<=n}(t[e],n[e],n[e]+n[{x:"width",y:"height"}[e]])}function vg(e,t,n,i){if((r=i).length<3||!(r.length>4)&&T(r,(function(e,t){var n=r[t-1];return n&&Hi(e,n)<3})))return null;var r,o,a=i[0],s=i.slice();return s[0]=n,s[1]=function(e,t,n){switch(Wi(t,e)){case"v":return{x:n.x,y:e.y};case"h":return{x:e.x,y:n.y}}return{x:e.x,y:e.y}}(s[1],a,n),o=function(e,t,n){var i;for(i=e.length-2;0!==i;i--)if(qi(e[i],t,pg)||qi(e[i],n,pg))return e.slice(i);return e}(s,e,t),o!==s&&(s=vg(e,t,n,o)),s&&Wi(s)?null:s}function bg(e){return e&&/t|r|b|l/.test(e)}function xg(e,t,n,i){if("h"===n&&(n=/left/.test(i)?"l":"r"),"v"===n&&(n=/top/.test(i)?"t":"b"),"t"===n)return{original:e,x:e.x,y:t.y};if("r"===n)return{original:e,x:t.x+t.width,y:e.y};if("b"===n)return{original:e,x:e.x,y:t.y+t.height};if("l"===n)return{original:e,x:t.x,y:e.y};throw new Error("unexpected dockingDirection: <"+n+">")}function _g(e){return e.reduce((function(t,n,i){return Vi(t[t.length-1],e[i+1],n,0)||t.push(n),t}),[])}var wg=-10,Eg=40,Sg={default:["h:h"],fromGateway:["v:h"],toGateway:["h:v"],loop:{fromTop:["t:r"],fromRight:["r:b"],fromLeft:["l:t"],fromBottom:["b:l"]},boundaryLoop:{alternateHorizontalSide:"b",alternateVerticalSide:"l",default:"v"},messageFlow:["straight","v:v"],subProcess:["straight","h:h"],isHorizontal:!0},Cg={default:["v:v"],fromGateway:["h:v"],toGateway:["v:h"],loop:{fromTop:["t:l"],fromRight:["r:t"],fromLeft:["l:b"],fromBottom:["b:r"]},boundaryLoop:{alternateHorizontalSide:"t",alternateVerticalSide:"r",default:"h"},messageFlow:["straight","h:h"],subProcess:["straight","v:v"],isHorizontal:!1},kg={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},Ag={top:"t",right:"r",bottom:"b",left:"l"};function Pg(){}function Rg(e,t){return Sn(t,"bpmn:Participant")?"source":Sn(e,"bpmn:Participant")?"target":Bg(t)?"source":Bg(e)||Sn(t,"bpmn:Event")?"target":Sn(e,"bpmn:Event")?"source":null}function Mg(e){return Bg(e)?"target":"source"}function Tg(e,t){return e?e.original||e:Dr(t)}function Dg(e,t){return Sn(t,"bpmn:Activity")&&Sn(e,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation}function Bg(e){return Sn(e,"bpmn:SubProcess")&&Un(e)}function Ng(e,t){return e===t}function Og(e){var t=/right|left/.exec(e);return t&&t[0]}function jg(e){var t=/top|bottom/.exec(e);return t&&t[0]}function Lg(e,t){return kg[e]===t}function Ig(e){return"right"===e||"left"===e}function $g(e,t,n){var i=t.waypoints,r=i&&i.length&&Br(i[0],e);return"top"===r?n.loop.fromTop:"right"===r?n.loop.fromRight:"left"===r?n.loop.fromLeft:n.loop.fromBottom}function zg(e,t,n,i){var r,o,a,s,c=Dr(e),l=Dr(t),p=(s=(a=e).host,Br(Dr(a),s,wg)),u=Ng(e.host,t),d=-1!==["top","right","bottom","left"].indexOf(p),h=Br(l,c,{x:e.width/2+t.width/2,y:e.height/2+t.height/2});return u?function(e,t,n,i,r,o){var a,s=t?e:o.isHorizontal?jg(e):Og(e),c=Ag[s];a=t?Ig(e)?Fg("y",n,i,r)?"h":o.boundaryLoop.alternateHorizontalSide:Fg("x",n,i,r)?"v":o.boundaryLoop.alternateVerticalSide:o.boundaryLoop.default;return[c+":"+a]}(p,d,e,t,n,i):(r=function(e,t,n,i){if(n)return Ag[e];var r=jg(e),o=Og(e),a=jg(t),s=Og(t);if(i){if(Ng(r,a)||Lg(o,s))return Ag[r]}else if(Ng(o,s)||Lg(r,a))return Ag[o];return Ag[i?o:r]}(p,h,d,i.isHorizontal),o=function(e,t,n,i){if(n)return Ig(e)?(r=t,o=Og(e),a=kg[o],-1!==r.indexOf(a)||Ng(e,t)?"h":"v"):function(e,t){var n=jg(e),i=kg[n];return-1!==t.indexOf(i)}(e,t)||Ng(e,t)?"v":"h";var r,o,a;return i?Ng(jg(e),jg(t))?"h":"v":Ng(Og(e),Og(t))?"v":"h"}(p,h,d,i.isHorizontal),[r+":"+o])}function Fg(e,t,n,i){var r=Eg;return!(Hg(e,i,n,r)||Hg(e,i,{x:n.x+n.width,y:n.y+n.height},r)||Hg(e,i,Dr(t),r))}function Hg(e,t,n,i){return Math.abs(t[e]-n[e])!S(e)))})},qg.prototype.cleanUp=function(){this._complexPreview.cleanUp()},qg.$inject=["complexPreview","connectionDocking","elementFactory","eventBus","layouter","rules"];const Kg={__depends__:[jc,up,Wg],__init__:["appendPreview"],appendPreview:["type",qg]};var Xg=Math.min,Yg=Math.max;function Zg(e){e.preventDefault()}function Qg(e){e.stopPropagation()}function Jg(e){this.container=e.container,this.parent=Ae(''),this.content=Re("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=Z(this.autoResize,this),this.handlePaste=Z(this.handlePaste,this)}function ey(e,t){this._eventBus=e,this._providers=[],this._textbox=new Jg({container:t.getContainer(),keyHandler:Z(this._handleKey,this),resizeHandler:Z(this._handleResize,this)})}Jg.prototype.create=function(e,t,n,i){var r=this.parent,o=this.content,a=this.container;i=this.options=i||{};var s=J(t=this.style=t||{},["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);Q(r.style,{width:e.width+"px",height:e.height+"px",maxWidth:e.maxWidth+"px",maxHeight:e.maxHeight+"px",minWidth:e.minWidth+"px",minHeight:e.minHeight+"px",left:e.x+"px",top:e.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},s);var c=J(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return Q(o.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},c),i.centerVertically&&Q(o.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},c),o.innerText=n,xe.bind(o,"keydown",this.keyHandler),xe.bind(o,"mousedown",Qg),xe.bind(o,"paste",this.handlePaste),i.autoResize&&xe.bind(o,"input",this.autoResize),i.resizable&&this.resizable(t),a.appendChild(r),this.setSelection(o.lastChild,o.lastChild&&o.lastChild.length),r},Jg.prototype.handlePaste=function(e){var t,n=this.options,i=this.style;if(e.preventDefault(),t=e.clipboardData?e.clipboardData.getData("text/plain"):window.clipboardData.getData("Text"),this.insertText(t),n.autoResize){var r=this.autoResize(i);r&&this.resizeHandler(r)}},Jg.prototype.insertText=function(e){e=e.replace(/\r\n|\r|\n/g,"\n"),document.execCommand("insertText",!1,e)||this._insertTextIE(e)},Jg.prototype._insertTextIE=function(e){var t,n,i,r=this.getSelection(),o=r.startContainer,a=r.endContainer,s=r.startOffset,c=r.endOffset,l=r.commonAncestorContainer,p=(t=l.childNodes,[].slice.call(t));if(l.nodeType===Node.TEXT_NODE){var u=o.textContent;o.textContent=u.substring(0,s)+e+u.substring(c),n=o,i=s+e.length}else if(o===this.content&&a===this.content){var d=document.createTextNode(e);this.content.insertBefore(d,p[s]),n=d,i=d.textContent.length}else{var h=p.indexOf(o),m=p.indexOf(a);p.forEach((function(t,n){n===h?t.textContent=o.textContent.substring(0,s)+e+a.textContent.substring(c):n>h&&n<=m&&Te(t)})),n=o,i=s+e.length}n&&void 0!==i&&setTimeout((function(){self.setSelection(n,i)}))},Jg.prototype.autoResize=function(){var e=this.parent,t=this.content,n=parseInt(this.style.fontSize)||12;if(t.scrollHeight>e.offsetHeight||t.scrollHeight
');var u=function(n){Zg(n),Qg(n);var u=Xg(Yg(l+n.clientX-s,i),o),d=Xg(Yg(p+n.clientY-c,r),a);t.style.width=u+"px",t.style.height=d+"px",e.resizeHandler({width:l,height:p,dx:n.clientX-s,dy:n.clientY-c})},d=function(e){Zg(e),Qg(e),xe.unbind(document,"mousemove",u,!1),xe.unbind(document,"mouseup",d,!1)};xe.bind(n,"mousedown",(function(e){Zg(e),Qg(e),s=e.clientX,c=e.clientY;var n=t.getBoundingClientRect();l=n.width,p=n.height,xe.bind(document,"mousemove",u),xe.bind(document,"mouseup",d)}))}Q(n.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(n)},Jg.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),xe.unbind(t,"keydown",this.keyHandler),xe.unbind(t,"mousedown",Qg),xe.unbind(t,"input",this.autoResize),xe.unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),Te(n)),Te(e)},Jg.prototype.getValue=function(){return this.content.innerText.trim()},Jg.prototype.getSelection=function(){return window.getSelection().getRangeAt(0)},Jg.prototype.setSelection=function(e,t){var n=document.createRange();null===e?n.selectNodeContents(this.content):(n.setStart(e,t),n.setEnd(e,t));var i=window.getSelection();i.removeAllRanges(),i.addRange(n)},ey.$inject=["eventBus","canvas"],ey.prototype.registerProvider=function(e){this._providers.push(e)},ey.prototype.isActive=function(e){return!(!this._active||e&&this._active.element!==e)},ey.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},ey.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})},ey.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},ey.prototype.complete=function(){var e=this._active;if(e){var t,n=e.context.bounds,i=this.$textbox.getBoundingClientRect(),r=this.getValue();r===e.context.text&&i.height===n.height&&i.width===n.width||(t=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,r,e.context.text,{x:i.left-t.left,y:i.top-t.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}},ey.prototype.getValue=function(){return this._textbox.getValue()},ey.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},ey.prototype._handleResize=function(e){this._fire("resize",e)},ey.prototype.activate=function(e){var t;this.isActive()&&this.cancel();var n=T(this._providers,(function(n){return(t=n.activate(e))?n:null}));return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:e,context:t,provider:n},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t};const ty={__depends__:[Uo],__init__:["directEditing"],directEditing:["type",ey]};function ny(e){return function(t){var n=t.target,i=kn(e),r=i.eventDefinitions&&i.eventDefinitions[0],o=i.$type===n.type,a=(r&&r.$type)===n.eventDefinitionType,s=!!n.triggeredByEvent==!!i.triggeredByEvent,c=void 0===n.isExpanded||n.isExpanded===Un(e);return!(o&&a&&s&&c)}}var iy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],ry=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}],oy=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message intermediate catch event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message intermediate throw event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer intermediate catch event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation intermediate throw event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional intermediate catch event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link intermediate catch event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link intermediate throw event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation intermediate throw event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal intermediate catch event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal intermediate throw event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],ay=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message end event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation end event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error end event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel end event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation end event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal end event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate end event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],sy=[{label:"Exclusive gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event-based gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],cy=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],ly=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Sub-process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],py=ly,uy=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"User task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Service task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Send task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"Manual task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business rule task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Script task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub-process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],dy=[{label:"Data store reference",actionName:"replace-with-data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}}],hy=[{label:"Data object reference",actionName:"replace-with-data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}],my=[{label:"Message boundary event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!0}},{label:"Timer boundary event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!0}},{label:"Escalation boundary event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!0}},{label:"Conditional boundary event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!0}},{label:"Error boundary event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",cancelActivity:!0}},{label:"Cancel boundary event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition",cancelActivity:!0}},{label:"Signal boundary event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!0}},{label:"Compensation boundary event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",cancelActivity:!0}},{label:"Message boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],fy=[{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!0}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!0}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!0}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!0}},{label:"Error start event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",isInterrupting:!0}},{label:"Escalation start event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!0}},{label:"Compensation start event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",isInterrupting:!0}},{label:"Message start event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer start event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional start event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal start event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation start event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],gy=[{label:"Sequence flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],yy=[{label:"Expanded pool/participant",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:function(e){var t="Empty pool/participant";return e.children&&e.children.length&&(t+=" (removes content)"),t},actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}];const vy={"start-event-non-interrupting":'\n ',"intermediate-event-non-interrupting":'\n '};function by(e,t,n,i,r,o,a,s){this._bpmnFactory=e,this._popupMenu=t,this._modeling=n,this._moddle=i,this._bpmnReplace=r,this._rules=o,this._translate=a,this._moddleCopy=s,this._register()}by.$inject=["bpmnFactory","popupMenu","modeling","moddle","bpmnReplace","rules","translate","moddleCopy"],by.prototype._register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},by.prototype.getPopupMenuEntries=function(e){var t=e.businessObject,n=this._rules,i=[];if(C(e)||!n.allowed("shape.replace",{element:e}))return{};var r=ny(e);return Sn(t,"bpmn:DataObjectReference")?this._createEntries(e,dy):Sn(t,"bpmn:DataStoreReference")&&!Sn(e.parent,"bpmn:Collaboration")?this._createEntries(e,hy):Sn(t,"bpmn:StartEvent")&&!Sn(t.$parent,"bpmn:SubProcess")?(i=B(iy,r),this._createEntries(e,i)):Sn(t,"bpmn:Participant")?(i=B(yy,(function(t){return Un(e)!==t.target.isExpanded})),this._createEntries(e,i)):Sn(t,"bpmn:StartEvent")&&Kn(t.$parent)?(i=B(fy,(function(e){var n=!1!==e.target.isInterrupting,i=t.isInterrupting===n;return r(e)||!r(e)&&!i})),this._createEntries(e,i)):Sn(t,"bpmn:StartEvent")&&!Kn(t.$parent)&&Sn(t.$parent,"bpmn:SubProcess")?(i=B(ry,r),this._createEntries(e,i)):Sn(t,"bpmn:EndEvent")?(i=B(ay,(function(e){return!("bpmn:CancelEventDefinition"==e.target.eventDefinitionType&&!Sn(t.$parent,"bpmn:Transaction"))&&r(e)})),this._createEntries(e,i)):Sn(t,"bpmn:BoundaryEvent")?(i=B(my,(function(e){var n=e.target;if("bpmn:CancelEventDefinition"==n.eventDefinitionType&&!Sn(t.attachedToRef,"bpmn:Transaction"))return!1;var i=!1!==n.cancelActivity,o=t.cancelActivity==i;return r(e)||!r(e)&&!o})),this._createEntries(e,i)):Sn(t,"bpmn:IntermediateCatchEvent")||Sn(t,"bpmn:IntermediateThrowEvent")?(i=B(oy,r),this._createEntries(e,i)):Sn(t,"bpmn:Gateway")?(i=B(sy,r),this._createEntries(e,i)):Sn(t,"bpmn:Transaction")?(i=B(ly,r),this._createEntries(e,i)):Kn(t)&&Un(e)?(i=B(py,r),this._createEntries(e,i)):Sn(t,"bpmn:SubProcess")&&Un(e)?(i=B(cy,r),this._createEntries(e,i)):Sn(t,"bpmn:AdHocSubProcess")&&!Un(e)?(i=B(uy,(function(e){var t=e.target,n="bpmn:SubProcess"===t.type,i=!0===t.isExpanded;return ny(t)&&(!n||i)})),this._createEntries(e,i)):Sn(t,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,gy):Sn(t,"bpmn:FlowNode")?(i=B(uy,r),Sn(t,"bpmn:SubProcess")&&!Un(e)&&(i=B(i,(function(e){return"Sub-process (collapsed)"!==e.label}))),this._createEntries(e,i)):{}},by.prototype.getPopupMenuHeaderEntries=function(e){var t={};return Sn(e,"bpmn:Activity")&&!Kn(e)&&(t={...t,...this._getLoopCharacteristicsHeaderEntries(e)}),Sn(e,"bpmn:DataObjectReference")&&(t={...t,...this._getCollectionHeaderEntries(e)}),Sn(e,"bpmn:Participant")&&(t={...t,...this._getParticipantMultiplicityHeaderEntries(e)}),!Sn(e,"bpmn:SubProcess")||Sn(e,"bpmn:Transaction")||Kn(e)||(t={...t,...this._getAdHocHeaderEntries(e)}),Wu(e)&&(t={...t,...this._getNonInterruptingHeaderEntries(e)}),t},by.prototype._createEntries=function(e,t){var n={},i=this;return N(t,(function(t){n[t.actionName]=i._createEntry(t,e)})),n},by.prototype._createSequenceFlowEntries=function(e,t){var n=kn(e),i={},r=this._modeling,o=this._moddle,a=this;return N(t,(function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef.default!==n&&(Sn(n.sourceRef,"bpmn:ExclusiveGateway")||Sn(n.sourceRef,"bpmn:InclusiveGateway")||Sn(n.sourceRef,"bpmn:ComplexGateway")||Sn(n.sourceRef,"bpmn:Activity"))&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e.source,{default:n})}))});break;case"replace-with-conditional-flow":!n.conditionExpression&&Sn(n.sourceRef,"bpmn:Activity")&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){var t=o.create("bpmn:FormalExpression",{body:""});r.updateProperties(e,{conditionExpression:t})}))});break;default:Sn(n.sourceRef,"bpmn:Activity")&&n.conditionExpression&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e,{conditionExpression:void 0})}))}),(Sn(n.sourceRef,"bpmn:ExclusiveGateway")||Sn(n.sourceRef,"bpmn:InclusiveGateway")||Sn(n.sourceRef,"bpmn:ComplexGateway")||Sn(n.sourceRef,"bpmn:Activity"))&&n.sourceRef.default===n&&(i={...i,[t.actionName]:a._createEntry(t,e,(function(){r.updateProperties(e.source,{default:void 0})}))})}})),i},by.prototype._createEntry=function(e,t,n){var i=this._translate,r=this._bpmnReplace.replaceElement,o=e.label;return o&&"function"==typeof o&&(o=o(t)),n=n||function(){return r(t,e.target)},{label:i(o),className:e.className,action:n}},by.prototype._getLoopCharacteristicsHeaderEntries=function(e){var t=this,n=this._translate;function i(n,i){if(i.active)return void t._modeling.updateProperties(e,{loopCharacteristics:void 0});const r=e.businessObject.get("loopCharacteristics"),o=t._moddle.create(i.options.loopCharacteristics);r&&t._moddleCopy.copyElement(r,o),o.set("isSequential",i.options.isSequential),t._modeling.updateProperties(e,{loopCharacteristics:o})}var r,o,a,s=kn(e).loopCharacteristics;return s&&(r=s.isSequential,o=void 0===s.isSequential,a=void 0!==s.isSequential&&!s.isSequential),{"toggle-parallel-mi":{className:"bpmn-icon-parallel-mi-marker",title:n("Parallel multi-instance"),active:a,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},"toggle-sequential-mi":{className:"bpmn-icon-sequential-mi-marker",title:n("Sequential multi-instance"),active:r,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},"toggle-loop":{className:"bpmn-icon-loop-marker",title:n("Loop"),active:o,action:i,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}}},by.prototype._getCollectionHeaderEntries=function(e){var t=this,n=this._translate,i=e.businessObject.dataObjectRef;if(!i)return{};var r=i.isCollection;return{"toggle-is-collection":{className:"bpmn-icon-parallel-mi-marker",title:n("Collection"),active:r,action:function(n,r){t._modeling.updateModdleProperties(e,i,{isCollection:!r.active})}}}},by.prototype._getParticipantMultiplicityHeaderEntries=function(e){var t=this,n=this._bpmnFactory,i=this._translate;var r=e.businessObject.participantMultiplicity;return{"toggle-participant-multiplicity":{className:"bpmn-icon-parallel-mi-marker",title:i("Participant multiplicity"),active:!!r,action:function(i,r){var o;r.active||(o=n.create("bpmn:ParticipantMultiplicity")),t._modeling.updateProperties(e,{participantMultiplicity:o})}}}},by.prototype._getAdHocHeaderEntries=function(e){var t=this._translate,n=Sn(kn(e),"bpmn:AdHocSubProcess"),i=this._bpmnReplace.replaceElement;return{"toggle-adhoc":{className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:n,action:function(t,r){return i(e,n?{type:"bpmn:SubProcess"}:{type:"bpmn:AdHocSubProcess"},{autoResize:!1,layoutConnection:!1})}}}},by.prototype._getNonInterruptingHeaderEntries=function(e){const t=this._translate,n=kn(e),i=this,r=Uu(e),o=Sn(e,"bpmn:BoundaryEvent")?vy["intermediate-event-non-interrupting"]:vy["start-event-non-interrupting"],a=!n[r];return{"toggle-non-interrupting":{imageHtml:o,title:t("Toggle non-interrupting"),active:a,action:function(){i._modeling.updateProperties(e,{[r]:!!a})}}}};const xy={__depends__:[dc,Qh,jc],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",by]};function _y(e,t,n,i,r,o,a,s,c,l,p,u,d){e=e||{},i.registerProvider(this),this._contextPad=i,this._modeling=r,this._elementFactory=o,this._connect=a,this._create=s,this._popupMenu=c,this._canvas=l,this._rules=p,this._translate=u,this._eventBus=n,this._appendPreview=d,!1!==e.autoPlace&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,(function(e){var t=e.context.shape;if(Fo(e)&&i.isOpen(t)){var n=i.getEntries(t);n.replace&&n.replace.action.click(e,t)}})),n.on("contextPad.close",(function(){d.cleanUp()}))}function wy(e,t,n){var i=e.$instanceOf(t),r=!1;return N(e.eventDefinitions||[],(function(e){e.$type===n&&(r=!0)})),i&&r}_y.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate","appendPreview"],_y.prototype.getMultiElementContextPadEntries=function(e){var t=this._modeling,n={};return this._isDeleteAllowed(e)&&Q(n,{delete:{group:"edit",className:"bpmn-icon-trash",title:this._translate("Delete"),action:{click:function(e,n){t.removeElements(n.slice())}}}}),n},_y.prototype._isDeleteAllowed=function(e){var t=this._rules.allowed("elements.delete",{elements:e});return C(t)?L(e,(e=>t.includes(e))):t},_y.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,i=this._elementFactory,r=this._connect,o=this._create,a=this._popupMenu,s=this._autoPlace,c=this._translate,l=this._appendPreview,p={};if("label"===e.type)return this._isDeleteAllowed([e])&&Q(p,m()),p;var u=e.businessObject;function d(e,t){r.start(e,t)}function h(e,t){n.removeElements([t])}function m(){return{delete:{group:"edit",className:"bpmn-icon-trash",title:c("Delete"),action:{click:h}}}}function f(e,t,n,r){function a(t,n){var a=i.createShape(Q({type:e},r));o.start(t,a,{source:n})}return{group:"model",className:t,title:n,action:{dragstart:a,click:s?function(t,n){var o=i.createShape(Q({type:e},r));s.append(n,o)}:a,hover:s?function(t,n){return l.create(n,e,r),()=>{l.cleanUp()}}:null}}}function g(e){return function(i,r){n.splitLane(r,e),t.open(r,!0)}}if(Cn(u,["bpmn:Lane","bpmn:Participant"])&&Un(e)){var y=Qp(e);Q(p,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:c("Add lane above"),action:{click:function(e,t){n.addLane(t,"top")}}}}),y.length<2&&((qn(e)?e.height>=120:e.width>=120)&&Q(p,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:c("Divide into two lanes"),action:{click:g(2)}}}),(qn(e)?e.height>=180:e.width>=180)&&Q(p,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:c("Divide into three lanes"),action:{click:g(3)}}})),Q(p,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:c("Add lane below"),action:{click:function(e,t){n.addLane(t,"bottom")}}}})}return Sn(u,"bpmn:FlowNode")&&(Sn(u,"bpmn:EventBasedGateway")?Q(p,{"append.receive-task":f("bpmn:ReceiveTask","bpmn-icon-receive-task",c("Append receive task")),"append.message-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",c("Append message intermediate catch event"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",c("Append timer intermediate catch event"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",c("Append conditional intermediate catch event"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":f("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",c("Append signal intermediate catch event"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):wy(u,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?Q(p,{"append.compensation-activity":f("bpmn:Task","bpmn-icon-task",c("Append compensation activity"),{isForCompensation:!0})}):Sn(u,"bpmn:EndEvent")||u.isForCompensation||wy(u,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||Kn(u)||Q(p,{"append.end-event":f("bpmn:EndEvent","bpmn-icon-end-event-none",c("Append end event")),"append.gateway":f("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",c("Append gateway")),"append.append-task":f("bpmn:Task","bpmn-icon-task",c("Append task")),"append.intermediate-event":f("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",c("Append intermediate/boundary event"))})),a.isEmpty(e,"bpmn-replace")||Q(p,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:c("Change element"),action:{click:function(e,n){var i=Q(function(e){var n=t.getPad(e).html.getBoundingClientRect();return{x:n.left,y:n.bottom+5}}(n),{cursor:{x:e.x,y:e.y}});a.open(n,"bpmn-replace",i,{title:c("Change element"),width:300,search:!0})}}}}),Sn(u,"bpmn:SequenceFlow")&&Q(p,{"append.text-annotation":f("bpmn:TextAnnotation","bpmn-icon-text-annotation",c("Add text annotation"))}),Cn(u,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Q(p,{"append.text-annotation":f("bpmn:TextAnnotation","bpmn-icon-text-annotation",c("Add text annotation")),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:c("Connect to other element"),action:{click:d,dragstart:d}}}),Sn(u,"bpmn:TextAnnotation")&&Q(p,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:c("Connect using association"),action:{click:d,dragstart:d}}}),Cn(u,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Q(p,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:c("Connect using data input association"),action:{click:d,dragstart:d}}}),Sn(u,"bpmn:Group")&&Q(p,{"append.text-annotation":f("bpmn:TextAnnotation","bpmn-icon-text-annotation",c("Add text annotation"))}),this._isDeleteAllowed([e])&&Q(p,m()),p};const Ey={__depends__:[Kg,ty,Ga,Jo,tp,Th,xy],__init__:["contextPadProvider"],contextPadProvider:["type",_y]};var Sy={horizontal:["x","width"],vertical:["y","height"]};function Cy(e,t){this._modeling=e,this._filters=[],this.registerFilter((function(e){var n=t.allowed("elements.distribute",{elements:e});return C(n)?n:n?e:[]}))}Cy.$inject=["modeling","rules"],Cy.prototype.registerFilter=function(e){if("function"!=typeof e)throw new Error("the filter has to be a function");this._filters.push(e)},Cy.prototype.trigger=function(e,t){var n,i,r=this._modeling;if(!(e.length<3||(this._setOrientation(t),i=this._filterElements(e),(n=this._createGroups(i)).length<=2)))return r.distributeElements(n,this._axis,this._dimension),n},Cy.prototype._filterElements=function(e){var t=this._filters,n=this._axis,i=this._dimension,r=[].concat(e);return t.length?(N(t,(function(e){r=e(r,n,i)})),r):e},Cy.prototype._createGroups=function(e){var t=[],n=this,i=this._axis,r=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');return N(W(e,i),(function(e,o){var a,s=n._findRange(e,i,r),c=t[t.length-1];c&&n._hasIntersection(c.range,s)?t[t.length-1].elements.push(e):(a={range:s,elements:[e]},t.push(a))})),t},Cy.prototype._setOrientation=function(e){var t=Sy[e];this._axis=t[0],this._dimension=t[1]},Cy.prototype._hasIntersection=function(e,t){return Math.max(e.min,e.max)>=Math.min(t.min,t.max)&&Math.min(e.min,e.max)<=Math.max(t.min,t.max)},Cy.prototype._findRange=function(e){var t=e[this._axis];return{min:t+5,max:t+e[this._dimension]-5}};const ky={__init__:["distributeElements"],distributeElements:["type",Cy]};function Ay(e){yc.call(this,e)}Ay.$inject=["eventBus"],v(Ay,yc),Ay.prototype.init=function(){this.addRule("elements.distribute",(function(e){var t=e.elements;return!((t=zr(t=B(t,(function(e){var t=Cn(e,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(e.labelTarget||t)})))).length<3)&&t}))};var Py={horizontal:'',vertical:''};function Ry(e,t,n,i){this._distributeElements=t,this._translate=n,this._popupMenu=e,this._rules=i,e.registerProvider("align-elements",900,this)}Ry.$inject=["popupMenu","distributeElements","translate","rules"],Ry.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&Q(t,this._getEntries(e)),t},Ry.prototype._isAllowed=function(e){return this._rules.allowed("elements.distribute",{elements:e})},Ry.prototype._getEntries=function(e){var t=this._distributeElements,n=this._translate,i=this._popupMenu;return{"distribute-elements-horizontal":{group:"distribute",title:n("Distribute elements horizontally"),className:"bjs-align-elements-menu-entry",imageHtml:Py.horizontal,action:function(n,r){t.trigger(e,"horizontal"),i.close()}},"distribute-elements-vertical":{group:"distribute",title:n("Distribute elements vertically"),imageHtml:Py.vertical,action:function(n,r){t.trigger(e,"vertical"),i.close()}}}};const My={__depends__:[dc,ky],__init__:["bpmnDistributeElements","distributeElementsMenuProvider"],bpmnDistributeElements:["type",Ay],distributeElementsMenuProvider:["type",Ry]};var Ty="is not a registered action";function Dy(e,t){this._actions={};var n=this;e.on("diagram.init",(function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})}))}function By(e,t){return new Error(e+" "+t)}Dy.$inject=["eventBus","injector"],Dy.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),i=e.get("selection",!1),r=e.get("zoomScroll",!1),o=e.get("copyPaste",!1),a=e.get("canvas",!1),s=e.get("rules",!1),c=e.get("keyboardMove",!1),l=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",(function(){t.undo()})),this.register("redo",(function(){t.redo()}))),o&&i&&this.register("copy",(function(){var e=i.get();if(e.length)return o.copy(e)})),o&&this.register("paste",(function(){o.paste()})),r&&this.register("stepZoom",(function(e){r.stepZoom(e.value)})),a&&this.register("zoom",(function(e){a.zoom(e.value)})),n&&i&&s&&this.register("removeSelection",(function(){var e=i.get();if(e.length){var t,r=s.allowed("elements.delete",{elements:e});!1!==r&&(t=C(r)?r:e).length&&n.removeElements(t.slice())}})),c&&this.register("moveCanvas",(function(e){c.moveCanvas(e)})),l&&this.register("moveSelection",(function(e){l.moveSelection(e.direction,e.accelerated)}))},Dy.prototype.trigger=function(e,t){if(!this._actions[e])throw By(e,Ty);return this._actions[e](t)},Dy.prototype.register=function(e,t){var n=this;if("string"==typeof e)return this._registerAction(e,t);N(e,(function(e,t){n._registerAction(t,e)}))},Dy.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw By(e,"is already registered");this._actions[e]=t},Dy.prototype.unregister=function(e){if(!this.isRegistered(e))throw By(e,Ty);this._actions[e]=void 0},Dy.prototype.getActions=function(){return Object.keys(this._actions)},Dy.prototype.isRegistered=function(e){return!!this._actions[e]};const Ny={__init__:["editorActions"],editorActions:["type",Dy]};function Oy(e){e.invoke(Dy,this)}v(Oy,Dy),Oy.$inject=["injector"],Oy.prototype._registerDefaultActions=function(e){Dy.prototype._registerDefaultActions.call(this,e);var t=e.get("canvas",!1),n=e.get("elementRegistry",!1),i=e.get("selection",!1),r=e.get("spaceTool",!1),o=e.get("lassoTool",!1),a=e.get("handTool",!1),s=e.get("globalConnect",!1),c=e.get("distributeElements",!1),l=e.get("alignElements",!1),p=e.get("directEditing",!1),u=e.get("searchPad",!1),d=e.get("modeling",!1),h=e.get("contextPad",!1);t&&n&&i&&this._registerAction("selectElements",(function(){var e=t.getRootElement(),r=n.filter((function(t){return t!==e}));return i.select(r),r})),r&&this._registerAction("spaceTool",(function(){r.toggle()})),o&&this._registerAction("lassoTool",(function(){o.toggle()})),a&&this._registerAction("handTool",(function(){a.toggle()})),s&&this._registerAction("globalConnectTool",(function(){s.toggle()})),i&&c&&this._registerAction("distributeElements",(function(e){var t=i.get(),n=e.type;t.length&&c.trigger(t,n)})),i&&l&&this._registerAction("alignElements",(function(e){var t=i.get(),n=[],r=e.type;t.length&&(n=B(t,(function(e){return!Sn(e,"bpmn:Lane")})),l.trigger(n,r))})),i&&d&&this._registerAction("setColor",(function(e){var t=i.get();t.length&&d.setColor(t,e)})),i&&p&&this._registerAction("directEditing",(function(){var e=i.get();e.length&&p.activate(e[0])})),u&&this._registerAction("find",(function(){u.toggle()})),t&&d&&this._registerAction("moveToOrigin",(function(){var e,i,r=t.getRootElement();e=Wr(i=Sn(r,"bpmn:Collaboration")?n.filter((function(e){return Sn(e.parent,"bpmn:Collaboration")})):n.filter((function(e){return e!==r&&!Sn(e.parent,"bpmn:SubProcess")}))),d.moveElements(i,{x:-e.x,y:-e.y},r)})),i&&h&&this._registerAction("replaceElement",(function(e){h.triggerEntry("replace","click",e)}))};const jy={__depends__:[Ny],editorActions:["type",Oy]};function Ly(e){e.on(["create.init","shape.move.init"],(function(e){var t=e.context;Cn(e.shape,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(t.gridSnappingContext||(t.gridSnappingContext={}),t.gridSnappingContext.snapLocation="top-left")}))}Ly.$inject=["eventBus"];function Iy(e,t,n){return n||(n="round"),Math[n](e/t)*t}function $y(e,t,n){var i=!n||!1!==n.active;this._eventBus=t;var r=this;t.on("diagram.init",800,(function(){r.setActive(i)})),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],1200,(function(t){var n=t.originalEvent;if(!(!r.active||n&&oa(n))){var i=t.context,o=i.gridSnappingContext;o||(o=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},o=function(e,t,n){var i=e.context,r=e.shape,o=i.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;if(s&&A(s[t]))return s[t];s||(s=o.snapOffset={});A(s[t])||(s[t]=0);if(!r)return s[t];n.get(r.id)||(zy(t)?s[t]+=r[t]+r.width/2:s[t]+=r[t]+r.height/2);if(!a)return s[t];"x"===t?/left/.test(a)?s[t]-=r.width/2:/right/.test(a)&&(s[t]+=r.width/2):/top/.test(a)?s[t]-=r.height/2:/bottom/.test(a)&&(s[t]+=r.height/2);return s[t]}(t,n,e);o&&(i.offset=o);var a=function(e,t){var n=e.context,i=n.createConstraints,r=n.resizeConstraints||{},o=n.gridSnappingContext,a=o.snapConstraints;if(a&&a[t])return a[t];a||(a=o.snapConstraints={});a[t]||(a[t]={});var s=n.direction;i&&(zy(t)?(a.x.min=i.left,a.x.max=i.right):(a.y.min=i.top,a.y.max=i.bottom));var c=r.min,l=r.max;c&&(zy(t)?Hy(s)?a.x.max=c.left:a.x.min=c.right:Fy(s)?a.y.max=c.top:a.y.min=c.bottom);l&&(zy(t)?Hy(s)?a.x.min=l.left:a.x.max=l.right:Fy(s)?a.y.min=l.top:a.y.max=l.bottom);return a[t]}(t,n);a&&Q(i,a),Vl(t,n)||r.snapEvent(t,n,i)}))}}))}function zy(e){return"x"===e}function Fy(e){return-1!==e.indexOf("n")}function Hy(e){return-1!==e.indexOf("w")}function Vy(e,t){no.call(this,e),this._gridSnapping=t;var n=this;this.preExecute("shape.resize",(function(e){var t=e.context,i=(t.hints||{}).autoResize;if(i){var r=t.shape,o=t.newBounds;R(i)?t.newBounds=n.snapComplex(o,i):t.newBounds=n.snapSimple(r,o)}}))}$y.prototype.snapEvent=function(e,t,n){Gl(e,t,this.snapValue(e[t],n))},$y.prototype.getGridSpacing=function(){return 10},$y.prototype.snapValue=function(e,t){var n,i,r=0;return t&&t.offset&&(r=t.offset),e=Iy(e+=r,10),t&&t.min&&A(n=t.min)&&(n=Iy(n+r,10,"ceil"),e=Math.max(e,n)),t&&t.max&&A(i=t.max)&&(i=Iy(i+r,10,"floor"),e=Math.min(e,i)),e-=r},$y.prototype.isActive=function(){return this.active},$y.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},$y.prototype.toggleActive=function(){this.setActive(!this.active)},$y.$inject=["elementRegistry","eventBus","config.gridSnapping"],Vy.$inject=["eventBus","gridSnapping","modeling"],v(Vy,no),Vy.prototype.snapSimple=function(e,t){var n=this._gridSnapping;return t.width=n.snapValue(t.width,{min:t.width}),t.height=n.snapValue(t.height,{min:t.height}),t.x=e.x+e.width/2-t.width/2,t.y=e.y+e.height/2-t.height/2,t},Vy.prototype.snapComplex=function(e,t){return/w|e/.test(t)&&(e=this.snapHorizontally(e,t)),/n|s/.test(t)&&(e=this.snapVertically(e,t)),e},Vy.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,i=/w/.test(t),r=/e/.test(t),o={};return o.width=n.snapValue(e.width,{min:e.width}),r&&(i?(o.x=n.snapValue(e.x,{max:e.x}),o.width+=n.snapValue(e.x-o.x,{min:e.x-o.x})):e.x=e.x+e.width-o.width),Q(e,o),e},Vy.prototype.snapVertically=function(e,t){var n=this._gridSnapping,i=/n/.test(t),r=/s/.test(t),o={};return o.height=n.snapValue(e.height,{min:e.height}),i&&(r?(o.y=n.snapValue(e.y,{max:e.y}),o.height+=n.snapValue(e.y-o.y,{min:e.y-o.y})):e.y=e.y+e.height-o.height),Q(e,o),e};function Gy(e,t){e.on(["spaceTool.move","spaceTool.end"],2e3,(function(e){var n,i=e.context;i.initialized&&("x"===i.axis?(n=t.snapValue(e.dx),e.x=e.x+n-e.dx,e.dx=n):(n=t.snapValue(e.dy),e.y=e.y+n-e.dy,e.dy=n))}))}Gy.$inject=["eventBus","gridSnapping"];const Wy={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Vy],gridSnappingSpaceToolBehavior:["type",Gy]}],__init__:["gridSnapping"],gridSnapping:["type",$y]};function Uy(e,t){e.on("autoPlace",2e3,(function(e){var n=e.source,i=Dr(n),r=e.shape,o=Bc(n,r);return["x","y"].forEach((function(e){var n={};o[e]!==i[e]&&(o[e]>i[e]?n.min=o[e]:n.max=o[e],Sn(r,"bpmn:TextAnnotation")&&(!function(e){return"x"===e}(e)?n.offset=-r.height/2:n.offset=-r.width/2),o[e]=t.snapValue(o[e],n))})),o}))}Uy.$inject=["eventBus","gridSnapping"];function qy(e,t,n){t.on(["create.start","shape.move.start"],1750,(function(t){var i=t.context,r=i.shape,o=e.getRootElement();Sn(r,"bpmn:Participant")&&Sn(o,"bpmn:Process")&&o.children.length&&(i.createConstraints&&(r.width=n.snapValue(r.width,{min:r.width}),r.height=n.snapValue(r.height,{min:r.height})))}))}qy.$inject=["canvas","eventBus","gridSnapping"];function Ky(e,t,n){no.call(this,e),this._gridSnapping=t;var i=this;this.postExecuted(["connection.create","connection.layout"],3e3,(function(e){var t=e.context,r=t.connection,o=t.hints||{},a=r.waypoints;o.connectionStart||o.connectionEnd||!1===o.createElementsBehavior||function(e){return e.length>3}(a)&&n.updateWaypoints(r,i.snapMiddleSegments(a))}))}function Xy(e,t,n){var i=Wi(t,n),r={};return function(e){return"h"===e}(i)&&(r.y=e.snapValue(t.y)),function(e){return"v"===e}(i)&&(r.x=e.snapValue(t.x)),("x"in r||"y"in r)&&(t=Q({},t,r),n=Q({},n,r)),[t,n]}Ky.$inject=["eventBus","gridSnapping","modeling"],v(Ky,no),Ky.prototype.snapMiddleSegments=function(e){var t,n=this._gridSnapping;e=e.slice();for(var i=1;i5&&je(a,{x:o.x,width:o.width}),o.height>5&&je(a,{y:o.y,height:o.height}),i.canExecute?Ie(a).remove(hv):Ie(a).add(hv)})),e.on("resize.cleanup",(function(e){var n,i;n=e.context,i=n.shape,n.frame&&et(n.frame),t.removeMarker(i,dv)}))}mv.$inject=["eventBus","canvas","previewSupport"];var fv=-6,gv="djs-resizer",yv=["n","w","s","e","nw","ne","se","sw"];function vv(e,t,n,i){this._resize=i,this._canvas=t;var r=this;e.on("selection.changed",(function(e){var t=e.newSelection;r.removeResizers(),1===t.length&&N(t,Z(r.addResizer,r))})),e.on("shape.changed",(function(e){var t=e.element;n.isSelected(t)&&(r.removeResizers(),r.addResizer(t))}))}vv.prototype.makeDraggable=function(e,t,n){var i=this._resize;function r(t){zo(t)&&i.activate(t,e,n)}xe.bind(t,"mousedown",r),xe.bind(t,"touchstart",r)},vv.prototype._createResizer=function(e,t,n,i){var r=this._getResizersParent(),o=function(e){var t={x:0,y:0};-1!==e.indexOf("e")?t.x=6:-1!==e.indexOf("w")&&(t.x=fv);-1!==e.indexOf("s")?t.y=6:-1!==e.indexOf("n")&&(t.y=fv);return t}(i),a=We("g");Ie(a).add(gv),Ie(a).add(gv+"-"+e.id),Ie(a).add(gv+"-"+i),De(r,a);var s=We("rect");je(s,{x:-4+o.x,y:-4+o.y,width:8,height:8}),Ie(s).add(gv+"-visual"),De(a,s);var c=We("rect");return je(c,{x:-10+o.x,y:-10+o.y,width:20,height:20}),Ie(c).add(gv+"-hit"),De(a,c),wi(a,t,n),a},vv.prototype.createResizer=function(e,t){var n=pv(e,t),i=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,i,t)},vv.prototype.addResizer=function(e){var t=this;!Yn(e)&&this._resize.canResize({shape:e})&&N(yv,(function(n){t.createResizer(e,n)}))},vv.prototype.removeResizers=function(){ze(this._getResizersParent())},vv.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},vv.$inject=["eventBus","canvas","selection","resize"];const bv={__depends__:[Jc,Kc,lp],__init__:["resize","resizePreview","resizeHandles"],resize:["type",lv],resizePreview:["type",mv],resizeHandles:["type",vv]};function xv(e,t,n,i,r,o,a){function s(e,t){(t||Cn(e,["bpmn:Task","bpmn:TextAnnotation","bpmn:Participant"])||_v(e))&&i.activate(e)}this._bpmnFactory=t,this._canvas=n,this._modeling=r,this._textRenderer=a,i.registerProvider(this),e.on("element.dblclick",(function(e){s(e.element,!0)})),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open","root.set","selection.changed"],(function(){i.isActive()&&i.complete()})),e.on(["shape.remove","connection.remove"],2e3,(function(e){i.isActive(e.element)&&i.cancel()})),e.on(["commandStack.changed"],(function(e){i.isActive()&&i.cancel()})),e.on("directEditing.activate",(function(e){o.removeResizers()})),e.on("create.end",500,(function(e){var t=e.context,n=t.shape,i=e.context.canExecute;e.isTouch||i&&(t.hints&&!1===t.hints.createElementsBehavior||s(n))})),e.on("autoPlace.end",500,(function(e){s(e.shape)}))}function _v(e){return Sn(e,"bpmn:SubProcess")&&!Un(e)}xv.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],xv.prototype.activate=function(e){var t=oi(e);if(void 0!==t){var n={text:t};Q(n,this.getEditingBBox(e));var i={},r=n.style||{};return Q(r,{backgroundColor:null,border:null}),(Cn(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||_v(e))&&Q(i,{centerVertically:!0}),ei(e)&&(Q(i,{autoResize:!0}),Q(r,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),Sn(e,"bpmn:TextAnnotation")&&(Q(i,{resizable:!0,autoResize:!0}),Q(r,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),Q(n,{options:i,style:r}),n}},xv.prototype.getEditingBBox=function(e){var t=this._canvas,n=e.label||e,i=t.getAbsoluteBBox(n),r=i.x+i.width/2,o=i.y+i.height/2,a={x:i.x,y:i.y},s=t.zoom(),c=this._textRenderer.getDefaultStyle(),l=this._textRenderer.getExternalStyle(),p=l.fontSize*s,u=l.lineHeight,d=c.fontSize*s,h=c.lineHeight,m={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};if(Sn(e,"bpmn:Lane")||function(e){return Sn(e,"bpmn:Participant")&&Un(e)}(e)){var f=qn(e);Q(a,f?{width:i.height,height:30*s,x:i.x-i.height/2+15*s,y:o-30*s/2}:{width:i.width,height:30*s}),Q(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:f?"rotate(-90deg)":null})}if(function(e){return Sn(e,"bpmn:Participant")&&!Un(e)}(e)){var g=qn(e);Q(a,g?{width:i.width,height:i.height}:{width:i.height,height:i.width,x:r-i.height/2,y:o-i.width/2}),Q(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:g?null:"rotate(-90deg)"})}(Cn(e,["bpmn:Task","bpmn:CallActivity"])||_v(e))&&(Q(a,{width:i.width,height:i.height}),Q(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"})),function(e){return Sn(e,"bpmn:SubProcess")&&Un(e)}(e)&&(Q(a,{width:i.width,x:i.x}),Q(m,{fontSize:d+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"}));var y=90*s,v=7*s,b=4*s;if(n.labelTarget&&(Q(a,{width:y,height:i.height+v+b,x:r-y/2,y:i.y-v}),Q(m,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:b+"px"})),ei(n)&&!ti(n)&&!Zn(n)){var x=ii(e),_=t.getAbsoluteBBox({x:x.x,y:x.y,width:0,height:0}),w=p+v+b;Q(a,{width:y,height:w,x:_.x-y/2,y:_.y-w/2}),Q(m,{fontSize:p+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:b+"px"})}return Sn(e,"bpmn:TextAnnotation")&&(Q(a,{width:i.width,height:i.height,minWidth:30*s,minHeight:10*s}),Q(m,{textAlign:"left",paddingTop:5*s+"px",paddingBottom:7*s+"px",paddingLeft:7*s+"px",paddingRight:5*s+"px",fontSize:d+"px",lineHeight:h})),{bounds:a,style:m}},xv.prototype.update=function(e,t,n,i){var r,o,a;Sn(e,"bpmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(e),r={x:e.x,y:e.y,width:e.width/o.width*i.width,height:e.height/o.height*i.height}),(a=t)&&a.trim()||(t=null),this._modeling.updateLabel(e,t,r)};var wv="djs-element-hidden",Ev="djs-label-hidden";function Sv(e,t,n){var i,r,o,a=this,s=t.getDefaultLayer();e.on("directEditing.activate",(function(e){var c=e.active;if(Sn(i=c.element.label||c.element,"bpmn:TextAnnotation")){r=t.getAbsoluteBBox(i),o=We("g");var l=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i.width,containerHeight:i.height,position:{mx:0,my:0}}),p=a.path=We("path");je(p,{d:l,strokeWidth:2,stroke:Cv(i)}),De(o,p),De(s,o),Ei(o,i.x,i.y)}Sn(i,"bpmn:TextAnnotation")||i.labelTarget?t.addMarker(i,wv):(Sn(i,"bpmn:Task")||Sn(i,"bpmn:CallActivity")||Sn(i,"bpmn:SubProcess")||Sn(i,"bpmn:Participant"))&&t.addMarker(i,Ev)})),e.on("directEditing.resize",(function(e){if(Sn(i,"bpmn:TextAnnotation")){var t=e.height,o=e.dy,s=Math.max(i.height/r.height*(t+o),0),c=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:i.width,containerHeight:s,position:{mx:0,my:0}});je(a.path,{d:c})}})),e.on(["directEditing.complete","directEditing.cancel"],(function(e){var n=e.active;n&&(t.removeMarker(n.element.label||n.element,wv),t.removeMarker(i,Ev)),i=void 0,r=void 0,o&&(et(o),o=void 0)}))}function Cv(e,t){return An(e).get("stroke")||t||"black"}Sv.$inject=["eventBus","canvas","pathMap"];const kv={__depends__:[to,bv,ty],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",xv],labelEditingPreview:["type",Sv]};var Av=new qr("tt");function Pv(e,t){e.style.display=!1===t?"none":""}var Rv="djs-tooltip",Mv="."+Rv;function Tv(e,t){var n,i;this._eventBus=e,this._canvas=t,this._ids=Av,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=(n=t.getContainer(),ce(i=Ae(''),{position:"absolute",width:"0",height:"0"}),n.insertBefore(i,n.firstChild),i);var r=this;Ee.bind(this._tooltipRoot,Mv,"mousedown",(function(e){e.stopPropagation()})),Ee.bind(this._tooltipRoot,Mv,"mouseover",(function(e){r.trigger("mouseover",e)})),Ee.bind(this._tooltipRoot,Mv,"mouseout",(function(e){r.trigger("mouseout",e)})),this._init()}Tv.$inject=["eventBus","canvas"],Tv.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=Q({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},Tv.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,i=this.get(le(n,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},Tv.prototype.get=function(e){return"string"!=typeof e&&(e=e.id),this._tooltips[e]},Tv.prototype.clearTimeout=function(e){if(e=this.get(e)){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},Tv.prototype.setTimeout=function(e){if(e=this.get(e)){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout((function(){t.remove(e)}),e.timeout)}},Tv.prototype.remove=function(e){var t=this.get(e);t&&(Te(t.html),Te(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},Tv.prototype.show=function(){Pv(this._tooltipRoot)},Tv.prototype.hide=function(){Pv(this._tooltipRoot,!1)},Tv.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},Tv.prototype._addTooltip=function(e){var t,n=e.id,i=e.html,r=this._tooltipRoot;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),R(i)&&(i=Ae(i)),ce(t=Ae(''),{position:"absolute"}),t.appendChild(i),e.type&&ue(t).add("djs-tooltip-"+e.type),e.className&&ue(t).add(e.className),e.htmlContainer=t,r.appendChild(t),this._tooltips[n]=e,this._updateTooltip(e)},Tv.prototype._updateTooltip=function(e){var t,n,i,r=e.position,o=e.htmlContainer;t=o,n=r.x,i=r.y,ce(t,{left:n+"px",top:i+"px"})},Tv.prototype._updateTooltipVisibilty=function(e){N(this._tooltips,(function(t){var n=t.show,i=t.htmlContainer,r=!0;n&&((n.minZoom>e.scale||n.maxZoom"+r+"
"}))}))}Bv.$inject=["eventBus","tooltips","translate"];const Nv={__depends__:[Dv],__init__:["modelingFeedback"],modelingFeedback:["type",Bv]};var Ov=Math.round;function jv(e,t,n,i,r){function o(e,t,n,i){return r.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function a(e,n,i,r){if(k(i)&&(r=i,i=!1),!n.waypoints&&n.parent&&!Ie(e.target).has("djs-hit-no-move")){var o=function(e){return{x:e.x+Ov(e.width/2),y:e.y+Ov(e.height/2)}}(n);return t.init(e,o,"shape.move",{cursor:"grabbing",autoActivate:i,data:{shape:n,context:r||{}}}),!0}}e.on("shape.move.start",1500,(function(e){var t,n,r=e.context,o=e.shape,a=i.get().slice();-1===a.indexOf(o)&&(a=[o]),n=H(t=a,"id"),Q(r,{shapes:a=B(t,(function(e){for(;e=e.parent;)if(n[e.id])return!1;return!0})),validatedShapes:a,shape:o})})),e.on("shape.move.start",1250,(function(e){var t=e.context,n=t.validatedShapes;if(!(t.canExecute=o(n)))return!1})),e.on("shape.move.move",500,(function(e){var t,n=e.context,i=n.validatedShapes,r=e.hover,a={x:e.dx,y:e.dy};t=o(i,a,{x:e.x,y:e.y},r),n.delta=a,n.canExecute=t,n.target=null!==t?r:null})),e.on("shape.move.end",(function(e){var t=e.context,i=t.delta,r=t.canExecute,o="attach"===r,a=t.shapes;if(!1===r)return!1;i.x=Ov(i.x),i.y=Ov(i.y),0===i.x&&0===i.y||n.moveElements(a,i,t.target,{primaryShape:t.shape,attach:o})})),e.on("element.mousedown",(function(e){if(zo(e)){var t=Oo(e);if(!t)throw new Error("must supply DOM mousedown event");return a(t,e.element)}})),this.start=a}jv.$inject=["eventBus","dragging","modeling","selection","rules"];var Lv="djs-dragging",Iv="drop-ok",$v="drop-not-ok",zv="new-parent",Fv="attach-ok";function Hv(e,t,n,i){function r(e){var t=function(e){var t=B(e,(function(t){return!Yn(t)||T(e,U({id:t.source.id}))&&T(e,U({id:t.target.id}))}));return t}(o(e));return t}function o(e){var t=Gr(e,!0),n=t.flatMap((e=>(e.incoming||[]).concat(e.outgoing||[]))),i=t.concat(n);return[...new Set(i)]}function a(e,n){[Fv,Iv,$v,zv].forEach((function(i){i===n?t.addMarker(e,i):t.removeMarker(e,i)}))}e.on("shape.move.start",499,(function(e){var a=e.context,s=a.shapes,c=a.allDraggedElements,l=r(s);if(!a.dragGroup){var p=We("g");je(p,n.cls("djs-drag-group",["no-events"])),De(t.getActiveLayer(),p),a.dragGroup=p}l.forEach((function(e){i.addDragger(e,a.dragGroup)})),N(c=c?b([c,o(s)]):o(s),(function(e){t.addMarker(e,Lv)})),a.allDraggedElements=c,a.differentParents=1!==z(H(s,(function(e){return e.parent&&e.parent.id}))).length})),e.on("shape.move.move",499,(function(e){var t=e.context,n=t.dragGroup,i=t.target,r=t.shape.parent,o=t.canExecute;i&&("attach"===o?a(i,Fv):t.canExecute&&r&&i.id!==r.id?a(i,zv):a(i,t.canExecute?Iv:$v)),Ei(n,e.dx,e.dy)})),e.on(["shape.move.out","shape.move.cleanup"],(function(e){var t=e.context.target;t&&a(t,null)})),e.on("shape.move.cleanup",(function(e){var n=e.context,i=n.allDraggedElements,r=n.dragGroup;N(i,(function(e){t.removeMarker(e,Lv)})),r&&et(r)})),this.makeDraggable=function(e,n,r){i.addDragger(n,e.dragGroup),r&&t.addMarker(n,Lv),e.allDraggedElements?e.allDraggedElements.push(n):e.allDraggedElements=[n]}}Hv.$inject=["eventBus","canvas","styles","previewSupport"];const Vv={__depends__:[Uo,Jo,Ao,Jc,Kc,lp],__init__:["move","movePreview"],move:["type",jv],movePreview:["type",Hv]};var Gv=".djs-palette-toggle",Wv=".entry",Uv=Gv+", "+Wv,qv="djs-palette-",Kv="open",Xv="two-column";function Yv(e,t){this._eventBus=e,this._canvas=t;var n=this;e.on("tool-manager.update",(function(e){var t=e.tool;n.updateToolHighlight(t)})),e.on("i18n.changed",(function(){n._update()})),e.on("diagram.init",(function(){n._diagramInitialized=!0,n._rebuild()}))}function Zv(e,t){var n=t.getPaletteEntries();return P(n)?n(e):(N(n,(function(t,n){e[n]=t})),e)}Yv.$inject=["eventBus","canvas"],Yv.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("palette.getProviders",e,(function(e){e.providers.push(t)})),this._rebuild()},Yv.prototype.getEntries=function(){return this._getProviders().reduce(Zv,{})},Yv.prototype._rebuild=function(){this._diagramInitialized&&(this._getProviders().length&&(this._container||this._init(),this._update()))},Yv.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),i=this._container=Ae(Yv.HTML_MARKUP);n.appendChild(i),ue(n).add(qv+"shown"),Ee.bind(i,Uv,"click",(function(t){if(Pe(t.delegateTarget,Gv))return e.toggle();e.trigger("click",t)})),xe.bind(i,"mousedown",(function(e){e.stopPropagation()})),Ee.bind(i,Wv,"dragstart",(function(t){e.trigger("dragstart",t)})),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:i})},Yv.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},Yv.prototype._toggleState=function(e){e=e||{};var t,n=this._getParentContainer(),i=this._container,r=this._eventBus,o=ue(i),a=ue(n);t="twoColumn"in e?e.twoColumn:this._needsCollapse(n.clientHeight,this._entries||{}),o.toggle(Xv,t),a.toggle(qv+Xv,t),"open"in e&&(o.toggle(Kv,e.open),a.toggle(qv+Kv,e.open)),r.fire("palette.changed",{twoColumn:t,open:this.isOpen()})},Yv.prototype._update=function(){var e=Re(".djs-palette-entries",this._container),t=this._entries=this.getEntries();he(e),N(t,(function(t,n){var i=t.group||"default",r=Re("[data-group="+ao(i)+"]",e);r||(le(r=Ae(''),"data-group",i),e.appendChild(r));var o,a,s,c=t.html||(t.separator?'
':''),l=Ae(c);if(r.appendChild(l),!t.separator&&(le(l,"data-action",n),t.title&&le(l,"title",t.title),t.className&&(o=l,a=t.className,s=ue(o),(C(a)?a:a.split(/\s+/g)).forEach((function(e){s.add(e)}))),t.imageUrl)){var p=Ae("");le(p,"src",t.imageUrl),l.appendChild(p)}})),this.open()},Yv.prototype.trigger=function(e,t,n){var i,r,o=t.delegateTarget||t.target;return o?(i=le(o,"data-action"),r=t.originalEvent||t,this.triggerEntry(i,e,r,n)):t.preventDefault()},Yv.prototype.triggerEntry=function(e,t,n,i){var r,o;if((r=this._entries[e])&&(o=r.action,!1!==this._eventBus.fire("palette.trigger",{entry:r,event:n}))){if(P(o)){if("click"===t)return o(n,i)}else if(o[t])return o[t](n,i);n.preventDefault()}},Yv.prototype._layoutChanged=function(){this._toggleState({})},Yv.prototype._needsCollapse=function(e,t){return e<46*Object.keys(t).length+50},Yv.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},Yv.prototype.open=function(){this._toggleState({open:!0})},Yv.prototype.toggle=function(){this.isOpen()?this.close():this.open()},Yv.prototype.isActiveTool=function(e){return e&&this._activeTool===e},Yv.prototype.updateToolHighlight=function(e){var t;this._toolsContainer||(t=Re(".djs-palette-entries",this._container),this._toolsContainer=Re("[data-group=tools]",t)),N(this._toolsContainer.children,(function(t){var n=t.getAttribute("data-action");if(n){var i=ue(t);n=n.replace("-tool",""),i.contains("entry")&&n===e?i.add("highlighted-entry"):i.remove("highlighted-entry")}}))},Yv.prototype.isOpen=function(){return ue(this._container).has(Kv)},Yv.prototype._getParentContainer=function(){return this._canvas.getContainer()},Yv.HTML_MARKUP='';const Qv={__init__:["palette"],palette:["type",Yv]};var Jv="crosshair";function eb(e,t,n,i,r,o,a){this._selection=r,this._dragging=n,this._mouse=a;var s=this,c=function(e){var n,i=t.getActiveLayer();je(n=e.frame=We("rect"),{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),De(i,n)},l=function(e){var t=e.frame,n=e.bbox;je(t,{x:n.x,y:n.y,width:n.width,height:n.height})},p=function(e){e.frame&&et(e.frame)};o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",(function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",(function(){s.activateLasso(t.originalEvent,!0)}))})),e.on("lasso.end",0,(function(e){var t=e.context,n=tb(e),r=i.filter((function(e){return e})),o=Ho(e);s.select(r,n,o?t.selection:[])})),e.on("lasso.start",(function(e){var t=e.context;t.bbox=tb(e),c(t),t.selection=r.get()})),e.on("lasso.move",(function(e){var t=e.context;t.bbox=tb(e),l(t)})),e.on("lasso.cleanup",(function(e){var t=e.context;p(t)})),e.on("element.mousedown",1500,(function(e){if(Ho(e))return s.activateLasso(e.originalEvent),!0}))}function tb(e){var t={x:e.x-e.dx,y:e.y-e.dy},n={x:e.x,y:e.y};return t.x<=n.x&&t.y=n.x&&t.yn.x&&t.y<=n.y?{x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:t.x<=n.x&&t.y>n.y||t.x=n.y?{x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:t.x>=n.x&&t.y>n.y||t.x>n.x&&t.y>=n.y?{x:n.x,y:n.y,width:t.x-n.x,height:t.y-n.y}:{x:n.x,y:n.y,width:0,height:0}}eb.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],eb.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:Jv,data:{context:{}}})},eb.prototype.activateSelection=function(e,t){this._dragging.init(e,"lasso.selection",{trapClick:!1,autoActivate:t,cursor:Jv,data:{context:{}},keepSelection:!0})},eb.prototype.select=function(e,t,n=[]){var i=function(e,t){var n={};return N(e,(function(e){var i=e;i.waypoints&&(i=Wr(i)),!A(t.y)&&i.x>t.x&&(n[e.id]=e),!A(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(A(t.width)&&A(t.height)&&i.width+i.xt[i]+r-n&&Gl(e,i,t[i]+r-n)}))}(e,o,function(e){return Sn(e,"bpmn:Task")?vb:yb}(o)),o&&(t=i,I(["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"],(function(e){return Sb(t,e)})))?(n.connectionStart=Hl(r),Cn(o,["bpmn:Event","bpmn:Gateway"])&&Eb(e,Hl(o)),Cn(o,["bpmn:Task","bpmn:SubProcess"])&&function(e,t){var n=Hl(t);xb.forEach((function(i){(function(e,t,n){return e[n]>t[n]+bb&&e[n]r[t]?r[t]+gb:r[t]-gb,Gl(e,t,n))}))}(e)):Sb(i,"bpmn:MessageFlow")?(Sn(r,"bpmn:Event")&&(n.connectionStart=Hl(r)),Sn(o,"bpmn:Event")&&Eb(e,Hl(o))):n.connectionStart=n.initialConnectionStart)}))}function Eb(e,t){Gl(e,"x",t.x),Gl(e,"y",t.y)}function Sb(e,t){return e&&e.type===t}function Cb(e,t){return"x"===e?t.width:t.height}function kb(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function Ab(){this._snapValues={}}wb.$inject=["eventBus"],kb.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},kb.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},kb.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},kb.prototype.getSnapLocations=function(){return this._snapLocations},kb.prototype.setSnapLocations=function(e){this._snapLocations=e},kb.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new Ab).initDefaults(this._defaultSnaps),n},Ab.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),-1===n.x.indexOf(t.x)&&n.x.push(t.x),-1===n.y.indexOf(t.y)&&n.y.push(t.y)},Ab.prototype.snap=function(e,t,n,i){var r=this._snapValues[t];return r&&function(e,t,n){var i,r;for(n=void 0===n?10:n,i=0;i=e.x||i&&i<=e.x)&&Gl(e,"x",e.x),(n&&n>=e.y||r&&r<=e.y)&&Gl(e,"y",e.y)}}function Db(e,t){return-1!==e.indexOf(t)}function Bb(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}v(Mb,Rb),Mb.$inject=["eventBus","injector"],Mb.prototype.initSnap=function(e){var t=Rb.prototype.initSnap.call(this,e),n=e.shape,i=!!this._elementRegistry.get(n.id);return N(n.outgoing,(function(n){var r=n.waypoints[0];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Bb(r,i,e))})),N(n.incoming,(function(n){var r=n.waypoints[n.waypoints.length-1];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Bb(r,i,e))})),Sn(n,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t},Mb.prototype.addSnapTargetPoints=function(e,t,n){Rb.prototype.addSnapTargetPoints.call(this,e,t,n);var i=this.getSnapTargets(t,n);N(i,(function(n){var i;(function(e){if(Sn(e,"bpmn:SubProcess")&&Un(e))return!0;return Sn(e,"bpmn:Participant")}(n)||(i="bpmn:TextAnnotation",[t,n].every((function(e){return Sn(e,i)}))))&&(e.add("top-left",zl(n)),e.add("bottom-right",Fl(n)))}));var r=this._elementRegistry;return N(t.incoming,(function(n){if(r.get(t.id)){Db(i,n.source)||e.add("mid",Dr(n.source));var o=n.waypoints[0];e.add(n.id+"-docking",o.original||o)}})),N(t.outgoing,(function(n){if(r.get(t.id)){Db(i,n.target)||e.add("mid",Dr(n.target));var o=n.waypoints[n.waypoints.length-1];e.add(n.id+"-docking",o.original||o)}})),Sn(n,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,t,n.parent)),e},Mb.prototype.getSnapTargets=function(e,t){return Rb.prototype.getSnapTargets.call(this,e,t).filter((function(e){return!Sn(e,"bpmn:Lane")}))};function Nb(e,t){var n=this;e.on(["resize.start"],(function(e){n.initSnap(e)})),e.on(["resize.move","resize.end"],1250,(function(e){var i=e.context,r=i.shape,o=r.parent,a=i.direction,s=i.snapContext;if(!(e.originalEvent&&oa(e.originalEvent)||Vl(e))){var c=s.pointsForTarget(o);c.initialized||((c=n.addSnapTargetPoints(c,r,o,a)).initialized=!0),function(e){return"n"===e||"s"===e}(a)&&Gl(e,"x",e.x),function(e){return"e"===e||"w"===e}(a)&&Gl(e,"y",e.y),t.snap(e,c)}})),e.on(["resize.cleanup"],(function(){t.hide()}))}function Ob(e,t){var n=Dr(e),i=Rr(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}Nb.prototype.initSnap=function(e){var t=e.context,n=t.shape,i=t.direction,r=t.snapContext;r||(r=t.snapContext=new kb);var o=Ob(n,i);return r.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),r},Nb.prototype.addSnapTargetPoints=function(e,t,n,i){return N(this.getSnapTargets(t,n),(function(t){e.add("corner",Fl(t)),e.add("corner",zl(t))})),e.add("corner",Ob(t,i)),e},Nb.$inject=["eventBus","snapping"],Nb.prototype.getSnapTargets=function(e,t){return Wl(t).filter((function(t){return!(n=t,i=e,n.host===i||Yn(t)||function(e){return!!e.hidden}(t)||Zn(t));var n,i}))};function jb(e){this._canvas=e,this._asyncHide=function(e,t){let n,i,r,o;function a(n){let a=Date.now(),l=n?0:o+t-a;if(l>0)return s(l);e.apply(r,i),c()}function s(e){n=setTimeout(a,e)}function c(){n&&clearTimeout(n),n=o=i=r=void 0}function l(...e){o=Date.now(),i=e,r=this,n||s(t)}return l.flush=function(){n&&a(!0),c()},l.cancel=c,l}(Z(this.hide,this),1e3)}jb.$inject=["canvas"],jb.prototype.snap=function(e,t){var n=e.context.snapContext,i=n.getSnapLocations(),r={x:Vl(e,"x"),y:Vl(e,"y")};N(i,(function(i){var o=n.getSnapOrigin(i),a={x:e.x+o.x,y:e.y+o.y};if(N(["x","y"],(function(e){var n;r[e]||void 0!==(n=t.snap(a,i,e,7))&&(r[e]={value:n,originValue:n-o[e]})})),r.x&&r.y)return!1})),this.showSnapLine("vertical",r.x&&r.x.value),this.showSnapLine("horizontal",r.y&&r.y.value),N(["x","y"],(function(t){var n=r[t];k(n)&&Gl(e,t,n.originValue)}))},jb.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=We("path");return je(n,{d:"M0,0 L0,0"}),Ie(n).add("djs-snap-line"),De(t,n),{update:function(t){A(t)?je(n,"horizontal"===e?{d:"M-100000,"+t+" L+100000,"+t,display:""}:{d:"M "+t+",-100000 L "+t+", +100000",display:""}):je(n,{display:"none"})}}},jb.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},jb.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},jb.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},jb.prototype.hide=function(){N(this._snapLines,(function(e){e.update()}))};const Lb={__depends__:[{__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",Rb],resizeSnapping:["type",Nb],snapping:["type",jb]}],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",wb],createMoveSnapping:["type",Mb]};function Ib(e,t,n,i,r){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=t,this._overlays=n,this._selection=i,this._translate=r,this._container=this._getBoxHtml(),this._searchInput=Re(Ib.INPUT_SELECTOR,this._container),this._resultsContainer=Re(Ib.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy"],this.close,this)}function $b(e,t,n){var i=function(e){var t="";return e.forEach((function(e){e.matched?t+=''+co(e.matched)+"":t+=co(e.normal)})),""!==t?t:null}(t),r=Ae(n);r.innerHTML=i,e.appendChild(r)}Ib.$inject=["canvas","eventBus","overlays","selection","translate"],Ib.prototype._bindEvents=function(){var e=this;function t(t,n,i,r){e._eventMaps.push({el:t,type:i,listener:Ee.bind(t,n,i,r)})}t(document,"html","click",(function(t){e.close()})),t(this._container,Ib.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,Ib.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,Ib.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,Ib.INPUT_SELECTOR,"keydown",(function(e){aa("ArrowUp",e)&&e.preventDefault(),aa("ArrowDown",e)&&e.preventDefault()})),t(this._container,Ib.INPUT_SELECTOR,"keyup",(function(t){if(aa("Escape",t))return e.close();if(aa("Enter",t)){var n=e._getCurrentResult();return n?e._select(n):e.close()}return aa("ArrowUp",t)?e._scrollToDirection(!0):aa("ArrowDown",t)?e._scrollToDirection():void(aa(["ArrowLeft","ArrowRight"],t)||e._search(t.delegateTarget.value))}))},Ib.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){Ee.unbind(e.el,e.type,e.listener)}))},Ib.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if(n.length){n.forEach((function(e){var n=e.element.id,i=t._createResultNode(e,n);t._results[n]={element:e.element,node:i}}));var i=Re(Ib.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}}},Ib.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},Ib.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var t=e.offsetTop,n=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+e.clientHeight;t0&&$b(n,e.primaryTokens,Ib.RESULT_PRIMARY_HTML),$b(n,e.secondaryTokens,Ib.RESULT_SECONDARY_HTML),le(n,Ib.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},Ib.prototype.registerProvider=function(e){this._searchProvider=e},Ib.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,ue(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},Ib.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,ue(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))},Ib.prototype.toggle=function(){this.isOpen()?this.close():this.open()},Ib.prototype.isOpen=function(){return this._open},Ib.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&ue(t).remove(Ib.RESULT_SELECTED_CLASS);var n=le(e,Ib.RESULT_ID_ATTRIBUTE),i=this._results[n].element;ue(e).add(Ib.RESULT_SELECTED_CLASS),this._resetOverlay(i),this._canvas.scrollToElement(i,{top:400}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},Ib.prototype._select=function(e){var t=le(e,Ib.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this.close(),this._resetOverlay(),this._canvas.scrollToElement(n,{top:400}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},Ib.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=function(e){var t=6,n=e.width+2*t,i=e.height+2*t,r={width:n+"px",height:i+"px"},o=Ae('');return ce(o,r),{position:{bottom:i-t,right:n-t},show:!0,html:o}}(Wr(e));this._overlayId=this._overlays.add(e,t)}},Ib.prototype._getBoxHtml=function(){const e=Ae(Ib.BOX_HTML),t=Re(Ib.INPUT_SELECTOR,e);return t&&t.setAttribute("aria-label",this._translate("Search in diagram")),e},Ib.CONTAINER_SELECTOR=".djs-search-container",Ib.INPUT_SELECTOR=".djs-search-input input",Ib.RESULTS_CONTAINER_SELECTOR=".djs-search-results",Ib.RESULT_SELECTOR=".djs-search-result",Ib.RESULT_SELECTED_CLASS="djs-search-result-selected",Ib.RESULT_SELECTED_SELECTOR="."+Ib.RESULT_SELECTED_CLASS,Ib.RESULT_ID_ATTRIBUTE="data-result-id",Ib.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",Ib.OVERLAY_CLASS="djs-search-overlay",Ib.BOX_HTML='',Ib.RESULT_HTML='',Ib.RESULT_PRIMARY_HTML='',Ib.RESULT_SECONDARY_HTML='';const zb={__depends__:[Fi,Jr,Jo],searchPad:["type",Ib]};function Fb(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function Hb(e){return B(e,(function(e){return!!e.matched})).length>0}function Vb(e,t){var n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();var r=e.indexOf(t);return r>-1?(0!==r&&n.push({normal:i.substr(0,r)}),n.push({matched:i.substr(r,t.length)}),t.length+r')},Wb.prototype._interactionModules=[ga,Ca,Ta],Wb.prototype._modelingModules=[bc,jc,Zc,Fc,Xl,tp,ip,Ey,Vh,Th,My,jy,Yy,Qy,ev,cv,kv,Wg,Nv,Vv,hb,fb,bv,Lb,Gb],Wb.prototype._modules=[].concat(ea.prototype._modules,Wb.prototype._interactionModules,Wb.prototype._modelingModules);const Ub={name:"Camunda",uri:"http://camunda.org/schema/1.0/bpmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:[{name:"Definitions",isAbstract:!0,extends:["bpmn:Definitions"],properties:[{name:"diagramRelationId",isAttr:!0,type:"String"}]},{name:"InOutBinding",superClass:["Element"],isAbstract:!0,properties:[{name:"source",isAttr:!0,type:"String"},{name:"sourceExpression",isAttr:!0,type:"String"},{name:"target",isAttr:!0,type:"String"},{name:"businessKey",isAttr:!0,type:"String"},{name:"local",isAttr:!0,type:"Boolean",default:!1},{name:"variables",isAttr:!0,type:"String"}]},{name:"In",superClass:["InOutBinding"],meta:{allowedIn:["bpmn:CallActivity","bpmn:SignalEventDefinition"]}},{name:"Out",superClass:["InOutBinding"],meta:{allowedIn:["bpmn:CallActivity"]}},{name:"AsyncCapable",isAbstract:!0,extends:["bpmn:Activity","bpmn:Gateway","bpmn:Event"],properties:[{name:"async",isAttr:!0,type:"Boolean",default:!1},{name:"asyncBefore",isAttr:!0,type:"Boolean",default:!1},{name:"asyncAfter",isAttr:!0,type:"Boolean",default:!1},{name:"exclusive",isAttr:!0,type:"Boolean",default:!0}]},{name:"JobPriorized",isAbstract:!0,extends:["bpmn:Process","camunda:AsyncCapable"],properties:[{name:"jobPriority",isAttr:!0,type:"String"}]},{name:"SignalEventDefinitionExtension",isAbstract:!0,extends:["bpmn:SignalEventDefinition"],properties:[{name:"async",isAttr:!0,type:"Boolean",default:!1}]},{name:"ErrorEventDefinitionExtension",isAbstract:!0,extends:["bpmn:ErrorEventDefinition"],properties:[{name:"errorCodeVariable",isAttr:!0,type:"String"},{name:"errorMessageVariable",isAttr:!0,type:"String"}]},{name:"ErrorEventDefinition",superClass:["bpmn:ErrorEventDefinition","Element"],properties:[{name:"expression",isAttr:!0,type:"String"}],meta:{allowedIn:["bpmn:ServiceTask"]}},{name:"Error",isAbstract:!0,extends:["bpmn:Error"],properties:[{name:"camunda:errorMessage",isAttr:!0,type:"String"}]},{name:"PotentialStarter",superClass:["Element"],properties:[{name:"resourceAssignmentExpression",type:"bpmn:ResourceAssignmentExpression"}]},{name:"FormSupported",isAbstract:!0,extends:["bpmn:StartEvent","bpmn:UserTask"],properties:[{name:"formHandlerClass",isAttr:!0,type:"String"},{name:"formKey",isAttr:!0,type:"String"},{name:"formRef",isAttr:!0,type:"String"},{name:"formRefBinding",isAttr:!0,type:"String"},{name:"formRefVersion",isAttr:!0,type:"String"}]},{name:"TemplateSupported",isAbstract:!0,extends:["bpmn:Collaboration","bpmn:Process","bpmn:FlowElement"],properties:[{name:"modelerTemplate",isAttr:!0,type:"String"},{name:"modelerTemplateVersion",isAttr:!0,type:"Integer"}]},{name:"Initiator",isAbstract:!0,extends:["bpmn:StartEvent"],properties:[{name:"initiator",isAttr:!0,type:"String"}]},{name:"ScriptTask",isAbstract:!0,extends:["bpmn:ScriptTask"],properties:[{name:"resultVariable",isAttr:!0,type:"String"},{name:"resource",isAttr:!0,type:"String"}]},{name:"Process",isAbstract:!0,extends:["bpmn:Process"],properties:[{name:"candidateStarterGroups",isAttr:!0,type:"String"},{name:"candidateStarterUsers",isAttr:!0,type:"String"},{name:"versionTag",isAttr:!0,type:"String"},{name:"historyTimeToLive",isAttr:!0,type:"String"},{name:"isStartableInTasklist",isAttr:!0,type:"Boolean",default:!0}]},{name:"EscalationEventDefinitionExtension",isAbstract:!0,extends:["bpmn:EscalationEventDefinition"],properties:[{name:"escalationCodeVariable",isAttr:!0,type:"String"}]},{name:"FormalExpression",isAbstract:!0,extends:["bpmn:FormalExpression"],properties:[{name:"resource",isAttr:!0,type:"String"}]},{name:"Assignable",extends:["bpmn:UserTask"],properties:[{name:"assignee",isAttr:!0,type:"String"},{name:"candidateUsers",isAttr:!0,type:"String"},{name:"candidateGroups",isAttr:!0,type:"String"},{name:"dueDate",isAttr:!0,type:"String"},{name:"followUpDate",isAttr:!0,type:"String"},{name:"priority",isAttr:!0,type:"String"}]},{name:"CallActivity",extends:["bpmn:CallActivity"],properties:[{name:"calledElementBinding",isAttr:!0,type:"String",default:"latest"},{name:"calledElementVersion",isAttr:!0,type:"String"},{name:"calledElementVersionTag",isAttr:!0,type:"String"},{name:"calledElementTenantId",isAttr:!0,type:"String"},{name:"caseRef",isAttr:!0,type:"String"},{name:"caseBinding",isAttr:!0,type:"String",default:"latest"},{name:"caseVersion",isAttr:!0,type:"String"},{name:"caseTenantId",isAttr:!0,type:"String"},{name:"variableMappingClass",isAttr:!0,type:"String"},{name:"variableMappingDelegateExpression",isAttr:!0,type:"String"}]},{name:"ServiceTaskLike",extends:["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"resultVariable",isAttr:!0,type:"String"}]},{name:"DmnCapable",extends:["bpmn:BusinessRuleTask"],properties:[{name:"decisionRef",isAttr:!0,type:"String"},{name:"decisionRefBinding",isAttr:!0,type:"String",default:"latest"},{name:"decisionRefVersion",isAttr:!0,type:"String"},{name:"mapDecisionResult",isAttr:!0,type:"String",default:"resultList"},{name:"decisionRefTenantId",isAttr:!0,type:"String"}]},{name:"ExternalCapable",extends:["camunda:ServiceTaskLike"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"topic",isAttr:!0,type:"String"}]},{name:"TaskPriorized",extends:["bpmn:Process","camunda:ExternalCapable"],properties:[{name:"taskPriority",isAttr:!0,type:"String"}]},{name:"Properties",superClass:["Element"],meta:{allowedIn:["*"]},properties:[{name:"values",type:"Property",isMany:!0}]},{name:"Property",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"name",type:"String",isAttr:!0},{name:"value",type:"String",isAttr:!0}]},{name:"Connector",superClass:["Element"],meta:{allowedIn:["camunda:ServiceTaskLike"]},properties:[{name:"inputOutput",type:"InputOutput"},{name:"connectorId",type:"String"}]},{name:"InputOutput",superClass:["Element"],meta:{allowedIn:["bpmn:FlowNode","camunda:Connector"]},properties:[{name:"inputOutput",type:"InputOutput"},{name:"connectorId",type:"String"},{name:"inputParameters",isMany:!0,type:"InputParameter"},{name:"outputParameters",isMany:!0,type:"OutputParameter"}]},{name:"InputOutputParameter",properties:[{name:"name",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"},{name:"definition",type:"InputOutputParameterDefinition"}]},{name:"InputOutputParameterDefinition",isAbstract:!0},{name:"List",superClass:["InputOutputParameterDefinition"],properties:[{name:"items",isMany:!0,type:"InputOutputParameterDefinition"}]},{name:"Map",superClass:["InputOutputParameterDefinition"],properties:[{name:"entries",isMany:!0,type:"Entry"}]},{name:"Entry",properties:[{name:"key",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"},{name:"definition",type:"InputOutputParameterDefinition"}]},{name:"Value",superClass:["InputOutputParameterDefinition"],properties:[{name:"id",isAttr:!0,type:"String"},{name:"name",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"}]},{name:"Script",superClass:["InputOutputParameterDefinition"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"resource",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"}]},{name:"Field",superClass:["Element"],meta:{allowedIn:["camunda:ServiceTaskLike","camunda:ExecutionListener","camunda:TaskListener"]},properties:[{name:"name",isAttr:!0,type:"String"},{name:"expression",type:"String"},{name:"stringValue",isAttr:!0,type:"String"},{name:"string",type:"String"}]},{name:"InputParameter",superClass:["InputOutputParameter"]},{name:"OutputParameter",superClass:["InputOutputParameter"]},{name:"Collectable",isAbstract:!0,extends:["bpmn:MultiInstanceLoopCharacteristics"],superClass:["camunda:AsyncCapable"],properties:[{name:"collection",isAttr:!0,type:"String"},{name:"elementVariable",isAttr:!0,type:"String"}]},{name:"FailedJobRetryTimeCycle",superClass:["Element"],meta:{allowedIn:["camunda:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},properties:[{name:"body",isBody:!0,type:"String"}]},{name:"ExecutionListener",superClass:["Element"],meta:{allowedIn:["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"event",isAttr:!0,type:"String"},{name:"script",type:"Script"},{name:"fields",type:"Field",isMany:!0}]},{name:"TaskListener",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"event",isAttr:!0,type:"String"},{name:"script",type:"Script"},{name:"fields",type:"Field",isMany:!0},{name:"id",type:"String",isAttr:!0},{name:"eventDefinitions",type:"bpmn:TimerEventDefinition",isMany:!0}]},{name:"FormProperty",superClass:["Element"],meta:{allowedIn:["bpmn:StartEvent","bpmn:UserTask"]},properties:[{name:"id",type:"String",isAttr:!0},{name:"name",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0},{name:"required",type:"String",isAttr:!0},{name:"readable",type:"String",isAttr:!0},{name:"writable",type:"String",isAttr:!0},{name:"variable",type:"String",isAttr:!0},{name:"expression",type:"String",isAttr:!0},{name:"datePattern",type:"String",isAttr:!0},{name:"default",type:"String",isAttr:!0},{name:"values",type:"Value",isMany:!0}]},{name:"FormData",superClass:["Element"],meta:{allowedIn:["bpmn:StartEvent","bpmn:UserTask"]},properties:[{name:"fields",type:"FormField",isMany:!0},{name:"businessKey",type:"String",isAttr:!0}]},{name:"FormField",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"label",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0},{name:"datePattern",type:"String",isAttr:!0},{name:"defaultValue",type:"String",isAttr:!0},{name:"properties",type:"Properties"},{name:"validation",type:"Validation"},{name:"values",type:"Value",isMany:!0}]},{name:"Validation",superClass:["Element"],properties:[{name:"constraints",type:"Constraint",isMany:!0}]},{name:"Constraint",superClass:["Element"],properties:[{name:"name",type:"String",isAttr:!0},{name:"config",type:"String",isAttr:!0}]},{name:"ConditionalEventDefinitionExtension",isAbstract:!0,extends:["bpmn:ConditionalEventDefinition"],properties:[{name:"variableName",isAttr:!0,type:"String"},{name:"variableEvents",isAttr:!0,type:"String"}]}],emumerations:[]};function qb(e,t,i="camunda"){let r={};const c=n.ref(1);n.ref(!1);const{createBpmnModeler:l}=function(e,t,n="camunda"){const i=()=>{const e=[],t={translate:["value",y]};return e.push(t),e.push(s),e.push(a.BpmnPropertiesPanelModule),e.push(a.BpmnPropertiesProviderModule),e.push(a.CamundaPlatformPropertiesProviderModule),e},r=()=>{const e={};return"camunda"===n&&(e.camunda=Ub),e};return{createBpmnModeler:()=>new Wb({container:e,propertiesPanel:{parent:t},keyboard:{bindTo:document},additionalModules:i(),moddleExtensions:r()})}}(e,t,i),p=e=>r.get(e),u=()=>p("canvas"),d=()=>p("commandStack"),g=async e=>{try{const t=await r.importXML(e),{warnings:n}=t}catch(t){h("Could not create BPMN 2.0 diagram!",t)}},v=()=>{const e=p("eventBus");["diagram.init","element.hover","element.out","element.click","element.dblclick","element.mousedown","element.mouseup"].forEach((t=>{e.on(t,(e=>{t.replace(/\./g,"-"),e&&e.element}))}))},b=async(e,t="diagram")=>{try{if("xml"===e||"bpmn"===e){const{xml:n}=await r.saveXML(),{href:i,filename:o}=f(e,t,n);m(i,o)}else{const{svg:e}=await r.saveSVG(),{href:n,filename:i}=f("svg",t,e);m(n,i)}}catch(n){h("Could not download diagram!",n)}},x=e=>{const t=p("alignElements"),n=p("selection").get();!n||n.length<=1?o.toast.warning("请按住 Ctrl 键选择多个元素对齐"):o.standardDeleteNotify((()=>{t.trigger(n,e)}))};return{init:e=>{r=l(),v(),g(e)},destroy:()=>{o.lodash.isEmpty(r)||(r.destroy(),r={})},importDiagram:g,downloadAsXml:(e="diagram")=>{b("xml",e)},downloadAsBpmn:(e="diagram")=>{b("bpmn",e)},downloadAsSvg:(e="diagram")=>{b("svg",e)},undo:()=>d().undo(),redo:()=>d().redo(),zoom:c,zoomMinus:(e=.1)=>{const t=Math.floor(100*c.value-100*e)/100;c.value=t,u().zoom(c.value)},zoomPlus:(e=.1)=>{const t=Math.floor(100*c.value+100*e)/100;c.value=t,u().zoom(c.value)},zoomReset:()=>{c.value=1,u().zoom("fit-viewport","auto")},alignLeft:()=>{x("left")},alignRight:()=>{x("right")},alignTop:()=>{x("top")},alignBottom:()=>{x("bottom")},alignHorizontalCenter:()=>{x("center")},alignVerticalCenter:()=>{x("middle")},playSimulation:()=>{p("toggleMode").toggleMode()}}}function Kb(e,t,n){let i={};return{init:r=>{i=new ea({container:e,height:t}),(async e=>{await i.importXML(e);const t=i.get("canvas");t.zoom("fit-viewport","auto"),o.lodash.isEmpty(n)||n.forEach((e=>{var n;t.addMarker(e,"highlight");const i=null==(n=document.querySelector(".highlight"))?void 0:n.querySelector(".djs-visual rect");i&&i.setAttribute("stroke-dasharray","4,4")}))})(r)},destroy:()=>{o.lodash.isEmpty(i)||(i.destroy(),i={})}}}const Xb=p(n.defineComponent({name:"HBpmnDesigner",props:{diagram:{type:String,default:""},type:{type:String,default:"camunda"},service:{type:Object,required:!0},height:{type:String,default:"90vh"}},setup(e){const t=n.ref(""),{init:i,destroy:r,importDiagram:a,downloadAsXml:s,downloadAsBpmn:c,downloadAsSvg:l,undo:p,redo:u,zoom:h,zoomPlus:m,zoomMinus:f,zoomReset:g,alignLeft:y,alignRight:v,alignTop:b,alignBottom:x,alignHorizontalCenter:_,alignVerticalCenter:w,playSimulation:E}=qb("#bpmn-canvas","#bpmn-properties-panel",e.type);n.onBeforeUnmount((()=>{r()})),n.onMounted((()=>{try{i(d)}catch(e){}})),n.watch(t,(e=>{a(e)}));return{openedDiagram:t,onReset:()=>{a(d)},importDiagram:a,downloadAsXml:s,downloadAsBpmn:c,downloadAsSvg:l,undo:p,redo:u,zoom:h,zoomPlus:m,zoomMinus:f,zoomReset:g,alignLeft:y,alignRight:v,alignTop:b,alignBottom:x,alignHorizontalCenter:_,alignVerticalCenter:w,playSimulation:E,onSave:t=>{e.service.create(t).then((e=>{o.toast.success("模型部署成功!")})).catch((e=>{o.toast.error("模型部署失败!")}))}}}}),[["render",function(e,i,r,o,a,s){const c=u,l=n.resolveComponent("h-column"),p=n.resolveComponent("h-row"),d=t.QCard;return n.openBlock(),n.createBlock(d,null,{default:n.withCtx((()=>[n.createVNode(p,{style:n.normalizeStyle(`height: ${e.height}`)},{default:n.withCtx((()=>[n.createVNode(l,{cols:10},{default:n.withCtx((()=>[n.createVNode(c,{file:e.openedDiagram,"onUpdate:file":i[0]||(i[0]=t=>e.openedDiagram=t),zoom:e.zoom,onDownloadXml:i[1]||(i[1]=t=>e.downloadAsXml()),onDownloadSvg:i[2]||(i[2]=t=>e.downloadAsSvg()),onDownloadBpmn:i[3]||(i[3]=t=>e.downloadAsBpmn()),onAlignRight:i[4]||(i[4]=t=>e.alignRight()),onAlignLeft:i[5]||(i[5]=t=>e.alignLeft()),onAlignTop:i[6]||(i[6]=t=>e.alignTop()),onAlignBottom:i[7]||(i[7]=t=>e.alignBottom()),onAlignHorizontalCenter:i[8]||(i[8]=t=>e.alignHorizontalCenter()),onAlignVerticalCenter:i[9]||(i[9]=t=>e.alignVerticalCenter()),onZoomPlus:i[10]||(i[10]=t=>e.zoomPlus()),onZoomMinus:i[11]||(i[11]=t=>e.zoomMinus()),onZoomReset:i[12]||(i[12]=t=>e.zoomReset()),onRedo:i[13]||(i[13]=t=>e.redo()),onUndo:i[14]||(i[14]=t=>e.undo()),onRefresh:i[15]||(i[15]=t=>e.onReset()),onSimulation:i[16]||(i[16]=t=>e.playSimulation()),onSave:e.onSave},null,8,["file","zoom","onSave"]),i[17]||(i[17]=n.createElementVNode("div",{class:"bpmn-container full-height"},[n.createElementVNode("div",{id:"bpmn-canvas",class:"bpmn-canvas"})],-1))])),_:1}),n.createVNode(l,{cols:2},{default:n.withCtx((()=>i[18]||(i[18]=[n.createElementVNode("div",{id:"bpmn-properties-panel",class:"full-height"},null,-1)]))),_:1})])),_:1},8,["style"])])),_:1})}]]),Yb=n.defineComponent({name:"HBpmnViewer",props:{diagram:{type:String,default:""},nodes:{type:Array,default:()=>[]},height:{type:[String,Number],default:"500px"}},setup(e){const{init:t,destroy:i}=Kb("#bpmn-viewer",e.height,e.nodes);return n.onBeforeUnmount((()=>{i()})),n.onMounted((()=>{try{t(e.diagram)}catch(n){}})),{}}}),Zb={id:"bpmn-viewer",class:"bpmn-viewer-canvas"};const Qb=p(Yb,[["render",function(e,t,i,r,o,a){return n.openBlock(),n.createElementBlock("div",Zb)}]]);Xb.install=e=>{e.component(Xb.name,Xb)},Qb.install=e=>{e.component(Qb.name,Qb)};const Jb=[Xb,Qb],ex={install:e=>{Jb.map((t=>e.component(t.name,t)))}};Object.defineProperty(e,"DeploymentService",{enumerable:!0,get:()=>r.DeploymentService}),Object.defineProperty(e,"Swal",{enumerable:!0,get:()=>o.Swal}),Object.defineProperty(e,"lodash",{enumerable:!0,get:()=>o.lodash}),Object.defineProperty(e,"standardDeleteNotify",{enumerable:!0,get:()=>o.standardDeleteNotify}),Object.defineProperty(e,"toast",{enumerable:!0,get:()=>o.toast}),e.Translator=y,e.default=ex,e.download=m,e.downloadEncode=f,e.error=(e,...t)=>{},e.exception=h,e.log=(e,...t)=>{},Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
diff --git a/shared/components/dist/HBackground/HSignInBackground.vue.d.ts b/shared/components/dist/HBackground/HSignInBackground.vue.d.ts
index 790fd523..e3e33c0c 100644
--- a/shared/components/dist/HBackground/HSignInBackground.vue.d.ts
+++ b/shared/components/dist/HBackground/HSignInBackground.vue.d.ts
@@ -1,4 +1,4 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {}, {}>;
+}>> & Readonly<{}>, {}, {}, {
+ HSignInCornerBottom: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly> & Readonly<{}>, {
+ startColor: string;
+ endColor: string;
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
+ HSignInCornerTop: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly> & Readonly<{}>, {
+ startColor: string;
+ endColor: string;
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
+}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HBackground/HSignInCornerBottom.vue.d.ts b/shared/components/dist/HBackground/HSignInCornerBottom.vue.d.ts
index ae461d32..ba4d4e7b 100644
--- a/shared/components/dist/HBackground/HSignInCornerBottom.vue.d.ts
+++ b/shared/components/dist/HBackground/HSignInCornerBottom.vue.d.ts
@@ -1,4 +1,4 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {
+}>> & Readonly<{}>, {
startColor: string;
endColor: string;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HBackground/HSignInCornerTop.vue.d.ts b/shared/components/dist/HBackground/HSignInCornerTop.vue.d.ts
index ae461d32..ba4d4e7b 100644
--- a/shared/components/dist/HBackground/HSignInCornerTop.vue.d.ts
+++ b/shared/components/dist/HBackground/HSignInCornerTop.vue.d.ts
@@ -1,4 +1,4 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {
+}>> & Readonly<{}>, {
startColor: string;
endColor: string;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HButton/HButton.vue.d.ts b/shared/components/dist/HButton/HButton.vue.d.ts
index a8c7195d..319f75b3 100644
--- a/shared/components/dist/HButton/HButton.vue.d.ts
+++ b/shared/components/dist/HButton/HButton.vue.d.ts
@@ -1,14 +1,14 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {
+}>> & Readonly<{}>, {
tooltip: string;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HButton/HIconButton.vue.d.ts b/shared/components/dist/HButton/HIconButton.vue.d.ts
index b747282b..4f7ed736 100644
--- a/shared/components/dist/HButton/HIconButton.vue.d.ts
+++ b/shared/components/dist/HButton/HIconButton.vue.d.ts
@@ -1,4 +1,4 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {
+}>> & Readonly<{}>, {
size: string;
color: string;
dense: boolean;
-}, {}>;
+}, {}, {
+ HButton: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly> & Readonly<{}>, {
+ tooltip: string;
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
+}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HButton/HVisibilityButton.vue.d.ts b/shared/components/dist/HButton/HVisibilityButton.vue.d.ts
index fb618560..b2216ed2 100644
--- a/shared/components/dist/HButton/HVisibilityButton.vue.d.ts
+++ b/shared/components/dist/HButton/HVisibilityButton.vue.d.ts
@@ -1,16 +1,16 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly, {
+ isShowPassword: globalThis.WritableComputedRef;
+}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly> & {
+}>> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
-}, {
+}>, {
modelValue: boolean;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HCard/HChartCard.vue.d.ts b/shared/components/dist/HCard/HChartCard.vue.d.ts
index 78bda92b..bf86198c 100644
--- a/shared/components/dist/HCard/HChartCard.vue.d.ts
+++ b/shared/components/dist/HCard/HChartCard.vue.d.ts
@@ -1,4 +1,4 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {
+}>> & Readonly<{}>, {
subtitle: string;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HDialog/HDialog.vue.d.ts b/shared/components/dist/HDialog/HDialog.vue.d.ts
index 81cb6181..d54b9e15 100644
--- a/shared/components/dist/HDialog/HDialog.vue.d.ts
+++ b/shared/components/dist/HDialog/HDialog.vue.d.ts
@@ -1,4 +1,4 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
- showLoading: globalThis.WritableComputedRef;
+}>, {
+ showDialog: globalThis.WritableComputedRef;
+ showLoading: globalThis.WritableComputedRef;
onClose: () => void;
onCancel: () => void;
onConfirm: () => void;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("update:modelValue" | "update:loading" | "confirm" | "cancel" | "close")[], "update:modelValue" | "update:loading" | "confirm" | "cancel" | "close", import('vue').PublicProps, Readonly> & {
+}>> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
"onUpdate:loading"?: ((...args: any[]) => any) | undefined;
onConfirm?: ((...args: any[]) => any) | undefined;
onCancel?: ((...args: any[]) => any) | undefined;
onClose?: ((...args: any[]) => any) | undefined;
-}, {
+}>, {
loading: boolean;
title: string;
height: string;
@@ -86,5 +86,5 @@ declare const _default: import('vue').DefineComponent<{
hideConfirm: boolean;
hideCancel: boolean;
hideClose: boolean;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HDivider/HDivider.vue.d.ts b/shared/components/dist/HDivider/HDivider.vue.d.ts
index 6806f235..b850632e 100644
--- a/shared/components/dist/HDivider/HDivider.vue.d.ts
+++ b/shared/components/dist/HDivider/HDivider.vue.d.ts
@@ -1,5 +1,5 @@
import { PropType } from 'vue';
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
default: string;
@@ -13,9 +13,9 @@ declare const _default: import('vue').DefineComponent<{
default: number;
};
label: StringConstructor;
-}, {
+}>, {
textWeight: globalThis.ComputedRef;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly;
default: string;
@@ -29,9 +29,240 @@ declare const _default: import('vue').DefineComponent<{
default: number;
};
label: StringConstructor;
-}>>, {
+}>> & Readonly<{}>, {
offset: number;
- wider: "center" | "start" | "end";
+ wider: "start" | "center" | "end";
weight: "bold" | "thin" | "light" | "regular" | "medium" | "bolder";
-}, {}>;
+}, {}, {
+ HContainer: import('vue').DefineComponent;
+ default: string;
+ };
+ wider: {
+ type: PropType<"default" | "start" | "center" | "end">;
+ default: string;
+ };
+ offset: {
+ type: NumberConstructor;
+ default: number;
+ };
+ }>, {
+ isTwoColumn: () => boolean;
+ isToTheLeft: globalThis.ComputedRef;
+ isToTheRight: globalThis.ComputedRef;
+ leftCols: globalThis.Ref;
+ centerCols: globalThis.Ref;
+ rightCols: globalThis.Ref;
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly;
+ default: string;
+ };
+ wider: {
+ type: PropType<"default" | "start" | "center" | "end">;
+ default: string;
+ };
+ offset: {
+ type: NumberConstructor;
+ default: number;
+ };
+ }>> & Readonly<{}>, {
+ offset: number;
+ mode: "two" | "three";
+ wider: "default" | "start" | "center" | "end";
+ }, {}, {
+ HRow: import('vue').DefineComponent;
+ default: string;
+ };
+ justify: {
+ type: PropType<"none" | "center" | "end" | "around" | "between" | "evenly">;
+ default: string;
+ };
+ gutter: {
+ type: PropType<"none" | "xs" | "sm" | "md" | "lg" | "xl">;
+ default: string;
+ };
+ gutterCol: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ horizontal: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ vertical: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ }>, {
+ getClasses: () => string;
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly;
+ default: string;
+ };
+ justify: {
+ type: PropType<"none" | "center" | "end" | "around" | "between" | "evenly">;
+ default: string;
+ };
+ gutter: {
+ type: PropType<"none" | "xs" | "sm" | "md" | "lg" | "xl">;
+ default: string;
+ };
+ gutterCol: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ horizontal: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ vertical: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ }>> & Readonly<{}>, {
+ align: "none" | "start" | "center" | "end";
+ self: boolean;
+ horizontal: boolean;
+ vertical: boolean;
+ column: boolean;
+ justify: "none" | "center" | "end" | "around" | "between" | "evenly";
+ gutter: "xs" | "sm" | "md" | "lg" | "xl" | "none";
+ gutterCol: boolean;
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
+ HColumn: import('vue').DefineComponent, {
+ classes: globalThis.ComputedRef;
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly> & Readonly<{}>, {
+ color: string;
+ xs: string;
+ sm: string;
+ md: string;
+ lg: string;
+ xl: string;
+ auto: boolean;
+ cols: string | number;
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
+ }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
+ HLabel: import('vue').DefineComponent;
+ default: string;
+ };
+ weight: {
+ type: PropType<"thin" | "light" | "regular" | "medium" | "bold" | "bolder">;
+ default: string;
+ };
+ align: {
+ type: PropType<"left" | "right" | "center" | "justify">;
+ default: string;
+ };
+ text: StringConstructor;
+ }>, {
+ display: globalThis.ComputedRef;
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly;
+ default: string;
+ };
+ weight: {
+ type: PropType<"thin" | "light" | "regular" | "medium" | "bold" | "bolder">;
+ default: string;
+ };
+ align: {
+ type: PropType<"left" | "right" | "center" | "justify">;
+ default: string;
+ };
+ text: StringConstructor;
+ }>> & Readonly<{}>, {
+ size: "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "overline" | "subtitle-1" | "subtitle-2" | "body-1" | "body-2";
+ align: "left" | "right" | "justify" | "center";
+ weight: "bold" | "thin" | "light" | "regular" | "medium" | "bolder";
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
+}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HForm/HDateTime.vue.d.ts b/shared/components/dist/HForm/HDateTime.vue.d.ts
index de7da306..a46fdef3 100644
--- a/shared/components/dist/HForm/HDateTime.vue.d.ts
+++ b/shared/components/dist/HForm/HDateTime.vue.d.ts
@@ -1,21 +1,24 @@
-declare const _default: import('vue').DefineComponent<{
+import { ClosePopup } from 'quasar';
+declare const _default: import('vue').DefineComponent;
+}>, {
+ dateTimeValue: globalThis.WritableComputedRef;
hasError: globalThis.ComputedRef;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly> & {
+}>> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
-}, {}, {}>;
+}>, {}, {}, {}, {
+ ClosePopup: ClosePopup;
+}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HForm/HDuration.vue.d.ts b/shared/components/dist/HForm/HDuration.vue.d.ts
index 35bde95f..cb4dd0c8 100644
--- a/shared/components/dist/HForm/HDuration.vue.d.ts
+++ b/shared/components/dist/HForm/HDuration.vue.d.ts
@@ -1,22 +1,65 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
- amount: globalThis.Ref;
- unit: globalThis.Ref;
+}>, {
+ durationValue: globalThis.WritableComputedRef;
+ amount: globalThis.Ref;
+ unit: globalThis.Ref;
options: globalThis.Ref<{
text: string;
value: string;
+ }[], import('..').SelectItem[] | {
+ text: string;
+ value: string;
}[]>;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly> & {
+}>> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
-}, {}, {}>;
+}>, {}, {}, {
+ HSelect: import('vue').DefineComponent, {
+ selectedValue: globalThis.WritableComputedRef | unknown[] | undefined, string | number | Record | unknown[] | undefined>;
+ hasError: globalThis.ComputedRef;
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly> & Readonly<{
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
+ }>, {
+ optionLabel: string;
+ optionValue: string;
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
+}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HForm/HIconSelect.vue.d.ts b/shared/components/dist/HForm/HIconSelect.vue.d.ts
index 2be4921c..1846a429 100644
--- a/shared/components/dist/HForm/HIconSelect.vue.d.ts
+++ b/shared/components/dist/HForm/HIconSelect.vue.d.ts
@@ -1,6 +1,6 @@
import { Ref } from 'vue';
import { QSelect } from 'quasar';
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
- options: Ref;
+}>, {
+ selectedValue: globalThis.WritableComputedRef;
+ options: Ref;
filter: (value: string, update: (callbackFn: () => void, after?: (ref: QSelect) => void) => void, abort: () => void) => void;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly> & {
+}>> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
-}, {
+}>, {
optionLabel: string;
optionValue: string;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HForm/HSelect.vue.d.ts b/shared/components/dist/HForm/HSelect.vue.d.ts
index 2623565e..62f34d3c 100644
--- a/shared/components/dist/HForm/HSelect.vue.d.ts
+++ b/shared/components/dist/HForm/HSelect.vue.d.ts
@@ -1,4 +1,4 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent | unknown[] | undefined>;
+}>, {
+ selectedValue: globalThis.WritableComputedRef | unknown[] | undefined, string | number | Record | unknown[] | undefined>;
hasError: globalThis.ComputedRef;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly> & {
+}>> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
-}, {
+}>, {
optionLabel: string;
optionValue: string;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HForm/HSwitch.vue.d.ts b/shared/components/dist/HForm/HSwitch.vue.d.ts
index 788f5e03..30dc261c 100644
--- a/shared/components/dist/HForm/HSwitch.vue.d.ts
+++ b/shared/components/dist/HForm/HSwitch.vue.d.ts
@@ -1,4 +1,4 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly, {
+ switchValue: globalThis.WritableComputedRef;
+}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly> & {
+}>> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
-}, {
+}>, {
color: string;
modelValue: string | number | boolean;
trueValue: string | number | boolean;
falseValue: string | number | boolean;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HForm/HTextField.vue.d.ts b/shared/components/dist/HForm/HTextField.vue.d.ts
index 5fe4e888..2ec77ec9 100644
--- a/shared/components/dist/HForm/HTextField.vue.d.ts
+++ b/shared/components/dist/HForm/HTextField.vue.d.ts
@@ -1,14 +1,14 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly, {
+ text: globalThis.WritableComputedRef;
+}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly> & {
+}>> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
-}, {}, {}>;
+}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HGrid/HColumn.vue.d.ts b/shared/components/dist/HGrid/HColumn.vue.d.ts
index b158ca5e..30c8c1d9 100644
--- a/shared/components/dist/HGrid/HColumn.vue.d.ts
+++ b/shared/components/dist/HGrid/HColumn.vue.d.ts
@@ -1,4 +1,4 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent, {
classes: globalThis.ComputedRef;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {
+}>> & Readonly<{}>, {
color: string;
xs: string;
sm: string;
@@ -75,5 +75,5 @@ declare const _default: import('vue').DefineComponent<{
xl: string;
auto: boolean;
cols: string | number;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HGrid/HContainer.vue.d.ts b/shared/components/dist/HGrid/HContainer.vue.d.ts
index fff467a3..2a8ec85f 100644
--- a/shared/components/dist/HGrid/HContainer.vue.d.ts
+++ b/shared/components/dist/HGrid/HContainer.vue.d.ts
@@ -1,5 +1,5 @@
import { PropType } from 'vue';
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
default: string;
@@ -31,14 +31,14 @@ declare const _default: import('vue').DefineComponent<{
type: NumberConstructor;
default: number;
};
-}, {
+}>, {
isTwoColumn: () => boolean;
isToTheLeft: globalThis.ComputedRef;
isToTheRight: globalThis.ComputedRef;
- leftCols: globalThis.Ref;
- centerCols: globalThis.Ref;
- rightCols: globalThis.Ref;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly;
+ centerCols: globalThis.Ref;
+ rightCols: globalThis.Ref;
+}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly;
default: string;
@@ -70,9 +70,166 @@ declare const _default: import('vue').DefineComponent<{
type: NumberConstructor;
default: number;
};
-}>>, {
+}>> & Readonly<{}>, {
offset: number;
mode: "two" | "three";
- wider: "default" | "center" | "start" | "end";
-}, {}>;
+ wider: "default" | "start" | "center" | "end";
+}, {}, {
+ HRow: import('vue').DefineComponent;
+ default: string;
+ };
+ justify: {
+ type: PropType<"none" | "center" | "end" | "around" | "between" | "evenly">;
+ default: string;
+ };
+ gutter: {
+ type: PropType<"none" | "xs" | "sm" | "md" | "lg" | "xl">;
+ default: string;
+ };
+ gutterCol: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ horizontal: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ vertical: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ }>, {
+ getClasses: () => string;
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly;
+ default: string;
+ };
+ justify: {
+ type: PropType<"none" | "center" | "end" | "around" | "between" | "evenly">;
+ default: string;
+ };
+ gutter: {
+ type: PropType<"none" | "xs" | "sm" | "md" | "lg" | "xl">;
+ default: string;
+ };
+ gutterCol: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ horizontal: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ vertical: {
+ type: BooleanConstructor;
+ default: boolean;
+ };
+ }>> & Readonly<{}>, {
+ align: "none" | "start" | "center" | "end";
+ self: boolean;
+ horizontal: boolean;
+ vertical: boolean;
+ column: boolean;
+ justify: "none" | "center" | "end" | "around" | "between" | "evenly";
+ gutter: "xs" | "sm" | "md" | "lg" | "xl" | "none";
+ gutterCol: boolean;
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
+ HColumn: import('vue').DefineComponent, {
+ classes: globalThis.ComputedRef;
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly> & Readonly<{}>, {
+ color: string;
+ xs: string;
+ sm: string;
+ md: string;
+ lg: string;
+ xl: string;
+ auto: boolean;
+ cols: string | number;
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
+}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HGrid/HRow.vue.d.ts b/shared/components/dist/HGrid/HRow.vue.d.ts
index dbbdb964..b636793c 100644
--- a/shared/components/dist/HGrid/HRow.vue.d.ts
+++ b/shared/components/dist/HGrid/HRow.vue.d.ts
@@ -1,5 +1,5 @@
import { PropType } from 'vue';
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent, {
getClasses: () => string;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {
- align: "center" | "none" | "start" | "end";
+}>> & Readonly<{}>, {
+ align: "none" | "start" | "center" | "end";
self: boolean;
horizontal: boolean;
vertical: boolean;
column: boolean;
- justify: "center" | "around" | "between" | "evenly" | "none" | "end";
+ justify: "none" | "center" | "end" | "around" | "between" | "evenly";
gutter: "xs" | "sm" | "md" | "lg" | "xl" | "none";
gutterCol: boolean;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HLabel/HCenterLabel.vue.d.ts b/shared/components/dist/HLabel/HCenterLabel.vue.d.ts
index 83dcbb20..0ba9ba86 100644
--- a/shared/components/dist/HLabel/HCenterLabel.vue.d.ts
+++ b/shared/components/dist/HLabel/HCenterLabel.vue.d.ts
@@ -1,16 +1,16 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {
+}>> & Readonly<{}>, {
height: string;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HLabel/HLabel.vue.d.ts b/shared/components/dist/HLabel/HLabel.vue.d.ts
index d39a295e..09d7669b 100644
--- a/shared/components/dist/HLabel/HLabel.vue.d.ts
+++ b/shared/components/dist/HLabel/HLabel.vue.d.ts
@@ -1,5 +1,5 @@
import { PropType } from 'vue';
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
default: string;
@@ -13,9 +13,9 @@ declare const _default: import('vue').DefineComponent<{
default: string;
};
text: StringConstructor;
-}, {
+}>, {
display: globalThis.ComputedRef;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly;
default: string;
@@ -29,9 +29,9 @@ declare const _default: import('vue').DefineComponent<{
default: string;
};
text: StringConstructor;
-}>>, {
+}>> & Readonly<{}>, {
size: "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "overline" | "subtitle-1" | "subtitle-2" | "body-1" | "body-2";
- align: "left" | "right" | "center" | "justify";
+ align: "left" | "right" | "justify" | "center";
weight: "bold" | "thin" | "light" | "regular" | "medium" | "bolder";
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HList/HListItem.vue.d.ts b/shared/components/dist/HList/HListItem.vue.d.ts
index 25c0429d..acd786f3 100644
--- a/shared/components/dist/HList/HListItem.vue.d.ts
+++ b/shared/components/dist/HList/HListItem.vue.d.ts
@@ -1,16 +1,20 @@
-declare const _default: import('vue').DefineComponent<{
+import { ClosePopup, Ripple } from 'quasar';
+declare const _default: import('vue').DefineComponent, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {}, {}>;
+}>> & Readonly<{}>, {}, {}, {}, {
+ ClosePopup: ClosePopup;
+ Ripple: Ripple;
+}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HLoading/HLoading.vue.d.ts b/shared/components/dist/HLoading/HLoading.vue.d.ts
index 7577b380..50937091 100644
--- a/shared/components/dist/HLoading/HLoading.vue.d.ts
+++ b/shared/components/dist/HLoading/HLoading.vue.d.ts
@@ -1,6 +1,7 @@
+import { QSpinner, QSpinnerAudio, QSpinnerBall, QSpinnerBars, QSpinnerBox, QSpinnerClock, QSpinnerComment, QSpinnerCube, QSpinnerDots, QSpinnerFacebook, QSpinnerGears, QSpinnerGrid, QSpinnerHearts, QSpinnerHourglass, QSpinnerInfinity, QSpinnerIos, QSpinnerOrbit, QSpinnerOval, QSpinnerPie, QSpinnerPuff, QSpinnerRadio, QSpinnerRings, QSpinnerTail } from 'quasar';
import { PropType } from 'vue';
import { Spinners } from '../lib';
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
default: string;
@@ -13,7 +14,7 @@ declare const _default: import('vue').DefineComponent<{
type: StringConstructor;
default: string;
};
-}, unknown, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly;
default: string;
@@ -26,9 +27,33 @@ declare const _default: import('vue').DefineComponent<{
type: StringConstructor;
default: string;
};
-}>>, {
+}>> & Readonly<{}>, {
type: "DEFAULT" | "AUDIO" | "BALL" | "BARS" | "BOX" | "CLOCK" | "COMMENT" | "CUBE" | "DOTS" | "FACEBOOK" | "GEARS" | "GRID" | "HEARTS" | "HOURGLASS" | "INFINITY" | "IOS" | "ORBIT" | "OVAL" | "PIE" | "PUFF" | "RADIO" | "RINGS" | "TAIL";
size: string;
color: string;
-}, {}>;
+}, {}, {
+ DEFAULT: import('quasar').ComponentConstructor;
+ AUDIO: import('quasar').ComponentConstructor;
+ BALL: import('quasar').ComponentConstructor;
+ BARS: import('quasar').ComponentConstructor;
+ BOX: import('quasar').ComponentConstructor;
+ CLOCK: import('quasar').ComponentConstructor;
+ COMMENT: import('quasar').ComponentConstructor;
+ CUBE: import('quasar').ComponentConstructor;
+ DOTS: import('quasar').ComponentConstructor;
+ FACEBOOK: import('quasar').ComponentConstructor;
+ GEARS: import('quasar').ComponentConstructor;
+ GRID: import('quasar').ComponentConstructor;
+ HEARTS: import('quasar').ComponentConstructor;
+ HOURGLASS: import('quasar').ComponentConstructor;
+ INFINITY: import('quasar').ComponentConstructor;
+ IOS: import('quasar').ComponentConstructor;
+ ORBIT: import('quasar').ComponentConstructor;
+ OVAL: import('quasar').ComponentConstructor;
+ PIE: import('quasar').ComponentConstructor;
+ PUFF: import('quasar').ComponentConstructor;
+ RADIO: import('quasar').ComponentConstructor;
+ RINGS: import('quasar').ComponentConstructor;
+ TAIL: import('quasar').ComponentConstructor;
+}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HPagination/HPagination.vue.d.ts b/shared/components/dist/HPagination/HPagination.vue.d.ts
index 13a8fc0d..7a5f4429 100644
--- a/shared/components/dist/HPagination/HPagination.vue.d.ts
+++ b/shared/components/dist/HPagination/HPagination.vue.d.ts
@@ -1,4 +1,4 @@
-declare const _default: import('vue').DefineComponent<{
+declare const _default: import('vue').DefineComponent;
-}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly, {
+ pageNumber: globalThis.WritableComputedRef;
+}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly> & {
+}>> & Readonly<{
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
-}, {
+}>, {
max: number;
maxPage: number;
-}, {}>;
+}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/HParticles/HParticles.vue.d.ts b/shared/components/dist/HParticles/HParticles.vue.d.ts
index 3ae3c8bd..634996d5 100644
--- a/shared/components/dist/HParticles/HParticles.vue.d.ts
+++ b/shared/components/dist/HParticles/HParticles.vue.d.ts
@@ -1,4 +1,4 @@
declare const _default: import('vue').DefineComponent<{}, {
- id: globalThis.Ref;
-}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly>, {}, {}>;
+ id: globalThis.Ref;
+}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
diff --git a/shared/components/dist/index.es.mjs b/shared/components/dist/index.es.mjs
index 29276650..ec0f4b64 100644
--- a/shared/components/dist/index.es.mjs
+++ b/shared/components/dist/index.es.mjs
@@ -1530,9 +1530,9 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
createVNode(_component_q_item, null, {
default: withCtx(() => [
createVNode(_component_q_item_section, { class: "text-grey" }, {
- default: withCtx(() => [
+ default: withCtx(() => _cache[1] || (_cache[1] = [
createTextVNode("没有数据")
- ]),
+ ])),
_: 1
})
]),
@@ -1886,46 +1886,44 @@ const _hoisted_1$2 = {
height: "896",
width: "967.8852157128662"
};
-const _hoisted_2$2 = /* @__PURE__ */ createElementVNode("path", {
- id: "path-2",
- opacity: "1",
- "fill-rule": "evenodd",
- d: "M896,448 C1142.6325445712241,465.5747656464056 695.2579309733121,896 448,896\r\n C200.74206902668806,896 5.684341886080802e-14,695.2579309733121 0,448.0000000000001 C0,200.74206902668806\r\n 200.74206902668791,5.684341886080802e-14 447.99999999999994,0 C695.2579309733121,0 475,418 896,448Z"
-}, null, -1);
-const _hoisted_3$1 = {
+const _hoisted_2$2 = {
id: "linearGradient-3",
x1: "0.5",
y1: "0",
x2: "0.5",
y2: "1"
};
+const _hoisted_3$1 = ["stop-color"];
const _hoisted_4$1 = ["stop-color"];
-const _hoisted_5$1 = ["stop-color"];
-const _hoisted_6$1 = /* @__PURE__ */ createElementVNode("g", { opacity: "1" }, [
- /* @__PURE__ */ createElementVNode("use", {
- "xlink:href": "#path-2",
- fill: "url(#linearGradient-3)",
- "fill-opacity": "1"
- })
-], -1);
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("svg", _hoisted_1$2, [
createElementVNode("defs", null, [
- _hoisted_2$2,
- createElementVNode("linearGradient", _hoisted_3$1, [
+ _cache[0] || (_cache[0] = createElementVNode("path", {
+ id: "path-2",
+ opacity: "1",
+ "fill-rule": "evenodd",
+ d: "M896,448 C1142.6325445712241,465.5747656464056 695.2579309733121,896 448,896\r\n C200.74206902668806,896 5.684341886080802e-14,695.2579309733121 0,448.0000000000001 C0,200.74206902668806\r\n 200.74206902668791,5.684341886080802e-14 447.99999999999994,0 C695.2579309733121,0 475,418 896,448Z"
+ }, null, -1)),
+ createElementVNode("linearGradient", _hoisted_2$2, [
createElementVNode("stop", {
offset: "0",
"stop-color": _ctx.startColor,
"stop-opacity": "1"
- }, null, 8, _hoisted_4$1),
+ }, null, 8, _hoisted_3$1),
createElementVNode("stop", {
offset: "1",
"stop-color": _ctx.endColor,
"stop-opacity": "1"
- }, null, 8, _hoisted_5$1)
+ }, null, 8, _hoisted_4$1)
])
]),
- _hoisted_6$1
+ _cache[1] || (_cache[1] = createElementVNode("g", { opacity: "1" }, [
+ createElementVNode("use", {
+ "xlink:href": "#path-2",
+ fill: "url(#linearGradient-3)",
+ "fill-opacity": "1"
+ })
+ ], -1))
]);
}
const HSignInCornerBottom = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
@@ -1946,46 +1944,44 @@ const _hoisted_1$1 = {
height: "1337",
width: "1337"
};
-const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("path", {
- id: "path-1",
- opacity: "1",
- "fill-rule": "evenodd",
- d: "M1337,668.5 C1337,1037.455193874239 1037.455193874239,1337 668.5,1337 C523.6725684305388,1337 337,1236 370.50000000000006,1094 C434.03835568300906,824.6732385973953 6.906089672974592e-14,892.6277623047779 0,668.5000000000001 C0,299.5448061257611 299.5448061257609,1.1368683772161603e-13 668.4999999999999,0 C1037.455193874239,0 1337,299.544806125761 1337,668.5Z"
-}, null, -1);
-const _hoisted_3 = {
+const _hoisted_2$1 = {
id: "linearGradient-2",
x1: "0.79",
y1: "0.62",
x2: "0.21",
y2: "0.86"
};
+const _hoisted_3 = ["stop-color"];
const _hoisted_4 = ["stop-color"];
-const _hoisted_5 = ["stop-color"];
-const _hoisted_6 = /* @__PURE__ */ createElementVNode("g", { opacity: "1" }, [
- /* @__PURE__ */ createElementVNode("use", {
- "xlink:href": "#path-1",
- fill: "url(#linearGradient-2)",
- "fill-opacity": "1"
- })
-], -1);
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("svg", _hoisted_1$1, [
createElementVNode("defs", null, [
- _hoisted_2$1,
- createElementVNode("linearGradient", _hoisted_3, [
+ _cache[0] || (_cache[0] = createElementVNode("path", {
+ id: "path-1",
+ opacity: "1",
+ "fill-rule": "evenodd",
+ d: "M1337,668.5 C1337,1037.455193874239 1037.455193874239,1337 668.5,1337 C523.6725684305388,1337 337,1236 370.50000000000006,1094 C434.03835568300906,824.6732385973953 6.906089672974592e-14,892.6277623047779 0,668.5000000000001 C0,299.5448061257611 299.5448061257609,1.1368683772161603e-13 668.4999999999999,0 C1037.455193874239,0 1337,299.544806125761 1337,668.5Z"
+ }, null, -1)),
+ createElementVNode("linearGradient", _hoisted_2$1, [
createElementVNode("stop", {
offset: "0",
"stop-color": _ctx.startColor,
"stop-opacity": "1"
- }, null, 8, _hoisted_4),
+ }, null, 8, _hoisted_3),
createElementVNode("stop", {
offset: "1",
"stop-color": _ctx.endColor,
"stop-opacity": "1"
- }, null, 8, _hoisted_5)
+ }, null, 8, _hoisted_4)
])
]),
- _hoisted_6
+ _cache[1] || (_cache[1] = createElementVNode("g", { opacity: "1" }, [
+ createElementVNode("use", {
+ "xlink:href": "#path-1",
+ fill: "url(#linearGradient-2)",
+ "fill-opacity": "1"
+ })
+ ], -1))
]);
}
const HSignInCornerTop = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
diff --git a/shared/components/dist/index.umd.js b/shared/components/dist/index.umd.js
index 9dc4080b..2a93368d 100644
--- a/shared/components/dist/index.umd.js
+++ b/shared/components/dist/index.umd.js
@@ -1 +1 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("quasar"),require("vue"),require("@herodotus/core"),require("@mdi/js"),require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/interaction-particles-links")):"function"==typeof define&&define.amd?define(["exports","quasar","vue","@herodotus/core","@mdi/js","@tsparticles/engine","@tsparticles/basic","@tsparticles/interaction-particles-links"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@herodotus/components"]={},e.quasar,e.vue,e.HerodotusCore,e.MdiJs,e.TsparticlesEngine,e.TsparticlesBasic,e.TsparticlesInteractionParticlesLinkss)}(this,(function(e,t,o,n,l,r,a,i){"use strict";function s(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const u=s(l),c=(e,t)=>{const o=e.__vccOpts||e;for(const[n,l]of t)o[n]=l;return o};const d=c(o.defineComponent({name:"HButton",props:{tooltip:{type:String,default:""}}}),[["render",function(e,n,l,r,a,i){const s=t.QTooltip,u=t.QBtn;return o.openBlock(),o.createBlock(u,o.normalizeProps(o.guardReactiveProps(e.$attrs)),o.createSlots({loading:o.withCtx((()=>[o.renderSlot(e.$slots,"loading")])),_:2},[!e.$slots.default&&e.tooltip?{name:"default",fn:o.withCtx((()=>[e.tooltip?(o.openBlock(),o.createBlock(s,{key:0},{default:o.withCtx((()=>[o.createTextVNode(o.toDisplayString(e.tooltip),1)])),_:1})):o.createCommentVNode("",!0)])),key:"0"}:void 0]),1040)}]]);const p=c(o.defineComponent({name:"HIconButton",components:{HButton:d},props:{color:{type:String,default:""},size:{type:String,default:""},dense:{type:Boolean,default:!1}}}),[["render",function(e,t,n,l,r,a){const i=o.resolveComponent("h-button");return o.openBlock(),o.createBlock(i,o.mergeProps({flat:"",round:"",color:e.color,dense:e.dense,size:e.size},e.$attrs),null,16,["color","dense","size"])}]]);const m=c(o.defineComponent({name:"HVisibilityButton",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup:(e,{emit:t})=>({isShowPassword:o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}})})}),[["render",function(e,n,l,r,a,i){const s=t.QIcon;return o.openBlock(),o.createBlock(s,{name:e.isShowPassword?"visibility":"visibility_off",class:"cursor-pointer",onClick:n[0]||(n[0]=t=>e.isShowPassword=!e.isShowPassword)},null,8,["name"])}]]);d.install=e=>{e.component(d.name,d)},p.install=e=>{e.component(p.name,p)},m.install=e=>{e.component(m.name,m)};const f=o.defineComponent({name:"HChartCard",props:{title:{type:String},subtitle:{type:String,default:""}}}),g={class:"text-h6"},h={key:0,class:"text-subtitle2"};const C=c(f,[["render",function(e,n,l,r,a,i){const s=t.QCardSection,u=t.QSeparator,c=t.QCard;return o.openBlock(),o.createBlock(c,null,{default:o.withCtx((()=>[o.createVNode(s,null,{default:o.withCtx((()=>[o.createElementVNode("div",g,o.toDisplayString(e.title),1),e.subtitle?(o.openBlock(),o.createElementBlock("div",h,o.toDisplayString(e.subtitle),1)):o.createCommentVNode("",!0)])),_:1}),o.createVNode(u,{inset:""}),o.createVNode(s,null,{default:o.withCtx((()=>[o.renderSlot(e.$slots,"default")])),_:3})])),_:3})}]]);C.install=e=>{e.component(C.name,C)};var y=(e=>(e.xs="xs",e.sm="sm",e.md="md",e.lg="lg",e.xl="xl",e))(y||{}),S=(e=>(e.DEFAULT="default",e.AUDIO="audio",e.BALL="ball",e.BARS="bars",e.BOX="box",e.CLOCK="clock",e.COMMENT="comment",e.CUBE="cube",e.DOTS="dots",e.FACEBOOK="facebook",e.GEARS="gears",e.GRID="grid",e.HEARTS="hearts",e.HOURGLASS="hourglass",e.INFINITY="infinity",e.IOS="ios",e.ORBIT="orbit",e.OVAL="oval",e.PIE="pie",e.PUFF="puff",e.RADIO="radio",e.RINGS="rings",e.TAIL="tail",e))(S||{});const V=[{text:"天",value:"days"},{text:"小时",value:"hours"},{text:"分",value:"minutes"},{text:"秒",value:"seconds"}],x={DASH:"-"},b={text:"text",bg:"bg"},w={auto:"auto",col:"col"},v=(e,...t)=>e+x.DASH+t.join(x.DASH),k=e=>v(b.text,e),B=(e="",t="")=>e&&t?v(w.col,e,t):e?v(w.col,e):t?v(w.col,t):w.col;const N=c(o.defineComponent({name:"HColumn",props:{cols:{type:[String,Number],default:""},xs:{type:String,default:""},sm:{type:String,default:""},md:{type:String,default:""},lg:{type:String,default:""},xl:{type:String,default:""},auto:{type:Boolean,default:!1},color:{type:String,default:""}},setup:e=>({classes:o.computed((()=>{let t=[];return e.auto?t.push(B(w.auto)):e.cols?t.push(B("",e.cols)):(t.push(B()),e.xs&&t.push(B(y.xs,e.xs)),e.sm&&t.push(B(y.sm,e.sm)),e.md&&t.push(B(y.md,e.md)),e.lg&&t.push(B(y.lg,e.lg)),e.xl&&t.push(B(y.xl,e.xl))),e.color&&t.push(k(e.color)),t}))})}),[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.classes)},[o.renderSlot(e.$slots,"default")],2)}]]),H="row",E="column",I="justify",T="self",Q="items",O="q-gutter",D="q-col-gutter";const _=c(o.defineComponent({name:"HRow",props:{column:{type:Boolean,default:!1},self:{type:Boolean,default:!1},align:{type:String,default:"none"},justify:{type:String,default:"none"},gutter:{type:String,default:"none"},gutterCol:{type:Boolean,default:!1},horizontal:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}},setup(e){const t=o.reactive([]),n=(t="",o="")=>{let n=O;return e.gutterCol&&(n=D),o&&(n=n+"-"+o),n=n+"-"+t,n},l=e=>{e&&t.push(e)},r=()=>{var t;l(e.column?E:H),l("none"!==e.justify?I+"-"+e.justify:""),l((()=>{if("none"!==e.align){let t=Q;return e.self&&(t=T),t+"-"+e.align}return""})()),"none"!==e.gutter&&(e.horizontal||e.vertical?(e.horizontal&&l((t=e.gutter,n(t,"x"))),e.vertical&&l((e=>n(e,"y"))(e.gutter))):l(n(e.gutter)))};return o.onMounted((()=>{r()})),{getClasses:()=>t.length>1?t.join(" "):1===t.length?t[0]:H}}}),[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.getClasses())},[o.renderSlot(e.$slots,"default")],2)}]]);const P=c(o.defineComponent({name:"HContainer",components:{HRow:_,HColumn:N},props:{mode:{type:String,default:"three"},wider:{type:String,default:"default"},offset:{type:Number,default:0}},setup(e){const t=o.reactive({leftCols:4,centerCols:4,rightCols:4}),n=()=>"two"===e.mode,l=t=>t+e.offset,r=t=>t-e.offset,a=e=>{t.leftCols=l(e),t.rightCols=r(e)},i=e=>{t.leftCols=r(e),t.rightCols=l(e)},s=(e,o=0)=>{t.leftCols=e,t.rightCols=e+o},u=()=>{t.centerCols=4},c=()=>4+e.offset,d=()=>12-c(),p=o.computed((()=>t.leftCols>t.rightCols)),m=o.computed((()=>t.leftCols{if(n())switch(e.wider){case"start":a(6);break;case"end":i(6);break;default:s(6)}else switch(e.wider){case"center":t.centerCols=c();const e=d()/2;o=d(),0===Math.abs(o%2)?s(e):s(e,1);break;case"start":u(),a(4);break;case"end":u(),i(4);break;default:u(),s(4)}var o};return o.onBeforeMount((()=>{f()})),{...o.toRefs(t),isTwoColumn:n,isToTheLeft:p,isToTheRight:m}}}),[["render",function(e,t,n,l,r,a){const i=o.resolveComponent("h-column"),s=o.resolveComponent("h-row");return e.isTwoColumn()?(o.openBlock(),o.createBlock(s,o.normalizeProps(o.mergeProps({key:0},e.$attrs)),{default:o.withCtx((()=>[o.createVNode(i,{cols:e.leftCols},{default:o.withCtx((()=>[e.isToTheLeft?o.renderSlot(e.$slots,"default",{key:0}):o.renderSlot(e.$slots,"left",{key:1})])),_:3},8,["cols"]),o.createVNode(i,{cols:e.rightCols},{default:o.withCtx((()=>[e.isToTheRight?o.renderSlot(e.$slots,"default",{key:0}):o.renderSlot(e.$slots,"right",{key:1})])),_:3},8,["cols"])])),_:3},16)):(o.openBlock(),o.createBlock(s,o.normalizeProps(o.mergeProps({key:1},e.$attrs)),{default:o.withCtx((()=>[o.createVNode(i,{cols:e.leftCols},{default:o.withCtx((()=>[o.renderSlot(e.$slots,"left")])),_:3},8,["cols"]),o.createVNode(i,{cols:e.centerCols},{default:o.withCtx((()=>[o.renderSlot(e.$slots,"default")])),_:3},8,["cols"]),o.createVNode(i,{cols:e.rightCols},{default:o.withCtx((()=>[o.renderSlot(e.$slots,"right")])),_:3},8,["cols"])])),_:3},16))}]]);N.install=e=>{e.component(N.name,N)},P.install=e=>{e.component(P.name,P)},_.install=e=>{e.component(_.name,_)};const A=c(o.defineComponent({name:"HLabel",props:{size:{type:String,default:""},weight:{type:String,default:"medium"},align:{type:String,default:"center"},text:String},setup(e){const t=e=>"text-"+e;return{display:o.computed((()=>{const o=[t(e.align),"font-weight-"+e.weight],n=e.size?t(e.size):"";return n&&o.push(n),o.join(" ")}))}}}),[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.display)},o.toDisplayString(e.text),3)}]]),L=o.defineComponent({name:"HCenterLabel",props:{height:{type:String,default:"100px"},text:String}}),z={class:"col-12 self-center"};const j=c(L,[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("div",{class:"row text-center",style:o.normalizeStyle(`height: ${e.height}`)},[o.createElementVNode("div",z,o.toDisplayString(e.text),1)],4)}]]);A.install=e=>{e.component(A.name,A)},j.install=e=>{e.component(j.name,j)};const R=c(o.defineComponent({name:"HDivider",components:{HContainer:P,HLabel:A},props:{wider:{type:String,default:"center"},weight:{type:String,default:"medium"},offset:{type:Number,default:0},label:String},setup:e=>({textWeight:o.computed((()=>"text-center text-weight-"+e.weight))})}),[["render",function(e,n,l,r,a,i){const s=t.QSeparator,u=o.resolveComponent("h-label"),c=o.resolveComponent("h-container");return o.openBlock(),o.createBlock(c,{mode:"three",offset:e.offset,wider:e.wider,align:"center"},{left:o.withCtx((()=>[o.createVNode(s)])),right:o.withCtx((()=>[o.createVNode(s)])),default:o.withCtx((()=>[o.createVNode(u,{text:e.label,weight:e.weight},null,8,["text","weight"])])),_:1},8,["offset","wider"])}]]);R.install=e=>{e.component(R.name,R)};const U=o.defineComponent({name:"HDialog",props:{modelValue:{type:Boolean,default:!1,required:!0},loading:{type:Boolean,default:!1},title:{type:String,default:""},height:{type:String,default:"500px"},spinnerSize:{type:String,default:"50px"},hideConfirm:{type:Boolean,default:!1},hideCancel:{type:Boolean,default:!1},hideClose:{type:Boolean,default:!1}},emits:["update:modelValue","update:loading","confirm","cancel","close"],setup(e,{emit:t}){const n=o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}}),l=o.computed({get:()=>e.loading,set:e=>{t("update:loading",e)}});return{showDialog:n,showLoading:l,onClose:()=>{n.value=!1,t("close")},onCancel:()=>{n.value=!1,t("cancel")},onConfirm:()=>{l.value=!0,n.value=!1,t("confirm")}}}}),$={class:"text-h6"};const M=c(U,[["render",function(e,n,l,r,a,i){const s=t.QSpace,u=t.QBtn,c=t.QCardSection,d=t.QSeparator,p=t.QCardActions,m=t.QSpinnerDots,f=t.QInnerLoading,g=t.QCard,h=t.QDialog;return o.openBlock(),o.createBlock(h,o.mergeProps({modelValue:e.showDialog,"onUpdate:modelValue":n[3]||(n[3]=t=>e.showDialog=t),persistent:""},e.$attrs),{default:o.withCtx((()=>[o.createVNode(g,{class:"q-py-none",style:o.normalizeStyle(`min-width: ${e.height}`)},{default:o.withCtx((()=>[o.createVNode(c,{class:"row items-center"},{default:o.withCtx((()=>[o.createElementVNode("div",$,o.toDisplayString(e.title),1),o.createVNode(s),e.hideClose?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(u,{key:0,icon:"close",flat:"",round:"",dense:"",onClick:n[0]||(n[0]=t=>e.onClose())}))])),_:1}),o.createVNode(d),o.createVNode(c,null,{default:o.withCtx((()=>[o.renderSlot(e.$slots,"default")])),_:3}),o.createVNode(p,{align:"right",class:"text-primary"},{default:o.withCtx((()=>[e.hideCancel?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(u,{key:0,label:"取消",color:"red",onClick:n[1]||(n[1]=t=>e.onCancel())})),e.hideConfirm?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(u,{key:1,label:"确认",color:"primary",onClick:n[2]||(n[2]=t=>e.onConfirm())}))])),_:1}),o.createVNode(f,{showing:e.showLoading},{default:o.withCtx((()=>[o.createVNode(m,{size:e.spinnerSize,color:"primary"},null,8,["size"])])),_:1},8,["showing"])])),_:3},8,["style"])])),_:3},16,["modelValue"])}]]);M.install=e=>{e.component(M.name,M)};const G=o.defineComponent({name:"HDateTime",directives:{ClosePopup:t.ClosePopup},props:{modelValue:{type:String},errorMessage:{type:String}},emits:["update:modelValue"],setup:(e,{emit:t})=>({dateTimeValue:o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}}),hasError:o.computed((()=>!!e.errorMessage))})}),q={class:"row items-center justify-end"},F={class:"row items-center justify-end"};const Y=c(G,[["render",function(e,n,l,r,a,i){const s=t.QBtn,u=t.QDate,c=t.QPopupProxy,d=t.QIcon,p=t.QTime,m=t.QInput,f=o.resolveDirective("close-popup");return o.openBlock(),o.createBlock(m,o.mergeProps({modelValue:e.dateTimeValue,"onUpdate:modelValue":n[2]||(n[2]=t=>e.dateTimeValue=t),outlined:"",clearable:"","bottom-slots":e.hasError,error:e.hasError,"error-message":e.errorMessage},e.$attrs),{prepend:o.withCtx((()=>[o.createVNode(d,{name:"event",class:"cursor-pointer"},{default:o.withCtx((()=>[o.createVNode(c,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o.withCtx((()=>[o.createVNode(u,{modelValue:e.dateTimeValue,"onUpdate:modelValue":n[0]||(n[0]=t=>e.dateTimeValue=t),mask:"YYYY-MM-DD HH:mm:ss"},{default:o.withCtx((()=>[o.createElementVNode("div",q,[o.withDirectives(o.createVNode(s,{label:"关闭",color:"primary"},null,512),[[f]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),append:o.withCtx((()=>[o.createVNode(d,{name:"access_time",class:"cursor-pointer"},{default:o.withCtx((()=>[o.createVNode(c,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o.withCtx((()=>[o.createVNode(p,{modelValue:e.dateTimeValue,"onUpdate:modelValue":n[1]||(n[1]=t=>e.dateTimeValue=t),mask:"YYYY-MM-DD HH:mm:ss",format24h:"","with-seconds":""},{default:o.withCtx((()=>[o.createElementVNode("div",F,[o.withDirectives(o.createVNode(s,{label:"关闭",color:"primary"},null,512),[[f]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1},16,["modelValue","bottom-slots","error","error-message"])}]]);const Z=c(o.defineComponent({name:"HSelect",props:{modelValue:{type:[Number,String,Array,Object]},optionLabel:{type:String,default:"text"},optionValue:{type:String,default:"value"},errorMessage:{type:String}},emits:["update:modelValue"],setup:(e,{emit:t})=>({selectedValue:o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}}),hasError:o.computed((()=>!!e.errorMessage))})}),[["render",function(e,n,l,r,a,i){const s=t.QSelect;return o.openBlock(),o.createBlock(s,o.mergeProps({modelValue:e.selectedValue,"onUpdate:modelValue":n[0]||(n[0]=t=>e.selectedValue=t),"option-label":e.optionLabel,"option-value":e.optionValue,outlined:"",clearable:"","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale","bottom-slots":e.hasError,error:e.hasError,"error-message":e.errorMessage},e.$attrs),null,16,["modelValue","option-label","option-value","bottom-slots","error","error-message"])}]]);const K=c(o.defineComponent({name:"HDuration",components:{HSelect:Z},props:{modelValue:{type:[String,Number],defalut:""}},emits:["update:modelValue"],setup(e,{emit:t}){const l=o.ref(0),r=o.ref(""),a=o.ref(V),i=o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}}),s=(e,t)=>{if(e&&t){const o=t,l=n.moment.duration(e,o).toISOString();i.value=l}};return o.watch((()=>e.modelValue),(e=>{e&&(e=>{if(e){let t=n.moment.duration(e,"second");if(t){const e=t._data;for(let t in e){let o=t,n=e[o];n&&(l.value=n,r.value=o)}}}})(e)}),{immediate:!0}),o.watch((()=>r.value),(e=>{e&&s(l.value,e)})),o.watch((()=>l.value),(e=>{e&&s(e,r.value)})),{durationValue:i,amount:l,unit:r,options:a}}}),[["render",function(e,t,n,l,r,a){const i=o.resolveComponent("h-text-field"),s=o.resolveComponent("h-select"),u=o.resolveComponent("h-container");return o.openBlock(),o.createBlock(u,{mode:"two",gutter:"xs","gutter-col":"",horizontal:""},{left:o.withCtx((()=>[o.createVNode(i,{modelValue:e.amount,"onUpdate:modelValue":t[0]||(t[0]=t=>e.amount=t),modelModifiers:{number:!0},label:"数值",placeholder:"请输入数值",type:"number","hide-hint":""},null,8,["modelValue"])])),right:o.withCtx((()=>[o.createVNode(s,{modelValue:e.unit,"onUpdate:modelValue":t[1]||(t[1]=t=>e.unit=t),options:e.options,label:"单位","hide-hint":""},null,8,["modelValue","options"])])),_:1})}]]);var J="object"==typeof global&&global&&global.Object===Object&&global,W="object"==typeof self&&self&&self.Object===Object&&self,X=(J||W||Function("return this")()).Symbol,ee=Object.prototype,te=ee.hasOwnProperty,oe=ee.toString,ne=X?X.toStringTag:void 0;var le=Object.prototype.toString;var re="[object Null]",ae="[object Undefined]",ie=X?X.toStringTag:void 0;function se(e){return null==e?void 0===e?ae:re:ie&&ie in Object(e)?function(e){var t=te.call(e,ne),o=e[ne];try{e[ne]=void 0;var n=!0}catch(r){}var l=oe.call(e);return n&&(t?e[ne]=o:delete e[ne]),l}(e):function(e){return le.call(e)}(e)}var ue="[object Symbol]";var ce=Array.isArray,de=1/0,pe=X?X.prototype:void 0,me=pe?pe.toString:void 0;function fe(e){if("string"==typeof e)return e;if(ce(e))return function(e,t){for(var o=-1,n=null==e?0:e.length,l=Array(n);++oe.modelValue,set:e=>{t("update:modelValue",e)}});let l=[];const r=o.ref(l);o.onMounted((()=>{l=Object.keys(u).map((e=>Fe(e)))}));return{selectedValue:n,options:r,filter:(e,t,o)=>{e.length<3?o():t((()=>{const t=e.toLowerCase();r.value=l.filter((e=>e.toLowerCase().match(t)))}))}}}}),[["render",function(e,n,l,r,a,i){const s=t.QIcon,u=t.QItemSection,c=t.QItemLabel,d=t.QItem,p=t.QSelect;return o.openBlock(),o.createBlock(p,o.mergeProps({ref:"selectRef",modelValue:e.selectedValue,"onUpdate:modelValue":n[0]||(n[0]=t=>e.selectedValue=t),options:e.options,outlined:"",clearable:"","use-input":"","use-chips":"","emit-value":"","bottom-slots":"","input-debounce":"300","transition-show":"scale","transition-hide":"scale",onFilter:e.filter},e.$attrs),o.createSlots({option:o.withCtx((e=>[o.createVNode(d,o.normalizeProps(o.guardReactiveProps(e.itemProps)),{default:o.withCtx((()=>[o.createVNode(u,{avatar:""},{default:o.withCtx((()=>[o.createVNode(s,{name:e.opt},null,8,["name"])])),_:2},1024),o.createVNode(u,null,{default:o.withCtx((()=>[o.createVNode(c,null,{default:o.withCtx((()=>[o.createTextVNode(o.toDisplayString(e.opt),1)])),_:2},1024)])),_:2},1024)])),_:2},1040)])),"no-option":o.withCtx((()=>[o.createVNode(d,null,{default:o.withCtx((()=>[o.createVNode(u,{class:"text-grey"},{default:o.withCtx((()=>[o.createTextVNode("没有数据")])),_:1})])),_:1})])),_:2},[e.selectedValue?{name:"prepend",fn:o.withCtx((()=>[o.createVNode(s,{name:e.selectedValue,color:"primary"},null,8,["name"])])),key:"0"}:void 0]),1040,["modelValue","options","onFilter"])}]]);const Ze=c(o.defineComponent({name:"HSwitch",props:{modelValue:{type:[Boolean,Number,String],default:!1},trueValue:{type:[Boolean,Number,String],default:!0},falseValue:{type:[Boolean,Number,String],default:!1},color:{type:String,default:"primary"}},emits:["update:modelValue"],setup:(e,{emit:t})=>({switchValue:o.computed({get:()=>e.modelValue?e.modelValue:e.falseValue,set:e=>{t("update:modelValue",e)}})})}),[["render",function(e,n,l,r,a,i){const s=t.QToggle;return o.openBlock(),o.createBlock(s,o.mergeProps({modelValue:e.switchValue,"onUpdate:modelValue":n[0]||(n[0]=t=>e.switchValue=t),"true-value":e.trueValue,"false-value":e.falseValue,color:e.color},e.$attrs),null,16,["modelValue","true-value","false-value","color"])}]]);const Ke=c(o.defineComponent({name:"HTextField",props:{modelValue:{type:[String,Number]}},emits:["update:modelValue"],setup:(e,{emit:t,slots:n})=>({text:o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}})})}),[["render",function(e,n,l,r,a,i){const s=t.QInput;return o.openBlock(),o.createBlock(s,o.mergeProps({modelValue:e.text,"onUpdate:modelValue":n[0]||(n[0]=t=>e.text=t),outlined:"",clearable:"","bottom-slots":""},e.$attrs),o.createSlots({_:2},[e.$slots.append?{name:"append",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"append")])),key:"0"}:void 0,e.$slots.before?{name:"before",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"before")])),key:"1"}:void 0,e.$slots.after?{name:"after",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"after")])),key:"2"}:void 0]),1040,["modelValue"])}]]);Y.install=e=>{e.component(Y.name,Y)},K.install=e=>{e.component(K.name,K)},Ye.install=e=>{e.component(Ye.name,Ye)},Z.install=e=>{e.component(Z.name,Z)},Ze.install=e=>{e.component(Ze.name,Ze)},Ke.install=e=>{e.component(Ke.name,Ke)};const Je=c(o.defineComponent({name:"HListItem",directives:{ClosePopup:t.ClosePopup,Ripple:t.Ripple},props:{label:{type:String},icon:{type:String}}}),[["render",function(e,n,l,r,a,i){const s=t.QIcon,u=t.QItemSection,c=t.QItem,d=o.resolveDirective("close-popup"),p=o.resolveDirective("ripple");return o.withDirectives((o.openBlock(),o.createBlock(c,{clickable:""},{default:o.withCtx((()=>[o.createVNode(u,{avatar:""},{default:o.withCtx((()=>[o.createVNode(s,{name:e.icon},null,8,["name"])])),_:1}),o.createVNode(u,null,{default:o.withCtx((()=>[o.createTextVNode(o.toDisplayString(e.label),1)])),_:1})])),_:1})),[[d],[p]])}]]);Je.install=e=>{e.component(Je.name,Je)};const We=c(o.defineComponent({name:"HLoading",components:{DEFAULT:t.QSpinner,AUDIO:t.QSpinnerAudio,BALL:t.QSpinnerBall,BARS:t.QSpinnerBars,BOX:t.QSpinnerBox,CLOCK:t.QSpinnerClock,COMMENT:t.QSpinnerComment,CUBE:t.QSpinnerCube,DOTS:t.QSpinnerDots,FACEBOOK:t.QSpinnerFacebook,GEARS:t.QSpinnerGears,GRID:t.QSpinnerGrid,HEARTS:t.QSpinnerHearts,HOURGLASS:t.QSpinnerHourglass,INFINITY:t.QSpinnerInfinity,IOS:t.QSpinnerIos,ORBIT:t.QSpinnerOrbit,OVAL:t.QSpinnerOval,PIE:t.QSpinnerPie,PUFF:t.QSpinnerPuff,RADIO:t.QSpinnerRadio,RINGS:t.QSpinnerRings,TAIL:t.QSpinnerTail},props:{type:{type:String,default:"default"},color:{type:String,default:"primary"},size:{type:String,default:"60px"}}}),[["render",function(e,n,l,r,a,i){const s=t.QInnerLoading;return o.openBlock(),o.createBlock(s,{showing:"",color:e.color,style:{"z-index":"50"}},{default:o.withCtx((()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.type),{size:e.size,color:e.color},null,8,["size","color"]))])),_:1},8,["color"])}]]);We.install=e=>{e.component(We.name,We)};const Xe=c(o.defineComponent({name:"HPagination",props:{modelValue:{type:Number,required:!0},max:{type:Number,default:0},maxPage:{type:Number,default:7}},emits:["update:modelValue"],setup:(e,{emit:t})=>({pageNumber:o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}})})}),[["render",function(e,n,l,r,a,i){const s=t.QPagination;return o.openBlock(),o.createBlock(s,o.mergeProps({modelValue:e.pageNumber,"onUpdate:modelValue":n[0]||(n[0]=t=>e.pageNumber=t),max:e.max,"max-pages":e.maxPage,"boundary-links":"","direction-links":""},e.$attrs,{"icon-first":"skip_previous","icon-last":"skip_next","icon-prev":"fast_rewind","icon-next":"fast_forward"}),null,16,["modelValue","max","max-pages"])}]]);Xe.install=e=>{e.component(Xe.name,Xe)};const et={particles:{number:{density:{enable:!0,width:1920,height:1080},value:100},links:{distance:125,enable:!0,triangles:{enable:!0,opacity:.1}},move:{enable:!0,speed:5},size:{value:1},shape:{type:"circle"}}},tt=o.defineComponent({name:"HParticles",setup(){const e=o.ref("HParticles");let t;return o.onMounted((()=>{o.nextTick((async()=>{r.tsParticles.init(),await(async(e,t=!0)=>{await a.loadBasic(e,!1),await i.loadParticlesLinksInteraction(e,!1),await e.addPreset("triangles",et,t)})(r.tsParticles),t=await r.tsParticles.load({id:e.value,options:{fullScreen:{zIndex:1},preset:"triangles"}})}))})),o.onUnmounted((()=>{t&&(t.destroy(),t=void 0)})),{id:e}}}),ot=["id"];const nt=c(tt,[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("div",{id:e.id},[o.renderSlot(e.$slots,"default")],8,ot)}]]);nt.install=e=>{e.component(nt.name,nt)};const lt=o.defineComponent({name:"HSignInCornerBottom",props:{startColor:{type:String,default:"#28aff0"},endColor:{type:String,default:"#120fc4"}}}),rt={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",height:"896",width:"967.8852157128662"},at=o.createElementVNode("path",{id:"path-2",opacity:"1","fill-rule":"evenodd",d:"M896,448 C1142.6325445712241,465.5747656464056 695.2579309733121,896 448,896\r\n\t\t\tC200.74206902668806,896 5.684341886080802e-14,695.2579309733121 0,448.0000000000001 C0,200.74206902668806\r\n\t\t\t200.74206902668791,5.684341886080802e-14 447.99999999999994,0 C695.2579309733121,0 475,418 896,448Z"},null,-1),it={id:"linearGradient-3",x1:"0.5",y1:"0",x2:"0.5",y2:"1"},st=["stop-color"],ut=["stop-color"],ct=o.createElementVNode("g",{opacity:"1"},[o.createElementVNode("use",{"xlink:href":"#path-2",fill:"url(#linearGradient-3)","fill-opacity":"1"})],-1);const dt=c(lt,[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("svg",rt,[o.createElementVNode("defs",null,[at,o.createElementVNode("linearGradient",it,[o.createElementVNode("stop",{offset:"0","stop-color":e.startColor,"stop-opacity":"1"},null,8,st),o.createElementVNode("stop",{offset:"1","stop-color":e.endColor,"stop-opacity":"1"},null,8,ut)])]),ct])}]]),pt=o.defineComponent({name:"HSignInCornerTop",props:{startColor:{type:String,default:"#28aff0"},endColor:{type:String,default:"#120fc4"}}}),mt={height:"1337",width:"1337"},ft=o.createElementVNode("path",{id:"path-1",opacity:"1","fill-rule":"evenodd",d:"M1337,668.5 C1337,1037.455193874239 1037.455193874239,1337 668.5,1337 C523.6725684305388,1337 337,1236 370.50000000000006,1094 C434.03835568300906,824.6732385973953 6.906089672974592e-14,892.6277623047779 0,668.5000000000001 C0,299.5448061257611 299.5448061257609,1.1368683772161603e-13 668.4999999999999,0 C1037.455193874239,0 1337,299.544806125761 1337,668.5Z"},null,-1),gt={id:"linearGradient-2",x1:"0.79",y1:"0.62",x2:"0.21",y2:"0.86"},ht=["stop-color"],Ct=["stop-color"],yt=o.createElementVNode("g",{opacity:"1"},[o.createElementVNode("use",{"xlink:href":"#path-1",fill:"url(#linearGradient-2)","fill-opacity":"1"})],-1);const St=c(pt,[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("svg",mt,[o.createElementVNode("defs",null,[ft,o.createElementVNode("linearGradient",gt,[o.createElementVNode("stop",{offset:"0","stop-color":e.startColor,"stop-opacity":"1"},null,8,ht),o.createElementVNode("stop",{offset:"1","stop-color":e.endColor,"stop-opacity":"1"},null,8,Ct)])]),yt])}]]),Vt=o.defineComponent({name:"HSignInBackground",components:{HSignInCornerBottom:dt,HSignInCornerTop:St},props:{startColor:{type:String,required:!0},endColor:{type:String,required:!0}}}),xt={class:"corner-top"},bt={class:"corner-bottom"};const wt=c(Vt,[["render",function(e,t,n,l,r,a){const i=o.resolveComponent("h-sign-in-corner-top"),s=o.resolveComponent("h-sign-in-corner-bottom");return o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("div",xt,[o.createVNode(i,{"start-color":e.startColor,"end-color":e.endColor},null,8,["start-color","end-color"])]),o.createElementVNode("div",bt,[o.createVNode(s,{"start-color":e.endColor,"end-color":e.startColor},null,8,["start-color","end-color"])])])}],["__scopeId","data-v-2a9badba"]]);wt.install=e=>{e.component(wt.name,wt)};const vt=[d,j,C,N,P,Y,R,M,K,p,Ye,A,Je,We,Xe,nt,_,Z,wt,Ze,Ke,m],kt={install:e=>{vt.map((t=>e.component(t.name,t)))}};Object.defineProperty(e,"moment",{enumerable:!0,get:()=>n.moment}),e.BreakPointEnum=y,e.Content=b,e.DURATION_UNITS=V,e.Grid=w,e.HButton=d,e.HCenterLabel=j,e.HChartCard=C,e.HColumn=N,e.HContainer=P,e.HDateTime=Y,e.HDialog=M,e.HDivider=R,e.HDuration=K,e.HIconButton=p,e.HIconSelect=Ye,e.HLabel=A,e.HListItem=Je,e.HLoading=We,e.HPagination=Xe,e.HParticles=nt,e.HRow=_,e.HSelect=Z,e.HSignInBackground=wt,e.HSwitch=Ze,e.HTextField=Ke,e.HVisibilityButton=m,e.SpinnerEnum=S,e.Symbol=x,e.createBackgroundColor=e=>v(b.bg,e),e.createClass=v,e.createColClass=B,e.createTextColor=k,e.default=kt,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("quasar"),require("vue"),require("@herodotus/core"),require("@mdi/js"),require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/interaction-particles-links")):"function"==typeof define&&define.amd?define(["exports","quasar","vue","@herodotus/core","@mdi/js","@tsparticles/engine","@tsparticles/basic","@tsparticles/interaction-particles-links"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@herodotus/components"]={},e.quasar,e.vue,e.HerodotusCore,e.MdiJs,e.TsparticlesEngine,e.TsparticlesBasic,e.TsparticlesInteractionParticlesLinkss)}(this,(function(e,t,o,n,l,r,a,i){"use strict";function s(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const u=s(l),c=(e,t)=>{const o=e.__vccOpts||e;for(const[n,l]of t)o[n]=l;return o};const d=c(o.defineComponent({name:"HButton",props:{tooltip:{type:String,default:""}}}),[["render",function(e,n,l,r,a,i){const s=t.QTooltip,u=t.QBtn;return o.openBlock(),o.createBlock(u,o.normalizeProps(o.guardReactiveProps(e.$attrs)),o.createSlots({loading:o.withCtx((()=>[o.renderSlot(e.$slots,"loading")])),_:2},[!e.$slots.default&&e.tooltip?{name:"default",fn:o.withCtx((()=>[e.tooltip?(o.openBlock(),o.createBlock(s,{key:0},{default:o.withCtx((()=>[o.createTextVNode(o.toDisplayString(e.tooltip),1)])),_:1})):o.createCommentVNode("",!0)])),key:"0"}:void 0]),1040)}]]);const p=c(o.defineComponent({name:"HIconButton",components:{HButton:d},props:{color:{type:String,default:""},size:{type:String,default:""},dense:{type:Boolean,default:!1}}}),[["render",function(e,t,n,l,r,a){const i=o.resolveComponent("h-button");return o.openBlock(),o.createBlock(i,o.mergeProps({flat:"",round:"",color:e.color,dense:e.dense,size:e.size},e.$attrs),null,16,["color","dense","size"])}]]);const m=c(o.defineComponent({name:"HVisibilityButton",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup:(e,{emit:t})=>({isShowPassword:o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}})})}),[["render",function(e,n,l,r,a,i){const s=t.QIcon;return o.openBlock(),o.createBlock(s,{name:e.isShowPassword?"visibility":"visibility_off",class:"cursor-pointer",onClick:n[0]||(n[0]=t=>e.isShowPassword=!e.isShowPassword)},null,8,["name"])}]]);d.install=e=>{e.component(d.name,d)},p.install=e=>{e.component(p.name,p)},m.install=e=>{e.component(m.name,m)};const f=o.defineComponent({name:"HChartCard",props:{title:{type:String},subtitle:{type:String,default:""}}}),g={class:"text-h6"},h={key:0,class:"text-subtitle2"};const C=c(f,[["render",function(e,n,l,r,a,i){const s=t.QCardSection,u=t.QSeparator,c=t.QCard;return o.openBlock(),o.createBlock(c,null,{default:o.withCtx((()=>[o.createVNode(s,null,{default:o.withCtx((()=>[o.createElementVNode("div",g,o.toDisplayString(e.title),1),e.subtitle?(o.openBlock(),o.createElementBlock("div",h,o.toDisplayString(e.subtitle),1)):o.createCommentVNode("",!0)])),_:1}),o.createVNode(u,{inset:""}),o.createVNode(s,null,{default:o.withCtx((()=>[o.renderSlot(e.$slots,"default")])),_:3})])),_:3})}]]);C.install=e=>{e.component(C.name,C)};var y=(e=>(e.xs="xs",e.sm="sm",e.md="md",e.lg="lg",e.xl="xl",e))(y||{}),S=(e=>(e.DEFAULT="default",e.AUDIO="audio",e.BALL="ball",e.BARS="bars",e.BOX="box",e.CLOCK="clock",e.COMMENT="comment",e.CUBE="cube",e.DOTS="dots",e.FACEBOOK="facebook",e.GEARS="gears",e.GRID="grid",e.HEARTS="hearts",e.HOURGLASS="hourglass",e.INFINITY="infinity",e.IOS="ios",e.ORBIT="orbit",e.OVAL="oval",e.PIE="pie",e.PUFF="puff",e.RADIO="radio",e.RINGS="rings",e.TAIL="tail",e))(S||{});const V=[{text:"天",value:"days"},{text:"小时",value:"hours"},{text:"分",value:"minutes"},{text:"秒",value:"seconds"}],x={DASH:"-"},b={text:"text",bg:"bg"},w={auto:"auto",col:"col"},v=(e,...t)=>e+x.DASH+t.join(x.DASH),k=e=>v(b.text,e),B=(e="",t="")=>e&&t?v(w.col,e,t):e?v(w.col,e):t?v(w.col,t):w.col;const N=c(o.defineComponent({name:"HColumn",props:{cols:{type:[String,Number],default:""},xs:{type:String,default:""},sm:{type:String,default:""},md:{type:String,default:""},lg:{type:String,default:""},xl:{type:String,default:""},auto:{type:Boolean,default:!1},color:{type:String,default:""}},setup:e=>({classes:o.computed((()=>{let t=[];return e.auto?t.push(B(w.auto)):e.cols?t.push(B("",e.cols)):(t.push(B()),e.xs&&t.push(B(y.xs,e.xs)),e.sm&&t.push(B(y.sm,e.sm)),e.md&&t.push(B(y.md,e.md)),e.lg&&t.push(B(y.lg,e.lg)),e.xl&&t.push(B(y.xl,e.xl))),e.color&&t.push(k(e.color)),t}))})}),[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.classes)},[o.renderSlot(e.$slots,"default")],2)}]]),H="row",E="column",I="justify",T="self",Q="items",O="q-gutter",D="q-col-gutter";const _=c(o.defineComponent({name:"HRow",props:{column:{type:Boolean,default:!1},self:{type:Boolean,default:!1},align:{type:String,default:"none"},justify:{type:String,default:"none"},gutter:{type:String,default:"none"},gutterCol:{type:Boolean,default:!1},horizontal:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}},setup(e){const t=o.reactive([]),n=(t="",o="")=>{let n=O;return e.gutterCol&&(n=D),o&&(n=n+"-"+o),n=n+"-"+t,n},l=e=>{e&&t.push(e)},r=()=>{var t;l(e.column?E:H),l("none"!==e.justify?I+"-"+e.justify:""),l((()=>{if("none"!==e.align){let t=Q;return e.self&&(t=T),t+"-"+e.align}return""})()),"none"!==e.gutter&&(e.horizontal||e.vertical?(e.horizontal&&l((t=e.gutter,n(t,"x"))),e.vertical&&l((e=>n(e,"y"))(e.gutter))):l(n(e.gutter)))};return o.onMounted((()=>{r()})),{getClasses:()=>t.length>1?t.join(" "):1===t.length?t[0]:H}}}),[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.getClasses())},[o.renderSlot(e.$slots,"default")],2)}]]);const P=c(o.defineComponent({name:"HContainer",components:{HRow:_,HColumn:N},props:{mode:{type:String,default:"three"},wider:{type:String,default:"default"},offset:{type:Number,default:0}},setup(e){const t=o.reactive({leftCols:4,centerCols:4,rightCols:4}),n=()=>"two"===e.mode,l=t=>t+e.offset,r=t=>t-e.offset,a=e=>{t.leftCols=l(e),t.rightCols=r(e)},i=e=>{t.leftCols=r(e),t.rightCols=l(e)},s=(e,o=0)=>{t.leftCols=e,t.rightCols=e+o},u=()=>{t.centerCols=4},c=()=>4+e.offset,d=()=>12-c(),p=o.computed((()=>t.leftCols>t.rightCols)),m=o.computed((()=>t.leftCols{if(n())switch(e.wider){case"start":a(6);break;case"end":i(6);break;default:s(6)}else switch(e.wider){case"center":t.centerCols=c();const e=d()/2;o=d(),0===Math.abs(o%2)?s(e):s(e,1);break;case"start":u(),a(4);break;case"end":u(),i(4);break;default:u(),s(4)}var o};return o.onBeforeMount((()=>{f()})),{...o.toRefs(t),isTwoColumn:n,isToTheLeft:p,isToTheRight:m}}}),[["render",function(e,t,n,l,r,a){const i=o.resolveComponent("h-column"),s=o.resolveComponent("h-row");return e.isTwoColumn()?(o.openBlock(),o.createBlock(s,o.normalizeProps(o.mergeProps({key:0},e.$attrs)),{default:o.withCtx((()=>[o.createVNode(i,{cols:e.leftCols},{default:o.withCtx((()=>[e.isToTheLeft?o.renderSlot(e.$slots,"default",{key:0}):o.renderSlot(e.$slots,"left",{key:1})])),_:3},8,["cols"]),o.createVNode(i,{cols:e.rightCols},{default:o.withCtx((()=>[e.isToTheRight?o.renderSlot(e.$slots,"default",{key:0}):o.renderSlot(e.$slots,"right",{key:1})])),_:3},8,["cols"])])),_:3},16)):(o.openBlock(),o.createBlock(s,o.normalizeProps(o.mergeProps({key:1},e.$attrs)),{default:o.withCtx((()=>[o.createVNode(i,{cols:e.leftCols},{default:o.withCtx((()=>[o.renderSlot(e.$slots,"left")])),_:3},8,["cols"]),o.createVNode(i,{cols:e.centerCols},{default:o.withCtx((()=>[o.renderSlot(e.$slots,"default")])),_:3},8,["cols"]),o.createVNode(i,{cols:e.rightCols},{default:o.withCtx((()=>[o.renderSlot(e.$slots,"right")])),_:3},8,["cols"])])),_:3},16))}]]);N.install=e=>{e.component(N.name,N)},P.install=e=>{e.component(P.name,P)},_.install=e=>{e.component(_.name,_)};const A=c(o.defineComponent({name:"HLabel",props:{size:{type:String,default:""},weight:{type:String,default:"medium"},align:{type:String,default:"center"},text:String},setup(e){const t=e=>"text-"+e;return{display:o.computed((()=>{const o=[t(e.align),"font-weight-"+e.weight],n=e.size?t(e.size):"";return n&&o.push(n),o.join(" ")}))}}}),[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.display)},o.toDisplayString(e.text),3)}]]),L=o.defineComponent({name:"HCenterLabel",props:{height:{type:String,default:"100px"},text:String}}),z={class:"col-12 self-center"};const j=c(L,[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("div",{class:"row text-center",style:o.normalizeStyle(`height: ${e.height}`)},[o.createElementVNode("div",z,o.toDisplayString(e.text),1)],4)}]]);A.install=e=>{e.component(A.name,A)},j.install=e=>{e.component(j.name,j)};const R=c(o.defineComponent({name:"HDivider",components:{HContainer:P,HLabel:A},props:{wider:{type:String,default:"center"},weight:{type:String,default:"medium"},offset:{type:Number,default:0},label:String},setup:e=>({textWeight:o.computed((()=>"text-center text-weight-"+e.weight))})}),[["render",function(e,n,l,r,a,i){const s=t.QSeparator,u=o.resolveComponent("h-label"),c=o.resolveComponent("h-container");return o.openBlock(),o.createBlock(c,{mode:"three",offset:e.offset,wider:e.wider,align:"center"},{left:o.withCtx((()=>[o.createVNode(s)])),right:o.withCtx((()=>[o.createVNode(s)])),default:o.withCtx((()=>[o.createVNode(u,{text:e.label,weight:e.weight},null,8,["text","weight"])])),_:1},8,["offset","wider"])}]]);R.install=e=>{e.component(R.name,R)};const U=o.defineComponent({name:"HDialog",props:{modelValue:{type:Boolean,default:!1,required:!0},loading:{type:Boolean,default:!1},title:{type:String,default:""},height:{type:String,default:"500px"},spinnerSize:{type:String,default:"50px"},hideConfirm:{type:Boolean,default:!1},hideCancel:{type:Boolean,default:!1},hideClose:{type:Boolean,default:!1}},emits:["update:modelValue","update:loading","confirm","cancel","close"],setup(e,{emit:t}){const n=o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}}),l=o.computed({get:()=>e.loading,set:e=>{t("update:loading",e)}});return{showDialog:n,showLoading:l,onClose:()=>{n.value=!1,t("close")},onCancel:()=>{n.value=!1,t("cancel")},onConfirm:()=>{l.value=!0,n.value=!1,t("confirm")}}}}),$={class:"text-h6"};const M=c(U,[["render",function(e,n,l,r,a,i){const s=t.QSpace,u=t.QBtn,c=t.QCardSection,d=t.QSeparator,p=t.QCardActions,m=t.QSpinnerDots,f=t.QInnerLoading,g=t.QCard,h=t.QDialog;return o.openBlock(),o.createBlock(h,o.mergeProps({modelValue:e.showDialog,"onUpdate:modelValue":n[3]||(n[3]=t=>e.showDialog=t),persistent:""},e.$attrs),{default:o.withCtx((()=>[o.createVNode(g,{class:"q-py-none",style:o.normalizeStyle(`min-width: ${e.height}`)},{default:o.withCtx((()=>[o.createVNode(c,{class:"row items-center"},{default:o.withCtx((()=>[o.createElementVNode("div",$,o.toDisplayString(e.title),1),o.createVNode(s),e.hideClose?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(u,{key:0,icon:"close",flat:"",round:"",dense:"",onClick:n[0]||(n[0]=t=>e.onClose())}))])),_:1}),o.createVNode(d),o.createVNode(c,null,{default:o.withCtx((()=>[o.renderSlot(e.$slots,"default")])),_:3}),o.createVNode(p,{align:"right",class:"text-primary"},{default:o.withCtx((()=>[e.hideCancel?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(u,{key:0,label:"取消",color:"red",onClick:n[1]||(n[1]=t=>e.onCancel())})),e.hideConfirm?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(u,{key:1,label:"确认",color:"primary",onClick:n[2]||(n[2]=t=>e.onConfirm())}))])),_:1}),o.createVNode(f,{showing:e.showLoading},{default:o.withCtx((()=>[o.createVNode(m,{size:e.spinnerSize,color:"primary"},null,8,["size"])])),_:1},8,["showing"])])),_:3},8,["style"])])),_:3},16,["modelValue"])}]]);M.install=e=>{e.component(M.name,M)};const G=o.defineComponent({name:"HDateTime",directives:{ClosePopup:t.ClosePopup},props:{modelValue:{type:String},errorMessage:{type:String}},emits:["update:modelValue"],setup:(e,{emit:t})=>({dateTimeValue:o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}}),hasError:o.computed((()=>!!e.errorMessage))})}),q={class:"row items-center justify-end"},F={class:"row items-center justify-end"};const Y=c(G,[["render",function(e,n,l,r,a,i){const s=t.QBtn,u=t.QDate,c=t.QPopupProxy,d=t.QIcon,p=t.QTime,m=t.QInput,f=o.resolveDirective("close-popup");return o.openBlock(),o.createBlock(m,o.mergeProps({modelValue:e.dateTimeValue,"onUpdate:modelValue":n[2]||(n[2]=t=>e.dateTimeValue=t),outlined:"",clearable:"","bottom-slots":e.hasError,error:e.hasError,"error-message":e.errorMessage},e.$attrs),{prepend:o.withCtx((()=>[o.createVNode(d,{name:"event",class:"cursor-pointer"},{default:o.withCtx((()=>[o.createVNode(c,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o.withCtx((()=>[o.createVNode(u,{modelValue:e.dateTimeValue,"onUpdate:modelValue":n[0]||(n[0]=t=>e.dateTimeValue=t),mask:"YYYY-MM-DD HH:mm:ss"},{default:o.withCtx((()=>[o.createElementVNode("div",q,[o.withDirectives(o.createVNode(s,{label:"关闭",color:"primary"},null,512),[[f]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),append:o.withCtx((()=>[o.createVNode(d,{name:"access_time",class:"cursor-pointer"},{default:o.withCtx((()=>[o.createVNode(c,{cover:"","transition-show":"scale","transition-hide":"scale"},{default:o.withCtx((()=>[o.createVNode(p,{modelValue:e.dateTimeValue,"onUpdate:modelValue":n[1]||(n[1]=t=>e.dateTimeValue=t),mask:"YYYY-MM-DD HH:mm:ss",format24h:"","with-seconds":""},{default:o.withCtx((()=>[o.createElementVNode("div",F,[o.withDirectives(o.createVNode(s,{label:"关闭",color:"primary"},null,512),[[f]])])])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1},16,["modelValue","bottom-slots","error","error-message"])}]]);const Z=c(o.defineComponent({name:"HSelect",props:{modelValue:{type:[Number,String,Array,Object]},optionLabel:{type:String,default:"text"},optionValue:{type:String,default:"value"},errorMessage:{type:String}},emits:["update:modelValue"],setup:(e,{emit:t})=>({selectedValue:o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}}),hasError:o.computed((()=>!!e.errorMessage))})}),[["render",function(e,n,l,r,a,i){const s=t.QSelect;return o.openBlock(),o.createBlock(s,o.mergeProps({modelValue:e.selectedValue,"onUpdate:modelValue":n[0]||(n[0]=t=>e.selectedValue=t),"option-label":e.optionLabel,"option-value":e.optionValue,outlined:"",clearable:"","emit-value":"","map-options":"","transition-show":"scale","transition-hide":"scale","bottom-slots":e.hasError,error:e.hasError,"error-message":e.errorMessage},e.$attrs),null,16,["modelValue","option-label","option-value","bottom-slots","error","error-message"])}]]);const K=c(o.defineComponent({name:"HDuration",components:{HSelect:Z},props:{modelValue:{type:[String,Number],defalut:""}},emits:["update:modelValue"],setup(e,{emit:t}){const l=o.ref(0),r=o.ref(""),a=o.ref(V),i=o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}}),s=(e,t)=>{if(e&&t){const o=t,l=n.moment.duration(e,o).toISOString();i.value=l}};return o.watch((()=>e.modelValue),(e=>{e&&(e=>{if(e){let t=n.moment.duration(e,"second");if(t){const e=t._data;for(let t in e){let o=t,n=e[o];n&&(l.value=n,r.value=o)}}}})(e)}),{immediate:!0}),o.watch((()=>r.value),(e=>{e&&s(l.value,e)})),o.watch((()=>l.value),(e=>{e&&s(e,r.value)})),{durationValue:i,amount:l,unit:r,options:a}}}),[["render",function(e,t,n,l,r,a){const i=o.resolveComponent("h-text-field"),s=o.resolveComponent("h-select"),u=o.resolveComponent("h-container");return o.openBlock(),o.createBlock(u,{mode:"two",gutter:"xs","gutter-col":"",horizontal:""},{left:o.withCtx((()=>[o.createVNode(i,{modelValue:e.amount,"onUpdate:modelValue":t[0]||(t[0]=t=>e.amount=t),modelModifiers:{number:!0},label:"数值",placeholder:"请输入数值",type:"number","hide-hint":""},null,8,["modelValue"])])),right:o.withCtx((()=>[o.createVNode(s,{modelValue:e.unit,"onUpdate:modelValue":t[1]||(t[1]=t=>e.unit=t),options:e.options,label:"单位","hide-hint":""},null,8,["modelValue","options"])])),_:1})}]]);var J="object"==typeof global&&global&&global.Object===Object&&global,W="object"==typeof self&&self&&self.Object===Object&&self,X=(J||W||Function("return this")()).Symbol,ee=Object.prototype,te=ee.hasOwnProperty,oe=ee.toString,ne=X?X.toStringTag:void 0;var le=Object.prototype.toString;var re="[object Null]",ae="[object Undefined]",ie=X?X.toStringTag:void 0;function se(e){return null==e?void 0===e?ae:re:ie&&ie in Object(e)?function(e){var t=te.call(e,ne),o=e[ne];try{e[ne]=void 0;var n=!0}catch(r){}var l=oe.call(e);return n&&(t?e[ne]=o:delete e[ne]),l}(e):function(e){return le.call(e)}(e)}var ue="[object Symbol]";var ce=Array.isArray,de=1/0,pe=X?X.prototype:void 0,me=pe?pe.toString:void 0;function fe(e){if("string"==typeof e)return e;if(ce(e))return function(e,t){for(var o=-1,n=null==e?0:e.length,l=Array(n);++oe.modelValue,set:e=>{t("update:modelValue",e)}});let l=[];const r=o.ref(l);o.onMounted((()=>{l=Object.keys(u).map((e=>Fe(e)))}));return{selectedValue:n,options:r,filter:(e,t,o)=>{e.length<3?o():t((()=>{const t=e.toLowerCase();r.value=l.filter((e=>e.toLowerCase().match(t)))}))}}}}),[["render",function(e,n,l,r,a,i){const s=t.QIcon,u=t.QItemSection,c=t.QItemLabel,d=t.QItem,p=t.QSelect;return o.openBlock(),o.createBlock(p,o.mergeProps({ref:"selectRef",modelValue:e.selectedValue,"onUpdate:modelValue":n[0]||(n[0]=t=>e.selectedValue=t),options:e.options,outlined:"",clearable:"","use-input":"","use-chips":"","emit-value":"","bottom-slots":"","input-debounce":"300","transition-show":"scale","transition-hide":"scale",onFilter:e.filter},e.$attrs),o.createSlots({option:o.withCtx((e=>[o.createVNode(d,o.normalizeProps(o.guardReactiveProps(e.itemProps)),{default:o.withCtx((()=>[o.createVNode(u,{avatar:""},{default:o.withCtx((()=>[o.createVNode(s,{name:e.opt},null,8,["name"])])),_:2},1024),o.createVNode(u,null,{default:o.withCtx((()=>[o.createVNode(c,null,{default:o.withCtx((()=>[o.createTextVNode(o.toDisplayString(e.opt),1)])),_:2},1024)])),_:2},1024)])),_:2},1040)])),"no-option":o.withCtx((()=>[o.createVNode(d,null,{default:o.withCtx((()=>[o.createVNode(u,{class:"text-grey"},{default:o.withCtx((()=>n[1]||(n[1]=[o.createTextVNode("没有数据")]))),_:1})])),_:1})])),_:2},[e.selectedValue?{name:"prepend",fn:o.withCtx((()=>[o.createVNode(s,{name:e.selectedValue,color:"primary"},null,8,["name"])])),key:"0"}:void 0]),1040,["modelValue","options","onFilter"])}]]);const Ze=c(o.defineComponent({name:"HSwitch",props:{modelValue:{type:[Boolean,Number,String],default:!1},trueValue:{type:[Boolean,Number,String],default:!0},falseValue:{type:[Boolean,Number,String],default:!1},color:{type:String,default:"primary"}},emits:["update:modelValue"],setup:(e,{emit:t})=>({switchValue:o.computed({get:()=>e.modelValue?e.modelValue:e.falseValue,set:e=>{t("update:modelValue",e)}})})}),[["render",function(e,n,l,r,a,i){const s=t.QToggle;return o.openBlock(),o.createBlock(s,o.mergeProps({modelValue:e.switchValue,"onUpdate:modelValue":n[0]||(n[0]=t=>e.switchValue=t),"true-value":e.trueValue,"false-value":e.falseValue,color:e.color},e.$attrs),null,16,["modelValue","true-value","false-value","color"])}]]);const Ke=c(o.defineComponent({name:"HTextField",props:{modelValue:{type:[String,Number]}},emits:["update:modelValue"],setup:(e,{emit:t,slots:n})=>({text:o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}})})}),[["render",function(e,n,l,r,a,i){const s=t.QInput;return o.openBlock(),o.createBlock(s,o.mergeProps({modelValue:e.text,"onUpdate:modelValue":n[0]||(n[0]=t=>e.text=t),outlined:"",clearable:"","bottom-slots":""},e.$attrs),o.createSlots({_:2},[e.$slots.append?{name:"append",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"append")])),key:"0"}:void 0,e.$slots.before?{name:"before",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"before")])),key:"1"}:void 0,e.$slots.after?{name:"after",fn:o.withCtx((()=>[o.renderSlot(e.$slots,"after")])),key:"2"}:void 0]),1040,["modelValue"])}]]);Y.install=e=>{e.component(Y.name,Y)},K.install=e=>{e.component(K.name,K)},Ye.install=e=>{e.component(Ye.name,Ye)},Z.install=e=>{e.component(Z.name,Z)},Ze.install=e=>{e.component(Ze.name,Ze)},Ke.install=e=>{e.component(Ke.name,Ke)};const Je=c(o.defineComponent({name:"HListItem",directives:{ClosePopup:t.ClosePopup,Ripple:t.Ripple},props:{label:{type:String},icon:{type:String}}}),[["render",function(e,n,l,r,a,i){const s=t.QIcon,u=t.QItemSection,c=t.QItem,d=o.resolveDirective("close-popup"),p=o.resolveDirective("ripple");return o.withDirectives((o.openBlock(),o.createBlock(c,{clickable:""},{default:o.withCtx((()=>[o.createVNode(u,{avatar:""},{default:o.withCtx((()=>[o.createVNode(s,{name:e.icon},null,8,["name"])])),_:1}),o.createVNode(u,null,{default:o.withCtx((()=>[o.createTextVNode(o.toDisplayString(e.label),1)])),_:1})])),_:1})),[[d],[p]])}]]);Je.install=e=>{e.component(Je.name,Je)};const We=c(o.defineComponent({name:"HLoading",components:{DEFAULT:t.QSpinner,AUDIO:t.QSpinnerAudio,BALL:t.QSpinnerBall,BARS:t.QSpinnerBars,BOX:t.QSpinnerBox,CLOCK:t.QSpinnerClock,COMMENT:t.QSpinnerComment,CUBE:t.QSpinnerCube,DOTS:t.QSpinnerDots,FACEBOOK:t.QSpinnerFacebook,GEARS:t.QSpinnerGears,GRID:t.QSpinnerGrid,HEARTS:t.QSpinnerHearts,HOURGLASS:t.QSpinnerHourglass,INFINITY:t.QSpinnerInfinity,IOS:t.QSpinnerIos,ORBIT:t.QSpinnerOrbit,OVAL:t.QSpinnerOval,PIE:t.QSpinnerPie,PUFF:t.QSpinnerPuff,RADIO:t.QSpinnerRadio,RINGS:t.QSpinnerRings,TAIL:t.QSpinnerTail},props:{type:{type:String,default:"default"},color:{type:String,default:"primary"},size:{type:String,default:"60px"}}}),[["render",function(e,n,l,r,a,i){const s=t.QInnerLoading;return o.openBlock(),o.createBlock(s,{showing:"",color:e.color,style:{"z-index":"50"}},{default:o.withCtx((()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.type),{size:e.size,color:e.color},null,8,["size","color"]))])),_:1},8,["color"])}]]);We.install=e=>{e.component(We.name,We)};const Xe=c(o.defineComponent({name:"HPagination",props:{modelValue:{type:Number,required:!0},max:{type:Number,default:0},maxPage:{type:Number,default:7}},emits:["update:modelValue"],setup:(e,{emit:t})=>({pageNumber:o.computed({get:()=>e.modelValue,set:e=>{t("update:modelValue",e)}})})}),[["render",function(e,n,l,r,a,i){const s=t.QPagination;return o.openBlock(),o.createBlock(s,o.mergeProps({modelValue:e.pageNumber,"onUpdate:modelValue":n[0]||(n[0]=t=>e.pageNumber=t),max:e.max,"max-pages":e.maxPage,"boundary-links":"","direction-links":""},e.$attrs,{"icon-first":"skip_previous","icon-last":"skip_next","icon-prev":"fast_rewind","icon-next":"fast_forward"}),null,16,["modelValue","max","max-pages"])}]]);Xe.install=e=>{e.component(Xe.name,Xe)};const et={particles:{number:{density:{enable:!0,width:1920,height:1080},value:100},links:{distance:125,enable:!0,triangles:{enable:!0,opacity:.1}},move:{enable:!0,speed:5},size:{value:1},shape:{type:"circle"}}},tt=o.defineComponent({name:"HParticles",setup(){const e=o.ref("HParticles");let t;return o.onMounted((()=>{o.nextTick((async()=>{r.tsParticles.init(),await(async(e,t=!0)=>{await a.loadBasic(e,!1),await i.loadParticlesLinksInteraction(e,!1),await e.addPreset("triangles",et,t)})(r.tsParticles),t=await r.tsParticles.load({id:e.value,options:{fullScreen:{zIndex:1},preset:"triangles"}})}))})),o.onUnmounted((()=>{t&&(t.destroy(),t=void 0)})),{id:e}}}),ot=["id"];const nt=c(tt,[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("div",{id:e.id},[o.renderSlot(e.$slots,"default")],8,ot)}]]);nt.install=e=>{e.component(nt.name,nt)};const lt=o.defineComponent({name:"HSignInCornerBottom",props:{startColor:{type:String,default:"#28aff0"},endColor:{type:String,default:"#120fc4"}}}),rt={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",height:"896",width:"967.8852157128662"},at={id:"linearGradient-3",x1:"0.5",y1:"0",x2:"0.5",y2:"1"},it=["stop-color"],st=["stop-color"];const ut=c(lt,[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("svg",rt,[o.createElementVNode("defs",null,[t[0]||(t[0]=o.createElementVNode("path",{id:"path-2",opacity:"1","fill-rule":"evenodd",d:"M896,448 C1142.6325445712241,465.5747656464056 695.2579309733121,896 448,896\r\n\t\t\tC200.74206902668806,896 5.684341886080802e-14,695.2579309733121 0,448.0000000000001 C0,200.74206902668806\r\n\t\t\t200.74206902668791,5.684341886080802e-14 447.99999999999994,0 C695.2579309733121,0 475,418 896,448Z"},null,-1)),o.createElementVNode("linearGradient",at,[o.createElementVNode("stop",{offset:"0","stop-color":e.startColor,"stop-opacity":"1"},null,8,it),o.createElementVNode("stop",{offset:"1","stop-color":e.endColor,"stop-opacity":"1"},null,8,st)])]),t[1]||(t[1]=o.createElementVNode("g",{opacity:"1"},[o.createElementVNode("use",{"xlink:href":"#path-2",fill:"url(#linearGradient-3)","fill-opacity":"1"})],-1))])}]]),ct=o.defineComponent({name:"HSignInCornerTop",props:{startColor:{type:String,default:"#28aff0"},endColor:{type:String,default:"#120fc4"}}}),dt={height:"1337",width:"1337"},pt={id:"linearGradient-2",x1:"0.79",y1:"0.62",x2:"0.21",y2:"0.86"},mt=["stop-color"],ft=["stop-color"];const gt=c(ct,[["render",function(e,t,n,l,r,a){return o.openBlock(),o.createElementBlock("svg",dt,[o.createElementVNode("defs",null,[t[0]||(t[0]=o.createElementVNode("path",{id:"path-1",opacity:"1","fill-rule":"evenodd",d:"M1337,668.5 C1337,1037.455193874239 1037.455193874239,1337 668.5,1337 C523.6725684305388,1337 337,1236 370.50000000000006,1094 C434.03835568300906,824.6732385973953 6.906089672974592e-14,892.6277623047779 0,668.5000000000001 C0,299.5448061257611 299.5448061257609,1.1368683772161603e-13 668.4999999999999,0 C1037.455193874239,0 1337,299.544806125761 1337,668.5Z"},null,-1)),o.createElementVNode("linearGradient",pt,[o.createElementVNode("stop",{offset:"0","stop-color":e.startColor,"stop-opacity":"1"},null,8,mt),o.createElementVNode("stop",{offset:"1","stop-color":e.endColor,"stop-opacity":"1"},null,8,ft)])]),t[1]||(t[1]=o.createElementVNode("g",{opacity:"1"},[o.createElementVNode("use",{"xlink:href":"#path-1",fill:"url(#linearGradient-2)","fill-opacity":"1"})],-1))])}]]),ht=o.defineComponent({name:"HSignInBackground",components:{HSignInCornerBottom:ut,HSignInCornerTop:gt},props:{startColor:{type:String,required:!0},endColor:{type:String,required:!0}}}),Ct={class:"corner-top"},yt={class:"corner-bottom"};const St=c(ht,[["render",function(e,t,n,l,r,a){const i=o.resolveComponent("h-sign-in-corner-top"),s=o.resolveComponent("h-sign-in-corner-bottom");return o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("div",Ct,[o.createVNode(i,{"start-color":e.startColor,"end-color":e.endColor},null,8,["start-color","end-color"])]),o.createElementVNode("div",yt,[o.createVNode(s,{"start-color":e.endColor,"end-color":e.startColor},null,8,["start-color","end-color"])])])}],["__scopeId","data-v-2a9badba"]]);St.install=e=>{e.component(St.name,St)};const Vt=[d,j,C,N,P,Y,R,M,K,p,Ye,A,Je,We,Xe,nt,_,Z,St,Ze,Ke,m],xt={install:e=>{Vt.map((t=>e.component(t.name,t)))}};Object.defineProperty(e,"moment",{enumerable:!0,get:()=>n.moment}),e.BreakPointEnum=y,e.Content=b,e.DURATION_UNITS=V,e.Grid=w,e.HButton=d,e.HCenterLabel=j,e.HChartCard=C,e.HColumn=N,e.HContainer=P,e.HDateTime=Y,e.HDialog=M,e.HDivider=R,e.HDuration=K,e.HIconButton=p,e.HIconSelect=Ye,e.HLabel=A,e.HListItem=Je,e.HLoading=We,e.HPagination=Xe,e.HParticles=nt,e.HRow=_,e.HSelect=Z,e.HSignInBackground=St,e.HSwitch=Ze,e.HTextField=Ke,e.HVisibilityButton=m,e.SpinnerEnum=S,e.Symbol=x,e.createBackgroundColor=e=>v(b.bg,e),e.createClass=v,e.createColClass=B,e.createTextColor=k,e.default=xt,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
diff --git a/shared/components/package.json b/shared/components/package.json
index 54c40ea2..5ae87cfc 100644
--- a/shared/components/package.json
+++ b/shared/components/package.json
@@ -32,6 +32,6 @@
"@tsparticles/basic": "^3.5.0",
"@tsparticles/engine": "^3.5.0",
"@tsparticles/interaction-particles-links": "^3.5.0",
- "quasar": "^2.16.9"
+ "quasar": "^2.16.11"
}
}
diff --git a/shared/core/package.json b/shared/core/package.json
index 8b49a08a..4c1393d5 100644
--- a/shared/core/package.json
+++ b/shared/core/package.json
@@ -27,14 +27,14 @@
"preview": "vite preview"
},
"dependencies": {
- "axios": "^1.7.5",
+ "axios": "^1.7.7",
"crypto-js": "^4.2.0",
"generate-avatar": "^1.4.10",
"js-base64": "^3.7.7",
"lodash-es": "^4.17.21",
"moment": "^2.30.1",
"sm-crypto": "^0.3.13",
- "sweetalert2": "^11.12.4"
+ "sweetalert2": "^11.13.3"
},
"devDependencies": {
"@types/crypto-js": "^4.2.2",