@processmaker/modeler 1.36.3 → 1.36.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modeler.common.js +78 -78
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +78 -78
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +1 -1
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/modeler/Modeler.vue +1 -1
package/dist/modeler.umd.min.js
CHANGED
|
@@ -31,5 +31,5 @@ function n(e){var t=Number(e.version.split(".")[0]);if(t>=2)e.mixin({beforeCreat
|
|
|
31
31
|
*/
|
|
32
32
|
var n="undefined"!==typeof window&&"undefined"!==typeof document&&"undefined"!==typeof navigator,o=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();function i(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}function r(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),o))}}var a=n&&window.Promise,s=a?i:r;function c(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function l(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView,o=n.getComputedStyle(e,null);return t?o[t]:o}function d(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function u(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=l(e),n=t.overflow,o=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+o)?e:u(d(e))}function p(e){return e&&e.referenceNode?e.referenceNode:e}var h=n&&!(!window.MSInputMethodContext||!document.documentMode),f=n&&/MSIE 10/.test(navigator.userAgent);function m(e){return 11===e?h:10===e?f:h||f}function g(e){if(!e)return document.documentElement;var t=m(10)?document.body:null,n=e.offsetParent||null;while(n===t&&e.nextElementSibling)n=(e=e.nextElementSibling).offsetParent;var o=n&&n.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===l(n,"position")?g(n):n:e?e.ownerDocument.documentElement:document.documentElement}function v(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||g(e.firstElementChild)===e)}function b(e){return null!==e.parentNode?b(e.parentNode):e}function y(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,i=n?t:e,r=document.createRange();r.setStart(o,0),r.setEnd(i,0);var a=r.commonAncestorContainer;if(e!==a&&t!==a||o.contains(i))return v(a)?a:g(a);var s=b(e);return s.host?y(s.host,t):y(e,b(t).host)}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",o=e.nodeName;if("BODY"===o||"HTML"===o){var i=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||i;return r[n]}return e[n]}function x(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=w(t,"top"),i=w(t,"left"),r=n?-1:1;return e.top+=o*r,e.bottom+=o*r,e.left+=i*r,e.right+=i*r,e}function k(e,t){var n="x"===t?"Left":"Top",o="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+o+"Width"])}function C(e,t,n,o){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],m(10)?parseInt(n["offset"+e])+parseInt(o["margin"+("Height"===e?"Top":"Left")])+parseInt(o["margin"+("Height"===e?"Bottom":"Right")]):0)}function S(e){var t=e.body,n=e.documentElement,o=m(10)&&getComputedStyle(n);return{height:C("Height",t,n,o),width:C("Width",t,n,o)}}var E=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},A=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),M=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};function P(e){return T({},e,{right:e.left+e.width,bottom:e.top+e.height})}function _(e){var t={};try{if(m(10)){t=e.getBoundingClientRect();var n=w(e,"top"),o=w(e,"left");t.top+=n,t.left+=o,t.bottom+=n,t.right+=o}else t=e.getBoundingClientRect()}catch(p){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},r="HTML"===e.nodeName?S(e.ownerDocument):{},a=r.width||e.clientWidth||i.width,s=r.height||e.clientHeight||i.height,c=e.offsetWidth-a,d=e.offsetHeight-s;if(c||d){var u=l(e);c-=k(u,"x"),d-=k(u,"y"),i.width-=c,i.height-=d}return P(i)}function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=m(10),i="HTML"===t.nodeName,r=_(e),a=_(t),s=u(e),c=l(t),d=parseFloat(c.borderTopWidth),p=parseFloat(c.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var h=P({top:r.top-a.top-d,left:r.left-a.left-p,width:r.width,height:r.height});if(h.marginTop=0,h.marginLeft=0,!o&&i){var f=parseFloat(c.marginTop),g=parseFloat(c.marginLeft);h.top-=d-f,h.bottom-=d-f,h.left-=p-g,h.right-=p-g,h.marginTop=f,h.marginLeft=g}return(o&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(h=x(h,t)),h}function D(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,o=O(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:w(n),s=t?0:w(n,"left"),c={top:a-o.top+o.marginTop,left:s-o.left+o.marginLeft,width:i,height:r};return P(c)}function I(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===l(e,"position"))return!0;var n=d(e);return!!n&&I(n)}function N(e){if(!e||!e.parentElement||m())return document.documentElement;var t=e.parentElement;while(t&&"none"===l(t,"transform"))t=t.parentElement;return t||document.documentElement}function R(e,t,n,o){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},a=i?N(e):y(e,p(t));if("viewport"===o)r=D(a,i);else{var s=void 0;"scrollParent"===o?(s=u(d(t)),"BODY"===s.nodeName&&(s=e.ownerDocument.documentElement)):s="window"===o?e.ownerDocument.documentElement:o;var c=O(s,a,i);if("HTML"!==s.nodeName||I(a))r=c;else{var l=S(e.ownerDocument),h=l.height,f=l.width;r.top+=c.top-c.marginTop,r.bottom=h+c.top,r.left+=c.left-c.marginLeft,r.right=f+c.left}}n=n||0;var m="number"===typeof n;return r.left+=m?n:n.left||0,r.top+=m?n:n.top||0,r.right-=m?n:n.right||0,r.bottom-=m?n:n.bottom||0,r}function j(e){var t=e.width,n=e.height;return t*n}function L(e,t,n,o,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=R(n,o,r,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},c=Object.keys(s).map((function(e){return T({key:e},s[e],{area:j(s[e])})})).sort((function(e,t){return t.area-e.area})),l=c.filter((function(e){var t=e.width,o=e.height;return t>=n.clientWidth&&o>=n.clientHeight})),d=l.length>0?l[0].key:c[0].key,u=e.split("-")[1];return d+(u?"-"+u:"")}function B(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=o?N(t):y(t,p(n));return O(n,i,o)}function F(e){var t=e.ownerDocument.defaultView,n=t.getComputedStyle(e),o=parseFloat(n.marginTop||0)+parseFloat(n.marginBottom||0),i=parseFloat(n.marginLeft||0)+parseFloat(n.marginRight||0),r={width:e.offsetWidth+i,height:e.offsetHeight+o};return r}function z(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function H(e,t,n){n=n.split("-")[0];var o=F(e),i={width:o.width,height:o.height},r=-1!==["right","left"].indexOf(n),a=r?"top":"left",s=r?"left":"top",c=r?"height":"width",l=r?"width":"height";return i[a]=t[a]+t[c]/2-o[c]/2,i[s]=n===s?t[s]-o[l]:t[z(s)],i}function q(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function V(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var o=q(e,(function(e){return e[t]===n}));return e.indexOf(o)}function U(e,t,n){var o=void 0===n?e:e.slice(0,V(e,"name",n));return o.forEach((function(e){e["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e["function"]||e.fn;e.enabled&&c(n)&&(t.offsets.popper=P(t.offsets.popper),t.offsets.reference=P(t.offsets.reference),t=n(t,e))})),t}function G(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=B(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=L(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=H(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=U(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some((function(e){var n=e.name,o=e.enabled;return o&&n===t}))}function $(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o<t.length;o++){var i=t[o],r=i?""+i+n:e;if("undefined"!==typeof document.body.style[r])return r}return null}function X(){return this.state.isDestroyed=!0,W(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[$("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function Y(e){var t=e.ownerDocument;return t?t.defaultView:window}function Z(e,t,n,o){var i="BODY"===e.nodeName,r=i?e.ownerDocument.defaultView:e;r.addEventListener(t,n,{passive:!0}),i||Z(u(r.parentNode),t,n,o),o.push(r)}function K(e,t,n,o){n.updateBound=o,Y(e).addEventListener("resize",n.updateBound,{passive:!0});var i=u(e);return Z(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function J(){this.state.eventsEnabled||(this.state=K(this.reference,this.options,this.state,this.scheduleUpdate))}function Q(e,t){return Y(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function ee(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=Q(this.reference,this.state))}function te(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function ne(e,t){Object.keys(t).forEach((function(n){var o="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&te(t[n])&&(o="px"),e.style[n]=t[n]+o}))}function oe(e,t){Object.keys(t).forEach((function(n){var o=t[n];!1!==o?e.setAttribute(n,t[n]):e.removeAttribute(n)}))}function ie(e){return ne(e.instance.popper,e.styles),oe(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&ne(e.arrowElement,e.arrowStyles),e}function re(e,t,n,o,i){var r=B(i,t,e,n.positionFixed),a=L(n.placement,r,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),ne(t,{position:n.positionFixed?"fixed":"absolute"}),n}function ae(e,t){var n=e.offsets,o=n.popper,i=n.reference,r=Math.round,a=Math.floor,s=function(e){return e},c=r(i.width),l=r(o.width),d=-1!==["left","right"].indexOf(e.placement),u=-1!==e.placement.indexOf("-"),p=c%2===l%2,h=c%2===1&&l%2===1,f=t?d||u||p?r:a:s,m=t?r:s;return{left:f(h&&!u&&t?o.left-1:o.left),top:m(o.top),bottom:m(o.bottom),right:f(o.right)}}var se=n&&/Firefox/i.test(navigator.userAgent);function ce(e,t){var n=t.x,o=t.y,i=e.offsets.popper,r=q(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==r?r:t.gpuAcceleration,s=g(e.instance.popper),c=_(s),l={position:i.position},d=ae(e,window.devicePixelRatio<2||!se),u="bottom"===n?"top":"bottom",p="right"===o?"left":"right",h=$("transform"),f=void 0,m=void 0;if(m="bottom"===u?"HTML"===s.nodeName?-s.clientHeight+d.bottom:-c.height+d.bottom:d.top,f="right"===p?"HTML"===s.nodeName?-s.clientWidth+d.right:-c.width+d.right:d.left,a&&h)l[h]="translate3d("+f+"px, "+m+"px, 0)",l[u]=0,l[p]=0,l.willChange="transform";else{var v="bottom"===u?-1:1,b="right"===p?-1:1;l[u]=m*v,l[p]=f*b,l.willChange=u+", "+p}var y={"x-placement":e.placement};return e.attributes=T({},y,e.attributes),e.styles=T({},l,e.styles),e.arrowStyles=T({},e.offsets.arrow,e.arrowStyles),e}function le(e,t,n){var o=q(e,(function(e){var n=e.name;return n===t})),i=!!o&&e.some((function(e){return e.name===n&&e.enabled&&e.order<o.order}));if(!i){var r="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return i}function de(e,t){var n;if(!le(e.instance.modifiers,"arrow","keepTogether"))return e;var o=t.element;if("string"===typeof o){if(o=e.instance.popper.querySelector(o),!o)return e}else if(!e.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],r=e.offsets,a=r.popper,s=r.reference,c=-1!==["left","right"].indexOf(i),d=c?"height":"width",u=c?"Top":"Left",p=u.toLowerCase(),h=c?"left":"top",f=c?"bottom":"right",m=F(o)[d];s[f]-m<a[p]&&(e.offsets.popper[p]-=a[p]-(s[f]-m)),s[p]+m>a[f]&&(e.offsets.popper[p]+=s[p]+m-a[f]),e.offsets.popper=P(e.offsets.popper);var g=s[p]+s[d]/2-m/2,v=l(e.instance.popper),b=parseFloat(v["margin"+u]),y=parseFloat(v["border"+u+"Width"]),w=g-e.offsets.popper[p]-b-y;return w=Math.max(Math.min(a[d]-m,w),0),e.arrowElement=o,e.offsets.arrow=(n={},M(n,p,Math.round(w)),M(n,h,""),n),e}function ue(e){return"end"===e?"start":"start"===e?"end":e}var pe=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],he=pe.slice(3);function fe(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=he.indexOf(e),o=he.slice(n+1).concat(he.slice(0,n));return t?o.reverse():o}var me={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function ge(e,t){if(W(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=R(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),o=e.placement.split("-")[0],i=z(o),r=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case me.FLIP:a=[o,i];break;case me.CLOCKWISE:a=fe(o);break;case me.COUNTERCLOCKWISE:a=fe(o,!0);break;default:a=t.behavior}return a.forEach((function(s,c){if(o!==s||a.length===c+1)return e;o=e.placement.split("-")[0],i=z(o);var l=e.offsets.popper,d=e.offsets.reference,u=Math.floor,p="left"===o&&u(l.right)>u(d.left)||"right"===o&&u(l.left)<u(d.right)||"top"===o&&u(l.bottom)>u(d.top)||"bottom"===o&&u(l.top)<u(d.bottom),h=u(l.left)<u(n.left),f=u(l.right)>u(n.right),m=u(l.top)<u(n.top),g=u(l.bottom)>u(n.bottom),v="left"===o&&h||"right"===o&&f||"top"===o&&m||"bottom"===o&&g,b=-1!==["top","bottom"].indexOf(o),y=!!t.flipVariations&&(b&&"start"===r&&h||b&&"end"===r&&f||!b&&"start"===r&&m||!b&&"end"===r&&g),w=!!t.flipVariationsByContent&&(b&&"start"===r&&f||b&&"end"===r&&h||!b&&"start"===r&&g||!b&&"end"===r&&m),x=y||w;(p||v||x)&&(e.flipped=!0,(p||v)&&(o=a[c+1]),x&&(r=ue(r)),e.placement=o+(r?"-"+r:""),e.offsets.popper=T({},e.offsets.popper,H(e.instance.popper,e.offsets.reference,e.placement)),e=U(e.instance.modifiers,e,"flip"))})),e}function ve(e){var t=e.offsets,n=t.popper,o=t.reference,i=e.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",c=a?"left":"top",l=a?"width":"height";return n[s]<r(o[c])&&(e.offsets.popper[c]=r(o[c])-n[l]),n[c]>r(o[s])&&(e.offsets.popper[c]=r(o[s])),e}function be(e,t,n,o){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+i[1],a=i[2];if(!r)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=o}var c=P(s);return c[t]/100*r}if("vh"===a||"vw"===a){var l=void 0;return l="vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),l/100*r}return r}function ye(e,t,n,o){var i=[0,0],r=-1!==["right","left"].indexOf(o),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(q(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))]:[a];return l=l.map((function(e,o){var i=(1===o?!r:r)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return be(e,i,t,n)}))})),l.forEach((function(e,t){e.forEach((function(n,o){te(n)&&(i[t]+=n*("-"===e[o-1]?-1:1))}))})),i}function we(e,t){var n=t.offset,o=e.placement,i=e.offsets,r=i.popper,a=i.reference,s=o.split("-")[0],c=void 0;return c=te(+n)?[+n,0]:ye(n,r,a,s),"left"===s?(r.top+=c[0],r.left-=c[1]):"right"===s?(r.top+=c[0],r.left+=c[1]):"top"===s?(r.left+=c[0],r.top-=c[1]):"bottom"===s&&(r.left+=c[0],r.top+=c[1]),e.popper=r,e}function xe(e,t){var n=t.boundariesElement||g(e.instance.popper);e.instance.reference===n&&(n=g(n));var o=$("transform"),i=e.instance.popper.style,r=i.top,a=i.left,s=i[o];i.top="",i.left="",i[o]="";var c=R(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=r,i.left=a,i[o]=s,t.boundaries=c;var l=t.priority,d=e.offsets.popper,u={primary:function(e){var n=d[e];return d[e]<c[e]&&!t.escapeWithReference&&(n=Math.max(d[e],c[e])),M({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=d[n];return d[e]>c[e]&&!t.escapeWithReference&&(o=Math.min(d[n],c[e]-("right"===e?d.width:d.height))),M({},n,o)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";d=T({},d,u[t](e))})),e.offsets.popper=d,e}function ke(e){var t=e.placement,n=t.split("-")[0],o=t.split("-")[1];if(o){var i=e.offsets,r=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),c=s?"left":"top",l=s?"width":"height",d={start:M({},c,r[c]),end:M({},c,r[c]+r[l]-a[l])};e.offsets.popper=T({},a,d[o])}return e}function Ce(e){if(!le(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=q(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function Se(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,i=o.popper,r=o.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=r[n]-(s?i[a?"width":"height"]:0),e.placement=z(t),e.offsets.popper=P(i),e}var Ee={shift:{order:100,enabled:!0,fn:ke},offset:{order:200,enabled:!0,fn:we,offset:0},preventOverflow:{order:300,enabled:!0,fn:xe,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:ve},arrow:{order:500,enabled:!0,fn:de,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:ge,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:Se},hide:{order:800,enabled:!0,fn:Ce},computeStyle:{order:850,enabled:!0,fn:ce,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:ie,onLoad:re,gpuAcceleration:void 0}},Ae={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Ee},Me=function(){function e(t,n){var o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};E(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=s(this.update.bind(this)),this.options=T({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(T({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){o.options.modifiers[t]=T({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return T({name:e},o.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&c(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return A(e,[{key:"update",value:function(){return G.call(this)}},{key:"destroy",value:function(){return X.call(this)}},{key:"enableEventListeners",value:function(){return J.call(this)}},{key:"disableEventListeners",value:function(){return ee.call(this)}}]),e}();Me.Utils=("undefined"!==typeof window?window:e).PopperUtils,Me.placements=pe,Me.Defaults=Ae,t["default"]=Me}.call(this,n("c8ba"))},f0c1:function(e,t){e.exports='<svg viewBox="0 0 13 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="hand-paper-regular" fill="#788793" fill-rule="nonzero"><path d="M10.1676023,3.07402339 L10.1676023,2.77860429 C10.1676023,1.58841326 9.06179337,0.685672515 7.9014308,0.989824561 C7.2020039,-0.361052632 5.33367251,-0.305107212 4.68164912,1.01021053 C3.55509942,0.721996101 2.43277973,1.58134503 2.43277973,2.78362573 L2.43277973,6.22576998 C1.88825341,6.02308382 1.25088499,6.08746199 0.738506823,6.46786355 C-0.0626042885,7.06268616 -0.238327485,8.19624951 0.341430799,9.01005068 L3.6154386,13.6061715 C3.77930422,13.8361732 4.04427706,13.9727366 4.32668226,13.9727368 L10.4096413,13.9727368 C10.8163782,13.9727368 11.169271,13.6919454 11.2606121,13.2955789 L12.084347,9.72167641 C12.178483,9.31294238 12.2260438,8.89486505 12.2261209,8.4754308 L12.2261209,4.88499025 C12.2261209,3.77645224 11.2566823,2.9202963 10.1676023,3.07402339 Z M10.9160975,8.47540351 C10.9160975,8.79554776 10.879692,9.11588304 10.8078908,9.42745809 L10.0621793,12.662768 L4.55169201,12.662768 L1.40794152,8.24998441 C1.01389474,7.69680702 1.81792593,7.08260819 2.21011696,7.63308382 L2.95045224,8.6722768 C3.19592982,9.016846 3.74272125,8.84385185 3.74272125,8.41893957 L3.74272125,2.78362573 C3.74272125,2.08376218 4.74076023,2.10654971 4.74076023,2.80248343 L4.74076023,6.98635478 C4.74076023,7.22752047 4.93624172,7.42300195 5.17740741,7.42300195 L5.36451072,7.42300195 C5.60567641,7.42300195 5.80115789,7.22752047 5.80115789,6.98635478 L5.80115789,1.82846004 C5.80115789,1.12810526 6.79919688,1.15138402 6.79919688,1.84731774 L6.79919688,6.98635478 C6.79919688,7.22752047 6.99467836,7.42300195 7.23584405,7.42300195 L7.42294737,7.42300195 C7.66411306,7.42300195 7.85959454,7.22752047 7.85959454,6.98635478 L7.85959454,2.75974659 C7.85959454,2.0591462 8.85760624,2.08267057 8.85760624,2.77860429 L8.85760624,6.98635478 C8.85760624,7.22752047 9.05308772,7.42300195 9.29425341,7.42300195 L9.48138402,7.42300195 C9.72254971,7.42300195 9.91803119,7.22752047 9.91803119,6.98635478 L9.91803119,4.90384795 C9.91803119,4.18769201 10.9160429,4.20412086 10.9160429,4.88499025 L10.9160429,8.47540351 L10.9160975,8.47540351 Z" id="Shape"></path></g></g></svg>'},f183:function(e,t,n){var o=n("23e7"),i=n("e330"),r=n("d012"),a=n("861d"),s=n("1a2d"),c=n("9bf2").f,l=n("241c"),d=n("057f"),u=n("4fadd"),p=n("90e3"),h=n("bb2f"),f=!1,m=p("meta"),g=0,v=function(e){c(e,m,{value:{objectID:"O"+g++,weakData:{}}})},b=function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,m)){if(!u(e))return"F";if(!t)return"E";v(e)}return e[m].objectID},y=function(e,t){if(!s(e,m)){if(!u(e))return!0;if(!t)return!1;v(e)}return e[m].weakData},w=function(e){return h&&f&&u(e)&&!s(e,m)&&v(e),e},x=function(){k.enable=function(){},f=!0;var e=l.f,t=i([].splice),n={};n[m]=1,e(n).length&&(l.f=function(n){for(var o=e(n),i=0,r=o.length;i<r;i++)if(o[i]===m){t(o,i,1);break}return o},o({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:d.f}))},k=e.exports={enable:x,fastKey:b,getWeakData:y,onFreeze:w};r[m]=!0},f189:function(e,t,n){var o=n("6be5");function i(e){if(Array.isArray(e))return o(e)}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},f22b:function(e,t,n){"use strict";var o=n("23e7"),i=n("c65b"),r=n("f069"),a=n("4738").CONSTRUCTOR;o({target:"Promise",stat:!0,forced:a},{reject:function(e){var t=r.f(this);return i(t.reject,void 0,e),t.promise}})},f2b4:function(e,t,n){"use strict";n("0ca7")},f2c1:function(e,t,n){e.exports=n.p+"img/intermediate-signal-throw-event.29cad018.svg"},f2db:function(e,t,n){var o=n("11b4");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("499e").default;i("9ad2beb6",o,!0,{sourceMap:!1,shadowMode:!1})},f2e1:function(e,t){e.exports=d},f362:function(e,t,n){"use strict";n("cab7")},f369:function(e,t,n){var o=n("24fb");t=o(!1),t.push([e.i,".control-list[data-v-0e6b16b8]{margin:0;padding:4px;background-color:#fff;-webkit-box-shadow:0 4px 8px rgba(0,0,0,.1);box-shadow:0 4px 8px rgba(0,0,0,.1);border-radius:8px;list-style:none;overflow-x:auto}.control-item[data-v-0e6b16b8],.control-list[data-v-0e6b16b8]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.control-item[data-v-0e6b16b8]{position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-width:40px;width:40px;height:40px;margin-right:12px;border-radius:4px;cursor:pointer}.control-item[data-v-0e6b16b8]:last-child{margin-right:0}.control-item[data-v-0e6b16b8]:hover{background-color:#ebeef2}.control-item.active[data-v-0e6b16b8]{background-color:#d4d7f4}.control-item.active[data-v-0e6b16b8] a>svg{fill:#1264aa}.control-item-options[data-v-0e6b16b8]{position:absolute;top:0;right:0;padding:3px;-webkit-transform:rotate(47.59deg);transform:rotate(47.59deg);cursor:pointer}.control-item-options>span[data-v-0e6b16b8]{display:block;width:4px;height:3px;background-color:#44494e;-webkit-clip-path:polygon(50% 0,0 100%,100% 100%);clip-path:polygon(50% 0,0 100%,100% 100%);-webkit-clip-path:padding-box;clip-path:padding-box}.control-add[data-v-0e6b16b8]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:24px;height:24px;background-color:#00ad73;border-radius:2px;font-size:13px}.control-add>svg[data-v-0e6b16b8]{fill:#fff}.is-dragging[data-v-0e6b16b8]{color:#fff;position:absolute;z-index:10;-webkit-box-shadow:5px 5px 8px 0 rgba(0,0,0,.2901960784);box-shadow:5px 5px 8px 0 rgba(0,0,0,.2901960784);padding:.5rem;pointer-events:none;width:40px;height:40px;background-color:green}.is-dragging.no-drop[data-v-0e6b16b8]{opacity:.8;cursor:no-drop;pointer-events:none}.is-dragging[data-v-0e6b16b8]:hover{background-color:#3397e1;color:#fff;pointer-events:none}",""]),e.exports=t},f36a:function(e,t,n){var o=n("e330");e.exports=o([].slice)},f3c1:function(e,t){var n=800,o=16,i=Date.now;function r(e){var t=0,r=0;return function(){var a=i(),s=o-(a-r);if(r=a,s>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}e.exports=r},f400:function(e,t){e.exports='<svg viewBox="0 0 19 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.799 1.25L18.1603 14C18.7376 15 18.0159 16.25 16.8612 16.25H2.13878C0.984084 16.25 0.262396 15 0.839746 14L8.20096 1.25C8.77831 0.25 10.2217 0.25 10.799 1.25Z" fill="#ED4757"></path></svg>'},f4d6:function(e,t,n){var o=n("ffd6"),i=1/0;function r(e){if("string"==typeof e||o(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}e.exports=r},f4e5:function(e,t,n){e.exports=n.p+"img/validate-close.09ace97a.svg"},f4e6:function(e,t,n){e.exports=n.p+"img/conditional-start-event.a56e4b5b.svg"},f5df:function(e,t,n){var o=n("00ee"),i=n("1626"),r=n("c6b6"),a=n("b622"),s=a("toStringTag"),c=Object,l="Arguments"==r(function(){return arguments}()),d=function(e,t){try{return e[t]}catch(n){}};e.exports=o?r:function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=d(t=c(e),s))?n:l?r(t):"Object"==(o=r(t))&&i(t.callee)?"Arguments":o}},f608:function(e,t,n){var o=n("6747"),i=n("ffd6"),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function s(e,t){if(o(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!r.test(e)||null!=t&&e in Object(t))}e.exports=s},f772:function(e,t,n){var o=n("5692"),i=n("90e3"),r=o("keys");e.exports=function(e){return r[e]||(r[e]=i(e))}},f7c3:function(e,t,n){var o=n("24fb");t=o(!1),t.push([e.i,'.crown-config{z-index:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:auto;padding:0 3px 0 3px;height:2.5rem;border-radius:5px;-webkit-box-shadow:5px 5px 10px rgba(0,0,0,.2);box-shadow:5px 5px 10px rgba(0,0,0,.2)}.crown-config,.crown-config:after{background-color:#fff;position:absolute}.crown-config:after{content:"";width:1.25rem;height:1.25rem;top:.8rem;left:.3rem;z-index:-1;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:1px}',""]),e.exports=t},f838:function(e,t,n){var o=n("7ca3");function i(e,t,n){return t=o(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},f8af:function(e,t,n){var o=n("2474");function i(e){var t=new e.constructor(e.byteLength);return new o(t).set(new o(e)),t}e.exports=i},f8c9:function(e,t,n){var o=n("23e7"),i=n("da84"),r=n("d44e");o({global:!0},{Reflect:{}}),r(i.Reflect,"Reflect",!0)},f909:function(e,t,n){var o=n("7e64"),i=n("b760"),r=n("72af"),a=n("4f50"),s=n("1a8c"),c=n("9934"),l=n("8adb");function d(e,t,n,u,p){e!==t&&r(t,(function(r,c){if(p||(p=new o),s(r))a(e,t,c,n,d,u,p);else{var h=u?u(l(e,c),r,c+"",e,t,p):void 0;void 0===h&&(h=r),i(e,c,h)}}),c)}e.exports=d},f924:function(e,t,n){var o=n("24fb");t=o(!1),t.push([e.i,".ur-box[data-v-379ae012]{height:48px;padding:6px 4px;-webkit-box-shadow:0 4px 8px rgba(0,0,0,.1);box-shadow:0 4px 8px rgba(0,0,0,.1);border-radius:8px;z-index:2}.ur-box[data-v-379ae012],.ur-button[data-v-379ae012]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fff}.ur-button[data-v-379ae012]{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:40px;height:40px;padding:12px;border:0 none;border-radius:4px;color:#334;cursor:pointer;outline:none}.ur-button[data-v-379ae012]:hover{background-color:#ebeef2}.ur-button[data-v-379ae012]:active{background-color:#deebff}.ur-button:active>svg[data-v-379ae012]{fill:#1264aa}.ur-button[data-v-379ae012]:disabled{background-color:#fff;color:#7e7e92;cursor:not-allowed}.ur-button>svg[data-v-379ae012]{width:24px;height:24px;fill:#334}",""]),e.exports=t},f94f:function(e,t,n){var o=n("7ca3");function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,o(i.key),i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}e.exports=r,e.exports.__esModule=!0,e.exports["default"]=e.exports},f9ce:function(e,t,n){var o=n("ef5d"),i=n("e3f8"),r=n("f608"),a=n("f4d6");function s(e){return r(e)?o(a(e)):i(e)}e.exports=s},fa21:function(e,t,n){var o=n("7530"),i=n("2dcb"),r=n("eac5");function a(e){return"function"!=typeof e.constructor||r(e)?{}:o(i(e))}e.exports=a},fa36:function(e,t,n){var o=n("e38e");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("499e").default;i("8f688ad4",o,!0,{sourceMap:!1,shadowMode:!1})},fae3:function(e,t,n){"use strict";n.r(t),n.d(t,"association",(function(){return Ri})),n.d(t,"endEvent",(function(){return Ur})),n.d(t,"errorEndEvent",(function(){return aa})),n.d(t,"terminateEndEvent",(function(){return fa})),n.d(t,"exclusiveGateway",(function(){return Oa})),n.d(t,"inclusiveGateway",(function(){return za})),n.d(t,"parallelGateway",(function(){return $a})),n.d(t,"eventBasedGateway",(function(){return ts})),n.d(t,"sequenceFlow",(function(){return ps})),n.d(t,"messageFlow",(function(){return xs})),n.d(t,"messageEndEvent",(function(){return Fs})),n.d(t,"signalEndEvent",(function(){return tc})),n.d(t,"startEvent",(function(){return Ac})),n.d(t,"signalStartEvent",(function(){return jc})),n.d(t,"messageStartEvent",(function(){return Uc})),n.d(t,"startTimerEvent",(function(){return bl})),n.d(t,"intermediateTimerEvent",(function(){return ld})),n.d(t,"intermediateMessageCatchEvent",(function(){return Pd})),n.d(t,"intermediateSignalCatchEvent",(function(){return Bd})),n.d(t,"intermediateMessageThrowEvent",(function(){return Wd})),n.d(t,"intermediateSignalThrowEvent",(function(){return eu})),n.d(t,"intermediateConditionalCatchEvent",(function(){return du})),n.d(t,"task",(function(){return Ip})),n.d(t,"subProcess",(function(){return eh})),n.d(t,"callActivity",(function(){return eh})),n.d(t,"scriptTask",(function(){return ch})),n.d(t,"serviceTask",(function(){return lh})),n.d(t,"textAnnotation",(function(){return bh})),n.d(t,"pool",(function(){return Tf})),n.d(t,"poolLane",(function(){return jh})),n.d(t,"ValidationStatus",(function(){return Rf})),n.d(t,"Modeler",(function(){return Px})),n.d(t,"manualTask",(function(){return Bx})),n.d(t,"boundaryTimerEvent",(function(){return Jv})),n.d(t,"boundaryMessageEvent",(function(){return jv})),n.d(t,"boundaryErrorEvent",(function(){return pv})),n.d(t,"boundaryEscalationEvent",(function(){return Tv})),n.d(t,"boundarySignalEvent",(function(){return Uv})),n.d(t,"boundaryConditionalEvent",(function(){return wv})),n.d(t,"conditionalStartEvent",(function(){return Ux})),n.d(t,"dataObject",(function(){return lf})),n.d(t,"dataStore",(function(){return bf})),n.d(t,"dataInputAssociation",(function(){return Kx})),n.d(t,"dataOutputAssociation",(function(){return ik})),n.d(t,"registerNodes",(function(){return lk})),n.d(t,"loopCharacteristicsInspector",(function(){return Mp})),n.d(t,"loopCharacteristicsHandler",(function(){return Ep})),n.d(t,"loopCharacteristicsData",(function(){return Ap})),n.d(t,"NodeIdentifierInput",(function(){return Dr}));var o={};n.r(o),n.d(o,"id",(function(){return gt})),n.d(o,"bpmnType",(function(){return vt})),n.d(o,"definition",(function(){return bt})),n.d(o,"diagram",(function(){return yt}));var i={};if(n.r(i),n.d(i,"id",(function(){return wt})),n.d(i,"bpmnType",(function(){return xt})),n.d(i,"definition",(function(){return kt})),n.d(i,"diagram",(function(){return Ct})),"undefined"!==typeof window){var r=window.document.currentScript,a=n("8875");r=a(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:a});var s=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(n.p=s[1])}var c=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},l=[],d=n("4b16");function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function p(e){if(Array.isArray(e))return u(e)}n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("e260"),n("3ca3"),n("ddb0"),n("a630");function h(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n("fb6a"),n("b0c0"),n("ac1f"),n("00b4");function f(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}n("d9e2");function m(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e){return p(e)||h(e)||f(e)||m()}n("b636"),n("944a"),n("0c47"),n("23dc"),n("3410"),n("14d9"),n("159b"),n("131a"),n("1f68"),n("e6cf");function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(){
|
|
33
33
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
34
|
-
b=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(_){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var r=t&&t.prototype instanceof p?t:p,a=Object.create(r.prototype),s=new M(i||[]);return o(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(_){return{type:"throw",arg:_}}}e.wrap=l;var u={};function p(){}function h(){}function f(){}var m={};c(m,r,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(T([])));y&&y!==t&&n.call(y,r)&&(m=y);var w=f.prototype=p.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function i(o,r,a,s){var c=d(e[o],e,r);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==v(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(c.arg)}var r;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){i(e,n,t,o)}))}return r=r?r.then(o,o):o()}})}function C(e,t,n){var o="suspendedStart";return function(i,r){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===i)throw r;return P()}for(n.method=i,n.arg=r;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var c=d(e,t,n);if("normal"===c.type){if(o=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o="completed",n.method="throw",n.arg=c.arg)}}}function S(e,t){var n=t.method,o=e.iterator[n];if(void 0===o)return t.delegate=null,"throw"===n&&e.iterator["return"]&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),u;var i=d(o,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,u;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(n.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=f,o(w,"constructor",{value:f,configurable:!0}),o(f,"constructor",{value:h,configurable:!0}),h.displayName=c(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},x(k.prototype),c(k.prototype,a,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,o,i,r){void 0===r&&(r=Promise);var a=new k(l(t,n,o,i),r);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(w),c(w,s,"Generator"),c(w,r,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},e.values=T,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(n,o){return a.type="throw",a.arg=e,t.next=n,o&&(t.method="next",t.arg=void 0),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i],a=r.completion;if("root"===r.tryLoc)return o("end");if(r.tryLoc<=this.prev){var s=n.call(r,"catchLoc"),c=n.call(r,"finallyLoc");if(s&&c){if(this.prev<r.catchLoc)return o(r.catchLoc,!0);if(this.prev<r.finallyLoc)return o(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return o(r.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return o(r.finallyLoc)}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function y(e,t,n,o,i,r,a){try{var s=e[r](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(o,i)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function a(e){y(r,o,i,a,s,"next",e)}function s(e){y(r,o,i,a,s,"throw",e)}a(void 0)}))}}n("7db0"),n("d81d"),n("99af"),n("4e82");var x=n("9b02"),k=n.n(x),C=n("b047c"),S=n.n(C),E=n("94c7"),A=n.n(E),M=["#357bf6","#4ba0b5","#53a451","#6d747c","#f7b84b","#ff8628","#cc444a"],T="#dffdd0",P="#fae0e6",_="#fff",O="#000",D="#edfffc",I="#00bf9c",N="#fff4d1",R="#fbbe02",j="#fff1f2",L="#ed4757",B="#f7f7f7";function F(e,t){return t?{fill:A()(t).lighten(35).toHex8String(),stroke:t}:e.isBpmnType("bpmn:StartEvent")?{fill:D,stroke:I}:e.isBpmnType("bpmn:IntermediateEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent")?{fill:N,stroke:R}:e.isBpmnType("bpmn:EndEvent")?{fill:j,stroke:L}:e.isBpmnType("bpmn:Participant","bpmn:Lane")?{fill:B,stroke:O}:{fill:_,stroke:O}}function z(e,t,n){if(e.component.node.isType("processmaker-modeler-text-annotation"))return e.attr("label/fill",n),void e.attr("body/stroke",n);e.attr("body")&&(e.attr("body/fill",t),e.attr("body/stroke",n)),e.attr("body2")&&(e.attr("body2/fill",t),e.attr("body2/stroke",n)),e.attr("line")&&e.attr("line/stroke",n),e.attr("polyline")&&(e.attr("polyline/fill",t),e.attr("polyline/stroke",n)),e.attr("label")&&e.attr("label/fill",n)}function H(e){return e.isBpmnType("bpmn:StartEvent")?I:e.isBpmnType("bpmn:IntermediateEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent")?R:e.isBpmnType("bpmn:EndEvent")?L:e.isBpmnType("bpmn:ExclusiveGateway","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:BoundaryEvent")?"#000":"#788793"}n("07ac"),n("4de4"),n("8172"),n("efec"),n("a9e3");function q(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==v(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function V(e){var t=q(e,"string");return"symbol"===v(t)?t:String(t)}function U(e,t,n){return t=V(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G='<rect width="1" height="1" fill="none"/>',W="default",$="boundary",X="rectangle",Y={x:"50%",y:"0%"},Z={x:"25%",y:"0%"},K={x:"75%",y:"0%"},J={x:"100%",y:"50%"},Q={x:"100%",y:"25%"},ee={x:"100%",y:"75%"},te={x:"50%",y:"100%"},ne={x:"25%",y:"100%"},oe={x:"75%",y:"100%"},ie={x:"0%",y:"50%"},re={x:"0%",y:"25%"},ae={x:"0%",y:"75%"},se={x:"50%",y:"50%"},ce=[Y,Z,K,J,Q,ee,te,ne,oe,ie,re,ae],le=function(e){return function(t){return{group:e,args:t,markup:G}}},de=[Y,J,ie,te,se].map(le(W)),ue=ce.map(le($)),pe=[].concat(ce,[se]).map(le(X)),he={mounted:function(){var e=this;return w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:e.shape.attributes.ports={},e.shape.attributes.ports.groups=(n={},U(n,W,{position:{name:"absolute"}}),U(n,$,{position:{name:"absolute"}}),U(n,X,{position:{name:"absolute"}}),n),e.shape.addPorts([].concat(g(de),g(ue),g(pe)));case 5:case"end":return t.stop()}}),t)})))()}},fe=n("52b3"),me=n.n(fe),ge=n("63ea"),ve=n.n(ge);function be(e,t){var n=e.position(),o=n.x,i=n.y,r=Object.values(e.getPortsPositions(t)).map((function(e){var t=e.x,n=e.y;return new d["g"].Point(o+t,i+n)}));if(!r){var a=e.position(),s=a.x,c=a.y,l=e.size(),u=l.width,p=l.height;r.push(new d["g"].Point(s-u/2,c-p/2))}return r}function ye(e,t,n){var o=new d["g"].Point(t.x,t.y);return o.chooseClosest(be(e,n))}function we(e,t){return ye(t,e,$)}function xe(e,t){return ye(t.model,e,W)}function ke(e,t){return ye(t.model,e,X)}function Ce(e){function t(t){var n=t.topMiddle(),o=[n],i=0,r=n.clone();while(r.x<t.topRight().x)i++,r=n.clone(),r.translate(e*i),o.push(r,r.reflection(n));return o.push(t.topLeft()),o.push(t.topRight()),o}function n(t){var n=t.leftMiddle(),o=[n],i=n,r=0;while(i.y<t.bottomLeft().y)r++,i=n.clone(),i.translate(0,e*r),o.push(i,i.reflection(n));return o}return function(e,o){var i=o.model.getBBox({useModelGeometry:!0}),r=t(i),a=n(i),s=r.map((function(e){return e.reflection(i.center())})),c=a.map((function(e){return e.reflection(i.center())})),l=[].concat(g(r),g(s),g(a),g(c),[i.center()]),u=new d["g"].Point(e.x,e.y);return u.chooseClosest(l)}}function Se(e){var t=e.position(),n=t.x,o=t.y,i=e.size(),r=i.width,a=i.height;return{x:n+r/2,y:o+a/2}}function Ee(e){var t=be(e,$),n=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.isBpmnType("bpmn:BoundaryEvent")})).map(Se);return me()(t,n,ve.a)}n("cb29");function Ae(e){var t=e.component.node,n=t.definition.get("color"),o=F(t,n),i=o.fill,r=o.stroke;z(e,i,r)}function Me(e){if(Array.isArray(e))return e}function Te(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,s=[],c=!0,l=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=r.call(n)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(d){l=!0,i=d}finally{try{if(!c&&null!=n["return"]&&(a=n["return"](),Object(a)!==a))return}finally{if(l)throw i}}return s}}function Pe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _e(e,t){return Me(e)||Te(e,t)||f(e,t)||Pe()}n("4fad"),n("caad"),n("2532"),n("a434");var Oe=n("8bbf"),De=n.n(Oe),Ie=n("2f62"),Ne=n("4d8c"),Re=n.n(Ne),je=n("eed6"),Le=n.n(je);function Be(e,t,n){e.hasOwnProperty(t)?e.set(t,n):(delete Object.getPrototypeOf(e)[t],De.a.set(e,t,n))}function Fe(e,t,n){e.nodes.filter((function(e){var t=e.definition;return("bpmn:IntermediateCatchEvent"===t.$type||"bpmn:StartEvent"===t.$type)&&t.eventDefinitions&&t.eventDefinitions.some(n)})).forEach((function(e){var n=e.definition;n.eventDefinitions[0][t]=null}))}De.a.use(Ie["a"]);var ze=new Ie["a"].Store({state:{graph:null,paper:null,highlightedNodes:[],nodes:[],rootElements:[],autoValidate:!1,globalProcesses:[],allowSavingElementPosition:!0,copiedElements:[],clientLeftPaper:!1,readOnly:!1},getters:{nodes:function(e){return e.nodes},paper:function(e){return e.paper},highlightedNodes:function(e){return e.highlightedNodes},nodeShape:function(e){return function(t){return e.graph.getCells().find((function(e){return e.component&&e.component.node===t}))}},highlightedShapes:function(e,t){return t.highlightedNodes.filter((function(e){return"processmaker-modeler-process"!==e.type})).map(t.nodeShape)},rootElements:function(e){return e.rootElements},autoValidate:function(e){return e.autoValidate},globalProcesses:function(e){return e.globalProcesses},globalProcessEvents:function(e,t){return Re()(t.globalProcesses.map((function(e){return e.events})))},allowSavingElementPosition:function(e){return e.allowSavingElementPosition},copiedElements:function(e){return e.copiedElements},clientLeftPaper:function(e){return e.clientLeftPaper},isReadOnly:function(e){return e.readOnly},showComponent:function(e){return!e.readOnly}},mutations:{setReadOnly:function(e,t){e.readOnly=t},preventSavingElementPosition:function(e){e.allowSavingElementPosition=!1},allowSavingElementPosition:function(e){e.allowSavingElementPosition=!0},setAutoValidate:function(e,t){e.autoValidate=t},setRootElements:function(e,t){e.rootElements=t},updateNodeBounds:function(e,t){var n=t.node,o=t.bounds;o&&Object.entries(o).forEach((function(e){var t=_e(e,2),o=t[0],i=t[1];"$type"!==o&&n.diagram.bounds.set(o,i)}))},updateNodeProp:function(e,t){var n=t.node,o=t.key,i=t.value;"id"==o&&n.definition.id!==i&&e.nodes.some((function(e){return e.definition.id===i}))||(Be(n.definition,o,i),null==i&&De.a.delete(n.definition,o))},clearNodes:function(e){e.nodes=[]},highlightNode:function(e,t){e.highlightedNodes=t?[t]:[]},addToHighlightedNodes:function(e,t){var n=Le()([].concat(g(e.highlightedNodes),g(t))),o=n.filter((function(e){return"processmaker-modeler-pool"===e.type})).map((function(e){return e.id}));e.highlightedNodes=n.filter((function(e){return!e.pool||!e.pool.component.node.id||!o.includes(e.pool.component.node.id)}))},addNode:function(e,t){t._modelerId="_modelerId_"+t.definition.get("id"),e.nodes.push(t)},removeNode:function(e,t){var n=e.nodes.indexOf(t);-1!==n&&e.nodes.splice(n,1)},removeMessageRef:function(e,t){Fe(e,"messageRef",(function(e){var n=e.messageRef;return n===t}))},removeSignalRef:function(e,t){Fe(e,"signalRef",(function(e){var n=e.signalRef;return n===t}))},setGraph:function(e,t){e.graph=t},setPaper:function(e,t){e.paper=t},setGlobalProcesses:function(e,t){e.globalProcesses=t},setCopiedElements:function(e,t){e.copiedElements=t},setClientLeftPaper:function(e,t){e.clientLeftPaper=t}},actions:{fetchGlobalProcesses:function(e){return w(b().mark((function t(){var n,o,i;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,t.prev=1,t.next=4,window.ProcessMaker.apiClient.get("processes",{params:{order_direction:"asc",per_page:1e3,status:"all",include:"events,category"}});case 4:o=t.sent,i=o.data,n("setGlobalProcesses",i.data),window.ProcessMaker.globalProcesses=i.data,t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](1);case 12:case"end":return t.stop()}}),t,null,[[1,10]])})))()}}}),He="#5096db",qe="#FF0000",Ve="#3FA6FF",Ue="#DCF2FF",Ge="#CCCCCC",We="#F5F5F5",$e="#00BA7C",Xe="#D6FFE6",Ye={source:"source",target:"target"};function Ze(e){return e.x&&e.y}var Ke={props:["highlighted","paper","paperManager","isCompleted","isIdle"],data:function(){return{sourceShape:null,target:null,listeningToMouseup:!1,vertices:null,anchorPointFunction:xe}},watch:{target:function(e,t){t&&t!==e&&Ae(t)},isValidConnection:function(e){e?this.shape.stopListening(this.paper,"blank:pointerdown link:pointerdown element:pointerdown",this.removeLink):this.shape.listenToOnce(this.paper,"blank:pointerdown link:pointerdown element:pointerdown",this.removeLink)},highlighted:function(e){ze.getters.isReadOnly||(e?(this.shape.attr({line:{stroke:"#5096db"},".joint-highlight-stroke":{display:"none"}}),this.shapeView.showTools()):(Ae(this.shape),this.shapeView.hideTools()))}},computed:{shapeView:function(){return this.shape.findView(this.paper)},sourceNode:function(){return k()(this.sourceShape,"component.node")},targetNode:function(){return k()(this.target,"component.node")},sourceConfig:function(){return this.sourceNode&&this.nodeRegistry[this.sourceNode.type]},targetConfig:function(){return this.targetNode&&this.nodeRegistry[this.targetNode.type]},elementPadding:function(){return this.shape&&this.shape.source().id===this.shape.target().id?20:1}},methods:{setShapeHighlight:function(){this.isCompleted?this.shape.attr({line:{stroke:$e}}):this.isIdle&&this.shape.attr({line:{stroke:Ge}})},findSourceShape:function(){var e=this;return this.graph.getElements().find((function(t){return t.component&&t.component.node.definition===e.node.definition.get("sourceRef")}))},setEndpoint:function(e,t,n){var o=this;if(e&&Ze(e))return this.shape[t](e,{anchor:{name:"modelCenter",args:{padding:25}},connectionPoint:{name:"boundary"}});var i=function(){var t=e.position(),o=t.x,i=t.y,r=e.size(),a=r.width,s=r.height;return n?{x:o+n.x,y:i+n.y}:{x:o+a/2,y:i+s/2}};this.shape[t](e,{anchor:function(){return o.getAnchorPointFunction(t)(i(),e.findView(o.paper))},connectionPoint:{name:"boundary"}})},setSource:function(e,t){this.setEndpoint(e,Ye.source,t)},setTarget:function(e,t){this.setEndpoint(e,Ye.target,t)},completeLink:function(){this.shape.stopListening(this.paper,"cell:mouseleave"),this.$emit("set-cursor",null),this.resetPaper();var e=this.shape.getTargetElement();Ae(e),this.shape.on("change:vertices",this.onChangeVertices),this.shape.listenTo(this.sourceShape,"change:position",this.updateWaypoints),this.shape.listenTo(e,"change:position",this.updateWaypoints);var t=this.shape.getSourceElement();t.embed(this.shape),this.$emit("set-shape-stacking",t)},onChangeVertices:function(e,t,n){var o=this;return w(b().mark((function e(){return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n||!n.ui){e.next=5;break}return o.updateWaypoints(),e.next=4,o.$nextTick();case 4:o.$emit("save-state");case 5:case"end":return e.stop()}}),e)})))()},updateWaypoints:function(){var e=this,t=this.shape.findView(this.paper),n=t.sourceAnchor,o=t.targetAnchor;this.node.diagram.waypoint=[n].concat(g(this.shape.vertices()),[o]).map((function(t){return e.moddle.create("dc:Point",t)})),this.listeningToMouseup||(this.listeningToMouseup=!0,document.addEventListener("mouseup",this.emitSave))},updateLinkTarget:function(e){var t=this,n=e.clientX,o=e.clientY,i=this.paper.clientToLocalPoint({x:n,y:o});if(this.target=this.graph.findModelsFromPoint(i).sort((function(e,t){return t.get("z")-e.get("z")}))[0],!this.isValidConnection)return this.$emit("set-cursor","not-allowed"),this.shape.target({x:i.x,y:i.y}),void(this.target&&z(this.target,P));this.setTarget(this.target),this.updateRouter(),this.$emit("set-cursor","default"),z(this.target,T),this.paper.el.removeEventListener("mousemove",this.updateLinkTarget),this.shape.listenToOnce(this.paper,"cell:pointerclick",(function(){t.completeLink(),t.updateWaypoints(),t.updateWaypoints.flush(),t.updateDefinitionLinks&&t.updateDefinitionLinks(),t.$emit("save-state")})),this.shape.listenToOnce(this.paper,"cell:mouseleave",(function(){t.paper.el.addEventListener("mousemove",t.updateLinkTarget),t.shape.stopListening(t.paper,"cell:pointerclick"),Ae(t.target),t.$emit("set-cursor","not-allowed")}))},removeLink:function(){this.$emit("remove-node",this.node),this.resetPaper()},resetPaper:function(){this.$emit("set-cursor",null),this.paper.el.removeEventListener("mousemove",this.updateLinkTarget),this.paper.setInteractivity(this.graph.get("interactiveFunc")),this.target&&Ae(this.target)},getAnchorPointFunction:function(e){return"source"===e?this.sourceShape.component.anchorPointFunction||this.anchorPointFunction:"target"===e?this.target.component.anchorPointFunction||this.anchorPointFunction:void 0},setupLinkTools:function(){var e=new d["linkTools"].Vertices,t=new d["linkTools"].SourceAnchor({snap:this.getAnchorPointFunction("source")}),n=new d["linkTools"].TargetAnchor({snap:this.getAnchorPointFunction("target")}),o=new d["dia"].ToolsView({tools:[e,t,n]});this.shapeView.addTools(o),this.shapeView.hideTools()},emitSave:function(){this.highlighted&&(this.updateWaypoints.flush(),document.removeEventListener("mouseup",this.emitSave),this.listeningToMouseup=!1)}},created:function(){this.updateWaypoints=S()(this.updateWaypoints,100),this.emitSave.bind(this)},mounted:function(){var e=this;return w(b().mark((function t(){var n,o,i,r,a,s,c,l,d,u,p,h,f,m;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:if(e.sourceShape=e.findSourceShape(),e.setSource(e.sourceShape),e.$once("click",(function(){e.$nextTick((function(){ze.getters.isReadOnly||e.setupLinkTools()}))})),n=e.getTargetRef?e.getTargetRef():e.node.definition.get("targetRef"),n){t.next=8;break}return t.abrupt("return");case 8:n.id?(o=e.graph.getElements().find((function(e){return e.component&&e.component.node.definition===n})),e.target=o,i=e.node.diagram.waypoint,r=e.node.diagram.waypoint[0],a=i[i.length-1],s=o.position(),c=s.x,l=s.y,d={x:a.x-c,y:a.y-l},u=e.sourceShape.position(),p=u.x,h=u.y,f={x:r.x-p,y:r.y-h},i&&(m=i.slice(1,i.length-1).map((function(e){var t=e.x,n=e.y;return{x:t,y:n}})),e.shape.vertices(m)),e.setSource(e.sourceShape,f),e.setTarget(o,d),e.completeLink()):(e.setTarget(n),e.paper.setInteractivity(!1),e.paper.el.addEventListener("mousemove",e.updateLinkTarget),e.$emit("set-cursor","not-allowed"),e.isValidConnection?e.shape.stopListening(e.paper,"blank:pointerdown link:pointerdown element:pointerdown",e.removeLink):e.shape.listenToOnce(e.paper,"blank:pointerdown link:pointerdown element:pointerdown",e.removeLink)),e.updateRouter(),e.shape.on("change:vertices",(function(){this.component.$emit("shape-resize")})),ze.getters.isReadOnly&&e.$nextTick((function(){e.paperManager.awaitScheduledUpdates().then((function(){e.setShapeHighlight()}))}));case 12:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){document.removeEventListener("mouseup",this.emitSave)},destroyed:function(){this.updateWaypoints.cancel()}},Je=n("acbb"),Qe=n.n(Je),et={none:"None",one:"One",both:"Both"},tt=function(){var e=this,t=e._self._c;return e.showCrownConfig?t("div",{staticClass:"crown-config",style:e.style,attrs:{role:"menu"}},[e._t("default"),t("association-flow-button",e._g({attrs:{node:e.node,moddle:e.moddle,shape:e.shape},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("generic-flow-button",e._g({attrs:{node:e.node,"node-registry":e.nodeRegistry,moddle:e.moddle},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("data-association-flow-button",e._g({attrs:{node:e.node,moddle:e.moddle,shape:e.shape},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("default-flow",e._g({attrs:{node:e.node}},e.$listeners)),t("crown-dropdowns",e._g({attrs:{"dropdown-data":e.dropdownData,"boundary-event-dropdown-data":e.boundaryEventDropdownData,node:e.node,"node-registry":e.nodeRegistry,moddle:e.moddle,shape:e.shape,"task-dropdown-initially-open":e.taskDropdownInitiallyOpen,showCustomIconPicker:e.showCustomIconPicker,iconName:e.iconName},on:{"replace-node-type":e.replaceNodeTypePrompt}},e.$listeners)),t("copy-button",e._g({attrs:{node:e.node}},e.$listeners)),t("clone-button",e._g({attrs:{node:e.node}},e.$listeners)),t("delete-button",e._g({attrs:{graph:e.graph,shape:e.shape,node:e.node}},e.$listeners)),t("b-modal",{ref:"modal",attrs:{"no-fade":e.runningInCypressTest,id:"modal-prevent-closing",title:e.$t("Change Type"),"ok-title":e.$t("Confirm"),"cancel-title":e.$t("Cancel")},on:{hidden:function(t){e.showReplaceModal=!1},ok:e.confirmedReplaceNodeType},model:{value:e.showReplaceModal,callback:function(t){e.showReplaceModal=t},expression:"showReplaceModal"}},[t("p",[e._v(e._s(e.$t("Changing this type will replace your current configuration")))])])],2):e._e()},nt=[],ot=(n("b64b"),function(){var e=this,t=e._self._c;return t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Delete"),role:"menuitem",id:"delete-button","aria-label":"Delete this node"},on:{click:function(t){e.isPoolLane?e.removePoolLaneShape():e.removeShape()}}},[t("i",{staticClass:"fas fa-trash-alt cog-container--button"})])}),it=[],rt=n("806c"),at=n.n(rt),st=function(){var e=this,t=e._self._c;return t("button",e._g({staticClass:"crown-button",attrs:{id:e.id,"aria-label":e.ariaLabel}},e.$listeners),[e._t("default",(function(){return[t("img",{staticClass:"crown-icon",attrs:{src:e.src,width:"width",height:"height"}})]}))],2)},ct=[],lt={props:{id:String,ariaLabel:String,src:String,width:{type:Number,default:19},height:{type:Number,default:20}}},dt=lt;n("c9b2");function ut(e,t,n,o,i,r,a,s){var c,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),a?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=c):i&&(c=s?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(e,t){return c.call(t),d(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:l}}var pt=ut(dt,st,ct,!1,null,"09d8a8ac",null),ht=pt.exports,ft=n("60bb"),mt=n.n(ft),gt="processmaker-modeler-data-output-association",vt="bpmn:DataOutputAssociation";function bt(e){return e.create("bpmn:DataOutputAssociation",{targetRef:{x:void 0,y:void 0}})}function yt(e){return e.create("bpmndi:BPMNEdge")}var wt="processmaker-modeler-data-input-association",xt="bpmn:DataInputAssociation";function kt(e){return e.create("bpmn:DataInputAssociation",{targetRef:{x:void 0,y:void 0}})}function Ct(e){return e.create("bpmndi:BPMNEdge")}function St(e,t){var n=this,o=e.getConnectedLinks(t);o.forEach((function(e){return n.$emit("remove-node",e.component.node)}))}function Et(e,t){e.definition.incoming&&e.definition.incoming.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));t.removeNode(n)})),e.definition.outgoing&&e.definition.outgoing.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));t.removeNode(n)}))}function At(e,t){var n=t.nodes.filter((function(t){return!(!t.definition.sourceRef||t.definition.sourceRef!==e.definition)||(!(!t.definition.targetRef||t.definition.targetRef!==e.definition)||void 0)}));n.forEach((function(e){t.removeNode(e)}))}function Mt(e,t){var n=t.nodes.filter((function(t){return!(!t.definition.sourceRef||t.definition.sourceRef!==e.definition)||(!(!t.definition.targetRef||t.definition.targetRef!==e.definition)||void 0)}));n.forEach((function(e){t.removeNode(e)}))}function Tt(e,t,n){var o=e.getCells().find((function(e){return e.component&&e.component.node===t}));o.getEmbeddedCells({deep:!0}).filter((function(e){return e.component&&e.component.node.isBpmnType("bpmn:BoundaryEvent")})).forEach((function(t){e.getConnectedLinks(t).forEach((function(e){return n(e.component.node)})),n(t.component.node)}))}function Pt(e){if(!e.isBpmnType(vt,xt)){var t=e.definition,n=t.sourceRef,o=t.targetRef;n&&Object(ft["pull"])(n.get("outgoing"),e.definition),o&&o.id&&Object(ft["pull"])(o.get("incoming"),e.definition)}}function _t(e){var t=Object(ft["get"])(e,"definition.sourceRef.default.id",null);t&&t===e.id&&e.definition.sourceRef.set("default",null)}function Ot(e,t,n){if("bpmn:DataObjectReference"!==n.$type&&"bpmn:DataStoreReference"!==n.$type)throw"Source node must be a DataObjectReference or bpmn:DataStoreReference, got "+n.$type;var o=n.id,i="data_input_".concat(o);t.definition.ioSpecification||(t.definition.ioSpecification=e.create("bpmn:InputOutputSpecification",{dataInputs:[],dataOutputs:[],inputSets:[],outputSets:[]}),t.definition.ioSpecification.$parent=t.definition),t.definition.ioSpecification.dataInputs||t.definition.ioSpecification.set("dataInputs",[]);var r=t.definition.ioSpecification.dataInputs.find((function(e){return e.id===i}));r||(t.definition.ioSpecification.dataInputs.push(e.create("bpmn:DataInput",{id:i,isCollection:"false",name:n.name})),t.definition.ioSpecification.dataInputs[t.definition.ioSpecification.dataInputs.length-1].$parent=t.definition.ioSpecification,t.definition.ioSpecification.set("dataInputs",t.definition.ioSpecification.dataInputs)),r=t.definition.ioSpecification.dataInputs.find((function(e){return e.id===i})),t.definition.ioSpecification.outputSets||t.definition.ioSpecification.set("outputSets",[e.create("bpmn:OutputSet",{dataOutputRefs:[]})]);var a=t.definition.ioSpecification.outputSets[0];a||t.definition.ioSpecification.set("outputSets",[e.create("bpmn:OutputSet",{dataOutputRefs:[]})]),a=t.definition.ioSpecification.outputSets[0],t.definition.ioSpecification.inputSets||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]);var s=t.definition.ioSpecification.inputSets[0];s||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]),s=t.definition.ioSpecification.inputSets[0];var c=s.get("dataInputRefs").find((function(e){return e.id===i}));return c||s.dataInputRefs.push(r),r}function Dt(e,t){var n,o=e.$parent;return o||(null===(n=t.nodes.find((function(t){var n;return t.definition.ioSpecification===e||(null===(n=t.definition.ioSpecification)||void 0===n?void 0:n.id)===e.id})))||void 0===n?void 0:n.definition)}function It(e,t){if("bpmn:DataObjectReference"!==t.$type&&"bpmn:DataStoreReference"!==t.$type)throw"Source node must be a DataObjectReference or bpmn:DataStoreReference, got "+t.$type;var n=t.id,o="data_input_".concat(n);if(e.definition.ioSpecification&&e.definition.ioSpecification.dataInputs){var i=e.definition.ioSpecification.dataInputs.find((function(e){return e.id===o}));if(i&&(Object(ft["pull"])(e.definition.ioSpecification.dataInputs,i),e.definition.ioSpecification.inputSets)){var r=e.definition.ioSpecification.inputSets[0];if(r){var a=r.dataInputRefs.find((function(e){return e.id===o}));if(a&&Object(ft["pull"])(r.dataInputRefs,a),0===r.dataInputRefs.length&&delete e.definition.ioSpecification.inputSets,e.definition.ioSpecification.outputSets){var s=e.definition.ioSpecification.outputSets[0];!s||s.dataOutputRefs&&0!==s.dataOutputRefs.length||delete e.definition.ioSpecification.outputSets}e.definition.ioSpecification.inputSets||e.definition.ioSpecification.outputSets||delete e.definition.ioSpecification}}}}var Nt={components:{CrownButton:ht},props:{graph:Object,shape:Object,node:Object},data:function(){return{trashIcon:at.a}},computed:{isPoolLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{removeFlows:St,removeShape:function(){this.removeFlows(this.graph,this.shape),this.$emit("remove-node",this.node)},removePoolLaneShape:function(){var e=this;this.$emit("remove-node",this.node);var t=this.node.pool.component,n=t.sortedLanes();2!==n.length?this.shape!==n[n.length-1]?t.fillLanes(this.shape,"bottom-right",!0):t.fillLanes(this.shape,"top-right",!0):this.$emit("remove-node",n.filter((function(t){return t!==e.shape}))[0].component.node)}}},Rt=Nt,jt=ut(Rt,ot,it,!1,null,null,null),Lt=jt.exports,Bt=function(){var e=this,t=e._self._c;return e.allowOutgoingSequenceFlow?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Flow"),id:"generic-flow-button","aria-label":"Create a flow",role:"menuitem"},on:{click:e.addSequence}},[t("font-awesome-icon",{attrs:{icon:["fpm","fa-connect-elements"]}})],1):e._e()},Ft=[],zt=n("3cde"),Ht=n.n(zt);n("e439"),n("dbb4");function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,V(o.key),o)}}function Wt(e,t,n){return t&&Gt(e.prototype,t),n&&Gt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n("5319");var $t={"processmaker-modeler-start-event":"Start Event","processmaker-modeler-start-timer-event":"Start Timer Event","processmaker-modeler-signal-start-event":"Signal Start Event","processmaker-modeler-message-start-event":"Message Start Event","processmaker-modeler-conditional-start-event":"Conditional Start Event"},Xt=$t,Yt={"processmaker-modeler-end-event":"End Event","processmaker-modeler-error-end-event":"Error End Event","processmaker-modeler-message-end-event":"Message End Event","processmaker-modeler-signal-end-event":"Signal End Event","processmaker-modeler-terminate-end-event":"Terminate End Event"},Zt=Yt,Kt={"processmaker-modeler-task":"Form Task","processmaker-modeler-manual-task":"Manual Task","processmaker-modeler-script-task":"Script Task","processmaker-modeler-call-activity":"Sub Process","processmaker-modeler-data-object":"Data Object","processmaker-modeler-data-store":"Data Store"},Jt=Kt,Qt={"processmaker-modeler-exclusive-gateway":"Exclusive Gateway","processmaker-modeler-inclusive-gateway":"Inclusive Gateway","processmaker-modeler-parallel-gateway":"Parallel Gateway","processmaker-modeler-event-based-gateway":"Event Based Gateway"},en=Qt,tn={"processmaker-modeler-intermediate-catch-timer-event":"Intermediate Timer Event","processmaker-modeler-intermediate-signal-catch-event":"Intermediate Signal Catch Event","processmaker-modeler-intermediate-signal-throw-event":"Intermediate Signal Throw Event","processmaker-modeler-intermediate-message-catch-event":"Intermediate Message Catch Event","processmaker-modeler-intermediate-message-throw-event":"Intermediate Message Throw Event","processmaker-modeler-intermediate-conditional-catch-event":"Intermediate Conditional Catch Event"},nn=tn,on=n("0644"),rn=n.n(on),an=function(){function e(t,n,o){Ut(this,e),U(this,"type",void 0),U(this,"definition",void 0),U(this,"diagram",void 0),U(this,"pool",void 0),this.type=t,this.definition=n,this.diagram=o}return Wt(e,[{key:"isBpmnType",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.includes(this.definition.$type)}},{key:"canBeDefaultFlow",value:function(){var e=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"];return"bpmn:SequenceFlow"===this.definition.$type&&e.includes(this.definition.sourceRef.$type)}},{key:"isType",value:function(e){return this.type===e}},{key:"isStartEvent",value:function(){return Object.keys(Xt).includes(this.type)}},{key:"isEndEvent",value:function(){return Object.keys(Zt).includes(this.type)}},{key:"isTask",value:function(){return Object.keys(Jt).includes(this.type)}},{key:"isGateway",value:function(){return Object.keys(en).includes(this.type)}},{key:"isIntermediateEvent",value:function(){return Object.keys(nn).includes(this.type)}},{key:"id",get:function(){return this.definition.id},set:function(e){this.definition.id=e}},{key:"setIds",value:function(e){var t,n,o=this,i=e.generate(),r=_e(i,2),a=r[0],s=r[1];if(this.id||(this.id=a),this.diagram&&(this.diagram.id=s,this.diagram.bpmnElement=this.definition),this.definition.loopCharacteristics&&"bpmn:StandardLoopCharacteristics"===this.definition.loopCharacteristics.$type&&(this.definition.loopCharacteristics.set("id",e.generate()[0]),this.definition.loopCharacteristics.loopCondition&&this.definition.loopCharacteristics.get("loopCondition").set("id",e.generate()[0])),this.definition.ioSpecification){this.definition.ioSpecification.set("id",e.generate()[0]);var c=this.definition.id;this.definition.ioSpecification.get("dataInputs")&&this.definition.ioSpecification.get("dataInputs").forEach((function(n){var i=n.get("id");i.substring(0,o.cloneOf.length)===o.cloneOf?(n.set("id",i.replace(o.cloneOf+"_",c+"_")),t=n):n.set("id",e.generate()[0])})),this.definition.ioSpecification.get("dataOutputs")&&this.definition.ioSpecification.get("dataOutputs").forEach((function(t){var i=t.get("id");i.substring(0,o.cloneOf.length)===o.cloneOf?(t.set("id",i.replace(o.cloneOf+"_",c+"_")),n=t):t.set("id",e.generate()[0])})),this.definition.ioSpecification.get("inputSets")&&this.definition.ioSpecification.get("inputSets").forEach((function(t){t.set("id",e.generate()[0])})),this.definition.ioSpecification.get("outputSets")&&this.definition.ioSpecification.get("outputSets").forEach((function(t){t.set("id",e.generate()[0])}))}this.definition.loopCharacteristics&&"bpmn:MultiInstanceLoopCharacteristics"===this.definition.loopCharacteristics.$type&&(this.definition.loopCharacteristics.set("id",e.generate()[0]),this.definition.loopCharacteristics.loopCardinality&&this.definition.loopCharacteristics.get("loopCardinality").set("id",e.generate()[0]),this.definition.loopCharacteristics.loopDataInputRef&&t&&this.definition.loopCharacteristics.set("loopDataInputRef",t),this.definition.loopCharacteristics.loopDataOutputRef&&n&&this.definition.loopCharacteristics.set("loopDataOutputRef",n),this.definition.loopCharacteristics.inputDataItem&&this.definition.loopCharacteristics.get("inputDataItem").set("id",e.generate()[0]),this.definition.loopCharacteristics.outputDataItem&&this.definition.loopCharacteristics.get("outputDataItem").set("id",e.generate()[0]),this.definition.loopCharacteristics.completionCondition&&this.definition.loopCharacteristics.get("completionCondition").set("id",e.generate()[0]))}},{key:"clone",value:function(t,n,o){var i=this,r=t[this.type].definition(n,o),a=t[this.type].diagram(n),s=new this.constructor(this.type,r,a);return s.id=null,s.pool=this.pool,s.cloneOf=this.id,e.diagramPropertiesToCopy.forEach((function(e){return s.diagram.bounds[e]=i.diagram.bounds[e]})),Object.keys(this.definition).filter((function(t){return!e.definitionPropertiesToNotCopy.includes(t)})).forEach((function(e){var t=i.definition.get(e),n="object"===v(t)?rn()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",Vt({},t[o].signalRef));s.definition.set(e,n)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return s.definition.eventDefinitions&&s.definition.eventDefinitions[0]&&s.definition.eventDefinitions[0].hasOwnProperty(e)&&s.definition.eventDefinitions[0].set(e,null)})),s}},{key:"cloneFlow",value:function(t,n,o){var i=this,r=t[this.type].definition(n,o),a=t[this.type].diagram(n),s=new this.constructor(this.type,r,a);return s.id=null,s.pool=this.pool,s.cloneOf=this.id,s.diagram=n.create("bpmndi:BPMNEdge",{waypoint:[]}),this.diagram.waypoint.forEach((function(e){var t=n.create("dc:Point",{x:e.x,y:e.y});s.diagram.waypoint.push(t)})),Object.keys(this.definition).filter((function(t){return!e.flowDefinitionPropertiesToNotCopy.includes(t)})).forEach((function(e){var t=i.definition.get(e),n="object"===v(t)?rn()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",Vt({},t[o].signalRef));s.definition.set(e,n),s.definition.set("sourceRef",null),s.definition.set("targetRef",null)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return s.definition.eventDefinitions&&s.definition.eventDefinitions[0]&&s.definition.eventDefinitions[0].hasOwnProperty(e)&&s.definition.eventDefinitions[0].set(e,null)})),s}},{key:"getTargetProcess",value:function(e,t){var n=this;return this.pool?e.find((function(e){var t=e.id;return t===n.pool.component.node.definition.get("processRef").id})):t.definition}}],[{key:"isTimerType",value:function(e){return["processmaker-modeler-start-timer-event","processmaker-modeler-intermediate-catch-timer-event"].includes(e)}}]),e}();U(an,"diagramPropertiesToCopy",["x","y","width","height"]),U(an,"definitionPropertiesToNotCopy",["$type","id","dataOutputAssociations"]),U(an,"flowDefinitionPropertiesToNotCopy",["$type","id","sourceRef","targetRef"]),U(an,"eventDefinitionPropertiesToNotCopy",["errorRef","messageRef"]);var sn="processmaker-modeler-generic-flow",cn=n("b0b2"),ln={prefix:"fpm",iconName:"fa-boundary-event",icon:[112,112,[],"e001","M51.739 2.056c-13.026.848-25.131 6.341-34.43 15.625C10.84 24.139 6.603 30.987 3.72 39.642.81 48.38.051 56.948 1.392 65.92c.932 6.232 3.501 13.807 6.441 18.991 8.903 15.7 23.772 25.701 41.487 27.903 2.517.312 9.393.312 11.911 0 17.703-2.201 32.617-12.231 41.488-27.903 2.943-5.2 5.508-12.763 6.439-18.991 1.698-11.359-.064-22.783-5.13-33.257-4.913-10.156-13.314-18.932-23.21-24.247-7.159-3.845-14.191-5.854-22.286-6.365-3.224-.204-3.584-.204-6.793.005m8.216 4.091c8.319.827 15.946 3.548 22.891 8.165 3.153 2.096 5.414 3.998 8.35 7.021 7.582 7.807 12.34 17.536 14.049 28.731.423 2.764.572 9.015.29 12.1-.962 10.515-4.848 20.143-11.415 28.286-1.857 2.303-5.901 6.293-8.136 8.029a50.9 50.9 0 0 1-23.544 10.144c-3.182.489-11.148.489-14.33 0-5.812-.893-11.669-2.875-16.75-5.668-11.303-6.213-20.134-17.022-24.092-29.49-3.259-10.266-3.259-21.647 0-31.913a51.37 51.37 0 0 1 11.995-20.128c2.834-2.93 5.301-5.008 8.426-7.097a49.964 49.964 0 0 1 22.654-8.169c2.192-.225 7.401-.231 9.612-.011m-9.053 12.099c-20.419 2.322-35.641 19.091-35.641 39.263 0 14.657 8.112 27.984 21.217 34.859 14.221 7.46 31.65 5.768 44.132-4.283 14.219-11.449 18.699-30.977 10.879-47.42-5.522-11.611-16.451-19.808-29.421-22.068-2.55-.444-8.659-.636-11.166-.351m6.979 3.906c1.382.105 3.214.321 4.071.481 12.854 2.394 23.482 11.579 27.55 23.808 4.141 12.449 1.019 26.046-8.153 35.508-5.615 5.792-12.307 9.26-20.584 10.667-2.565.436-8.414.436-10.98 0-11.016-1.872-19.998-7.889-25.586-17.14-5.178-8.573-6.354-19.406-3.15-29.035 4.492-13.506 16.952-23.186 31.248-24.278 2.856-.218 2.85-.218 5.584-.011"]},dn={prefix:"fpm",iconName:"fa-connect-elements",icon:[20,20,[],"e002","M0 2.502v2.501h5.003V3.008h5.004v15.01h5.478V19c0 .54.011.981.024.981.053-.001 2.989-2.477 2.964-2.499a203.517 203.517 0 0 0-2.942-2.429c-.04-.016-.046.116-.046.967v.985h-4.497V1.995H5.003V0H0v2.502m3.99.016v1.504H1.013V1.013H3.99v1.505"]},un={prefix:"fpm",iconName:"fa-lane-above",icon:[26,18,[],"e003","M0 .997v.996h.997V.997h1.04V0H0v.997M2.99.498v.499h2.037V0H2.99v.498m2.99 0v.499h2.037V0H5.98v.498m3.033 0v.499h1.994V0H9.013v.498m2.99 0v.499h1.994V0h-1.994v.498m2.99 0v.499h1.994V0h-1.994v.498m2.99 0v.499h2.037V0h-2.037v.498m2.99 0v.499h2.037V0h-2.037v.498m2.99 0v.499h1.04v.996H26V0h-2.037v.498M0 3.987v.996h.997V2.99H0v.997m25.003 0v.996H26V2.99h-.997v.997M0 11.982v6.001h26V5.98H0v6.002"]},pn={prefix:"fpm",iconName:"fa-lane-below",icon:[26,18,[],"e004","M0 6.002v6.001h26V0H0v6.002m0 7.995v.996h.997V13H0v.997m25.003 0v.996H26V13h-.997v.997M0 16.987v.996h2.037v-.996H.997v-.997H0v.997m25.003-.499v.499h-1.04v.996H26V15.99h-.997v.498m-22.013.997v.498h2.037v-.996H2.99v.498m2.99 0v.498h2.037v-.996H5.98v.498m3.033 0v.498h1.994v-.996H9.013v.498m2.99 0v.498h1.994v-.996h-1.994v.498m2.99 0v.498h1.994v-.996h-1.994v.498m2.99 0v.498h2.037v-.996h-2.037v.498m2.99 0v.498h2.037v-.996h-2.037v.498"]},hn={prefix:"fpm",iconName:"fa-center-horizontally",icon:[24,24,[],"e001","M11.04 4.88v1.88H7.28v3.92h3.76v3.28H5v3.92h6.04v3.76h1v-3.76h6.04v-3.92h-6.04v-3.28h3.76V6.76h-3.76V3h-1v1.88"]},fn={prefix:"fpm",iconName:"fa-center-vertically",icon:[24,24,[],"e001","M6.76 8.04v3.04H3v.96h3.76v6.04h3.92v-6.04h3.28v3.76h3.92v-3.76h3.76v-.959l-1.87-.011-1.87-.01-.01-1.89-.011-1.89H13.96v3.801l-1.63-.011-1.63-.01-.01-3.03L10.679 5H6.76v3.04"]},mn={prefix:"fpm",iconName:"fa-align-left",icon:[24,24,[],"e001","M4 12.32v9.32h1V3H4v9.32m2.28-3.6v1.96h8.52V6.76H6.28v1.96m0 7.2v1.96h13.08v-3.92H6.28v1.96"]},gn={prefix:"fpm",iconName:"fa-align-right",icon:[24,24,[],"e001","M18.4 12.32v9.32h1V3h-1v9.32m-9.8-3.6v1.96h8.48V6.76H8.6v1.96M4 15.92v1.96h13.08v-3.92H4v1.96"]},vn={prefix:"fpm",iconName:"fa-align-bottom",icon:[24,24,[],"e001","M6.76 10.54v6.54h3.92V4H6.76v6.54m7.2 2.3v4.24h3.92V8.6h-3.92v4.24M3 18.9v.5h18.64v-1H3v.5"]},bn={prefix:"fpm",iconName:"fa-align-top",icon:[24,24,[],"e001","M3 4.5V5h18.64V4H3v.5m3.76 8.32v6.54h3.92V6.28H6.76v6.54m7.2-2.28v4.26h3.92V6.28h-3.92v4.26"]},yn={prefix:"fpm",iconName:"fa-distribute-horizontally",icon:[24,24,[],"e001","M3 12.32v9.32h.96V3H3v9.32m17 0v9.32h1V3h-1v9.32m-10.44.02v6.54h4.88V5.8H9.56v6.54"]},wn={prefix:"fpm",iconName:"fa-distribute-vertically",icon:[24,24,[],"e001","M3 3.5V4h18.64V3H3v.5M5.8 12v2.44h13.08V9.56H5.8V12M3 20.52V21h18.64v-.96H3v.48"]},xn=n("07a2"),kn=["processmaker-modeler-data-object","processmaker-modeler-data-store","processmaker-modeler-lane","processmaker-modeler-end-event","processmaker-modeler-error-end-event","processmaker-modeler-signal-end-event","processmaker-modeler-terminate-end-event","processmaker-modeler-text-annotation","processmaker-modeler-sequence-flow","processmaker-modeler-message-flow"],Cn={components:{CrownButton:ht,FontAwesomeIcon:xn["FontAwesomeIcon"]},props:["node","moddle","nodeRegistry"],data:function(){return{sequenceFlow:Ht.a}},computed:{paper:function(){return ze.getters.paper},sequenceFlowConfig:function(){return this.nodeRegistry[sn]},nodeConfig:function(){return this.nodeRegistry[this.node.type]},allowOutgoingSequenceFlow:function(){var e=this;return!kn.some((function(t){return e.node.isType(t)}))}},methods:{addSequence:function(e,t,n,o){this.$emit("toggle-crown-state",!1);var i=e.clientX,r=e.clientY,a=null;e&&(a=Object(d["V"])(this.paper.viewport).toLocalPoint(i,r));var s=this.moddle.create("bpmn:SequenceFlow",{name:"",sourceRef:this.node.definition,targetRef:{x:n||a.x,y:o||a.y}});this.$emit("add-node",new an(sn,s,this.moddle.create("bpmndi:BPMNEdge")))}},created:function(){this.$t=this.$t.bind(this),cn["library"].add(dn)}},Sn=Cn,En=ut(Sn,Bt,Ft,!1,null,null,null),An=En.exports,Mn=function(){var e=this,t=e._self._c;return e.node.isType("processmaker-modeler-text-annotation")?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Association Flow"),id:"association-flow-button","aria-label":"Add association flow",role:"menuitem"},on:{click:e.addAssociation}},[t("img",{attrs:{src:e.connectIcon,"aria-hidden":"true"}})]):e._e()},Tn=[],Pn=n("00a3"),_n=n.n(Pn),On={components:{CrownButton:ht},props:["node","moddle","shape"],data:function(){return{connectIcon:_n.a}},methods:{addAssociation:function(e,t,n,o){this.$emit("toggle-crown-state",!1);var i=this.moddle.create("bpmn:Association",{sourceRef:this.shape.component.node.definition,targetRef:{x:n,y:o},associationDirection:et.none});this.$emit("add-node",new an("processmaker-modeler-association",i,this.moddle.create("bpmndi:BPMNEdge")))}}},Dn=On,In=ut(Dn,Mn,Tn,!1,null,null,null),Nn=In.exports,Rn=function(){var e=this,t=e._self._c;return e.allowOutgoingDataAssociationFlow?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Data Association Flow"),id:"association-flow-button","aria-label":"Add association flow",role:"menuitem"},on:{click:e.addDataAssociation}},[t("img",{attrs:{src:e.connectIcon,"aria-hidden":"true"}})]):e._e()},jn=[];function Ln(e,t){return Ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ln(e,t)}function Bn(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ln(e,t)}n("4ae1"),n("f8c9");function Fn(e){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fn(e)}function zn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qn(e,t){if(t&&("object"===v(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Hn(e)}function Vn(e){var t=zn();return function(){var n,o=Fn(e);if(t){var i=Fn(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return qn(this,n)}}var Un="processmaker-modeler-pool",Gn=function(){function e(t,n,o){Ut(this,e),U(this,"nodeRegistry",void 0),U(this,"moddle",void 0),U(this,"paper",void 0),this.nodeRegistry=t,this.moddle=n,this.paper=o}return Wt(e,[{key:"makeFlowNode",value:function(e,t,n){throw new Error("Best practice is to implement 'makeFlowDefinition' in each class")}}],[{key:"isValid",value:function(e,t,n){throw new Error("Best practice is to implement 'isValid' in each class")}},{key:"hasTargetType",value:function(e){return null!=k()(e,"component.node.type")}},{key:"targetIsValidStartEventType",value:function(e){return!e.isBpmnType("bpmn:StartEvent")||e.isType("processmaker-modeler-message-start-event")}},{key:"targetIsValidIntermediateEventType",value:function(e){return!e.isBpmnType("bpmn:IntermediateCatchEvent")||e.isType("processmaker-modeler-intermediate-message-catch-event")}},{key:"targetIsValidBoundaryEventType",value:function(e){return!e.isBpmnType("bpmn:BoundaryEvent")||e.isType("processmaker-modeler-boundary-message-event")}},{key:"targetIsNotContainingPool",value:function(e,t){return e!==t.pool}},{key:"targetIsInDifferentPool",value:function(t,n){var o=e.shapeIsPool(t)?t:t.component.node.pool,i=e.shapeIsPool(n)?n:n.component.node.pool;return null!=i&&i!==o}},{key:"targetIsNotSource",value:function(e,t){return e.id!==t.id}},{key:"allowOutgoingFlow",value:function(e,t){return!("allowOutgoingFlow"in e)||e.allowOutgoingFlow(t)}},{key:"shapeIsPool",value:function(e){var t=k()(e,"component.node.type");return t===Un}}]),e}(),Wn=function(e){Bn(n,e);var t=Vn(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Wt(n,null,[{key:"isADataNode",value:function(e){return e.isBpmnType.apply(e,g(n.dataNodeTypes))}},{key:"isNodeDisallowedFromDataAssociation",value:function(e){return e.isBpmnType.apply(e,g(n.disallowedNodes))}}]),n}(Gn);U(Wn,"dataNodeTypes",["bpmn:DataStoreReference","bpmn:DataObjectReference"]),U(Wn,"disallowedNodes",["bpmn:EndEvent","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:Participant","bpmn:Lane","bpmn:TextAnnotation","bpmn:Association"]);var $n={components:{CrownButton:ht},props:["node","moddle","shape"],data:function(){return{connectIcon:_n.a}},computed:{paper:function(){return ze.getters.paper},allowOutgoingDataAssociationFlow:function(){return Wn.isADataNode(this.node)}},methods:{addDataAssociation:function(e,t,n){this.$emit("toggle-crown-state",!1);var r=e.clientX,a=e.clientY,s=null;e&&(s=Object(d["V"])(this.paper.viewport).toLocalPoint(r,a));var c=this.node.isBpmnType("bpmn:DataStoreReference","bpmn:DataObjectReference"),l=c?i:o,u=l.definition(this.moddle),p=new an(l.id,u,l.diagram(this.moddle));p.dataAssociationProps={sourceShape:this.shape,targetCoords:{x:t||s.x,y:n||s.y}},this.$emit("add-node",p)}}},Xn=$n,Yn=ut(Xn,Rn,jn,!1,null,null,null),Zn=Yn.exports,Kn=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,g(t.validCopyElements))?n("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:t.$t("Copy Element"),"aria-label":"Copy Element","data-test":"copy-button",role:"menuitem"},on:{click:t.copyElement}},[n("i",{staticClass:"fas fa-clipboard"})]):t._e()},Jn=[],Qn=n("605b"),eo=n.n(Qn),to=["bpmn:StartEvent","bpmn:IntermediateEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:ExclusiveGateway","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:Gateway","bpmn:EventBasedGateway","bpmn:TextAnnotation"],no=to,oo={components:{CrownButton:ht},props:["node"],data:function(){return{copyCount:0,copyIcon:eo.a,validCopyElements:no}},methods:{copyElement:function(){this.$emit("copy-element")}}},io=oo,ro=ut(io,Kn,Jn,!1,null,null,null),ao=ro.exports,so=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,g(t.validCopyElements))?n("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:t.$t("Clone Element"),"aria-label":"Clone Element","data-test":"clone-button"},on:{click:t.cloneElement}},[n("i",{staticClass:"fas fa-paste"})]):t._e()},co=[],lo=n("baa4"),uo=n.n(lo),po={components:{CrownButton:ht},props:["node"],data:function(){return{copyCount:0,cloneIcon:uo.a,validCopyElements:no}},methods:{cloneElement:function(){this.$emit("clone-element",this.node,++this.copyCount)}}},ho=po,fo=ut(ho,so,co,!1,null,null,null),mo=fo.exports,go=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"dropdown"}},[t("crown-task-dropdown",e._g({attrs:{"dropdown-data":e.dropdownData,"dropdown-open":e.taskDropdownOpen,node:e.node},on:{"toggle-dropdown-state":e.taskDropdownToggle}},e.$listeners)),t("crown-boundary-event-dropdown",e._g({attrs:{"dropdown-data":e.boundaryEventDropdownData,"dropdown-open":e.boundaryEventDropdownOpen,nodeRegistry:e.nodeRegistry,moddle:e.moddle,node:e.node,shape:e.shape},on:{"toggle-dropdown-state":e.boundaryEventDropdownToggle}},e.$listeners)),t("crown-color-dropdown",e._g({attrs:{"dropdown-open":e.colorDropdownOpen,node:e.node,showCustomIconPicker:e.showCustomIconPicker,iconName:e.iconName},on:{"toggle-dropdown-state":e.colorDropdownToggle}},e.$listeners))],1)},vo=[],bo=function(){var e=this,t=e._self._c;return e.dropdownData.length>0?t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",e._g({attrs:{"data-test":"select-type-dropdown",id:"dropdown-button","aria-label":"Select a type"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},e.$listeners),[t("i",{staticClass:"fas fa-cog"})]),e.dropdownOpen?t("ul",{staticClass:"element-list",attrs:{role:"list"}},e._l(e.dropdownData,(function(n){var o=n.label,i=n.nodeType,r=n.dataTest,a=n.disabled;return t("li",{key:i,staticClass:"element-list--item",attrs:{role:"listitem",id:i}},[t("button",{staticClass:"element-list--item__button",attrs:{"data-test":r,type:"button",disabled:e.isDisabled(a,e.node,i)},on:{click:function(t){return e.replaceNode({node:e.node,typeToReplaceWith:i})}}},[e._v(e._s(e.$t(o))+" ")]),e.isDisabled(a,e.node,i)?t("b-tooltip",{attrs:{target:i,variant:"warning",placement:"right"}},[e._v(" "+e._s(e.$t(e.tooltip(a,e.node,i)))+" ")]):e._e()],1)})),0):e._e()],1):e._e()},yo=[],wo={name:"CrownTaskDropdown",components:{CrownButton:ht},props:{dropdownData:Array,node:Object,dropdownOpen:{type:Boolean,required:!0}},methods:{isDisabled:function(e,t,n){return e&&(e instanceof Function?e.apply(this,[t,n]):e)},tooltip:function(e,t,n){return this.isDisabled(e,t,n)||""},replaceNode:function(e){e.node.type!==e.typeToReplaceWith?this.$emit("replace-node-type",e):this.$emit("toggle-dropdown-state",!1)}}},xo=wo,ko=(n("cf35"),ut(xo,bo,yo,!1,null,"31668547",null)),Co=ko.exports,So=function(){var e=this,t=e._self._c;return e.dropdownData.length>0?t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",e._g({directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{id:"dropdown-button","aria-label":"Select a boundary event","data-test":"boundary-event-dropdown",title:e.$t("Boundary Events"),role:"menuitem"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-boundary-event"]}})],1),e.dropdownOpen?t("ul",{staticClass:"element-list",attrs:{role:"list"}},e._l(e.dropdownData,(function(n){var o=n.label,i=n.nodeType,r=n.dataTest,a=n.disabledLabel;return t("li",{key:i,staticClass:"element-list--item",attrs:{role:"listitem",id:i}},[t("button",{staticClass:"element-list--item__button",attrs:{"data-test":r,type:"button",disabled:!e.canAddBoundaryEventToTarget(i,e.shape)},on:{click:function(t){return e.addBoundaryEvent(i)}}},[e._v(e._s(e.$t(o))+" ")]),e.canAddBoundaryEventToTarget(i,e.shape)?e._e():t("b-tooltip",{attrs:{target:i,variant:"warning",placement:"right"}},[e._v(" "+e._s(e.getErrorTooltipText(a))+" ")])],1)})),0):e._e()],1):e._e()},Eo=[],Ao=n("0639"),Mo=n.n(Ao),To=["bpmn:Task","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:SendTask","bpmn:ReceiveTask","bpmn:UserTask","bpmn:GlobalTask","bpmn:ManualTask","bpmn:CallActivity"];function Po(e){return e&&To.some((function(t){return e.node.isBpmnType(t)}))}function _o(e,t){return!(!t||!Po(t.component))&&Do(t)}function Oo(e){return e&&e.node.isBpmnType("bpmn:CallActivity")}function Do(e){return 0!==Ee(e).length}var Io={name:"CrownBoundaryEventDropdown",components:{CrownButton:ht,FontAwesomeIcon:xn["FontAwesomeIcon"]},props:{dropdownOpen:{type:Boolean,required:!0},dropdownData:Array,nodeRegistry:Object,moddle:Object,node:Object,shape:Object},data:function(){return{boundaryEventIcon:Mo.a}},methods:{getErrorTooltipText:function(e){return 0===this.getEmptyBoundaryEventPositionsForShape(this.shape).length?"No available space":e},canAddBoundaryEventToTarget:_o,getEmptyBoundaryEventPositionsForShape:Ee,addBoundaryEvent:function(e){if(this.$emit("toggle-dropdown-state",!1),this.canAddBoundaryEventToTarget(e,this.shape)){var t=this.nodeRegistry[e].definition(this.moddle,this.$t),n=this.nodeRegistry[e].diagram(this.moddle),o=Ee(this.shape)[0];n.bounds.x=o.x-n.bounds.width/2,n.bounds.y=o.y-n.bounds.height/2;var i=new an(e,t,n);i.pool=this.node.pool,ze.commit("highlightNode",i),this.$emit("add-node",i)}}},created:function(){this.$t=this.$t.bind(this),cn["library"].add(ln)}},No=Io,Ro=(n("9438"),ut(No,So,Eo,!1,null,null,null)),jo=Ro.exports,Lo=function(){var e=this,t=e._self._c;return t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Open Color Palette"),"aria-label":e.$t("Open Color Palette"),role:"menuitem","data-test":"picker-dropdown-button"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},[t("i",{staticClass:"fas fa-palette"})]),e.dropdownOpen?t("div",{staticClass:"element-list color-list"},[e._l(e.colors.slice(0,4),(function(n){return t("button",{key:n,staticClass:"color-button",style:{backgroundColor:n},attrs:{type:"button","data-test":n},on:{click:function(t){e.selectedColor=n}}})})),e.showCustomIconPicker?t("button",{staticClass:"color-button p-0 fa fa-drafting-compass",attrs:{type:"button","data-test":"set-custom-icon"},on:{click:e.openIconSelector}}):t("div"),e._l(e.colors.slice(4,8),(function(n){return t("button",{key:n,staticClass:"color-button",style:{backgroundColor:n},attrs:{type:"button","data-test":n},on:{click:function(t){e.selectedColor=n}}})})),t("button",{staticClass:"color-button toggle-picker",attrs:{type:"button"},on:{click:function(t){e.colorPickerOpen=!e.colorPickerOpen}}}),t("button",{staticClass:"color-button p-0 fa fa-undo-alt",attrs:{type:"button","data-test":"clear-color"},on:{click:e.resetNodeStyling}}),e.colorPickerOpen?t("sketch-picker",{staticClass:"color-picker",attrs:{value:e.selectedColor||"#fff",presetColors:null},on:{input:e.setColorFromPicker}}):e._e()],2):e._e(),t("b-modal",{ref:"icon-selector-modal",attrs:{title:"Select a custom icon","cancel-title":"Reset to Default"},on:{cancel:e.resetCustomIcon}},[t("div",[t("icon-selector",{attrs:{value:e.iconName,"allow-custom":!1},on:{input:e.setCustomIcon}})],1)])],1)},Bo=[],Fo=(n("313d"),n("0eb6"),n("b7ef"),n("8bd4"),n("c345")),zo=function(){var e=this,t=e._self._c;return t("div",{staticClass:"multiselect-icons"},[t("b-input-group",[t("multiselect",{ref:"multiselect",attrs:{"track-by":"value",label:"label","show-labels":!1,placeholder:e.placeholder,options:e.list,multiple:!1,searchable:!0,"internal-search":!1,"allow-empty":!1},on:{"search-change":e.onSearch,open:e.onOpen,close:e.onClose},scopedSlots:e._u([{key:"singleLabel",fn:function(n){return[n.option?t("span",[t("i",{staticClass:"fas fa-fw",class:"fa-"+n.option.value}),e._v(" "+e._s(n.option.label)+" ")]):e._e()]}},{key:"option",fn:function(n){return[t("div",{staticClass:"icon-square",on:{mouseover:function(t){return e.onHover(n.option)}}},[t("i",{staticClass:"fas fa-fw",class:"fa-"+n.option.value})])]}}]),model:{value:e.icon,callback:function(t){e.icon=t},expression:"icon"}},[t("template",{slot:"noResult"},[e.allowCustom?t("div",{staticClass:"multiselect-no-result text-muted my-2 text-center w-100"},[t("strong",[e._v(e._s(e.$t("No icons found.")))]),t("br"),e._v(" "+e._s(e.$t("Try a different search or"))+" "),t("br"),t("a",{staticClass:"text-primary link-upload",on:{click:e.triggerUpload}},[e._v(e._s(e.$t("upload a custom icon")))]),e._v(". ")]):t("div",{staticClass:"multiselect-no-result text-muted my-2 text-center w-100"},[t("strong",[e._v(e._s(e.$t("No icons found.")))]),t("br"),e._v(" "+e._s(e.$t("Try a different search."))+" ")])]),t("template",{slot:"placeholder"},[this.file?t("span",[e._v(" "+e._s(e.$t("Custom Icon File"))+" "),this.fileName?t("span",{staticClass:"text-muted"},[e._v("("+e._s(this.fileName)+")")]):e._e()]):e._e()])],2),e.allowCustom?t("b-input-group-append",{staticClass:"multiselect-icons-upload"},[t("file-upload-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip",value:{title:e.$t("Upload Custom Icon")},expression:"{ title: $t('Upload Custom Icon') }"}],ref:"fileUploadButton",attrs:{accept:"image/png, image/svg+xml, image/gif",variant:"secondary"},model:{value:e.uploadedFile,callback:function(t){e.uploadedFile=t},expression:"uploadedFile"}},[t("i",{staticClass:"fas fa-fw fa-upload"})])],1):e._e()],1)],1)},Ho=[],qo=(n("841c"),n("a15b"),n("61ec")),Vo=n.n(qo),Uo=["search","search-plus","search-dollar","check-square","list","id-badge","clipboard-list","clipboard-check","clipboard","fire","fire-alt","star","dollar-sign","users","user-circle","trophy"],Go=["align-center","align-justify","align-left","align-right","arrows-alt","arrows-alt-h","arrows-alt-v","bars","beer","bong","border-all","border-none","border-style","cannabis","circle-notch","cog","cogs","compress","compress-alt","compress-arrows-alt","custom","democrat","disease","download","ellipsis-h","ellipsis-v","expand","expand-alt","expand-arrows-alt","faucet","file-download","file-export","file-import","file-upload","flag-usa","font-awesome-logo-full","grip-horizontal","grip-lines","grip-lines-vertical","grip-vertical","hand-holding-water","hand-middle-finger","hospital-user","joint","lungs","republican","upload"],Wo=function(){function e(){Ut(this,e)}return Wt(e,null,[{key:"list",value:function(){var e=this,t=[];Uo.forEach((function(n){Vo.a[n]&&t.push(e.parseIcon(n,Vo.a[n]))}));for(var n=0,o=Object.entries(Vo.a);n<o.length;n++){var i=_e(o[n],2),r=i[0],a=i[1];this.shouldIncludeIcon(r,a)&&t.push(this.parseIcon(r,a))}return t}},{key:"grouped",value:function(){for(var e=[{group:"Common",icons:[]},{group:"All Icons",icons:[]}],t=0,n=Object.entries(Vo.a);t<n.length;t++){var o=_e(n[t],2),i=o[0],r=o[1];Go.includes(i)||(Uo.includes(i)&&e[0].icons.push(this.parseIcon(i,r)),this.shouldIncludeIcon(i,r)&&e[1].icons.push(this.parseIcon(i,r)))}return e}},{key:"shouldIncludeIcon",value:function(e,t){var n=!1,o=["-left","-right","-up","-down"];return Go.includes(e)||Uo.includes(e)||t.styles.includes("solid")&&!t.changes.includes("5.13.0")&&(n=!0),o.forEach((function(t){e.includes(t)&&(n=!1)})),n}},{key:"parseIcon",value:function(e,t){var n={value:e,label:t.label,search:t.search.terms.join()+","+e+","+t.label.toLowerCase()};return n.label.startsLowerCase()&&(n.label=n.label.unSlug().titleCase()),n}}]),e}();String.prototype.startsLowerCase=function(){var e=this.substring(0,1);return e==e.toLowerCase()},String.prototype.unSlug=function(){return this.split("-").join(" ")},String.prototype.titleCase=function(){var e=this.split(" ");return e=e.map((function(e){return e.substring(0,1).toUpperCase()+e.substring(1)})),e.join(" ")};var $o=function(){var e=this,t=e._self._c;return t("b-button",{staticClass:"file-upload-button",attrs:{block:e.block,disabled:e.disabled,size:e.size,variant:e.variant,type:e.type,tag:e.tag,pill:e.pill,squared:e.squared,pressed:e.pressed},on:{click:e.onClick}},[t("b-form-file",e._b({ref:"fileUpload",staticClass:"file-upload-control",attrs:{plain:"",accept:e.accept,capture:e.capture,multiple:e.multiple,directory:e.directory,"no-traverse":e.noTraverse,"no-drop":e.noDrop,"file-name-formatter":e.fileNameFormatter},on:{change:e.onChange,input:e.onInput},model:{value:e.file,callback:function(t){e.file=t},expression:"file"}},"b-form-file",e.$attrs,!1)),e._t("default")],2)},Xo=[],Yo={inheritAttrs:!1,props:{value:{default:null},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"md"},variant:{type:String,default:"secondary"},type:{type:String,default:"button"},tag:{type:String,default:"button"},pill:{type:Boolean,default:!1},squared:{type:Boolean,default:!1},pressed:{type:Boolean,default:null},accept:{type:String,default:""},capture:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},directory:{type:Boolean,default:!1},noTraverse:{type:Boolean,default:!1},noDrop:{type:Boolean,default:!1},fileNameFormatter:{type:Function,default:null}},data:function(){return{file:null}},watch:{file:{handler:function(e){this.$emit("input",e)}},value:{handler:function(e){this.file=e},deep:!0}},methods:{onClick:function(){this.$refs.fileUpload.$el.click()},onChange:function(e){this.$emit("change",e)},onInput:function(e){this.$emit("input",e)},reset:function(){this.$refs.fileUpload.reset()},trigger:function(){this.$refs.fileUpload.$el.click()}}},Zo=Yo,Ko=(n("1242"),ut(Zo,$o,Xo,!1,null,null,null)),Jo=Ko.exports,Qo={components:{FileUploadButton:Jo},props:{value:{required:!1},allowCustom:{type:Boolean,default:!0},default:{type:String,default:"search"}},data:function(){return{all:Wo.list(),file:null,fileName:null,icon:null,list:{},loading:!0,placeholder:this.$t("Icon"),query:"",uploadedFile:null}},computed:{isOpen:function(){return this.$refs.multiselect.isOpen},iconAndFile:function(){return this.allowCustom?{icon:this.icon?this.icon.value:null,file:this.file}:this.icon?this.icon.value:null}},watch:{value:function(){this.allowCustom?(this.icon=this.find(this.value.icon),this.file=this.value.file):this.icon=this.find(this.value)},icon:function(e){e&&(this.file=null,this.fileName=null,this.allowCustom&&this.$refs.fileUploadButton.reset(),this.$emit("input",this.iconAndFile))},file:function(e){e&&(this.icon=null,this.$refs.multiselect.deactivate(),this.$emit("input",this.iconAndFile))},uploadedFile:function(e){var t=this;if(e)if(e.size>2e3)this.$emit("error",this.$t("The custom icon file is too large. File size must be less than 2KB."));else{this.file=e,this.fileName=e.name,this.uploadedFile=null;var n=new FileReader;n.readAsDataURL(this.file),n.onload=function(){t.file=n.result}}}},beforeMount:function(){this.list=this.all},mounted:function(){this.allowCustom?(this.icon=this.find(this.value.icon),this.file=this.value.file):this.value?this.icon=this.find(this.value):this.icon=this.find(this.default)},methods:{onSearch:function(e){var t=this;e.length?this.query=e.toLowerCase():this.isOpen&&(this.query=""),this.query.length?this.list=this.all.filter((function(e){return e.search.includes(t.query)})):this.list=this.all},onOpen:function(){this.$refs.multiselect.search=this.query},onClose:function(){this.placeholder=this.$t("Icon")},find:function(e){return this.all.find((function(t){return t.value==e}))},onHover:function(e){this.placeholder=e.label},triggerUpload:function(){this.$refs.fileUploadButton.trigger()}}},ei=Qo,ti=(n("6dac"),ut(ei,zo,Ho,!1,null,null,null)),ni=ti.exports,oi=n("368f"),ii={props:{dropdownOpen:{type:Boolean,required:!0},node:Object,showCustomIconPicker:{type:Boolean,default:!1},iconName:{type:String,default:""}},components:{CrownButton:ht,"sketch-picker":Fo["Sketch"],IconSelector:ni},data:function(){return{colors:M,selectedColor:this.node.definition.get("color"),colorPickerOpen:!1}},watch:{selectedColor:function(e){e?this.setNodeColor(e):this.resetNodeColor()}},methods:{setColorFromPicker:function(e){var t=e.hex8;this.selectedColor=t},resetNodeStyling:function(){this.resetNodeColor(),this.resetCustomIcon()},setNodeColor:function(e){ze.commit("updateNodeProp",{node:this.node,key:"color",value:e}),De.a.set(this.node.definition,"color",e),this.$emit("save-state")},resetNodeColor:function(){ze.commit("updateNodeProp",{node:this.node,key:"color",value:void 0}),De.a.set(this.node.definition,"color",void 0),this.$emit("save-state")},setCustomIcon:function(e){if(e){var t=Object(cn["icon"])({prefix:"fas",iconName:e}),n=t.html,o=btoa(n);ze.commit("updateNodeProp",{node:this.node,key:"customIcon",value:o}),De.a.set(this.node.definition,"customIcon",o),this.$emit("set-custom-icon-name",e),this.$emit("save-state")}},resetCustomIcon:function(){ze.commit("updateNodeProp",{node:this.node,key:"customIcon",value:void 0}),De.a.set(this.node.definition,"customIcon",void 0),this.$emit("reset-custom-icon-name"),this.$emit("save-state")},openIconSelector:function(){this.$refs["icon-selector-modal"].show()}},created:function(){this.$t=this.$t.bind(this),cn["library"].add(oi["fas"])}},ri=ii,ai=(n("e4ce"),ut(ri,Lo,Bo,!1,null,"0c72746a",null)),si=ai.exports,ci={name:"CrownDropdowns",components:{CrownTaskDropdown:Co,CrownBoundaryEventDropdown:jo,CrownColorDropdown:si},props:{dropdownData:Array,boundaryEventDropdownData:Array,node:Object,nodeRegistry:Object,moddle:Object,shape:Object,taskDropdownInitiallyOpen:{type:Boolean,required:!0},showCustomIconPicker:Boolean,iconName:{type:String,default:""}},data:function(){return{taskDropdownOpen:this.taskDropdownInitiallyOpen,boundaryEventDropdownOpen:!1,colorDropdownOpen:!1}},methods:{taskDropdownToggle:function(e){this.taskDropdownOpen=e,this.boundaryEventDropdownOpen=!1,this.colorDropdownOpen=!1},boundaryEventDropdownToggle:function(e){this.taskDropdownOpen=!1,this.boundaryEventDropdownOpen=e,this.colorDropdownOpen=!1},colorDropdownToggle:function(e){this.taskDropdownOpen=!1,this.boundaryEventDropdownOpen=!1,this.colorDropdownOpen=e}}},li=ci,di=(n("4f3e"),ut(li,go,vo,!1,null,"0a847d3c",null)),ui=di.exports,pi=function(){var e=this,t=e._self._c;return e.node.canBeDefaultFlow()?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Set as Default Flow"),"aria-label":"Default Flow","data-test":"default-flow",role:"menuitem"},on:{click:e.click}},[t("img",{attrs:{src:e.icon,"aria-hidden":"true"}})]):e._e()},hi=[],fi=n("6305"),mi=n.n(fi),gi={components:{CrownButton:ht},props:["node"],data:function(){return{icon:mi.a}},methods:{click:function(){this.$emit("default-flow",this.node)}}},vi=gi,bi=ut(vi,pi,hi,!1,null,null,null),yi=bi.exports,wi={computed:{isLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{configurePoolLane:function(){var e=this;if(!["processmaker-modeler-pool","processmaker-modeler-sequence-flow","processmaker-modeler-association","processmaker-modeler-message-flow"].includes(this.node.type)){if(this.node.pool)return this.graph.getCell(this.node.pool)||(this.node.pool=this.graph.getElements().find((function(t){return t.component&&t.component.node===e.node.pool.component.node}))),this.node.pool.component.addToPool(this.shape),void(this.isLane&&this.configureLaneInParentPool());var t=this.graph.findModelsInArea(this.shape.getBBox()).filter((function(e){return e.component&&"processmaker-modeler-pool"===e.component.node.type}))[0];t&&(this.node.pool=t,this.node.pool.component.addToPool(this.shape),this.isLane&&this.configureLaneInParentPool())}},configureLaneInParentPool:function(){var e=this.node.pool.component;e.laneSet||e.createLaneSet();var t=e.laneSet.get("lanes");t.includes(this.node.definition)||t.push(this.node.definition)}},mounted:function(){var e=this;this.$nextTick((function(){e.configurePoolLane()}))}},xi=n("8730"),ki=n.n(xi);function Ci(){return!!window.Cypress}var Si={components:{CrownDropdowns:ui,DeleteButton:Lt,GenericFlowButton:An,AssociationFlowButton:Nn,CopyButton:ao,CloneButton:mo,DefaultFlow:yi,DataAssociationFlowButton:Zn},props:{highlighted:Boolean,paper:Object,graph:Object,shape:Object,node:Object,nodeRegistry:Object,moddle:Object,planeElements:Array,processNode:Object,collaboration:Object,isRendering:Boolean,dropdownData:{type:Array,default:function(){return[]}},boundaryEventDropdownData:{type:Array,default:function(){return[]}},showCustomIconPicker:{type:Boolean,default:!1},iconName:{type:String,default:""}},mixins:[wi],watch:{"node.definition.color":{handler:function(){this.setNodeColor()}},highlightedShapes:function(e,t){ve()(e,t)||(this.showCrown=this.highlightedShapes[0]===this.shape)},highlighted:function(e){e||(this.taskDropdownInitiallyOpen=!1)},shape:function(){this.highlighted&&(this.showCrown=!0)}},data:function(){return{runningInCypressTest:Ci(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null}},created:function(){this.$t=this.$t.bind(this)},computed:{showCrownConfig:function(){return this.showCrown&&!this.isMultiselect&&!1===ze.getters.isReadOnly},isMultiselect:function(){var e=ze.getters.highlightedShapes.length;return e>1},isFlow:function(){return["processmaker-modeler-sequence-flow","processmaker-modeler-message-flow"].includes(this.node.type)},isTextAnnotation:function(){return"processmaker-modeler-text-annotation"===this.node.type},process:function(){return this.node.pool?this.node.pool.component.containingProcess:this.processNode.definition},highlightedShapes:function(){return ze.getters.highlightedShapes}},methods:{setNodeColor:function(){var e=this.node.definition.get("color"),t=F(this.node,e),n=t.fill,o=t.stroke;z(this.shape,n,o)},paperNotRendered:function(){return!this.isRendering},replaceNodeTypePrompt:function(e){this.taskDropdownInitiallyOpen?this.$emit("replace-node",e):(this.showReplaceModal=!0,this.nodeToReplace=e)},confirmedReplaceNodeType:function(){this.$emit("replace-node",this.nodeToReplace)},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,ze.getters.allowSavingElementPosition},repositionCrown:function(){var e=this.shape.findView(this.paper);if(e){var t=e.getBBox({useModelGeometry:!this.isTextAnnotation&&!this.isFlow}),n=t.x,o=t.y,i=t.width;this.style={top:"".concat(o-52,"px"),left:"".concat(n+i-20,"px"),cursor:"pointer"}}},paperDoneRendering:function(){var e=this;this.isRendering&&new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown),this.shape.on("change:position change:size change:attrs",this.repositionCrown),this.planeElements.includes(this.node.diagram)||this.planeElements.push(this.node.diagram);var e=Object.keys(this.node.definition.$descriptor.allTypesByName);e.includes("bpmn:FlowElement")&&!this.process.get("flowElements").includes(this.node.definition)&&this.process.get("flowElements").push(this.node.definition),e.includes("bpmn:Artifact")&&!this.process.get("artifacts").includes(this.node.definition)&&this.process.get("artifacts").push(this.node.definition),this.collaboration&&e.includes("bpmn:MessageFlow")&&!this.collaboration.get("messageFlows").includes(this.node.definition)&&this.collaboration.get("messageFlows").push(this.node.definition)},setUpPositionHandling:function(){var e=this;this.shape.on("change:position",(function(t,n){e.node.diagram.bounds.x=n.x,e.node.diagram.bounds.y=n.y,e.savePositionOnPointerupEventSet||(e.shape.listenToOnce(e.paper,"element:pointerup",e.setNodePosition),e.savePositionOnPointerupEventSet=!0)}))}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig(),e.setUpPositionHandling(),e.setNodeColor();case 7:case"end":return t.stop()}}),t)})))()},destroyed:function(){this.shape.stopListening(),this.shape.remove(),ki()(this.process.get("flowElements"),this.node.definition),ki()(this.planeElements,this.node.diagram),ki()(this.process.get("artifacts"),this.node.definition),this.collaboration&&ki()(this.collaboration.get("messageFlows"),this.node.definition)}},Ei=Si,Ai=(n("b7ec"),ut(Ei,tt,nt,!1,null,null,null)),Mi=Ai.exports,Ti={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null,initialAssociationDirection:this.node.definition.associationDirection,associationDirection:et}},computed:{isValidConnection:function(){var e=k()(this.target,"component.node.type");if(!e)return!1;var t=this.target.component.node.pool,n=this.sourceShape.component.node.pool;if(n&&n!==t)return!1;var o=this.targetConfig.validateAssociationIncoming&&!this.targetConfig.validateAssociationIncoming(this.sourceNode),i=this.sourceConfig.validateAssociationOutgoing&&!this.sourceConfig.validateAssociationOutgoing(this.targetNode);return!o&&!i}},watch:{"node.definition.associationDirection":function(e){this.updateAssociationMarker(e)}},methods:{updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition},updateAssociationMarker:function(e){e===this.associationDirection.none&&(this.shape.attr("line/targetMarker/display","none"),this.shape.attr("line/sourceMarker/display","none")),e===this.associationDirection.one&&(this.shape.attr("line/targetMarker/display","block"),this.shape.attr("line/sourceMarker/display","none")),e===this.associationDirection.both&&(this.shape.attr("line/targetMarker/display","block"),this.shape.attr("line/sourceMarker/display","block"))}},mounted:function(){this.shape=new d["shapes"].standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Qe.a,width:20,height:20,y:-10},sourceMarker:{type:"image","xlink:href":Qe.a,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this,this.updateAssociationMarker(this.initialAssociationDirection)}},Pi=Ti,_i=ut(Pi,c,l,!1,null,null,null),Oi=_i.exports,Di={label:"Node Identifier",helper:"Enter the id that is unique from all other elements in the diagram",name:"id",validation:"required|regex:/^[_A-Za-z][-._A-Za-z0-9]*$/"},Ii=Di,Ni="processmaker-modeler-association",Ri={id:Ni,component:Oi,bpmnType:"bpmn:Association",control:!1,definition:function(e){return e.create("bpmn:Association",{associationDirection:"".concat(et.none)})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorConfig:[{name:"Data Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-association"},items:[{component:"FormInput",config:Ii},{component:"FormSelect",config:{label:"Direction",helper:"Select Direction",name:"associationDirection",options:[{value:"".concat(et.none),content:"None"},{value:"".concat(et.one),content:"One"},{value:"".concat(et.both),content:"Both"}]}}]}]}]},ji=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},Li=[],Bi={props:{isActive:Boolean},methods:{hideLabel:function(e,t,n){this.isActive&&!n.movedWithArrowKeys&&(this.shape.attr("label/display","none"),this.shape.getEmbeddedCells().filter((function(e){return e.attr("label/text")})).forEach((function(e){e.attr("label/display","none")})))},showLabel:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.shape.attr("label/display","initial"),t.next=3,e.$nextTick();case 3:e.shape.once("change:position",e.hideLabel);case 4:case"end":return t.stop()}}),t)})))()}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:e.$once("click",(function(){e.shape.once("change:position",e.hideLabel)})),e.shape.listenTo(e.paper,"cell:pointerup blank:pointerup",e.showLabel),e.shape.once("change:parent",e.showLabel);case 5:case"end":return t.stop()}}),t)})))()}},Fi=3,zi=16,Hi=4;function qi(e,t){var n=t.size(),o=n.width,i=n.height;for(var r in e)Ui(t,r,o),Gi(t,r,i),Wi(t,r,e,o)}function Vi(e,t){var n=e.attr(t);return void 0===n?Hi:n}function Ui(e,t,n){var o=Vi(e,t+"/ref-padding-x");-1!==t.indexOf("Right")?e.attr(t+"/ref-x",n-zi-o):-1!==t.indexOf("Left")&&e.attr(t+"/ref-x",o+(Xi(e)?16:0))}function Gi(e,t,n){var o=Vi(e,t+"/ref-padding-y");-1!==t.indexOf("bottom")&&e.attr(t+"/ref-y",n-zi-o)}function Wi(e,t,n,o){for(var i=0,r=0;r<Fi;r++)e.attr(t+"."+r+"/xlink:href",null);var a=$i(n,t);for(var s in a)if(e.attr(t+"."+i+"/xlink:href",n[t][s]),i++,i>=Fi)break;e.attr(t+"/ref-width",zi*i),-1!==t.indexOf("Center")&&e.attr(t+"/ref-x",(o-i*zi)/2)}function $i(e,t){if("bottomCenter"===t){var n={};return Object.keys(e[t]).sort().forEach((function(o){n[o]=e[t][o]})),n}return e[t]}function Xi(e){return!!e.attr("image/xlink:href")}var Yi=3,Zi=16;function Ki(e){for(var t=[],n=0;n<Yi;n++)t.push({tagName:"image",selector:e+"."+n});return{tagName:"g",selector:e,children:t}}function Ji(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o={};o[e]=t;for(var i=0;i<Yi;i++)o[e+"."+i]={"ref-x":i*Zi*n,"ref-y":0,width:Zi,height:Zi};return o}var Qi,er,tr,nr,or,ir,rr,ar,sr,cr,lr,dr,ur,pr,hr={data:function(){return{markers:{topLeft:{},topCenter:{},topRight:{},bottomLeft:{},bottomCenter:{},bottomRight:{}}}},watch:{markers:{deep:!0,handler:function(){this.recalcMarkersAlignment()}}},methods:{recalcMarkersAlignment:function(){qi(this.markers,this.shape)}}},fr=d["shapes"].standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},Ki("topLeft"),Ki("topCenter"),Ki("topRight"),Ki("bottomLeft"),Ki("bottomCenter"),Ki("bottomRight")],defaults:d["util"].deepSupplement({size:{width:36,height:36},attrs:Vt(Vt(Vt(Vt(Vt(Vt({image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},Ji("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),Ji("topCenter",{ref:"circle","ref-y":-20})),Ji("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),Ji("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),Ji("bottomCenter",{ref:"circle","ref-padding-y":-40})),Ji("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},d["shapes"].standard.Circle.prototype.defaults)}),mr={highlighter:{name:"stroke",options:{padding:10,attrs:{stroke:qe,"stroke-width":10,opacity:.3}}}},gr={highlighter:{name:"stroke",options:{attrs:{stroke:He,"stroke-width":3,"data-cy":"selected"}}}},vr={highlighter:{name:"stroke",options:{attrs:{stroke:$e,"stroke-width":5}}}},br={highlighter:{name:"stroke",options:{attrs:{stroke:Ve,"stroke-width":5}}}},yr={highlighter:{name:"stroke",options:{attrs:{stroke:Ge,"stroke-width":5}}}},wr={props:["highlighted","paperManager","hasError","autoValidate","borderOutline","isCompleted","isInProgress","isIdle"],data:function(){return{shape:null,currentBorderOutline:null}},watch:{highlighted:function(){this.setShapeHighlight()},hasError:function(){this.paperManager.awaitScheduledUpdates().then(this.setShapeHighlight)},autoValidate:function(){this.setShapeHighlight()},borderOutline:{deep:!0,handler:function(e){this.setBorderOutline(e)}}},computed:{shapeView:function(){return this.shape.findView(this.paperManager.paper)},shapeBody:function(){return this.shapeView.$el.find("[joint-selector=body]")}},methods:{setShapeHighlight:function(){if(ze.getters.isReadOnly)return this.shapeView.unhighlight(this.shapeBody,vr),this.isCompleted&&(this.shape.attr("body/fill",Xe),this.shapeView.highlight(this.shapeBody,vr)),this.shapeView.unhighlight(this.shapeBody,br),this.isInProgress&&(this.shape.attr("body/fill",Ue),this.shapeView.highlight(this.shapeBody,br)),void(this.isIdle&&(this.shape.attr("body/fill",We),this.shapeView.highlight(this.shapeBody,yr)));this.shapeView&&(this.shapeView.unhighlight(this.shapeBody,mr),this.hasError&&this.autoValidate&&this.shapeView.highlight(this.shapeBody,mr),this.shapeView.unhighlight(this.shapeBody,gr),this.highlighted&&this.shapeView.highlight(this.shapeBody,gr))},setBorderOutline:function(e){this.currentBorderOutline&&this.shapeView.unhighlight(this.shapeBody,this.currentBorderOutline),this.currentBorderOutline=e?rn()(e):null,this.currentBorderOutline&&this.shapeView.highlight(this.shapeBody,this.currentBorderOutline)}},mounted:function(){var e=this;this.$nextTick((function(){e.paperManager.awaitScheduledUpdates().then((function(){e.setShapeHighlight(),e.shape.on("change:size",(function(){e.paperManager.awaitScheduledUpdates().then(e.setShapeHighlight),e.$emit("shape-resize",e.shape)}))}))}))}},xr={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he,Bi],data:function(){return{shape:null,definition:null,dropdownData:[{label:Zt["processmaker-modeler-end-event"],nodeType:"processmaker-modeler-end-event"},{label:Zt["processmaker-modeler-message-end-event"],nodeType:"processmaker-modeler-message-end-event",dataTest:"switch-to-message-end-event"},{label:Zt["processmaker-modeler-error-end-event"],nodeType:"processmaker-modeler-error-end-event",dataTest:"switch-to-error-end-event"},{label:Zt["processmaker-modeler-signal-end-event"],nodeType:"processmaker-modeler-signal-end-event",dataTest:"switch-to-signal-end-event"},{label:Zt["processmaker-modeler-terminate-end-event"],nodeType:"processmaker-modeler-terminate-end-event",dataTest:"switch-to-terminate-end-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new fr,this.shape.set("type","processmaker.components.nodes.endEvent.Shape");var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({body:{fill:j,stroke:L},label:{text:this.node.definition.get("name"),refY:"130%"}}),this.shape.addTo(this.graph),this.shape.component=this}},kr=xr,Cr=ut(kr,ji,Li,!1,null,null,null),Sr=Cr.exports,Er={label:"Name",name:"name",helper:"Enter the name of this element",validation:"required"},Ar=Er,Mr=function(){var e=this,t=e._self._c;return t("div",[t("FormInput",{attrs:{name:"id",label:e.label,helper:e.helper,error:e.error,validation:e.validation},on:{input:e.onInput},model:{value:e.localValue,callback:function(t){e.localValue=t},expression:"localValue"}})],1)},Tr=[],Pr={props:{label:{type:String},helper:{type:String},value:{default:null},validation:{type:String}},data:function(){return{localValue:this.value,error:""}},methods:{onInput:function(e){this.value!==e&&(this.isUnique(e)?(this.error="",this.$emit("input",e)):this.error=this.$t("Must be unique"))},isUnique:function(e){return!!ze.state.nodes.every((function(t){return t.definition.id!==e}))}}},_r=Pr,Or=ut(_r,Mr,Tr,!1,null,null,null),Dr=Or.exports,Ir={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:Dr,config:Ii}]},Nr=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"d-flex justify-content-between align-items-end mb-2"},[t("label",{staticClass:"m-0"},[e._v(e._s(e.$t(e.label)))]),t("button",{directives:[{name:"b-modal",rawName:"v-b-modal.documentation-modal",modifiers:{"documentation-modal":!0}}],staticClass:"btn-sm float-right",attrs:{type:"button","aria-label":e.$t("Expand"),"data-test":"documentation-modal-button"}},[t("i",{staticClass:"fas fa-expand"})])]),t("form-text-area",{staticClass:"documentation-input d-flex",attrs:{value:e.textValue,richtext:!0,"data-test":"documentation-text-area",id:"documentation-editor"},on:{input:function(t){return e.$emit("input",t)},blur:e.onBlur}}),t("b-modal",{attrs:{id:"documentation-modal",size:"lg",centered:"",title:e.$t("Description"),"header-close-content":"×","ok-only":"","ok-variant":"secondary","ok-title":"Close","no-enforce-focus":""}},[t("form-text-area",{staticClass:"documentation-input",attrs:{rows:"5",value:e.textValue,richtext:!0,"data-test":"documentation-modal-text-area",id:"documentation-editor-modal"},on:{input:function(t){return e.$emit("input",t)},blur:e.onBlur}})],1)],1)},Rr=[],jr=n("e2a0"),Lr=n.n(jr),Br={props:{value:{type:[String,Array],default:""},label:{type:String,default:"Description"}},inheritAttrs:!1,computed:{textValue:function(){return Lr()(this.value)?this.value:k()(this.value[0],"text","")}},methods:{onBlur:function(){var e=this.$root.$children.find((function(e){return e.$refs.modeler}));e.$refs.modeler.pushToUndoStack()}}},Fr=Br,zr=(n("638c"),ut(Fr,Nr,Rr,!1,null,null,null)),Hr=zr.exports,qr={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Documentation",icon:"book",name:"documentation-accordion"},items:[{component:Hr,config:{label:"Description",name:"documentation",helper:""}}]},Vr="processmaker-modeler-end-event",Ur={id:Vr,component:Sr,bpmnType:"bpmn:EndEvent",control:!0,category:"BPMN",icon:n("7b7c"),label:Zt[Vr],rank:30,items:[{icon:n("7b7c"),label:Zt[Vr],control:!0,rank:31,id:"processmaker-modeler-end-event"},{icon:n("d5c7"),label:Zt["processmaker-modeler-message-end-event"],control:!0,rank:32,id:"processmaker-modeler-message-end-event"},{icon:n("342b"),label:Zt["processmaker-modeler-error-end-event"],control:!0,rank:33,id:"processmaker-modeler-error-end-event"},{icon:n("7ebf"),label:Zt["processmaker-modeler-signal-end-event"],control:!0,rank:34,id:"processmaker-modeler-signal-end-event"},{icon:n("83d2"),label:Zt["processmaker-modeler-terminate-end-event"],control:!0,rank:35,id:"processmaker-modeler-terminate-end-event"}],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Zt[Vr])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:Zt[Vr],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-end-event"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Gr=(n("13d5"),n("0c7a")),Wr=n.n(Gr),$r=(n("81b2"),function(e){var t=btoa(e);return"data:image/svg+xml;base64,".concat(t)}),Xr=function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml"),o=t.definition.get("color")||H(t);return n.querySelectorAll('*[fill]:not([fill="none"])').forEach((function(e){e.setAttribute("fill",o)})),n.querySelectorAll('*[stroke]:not([stroke="none"])').forEach((function(e){e.setAttribute("stroke",o)})),$r(n.documentElement.outerHTML)},Yr=Xr,Zr={data:function(){return{nodeIcon:null}},computed:{icon:function(){return this.node.definition.customIcon?atob(this.node.definition.customIcon):this.nodeIcon}},watch:{"node.definition.color":{handler:function(){this.updateIconColor()}},"node.definition.customIcon":{handler:function(){this.updateIconColor()}}},methods:{updateIconColor:function(){this.nodeIcon&&!this.node.isBpmnType("bpmn:ServiceTask")&&this.shape&&this.shape.attr("image/xlink:href",Yr(this.icon,this.node))}},mounted:function(){this.updateIconColor()}},Kr={extends:Sr,mixins:[Zr],props:["moddle","rootElements","id"],data:function(){return{error:this.moddle.create("bpmn:Error",{id:"".concat(this.id,"_error"),name:"".concat(this.id,"_error")}),nodeIcon:Wr.a}},methods:{addErrorRef:function(){this.node.definition.get("eventDefinitions")[0].errorRef?this.error=this.node.definition.get("eventDefinitions")[0].errorRef:(this.error=this.moddle.create("bpmn:Error",{id:"".concat(this.id,"_error"),name:"".concat(this.id,"_error")}),this.rootElements.push(this.error),this.node.definition.get("eventDefinitions")[0].errorRef=this.error)}},mounted:function(){this.addErrorRef()},destroyed:function(){ki()(this.rootElements,this.error)}},Jr=Kr,Qr=ut(Jr,Qi,er,!1,null,null,null),ea=Qr.exports,ta=n("4245"),na=n.n(ta),oa=n("3eea"),ia=n.n(oa),ra="processmaker-modeler-error-end-event",aa=na()(rn()(Ur),{id:ra,component:ea,control:!1,label:Zt[ra],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Zt[ra]),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];return"eventDefinitions"===o?e.errorName=i[0].get("errorRef").name:e[o]=i,e}),{})},inspectorHandler:function(e,t,n){for(var o in ia()(e,["$type","eventDefinitions","errorName"]))t.definition[o]!==e[o]&&n(t,o,e[o]);var i=t.definition.get("eventDefinitions")[0].errorRef;i.name!==e.errorName&&(i.name=e.errorName)},inspectorConfig:[{items:[{items:[{},{component:"FormInput",config:{label:"Error Name",name:"errorName",helper:"Enter the error name that is unique from all other elements in the diagram"}}]}]}]}),sa=n("d4dd"),ca=n.n(sa),la={extends:Sr,mixins:[Zr],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:ca.a}}},da=la,ua=ut(da,tr,nr,!1,null,null,null),pa=ua.exports,ha="processmaker-modeler-terminate-end-event",fa=na()(rn()(Ur),{id:ha,component:pa,control:!1,label:Zt[ha],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Zt[ha]),eventDefinitions:[e.create("bpmn:TerminateEventDefinition")]})}}),ma=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},ga=[],va=18,ba=d["dia"].Element.define("processmaker.components.nodes.gateway.Shape",{markup:[].concat(g(d["shapes"].standard.Polygon.prototype.markup),[{tagName:"image",selector:"image"}]),attrs:{body:{strokeWidth:2,stroke:"#000000",refPointsKeepOffset:"40,0, 80,40, 40,80, 0,40",fill:"#FFFFFF"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"50",fontSize:14,fill:"#333333"},image:{width:va,height:va,fill:"transparent",xlinkHref:"",refX:"50%",refX2:-va/2,refY:"50%",refY2:-va/2}}}),ya=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"],wa={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he,Bi],created:function(){var e=this.node.definition.default||null;delete this.node.definition.default,ya.indexOf(this.node.definition.$type)>-1&&this.$set(this.node.definition,"default",e)},data:function(){return{shape:null,definition:null,labelWidth:175,dropdownData:[{label:en["processmaker-modeler-exclusive-gateway"],nodeType:"processmaker-modeler-exclusive-gateway"},{label:en["processmaker-modeler-inclusive-gateway"],nodeType:"processmaker-modeler-inclusive-gateway",dataTest:"switch-to-inclusive-gateway"},{label:en["processmaker-modeler-parallel-gateway"],nodeType:"processmaker-modeler-parallel-gateway",dataTest:"switch-to-parallel-gateway"},{label:en["processmaker-modeler-event-based-gateway"],nodeType:"processmaker-modeler-event-based-gateway",dataTest:"switch-to-event-based-gateway",disabled:function(e){if(e&&e.definition&&e.definition.outgoing){var t=["bpmn:IntermediateCatchEvent"],n=e.definition.outgoing.find((function(e){return!t.includes(e.targetRef.$type)}));return!!n&&"It must be connected only to catch events"}return!1}}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new ba;var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.attr({label:{text:this.node.definition.get("name"),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this}},xa=wa,ka=ut(xa,ma,ga,!1,null,null,null),Ca=ka.exports,Sa=n("737f"),Ea=n.n(Sa),Aa={extends:Ca,mixins:[Zr],data:function(){return{nodeIcon:Ea.a}}},Ma=Aa,Ta=ut(Ma,or,ir,!1,null,null,null),Pa=Ta.exports,_a="processmaker-modeler-exclusive-gateway",Oa={id:_a,component:Pa,bpmnType:"bpmn:ExclusiveGateway",control:!0,category:"BPMN",icon:n("77d0"),label:"Gateway",rank:50,items:[{icon:n("9db0"),label:"Exclusive Gateway",control:!0,rank:51,id:"processmaker-modeler-exclusive-gateway"},{icon:n("8d20"),label:"Inclusive Gateway",control:!0,rank:52,id:"processmaker-modeler-inclusive-gateway"},{icon:n("2d89"),label:"Parallel Gateway",control:!0,rank:53,id:"processmaker-modeler-parallel-gateway"},{icon:n("efde"),label:"Event Based Gateway",control:!0,rank:54,id:"processmaker-modeler-event-based-gateway"}],definition:function(e,t){return e.create("bpmn:ExclusiveGateway",{name:t(en[_a])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:en[_a],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-exlcusive-gateway"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Da=n("9158"),Ia=n.n(Da),Na={diverging:"Diverging",converging:"Converging"},Ra={extends:Ca,mixins:[Zr],data:function(){return{incoming:this.node.definition.get("incoming"),nodeIcon:Ia.a}},watch:{incoming:function(e){var t=e.length<=1?Na.diverging:Na.converging;this.node.definition.set("gatewayDirection",t)}}},ja=Ra,La=ut(ja,rr,ar,!1,null,null,null),Ba=La.exports,Fa="processmaker-modeler-inclusive-gateway",za={id:Fa,component:Ba,bpmnType:"bpmn:InclusiveGateway",control:!1,category:"BPMN",label:en[Fa],definition:function(e,t){return e.create("bpmn:InclusiveGateway",{name:t(en[Fa]),gatewayDirection:Na.diverging})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:en[Fa],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-inclusive-gateway-config"},items:[{component:"FormInput",config:Ar}]},{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-inclusive-gateway-advanced"},items:[{component:"FormInput",config:Ii},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:Na.diverging,content:"Diverging"},{value:Na.converging,content:"Converging"}]}},{component:Hr,config:{label:"Description",name:"documentation"}}]}]}]},Ha=n("20b6"),qa=n.n(Ha),Va={extends:Ca,mixins:[Zr],data:function(){return{nodeIcon:qa.a}},watch:{"node.definition":{deep:!0,immediate:!0,handler:function(){delete this.node.definition.default}}}},Ua=Va,Ga=ut(Ua,sr,cr,!1,null,null,null),Wa=Ga.exports,$a={id:"processmaker-modeler-parallel-gateway",component:Wa,bpmnType:"bpmn:ParallelGateway",control:!1,category:"BPMN",label:"Parallel Gateway",definition:function(e,t){return e.create("bpmn:ParallelGateway",{name:t("Parallel Gateway"),gatewayDirection:Na.diverging})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:"Parallel Gateway",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-parallel-gateway-config"},items:[{component:"FormInput",config:Ar}]},{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-parallel-gateway-direction"},items:[{component:"FormInput",config:Ii},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:Na.diverging,content:"Diverging"},{value:Na.converging,content:"Converging"}]}},{component:Hr,config:{label:"Description",name:"documentation"}}]}]}]},Xa=n("e041"),Ya=n.n(Xa),Za={extends:Ca,mixins:[Zr],data:function(){return{nodeIcon:Ya.a}}},Ka=Za,Ja=ut(Ka,lr,dr,!1,null,null,null),Qa=Ja.exports,es="processmaker-modeler-event-based-gateway",ts={id:es,component:Qa,bpmnType:"bpmn:EventBasedGateway",control:!1,category:"BPMN",label:en[es],definition:function(e,t){return e.create("bpmn:EventBasedGateway",{name:t(en[es])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:en[es],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-event-based-gateway"},items:[{component:"FormInput",config:{label:"Name",helper:"The Name of the Gateway",name:"name"}}]},qr,Ir]}]},ns=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},os=[],is={offset:{y:-20}},rs="processmaker-modeler-lane",as=function(e){Bn(n,e);var t=Vn(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Wt(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=this.nodeRegistry["processmaker-modeler-sequence-flow"].diagram(this.moddle),r=this.nodeRegistry["processmaker-modeler-sequence-flow"].definition(this.moddle,this.$t);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var a=n.sourceAnchor,s=n.targetAnchor;return i.waypoint=[a,s].map((function(e){return o.moddle.create("dc:Point",e)})),"bpmn:ExclusiveGateway"!==r.sourceRef.$type&&"bpmn:InclusiveGateway"!==r.sourceRef.$type||(r.conditionExpression=this.moddle.create("bpmn:FormalExpression",{body:""})),e.component.node.definition.get("outgoing").push(r),t.component.node.definition.get("incoming").push(r),new an("processmaker-modeler-sequence-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.targetConfig,r=k()(o,"component.node"),a=k()(t,"component.node");return Gn.hasTargetType(o)&&Gn.targetIsNotSource(a,r)&&n.targetIsNotALane(r)&&n.targetIsInSamePool(t,o)&&n.eventBasedGatewayTarget(a,r)&&n.isValidSource(t,i)&&n.sourceIsNotPool(a)&&!Wn.isADataNode(a)&&!Wn.isADataNode(r)}},{key:"isValidSource",value:function(e,t){return null==t.validateIncoming||t.validateIncoming(e.node)}},{key:"targetIsNotALane",value:function(e){return!e.isType(rs)}},{key:"targetIsInSamePool",value:function(e,t){var n=t.component.node.pool,o=e.component.node.pool;return!o||o===n}},{key:"targetIsNotSource",value:function(e,t){return t.id!==e.id}},{key:"eventBasedGatewayTarget",value:function(e,t){var n=e.isBpmnType("bpmn:EventBasedGateway"),o=t.isBpmnType("bpmn:IntermediateCatchEvent");return!n||o}},{key:"sourceIsNotPool",value:function(e){return!e.isType("processmaker-modeler-pool")}}]),n}(Gn),ss={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null}},computed:{isValidConnection:function(){return as.isValid({sourceShape:this.sourceShape,targetShape:this.target,targetConfig:this.targetConfig})},targetType:function(){return k()(this.target,"component.node.type")},shapeName:function(){return this.node.definition.get("name")},nameLabel:{get:function(){return this.shape.label(0).attrs.text.text},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.shape.label(0,{attrs:{text:{text:e}}})}}},watch:{"node.definition":{handler:function(){var e=this.shapeName;e!==this.nameLabel&&(this.nameLabel=e),this.setDefaultMarker(this.isDefaultFlow())},deep:!0},"node.definition.sourceRef":{handler:function(){this.setDefaultMarker(this.isDefaultFlow())},deep:!0}},methods:{setDefaultMarker:function(e){this.shape.attr("line",{sourceMarker:{"stroke-width":e?2:0}})},isDefaultFlow:function(){return this.node.definition.sourceRef&&this.node.definition.sourceRef.default&&this.node.definition.sourceRef.default.id===this.node.definition.id},updateRouter:function(){this.shape.router("orthogonal",{padding:1})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition,this.sourceShape.component.node.definition.get("outgoing").push(this.node.definition),e.component.node.definition.get("incoming").push(this.node.definition)},createLabel:function(){this.shape.labels([{attrs:{text:{text:this.shapeName}},position:is}])},createDefaultFlowMarker:function(){this.shape.attr("line",{sourceMarker:{type:"polyline","stroke-width":this.isDefaultFlow()?2:0,points:"2,6 6,-6"}})}},mounted:function(){this.shape=new d["shapes"].standard.Link,this.shape.connector("rounded",{radius:5}),this.createLabel(),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},cs=ss,ls=ut(cs,ns,os,!1,null,null,null),ds=ls.exports,us="processmaker-modeler-sequence-flow",ps={id:us,component:ds,bpmnType:"bpmn:SequenceFlow",control:!1,definition:function(e){return e.create("bpmn:SequenceFlow",{name:null})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorData:function(e){var t=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.definition.sourceRef.$type);return t||delete e.definition.conditionExpression,Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];return e[o]="conditionExpression"===o?i.body:i,e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition,r=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(i.sourceRef.$type);for(var a in e)if(i[a]!==e[a])if("conditionExpression"===a&&r){if(i[a].body!==e[a]){var s=o.create("bpmn:FormalExpression",{body:e[a]});n(t,a,s)}}else n(t,a,e[a])},inspectorConfig:[{name:"Sequence Flow",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-sequence-flow"},items:[{component:"FormInput",config:Vt(Vt({},Ar),{},{validation:null})}]},qr,Ir]}]},hs=function(){var e=this,t=e._self._c;return t("crown-config",{attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering},on:{"remove-node":function(t){return e.$emit("remove-node",t)},"add-node":function(t){return e.$emit("add-node",t)},"save-state":function(t){return e.$emit("save-state",t)}}})},fs=[],ms=function(e){Bn(n,e);var t=Vn(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Wt(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=this.nodeRegistry["processmaker-modeler-message-flow"].diagram(this.moddle),r=this.nodeRegistry["processmaker-modeler-message-flow"].definition(this.moddle);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var a=n.sourceAnchor,s=n.targetAnchor;return i.waypoint=[a,s].map((function(e){return o.moddle.create("dc:Point",e)})),new an("processmaker-modeler-message-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.sourceConfig,r=k()(o,"component.node"),a=k()(t,"component.node");return Gn.hasTargetType(o)&&n.isValidTargetType(r)&&Gn.targetIsValidStartEventType(r)&&Gn.targetIsValidIntermediateEventType(r)&&Gn.targetIsValidBoundaryEventType(r)&&Gn.targetIsNotContainingPool(o,a)&&Gn.targetIsInDifferentPool(o,t)&&Gn.targetIsNotSource(r,a)&&Gn.allowOutgoingFlow(i,a)}},{key:"isValidTargetType",value:function(e){return["bpmn:Task","bpmn:ScriptTask","bpmn:ManualTask","bpmn:CallActivity","bpmn:ServiceTask","bpmn:IntermediateCatchEvent","bpmn:Participant","bpmn:StartEvent","bpmn:BoundaryEvent"].some((function(t){return e.isBpmnType(t)}))}}]),n}(Gn),gs={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null}},computed:{isValidConnection:function(){return ms.isValid({sourceShape:this.sourceShape,targetShape:this.target,sourceConfig:this.sourceConfig})},targetType:function(){return k()(this.target,"component.node.type")},sourceType:function(){return k()(this.sourceNode,"type")}},methods:{updateRouter:function(){this.shape.router("orthogonal",{padding:1})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition}},mounted:function(){this.shape=new d["shapes"].standard.Link({router:{name:"orthogonal"}}),this.shape.attr("line",{strokeDasharray:"10 10",sourceMarker:{type:"circle",r:5,"stroke-width":2,fill:"#fff"},targetMarker:{type:"path",fill:"#fff","stroke-width":2,d:"M 10 -5 0 0 10 5 Z"}}),this.shape.addTo(this.graph),this.shape.component=this}},vs=gs,bs=ut(vs,hs,fs,!1,null,null,null),ys=bs.exports,ws="processmaker-modeler-message-flow",xs={id:ws,component:ys,bpmnType:"bpmn:MessageFlow",control:!1,definition:function(e){return e.create("bpmn:MessageFlow",{name:""})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorConfig:[{name:"Message Flow",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-message-flow"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},ks=n("e1776"),Cs=n.n(ks),Ss={extends:Sr,mixins:[Zr],props:["node","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:Cs.a}},methods:{addMessageRef:function(){this.node.definition.get("eventDefinitions")[0].messageRef?this.message=this.node.definition.get("eventDefinitions")[0].messageRef:(this.message=this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),this.rootElements.push(this.message),this.node.definition.get("eventDefinitions")[0].messageRef=this.message)}},mounted:function(){this.addMessageRef()},destroyed:function(){ki()(this.rootElements,this.message),ze.commit("removeMessageRef",this.message)}},Es=Ss,As=ut(Es,ur,pr,!1,null,null,null),Ms=As.exports,Ts=function(){var e=this,t=e._self._c;return t("div",[t("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),t("div",{staticClass:"d-flex",class:{invalid:e.invalid}},[t("multiselect",{attrs:{value:e.selectedOption,placeholder:e.$t(e.placeholder),options:e.options,multiple:e.multiple,"track-by":e.trackBy,"show-labels":!1,searchable:!0,"internal-search":!1,label:"name","data-test":"".concat(e.name,":select")},on:{input:e.change,"search-change":e.loadOptionsDebounced,open:e.loadOptions}},[t("template",{slot:"noResult"},[e._t("noResult",(function(){return[e._v(e._s(e.$t("Not found")))]}))],2),t("template",{slot:"noOptions"},[e._t("noOptions",(function(){return[e._v(e._s(e.$t("No Data Available")))]}))],2)],2),t("div",{staticClass:"btn-group ml-1",attrs:{role:"group"}},[t("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button","data-cy":"events-list",title:e.$t("Configure")},on:{click:e.toggleConfigMessage}},[t("i",{staticClass:"fa fa-ellipsis-h"})])])],1),e.invalid?t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("Message reference is required"))+" ")])]):e._e(),e.helper?t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.helper)))]):e._e(),e.showNewMessage?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("ID"),error:e.getValidationErrorForNewId(e.messageId),"data-cy":"events-add-id"},model:{value:e.messageId,callback:function(t){e.messageId=t},expression:"messageId"}}),t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNewName(e.messageName),"data-cy":"events-add-name"},model:{value:e.messageName,callback:function(t){e.messageName=t},expression:"messageName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddMessage}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validNew,type:"button","data-cy":"events-save"},on:{click:e.addMessage}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e._e(),e.showEditMessage?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNameUpdate(e.messageName),"data-cy":"events-edit-name"},model:{value:e.messageName,callback:function(t){e.messageName=t},expression:"messageName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddMessage}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validUpdate,type:"button","data-cy":"events-save"},on:{click:e.updateMessage}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e.showConfirmDelete?t("div",{staticClass:"card mb-3 bg-danger text-white"},[e.deleteMessageUsage(e.deleteMessage.id)?t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.deleteMessageUsage(e.deleteMessage.id))+" ")]):t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.$t("Are you sure you want to delete this item?"))+" ("+e._s(e.deleteMessage.id)+") "+e._s(e.deleteMessage.name)+" ")]),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn btn-sm btn-light mr-2 p-1 font-xs",attrs:{type:"button","data-cy":"events-cancel"},on:{click:function(t){e.showConfirmDelete=!1}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),e.deleteMessageUsage(e.deleteMessage.id)?e._e():t("button",{staticClass:"btn btn-sm btn-danger p-1 font-xs",attrs:{type:"button","data-cy":"events-delete"},on:{click:e.confirmDeleteMessage}},[e._v(" "+e._s(e.$t("Delete"))+" ")])])]):!e.showListMessages||e.showNewMessage||e.showEditMessage?e._e():[t("table",{staticClass:"table table-sm table-striped",attrs:{width:"100%"}},[t("thead",[t("tr",[t("td",{attrs:{colspan:"2",align:"right"}},[t("button",{staticClass:"btn btn-secondary btn-sm p-1 font-xs",attrs:{type:"button","data-cy":"events-add"},on:{click:e.showAddMessage}},[t("i",{staticClass:"fa fa-plus"}),e._v(" "+e._s(e.$t("Message"))+" ")])])])]),t("tbody",e._l(e.localMessages,(function(n){return t("tr",{key:"message-".concat(n.id)},[t("td",[t("b-badge",{attrs:{variant:"secondary"}},[e._v(e._s(n.id))]),e._v(" "+e._s(n.name)+" ")],1),t("td",{attrs:{align:"right"}},[t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Edit")},on:{click:function(t){return e.editMessage(n)}}},[t("i",{staticClass:"fa fa-pen",attrs:{"data-cy":"events-edit"}})]),t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Remove")},on:{click:function(t){return e.removeMessage(n)}}},[t("i",{staticClass:"fa fa-trash",attrs:{"data-cy":"events-remove"}})])])])})),0)])]],2)},Ps=[],_s=(n("466d"),n("c740"),{props:{value:null,name:String,placeholder:{type:String,default:"Select option"},helper:String,trackBy:{type:String,default:"id"},label:{type:String,default:"name"},api:{type:String,default:"messages"},multiple:{type:Boolean,default:!1}},computed:{invalid:function(){return!this.value},localMessages:function(){return ze.getters.rootElements.filter((function(e){return"bpmn:Message"===e.$type}))},validNew:function(){return""===this.getValidationErrorForNewId(this.messageId)&&""===this.getValidationErrorForNewName(this.messageName)},validUpdate:function(){return""===this.getValidationErrorForNameUpdate(this.messageName)}},data:function(){return{options:[],selectedOption:null,pmql:"id!="+window.ProcessMaker.modeler.process.id,showListMessages:!1,showNewMessage:!1,showEditMessage:!1,showConfirmDelete:!1,deleteMessage:null,messageId:"",messageName:""}},methods:{deleteMessageUsage:function(e){var t=this.messageUsage(e),n=[];return t.forEach((function(e){return n.push(e.name||e.id)})),n.length?this.$t("This message cannot be removed, it is used by")+": "+n.join(", "):""},messageUsage:function(e){var t=[];return ze.getters.rootElements.forEach((function(n){"bpmn:Process"===n.$type&&n.flowElements.forEach((function(n){n.eventDefinitions&&n.eventDefinitions.forEach((function(o){"bpmn:MessageEventDefinition"===o.$type&&o.messageRef&&o.messageRef.id===e&&t.push(n)}))}))})),t},getValidationErrorForNewId:function(e){if(!e)return this.$t("Message ID is required");var t=ze.getters.rootElements.find((function(t){return t.id===e}));if(t)return this.$t("Message ID is duplicated");var n=e.match(/^[_A-Za-z][-._A-Za-z0-9]*$/);return n?"":this.$t("Message ID is not a valid xsd:ID")},getValidationErrorForNewName:function(e){if(!e)return this.$t("Message Name is required");var t=ze.getters.rootElements.find((function(t){return"bpmn:Message"===t.$type&&t.name===e}));return t?this.$t("Message Name is duplicated"):""},getValidationErrorForNameUpdate:function(e){var t=this;if(!e)return this.$t("Message Name is required");var n=ze.getters.rootElements.find((function(n){return"bpmn:Message"===n.$type&&n.name===e&&n.id!==t.messageId}));return n?this.$t("Message Name is duplicated"):""},confirmDeleteMessage:function(){var e=this;this.showConfirmDelete=!1;var t=ze.getters.rootElements.findIndex((function(t){return t.id===e.deleteMessage.id}));t>-1&&ze.getters.rootElements.splice(t,1)},removeMessage:function(e){this.showConfirmDelete=!0,this.deleteMessage=e},toggleConfigMessage:function(){this.showListMessages=!this.showListMessages},editMessage:function(e){this.messageId=e.id,this.messageName=e.name,this.showEditMessage=!0},getMessageById:function(e){return ze.getters.rootElements.find((function(t){return t.id===e}))},change:function(e){if(!e)return this.$emit("input",""),void this.refreshVueMultiselectValue();var t=this.getMessageById(e.id);t||(t=window.ProcessMaker.$modeler.moddle.create("bpmn:Message",{id:e.id,name:e.name}),ze.getters.rootElements.push(t)),this.$emit("input",Object(ft["get"])(e,this.trackBy)),this.refreshVueMultiselectValue()},refreshVueMultiselectValue:function(){var e=this;this.$nextTick((function(){var t=e;while(t&&"vue-form-renderer"!==t.$options._componentTag)t=t.$parent;t&&t.$emit("update",t.transientData)}))},showAddMessage:function(){this.showNewMessage=!0,this.messageId="",this.messageName=""},cancelAddMessage:function(){this.showNewMessage=!1,this.showEditMessage=!1},updateMessage:function(){this.getMessageById(this.messageId).name=this.messageName,this.showEditMessage=!1},addMessage:function(){var e=window.ProcessMaker.$modeler.moddle.create("bpmn:Message",{id:this.messageId,name:this.messageName});ze.getters.rootElements.push(e),this.showNewMessage=!1},updateOptions:function(e){this.options=Object(ft["uniqBy"])([].concat(g(this.localMessages),g(e)),"id")},loadOptions:function(){this.updateOptions([])},loadSelected:function(e){var t=ze.getters.rootElements.find((function(t){return t.id===e}));t?this.selectedOption={id:t.id,name:t.name}:(this.$emit("input",""),this.refreshVueMultiselectValue())},loadOptionsDebounced:function(){}},watch:{value:{immediate:!0,handler:function(e){var t=this;this.selectedOption=this.options.find((function(n){return Object(ft["get"])(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}}),Os=_s,Ds=(n("dacf"),n("80e6"),ut(Os,Ts,Ps,!1,null,"395d11da",null)),Is=Ds.exports;function Ns(e){return{component:Is,config:{label:"Message",name:"messageRef",helper:e}}}var Rs,js,Ls={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=i[0].get("messageRef");e.messageRef=r?r.id:""}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o,i){for(var r in ia()(e,["$type","eventDefinitions","messageRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var a=i.rootElements.find((function(t){return t.id===e.messageRef}));!a&&e.messageRef&&(a=o.create("bpmn:Message",{id:e.messageRef,name:e.messageRef}),i.rootElements.push(a)),t.definition.get("eventDefinitions")[0].messageRef=a}},Bs="processmaker-modeler-message-end-event",Fs=na()(rn()(Ur),Vt(Vt({},Ls),{},{id:Bs,component:Ms,control:!1,label:Zt[Bs],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Zt[Bs]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Ns("Select the message reference that this element throws")]}]}]})),zs=n("f400"),Hs=n.n(zs),qs={extends:Sr,mixins:[Zr],data:function(){return{nodeIcon:Hs.a}},mounted:function(){this.shape.attr({image:{"ref-y":3}})}},Vs=qs,Us=ut(Vs,Rs,js,!1,null,null,null),Gs=Us.exports,Ws=function(){var e=this,t=e._self._c;return t("div",[t("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),t("div",{staticClass:"d-flex",class:{invalid:e.invalid}},[t("multiselect",{attrs:{value:e.selectedOption,placeholder:e.$t(e.placeholder),options:e.options,multiple:e.multiple,"track-by":e.trackBy,"show-labels":!1,searchable:!0,"internal-search":!1,label:"name","data-test":"".concat(e.name,":select"),disabled:!e.can("view-signals")},on:{input:e.change,"search-change":e.loadOptions,open:function(t){return e.loadOptions()}}},[t("template",{slot:"noResult"},[e._t("noResult",(function(){return[e._v(e._s(e.$t("Not found")))]}))],2),t("template",{slot:"noOptions"},[e._t("noOptions",(function(){return[e._v(e._s(e.$t("No Data Available")))]}))],2)],2),e.canEdit?t("div",{staticClass:"btn-group ml-1",attrs:{role:"group"}},[t("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button","data-cy":"events-list",title:e.$t("Configure")},on:{click:e.toggleConfigSignal}},[t("i",{staticClass:"fa fa-ellipsis-h"})])]):e._e()],1),e.can("view-signals")?e._e():t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("You do not have permission to view signals"))+" ")])]),e.invalid?t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("Signal reference is required"))+" ")])]):e._e(),e.helper?t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.helper)))]):e._e(),e.showNewSignal?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("ID"),error:e.getValidationErrorForNewId(e.signalId),"data-cy":"events-add-id"},model:{value:e.signalId,callback:function(t){e.signalId=t},expression:"signalId"}}),t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNewName(e.signalName),"data-cy":"events-add-name"},model:{value:e.signalName,callback:function(t){e.signalName=t},expression:"signalName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddSignal}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validNew,type:"button","data-cy":"events-save"},on:{click:e.addSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e._e(),e.showEditSignal?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNameUpdate(e.signalName),"data-cy":"events-edit-name"},model:{value:e.signalName,callback:function(t){e.signalName=t},expression:"signalName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddSignal}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validUpdate,type:"button","data-cy":"events-save"},on:{click:e.updateSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e.showConfirmDelete?t("div",{staticClass:"card mb-3 bg-danger text-white"},[e.deleteSignalUsage(e.deleteSignal.id)?t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.deleteSignalUsage(e.deleteSignal.id))+" ")]):t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.$t("Are you sure you want to delete this item?"))+" ("+e._s(e.deleteSignal.id)+") "+e._s(e.deleteSignal.name)+" ")]),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn btn-sm btn-light mr-2 p-1 font-xs",attrs:{type:"button","data-cy":"events-cancel"},on:{click:function(t){e.showConfirmDelete=!1}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),e.deleteSignalUsage(e.deleteSignal.id)?e._e():t("button",{staticClass:"btn btn-sm btn-danger p-1 font-xs",attrs:{type:"button","data-cy":"events-delete"},on:{click:e.confirmDeleteSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):!e.showListSignals||e.showNewSignal||e.showEditSignal?e._e():[t("table",{staticClass:"table table-sm table-striped",attrs:{width:"100%"}},[t("thead",[t("tr",[t("td",{attrs:{colspan:"2",align:"right"}},[t("button",{staticClass:"btn btn-secondary btn-sm p-1 font-xs",attrs:{type:"button","data-cy":"events-add"},on:{click:e.showAddSignal}},[t("i",{staticClass:"fa fa-plus"}),e._v(" "+e._s(e.$t("Signal"))+" ")])])])]),t("tbody",e._l(e.localSignals,(function(n){return t("tr",{key:"signal-".concat(n.id)},[t("td",[t("b-badge",{attrs:{variant:"secondary"}},[e._v(e._s(n.id))]),e._v(" "+e._s(n.name)+" ")],1),t("td",{attrs:{align:"right"}},[e.can("edit-signals")?t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Edit")},on:{click:function(t){return e.editSignal(n)}}},[t("i",{staticClass:"fa fa-pen",attrs:{"data-cy":"events-edit"}})]):e._e(),e.can("delete-signals")?t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Remove")},on:{click:function(t){return e.removeSignal(n)}}},[t("i",{staticClass:"fa fa-trash",attrs:{"data-cy":"events-remove"}})]):e._e()])])})),0)])]],2)},$s=[],Xs={props:{value:null,name:String,placeholder:{type:String,default:"Select option"},helper:String,canEdit:{type:Boolean,default:!0},trackBy:{type:String,default:"id"},label:{type:String,default:"name"},api:{type:String,default:"signals"},multiple:{type:Boolean,default:!1}},computed:{invalid:function(){return!this.value},localSignals:function(){return ze.getters.rootElements.filter((function(e){return"bpmn:Signal"===e.$type}))},validNew:function(){return""===this.getValidationErrorForNewId(this.signalId)&&""===this.getValidationErrorForNewName(this.signalName)},validUpdate:function(){return""===this.getValidationErrorForNameUpdate(this.signalName)}},data:function(){return{options:[],selectedOption:null,pmql:"id!="+window.ProcessMaker.modeler.process.id,showListSignals:!1,showNewSignal:!1,showEditSignal:!1,showConfirmDelete:!1,deleteSignal:null,signalId:"",signalName:""}},methods:{deleteSignalUsage:function(e){var t=this.signalUsage(e),n=[];return t.forEach((function(e){return n.push(e.name||e.id)})),n.length?this.$t("This signal cannot be removed, it is used by")+": "+n.join(", "):""},signalUsage:function(e){var t=[];return ze.getters.rootElements.forEach((function(n){"bpmn:Process"===n.$type&&n.flowElements.forEach((function(n){n.eventDefinitions&&n.eventDefinitions.forEach((function(o){"bpmn:SignalEventDefinition"===o.$type&&o.signalRef&&o.signalRef.id===e&&t.push(n)}))}))})),t},getValidationErrorForNewId:function(e){if(!e)return this.$t("Signal ID is required");var t=ze.getters.rootElements.find((function(t){return t.id===e}));if(t)return this.$t("Signal ID is duplicated");var n=e.match(/^[_A-Za-z][-._A-Za-z0-9]*$/);return n?"":this.$t("Signal ID is not a valid xsd:ID")},getValidationErrorForNewName:function(e){if(!e)return this.$t("Signal Name is required");var t=ze.getters.rootElements.find((function(t){return"bpmn:Signal"===t.$type&&t.name===e}));return t?this.$t("Signal Name is duplicated"):""},getValidationErrorForNameUpdate:function(e){var t=this;if(!e)return this.$t("Signal Name is required");var n=ze.getters.rootElements.find((function(n){return"bpmn:Signal"===n.$type&&n.name===e&&n.id!==t.signalId}));return n?this.$t("Signal Name is duplicated"):""},confirmDeleteSignal:function(){var e=this;this.showConfirmDelete=!1;var t=ze.getters.rootElements.findIndex((function(t){return t.id===e.deleteSignal.id}));t>-1&&ze.getters.rootElements.splice(t,1)},removeSignal:function(e){this.showConfirmDelete=!0,this.deleteSignal=e},toggleConfigSignal:function(){this.can("view-signals")?this.showListSignals=!this.showListSignals:window.ProcessMaker.alert(this.$t("You do not have permission to view signals"),"danger")},editSignal:function(e){this.signalId=e.id,this.signalName=e.name,this.showEditSignal=!0},getSignalById:function(e){return ze.getters.rootElements.find((function(t){return t.id===e}))},change:function(e){if(!e)return this.$emit("input",""),void this.refreshVueMultiselectValue();var t=this.getSignalById(e.id);t||(t=window.ProcessMaker.$modeler.moddle.create("bpmn:Signal",{id:e.id,name:e.name}),ze.getters.rootElements.push(t)),this.$emit("input",Object(ft["get"])(e,this.trackBy)),this.refreshVueMultiselectValue()},refreshVueMultiselectValue:function(){var e=this;this.$nextTick((function(){var t=e;while(t&&"vue-form-renderer"!==t.$options._componentTag)t=t.$parent;t&&t.$emit("update",t.transientData)}))},showAddSignal:function(){this.can("create-signals")?(this.showNewSignal=!0,this.signalId="",this.signalName=""):window.ProcessMaker.alert(this.$t("You do not have permission to add new signals"),"danger")},cancelAddSignal:function(){this.showNewSignal=!1,this.showEditSignal=!1},updateSignal:function(){this.getSignalById(this.signalId).name=this.signalName,this.showEditSignal=!1},addSignal:function(){var e=window.ProcessMaker.$modeler.moddle.create("bpmn:Signal",{id:this.signalId,name:this.signalName});ze.getters.rootElements.push(e),this.showNewSignal=!1},updateOptions:function(e){this.options=Object(ft["uniqBy"])([].concat(g(e),g(this.localSignals)),"id")},loadOptions:function(e){var t=this;if(this.can("view-signals")){var n=this.pmql;window.window.ProcessMaker.apiClient.get(this.api,{params:{filter:e,pmql:n}}).then((function(e){t.updateOptions(e.data.data||[])}))}},loadSelected:function(e){var t=ze.getters.rootElements.find((function(t){return t.id===e}));t?this.selectedOption={id:t.id,name:t.name}:(this.$emit("input",""),this.refreshVueMultiselectValue())},loadOptionsDebounced:function(){},can:function(e){return Object(ft["get"])(window,"ProcessMaker.modeler.signalPermissions.".concat(e),!1)}},watch:{value:{immediate:!0,handler:function(e){var t=this;this.selectedOption=this.options.find((function(n){return Object(ft["get"])(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}},Ys=Xs,Zs=(n("1c15"),n("ea11"),ut(Ys,Ws,$s,!1,null,"607e6d70",null)),Ks=Zs.exports;function Js(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{component:Ks,config:{label:"Signal",name:"signalRef",helper:e,canEdit:t}}}var Qs={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=i[0].get("signalRef");e.signalRef=r?r.id:""}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o,i){for(var r in ia()(e,["$type","eventDefinitions","signalRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var a=i.rootElements.find((function(t){return t.id===e.signalRef}));!a&&e.signalRef&&(a=o.create("bpmn:Signal",{id:e.signalRef,name:e.signalRef}),i.rootElements.push(a)),t.definition.get("eventDefinitions")[0].signalRef=a}},ec="processmaker-modeler-signal-end-event",tc=na()(rn()(Ur),Vt(Vt({},Qs),{},{id:ec,component:Gs,control:!1,label:Zt[ec],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Zt[ec]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Js("Select the signal reference that this element throws")]}]}]})),nc=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},oc=[],ic={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he,hr,Bi,Zr],data:function(){return{shape:new fr,definition:null,dropdownData:[{label:Xt["processmaker-modeler-start-event"],nodeType:"processmaker-modeler-start-event",dataTest:"switch-to-start-event"},{label:Xt["processmaker-modeler-start-timer-event"],nodeType:"processmaker-modeler-start-timer-event",dataTest:"switch-to-start-timer-event"},{label:Xt["processmaker-modeler-signal-start-event"],nodeType:"processmaker-modeler-signal-start-event",dataTest:"switch-to-signal-start-event"},{label:Xt["processmaker-modeler-message-start-event"],nodeType:"processmaker-modeler-message-start-event",dataTest:"switch-to-message-start-event"},{label:Xt["processmaker-modeler-conditional-start-event"],nodeType:"processmaker-modeler-conditional-start-event",dataTest:"switch-to-conditional-start-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape.set("type","processmaker.components.nodes.startEvent.Shape");var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({body:{stroke:I,fill:D},label:{text:this.node.definition.get("name"),refY:"130%"},image:{"ref-x":5,"ref-y":5,width:e.get("width")-10,height:e.get("height")-10}}),this.shape.addTo(this.graph),this.shape.component=this}},rc=ic,ac=ut(rc,nc,oc,!1,null,null,null),sc=ac.exports,cc=n("e726"),lc=n.n(cc);function dc(e){if(!e)return!1;var t=JSON.parse(e);return t&&t.web_entry&&"DISABLED"!==t.web_entry.mode}var uc,pc,hc,fc,mc,gc,vc,bc,yc={extends:sc,watch:{"node.definition.config":{immediate:!0,handler:function(e){if(dc(e))return this.nodeIcon=lc.a,void this.shape.attr("image/xlink:href",Yr(lc.a,this.node));this.nodeIcon=null,this.shape.attr("image/xlink:href",null)}}}},wc=yc,xc=ut(wc,uc,pc,!1,null,null,null),kc=xc.exports,Cc=36,Sc={bpmnType:"bpmn:StartEvent",control:!1,category:"BPMN",diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Cc,width:Cc,x:null,y:null})})},validateIncoming:function(){return!1},inspectorConfig:[{items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-start-event"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Ec="processmaker-modeler-start-event",Ac=na()(rn()(Sc),{id:Ec,component:kc,control:!0,icon:n("80b2"),label:Xt[Ec],rank:10,items:[{icon:n("80b2"),label:Xt[Ec],control:!0,bpmnType:"bpmn:StartEvent",rank:10,id:"processmaker-modeler-start-event"},{icon:n("2670"),label:Xt["processmaker-modeler-message-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:11,id:"processmaker-modeler-message-start-event"},{icon:n("f4e6"),label:Xt["processmaker-modeler-conditional-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:12,id:"processmaker-modeler-conditional-start-event"},{icon:n("a619"),label:Xt["processmaker-modeler-signal-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:13,id:"processmaker-modeler-signal-start-event"},{icon:n("67db"),label:Xt["processmaker-modeler-start-timer-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:14,id:"processmaker-modeler-start-timer-event"}],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Xt[Ec])})}}),Mc=n("8f89"),Tc=n.n(Mc),Pc={extends:sc,data:function(){return{nodeIcon:Tc.a}},mounted:function(){this.shape.attr({image:{"ref-x":5,"ref-y":3}})}},_c=Pc,Oc=ut(_c,hc,fc,!1,null,null,null),Dc=Oc.exports,Ic={label:"Request Variable",name:"config",helper:"Enter the request variable that will store the signal payload","data-cy":"signal-request-variable"},Nc=Ic,Rc="processmaker-modeler-signal-start-event",jc=na()(rn()(Sc),Vt(Vt({},Qs),{},{id:Rc,component:Dc,label:Xt[Rc],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Xt[Rc]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Js("Signal that will trigger this start event",!1),{component:"FormInput",config:Nc}]}]}]})),Lc=n("5161"),Bc=n.n(Lc),Fc={extends:sc,data:function(){return{nodeIcon:Bc.a}}},zc=Fc,Hc=ut(zc,mc,gc,!1,null,null,null),qc=Hc.exports,Vc="processmaker-modeler-message-start-event",Uc=na()(rn()(Sc),Vt(Vt({},Ls),{},{id:Vc,component:qc,label:Xt[Vc],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Xt[Vc]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Ns("Message that will trigger this start event")]}]}]})),Gc=n("66f8"),Wc=n.n(Gc),$c={extends:sc,data:function(){return{nodeIcon:Wc.a}}},Xc=$c,Yc=ut(Xc,vc,bc,!1,null,null,null),Zc=Yc.exports,Kc=(n("38cf"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"form-group"},[t("form-date-picker",{staticClass:"p-0",attrs:{"emit-iso":!0,"data-test":"start-date-picker","data-format":"datetime",label:e.$t("Start date"),placeholder:e.$t("Start date"),"control-class":"form-control",value:e.startDate,helper:e.$t(e.startDateHelper)},on:{input:e.setStartDate}}),e.hasRepeat?[t("label",{},[e._v(e._s(e.$t(e.repeatLabel)))]),t("b-form-group",{staticClass:"m-0 mb-3 p-0"},[t("b-form-input",{staticClass:"d-inline-block w-50",attrs:{type:"number",min:"1",max:"99","data-test":"repeat-input"},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-form-select",{staticClass:"d-inline-block w-50 periodicity",attrs:{"data-test":"repeat-on-select"},model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},[t("option",{attrs:{value:"day"}},[e._v(e._s(e.$t("day")))]),t("option",{attrs:{value:"week"}},[e._v(e._s(e.$t("week")))]),t("option",{attrs:{value:"month"}},[e._v(e._s(e.$t("month")))]),t("option",{attrs:{value:"year"}},[e._v(e._s(e.$t("year")))])]),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.repeatHelper)))])],1)]:e._e(),e.isWeeklyPeriodSelected?t("weekday-select",{attrs:{selectWeekdays:e.selectedWeekdays,periodicityValue:e.periodicityValue,repeat:e.repeat,"start-date":e.startDate,"end-date":e.endDate,ends:e.ends,times:e.times},model:{value:e.expression,callback:function(t){e.expression=t},expression:"expression"}}):e._e(),e.hasEnds?[t("label",{staticClass:"mt-1"},[e._v(e._s(e.$t("Ends")))]),t("div",[t("b-form-group",{staticClass:"m-0 mb-2"},[t("b-form-radio",{attrs:{"data-test":"ends-never",name:"optradio",value:"never"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("Never")))])],1),t("b-form-group",{staticClass:"p-0 mb-1",attrs:{description:"".concat(e.$t("Click On to select a date"),".")}},[t("b-form-radio",{staticClass:"pl-3 ml-2 mb-1",attrs:{name:"optradio",value:"ondate","data-test":"ends-on"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("On")))]),t("form-date-picker",{staticClass:"form-date-picker p-0 m-0",class:{"date-disabled":"ondate"!==e.ends},attrs:{"emit-iso":!0,"data-test":"end-date-picker",disabled:"ondate"!==e.ends,placeholder:e.$t("End date"),"data-format":"datetime","control-class":"form-control",value:e.endDate,name:"end date"},on:{input:e.setEndDate}})],1),t("b-form-group",{staticClass:"mt-0 p-0",attrs:{description:"".concat(e.$t("Click After to enter how many occurrences to end the timer control"),".")}},[t("b-form-radio",{staticClass:"pl-3 ml-2 mb-1",attrs:{"data-test":"ends-after",name:"optradio",value:"after"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("After")))]),t("b-form-input",{staticClass:"w-25 pl-2 pr-1 d-inline-block",attrs:{"data-test":"ends-after-input",type:"number",min:"0",max:"99",disabled:"after"!==e.ends},model:{value:e.times,callback:function(t){e.times=t},expression:"times"}}),t("b-form-input",{staticClass:"w-75 d-inline-block occurrences-text",attrs:{readonly:"after"!==e.ends,value:e.$t("occurrences")}})],1)],1)]:e._e()],2)}),Jc=[],Qc=n("5b4c"),el=function(){var e=this,t=e._self._c;return e.cycleManager.isWeeklyPeriodSelected()?t("div",{staticClass:"mb-2"},[t("label",{},[e._v(e._s(e.$t(e.weekLabel)))]),t("div",e._l(e.weekdays,(function(n){return t("span",{key:n.day,staticClass:"badge badge-pill weekday mb-1",class:e.cycleManager.weekdayStyle(n),attrs:{"data-test":"day-".concat(n.day)},on:{click:function(t){return e.clickWeekDay(n)}}},[e._v(" "+e._s(e.$t(n.initial))+" ")])})),0),e.repeatOnValidationError?t("small",{staticClass:"text-danger"},[e._v(e._s(e.repeatOnValidationError))]):e._e(),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.periodicityHelper)))])]):e._e()},tl=[];function nl(e){return null===e?"":"string"===typeof e?e:e.isLuxonDateTime?e.toISO():e.toISOString()}function ol(e,t,n,o,i){var r=nl(e),a=nl(t),s="after"===o?i:"",c="ondate"===o?a:"";return"R".concat(s,"/").concat(r,"/").concat(n)+(c?"/"+c:"")}function il(e,t){return"P".concat(e).concat(t)}var rl,al,sl=function(){function e(t,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"never",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"1";Ut(this,e),U(this,"_startDate",void 0),U(this,"_repeat",void 0),U(this,"_periodicityValue",void 0),U(this,"_selectedWeekdays",void 0),U(this,"_endDate",void 0),U(this,"_ends",void 0),U(this,"_times",void 0),this._startDate=this.sanitizeDate(t),this._repeat=n,this._periodicityValue=o,this._selectedWeekdays=i,this._endDate=this.sanitizeDate(r),this._ends=a,this._times=s}return Wt(e,[{key:"startDate",set:function(e){this._startDate=this.sanitizeDate(e)}},{key:"endDate",set:function(e){this._endDate=this.sanitizeDate(e)}},{key:"ends",set:function(e){this._ends=e}},{key:"times",set:function(e){this._times=e}},{key:"repeat",set:function(e){this._repeat=e}},{key:"periodicityValue",set:function(e){this._periodicityValue=e}},{key:"selectedWeekdays",set:function(e){this._selectedWeekdays=e}},{key:"sanitizeDate",value:function(e){return null===e?e:"string"===typeof e?Qc["DateTime"].fromISO(e).toUTC():e.isLuxonDateTime?e.toUTC():Qc["DateTime"].fromJSDate(e).toUTC()}},{key:"getFormattedDateWithWeekdayIntervals",value:function(){var e=this,t=il(this._repeat,this._periodicityValue),n=[this._startDate.toISO()];return this._selectedWeekdays.forEach((function(o){var i=e.getWeekDayDate(o),r=ol(i,e._endDate,t,e._ends,e._times);n.push(r)})),n.join("|")}},{key:"getWeekDayDate",value:function(e){var t=Qc["DateTime"].fromISO(this._startDate,{zone:"utc"}),n=t.set({weekday:e});return n.toMillis()<t.toMillis()&&(n=n.plus({days:7})),n.toUTC()}},{key:"dateIntervalString",value:function(){if(this.isWeeklyPeriodSelected()&&this.hasSelectedWeekdays())return this.getFormattedDateWithWeekdayIntervals();var e=il(this._repeat,this._periodicityValue);return ol(this._startDate,this._endDate,e,this._ends,this._times)}},{key:"isWeeklyPeriodSelected",value:function(){return"W"===this._periodicityValue}},{key:"hasSelectedWeekdays",value:function(){return this._selectedWeekdays.length>0}},{key:"weekdayStyle",value:function(e){var t=this._startDate.toLocal().weekday;return[e.selected?"badge-primary":"badge-light",{"border border-primary":t===e.day}]}}]),e}(),cl={props:{selectWeekdays:{type:Array,default:function(){return[]}},startDate:{type:String,default:Qc["DateTime"].local().toUTC().toISO()},endDate:{type:String,default:null},ends:{type:String,default:"never"},times:{type:[Number,String],default:1},periodicityValue:{type:String,required:!0},repeat:{type:[String,Number],default:1},hasEnds:{type:Boolean,default:!0},weekLabel:{type:String,default:"Repeat on"},periodicityHelper:{type:String,default:"Select the day(s) of the week in which to trigger this element"}},data:function(){return{DateTime:Qc["DateTime"],weekdays:[{day:7,initial:"S",selected:!1},{day:1,initial:"M",selected:!1},{day:2,initial:"T",selected:!1},{day:3,initial:"W",selected:!1},{day:4,initial:"T",selected:!1},{day:5,initial:"F",selected:!1},{day:6,initial:"S",selected:!1}],cycleManager:new sl(this.startDate,this.repeat,this.periodicityValue,this.selectedWeekdays,this.endDate,this.ends,this.times)}},watch:{startDate:function(e){this.cycleManager.startDate=e},endDate:function(e){this.cycleManager.endDate=e},ends:function(e){this.cycleManager.ends=e},times:function(e){this.cycleManager.times=e},repeat:function(e){this.cycleManager.repeat=e},periodicityValue:function(e){this.cycleManager.periodicityValue=e},selectedWeekdays:function(e){this.cycleManager.selectedWeekdays=e},dateIntervalString:function(){this.update()}},mounted:function(){var e=this;this.selectWeekdays.forEach((function(t){var n=e.weekdays.find((function(e){return e.day===t}));n&&(n.selected=!0)}))},computed:{repeatOnValidationError:function(){var e=this.weekdays.filter((function(e){var t=e.selected;return t})).length;return!this.cycleManager.isWeeklyPeriodSelected()||e>0?null:"You must select at least one day."},dateIntervalString:function(){return this.cycleManager.dateIntervalString()},selectedWeekdays:function(){return this.weekdays.filter((function(e){var t=e.selected;return t})).map((function(e){var t=e.day;return t}))}},methods:{clickWeekDay:function(e){e.selected=!e.selected},update:function(){this.$emit("input",this.dateIntervalString)}},destroyed:function(){this.$emit("input",null)}},ll=cl,dl=(n("6d7f"),ut(ll,el,tl,!1,null,"5e7ed8dc",null)),ul=dl.exports,pl={day:"D",week:"W",month:"M",year:"Y"},hl={components:{WeekdaySelect:ul},props:{value:[Array,String],hasEnds:{type:Boolean,default:!0},hasRepeat:{type:Boolean,default:!0},repeatLabel:{type:String,default:"Repeat every"},weekLabel:{type:String,default:"Repeat on"},startDateHelper:{type:String,default:"Select the date to initially trigger this element"},repeatHelper:{type:String,default:"Set the periodic interval to trigger this element again"},periodicityHelper:{type:String,default:"Select the day(s) of the week in which to trigger this element"}},data:function(){return{DateTime:Qc["DateTime"],expression:null,startDate:Qc["DateTime"].local().toUTC().toISO(),repeat:"1",periodicity:"week",ends:"never",endDate:Qc["DateTime"].local().toUTC().toISO(),times:"1",selectedWeekdays:[]}},created:function(){this.parseTimerConfig(this.value)},watch:{timerExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{periodicityValue:function(){return pl[this.periodicity]},timerExpression:function(){if(this.isWeeklyPeriodSelected()&&this.expression)return this.expression;var e=il(this.repeat,this.periodicityValue);return ol(this.startDate,this.endDate,e,this.ends,this.times)}},methods:{isWeeklyPeriodSelected:function(){return"week"===this.periodicity},setStartDate:function(e){this.startDate=Qc["DateTime"].fromISO(e,{zone:"utc"}).set({seconds:0,milliseconds:0}).toUTC().toISO()},setEndDate:function(e){var t=Qc["DateTime"].fromISO(this.startDate,{zone:"utc"});this.endDate=Qc["DateTime"].fromISO(e,{zone:"utc"}).set({hours:t.hour,minutes:t.minute,seconds:0,milliseconds:0}).toUTC().toISO()},parseTimerConfig:function(e){var t=this;if(e[0].timeCycle.body)try{var n=!1,o=e[0].timeCycle.body.split("|");o.forEach((function(e){if("R"!==e.substr(0,1))t.startDate=e,n=!0;else{var o=e.match(/R(\d*)\/([^/]+)\/P(\d+)(\w)(?:\/([^/]+))?/);if(o){if(t.times=o[1]||"1",t.repeat=o[3],t.periodicity=Object.keys(pl).find((function(e){return pl[e]===o[4]})),n||(t.startDate=o[2],n=!0),t.isWeeklyPeriodSelected()){var i=Qc["DateTime"].fromISO(o[2],{zone:"utc"}).toLocal().weekday;t.selectedWeekdays.push(i)}t.endDate=o[5]||Qc["DateTime"].local().toUTC().toISO(),t.ends=o[5]?"ondate":o[1]?"after":"never"}}n=!0}))}catch(i){this.resetTimerExpression()}},resetTimerExpression:function(){this.startDate=Qc["DateTime"].local().toUTC().toISO(),this.times="1",this.repeat="1",this.periodicity="week",this.endDate=Qc["DateTime"].local().toUTC().toISO(),this.ends="never",this.expression=null,this.selectedWeekdays=[]}}},fl=hl,ml=(n("05a3"),n("cc4b"),ut(fl,Kc,Jc,!1,null,"66e578ba",null)),gl=ml.exports,vl="processmaker-modeler-start-timer-event",bl=na()(rn()(Sc),{id:vl,component:Zc,label:Xt[vl],definition:function(e,t){var n=e.create("bpmn:StartEvent",{name:t(Xt[vl])});return n.eventDefinitions=[e.create("bpmn:TimerEventDefinition",{timeCycle:e.create("bpmn:Expression",{body:""})})],n},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var a=e[r];if("object"===v(a))continue;var s=i.get(r)[0].timeCycle;if(s&&s.body===a)continue;var c={timeCycle:o.create("bpmn:Expression",{body:a})},l=[o.create("bpmn:TimerEventDefinition",c)];n(t,"eventDefinitions",l)}else n(t,r,e[r])},inspectorConfig:[{items:[{},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-start-timer-timing-control"},items:[{component:gl,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},qr,Ir]}]}),yl=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,dropdownData:e.dropdownData}},e.$listeners))},wl=[],xl=d["shapes"].standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},Ki("topLeft"),Ki("topCenter"),Ki("topRight"),Ki("bottomLeft"),Ki("bottomCenter"),Ki("bottomRight")],defaults:d["util"].deepSupplement({type:"processmaker.components.nodes.intermediateEvent.Shape",size:{width:36,height:36},attrs:Vt(Vt(Vt(Vt(Vt(Vt({body:{fill:N,stroke:R},body2:{cx:18,cy:18,r:15,"stroke-width":2,fill:N,stroke:R},image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},Ji("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),Ji("topCenter",{ref:"circle","ref-y":-20})),Ji("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),Ji("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),Ji("bottomCenter",{ref:"circle","ref-padding-y":-40})),Ji("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},d["shapes"].standard.Circle.prototype.defaults)}),kl={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he,hr,Bi],data:function(){return{shape:null,definition:null,dropdownData:[{label:nn["processmaker-modeler-intermediate-catch-timer-event"],nodeType:"processmaker-modeler-intermediate-catch-timer-event",dataTest:"switch-to-intermediate-timer-catch-event"},{label:nn["processmaker-modeler-intermediate-signal-catch-event"],nodeType:"processmaker-modeler-intermediate-signal-catch-event",dataTest:"switch-to-intermediate-signal-catch-event"},{label:nn["processmaker-modeler-intermediate-signal-throw-event"],nodeType:"processmaker-modeler-intermediate-signal-throw-event",dataTest:"switch-to-intermediate-signal-throw-event"},{label:nn["processmaker-modeler-intermediate-message-catch-event"],nodeType:"processmaker-modeler-intermediate-message-catch-event",dataTest:"switch-to-intermediate-message-catch-event"},{label:nn["processmaker-modeler-intermediate-message-throw-event"],nodeType:"processmaker-modeler-intermediate-message-throw-event",dataTest:"switch-to-intermediate-message-throw-event"},{label:nn["processmaker-modeler-intermediate-conditional-catch-event"],nodeType:"processmaker-modeler-intermediate-conditional-catch-event",dataTest:"switch-to-intermediate-conditional-catch-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new xl;var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({label:{text:this.node.definition.get("name"),refY:"130%"}}),this.shape.addTo(this.graph),this.shape.component=this}},Cl=kl,Sl=ut(Cl,yl,wl,!1,null,null,null),El=Sl.exports,Al=n("3ee4"),Ml=n.n(Al),Tl={extends:El,mixins:[Zr],data:function(){return{nodeIcon:Ml.a}}},Pl=Tl,_l=ut(Pl,rl,al,!1,null,null,null),Ol=_l.exports,Dl=function(){var e=this,t=e._self._c;return t("div",[t("label",[e._v(e._s(e.$t("Type")))]),t("b-input-group",[t("b-form-select",{attrs:{value:e.timerPropertyName,"data-test":"intermediateTypeSelect"},on:{change:e.changeType}},[t("option",{attrs:{value:"timeDuration"}},[e._v(e._s(e.$t("Duration")))]),t("option",{attrs:{value:"timeDate"}},[e._v(e._s(e.$t("Date/Time")))]),t("option",{attrs:{value:"timeCycle"}},[e._v(e._s(e.$t("Cycle")))])])],1),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.typeHelper)))]),t(e.component,{tag:"component",attrs:{"has-ends":!1,"repeat-label":"Wait for","week-label":"Every"},model:{value:e.timerProperty,callback:function(t){e.timerProperty=t},expression:"timerProperty"}})],1)},Il=[],Nl=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("label",[e._v(e._s(e.$t("Duration")))]),t("b-input-group",[t("b-form-input",{staticClass:"form-control control repeat",attrs:{type:"number",min:"1","data-test":e.repeatInput},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-input-group-append",[t("b-form-select",{model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},e._l(e.periods,(function(n){return t("option",{key:n.name,domProps:{value:n}},[e._v(e._s(e.$t(n.name)))])})),0)],1),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Select the duration of the timer")))])],1)],1)},Rl=[],jl=n("4416"),Ll=n.n(jl),Bl={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},Fl={props:["value","repeatInput"],data:function(){var e=[{name:Bl.minute,value:"M",isTime:!0},{name:Bl.hour,value:"H",isTime:!0},{name:Bl.day,value:"D"},{name:Bl.week,value:"W"},{name:Bl.month,value:"M"}];return{repeat:null,periodicity:null,periods:e}},watch:{value:{handler:function(e){this.periodicity=this.getPeriodFromDelayString(e),this.repeat=this.getRepeatNumberFromDelayString(e)},immediate:!0},durationExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{durationExpression:function(){return this.periodicity.isTime?"PT".concat(this.repeat).concat(this.periodicity.value):"P".concat(this.repeat).concat(this.periodicity.value)}},methods:{getPeriodFromDelayString:function(e){var t=this.isTimePeriod(e),n=Ll()(e);if("M"===n){var o=t?Bl.minute:Bl.month;return this.periods.find((function(e){var t=e.name;return t===o}))}return this.periods.find((function(e){var t=e.value;return t===n}))},isTimePeriod:function(e){return"T"===e[1]},getRepeatNumberFromDelayString:function(e){var t=e.match(/\d+/);return t&&t[0]}}},zl=Fl,Hl=ut(zl,Nl,Rl,!1,null,null,null),ql=Hl.exports,Vl=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("form-date-picker",{staticClass:"p-0",attrs:{"emit-iso":!0,"data-format":"datetime",label:e.$t("Wait until specific date/time"),"control-class":"form-control",value:e.convertFromUTC(e.value),"data-test":"date-picker",helper:"Select the date to trigger this element"},on:{input:e.emitValue}})],1)},Ul=[],Gl={data:function(){return{DateTime:Qc["DateTime"]}},props:{value:String},methods:{getTimezone:function(){return"undefined"!==typeof window.ProcessMaker&&window.ProcessMaker.user&&window.ProcessMaker.user.timezone||"local"},convertFromUTC:function(e){return Qc["DateTime"].fromISO(e,{zone:"utc"}).setZone(this.getTimezone()).toISO()},emitValue:function(e){var t=Qc["DateTime"].fromISO(e).toUTC().toISO();this.$emit("input",t)}}},Wl=Gl,$l=ut(Wl,Vl,Ul,!1,null,null,null),Xl=$l.exports,Yl=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("label",[e._v(e._s(e.$t("Recurring loop repeats at time interval set below")))]),t("b-input-group",[t("b-form-input",{staticClass:"form-control control repeat",attrs:{type:"number",min:"1","data-test":e.repeatInput},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-input-group-append",[t("b-form-select",{attrs:{"data-test":"periods"},model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},e._l(e.periods,(function(n){return t("option",{key:n.name,domProps:{value:n}},[e._v(e._s(e.$t(n.name)))])})),0)],1)],1),e.periodicity&&e.periodicity.isWeek?t("weekday-select",{staticClass:"pt-3",attrs:{selectWeekdays:e.selectedWeekdays,periodicityValue:e.periodicity.value,repeat:e.repeat},model:{value:e.expression,callback:function(t){e.expression=t},expression:"expression"}}):e._e()],1)},Zl=[],Kl={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},Jl={components:{WeekdaySelect:ul},props:["value","repeatInput"],data:function(){var e=[{name:Kl.minute,value:"M",isTime:!0},{name:Kl.hour,value:"H",isTime:!0},{name:Kl.day,value:"D"},{name:Kl.week,value:"W",isWeek:!0},{name:Kl.month,value:"M"}];return{DateTime:Qc["DateTime"],repeat:null,periodicity:null,expression:null,periods:e,selectedWeekdays:null}},watch:{value:{handler:function(e){this.periodicity=this.getPeriodFromDelayString(e),this.repeat=this.getRepeatNumberFromDelayString(e),this.selectedWeekdays=this.getSelectedWeekdaysFromDelayString(e)},immediate:!0},cycleExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{cycleExpression:function(){return this.periodicity.isTime?"R/PT".concat(this.repeat).concat(this.periodicity.value):this.periodicity.isWeek&&this.expression?this.expression:"R/P".concat(this.repeat).concat(this.periodicity.value)}},methods:{getSelectedWeekdaysFromDelayString:function(e){var t=e.split("|"),n=[];return t.forEach((function(e){var t=e.match(/R(\d*)\/([^/]+)\/PT?(\d+)(\w)(?:\/([^/]+))?/);if(t){var o=Qc["DateTime"].fromISO(t[2],{zone:"utc"}).toLocal().weekday;n.push(o)}})),n},getPeriodFromDelayString:function(e){var t=this.isTimePeriod(e),n=Ll()(e);if("M"===n){var o=t?Kl.minute:Kl.month;return this.periods.find((function(e){var t=e.name;return t===o}))}return this.periods.find((function(e){var t=e.value;return t===n}))},isTimePeriod:function(e){return"T"===e[3]},getRepeatNumberFromDelayString:function(e){var t=e.match(/PT?(\d+)/);return t?t[1]:1}}},Ql=Jl,ed=ut(Ql,Yl,Zl,!1,null,null,null),td=ed.exports,nd="PT1H",od={timeDuration:"DurationExpression",timeDate:"DateTimeExpression",timeCycle:"CycleExpression"},id={props:{value:{type:Object},typeHelper:{type:String,default:"Select the type of delay"}},components:{DurationExpression:ql,DateTimeExpression:Xl,CycleExpression:td},computed:{component:function(){return od[this.timerPropertyName]},timerProperty:{get:function(){return this.value.body},set:function(e){this.emitChange(this.value.type,e)}},timerPropertyName:function(){return this.value.type}},methods:{changeType:function(e){var t=this.isDelayType(e)||this.isCycleType(e)?nd:Qc["DateTime"].local().toUTC().toISO();this.emitChange(e,t)},isDelayType:function(e){return od[e]===od.timeDuration},isCycleType:function(e){return od[e]===od.timeCycle},emitChange:function(e,t){this.$emit("input",{type:e,body:t})}}},rd=id,ad=ut(rd,Dl,Il,!1,null,null,null),sd=ad.exports,cd="processmaker-modeler-intermediate-catch-timer-event",ld={id:cd,component:Ol,bpmnType:"bpmn:IntermediateCatchEvent",control:!0,category:"BPMN",icon:n("5960"),label:"Intermediate Event",rank:20,items:[{icon:n("2b05"),label:"Intermediate Timer Event",control:!0,rank:21,id:"processmaker-modeler-intermediate-catch-timer-event"},{icon:n("b007"),label:"Intermediate Signal Catch Event",control:!0,rank:22,id:"processmaker-modeler-intermediate-signal-catch-event"},{icon:n("f2c1"),label:"Intermediate Signal Throw Event",control:!0,rank:23,id:"processmaker-modeler-intermediate-signal-throw-event"},{icon:n("fca5"),label:"Intermediate Message Catch Event",control:!0,rank:24,id:"processmaker-modeler-intermediate-message-catch-event"},{icon:n("e589"),label:"Intermediate Message Throw Event",control:!0,rank:25,id:"processmaker-modeler-intermediate-message-throw-event"},{icon:n("080b"),label:"Intermediate Conditional Catch Event",control:!0,rank:26,id:"processmaker-modeler-intermediate-conditional-catch-event"}],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(nn[cd]),eventDefinitions:[e.create("bpmn:TimerEventDefinition",{timeDuration:e.create("bpmn:Expression",{body:nd})})]})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],a=i[0][r].body;e[o]={type:r,body:a}}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var a=e[r],s=a.type,c=a.body,l=i.get(r)[0][s];if(l&&l.body===c)continue;var d=U({},s,o.create("bpmn:Expression",{body:c})),u=[o.create("bpmn:TimerEventDefinition",d)];n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{name:nn[cd],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-timer-config"},items:[{component:"FormInput",config:Ar}]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-intermediate-timer-event-timing-control"},items:[{component:sd,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},qr,Ir]}]};function dd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#000",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#fff";return{image:{width:20,height:20,y:3,x:3},body:{stroke:e,strokeWidth:t,fill:n},body2:{stroke:e,strokeWidth:t,fill:n}}}var ud,pd,hd,fd,md,gd,vd,bd,yd,wd,xd=n("2e05"),kd=n.n(xd),Cd={extends:El,mixins:[Zr],data:function(){return{nodeIcon:kd.a}},mounted:function(){var e=dd(R,2,N);this.shape.attr(e)}},Sd=Cd,Ed=ut(Sd,ud,pd,!1,null,null,null),Ad=Ed.exports,Md={id:"processmaker-modeler-intermediate-message",component:El,bpmnType:"bpmn:IntermediateEvent",control:!0,category:"BPMN",label:"Intermediate Message Event",definition:function(e,t){return e.create("bpmn:IntermediateEvent",{name:t("Intermediate Message Event"),eventDefinitions:[e.create("bpmn:MessageEventDefinition",{})]})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:"Intermediate Message Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-message-event"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Td="processmaker-modeler-intermediate-message-catch-event",Pd=na()(rn()(Md),Vt(Vt({},Ls),{},{id:Td,component:Ad,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:nn[Td],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(nn[Td]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Ns("Message that will catch this intermediate event")]}]}]})),_d=n("a5a0"),Od=n.n(_d),Dd={extends:El,mixins:[Zr],data:function(){return{nodeIcon:Od.a}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},Id=Dd,Nd=ut(Id,hd,fd,!1,null,null,null),Rd=Nd.exports,jd={id:"processmaker-modeler-intermediate-event",component:El,bpmnType:"bpmn:IntermediateEvent",control:!0,category:"BPMN",label:"Intermediate Event",definition:function(e,t){return e.create("bpmn:IntermediateEvent",{name:t("Intermediate Event")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:"Intermediate Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-gateway-config"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Ld="processmaker-modeler-intermediate-signal-catch-event",Bd=na()(rn()(jd),Vt(Vt({},Qs),{},{id:Ld,component:Rd,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:nn[Ld],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(nn[Ld]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Js("Signal that will catch this intermediate event",!1),{component:"FormInput",config:Nc}]}]}]})),Fd=n("42b7"),zd=n.n(Fd),Hd={extends:El,mixins:[Zr],props:["moddle","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:zd.a}},methods:{addMessageRef:function(){this.node.definition.get("eventDefinitions")[0].messageRef?this.message=this.node.definition.get("eventDefinitions")[0].messageRef:(this.message=this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),this.rootElements.push(this.message),this.node.definition.get("eventDefinitions")[0].messageRef=this.message)}},mounted:function(){this.shape.attr({image:{width:22,height:20,y:3,x:2}}),this.addMessageRef()},destroyed:function(){ki()(this.rootElements,this.message),ze.commit("removeMessageRef",this.message)}},qd=Hd,Vd=ut(qd,md,gd,!1,null,null,null),Ud=Vd.exports,Gd="processmaker-modeler-intermediate-message-throw-event",Wd=na()(rn()(Md),Vt(Vt({},Ls),{},{id:Gd,component:Ud,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:nn[Gd],icon:n("e589"),definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(nn[Gd]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Ns("Select the message reference that this element throws")]}]}]})),$d=n("4c70"),Xd=n.n($d),Yd={extends:El,mixins:[Zr],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:Xd.a}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},Zd=Yd,Kd=ut(Zd,vd,bd,!1,null,null,null),Jd=Kd.exports,Qd="processmaker-modeler-intermediate-signal-throw-event",eu=na()(rn()(jd),Vt(Vt({},Qs),{},{id:Qd,component:Jd,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:nn[Qd],definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(nn[Qd]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Js("Select the signal reference that this element throws")]}]}]})),tu=n("01e5"),nu=n.n(tu),ou={extends:El,mixins:[Zr],data:function(){return{nodeIcon:nu.a}},mounted:function(){var e=this.node.diagram.bounds;this.shape.attr({image:{"ref-x":9,"ref-y":9,width:e.get("width")-18,height:e.get("height")-18}})}},iu=ou,ru=ut(iu,yd,wd,!1,null,null,null),au=ru.exports;function su(){return[{component:"FormInput",config:{label:"Condition",name:"condition",helper:"Expression to evaluate condition"}}]}var cu={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];return"eventDefinitions"===o?e.condition=i[0].get("condition").body:e[o]=i,e}),{})},inspectorHandler:function(e,t,n){for(var o in ia()(e,["$type","eventDefinitions"]))t.definition[o]!==e[o]&&("condition"===o?t.definition.get("eventDefinitions")[0].get("condition").body=e[o]:n(t,o,e[o]))}},lu="processmaker-modeler-intermediate-conditional-catch-event",du=na()(rn()(jd),Vt(Vt({},cu),{},{id:lu,component:au,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:nn[lu],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(nn[lu]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(g(su()))}]}]})),uu=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"boundary-event-dropdown-data":e.boundaryEventDropdownData,"dropdown-data":e.dropdownData,showCustomIconPicker:!0,iconName:this.iconName},on:{"set-custom-icon-name":e.setCustomIconName,"reset-custom-icon-name":e.resetCustomIconName}},e.$listeners))},pu=[],hu=d["shapes"].standard.Rectangle.extend({markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},Ki("topLeft"),Ki("topCenter"),Ki("topRight"),Ki("bottomLeft"),Ki("bottomCenter"),Ki("bottomRight")],defaults:d["util"].deepSupplement({type:"processmaker.components.nodes.task.Shape",size:{width:100,height:60},attrs:Vt(Vt(Vt(Vt(Vt(Vt({image:{"ref-x":4,"ref-y":4,ref:"rect",width:16,height:16,"data-test":"nodeIcon"}},Ji("topLeft",{"ref-y":4,ref:"rect"})),Ji("topCenter",{"ref-y":4,ref:"rect"})),Ji("topRight",{"ref-y":4,"ref-x":96,ref:"rect"},-1)),Ji("bottomLeft",{ref:"rect"})),Ji("bottomCenter",{ref:"rect"})),Ji("bottomRight",{"ref-x":96,ref:"rect"},-1))},d["shapes"].standard.Rectangle.prototype.defaults)}),fu=76,mu=116,gu={data:function(){return{iconName:""}},methods:{setCustomIconName:function(e){this.iconName=e},resetCustomIconName:function(){this.setCustomIconName("")},setCustomIcon:function(e){this.shape&&this.shape.attr("image/xlink:href",Yr(atob(e),this.node))}},mounted:function(){this.node.definition.get("customIcon")&&this.setCustomIcon(this.node.definition.get("customIcon"))}},vu=10,bu=[{label:"Boundary Timer Event",nodeType:"processmaker-modeler-boundary-timer-event",dataTest:"add-boundary-timer-event"},{label:"Boundary Error Event",nodeType:"processmaker-modeler-boundary-error-event",dataTest:"add-boundary-error-event"},{label:"Boundary Signal Event",nodeType:"processmaker-modeler-boundary-signal-event",dataTest:"add-boundary-signal-event"},{label:"Boundary Conditional Event",nodeType:"processmaker-modeler-boundary-conditional-event",dataTest:"add-boundary-conditional-event"},{label:"Boundary Message Event",nodeType:"processmaker-modeler-boundary-message-event",dataTest:"add-boundary-message-event"}],yu=bu,wu=n("7736"),xu=n.n(wu),ku=n("4506"),Cu=n.n(ku),Su=n("a4e3"),Eu=n.n(Su),Au="bpmn:StandardLoopCharacteristics",Mu="bpmn:MultiInstanceLoopCharacteristics";function Tu(e,t,n,o){var i=e.get("loopCharacteristics"),r=[Au,Mu];if(i&&r.includes(i.$type))if(i.$type!==Au){var a=i.isSequential?xu.a:Cu.a;n(t.bottomCenter,"loopCharacteristics",a)}else n(t.bottomCenter,"loopCharacteristics",Eu.a);else o(t.bottomCenter,"loopCharacteristics")}var Pu=n("7cd8"),_u=n.n(Pu);function Ou(e,t,n,o){e.isForCompensation?n(t.bottomCenter,"compensation",_u.a):o(t.bottomCenter,"compensation")}var Du,Iu,Nu=15,Ru=2*Zi,ju={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he,hr,Bi,gu],data:function(){return{shape:null,definition:null,dropdownData:[{label:Jt["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:Jt["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:Jt["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:Jt["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],boundaryEventDropdownData:yu,anchorPointFunction:ke}},computed:{hasTaskMarker:function(){return!!this.shape.attr("image/xlink:href")}},watch:{"node.definition.name":function(e){var t=this.node.diagram.bounds.width;this.shape.attr("label/text",d["util"].breakText(e,{width:t}));var n=this.shape.size(),o=n.height,i=this.calculateSizeOnGrid(),r=this.useTaskHeight(i)?fu:i;o!==r&&(this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment())},"node.definition.isForCompensation":function(){Ou(this.node.definition,this.markers,this.$set,this.$delete)},"node.definition":{deep:!0,handler:function(){Tu(this.node.definition,this.markers,this.$set,this.$delete)}}},methods:{getElementsUnderArea:function(e){var t=e.getBBox(),n=t.x,o=t.y,i=t.width,r=t.height,a={x:n,y:o,width:i,height:r};return this.graph.findModelsInArea(a)},calculateSizeOnGrid:function(){var e=vu-fu%vu,t=Math.floor(this.shapeView.selectors.label.getBBox().height),n=t+Nu+Ru,o=this.paperManager.ceilToNearestGridMultiple(n)-e;return this.middleIsOddNumber(o)&&(o+=vu),o},useTaskHeight:function(e){return e<fu||!this.node.definition.name},middleIsOddNumber:function(e){return 1===Math.abs(e/2%2)}},mounted:function(){this.shape=new hu;var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),Ou(this.node.definition,this.markers,this.$set,this.$delete),Tu(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8},label:{text:d["util"].breakText(this.node.definition.get("name"),{width:e.width}),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this}},Lu=ju,Bu=ut(Lu,uu,pu,!1,null,null,null),Fu=Bu.exports,zu=n("16ae"),Hu=n.n(zu),qu={extends:Fu,mixins:[Zr],data:function(){return{nodeIcon:Hu.a}}},Vu=qu,Uu=ut(Vu,Du,Iu,!1,null,null,null),Gu=Uu.exports,Wu=function(){var e=this,t=e._self._c;return t("div",[t("b-form-group",[t("b-form-checkbox",{attrs:{"data-test":"for-compensation",name:"for-compensation"},model:{value:e.isForCompensation,callback:function(t){e.isForCompensation=t},expression:"isForCompensation"}},[e._v(e._s(e.$t("For Compensation")))])],1)],1)},$u=[],Xu={props:{value:{type:Object,default:function(){return{isForCompensation:!1}}}},name:"MarkerFlags",data:function(){return{isForCompensation:this.value.isForCompensation}},watch:{isForCompensation:function(e){this.$emit("input",{isForCompensation:e})}}},Yu=Xu,Zu=ut(Yu,Wu,$u,!1,null,"66aabb37",null),Ku=Zu.exports,Ju={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:Dr,config:Ii},{component:Ku,name:"taskMarkers",config:{label:"Marker Flags",name:"markerFlags",style:"display:none"}}]},Qu=function(){var e=this,t=e._self._c;return t("div",[t("b-form-group",{attrs:{label:e.$t("Loop Mode")}},[t("b-form-select",{attrs:{id:""},on:{change:e.changeLoopType},model:{value:e.loopType,callback:function(t){e.loopType=t},expression:"loopType"}},e._l(e.loopOptions,(function(n){return t("option",{key:n.text,domProps:{value:n.value}},[e._v(e._s(e.$t(n.text)))])})),0)],1),"loop"===e.loopType?[t("b-form-group",{attrs:{label:e.$t("Maximum Iterations")}},[t("b-form-input",{attrs:{type:"number",min:"0",step:"1","data-cy":"loopMaximum"},on:{input:e.changeLoopMaximum},model:{value:e.loopMaximum,callback:function(t){e.loopMaximum=t},expression:"loopMaximum"}}),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Leave empty to continue until exit condition is satisfied")))])],1),t("b-form-group",{attrs:{label:e.$t("Exit Condition")}},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.loopCondition,expression:"loopCondition"}],ref:"specialAssignmentsInput",staticClass:"form-control special-assignment-input",attrs:{"aria-label":e.$t("FEEL Syntax"),placeholder:"FEEL Syntax","data-cy":"loopCondition"},domProps:{value:e.loopCondition},on:{input:[function(t){t.target.composing||(e.loopCondition=t.target.value)},e.changeLoopCondition]}}),e._v(" "),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("When FEEL expression evaluates to true then exit loop")))])])]:e._e(),"parallel_mi"===e.loopType||"sequential_mi"===e.loopType?["inputData"===e.multiType?t("b-form-group",{attrs:{id:"group-inputData",label:e.$t("Request Variable Array"),"label-for":"inputData",description:e.$t("Non-array data will result in an error.")}},[t("b-form-input",{attrs:{id:"inputData",type:"text",placeholder:e.$t("Request Variable Name")},on:{input:e.changeInputData},model:{value:e.inputData,callback:function(t){e.inputData=t},expression:"inputData"}})],1):e._e(),"sequential_mi"===e.loopType?t("b-form-group",{attrs:{id:"group-exit-condition",label:e.$t("Exit Condition"),"label-for":"exit-condition",description:e.$t("When the FEEL Expression evaluates to true then exit the loop")}},[t("b-form-textarea",{attrs:{id:"exit-condition",placeholder:e.$t("FEEL Syntax")},on:{input:e.changeCompletionCondition},model:{value:e.completionCondition,callback:function(t){e.completionCondition=t},expression:"completionCondition"}})],1):e._e(),t("b-form-group",{attrs:{id:"group-outputData",label:e.$t("Output Data Variable"),"label-for":"outputData",description:e.$t("Specifies the output request data variable array, which will be produced as a result of the multi-instance.")}},[t("b-form-input",{attrs:{id:"outputData",type:"text",placeholder:e.$t("Request Variable Name")},on:{input:e.changeOutputData},model:{value:e.outputData,callback:function(t){e.outputData=t},expression:"outputData"}})],1)]:e._e()],2)},ep=[],tp={props:{value:{type:Object,default:function(){return{loopCharacteristics:null,ioSpecification:null}}}},name:"LoopCharacteristics",data:function(){return{loopOptions:[{text:this.$t("No Loop Mode"),value:"no_loop"},{text:this.$t("Loop"),value:"loop"},{text:this.$t("Multi-Instance (Parallel)"),value:"parallel_mi"},{text:this.$t("Multi-Instance (Sequential)"),value:"sequential_mi"}],showAdvanced:!1,previous:{loopCardinality:"3",completionCondition:null,inputData:null,outputData:null,inputDataItem:null},local:{loopCharacteristics:{$type:null,isSequential:!1},loopMaximum:0,loopCondition:null,ioSpecification:{dataInputs:[]}},loopType:null,multiType:null,loopCardinality:null,completionCondition:null,inputData:null,inputDataItem:null,outputData:null,outputDataItem:null,loopMaximum:0,loopCondition:null}},mounted:function(){this.loadData()},watch:{value:{deep:!0,handler:function(e){Object(ft["isEqual"])(this.local,e)||this.loadData()}}},methods:{changeLoopMaximum:function(e){this.setLoopMaximum(e),this.saveData()},changeLoopCondition:function(){this.setLoopCondition(this.loopCondition),this.saveData()},changeLoopType:function(e){this.setLoopCharacteristics(e),this.saveData()},changeMultiType:function(e){this.setMultiType(e),this.saveData()},changeLoopCardinality:function(e){this.setLoopCardinality(e),this.saveData()},changeCompletionCondition:function(e){this.setCompletionCondition(e),this.saveData()},changeInputData:function(e){this.setLoopDataInputRef(e),this.saveData()},changeInputDataItem:function(e){this.setInputDataItem(e),this.saveData()},changeOutputData:function(e){this.setLoopDataOutputRef(e),this.saveData()},changeOutputDataItem:function(e){this.setOutputDataItem(e),this.saveData()},loadData:function(){this.$set(this,"local",Object(ft["cloneDeep"])(this.value)),this.loopType=this.getLoopCharacteristics(),this.multiType=this.getMultiType(),this.loopCardinality=this.getLoopCardinality(),this.completionCondition=this.getCompletionCondition(),this.inputData=this.getLoopDataInputRef(),this.inputDataItem=this.getInputDataItem(),this.outputData=this.getLoopDataOutputRef(),this.outputDataItem=this.getOutputDataItem(),this.previous.inputData=this.inputData,this.previous.outputData=this.outputData,this.previous.loopCardinality=this.loopCardinality,this.completionCondition=this.completionCondition,this.loopMaximum=this.getLoopMaximum(),this.loopCondition=this.getLoopCondition()},saveData:function(){Object(ft["isEqual"])(this.local,this.value)||this.$emit("input",Object(ft["cloneDeep"])(this.local))},getOutputDataItem:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.outputDataItem?this.local.loopCharacteristics.outputDataItem.name:null},setOutputDataItem:function(e){this.local.loopCharacteristics.outputDataItem={$type:"bpmn:DataInput",isCollection:!0,name:e}},getLoopDataOutputRef:function(){var e;return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopDataOutputRef?null===(e=this.local.ioSpecification)||void 0===e?void 0:e.dataOutputs[0].name:null},setLoopDataOutputRef:function(e){this.local.ioSpecification||this.initIoSpecification();var t=this.local.ioSpecification.dataOutputs[0]||{$type:"bpmn:DataOutput",id:"".concat(this.local.id,"_output_1"),isCollection:!0,name:e};t.name=e,this.local.ioSpecification.dataOutputs=[t],this.local.ioSpecification.outputSets[0].dataOutputRefs=[t.id],this.local.loopCharacteristics.loopDataOutputRef=t.id},getInputDataItem:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.inputDataItem?this.local.loopCharacteristics.inputDataItem.name:null},setInputDataItem:function(e){this.local.loopCharacteristics.inputDataItem={$type:"bpmn:DataInput",isCollection:!0,name:e}},getLoopDataInputRef:function(){var e;return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopDataInputRef?null===(e=this.local.ioSpecification)||void 0===e?void 0:e.dataInputs[0].name:null},setLoopDataInputRef:function(e){var t={$type:"bpmn:DataInput",id:"".concat(this.local.id,"_input_1"),isCollection:!0,name:e};this.local.ioSpecification||this.initIoSpecification(),this.local.ioSpecification.dataInputs=[t],this.local.ioSpecification.inputSets[0].dataInputRefs=[t.id],this.local.loopCharacteristics.loopDataInputRef=t.id},initIoSpecification:function(){this.local.ioSpecification={$type:"bpmn:InputOutputSpecification",dataInputs:[],dataOutputs:[],inputSets:[{$type:"bpmn:InputSet",dataInputRefs:[]}],outputSets:[{$type:"bpmn:OutputSet",dataOutputRefs:[]}]}},getLoopCardinality:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopCardinality?this.local.loopCharacteristics.loopCardinality.body:null},getCompletionCondition:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.completionCondition?this.local.loopCharacteristics.completionCondition.body:null},setLoopCardinality:function(e){this.local.loopCharacteristics.loopCardinality={$type:"bpmn:Expression",body:e}},setCompletionCondition:function(e){this.local.loopCharacteristics.completionCondition={$type:"bpmn:Expression",body:e}},getMultiType:function(){return this.local.loopCharacteristics?void 0!==this.local.loopCharacteristics.loopCardinality?"loopCardinality":"inputData":null},setMultiType:function(e){"loopCardinality"===e?(this.local.loopCharacteristics.loopCardinality={$type:"bpmn:Expression",body:this.previous.loopCardinality||"3"},this.local.loopCharacteristics.completionCondition={$type:"bpmn:Expression",body:this.previous.completionCondition||""},this.previous.inputData=this.inputData,this.previous.outputData=this.outputData,this.previous.inputDataItem=this.inputDataItem,delete this.local.loopCharacteristics.loopDataInputRef,delete this.local.loopCharacteristics.inputDataItem,this.setLoopDataOutputRef(this.previous.outputData||"output_array_".concat(this.local.id))):(this.previous.loopCardinality=this.loopCardinality,this.previous.completionCondition=this.completionCondition,this.previous.outputData=this.outputData,delete this.local.loopCharacteristics.loopCardinality,delete this.local.loopCharacteristics.completionCondition,this.local.loopCharacteristics.loopDataInputRef="",this.setLoopDataInputRef(this.previous.inputData||"source_array"),this.setLoopDataOutputRef(this.previous.outputData||"output_array_".concat(this.local.id)),this.setInputDataItem(this.previous.inputDataItem||"")),this.loopCardinality=this.getLoopCardinality(),this.completionCondition=this.getCompletionCondition(),this.inputData=this.getLoopDataInputRef(),this.outputData=this.getLoopDataOutputRef()},getLoopCharacteristics:function(){return this.local.loopCharacteristics?"bpmn:StandardLoopCharacteristics"===this.local.loopCharacteristics.$type?"loop":"bpmn:MultiInstanceLoopCharacteristics"===this.local.loopCharacteristics.$type?this.local.loopCharacteristics.isSequential?"sequential_mi":"parallel_mi":"no_loop":"no_loop"},setLoopCharacteristics:function(e){switch(this.local.loopCharacteristics||(this.local.loopCharacteristics={}),e){case"no_loop":this.local.loopCharacteristics=void 0;break;case"loop":this.local.loopCharacteristics.$type="bpmn:StandardLoopCharacteristics";break;case"parallel_mi":this.local.loopCharacteristics.$type="bpmn:MultiInstanceLoopCharacteristics",this.local.loopCharacteristics.isSequential=!1,this.multiType||(this.multiType="inputData");break;case"sequential_mi":this.local.loopCharacteristics.$type="bpmn:MultiInstanceLoopCharacteristics",this.local.loopCharacteristics.isSequential=!0,this.multiType||(this.multiType="inputData");break}},setLoopMaximum:function(e){e||(e=null),this.local.loopCharacteristics.loopMaximum=e},getLoopMaximum:function(){return this.local.loopCharacteristics?this.local.loopCharacteristics.loopMaximum:null},setLoopCondition:function(e){this.local.loopCharacteristics.loopCondition={$type:"bpmn:Expression",body:e}},getLoopCondition:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopCondition?this.local.loopCharacteristics.loopCondition.body:null}}},np=tp,op=ut(np,Qu,ep,!1,null,null,null),ip=op.exports;n("cca6"),n("7039");function rp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ap(e,t,n){rp(e,t),t.set(e,n)}function sp(e,t){return t.get?t.get.call(e):t.value}function cp(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function lp(e,t){var n=cp(e,t,"get");return sp(e,n)}function dp(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}function up(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}function pp(e,t,n){return dp(e,t),up(n,"get"),sp(e,n)}function hp(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function fp(e,t,n,o){return dp(e,t),up(n,"set"),hp(e,n,o),o}n("4d63"),n("c607"),n("2c3e"),n("25f0"),n("10d1");var mp=new WeakMap,gp=new WeakMap,vp=new WeakMap,bp=function(){function e(t){Ut(this,e),ap(this,mp,{writable:!0,value:function(){var t,n=e.prefix+pp(e,e,yp);return fp(e,e,yp,(t=pp(e,e,yp),t++,t)),n}}),ap(this,gp,{writable:!0,value:function(){var t,n=e.prefix+pp(e,e,wp)+"_di";return fp(e,e,wp,(t=pp(e,e,wp),t++,t)),n}}),ap(this,vp,{writable:!0,value:function(){var t,n=e.processPrefix+pp(e,e,xp);return fp(e,e,xp,(t=pp(e,e,xp),t++,t)),n}}),this.definitions=t,this.refreshLastIdCounter(),this.refreshLastDiagramIdCounter(),this.refreshLastProcessIdCounter()}return Wt(e,[{key:"findById",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.definitions.rootElements,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!(o.indexOf(n)>-1)){var i;if(n instanceof Array)o.push(n),n.find((function(n){return i=t.findById(e,n,o)}));else if(n instanceof Object&&n.$type){if(o.push(n),n.id===e)return n;Object.getOwnPropertyNames(n).find((function(r){return i=!(n[r]instanceof Function)&&"$"!==r.substring(0,1)&&t.findById(e,n[r],o)}))}return i}}},{key:"matchIds",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(o.indexOf(t)>-1)return i;if(t instanceof Array)o.push(t),t.forEach((function(t){return i=n.matchIds(e,t,o,i)}));else if(t instanceof Object){if(o.push(t),t.id){var r=String(t.id).match(e),a=r?parseInt(r[1]):0;a>i&&(i=a)}Object.getOwnPropertyNames(t).forEach((function(r){t[r]instanceof Function||"$"===r.substring(0,1)||(i=n.matchIds(e,t[r],o,i))}))}return i}},{key:"refreshLastIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.prefix,"(\\d+)$")),this.definitions.rootElements);fp(e,e,yp,t+1)}},{key:"getCounter",value:function(){return this.refreshLastIdCounter(),pp(e,e,yp)}},{key:"refreshLastDiagramIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.prefix,"(\\d+)_di$")),this.definitions.diagrams);fp(e,e,wp,t+1)}},{key:"refreshLastProcessIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.processPrefix,"(\\d+)$")),this.definitions.rootElements);fp(e,e,xp,t+1)}},{key:"generate",value:function(){var e=lp(this,mp).call(this),t=lp(this,gp).call(this);return[e,t]}},{key:"generateProcessId",value:function(){return lp(this,vp).call(this)}}]),e}();U(bp,"prefix","node_"),U(bp,"processPrefix","Process_");var yp={writable:!0,value:1},wp={writable:!0,value:1},xp={writable:!0,value:1},kp=null;function Cp(e){return kp||(kp=new bp(e)),kp}var Sp=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ut(this,e),this.index=window.NODE_INSPECTOR_FIRST_INDEX||(new Date).getTime(),this.definitions=t,this.nodeIdGenerator=Cp(this.definitions),this.options=Object.assign({prefix:this.nodeIdGenerator.generate()[0]},n),this.createdModdleNodes={}}return Wt(e,[{key:"getDefinitionProps",value:function(e){var t=this;return e instanceof Array?e.map((function(e){return t.getDefinitionProps(e)})):e instanceof Object?Object.getOwnPropertyNames(e).reduce((function(n,o){if(e[o]instanceof Function)return n;var i="Ref"===o.substr(o.length-3)||"Refs"===o.substr(o.length-4);return e[o]instanceof Object&&e[o].id&&i?n[o]=Object&&e[o].id:e[o]instanceof Array&&i?n[o]=e[o].filter((function(e){return e})).map((function(e){return e.id})):("$type"===o||"$"!==o.substr(0,1)&&"__"!==o.substr(0,2))&&(n[o]=t.getDefinitionProps(e[o])),n}),{}):e}},{key:"setDefinitionProps",value:function(e,t,n,o,i){var r=this;if(void 0!==e){if(e instanceof Array)e=e.map((function(e){return r.setDefinitionProps(e,t,n)}));else if(e instanceof Object)try{e=Object.keys(ia()(e,"$type","$config","markerFlags")).reduce((function(o,i){var a=r.setDefinitionProps(e[i],t,n,void 0,i);return null!==a&&void 0!==a?o[i]=a:void 0===a&&delete o[i],o}),o||this.createModdleNode(n,e))}catch(a){throw'Unable to create moddle node of type "'.concat(e.$type,'" \n ').concat(a)}return o&&void 0!==i&&void 0!==e&&null!==e&&(o[i]=e),e}}},{key:"createModdleNode",value:function(e,t){var n=e.create(t.$type,{id:this.generateId()});return t.id&&(this.createdModdleNodes[t.id]=n),n}},{key:"setReferences",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(void 0!==e)return this.isReference(n)?e=e instanceof Array?e.map((function(e){return t.findReference(e)})):this.findReference(e):e instanceof Array?e=e.map((function(e){return t.setReferences(e,null)})):e instanceof Object&&Object.keys(ia()(e,"$type","$config","markerFlags")).forEach((function(n){e[n]=t.setReferences(e[n],n)})),e}},{key:"isReference",value:function(e){return!!e&&("Ref"===e.substr(e.length-3)||"Refs"===e.substr(e.length-4))}},{key:"findReference",value:function(e){return this.createdModdleNodes[e]||this.findById(e)}},{key:"generateId",value:function(){return this.index++,"".concat(this.options.prefix,"_").concat(this.index)}},{key:"findById",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.definitions.rootElements,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!(o.indexOf(n)>-1)){var i;if(n instanceof Array)o.push(n),n.find((function(n){return i=t.findById(e,n,o)}));else if(n instanceof Object&&n.$type){if(o.push(n),n.id===e)return n;Object.getOwnPropertyNames(n).find((function(r){return i=!(n[r]instanceof Function)&&t.findById(e,n[r],o)}))}return i}}}]),e}(),Ep=function(e,t,n,o,i){var r=new Sp(i,{prefix:"".concat(t.definition.id,"_inner")}),a=r.setDefinitionProps(e.$loopCharactetistics,n,o,{});return a=r.setReferences(a),a.loopCharacteristics?(delete t.definition.loopCharacteristics,n(t,"loopCharacteristics",a.loopCharacteristics)):(t.definition.loopCharacteristics=null,delete t.definition.loopCharacteristics),a.ioSpecification?(delete t.definition.ioSpecification,n(t,"ioSpecification",a.ioSpecification)):delete t.definition.ioSpecification,ia()(e,["$loopCharactetistics"])},Ap=function(e,t,n,o){var i=o.definitions,r=new Sp(i);e.$loopCharactetistics=r.getDefinitionProps({id:t.definition.id,loopCharacteristics:t.definition.loopCharacteristics,ioSpecification:t.definition.ioSpecification}),delete e.loopCharacteristics,delete e.ioSpecification},Mp={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Loop Activity",icon:"redo",name:"loop-characteristics-accordion"},items:[{component:ip,name:"LoopCharactetistics",config:{name:"$loopCharactetistics"}}]},Tp="processmaker-modeler-task",Pp={id:"processmaker-modeler-task",component:Fu,bpmnType:["bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:SubProcess"],control:!0,category:"BPMN",rank:40,icon:n("9fb7"),label:"Task",items:[{icon:n("9fb7"),label:"Form Task",control:!0,rank:41,id:"processmaker-modeler-task"},{icon:n("4709"),label:"Manual Task",control:!0,rank:42,id:"processmaker-modeler-manual-task"},{icon:n("4a29"),label:"Script Task",control:!0,rank:43,id:"processmaker-modeler-script-task"},{icon:n("443d"),label:"Sub Process",control:!0,rank:44,id:"processmaker-modeler-call-activity"}],definition:function(e,t){return e.create("bpmn:Task",{name:t(Jt[Tp]),assignment:"requester"})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:fu,width:mu})})},inspectorHandler:function(e,t,n,o,i,r){_p(e.markerFlags,t,n,o),Ep(e,t,n,o,i),r(ia()(e,"markerFlags","$loopCharactetistics"))},inspectorData:function(e,t,n){var o=t(e);return Ap(o,e,t,n),o.markerFlags={isForCompensation:o.isForCompensation},delete o.isForCompensation,o},inspectorConfig:[{name:Jt[Tp],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-task"},items:[{component:"FormInput",config:Ar}]},Mp,qr,Ju]}],loopCharacteristicsHandler:Ep,loopCharacteristicsData:Ap};function _p(e,t,n){if(e){var o=t.definition.get("isForCompensation"),i=e.isForCompensation;null!=i&&i!==o&&n(t,"isForCompensation",i)}}var Op,Dp,Ip=Vt(Vt({},Pp),{},{component:Gu}),Np=(n("e9c4"),function(){var e=this,t=e._self._c;return t("div",[t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"boundary-event-dropdown-data":e.boundaryEventDropdownData,"dropdown-data":e.dropdownData,showCustomIconPicker:!0,iconName:this.iconName},on:{"set-custom-icon-name":e.setCustomIconName,"reset-custom-icon-name":e.resetCustomIconName}},e.$listeners)),t("b-modal",{ref:"subprocess-modal",attrs:{title:"Previewing '".concat(e.subprocessName,"'")},scopedSlots:e._u([{key:"modal-footer",fn:function(){return[t("a",{attrs:{href:e.subprocessLink,target:"_blank","data-test":"modal-process-link"}},[e._v(" Open subprocess in new window "),t("i",{staticClass:"ml-1 fas fa-external-link-alt"})])]},proxy:!0}])},[e.subProcessSvg?t("div",{staticClass:"text-center",domProps:{innerHTML:e._s(e.subProcessSvg)}}):e.failedToLoadPreview?t("div",[e._v("Could not load preview")]):t("div",[t("i",{staticClass:"fas fa-spinner fa-spin"}),e._v(" Loading process preview...")])]),t("b-modal",{ref:"no-subprocess-modal",attrs:{title:"No subprocess selected","hide-footer":!0}},[e._v(" Please select a subprocess to view it. ")])],1)}),Rp=[],jp=n("582a"),Lp=n.n(jp),Bp=15,Fp=2*Zi,zp='<svg version="1.1"\n baseProfile="full"\n width="16" height="16"\n xmlns="http://www.w3.org/2000/svg"></svg>',Hp={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","paperManager"],mixins:[wr,he,hr,Bi,Zr,gu],data:function(){return{subProcessSvg:null,failedToLoadPreview:!1,boundaryEventDropdownData:yu,dropdownData:[{label:Jt["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:Jt["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:Jt["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:Jt["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],nodeIcon:zp,iconName:"",anchorPointFunction:ke}},computed:{subprocessId:function(){return JSON.parse(this.node.definition.get("config")).processId},subprocessLink:function(){return"/modeler/".concat(this.subprocessId)},subprocessName:function(){return this.node.definition.get("name")}},watch:{"node.definition.name":function(e){var t=this.node.diagram.bounds.width;this.shape.attr("label/text",d["util"].breakText(e,{width:t}));var n=this.shapeView.selectors.label.getBBox().height,o=this.shape.size(),i=o.height;if(n+Bp+Fp!==i){var r=Math.max(n+Bp+Fp,fu);this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment()}},"node.definition.config":function(e){ze.commit("updateNodeProp",{node:this.node,key:"config",value:e}),this.$emit("save-state")},"node.definition.callActivityType":function(e){this.shape.attr("image/display","globalTask"===e?"none":"initial")},"node.definition.loopCharacteristics":function(){Tu(this.node.definition,this.markers,this.$set,this.$delete)}},methods:{clickSubprocess:function(e,t){var n=this,o="bottomCenter.0"===t.target.getAttribute("joint-selector"),i=e.model===this.shape;o&&i&&(this.subprocessId?(this.$refs["subprocess-modal"].show(),this.subProcessSvg=null,this.failedToLoadPreview=!1,window.ProcessMaker.apiClient.get("/processes/".concat(this.subprocessId),{params:{include:"svg"}}).then((function(e){var t=e.data;if(t.svg){var o=function(e){return e.replace('<svg width="100%"',"<svg ")},i=function(e){return e.replace("<svg ",'<svg class="border border-dark"')};n.subProcessSvg=i(o(t.svg))}else n.failedToLoadPreview=!0})).catch((function(){n.failedToLoadPreview=!0}))):this.$refs["no-subprocess-modal"].show())}},mounted:function(){this.shape=new hu,this.$set(this.markers.bottomCenter,"subprocess",Lp.a);var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),Tu(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8,strokeWidth:4},label:{text:d["util"].breakText(this.node.definition.get("name"),{width:e.width}),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this,this.paperManager.addEventHandler("element:pointerclick",this.clickSubprocess),this.node.definition.get("customIcon")&&this.setCustomIcon(this.node.definition.get("customIcon"))}},qp=Hp,Vp=ut(qp,Np,Rp,!1,null,null,null),Up=Vp.exports,Gp=function(){var e=this,t=e._self._c;return t("div",[t("form-multi-select",{staticClass:"p-0 mb-2",attrs:{label:e.$t("Process"),name:"Process",helper:e.$t("Select which Process this element calls"),showLabels:!1,"allow-empty":!1,options:e.processList,loading:e.loading,optionContent:"name",validation:e.validation,searchable:!0,"internal-search":!1,"preserve-search":!1,"clear-on-select":!1},on:{"search-change":e.searchChange},model:{value:e.selectedProcess,callback:function(t){e.selectedProcess=t},expression:"selectedProcess"}}),e.selectedProcess?t("form-multi-select",{staticClass:"p-0 mb-2",attrs:{label:e.$t("Start Event"),name:"StartEvent",disabled:0===e.startEventList.length,"allow-empty":!1,showLabels:!1,options:e.startEventList,optionContent:"name",validation:"required"},model:{value:e.selectedStartEvent,callback:function(t){e.selectedStartEvent=t},expression:"selectedStartEvent"}}):e._e(),e.selectedProcess?t("a",{attrs:{href:"/modeler/".concat(e.selectedProcess.id),target:"_blank"}},[e._v(" "+e._s(e.$t("Open Process"))+" "),t("i",{staticClass:"ml-1 fas fa-external-link-alt"})]):e._e()],1)},Wp=[],$p=n("a8fc"),Xp=n.n($p),Yp={data:function(){return{selectedProcess:null,selectedStartEvent:null,config:{},name:"",loading:!1,processes:[],selectedProcessInfo:null,validation:""}},inheritAttrs:!1,props:["value"],computed:{processList:function(){var e=this,t=this.filterValidProcesses(this.processes)||[];return this.selectedProcessInfo&&!t.find((function(t){return t.id===e.selectedProcessInfo.id}))&&t.push(this.selectedProcessInfo),t},startEventList:function(){return this.selectedProcess?this.filterValidStartEvents(this.selectedProcess.events):[]},currentProcessId:function(){var e=window.location.href.match(/modeler\/(\d+)/);return e&&e[1]?parseInt(e[1]):null}},watch:{selectedProcess:function(){this.loading||(this.startEventList.length>0?this.selectedStartEvent=this.startEventList[0]:this.selectedStartEvent=null)},selectedStartEvent:function(){this.loading||this.setBpmnValues()},processList:function(){this.loadBpmnValues()},value:{handler:function(){this.config=JSON.parse(this.value),this.loadSelectedProcessInfo()},immediate:!0}},methods:{searchChange:function(e){this.loadProcessesDebounced(e)},filterValidProcesses:function(e){var t=this;return e.filter((function(e){return t.filterValidStartEvents(e.events).length>0})).filter((function(e){return e.id!==t.currentProcessId}))},filterValidStartEvents:function(e){return e.filter((function(e){if(e.eventDefinitions&&e.eventDefinitions.length>0)return!1;if(e.config)try{var t=JSON.parse(e.config);if(t.web_entry)return!1}catch(n){return!1}return!0}))},loadBpmnValues:function(){var e=this;this.config.processId&&this.config.startEvent&&(this.loading=!0,this.name=this.config.name,this.selectedProcess=this.processList.find((function(t){return t.id===e.config.processId})),this.selectedStartEvent=this.startEventList.find((function(t){return t.id===e.config.startEvent})),this.$nextTick((function(){e.selectedProcess||(e.validation="required"),e.loading=!1})))},setBpmnValues:function(){if(this.selectedProcess&&this.selectedStartEvent){var e=this.selectedProcess.name;this.startEventList.length>1&&(e+=" (".concat(this.selectedStartEvent.name,")"));var t={calledElement:"".concat(this.selectedStartEvent.ownerProcessId,"-").concat(this.selectedProcess.id),processId:this.selectedProcess.id,startEvent:this.selectedStartEvent.id,name:e},n=JSON.stringify(t);this.$emit("input",n)}},containsMultipleProcesses:function(e){return Xp()(e.events,"ownerProcessId").length>1},loadProcesses:function(e){var t=this;this.loading=!0;var n={order_direction:"asc",per_page:20,include:"events,category",filter_without_assignments:!0};e&&(n.filter=e),window.ProcessMaker.apiClient.get("processes",{params:n}).then((function(e){t.loading=!1,t.processes=e.data.data})).catch((function(){t.loading=!1}))},loadSelectedProcessInfo:function(){var e=this;this.config.processId&&window.ProcessMaker.apiClient.get("processes/"+this.config.processId,{params:{include:"events,category",filter_without_assignments:!0}}).then((function(t){e.selectedProcessInfo=t.data}))}},created:function(){var e=this;this.validation=this.config.processId?"":"required",this.loadProcessesDebounced=S()((function(t){e.loadProcesses(t)}),500),0===this.processList.length?this.loadProcesses():this.loadBpmnValues()}},Zp=Yp,Kp=ut(Zp,Gp,Wp,!1,null,null,null),Jp=Kp.exports,Qp="processmaker-modeler-call-activity",eh={id:Qp,component:Up,bpmnType:"bpmn:CallActivity",control:!1,category:"BPMN",icon:n("2005"),label:Jt[Qp],definition:function(e,t){return e.create("bpmn:CallActivity",{name:t(Jt[Qp]),calledElement:"",config:"{}",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:fu,width:mu})})},inspectorHandler:function(e,t,n){n(t,"id",e.id),n(t,"name",e.name);var o=JSON.parse(e.config);e["calledElement"]=o.calledElement,n(t,"calledElement",o.calledElement),o.name!==e.name&&(o.name=e.name),n(t,"config",JSON.stringify(o))},inspectorConfig:[{name:Jt[Qp],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-subprocess"},items:[{component:"FormInput",config:Ar},{component:Jp,config:{name:"config"}}]},qr,Ir]}]},th=n("345e"),nh=n.n(th),oh={extends:Fu,mixins:[Zr],data:function(){return{nodeIcon:nh.a,iconName:""}}},ih=oh,rh=ut(ih,Op,Dp,!1,null,null,null),ah=rh.exports,sh="processmaker-modeler-script-task",ch={id:sh,component:ah,bpmnType:"bpmn:ScriptTask",control:!1,category:"BPMN",icon:n("c3c6"),label:Jt[sh],definition:function(e,t){return e.create("bpmn:ScriptTask",{name:t(Jt[sh]),scriptRef:null,loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:fu,width:mu})})},inspectorConfig:[{name:Jt[sh],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-script-task"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},lh=Vt(Vt({},Pp),{},{id:"processmaker-modeler-service-task",bpmnType:["bpmn:ServiceTask","bpmn:SendTask","bpmn:ReceiveTask"],control:!1,label:"Service Task",definition:function(e,t){return e.create("bpmn:ServiceTask",{name:t("Service Task")})},inspectorConfig:[{name:"Service Task",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-service-task"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]}),dh=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},uh=[],ph=160,hh={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","paperManager","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he],data:function(){return{shape:null,definition:null,nodeWidth:10}},watch:{"node.definition.text":function(e){this.updateNodeText(e)}},methods:{getLabelHeight:function(e){return this.shape.findView(this.paperManager.paper).selectors.label.getBBox().height+e},calculateNewHeight:function(e,t,n){var o=3,i=15,r=this.getLabelHeight(i);return r!==e?r-o:0===t.length?n-o:e-o},updateNodeText:function(e){var t=this,n=this.shape.findView(this.paperManager.paper).getBBox(),o=n.height,i="25 ".concat(o," 3 ").concat(o," 3 3 25 3"),r=this.node.diagram.bounds;this.shape.position(r.x,r.y),this.shape.attr({body:{refPoints:i},label:{text:d["util"].breakText(e,{width:ph}),textAnchor:"left"}}),this.paperManager.awaitScheduledUpdates().then((function(){t.shape.resize(t.nodeWidth,t.calculateNewHeight(o,e,r.height)),t.setShapeHighlight()}))}},mounted:function(){var e=this.node.diagram.bounds;this.shape=new d["shapes"].standard.Polyline,this.shape.set("type","textAnnotation"),this.shape.position(e.x,e.y),this.shape.resize(this.nodeWidth,e.height),this.shape.attr({body:{refPoints:"25 10 3 10 3 3 25 3",fill:"none"},label:{fill:"black",yAlignment:"left",xAlignment:"left",refX:"5",refY:"5"}}),this.shape.addTo(this.graph),this.shape.component=this,this.updateNodeText(this.node.definition.get("text"))}},fh=hh,mh=ut(fh,dh,uh,!1,null,null,null),gh=mh.exports,vh="processmaker-modeler-text-annotation",bh={id:vh,component:gh,bpmnType:"bpmn:TextAnnotation",control:!0,category:"BPMN",icon:n("2ba8"),label:"Text Annotation",rank:70,definition:function(e,t){return e.create("bpmn:TextAnnotation",{text:t("Text Annotation")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:30,width:150})})},validateIncoming:function(){return!1},validateAssociationIncoming:function(){return!1},inspectorConfig:[{name:"Text Annotation",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-text-annotation"},items:[{component:"FormInput",config:{label:"Text to Show",helper:"Body of the text annotation",name:"text",placeholder:"Text Annotation"}}]},qr,Ir]}]},yh=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners),[t("add-lane-above-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"crown-config__icon",attrs:{title:e.$t("Lane Above")},on:{click:e.addLaneAbove}}),t("add-lane-below-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"crown-config__icon",attrs:{title:e.$t("Lane Below")},on:{click:e.addLaneBelow}})],1)},wh=[],xh=n("26a2"),kh=n.n(xh),Ch=30,Sh=200,Eh=300,Ah=20,Mh=300,Th=100,Ph={props:["highlighted","paper","processNode","planeElements","moddle"],data:function(){return{anchorPoints:[],isResizing:!0,pointWidth:15,pointHeight:15,elementBounds:[],elementTopY:null,elementRightX:null,elementBottomY:null,elementLeftX:null}},watch:{highlighted:function(e){0!==this.anchorPoints.length&&(e?(!1===ze.getters.isReadOnly&&this.addResizeAnchors(),this.calculateElementLimits(),this.updateAnchorPointPosition()):this.removeResizeAnchors())}},computed:{poolComponent:function(){return k()(this,"node.pool.component",this)},isLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{calculateElementLimits:function(){this.elementBounds=this.poolComponent.shape.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type!==rs&&"processmaker-modeler-message-flow"!==e.component.node.type})).map((function(e){return e.getBBox()})),this.elementTopY=Math.min.apply(Math,g(this.elementBounds.map((function(e){var t=e.y;return t-Ah})))),this.elementBottomY=Math.max.apply(Math,g(this.elementBounds.map((function(e){var t=e.y,n=e.height;return t+n+Ah})))),this.elementRightX=Math.max.apply(Math,g(this.elementBounds.map((function(e){var t=e.x,n=e.width;return t+n+Ah})))),this.elementLeftX=Math.min.apply(Math,g(this.elementBounds.map((function(e){var t=e.x;return t-Ah}))))},configureResize:function(){var e=this;this.shape.listenTo(this.paper,"element:pointerup",(function(t){t.model.component&&t.model.component===e&&e.calculateElementLimits()}));var t=new d["shapes"].standard.EmbeddedImage,n=new d["shapes"].standard.EmbeddedImage,o=new d["shapes"].standard.EmbeddedImage,i=new d["shapes"].standard.EmbeddedImage;this.anchorPoints=[t,n,o,i];var r=this.shape.getBBox(),a=r.x,s=r.y,c=r.width,l=r.height;this.anchorPoints.forEach((function(e){e.set("isDrag",!0),e.set("previousPosition",e.position())})),this.highlighted&&this.addResizeAnchors(),this.setPointAttributes(t,"nwse-resize","bottom-right-resize-button"),this.setPointAttributes(n,"nesw-resize","bottom-left-resize-button"),this.setPointAttributes(o,"nesw-resize","top-right-resize-button"),this.setPointAttributes(i,"nwse-resize","top-left-resize-button"),t.position(a+c,s+l),n.position(a-this.pointWidth,s+l),o.position(a+c,s-this.pointHeight),i.position(a-this.pointWidth,s-this.pointHeight),t.listenTo(this.paper,"element:pointerdown",(function(n){n.model===t&&(t.on("change:position",e.resizeBottomRight),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){t.off("change:position",e.resizeBottomRight),e.resizeUpdate()})))})),n.listenTo(this.paper,"element:pointerdown",(function(t){t.model===n&&(n.on("change:position",e.resizeBottomLeft),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){n.off("change:position",e.resizeBottomLeft),e.resizeUpdate()})))})),o.listenTo(this.paper,"element:pointerdown",(function(t){t.model===o&&(o.on("change:position",e.resizeTopRight),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){o.off("change:position",e.resizeTopRight),e.resizeUpdate()})))})),i.listenTo(this.paper,"element:pointerdown",(function(t){t.model===i&&(i.on("change:position",e.resizeTopLeft),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){i.off("change:position",e.resizeTopLeft),e.resizeUpdate()})))}))},fixResizeRounding:function(){var e=this.poolComponent.shape.getBBox(),t=e.x,n=e.y,o=e.width,i=e.height;this.poolComponent.shape.resize(Math.round(o),Math.round(i)),this.poolComponent.shape.position(Math.round(t),Math.round(n))},resizeUpdate:function(){this.fixResizeRounding();var e=this.shape.getBBox(),t=e.width,n=e.height,o=this.node.diagram.bounds;t===o.width&&n===o.height||(this.poolComponent.laneSet&&(this.poolComponent.updateLaneChildren(),this.poolComponent.sortedLanes().forEach((function(e){ze.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),ze.commit("updateNodeBounds",{node:this.poolComponent.node,bounds:this.poolComponent.shape.getBBox()}),this.$emit("save-state"))},resizeTopLeft:function(e,t,n){if(n.ui){var o="top-left",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var a=this.poolComponent.shape.getBBox(),s=a.x,c=a.y,l=a.width,d=a.height,u=this.shape.getBBox(),p=u.x,h=u.y,f=u.width,m=u.height,g=this.poolComponent.sortedLanes(),v=g.slice(1).reduce((function(e,t){return e+t.getBBox().height}),Th),b=Math.max(s+l-(i+this.pointWidth),s+l-this.elementLeftX+Ch,Eh),y=Math.max(c+d-(r+this.pointWidth),c+d-this.elementTopY,this.poolComponent.laneSet?v:Sh),w=Math.max(p+f-(i+this.pointWidth),p+f-this.elementLeftX+Ah+Ch,Mh),x=Math.max(h+m-(r+this.pointHeight),Th);if(this.isLane)if(this.shape===g[0]){var k=Math.max(s+l-(i+this.pointWidth)+Ch,s+l-this.elementLeftX+Ch,Eh);this.poolComponent.shape.resize(k,y,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes()}else{var C=g[g.indexOf(this.shape)-1];this.shape.resize(w,Math.min(h+m-(C.getBBox().y+Th),x),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else e.set("previousPosition",{x:i,y:r}),this.shape.resize(b,y,{direction:o}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeTopRight:function(e,t,n){if(n.ui){var o="top-right",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var a=this.poolComponent.shape.getBBox(),s=a.x,c=a.y,l=a.height,d=this.shape.getBBox(),u=d.x,p=d.y,h=d.height,f=this.poolComponent.sortedLanes(),m=f.slice(1).reduce((function(e,t){return e+t.getBBox().height}),Th),g=Math.max(i-s,this.elementRightX-s,Eh),v=Math.max(c+l-(r+this.pointWidth),c+l-this.elementTopY,this.poolComponent.laneSet?m:Sh),b=Math.max(i-u,this.elementRightX-u,Mh),y=Math.max(p+h-(r+this.pointHeight),Th);if(this.isLane)if(this.shape===f[0])this.poolComponent.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes();else{var w=f[f.indexOf(this.shape)-1];this.shape.resize(b,Math.min(p+h-(w.getBBox().y+Th),y),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeBottomLeft:function(e,t,n){if(n.ui){var o="bottom-left",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var a=this.poolComponent.shape.getBBox(),s=a.x,c=a.y,l=a.width,d=this.shape.getBBox(),u=d.x,p=d.y,h=d.width,f=this.poolComponent.sortedLanes(),m=f.slice(0,f.length-1).reduce((function(e,t){return e+t.getBBox().height}),Th),g=Math.max(s+l-(i+this.pointWidth),s+l-this.elementLeftX+Ch,Eh),v=Math.max(r-c,this.elementBottomY-c,this.poolComponent.laneSet?m:Sh),b=Math.max(u+h-(i+this.pointWidth),u+h-this.elementLeftX+Ah+Ch,Mh),y=Math.max(r-p,Th);if(this.isLane)if(this.shape===f[f.length-1]){var w=Math.max(s+l-(i+this.pointWidth)+Ch,s+l-this.elementLeftX+Ch,Eh);this.poolComponent.shape.resize(w,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes()}else{var x=f[f.indexOf(this.shape)+1];this.shape.resize(b,Math.min(x.getBBox().y+x.getBBox().height-Th-p,y),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeBottomRight:function(e,t,n){if(n.ui){var o="bottom-right",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var a=this.poolComponent.shape.getBBox(),s=a.x,c=a.y,l=this.shape.getBBox(),d=l.x,u=l.y,p=this.poolComponent.sortedLanes(),h=p.slice(0,p.length-1).reduce((function(e,t){return e+t.getBBox().height}),Th),f=Math.max(i-s,this.elementRightX-s,Eh),m=Math.max(r-c,this.elementBottomY-c,this.poolComponent.laneSet?h:Sh),g=Math.max(i-d,this.elementRightX-d,Mh),v=Math.max(r-u,Th);if(this.isLane)if(this.shape===p[p.length-1])this.poolComponent.shape.resize(f,m,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes();else{var b=p[p.indexOf(this.shape)+1];this.shape.resize(g,Math.min(b.getBBox().y+b.getBBox().height-Th-u,v),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(f,m,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},addResizeAnchors:function(){var e=this;this.anchorPoints.forEach((function(t){try{e.shape.embed(t)}catch(n){}t.addTo(e.graph),t.toFront()}))},removeResizeAnchors:function(){this.anchorPoints.forEach((function(e){e.remove()}))},updateAnchorPointPosition:function(e){if(0!==this.anchorPoints.length){var t=this.shape.getBBox(),n=t.x,o=t.y,i=t.width,r=t.height;0!==e&&this.anchorPoints[0].position(n+i,o+r),1!==e&&this.anchorPoints[1].position(n-this.pointWidth,o+r),2!==e&&this.anchorPoints[2].position(n+i,o-this.pointHeight),3!==e&&this.anchorPoints[3].position(n-this.pointWidth,o-this.pointWidth)}},setPointAttributes:function(e,t,n){e.attr({body:{fill:"#fff",stroke:" #fff",opacity:.8},image:{xlinkHref:kh.a,cursor:t,buttonId:n,refWidth:20,refHeight:20,resetOffset:!0}})}},mounted:function(){var e=this;this.$nextTick((function(){e.configureResize()}))}},_h=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Oh=[],Dh={components:{CrownConfig:Mi},props:["graph","node","nodes","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,Ph],data:function(){return{shape:null,definition:null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new d["shapes"].standard.Rectangle,this.shape.set("type","PoolLane");var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.set("elementMove",!1),this.shape.attr("body/cursor","default"),this.shape.attr("body",{fill:B}),this.shape.attr("label",{text:d["util"].breakText(this.node.definition.get("name"),{width:e.height}),fill:"black",transform:"rotate(-90)",refX:Ch/2}),this.shape.component=this,this.shape.addTo(this.graph),this.planeElements.includes(this.node.diagram)||this.planeElements.push(this.node.diagram)},beforeDestroy:function(){var e=this.node.pool.component,t=e.laneSet.get("lanes");if(ki()(t,this.node.definition),0===t.length)return e.containingProcess.set("laneSets",[]),void(e.laneSet=null)}},Ih=Dh,Nh=ut(Ih,_h,Oh,!1,null,null,null),Rh=Nh.exports,jh={id:rs,component:Rh,bpmnType:"bpmn:Lane",control:!1,category:"BPMN",label:"Lane",definition:function(e){return e.create("bpmn:Lane",{name:""})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:150,width:600,x:null,y:null})})},inspectorConfig:[{name:"Lane",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-pool-lane"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Lh=function(){var e=this,t=e._self._c;return t("crown-button",e._g({attrs:{id:"lane-above-button","aria-label":"Add lane above icon",width:25}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-lane-above"]}})],1)},Bh=[],Fh=n("b6e5"),zh=n.n(Fh),Hh={components:{CrownButton:ht,FontAwesomeIcon:xn["FontAwesomeIcon"]},data:function(){return{laneAboveIcon:zh.a}},created:function(){cn["library"].add(un)}},qh=Hh,Vh=ut(qh,Lh,Bh,!1,null,null,null),Uh=Vh.exports,Gh=function(){var e=this,t=e._self._c;return t("crown-button",e._g({attrs:{id:"lane-below-button","aria-label":"Add lane below icon",width:25}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-lane-below"]}})],1)},Wh=[],$h=n("0424"),Xh=n.n($h),Yh={components:{CrownButton:ht,FontAwesomeIcon:xn["FontAwesomeIcon"]},data:function(){return{laneBelowIcon:Xh.a}},created:function(){cn["library"].add(pn)}},Zh=Yh,Kh=ut(Zh,Gh,Wh,!1,null,null,null),Jh=Kh.exports,Qh=d["shapes"].standard.Rectangle.define("processmaker.modeler.bpmn.pool",{markup:[].concat(g(d["shapes"].standard.Rectangle.prototype.markup),[{tagName:"polyline",selector:"polyline"}]),attrs:{label:{fill:"black",transform:"rotate(-90)",refX:Ch/2},polyline:{refPointsKeepOffset:"".concat(Ch,",0 ").concat(Ch,",200"),stroke:"#000",fill:"#fff",strokeWidth:2}}}),ef=Qh,tf=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},nf=[],of={inheritAttrs:!1,components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,Bi,he],data:function(){return{shape:null,definition:null,dropdownData:[]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new d["shapes"].standard.Path,this.shape.attr("root/title","joint.shapes.standard.Path"),this.shape.attr("label",{refY:65,text:this.node.definition.get("name"),fill:"black"}),this.shape.attr("body",{refD:"M1,1 L25,1 L35,10 L35,49 L1,49 L1,1 M24,1 L24,10 L35,10"});var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.addTo(this.graph),this.shape.component=this}},rf=of,af=ut(rf,tf,nf,!1,null,null,null),sf=af.exports,cf="processmaker-modeler-data-object",lf={id:cf,component:sf,bpmnType:"bpmn:DataObjectReference",control:!0,category:"BPMN",icon:n("82c7"),label:Jt[cf],rank:80,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataObjectReference",{name:t(Jt[cf])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:36})})},inspectorConfig:[{name:Jt[cf],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-object"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},df=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},uf=[],pf=d["shapes"].standard.Cylinder.extend({markup:[].concat(g(d["shapes"].standard.Cylinder.prototype.markup),[{tagName:"ellipse",selector:"thirdLine"},{tagName:"ellipse",selector:"secondLine"},{tagName:"ellipse",selector:"firstLine"}]),defaults:d["util"].deepSupplement({attrs:{thirdLine:{refCx:"50%",refRx:"50%",cy:20,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},secondLine:{refCx:"50%",refRx:"50%",cy:15,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},firstLine:{refCx:"50%",refRx:"50%",cy:10,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},label:{refY:50,fill:"#000"}}},d["shapes"].standard.Cylinder.prototype.defaults)}),hf={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,Bi,he],data:function(){return{shape:null,definition:null,dropdownData:[]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new pf,this.shape.attr("label/text",this.node.definition.get("name"));var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.addTo(this.graph),this.shape.component=this}},ff=hf,mf=ut(ff,df,uf,!1,null,null,null),gf=mf.exports,vf="processmaker-modeler-data-store",bf={id:vf,component:gf,bpmnType:"bpmn:DataStoreReference",control:!0,category:"BPMN",icon:n("44ad2"),label:Jt[vf],rank:90,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataStoreReference",{name:t(Jt[vf])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:50})})},inspectorConfig:[{name:Jt[vf],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-store"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]};function yf(e,t){var n=new ef,o=e.diagram.bounds;return n.position(o.x,o.y),n.resize(o.width,o.height),n.attr("label/text",d["util"].breakText(e.definition.get("name"),{width:o.width})),n.attr("body",{fill:B}),n.addTo(t),n}function wf(e,t){e.getElements().filter((function(e){return e!==t})).filter((function(e){var t=e.component;return!t.node.isBpmnType("bpmn:BoundaryEvent")})).forEach((function(e){var n=e.component;t.embed(n.shape),n.node.pool=t}))}function xf(e,t){e.fitEmbeds({padding:Ah+Ch}),e.resize(e.getBBox().width-Ch,e.getBBox().height-Ch),e.resize(e.getBBox().width,e.getBBox().height-Ch,{direction:"top"});var n=e.get("size"),o=n.width,i=n.height,r=t.diagram.bounds;e.resize(Math.max(o,r.width),Math.max(i,r.height))}function kf(e,t,n){var o=yf(t,n);return e||(wf(n,o),xf(o,t)),o}function Cf(e){return e.component&&e.component.node.type!==rs&&e.component.node.type!==vh&&e.component.node.type!==cf&&e.component.node.type!==vf}var Sf={components:{CrownConfig:Mi,AddLaneAboveButton:Uh,AddLaneBelowButton:Jh},props:["graph","node","nodes","id","collaboration","processes","moddle","processNode","rootElements","highlighted","nodeRegistry","paper","planeElements","isRendering","paperManager","nodeIdGenerator"],mixins:[wr,Ph,he],data:function(){return{shape:null,definition:null,laneSet:null,isAddingLaneAbove:!1,anchorPointFunction:Ce(20)}},computed:{containingProcess:function(){var e=this;return this.node.definition.get("processRef")?this.processes.find((function(t){return t.id===e.node.definition.get("processRef").id})):null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},methods:{addLaneAbove:function(){this.isAddingLaneAbove=!0,this.addLane()},addLaneBelow:function(){this.isAddingLaneAbove=!1,this.addLane()},sortedLanes:function(){return this.shape.getEmbeddedCells().filter((function(e){var t=e.component;return t&&t.node.type===rs})).sort((function(e,t){return e.position().y-t.position().y}))},getElementsUnderArea:function(e,t){var n=e.getBBox(),o=n.x,i=n.y,r=n.width,a=n.height,s={x:o,y:i,width:r,height:a};return t.findModelsInArea(s)},moveEmbeddedElements:function(e,t){var n=this;this.getElementsUnderArea(e,this.graph).filter((function(t){return t.isEmbeddedIn(e)})).forEach((function(e){e.component.node.pool=t,ki()(n.containingProcess.get("flowElements"),e.component.node.definition),t.component.containingProcess.get("flowElements").push(e.component.node.definition)}))},moveFlow:function(e,t){var n=e.component.node.definition;ki()(this.containingProcess.get("flowElements"),n),t.component.containingProcess.get("flowElements").push(n)},moveElement:function(e,t){var n=e.component.node.definition;if(this.laneSet){var o=this.laneSet.get("lanes").find((function(e){return e.get("flowNodeRef").includes(n)}));ki()(o.get("flowNodeRef"),n)}ki()(this.containingProcess.get("flowElements"),n),t.component.containingProcess.get("flowElements").push(n),this.moveEmbeddedElements(e,t),e.component.node.pool=t,this.shape.unembed(e),t.component.addToPool(e)},addLane:function(){var e=this;return w(b().mark((function t(){var n,o;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=[],e.laneSet||(e.createLaneSet(),o=jh.definition(e.moddle,e.$t),e.shape.getEmbeddedCells().filter((function(e){return Cf(e)})).forEach((function(e){o.get("flowNodeRef").push(e.component.node.definition)})),n.push(e.pushNewLane(o))),n.push(e.pushNewLane()),t.next=5,Promise.all(n);case 5:e.$emit("set-shape-stacking",e.shape),e.graph.getLinks().forEach((function(t){e.$emit("set-shape-stacking",t)})),e.$emit("save-state");case 8:case"end":return t.stop()}}),t)})))()},createLaneSet:function(){var e=this.moddle.create("bpmn:LaneSet");this.laneSet=e;var t=this.nodeIdGenerator,n=t.generate(),o=_e(n,1),i=o[0];this.laneSet.set("id",i),this.containingProcess.get("laneSets").push(e)},pushNewLane:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jh.definition(this.moddle,this.$t);e.set("color",this.node.definition.get("color")),this.$emit("set-pool-target",this.shape);var t=jh.diagram(this.moddle);return t.bounds.width=this.shape.getBBox().width,this.$emit("add-node",new an(jh.id,e,t)),this.$nextTick()},addToPool:function(e){e.component.node.isBpmnType("bpmn:BoundaryEvent")||(this.shape.unembed(e),this.shape.embed(e),this.expandToFitElement(e,this.shape),e.component.node.type!==rs&&this.laneSet&&this.updateLaneChildren())},positionAndSizeLane:function(e,t){var n=t.getBBox(),o=n.width,i=n.height,r=e.component.node.diagram.bounds;if(!r.x||!r.y){var a=1===t.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type===rs})).length,s=a?i:r.height;e.resize(o-Ch,s),e.position(Ch,a?0:this.isAddingLaneAbove?-s:i,{parentRelative:!0}),t.resize(o,a?i:i+s,{direction:this.isAddingLaneAbove?"top-right":"bottom-right"}),this.fixResizeRounding(),this.updateAnchorPointPosition();var c=e.position(),l=c.x,d=c.y;r.set("x",l),r.set("y",d),r.set("width",e.get("size").width),r.set("height",e.get("size").height),ze.commit("updateNodeBounds",{node:this.node,bounds:t.getBBox()})}},expandToFitElement:function(e,t){if(e.component.node.type!==ws){var n=t.getBBox(),o=n.x,i=n.y,r=n.width,a=n.height;if(e.component.node.type!==rs){var s=e.get("size"),c=s.width,l=s.height,d=e.position(),u=d.x,p=d.y,h=u-o,f=p-i,m=h+c,g=h,v=f,b=f+l,y=0,w=0,x="bottom",k="right";m>r-Ah&&(y=m+Ah),g<Ch+Ah&&(y=r+(Ch+Ah-g),k="left"),v<Ah&&(w=Ah-v+a,x="top"),b>a-Ah&&(w=b+Ah),(y||w)&&(t.resize(Math.max(y,r),Math.max(w,a),{direction:"".concat(x,"-").concat(k)}),this.fixResizeRounding(),this.updateAnchorPointPosition(),this.laneSet&&(this.resizeLanes(),this.sortedLanes().forEach((function(e){ze.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),ze.commit("updateNodeBounds",{node:this.node,bounds:t.getBBox()}),this.$emit("save-state"))}else this.positionAndSizeLane(e,t)}},fillLanes:function(e,t,n){var o,i=this.shape.get("size").height,r=this.sortedLanes().reduce((function(e,t){return e+t.getBBox().height}),0),a=n?e.get("size").height:i-r;switch(t){case"top-right":o="bottom-right";break;case"top-left":o="bottom-left";break;case"bottom-right":o="top-right";break;case"bottom-left":o="top-left";break}var s=this.sortedLanes().indexOf(e),c=e.getBBox(),l=c.width,d=this.sortedLanes()[s+(t.includes("top")?-1:1)];d.resize(l,d.getBBox().height+a,{direction:o}),this.shape.resize(l+Ch,i,{direction:o}),this.sortedLanes().forEach((function(e){return e.resize(l,e.getBBox().height,{direction:o})}))},resizeLanes:function(){var e=this;this.sortedLanes().forEach((function(t,n,o){var i=e.shape.get("size"),r=i.width,a=i.height,s=t.get("size"),c=s.height,l=t.position({parentRelative:!0}),d=l.y,u=c,p=d;if(0===n&&(u=c+t.position({parentRelative:!0}).y,p=0),n===o.length-1){var h=a-(t.position({parentRelative:!0}).y+c);u=c+h}t.resize(r-Ch,u),t.position(Ch,p,{parentRelative:!0})}))},captureChildren:function(){var e=this;this.graph.getElements().filter((function(t){var n=t.component;return n&&n!==e})).forEach((function(t){var n=t.component;n.node.isBpmnType("bpmn:BoundaryEvent")||(e.shape.embed(n.shape),n.node.pool=e.shape)})),this.$emit("set-shape-stacking",this.shape),this.resizePool(this.shape)},fitEmbeds:function(){this.shape.fitEmbeds({padding:Ah+Ch}),this.shape.resize(this.shape.getBBox().width-Ch,this.shape.getBBox().height-Ch),this.shape.resize(this.shape.getBBox().width,this.shape.getBBox().height-Ch,{direction:"top"})},resizePool:function(e){var t=this;this.fitEmbeds();var n=this.shape.get("size"),o=n.width,i=n.height,r=this.node.diagram.bounds;this.shape.resize(Math.max(o,r.width),Math.max(i,r.height)),this.shape.getEmbeddedCells().forEach((function(n){t.expandToFitElement(n,e)}));var a=this.shape.position(),s=a.x,c=a.y,l=this.shape.get("size"),d=l.width,u=l.height;this.node.diagram.bounds.x=s,this.node.diagram.bounds.y=c,this.node.diagram.bounds.width=d,this.node.diagram.bounds.height=u},updateLaneChildren:function(){var e=this,t={};this.shape.getEmbeddedCells().filter((function(t){return Cf(t)&&t.component.node.pool===e.shape})).forEach((function(n){var o=e.graph.findModelsUnderElement(n,{searchBy:"center"}).find((function(e){return e.component&&e.component.node.type===rs}));t[o.id]?t[o.id].push(n.component.node.definition):t[o.id]=[n.component.node.definition]})),this.sortedLanes().forEach((function(e){var n=t[e.id],o=e.component.node.definition.get("flowNodeRef"),i=n?n.length!==o.length:o.length>0;i&&ze.commit("updateNodeProp",{node:e.component.node,key:"flowNodeRef",value:n||[]})}))},hasPools:function(){return this.collaboration.get("participants").length>0},setPoolSize:function(e){var t=this;e.getEmbeddedCells().forEach((function(n){t.expandToFitElement(n,e)}));var n=e.position(),o=n.x,i=n.y,r=e.get("size"),a=r.width,s=r.height;this.node.diagram.bounds.x=o,this.node.diagram.bounds.y=i,this.node.diagram.bounds.width=a,this.node.diagram.bounds.height=s}},mounted:function(){this.$emit("set-pools",this.node.definition),this.laneSet=this.containingProcess.get("laneSets")[0],this.shape=kf(this.collaboration,this.node,this.graph),this.shape.component=this,this.collaboration||this.captureChildren(),this.setPoolSize(this.shape),this.$emit("set-shape-stacking",this.shape)},beforeDestroy:function(){var e=this.collaboration.get("participants");ki()(e,this.node.definition),this.hasPools()?ki()(this.rootElements,this.containingProcess):this.$emit("unset-pools")},created:function(){this.$t=this.$t.bind(this)}},Ef=Sf,Af=ut(Ef,yh,wh,!1,null,null,null),Mf=Af.exports,Tf={id:Un,component:Mf,bpmnType:"bpmn:Participant",control:!0,category:"BPMN",icon:n("cc6d"),label:"Pool",rank:60,definition:function(e,t){return e.create("bpmn:Participant",{name:t("Pool")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:300,width:600})})},inspectorConfig:[{name:"Pool",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-pool"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Pf=function(){var e=this,t=e._self._c;return t("b-card-footer",{staticClass:"p-0 border-0 statusbar d-flex align-items-center justify-content-end pr-3 pl-3 border-top"},[e._t("default"),t("b-btn",{staticClass:"mr-auto",attrs:{disabled:!e.xmlManager,variant:"secondary",size:"sm","data-test":"downloadXMLBtn"},on:{click:function(t){e.xmlManager&&e.xmlManager.download()}}},[t("i",{staticClass:"fas fa-download mr-1"}),e._v(" "+e._s(e.$t("Download BPMN"))+" ")]),t("div",{staticClass:"status-bar-container d-flex align-items-center justify-content-end"},[e.autoValidate?[0===e.numberOfProblemsToDisplay?t("button",{staticClass:"btn btn-light",attrs:{type:"button","data-test":"validation-list-valid",disabled:!0}},[e._v(" "+e._s(e.$t("BPMN Valid"))+" "),t("span",{staticClass:"badge badge-success badge-pill"},[t("font-awesome-icon",{attrs:{icon:e.faCheck}})],1)]):t("button",{staticClass:"btn btn-light",attrs:{type:"button","data-test":"validation-list-toggle"},on:{click:function(t){e.shouldDisplayProblemsPanel=!e.shouldDisplayProblemsPanel}}},[e._v(" "+e._s(e.$t("BPMN Issues"))+" "),t("span",{staticClass:"badge badge-primary badge-pill"},[e._v(" "+e._s(e.numberOfProblemsToDisplay)+" ")]),t("font-awesome-icon",{staticClass:"ml-3",attrs:{icon:e.chevronIcon}})],1)]:e._e(),t("span",{staticClass:"divider"}),t("b-form-checkbox",{staticClass:"h-100 d-flex align-items-center",attrs:{"data-test":"validation-toggle",switch:""},model:{value:e.autoValidate,callback:function(t){e.autoValidate=t},expression:"autoValidate"}},[e._v(" "+e._s(e.$t("Auto validate"))+" ")]),t("transition",{attrs:{name:"slide"}},[e.isProblemsPanelDisplayed?t("div",{staticClass:"validation-container position-absolute text-left"},[t("dl",{staticClass:"validation-container__list align-items-baseline",attrs:{"data-test":"validation-list"}},[e._l(e.errorList,(function(n,o){return[t("dt",{key:"".concat(n.errorId,"_").concat(o),staticClass:"text-capitalize"},[t("font-awesome-icon",{staticClass:"status-bar-container__status-icon ml-1 mr-1 mt-1",style:{color:e.isErrorCategory(n)?e.errorColor:e.warningColor},attrs:{icon:e.isErrorCategory(n)?e.faTimesCircle:e.faExclamationTriangle}}),e._v(" "+e._s(n.errorKey)+" ")],1),t("dd",{key:"".concat(n.errorId,"_").concat(o,"_dd")},[t("p",{staticClass:"pl-4 mb-0 font-italic"},[e._v(e._s(n.message)+".")]),n.id?t("p",{staticClass:"pl-4 mb-0"},[t("span",{staticClass:"font-weight-bold"},[e._v(e._s(e.$t("Node ID"))+":")]),e._v(" "+e._s(n.id))]):e._e()])]})),e._l(e.warnings,(function(n,o){return[t("dt",{key:n.title+o,staticClass:"text-capitalize"},[t("font-awesome-icon",{staticClass:"status-bar-container__status-icon ml-1 mr-1 mt-1",style:{color:e.warningColor},attrs:{icon:e.faExclamationTriangle}}),e._v(" "+e._s(n.title)+" ")],1),t("dd",{key:n.title+o+"__dd",staticClass:"font-italic pl-4"},[e._v(e._s(n.text))])]}))],2)]):e._e()])],2)],2)},_f=[];n("5db7"),n("73d9");function Of(e){return Object.entries(e).flatMap((function(e){var t=_e(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return Vt(Vt({},e),{},{errorKey:n},{errorId:"".concat(e.id,"_").concat(e.message.split(" ").join("_"))})}))}))}var Df={components:{FontAwesomeIcon:xn["FontAwesomeIcon"]},props:["validationErrors","warnings","xmlManager"],data:function(){return{shouldDisplayProblemsPanel:!1,errorColor:"#D9534F",warningColor:"#F0AD4E",faExclamationTriangle:oi["faExclamationTriangle"],faTimesCircle:oi["faTimesCircle"],faChevronUp:oi["faChevronUp"],faChevronDown:oi["faChevronDown"],faCheck:oi["faCheck"]}},computed:{autoValidate:{get:function(){return ze.getters.autoValidate},set:function(e){ze.commit("setAutoValidate",e)}},errorList:function(){return Of(this.validationErrors)},numberOfProblemsToDisplay:function(){return this.errorList.length+this.warnings.length},isProblemsPanelDisplayed:function(){return this.shouldDisplayProblemsPanel&&this.numberOfProblemsToDisplay>0&&this.autoValidate},chevronIcon:function(){return this.shouldDisplayProblemsPanel?oi["faChevronUp"]:oi["faChevronDown"]}},methods:{isErrorCategory:function(e){return"error"===e.category}}},If=Df,Nf=(n("2dba"),ut(If,Pf,_f,!1,null,"1ad192c7",null)),Rf=Nf.exports,jf=function(){var e=this,t=e._self._c;return t("span",{attrs:{"data-test":"body-container"}},[e.showComponent?t("tool-bar",{attrs:{"canvas-drag-position":e.canvasDragPosition,cursor:e.cursor,"is-rendering":e.isRendering,"paper-manager":e.paperManager,"breadcrumb-data":e.breadcrumbData,panelsCompressed:e.panelsCompressed,"validation-errors":e.validationErrors,warnings:e.allWarnings,"xml-manager":e.xmlManager,validationBar:e.validationBar},on:{"load-xml":e.loadXML,"toggle-panels-compressed":function(t){e.panelsCompressed=!e.panelsCompressed},"toggle-mini-map-open":function(t){e.miniMapOpen=t},saveBpmn:e.saveBpmn,publishTemplate:e.publishTemplate,publishPmBlock:e.publishPmBlock,close:e.close,"save-state":e.pushToUndoStack,clearSelection:e.clearSelection}}):e._e(),t("b-row",{staticClass:"modeler h-100"},[e.tooltipTarget?t("b-tooltip",{key:e.tooltipTarget.id,attrs:{target:e.getTooltipTarget,title:e.tooltipTitle}}):e._e(),e.showComponent?t("explorer-rail",{attrs:{"node-types":e.nodeTypes,"pm-block-nodes":e.pmBlockNodes},on:{"set-cursor":function(t){e.cursor=t},onCreateElement:e.onCreateElementHandler}}):e._e(),t("b-col",{ref:"paper-container",staticClass:"paper-container h-100 pr-4",class:[e.cursor,{"grabbing-cursor":e.isGrabbing}],style:{width:e.parentWidth,height:e.parentHeight}},[t("div",{ref:"paper",staticClass:"main-paper",attrs:{"data-test":"paper"}})]),e.showComponent?t("InspectorButton",{attrs:{showInspector:e.isOpenInspector},on:{toggleInspector:e.handleToggleInspector}}):e._e(),e.showComponent?t("InspectorPanel",{directives:[{name:"show",rawName:"v-show",value:e.isOpenInspector&&!(e.highlightedNodes.length>1),expression:"isOpenInspector && !(highlightedNodes.length > 1)"}],ref:"inspector-panel",staticClass:"inspector h-100",style:{height:e.parentHeight},attrs:{nodeRegistry:e.nodeRegistry,moddle:e.moddle,definitions:e.definitions,processNode:e.processNode,"parent-height":e.parentHeight,"canvas-drag-position":e.canvasDragPosition},on:{"save-state":e.pushToUndoStack,"shape-resize":function(t){return e.shapeResize(!1)},toggleInspector:e.handleToggleInspector}}):e._e(),e._l(e.nodes,(function(n){return t(n.type,{key:n._modelerId,ref:"nodeComponent",refInFor:!0,tag:"component",attrs:{graph:e.graph,paper:e.paper,node:n,id:n.id,highlighted:e.highlightedNodes.includes(n),"has-error":e.invalidNodes.includes(n),"border-outline":e.borderOutline(n.id),collaboration:e.collaboration,"process-node":e.processNode,processes:e.processes,"plane-elements":e.planeElements,moddle:e.moddle,nodeRegistry:e.nodeRegistry,"root-elements":e.definitions.get("rootElements"),isRendering:e.isRendering,paperManager:e.paperManager,"auto-validate":e.autoValidate,"node-id-generator":e.nodeIdGenerator,"is-active":n===e.activeNode,"is-completed":e.requestCompletedNodes.includes(n.definition.id),"is-in-progress":e.requestInProgressNodes.includes(n.definition.id),"is-idle":e.requestIdleNodes.includes(n.definition.id)},on:{"add-node":e.addNode,"remove-node":e.removeNode,"set-cursor":function(t){e.cursor=t},"set-pool-target":function(t){e.poolTarget=t},"unset-pools":e.unsetPools,clearSelection:e.clearSelection,"set-pools":e.setPools,"save-state":e.pushToUndoStack,"set-shape-stacking":e.setShapeStacking,setTooltip:function(t){e.tooltipTarget=t},"replace-node":e.replaceNode,"replace-generic-flow":e.replaceGenericFlow,"copy-element":e.copyElement,"copy-selection":e.copyElement,"paste-element":e.pasteElements,"clone-element":e.cloneElement,"clone-selection":e.cloneSelection,"default-flow":e.toggleDefaultFlow,"shape-resize":e.shapeResize}})})),t("RailBottom",{attrs:{nodeTypes:e.nodeTypes,"paper-manager":e.paperManager,graph:e.graph,"is-rendering":e.isRendering},on:{"load-xml":e.loadXML,clearSelection:e.clearSelection,"set-cursor":function(t){e.cursor=t},onCreateElement:e.onCreateElementHandler}}),e.paper?t("selection",{ref:"selector",attrs:{graph:e.graph,paperManager:e.paperManager,useModelGeometry:!1,processNode:e.processNode},on:{"clone-selection":e.cloneSelection,"remove-nodes":e.removeNodes,"save-state":e.pushToUndoStack}}):e._e()],2)],1)},Lf=[],Bf=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Ff=[],zf=d["shapes"].standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"}],defaults:d["util"].deepSupplement({type:"processmaker.components.nodes.boundaryEvent.Shape",size:{width:36,height:36},attrs:{label:{refY:"130%"},body:{stroke:"#212529",strokeWidth:.85,fill:"#FFF"},body2:{cx:18,cy:18,r:15,strokeWidth:.85,stroke:"#212529",fill:"#FFF"},image:{refX:5,refY:5,ref:"circle",width:26,height:26}}},d["shapes"].standard.Circle.prototype.defaults)}),Hf={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","isActive"],mixins:[wr,he,Bi],data:function(){return{shape:null,previousPosition:null,validPosition:null,invalidTargetElement:null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)},"node.definition.cancelActivity":function(e){this.toggleInterruptingStyle(e)}},methods:{getTaskUnderShape:function(){return this.graph.findModelsUnderElement(this.shape).find((function(e){return Po(e.component)}))},setShapeBorderDashSpacing:function(e){this.shape.attr({body:{strokeDasharray:e},body2:{strokeDasharray:e}})},setSolidShapeBorder:function(){var e=0;this.setShapeBorderDashSpacing(e)},setDashedShapeBorder:function(){var e=5;this.setShapeBorderDashSpacing(e)},toggleInterruptingStyle:function(){this.node.definition.cancelActivity?this.setSolidShapeBorder():this.setDashedShapeBorder()},setShapeProperties:function(){var e=this.node.diagram.bounds,t=e.x,n=e.y,o=e.width,i=e.height;this.shape.position(t,n),this.shape.resize(o,i),this.shape.attr("label/text",this.node.definition.get("name")),this.shape.component=this},hasPositionChanged:function(){if(!this.previousPosition)return!0;var e=this.shape.position(),t=e.x,n=e.y,o=this.previousPosition,i=o.x,r=o.y;return t!==i||n!==r},getCenterPosition:function(){var e=this.shape.position(),t=e.x,n=e.y,o=this.shape.size(),i=o.width,r=o.height;return{x:t+i/2,y:n+r/2}},updateShapePosition:function(e){if(this.hasPositionChanged()){var t=we(this.getCenterPosition(),e),n=t.x,o=t.y,i=this.shape.size(),r=i.width,a=i.height;this.shape.position(n-r/2,o-a/2),this.previousPosition=this.shape.position()}},attachBoundaryEventToTask:function(e){if(e){var t=this.shape.getParentCell();t&&t.unembed(this.shape),e.embed(this.shape),this.node.definition.set("attachedToRef",e.component.node.definition)}},resetToInitialPosition:function(){this.shape.position(this.validPosition.x,this.validPosition.y),ze.commit("allowSavingElementPosition"),this.$emit("shape-resize")},moveBoundaryEventIfOverTask:function(){var e=this.getTaskUnderShape();_o(this.node.type,e)?(this.attachBoundaryEventToTask(e),this.updateShapePosition(e),this.$emit("shape-resize")):this.resetToInitialPosition()},resetInvalidTarget:function(){this.invalidTargetElement&&(Ae(this.invalidTargetElement),this.invalidTargetElement=null,this.$emit("shape-resize"))},attachToValidTarget:function(e){var t=this;e.model===this.shape&&(ze.commit("preventSavingElementPosition"),this.validPosition=this.shape.position(),this.shape.listenToOnce(this.paper,"cell:pointerup blank:pointerup",(function(){t.moveBoundaryEventIfOverTask(),t.resetInvalidTarget(),ze.commit("allowSavingElementPosition")})))},turnInvalidTargetRed:function(){if(this.isActive){var e=this.graph.findModelsUnderElement(this.shape).filter((function(e){return e.component}))[0],t=this.invalidTargetElement===e;if(!t){var n=this.shape.getParentCell();e&&e!==n&&!_o(this.node.type,e)&&e.attr("body/fill",P),this.invalidTargetElement&&Ae(this.invalidTargetElement),this.invalidTargetElement=e}}}},mounted:function(){var e=this;return w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.shape=new zf,e.setShapeProperties(),e.shape.addTo(e.graph),t.next=5,e.$nextTick();case 5:e.toggleInterruptingStyle(),n=e.getTaskUnderShape(),e.attachBoundaryEventToTask(n),e.updateShapePosition(n);case 9:case"end":return t.stop()}}),t)})))()}},qf=Hf,Vf=ut(qf,Bf,Ff,!1,null,null,null),Uf=Vf.exports,Gf={id:"processmaker-modeler-boundary-event",component:Uf,bpmnType:"bpmn:BoundaryEvent",control:!0,category:"BPMN",label:"Boundary Event",definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Event"),cancelActivity:!0})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},validateIncoming:function(){return!1},inspectorConfig:[{name:"Boundary Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-boundary-event"},items:[{component:"FormInput",config:Ar}]}]}]},Wf=n("f2e1"),$f=n.n(Wf),Xf=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.explorerOpen,expression:"explorerOpen"}],attrs:{id:"explorer-rail","data-test":"explorer-rail"}},[t("div",{staticClass:"rail-menu"},[t("b-tabs",{staticClass:"tabs--container",attrs:{"no-nav-style":!0}},[e._l(e.tabs,(function(n){return[t("b-tab",{key:n.idx,attrs:{title:e.$t(n.label),active:n.idx===e.tabIndex},on:{click:function(t){return e.setTabIndex(n.idx)}}})]}))],2),t("div",{staticClass:"close--container",on:{click:function(t){return e.closeRail()}}},[t("font-awesome-icon",{attrs:{icon:e.faTimes()}})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:0===e.tabIndex,expression:"tabIndex === 0"}],staticClass:"node-types__container"},[t("filter-node-types",{attrs:{type:"object"}}),t("node-types-loop",e._g({},e.$listeners))],1),t("div",{directives:[{name:"show",rawName:"v-show",value:1===e.tabIndex,expression:"tabIndex === 1"}],staticClass:"pm-blocks__container"},[t("filter-node-types",{attrs:{type:"pmBlock"}}),t("pm-blocks-loop",e._g({},e.$listeners))],1)])},Yf=[],Zf=5e3;De.a.use(Ie["a"]);var Kf=new Ie["a"].Store({state:{nodeTypes:[],pinnedNodeTypes:[],filteredNodeTypes:[],pmBlockNodeTypes:[],filteredPmBlockNodeTypes:[],explorerOpen:!1,searchTerm:"",selectedNode:null,ghostNode:null},getters:{getNodeTypes:function(e){return e.nodeTypes},getPinnedNodeTypes:function(e){return e.pinnedNodeTypes},getFilteredNodeTypes:function(e){return e.filteredNodeTypes},getExplorerOpen:function(e){return e.explorerOpen},getSearchTerm:function(e){return e.searchTerm},getPmBlockNodeTypes:function(e){return e.pmBlockNodeTypes},getFilteredPmBlockNodeTypes:function(e){return e.filteredPmBlockNodeTypes},getSelectedNode:function(e){return e.selectedNode},getGhostNode:function(e){return e.ghostNode}},mutations:{setNodeTypes:function(e,t){e.nodeTypes=t.filter((function(e){return e.control})).map((function(e){var t;return{id:Object(ft["uniqueId"])("nodeType_"),type:e.id,icon:e.icon,label:e.label,bpmnType:e.bpmnType,rank:e.rank||Zf,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return Vt(Vt({},e),{},{type:e.id})}))}})).sort((function(e,t){return e.rank-t.rank}))},setPinnedNodes:function(e,t){e.pinnedNodeTypes.push(t),e.pinnedNodeTypes=Object(ft["uniqBy"])(e.pinnedNodeTypes,"type"),e.pinnedNodeTypes.sort((function(e,t){return e.rank-t.rank}))},setUnpinNode:function(e,t){e.pinnedNodeTypes=e.pinnedNodeTypes.filter((function(e){return e!==t}))},setFilteredNodeTypes:function(e,t){var n=e.pinnedNodeTypes,o=e.nodeTypes;e.searchTerm=t;var i=Object(ft["uniqBy"])([].concat(g(n),g(o)),"id");e.filteredNodeTypes=i.filter((function(e){return e.label.toLowerCase().includes(t.toLowerCase())}))},setPmBlockNodeTypes:function(e,t){e.pmBlockNodeTypes=t.filter((function(e){return e.control})).map((function(e){var t;return{id:Object(ft["uniqueId"])("pmBlockNode_"),type:e.id,icon:e.icon,customIcon:e.customIcon,svgIcon:e.svgIcon,label:e.label,description:e.description,bpmnType:e.bpmnType,rank:e.rank||Zf,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return Vt(Vt({},e),{},{type:e.id})}))}})).sort((function(e,t){return e.rank-t.rank}))},setFilteredPmBlockNodeTypes:function(e,t){var n=e.pmBlockNodeTypes;e.searchTerm=t;var o=Object(ft["uniqBy"])(g(n),"id");e.filteredPmBlockNodeTypes=o.filter((function(e){return e.label.toLowerCase().includes(t.toLowerCase())}))},clearFilteredNodes:function(e){e.filteredNodeTypes=[],e.searchTerm=""},clearFilteredPmBlockNodes:function(e){e.filteredNodeTypes=[],e.filteredPmBlockNodeTypes=[],e.searchTerm=""},closeExplorer:function(e){e.explorerOpen=!1},toggleExplorer:function(e){e.explorerOpen=!e.explorerOpen},setSelectedNode:function(e,t){e.selectedNode=t},clearSelectedNode:function(e){e.selectedNode=null},setGhostNode:function(e,t){e.ghostNode=t}},actions:{getUserPinnedObjects:function(e){var t=e.commit;if(window.ProcessMaker.user){var n=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.get("/users/".concat(n,"/get_pinnned_controls")).then((function(e){var n=e.data;n.forEach((function(e){t("setPinnedNodes",e)}))})).catch((function(e){console.error(e)}))}else{var o=localStorage.pinnedNodes?JSON.parse(localStorage.pinnedNodes):[];o.forEach((function(e){t("setPinnedNodes",e)}))}},addUserPinnedObject:function(e,t){var n=e.commit,o=e.state;n("setPinnedNodes",t);var i=o.pinnedNodeTypes;if(window.ProcessMaker.user){var r=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.put("/users/".concat(r,"/update_pinned_controls"),{pinnedNodes:i}).catch((function(e){console.error(e)}))}else localStorage.pinnedNodes=JSON.stringify(i)},removeUserPinnedObject:function(e,t){var n=e.commit,o=e.state;n("setUnpinNode",t);var i=o.pinnedNodeTypes;if(window.ProcessMaker.user){var r=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.put("/users/".concat(r,"/update_pinned_controls"),{pinnedNodes:i}).catch((function(e){console.error(e)}))}else localStorage.pinnedNodes=JSON.stringify(i)}}}),Jf=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"searchNodeTypes"}},[t("label",{staticClass:"position-relative d-block"},[t("i",{staticClass:"fas fa-search position-absolute h-100 text-muted ml-2"}),t("b-input",{attrs:{placeholder:e.placeholder},model:{value:e.searchTerm,callback:function(t){e.searchTerm=t},expression:"searchTerm"}})],1)])},Qf=[],em={name:"FilterNodeTypes",props:["type"],data:function(){return{searchTerm:""}},watch:{searchTerm:function(e){"pmBlock"===this.type?(0===e.length&&Kf.commit("clearFilteredPmBlockNodes"),e.length>0&&Kf.commit("setFilteredPmBlockNodeTypes",e)):(0===e.length&&Kf.commit("clearFilteredNodes"),e.length>0&&Kf.commit("setFilteredNodeTypes",e))},type:function(e,t){this.searchTerm=t===e?this.searchTerm:""}},computed:{nodeTypes:function(){var e=Kf.getters.getPinnedNodeTypes,t=Kf.getters.getNodeTypes;return[].concat(g(e),g(t))},pmBlockNodes:function(){var e=Kf.getters.getPmBlockNodeTypes;return g(e)},placeholder:function(){return"pmBlock"===this.type?this.$t("Search PM Blocks"):this.$t("Search Objects")}}},tm=em,nm=(n("d4e3"),ut(tm,Jf,Qf,!1,null,"c468f432",null)),om=nm.exports,im=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"nodeTypesList"}},[e.filteredNodes.length>0?t("div",{attrs:{id:"filteredNodes-container"}},[e._l(e.filteredNodes,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.target!==t.currentTarget?null:e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),e.nodeTypeAlreadyPinned(n,n.type)?t("img",{staticClass:"pinIcon",attrs:{src:e.pinFillIcon,alt:"Unpin Element"},on:{click:function(t){return e.unPin(n)}}}):t("img",{staticClass:"pinIcon",attrs:{src:e.pinIcon,alt:"Pin Element"},on:{click:function(t){return e.addPin(n)}}})])]}))],2):e._e(),0!==e.filteredNodes.length||e.searchTerm?e._e():[e.pinnedObjects.length>0?t("div",{staticClass:"pinnedObjects"},[t("p",[e._v(e._s(e.$t("Pinned Objects")))]),e._l(e.pinnedObjects,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),t("img",{staticClass:"pinIcon",attrs:{src:e.pinFillIcon,alt:"Pin/Unpin Element"},on:{click:function(t){return e.unPin(n)}}})])]}))],2):e._e(),t("div",{staticClass:"objectCategory"},[t("p",[e._v(e._s(e.$t("Object Category")))]),e._l(e.unpinnedObjects,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),t("img",{staticClass:"pinIcon",attrs:{src:e.pinIcon,alt:"Pin/Unpin Element"},on:{click:function(t){return e.addPin(n)}}})])]}))],2)]],2)},rm=[],am=n("71be"),sm=n.n(am),cm=n("1813"),lm=n.n(cm),dm={data:function(){return{wasClicked:!1,selectedSubmenuItem:null,xOffset:0,yOffset:0,helperStyles:{backgroundColor:"#ffffff",position:"absolute",height:"40px",width:"40px",zIndex:"10",opacity:"0.5",pointerEvents:"none"},popperType:null}},methods:{onClickHandler:function(e,t){var n=this;this.createDraggingHelper(e,t),document.addEventListener("mousemove",this.setDraggingPosition),this.setDraggingPosition(e),this.selectedItem&&this.selectedItem.type===t.type?this.deselect():(this.wasClicked=!0,Kf.commit("setSelectedNode",t),this.$emit("onSetCursor","crosshair"),this.parent||(this.popperType=t.type),window.ProcessMaker.EventBus.$on("custom-pointerclick",(function(e){window.ProcessMaker.EventBus.$off("custom-pointerclick"),document.removeEventListener("mousemove",n.setDraggingPosition),n.movedElement&&document.body.removeChild(n.movedElement),n.popperType=null,n.selectedSubmenuItem=null,n.onCreateElement(e),Kf.commit("clearSelectedNode"),Kf.commit("setGhostNode",null),n.$emit("onSetCursor","none")})))},onCreateElement:function(e){this.wasClicked&&this.selectedItem&&(this.parent&&(this.parent=null),this.$emit("onCreateElement",{event:e,control:this.selectedItem}),this.wasClicked=!1,e.preventDefault())},setDraggingPosition:function(e){var t=e.pageX,n=e.pageY,o=this.movedElement;o&&(o.style.left="".concat(t,"px"),o.style.top="".concat(n,"px")),Kf.commit("setGhostNode",o)},createDraggingHelper:function(e,t){var n=this;this.movedElement&&(document.removeEventListener("mousemove",this.setDraggingPosition),document.body.removeChild(this.movedElement),Kf.commit("setGhostNode",null));var o=e.target;Kf.commit("setGhostNode",document.createElement("img"));var i=this.movedElement;Object.keys(this.helperStyles).forEach((function(e){i.style[e]=n.helperStyles[e]})),i.src=t.icon,Kf.commit("setGhostNode",i),document.body.appendChild(this.movedElement),this.xOffset=e.clientX-o.getBoundingClientRect().left,this.yOffset=e.clientY-o.getBoundingClientRect().top},deselect:function(){window.ProcessMaker.EventBus.$off("custom-pointerclick"),document.removeEventListener("mousemove",this.setDraggingPosition),this.movedElement&&document.body.removeChild(this.movedElement),this.$emit("onSetCursor","none"),this.wasClicked=!1,Kf.commit("clearSelectedNode"),Kf.commit("setGhostNode",null)}},computed:{selectedItem:function(){return Kf.getters.getSelectedNode},movedElement:function(){return Kf.getters.getGhostNode}}},um={name:"NodeTypesLoop",mixins:[dm],data:function(){return{pinIcon:sm.a,pinFillIcon:lm.a,showPin:!1}},created:function(){Kf.dispatch("getUserPinnedObjects")},methods:{nodeTypeAlreadyPinned:function(e,t){return!!this.pinnedObjects.find((function(e){return e.type===t}))},unPin:function(e){return this.deselect(),Kf.dispatch("removeUserPinnedObject",e)},addPin:function(e){return this.deselect(),Kf.dispatch("addUserPinnedObject",e)}},computed:{pinnedObjects:function(){return Kf.getters.getPinnedNodeTypes},objects:function(){return Kf.getters.getNodeTypes},unpinnedObjects:function(){var e=this,t=this.objects;return t.filter((function(t){return!e.pinnedObjects.some((function(e){return e.type===t.type}))}))},filteredNodes:function(){return Kf.getters.getFilteredNodeTypes},searchTerm:function(){return Kf.getters.getSearchTerm}}},pm=um,hm=(n("6346"),ut(pm,im,rm,!1,null,null,null)),fm=hm.exports,mm=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"pmBlockNodeTypesList"}},[e.filteredPmBlockNodes.length>0?t("div",{attrs:{id:"filteredPmBlockNodes-container"}},[e._l(e.filteredPmBlockNodes,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",on:{click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("div",{staticClass:"d-flex"},[n.svgIcon?t("img",{staticClass:"node-types__item__icon",attrs:{src:n.svgIcon,alt:e.$t(n.label)}}):t("i",{staticClass:"node-types__item__icon",class:n.customIcon}),t("label",[e._v(e._s(e.$t(n.label)))])])])]}))],2):e._e(),0!==e.filteredPmBlockNodes.length||e.searchTerm?e._e():[t("div",{staticClass:"pmBlocksContainer p-2"},[e._l(e.pmBlockNodeTypes,(function(n){return[t("div",{key:n.id,staticClass:"pm-block-node-types__item p-2 d-block",on:{click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("div",{staticClass:"d-flex"},[n.svgIcon?t("img",{staticClass:"node-types__item__icon",attrs:{src:n.svgIcon,alt:e.$t(n.label)}}):t("i",{staticClass:"node-types__item__icon",class:n.customIcon}),t("label",[e._v(e._s(e.$t(n.label)))])])])]}))],2)]],2)},gm=[],vm={name:"PmBlocksLoop",mixins:[dm],computed:{pmBlockNodeTypes:function(){return Kf.getters.getPmBlockNodeTypes},filteredPmBlockNodes:function(){return Kf.getters.getFilteredPmBlockNodeTypes},searchTerm:function(){return Kf.getters.getSearchTerm}}},bm=vm,ym=(n("fbd9"),ut(bm,mm,gm,!1,null,null,null)),wm=ym.exports,xm={name:"ExplorerRail",props:{explorerExpanded:{type:Boolean},nodeTypes:{type:Array},pmBlockNodes:{type:Array}},components:{FontAwesomeIcon:xn["FontAwesomeIcon"],FilterNodeTypes:om,NodeTypesLoop:fm,PmBlocksLoop:wm},data:function(){return{tabs:[{idx:0,label:"Add Object"},{idx:1,label:"PM Blocks"}],tabIndex:0}},computed:{explorerOpen:function(){return Kf.getters.getExplorerOpen}},created:function(){Kf.commit("setNodeTypes",this.nodeTypes)},methods:{faTimes:function(){return oi["faTimes"]},setTabIndex:function(e){this.tabIndex!==e&&(this.tabIndex=e,this.clearFilteredObjects())},closeRail:function(){Kf.commit("closeExplorer"),this.clearFilteredObjects()},clearFilteredObjects:function(){Kf.commit("clearFilteredNodes"),Kf.commit("clearFilteredPmBlockNodes")}}},km=xm,Cm=(n("3da3"),ut(km,Xf,Yf,!1,null,null,null)),Sm=Cm.exports,Em=n("c04c"),Am=n.n(Em),Mm=function(){var e=this,t=e._self._c;return t("button",{staticClass:"inspector-button",attrs:{type:"button","data-cy":"inspector-button"},on:{click:e.toggleInspector}},[t("inline-svg",{attrs:{src:e.inspectorIcon}})],1)},Tm=[],Pm=n("6d5e"),_m=n.n(Pm),Om={components:{InlineSvg:_m.a},props:{showInspector:{type:Boolean,default:!0}},data:function(){return{inspectorIcon:n("b328")}},methods:{toggleInspector:function(){this.$emit("toggleInspector",!this.showInspector)}}},Dm=Om,Im=(n("ea51"),ut(Dm,Mm,Tm,!1,null,"cebfb20a",null)),Nm=Im.exports,Rm=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"inspector"}},[t("b-col",{staticClass:"pl-0 h-100 overflow-hidden inspector-column",class:[{"ignore-pointer":e.canvasDragPosition}],attrs:{id:"inspector","data-test":"inspector-column"}},[t("b-card",{staticClass:"inspector-container border-top-0 border-bottom-0 border-right-0 rounded-0",style:{height:e.parentHeight},attrs:{"no-body":"","data-test":"inspector-container","data-cy":"inspector-panel"},scopedSlots:e._u([{key:"header",fn:function(){return[t("div",{staticClass:"inspector-header"},[t("div",{staticClass:"inspector-header-title"},[e._v(" "+e._s(e.$t("Configuration"))+" ")]),t("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close","data-cy":"inspector-close-button"},on:{click:e.onClose}},[e._v(" × ")])])]},proxy:!0}])},[e.highlightedNode?t("vue-form-renderer",{key:e.highlightedNode._modelerId,ref:"formRenderer",staticClass:"overflow-auto h-100 inspector-font-size",attrs:{data:e.data,config:e.config},on:{update:e.updateDefinition},nativeOn:{focusout:function(t){return e.updateState.apply(null,arguments)}}}):e._e()],1)],1)],1)},jm=[],Lm=n("bb3a"),Bm=n("2ac6"),Fm=(n("1946"),n("bcdf")),zm=n.n(Fm),Hm={id:"processmaker-modeler-process",bpmnType:"bpmn:Process",control:!1,label:"Process",inspectorConfig:[{name:"Process Information",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-process"},items:[{component:"FormInput",config:Ii},{component:"FormInput",config:{label:"Name",helper:"The Name of the Process",name:"name",placeholder:""}}]}]}]},qm=Hm.id,Vm=Hm;De.a.component("FormText",Lm["renderer"].FormText),De.a.component("FormInput",Bm["FormInput"]),De.a.component("FormSelect",Bm["FormSelect"]),De.a.component("FormTextArea",Bm["FormTextArea"]),De.a.component("FormCheckbox",Bm["FormCheckbox"]),De.a.component("FormRadioButtonGroup",Bm["FormRadioButtonGroup"]),De.a.component("FormAccordion",Bm["FormAccordion"]),De.a.component("FormDatePicker",Bm["FormDatePicker"]),De.a.component("FormMultiSelect",Bm["FormMultiSelect"]);var Um={props:["nodeRegistry","moddle","processNode","parentHeight","canvasDragPosition","definitions"],data:function(){return{data:{},config:[],inspectorHandler:null,translated:[],isVisible:!0}},watch:{highlightedNode:function(){document.activeElement.blur(),this.prepareData(),this.prepareConfig()},"highlightedNode.definition.assignment":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignmentLock":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.allowReassignment":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignedUsers":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignedGroups":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignmentRules":function(e,t){this.handleAssignmentChanges(e,t)}},computed:{highlightedNode:function(){return ze.getters.highlightedNodes[0]},isAnyNodeActive:function(){return this.highlightedNode},updateDefinition:function(){var e=this;if(!this.isAnyNodeActive)return zm.a;var t=this.defaultInspectorHandler;return this.isProcessNodeActive&&(t=this.processNodeInspectorHandler),this.hasCustomInspectorHandler&&(t=this.customInspectorHandler),function(n){if(n){if(Lr()(n.documentation)&&k()(e.highlightedNode.definition.get("documentation")[0],"text")!==n.documentation){var o=n.documentation?[e.moddle.create("bpmn:Documentation",{text:n.documentation})]:void 0;e.setNodeProp(e.highlightedNode,"documentation",o)}t(ia()(n,["documentation"]))}}},hasCustomInspectorHandler:function(){return this.nodeRegistry[this.highlightedNode.type].inspectorHandler},isProcessNodeActive:function(){return this.highlightedNode===this.processNode}},methods:{onClose:function(){this.$emit("toggleInspector",!1)},handleAssignmentChanges:function(e,t){e!==t&&this.prepareData()},prepareConfig:function(){if(!this.highlightedNode)return this.config={name:"Empty",items:[]};var e=this.highlightedNode,t=e.type,n=e.definition;if(this.highlightedNode===this.processNode)return this.config=Vm.inspectorConfig;var o=rn()(this.nodeRegistry[t].inspectorConfig),i=k()(o,"[0].items[0].items");if(this.isSequenceFlow(t)&&this.isConnectedToGateway(n)){var r=this.$t("Enter the expression that describes the workflow condition");r+=' <a href="https://processmaker.gitbook.io/processmaker/v/processmaker-4.3/designing-processes/expression-syntax-components" target="_blank"><i class="far fa-question-circle mr-1"></a>';var a={component:"FormInput",config:{label:this.$t("Expression"),helper:r,name:"conditionExpression"}},s=i.find((function(e){return e.config&&"Name"===e.config.label})),c=i.indexOf(s);s&&c>=0?i.splice(c+1,0,a):i.push(a)}return this.config=o},prepareData:function(){if(!this.highlightedNode)return{};var e=this.highlightedNode&&this.highlightedNode.type,t=function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];return e[o]=i,e}),{})};this.data=e&&this.nodeRegistry[e].inspectorData?this.nodeRegistry[e].inspectorData(this.highlightedNode,t,this):t(this.highlightedNode)},isSequenceFlow:function(e){return e===us},isConnectedToGateway:function(e){return["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.sourceRef.$type)},isConnectedToSubProcess:function(e){return"bpmn:CallActivity"===e.targetRef.$type},customInspectorHandler:function(e){return this.nodeRegistry[this.highlightedNode.type].inspectorHandler(e,this.highlightedNode,this.setNodeProp,this.moddle,this.definitions,this.defaultInspectorHandler)},processNodeInspectorHandler:function(e){return this.defaultInspectorHandler(ia()(e,["artifacts","flowElements","laneSets"]))},setNodeProp:function(e,t,n){this.$emit("shape-resize"),ze.commit("updateNodeProp",{node:e,key:t,value:n})},defaultInspectorHandler:function(e){for(var t in ia()(e,["$type","eventDefinitions"]))this.highlightedNode.definition.get(t)!==e[t]&&this.setNodeProp(this.highlightedNode,t,e[t])},updateState:function(){this.$emit("save-state")}}},Gm=Um,Wm=(n("e8a4"),ut(Gm,Rm,jm,!1,null,"37f66186",null)),$m=Wm.exports;De.a.use(Ie["a"]);var Xm=new Ie["a"].Store({state:{stack:[],position:null,disabled:!1,isVersionsInstalled:!1,isDraft:!1,isLoading:!1},getters:{canUndo:function(e){return e.position>0},canRedo:function(e){return e.position<e.stack.length-1},currentState:function(e){return e.stack[e.position]},isVersionsInstalled:function(e){return e.isVersionsInstalled},isDraft:function(e){return e.isDraft},isLoading:function(e){return e.isLoading}},mutations:{setPosition:function(e,t){e.position=t},setState:function(e,t){e.stack=e.stack.slice(0,e.position+1),e.stack.push(t)},clearStack:function(e){e.stack=[e.stack[e.stack.length-1]]},disableSavingState:function(e){e.disabled=!0},enableSavingState:function(e){e.disabled=!1},isVersionsInstalled:function(e,t){e.isVersionsInstalled=t},isDraft:function(e,t){e.isDraft=t},isLoading:function(e,t){e.isLoading=t}},actions:{pushState:function(e,t){var n=e.state,o=e.getters,i=e.commit;t===o.currentState||n.disabled||(i("setState",t),i("setPosition",n.stack.length-1))},undo:function(e){var t=e.state,n=e.getters,o=e.commit;n.canUndo&&o("setPosition",t.position-1)},redo:function(e){var t=e.state,n=e.getters,o=e.commit;n.canRedo&&o("setPosition",t.position+1)},enableVersions:function(e){var t=e.commit;t("isVersionsInstalled",!0)},setVersionIndicator:function(e,t){var n=e.commit;n("isDraft",t)},setLoadingState:function(e,t){var n=e.commit;n("isLoading",t)}}}),Ym=n("e356"),Zm=n("1251"),Km=n.n(Zm),Jm=n("38ab"),Qm=n.n(Jm),eg=n("6864"),tg=n.n(eg),ng=n("cb02"),og=n.n(ng),ig=n("bd0e"),rg=n.n(ig),ag=n("c521"),sg=n.n(ag),cg=n("8c96"),lg=n.n(cg),dg=n("b470"),ug=n.n(dg),pg=n("31e3"),hg=n.n(pg),fg=n("d5bd"),mg=n.n(fg),gg=n("408e"),vg=n.n(gg),bg=n("b7ff"),yg=n.n(bg),wg=n("b36d"),xg=n.n(wg),kg=n("beab"),Cg=n.n(kg),Sg=n("1a64"),Eg=n.n(Sg),Ag=n("af7f"),Mg=n.n(Ag),Tg=n("5fd8"),Pg=n.n(Tg),_g=n("fde4"),Og=n.n(_g),Dg={};function Ig(){}Ig.prototype.resolveRule=function(e,t){const n=Dg[e+"/"+t];if(!n)throw new Error("cannot resolve rule <"+e+"/"+t+">");return n},Ig.prototype.resolveConfig=function(e,t){throw new Error("cannot resolve config <"+t+"> in <"+e+">")};var Ng=new Ig,Rg={"conditional-flows":"error","end-event-required":"error","event-sub-process-typed-start-event":"error","label-required":"error","no-complex-gateway":"error","no-disconnected":"error","no-gateway-join-fork":"error","no-implicit-split":"error","single-event-definition":"error","start-event-required":"error","sub-process-blank-start-event":"error","superfluous-gateway":"warning","processmaker/custom-validation":"error","processmaker/gateway-direction":"error","processmaker/event-based-gateway":"error","processmaker/call-activity-child-process":"error","processmaker/id-required":"error","processmaker/signal-ref-required":"error"},jg={rules:Rg},Lg={resolver:Ng,config:jg},Bg=Lg;function Fg(e,t,n,o,i,r,a){var s={allowDrop:!1,poolTarget:null};if(!Ug(e,t,a))return s.allowDrop=!1,s;if(qg(n.type))return s.allowDrop=!0,s;if(Gg(n.bpmnType)){var c=i.findModelsFromPoint(Wg(e,t,o)).sort((function(e,t){return t.get("z")-e.get("z")}))[0];return s.allowDrop=_o(n.type,c),s}if(Vg(r))return s.allowDrop=!0,s;if(zg(n.bpmnType))return s.allowDrop=!0,s;var l=Hg(e,t,o,i);return l&&(s.allowDrop=!0,s.poolTarget=l),s}function zg(e){return"bpmn:TextAnnotation"===e}function Hg(e,t,n,o){return o.findModelsFromPoint(Wg(e,t,n)).find((function(e){var t=e.component;return t&&t.node.type===Un}))}function qg(e){return e===Un}function Vg(e){return!e||0===e.get("participants").length}function Ug(e,t,n){var o=n.getBoundingClientRect(),i=o.left,r=o.top,a=o.width,s=o.height,c=new d["g"].rect(i,r,a,s),l=new d["g"].Point(e,t);return c.containsPoint(l)}function Gg(e){return"bpmn:BoundaryEvent"===e}function Wg(e,t,n){return n.clientToLocalPoint({x:e,y:t})}Dg["bpmnlint/conditional-flows"]=Km.a,Dg["bpmnlint/end-event-required"]=Qm.a,Dg["bpmnlint/event-sub-process-typed-start-event"]=tg.a,Dg["bpmnlint/label-required"]=og.a,Dg["bpmnlint/no-complex-gateway"]=rg.a,Dg["bpmnlint/no-disconnected"]=sg.a,Dg["bpmnlint/no-gateway-join-fork"]=lg.a,Dg["bpmnlint/no-implicit-split"]=ug.a,Dg["bpmnlint/single-event-definition"]=hg.a,Dg["bpmnlint/start-event-required"]=mg.a,Dg["bpmnlint/sub-process-blank-start-event"]=vg.a,Dg["bpmnlint/superfluous-gateway"]=yg.a,Dg["bpmnlint-plugin-processmaker/custom-validation"]=xg.a,Dg["bpmnlint-plugin-processmaker/gateway-direction"]=Cg.a,Dg["bpmnlint-plugin-processmaker/event-based-gateway"]=Eg.a,Dg["bpmnlint-plugin-processmaker/call-activity-child-process"]=Mg.a,Dg["bpmnlint-plugin-processmaker/id-required"]=Pg.a,Dg["bpmnlint-plugin-processmaker/signal-ref-required"]=Og.a;var $g,Xg,Yg,Zg,Kg,Jg,Qg,ev,tv,nv,ov,iv,rv=n("28b7"),av=n.n(rv),sv={extends:Uf,mixins:[Zr],data:function(){return{nodeIcon:av.a}}},cv=sv,lv=ut(cv,$g,Xg,!1,null,null,null),dv=lv.exports,uv="processmaker-modeler-boundary-error-event",pv=na()(rn()(Gf),{id:uv,component:dv,control:!1,label:"Boundary Error Event",icon:n("6ed0"),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Error Event"),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorConfig:[{items:[{items:[{}]},qr,Ir]}]}),hv={extends:Uf,mixins:[Zr],data:function(){return{nodeIcon:nu.a}},mounted:function(){this.shape.attr({image:{"ref-x":4,"ref-y":4,width:18,height:18}})}},fv=hv,mv=ut(fv,Yg,Zg,!1,null,null,null),gv=mv.exports,vv={component:"FormCheckbox",config:{label:"Interrupting",name:"cancelActivity",helper:"Select to interrupt the current Request workflow and route to the alternate workflow, thereby preventing parallel workflow"}},bv=vv,yv="processmaker-modeler-boundary-conditional-event",wv=na()(rn()(Gf),Vt(Vt({},cu),{},{id:yv,component:gv,control:!1,label:"Boundary Conditional Event",definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Conditional Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(g(su()),[bv])},Ir,qr]}]})),xv=n("38ec"),kv=n.n(xv),Cv={extends:Uf,mounted:function(){this.shape.attr("image/xlink:href",kv.a)},methods:{isValidBoundaryEventTarget:function(e){return Oo(e.component)}}},Sv=Cv,Ev=ut(Sv,Kg,Jg,!1,null,null,null),Av=Ev.exports,Mv="processmaker-modeler-boundary-escalation-event",Tv=na()(rn()(Gf),{id:Mv,component:Av,control:!1,label:"Boundary Escalation Event",icon:n("565d"),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Escalation Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:EscalationEventDefinition")]})},inspectorConfig:[{items:[{items:[{},bv]},qr,Ir]}]}),Pv=n("3d5d"),_v=n.n(Pv),Ov={extends:Uf,mixins:[Zr],data:function(){return{nodeIcon:_v.a}},methods:{isValidBoundaryEventTarget:function(e){var t=e.component;return t&&t.node.isBpmnType("bpmn:CallActivity")}},mounted:function(){var e=dd();this.shape.attr(e)}},Dv=Ov,Iv=ut(Dv,Qg,ev,!1,null,null,null),Nv=Iv.exports,Rv="processmaker-modeler-boundary-message-event",jv=na()(rn()(Gf),Vt(Vt({},Ls),{},{id:Rv,component:Nv,control:!1,label:"Boundary Message Event",icon:n("45bc"),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Message Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},bv,Ns("Message that will trigger this boundary event")]},qr,Ir]}]})),Lv=n("ec41"),Bv=n.n(Lv),Fv={extends:Uf,mixins:[Zr],data:function(){return{nodeIcon:Bv.a}},mounted:function(){var e=this.node.diagram.bounds;this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({image:{"ref-x":3,"ref-y":1,width:e.get("width")-15,height:e.get("height")-15}})}},zv=Fv,Hv=ut(zv,tv,nv,!1,null,null,null),qv=Hv.exports,Vv="processmaker-modeler-boundary-signal-event",Uv=na()(rn()(Gf),Vt(Vt({},Qs),{},{id:Vv,component:qv,control:!1,label:"Boundary Signal Event",icon:n("a8c3"),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Signal Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},bv,Js("Signal that will trigger this boundary event")]},qr,Ir]}]})),Gv=n("ed66"),Wv=n.n(Gv),$v={extends:Uf,mixins:[Zr],data:function(){return{nodeIcon:Wv.a}}},Xv=$v,Yv=ut(Xv,ov,iv,!1,null,null,null),Zv=Yv.exports,Kv="processmaker-modeler-boundary-timer-event",Jv=na()(rn()(Gf),{id:Kv,component:Zv,control:!1,label:"Boundary Timer Event",icon:n("8bfb"),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Timer Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:TimerEventDefinition",{timeDuration:e.create("bpmn:Expression",{body:nd})})]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],a=i[0][r].body;e[o]={type:r,body:a}}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var a=e[r],s=a.type,c=a.body,l=i.get(r)[0][s];if(l&&l.body===c)continue;var d=U({},s,o.create("bpmn:Expression",{body:c})),u=[o.create("bpmn:TimerEventDefinition",d)];n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{items:[{items:[{},bv]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-boundary-timer-event"},items:[{component:sd,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},Ir,qr]}]});function Qv(e,t,n){var o=cp(e,t,"set");return hp(e,o,n),n}var eb=new WeakMap,tb=function(){function e(t){Ut(this,e),ap(this,eb,{writable:!0,value:void 0}),U(this,"preventTranslate",!1),Qv(this,eb,t)}return Wt(e,[{key:"paper",get:function(){return lp(this,eb)}},{key:"scale",get:function(){return lp(this,eb).scale()},set:function(e){lp(this,eb).scale(e),lp(this,eb).trigger("scale:changed")}},{key:"roundToNearestGridMultiple",value:function(t){return Math.round(t/e.gridSize)*e.gridSize}},{key:"ceilToNearestGridMultiple",value:function(t){return Math.ceil(t/e.gridSize)*e.gridSize}},{key:"translate",value:function(e,t){this.preventTranslate||(lp(this,eb).translate(e,t),lp(this,eb).trigger("translate:changed"))}},{key:"addEventHandler",value:function(e,t,n){lp(this,eb).on(e,t,n)}},{key:"addOnceHandler",value:function(e,t){lp(this,eb).once(e,t)}},{key:"removeEventHandler",value:function(e,t,n){lp(this,eb).off(e,t,n)}},{key:"setPaperDimensions",value:function(e,t){lp(this,eb).setDimensions(e,t)}},{key:"performAtomicAction",value:function(){var e=w(b().mark((function e(t){return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return lp(this,eb).freeze(),e.next=3,t(lp(this,eb));case 3:lp(this,eb).unfreeze();case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"clientToGridPoint",value:function(e,t){var n=lp(this,eb).localToPagePoint(0,0),o=this.scale;return{x:this.roundToNearestGridMultiple((e-n.x)/o.sx),y:this.roundToNearestGridMultiple((t-n.y)/o.sy)}}},{key:"setStateInvalid",value:function(){this.paper.drawBackground({color:P})}},{key:"setStateValid",value:function(){this.paper.drawBackground({color:_})}},{key:"awaitScheduledUpdates",value:function(){var e=this;return lp(this,eb)._updates.priorities.some((function(e){return!d["util"].isEmpty(e)}))?new Promise((function(t){e.addOnceHandler("render:done",t)})):Promise.resolve()}}],[{key:"factory",value:function(t,n,o){var i=3,r=new d["dia"].Paper({async:!0,el:t,model:o,sorting:"sorting-approximate",gridSize:e.gridSize,drawGrid:!0,snapLinks:!1,snapElements:!1,clickThreshold:10,perpendicularLinks:!0,interactive:n,highlighting:{default:{options:{padding:i}}}});return r.translate(168,20),new this(r)}}]),e}();function nb(e,t,n){var o=rb(e,t,n);ib(o,t),e.inspectorConfig[0].items.sort(ob)}function ob(e,t){return ab(e)?1:ab(t)?-1:0}function ib(e,t){var n=e.findIndex((function(e){var n=!t.container&&t.config&&e.config&&t.config.name&&t.config.name===e.config.name;return t.id&&t.id===e.id||n}));-1!==n?e[n]=t:e.push(t)}function rb(e,t,n){return"undefined"!==typeof t.container?e.inspectorConfig[0].items:n?(e=e.inspectorConfig[0],n.split(".").forEach((function(t){e=e&&e.items.find((function(e){return e.config&&e.config.name===t}))})),e?e.items:null):e.inspectorConfig[0].items[0].items}function ab(e){return e.config&&"Advanced"===e.config.label}function sb(e,t){hb(e)&&lb(e);var n=pb(e);n&&lb(n),cb(e)&&!hb(e)&&db(e),ub(t)}function cb(e){return e.component.node.type!==rs}function lb(e){db(e);var t=e.component.node.definition.processRef&&e.component.node.definition.processRef.laneSets[0];if(t){var n=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type===rs})),o=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type!==rs}));n.forEach(db),o.forEach(db)}}function db(e){e.toFront({deep:!0})}function ub(e){e.getLinks().forEach(db)}function pb(e){return e.component.node.pool}function hb(e){return e.component.node.type===Un}U(tb,"gridSize",vu);var fb=function(){var e=this,t=e._self._c;return t("b-row",{staticClass:"w-100 m-0"},[t("div",{staticClass:"toolbar d-flex justify-content-between align-items-center border-top border-bottom",class:{"ignore-pointer":e.canvasDragPosition},attrs:{role:"toolbar","aria-label":"Toolbar"}},[t("breadcrumb",{attrs:{"breadcrumb-data":e.breadcrumbData}}),t("div",{staticClass:"d-flex mr-3"},[t("TopRail",{attrs:{"validation-errors":e.validationErrors,warnings:e.warnings}},e._l(e.validationBar,(function(e,n){return t(e.button,{key:"validation-status-".concat(n),tag:"component"})})),1),t("div",{staticClass:"d-flex align-items-center btn-group btn-group-sm",attrs:{role:"group","aria-label":"Publish controls","data-cy":"publish-control"}},[t("div",{staticClass:"divider"}),e.isVersionsInstalled?[t("div",{staticClass:"toolbar-item toolbar-version-status",attrs:{"data-cy":"publish-version-status"}},[e._v(" "+e._s(e.versionStatus)+" ")]),t("div",{staticClass:"toolbar-item toolbar-loading-status",attrs:{"data-cy":"publish-loading-status"}},[t("span",[e._v(" "+e._s(e.loadingStatus)+" ")]),t("font-awesome-icon",{staticClass:"text-success",attrs:{icon:e.loadingIcon,spin:e.isLoading}})],1),t("a",{staticClass:"toolbar-item toolbar-publish",attrs:{title:e.$t("Publish"),"data-cy":"publish-btn"},on:{click:function(t){return e.$emit("saveBpmn")}}},[e._v(" "+e._s(e.$t("Publish"))+" ")]),t("a",{staticClass:"toolbar-item toolbar-close",attrs:{title:e.$t("Close"),"data-cy":"close-btn"},on:{click:function(t){return e.$emit("close")}}},[e._v(" "+e._s(e.$t("Close"))+" ")]),t("EllipsisMenu",{attrs:{actions:e.ellipsisMenuActions,divider:!1,"data-cy":"ellipsis-menu"},on:{navigate:e.onNavigate,show:e.onShow,hide:e.onHide}})]:[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"save-button",attrs:{"data-test":"mini-map-btn",title:e.$t("Save")},on:{click:function(t){return e.$emit("saveBpmn")}}},[t("font-awesome-icon",{attrs:{icon:e.saveIcon}}),t("span",{staticClass:"save-button-label"},[e._v(e._s(e.$t("Save")))])],1),t("b-btn",{staticClass:"ml-1 rounded",attrs:{disabled:!e.xmlManager,variant:"secondary",size:"sm","data-test":"downloadXMLBtn"},on:{click:function(t){e.xmlManager&&e.xmlManager.download()}}},[t("i",{staticClass:"fas fa-download mr-1"}),e._v(" "+e._s(e.$t("Download BPMN"))+" ")]),t("b-btn",{directives:[{name:"b-modal",rawName:"v-b-modal",value:"uploadmodal",expression:"'uploadmodal'"}],staticClass:"ml-1 rounded",attrs:{variant:"secondary",size:"sm"}},[t("i",{staticClass:"fas fa-upload mr-1"}),e._v(" "+e._s(e.$t("Upload XML"))+" ")])]],2)],1)],1)])},mb=[],gb=function(){var e=this,t=e._self._c;return t("nav",{attrs:{id:"breadcrumbs"}},[e.breadcrumbData.length>0?t("ol",{staticClass:"breadcrumb"},[e._m(0),e._l(e.breadcrumbData[0],(function(n,o){return t("li",{key:o,staticClass:"breadcrumb-item"},[n.url?t("a",{attrs:{href:n.url}},[e._v(e._s(n.text))]):e._e(),n.url?e._e():t("span",[e._v(e._s(n.text))])])}))],2):e._e()])},vb=[function(){var e=this,t=e._self._c;return t("li",{staticClass:"breadcrumb-item"},[t("a",{attrs:{href:"/"}},[t("i",{staticClass:"fas fa-home"})])])}],bb={name:"breadcrumb",props:{breadcrumbData:{type:Array,default:function(){return[]}}}},yb=bb,wb=(n("d5ef"),ut(yb,gb,vb,!1,null,"d1e148b4",null)),xb=wb.exports,kb=function(){var e=this,t=e._self._c;return t("div",{staticClass:"top-rail-container"},[t("ValidateIssue",{directives:[{name:"show",rawName:"v-show",value:e.isOpenIssue,expression:"isOpenIssue"}],attrs:{"number-of-errors":e.numberOfErrors},on:{openPanel:e.handleOpenPanel}}),t("ValidateButton",{on:{openIssue:e.handleOpenIssue}}),t("ValidatePanel",{directives:[{name:"show",rawName:"v-show",value:e.isOpenIssue&&e.isOpenPanel,expression:"isOpenIssue && isOpenPanel"}],attrs:{"error-list":e.errorList,warnings:e.warnings}}),e._t("default")],2)},Cb=[],Sb=function(){var e=this,t=e._self._c;return t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],class:["validate-button",{"validate-button-active":e.isOpen}],attrs:{type:"button",title:e.$t("Auto validate"),"data-cy":"validate-button"},on:{click:function(t){return t.preventDefault(),e.handleOpen.apply(null,arguments)}}},[t("inline-svg",{attrs:{src:e.isOpen?e.validateOpenIcon:e.validateCloseIcon}})],1)},Eb=[],Ab={components:{InlineSvg:_m.a},data:function(){return{isOpen:!1,validateCloseIcon:n("f4e5"),validateOpenIcon:n("5342")}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openIssue",this.isOpen)}}},Mb=Ab,Tb=(n("e297"),ut(Mb,Sb,Eb,!1,null,"207802aa",null)),Pb=Tb.exports,_b=function(){var e=this,t=e._self._c;return t("button",{staticClass:"issue-box",attrs:{type:"button",disabled:0===e.numberOfErrors,"data-cy":"validate-issue-button"},on:{click:function(t){return t.preventDefault(),e.handleOpen.apply(null,arguments)}}},[t("span",{staticClass:"issue-title"},[e._v("Issues")]),t("span",{staticClass:"issue-badge"},[e._v(e._s(e.numberOfErrors))]),t("span",{staticClass:"issue-icon"},[t("inline-svg",{attrs:{src:e.isOpen?e.issueOpenIcon:e.issueCloseIcon}})],1)])},Ob=[],Db={components:{InlineSvg:_m.a},props:{numberOfErrors:{type:Number,required:!0}},data:function(){return{isOpen:!1,issueCloseIcon:n("a2b0"),issueOpenIcon:n("2eb4")}},watch:{numberOfErrors:function(e){0===e&&(this.isOpen=!1)}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openPanel",this.isOpen)}}},Ib=Db,Nb=(n("bde1"),ut(Ib,_b,Ob,!1,null,"337583fe",null)),Rb=Nb.exports,jb=function(){var e=this,t=e._self._c;return t("div",{staticClass:"validate-container",attrs:{"data-cy":"validate-panel"}},[e._l(e.errorList,(function(n,o){return t("div",{key:"".concat(n.errorId,"_").concat(o),staticClass:"validate-item-box"},[t("vue-inline-svg",{attrs:{src:e.issueIcon}}),t("div",{staticClass:"validate-item-info"},[t("div",{staticClass:"validate-item-title"},[e._v(e._s(n.errorKey))]),t("div",{staticClass:"validate-item-description"},[e._v(e._s(n.message)+".")]),n.id?t("div",{staticClass:"validate-item-node"},[t("span",{staticClass:"validate-item-node-title"},[e._v(e._s(e.$t("Node ID"))+":")]),e._v(" "+e._s(n.id)+" ")]):e._e()])],1)})),e._l(e.warnings,(function(n,o){return t("div",{key:n.title+o,staticClass:"validate-item-box"},[t("vue-inline-svg",{attrs:{src:e.issueIcon}}),t("div",{staticClass:"validate-item-info"},[t("div",{staticClass:"validate-item-title"},[e._v(e._s(n.title))]),t("div",{staticClass:"validate-item-description"},[e._v(e._s(n.text)+".")])])],1)}))],2)},Lb=[],Bb={components:{VueInlineSvg:_m.a},props:{errorList:{type:Array,required:!0},warnings:{type:Array,required:!0}},data:function(){return{issueIcon:n("6435")}}},Fb=Bb,zb=(n("f2b4"),ut(Fb,jb,Lb,!1,null,"0722e36d",null)),Hb=zb.exports,qb={components:{ValidateButton:Pb,ValidateIssue:Rb,ValidatePanel:Hb},props:{validationErrors:{type:Object,required:!0},warnings:{type:Array,required:!0}},data:function(){return{isOpenIssue:!1,isOpenPanel:!1}},computed:{errorList:function(){return Object.entries(this.validationErrors).flatMap((function(e){var t=_e(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return Vt(Vt({},e),{},{errorKey:n},{errorId:"".concat(e.id,"_").concat(e.message.split(" ").join("_"))})}))}))},numberOfErrors:function(){return this.errorList.length+this.warnings.length}},watch:{numberOfErrors:function(e){0===e&&(this.isOpenPanel=!1)}},methods:{handleOpenIssue:function(e){this.isOpenIssue=e,ze.commit("setAutoValidate",this.isOpenIssue)},handleOpenPanel:function(e){this.isOpenPanel=e}}},Vb=qb,Ub=(n("12df"),ut(Vb,kb,Cb,!1,null,"78331cf6",null)),Gb=Ub.exports,Wb={name:"tool-bar",components:{Breadcrumb:xb,TopRail:Gb,FontAwesomeIcon:xn["FontAwesomeIcon"]},props:["canvasDragPosition","cursor","paperManager","isRendering","breadcrumbData","panelsCompressed","validationErrors","warnings","xmlManager","validationBar"],watch:{miniMapOpen:function(e){this.$emit("toggle-mini-map-open",e)},canUndo:function(e){e||this.$root.$emit("bv::hide::tooltip")},canRedo:function(e){e||this.$root.$emit("bv::hide::tooltip")}},computed:{canUndo:function(){return Xm.getters.canUndo},canRedo:function(){return Xm.getters.canRedo},versionStatus:function(){var e=Xm.getters.isDraft?"Draft":"Published";return this.$t(e)},isVersionsInstalled:function(){return Xm.getters.isVersionsInstalled},isLoading:function(){return Xm.getters.isLoading},loadingStatus:function(){var e=this.isLoading?"Saving":"Saved";return this.$t(e)},loadingIcon:function(){return this.isLoading?this.spinner:this.savedIcon}},data:function(){return{plusIcon:oi["faPlus"],minusIcon:oi["faMinus"],scale:1,initialScale:1,minimumScale:.2,scaleStep:.1,mapIcon:oi["faMapMarked"],miniMapOpen:!1,compressIcon:oi["faCompress"],expandIcon:oi["faExpand"],undoIcon:oi["faUndo"],redoIcon:oi["faRedo"],saveIcon:oi["faSave"],savedIcon:oi["faCheckCircle"],spinner:oi["faSpinner"],ellipsisMenuActions:[{value:"save-template",content:this.$t("Save as Template"),icon:""},{value:"save-pm-block",content:this.$t("Save as PM Block"),icon:""},{value:"discard-draft",content:this.$t("Discard Draft"),icon:""}]}},methods:{undo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Xm.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Xm.dispatch("redo").then((function(){return e.$emit("load-xml")}))},onNavigate:function(e){switch(e.value){case"discard-draft":window.ProcessMaker.EventBus.$emit("open-versions-discard-modal");break;case"save-template":this.$emit("publishTemplate");break;case"save-pm-block":this.$emit("publishPmBlock");break;default:break}},onShow:function(){var e=document.getElementById("inspector");e&&(e.style.zIndex="1")},onHide:function(){var e=document.getElementById("inspector");e&&(e.style.zIndex="2")}},mounted:function(){var e,t=null===(e=this.$root.$children[0])||void 0===e?void 0:e.process,n=this.ellipsisMenuActions.findIndex((function(e){return"save-template"===e.value}));null!==t&&void 0!==t&&t.is_template&&this.ellipsisMenuActions.splice(n,1),"PM_BLOCK"===(null===t||void 0===t?void 0:t.asset_type)&&this.ellipsisMenuActions.splice(n,2)}},$b=Wb,Xb=(n("02e5"),ut($b,fb,mb,!1,null,null,null)),Yb=Xb.exports;function Zb(e,t){var n=function(e){return e.isBpmnType("bpmn:MessageFlow",vt,xt)||e.isType("processmaker-modeler-pool")};if(!n(e))if(e.isType("processmaker-modeler-lane"))t.get("laneSets")[0].get("lanes").push(e.definition);else{var o="flowElements";(e.isBpmnType("bpmn:TextAnnotation")||e.isBpmnType("bpmn:Association"))&&(o="artifacts"),t.get(o).push(e.definition)}}var Kb={methods:{zoomInOutHandler:function(e,t){var n="+"===e.key||"NumpadAdd"===e.key||107===e.keyCode||187===e.keyCode,o="-"===e.key||"NumpadSubtract"===e.key||109===e.keyCode||189===e.keyCode;n&&t.mod&&this.zoomIn(e),o&&t.mod&&this.zoomOut(e)},zoomIn:function(e){e.preventDefault(),this.canvasScale=this.paperManager.scale.sx+this.scaleStep},zoomOut:function(e){e.preventDefault(),this.canvasScale=Math.max(this.minimumScale,this.paperManager.scale.sx-=this.scaleStep)}}},Jb={methods:{copyPasteHandler:function(e,t){var n=e.target.nodeName.toLowerCase(),o="body"===n,i=e.key.toLowerCase(),r="c"===i,a="v"===i;o&&r&&t.mod&&this.copy(e),o&&a&&t.mod&&this.paste(e)},copy:function(e){e.preventDefault(),window.ProcessMaker.$modeler.copyElement()},paste:function(e){e.preventDefault(),window.ProcessMaker.$modeler.pasteElements()}}},Qb=(n("4ec9"),tb.gridSize/2),ey=new Map;ey.set("Up",[0,-Qb]),ey.set("Down",[0,Qb]),ey.set("Left",[-Qb,0]),ey.set("Right",[Qb,0]);var ty=["PoolLane","processmaker.components.nodes.boundaryEvent.Shape"];function ny(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(oy(e)){var o=t.filter(iy);if(0!==o.length){var i=ry(e),r=_e(i,2),a=r[0],s=r[1];o.forEach((function(e){e.translate(a,s,{movedWithArrowKeys:!0}),sy(e)})),n()}}}function oy(e){var t=["up","down","left","right"];return t.some((function(t){return e.toLowerCase().includes(t)}))}function iy(e){return e&&!ty.includes(e.get("type"))}function ry(e){var t=e.match(/^(?:Arrow)?(Up|Down|Left|Right)$/);return null!==t?ey.get(t[1]):[0,0]}function ay(e){return!e||"processmaker.modeler.bpmn.pool"!==e.get("type")}function sy(e){var t=e.getParentCell();ay(t)||(t.component.expandToFitElement(e,t),t.component.laneSet&&t.component.updateLaneChildren())}var cy={methods:{escapeKeyHandler:function(e){this.selectedNode&&(e.preventDefault(),window.ProcessMaker.EventBus.$emit("custom-pointerclick",e))}},computed:{selectedNode:function(){return Kf.getters.getSelectedNode},movedElement:function(){return Kf.getters.getGhostNode}}},ly={mixins:[Kb,Jb,cy],computed:{clientLeftPaper:function(){return ze.getters.clientLeftPaper}},mounted:function(){document.addEventListener("keydown",this.keydownListener),document.addEventListener("keyup",this.keyupListener)},methods:{handleHotkeys:function(e,t){this.zoomInOutHandler(e,t),this.copyPasteHandler(e,t),this.escapeKeyHandler(e)},keyupListener:function(e){"Space"===e.code&&(this.isGrabbing=!1,this.paperManager.removeEventHandler("blank:pointermove"))},keydownListener:function(e){var t=this,n=this.isAppleOS(),o=n?e.metaKey:e.ctrlKey,i={mod:o,isAppleOS:n,modeler:this};try{this.handleHotkeys(e,i)}catch(a){console.error(a)}var r=!e.target.toString().toLowerCase().includes("body");r||("Space"===e.code&&(this.isGrabbing=!0,this.paperManager.addEventHandler("blank:pointermove",(function(e,n,o){if(!t.canvasDragPosition){var i=t.paperManager.scale;t.canvasDragPosition={x:n*i.sx,y:o*i.sy}}t.canvasDragPosition&&!t.clientLeftPaper&&t.paperManager.translate(e.offsetX-t.canvasDragPosition.x,e.offsetY-t.canvasDragPosition.y)}))),ny(e.key,ze.getters.highlightedShapes,this.pushToUndoStack))}}};n("5d41");function dy(e,t){while(!Object.prototype.hasOwnProperty.call(e,t))if(e=Fn(e),null===e)break;return e}function uy(){return uy="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=dy(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},uy.apply(this,arguments)}var py,hy=function(e){Bn(n,e);var t=Vn(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Wt(n,[{key:"clone",value:function(e,t,o){return this.withTimerKeys(uy(Fn(n.prototype),"clone",this).call(this,e,t,o))}},{key:"withTimerKeys",value:function(e){var t=this,o=n.timerPropertyKeys.find((function(e){return t.definition.eventDefinitions[0][e]}));return e.definition.eventDefinitions[0][o]||(e.definition.eventDefinitions[0][o]={}),e.definition.eventDefinitions[0][o].body=this.definition.eventDefinitions[0][o].body,e}}]),n}(an);function fy(e){return my.apply(this,arguments)}function my(){return my=w(b().mark((function e(t){var n,o,i;return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=gy(t),o=document.querySelector('[name="name"]')||document.querySelector('[name="text"]'),n&&o&&document.activeElement!==o){e.next=4;break}return e.abrupt("return");case 4:if(i=document.getElementById("accordion-button-Configuration"),!i||"false"!==i.getAttribute("aria-expanded")){e.next=10;break}return clearTimeout(py),i.click(),e.next=10,vy();case 10:n.style.outline="1px dashed blue",o.addEventListener("blur",(function(){n.style.outline=""})),o.focus(),o.select();case 14:case"end":return e.stop()}}),e)}))),my.apply(this,arguments)}function gy(e){if(e.selectors)return e.selectors.label||Array.from(e.selectors.root.children).find((function(e){return e.classList.contains("labels")}))}function vy(){return new Promise((function(e){py=setTimeout(e)}))}U(hy,"timerPropertyKeys",["timeDuration","timeDate","timeCycle"]);var by=n("21a6"),yy=n.n(by),wy=new WeakMap,xy=new WeakMap,ky=function(){function e(t){Ut(this,e),ap(this,wy,{writable:!0,value:void 0}),ap(this,xy,{writable:!0,value:void 0}),Qv(this,wy,t)}return Wt(e,[{key:"definitions",set:function(e){Qv(this,xy,e)}},{key:"getDefinitionsFromXml",value:function(e){var t=this;return new Promise((function(n,o){lp(t,wy).fromXML(e,(function(e,i){e&&o(e),i.exporter="ProcessMaker Modeler",i.exporterVersion="1.0",t.cleanBrokenReferences(i),n(i)}))}))}},{key:"cleanBrokenReferences",value:function(e){var t=e.rootElements,n=e.diagrams,o=[];t.forEach((function(t){"bpmn:Process"===t.$type&&t.flowElements&&(t.flowElements=t.flowElements.filter((function(e){return"bpmn:SequenceFlow"!==e.$type||(e.sourceRef&&e.targetRef||o.push(e),e.sourceRef&&e.targetRef)}))),"bpmn:Process"===t.$type&&t.laneSets&&t.laneSets.forEach((function(t){t.lanes=t.lanes.filter((function(t){if(!e.diagrams)return!1;var n=e.diagrams.find((function(e){return e.plane.planeElement.find((function(e){return e&&e.bpmnElement.id===t.id}))}));return n}))}))})),n.forEach((function(e){"bpmndi:BPMNDiagram"===e.$type&&e.plane&&e.plane.planeElement&&(e.plane.planeElement=e.plane.planeElement.filter((function(e){return"bpmndi:BPMNEdge"!==e.$type||e.bpmnElement&&!o.includes(e.bpmnElement)})))}))}},{key:"download",value:function(){lp(this,xy)&&lp(this,wy).toXML(lp(this,xy),{format:!0},(function(e,t){if(e)alert(e);else{if(Ci())return void(window.xml=t);var n=new File([t],"bpmnProcess.xml",{type:"text/xml"});yy.a.saveAs(n)}}))}}]),e}();function Cy(e){return e.isStartEvent()?Xt:e.isTask()?Jt:e.isGateway()?en:e.isIntermediateEvent()?nn:e.isEndEvent()?Zt:null}function Sy(e){if(!e)return!1;var t=Cy(e);return!t||!Object.values(t).includes(e.definition.name)}function Ey(e,t){return t.reduce((function(e,t){return e.concat(t.get("artifacts"))}),[]).filter((function(e){return"bpmn:Association"===e.$type})).filter((function(t){return t.targetRef===e.definition}))}function Ay(e,t){var n=Object.values(e).flatMap((function(e){return e.map((function(e){return t.find((function(t){return t.id===e.id}))}))})),o=t.filter((function(e){return!e.id}));return[].concat(g(n),g(o))}var My=function(){function e(t,n,o,i,r,a){Ut(this,e),this._nodeThatWillBeReplaced=t,this._definition=n,this._graph=o,this._newNode=i,this._processes=r,this._collaboration=a}return Wt(e,[{key:"migrate",value:function(){var e,t,n=this;Sy(this._nodeThatWillBeReplaced)&&(this._definition.name=this._nodeThatWillBeReplaced.definition.name);var o=function(e){var t=n._graph.getLinks().find((function(t){return t.component&&t.component.node.definition===e}));t.component.node._modelerId+="_replaced"},i=this._nodeThatWillBeReplaced.definition.get("incoming"),r=this._nodeThatWillBeReplaced.definition.get("outgoing");(e=this._definition.get("incoming")).push.apply(e,g(i)),(t=this._definition.get("outgoing")).push.apply(t,g(r)),r.forEach((function(e){e.set("sourceRef",n._newNode.definition),n._handleSequenceFlowForGateway(e),o(e)})),i.forEach((function(e){e.set("targetRef",n._newNode.definition),n._handleSequenceFlowForGateway(e),o(e)}));var a=Ey(this._nodeThatWillBeReplaced,this._processes);if(a.forEach((function(e){e.set("targetRef",n._newNode.definition),o(e)})),this._collaboration){var s=this._collaboration.get("messageFlows");s.filter((function(e){return e.sourceRef===n._nodeThatWillBeReplaced.definition})).forEach((function(e){e.set("sourceRef",n._newNode.definition),o(e)})),s.filter((function(e){return e.targetRef===n._nodeThatWillBeReplaced.definition})).forEach((function(e){e.set("targetRef",n._newNode.definition),o(e)}))}}},{key:"_handleSequenceFlowForGateway",value:function(e){var t=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.sourceRef.$type);t||delete e.conditionExpression}}]),e}(),Ty=["bpmn:ServiceTask","bpmn:ManualTask","bpmn:CallActivity","bpmn:ScriptTask"],Py=function(e){if(-1!==Ty.indexOf(e.bpmnType)){e.inspectorConfig[0].items.splice(e.loopInspectorIndex||1,0,Mp);var t=e.inspectorHandler||function(){},n=e.inspectorData||null;e.inspectorHandler=function(e,n,o,i,r,a){t(e,n,o,i,r,a),e=Ep(e,n,o,i,r),a(e)},e.inspectorData=function(e,t,o){var i=n?n(e,t,o):t(e);return Ap(i,e,t,o),i}}},_y={methods:{cloneNodesSelection:function(){var e=this,t=[],n=[],o=[],i=[],r=[],a=this.highlightedNodes,s=this.$refs.selector.$el,c=[us,rs,Ni,ws,sn],l=[wt],d=[gt];return"function"===typeof s.getBoundingClientRect&&a.forEach((function(a){if(c.includes(a.type)){var s=e.cloneFlowAndSetNewId(a);n.push(s),t.push(s)}else if(l.includes(a.type)){var u=e.cloneFlowAndSetNewId(a);i.push(u),t.push(u)}else if(d.includes(a.type)){var p=e.cloneFlowAndSetNewId(a);r.push(p),t.push(p)}else{var h=e.cloneElementAndCalculateOffset(a);a.definition&&"bpmn:BoundaryEvent"!==a.definition.$type?t.push(h):o.push(h)}})),t=[].concat(g(t),o),this.connectClonedFlows(n,t),this.connectClonedDataInputAssociations(i,t),this.connectClonedDataOutputAssociations(r,t),t},getDataInputOutputAssociationTargetRef:function(e){if("bpmn:DataInput"===e.targetRef.$type){var t=e.targetRef.$parent;return Dt(t,this)}if("bpmn:DataInputAssociation"===e.targetRef.$type){var n=e.targetRef.$parent;return Dt(n,this)}return e.targetRef},cloneFlowAndSetNewId:function(e){var t=e.cloneFlow(this.nodeRegistry,this.moddle,this.$t);return t.setIds(this.nodeIdGenerator),t},cloneElementAndCalculateOffset:function(e){var t=e.clone(this.nodeRegistry,this.moddle,this.$t),n=this.$refs.selector.$el.getBoundingClientRect(),o=n.height,i=this.paper.scale(),r=i.sy,a=o/r;return t.diagram.bounds.y+=a,t.setIds(this.nodeIdGenerator),t},connectClonedFlows:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef,r=o.definition.targetRef,a=t.find((function(e){return e.cloneOf===i.id})),s=t.find((function(e){return e.cloneOf===r.id}));if(a&&s){e.definition.set("sourceRef",a.definition),e.definition.set("targetRef",s.definition),a.definition.outgoing?a.definition.outgoing.push(e.definition):a.definition.set("outgoing",[e.definition]),s.definition.incoming?s.definition.incoming.push(e.definition):s.definition.set("incoming",[e.definition]);var c=n.$refs.selector.$el.getBoundingClientRect(),l=c.height,d=n.paper.scale(),u=d.sy,p=l/u;e.diagram.waypoint.forEach((function(e){e.y+=p}))}else t.splice(t.indexOf(e),1)}))},connectClonedDataInputAssociations:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef[0],r=t.find((function(e){return e.cloneOf===i.id})),a=n.getDataInputOutputAssociationTargetRef(o.definition),s=t.find((function(e){return e.cloneOf===a.id})),c=Ot(n.moddle,s,r.definition);e.definition.set("sourceRef",[r.definition]),e.definition.set("targetRef",c),s.definition.set("dataInputAssociations",[e.definition])}))},connectClonedDataOutputAssociations:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef||o.definition.$parent,r=o.definition.targetRef,a=t.find((function(e){return e.cloneOf===i.id})),s=t.find((function(e){return e.cloneOf===r.id}));e.definition.set("targetRef",s.definition),e.definition.set("sourceRef",a.definition);var c=a.definition.get("dataOutputAssociations")||[];a.definition.set("dataOutputAssociations",[].concat(g(c),[e.definition]))}))}}},Oy=function(){var e=this,t=e._self._c;return t("div",{staticClass:"rail-container",attrs:{"data-cy":"rail-bottom"}},[t("div",{ref:"railLeftBox",staticClass:"rail-left",style:[e.overlap?{position:"relative"}:{position:"absolute"}]},[t("MiniPaperControl",{directives:[{name:"show",rawName:"v-show",value:e.showComponent,expression:"showComponent"}],attrs:{"paper-manager":e.paperManager,graph:e.graph}}),t("ZoomControl",{ref:"zoomBox",attrs:{"paper-manager":e.paperManager}})],1),t("div",{staticClass:"rail-center",style:[e.overlap?{width:"auto"}:{width:"100%"}]},[t("UndoRedoControl",{directives:[{name:"show",rawName:"v-show",value:e.showComponent,expression:"showComponent"}],ref:"undoRedoBox",attrs:{"is-rendering":e.isRendering},on:{"load-xml":function(t){return e.$emit("load-xml")},clearSelection:function(t){return e.$emit("clearSelection")}}}),t("Controls",{directives:[{name:"show",rawName:"v-show",value:e.showComponent,expression:"showComponent"}],ref:"controlBox",attrs:{nodeTypes:e.nodeTypes},on:{onCreateElement:e.onCreateElementHandler,onSetCursor:e.onSetCursorHandler}})],1)])},Dy=[],Iy=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mini-paper-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"mini-paper-button",class:e.miniMapOpen?"mini-paper-button-active":"",attrs:{type:"button","data-cy":"mini-paper-button",title:e.miniMapOpen?e.$t("Hide Mini-Map"):e.$t("Show Mini-Map")},on:{click:function(t){e.miniMapOpen=!e.miniMapOpen}}},[t("inline-svg",{attrs:{src:e.miniMapIcon}})],1),t("mini-paper",{attrs:{isOpen:e.miniMapOpen,paperManager:e.paperManager,graph:e.graph}})],1)},Ny=[],Ry=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mini-paper-container",class:e.isOpen?"opened":"closed",attrs:{"data-cy":"mini-map-box"},on:{click:e.movePaper}},[t("div",{ref:"miniPaper",staticClass:"mini-paper"})])},jy=[],Ly=new WeakMap,By=function(){function e(t){Ut(this,e),ap(this,Ly,{writable:!0,value:void 0}),Qv(this,Ly,t)}return Wt(e,[{key:"miniMap",get:function(){return lp(this,Ly)}},{key:"scaleMiniMap",value:function(){this.miniMap.scaleContentToFit({padding:10,maxScaleX:.5,maxScaleY:.5})}},{key:"calculateNewPaperPosition",value:function(e,t,n,o,i,r){var a=this.miniMap.paperToLocalPoint(e,t),s=a.x,c=a.y;return{newX:i/2-s*n,newY:r/2-c*o}}}],[{key:"factory",value:function(e,t){var n=new d["dia"].Paper({el:t,model:e,width:230,height:200,interactive:!1});return new this(n)}}]),e}(),Fy={data:function(){return{miniMapManager:null,newX:0,newY:0}},props:{isOpen:{type:Boolean},paperManager:{type:Object},graph:{type:Object}},watch:{isOpen:function(e){e&&this.miniMapManager.scaleMiniMap()}},computed:{miniMap:function(){return this.miniMapManager.miniMap}},methods:{movePaper:function(e){var t=e.offsetX,n=e.offsetY,o=this.paperManager.scale,i=o.sx,r=o.sy,a=this.paperManager.paper.el,s=a.clientWidth,c=a.clientHeight,l=this.miniMapManager.calculateNewPaperPosition(t,n,i,r,s,c),d=l.newX,u=l.newY;this.newX=d,this.newY=u,this.paperManager.translate(this.newX,this.newY)}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return window.Cypress&&(window.MiniPaper=e),t.next=3,e.$nextTick();case 3:e.miniMapManager=By.factory(e.graph,e.$refs.miniPaper),e.paperManager.addEventHandler("render:done",e.miniMapManager.scaleMiniMap,e),window.ProcessMaker.EventBus.$on("modeler-change",(function(){return e.miniMapManager.scaleMiniMap()}));case 6:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){this.paperManager.removeEventHandler("render:done",this.miniMapManager.scaleMiniMap,this)}},zy=Fy,Hy=(n("11cc"),ut(zy,Ry,jy,!1,null,"76e95759",null)),qy=Hy.exports,Vy={components:{InlineSvg:_m.a,MiniPaper:qy},props:{paperManager:Object,graph:Object},data:function(){return{miniMapOpen:!1,miniMapIcon:n("853d")}}},Uy=Vy,Gy=(n("b32f"),ut(Uy,Iy,Ny,!1,null,"7f06057f",null)),Wy=Gy.exports,$y=function(){var e=this,t=e._self._c;return t("div",{staticClass:"zoom-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button",attrs:{type:"button","data-cy":"zoom-out-control",title:e.$t("Zoom Out")},on:{click:e.onClickZoomOut}},[t("inline-svg",{attrs:{src:e.minusIcon}})],1),e.paperManager?t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button zoom-reset",attrs:{"data-cy":"zoom-reset-control",title:e.$t("Reset to initial scale")},on:{click:e.onClickReset}},[e._v(e._s(e.percentageText))]):e._e(),t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button",attrs:{type:"button","data-cy":"zoom-in-control",title:e.$t("Zoom In")},on:{click:e.onClickZoomIn}},[t("inline-svg",{attrs:{src:e.plusIcon}})],1)])},Xy=[],Yy={components:{InlineSvg:_m.a},props:{paperManager:Object},data:function(){return{initialScale:1,minimumScale:.2,scaleStep:.1,minusIcon:n("32f48"),plusIcon:n("2d60")}},computed:{percentageText:function(){return"".concat(Math.round(100*this.$props.paperManager.scale.sx),"%")}},methods:{onClickZoomOut:function(){this.paperManager.scale=Math.max(this.minimumScale,this.paperManager.scale.sx-=this.scaleStep)},onClickZoomIn:function(){this.paperManager.scale=this.paperManager.scale.sx+this.scaleStep},onClickReset:function(){this.paperManager.scale=this.initialScale}}},Zy=Yy,Ky=(n("3061"),ut(Zy,$y,Xy,!1,null,"1cb38178",null)),Jy=Ky.exports,Qy=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ur-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"ur-button",attrs:{type:"button","data-cy":"undo-control",disabled:!e.canUndo,title:e.$t("Undo")},on:{click:e.undo}},[t("inline-svg",{attrs:{src:e.undoIcon}})],1),t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"ur-button",attrs:{type:"button","data-cy":"redo-control",disabled:!e.canRedo,title:e.$t("Redo")},on:{click:e.redo}},[t("inline-svg",{attrs:{src:e.redoIcon}})],1)])},ew=[],tw={components:{InlineSvg:_m.a},props:{isRendering:{type:Boolean}},data:function(){return{undoIcon:n("e69d"),redoIcon:n("ffaa")}},watch:{canUndo:function(e){e||this.$root.$emit("bv::hide::tooltip")},canRedo:function(e){e||this.$root.$emit("bv::hide::tooltip")}},computed:{canUndo:function(){return Xm.getters.canUndo},canRedo:function(){return Xm.getters.canRedo}},methods:{undo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Xm.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Xm.dispatch("redo").then((function(){return e.$emit("load-xml")}))}}},nw=tw,ow=(n("f362"),ut(nw,Qy,ew,!1,null,"379ae012",null)),iw=ow.exports,rw=function(){var e=this,t=e._self._c;return e.controls?t("ul",{staticClass:"control-list"},[e._l(e.controls,(function(n){return t("li",{key:n.id,class:["control-item",{active:e.selectedItem&&e.selectedItem.type===n.type}],attrs:{id:n.id,"data-test":"".concat(n.type,"-main")},on:{click:function(t){return t.stopPropagation(),e.onClickControlHandler(t,n)}}},[t("SubmenuPopper",{attrs:{data:n,selectedItem:e.selectedSubmenuItem,popperType:e.popperType},on:{clickToSubmenu:e.clickToSubmenuHandler}})],1)})),t("li",{staticClass:"control-item"},[t("div",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],class:{"control-add":!0,"control-active":e.explorerOpen},attrs:{title:e.$t("Add")},on:{click:e.toggleExplorer}},[t("inline-svg",{attrs:{src:e.plusIcon}})],1)])],2):e._e()},aw=[],sw=function(){var e=this,t=e._self._c;return e.data.items?t("popper",{attrs:{trigger:"clickToOpen",options:{placement:"top",modifiers:{offset:{offset:"0,5px"},preventOverflow:{escapeWithReference:!0}}},"append-to-body":!0,"visible-arrow":!1,"force-show":e.popperType===e.data.type}},[t("div",[t("ul",{staticClass:"control-submenu"},e._l(e.data.items,(function(n,o){return t("li",{key:o,class:["control-submenu-list",{active:e.selectedItem===n.type}],attrs:{"data-test":n.type},on:{click:function(t){return e.onClickHandler(t,n)}}},[t("inline-svg",{attrs:{src:n.icon,alt:n.label}}),t("div",{staticClass:"control-submenu-list-label"},[e._v(" "+e._s(n.label)+" ")])],1)})),0)]),t("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"control-submenu-item",attrs:{slot:"reference",alt:e.data.label,title:e.$t(e.data.label)},slot:"reference"},[t("div",{staticClass:"control-submenu-options"},[t("span")]),t("inline-svg",{attrs:{src:e.data.icon}})],1)]):t("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"control-submenu-item",attrs:{alt:e.data.label,title:e.$t(e.data.label)}},[t("inline-svg",{attrs:{src:e.data.icon}})],1)},cw=[],lw=n("526e"),dw=n.n(lw),uw=(n("a101"),{props:{data:{type:Object},selectedItem:{type:String},popperType:{type:String}},components:{Popper:dw.a,InlineSvg:_m.a},data:function(){return{wasClickedSubmenu:!1,element:null,wasClicked:!1}},methods:{onClickHandler:function(e,t){e.stopPropagation(),this.$emit("clickToSubmenu",{event:e,control:t})}}}),pw=uw,hw=(n("6840"),ut(pw,sw,cw,!1,null,"acf58eca",null)),fw=hw.exports,mw={components:{SubmenuPopper:fw,InlineSvg:_m.a},props:{nodeTypes:Array},mixins:[dm],data:function(){return{plusIcon:n("2d60"),currentType:null}},created:function(){Kf.dispatch("getUserPinnedObjects")},computed:{controls:function(){return Kf.getters.getPinnedNodeTypes},explorerOpen:function(){return Kf.getters.getExplorerOpen}},methods:{clickToSubmenuHandler:function(e){window.ProcessMaker.EventBus.$off("custom-pointerclick"),this.wasClicked=!1,this.parent=this.selectedItem,this.selectedSubmenuItem=e.control.type,this.onClickHandler(e.event,e.control)},onClickControlHandler:function(e,t){this.selectedSubmenuItem=null,this.popperType=this.currentType===t.type?null:t.type,this.onClickHandler(e,t),this.currentType=this.popperType},toggleExplorer:function(){this.deselect(),this.popperType=null,this.selectedSubmenuItem=null,Kf.commit("toggleExplorer"),Kf.commit("clearFilteredNodes"),Kf.commit("clearFilteredPmBlockNodes")}}},gw=mw,vw=(n("a87b"),ut(gw,rw,aw,!1,null,"0e6b16b8",null)),bw=vw.exports,yw={components:{MiniPaperControl:Wy,ZoomControl:Jy,UndoRedoControl:iw,Controls:bw},props:{paperManager:Object,graph:Object,isRendering:Boolean,nodeTypes:Array},data:function(){return{overlap:!1,widthOverlapControl:0,leftOverlapUndoRedo:0,controlObserver:null}},created:function(){this.controlObserver=new ResizeObserver(this.onControlObserver)},methods:{onCreateElementHandler:function(e){this.$emit("onCreateElement",e)},onSetCursorHandler:function(e){this.$emit("set-cursor",e)},onControlObserver:function(e){var t=e[0].target.getBoundingClientRect(),n=this.$refs.zoomBox.$el.getBoundingClientRect(),o=this.$refs.undoRedoBox.$el.getBoundingClientRect();if(this.overlap){if(t.width<this.widthOverlapControl){var i=window.getComputedStyle(this.$refs.zoomBox.$el),r=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10),a=window.getComputedStyle(this.$refs.railLeftBox),s=parseInt(a.paddingLeft,10)+parseInt(a.paddingRight,10),c=this.leftOverlapUndoRedo+(this.widthOverlapControl-t.width)-r-s;c>n.right&&(this.overlap=!1)}}else o.left<n.right&&(this.overlap=!0,this.widthOverlapControl=t.width,this.leftOverlapUndoRedo=o.left)}},computed:{showComponent:function(){return ze.getters.showComponent}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(Oe["nextTick"])();case 2:e.controlObserver.observe(e.$refs.controlBox.$el);case 3:case"end":return t.stop()}}),t)})))()}},ww=yw,xw=(n("79e3"),ut(ww,Oy,Dy,!1,null,"575d4232",null)),kw=xw.exports,Cw=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Sw=[],Ew=function(e){Bn(n,e);var t=Vn(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Wt(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=yt(this.moddle),r=bt(this.moddle);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var a=n.sourceAnchor,s=n.targetAnchor;i.waypoint=[a,s].map((function(e){return o.moddle.create("dc:Point",e)}));var c=new an(gt,r,i);c.dataAssociationProps={sourceShape:e,targetCoords:{x:void 0,y:void 0}};var l=k()(e,"component.node"),d=l.definition.get("dataOutputAssociations")||[];return l.definition.set("dataOutputAssociations",[].concat(g(d),[c.definition])),c}}],[{key:"isValid",value:function(e){var t=e.sourceShape,n=e.targetShape,o=k()(t,"component.node"),i=k()(n,"component.node");if(!i)return!1;var r=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],a=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],s=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateCatchEvent","bpmn:StartEvent"],c=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],l=o.definition.$type,d=i.definition.$type,u="bpmn:DataStoreReference"===o.definition.$type,p="bpmn:DataObjectReference"===o.definition.$type,h="bpmn:DataStoreReference"===i.definition.$type,f="bpmn:DataObjectReference"===i.definition.$type;return!(!u||!a.includes(d))||(!(!p||!c.includes(d))||(!(!h||!r.includes(l))||f&&s.includes(l)))}},{key:"isValidSourceNode",value:function(e){return!Wn.isNodeDisallowedFromDataAssociation(e)}}]),n}(Wn),Aw=[Ew,as,ms],Mw={name:sn,components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null}},computed:{isValidConnection:function(){var e=this;return Aw.some((function(t){return t.isValid({sourceShape:e.sourceShape,targetShape:e.target,sourceConfig:e.sourceConfig,targetConfig:e.targetConfig})}))},targetType:function(){return k()(this.target,"component.node.type")},shapeName:function(){return this.node.definition.get("name")},nameLabel:{get:function(){return this.shape.label(0).attrs.text.text},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.shape.label(0,{attrs:{text:{text:e}}})}}},watch:{},methods:{completeLink:function(){var e=this,t=Aw.find((function(t){return t.isValid({sourceShape:e.sourceShape,targetShape:e.target,sourceConfig:e.sourceConfig,targetConfig:e.targetConfig})})),n=new t(this.nodeRegistry,this.moddle,this.paper),o=this.shape.findView(this.paper);this.$emit("replace-generic-flow",{actualFlow:n.makeFlowNode(this.sourceShape,this.target,o),genericFlow:this.node,targetNode:k()(this.target,"component.node")})},updateRouter:function(){this.shape.router("normal")},createDefaultFlowMarker:function(){this.shape.attr("line",{strokeWidth:1,strokeDasharray:"2 2"})}},mounted:function(){this.shape=new d["shapes"].standard.Link,this.shape.connector("rounded",{radius:5}),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},Tw=Mw,Pw=ut(Tw,Cw,Sw,!1,null,null,null),_w=Pw.exports,Ow=function(){var e=this,t=e._self._c;return e.showLasso&&e.style?t("div",{ref:"drag",staticClass:"box",style:e.style,attrs:{"data-cy":"selection-box","data-length":e.selected.length}},[t("crown-multiselect",e._g({attrs:{paper:e.paperManager.paper,graph:e.$parent.graph,moddle:e.$parent.moddle,collaboration:e.$parent.collaboration,"process-node":e.$parent.processNode,"plane-elements":e.$parent.planeElements,"is-rendering":e.$parent.isRendering,"dropdown-data":[],"has-pools":e.hasPoolsOrLanesSelected},on:{"save-state":function(t){return e.$emit("save-state")}}},e.$listeners))],1):e._e()},Dw=[],Iw=function(){var e=this,t=e._self._c;return e.isMultiSelect?t("div",{staticClass:"crown-config crown-multiselect",style:e.style,attrs:{role:"menu"}},[e._t("default"),e._l(e.availableButtons,(function(e){return t("button",{key:e.label,staticClass:"crown-button",attrs:{"aria-label":e.label,title:e.label,"data-test":e.testId,role:e.role},on:{click:e.action}},["fpm"===e.iconPrefix?t("font-awesome-icon",{attrs:{icon:[e.iconPrefix,"fa-".concat(e.icon)]}}):t("i",{class:"".concat(e.iconPrefix," fa-").concat(e.icon," text-dark")})],1)})),t("crown-align",{directives:[{name:"show",rawName:"v-show",value:e.showAlignmentButtons,expression:"showAlignmentButtons"}],attrs:{paper:e.paper},on:{"save-state":function(t){return e.$emit("save-state")}}})],2):e._e()},Nw=[],Rw=function(){var e=this,t=e._self._c;return e.isMultiSelect?t("div",{staticClass:"crown-config crown-align",style:e.style,attrs:{role:"menu"}},[e._t("default"),e._l(e.availableButtons,(function(e){return t("button",{key:e.label,staticClass:"crown-button",attrs:{"aria-label":e.label,title:e.label,"data-test":e.testId,role:e.role,disabled:e.disabled},on:{mousedown:function(e){e.stopPropagation(),e.preventDefault()},click:function(t){return t.stopPropagation(),t.preventDefault(),e.action.apply(null,arguments)}}},[t("font-awesome-icon",{attrs:{icon:["fpm","fa-".concat(e.icon)]}})],1)}))],2):e._e()},jw=[],Lw=function(e){return e.position().y+e.size().height},Bw=function(e){return e.position().x},Fw=function(e){return e.position().x+e.size().width/2},zw=function(e){return e.position().y+e.size().height/2},Hw=function(e){return e.position().x+e.size().width},qw=function(e){return e.position().y},Vw=function(e){return Boolean(e&&e.position&&e.size)},Uw={poolLane:"PoolLane",boundaryEvent:"processmaker.components.nodes.boundaryEvent.Shape"},Gw=[Uw.boundaryEvent,Uw.poolLane],Ww=function(e){return!Gw.includes(e.get("type"))};function $w(e){return Vw(e)&&Ww(e)}function Xw(e,t){var n=t-Lw(e);e.translate(0,n)}function Yw(e,t){var n=t-Bw(e);e.translate(n,0)}function Zw(e,t){var n=t-Hw(e);e.translate(n,0)}function Kw(e,t){var n=t-Fw(e);e.translate(n,0)}function Jw(e,t){var n=t-zw(e);e.translate(0,n)}function Qw(e,t){var n=t-qw(e);e.translate(0,n)}function ex(e){var t=cx(e);e.forEach((function(e){Yw(e,t.left)}))}function tx(e){var t=cx(e);e.forEach((function(e){Zw(e,t.right)}))}function nx(e){var t=cx(e);e.forEach((function(e){Qw(e,t.top)}))}function ox(e){var t=cx(e);e.forEach((function(e){Xw(e,t.bottom)}))}function ix(e){var t=cx(e);e.forEach((function(e){Kw(e,t.hMiddle)}))}function rx(e){var t=cx(e);e.forEach((function(e){Jw(e,t.vMiddle)}))}function ax(e){var t=cx(e),n=e.length,o=3;if(!(n<o)){var i=e.reduce((function(e,t){return t.size().height+e}),0),r=e.sort((function(e,t){return zw(e)-zw(t)})),a=t.top+e[0].size().height,s=(t.height-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(Qw(e,a+s),a+=s+e.size().height)}))}}function sx(e){var t=cx(e),n=e.length,o=3;if(!(n<o)){var i=e.reduce((function(e,t){return t.size().width+e}),0),r=e.sort((function(e,t){return Fw(e)-Fw(t)})),a=t.left+e[0].size().width,s=(t.width-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(Yw(e,a+s),a+=s+e.size().width)}))}}function cx(e){if(!e||!e.length||0===e.length)return{left:0,right:0,top:0,bottom:0,width:0,height:0,vMiddle:0,hMiddle:0};var t=function(e){return Vw(e)?e.position().x:0},n=function(e){return Vw(e)?e.position().x+e.size().width:0},o=function(e){return Vw(e)?e.position().y:0},i=function(e){return Vw(e)?e.position().y+e.size().height:0},r=Math.min.apply(Math,g(e.map(t))),a=Math.max.apply(Math,g(e.map(n))),s=Math.min.apply(Math,g(e.map(o))),c=Math.max.apply(Math,g(e.map(i))),l=a-r,d=c-s;return{left:r,right:a,top:s,bottom:c,width:l,height:d,vMiddle:s+d/2,hMiddle:r+l/2}}function lx(e){var t=e.filter((function(e){return $w(e)})),n=cx(e),o=t.length>1;return{can:{align:{left:o&&t.some((function(e){return Bw(e)!==n.left})),horizontalCenter:o&&t.some((function(e){return Fw(e)!==n.hMiddle})),right:o&&t.some((function(e){return Hw(e)!==n.right})),bottom:o&&t.some((function(e){return Lw(e)!==n.bottom})),verticalCenter:o&&t.some((function(e){return zw(e)!==n.vMiddle})),top:o&&t.some((function(e){return qw(e)!==n.top}))},distribute:{horizontally:o&&t.length>2,vertically:o&&t.length>2}},align:{left:function(){return ex(t)},horizontalCenter:function(){return ix(t)},right:function(){return tx(t)},bottom:function(){return ox(t)},verticalCenter:function(){return rx(t)},top:function(){return nx(t)}},distribute:{horizontally:function(){return sx(t)},vertically:function(){return ax(t)}}}}var dx,ux,px,hx,fx={components:{FontAwesomeIcon:xn["FontAwesomeIcon"]},props:{paper:Object,hasPools:Boolean},data:function(){return{runningInCypressTest:Ci(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null,buttons:[{label:this.$t("Align Left"),icon:"align-left",testId:"align-left",role:"menuitem",action:this.alignLeft,condition:"align.left",disabled:!1},{label:this.$t("Center Horizontally"),icon:"center-horizontally",testId:"align-horizontally",role:"menuitem",action:this.centerHorizontally,condition:"align.horizontalCenter",disabled:!1},{label:this.$t("Align Right"),icon:"align-right",testId:"align-right",role:"menuitem",action:this.alignRight,condition:"align.right",disabled:!1},{label:this.$t("Align Bottom"),icon:"align-bottom",testId:"align-bottom",role:"menuitem",action:this.alignBottom,condition:"align.bottom",disabled:!1},{label:this.$t("Center Vertically"),icon:"center-vertically",testId:"center-vertically",role:"menuitem",action:this.centerVertically,condition:"align.verticalCenter",disabled:!1},{label:this.$t("Align Top"),icon:"align-top",testId:"align-top",role:"menuitem",action:this.alignTop,condition:"align.top",disabled:!1},{label:this.$t("Distribute Horizontally"),icon:"distribute-horizontally",testId:"distribute-horizontally",role:"menuitem",action:this.distributeHorizontally,condition:"distribute.horizontally",disabled:!1},{label:this.$t("Distribute Vertically"),icon:"distribute-vertically",testId:"distribute-vertically",role:"menuitem",action:this.distributeVertically,condition:"distribute.vertically",disabled:!1}]}},created:function(){this.$t=this.$t.bind(this),cn["library"].add(gn),cn["library"].add(mn),cn["library"].add(vn),cn["library"].add(bn),cn["library"].add(fn),cn["library"].add(hn),cn["library"].add(wn),cn["library"].add(yn)},watch:{selectedShapes:function(){this.$root.$emit("bv::hide::tooltip")}},computed:{selectedShapes:function(){return this.disableButtons(),lx(ze.getters.highlightedShapes)},isMultiSelect:function(){var e=ze.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return ze.getters.highlightedShapes},availableButtons:function(){var e=this.hasPools;return this.buttons.filter((function(t){return"copy-button"===t.testId?!e:"clone-button"!==t.testId||!e}))}},methods:{disableButtons:function(){var e=lx(ze.getters.highlightedShapes);this.buttons.forEach((function(t){t.disabled=!Object(ft["get"])(e.can,t.condition,!0)}))},alignLeft:function(){this.undoableAction(this.selectedShapes.align.left)},centerHorizontally:function(){this.undoableAction(this.selectedShapes.align.horizontalCenter)},alignRight:function(){this.undoableAction(this.selectedShapes.align.right)},alignBottom:function(){this.undoableAction(this.selectedShapes.align.bottom)},centerVertically:function(){this.undoableAction(this.selectedShapes.align.verticalCenter)},alignTop:function(){this.undoableAction(this.selectedShapes.align.top)},distributeHorizontally:function(){this.undoableAction(this.selectedShapes.distribute.horizontally)},distributeVertically:function(){this.undoableAction(this.selectedShapes.distribute.vertically)},undoableAction:function(e){e(),this.$emit("save-state"),this.disableButtons()},paperNotRendered:function(){return!this.isRendering},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,ze.getters.allowSavingElementPosition&&this.$emit("save-state")},paperDoneRendering:function(){var e=this;if(this.isRendering)return new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown)},setUpPositionHandling:function(){}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig();case 5:case"end":return t.stop()}}),t)})))()}},mx=fx,gx=(n("970e"),n("9669"),ut(mx,Rw,jw,!1,null,"3b497294",null)),vx=gx.exports,bx={props:{paper:Object,hasPools:Boolean},components:{crownAlign:vx,FontAwesomeIcon:xn["FontAwesomeIcon"]},data:function(){return{showAlignmentButtons:!1,runningInCypressTest:Ci(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null,buttons:[{label:"Copy Selection",iconPrefix:"fa",icon:"clipboard",testId:"copy-button",role:"menuitem",action:this.copySelection},{label:"Clone Selection",iconPrefix:"fa",icon:"copy",testId:"clone-button",role:"menuitem",action:this.cloneSelection},{label:"Align",iconPrefix:"fpm",icon:"align-left",testId:"align",role:"menuitem",action:this.showAlign},{label:"Delete Element",iconPrefix:"fa",icon:"trash-alt",testId:"delete-button",role:"menuitem",action:this.deleteElement}]}},created:function(){this.$t=this.$t.bind(this),cn["library"].add(mn)},computed:{isMultiSelect:function(){var e=ze.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return ze.getters.highlightedShapes},availableButtons:function(){var e=this.hasPools;return this.buttons.filter((function(t){return"copy-button"===t.testId?!e:"clone-button"!==t.testId||!e}))}},methods:{showAlign:function(){this.showAlignmentButtons=!this.showAlignmentButtons},copySelection:function(){this.$emit("copy-selection")},cloneSelection:function(){this.$emit("clone-selection")},deleteElement:function(){this.$emit("remove-nodes")},paperNotRendered:function(){return!this.isRendering},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,ze.getters.allowSavingElementPosition&&this.$emit("save-state")},paperDoneRendering:function(){var e=this;if(this.isRendering)return new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown)},setUpPositionHandling:function(){}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig();case 5:case"end":return t.stop()}}),t)})))()}},yx=bx,wx=(n("2fe7"),ut(yx,Iw,Nw,!1,null,"4c5325cc",null)),xx=wx.exports,kx={name:"Selection",components:{CrownMultiselect:xx},props:{graph:Object,paperManager:Object,useModelGeometry:Boolean,processNode:Object},data:function(){return{start:null,isSelecting:!1,isSelected:!1,selected:[],conectedLinks:[],dragging:!1,style:{left:"0px",top:"0px",width:"0px",height:"0px"},mouseX:0,mouseY:0,top:0,left:0,initialPosition:null,hasMouseDown:!1,hasMouseMoved:!1,showLasso:!1,isOutOfThePool:!1,stopForceMove:!1,draggableBlackList:[rs],selectionBlackList:[sn],selectableBlackList:[sn],newPool:null,oldPool:null,isValidSelectionLinks:!0,invalidPool:null}},mounted:function(){this.paperManager.paper.on("scale:changed ",this.updateSelectionBox),this.paperManager.paper.on("translate:changed ",this.translateChanged)},computed:{hasPoolsOrLanesSelected:function(){return this.selected.some((function(e){return e.model.component.node.type===Un||e.model.component.node.type===rs}))}},watch:{selected:function(e){this.prepareConectedLinks(e),this.addToHighlightedNodes(e)}},methods:{selectElements:function(e){var t=this;return w(b().mark((function n(){return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$nextTick();case 2:return t.clearSelection(),t.selected=e,t.showLasso=!0,t.isSelected=!0,t.isSelecting=!0,t.start=null,n.next=10,t.$nextTick();case 10:t.updateSelectionBox();case 11:case"end":return n.stop()}}),n)})))()},selectElement:function(e){var t=arguments,n=this;return w(b().mark((function o(){var i;return b().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=t.length>1&&void 0!==t[1]&&t[1],!e.model.component||!n.selectableBlackList.includes(e.model.component.node.type)){o.next=3;break}return o.abrupt("return");case 3:return n.showLasso=!0,n.isSelected=!0,n.isSelecting=!0,n.start=null,i?n.shiftKeySelectionHandler(e):n.selected=[e],n.filterSelected(),o.next=11,n.$nextTick();case 11:!1===ze.getters.isReadOnly&&n.updateSelectionBox();case 12:case"end":return o.stop()}}),o)})))()},shiftKeySelectionHandler:function(e){var t=this;if(!(e&&e.model&&e.model.component&&this.draggableBlackList.includes(e.model.component.node.type))){var n=this.selected.find((function(e){return t.draggableBlackList.includes(e.model.component.node.type)}));if(n)this.selected=[e];else{var o=this.selected.find((function(e){return e.model.component.node.type===Un}));o&&e.model.component.node.type!==Un?this.selected=[e]:e.model.component&&e.model.component.node.type===Un?this.hasOnlyPools(this.selected)?this.selectOrUnselectShape(e):this.selected=[e]:e.model.component&&e.model.component.node.pool&&(o=this.getPool(this.selected),o&&e.model.component.node.pool.id!==o.model.get("id"))?this.selected=[e]:this.selectOrUnselectShape(e)}}},selectOrUnselectShape:function(e){var t=this.selected.find((function(t){return t.id===e.id}));t?this.selected=this.selected.filter((function(t){return t.id!==e.id})):this.selected.push(e)},clearSelection:function(){this.initSelection()},initSelection:function(){this.isSelecting=!1,this.start=null,this.selected=[],this.showLasso=!1,this.isSelected=!1,this.style={left:"0px",top:"0px",width:"0px",height:"0px"}},startSelection:function(e){var t=this.paperManager.paper,n=d["util"].normalizeEvent(e),o=n.clientX,i=n.clientY,r=n.offsetX,a=n.offsetY,s=t.$el.offset();this.clearSelection(),this.isSelecting=!0,this.showLasso=!0,this.start={x:o-s.left+window.pageXOffset+t.$el.scrollLeft(),y:i-s.top+window.pageYOffset+t.$el.scrollTop()},this._offset={x:r,y:a}},updateSelection:function(e){var t=this.paperManager.paper;if(this.isSelecting&&!this.isSelected&&this.start){var n=d["util"].normalizeEvent(e),o=t.$el.offset(),i={x:n.clientX-o.left+window.pageXOffset+t.$el.scrollLeft(),y:n.clientY-o.top+window.pageYOffset+t.$el.scrollTop()},r={height:i.y-this.start.y,width:i.x-this.start.x};this.style.left="".concat(r.width<0?this._offset.x+r.width:this.start.x,"px"),this.style.top="".concat(r.height<0?this._offset.y+r.height:this.start.y,"px"),this.style.width="".concat(Math.abs(r.width),"px"),this.style.height="".concat(Math.abs(r.height),"px")}},endSelection:function(){var e=this.paperManager.paper;if(this.isSelecting&&!this.isSelected){var t=e.$el.offset(),n={left:this.$el.offsetLeft+t.left,top:this.$el.offsetTop+t.top},o=this.$el.clientWidth,i=this.$el.clientHeight,r=Object(d["V"])(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var a=e.scale();o/=a.sx,i/=a.sy;var s=d["g"].rect(r.x,r.y,o,i);this.selected=this.getElementsInSelectedArea(s,{strict:!1}),this.filterSelected(),this.selected&&this.selected.length>0?(this.updateSelectionBox(),this.isSelected=!0):(this.clearSelection(),this.isSelected=!1,this.start=null),this.start=null}},getElementsInSelectedArea:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.paperManager.paper,i=o.findViewsInArea(e,t);return n?(this.graph.getLinks().forEach((function(t){e.intersect(t.getBBox())&&i.push(o.findViewByModel(t))})),i):i},isPositionWithinArea:function(e,t){var n=t.x,o=t.y,i=t.width,r=t.height;return e.x>=n&&e.x<=n+i&&e.y>=o&&e.y<=o+r},prepareConectedLinks:function(e){var t=this,n=this.paperManager.paper;this.conectedLinks=[],this.isValidSelectionLinks=!0,e.forEach((function(e){var o=t.graph.getConnectedLinks(e.model);if(e.model.component&&e.model.component.node.type===Un){var i=e.model.getBBox(),r=n.model.getLinks().filter((function(e){var n=e.getSourcePoint(),o=e.getTargetPoint();return t.isPositionWithinArea(n,i)||t.isPositionWithinArea(o,i)}));r&&(o=[].concat(g(o),g(r)))}o.forEach((function(e){var o=n.findViewByModel(e);t.conectedLinks.some((function(e){return e.id===o.id}))||(t.conectedLinks.push(o),t.validateSelectionLinks(o))}))}))},validateSelectionLinks:function(e){if(this.isValidSelectionLinks){var t=this.selected.find((function(t){return t.model.get("id")===e.model.getSourceElement().get("id")})),n=this.selected.find((function(t){return t.model.get("id")===e.model.getTargetElement().get("id")}));this.isValidSelectionLinks=!(!t||!n)}},getSelectionVertex:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={x:1/0,y:1/0},i={width:0,height:0},r=this.useModelGeometry,a=["PoolLane","standard.Link"];return e.filter((function(e){return n||!a.includes(e.model.get("type"))})).map((function(e){var n=t?e.model.getBBox({useModelGeometry:r}):e.getBBox({useModelGeometry:r}).inflate(7);o.x=Math.min(o.x,n.x),o.y=Math.min(o.y,n.y),i.width=Math.max(i.width,n.x+n.width),i.height=Math.max(i.height,n.y+n.height)})),{minX:o.x,minY:o.y,maxX:i.width,maxY:i.height}},updateSelectionBox:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e||this.isSelecting&&this.style)if(this.selected.length>0){var n=this.getSelectionVertex(this.selected,!1,!0);this.style.left="".concat(n.minX,"px"),this.style.top="".concat(n.minY,"px"),this.left=parseInt(this.style.left),this.top=parseInt(this.style.top),this.style.width="".concat(n.maxX-n.minX,"px"),this.style.height="".concat(n.maxY-n.minY,"px")}else t&&this.clearSelection()},filterSelected:function(){var e=[us,gt,wt,Ni,ws],t=this.selected.filter((function(e){return e.model.component})).filter((function(e){return"processmaker-modeler-pool"===e.model.component.node.type})).map((function(e){return e.model.component.node.id}));this.selected=this.selected.filter((function(n){if(n.model.component&&n.model.component.node.pool)return n.model.component.node.pool&&!t.includes(n.model.component.node.pool.component.node.id);if(n.model.component&&e.includes(n.model.component.node.type)){var o=n.model.getParentCell();if(o.component&&o.component.node.pool)return!t.includes(o.component.node.pool.component.node.id)}return!0}))},translateChanged:function(){this.isSelecting&&this.updateSelectionBox()},hasLanes:function(e){var t=["processmaker-modeler-lane"],n=e.find((function(e){return t.includes(e.model.component.node.type)}));return!!n},hasOnlyLinks:function(e){var t=this.selected.filter((function(e){return"standard.Link"===e.model.get("type")}));return t&&e.length===t.length},hasOnlyPools:function(e){var t=this.selected.filter((function(e){return e.model.component&&e.model.component.node.type===Un}));return t&&e.length===t.length},startDrag:function(e){if(this.$refs.drag){this.stopForceMove=!1,this.dragging=!0,this.hasMouseMoved=!1;var t=d["util"].normalizeEvent(e);this.mouseX=t.clientX,this.mouseY=t.clientY,this.top=this.$refs.drag.offsetTop,this.left=this.$refs.drag.offsetLeft,this.initialPosition={top:this.top,left:this.left},this.hasLanes(this.selected)||this.hasOnlyLinks(this.selected)?this.stopForceMove=!0:this.selected&&1===this.selected.length&&"processmaker.components.nodes.boundaryEvent.Shape"===this.selected[0].model.get("type")&&this.selected[0].model.component.attachToValidTarget(this.selected[0])}},drag:function(e){if(!this.stopForceMove&&this.dragging){this.hasMouseMoved=!0;var t=d["util"].normalizeEvent(e),n=t.clientX-this.mouseX,o=t.clientY-this.mouseY;this.top+=o,this.left+=n,this.mouseX=t.clientX,this.mouseY=t.clientY;var i=this.paperManager.paper.scale();this.style.left="".concat(this.left,"px"),this.style.top="".concat(this.top,"px"),this.translateSelectedShapes(n/i.sx,o/i.sy),this.overPoolDrag(e)}},stopDrag:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.dragging=!1,e.stopForceMove=!1,t.next=4,e.$nextTick();case 4:return t.next=6,e.paperManager.awaitScheduledUpdates();case 6:e.overPoolStopDrag(),e.updateSelectionBox();case 8:case"end":return t.stop()}}),t)})))()},updateFlowsWaypoint:function(){this.conectedLinks.forEach((function(e){if(e.model.component&&"standard.Link"===e.model.get("type")){var t=e.sourceAnchor,n=e.targetAnchor;e.model.component.node.diagram.waypoint=[t].concat(g(e.model.component.shape.vertices()),[n]).map((function(t){return e.model.component.moddle.create("dc:Point",t)}))}}))},translateSelectedShapes:function(e,t,n){var o=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"],i=this.selected.filter((function(e){return!o.includes(e.model.get("type"))}));if(n&&i.filter((function(e){return n.model.get("id")!==e.model.get("id")})),this.selected&&1===this.selected.length&&"processmaker.components.nodes.boundaryEvent.Shape"===this.selected[0].model.get("type"))return this.selected[0].model.translate(e,t),void this.selected[0].model.component.turnInvalidTargetRed();i.forEach((function(n){return n.model.translate(e,t)}))},getShapesFromPoint:function(e){var t=d["util"].normalizeEvent(e),n=t.clientX,o=t.clientY,i=Object(d["V"])(this.paperManager.paper.viewport).toLocalPoint(n,o);return this.paperManager.paper.findViewsFromPoint(i)},addToHighlightedNodes:function(e){if(ze.commit("highlightNode"),e.length>0){var t=e.filter((function(e){return e.model.component})).map((function(e){return e.model.component.node}));ze.commit("addToHighlightedNodes",t)}else ze.commit("highlightNode",this.processNode)},getChildShape:function(e){var t=null,n=this.getShapesFromPoint(e);return 1===n.length?n[0]:(n.forEach((function(e){e.model.get("parent")&&e.model.component.node.type!==rs&&(t=e)})),t)},markSelectedByPoint:function(e){var t=this.getChildShape(e);t&&(this.selected=[t]),this.selected.length>0&&(this.isSelected=!0,this.isSelecting=!0,this.showLasso=!0,this.updateSelectionBox())},getElementsInsideSelector:function(){var e=this.paperManager.paper,t=e.$el.offset(),n={left:this.$el.offsetLeft+t.left,top:this.$el.offsetTop+t.top},o=this.$el.clientWidth,i=this.$el.clientHeight,r=Object(d["V"])(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var a=e.scale();o/=a.sx,i/=a.sy;var s=d["g"].rect(r.x,r.y,o,i);return this.getElementsInSelectedArea(s,{strict:!1})},getPool:function(e){var t=this.paperManager.paper,n=null;return e&&e.length>0&&e.forEach((function(e){var t=e.model;n||t.getParentCell()&&t.getParentCell().component.node.type===Un&&(n=t.getParentCell())})),t.findViewByModel(n)},isNotPoolChilds:function(e){if(e.length>0){var t=e.find((function(e){var t=e.model;return t.component&&t.component.node.type===Un})),n=e.find((function(e){var t=e.model;return t.getParentCell()&&t.getParentCell().component.node.type===Un}));return!!t||!n}return!1},overPoolDrag:function(e){if(!this.isNotPoolChilds(this.selected)){var t=this.getPool(this.selected),n=this.getShapesFromPoint(e),o=n.find((function(e){return e.model.component&&e.model.component.node.type===Un}));this.newPool=null,this.oldPool=null,o?(this.paperManager.setStateValid(),this.invalidPool&&(this.invalidPool.model.component.shape.attr("body/fill",B),this.invalidPool=null),t&&t.model.get("id")!==o.model.get("id")&&(this.newPool=o,this.oldPool=t,this.isOutOfThePool=!1,this.isValidSelectionLinks||(this.isOutOfThePool=!0,this.invalidPool=o,o.model.component.shape.attr("body/fill",P),ze.commit("preventSavingElementPosition")))):(this.isOutOfThePool=!0,ze.commit("preventSavingElementPosition"),this.paperManager.setStateInvalid())}},overPoolStopDrag:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.isNotPoolChilds(e.selected)){t.next=4;break}return e.updateFlowsWaypoint(),e.$emit("save-state"),t.abrupt("return");case 4:e.isOutOfThePool?(e.rollbackSelection(),e.invalidPool&&(e.invalidPool.model.component.shape.attr("body/fill",B),e.invalidPool=null)):(e.updateFlowsWaypoint(),e.newPool?(e.moveElements(e.selected,e.oldPool,e.newPool),e.moveConectedLinks(e.conectedLinks,e.oldPool,e.newPool),e.newPool=null,e.oldPool=null,e.updateLaneChildren(e.selected),e.$emit("save-state")):(e.expandToFitElement(e.selected),e.updateLaneChildren(e.selected),e.$emit("save-state")));case 5:case"end":return t.stop()}}),t)})))()},rollbackSelection:function(){var e=this;return w(b().mark((function t(){var n,o,i,r;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.initialPosition.left-e.left,o=e.initialPosition.top-e.top,e.style.left="".concat(e.initialPosition.left,"px"),e.style.top="".concat(e.initialPosition.top,"px"),i=e.paperManager.paper.scale(),r=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"],e.selected.filter((function(e){return!r.includes(e.model.get("type"))})).forEach((function(e){e.model.translate(n/i.sx,o/i.sy)})),e.isOutOfThePool=!1,t.next=10,ze.commit("allowSavingElementPosition");case 10:return e.paperManager.setStateValid(),t.next=13,e.$nextTick();case 13:return t.next=15,e.paperManager.awaitScheduledUpdates();case 15:e.updateSelectionBox(!0);case 16:case"end":return t.stop()}}),t)})))()},expandToFitElement:function(e){if(e.length>0){var t=e.find((function(e){var t=e.model;return!!t.getParentCell()&&t.getParentCell().component.node.type===Un})).model.getParentCell(),n=this.getSelectionVertex(this.selected,!0),o=t.getBBox(),i=o.x,r=o.y,a=o.width,s=o.height,c=n.maxX-n.minX,l=n.maxY-n.minY,d=n.minX-i,u=n.minY-r,p=d+c,h=d,f=u,m=u+l,g=0,v=0,b="bottom",y="right";p>a-Ah&&(g=p+Ah),h<Ch+Ah&&(g=a+(Ch+Ah-h),y="left"),f<Ah&&(v=Ah-f+s,b="top"),m>s&&(v=m+Ah),(g||v)&&(t.resize(Math.max(g,a),Math.max(v,s),{direction:"".concat(b,"-").concat(y)}),t.component.fixResizeRounding(),t.component.laneSet&&(t.component.resizeLanes(),t.component.sortedLanes().forEach((function(e){ze.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),t.component.updateAnchorPointPosition(),ze.commit("updateNodeBounds",{node:t.component.node,bounds:t.getBBox()}))}},updateLaneChildren:function(e){if(e){var t=e.find((function(e){var t=e.model;return!!t.getParentCell()&&t.getParentCell().component.node.type===Un}));t&&(t.model.getParentCell(),t.model.component.laneSet&&t.component.updateLaneChildren())}},moveElements:function(e,t,n){var o=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"];e.filter((function(e){return!o.includes(e.model.get("type"))})).forEach((function(e){t.model.component.moveElement(e.model,n.model)}))},moveConectedLinks:function(e,t,n){e.forEach((function(e){t.model.component.moveFlow(e.model,n.model)}))}}},Cx=kx,Sx=(n("4ff9"),ut(Cx,Ow,Dw,!1,null,"82f4c144",null)),Ex=Sx.exports,Ax={components:{ToolBar:Yb,ExplorerRail:Sm,InspectorButton:Nm,InspectorPanel:$m,ProcessmakerModelerGenericFlow:_w,Selection:Ex,RailBottom:kw},props:{owner:Object,decorations:{type:Object,default:function(){return{}}},readOnly:{type:Boolean,default:function(){return!1}},validationBar:Array,requestIdleNodes:{type:Array,default:function(){return[]}},requestCompletedNodes:{type:Array,default:function(){return[]}},requestInProgressNodes:{type:Array,default:function(){return[]}}},mixins:[ly,_y],data:function(){return{pasteInProgress:!1,cloneInProgress:!1,internalClipboard:[],tooltipTarget:null,parsers:{},extensions:[],nodeRegistry:{},graph:null,paper:null,paperManager:null,definitions:null,nodeIdGenerator:null,planeElements:null,canvasDragPosition:null,processNode:null,collaboration:null,moddle:null,allowDrop:!0,poolTarget:null,processes:[],cursor:null,parentHeight:null,parentWidth:null,linter:null,validationErrors:{},miniMapOpen:!1,panelsCompressed:!1,isOpenInspector:!1,isGrabbing:!1,isRendering:!1,allWarnings:[],nodeTypes:[],pmBlockNodes:[],breadcrumbData:[],activeNode:null,xmlManager:null,previouslyStackedShape:null,keyMod:this.isAppleOS()?"Command":"Control",canvasScale:1,initialScale:1,minimumScale:.2,scaleStep:.1,isDragging:!1,isSelecting:!1,isIntoTheSelection:!1,dragStart:null}},watch:{isRendering:function(){var e="Loading process, please be patient.";if(this.isRendering)return window.ProcessMaker.alert(e,"warning"),document.body.style.cursor="wait !important",void(this.cursor="wait");window.ProcessMaker.navbar.alerts=window.ProcessMaker.navbar.alerts.filter((function(t){return t.alertText!==e})),document.body.style.cursor="auto",this.cursor=null},currentXML:function(){this.validateIfAutoValidateIsOn()},definitions:function(){this.validateIfAutoValidateIsOn()},autoValidate:function(){this.validateIfAutoValidateIsOn()},canvasScale:function(e){this.paperManager.scale=e}},computed:{noElementsSelected:function(){return 0===this.highlightedNodes.filter((function(e){return!e.isType("processmaker-modeler-process")})).length},tooltipTitle:function(){if(this.tooltipTarget)return this.tooltipTarget.$el.data("title")},autoValidate:function(){return ze.getters.autoValidate},nodes:function(){return ze.getters.nodes},currentXML:function(){return Xm.getters.currentState},copiedElements:function(){return ze.getters.copiedElements},highlightedNode:function(){return ze.getters.highlightedNodes[0]},highlightedNodes:function(){return ze.getters.highlightedNodes},invalidNodes:function(){return Ay(this.validationErrors,this.nodes)},showComponent:function(){return ze.getters.showComponent}},methods:{handleToggleInspector:function(e){this.isOpenInspector=e},isAppleOS:function(){return"undefined"!==typeof navigator&&/Mac|iPad|iPhone/.test(navigator.platform)},shapeResize:function(){var e=arguments,t=this;return w(b().mark((function n(){var o;return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=!(e.length>0&&void 0!==e[0])||e[0],n.next=3,t.$nextTick();case 3:return n.next=5,t.paperManager.awaitScheduledUpdates();case 5:t.$refs.selector.updateSelectionBox(!0,o);case 6:case"end":return n.stop()}}),n)})))()},toggleDefaultFlow:function(e){var t=e.definition.sourceRef;t.default&&t.default.id===e.id&&(e=null),t.set("default",e)},cloneElement:function(e,t){var n=e.clone(this.nodeRegistry,this.moddle,this.$t),o=(e.diagram.bounds.height+30)*t;n.diagram.bounds.y+=o,this.addNode(n)},copyElement:function(){var e=[us,gt,wt,sn,qm],t=[uv,yv,Mv,Rv,Vv,Kv];1===this.highlightedNodes.length&&(e.includes(this.highlightedNodes[0].type)||t.includes(this.highlightedNodes[0].type))||(ze.commit("setCopiedElements",this.cloneNodesSelection()),this.$bvToast.toast(this.$t("Object(s) have been copied"),{noCloseButton:!0,variant:"success",solid:!0,toaster:"b-toaster-top-center"}))},publishTemplate:function(){this.$emit("publishTemplate")},publishPmBlock:function(){this.$emit("publishPmBlock")},pasteElements:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!(e.copiedElements.length>0)||e.pasteInProgress){t.next=21;break}return e.pasteInProgress=!0,t.prev=2,t.next=5,e.addClonedNodes(e.copiedElements);case 5:return t.next=7,e.$nextTick();case 7:return t.next=9,e.paperManager.awaitScheduledUpdates();case 9:return t.next=11,e.$refs.selector.selectElements(e.findViewElementsFromNodes(e.copiedElements),!0);case 11:return t.next=13,e.$nextTick();case 13:return t.next=15,ze.commit("setCopiedElements",e.cloneNodesSelection());case 15:e.scrollToSelection();case 16:return t.prev=16,e.pasteInProgress=!1,t.next=20,e.pushToUndoStack();case 20:return t.finish(16);case 21:case"end":return t.stop()}}),t,null,[[2,,16,21]])})))()},cloneSelection:function(){var e=this;return w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.cloneNodesSelection(),!n||0!==n.length){t.next=3;break}return t.abrupt("return");case 3:return t.prev=3,e.cloneInProgress=!0,e.$refs.selector.clearSelection(),t.next=8,e.addClonedNodes(n);case 8:return t.next=10,e.$nextTick();case 10:return t.next=12,e.paperManager.awaitScheduledUpdates();case 12:return t.next=14,e.$refs.selector.selectElements(e.findViewElementsFromNodes(n));case 14:e.scrollToSelection();case 15:return t.prev=15,e.cloneInProgress=!1,t.next=19,e.pushToUndoStack();case 19:return t.finish(15);case 20:case"end":return t.stop()}}),t,null,[[3,,15,20]])})))()},scrollToSelection:function(){var e=this.$refs["paper-container"].getBoundingClientRect(),t=this.$refs.selector,n=t.$el.getBoundingClientRect();if(n.right>e.right||n.bottom>e.bottom||n.left<e.left||n.top<e.top){var o=this.paper.translate(),i=o.ty-(n.top-e.top-n.height);this.paper.translate(o.tx,i),t.updateSelectionBox(!0)}},findViewElementsFromNodes:function(e){var t=this;return e.map((function(e){var n=t.$refs.nodeComponent.find((function(t){return t.node===e})),o=n.shape;return t.paper.findViewByModel(o)}))},close:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$emit("close");case 1:case"end":return t.stop()}}),t)})))()},saveBpmn:function(){var e=this;return w(b().mark((function t(){var n,o,i,r,a;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=document.querySelector(".mini-paper svg"),o="text { font-family: sans-serif; }",i=document.createElement("style"),i.appendChild(document.createTextNode(o)),n.appendChild(i),t.next=7,e.getXmlFromDiagram();case 7:r=t.sent,a=(new XMLSerializer).serializeToString(n),e.$emit("saveBpmn",{xml:r,svg:a});case 10:case"end":return t.stop()}}),t)})))()},borderOutline:function(e){return this.decorations.borderOutline&&this.decorations.borderOutline[e]},addWarning:function(e){this.allWarnings.push(e),this.$emit("warnings",this.allWarnings)},validatePlaneElements:function(){var e=this;this.planeElements.filter((function(e){return!e.bpmnElement})).map((function(t){return{title:e.$t("Non-existent Element"),text:e.$t("bpmdi:BPMNShape ")+t.id+e.$t(" references a non-existent element and was not parsed")}})).forEach((function(t){return e.addWarning(t)}))},cleanPlaneElements:function(){Am()(this.planeElements,(function(e){return!e.bpmnElement}))},getTooltipTarget:function(){return this.tooltipTarget.$el[0]},validateIfAutoValidateIsOn:function(){this.autoValidate&&this.validateBpmnDiagram()},translateConfig:function(e){if(e.config){var t=e.config;t.label=this.$t(t.label),t.helper=this.$t(t.helper)}e.items&&e.items.forEach(this.translateConfig)},pushToUndoStack:function(){var e=this;return w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.pasteInProgress&&!e.cloneInProgress){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,e.getXmlFromDiagram();case 5:return n=t.sent,t.next=8,Xm.dispatch("pushState",n);case 8:window.ProcessMaker.EventBus.$emit("modeler-change"),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](2),console.warn(t.t0.message);case 14:case"end":return t.stop()}}),t,null,[[2,11]])})))()},getXmlFromDiagram:function(){var e=this;return new Promise((function(t,n){e.toXML((function(e,o){e?n(e):t(o)}))}))},validateBpmnDiagram:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(ze.getters.globalProcesses&&0!==ze.getters.globalProcesses.length){t.next=3;break}return t.next=3,ze.dispatch("fetchGlobalProcesses");case 3:return t.next=5,e.linter.lint(e.definitions);case 5:e.validationErrors=t.sent,e.$emit("validate",e.validationErrors);case 7:case"end":return t.stop()}}),t)})))()},setPools:function(e){var t;(this.collaboration||(this.collaboration=this.moddle.create("bpmn:Collaboration"),this.definitions.get("rootElements").push(this.collaboration),this.collaboration.set("id","collaboration_0"),this.plane.set("bpmnElement",this.collaboration)),e.get("processRef"))?this.collaboration.get("participants").includes(e)||this.collaboration.get("participants").push(e):(0===this.collaboration.get("participants").length?t=this.processNode.definition:(t=this.moddle.create("bpmn:Process"),this.processes.push(t),t.set("id",this.nodeIdGenerator.generateProcessId()),this.definitions.get("rootElements").push(t)),e.set("processRef",t),this.collaboration.get("participants").push(e))},unsetPools:function(){ki()(this.definitions.get("rootElements"),this.collaboration),this.plane.set("bpmnElement",this.processNode.definition),this.collaboration=null},highlightNode:function(e,t){if(e&&this.highlightedNode)if(t&&t.shiftKey)ze.commit("addToHighlightedNodes",[e]);else{var n=mt.a.isEqual(e.id,this.highlightedNode.id);n||ze.commit("highlightNode",e)}},blurFocusedScreenBuilderElement:function(){var e=["INPUT","SELECT"];e.includes(document.activeElement&&document.activeElement.tagName)&&document.activeElement.blur()},registerStatusBar:function(e){this.owner.validationBar.push(e)},registerComponentMixin:function(e,t){e.mixins||(e.mixins=[]),e.mixins.push(t)},registerBpmnExtension:function(e,t){this.extensions[e]=t},registerNode:function(e,t){var n=this,o=function(){return e.id},i=function(t){if(t.get("implementation")===e.implementation)return e.id};this.translateConfig(e.inspectorConfig[0]),Py(e),this.nodeRegistry[e.id]=e,De.a.component(e.id,e.component),this.nodeTypes.push(e);var r=Array.isArray(e.bpmnType)?e.bpmnType:[e.bpmnType];r.forEach((function(r){n.parsers[r]||(n.parsers[r]={custom:[],implementation:[],default:[]}),t?n.parsers[r].custom.push(t):e.implementation?n.parsers[r].implementation.push(i):n.parsers[r].default.push(o)}))},registerPmBlock:function(e,t){var n=this,o=function(){return e.id};this.translateConfig(e.inspectorConfig[0]),Py(e),this.nodeRegistry[e.id]=e,De.a.component(e.id,e.component),this.pmBlockNodes.push(e);var i=Array.isArray(e.bpmnType)?e.bpmnType:[e.bpmnType];i.forEach((function(e){t?n.parsers[e].custom.push(t):n.parsers[e].default.push(o)})),Kf.commit("setPmBlockNodeTypes",this.pmBlockNodes)},addMessageFlows:function(){this.collaboration&&this.collaboration.get("messageFlows").filter(this.hasSourceAndTarget).forEach(this.setNode)},loadAssociations:function(e,t){var n=this;t.filter((function(e){return"bpmn:Association"===e.$type&&n.hasSourceAndTarget(e)})).forEach((function(o){return n.setNode(o,e,t)}))},loadDataAssociations:function(e){var t=this,n=e.filter((function(e){return e.get("dataOutputAssociations")&&e.get("dataOutputAssociations").length>0}));n.forEach((function(n){n.get("dataOutputAssociations").forEach((function(n){t.setNode(n,e)}))}));var o=e.filter((function(e){return e.get("dataInputAssociations")&&e.get("dataInputAssociations").length>0}));o.forEach((function(n){n.get("dataInputAssociations").forEach((function(n){t.setNode(n,e)}))}))},loadArtifacts:function(e,t){var n=this;t.filter((function(e){return"bpmn:Association"!==e.$type})).forEach((function(o){return n.setNode(o,e,t)}))},loadSequenceFlows:function(e,t){var n=this;e.filter((function(e){return"bpmn:SequenceFlow"===e.$type&&n.hasSourceAndTarget(e)})).forEach((function(o){return n.setNode(o,e,t)}))},loadFlowElements:function(e,t){var n=this;e.filter((function(e){return"bpmn:SequenceFlow"!==e.$type})).forEach((function(o){return n.setNode(o,e,t)}))},addLanes:function(e){e.get("laneSets")[0]&&e.laneSets[0].lanes.forEach(this.setNode)},addPools:function(){this.collaboration&&this.collaboration.get("participants").forEach(this.setNode)},setUpDiagram:function(){var e=this;this.processes.forEach((function(t){e.ensureCancelActivityIsAddedToBoundaryEvents(t),e.addLanes(t);var n=t.get("flowElements"),o=t.get("artifacts");e.loadFlowElements(n,o),e.loadSequenceFlows(n,o),e.loadArtifacts(n,o),e.loadAssociations(n,o),e.loadDataAssociations(n)})),ze.commit("setRootElements",this.definitions.rootElements),this.addMessageFlows(),ze.commit("highlightNode",this.processNode)},getCollaboration:function(){return this.definitions.rootElements.find((function(e){var t=e.$type;return"bpmn:Collaboration"===t}))},getProcesses:function(){return this.definitions.rootElements.filter((function(e){var t=e.$type;return"bpmn:Process"===t}))},getPlane:function(){return this.definitions.diagrams[0].plane},getPlaneElements:function(){return this.plane.get("planeElement")},parse:function(){var e=this;this.collaboration=this.getCollaboration(),this.processes=this.getProcesses(),this.plane=this.getPlane(),this.planeElements=this.getPlaneElements(),this.validatePlaneElements(),this.cleanPlaneElements(),this.processNode=new an("processmaker-modeler-process",this.processes[0],this.planeElements.find((function(t){return t.bpmnElement.id===e.processes[0].id})))},removeUnsupportedElementAttributes:function(e){var t=["extensionElements"];t.filter((function(t){return e.get(t)})).forEach((function(t){return e.set(t,void 0)}))},getCustomParser:function(e){var t=this,n=this.parsers[e.$type];if(n){var o=n.custom.find((function(n){return n(e,t.moddle)})),i=n.implementation.find((function(n){return n(e,t.moddle)})),r=n.default.find((function(n){return n(e,t.moddle)}));return o||i||r}},handleUnsupportedElement:function(e,t,n,o,i){this.addWarning({title:this.$t("Unsupported Element"),text:e+this.$t(" is an unsupported element type in parse")}),ki()(t,n),ki()(o,n),ki()(this.planeElements,i),this.collaboration&&ki()(this.collaboration.get("messageFlows"),n);var r=n.get("incoming");r&&ki()(t,r);var a=n.get("outgoing");a&&ki()(t,a)},setNode:function(e,t,n){var o=this.planeElements.find((function(t){return t.bpmnElement.id===e.id})),i=e.$type,r=this.getCustomParser(e);if(r){this.removeUnsupportedElementAttributes(e);var a=r(e,this.moddle),s=["bpmn:TextAnnotation","bpmn:Association","bpmn:DataOutputAssociation","bpmn:DataInputAssociation"],c=-1===s.indexOf(i);c&&!e.get("name")&&e.set("name","");var l=this.createNode(a,e,o);ze.commit("addNode",l)}else this.handleUnsupportedElement(i,t,e,n,o)},createNode:function(e,t,n){return an.isTimerType(e)?new hy(e,t,n):(Object.keys(t).forEach((function(e){void 0!==t[e]&&null!==t[e]||delete t[e]})),new an(e,t,n))},hasSourceAndTarget:function(e){var t=e.sourceRef&&this.parsers[e.sourceRef.$type],n=e.targetRef&&this.parsers[e.targetRef.$type];return t&&n},waitForCursorToChange:function(){var e=this;return w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=300,t.next=3,e.$nextTick();case 3:return t.abrupt("return",new Promise((function(e){return setTimeout(e,n)})));case 4:case"end":return t.stop()}}),t)})))()},renderPaper:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isRendering=!0,t.next=3,e.paperManager.performAtomicAction(w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.waitForCursorToChange();case 2:e.parse(),e.addPools(),e.setUpDiagram();case 5:case"end":return t.stop()}}),t)}))));case 3:return t.next=5,e.paperManager.awaitScheduledUpdates();case 5:e.isRendering=!1,e.$emit("parsed");case 7:case"end":return t.stop()}}),t)})))()},loadXML:function(){var e=arguments,t=this;return w(b().mark((function n(){var o,i;return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=e.length>0&&void 0!==e[0]?e[0]:null,i=!1,null===o&&(o=t.currentXML,i=!0),n.next=5,t.xmlManager.getDefinitionsFromXml(o);case 5:return t.definitions=n.sent,t.xmlManager.definitions=t.definitions,t.nodeIdGenerator=Cp(t.definitions),ze.commit("clearNodes"),n.next=11,t.renderPaper();case 11:i&&window.ProcessMaker.EventBus.$emit("modeler-change");case 12:case"end":return n.stop()}}),n)})))()},getBoundaryEvents:function(e){return e.get("flowElements").filter((function(e){var t=e.$type;return"bpmn:BoundaryEvent"===t}))},createBoundaryEvent:function(e){var t=Gf.definition(this.moddle,this.$t);return t.set("id",e.get("id")),t.set("name",e.get("name")),t.set("eventDefinitions",e.get("eventDefinitions")),t.set("cancelActivity",e.get("cancelActivity")),t.set("attachedToRef",e.get("attachedToRef")),t.set("color",e.get("color")),t.$parent=e.$parent,e.get("outgoing").length>0&&t.set("outgoing",e.get("outgoing")),t},ensureCancelActivityIsAddedToBoundaryEvents:function(e){var t=this;this.getBoundaryEvents(e).forEach((function(n){var o=t.createBoundaryEvent(n);n.get("outgoing").forEach((function(e){return e.set("sourceRef",o)})),t.replaceDefinition(n,o,e)}))},replaceDefinition:function(e,t,n){var o=n.get("flowElements").indexOf(e);n.flowElements[o]=t;var i=this.planeElements.find((function(t){return t.bpmnElement===e}));i.bpmnElement=t},toXML:function(e){this.moddle.toXML(this.definitions,{format:!0},e)},onCreateElementHandler:function(e){var t=e.event,n=e.control;this.handleDrop({clientX:t.clientX,clientY:t.clientY,control:n})},handleDrop:function(e){var t=this;return w(b().mark((function n(){var o,i,r,a,s,c,l,d,u,p,h;return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=e.clientX,i=e.clientY,r=e.control,a=e.nodeThatWillBeReplaced,t.validateDropTarget({clientX:o,clientY:i,control:r}),t.allowDrop){n.next=4;break}return n.abrupt("return");case 4:return s=t.nodeRegistry[r.type].definition(t.moddle,t.$t),c=t.nodeRegistry[r.type].diagram(t.moddle),l=t.paperManager.clientToGridPoint(o,i),d=l.x,u=l.y,c.bounds.x=d,c.bounds.y=u,p=t.createNode(r.type,s,c),p.isBpmnType("bpmn:BoundaryEvent")&&t.setShapeCenterUnderCursor(c),t.highlightNode(p),n.next=14,t.addNode(p);case 14:if(a){n.next=16;break}return n.abrupt("return");case 16:return h=new My(a,s,t.graph,p,t.processes,t.collaboration),h.migrate(),n.abrupt("return",p);case 19:case"end":return n.stop()}}),n)})))()},setShapeCenterUnderCursor:function(e){e.bounds.x-=e.bounds.width/2,e.bounds.y-=e.bounds.height/2},selectNewNode:function(e){var t=this;return w(b().mark((function n(){var o,i;return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$nextTick();case 2:return n.next=4,t.paperManager.awaitScheduledUpdates();case 4:return o=t.$refs.nodeComponent.find((function(t){return t.node===e})),i=o.shapeView,n.next=8,t.$refs.selector.selectElement(i);case 8:case"end":return n.stop()}}),n)})))()},addNode:function(e){var t=this;return w(b().mark((function n(){var o;return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.pool||(e.pool=t.poolTarget),o=e.getTargetProcess(t.processes,t.processNode),Zb(e,o),e.setIds(t.nodeIdGenerator),t.planeElements.push(e.diagram),ze.commit("addNode",e),t.poolTarget=null,![us,rs,Ni,ws,gt,wt,sn].includes(e.type)){n.next=9;break}return n.abrupt("return");case 9:return t.selectNewNode(e),n.abrupt("return",new Promise((function(e){setTimeout((function(){t.pushToUndoStack(),e()}))})));case 11:case"end":return n.stop()}}),n)})))()},addClonedNodes:function(e){var t=this;return w(b().mark((function n(){return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.forEach((function(e){e.pool||(e.pool=t.poolTarget);var n=e.getTargetProcess(t.processes,t.processNode);Zb(e,n),t.planeElements.push(e.diagram),ze.commit("addNode",e),t.poolTarget=null}));case 1:case"end":return n.stop()}}),n)})))()},removeNode:function(e){var t=arguments,n=this;return w(b().mark((function o(){var i,r,a;return b().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=t.length>1&&void 0!==t[1]?t[1]:{},r=i.removeRelationships,a=void 0===r||r,e){o.next=3;break}return o.abrupt("return");case 3:return a&&(Et(e,n),At(e,n),Mt(e,n)),Pt(e),Tt(n.graph,e,n.removeNode),_t(e),n.removeNodesFromLane(e),n.removeNodesFromPool(e),ze.commit("removeNode",e),ze.commit("highlightNode",n.processNode),n.$refs.selector.clearSelection(),o.next=14,n.$nextTick();case 14:return o.next=16,n.pushToUndoStack();case 16:n.processes=n.getProcesses(),n.processes&&n.processes.length>0&&(n.processNode=new an("processmaker-modeler-process",n.processes[0],n.planeElements.find((function(e){return e.bpmnElement.id===n.processes[0].id}))));case 18:case"end":return o.stop()}}),o)})))()},removeNodes:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.performSingleUndoRedoTransaction(w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.paperManager.performAtomicAction(w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=[],e.highlightedNodes.forEach((function(t){return n.push(e.removeNode(t,{removeRelationships:!0}))})),t.next=4,Promise.all(n);case 4:ze.commit("highlightNode");case 5:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})))()},replaceNode:function(e){var t=this,n=e.node,o=e.typeToReplaceWith;this.performSingleUndoRedoTransaction(w(b().mark((function e(){return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(w(b().mark((function e(){var i,r,a,s;return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.paper.localToClientPoint(n.diagram.bounds),r=i.x,a=i.y,e.next=3,t.handleDrop({clientX:r,clientY:a,control:{type:o},nodeThatWillBeReplaced:n});case 3:return s=e.sent,e.next=6,t.removeNode(n,{removeRelationships:!1});case 6:t.highlightNode(s),t.selectNewNode(s);case 8:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)}))))},replaceGenericFlow:function(e){var t=this,n=e.actualFlow,o=e.genericFlow,i=e.targetNode;this.performSingleUndoRedoTransaction(w(b().mark((function e(){return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(w(b().mark((function e(){return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.highlightNode(null);case 2:return e.next=4,t.$nextTick();case 4:return e.next=6,t.addNode(n);case 6:return e.next=8,ze.commit("removeNode",o);case 8:return e.next=10,t.$nextTick();case 10:return e.next=12,t.highlightNode(i);case 12:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)}))))},performSingleUndoRedoTransaction:function(e){var t=this;return w(b().mark((function n(){return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return Xm.commit("disableSavingState"),n.next=3,e();case 3:return Xm.commit("enableSavingState"),n.next=6,t.pushToUndoStack();case 6:case"end":return n.stop()}}),n)})))()},removeNodesFromLane:function(e){var t=e.pool&&e.pool.component.laneSet&&e.pool.component.laneSet.get("lanes").find((function(t){return t.get("flowNodeRef").includes(e.definition)}));t&&ki()(t.get("flowNodeRef"),e.definition)},removeNodesFromPool:function(e){var t=this;if("processmaker-modeler-pool"===e.type&&e.definition.processRef){e.definition.processRef.artifacts&&e.definition.processRef.artifacts.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)})),e.definition.processRef.flowElements&&e.definition.processRef.flowElements.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)}));var n=e.definition.processRef.laneSets;n&&n.length>0&&n[0].lanes.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)}))}},handleResize:function(){var e=this.$el.parentElement,t=e.clientWidth,n=e.clientHeight;this.parentWidth=t+"px",this.parentHeight=n+"px",this.paperManager.setPaperDimensions(t,n)},validateDropTarget:function(e){var t=e.clientX,n=e.clientY,o=e.control,i=Fg(t,n,o,this.paperManager.paper,this.graph,this.collaboration,this.$refs["paper-container"]),r=i.allowDrop,a=i.poolTarget;this.allowDrop=r,this.poolTarget=a},isBpmnNode:function(e){return null!=e.component},setShapeStacking:function(e){var t=this;this.isRendering||!e.component.node.isType("processmaker-modeler-pool")&&e===this.previouslyStackedShape||(this.previouslyStackedShape=e,this.paperManager.performAtomicAction((function(){return sb(e,t.graph)})))},showSavedNotification:function(){Xm.dispatch("saved")},enableVersions:function(){Xm.dispatch("enableVersions")},setVersionIndicator:function(e){Xm.dispatch("setVersionIndicator",e)},setLoadingState:function(e){Xm.dispatch("setLoadingState",e)},clearSelection:function(){this.$refs.selector.clearSelection()},isPointInSelection:function(e){var t=this.$refs.selector.$el;if("function"===typeof t.getBoundingClientRect){var n=t.getBoundingClientRect(),o=n.x,i=n.y,r=n.width,a=n.height;if(e.clientX>=o&&e.clientX<=o+r&&e.clientY>=i&&e.clientY<=i+a)return!0}return!1},pointerDowInShape:function(e,t){var n=this;return w(b().mark((function o(){var i,r,a;return b().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=e.clientX,r=e.clientY,a=n.paper.findViewByModel(t),n.isDragging=!1,n.isSelecting=!1,n.isIntoTheSelection=!1,n.dragStart={x:i,y:r},!n.isPointInSelection(e)){o.next=10;break}n.isIntoTheSelection=!0,o.next=15;break;case 10:if(e.shiftKey){o.next=15;break}return o.next=13,n.$refs.selector.selectElement(a);case 13:return o.next=15,n.$nextTick();case 15:n.$refs.selector.startDrag({clientX:e.clientX,clientY:e.clientY});case 16:case"end":return o.stop()}}),o)})))()},pointerDownHandler:function(e){var t=e.clientX,n=e.clientY;this.isDragging=!1,this.isSelecting=!1,this.isIntoTheSelection=!1,this.dragStart={x:t,y:n},this.isPointInSelection(e)?(this.isIntoTheSelection=!0,this.$refs.selector.startDrag({clientX:e.clientX,clientY:e.clientY})):(this.isSelecting=!0,this.$refs.selector.startSelection(e))},pointerMoveHandler:function(e){var t=e.clientX,n=e.clientY;ze.getters.isReadOnly?this.canvasDragPosition&&this.paperManager.translate(e.offsetX-this.canvasDragPosition.x,e.offsetY-this.canvasDragPosition.y):this.isGrabbing||(this.dragStart&&(Math.abs(t-this.dragStart.x)>5||Math.abs(n-this.dragStart.y)>5)?(this.isDragging=!0,this.dragStart=null):this.isSelecting?this.$refs.selector.updateSelection(e):this.isDragging&&this.$refs.selector.drag(e))},pointerUpHandler:function(e,t){!this.isDragging&&this.dragStart?t?this.$refs.selector.selectElement(t,e.shiftKey):this.clearSelection():this.isSelecting?this.$refs.selector.endSelection(this.paperManager.paper):this.$refs.selector.stopDrag(e),window.ProcessMaker.EventBus.$emit("custom-pointerclick",e),this.isDragging=!1,this.dragStart=null,this.isSelecting=!1}},created:function(){Ci()&&(window.store=ze,window.undoRedoStore=Xm),this.$t=this.$t.bind(this),window.ProcessMaker.EventBus.$emit("modeler-before-init",{registerComponentMixin:this.registerComponentMixin}),this.registerNode(Vm),window.ProcessMaker.EventBus.$emit("modeler-init",{registerInspectorExtension:nb,registerBpmnExtension:this.registerBpmnExtension,registerNode:this.registerNode,registerStatusBar:this.registerStatusBar,registerPmBlock:this.registerPmBlock}),this.moddle=new $f.a(this.extensions),this.linter=new Ym["Linter"](Bg),this.xmlManager=new ky(this.moddle),this.$emit("set-xml-manager",this.xmlManager)},mounted:function(){var e=this;ze.commit("setReadOnly",this.readOnly),this.graph=new d["dia"].Graph,ze.commit("setGraph",this.graph),this.graph.set("interactiveFunc",(function(e){var t="standard.EmbeddedImage"===e.model.get("type");return{elementMove:t,labelMove:!1}})),this.paperManager=tb.factory(this.$refs.paper,this.graph.get("interactiveFunc"),this.graph),this.paper=this.paperManager.paper,this.paperManager.addEventHandler("cell:pointerdblclick",fy),this.handleResize(),window.addEventListener("resize",this.handleResize),ze.commit("setPaper",this.paperManager.paper),this.paperManager.addEventHandler("element:pointerclick",this.blurFocusedScreenBuilderElement,this),this.paperManager.addEventHandler("blank:pointerdown",(function(t,n,o){if(!e.isGrabbing){ze.getters.isReadOnly&&(e.isGrabbing=!0);var i=e.paperManager.scale;e.canvasDragPosition={x:n*i.sx,y:o*i.sy},e.isOverShape=!1,e.pointerDownHandler(t)}}),this),this.paperManager.addEventHandler("cell:mouseover element:mouseover",(function(t){var n=t.model;e.isBpmnNode(n)&&"default"!==n.attr("body/cursor")&&!e.isGrabbing&&n.attr("body/cursor","move"),e.isGrabbing&&e.isBpmnNode(n)&&n.attr("body/cursor","grabbing")})),this.paperManager.addEventHandler("blank:pointerup",(function(t){e.isGrabbing=!1,e.canvasDragPosition=null,e.activeNode=null,e.pointerUpHandler(t)}),this),this.paperManager.addEventHandler("cell:pointerup",(function(t,n){e.canvasDragPosition=null,e.activeNode=null,e.pointerUpHandler(n,t)}),this),this.$refs["paper-container"].addEventListener("mouseenter",(function(){ze.commit("setClientLeftPaper",!1)})),this.$el.addEventListener("mousemove",(function(t){e.pointerMoveHandler(t)})),this.$refs["paper-container"].addEventListener("mouseleave",(function(){e.paperManager.removeEventHandler("blank:pointermove"),ze.commit("setClientLeftPaper",!0)})),this.paperManager.addEventHandler("cell:pointerclick",(function(e,t,n,o){var i=e.model.get("onClick");i&&i(e,t,n,o)})),this.paperManager.addEventHandler("cell:pointerclick",(function(t,n){var o=t.model;e.isBpmnNode(o)&&(e.isGrabbing||(o.component.$emit("click",n),e.$emit("click",{event:n,node:e.highlightedNode.definition})))})),this.paperManager.addEventHandler("cell:pointerdown",(function(t,n){var o=t.model;e.isBpmnNode(o)&&(e.isGrabbing||(e.setShapeStacking(o),e.activeNode=o.component.node,e.isOverShape=!0,e.pointerDowInShape(n,o)))})),this.paperManager.addEventHandler("cell:pointermove",(function(t,n,o,i){if(e.isGrabbing){if(!e.canvasDragPosition){var r=e.paperManager.scale;e.canvasDragPosition={x:o*r.sx,y:i*r.sy}}e.canvasDragPosition&&!e.clientLeftPaper&&e.paperManager.translate(n.offsetX-e.canvasDragPosition.x,n.offsetY-e.canvasDragPosition.y)}})),window.ProcessMaker.EventBus.$emit("modeler-start",{loadXML:function(){var t=w(b().mark((function t(n){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.loadXML(n);case 2:return t.next=4,Xm.dispatch("pushState",n);case 4:case"end":return t.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}(),addWarnings:function(t){return e.$emit("warnings",t)},addBreadcrumbs:function(t){return e.breadcrumbData.push(t)}})}},Mx=Ax,Tx=(n("71e5"),ut(Mx,jf,Lf,!1,null,null,null)),Px=Tx.exports,_x=n("f0c1"),Ox=n.n(_x),Dx={extends:Fu,mixins:[Zr],data:function(){return{nodeIcon:Ox.a,iconName:""}}},Ix=Dx,Nx=ut(Ix,dx,ux,!1,null,null,null),Rx=Nx.exports,jx=76,Lx="processmaker-modeler-manual-task",Bx={id:Lx,component:Rx,bpmnType:"bpmn:ManualTask",control:!1,category:"BPMN",icon:n("222f"),label:Jt[Lx],loopInspectorIndex:1,definition:function(e,t){return e.create("bpmn:ManualTask",{name:t(Jt[Lx]),assignment:"requester",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:jx,width:116})})},inspectorConfig:[{name:Jt[Lx],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-manual-task"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Fx={extends:sc,data:function(){return{nodeIcon:nu.a}},mounted:function(){var e=this.node.diagram.bounds;this.shape.attr({image:{"ref-x":7,"ref-y":7,width:e.get("width")-14,height:e.get("height")-14}})}},zx=Fx,Hx=ut(zx,px,hx,!1,null,null,null),qx=Hx.exports,Vx="processmaker-modeler-conditional-start-event",Ux=na()(rn()(Sc),Vt(Vt({},cu),{},{id:Vx,component:qx,label:Xt[Vx],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Xt[Vx]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(g(su()))}]}]})),Gx=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Wx=[],$x={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=k()(this.target,"component.node.definition.$type");if(!e)return!1;var t=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],n=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],o="bpmn:DataStoreReference"===this.sourceNode.definition.$type,i="bpmn:DataObjectReference"===this.sourceNode.definition.$type;return!(!o||!t.includes(e))||i&&n.includes(e)}},methods:{findSourceShape:function(){if(this.node.dataAssociationProps)return this.node.dataAssociationProps.sourceShape;var e=this.node.definition.sourceRef[0],t=this.graph.getElements().find((function(t){return t.component.node.definition===e}));return t},getTargetRef:function(){return this.node.dataAssociationProps?this.node.dataAssociationProps.targetCoords:Dt(this.node.definition.targetRef.$parent,this.$parent)},updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement(),t=Ot(this.moddle,e.component.node,this.sourceNode.definition);this.node.definition.set("targetRef",t),this.node.definition.set("sourceRef",[this.sourceNode.definition]),e.component.node.definition.set("dataInputAssociations",[this.node.definition])}},mounted:function(){this.shape=new d["shapes"].standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Qe.a,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){this.targetNode&&(It(this.targetNode,this.sourceNode.definition),Object(ft["pull"])(this.targetNode.definition.get("dataInputAssociations"),this.node.definition))}},Xx=$x,Yx=ut(Xx,Gx,Wx,!1,null,null,null),Zx=Yx.exports,Kx=Vt(Vt({},i),{},{component:Zx,control:!1,inspectorConfig:[{name:"Data Input Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-input-association"},items:[{component:"FormInput",config:Ii}]}]}]}),Jx=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Qx=[],ek={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=k()(this.target,"component.node.type");if(!e)return!1;var t="bpmn:DataObjectReference"!==this.targetConfig.bpmnType&&"bpmn:DataStoreReference"!==this.targetConfig.bpmnType;return!t}},methods:{findSourceShape:function(){var e=this;return this.node.dataAssociationProps?this.node.dataAssociationProps.sourceShape:this.graph.getElements().find((function(t){return t.component&&t.component.node.definition.get("dataOutputAssociations")&&t.component.node.definition.get("dataOutputAssociations").includes(e.node.definition)}))},updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){this.node.definition.set("targetRef",this.targetNode.definition);var e=this.sourceNode.definition.get("dataOutputAssociations")||[];this.sourceNode.definition.set("dataOutputAssociations",[].concat(g(e),[this.node.definition]))}},mounted:function(){this.shape=new d["shapes"].standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Qe.a,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){Object(ft["pull"])(this.sourceNode.definition.get("dataOutputAssociations"),this.node.definition)}},tk=ek,nk=ut(tk,Jx,Qx,!1,null,null,null),ok=nk.exports,ik=Vt(Vt({},o),{},{component:ok,control:!1,inspectorConfig:[{name:"Data Output Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-output-association"},items:[{component:"FormInput",config:Ii}]}]}]}),rk=n("b99f"),ak=[Ac,lf,bf,Ur,Ip,ch,Bx,eh,lh,Oa,za,ts,$a,ps,xs,Ri,Kx,ik,Tf,jh,bh],sk=[[jc,"bpmn:StartEvent","bpmn:SignalEventDefinition"],[bl,"bpmn:StartEvent","bpmn:TimerEventDefinition"],[Uc,"bpmn:StartEvent","bpmn:MessageEventDefinition"],[Ux,"bpmn:StartEvent","bpmn:ConditionalEventDefinition"],[ld,"bpmn:IntermediateCatchEvent","bpmn:TimerEventDefinition"],[Pd,"bpmn:IntermediateCatchEvent","bpmn:MessageEventDefinition"],[Bd,"bpmn:IntermediateCatchEvent","bpmn:SignalEventDefinition"],[Wd,"bpmn:IntermediateThrowEvent","bpmn:MessageEventDefinition"],[eu,"bpmn:IntermediateThrowEvent","bpmn:SignalEventDefinition"],[du,"bpmn:IntermediateCatchEvent","bpmn:ConditionalEventDefinition"],[Jv,"bpmn:BoundaryEvent","bpmn:TimerEventDefinition"],[pv,"bpmn:BoundaryEvent","bpmn:ErrorEventDefinition"],[Tv,"bpmn:BoundaryEvent","bpmn:EscalationEventDefinition"],[jv,"bpmn:BoundaryEvent","bpmn:MessageEventDefinition"],[Uv,"bpmn:BoundaryEvent","bpmn:SignalEventDefinition"],[wv,"bpmn:BoundaryEvent","bpmn:ConditionalEventDefinition"],[Fs,"bpmn:EndEvent","bpmn:MessageEventDefinition"],[aa,"bpmn:EndEvent","bpmn:ErrorEventDefinition"],[tc,"bpmn:EndEvent","bpmn:SignalEventDefinition"],[fa,"bpmn:EndEvent","bpmn:TerminateEventDefinition"]],ck=function(e,t,n){return function(o){var i=o.get("eventDefinitions"),r=o.$type===t&&i&&i.length&&i[0].$type===n;if(r)return e.id}};function lk(e){var t=e.registerNode,n=e.registerBpmnExtension;sk.forEach((function(e){var n=_e(e,3),o=n[0],i=n[1],r=n[2];t(o,ck(o,i,r))})),ak.forEach((function(e){return t(e)})),n("pm",rk)}},fb6a:function(e,t,n){"use strict";var o=n("23e7"),i=n("e8b5"),r=n("68ee"),a=n("861d"),s=n("23cb"),c=n("07fa"),l=n("fc6a"),d=n("8418"),u=n("b622"),p=n("1dde"),h=n("f36a"),f=p("slice"),m=u("species"),g=Array,v=Math.max;o({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,o,u,p=l(this),f=c(p),b=s(e,f),y=s(void 0===t?f:t,f);if(i(p)&&(n=p.constructor,r(n)&&(n===g||i(n.prototype))?n=void 0:a(n)&&(n=n[m],null===n&&(n=void 0)),n===g||void 0===n))return h(p,b,y);for(o=new(void 0===n?g:n)(v(y-b,0)),u=0;b<y;b++,u++)b in p&&d(o,u,p[b]);return o.length=u,o}})},fba5:function(e,t,n){var o=n("cb5a");function i(e){return o(this.__data__,e)>-1}e.exports=i},fbaa:function(e,t,n){var o=n("0be3");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("499e").default;i("4fc6c0b2",o,!0,{sourceMap:!1,shadowMode:!1})},fbd9:function(e,t,n){"use strict";n("4ce4")},fc6a:function(e,t,n){var o=n("44ad"),i=n("1d80");e.exports=function(e){return o(i(e))}},fc6f:function(e,t,n){var o=n("24fb");t=o(!1),t.push([e.i,'.cog-container[data-v-31668547]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex}.element-list[data-v-31668547]{white-space:nowrap;top:2.5rem;left:0;border-radius:5px;padding:0;-webkit-box-shadow:5px 5px 10px rgba(0,0,0,.2);box-shadow:5px 5px 10px rgba(0,0,0,.2)}.element-list[data-v-31668547],.element-list[data-v-31668547]:after{position:absolute;background-color:#fff}.element-list[data-v-31668547]:after{content:"";width:1.25rem;height:1.25rem;top:-.2rem;left:.5rem;z-index:-1;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:1px}.element-list--item[data-v-31668547]{list-style:none}.element-list--item__button[data-v-31668547]{background:none;padding:.25rem .85rem;border:none;color:#000;font-size:.85rem}.element-list--item__button[data-v-31668547]:disabled{opacity:.6;cursor:not-allowed}',""]),e.exports=t},fca5:function(e,t,n){e.exports=n.p+"img/intermediate-message-catch-event.9d25208e.svg"},fce3:function(e,t,n){var o=n("d039"),i=n("da84"),r=i.RegExp;e.exports=o((function(){var e=r(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},fdbc:function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(e,t,n){var o=n("04f8");e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fde4:function(e,t,n){const{is:o,isAny:i}=n("7b95");e.exports=function(){function e(e){return Array.isArray(e.eventDefinitions)&&e.eventDefinitions.length>0}function t(e){return e.eventDefinitions.filter(e=>o(e,"bpmn:SignalEventDefinition")&&!e.signalRef)}function n(n,o){if(!i(n,["bpmn:StartEvent","bpmn:EndEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent"]))return;if(!e(n))return;const r=t(n);r.length>0&&o.report(n.id,"Missing signal reference")}return{check:n}}},ffaa:function(e,t,n){e.exports=n.p+"img/redo.8425ce7e.svg"},ffd6:function(e,t,n){var o=n("3729"),i=n("1310"),r="[object Symbol]";function a(e){return"symbol"==typeof e||i(e)&&o(e)==r}e.exports=a}})}));
|
|
34
|
+
b=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(_){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var r=t&&t.prototype instanceof p?t:p,a=Object.create(r.prototype),s=new M(i||[]);return o(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(_){return{type:"throw",arg:_}}}e.wrap=l;var u={};function p(){}function h(){}function f(){}var m={};c(m,r,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(T([])));y&&y!==t&&n.call(y,r)&&(m=y);var w=f.prototype=p.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function i(o,r,a,s){var c=d(e[o],e,r);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==v(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(c.arg)}var r;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){i(e,n,t,o)}))}return r=r?r.then(o,o):o()}})}function C(e,t,n){var o="suspendedStart";return function(i,r){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===i)throw r;return P()}for(n.method=i,n.arg=r;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var c=d(e,t,n);if("normal"===c.type){if(o=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o="completed",n.method="throw",n.arg=c.arg)}}}function S(e,t){var n=t.method,o=e.iterator[n];if(void 0===o)return t.delegate=null,"throw"===n&&e.iterator["return"]&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),u;var i=d(o,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,u;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(n.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=f,o(w,"constructor",{value:f,configurable:!0}),o(f,"constructor",{value:h,configurable:!0}),h.displayName=c(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},x(k.prototype),c(k.prototype,a,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,o,i,r){void 0===r&&(r=Promise);var a=new k(l(t,n,o,i),r);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(w),c(w,s,"Generator"),c(w,r,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},e.values=T,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(n,o){return a.type="throw",a.arg=e,t.next=n,o&&(t.method="next",t.arg=void 0),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i],a=r.completion;if("root"===r.tryLoc)return o("end");if(r.tryLoc<=this.prev){var s=n.call(r,"catchLoc"),c=n.call(r,"finallyLoc");if(s&&c){if(this.prev<r.catchLoc)return o(r.catchLoc,!0);if(this.prev<r.finallyLoc)return o(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return o(r.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return o(r.finallyLoc)}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function y(e,t,n,o,i,r,a){try{var s=e[r](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(o,i)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function a(e){y(r,o,i,a,s,"next",e)}function s(e){y(r,o,i,a,s,"throw",e)}a(void 0)}))}}n("7db0"),n("d81d"),n("99af"),n("4e82");var x=n("9b02"),k=n.n(x),C=n("b047c"),S=n.n(C),E=n("94c7"),A=n.n(E),M=["#357bf6","#4ba0b5","#53a451","#6d747c","#f7b84b","#ff8628","#cc444a"],T="#dffdd0",P="#fae0e6",_="#fff",O="#000",D="#edfffc",I="#00bf9c",N="#fff4d1",R="#fbbe02",j="#fff1f2",L="#ed4757",B="#f7f7f7";function F(e,t){return t?{fill:A()(t).lighten(35).toHex8String(),stroke:t}:e.isBpmnType("bpmn:StartEvent")?{fill:D,stroke:I}:e.isBpmnType("bpmn:IntermediateEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent")?{fill:N,stroke:R}:e.isBpmnType("bpmn:EndEvent")?{fill:j,stroke:L}:e.isBpmnType("bpmn:Participant","bpmn:Lane")?{fill:B,stroke:O}:{fill:_,stroke:O}}function z(e,t,n){if(e.component.node.isType("processmaker-modeler-text-annotation"))return e.attr("label/fill",n),void e.attr("body/stroke",n);e.attr("body")&&(e.attr("body/fill",t),e.attr("body/stroke",n)),e.attr("body2")&&(e.attr("body2/fill",t),e.attr("body2/stroke",n)),e.attr("line")&&e.attr("line/stroke",n),e.attr("polyline")&&(e.attr("polyline/fill",t),e.attr("polyline/stroke",n)),e.attr("label")&&e.attr("label/fill",n)}function H(e){return e.isBpmnType("bpmn:StartEvent")?I:e.isBpmnType("bpmn:IntermediateEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent")?R:e.isBpmnType("bpmn:EndEvent")?L:e.isBpmnType("bpmn:ExclusiveGateway","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:BoundaryEvent")?"#000":"#788793"}n("07ac"),n("4de4"),n("8172"),n("efec"),n("a9e3");function q(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==v(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function V(e){var t=q(e,"string");return"symbol"===v(t)?t:String(t)}function U(e,t,n){return t=V(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G='<rect width="1" height="1" fill="none"/>',W="default",$="boundary",X="rectangle",Y={x:"50%",y:"0%"},Z={x:"25%",y:"0%"},K={x:"75%",y:"0%"},J={x:"100%",y:"50%"},Q={x:"100%",y:"25%"},ee={x:"100%",y:"75%"},te={x:"50%",y:"100%"},ne={x:"25%",y:"100%"},oe={x:"75%",y:"100%"},ie={x:"0%",y:"50%"},re={x:"0%",y:"25%"},ae={x:"0%",y:"75%"},se={x:"50%",y:"50%"},ce=[Y,Z,K,J,Q,ee,te,ne,oe,ie,re,ae],le=function(e){return function(t){return{group:e,args:t,markup:G}}},de=[Y,J,ie,te,se].map(le(W)),ue=ce.map(le($)),pe=[].concat(ce,[se]).map(le(X)),he={mounted:function(){var e=this;return w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:e.shape.attributes.ports={},e.shape.attributes.ports.groups=(n={},U(n,W,{position:{name:"absolute"}}),U(n,$,{position:{name:"absolute"}}),U(n,X,{position:{name:"absolute"}}),n),e.shape.addPorts([].concat(g(de),g(ue),g(pe)));case 5:case"end":return t.stop()}}),t)})))()}},fe=n("52b3"),me=n.n(fe),ge=n("63ea"),ve=n.n(ge);function be(e,t){var n=e.position(),o=n.x,i=n.y,r=Object.values(e.getPortsPositions(t)).map((function(e){var t=e.x,n=e.y;return new d["g"].Point(o+t,i+n)}));if(!r){var a=e.position(),s=a.x,c=a.y,l=e.size(),u=l.width,p=l.height;r.push(new d["g"].Point(s-u/2,c-p/2))}return r}function ye(e,t,n){var o=new d["g"].Point(t.x,t.y);return o.chooseClosest(be(e,n))}function we(e,t){return ye(t,e,$)}function xe(e,t){return ye(t.model,e,W)}function ke(e,t){return ye(t.model,e,X)}function Ce(e){function t(t){var n=t.topMiddle(),o=[n],i=0,r=n.clone();while(r.x<t.topRight().x)i++,r=n.clone(),r.translate(e*i),o.push(r,r.reflection(n));return o.push(t.topLeft()),o.push(t.topRight()),o}function n(t){var n=t.leftMiddle(),o=[n],i=n,r=0;while(i.y<t.bottomLeft().y)r++,i=n.clone(),i.translate(0,e*r),o.push(i,i.reflection(n));return o}return function(e,o){var i=o.model.getBBox({useModelGeometry:!0}),r=t(i),a=n(i),s=r.map((function(e){return e.reflection(i.center())})),c=a.map((function(e){return e.reflection(i.center())})),l=[].concat(g(r),g(s),g(a),g(c),[i.center()]),u=new d["g"].Point(e.x,e.y);return u.chooseClosest(l)}}function Se(e){var t=e.position(),n=t.x,o=t.y,i=e.size(),r=i.width,a=i.height;return{x:n+r/2,y:o+a/2}}function Ee(e){var t=be(e,$),n=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.isBpmnType("bpmn:BoundaryEvent")})).map(Se);return me()(t,n,ve.a)}n("cb29");function Ae(e){var t=e.component.node,n=t.definition.get("color"),o=F(t,n),i=o.fill,r=o.stroke;z(e,i,r)}function Me(e){if(Array.isArray(e))return e}function Te(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,s=[],c=!0,l=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=r.call(n)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(d){l=!0,i=d}finally{try{if(!c&&null!=n["return"]&&(a=n["return"](),Object(a)!==a))return}finally{if(l)throw i}}return s}}function Pe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _e(e,t){return Me(e)||Te(e,t)||f(e,t)||Pe()}n("4fad"),n("caad"),n("2532"),n("a434");var Oe=n("8bbf"),De=n.n(Oe),Ie=n("2f62"),Ne=n("4d8c"),Re=n.n(Ne),je=n("eed6"),Le=n.n(je);function Be(e,t,n){e.hasOwnProperty(t)?e.set(t,n):(delete Object.getPrototypeOf(e)[t],De.a.set(e,t,n))}function Fe(e,t,n){e.nodes.filter((function(e){var t=e.definition;return("bpmn:IntermediateCatchEvent"===t.$type||"bpmn:StartEvent"===t.$type)&&t.eventDefinitions&&t.eventDefinitions.some(n)})).forEach((function(e){var n=e.definition;n.eventDefinitions[0][t]=null}))}De.a.use(Ie["a"]);var ze=new Ie["a"].Store({state:{graph:null,paper:null,highlightedNodes:[],nodes:[],rootElements:[],autoValidate:!1,globalProcesses:[],allowSavingElementPosition:!0,copiedElements:[],clientLeftPaper:!1,readOnly:!1},getters:{nodes:function(e){return e.nodes},paper:function(e){return e.paper},highlightedNodes:function(e){return e.highlightedNodes},nodeShape:function(e){return function(t){return e.graph.getCells().find((function(e){return e.component&&e.component.node===t}))}},highlightedShapes:function(e,t){return t.highlightedNodes.filter((function(e){return"processmaker-modeler-process"!==e.type})).map(t.nodeShape)},rootElements:function(e){return e.rootElements},autoValidate:function(e){return e.autoValidate},globalProcesses:function(e){return e.globalProcesses},globalProcessEvents:function(e,t){return Re()(t.globalProcesses.map((function(e){return e.events})))},allowSavingElementPosition:function(e){return e.allowSavingElementPosition},copiedElements:function(e){return e.copiedElements},clientLeftPaper:function(e){return e.clientLeftPaper},isReadOnly:function(e){return e.readOnly},showComponent:function(e){return!e.readOnly}},mutations:{setReadOnly:function(e,t){e.readOnly=t},preventSavingElementPosition:function(e){e.allowSavingElementPosition=!1},allowSavingElementPosition:function(e){e.allowSavingElementPosition=!0},setAutoValidate:function(e,t){e.autoValidate=t},setRootElements:function(e,t){e.rootElements=t},updateNodeBounds:function(e,t){var n=t.node,o=t.bounds;o&&Object.entries(o).forEach((function(e){var t=_e(e,2),o=t[0],i=t[1];"$type"!==o&&n.diagram.bounds.set(o,i)}))},updateNodeProp:function(e,t){var n=t.node,o=t.key,i=t.value;"id"==o&&n.definition.id!==i&&e.nodes.some((function(e){return e.definition.id===i}))||(Be(n.definition,o,i),null==i&&De.a.delete(n.definition,o))},clearNodes:function(e){e.nodes=[]},highlightNode:function(e,t){e.highlightedNodes=t?[t]:[]},addToHighlightedNodes:function(e,t){var n=Le()([].concat(g(e.highlightedNodes),g(t))),o=n.filter((function(e){return"processmaker-modeler-pool"===e.type})).map((function(e){return e.id}));e.highlightedNodes=n.filter((function(e){return!e.pool||!e.pool.component.node.id||!o.includes(e.pool.component.node.id)}))},addNode:function(e,t){t._modelerId="_modelerId_"+t.definition.get("id"),e.nodes.push(t)},removeNode:function(e,t){var n=e.nodes.indexOf(t);-1!==n&&e.nodes.splice(n,1)},removeMessageRef:function(e,t){Fe(e,"messageRef",(function(e){var n=e.messageRef;return n===t}))},removeSignalRef:function(e,t){Fe(e,"signalRef",(function(e){var n=e.signalRef;return n===t}))},setGraph:function(e,t){e.graph=t},setPaper:function(e,t){e.paper=t},setGlobalProcesses:function(e,t){e.globalProcesses=t},setCopiedElements:function(e,t){e.copiedElements=t},setClientLeftPaper:function(e,t){e.clientLeftPaper=t}},actions:{fetchGlobalProcesses:function(e){return w(b().mark((function t(){var n,o,i;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,t.prev=1,t.next=4,window.ProcessMaker.apiClient.get("processes",{params:{order_direction:"asc",per_page:1e3,status:"all",include:"events,category"}});case 4:o=t.sent,i=o.data,n("setGlobalProcesses",i.data),window.ProcessMaker.globalProcesses=i.data,t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](1);case 12:case"end":return t.stop()}}),t,null,[[1,10]])})))()}}}),He="#5096db",qe="#FF0000",Ve="#3FA6FF",Ue="#DCF2FF",Ge="#CCCCCC",We="#F5F5F5",$e="#00BA7C",Xe="#D6FFE6",Ye={source:"source",target:"target"};function Ze(e){return e.x&&e.y}var Ke={props:["highlighted","paper","paperManager","isCompleted","isIdle"],data:function(){return{sourceShape:null,target:null,listeningToMouseup:!1,vertices:null,anchorPointFunction:xe}},watch:{target:function(e,t){t&&t!==e&&Ae(t)},isValidConnection:function(e){e?this.shape.stopListening(this.paper,"blank:pointerdown link:pointerdown element:pointerdown",this.removeLink):this.shape.listenToOnce(this.paper,"blank:pointerdown link:pointerdown element:pointerdown",this.removeLink)},highlighted:function(e){ze.getters.isReadOnly||(e?(this.shape.attr({line:{stroke:"#5096db"},".joint-highlight-stroke":{display:"none"}}),this.shapeView.showTools()):(Ae(this.shape),this.shapeView.hideTools()))}},computed:{shapeView:function(){return this.shape.findView(this.paper)},sourceNode:function(){return k()(this.sourceShape,"component.node")},targetNode:function(){return k()(this.target,"component.node")},sourceConfig:function(){return this.sourceNode&&this.nodeRegistry[this.sourceNode.type]},targetConfig:function(){return this.targetNode&&this.nodeRegistry[this.targetNode.type]},elementPadding:function(){return this.shape&&this.shape.source().id===this.shape.target().id?20:1}},methods:{setShapeHighlight:function(){this.isCompleted?this.shape.attr({line:{stroke:$e}}):this.isIdle&&this.shape.attr({line:{stroke:Ge}})},findSourceShape:function(){var e=this;return this.graph.getElements().find((function(t){return t.component&&t.component.node.definition===e.node.definition.get("sourceRef")}))},setEndpoint:function(e,t,n){var o=this;if(e&&Ze(e))return this.shape[t](e,{anchor:{name:"modelCenter",args:{padding:25}},connectionPoint:{name:"boundary"}});var i=function(){var t=e.position(),o=t.x,i=t.y,r=e.size(),a=r.width,s=r.height;return n?{x:o+n.x,y:i+n.y}:{x:o+a/2,y:i+s/2}};this.shape[t](e,{anchor:function(){return o.getAnchorPointFunction(t)(i(),e.findView(o.paper))},connectionPoint:{name:"boundary"}})},setSource:function(e,t){this.setEndpoint(e,Ye.source,t)},setTarget:function(e,t){this.setEndpoint(e,Ye.target,t)},completeLink:function(){this.shape.stopListening(this.paper,"cell:mouseleave"),this.$emit("set-cursor",null),this.resetPaper();var e=this.shape.getTargetElement();Ae(e),this.shape.on("change:vertices",this.onChangeVertices),this.shape.listenTo(this.sourceShape,"change:position",this.updateWaypoints),this.shape.listenTo(e,"change:position",this.updateWaypoints);var t=this.shape.getSourceElement();t.embed(this.shape),this.$emit("set-shape-stacking",t)},onChangeVertices:function(e,t,n){var o=this;return w(b().mark((function e(){return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n||!n.ui){e.next=5;break}return o.updateWaypoints(),e.next=4,o.$nextTick();case 4:o.$emit("save-state");case 5:case"end":return e.stop()}}),e)})))()},updateWaypoints:function(){var e=this,t=this.shape.findView(this.paper),n=t.sourceAnchor,o=t.targetAnchor;this.node.diagram.waypoint=[n].concat(g(this.shape.vertices()),[o]).map((function(t){return e.moddle.create("dc:Point",t)})),this.listeningToMouseup||(this.listeningToMouseup=!0,document.addEventListener("mouseup",this.emitSave))},updateLinkTarget:function(e){var t=this,n=e.clientX,o=e.clientY,i=this.paper.clientToLocalPoint({x:n,y:o});if(this.target=this.graph.findModelsFromPoint(i).sort((function(e,t){return t.get("z")-e.get("z")}))[0],!this.isValidConnection)return this.$emit("set-cursor","not-allowed"),this.shape.target({x:i.x,y:i.y}),void(this.target&&z(this.target,P));this.setTarget(this.target),this.updateRouter(),this.$emit("set-cursor","default"),z(this.target,T),this.paper.el.removeEventListener("mousemove",this.updateLinkTarget),this.shape.listenToOnce(this.paper,"cell:pointerclick",(function(){t.completeLink(),t.updateWaypoints(),t.updateWaypoints.flush(),t.updateDefinitionLinks&&t.updateDefinitionLinks(),t.$emit("save-state")})),this.shape.listenToOnce(this.paper,"cell:mouseleave",(function(){t.paper.el.addEventListener("mousemove",t.updateLinkTarget),t.shape.stopListening(t.paper,"cell:pointerclick"),Ae(t.target),t.$emit("set-cursor","not-allowed")}))},removeLink:function(){this.$emit("remove-node",this.node),this.resetPaper()},resetPaper:function(){this.$emit("set-cursor",null),this.paper.el.removeEventListener("mousemove",this.updateLinkTarget),this.paper.setInteractivity(this.graph.get("interactiveFunc")),this.target&&Ae(this.target)},getAnchorPointFunction:function(e){return"source"===e?this.sourceShape.component.anchorPointFunction||this.anchorPointFunction:"target"===e?this.target.component.anchorPointFunction||this.anchorPointFunction:void 0},setupLinkTools:function(){var e=new d["linkTools"].Vertices,t=new d["linkTools"].SourceAnchor({snap:this.getAnchorPointFunction("source")}),n=new d["linkTools"].TargetAnchor({snap:this.getAnchorPointFunction("target")}),o=new d["dia"].ToolsView({tools:[e,t,n]});this.shapeView.addTools(o),this.shapeView.hideTools()},emitSave:function(){this.highlighted&&(this.updateWaypoints.flush(),document.removeEventListener("mouseup",this.emitSave),this.listeningToMouseup=!1)}},created:function(){this.updateWaypoints=S()(this.updateWaypoints,100),this.emitSave.bind(this)},mounted:function(){var e=this;return w(b().mark((function t(){var n,o,i,r,a,s,c,l,d,u,p,h,f,m;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:if(e.sourceShape=e.findSourceShape(),e.setSource(e.sourceShape),e.$once("click",(function(){e.$nextTick((function(){ze.getters.isReadOnly||e.setupLinkTools()}))})),n=e.getTargetRef?e.getTargetRef():e.node.definition.get("targetRef"),n){t.next=8;break}return t.abrupt("return");case 8:n.id?(o=e.graph.getElements().find((function(e){return e.component&&e.component.node.definition===n})),e.target=o,i=e.node.diagram.waypoint,r=e.node.diagram.waypoint[0],a=i[i.length-1],s=o.position(),c=s.x,l=s.y,d={x:a.x-c,y:a.y-l},u=e.sourceShape.position(),p=u.x,h=u.y,f={x:r.x-p,y:r.y-h},i&&(m=i.slice(1,i.length-1).map((function(e){var t=e.x,n=e.y;return{x:t,y:n}})),e.shape.vertices(m)),e.setSource(e.sourceShape,f),e.setTarget(o,d),e.completeLink()):(e.setTarget(n),e.paper.setInteractivity(!1),e.paper.el.addEventListener("mousemove",e.updateLinkTarget),e.$emit("set-cursor","not-allowed"),e.isValidConnection?e.shape.stopListening(e.paper,"blank:pointerdown link:pointerdown element:pointerdown",e.removeLink):e.shape.listenToOnce(e.paper,"blank:pointerdown link:pointerdown element:pointerdown",e.removeLink)),e.updateRouter(),e.shape.on("change:vertices",(function(){this.component.$emit("shape-resize")})),ze.getters.isReadOnly&&e.$nextTick((function(){e.paperManager.awaitScheduledUpdates().then((function(){e.setShapeHighlight()}))}));case 12:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){document.removeEventListener("mouseup",this.emitSave)},destroyed:function(){this.updateWaypoints.cancel()}},Je=n("acbb"),Qe=n.n(Je),et={none:"None",one:"One",both:"Both"},tt=function(){var e=this,t=e._self._c;return e.showCrownConfig?t("div",{staticClass:"crown-config",style:e.style,attrs:{role:"menu"}},[e._t("default"),t("association-flow-button",e._g({attrs:{node:e.node,moddle:e.moddle,shape:e.shape},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("generic-flow-button",e._g({attrs:{node:e.node,"node-registry":e.nodeRegistry,moddle:e.moddle},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("data-association-flow-button",e._g({attrs:{node:e.node,moddle:e.moddle,shape:e.shape},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("default-flow",e._g({attrs:{node:e.node}},e.$listeners)),t("crown-dropdowns",e._g({attrs:{"dropdown-data":e.dropdownData,"boundary-event-dropdown-data":e.boundaryEventDropdownData,node:e.node,"node-registry":e.nodeRegistry,moddle:e.moddle,shape:e.shape,"task-dropdown-initially-open":e.taskDropdownInitiallyOpen,showCustomIconPicker:e.showCustomIconPicker,iconName:e.iconName},on:{"replace-node-type":e.replaceNodeTypePrompt}},e.$listeners)),t("copy-button",e._g({attrs:{node:e.node}},e.$listeners)),t("clone-button",e._g({attrs:{node:e.node}},e.$listeners)),t("delete-button",e._g({attrs:{graph:e.graph,shape:e.shape,node:e.node}},e.$listeners)),t("b-modal",{ref:"modal",attrs:{"no-fade":e.runningInCypressTest,id:"modal-prevent-closing",title:e.$t("Change Type"),"ok-title":e.$t("Confirm"),"cancel-title":e.$t("Cancel")},on:{hidden:function(t){e.showReplaceModal=!1},ok:e.confirmedReplaceNodeType},model:{value:e.showReplaceModal,callback:function(t){e.showReplaceModal=t},expression:"showReplaceModal"}},[t("p",[e._v(e._s(e.$t("Changing this type will replace your current configuration")))])])],2):e._e()},nt=[],ot=(n("b64b"),function(){var e=this,t=e._self._c;return t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Delete"),role:"menuitem",id:"delete-button","aria-label":"Delete this node"},on:{click:function(t){e.isPoolLane?e.removePoolLaneShape():e.removeShape()}}},[t("i",{staticClass:"fas fa-trash-alt cog-container--button"})])}),it=[],rt=n("806c"),at=n.n(rt),st=function(){var e=this,t=e._self._c;return t("button",e._g({staticClass:"crown-button",attrs:{id:e.id,"aria-label":e.ariaLabel}},e.$listeners),[e._t("default",(function(){return[t("img",{staticClass:"crown-icon",attrs:{src:e.src,width:"width",height:"height"}})]}))],2)},ct=[],lt={props:{id:String,ariaLabel:String,src:String,width:{type:Number,default:19},height:{type:Number,default:20}}},dt=lt;n("c9b2");function ut(e,t,n,o,i,r,a,s){var c,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),a?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=c):i&&(c=s?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(e,t){return c.call(t),d(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:l}}var pt=ut(dt,st,ct,!1,null,"09d8a8ac",null),ht=pt.exports,ft=n("60bb"),mt=n.n(ft),gt="processmaker-modeler-data-output-association",vt="bpmn:DataOutputAssociation";function bt(e){return e.create("bpmn:DataOutputAssociation",{targetRef:{x:void 0,y:void 0}})}function yt(e){return e.create("bpmndi:BPMNEdge")}var wt="processmaker-modeler-data-input-association",xt="bpmn:DataInputAssociation";function kt(e){return e.create("bpmn:DataInputAssociation",{targetRef:{x:void 0,y:void 0}})}function Ct(e){return e.create("bpmndi:BPMNEdge")}function St(e,t){var n=this,o=e.getConnectedLinks(t);o.forEach((function(e){return n.$emit("remove-node",e.component.node)}))}function Et(e,t){e.definition.incoming&&e.definition.incoming.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));t.removeNode(n)})),e.definition.outgoing&&e.definition.outgoing.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));t.removeNode(n)}))}function At(e,t){var n=t.nodes.filter((function(t){return!(!t.definition.sourceRef||t.definition.sourceRef!==e.definition)||(!(!t.definition.targetRef||t.definition.targetRef!==e.definition)||void 0)}));n.forEach((function(e){t.removeNode(e)}))}function Mt(e,t){var n=t.nodes.filter((function(t){return!(!t.definition.sourceRef||t.definition.sourceRef!==e.definition)||(!(!t.definition.targetRef||t.definition.targetRef!==e.definition)||void 0)}));n.forEach((function(e){t.removeNode(e)}))}function Tt(e,t,n){var o=e.getCells().find((function(e){return e.component&&e.component.node===t}));o.getEmbeddedCells({deep:!0}).filter((function(e){return e.component&&e.component.node.isBpmnType("bpmn:BoundaryEvent")})).forEach((function(t){e.getConnectedLinks(t).forEach((function(e){return n(e.component.node)})),n(t.component.node)}))}function Pt(e){if(!e.isBpmnType(vt,xt)){var t=e.definition,n=t.sourceRef,o=t.targetRef;n&&Object(ft["pull"])(n.get("outgoing"),e.definition),o&&o.id&&Object(ft["pull"])(o.get("incoming"),e.definition)}}function _t(e){var t=Object(ft["get"])(e,"definition.sourceRef.default.id",null);t&&t===e.id&&e.definition.sourceRef.set("default",null)}function Ot(e,t,n){if("bpmn:DataObjectReference"!==n.$type&&"bpmn:DataStoreReference"!==n.$type)throw"Source node must be a DataObjectReference or bpmn:DataStoreReference, got "+n.$type;var o=n.id,i="data_input_".concat(o);t.definition.ioSpecification||(t.definition.ioSpecification=e.create("bpmn:InputOutputSpecification",{dataInputs:[],dataOutputs:[],inputSets:[],outputSets:[]}),t.definition.ioSpecification.$parent=t.definition),t.definition.ioSpecification.dataInputs||t.definition.ioSpecification.set("dataInputs",[]);var r=t.definition.ioSpecification.dataInputs.find((function(e){return e.id===i}));r||(t.definition.ioSpecification.dataInputs.push(e.create("bpmn:DataInput",{id:i,isCollection:"false",name:n.name})),t.definition.ioSpecification.dataInputs[t.definition.ioSpecification.dataInputs.length-1].$parent=t.definition.ioSpecification,t.definition.ioSpecification.set("dataInputs",t.definition.ioSpecification.dataInputs)),r=t.definition.ioSpecification.dataInputs.find((function(e){return e.id===i})),t.definition.ioSpecification.outputSets||t.definition.ioSpecification.set("outputSets",[e.create("bpmn:OutputSet",{dataOutputRefs:[]})]);var a=t.definition.ioSpecification.outputSets[0];a||t.definition.ioSpecification.set("outputSets",[e.create("bpmn:OutputSet",{dataOutputRefs:[]})]),a=t.definition.ioSpecification.outputSets[0],t.definition.ioSpecification.inputSets||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]);var s=t.definition.ioSpecification.inputSets[0];s||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]),s=t.definition.ioSpecification.inputSets[0];var c=s.get("dataInputRefs").find((function(e){return e.id===i}));return c||s.dataInputRefs.push(r),r}function Dt(e,t){var n,o=e.$parent;return o||(null===(n=t.nodes.find((function(t){var n;return t.definition.ioSpecification===e||(null===(n=t.definition.ioSpecification)||void 0===n?void 0:n.id)===e.id})))||void 0===n?void 0:n.definition)}function It(e,t){if("bpmn:DataObjectReference"!==t.$type&&"bpmn:DataStoreReference"!==t.$type)throw"Source node must be a DataObjectReference or bpmn:DataStoreReference, got "+t.$type;var n=t.id,o="data_input_".concat(n);if(e.definition.ioSpecification&&e.definition.ioSpecification.dataInputs){var i=e.definition.ioSpecification.dataInputs.find((function(e){return e.id===o}));if(i&&(Object(ft["pull"])(e.definition.ioSpecification.dataInputs,i),e.definition.ioSpecification.inputSets)){var r=e.definition.ioSpecification.inputSets[0];if(r){var a=r.dataInputRefs.find((function(e){return e.id===o}));if(a&&Object(ft["pull"])(r.dataInputRefs,a),0===r.dataInputRefs.length&&delete e.definition.ioSpecification.inputSets,e.definition.ioSpecification.outputSets){var s=e.definition.ioSpecification.outputSets[0];!s||s.dataOutputRefs&&0!==s.dataOutputRefs.length||delete e.definition.ioSpecification.outputSets}e.definition.ioSpecification.inputSets||e.definition.ioSpecification.outputSets||delete e.definition.ioSpecification}}}}var Nt={components:{CrownButton:ht},props:{graph:Object,shape:Object,node:Object},data:function(){return{trashIcon:at.a}},computed:{isPoolLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{removeFlows:St,removeShape:function(){this.removeFlows(this.graph,this.shape),this.$emit("remove-node",this.node)},removePoolLaneShape:function(){var e=this;this.$emit("remove-node",this.node);var t=this.node.pool.component,n=t.sortedLanes();2!==n.length?this.shape!==n[n.length-1]?t.fillLanes(this.shape,"bottom-right",!0):t.fillLanes(this.shape,"top-right",!0):this.$emit("remove-node",n.filter((function(t){return t!==e.shape}))[0].component.node)}}},Rt=Nt,jt=ut(Rt,ot,it,!1,null,null,null),Lt=jt.exports,Bt=function(){var e=this,t=e._self._c;return e.allowOutgoingSequenceFlow?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Flow"),id:"generic-flow-button","aria-label":"Create a flow",role:"menuitem"},on:{click:e.addSequence}},[t("font-awesome-icon",{attrs:{icon:["fpm","fa-connect-elements"]}})],1):e._e()},Ft=[],zt=n("3cde"),Ht=n.n(zt);n("e439"),n("dbb4");function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,V(o.key),o)}}function Wt(e,t,n){return t&&Gt(e.prototype,t),n&&Gt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n("5319");var $t={"processmaker-modeler-start-event":"Start Event","processmaker-modeler-start-timer-event":"Start Timer Event","processmaker-modeler-signal-start-event":"Signal Start Event","processmaker-modeler-message-start-event":"Message Start Event","processmaker-modeler-conditional-start-event":"Conditional Start Event"},Xt=$t,Yt={"processmaker-modeler-end-event":"End Event","processmaker-modeler-error-end-event":"Error End Event","processmaker-modeler-message-end-event":"Message End Event","processmaker-modeler-signal-end-event":"Signal End Event","processmaker-modeler-terminate-end-event":"Terminate End Event"},Zt=Yt,Kt={"processmaker-modeler-task":"Form Task","processmaker-modeler-manual-task":"Manual Task","processmaker-modeler-script-task":"Script Task","processmaker-modeler-call-activity":"Sub Process","processmaker-modeler-data-object":"Data Object","processmaker-modeler-data-store":"Data Store"},Jt=Kt,Qt={"processmaker-modeler-exclusive-gateway":"Exclusive Gateway","processmaker-modeler-inclusive-gateway":"Inclusive Gateway","processmaker-modeler-parallel-gateway":"Parallel Gateway","processmaker-modeler-event-based-gateway":"Event Based Gateway"},en=Qt,tn={"processmaker-modeler-intermediate-catch-timer-event":"Intermediate Timer Event","processmaker-modeler-intermediate-signal-catch-event":"Intermediate Signal Catch Event","processmaker-modeler-intermediate-signal-throw-event":"Intermediate Signal Throw Event","processmaker-modeler-intermediate-message-catch-event":"Intermediate Message Catch Event","processmaker-modeler-intermediate-message-throw-event":"Intermediate Message Throw Event","processmaker-modeler-intermediate-conditional-catch-event":"Intermediate Conditional Catch Event"},nn=tn,on=n("0644"),rn=n.n(on),an=function(){function e(t,n,o){Ut(this,e),U(this,"type",void 0),U(this,"definition",void 0),U(this,"diagram",void 0),U(this,"pool",void 0),this.type=t,this.definition=n,this.diagram=o}return Wt(e,[{key:"isBpmnType",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.includes(this.definition.$type)}},{key:"canBeDefaultFlow",value:function(){var e=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"];return"bpmn:SequenceFlow"===this.definition.$type&&e.includes(this.definition.sourceRef.$type)}},{key:"isType",value:function(e){return this.type===e}},{key:"isStartEvent",value:function(){return Object.keys(Xt).includes(this.type)}},{key:"isEndEvent",value:function(){return Object.keys(Zt).includes(this.type)}},{key:"isTask",value:function(){return Object.keys(Jt).includes(this.type)}},{key:"isGateway",value:function(){return Object.keys(en).includes(this.type)}},{key:"isIntermediateEvent",value:function(){return Object.keys(nn).includes(this.type)}},{key:"id",get:function(){return this.definition.id},set:function(e){this.definition.id=e}},{key:"setIds",value:function(e){var t,n,o=this,i=e.generate(),r=_e(i,2),a=r[0],s=r[1];if(this.id||(this.id=a),this.diagram&&(this.diagram.id=s,this.diagram.bpmnElement=this.definition),this.definition.loopCharacteristics&&"bpmn:StandardLoopCharacteristics"===this.definition.loopCharacteristics.$type&&(this.definition.loopCharacteristics.set("id",e.generate()[0]),this.definition.loopCharacteristics.loopCondition&&this.definition.loopCharacteristics.get("loopCondition").set("id",e.generate()[0])),this.definition.ioSpecification){this.definition.ioSpecification.set("id",e.generate()[0]);var c=this.definition.id;this.definition.ioSpecification.get("dataInputs")&&this.definition.ioSpecification.get("dataInputs").forEach((function(n){var i=n.get("id");i.substring(0,o.cloneOf.length)===o.cloneOf?(n.set("id",i.replace(o.cloneOf+"_",c+"_")),t=n):n.set("id",e.generate()[0])})),this.definition.ioSpecification.get("dataOutputs")&&this.definition.ioSpecification.get("dataOutputs").forEach((function(t){var i=t.get("id");i.substring(0,o.cloneOf.length)===o.cloneOf?(t.set("id",i.replace(o.cloneOf+"_",c+"_")),n=t):t.set("id",e.generate()[0])})),this.definition.ioSpecification.get("inputSets")&&this.definition.ioSpecification.get("inputSets").forEach((function(t){t.set("id",e.generate()[0])})),this.definition.ioSpecification.get("outputSets")&&this.definition.ioSpecification.get("outputSets").forEach((function(t){t.set("id",e.generate()[0])}))}this.definition.loopCharacteristics&&"bpmn:MultiInstanceLoopCharacteristics"===this.definition.loopCharacteristics.$type&&(this.definition.loopCharacteristics.set("id",e.generate()[0]),this.definition.loopCharacteristics.loopCardinality&&this.definition.loopCharacteristics.get("loopCardinality").set("id",e.generate()[0]),this.definition.loopCharacteristics.loopDataInputRef&&t&&this.definition.loopCharacteristics.set("loopDataInputRef",t),this.definition.loopCharacteristics.loopDataOutputRef&&n&&this.definition.loopCharacteristics.set("loopDataOutputRef",n),this.definition.loopCharacteristics.inputDataItem&&this.definition.loopCharacteristics.get("inputDataItem").set("id",e.generate()[0]),this.definition.loopCharacteristics.outputDataItem&&this.definition.loopCharacteristics.get("outputDataItem").set("id",e.generate()[0]),this.definition.loopCharacteristics.completionCondition&&this.definition.loopCharacteristics.get("completionCondition").set("id",e.generate()[0]))}},{key:"clone",value:function(t,n,o){var i=this,r=t[this.type].definition(n,o),a=t[this.type].diagram(n),s=new this.constructor(this.type,r,a);return s.id=null,s.pool=this.pool,s.cloneOf=this.id,e.diagramPropertiesToCopy.forEach((function(e){return s.diagram.bounds[e]=i.diagram.bounds[e]})),Object.keys(this.definition).filter((function(t){return!e.definitionPropertiesToNotCopy.includes(t)})).forEach((function(e){var t=i.definition.get(e),n="object"===v(t)?rn()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",Vt({},t[o].signalRef));s.definition.set(e,n)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return s.definition.eventDefinitions&&s.definition.eventDefinitions[0]&&s.definition.eventDefinitions[0].hasOwnProperty(e)&&s.definition.eventDefinitions[0].set(e,null)})),s}},{key:"cloneFlow",value:function(t,n,o){var i=this,r=t[this.type].definition(n,o),a=t[this.type].diagram(n),s=new this.constructor(this.type,r,a);return s.id=null,s.pool=this.pool,s.cloneOf=this.id,s.diagram=n.create("bpmndi:BPMNEdge",{waypoint:[]}),this.diagram.waypoint.forEach((function(e){var t=n.create("dc:Point",{x:e.x,y:e.y});s.diagram.waypoint.push(t)})),Object.keys(this.definition).filter((function(t){return!e.flowDefinitionPropertiesToNotCopy.includes(t)})).forEach((function(e){var t=i.definition.get(e),n="object"===v(t)?rn()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",Vt({},t[o].signalRef));s.definition.set(e,n),s.definition.set("sourceRef",null),s.definition.set("targetRef",null)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return s.definition.eventDefinitions&&s.definition.eventDefinitions[0]&&s.definition.eventDefinitions[0].hasOwnProperty(e)&&s.definition.eventDefinitions[0].set(e,null)})),s}},{key:"getTargetProcess",value:function(e,t){var n=this;return this.pool?e.find((function(e){var t=e.id;return t===n.pool.component.node.definition.get("processRef").id})):t.definition}}],[{key:"isTimerType",value:function(e){return["processmaker-modeler-start-timer-event","processmaker-modeler-intermediate-catch-timer-event"].includes(e)}}]),e}();U(an,"diagramPropertiesToCopy",["x","y","width","height"]),U(an,"definitionPropertiesToNotCopy",["$type","id","dataOutputAssociations"]),U(an,"flowDefinitionPropertiesToNotCopy",["$type","id","sourceRef","targetRef"]),U(an,"eventDefinitionPropertiesToNotCopy",["errorRef","messageRef"]);var sn="processmaker-modeler-generic-flow",cn=n("b0b2"),ln={prefix:"fpm",iconName:"fa-boundary-event",icon:[112,112,[],"e001","M51.739 2.056c-13.026.848-25.131 6.341-34.43 15.625C10.84 24.139 6.603 30.987 3.72 39.642.81 48.38.051 56.948 1.392 65.92c.932 6.232 3.501 13.807 6.441 18.991 8.903 15.7 23.772 25.701 41.487 27.903 2.517.312 9.393.312 11.911 0 17.703-2.201 32.617-12.231 41.488-27.903 2.943-5.2 5.508-12.763 6.439-18.991 1.698-11.359-.064-22.783-5.13-33.257-4.913-10.156-13.314-18.932-23.21-24.247-7.159-3.845-14.191-5.854-22.286-6.365-3.224-.204-3.584-.204-6.793.005m8.216 4.091c8.319.827 15.946 3.548 22.891 8.165 3.153 2.096 5.414 3.998 8.35 7.021 7.582 7.807 12.34 17.536 14.049 28.731.423 2.764.572 9.015.29 12.1-.962 10.515-4.848 20.143-11.415 28.286-1.857 2.303-5.901 6.293-8.136 8.029a50.9 50.9 0 0 1-23.544 10.144c-3.182.489-11.148.489-14.33 0-5.812-.893-11.669-2.875-16.75-5.668-11.303-6.213-20.134-17.022-24.092-29.49-3.259-10.266-3.259-21.647 0-31.913a51.37 51.37 0 0 1 11.995-20.128c2.834-2.93 5.301-5.008 8.426-7.097a49.964 49.964 0 0 1 22.654-8.169c2.192-.225 7.401-.231 9.612-.011m-9.053 12.099c-20.419 2.322-35.641 19.091-35.641 39.263 0 14.657 8.112 27.984 21.217 34.859 14.221 7.46 31.65 5.768 44.132-4.283 14.219-11.449 18.699-30.977 10.879-47.42-5.522-11.611-16.451-19.808-29.421-22.068-2.55-.444-8.659-.636-11.166-.351m6.979 3.906c1.382.105 3.214.321 4.071.481 12.854 2.394 23.482 11.579 27.55 23.808 4.141 12.449 1.019 26.046-8.153 35.508-5.615 5.792-12.307 9.26-20.584 10.667-2.565.436-8.414.436-10.98 0-11.016-1.872-19.998-7.889-25.586-17.14-5.178-8.573-6.354-19.406-3.15-29.035 4.492-13.506 16.952-23.186 31.248-24.278 2.856-.218 2.85-.218 5.584-.011"]},dn={prefix:"fpm",iconName:"fa-connect-elements",icon:[20,20,[],"e002","M0 2.502v2.501h5.003V3.008h5.004v15.01h5.478V19c0 .54.011.981.024.981.053-.001 2.989-2.477 2.964-2.499a203.517 203.517 0 0 0-2.942-2.429c-.04-.016-.046.116-.046.967v.985h-4.497V1.995H5.003V0H0v2.502m3.99.016v1.504H1.013V1.013H3.99v1.505"]},un={prefix:"fpm",iconName:"fa-lane-above",icon:[26,18,[],"e003","M0 .997v.996h.997V.997h1.04V0H0v.997M2.99.498v.499h2.037V0H2.99v.498m2.99 0v.499h2.037V0H5.98v.498m3.033 0v.499h1.994V0H9.013v.498m2.99 0v.499h1.994V0h-1.994v.498m2.99 0v.499h1.994V0h-1.994v.498m2.99 0v.499h2.037V0h-2.037v.498m2.99 0v.499h2.037V0h-2.037v.498m2.99 0v.499h1.04v.996H26V0h-2.037v.498M0 3.987v.996h.997V2.99H0v.997m25.003 0v.996H26V2.99h-.997v.997M0 11.982v6.001h26V5.98H0v6.002"]},pn={prefix:"fpm",iconName:"fa-lane-below",icon:[26,18,[],"e004","M0 6.002v6.001h26V0H0v6.002m0 7.995v.996h.997V13H0v.997m25.003 0v.996H26V13h-.997v.997M0 16.987v.996h2.037v-.996H.997v-.997H0v.997m25.003-.499v.499h-1.04v.996H26V15.99h-.997v.498m-22.013.997v.498h2.037v-.996H2.99v.498m2.99 0v.498h2.037v-.996H5.98v.498m3.033 0v.498h1.994v-.996H9.013v.498m2.99 0v.498h1.994v-.996h-1.994v.498m2.99 0v.498h1.994v-.996h-1.994v.498m2.99 0v.498h2.037v-.996h-2.037v.498m2.99 0v.498h2.037v-.996h-2.037v.498"]},hn={prefix:"fpm",iconName:"fa-center-horizontally",icon:[24,24,[],"e001","M11.04 4.88v1.88H7.28v3.92h3.76v3.28H5v3.92h6.04v3.76h1v-3.76h6.04v-3.92h-6.04v-3.28h3.76V6.76h-3.76V3h-1v1.88"]},fn={prefix:"fpm",iconName:"fa-center-vertically",icon:[24,24,[],"e001","M6.76 8.04v3.04H3v.96h3.76v6.04h3.92v-6.04h3.28v3.76h3.92v-3.76h3.76v-.959l-1.87-.011-1.87-.01-.01-1.89-.011-1.89H13.96v3.801l-1.63-.011-1.63-.01-.01-3.03L10.679 5H6.76v3.04"]},mn={prefix:"fpm",iconName:"fa-align-left",icon:[24,24,[],"e001","M4 12.32v9.32h1V3H4v9.32m2.28-3.6v1.96h8.52V6.76H6.28v1.96m0 7.2v1.96h13.08v-3.92H6.28v1.96"]},gn={prefix:"fpm",iconName:"fa-align-right",icon:[24,24,[],"e001","M18.4 12.32v9.32h1V3h-1v9.32m-9.8-3.6v1.96h8.48V6.76H8.6v1.96M4 15.92v1.96h13.08v-3.92H4v1.96"]},vn={prefix:"fpm",iconName:"fa-align-bottom",icon:[24,24,[],"e001","M6.76 10.54v6.54h3.92V4H6.76v6.54m7.2 2.3v4.24h3.92V8.6h-3.92v4.24M3 18.9v.5h18.64v-1H3v.5"]},bn={prefix:"fpm",iconName:"fa-align-top",icon:[24,24,[],"e001","M3 4.5V5h18.64V4H3v.5m3.76 8.32v6.54h3.92V6.28H6.76v6.54m7.2-2.28v4.26h3.92V6.28h-3.92v4.26"]},yn={prefix:"fpm",iconName:"fa-distribute-horizontally",icon:[24,24,[],"e001","M3 12.32v9.32h.96V3H3v9.32m17 0v9.32h1V3h-1v9.32m-10.44.02v6.54h4.88V5.8H9.56v6.54"]},wn={prefix:"fpm",iconName:"fa-distribute-vertically",icon:[24,24,[],"e001","M3 3.5V4h18.64V3H3v.5M5.8 12v2.44h13.08V9.56H5.8V12M3 20.52V21h18.64v-.96H3v.48"]},xn=n("07a2"),kn=["processmaker-modeler-data-object","processmaker-modeler-data-store","processmaker-modeler-lane","processmaker-modeler-end-event","processmaker-modeler-error-end-event","processmaker-modeler-signal-end-event","processmaker-modeler-terminate-end-event","processmaker-modeler-text-annotation","processmaker-modeler-sequence-flow","processmaker-modeler-message-flow"],Cn={components:{CrownButton:ht,FontAwesomeIcon:xn["FontAwesomeIcon"]},props:["node","moddle","nodeRegistry"],data:function(){return{sequenceFlow:Ht.a}},computed:{paper:function(){return ze.getters.paper},sequenceFlowConfig:function(){return this.nodeRegistry[sn]},nodeConfig:function(){return this.nodeRegistry[this.node.type]},allowOutgoingSequenceFlow:function(){var e=this;return!kn.some((function(t){return e.node.isType(t)}))}},methods:{addSequence:function(e,t,n,o){this.$emit("toggle-crown-state",!1);var i=e.clientX,r=e.clientY,a=null;e&&(a=Object(d["V"])(this.paper.viewport).toLocalPoint(i,r));var s=this.moddle.create("bpmn:SequenceFlow",{name:"",sourceRef:this.node.definition,targetRef:{x:n||a.x,y:o||a.y}});this.$emit("add-node",new an(sn,s,this.moddle.create("bpmndi:BPMNEdge")))}},created:function(){this.$t=this.$t.bind(this),cn["library"].add(dn)}},Sn=Cn,En=ut(Sn,Bt,Ft,!1,null,null,null),An=En.exports,Mn=function(){var e=this,t=e._self._c;return e.node.isType("processmaker-modeler-text-annotation")?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Association Flow"),id:"association-flow-button","aria-label":"Add association flow",role:"menuitem"},on:{click:e.addAssociation}},[t("img",{attrs:{src:e.connectIcon,"aria-hidden":"true"}})]):e._e()},Tn=[],Pn=n("00a3"),_n=n.n(Pn),On={components:{CrownButton:ht},props:["node","moddle","shape"],data:function(){return{connectIcon:_n.a}},methods:{addAssociation:function(e,t,n,o){this.$emit("toggle-crown-state",!1);var i=this.moddle.create("bpmn:Association",{sourceRef:this.shape.component.node.definition,targetRef:{x:n,y:o},associationDirection:et.none});this.$emit("add-node",new an("processmaker-modeler-association",i,this.moddle.create("bpmndi:BPMNEdge")))}}},Dn=On,In=ut(Dn,Mn,Tn,!1,null,null,null),Nn=In.exports,Rn=function(){var e=this,t=e._self._c;return e.allowOutgoingDataAssociationFlow?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Data Association Flow"),id:"association-flow-button","aria-label":"Add association flow",role:"menuitem"},on:{click:e.addDataAssociation}},[t("img",{attrs:{src:e.connectIcon,"aria-hidden":"true"}})]):e._e()},jn=[];function Ln(e,t){return Ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ln(e,t)}function Bn(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ln(e,t)}n("4ae1"),n("f8c9");function Fn(e){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fn(e)}function zn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qn(e,t){if(t&&("object"===v(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Hn(e)}function Vn(e){var t=zn();return function(){var n,o=Fn(e);if(t){var i=Fn(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return qn(this,n)}}var Un="processmaker-modeler-pool",Gn=function(){function e(t,n,o){Ut(this,e),U(this,"nodeRegistry",void 0),U(this,"moddle",void 0),U(this,"paper",void 0),this.nodeRegistry=t,this.moddle=n,this.paper=o}return Wt(e,[{key:"makeFlowNode",value:function(e,t,n){throw new Error("Best practice is to implement 'makeFlowDefinition' in each class")}}],[{key:"isValid",value:function(e,t,n){throw new Error("Best practice is to implement 'isValid' in each class")}},{key:"hasTargetType",value:function(e){return null!=k()(e,"component.node.type")}},{key:"targetIsValidStartEventType",value:function(e){return!e.isBpmnType("bpmn:StartEvent")||e.isType("processmaker-modeler-message-start-event")}},{key:"targetIsValidIntermediateEventType",value:function(e){return!e.isBpmnType("bpmn:IntermediateCatchEvent")||e.isType("processmaker-modeler-intermediate-message-catch-event")}},{key:"targetIsValidBoundaryEventType",value:function(e){return!e.isBpmnType("bpmn:BoundaryEvent")||e.isType("processmaker-modeler-boundary-message-event")}},{key:"targetIsNotContainingPool",value:function(e,t){return e!==t.pool}},{key:"targetIsInDifferentPool",value:function(t,n){var o=e.shapeIsPool(t)?t:t.component.node.pool,i=e.shapeIsPool(n)?n:n.component.node.pool;return null!=i&&i!==o}},{key:"targetIsNotSource",value:function(e,t){return e.id!==t.id}},{key:"allowOutgoingFlow",value:function(e,t){return!("allowOutgoingFlow"in e)||e.allowOutgoingFlow(t)}},{key:"shapeIsPool",value:function(e){var t=k()(e,"component.node.type");return t===Un}}]),e}(),Wn=function(e){Bn(n,e);var t=Vn(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Wt(n,null,[{key:"isADataNode",value:function(e){return e.isBpmnType.apply(e,g(n.dataNodeTypes))}},{key:"isNodeDisallowedFromDataAssociation",value:function(e){return e.isBpmnType.apply(e,g(n.disallowedNodes))}}]),n}(Gn);U(Wn,"dataNodeTypes",["bpmn:DataStoreReference","bpmn:DataObjectReference"]),U(Wn,"disallowedNodes",["bpmn:EndEvent","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:Participant","bpmn:Lane","bpmn:TextAnnotation","bpmn:Association"]);var $n={components:{CrownButton:ht},props:["node","moddle","shape"],data:function(){return{connectIcon:_n.a}},computed:{paper:function(){return ze.getters.paper},allowOutgoingDataAssociationFlow:function(){return Wn.isADataNode(this.node)}},methods:{addDataAssociation:function(e,t,n){this.$emit("toggle-crown-state",!1);var r=e.clientX,a=e.clientY,s=null;e&&(s=Object(d["V"])(this.paper.viewport).toLocalPoint(r,a));var c=this.node.isBpmnType("bpmn:DataStoreReference","bpmn:DataObjectReference"),l=c?i:o,u=l.definition(this.moddle),p=new an(l.id,u,l.diagram(this.moddle));p.dataAssociationProps={sourceShape:this.shape,targetCoords:{x:t||s.x,y:n||s.y}},this.$emit("add-node",p)}}},Xn=$n,Yn=ut(Xn,Rn,jn,!1,null,null,null),Zn=Yn.exports,Kn=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,g(t.validCopyElements))?n("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:t.$t("Copy Element"),"aria-label":"Copy Element","data-test":"copy-button",role:"menuitem"},on:{click:t.copyElement}},[n("i",{staticClass:"fas fa-clipboard"})]):t._e()},Jn=[],Qn=n("605b"),eo=n.n(Qn),to=["bpmn:StartEvent","bpmn:IntermediateEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:ExclusiveGateway","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:Gateway","bpmn:EventBasedGateway","bpmn:TextAnnotation"],no=to,oo={components:{CrownButton:ht},props:["node"],data:function(){return{copyCount:0,copyIcon:eo.a,validCopyElements:no}},methods:{copyElement:function(){this.$emit("copy-element")}}},io=oo,ro=ut(io,Kn,Jn,!1,null,null,null),ao=ro.exports,so=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,g(t.validCopyElements))?n("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:t.$t("Clone Element"),"aria-label":"Clone Element","data-test":"clone-button"},on:{click:t.cloneElement}},[n("i",{staticClass:"fas fa-paste"})]):t._e()},co=[],lo=n("baa4"),uo=n.n(lo),po={components:{CrownButton:ht},props:["node"],data:function(){return{copyCount:0,cloneIcon:uo.a,validCopyElements:no}},methods:{cloneElement:function(){this.$emit("clone-element",this.node,++this.copyCount)}}},ho=po,fo=ut(ho,so,co,!1,null,null,null),mo=fo.exports,go=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"dropdown"}},[t("crown-task-dropdown",e._g({attrs:{"dropdown-data":e.dropdownData,"dropdown-open":e.taskDropdownOpen,node:e.node},on:{"toggle-dropdown-state":e.taskDropdownToggle}},e.$listeners)),t("crown-boundary-event-dropdown",e._g({attrs:{"dropdown-data":e.boundaryEventDropdownData,"dropdown-open":e.boundaryEventDropdownOpen,nodeRegistry:e.nodeRegistry,moddle:e.moddle,node:e.node,shape:e.shape},on:{"toggle-dropdown-state":e.boundaryEventDropdownToggle}},e.$listeners)),t("crown-color-dropdown",e._g({attrs:{"dropdown-open":e.colorDropdownOpen,node:e.node,showCustomIconPicker:e.showCustomIconPicker,iconName:e.iconName},on:{"toggle-dropdown-state":e.colorDropdownToggle}},e.$listeners))],1)},vo=[],bo=function(){var e=this,t=e._self._c;return e.dropdownData.length>0?t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",e._g({attrs:{"data-test":"select-type-dropdown",id:"dropdown-button","aria-label":"Select a type"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},e.$listeners),[t("i",{staticClass:"fas fa-cog"})]),e.dropdownOpen?t("ul",{staticClass:"element-list",attrs:{role:"list"}},e._l(e.dropdownData,(function(n){var o=n.label,i=n.nodeType,r=n.dataTest,a=n.disabled;return t("li",{key:i,staticClass:"element-list--item",attrs:{role:"listitem",id:i}},[t("button",{staticClass:"element-list--item__button",attrs:{"data-test":r,type:"button",disabled:e.isDisabled(a,e.node,i)},on:{click:function(t){return e.replaceNode({node:e.node,typeToReplaceWith:i})}}},[e._v(e._s(e.$t(o))+" ")]),e.isDisabled(a,e.node,i)?t("b-tooltip",{attrs:{target:i,variant:"warning",placement:"right"}},[e._v(" "+e._s(e.$t(e.tooltip(a,e.node,i)))+" ")]):e._e()],1)})),0):e._e()],1):e._e()},yo=[],wo={name:"CrownTaskDropdown",components:{CrownButton:ht},props:{dropdownData:Array,node:Object,dropdownOpen:{type:Boolean,required:!0}},methods:{isDisabled:function(e,t,n){return e&&(e instanceof Function?e.apply(this,[t,n]):e)},tooltip:function(e,t,n){return this.isDisabled(e,t,n)||""},replaceNode:function(e){e.node.type!==e.typeToReplaceWith?this.$emit("replace-node-type",e):this.$emit("toggle-dropdown-state",!1)}}},xo=wo,ko=(n("cf35"),ut(xo,bo,yo,!1,null,"31668547",null)),Co=ko.exports,So=function(){var e=this,t=e._self._c;return e.dropdownData.length>0?t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",e._g({directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{id:"dropdown-button","aria-label":"Select a boundary event","data-test":"boundary-event-dropdown",title:e.$t("Boundary Events"),role:"menuitem"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-boundary-event"]}})],1),e.dropdownOpen?t("ul",{staticClass:"element-list",attrs:{role:"list"}},e._l(e.dropdownData,(function(n){var o=n.label,i=n.nodeType,r=n.dataTest,a=n.disabledLabel;return t("li",{key:i,staticClass:"element-list--item",attrs:{role:"listitem",id:i}},[t("button",{staticClass:"element-list--item__button",attrs:{"data-test":r,type:"button",disabled:!e.canAddBoundaryEventToTarget(i,e.shape)},on:{click:function(t){return e.addBoundaryEvent(i)}}},[e._v(e._s(e.$t(o))+" ")]),e.canAddBoundaryEventToTarget(i,e.shape)?e._e():t("b-tooltip",{attrs:{target:i,variant:"warning",placement:"right"}},[e._v(" "+e._s(e.getErrorTooltipText(a))+" ")])],1)})),0):e._e()],1):e._e()},Eo=[],Ao=n("0639"),Mo=n.n(Ao),To=["bpmn:Task","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:SendTask","bpmn:ReceiveTask","bpmn:UserTask","bpmn:GlobalTask","bpmn:ManualTask","bpmn:CallActivity"];function Po(e){return e&&To.some((function(t){return e.node.isBpmnType(t)}))}function _o(e,t){return!(!t||!Po(t.component))&&Do(t)}function Oo(e){return e&&e.node.isBpmnType("bpmn:CallActivity")}function Do(e){return 0!==Ee(e).length}var Io={name:"CrownBoundaryEventDropdown",components:{CrownButton:ht,FontAwesomeIcon:xn["FontAwesomeIcon"]},props:{dropdownOpen:{type:Boolean,required:!0},dropdownData:Array,nodeRegistry:Object,moddle:Object,node:Object,shape:Object},data:function(){return{boundaryEventIcon:Mo.a}},methods:{getErrorTooltipText:function(e){return 0===this.getEmptyBoundaryEventPositionsForShape(this.shape).length?"No available space":e},canAddBoundaryEventToTarget:_o,getEmptyBoundaryEventPositionsForShape:Ee,addBoundaryEvent:function(e){if(this.$emit("toggle-dropdown-state",!1),this.canAddBoundaryEventToTarget(e,this.shape)){var t=this.nodeRegistry[e].definition(this.moddle,this.$t),n=this.nodeRegistry[e].diagram(this.moddle),o=Ee(this.shape)[0];n.bounds.x=o.x-n.bounds.width/2,n.bounds.y=o.y-n.bounds.height/2;var i=new an(e,t,n);i.pool=this.node.pool,ze.commit("highlightNode",i),this.$emit("add-node",i)}}},created:function(){this.$t=this.$t.bind(this),cn["library"].add(ln)}},No=Io,Ro=(n("9438"),ut(No,So,Eo,!1,null,null,null)),jo=Ro.exports,Lo=function(){var e=this,t=e._self._c;return t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Open Color Palette"),"aria-label":e.$t("Open Color Palette"),role:"menuitem","data-test":"picker-dropdown-button"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},[t("i",{staticClass:"fas fa-palette"})]),e.dropdownOpen?t("div",{staticClass:"element-list color-list"},[e._l(e.colors.slice(0,4),(function(n){return t("button",{key:n,staticClass:"color-button",style:{backgroundColor:n},attrs:{type:"button","data-test":n},on:{click:function(t){e.selectedColor=n}}})})),e.showCustomIconPicker?t("button",{staticClass:"color-button p-0 fa fa-drafting-compass",attrs:{type:"button","data-test":"set-custom-icon"},on:{click:e.openIconSelector}}):t("div"),e._l(e.colors.slice(4,8),(function(n){return t("button",{key:n,staticClass:"color-button",style:{backgroundColor:n},attrs:{type:"button","data-test":n},on:{click:function(t){e.selectedColor=n}}})})),t("button",{staticClass:"color-button toggle-picker",attrs:{type:"button"},on:{click:function(t){e.colorPickerOpen=!e.colorPickerOpen}}}),t("button",{staticClass:"color-button p-0 fa fa-undo-alt",attrs:{type:"button","data-test":"clear-color"},on:{click:e.resetNodeStyling}}),e.colorPickerOpen?t("sketch-picker",{staticClass:"color-picker",attrs:{value:e.selectedColor||"#fff",presetColors:null},on:{input:e.setColorFromPicker}}):e._e()],2):e._e(),t("b-modal",{ref:"icon-selector-modal",attrs:{title:"Select a custom icon","cancel-title":"Reset to Default"},on:{cancel:e.resetCustomIcon}},[t("div",[t("icon-selector",{attrs:{value:e.iconName,"allow-custom":!1},on:{input:e.setCustomIcon}})],1)])],1)},Bo=[],Fo=(n("313d"),n("0eb6"),n("b7ef"),n("8bd4"),n("c345")),zo=function(){var e=this,t=e._self._c;return t("div",{staticClass:"multiselect-icons"},[t("b-input-group",[t("multiselect",{ref:"multiselect",attrs:{"track-by":"value",label:"label","show-labels":!1,placeholder:e.placeholder,options:e.list,multiple:!1,searchable:!0,"internal-search":!1,"allow-empty":!1},on:{"search-change":e.onSearch,open:e.onOpen,close:e.onClose},scopedSlots:e._u([{key:"singleLabel",fn:function(n){return[n.option?t("span",[t("i",{staticClass:"fas fa-fw",class:"fa-"+n.option.value}),e._v(" "+e._s(n.option.label)+" ")]):e._e()]}},{key:"option",fn:function(n){return[t("div",{staticClass:"icon-square",on:{mouseover:function(t){return e.onHover(n.option)}}},[t("i",{staticClass:"fas fa-fw",class:"fa-"+n.option.value})])]}}]),model:{value:e.icon,callback:function(t){e.icon=t},expression:"icon"}},[t("template",{slot:"noResult"},[e.allowCustom?t("div",{staticClass:"multiselect-no-result text-muted my-2 text-center w-100"},[t("strong",[e._v(e._s(e.$t("No icons found.")))]),t("br"),e._v(" "+e._s(e.$t("Try a different search or"))+" "),t("br"),t("a",{staticClass:"text-primary link-upload",on:{click:e.triggerUpload}},[e._v(e._s(e.$t("upload a custom icon")))]),e._v(". ")]):t("div",{staticClass:"multiselect-no-result text-muted my-2 text-center w-100"},[t("strong",[e._v(e._s(e.$t("No icons found.")))]),t("br"),e._v(" "+e._s(e.$t("Try a different search."))+" ")])]),t("template",{slot:"placeholder"},[this.file?t("span",[e._v(" "+e._s(e.$t("Custom Icon File"))+" "),this.fileName?t("span",{staticClass:"text-muted"},[e._v("("+e._s(this.fileName)+")")]):e._e()]):e._e()])],2),e.allowCustom?t("b-input-group-append",{staticClass:"multiselect-icons-upload"},[t("file-upload-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip",value:{title:e.$t("Upload Custom Icon")},expression:"{ title: $t('Upload Custom Icon') }"}],ref:"fileUploadButton",attrs:{accept:"image/png, image/svg+xml, image/gif",variant:"secondary"},model:{value:e.uploadedFile,callback:function(t){e.uploadedFile=t},expression:"uploadedFile"}},[t("i",{staticClass:"fas fa-fw fa-upload"})])],1):e._e()],1)],1)},Ho=[],qo=(n("841c"),n("a15b"),n("61ec")),Vo=n.n(qo),Uo=["search","search-plus","search-dollar","check-square","list","id-badge","clipboard-list","clipboard-check","clipboard","fire","fire-alt","star","dollar-sign","users","user-circle","trophy"],Go=["align-center","align-justify","align-left","align-right","arrows-alt","arrows-alt-h","arrows-alt-v","bars","beer","bong","border-all","border-none","border-style","cannabis","circle-notch","cog","cogs","compress","compress-alt","compress-arrows-alt","custom","democrat","disease","download","ellipsis-h","ellipsis-v","expand","expand-alt","expand-arrows-alt","faucet","file-download","file-export","file-import","file-upload","flag-usa","font-awesome-logo-full","grip-horizontal","grip-lines","grip-lines-vertical","grip-vertical","hand-holding-water","hand-middle-finger","hospital-user","joint","lungs","republican","upload"],Wo=function(){function e(){Ut(this,e)}return Wt(e,null,[{key:"list",value:function(){var e=this,t=[];Uo.forEach((function(n){Vo.a[n]&&t.push(e.parseIcon(n,Vo.a[n]))}));for(var n=0,o=Object.entries(Vo.a);n<o.length;n++){var i=_e(o[n],2),r=i[0],a=i[1];this.shouldIncludeIcon(r,a)&&t.push(this.parseIcon(r,a))}return t}},{key:"grouped",value:function(){for(var e=[{group:"Common",icons:[]},{group:"All Icons",icons:[]}],t=0,n=Object.entries(Vo.a);t<n.length;t++){var o=_e(n[t],2),i=o[0],r=o[1];Go.includes(i)||(Uo.includes(i)&&e[0].icons.push(this.parseIcon(i,r)),this.shouldIncludeIcon(i,r)&&e[1].icons.push(this.parseIcon(i,r)))}return e}},{key:"shouldIncludeIcon",value:function(e,t){var n=!1,o=["-left","-right","-up","-down"];return Go.includes(e)||Uo.includes(e)||t.styles.includes("solid")&&!t.changes.includes("5.13.0")&&(n=!0),o.forEach((function(t){e.includes(t)&&(n=!1)})),n}},{key:"parseIcon",value:function(e,t){var n={value:e,label:t.label,search:t.search.terms.join()+","+e+","+t.label.toLowerCase()};return n.label.startsLowerCase()&&(n.label=n.label.unSlug().titleCase()),n}}]),e}();String.prototype.startsLowerCase=function(){var e=this.substring(0,1);return e==e.toLowerCase()},String.prototype.unSlug=function(){return this.split("-").join(" ")},String.prototype.titleCase=function(){var e=this.split(" ");return e=e.map((function(e){return e.substring(0,1).toUpperCase()+e.substring(1)})),e.join(" ")};var $o=function(){var e=this,t=e._self._c;return t("b-button",{staticClass:"file-upload-button",attrs:{block:e.block,disabled:e.disabled,size:e.size,variant:e.variant,type:e.type,tag:e.tag,pill:e.pill,squared:e.squared,pressed:e.pressed},on:{click:e.onClick}},[t("b-form-file",e._b({ref:"fileUpload",staticClass:"file-upload-control",attrs:{plain:"",accept:e.accept,capture:e.capture,multiple:e.multiple,directory:e.directory,"no-traverse":e.noTraverse,"no-drop":e.noDrop,"file-name-formatter":e.fileNameFormatter},on:{change:e.onChange,input:e.onInput},model:{value:e.file,callback:function(t){e.file=t},expression:"file"}},"b-form-file",e.$attrs,!1)),e._t("default")],2)},Xo=[],Yo={inheritAttrs:!1,props:{value:{default:null},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"md"},variant:{type:String,default:"secondary"},type:{type:String,default:"button"},tag:{type:String,default:"button"},pill:{type:Boolean,default:!1},squared:{type:Boolean,default:!1},pressed:{type:Boolean,default:null},accept:{type:String,default:""},capture:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},directory:{type:Boolean,default:!1},noTraverse:{type:Boolean,default:!1},noDrop:{type:Boolean,default:!1},fileNameFormatter:{type:Function,default:null}},data:function(){return{file:null}},watch:{file:{handler:function(e){this.$emit("input",e)}},value:{handler:function(e){this.file=e},deep:!0}},methods:{onClick:function(){this.$refs.fileUpload.$el.click()},onChange:function(e){this.$emit("change",e)},onInput:function(e){this.$emit("input",e)},reset:function(){this.$refs.fileUpload.reset()},trigger:function(){this.$refs.fileUpload.$el.click()}}},Zo=Yo,Ko=(n("1242"),ut(Zo,$o,Xo,!1,null,null,null)),Jo=Ko.exports,Qo={components:{FileUploadButton:Jo},props:{value:{required:!1},allowCustom:{type:Boolean,default:!0},default:{type:String,default:"search"}},data:function(){return{all:Wo.list(),file:null,fileName:null,icon:null,list:{},loading:!0,placeholder:this.$t("Icon"),query:"",uploadedFile:null}},computed:{isOpen:function(){return this.$refs.multiselect.isOpen},iconAndFile:function(){return this.allowCustom?{icon:this.icon?this.icon.value:null,file:this.file}:this.icon?this.icon.value:null}},watch:{value:function(){this.allowCustom?(this.icon=this.find(this.value.icon),this.file=this.value.file):this.icon=this.find(this.value)},icon:function(e){e&&(this.file=null,this.fileName=null,this.allowCustom&&this.$refs.fileUploadButton.reset(),this.$emit("input",this.iconAndFile))},file:function(e){e&&(this.icon=null,this.$refs.multiselect.deactivate(),this.$emit("input",this.iconAndFile))},uploadedFile:function(e){var t=this;if(e)if(e.size>2e3)this.$emit("error",this.$t("The custom icon file is too large. File size must be less than 2KB."));else{this.file=e,this.fileName=e.name,this.uploadedFile=null;var n=new FileReader;n.readAsDataURL(this.file),n.onload=function(){t.file=n.result}}}},beforeMount:function(){this.list=this.all},mounted:function(){this.allowCustom?(this.icon=this.find(this.value.icon),this.file=this.value.file):this.value?this.icon=this.find(this.value):this.icon=this.find(this.default)},methods:{onSearch:function(e){var t=this;e.length?this.query=e.toLowerCase():this.isOpen&&(this.query=""),this.query.length?this.list=this.all.filter((function(e){return e.search.includes(t.query)})):this.list=this.all},onOpen:function(){this.$refs.multiselect.search=this.query},onClose:function(){this.placeholder=this.$t("Icon")},find:function(e){return this.all.find((function(t){return t.value==e}))},onHover:function(e){this.placeholder=e.label},triggerUpload:function(){this.$refs.fileUploadButton.trigger()}}},ei=Qo,ti=(n("6dac"),ut(ei,zo,Ho,!1,null,null,null)),ni=ti.exports,oi=n("368f"),ii={props:{dropdownOpen:{type:Boolean,required:!0},node:Object,showCustomIconPicker:{type:Boolean,default:!1},iconName:{type:String,default:""}},components:{CrownButton:ht,"sketch-picker":Fo["Sketch"],IconSelector:ni},data:function(){return{colors:M,selectedColor:this.node.definition.get("color"),colorPickerOpen:!1}},watch:{selectedColor:function(e){e?this.setNodeColor(e):this.resetNodeColor()}},methods:{setColorFromPicker:function(e){var t=e.hex8;this.selectedColor=t},resetNodeStyling:function(){this.resetNodeColor(),this.resetCustomIcon()},setNodeColor:function(e){ze.commit("updateNodeProp",{node:this.node,key:"color",value:e}),De.a.set(this.node.definition,"color",e),this.$emit("save-state")},resetNodeColor:function(){ze.commit("updateNodeProp",{node:this.node,key:"color",value:void 0}),De.a.set(this.node.definition,"color",void 0),this.$emit("save-state")},setCustomIcon:function(e){if(e){var t=Object(cn["icon"])({prefix:"fas",iconName:e}),n=t.html,o=btoa(n);ze.commit("updateNodeProp",{node:this.node,key:"customIcon",value:o}),De.a.set(this.node.definition,"customIcon",o),this.$emit("set-custom-icon-name",e),this.$emit("save-state")}},resetCustomIcon:function(){ze.commit("updateNodeProp",{node:this.node,key:"customIcon",value:void 0}),De.a.set(this.node.definition,"customIcon",void 0),this.$emit("reset-custom-icon-name"),this.$emit("save-state")},openIconSelector:function(){this.$refs["icon-selector-modal"].show()}},created:function(){this.$t=this.$t.bind(this),cn["library"].add(oi["fas"])}},ri=ii,ai=(n("e4ce"),ut(ri,Lo,Bo,!1,null,"0c72746a",null)),si=ai.exports,ci={name:"CrownDropdowns",components:{CrownTaskDropdown:Co,CrownBoundaryEventDropdown:jo,CrownColorDropdown:si},props:{dropdownData:Array,boundaryEventDropdownData:Array,node:Object,nodeRegistry:Object,moddle:Object,shape:Object,taskDropdownInitiallyOpen:{type:Boolean,required:!0},showCustomIconPicker:Boolean,iconName:{type:String,default:""}},data:function(){return{taskDropdownOpen:this.taskDropdownInitiallyOpen,boundaryEventDropdownOpen:!1,colorDropdownOpen:!1}},methods:{taskDropdownToggle:function(e){this.taskDropdownOpen=e,this.boundaryEventDropdownOpen=!1,this.colorDropdownOpen=!1},boundaryEventDropdownToggle:function(e){this.taskDropdownOpen=!1,this.boundaryEventDropdownOpen=e,this.colorDropdownOpen=!1},colorDropdownToggle:function(e){this.taskDropdownOpen=!1,this.boundaryEventDropdownOpen=!1,this.colorDropdownOpen=e}}},li=ci,di=(n("4f3e"),ut(li,go,vo,!1,null,"0a847d3c",null)),ui=di.exports,pi=function(){var e=this,t=e._self._c;return e.node.canBeDefaultFlow()?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Set as Default Flow"),"aria-label":"Default Flow","data-test":"default-flow",role:"menuitem"},on:{click:e.click}},[t("img",{attrs:{src:e.icon,"aria-hidden":"true"}})]):e._e()},hi=[],fi=n("6305"),mi=n.n(fi),gi={components:{CrownButton:ht},props:["node"],data:function(){return{icon:mi.a}},methods:{click:function(){this.$emit("default-flow",this.node)}}},vi=gi,bi=ut(vi,pi,hi,!1,null,null,null),yi=bi.exports,wi={computed:{isLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{configurePoolLane:function(){var e=this;if(!["processmaker-modeler-pool","processmaker-modeler-sequence-flow","processmaker-modeler-association","processmaker-modeler-message-flow"].includes(this.node.type)){if(this.node.pool)return this.graph.getCell(this.node.pool)||(this.node.pool=this.graph.getElements().find((function(t){return t.component&&t.component.node===e.node.pool.component.node}))),this.node.pool.component.addToPool(this.shape),void(this.isLane&&this.configureLaneInParentPool());var t=this.graph.findModelsInArea(this.shape.getBBox()).filter((function(e){return e.component&&"processmaker-modeler-pool"===e.component.node.type}))[0];t&&(this.node.pool=t,this.node.pool.component.addToPool(this.shape),this.isLane&&this.configureLaneInParentPool())}},configureLaneInParentPool:function(){var e=this.node.pool.component;e.laneSet||e.createLaneSet();var t=e.laneSet.get("lanes");t.includes(this.node.definition)||t.push(this.node.definition)}},mounted:function(){var e=this;this.$nextTick((function(){e.configurePoolLane()}))}},xi=n("8730"),ki=n.n(xi);function Ci(){return!!window.Cypress}var Si={components:{CrownDropdowns:ui,DeleteButton:Lt,GenericFlowButton:An,AssociationFlowButton:Nn,CopyButton:ao,CloneButton:mo,DefaultFlow:yi,DataAssociationFlowButton:Zn},props:{highlighted:Boolean,paper:Object,graph:Object,shape:Object,node:Object,nodeRegistry:Object,moddle:Object,planeElements:Array,processNode:Object,collaboration:Object,isRendering:Boolean,dropdownData:{type:Array,default:function(){return[]}},boundaryEventDropdownData:{type:Array,default:function(){return[]}},showCustomIconPicker:{type:Boolean,default:!1},iconName:{type:String,default:""}},mixins:[wi],watch:{"node.definition.color":{handler:function(){this.setNodeColor()}},highlightedShapes:function(e,t){ve()(e,t)||(this.showCrown=this.highlightedShapes[0]===this.shape)},highlighted:function(e){e||(this.taskDropdownInitiallyOpen=!1)},shape:function(){this.highlighted&&(this.showCrown=!0)}},data:function(){return{runningInCypressTest:Ci(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null}},created:function(){this.$t=this.$t.bind(this)},computed:{showCrownConfig:function(){return this.showCrown&&!this.isMultiselect&&!1===ze.getters.isReadOnly},isMultiselect:function(){var e=ze.getters.highlightedShapes.length;return e>1},isFlow:function(){return["processmaker-modeler-sequence-flow","processmaker-modeler-message-flow"].includes(this.node.type)},isTextAnnotation:function(){return"processmaker-modeler-text-annotation"===this.node.type},process:function(){return this.node.pool?this.node.pool.component.containingProcess:this.processNode.definition},highlightedShapes:function(){return ze.getters.highlightedShapes}},methods:{setNodeColor:function(){var e=this.node.definition.get("color"),t=F(this.node,e),n=t.fill,o=t.stroke;z(this.shape,n,o)},paperNotRendered:function(){return!this.isRendering},replaceNodeTypePrompt:function(e){this.taskDropdownInitiallyOpen?this.$emit("replace-node",e):(this.showReplaceModal=!0,this.nodeToReplace=e)},confirmedReplaceNodeType:function(){this.$emit("replace-node",this.nodeToReplace)},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,ze.getters.allowSavingElementPosition},repositionCrown:function(){var e=this.shape.findView(this.paper);if(e){var t=e.getBBox({useModelGeometry:!this.isTextAnnotation&&!this.isFlow}),n=t.x,o=t.y,i=t.width;this.style={top:"".concat(o-52,"px"),left:"".concat(n+i-20,"px"),cursor:"pointer"}}},paperDoneRendering:function(){var e=this;this.isRendering&&new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown),this.shape.on("change:position change:size change:attrs",this.repositionCrown),this.planeElements.includes(this.node.diagram)||this.planeElements.push(this.node.diagram);var e=Object.keys(this.node.definition.$descriptor.allTypesByName);e.includes("bpmn:FlowElement")&&!this.process.get("flowElements").includes(this.node.definition)&&this.process.get("flowElements").push(this.node.definition),e.includes("bpmn:Artifact")&&!this.process.get("artifacts").includes(this.node.definition)&&this.process.get("artifacts").push(this.node.definition),this.collaboration&&e.includes("bpmn:MessageFlow")&&!this.collaboration.get("messageFlows").includes(this.node.definition)&&this.collaboration.get("messageFlows").push(this.node.definition)},setUpPositionHandling:function(){var e=this;this.shape.on("change:position",(function(t,n){e.node.diagram.bounds.x=n.x,e.node.diagram.bounds.y=n.y,e.savePositionOnPointerupEventSet||(e.shape.listenToOnce(e.paper,"element:pointerup",e.setNodePosition),e.savePositionOnPointerupEventSet=!0)}))}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig(),e.setUpPositionHandling(),e.setNodeColor();case 7:case"end":return t.stop()}}),t)})))()},destroyed:function(){this.shape.stopListening(),this.shape.remove(),ki()(this.process.get("flowElements"),this.node.definition),ki()(this.planeElements,this.node.diagram),ki()(this.process.get("artifacts"),this.node.definition),this.collaboration&&ki()(this.collaboration.get("messageFlows"),this.node.definition)}},Ei=Si,Ai=(n("b7ec"),ut(Ei,tt,nt,!1,null,null,null)),Mi=Ai.exports,Ti={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null,initialAssociationDirection:this.node.definition.associationDirection,associationDirection:et}},computed:{isValidConnection:function(){var e=k()(this.target,"component.node.type");if(!e)return!1;var t=this.target.component.node.pool,n=this.sourceShape.component.node.pool;if(n&&n!==t)return!1;var o=this.targetConfig.validateAssociationIncoming&&!this.targetConfig.validateAssociationIncoming(this.sourceNode),i=this.sourceConfig.validateAssociationOutgoing&&!this.sourceConfig.validateAssociationOutgoing(this.targetNode);return!o&&!i}},watch:{"node.definition.associationDirection":function(e){this.updateAssociationMarker(e)}},methods:{updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition},updateAssociationMarker:function(e){e===this.associationDirection.none&&(this.shape.attr("line/targetMarker/display","none"),this.shape.attr("line/sourceMarker/display","none")),e===this.associationDirection.one&&(this.shape.attr("line/targetMarker/display","block"),this.shape.attr("line/sourceMarker/display","none")),e===this.associationDirection.both&&(this.shape.attr("line/targetMarker/display","block"),this.shape.attr("line/sourceMarker/display","block"))}},mounted:function(){this.shape=new d["shapes"].standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Qe.a,width:20,height:20,y:-10},sourceMarker:{type:"image","xlink:href":Qe.a,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this,this.updateAssociationMarker(this.initialAssociationDirection)}},Pi=Ti,_i=ut(Pi,c,l,!1,null,null,null),Oi=_i.exports,Di={label:"Node Identifier",helper:"Enter the id that is unique from all other elements in the diagram",name:"id",validation:"required|regex:/^[_A-Za-z][-._A-Za-z0-9]*$/"},Ii=Di,Ni="processmaker-modeler-association",Ri={id:Ni,component:Oi,bpmnType:"bpmn:Association",control:!1,definition:function(e){return e.create("bpmn:Association",{associationDirection:"".concat(et.none)})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorConfig:[{name:"Data Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-association"},items:[{component:"FormInput",config:Ii},{component:"FormSelect",config:{label:"Direction",helper:"Select Direction",name:"associationDirection",options:[{value:"".concat(et.none),content:"None"},{value:"".concat(et.one),content:"One"},{value:"".concat(et.both),content:"Both"}]}}]}]}]},ji=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},Li=[],Bi={props:{isActive:Boolean},methods:{hideLabel:function(e,t,n){this.isActive&&!n.movedWithArrowKeys&&(this.shape.attr("label/display","none"),this.shape.getEmbeddedCells().filter((function(e){return e.attr("label/text")})).forEach((function(e){e.attr("label/display","none")})))},showLabel:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.shape.attr("label/display","initial"),t.next=3,e.$nextTick();case 3:e.shape.once("change:position",e.hideLabel);case 4:case"end":return t.stop()}}),t)})))()}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:e.$once("click",(function(){e.shape.once("change:position",e.hideLabel)})),e.shape.listenTo(e.paper,"cell:pointerup blank:pointerup",e.showLabel),e.shape.once("change:parent",e.showLabel);case 5:case"end":return t.stop()}}),t)})))()}},Fi=3,zi=16,Hi=4;function qi(e,t){var n=t.size(),o=n.width,i=n.height;for(var r in e)Ui(t,r,o),Gi(t,r,i),Wi(t,r,e,o)}function Vi(e,t){var n=e.attr(t);return void 0===n?Hi:n}function Ui(e,t,n){var o=Vi(e,t+"/ref-padding-x");-1!==t.indexOf("Right")?e.attr(t+"/ref-x",n-zi-o):-1!==t.indexOf("Left")&&e.attr(t+"/ref-x",o+(Xi(e)?16:0))}function Gi(e,t,n){var o=Vi(e,t+"/ref-padding-y");-1!==t.indexOf("bottom")&&e.attr(t+"/ref-y",n-zi-o)}function Wi(e,t,n,o){for(var i=0,r=0;r<Fi;r++)e.attr(t+"."+r+"/xlink:href",null);var a=$i(n,t);for(var s in a)if(e.attr(t+"."+i+"/xlink:href",n[t][s]),i++,i>=Fi)break;e.attr(t+"/ref-width",zi*i),-1!==t.indexOf("Center")&&e.attr(t+"/ref-x",(o-i*zi)/2)}function $i(e,t){if("bottomCenter"===t){var n={};return Object.keys(e[t]).sort().forEach((function(o){n[o]=e[t][o]})),n}return e[t]}function Xi(e){return!!e.attr("image/xlink:href")}var Yi=3,Zi=16;function Ki(e){for(var t=[],n=0;n<Yi;n++)t.push({tagName:"image",selector:e+"."+n});return{tagName:"g",selector:e,children:t}}function Ji(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o={};o[e]=t;for(var i=0;i<Yi;i++)o[e+"."+i]={"ref-x":i*Zi*n,"ref-y":0,width:Zi,height:Zi};return o}var Qi,er,tr,nr,or,ir,rr,ar,sr,cr,lr,dr,ur,pr,hr={data:function(){return{markers:{topLeft:{},topCenter:{},topRight:{},bottomLeft:{},bottomCenter:{},bottomRight:{}}}},watch:{markers:{deep:!0,handler:function(){this.recalcMarkersAlignment()}}},methods:{recalcMarkersAlignment:function(){qi(this.markers,this.shape)}}},fr=d["shapes"].standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},Ki("topLeft"),Ki("topCenter"),Ki("topRight"),Ki("bottomLeft"),Ki("bottomCenter"),Ki("bottomRight")],defaults:d["util"].deepSupplement({size:{width:36,height:36},attrs:Vt(Vt(Vt(Vt(Vt(Vt({image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},Ji("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),Ji("topCenter",{ref:"circle","ref-y":-20})),Ji("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),Ji("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),Ji("bottomCenter",{ref:"circle","ref-padding-y":-40})),Ji("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},d["shapes"].standard.Circle.prototype.defaults)}),mr={highlighter:{name:"stroke",options:{padding:10,attrs:{stroke:qe,"stroke-width":10,opacity:.3}}}},gr={highlighter:{name:"stroke",options:{attrs:{stroke:He,"stroke-width":3,"data-cy":"selected"}}}},vr={highlighter:{name:"stroke",options:{attrs:{stroke:$e,"stroke-width":5}}}},br={highlighter:{name:"stroke",options:{attrs:{stroke:Ve,"stroke-width":5}}}},yr={highlighter:{name:"stroke",options:{attrs:{stroke:Ge,"stroke-width":5}}}},wr={props:["highlighted","paperManager","hasError","autoValidate","borderOutline","isCompleted","isInProgress","isIdle"],data:function(){return{shape:null,currentBorderOutline:null}},watch:{highlighted:function(){this.setShapeHighlight()},hasError:function(){this.paperManager.awaitScheduledUpdates().then(this.setShapeHighlight)},autoValidate:function(){this.setShapeHighlight()},borderOutline:{deep:!0,handler:function(e){this.setBorderOutline(e)}}},computed:{shapeView:function(){return this.shape.findView(this.paperManager.paper)},shapeBody:function(){return this.shapeView.$el.find("[joint-selector=body]")}},methods:{setShapeHighlight:function(){if(ze.getters.isReadOnly)return this.shapeView.unhighlight(this.shapeBody,vr),this.isCompleted&&(this.shape.attr("body/fill",Xe),this.shapeView.highlight(this.shapeBody,vr)),this.shapeView.unhighlight(this.shapeBody,br),this.isInProgress&&(this.shape.attr("body/fill",Ue),this.shapeView.highlight(this.shapeBody,br)),void(this.isIdle&&(this.shape.attr("body/fill",We),this.shapeView.highlight(this.shapeBody,yr)));this.shapeView&&(this.shapeView.unhighlight(this.shapeBody,mr),this.hasError&&this.autoValidate&&this.shapeView.highlight(this.shapeBody,mr),this.shapeView.unhighlight(this.shapeBody,gr),this.highlighted&&this.shapeView.highlight(this.shapeBody,gr))},setBorderOutline:function(e){this.currentBorderOutline&&this.shapeView.unhighlight(this.shapeBody,this.currentBorderOutline),this.currentBorderOutline=e?rn()(e):null,this.currentBorderOutline&&this.shapeView.highlight(this.shapeBody,this.currentBorderOutline)}},mounted:function(){var e=this;this.$nextTick((function(){e.paperManager.awaitScheduledUpdates().then((function(){e.setShapeHighlight(),e.shape.on("change:size",(function(){e.paperManager.awaitScheduledUpdates().then(e.setShapeHighlight),e.$emit("shape-resize",e.shape)}))}))}))}},xr={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he,Bi],data:function(){return{shape:null,definition:null,dropdownData:[{label:Zt["processmaker-modeler-end-event"],nodeType:"processmaker-modeler-end-event"},{label:Zt["processmaker-modeler-message-end-event"],nodeType:"processmaker-modeler-message-end-event",dataTest:"switch-to-message-end-event"},{label:Zt["processmaker-modeler-error-end-event"],nodeType:"processmaker-modeler-error-end-event",dataTest:"switch-to-error-end-event"},{label:Zt["processmaker-modeler-signal-end-event"],nodeType:"processmaker-modeler-signal-end-event",dataTest:"switch-to-signal-end-event"},{label:Zt["processmaker-modeler-terminate-end-event"],nodeType:"processmaker-modeler-terminate-end-event",dataTest:"switch-to-terminate-end-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new fr,this.shape.set("type","processmaker.components.nodes.endEvent.Shape");var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({body:{fill:j,stroke:L},label:{text:this.node.definition.get("name"),refY:"130%"}}),this.shape.addTo(this.graph),this.shape.component=this}},kr=xr,Cr=ut(kr,ji,Li,!1,null,null,null),Sr=Cr.exports,Er={label:"Name",name:"name",helper:"Enter the name of this element",validation:"required"},Ar=Er,Mr=function(){var e=this,t=e._self._c;return t("div",[t("FormInput",{attrs:{name:"id",label:e.label,helper:e.helper,error:e.error,validation:e.validation},on:{input:e.onInput},model:{value:e.localValue,callback:function(t){e.localValue=t},expression:"localValue"}})],1)},Tr=[],Pr={props:{label:{type:String},helper:{type:String},value:{default:null},validation:{type:String}},data:function(){return{localValue:this.value,error:""}},methods:{onInput:function(e){this.value!==e&&(this.isUnique(e)?(this.error="",this.$emit("input",e)):this.error=this.$t("Must be unique"))},isUnique:function(e){return!!ze.state.nodes.every((function(t){return t.definition.id!==e}))}}},_r=Pr,Or=ut(_r,Mr,Tr,!1,null,null,null),Dr=Or.exports,Ir={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:Dr,config:Ii}]},Nr=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"d-flex justify-content-between align-items-end mb-2"},[t("label",{staticClass:"m-0"},[e._v(e._s(e.$t(e.label)))]),t("button",{directives:[{name:"b-modal",rawName:"v-b-modal.documentation-modal",modifiers:{"documentation-modal":!0}}],staticClass:"btn-sm float-right",attrs:{type:"button","aria-label":e.$t("Expand"),"data-test":"documentation-modal-button"}},[t("i",{staticClass:"fas fa-expand"})])]),t("form-text-area",{staticClass:"documentation-input d-flex",attrs:{value:e.textValue,richtext:!0,"data-test":"documentation-text-area",id:"documentation-editor"},on:{input:function(t){return e.$emit("input",t)},blur:e.onBlur}}),t("b-modal",{attrs:{id:"documentation-modal",size:"lg",centered:"",title:e.$t("Description"),"header-close-content":"×","ok-only":"","ok-variant":"secondary","ok-title":"Close","no-enforce-focus":""}},[t("form-text-area",{staticClass:"documentation-input",attrs:{rows:"5",value:e.textValue,richtext:!0,"data-test":"documentation-modal-text-area",id:"documentation-editor-modal"},on:{input:function(t){return e.$emit("input",t)},blur:e.onBlur}})],1)],1)},Rr=[],jr=n("e2a0"),Lr=n.n(jr),Br={props:{value:{type:[String,Array],default:""},label:{type:String,default:"Description"}},inheritAttrs:!1,computed:{textValue:function(){return Lr()(this.value)?this.value:k()(this.value[0],"text","")}},methods:{onBlur:function(){var e=this.$root.$children.find((function(e){return e.$refs.modeler}));e.$refs.modeler.pushToUndoStack()}}},Fr=Br,zr=(n("638c"),ut(Fr,Nr,Rr,!1,null,null,null)),Hr=zr.exports,qr={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Documentation",icon:"book",name:"documentation-accordion"},items:[{component:Hr,config:{label:"Description",name:"documentation",helper:""}}]},Vr="processmaker-modeler-end-event",Ur={id:Vr,component:Sr,bpmnType:"bpmn:EndEvent",control:!0,category:"BPMN",icon:n("7b7c"),label:Zt[Vr],rank:30,items:[{icon:n("7b7c"),label:Zt[Vr],control:!0,rank:31,id:"processmaker-modeler-end-event"},{icon:n("d5c7"),label:Zt["processmaker-modeler-message-end-event"],control:!0,rank:32,id:"processmaker-modeler-message-end-event"},{icon:n("342b"),label:Zt["processmaker-modeler-error-end-event"],control:!0,rank:33,id:"processmaker-modeler-error-end-event"},{icon:n("7ebf"),label:Zt["processmaker-modeler-signal-end-event"],control:!0,rank:34,id:"processmaker-modeler-signal-end-event"},{icon:n("83d2"),label:Zt["processmaker-modeler-terminate-end-event"],control:!0,rank:35,id:"processmaker-modeler-terminate-end-event"}],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Zt[Vr])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:Zt[Vr],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-end-event"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Gr=(n("13d5"),n("0c7a")),Wr=n.n(Gr),$r=(n("81b2"),function(e){var t=btoa(e);return"data:image/svg+xml;base64,".concat(t)}),Xr=function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml"),o=t.definition.get("color")||H(t);return n.querySelectorAll('*[fill]:not([fill="none"])').forEach((function(e){e.setAttribute("fill",o)})),n.querySelectorAll('*[stroke]:not([stroke="none"])').forEach((function(e){e.setAttribute("stroke",o)})),$r(n.documentElement.outerHTML)},Yr=Xr,Zr={data:function(){return{nodeIcon:null}},computed:{icon:function(){return this.node.definition.customIcon?atob(this.node.definition.customIcon):this.nodeIcon}},watch:{"node.definition.color":{handler:function(){this.updateIconColor()}},"node.definition.customIcon":{handler:function(){this.updateIconColor()}}},methods:{updateIconColor:function(){this.nodeIcon&&!this.node.isBpmnType("bpmn:ServiceTask")&&this.shape&&this.shape.attr("image/xlink:href",Yr(this.icon,this.node))}},mounted:function(){this.updateIconColor()}},Kr={extends:Sr,mixins:[Zr],props:["moddle","rootElements","id"],data:function(){return{error:this.moddle.create("bpmn:Error",{id:"".concat(this.id,"_error"),name:"".concat(this.id,"_error")}),nodeIcon:Wr.a}},methods:{addErrorRef:function(){this.node.definition.get("eventDefinitions")[0].errorRef?this.error=this.node.definition.get("eventDefinitions")[0].errorRef:(this.error=this.moddle.create("bpmn:Error",{id:"".concat(this.id,"_error"),name:"".concat(this.id,"_error")}),this.rootElements.push(this.error),this.node.definition.get("eventDefinitions")[0].errorRef=this.error)}},mounted:function(){this.addErrorRef()},destroyed:function(){ki()(this.rootElements,this.error)}},Jr=Kr,Qr=ut(Jr,Qi,er,!1,null,null,null),ea=Qr.exports,ta=n("4245"),na=n.n(ta),oa=n("3eea"),ia=n.n(oa),ra="processmaker-modeler-error-end-event",aa=na()(rn()(Ur),{id:ra,component:ea,control:!1,label:Zt[ra],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Zt[ra]),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];return"eventDefinitions"===o?e.errorName=i[0].get("errorRef").name:e[o]=i,e}),{})},inspectorHandler:function(e,t,n){for(var o in ia()(e,["$type","eventDefinitions","errorName"]))t.definition[o]!==e[o]&&n(t,o,e[o]);var i=t.definition.get("eventDefinitions")[0].errorRef;i.name!==e.errorName&&(i.name=e.errorName)},inspectorConfig:[{items:[{items:[{},{component:"FormInput",config:{label:"Error Name",name:"errorName",helper:"Enter the error name that is unique from all other elements in the diagram"}}]}]}]}),sa=n("d4dd"),ca=n.n(sa),la={extends:Sr,mixins:[Zr],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:ca.a}}},da=la,ua=ut(da,tr,nr,!1,null,null,null),pa=ua.exports,ha="processmaker-modeler-terminate-end-event",fa=na()(rn()(Ur),{id:ha,component:pa,control:!1,label:Zt[ha],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Zt[ha]),eventDefinitions:[e.create("bpmn:TerminateEventDefinition")]})}}),ma=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},ga=[],va=18,ba=d["dia"].Element.define("processmaker.components.nodes.gateway.Shape",{markup:[].concat(g(d["shapes"].standard.Polygon.prototype.markup),[{tagName:"image",selector:"image"}]),attrs:{body:{strokeWidth:2,stroke:"#000000",refPointsKeepOffset:"40,0, 80,40, 40,80, 0,40",fill:"#FFFFFF"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"50",fontSize:14,fill:"#333333"},image:{width:va,height:va,fill:"transparent",xlinkHref:"",refX:"50%",refX2:-va/2,refY:"50%",refY2:-va/2}}}),ya=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"],wa={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he,Bi],created:function(){var e=this.node.definition.default||null;delete this.node.definition.default,ya.indexOf(this.node.definition.$type)>-1&&this.$set(this.node.definition,"default",e)},data:function(){return{shape:null,definition:null,labelWidth:175,dropdownData:[{label:en["processmaker-modeler-exclusive-gateway"],nodeType:"processmaker-modeler-exclusive-gateway"},{label:en["processmaker-modeler-inclusive-gateway"],nodeType:"processmaker-modeler-inclusive-gateway",dataTest:"switch-to-inclusive-gateway"},{label:en["processmaker-modeler-parallel-gateway"],nodeType:"processmaker-modeler-parallel-gateway",dataTest:"switch-to-parallel-gateway"},{label:en["processmaker-modeler-event-based-gateway"],nodeType:"processmaker-modeler-event-based-gateway",dataTest:"switch-to-event-based-gateway",disabled:function(e){if(e&&e.definition&&e.definition.outgoing){var t=["bpmn:IntermediateCatchEvent"],n=e.definition.outgoing.find((function(e){return!t.includes(e.targetRef.$type)}));return!!n&&"It must be connected only to catch events"}return!1}}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new ba;var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.attr({label:{text:this.node.definition.get("name"),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this}},xa=wa,ka=ut(xa,ma,ga,!1,null,null,null),Ca=ka.exports,Sa=n("737f"),Ea=n.n(Sa),Aa={extends:Ca,mixins:[Zr],data:function(){return{nodeIcon:Ea.a}}},Ma=Aa,Ta=ut(Ma,or,ir,!1,null,null,null),Pa=Ta.exports,_a="processmaker-modeler-exclusive-gateway",Oa={id:_a,component:Pa,bpmnType:"bpmn:ExclusiveGateway",control:!0,category:"BPMN",icon:n("77d0"),label:"Gateway",rank:50,items:[{icon:n("9db0"),label:"Exclusive Gateway",control:!0,rank:51,id:"processmaker-modeler-exclusive-gateway"},{icon:n("8d20"),label:"Inclusive Gateway",control:!0,rank:52,id:"processmaker-modeler-inclusive-gateway"},{icon:n("2d89"),label:"Parallel Gateway",control:!0,rank:53,id:"processmaker-modeler-parallel-gateway"},{icon:n("efde"),label:"Event Based Gateway",control:!0,rank:54,id:"processmaker-modeler-event-based-gateway"}],definition:function(e,t){return e.create("bpmn:ExclusiveGateway",{name:t(en[_a])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:en[_a],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-exlcusive-gateway"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Da=n("9158"),Ia=n.n(Da),Na={diverging:"Diverging",converging:"Converging"},Ra={extends:Ca,mixins:[Zr],data:function(){return{incoming:this.node.definition.get("incoming"),nodeIcon:Ia.a}},watch:{incoming:function(e){var t=e.length<=1?Na.diverging:Na.converging;this.node.definition.set("gatewayDirection",t)}}},ja=Ra,La=ut(ja,rr,ar,!1,null,null,null),Ba=La.exports,Fa="processmaker-modeler-inclusive-gateway",za={id:Fa,component:Ba,bpmnType:"bpmn:InclusiveGateway",control:!1,category:"BPMN",label:en[Fa],definition:function(e,t){return e.create("bpmn:InclusiveGateway",{name:t(en[Fa]),gatewayDirection:Na.diverging})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:en[Fa],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-inclusive-gateway-config"},items:[{component:"FormInput",config:Ar}]},{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-inclusive-gateway-advanced"},items:[{component:"FormInput",config:Ii},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:Na.diverging,content:"Diverging"},{value:Na.converging,content:"Converging"}]}},{component:Hr,config:{label:"Description",name:"documentation"}}]}]}]},Ha=n("20b6"),qa=n.n(Ha),Va={extends:Ca,mixins:[Zr],data:function(){return{nodeIcon:qa.a}},watch:{"node.definition":{deep:!0,immediate:!0,handler:function(){delete this.node.definition.default}}}},Ua=Va,Ga=ut(Ua,sr,cr,!1,null,null,null),Wa=Ga.exports,$a={id:"processmaker-modeler-parallel-gateway",component:Wa,bpmnType:"bpmn:ParallelGateway",control:!1,category:"BPMN",label:"Parallel Gateway",definition:function(e,t){return e.create("bpmn:ParallelGateway",{name:t("Parallel Gateway"),gatewayDirection:Na.diverging})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:"Parallel Gateway",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-parallel-gateway-config"},items:[{component:"FormInput",config:Ar}]},{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-parallel-gateway-direction"},items:[{component:"FormInput",config:Ii},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:Na.diverging,content:"Diverging"},{value:Na.converging,content:"Converging"}]}},{component:Hr,config:{label:"Description",name:"documentation"}}]}]}]},Xa=n("e041"),Ya=n.n(Xa),Za={extends:Ca,mixins:[Zr],data:function(){return{nodeIcon:Ya.a}}},Ka=Za,Ja=ut(Ka,lr,dr,!1,null,null,null),Qa=Ja.exports,es="processmaker-modeler-event-based-gateway",ts={id:es,component:Qa,bpmnType:"bpmn:EventBasedGateway",control:!1,category:"BPMN",label:en[es],definition:function(e,t){return e.create("bpmn:EventBasedGateway",{name:t(en[es])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:en[es],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-event-based-gateway"},items:[{component:"FormInput",config:{label:"Name",helper:"The Name of the Gateway",name:"name"}}]},qr,Ir]}]},ns=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},os=[],is={offset:{y:-20}},rs="processmaker-modeler-lane",as=function(e){Bn(n,e);var t=Vn(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Wt(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=this.nodeRegistry["processmaker-modeler-sequence-flow"].diagram(this.moddle),r=this.nodeRegistry["processmaker-modeler-sequence-flow"].definition(this.moddle,this.$t);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var a=n.sourceAnchor,s=n.targetAnchor;return i.waypoint=[a,s].map((function(e){return o.moddle.create("dc:Point",e)})),"bpmn:ExclusiveGateway"!==r.sourceRef.$type&&"bpmn:InclusiveGateway"!==r.sourceRef.$type||(r.conditionExpression=this.moddle.create("bpmn:FormalExpression",{body:""})),e.component.node.definition.get("outgoing").push(r),t.component.node.definition.get("incoming").push(r),new an("processmaker-modeler-sequence-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.targetConfig,r=k()(o,"component.node"),a=k()(t,"component.node");return Gn.hasTargetType(o)&&Gn.targetIsNotSource(a,r)&&n.targetIsNotALane(r)&&n.targetIsInSamePool(t,o)&&n.eventBasedGatewayTarget(a,r)&&n.isValidSource(t,i)&&n.sourceIsNotPool(a)&&!Wn.isADataNode(a)&&!Wn.isADataNode(r)}},{key:"isValidSource",value:function(e,t){return null==t.validateIncoming||t.validateIncoming(e.node)}},{key:"targetIsNotALane",value:function(e){return!e.isType(rs)}},{key:"targetIsInSamePool",value:function(e,t){var n=t.component.node.pool,o=e.component.node.pool;return!o||o===n}},{key:"targetIsNotSource",value:function(e,t){return t.id!==e.id}},{key:"eventBasedGatewayTarget",value:function(e,t){var n=e.isBpmnType("bpmn:EventBasedGateway"),o=t.isBpmnType("bpmn:IntermediateCatchEvent");return!n||o}},{key:"sourceIsNotPool",value:function(e){return!e.isType("processmaker-modeler-pool")}}]),n}(Gn),ss={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null}},computed:{isValidConnection:function(){return as.isValid({sourceShape:this.sourceShape,targetShape:this.target,targetConfig:this.targetConfig})},targetType:function(){return k()(this.target,"component.node.type")},shapeName:function(){return this.node.definition.get("name")},nameLabel:{get:function(){return this.shape.label(0).attrs.text.text},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.shape.label(0,{attrs:{text:{text:e}}})}}},watch:{"node.definition":{handler:function(){var e=this.shapeName;e!==this.nameLabel&&(this.nameLabel=e),this.setDefaultMarker(this.isDefaultFlow())},deep:!0},"node.definition.sourceRef":{handler:function(){this.setDefaultMarker(this.isDefaultFlow())},deep:!0}},methods:{setDefaultMarker:function(e){this.shape.attr("line",{sourceMarker:{"stroke-width":e?2:0}})},isDefaultFlow:function(){return this.node.definition.sourceRef&&this.node.definition.sourceRef.default&&this.node.definition.sourceRef.default.id===this.node.definition.id},updateRouter:function(){this.shape.router("orthogonal",{padding:1})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition,this.sourceShape.component.node.definition.get("outgoing").push(this.node.definition),e.component.node.definition.get("incoming").push(this.node.definition)},createLabel:function(){this.shape.labels([{attrs:{text:{text:this.shapeName}},position:is}])},createDefaultFlowMarker:function(){this.shape.attr("line",{sourceMarker:{type:"polyline","stroke-width":this.isDefaultFlow()?2:0,points:"2,6 6,-6"}})}},mounted:function(){this.shape=new d["shapes"].standard.Link,this.shape.connector("rounded",{radius:5}),this.createLabel(),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},cs=ss,ls=ut(cs,ns,os,!1,null,null,null),ds=ls.exports,us="processmaker-modeler-sequence-flow",ps={id:us,component:ds,bpmnType:"bpmn:SequenceFlow",control:!1,definition:function(e){return e.create("bpmn:SequenceFlow",{name:null})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorData:function(e){var t=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.definition.sourceRef.$type);return t||delete e.definition.conditionExpression,Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];return e[o]="conditionExpression"===o?i.body:i,e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition,r=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(i.sourceRef.$type);for(var a in e)if(i[a]!==e[a])if("conditionExpression"===a&&r){if(i[a].body!==e[a]){var s=o.create("bpmn:FormalExpression",{body:e[a]});n(t,a,s)}}else n(t,a,e[a])},inspectorConfig:[{name:"Sequence Flow",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-sequence-flow"},items:[{component:"FormInput",config:Vt(Vt({},Ar),{},{validation:null})}]},qr,Ir]}]},hs=function(){var e=this,t=e._self._c;return t("crown-config",{attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering},on:{"remove-node":function(t){return e.$emit("remove-node",t)},"add-node":function(t){return e.$emit("add-node",t)},"save-state":function(t){return e.$emit("save-state",t)}}})},fs=[],ms=function(e){Bn(n,e);var t=Vn(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Wt(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=this.nodeRegistry["processmaker-modeler-message-flow"].diagram(this.moddle),r=this.nodeRegistry["processmaker-modeler-message-flow"].definition(this.moddle);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var a=n.sourceAnchor,s=n.targetAnchor;return i.waypoint=[a,s].map((function(e){return o.moddle.create("dc:Point",e)})),new an("processmaker-modeler-message-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.sourceConfig,r=k()(o,"component.node"),a=k()(t,"component.node");return Gn.hasTargetType(o)&&n.isValidTargetType(r)&&Gn.targetIsValidStartEventType(r)&&Gn.targetIsValidIntermediateEventType(r)&&Gn.targetIsValidBoundaryEventType(r)&&Gn.targetIsNotContainingPool(o,a)&&Gn.targetIsInDifferentPool(o,t)&&Gn.targetIsNotSource(r,a)&&Gn.allowOutgoingFlow(i,a)}},{key:"isValidTargetType",value:function(e){return["bpmn:Task","bpmn:ScriptTask","bpmn:ManualTask","bpmn:CallActivity","bpmn:ServiceTask","bpmn:IntermediateCatchEvent","bpmn:Participant","bpmn:StartEvent","bpmn:BoundaryEvent"].some((function(t){return e.isBpmnType(t)}))}}]),n}(Gn),gs={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null}},computed:{isValidConnection:function(){return ms.isValid({sourceShape:this.sourceShape,targetShape:this.target,sourceConfig:this.sourceConfig})},targetType:function(){return k()(this.target,"component.node.type")},sourceType:function(){return k()(this.sourceNode,"type")}},methods:{updateRouter:function(){this.shape.router("orthogonal",{padding:1})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition}},mounted:function(){this.shape=new d["shapes"].standard.Link({router:{name:"orthogonal"}}),this.shape.attr("line",{strokeDasharray:"10 10",sourceMarker:{type:"circle",r:5,"stroke-width":2,fill:"#fff"},targetMarker:{type:"path",fill:"#fff","stroke-width":2,d:"M 10 -5 0 0 10 5 Z"}}),this.shape.addTo(this.graph),this.shape.component=this}},vs=gs,bs=ut(vs,hs,fs,!1,null,null,null),ys=bs.exports,ws="processmaker-modeler-message-flow",xs={id:ws,component:ys,bpmnType:"bpmn:MessageFlow",control:!1,definition:function(e){return e.create("bpmn:MessageFlow",{name:""})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorConfig:[{name:"Message Flow",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-message-flow"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},ks=n("e1776"),Cs=n.n(ks),Ss={extends:Sr,mixins:[Zr],props:["node","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:Cs.a}},methods:{addMessageRef:function(){this.node.definition.get("eventDefinitions")[0].messageRef?this.message=this.node.definition.get("eventDefinitions")[0].messageRef:(this.message=this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),this.rootElements.push(this.message),this.node.definition.get("eventDefinitions")[0].messageRef=this.message)}},mounted:function(){this.addMessageRef()},destroyed:function(){ki()(this.rootElements,this.message),ze.commit("removeMessageRef",this.message)}},Es=Ss,As=ut(Es,ur,pr,!1,null,null,null),Ms=As.exports,Ts=function(){var e=this,t=e._self._c;return t("div",[t("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),t("div",{staticClass:"d-flex",class:{invalid:e.invalid}},[t("multiselect",{attrs:{value:e.selectedOption,placeholder:e.$t(e.placeholder),options:e.options,multiple:e.multiple,"track-by":e.trackBy,"show-labels":!1,searchable:!0,"internal-search":!1,label:"name","data-test":"".concat(e.name,":select")},on:{input:e.change,"search-change":e.loadOptionsDebounced,open:e.loadOptions}},[t("template",{slot:"noResult"},[e._t("noResult",(function(){return[e._v(e._s(e.$t("Not found")))]}))],2),t("template",{slot:"noOptions"},[e._t("noOptions",(function(){return[e._v(e._s(e.$t("No Data Available")))]}))],2)],2),t("div",{staticClass:"btn-group ml-1",attrs:{role:"group"}},[t("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button","data-cy":"events-list",title:e.$t("Configure")},on:{click:e.toggleConfigMessage}},[t("i",{staticClass:"fa fa-ellipsis-h"})])])],1),e.invalid?t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("Message reference is required"))+" ")])]):e._e(),e.helper?t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.helper)))]):e._e(),e.showNewMessage?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("ID"),error:e.getValidationErrorForNewId(e.messageId),"data-cy":"events-add-id"},model:{value:e.messageId,callback:function(t){e.messageId=t},expression:"messageId"}}),t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNewName(e.messageName),"data-cy":"events-add-name"},model:{value:e.messageName,callback:function(t){e.messageName=t},expression:"messageName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddMessage}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validNew,type:"button","data-cy":"events-save"},on:{click:e.addMessage}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e._e(),e.showEditMessage?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNameUpdate(e.messageName),"data-cy":"events-edit-name"},model:{value:e.messageName,callback:function(t){e.messageName=t},expression:"messageName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddMessage}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validUpdate,type:"button","data-cy":"events-save"},on:{click:e.updateMessage}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e.showConfirmDelete?t("div",{staticClass:"card mb-3 bg-danger text-white"},[e.deleteMessageUsage(e.deleteMessage.id)?t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.deleteMessageUsage(e.deleteMessage.id))+" ")]):t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.$t("Are you sure you want to delete this item?"))+" ("+e._s(e.deleteMessage.id)+") "+e._s(e.deleteMessage.name)+" ")]),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn btn-sm btn-light mr-2 p-1 font-xs",attrs:{type:"button","data-cy":"events-cancel"},on:{click:function(t){e.showConfirmDelete=!1}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),e.deleteMessageUsage(e.deleteMessage.id)?e._e():t("button",{staticClass:"btn btn-sm btn-danger p-1 font-xs",attrs:{type:"button","data-cy":"events-delete"},on:{click:e.confirmDeleteMessage}},[e._v(" "+e._s(e.$t("Delete"))+" ")])])]):!e.showListMessages||e.showNewMessage||e.showEditMessage?e._e():[t("table",{staticClass:"table table-sm table-striped",attrs:{width:"100%"}},[t("thead",[t("tr",[t("td",{attrs:{colspan:"2",align:"right"}},[t("button",{staticClass:"btn btn-secondary btn-sm p-1 font-xs",attrs:{type:"button","data-cy":"events-add"},on:{click:e.showAddMessage}},[t("i",{staticClass:"fa fa-plus"}),e._v(" "+e._s(e.$t("Message"))+" ")])])])]),t("tbody",e._l(e.localMessages,(function(n){return t("tr",{key:"message-".concat(n.id)},[t("td",[t("b-badge",{attrs:{variant:"secondary"}},[e._v(e._s(n.id))]),e._v(" "+e._s(n.name)+" ")],1),t("td",{attrs:{align:"right"}},[t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Edit")},on:{click:function(t){return e.editMessage(n)}}},[t("i",{staticClass:"fa fa-pen",attrs:{"data-cy":"events-edit"}})]),t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Remove")},on:{click:function(t){return e.removeMessage(n)}}},[t("i",{staticClass:"fa fa-trash",attrs:{"data-cy":"events-remove"}})])])])})),0)])]],2)},Ps=[],_s=(n("466d"),n("c740"),{props:{value:null,name:String,placeholder:{type:String,default:"Select option"},helper:String,trackBy:{type:String,default:"id"},label:{type:String,default:"name"},api:{type:String,default:"messages"},multiple:{type:Boolean,default:!1}},computed:{invalid:function(){return!this.value},localMessages:function(){return ze.getters.rootElements.filter((function(e){return"bpmn:Message"===e.$type}))},validNew:function(){return""===this.getValidationErrorForNewId(this.messageId)&&""===this.getValidationErrorForNewName(this.messageName)},validUpdate:function(){return""===this.getValidationErrorForNameUpdate(this.messageName)}},data:function(){return{options:[],selectedOption:null,pmql:"id!="+window.ProcessMaker.modeler.process.id,showListMessages:!1,showNewMessage:!1,showEditMessage:!1,showConfirmDelete:!1,deleteMessage:null,messageId:"",messageName:""}},methods:{deleteMessageUsage:function(e){var t=this.messageUsage(e),n=[];return t.forEach((function(e){return n.push(e.name||e.id)})),n.length?this.$t("This message cannot be removed, it is used by")+": "+n.join(", "):""},messageUsage:function(e){var t=[];return ze.getters.rootElements.forEach((function(n){"bpmn:Process"===n.$type&&n.flowElements.forEach((function(n){n.eventDefinitions&&n.eventDefinitions.forEach((function(o){"bpmn:MessageEventDefinition"===o.$type&&o.messageRef&&o.messageRef.id===e&&t.push(n)}))}))})),t},getValidationErrorForNewId:function(e){if(!e)return this.$t("Message ID is required");var t=ze.getters.rootElements.find((function(t){return t.id===e}));if(t)return this.$t("Message ID is duplicated");var n=e.match(/^[_A-Za-z][-._A-Za-z0-9]*$/);return n?"":this.$t("Message ID is not a valid xsd:ID")},getValidationErrorForNewName:function(e){if(!e)return this.$t("Message Name is required");var t=ze.getters.rootElements.find((function(t){return"bpmn:Message"===t.$type&&t.name===e}));return t?this.$t("Message Name is duplicated"):""},getValidationErrorForNameUpdate:function(e){var t=this;if(!e)return this.$t("Message Name is required");var n=ze.getters.rootElements.find((function(n){return"bpmn:Message"===n.$type&&n.name===e&&n.id!==t.messageId}));return n?this.$t("Message Name is duplicated"):""},confirmDeleteMessage:function(){var e=this;this.showConfirmDelete=!1;var t=ze.getters.rootElements.findIndex((function(t){return t.id===e.deleteMessage.id}));t>-1&&ze.getters.rootElements.splice(t,1)},removeMessage:function(e){this.showConfirmDelete=!0,this.deleteMessage=e},toggleConfigMessage:function(){this.showListMessages=!this.showListMessages},editMessage:function(e){this.messageId=e.id,this.messageName=e.name,this.showEditMessage=!0},getMessageById:function(e){return ze.getters.rootElements.find((function(t){return t.id===e}))},change:function(e){if(!e)return this.$emit("input",""),void this.refreshVueMultiselectValue();var t=this.getMessageById(e.id);t||(t=window.ProcessMaker.$modeler.moddle.create("bpmn:Message",{id:e.id,name:e.name}),ze.getters.rootElements.push(t)),this.$emit("input",Object(ft["get"])(e,this.trackBy)),this.refreshVueMultiselectValue()},refreshVueMultiselectValue:function(){var e=this;this.$nextTick((function(){var t=e;while(t&&"vue-form-renderer"!==t.$options._componentTag)t=t.$parent;t&&t.$emit("update",t.transientData)}))},showAddMessage:function(){this.showNewMessage=!0,this.messageId="",this.messageName=""},cancelAddMessage:function(){this.showNewMessage=!1,this.showEditMessage=!1},updateMessage:function(){this.getMessageById(this.messageId).name=this.messageName,this.showEditMessage=!1},addMessage:function(){var e=window.ProcessMaker.$modeler.moddle.create("bpmn:Message",{id:this.messageId,name:this.messageName});ze.getters.rootElements.push(e),this.showNewMessage=!1},updateOptions:function(e){this.options=Object(ft["uniqBy"])([].concat(g(this.localMessages),g(e)),"id")},loadOptions:function(){this.updateOptions([])},loadSelected:function(e){var t=ze.getters.rootElements.find((function(t){return t.id===e}));t?this.selectedOption={id:t.id,name:t.name}:(this.$emit("input",""),this.refreshVueMultiselectValue())},loadOptionsDebounced:function(){}},watch:{value:{immediate:!0,handler:function(e){var t=this;this.selectedOption=this.options.find((function(n){return Object(ft["get"])(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}}),Os=_s,Ds=(n("dacf"),n("80e6"),ut(Os,Ts,Ps,!1,null,"395d11da",null)),Is=Ds.exports;function Ns(e){return{component:Is,config:{label:"Message",name:"messageRef",helper:e}}}var Rs,js,Ls={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=i[0].get("messageRef");e.messageRef=r?r.id:""}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o,i){for(var r in ia()(e,["$type","eventDefinitions","messageRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var a=i.rootElements.find((function(t){return t.id===e.messageRef}));!a&&e.messageRef&&(a=o.create("bpmn:Message",{id:e.messageRef,name:e.messageRef}),i.rootElements.push(a)),t.definition.get("eventDefinitions")[0].messageRef=a}},Bs="processmaker-modeler-message-end-event",Fs=na()(rn()(Ur),Vt(Vt({},Ls),{},{id:Bs,component:Ms,control:!1,label:Zt[Bs],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Zt[Bs]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Ns("Select the message reference that this element throws")]}]}]})),zs=n("f400"),Hs=n.n(zs),qs={extends:Sr,mixins:[Zr],data:function(){return{nodeIcon:Hs.a}},mounted:function(){this.shape.attr({image:{"ref-y":3}})}},Vs=qs,Us=ut(Vs,Rs,js,!1,null,null,null),Gs=Us.exports,Ws=function(){var e=this,t=e._self._c;return t("div",[t("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),t("div",{staticClass:"d-flex",class:{invalid:e.invalid}},[t("multiselect",{attrs:{value:e.selectedOption,placeholder:e.$t(e.placeholder),options:e.options,multiple:e.multiple,"track-by":e.trackBy,"show-labels":!1,searchable:!0,"internal-search":!1,label:"name","data-test":"".concat(e.name,":select"),disabled:!e.can("view-signals")},on:{input:e.change,"search-change":e.loadOptions,open:function(t){return e.loadOptions()}}},[t("template",{slot:"noResult"},[e._t("noResult",(function(){return[e._v(e._s(e.$t("Not found")))]}))],2),t("template",{slot:"noOptions"},[e._t("noOptions",(function(){return[e._v(e._s(e.$t("No Data Available")))]}))],2)],2),e.canEdit?t("div",{staticClass:"btn-group ml-1",attrs:{role:"group"}},[t("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button","data-cy":"events-list",title:e.$t("Configure")},on:{click:e.toggleConfigSignal}},[t("i",{staticClass:"fa fa-ellipsis-h"})])]):e._e()],1),e.can("view-signals")?e._e():t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("You do not have permission to view signals"))+" ")])]),e.invalid?t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("Signal reference is required"))+" ")])]):e._e(),e.helper?t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.helper)))]):e._e(),e.showNewSignal?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("ID"),error:e.getValidationErrorForNewId(e.signalId),"data-cy":"events-add-id"},model:{value:e.signalId,callback:function(t){e.signalId=t},expression:"signalId"}}),t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNewName(e.signalName),"data-cy":"events-add-name"},model:{value:e.signalName,callback:function(t){e.signalName=t},expression:"signalName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddSignal}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validNew,type:"button","data-cy":"events-save"},on:{click:e.addSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e._e(),e.showEditSignal?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNameUpdate(e.signalName),"data-cy":"events-edit-name"},model:{value:e.signalName,callback:function(t){e.signalName=t},expression:"signalName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddSignal}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validUpdate,type:"button","data-cy":"events-save"},on:{click:e.updateSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e.showConfirmDelete?t("div",{staticClass:"card mb-3 bg-danger text-white"},[e.deleteSignalUsage(e.deleteSignal.id)?t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.deleteSignalUsage(e.deleteSignal.id))+" ")]):t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.$t("Are you sure you want to delete this item?"))+" ("+e._s(e.deleteSignal.id)+") "+e._s(e.deleteSignal.name)+" ")]),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn btn-sm btn-light mr-2 p-1 font-xs",attrs:{type:"button","data-cy":"events-cancel"},on:{click:function(t){e.showConfirmDelete=!1}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),e.deleteSignalUsage(e.deleteSignal.id)?e._e():t("button",{staticClass:"btn btn-sm btn-danger p-1 font-xs",attrs:{type:"button","data-cy":"events-delete"},on:{click:e.confirmDeleteSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):!e.showListSignals||e.showNewSignal||e.showEditSignal?e._e():[t("table",{staticClass:"table table-sm table-striped",attrs:{width:"100%"}},[t("thead",[t("tr",[t("td",{attrs:{colspan:"2",align:"right"}},[t("button",{staticClass:"btn btn-secondary btn-sm p-1 font-xs",attrs:{type:"button","data-cy":"events-add"},on:{click:e.showAddSignal}},[t("i",{staticClass:"fa fa-plus"}),e._v(" "+e._s(e.$t("Signal"))+" ")])])])]),t("tbody",e._l(e.localSignals,(function(n){return t("tr",{key:"signal-".concat(n.id)},[t("td",[t("b-badge",{attrs:{variant:"secondary"}},[e._v(e._s(n.id))]),e._v(" "+e._s(n.name)+" ")],1),t("td",{attrs:{align:"right"}},[e.can("edit-signals")?t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Edit")},on:{click:function(t){return e.editSignal(n)}}},[t("i",{staticClass:"fa fa-pen",attrs:{"data-cy":"events-edit"}})]):e._e(),e.can("delete-signals")?t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Remove")},on:{click:function(t){return e.removeSignal(n)}}},[t("i",{staticClass:"fa fa-trash",attrs:{"data-cy":"events-remove"}})]):e._e()])])})),0)])]],2)},$s=[],Xs={props:{value:null,name:String,placeholder:{type:String,default:"Select option"},helper:String,canEdit:{type:Boolean,default:!0},trackBy:{type:String,default:"id"},label:{type:String,default:"name"},api:{type:String,default:"signals"},multiple:{type:Boolean,default:!1}},computed:{invalid:function(){return!this.value},localSignals:function(){return ze.getters.rootElements.filter((function(e){return"bpmn:Signal"===e.$type}))},validNew:function(){return""===this.getValidationErrorForNewId(this.signalId)&&""===this.getValidationErrorForNewName(this.signalName)},validUpdate:function(){return""===this.getValidationErrorForNameUpdate(this.signalName)}},data:function(){return{options:[],selectedOption:null,pmql:"id!="+window.ProcessMaker.modeler.process.id,showListSignals:!1,showNewSignal:!1,showEditSignal:!1,showConfirmDelete:!1,deleteSignal:null,signalId:"",signalName:""}},methods:{deleteSignalUsage:function(e){var t=this.signalUsage(e),n=[];return t.forEach((function(e){return n.push(e.name||e.id)})),n.length?this.$t("This signal cannot be removed, it is used by")+": "+n.join(", "):""},signalUsage:function(e){var t=[];return ze.getters.rootElements.forEach((function(n){"bpmn:Process"===n.$type&&n.flowElements.forEach((function(n){n.eventDefinitions&&n.eventDefinitions.forEach((function(o){"bpmn:SignalEventDefinition"===o.$type&&o.signalRef&&o.signalRef.id===e&&t.push(n)}))}))})),t},getValidationErrorForNewId:function(e){if(!e)return this.$t("Signal ID is required");var t=ze.getters.rootElements.find((function(t){return t.id===e}));if(t)return this.$t("Signal ID is duplicated");var n=e.match(/^[_A-Za-z][-._A-Za-z0-9]*$/);return n?"":this.$t("Signal ID is not a valid xsd:ID")},getValidationErrorForNewName:function(e){if(!e)return this.$t("Signal Name is required");var t=ze.getters.rootElements.find((function(t){return"bpmn:Signal"===t.$type&&t.name===e}));return t?this.$t("Signal Name is duplicated"):""},getValidationErrorForNameUpdate:function(e){var t=this;if(!e)return this.$t("Signal Name is required");var n=ze.getters.rootElements.find((function(n){return"bpmn:Signal"===n.$type&&n.name===e&&n.id!==t.signalId}));return n?this.$t("Signal Name is duplicated"):""},confirmDeleteSignal:function(){var e=this;this.showConfirmDelete=!1;var t=ze.getters.rootElements.findIndex((function(t){return t.id===e.deleteSignal.id}));t>-1&&ze.getters.rootElements.splice(t,1)},removeSignal:function(e){this.showConfirmDelete=!0,this.deleteSignal=e},toggleConfigSignal:function(){this.can("view-signals")?this.showListSignals=!this.showListSignals:window.ProcessMaker.alert(this.$t("You do not have permission to view signals"),"danger")},editSignal:function(e){this.signalId=e.id,this.signalName=e.name,this.showEditSignal=!0},getSignalById:function(e){return ze.getters.rootElements.find((function(t){return t.id===e}))},change:function(e){if(!e)return this.$emit("input",""),void this.refreshVueMultiselectValue();var t=this.getSignalById(e.id);t||(t=window.ProcessMaker.$modeler.moddle.create("bpmn:Signal",{id:e.id,name:e.name}),ze.getters.rootElements.push(t)),this.$emit("input",Object(ft["get"])(e,this.trackBy)),this.refreshVueMultiselectValue()},refreshVueMultiselectValue:function(){var e=this;this.$nextTick((function(){var t=e;while(t&&"vue-form-renderer"!==t.$options._componentTag)t=t.$parent;t&&t.$emit("update",t.transientData)}))},showAddSignal:function(){this.can("create-signals")?(this.showNewSignal=!0,this.signalId="",this.signalName=""):window.ProcessMaker.alert(this.$t("You do not have permission to add new signals"),"danger")},cancelAddSignal:function(){this.showNewSignal=!1,this.showEditSignal=!1},updateSignal:function(){this.getSignalById(this.signalId).name=this.signalName,this.showEditSignal=!1},addSignal:function(){var e=window.ProcessMaker.$modeler.moddle.create("bpmn:Signal",{id:this.signalId,name:this.signalName});ze.getters.rootElements.push(e),this.showNewSignal=!1},updateOptions:function(e){this.options=Object(ft["uniqBy"])([].concat(g(e),g(this.localSignals)),"id")},loadOptions:function(e){var t=this;if(this.can("view-signals")){var n=this.pmql;window.window.ProcessMaker.apiClient.get(this.api,{params:{filter:e,pmql:n}}).then((function(e){t.updateOptions(e.data.data||[])}))}},loadSelected:function(e){var t=ze.getters.rootElements.find((function(t){return t.id===e}));t?this.selectedOption={id:t.id,name:t.name}:(this.$emit("input",""),this.refreshVueMultiselectValue())},loadOptionsDebounced:function(){},can:function(e){return Object(ft["get"])(window,"ProcessMaker.modeler.signalPermissions.".concat(e),!1)}},watch:{value:{immediate:!0,handler:function(e){var t=this;this.selectedOption=this.options.find((function(n){return Object(ft["get"])(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}},Ys=Xs,Zs=(n("1c15"),n("ea11"),ut(Ys,Ws,$s,!1,null,"607e6d70",null)),Ks=Zs.exports;function Js(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{component:Ks,config:{label:"Signal",name:"signalRef",helper:e,canEdit:t}}}var Qs={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=i[0].get("signalRef");e.signalRef=r?r.id:""}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o,i){for(var r in ia()(e,["$type","eventDefinitions","signalRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var a=i.rootElements.find((function(t){return t.id===e.signalRef}));!a&&e.signalRef&&(a=o.create("bpmn:Signal",{id:e.signalRef,name:e.signalRef}),i.rootElements.push(a)),t.definition.get("eventDefinitions")[0].signalRef=a}},ec="processmaker-modeler-signal-end-event",tc=na()(rn()(Ur),Vt(Vt({},Qs),{},{id:ec,component:Gs,control:!1,label:Zt[ec],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Zt[ec]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Js("Select the signal reference that this element throws")]}]}]})),nc=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},oc=[],ic={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he,hr,Bi,Zr],data:function(){return{shape:new fr,definition:null,dropdownData:[{label:Xt["processmaker-modeler-start-event"],nodeType:"processmaker-modeler-start-event",dataTest:"switch-to-start-event"},{label:Xt["processmaker-modeler-start-timer-event"],nodeType:"processmaker-modeler-start-timer-event",dataTest:"switch-to-start-timer-event"},{label:Xt["processmaker-modeler-signal-start-event"],nodeType:"processmaker-modeler-signal-start-event",dataTest:"switch-to-signal-start-event"},{label:Xt["processmaker-modeler-message-start-event"],nodeType:"processmaker-modeler-message-start-event",dataTest:"switch-to-message-start-event"},{label:Xt["processmaker-modeler-conditional-start-event"],nodeType:"processmaker-modeler-conditional-start-event",dataTest:"switch-to-conditional-start-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape.set("type","processmaker.components.nodes.startEvent.Shape");var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({body:{stroke:I,fill:D},label:{text:this.node.definition.get("name"),refY:"130%"},image:{"ref-x":5,"ref-y":5,width:e.get("width")-10,height:e.get("height")-10}}),this.shape.addTo(this.graph),this.shape.component=this}},rc=ic,ac=ut(rc,nc,oc,!1,null,null,null),sc=ac.exports,cc=n("e726"),lc=n.n(cc);function dc(e){if(!e)return!1;var t=JSON.parse(e);return t&&t.web_entry&&"DISABLED"!==t.web_entry.mode}var uc,pc,hc,fc,mc,gc,vc,bc,yc={extends:sc,watch:{"node.definition.config":{immediate:!0,handler:function(e){if(dc(e))return this.nodeIcon=lc.a,void this.shape.attr("image/xlink:href",Yr(lc.a,this.node));this.nodeIcon=null,this.shape.attr("image/xlink:href",null)}}}},wc=yc,xc=ut(wc,uc,pc,!1,null,null,null),kc=xc.exports,Cc=36,Sc={bpmnType:"bpmn:StartEvent",control:!1,category:"BPMN",diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Cc,width:Cc,x:null,y:null})})},validateIncoming:function(){return!1},inspectorConfig:[{items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-start-event"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Ec="processmaker-modeler-start-event",Ac=na()(rn()(Sc),{id:Ec,component:kc,control:!0,icon:n("80b2"),label:Xt[Ec],rank:10,items:[{icon:n("80b2"),label:Xt[Ec],control:!0,bpmnType:"bpmn:StartEvent",rank:10,id:"processmaker-modeler-start-event"},{icon:n("2670"),label:Xt["processmaker-modeler-message-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:11,id:"processmaker-modeler-message-start-event"},{icon:n("f4e6"),label:Xt["processmaker-modeler-conditional-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:12,id:"processmaker-modeler-conditional-start-event"},{icon:n("a619"),label:Xt["processmaker-modeler-signal-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:13,id:"processmaker-modeler-signal-start-event"},{icon:n("67db"),label:Xt["processmaker-modeler-start-timer-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:14,id:"processmaker-modeler-start-timer-event"}],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Xt[Ec])})}}),Mc=n("8f89"),Tc=n.n(Mc),Pc={extends:sc,data:function(){return{nodeIcon:Tc.a}},mounted:function(){this.shape.attr({image:{"ref-x":5,"ref-y":3}})}},_c=Pc,Oc=ut(_c,hc,fc,!1,null,null,null),Dc=Oc.exports,Ic={label:"Request Variable",name:"config",helper:"Enter the request variable that will store the signal payload","data-cy":"signal-request-variable"},Nc=Ic,Rc="processmaker-modeler-signal-start-event",jc=na()(rn()(Sc),Vt(Vt({},Qs),{},{id:Rc,component:Dc,label:Xt[Rc],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Xt[Rc]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Js("Signal that will trigger this start event",!1),{component:"FormInput",config:Nc}]}]}]})),Lc=n("5161"),Bc=n.n(Lc),Fc={extends:sc,data:function(){return{nodeIcon:Bc.a}}},zc=Fc,Hc=ut(zc,mc,gc,!1,null,null,null),qc=Hc.exports,Vc="processmaker-modeler-message-start-event",Uc=na()(rn()(Sc),Vt(Vt({},Ls),{},{id:Vc,component:qc,label:Xt[Vc],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Xt[Vc]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Ns("Message that will trigger this start event")]}]}]})),Gc=n("66f8"),Wc=n.n(Gc),$c={extends:sc,data:function(){return{nodeIcon:Wc.a}}},Xc=$c,Yc=ut(Xc,vc,bc,!1,null,null,null),Zc=Yc.exports,Kc=(n("38cf"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"form-group"},[t("form-date-picker",{staticClass:"p-0",attrs:{"emit-iso":!0,"data-test":"start-date-picker","data-format":"datetime",label:e.$t("Start date"),placeholder:e.$t("Start date"),"control-class":"form-control",value:e.startDate,helper:e.$t(e.startDateHelper)},on:{input:e.setStartDate}}),e.hasRepeat?[t("label",{},[e._v(e._s(e.$t(e.repeatLabel)))]),t("b-form-group",{staticClass:"m-0 mb-3 p-0"},[t("b-form-input",{staticClass:"d-inline-block w-50",attrs:{type:"number",min:"1",max:"99","data-test":"repeat-input"},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-form-select",{staticClass:"d-inline-block w-50 periodicity",attrs:{"data-test":"repeat-on-select"},model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},[t("option",{attrs:{value:"day"}},[e._v(e._s(e.$t("day")))]),t("option",{attrs:{value:"week"}},[e._v(e._s(e.$t("week")))]),t("option",{attrs:{value:"month"}},[e._v(e._s(e.$t("month")))]),t("option",{attrs:{value:"year"}},[e._v(e._s(e.$t("year")))])]),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.repeatHelper)))])],1)]:e._e(),e.isWeeklyPeriodSelected?t("weekday-select",{attrs:{selectWeekdays:e.selectedWeekdays,periodicityValue:e.periodicityValue,repeat:e.repeat,"start-date":e.startDate,"end-date":e.endDate,ends:e.ends,times:e.times},model:{value:e.expression,callback:function(t){e.expression=t},expression:"expression"}}):e._e(),e.hasEnds?[t("label",{staticClass:"mt-1"},[e._v(e._s(e.$t("Ends")))]),t("div",[t("b-form-group",{staticClass:"m-0 mb-2"},[t("b-form-radio",{attrs:{"data-test":"ends-never",name:"optradio",value:"never"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("Never")))])],1),t("b-form-group",{staticClass:"p-0 mb-1",attrs:{description:"".concat(e.$t("Click On to select a date"),".")}},[t("b-form-radio",{staticClass:"pl-3 ml-2 mb-1",attrs:{name:"optradio",value:"ondate","data-test":"ends-on"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("On")))]),t("form-date-picker",{staticClass:"form-date-picker p-0 m-0",class:{"date-disabled":"ondate"!==e.ends},attrs:{"emit-iso":!0,"data-test":"end-date-picker",disabled:"ondate"!==e.ends,placeholder:e.$t("End date"),"data-format":"datetime","control-class":"form-control",value:e.endDate,name:"end date"},on:{input:e.setEndDate}})],1),t("b-form-group",{staticClass:"mt-0 p-0",attrs:{description:"".concat(e.$t("Click After to enter how many occurrences to end the timer control"),".")}},[t("b-form-radio",{staticClass:"pl-3 ml-2 mb-1",attrs:{"data-test":"ends-after",name:"optradio",value:"after"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("After")))]),t("b-form-input",{staticClass:"w-25 pl-2 pr-1 d-inline-block",attrs:{"data-test":"ends-after-input",type:"number",min:"0",max:"99",disabled:"after"!==e.ends},model:{value:e.times,callback:function(t){e.times=t},expression:"times"}}),t("b-form-input",{staticClass:"w-75 d-inline-block occurrences-text",attrs:{readonly:"after"!==e.ends,value:e.$t("occurrences")}})],1)],1)]:e._e()],2)}),Jc=[],Qc=n("5b4c"),el=function(){var e=this,t=e._self._c;return e.cycleManager.isWeeklyPeriodSelected()?t("div",{staticClass:"mb-2"},[t("label",{},[e._v(e._s(e.$t(e.weekLabel)))]),t("div",e._l(e.weekdays,(function(n){return t("span",{key:n.day,staticClass:"badge badge-pill weekday mb-1",class:e.cycleManager.weekdayStyle(n),attrs:{"data-test":"day-".concat(n.day)},on:{click:function(t){return e.clickWeekDay(n)}}},[e._v(" "+e._s(e.$t(n.initial))+" ")])})),0),e.repeatOnValidationError?t("small",{staticClass:"text-danger"},[e._v(e._s(e.repeatOnValidationError))]):e._e(),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.periodicityHelper)))])]):e._e()},tl=[];function nl(e){return null===e?"":"string"===typeof e?e:e.isLuxonDateTime?e.toISO():e.toISOString()}function ol(e,t,n,o,i){var r=nl(e),a=nl(t),s="after"===o?i:"",c="ondate"===o?a:"";return"R".concat(s,"/").concat(r,"/").concat(n)+(c?"/"+c:"")}function il(e,t){return"P".concat(e).concat(t)}var rl,al,sl=function(){function e(t,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"never",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"1";Ut(this,e),U(this,"_startDate",void 0),U(this,"_repeat",void 0),U(this,"_periodicityValue",void 0),U(this,"_selectedWeekdays",void 0),U(this,"_endDate",void 0),U(this,"_ends",void 0),U(this,"_times",void 0),this._startDate=this.sanitizeDate(t),this._repeat=n,this._periodicityValue=o,this._selectedWeekdays=i,this._endDate=this.sanitizeDate(r),this._ends=a,this._times=s}return Wt(e,[{key:"startDate",set:function(e){this._startDate=this.sanitizeDate(e)}},{key:"endDate",set:function(e){this._endDate=this.sanitizeDate(e)}},{key:"ends",set:function(e){this._ends=e}},{key:"times",set:function(e){this._times=e}},{key:"repeat",set:function(e){this._repeat=e}},{key:"periodicityValue",set:function(e){this._periodicityValue=e}},{key:"selectedWeekdays",set:function(e){this._selectedWeekdays=e}},{key:"sanitizeDate",value:function(e){return null===e?e:"string"===typeof e?Qc["DateTime"].fromISO(e).toUTC():e.isLuxonDateTime?e.toUTC():Qc["DateTime"].fromJSDate(e).toUTC()}},{key:"getFormattedDateWithWeekdayIntervals",value:function(){var e=this,t=il(this._repeat,this._periodicityValue),n=[this._startDate.toISO()];return this._selectedWeekdays.forEach((function(o){var i=e.getWeekDayDate(o),r=ol(i,e._endDate,t,e._ends,e._times);n.push(r)})),n.join("|")}},{key:"getWeekDayDate",value:function(e){var t=Qc["DateTime"].fromISO(this._startDate,{zone:"utc"}),n=t.set({weekday:e});return n.toMillis()<t.toMillis()&&(n=n.plus({days:7})),n.toUTC()}},{key:"dateIntervalString",value:function(){if(this.isWeeklyPeriodSelected()&&this.hasSelectedWeekdays())return this.getFormattedDateWithWeekdayIntervals();var e=il(this._repeat,this._periodicityValue);return ol(this._startDate,this._endDate,e,this._ends,this._times)}},{key:"isWeeklyPeriodSelected",value:function(){return"W"===this._periodicityValue}},{key:"hasSelectedWeekdays",value:function(){return this._selectedWeekdays.length>0}},{key:"weekdayStyle",value:function(e){var t=this._startDate.toLocal().weekday;return[e.selected?"badge-primary":"badge-light",{"border border-primary":t===e.day}]}}]),e}(),cl={props:{selectWeekdays:{type:Array,default:function(){return[]}},startDate:{type:String,default:Qc["DateTime"].local().toUTC().toISO()},endDate:{type:String,default:null},ends:{type:String,default:"never"},times:{type:[Number,String],default:1},periodicityValue:{type:String,required:!0},repeat:{type:[String,Number],default:1},hasEnds:{type:Boolean,default:!0},weekLabel:{type:String,default:"Repeat on"},periodicityHelper:{type:String,default:"Select the day(s) of the week in which to trigger this element"}},data:function(){return{DateTime:Qc["DateTime"],weekdays:[{day:7,initial:"S",selected:!1},{day:1,initial:"M",selected:!1},{day:2,initial:"T",selected:!1},{day:3,initial:"W",selected:!1},{day:4,initial:"T",selected:!1},{day:5,initial:"F",selected:!1},{day:6,initial:"S",selected:!1}],cycleManager:new sl(this.startDate,this.repeat,this.periodicityValue,this.selectedWeekdays,this.endDate,this.ends,this.times)}},watch:{startDate:function(e){this.cycleManager.startDate=e},endDate:function(e){this.cycleManager.endDate=e},ends:function(e){this.cycleManager.ends=e},times:function(e){this.cycleManager.times=e},repeat:function(e){this.cycleManager.repeat=e},periodicityValue:function(e){this.cycleManager.periodicityValue=e},selectedWeekdays:function(e){this.cycleManager.selectedWeekdays=e},dateIntervalString:function(){this.update()}},mounted:function(){var e=this;this.selectWeekdays.forEach((function(t){var n=e.weekdays.find((function(e){return e.day===t}));n&&(n.selected=!0)}))},computed:{repeatOnValidationError:function(){var e=this.weekdays.filter((function(e){var t=e.selected;return t})).length;return!this.cycleManager.isWeeklyPeriodSelected()||e>0?null:"You must select at least one day."},dateIntervalString:function(){return this.cycleManager.dateIntervalString()},selectedWeekdays:function(){return this.weekdays.filter((function(e){var t=e.selected;return t})).map((function(e){var t=e.day;return t}))}},methods:{clickWeekDay:function(e){e.selected=!e.selected},update:function(){this.$emit("input",this.dateIntervalString)}},destroyed:function(){this.$emit("input",null)}},ll=cl,dl=(n("6d7f"),ut(ll,el,tl,!1,null,"5e7ed8dc",null)),ul=dl.exports,pl={day:"D",week:"W",month:"M",year:"Y"},hl={components:{WeekdaySelect:ul},props:{value:[Array,String],hasEnds:{type:Boolean,default:!0},hasRepeat:{type:Boolean,default:!0},repeatLabel:{type:String,default:"Repeat every"},weekLabel:{type:String,default:"Repeat on"},startDateHelper:{type:String,default:"Select the date to initially trigger this element"},repeatHelper:{type:String,default:"Set the periodic interval to trigger this element again"},periodicityHelper:{type:String,default:"Select the day(s) of the week in which to trigger this element"}},data:function(){return{DateTime:Qc["DateTime"],expression:null,startDate:Qc["DateTime"].local().toUTC().toISO(),repeat:"1",periodicity:"week",ends:"never",endDate:Qc["DateTime"].local().toUTC().toISO(),times:"1",selectedWeekdays:[]}},created:function(){this.parseTimerConfig(this.value)},watch:{timerExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{periodicityValue:function(){return pl[this.periodicity]},timerExpression:function(){if(this.isWeeklyPeriodSelected()&&this.expression)return this.expression;var e=il(this.repeat,this.periodicityValue);return ol(this.startDate,this.endDate,e,this.ends,this.times)}},methods:{isWeeklyPeriodSelected:function(){return"week"===this.periodicity},setStartDate:function(e){this.startDate=Qc["DateTime"].fromISO(e,{zone:"utc"}).set({seconds:0,milliseconds:0}).toUTC().toISO()},setEndDate:function(e){var t=Qc["DateTime"].fromISO(this.startDate,{zone:"utc"});this.endDate=Qc["DateTime"].fromISO(e,{zone:"utc"}).set({hours:t.hour,minutes:t.minute,seconds:0,milliseconds:0}).toUTC().toISO()},parseTimerConfig:function(e){var t=this;if(e[0].timeCycle.body)try{var n=!1,o=e[0].timeCycle.body.split("|");o.forEach((function(e){if("R"!==e.substr(0,1))t.startDate=e,n=!0;else{var o=e.match(/R(\d*)\/([^/]+)\/P(\d+)(\w)(?:\/([^/]+))?/);if(o){if(t.times=o[1]||"1",t.repeat=o[3],t.periodicity=Object.keys(pl).find((function(e){return pl[e]===o[4]})),n||(t.startDate=o[2],n=!0),t.isWeeklyPeriodSelected()){var i=Qc["DateTime"].fromISO(o[2],{zone:"utc"}).toLocal().weekday;t.selectedWeekdays.push(i)}t.endDate=o[5]||Qc["DateTime"].local().toUTC().toISO(),t.ends=o[5]?"ondate":o[1]?"after":"never"}}n=!0}))}catch(i){this.resetTimerExpression()}},resetTimerExpression:function(){this.startDate=Qc["DateTime"].local().toUTC().toISO(),this.times="1",this.repeat="1",this.periodicity="week",this.endDate=Qc["DateTime"].local().toUTC().toISO(),this.ends="never",this.expression=null,this.selectedWeekdays=[]}}},fl=hl,ml=(n("05a3"),n("cc4b"),ut(fl,Kc,Jc,!1,null,"66e578ba",null)),gl=ml.exports,vl="processmaker-modeler-start-timer-event",bl=na()(rn()(Sc),{id:vl,component:Zc,label:Xt[vl],definition:function(e,t){var n=e.create("bpmn:StartEvent",{name:t(Xt[vl])});return n.eventDefinitions=[e.create("bpmn:TimerEventDefinition",{timeCycle:e.create("bpmn:Expression",{body:""})})],n},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var a=e[r];if("object"===v(a))continue;var s=i.get(r)[0].timeCycle;if(s&&s.body===a)continue;var c={timeCycle:o.create("bpmn:Expression",{body:a})},l=[o.create("bpmn:TimerEventDefinition",c)];n(t,"eventDefinitions",l)}else n(t,r,e[r])},inspectorConfig:[{items:[{},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-start-timer-timing-control"},items:[{component:gl,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},qr,Ir]}]}),yl=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,dropdownData:e.dropdownData}},e.$listeners))},wl=[],xl=d["shapes"].standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},Ki("topLeft"),Ki("topCenter"),Ki("topRight"),Ki("bottomLeft"),Ki("bottomCenter"),Ki("bottomRight")],defaults:d["util"].deepSupplement({type:"processmaker.components.nodes.intermediateEvent.Shape",size:{width:36,height:36},attrs:Vt(Vt(Vt(Vt(Vt(Vt({body:{fill:N,stroke:R},body2:{cx:18,cy:18,r:15,"stroke-width":2,fill:N,stroke:R},image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},Ji("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),Ji("topCenter",{ref:"circle","ref-y":-20})),Ji("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),Ji("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),Ji("bottomCenter",{ref:"circle","ref-padding-y":-40})),Ji("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},d["shapes"].standard.Circle.prototype.defaults)}),kl={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he,hr,Bi],data:function(){return{shape:null,definition:null,dropdownData:[{label:nn["processmaker-modeler-intermediate-catch-timer-event"],nodeType:"processmaker-modeler-intermediate-catch-timer-event",dataTest:"switch-to-intermediate-timer-catch-event"},{label:nn["processmaker-modeler-intermediate-signal-catch-event"],nodeType:"processmaker-modeler-intermediate-signal-catch-event",dataTest:"switch-to-intermediate-signal-catch-event"},{label:nn["processmaker-modeler-intermediate-signal-throw-event"],nodeType:"processmaker-modeler-intermediate-signal-throw-event",dataTest:"switch-to-intermediate-signal-throw-event"},{label:nn["processmaker-modeler-intermediate-message-catch-event"],nodeType:"processmaker-modeler-intermediate-message-catch-event",dataTest:"switch-to-intermediate-message-catch-event"},{label:nn["processmaker-modeler-intermediate-message-throw-event"],nodeType:"processmaker-modeler-intermediate-message-throw-event",dataTest:"switch-to-intermediate-message-throw-event"},{label:nn["processmaker-modeler-intermediate-conditional-catch-event"],nodeType:"processmaker-modeler-intermediate-conditional-catch-event",dataTest:"switch-to-intermediate-conditional-catch-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new xl;var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({label:{text:this.node.definition.get("name"),refY:"130%"}}),this.shape.addTo(this.graph),this.shape.component=this}},Cl=kl,Sl=ut(Cl,yl,wl,!1,null,null,null),El=Sl.exports,Al=n("3ee4"),Ml=n.n(Al),Tl={extends:El,mixins:[Zr],data:function(){return{nodeIcon:Ml.a}}},Pl=Tl,_l=ut(Pl,rl,al,!1,null,null,null),Ol=_l.exports,Dl=function(){var e=this,t=e._self._c;return t("div",[t("label",[e._v(e._s(e.$t("Type")))]),t("b-input-group",[t("b-form-select",{attrs:{value:e.timerPropertyName,"data-test":"intermediateTypeSelect"},on:{change:e.changeType}},[t("option",{attrs:{value:"timeDuration"}},[e._v(e._s(e.$t("Duration")))]),t("option",{attrs:{value:"timeDate"}},[e._v(e._s(e.$t("Date/Time")))]),t("option",{attrs:{value:"timeCycle"}},[e._v(e._s(e.$t("Cycle")))])])],1),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.typeHelper)))]),t(e.component,{tag:"component",attrs:{"has-ends":!1,"repeat-label":"Wait for","week-label":"Every"},model:{value:e.timerProperty,callback:function(t){e.timerProperty=t},expression:"timerProperty"}})],1)},Il=[],Nl=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("label",[e._v(e._s(e.$t("Duration")))]),t("b-input-group",[t("b-form-input",{staticClass:"form-control control repeat",attrs:{type:"number",min:"1","data-test":e.repeatInput},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-input-group-append",[t("b-form-select",{model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},e._l(e.periods,(function(n){return t("option",{key:n.name,domProps:{value:n}},[e._v(e._s(e.$t(n.name)))])})),0)],1),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Select the duration of the timer")))])],1)],1)},Rl=[],jl=n("4416"),Ll=n.n(jl),Bl={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},Fl={props:["value","repeatInput"],data:function(){var e=[{name:Bl.minute,value:"M",isTime:!0},{name:Bl.hour,value:"H",isTime:!0},{name:Bl.day,value:"D"},{name:Bl.week,value:"W"},{name:Bl.month,value:"M"}];return{repeat:null,periodicity:null,periods:e}},watch:{value:{handler:function(e){this.periodicity=this.getPeriodFromDelayString(e),this.repeat=this.getRepeatNumberFromDelayString(e)},immediate:!0},durationExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{durationExpression:function(){return this.periodicity.isTime?"PT".concat(this.repeat).concat(this.periodicity.value):"P".concat(this.repeat).concat(this.periodicity.value)}},methods:{getPeriodFromDelayString:function(e){var t=this.isTimePeriod(e),n=Ll()(e);if("M"===n){var o=t?Bl.minute:Bl.month;return this.periods.find((function(e){var t=e.name;return t===o}))}return this.periods.find((function(e){var t=e.value;return t===n}))},isTimePeriod:function(e){return"T"===e[1]},getRepeatNumberFromDelayString:function(e){var t=e.match(/\d+/);return t&&t[0]}}},zl=Fl,Hl=ut(zl,Nl,Rl,!1,null,null,null),ql=Hl.exports,Vl=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("form-date-picker",{staticClass:"p-0",attrs:{"emit-iso":!0,"data-format":"datetime",label:e.$t("Wait until specific date/time"),"control-class":"form-control",value:e.convertFromUTC(e.value),"data-test":"date-picker",helper:"Select the date to trigger this element"},on:{input:e.emitValue}})],1)},Ul=[],Gl={data:function(){return{DateTime:Qc["DateTime"]}},props:{value:String},methods:{getTimezone:function(){return"undefined"!==typeof window.ProcessMaker&&window.ProcessMaker.user&&window.ProcessMaker.user.timezone||"local"},convertFromUTC:function(e){return Qc["DateTime"].fromISO(e,{zone:"utc"}).setZone(this.getTimezone()).toISO()},emitValue:function(e){var t=Qc["DateTime"].fromISO(e).toUTC().toISO();this.$emit("input",t)}}},Wl=Gl,$l=ut(Wl,Vl,Ul,!1,null,null,null),Xl=$l.exports,Yl=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("label",[e._v(e._s(e.$t("Recurring loop repeats at time interval set below")))]),t("b-input-group",[t("b-form-input",{staticClass:"form-control control repeat",attrs:{type:"number",min:"1","data-test":e.repeatInput},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-input-group-append",[t("b-form-select",{attrs:{"data-test":"periods"},model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},e._l(e.periods,(function(n){return t("option",{key:n.name,domProps:{value:n}},[e._v(e._s(e.$t(n.name)))])})),0)],1)],1),e.periodicity&&e.periodicity.isWeek?t("weekday-select",{staticClass:"pt-3",attrs:{selectWeekdays:e.selectedWeekdays,periodicityValue:e.periodicity.value,repeat:e.repeat},model:{value:e.expression,callback:function(t){e.expression=t},expression:"expression"}}):e._e()],1)},Zl=[],Kl={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},Jl={components:{WeekdaySelect:ul},props:["value","repeatInput"],data:function(){var e=[{name:Kl.minute,value:"M",isTime:!0},{name:Kl.hour,value:"H",isTime:!0},{name:Kl.day,value:"D"},{name:Kl.week,value:"W",isWeek:!0},{name:Kl.month,value:"M"}];return{DateTime:Qc["DateTime"],repeat:null,periodicity:null,expression:null,periods:e,selectedWeekdays:null}},watch:{value:{handler:function(e){this.periodicity=this.getPeriodFromDelayString(e),this.repeat=this.getRepeatNumberFromDelayString(e),this.selectedWeekdays=this.getSelectedWeekdaysFromDelayString(e)},immediate:!0},cycleExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{cycleExpression:function(){return this.periodicity.isTime?"R/PT".concat(this.repeat).concat(this.periodicity.value):this.periodicity.isWeek&&this.expression?this.expression:"R/P".concat(this.repeat).concat(this.periodicity.value)}},methods:{getSelectedWeekdaysFromDelayString:function(e){var t=e.split("|"),n=[];return t.forEach((function(e){var t=e.match(/R(\d*)\/([^/]+)\/PT?(\d+)(\w)(?:\/([^/]+))?/);if(t){var o=Qc["DateTime"].fromISO(t[2],{zone:"utc"}).toLocal().weekday;n.push(o)}})),n},getPeriodFromDelayString:function(e){var t=this.isTimePeriod(e),n=Ll()(e);if("M"===n){var o=t?Kl.minute:Kl.month;return this.periods.find((function(e){var t=e.name;return t===o}))}return this.periods.find((function(e){var t=e.value;return t===n}))},isTimePeriod:function(e){return"T"===e[3]},getRepeatNumberFromDelayString:function(e){var t=e.match(/PT?(\d+)/);return t?t[1]:1}}},Ql=Jl,ed=ut(Ql,Yl,Zl,!1,null,null,null),td=ed.exports,nd="PT1H",od={timeDuration:"DurationExpression",timeDate:"DateTimeExpression",timeCycle:"CycleExpression"},id={props:{value:{type:Object},typeHelper:{type:String,default:"Select the type of delay"}},components:{DurationExpression:ql,DateTimeExpression:Xl,CycleExpression:td},computed:{component:function(){return od[this.timerPropertyName]},timerProperty:{get:function(){return this.value.body},set:function(e){this.emitChange(this.value.type,e)}},timerPropertyName:function(){return this.value.type}},methods:{changeType:function(e){var t=this.isDelayType(e)||this.isCycleType(e)?nd:Qc["DateTime"].local().toUTC().toISO();this.emitChange(e,t)},isDelayType:function(e){return od[e]===od.timeDuration},isCycleType:function(e){return od[e]===od.timeCycle},emitChange:function(e,t){this.$emit("input",{type:e,body:t})}}},rd=id,ad=ut(rd,Dl,Il,!1,null,null,null),sd=ad.exports,cd="processmaker-modeler-intermediate-catch-timer-event",ld={id:cd,component:Ol,bpmnType:"bpmn:IntermediateCatchEvent",control:!0,category:"BPMN",icon:n("5960"),label:"Intermediate Event",rank:20,items:[{icon:n("2b05"),label:"Intermediate Timer Event",control:!0,rank:21,id:"processmaker-modeler-intermediate-catch-timer-event"},{icon:n("b007"),label:"Intermediate Signal Catch Event",control:!0,rank:22,id:"processmaker-modeler-intermediate-signal-catch-event"},{icon:n("f2c1"),label:"Intermediate Signal Throw Event",control:!0,rank:23,id:"processmaker-modeler-intermediate-signal-throw-event"},{icon:n("fca5"),label:"Intermediate Message Catch Event",control:!0,rank:24,id:"processmaker-modeler-intermediate-message-catch-event"},{icon:n("e589"),label:"Intermediate Message Throw Event",control:!0,rank:25,id:"processmaker-modeler-intermediate-message-throw-event"},{icon:n("080b"),label:"Intermediate Conditional Catch Event",control:!0,rank:26,id:"processmaker-modeler-intermediate-conditional-catch-event"}],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(nn[cd]),eventDefinitions:[e.create("bpmn:TimerEventDefinition",{timeDuration:e.create("bpmn:Expression",{body:nd})})]})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],a=i[0][r].body;e[o]={type:r,body:a}}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var a=e[r],s=a.type,c=a.body,l=i.get(r)[0][s];if(l&&l.body===c)continue;var d=U({},s,o.create("bpmn:Expression",{body:c})),u=[o.create("bpmn:TimerEventDefinition",d)];n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{name:nn[cd],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-timer-config"},items:[{component:"FormInput",config:Ar}]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-intermediate-timer-event-timing-control"},items:[{component:sd,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},qr,Ir]}]};function dd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#000",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#fff";return{image:{width:20,height:20,y:3,x:3},body:{stroke:e,strokeWidth:t,fill:n},body2:{stroke:e,strokeWidth:t,fill:n}}}var ud,pd,hd,fd,md,gd,vd,bd,yd,wd,xd=n("2e05"),kd=n.n(xd),Cd={extends:El,mixins:[Zr],data:function(){return{nodeIcon:kd.a}},mounted:function(){var e=dd(R,2,N);this.shape.attr(e)}},Sd=Cd,Ed=ut(Sd,ud,pd,!1,null,null,null),Ad=Ed.exports,Md={id:"processmaker-modeler-intermediate-message",component:El,bpmnType:"bpmn:IntermediateEvent",control:!0,category:"BPMN",label:"Intermediate Message Event",definition:function(e,t){return e.create("bpmn:IntermediateEvent",{name:t("Intermediate Message Event"),eventDefinitions:[e.create("bpmn:MessageEventDefinition",{})]})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:"Intermediate Message Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-message-event"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Td="processmaker-modeler-intermediate-message-catch-event",Pd=na()(rn()(Md),Vt(Vt({},Ls),{},{id:Td,component:Ad,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:nn[Td],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(nn[Td]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Ns("Message that will catch this intermediate event")]}]}]})),_d=n("a5a0"),Od=n.n(_d),Dd={extends:El,mixins:[Zr],data:function(){return{nodeIcon:Od.a}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},Id=Dd,Nd=ut(Id,hd,fd,!1,null,null,null),Rd=Nd.exports,jd={id:"processmaker-modeler-intermediate-event",component:El,bpmnType:"bpmn:IntermediateEvent",control:!0,category:"BPMN",label:"Intermediate Event",definition:function(e,t){return e.create("bpmn:IntermediateEvent",{name:t("Intermediate Event")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:"Intermediate Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-gateway-config"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Ld="processmaker-modeler-intermediate-signal-catch-event",Bd=na()(rn()(jd),Vt(Vt({},Qs),{},{id:Ld,component:Rd,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:nn[Ld],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(nn[Ld]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Js("Signal that will catch this intermediate event",!1),{component:"FormInput",config:Nc}]}]}]})),Fd=n("42b7"),zd=n.n(Fd),Hd={extends:El,mixins:[Zr],props:["moddle","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:zd.a}},methods:{addMessageRef:function(){this.node.definition.get("eventDefinitions")[0].messageRef?this.message=this.node.definition.get("eventDefinitions")[0].messageRef:(this.message=this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),this.rootElements.push(this.message),this.node.definition.get("eventDefinitions")[0].messageRef=this.message)}},mounted:function(){this.shape.attr({image:{width:22,height:20,y:3,x:2}}),this.addMessageRef()},destroyed:function(){ki()(this.rootElements,this.message),ze.commit("removeMessageRef",this.message)}},qd=Hd,Vd=ut(qd,md,gd,!1,null,null,null),Ud=Vd.exports,Gd="processmaker-modeler-intermediate-message-throw-event",Wd=na()(rn()(Md),Vt(Vt({},Ls),{},{id:Gd,component:Ud,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:nn[Gd],icon:n("e589"),definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(nn[Gd]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Ns("Select the message reference that this element throws")]}]}]})),$d=n("4c70"),Xd=n.n($d),Yd={extends:El,mixins:[Zr],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:Xd.a}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},Zd=Yd,Kd=ut(Zd,vd,bd,!1,null,null,null),Jd=Kd.exports,Qd="processmaker-modeler-intermediate-signal-throw-event",eu=na()(rn()(jd),Vt(Vt({},Qs),{},{id:Qd,component:Jd,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:nn[Qd],definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(nn[Qd]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Js("Select the signal reference that this element throws")]}]}]})),tu=n("01e5"),nu=n.n(tu),ou={extends:El,mixins:[Zr],data:function(){return{nodeIcon:nu.a}},mounted:function(){var e=this.node.diagram.bounds;this.shape.attr({image:{"ref-x":9,"ref-y":9,width:e.get("width")-18,height:e.get("height")-18}})}},iu=ou,ru=ut(iu,yd,wd,!1,null,null,null),au=ru.exports;function su(){return[{component:"FormInput",config:{label:"Condition",name:"condition",helper:"Expression to evaluate condition"}}]}var cu={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];return"eventDefinitions"===o?e.condition=i[0].get("condition").body:e[o]=i,e}),{})},inspectorHandler:function(e,t,n){for(var o in ia()(e,["$type","eventDefinitions"]))t.definition[o]!==e[o]&&("condition"===o?t.definition.get("eventDefinitions")[0].get("condition").body=e[o]:n(t,o,e[o]))}},lu="processmaker-modeler-intermediate-conditional-catch-event",du=na()(rn()(jd),Vt(Vt({},cu),{},{id:lu,component:au,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:nn[lu],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(nn[lu]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(g(su()))}]}]})),uu=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"boundary-event-dropdown-data":e.boundaryEventDropdownData,"dropdown-data":e.dropdownData,showCustomIconPicker:!0,iconName:this.iconName},on:{"set-custom-icon-name":e.setCustomIconName,"reset-custom-icon-name":e.resetCustomIconName}},e.$listeners))},pu=[],hu=d["shapes"].standard.Rectangle.extend({markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},Ki("topLeft"),Ki("topCenter"),Ki("topRight"),Ki("bottomLeft"),Ki("bottomCenter"),Ki("bottomRight")],defaults:d["util"].deepSupplement({type:"processmaker.components.nodes.task.Shape",size:{width:100,height:60},attrs:Vt(Vt(Vt(Vt(Vt(Vt({image:{"ref-x":4,"ref-y":4,ref:"rect",width:16,height:16,"data-test":"nodeIcon"}},Ji("topLeft",{"ref-y":4,ref:"rect"})),Ji("topCenter",{"ref-y":4,ref:"rect"})),Ji("topRight",{"ref-y":4,"ref-x":96,ref:"rect"},-1)),Ji("bottomLeft",{ref:"rect"})),Ji("bottomCenter",{ref:"rect"})),Ji("bottomRight",{"ref-x":96,ref:"rect"},-1))},d["shapes"].standard.Rectangle.prototype.defaults)}),fu=76,mu=116,gu={data:function(){return{iconName:""}},methods:{setCustomIconName:function(e){this.iconName=e},resetCustomIconName:function(){this.setCustomIconName("")},setCustomIcon:function(e){this.shape&&this.shape.attr("image/xlink:href",Yr(atob(e),this.node))}},mounted:function(){this.node.definition.get("customIcon")&&this.setCustomIcon(this.node.definition.get("customIcon"))}},vu=10,bu=[{label:"Boundary Timer Event",nodeType:"processmaker-modeler-boundary-timer-event",dataTest:"add-boundary-timer-event"},{label:"Boundary Error Event",nodeType:"processmaker-modeler-boundary-error-event",dataTest:"add-boundary-error-event"},{label:"Boundary Signal Event",nodeType:"processmaker-modeler-boundary-signal-event",dataTest:"add-boundary-signal-event"},{label:"Boundary Conditional Event",nodeType:"processmaker-modeler-boundary-conditional-event",dataTest:"add-boundary-conditional-event"},{label:"Boundary Message Event",nodeType:"processmaker-modeler-boundary-message-event",dataTest:"add-boundary-message-event"}],yu=bu,wu=n("7736"),xu=n.n(wu),ku=n("4506"),Cu=n.n(ku),Su=n("a4e3"),Eu=n.n(Su),Au="bpmn:StandardLoopCharacteristics",Mu="bpmn:MultiInstanceLoopCharacteristics";function Tu(e,t,n,o){var i=e.get("loopCharacteristics"),r=[Au,Mu];if(i&&r.includes(i.$type))if(i.$type!==Au){var a=i.isSequential?xu.a:Cu.a;n(t.bottomCenter,"loopCharacteristics",a)}else n(t.bottomCenter,"loopCharacteristics",Eu.a);else o(t.bottomCenter,"loopCharacteristics")}var Pu=n("7cd8"),_u=n.n(Pu);function Ou(e,t,n,o){e.isForCompensation?n(t.bottomCenter,"compensation",_u.a):o(t.bottomCenter,"compensation")}var Du,Iu,Nu=15,Ru=2*Zi,ju={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he,hr,Bi,gu],data:function(){return{shape:null,definition:null,dropdownData:[{label:Jt["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:Jt["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:Jt["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:Jt["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],boundaryEventDropdownData:yu,anchorPointFunction:ke}},computed:{hasTaskMarker:function(){return!!this.shape.attr("image/xlink:href")}},watch:{"node.definition.name":function(e){var t=this.node.diagram.bounds.width;this.shape.attr("label/text",d["util"].breakText(e,{width:t}));var n=this.shape.size(),o=n.height,i=this.calculateSizeOnGrid(),r=this.useTaskHeight(i)?fu:i;o!==r&&(this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment())},"node.definition.isForCompensation":function(){Ou(this.node.definition,this.markers,this.$set,this.$delete)},"node.definition":{deep:!0,handler:function(){Tu(this.node.definition,this.markers,this.$set,this.$delete)}}},methods:{getElementsUnderArea:function(e){var t=e.getBBox(),n=t.x,o=t.y,i=t.width,r=t.height,a={x:n,y:o,width:i,height:r};return this.graph.findModelsInArea(a)},calculateSizeOnGrid:function(){var e=vu-fu%vu,t=Math.floor(this.shapeView.selectors.label.getBBox().height),n=t+Nu+Ru,o=this.paperManager.ceilToNearestGridMultiple(n)-e;return this.middleIsOddNumber(o)&&(o+=vu),o},useTaskHeight:function(e){return e<fu||!this.node.definition.name},middleIsOddNumber:function(e){return 1===Math.abs(e/2%2)}},mounted:function(){this.shape=new hu;var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),Ou(this.node.definition,this.markers,this.$set,this.$delete),Tu(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8},label:{text:d["util"].breakText(this.node.definition.get("name"),{width:e.width}),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this}},Lu=ju,Bu=ut(Lu,uu,pu,!1,null,null,null),Fu=Bu.exports,zu=n("16ae"),Hu=n.n(zu),qu={extends:Fu,mixins:[Zr],data:function(){return{nodeIcon:Hu.a}}},Vu=qu,Uu=ut(Vu,Du,Iu,!1,null,null,null),Gu=Uu.exports,Wu=function(){var e=this,t=e._self._c;return t("div",[t("b-form-group",[t("b-form-checkbox",{attrs:{"data-test":"for-compensation",name:"for-compensation"},model:{value:e.isForCompensation,callback:function(t){e.isForCompensation=t},expression:"isForCompensation"}},[e._v(e._s(e.$t("For Compensation")))])],1)],1)},$u=[],Xu={props:{value:{type:Object,default:function(){return{isForCompensation:!1}}}},name:"MarkerFlags",data:function(){return{isForCompensation:this.value.isForCompensation}},watch:{isForCompensation:function(e){this.$emit("input",{isForCompensation:e})}}},Yu=Xu,Zu=ut(Yu,Wu,$u,!1,null,"66aabb37",null),Ku=Zu.exports,Ju={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:Dr,config:Ii},{component:Ku,name:"taskMarkers",config:{label:"Marker Flags",name:"markerFlags",style:"display:none"}}]},Qu=function(){var e=this,t=e._self._c;return t("div",[t("b-form-group",{attrs:{label:e.$t("Loop Mode")}},[t("b-form-select",{attrs:{id:""},on:{change:e.changeLoopType},model:{value:e.loopType,callback:function(t){e.loopType=t},expression:"loopType"}},e._l(e.loopOptions,(function(n){return t("option",{key:n.text,domProps:{value:n.value}},[e._v(e._s(e.$t(n.text)))])})),0)],1),"loop"===e.loopType?[t("b-form-group",{attrs:{label:e.$t("Maximum Iterations")}},[t("b-form-input",{attrs:{type:"number",min:"0",step:"1","data-cy":"loopMaximum"},on:{input:e.changeLoopMaximum},model:{value:e.loopMaximum,callback:function(t){e.loopMaximum=t},expression:"loopMaximum"}}),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Leave empty to continue until exit condition is satisfied")))])],1),t("b-form-group",{attrs:{label:e.$t("Exit Condition")}},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.loopCondition,expression:"loopCondition"}],ref:"specialAssignmentsInput",staticClass:"form-control special-assignment-input",attrs:{"aria-label":e.$t("FEEL Syntax"),placeholder:"FEEL Syntax","data-cy":"loopCondition"},domProps:{value:e.loopCondition},on:{input:[function(t){t.target.composing||(e.loopCondition=t.target.value)},e.changeLoopCondition]}}),e._v(" "),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("When FEEL expression evaluates to true then exit loop")))])])]:e._e(),"parallel_mi"===e.loopType||"sequential_mi"===e.loopType?["inputData"===e.multiType?t("b-form-group",{attrs:{id:"group-inputData",label:e.$t("Request Variable Array"),"label-for":"inputData",description:e.$t("Non-array data will result in an error.")}},[t("b-form-input",{attrs:{id:"inputData",type:"text",placeholder:e.$t("Request Variable Name")},on:{input:e.changeInputData},model:{value:e.inputData,callback:function(t){e.inputData=t},expression:"inputData"}})],1):e._e(),"sequential_mi"===e.loopType?t("b-form-group",{attrs:{id:"group-exit-condition",label:e.$t("Exit Condition"),"label-for":"exit-condition",description:e.$t("When the FEEL Expression evaluates to true then exit the loop")}},[t("b-form-textarea",{attrs:{id:"exit-condition",placeholder:e.$t("FEEL Syntax")},on:{input:e.changeCompletionCondition},model:{value:e.completionCondition,callback:function(t){e.completionCondition=t},expression:"completionCondition"}})],1):e._e(),t("b-form-group",{attrs:{id:"group-outputData",label:e.$t("Output Data Variable"),"label-for":"outputData",description:e.$t("Specifies the output request data variable array, which will be produced as a result of the multi-instance.")}},[t("b-form-input",{attrs:{id:"outputData",type:"text",placeholder:e.$t("Request Variable Name")},on:{input:e.changeOutputData},model:{value:e.outputData,callback:function(t){e.outputData=t},expression:"outputData"}})],1)]:e._e()],2)},ep=[],tp={props:{value:{type:Object,default:function(){return{loopCharacteristics:null,ioSpecification:null}}}},name:"LoopCharacteristics",data:function(){return{loopOptions:[{text:this.$t("No Loop Mode"),value:"no_loop"},{text:this.$t("Loop"),value:"loop"},{text:this.$t("Multi-Instance (Parallel)"),value:"parallel_mi"},{text:this.$t("Multi-Instance (Sequential)"),value:"sequential_mi"}],showAdvanced:!1,previous:{loopCardinality:"3",completionCondition:null,inputData:null,outputData:null,inputDataItem:null},local:{loopCharacteristics:{$type:null,isSequential:!1},loopMaximum:0,loopCondition:null,ioSpecification:{dataInputs:[]}},loopType:null,multiType:null,loopCardinality:null,completionCondition:null,inputData:null,inputDataItem:null,outputData:null,outputDataItem:null,loopMaximum:0,loopCondition:null}},mounted:function(){this.loadData()},watch:{value:{deep:!0,handler:function(e){Object(ft["isEqual"])(this.local,e)||this.loadData()}}},methods:{changeLoopMaximum:function(e){this.setLoopMaximum(e),this.saveData()},changeLoopCondition:function(){this.setLoopCondition(this.loopCondition),this.saveData()},changeLoopType:function(e){this.setLoopCharacteristics(e),this.saveData()},changeMultiType:function(e){this.setMultiType(e),this.saveData()},changeLoopCardinality:function(e){this.setLoopCardinality(e),this.saveData()},changeCompletionCondition:function(e){this.setCompletionCondition(e),this.saveData()},changeInputData:function(e){this.setLoopDataInputRef(e),this.saveData()},changeInputDataItem:function(e){this.setInputDataItem(e),this.saveData()},changeOutputData:function(e){this.setLoopDataOutputRef(e),this.saveData()},changeOutputDataItem:function(e){this.setOutputDataItem(e),this.saveData()},loadData:function(){this.$set(this,"local",Object(ft["cloneDeep"])(this.value)),this.loopType=this.getLoopCharacteristics(),this.multiType=this.getMultiType(),this.loopCardinality=this.getLoopCardinality(),this.completionCondition=this.getCompletionCondition(),this.inputData=this.getLoopDataInputRef(),this.inputDataItem=this.getInputDataItem(),this.outputData=this.getLoopDataOutputRef(),this.outputDataItem=this.getOutputDataItem(),this.previous.inputData=this.inputData,this.previous.outputData=this.outputData,this.previous.loopCardinality=this.loopCardinality,this.completionCondition=this.completionCondition,this.loopMaximum=this.getLoopMaximum(),this.loopCondition=this.getLoopCondition()},saveData:function(){Object(ft["isEqual"])(this.local,this.value)||this.$emit("input",Object(ft["cloneDeep"])(this.local))},getOutputDataItem:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.outputDataItem?this.local.loopCharacteristics.outputDataItem.name:null},setOutputDataItem:function(e){this.local.loopCharacteristics.outputDataItem={$type:"bpmn:DataInput",isCollection:!0,name:e}},getLoopDataOutputRef:function(){var e;return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopDataOutputRef?null===(e=this.local.ioSpecification)||void 0===e?void 0:e.dataOutputs[0].name:null},setLoopDataOutputRef:function(e){this.local.ioSpecification||this.initIoSpecification();var t=this.local.ioSpecification.dataOutputs[0]||{$type:"bpmn:DataOutput",id:"".concat(this.local.id,"_output_1"),isCollection:!0,name:e};t.name=e,this.local.ioSpecification.dataOutputs=[t],this.local.ioSpecification.outputSets[0].dataOutputRefs=[t.id],this.local.loopCharacteristics.loopDataOutputRef=t.id},getInputDataItem:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.inputDataItem?this.local.loopCharacteristics.inputDataItem.name:null},setInputDataItem:function(e){this.local.loopCharacteristics.inputDataItem={$type:"bpmn:DataInput",isCollection:!0,name:e}},getLoopDataInputRef:function(){var e;return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopDataInputRef?null===(e=this.local.ioSpecification)||void 0===e?void 0:e.dataInputs[0].name:null},setLoopDataInputRef:function(e){var t={$type:"bpmn:DataInput",id:"".concat(this.local.id,"_input_1"),isCollection:!0,name:e};this.local.ioSpecification||this.initIoSpecification(),this.local.ioSpecification.dataInputs=[t],this.local.ioSpecification.inputSets[0].dataInputRefs=[t.id],this.local.loopCharacteristics.loopDataInputRef=t.id},initIoSpecification:function(){this.local.ioSpecification={$type:"bpmn:InputOutputSpecification",dataInputs:[],dataOutputs:[],inputSets:[{$type:"bpmn:InputSet",dataInputRefs:[]}],outputSets:[{$type:"bpmn:OutputSet",dataOutputRefs:[]}]}},getLoopCardinality:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopCardinality?this.local.loopCharacteristics.loopCardinality.body:null},getCompletionCondition:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.completionCondition?this.local.loopCharacteristics.completionCondition.body:null},setLoopCardinality:function(e){this.local.loopCharacteristics.loopCardinality={$type:"bpmn:Expression",body:e}},setCompletionCondition:function(e){this.local.loopCharacteristics.completionCondition={$type:"bpmn:Expression",body:e}},getMultiType:function(){return this.local.loopCharacteristics?void 0!==this.local.loopCharacteristics.loopCardinality?"loopCardinality":"inputData":null},setMultiType:function(e){"loopCardinality"===e?(this.local.loopCharacteristics.loopCardinality={$type:"bpmn:Expression",body:this.previous.loopCardinality||"3"},this.local.loopCharacteristics.completionCondition={$type:"bpmn:Expression",body:this.previous.completionCondition||""},this.previous.inputData=this.inputData,this.previous.outputData=this.outputData,this.previous.inputDataItem=this.inputDataItem,delete this.local.loopCharacteristics.loopDataInputRef,delete this.local.loopCharacteristics.inputDataItem,this.setLoopDataOutputRef(this.previous.outputData||"output_array_".concat(this.local.id))):(this.previous.loopCardinality=this.loopCardinality,this.previous.completionCondition=this.completionCondition,this.previous.outputData=this.outputData,delete this.local.loopCharacteristics.loopCardinality,delete this.local.loopCharacteristics.completionCondition,this.local.loopCharacteristics.loopDataInputRef="",this.setLoopDataInputRef(this.previous.inputData||"source_array"),this.setLoopDataOutputRef(this.previous.outputData||"output_array_".concat(this.local.id)),this.setInputDataItem(this.previous.inputDataItem||"")),this.loopCardinality=this.getLoopCardinality(),this.completionCondition=this.getCompletionCondition(),this.inputData=this.getLoopDataInputRef(),this.outputData=this.getLoopDataOutputRef()},getLoopCharacteristics:function(){return this.local.loopCharacteristics?"bpmn:StandardLoopCharacteristics"===this.local.loopCharacteristics.$type?"loop":"bpmn:MultiInstanceLoopCharacteristics"===this.local.loopCharacteristics.$type?this.local.loopCharacteristics.isSequential?"sequential_mi":"parallel_mi":"no_loop":"no_loop"},setLoopCharacteristics:function(e){switch(this.local.loopCharacteristics||(this.local.loopCharacteristics={}),e){case"no_loop":this.local.loopCharacteristics=void 0;break;case"loop":this.local.loopCharacteristics.$type="bpmn:StandardLoopCharacteristics";break;case"parallel_mi":this.local.loopCharacteristics.$type="bpmn:MultiInstanceLoopCharacteristics",this.local.loopCharacteristics.isSequential=!1,this.multiType||(this.multiType="inputData");break;case"sequential_mi":this.local.loopCharacteristics.$type="bpmn:MultiInstanceLoopCharacteristics",this.local.loopCharacteristics.isSequential=!0,this.multiType||(this.multiType="inputData");break}},setLoopMaximum:function(e){e||(e=null),this.local.loopCharacteristics.loopMaximum=e},getLoopMaximum:function(){return this.local.loopCharacteristics?this.local.loopCharacteristics.loopMaximum:null},setLoopCondition:function(e){this.local.loopCharacteristics.loopCondition={$type:"bpmn:Expression",body:e}},getLoopCondition:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopCondition?this.local.loopCharacteristics.loopCondition.body:null}}},np=tp,op=ut(np,Qu,ep,!1,null,null,null),ip=op.exports;n("cca6"),n("7039");function rp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ap(e,t,n){rp(e,t),t.set(e,n)}function sp(e,t){return t.get?t.get.call(e):t.value}function cp(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function lp(e,t){var n=cp(e,t,"get");return sp(e,n)}function dp(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}function up(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}function pp(e,t,n){return dp(e,t),up(n,"get"),sp(e,n)}function hp(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function fp(e,t,n,o){return dp(e,t),up(n,"set"),hp(e,n,o),o}n("4d63"),n("c607"),n("2c3e"),n("25f0"),n("10d1");var mp=new WeakMap,gp=new WeakMap,vp=new WeakMap,bp=function(){function e(t){Ut(this,e),ap(this,mp,{writable:!0,value:function(){var t,n=e.prefix+pp(e,e,yp);return fp(e,e,yp,(t=pp(e,e,yp),t++,t)),n}}),ap(this,gp,{writable:!0,value:function(){var t,n=e.prefix+pp(e,e,wp)+"_di";return fp(e,e,wp,(t=pp(e,e,wp),t++,t)),n}}),ap(this,vp,{writable:!0,value:function(){var t,n=e.processPrefix+pp(e,e,xp);return fp(e,e,xp,(t=pp(e,e,xp),t++,t)),n}}),this.definitions=t,this.refreshLastIdCounter(),this.refreshLastDiagramIdCounter(),this.refreshLastProcessIdCounter()}return Wt(e,[{key:"findById",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.definitions.rootElements,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!(o.indexOf(n)>-1)){var i;if(n instanceof Array)o.push(n),n.find((function(n){return i=t.findById(e,n,o)}));else if(n instanceof Object&&n.$type){if(o.push(n),n.id===e)return n;Object.getOwnPropertyNames(n).find((function(r){return i=!(n[r]instanceof Function)&&"$"!==r.substring(0,1)&&t.findById(e,n[r],o)}))}return i}}},{key:"matchIds",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(o.indexOf(t)>-1)return i;if(t instanceof Array)o.push(t),t.forEach((function(t){return i=n.matchIds(e,t,o,i)}));else if(t instanceof Object){if(o.push(t),t.id){var r=String(t.id).match(e),a=r?parseInt(r[1]):0;a>i&&(i=a)}Object.getOwnPropertyNames(t).forEach((function(r){t[r]instanceof Function||"$"===r.substring(0,1)||(i=n.matchIds(e,t[r],o,i))}))}return i}},{key:"refreshLastIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.prefix,"(\\d+)$")),this.definitions.rootElements);fp(e,e,yp,t+1)}},{key:"getCounter",value:function(){return this.refreshLastIdCounter(),pp(e,e,yp)}},{key:"refreshLastDiagramIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.prefix,"(\\d+)_di$")),this.definitions.diagrams);fp(e,e,wp,t+1)}},{key:"refreshLastProcessIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.processPrefix,"(\\d+)$")),this.definitions.rootElements);fp(e,e,xp,t+1)}},{key:"generate",value:function(){var e=lp(this,mp).call(this),t=lp(this,gp).call(this);return[e,t]}},{key:"generateProcessId",value:function(){return lp(this,vp).call(this)}}]),e}();U(bp,"prefix","node_"),U(bp,"processPrefix","Process_");var yp={writable:!0,value:1},wp={writable:!0,value:1},xp={writable:!0,value:1},kp=null;function Cp(e){return kp||(kp=new bp(e)),kp}var Sp=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ut(this,e),this.index=window.NODE_INSPECTOR_FIRST_INDEX||(new Date).getTime(),this.definitions=t,this.nodeIdGenerator=Cp(this.definitions),this.options=Object.assign({prefix:this.nodeIdGenerator.generate()[0]},n),this.createdModdleNodes={}}return Wt(e,[{key:"getDefinitionProps",value:function(e){var t=this;return e instanceof Array?e.map((function(e){return t.getDefinitionProps(e)})):e instanceof Object?Object.getOwnPropertyNames(e).reduce((function(n,o){if(e[o]instanceof Function)return n;var i="Ref"===o.substr(o.length-3)||"Refs"===o.substr(o.length-4);return e[o]instanceof Object&&e[o].id&&i?n[o]=Object&&e[o].id:e[o]instanceof Array&&i?n[o]=e[o].filter((function(e){return e})).map((function(e){return e.id})):("$type"===o||"$"!==o.substr(0,1)&&"__"!==o.substr(0,2))&&(n[o]=t.getDefinitionProps(e[o])),n}),{}):e}},{key:"setDefinitionProps",value:function(e,t,n,o,i){var r=this;if(void 0!==e){if(e instanceof Array)e=e.map((function(e){return r.setDefinitionProps(e,t,n)}));else if(e instanceof Object)try{e=Object.keys(ia()(e,"$type","$config","markerFlags")).reduce((function(o,i){var a=r.setDefinitionProps(e[i],t,n,void 0,i);return null!==a&&void 0!==a?o[i]=a:void 0===a&&delete o[i],o}),o||this.createModdleNode(n,e))}catch(a){throw'Unable to create moddle node of type "'.concat(e.$type,'" \n ').concat(a)}return o&&void 0!==i&&void 0!==e&&null!==e&&(o[i]=e),e}}},{key:"createModdleNode",value:function(e,t){var n=e.create(t.$type,{id:this.generateId()});return t.id&&(this.createdModdleNodes[t.id]=n),n}},{key:"setReferences",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(void 0!==e)return this.isReference(n)?e=e instanceof Array?e.map((function(e){return t.findReference(e)})):this.findReference(e):e instanceof Array?e=e.map((function(e){return t.setReferences(e,null)})):e instanceof Object&&Object.keys(ia()(e,"$type","$config","markerFlags")).forEach((function(n){e[n]=t.setReferences(e[n],n)})),e}},{key:"isReference",value:function(e){return!!e&&("Ref"===e.substr(e.length-3)||"Refs"===e.substr(e.length-4))}},{key:"findReference",value:function(e){return this.createdModdleNodes[e]||this.findById(e)}},{key:"generateId",value:function(){return this.index++,"".concat(this.options.prefix,"_").concat(this.index)}},{key:"findById",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.definitions.rootElements,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!(o.indexOf(n)>-1)){var i;if(n instanceof Array)o.push(n),n.find((function(n){return i=t.findById(e,n,o)}));else if(n instanceof Object&&n.$type){if(o.push(n),n.id===e)return n;Object.getOwnPropertyNames(n).find((function(r){return i=!(n[r]instanceof Function)&&t.findById(e,n[r],o)}))}return i}}}]),e}(),Ep=function(e,t,n,o,i){var r=new Sp(i,{prefix:"".concat(t.definition.id,"_inner")}),a=r.setDefinitionProps(e.$loopCharactetistics,n,o,{});return a=r.setReferences(a),a.loopCharacteristics?(delete t.definition.loopCharacteristics,n(t,"loopCharacteristics",a.loopCharacteristics)):(t.definition.loopCharacteristics=null,delete t.definition.loopCharacteristics),a.ioSpecification?(delete t.definition.ioSpecification,n(t,"ioSpecification",a.ioSpecification)):delete t.definition.ioSpecification,ia()(e,["$loopCharactetistics"])},Ap=function(e,t,n,o){var i=o.definitions,r=new Sp(i);e.$loopCharactetistics=r.getDefinitionProps({id:t.definition.id,loopCharacteristics:t.definition.loopCharacteristics,ioSpecification:t.definition.ioSpecification}),delete e.loopCharacteristics,delete e.ioSpecification},Mp={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Loop Activity",icon:"redo",name:"loop-characteristics-accordion"},items:[{component:ip,name:"LoopCharactetistics",config:{name:"$loopCharactetistics"}}]},Tp="processmaker-modeler-task",Pp={id:"processmaker-modeler-task",component:Fu,bpmnType:["bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:SubProcess"],control:!0,category:"BPMN",rank:40,icon:n("9fb7"),label:"Task",items:[{icon:n("9fb7"),label:"Form Task",control:!0,rank:41,id:"processmaker-modeler-task"},{icon:n("4709"),label:"Manual Task",control:!0,rank:42,id:"processmaker-modeler-manual-task"},{icon:n("4a29"),label:"Script Task",control:!0,rank:43,id:"processmaker-modeler-script-task"},{icon:n("443d"),label:"Sub Process",control:!0,rank:44,id:"processmaker-modeler-call-activity"}],definition:function(e,t){return e.create("bpmn:Task",{name:t(Jt[Tp]),assignment:"requester"})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:fu,width:mu})})},inspectorHandler:function(e,t,n,o,i,r){_p(e.markerFlags,t,n,o),Ep(e,t,n,o,i),r(ia()(e,"markerFlags","$loopCharactetistics"))},inspectorData:function(e,t,n){var o=t(e);return Ap(o,e,t,n),o.markerFlags={isForCompensation:o.isForCompensation},delete o.isForCompensation,o},inspectorConfig:[{name:Jt[Tp],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-task"},items:[{component:"FormInput",config:Ar}]},Mp,qr,Ju]}],loopCharacteristicsHandler:Ep,loopCharacteristicsData:Ap};function _p(e,t,n){if(e){var o=t.definition.get("isForCompensation"),i=e.isForCompensation;null!=i&&i!==o&&n(t,"isForCompensation",i)}}var Op,Dp,Ip=Vt(Vt({},Pp),{},{component:Gu}),Np=(n("e9c4"),function(){var e=this,t=e._self._c;return t("div",[t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"boundary-event-dropdown-data":e.boundaryEventDropdownData,"dropdown-data":e.dropdownData,showCustomIconPicker:!0,iconName:this.iconName},on:{"set-custom-icon-name":e.setCustomIconName,"reset-custom-icon-name":e.resetCustomIconName}},e.$listeners)),t("b-modal",{ref:"subprocess-modal",attrs:{title:"Previewing '".concat(e.subprocessName,"'")},scopedSlots:e._u([{key:"modal-footer",fn:function(){return[t("a",{attrs:{href:e.subprocessLink,target:"_blank","data-test":"modal-process-link"}},[e._v(" Open subprocess in new window "),t("i",{staticClass:"ml-1 fas fa-external-link-alt"})])]},proxy:!0}])},[e.subProcessSvg?t("div",{staticClass:"text-center",domProps:{innerHTML:e._s(e.subProcessSvg)}}):e.failedToLoadPreview?t("div",[e._v("Could not load preview")]):t("div",[t("i",{staticClass:"fas fa-spinner fa-spin"}),e._v(" Loading process preview...")])]),t("b-modal",{ref:"no-subprocess-modal",attrs:{title:"No subprocess selected","hide-footer":!0}},[e._v(" Please select a subprocess to view it. ")])],1)}),Rp=[],jp=n("582a"),Lp=n.n(jp),Bp=15,Fp=2*Zi,zp='<svg version="1.1"\n baseProfile="full"\n width="16" height="16"\n xmlns="http://www.w3.org/2000/svg"></svg>',Hp={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","paperManager"],mixins:[wr,he,hr,Bi,Zr,gu],data:function(){return{subProcessSvg:null,failedToLoadPreview:!1,boundaryEventDropdownData:yu,dropdownData:[{label:Jt["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:Jt["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:Jt["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:Jt["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],nodeIcon:zp,iconName:"",anchorPointFunction:ke}},computed:{subprocessId:function(){return JSON.parse(this.node.definition.get("config")).processId},subprocessLink:function(){return"/modeler/".concat(this.subprocessId)},subprocessName:function(){return this.node.definition.get("name")}},watch:{"node.definition.name":function(e){var t=this.node.diagram.bounds.width;this.shape.attr("label/text",d["util"].breakText(e,{width:t}));var n=this.shapeView.selectors.label.getBBox().height,o=this.shape.size(),i=o.height;if(n+Bp+Fp!==i){var r=Math.max(n+Bp+Fp,fu);this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment()}},"node.definition.config":function(e){ze.commit("updateNodeProp",{node:this.node,key:"config",value:e}),this.$emit("save-state")},"node.definition.callActivityType":function(e){this.shape.attr("image/display","globalTask"===e?"none":"initial")},"node.definition.loopCharacteristics":function(){Tu(this.node.definition,this.markers,this.$set,this.$delete)}},methods:{clickSubprocess:function(e,t){var n=this,o="bottomCenter.0"===t.target.getAttribute("joint-selector"),i=e.model===this.shape;o&&i&&(this.subprocessId?(this.$refs["subprocess-modal"].show(),this.subProcessSvg=null,this.failedToLoadPreview=!1,window.ProcessMaker.apiClient.get("/processes/".concat(this.subprocessId),{params:{include:"svg"}}).then((function(e){var t=e.data;if(t.svg){var o=function(e){return e.replace('<svg width="100%"',"<svg ")},i=function(e){return e.replace("<svg ",'<svg class="border border-dark"')};n.subProcessSvg=i(o(t.svg))}else n.failedToLoadPreview=!0})).catch((function(){n.failedToLoadPreview=!0}))):this.$refs["no-subprocess-modal"].show())}},mounted:function(){this.shape=new hu,this.$set(this.markers.bottomCenter,"subprocess",Lp.a);var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),Tu(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8,strokeWidth:4},label:{text:d["util"].breakText(this.node.definition.get("name"),{width:e.width}),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this,this.paperManager.addEventHandler("element:pointerclick",this.clickSubprocess),this.node.definition.get("customIcon")&&this.setCustomIcon(this.node.definition.get("customIcon"))}},qp=Hp,Vp=ut(qp,Np,Rp,!1,null,null,null),Up=Vp.exports,Gp=function(){var e=this,t=e._self._c;return t("div",[t("form-multi-select",{staticClass:"p-0 mb-2",attrs:{label:e.$t("Process"),name:"Process",helper:e.$t("Select which Process this element calls"),showLabels:!1,"allow-empty":!1,options:e.processList,loading:e.loading,optionContent:"name",validation:e.validation,searchable:!0,"internal-search":!1,"preserve-search":!1,"clear-on-select":!1},on:{"search-change":e.searchChange},model:{value:e.selectedProcess,callback:function(t){e.selectedProcess=t},expression:"selectedProcess"}}),e.selectedProcess?t("form-multi-select",{staticClass:"p-0 mb-2",attrs:{label:e.$t("Start Event"),name:"StartEvent",disabled:0===e.startEventList.length,"allow-empty":!1,showLabels:!1,options:e.startEventList,optionContent:"name",validation:"required"},model:{value:e.selectedStartEvent,callback:function(t){e.selectedStartEvent=t},expression:"selectedStartEvent"}}):e._e(),e.selectedProcess?t("a",{attrs:{href:"/modeler/".concat(e.selectedProcess.id),target:"_blank"}},[e._v(" "+e._s(e.$t("Open Process"))+" "),t("i",{staticClass:"ml-1 fas fa-external-link-alt"})]):e._e()],1)},Wp=[],$p=n("a8fc"),Xp=n.n($p),Yp={data:function(){return{selectedProcess:null,selectedStartEvent:null,config:{},name:"",loading:!1,processes:[],selectedProcessInfo:null,validation:""}},inheritAttrs:!1,props:["value"],computed:{processList:function(){var e=this,t=this.filterValidProcesses(this.processes)||[];return this.selectedProcessInfo&&!t.find((function(t){return t.id===e.selectedProcessInfo.id}))&&t.push(this.selectedProcessInfo),t},startEventList:function(){return this.selectedProcess?this.filterValidStartEvents(this.selectedProcess.events):[]},currentProcessId:function(){var e=window.location.href.match(/modeler\/(\d+)/);return e&&e[1]?parseInt(e[1]):null}},watch:{selectedProcess:function(){this.loading||(this.startEventList.length>0?this.selectedStartEvent=this.startEventList[0]:this.selectedStartEvent=null)},selectedStartEvent:function(){this.loading||this.setBpmnValues()},processList:function(){this.loadBpmnValues()},value:{handler:function(){this.config=JSON.parse(this.value),this.loadSelectedProcessInfo()},immediate:!0}},methods:{searchChange:function(e){this.loadProcessesDebounced(e)},filterValidProcesses:function(e){var t=this;return e.filter((function(e){return t.filterValidStartEvents(e.events).length>0})).filter((function(e){return e.id!==t.currentProcessId}))},filterValidStartEvents:function(e){return e.filter((function(e){if(e.eventDefinitions&&e.eventDefinitions.length>0)return!1;if(e.config)try{var t=JSON.parse(e.config);if(t.web_entry)return!1}catch(n){return!1}return!0}))},loadBpmnValues:function(){var e=this;this.config.processId&&this.config.startEvent&&(this.loading=!0,this.name=this.config.name,this.selectedProcess=this.processList.find((function(t){return t.id===e.config.processId})),this.selectedStartEvent=this.startEventList.find((function(t){return t.id===e.config.startEvent})),this.$nextTick((function(){e.selectedProcess||(e.validation="required"),e.loading=!1})))},setBpmnValues:function(){if(this.selectedProcess&&this.selectedStartEvent){var e=this.selectedProcess.name;this.startEventList.length>1&&(e+=" (".concat(this.selectedStartEvent.name,")"));var t={calledElement:"".concat(this.selectedStartEvent.ownerProcessId,"-").concat(this.selectedProcess.id),processId:this.selectedProcess.id,startEvent:this.selectedStartEvent.id,name:e},n=JSON.stringify(t);this.$emit("input",n)}},containsMultipleProcesses:function(e){return Xp()(e.events,"ownerProcessId").length>1},loadProcesses:function(e){var t=this;this.loading=!0;var n={order_direction:"asc",per_page:20,include:"events,category",filter_without_assignments:!0};e&&(n.filter=e),window.ProcessMaker.apiClient.get("processes",{params:n}).then((function(e){t.loading=!1,t.processes=e.data.data})).catch((function(){t.loading=!1}))},loadSelectedProcessInfo:function(){var e=this;this.config.processId&&window.ProcessMaker.apiClient.get("processes/"+this.config.processId,{params:{include:"events,category",filter_without_assignments:!0}}).then((function(t){e.selectedProcessInfo=t.data}))}},created:function(){var e=this;this.validation=this.config.processId?"":"required",this.loadProcessesDebounced=S()((function(t){e.loadProcesses(t)}),500),0===this.processList.length?this.loadProcesses():this.loadBpmnValues()}},Zp=Yp,Kp=ut(Zp,Gp,Wp,!1,null,null,null),Jp=Kp.exports,Qp="processmaker-modeler-call-activity",eh={id:Qp,component:Up,bpmnType:"bpmn:CallActivity",control:!1,category:"BPMN",icon:n("2005"),label:Jt[Qp],definition:function(e,t){return e.create("bpmn:CallActivity",{name:t(Jt[Qp]),calledElement:"",config:"{}",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:fu,width:mu})})},inspectorHandler:function(e,t,n){n(t,"id",e.id),n(t,"name",e.name);var o=JSON.parse(e.config);e["calledElement"]=o.calledElement,n(t,"calledElement",o.calledElement),o.name!==e.name&&(o.name=e.name),n(t,"config",JSON.stringify(o))},inspectorConfig:[{name:Jt[Qp],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-subprocess"},items:[{component:"FormInput",config:Ar},{component:Jp,config:{name:"config"}}]},qr,Ir]}]},th=n("345e"),nh=n.n(th),oh={extends:Fu,mixins:[Zr],data:function(){return{nodeIcon:nh.a,iconName:""}}},ih=oh,rh=ut(ih,Op,Dp,!1,null,null,null),ah=rh.exports,sh="processmaker-modeler-script-task",ch={id:sh,component:ah,bpmnType:"bpmn:ScriptTask",control:!1,category:"BPMN",icon:n("c3c6"),label:Jt[sh],definition:function(e,t){return e.create("bpmn:ScriptTask",{name:t(Jt[sh]),scriptRef:null,loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:fu,width:mu})})},inspectorConfig:[{name:Jt[sh],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-script-task"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},lh=Vt(Vt({},Pp),{},{id:"processmaker-modeler-service-task",bpmnType:["bpmn:ServiceTask","bpmn:SendTask","bpmn:ReceiveTask"],control:!1,label:"Service Task",definition:function(e,t){return e.create("bpmn:ServiceTask",{name:t("Service Task")})},inspectorConfig:[{name:"Service Task",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-service-task"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]}),dh=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},uh=[],ph=160,hh={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","paperManager","collaboration","processNode","planeElements","isRendering"],mixins:[wr,he],data:function(){return{shape:null,definition:null,nodeWidth:10}},watch:{"node.definition.text":function(e){this.updateNodeText(e)}},methods:{getLabelHeight:function(e){return this.shape.findView(this.paperManager.paper).selectors.label.getBBox().height+e},calculateNewHeight:function(e,t,n){var o=3,i=15,r=this.getLabelHeight(i);return r!==e?r-o:0===t.length?n-o:e-o},updateNodeText:function(e){var t=this,n=this.shape.findView(this.paperManager.paper).getBBox(),o=n.height,i="25 ".concat(o," 3 ").concat(o," 3 3 25 3"),r=this.node.diagram.bounds;this.shape.position(r.x,r.y),this.shape.attr({body:{refPoints:i},label:{text:d["util"].breakText(e,{width:ph}),textAnchor:"left"}}),this.paperManager.awaitScheduledUpdates().then((function(){t.shape.resize(t.nodeWidth,t.calculateNewHeight(o,e,r.height)),t.setShapeHighlight()}))}},mounted:function(){var e=this.node.diagram.bounds;this.shape=new d["shapes"].standard.Polyline,this.shape.set("type","textAnnotation"),this.shape.position(e.x,e.y),this.shape.resize(this.nodeWidth,e.height),this.shape.attr({body:{refPoints:"25 10 3 10 3 3 25 3",fill:"none"},label:{fill:"black",yAlignment:"left",xAlignment:"left",refX:"5",refY:"5"}}),this.shape.addTo(this.graph),this.shape.component=this,this.updateNodeText(this.node.definition.get("text"))}},fh=hh,mh=ut(fh,dh,uh,!1,null,null,null),gh=mh.exports,vh="processmaker-modeler-text-annotation",bh={id:vh,component:gh,bpmnType:"bpmn:TextAnnotation",control:!0,category:"BPMN",icon:n("2ba8"),label:"Text Annotation",rank:70,definition:function(e,t){return e.create("bpmn:TextAnnotation",{text:t("Text Annotation")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:30,width:150})})},validateIncoming:function(){return!1},validateAssociationIncoming:function(){return!1},inspectorConfig:[{name:"Text Annotation",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-text-annotation"},items:[{component:"FormInput",config:{label:"Text to Show",helper:"Body of the text annotation",name:"text",placeholder:"Text Annotation"}}]},qr,Ir]}]},yh=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners),[t("add-lane-above-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"crown-config__icon",attrs:{title:e.$t("Lane Above")},on:{click:e.addLaneAbove}}),t("add-lane-below-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"crown-config__icon",attrs:{title:e.$t("Lane Below")},on:{click:e.addLaneBelow}})],1)},wh=[],xh=n("26a2"),kh=n.n(xh),Ch=30,Sh=200,Eh=300,Ah=20,Mh=300,Th=100,Ph={props:["highlighted","paper","processNode","planeElements","moddle"],data:function(){return{anchorPoints:[],isResizing:!0,pointWidth:15,pointHeight:15,elementBounds:[],elementTopY:null,elementRightX:null,elementBottomY:null,elementLeftX:null}},watch:{highlighted:function(e){0!==this.anchorPoints.length&&(e?(!1===ze.getters.isReadOnly&&this.addResizeAnchors(),this.calculateElementLimits(),this.updateAnchorPointPosition()):this.removeResizeAnchors())}},computed:{poolComponent:function(){return k()(this,"node.pool.component",this)},isLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{calculateElementLimits:function(){this.elementBounds=this.poolComponent.shape.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type!==rs&&"processmaker-modeler-message-flow"!==e.component.node.type})).map((function(e){return e.getBBox()})),this.elementTopY=Math.min.apply(Math,g(this.elementBounds.map((function(e){var t=e.y;return t-Ah})))),this.elementBottomY=Math.max.apply(Math,g(this.elementBounds.map((function(e){var t=e.y,n=e.height;return t+n+Ah})))),this.elementRightX=Math.max.apply(Math,g(this.elementBounds.map((function(e){var t=e.x,n=e.width;return t+n+Ah})))),this.elementLeftX=Math.min.apply(Math,g(this.elementBounds.map((function(e){var t=e.x;return t-Ah}))))},configureResize:function(){var e=this;this.shape.listenTo(this.paper,"element:pointerup",(function(t){t.model.component&&t.model.component===e&&e.calculateElementLimits()}));var t=new d["shapes"].standard.EmbeddedImage,n=new d["shapes"].standard.EmbeddedImage,o=new d["shapes"].standard.EmbeddedImage,i=new d["shapes"].standard.EmbeddedImage;this.anchorPoints=[t,n,o,i];var r=this.shape.getBBox(),a=r.x,s=r.y,c=r.width,l=r.height;this.anchorPoints.forEach((function(e){e.set("isDrag",!0),e.set("previousPosition",e.position())})),this.highlighted&&this.addResizeAnchors(),this.setPointAttributes(t,"nwse-resize","bottom-right-resize-button"),this.setPointAttributes(n,"nesw-resize","bottom-left-resize-button"),this.setPointAttributes(o,"nesw-resize","top-right-resize-button"),this.setPointAttributes(i,"nwse-resize","top-left-resize-button"),t.position(a+c,s+l),n.position(a-this.pointWidth,s+l),o.position(a+c,s-this.pointHeight),i.position(a-this.pointWidth,s-this.pointHeight),t.listenTo(this.paper,"element:pointerdown",(function(n){n.model===t&&(t.on("change:position",e.resizeBottomRight),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){t.off("change:position",e.resizeBottomRight),e.resizeUpdate()})))})),n.listenTo(this.paper,"element:pointerdown",(function(t){t.model===n&&(n.on("change:position",e.resizeBottomLeft),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){n.off("change:position",e.resizeBottomLeft),e.resizeUpdate()})))})),o.listenTo(this.paper,"element:pointerdown",(function(t){t.model===o&&(o.on("change:position",e.resizeTopRight),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){o.off("change:position",e.resizeTopRight),e.resizeUpdate()})))})),i.listenTo(this.paper,"element:pointerdown",(function(t){t.model===i&&(i.on("change:position",e.resizeTopLeft),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){i.off("change:position",e.resizeTopLeft),e.resizeUpdate()})))}))},fixResizeRounding:function(){var e=this.poolComponent.shape.getBBox(),t=e.x,n=e.y,o=e.width,i=e.height;this.poolComponent.shape.resize(Math.round(o),Math.round(i)),this.poolComponent.shape.position(Math.round(t),Math.round(n))},resizeUpdate:function(){this.fixResizeRounding();var e=this.shape.getBBox(),t=e.width,n=e.height,o=this.node.diagram.bounds;t===o.width&&n===o.height||(this.poolComponent.laneSet&&(this.poolComponent.updateLaneChildren(),this.poolComponent.sortedLanes().forEach((function(e){ze.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),ze.commit("updateNodeBounds",{node:this.poolComponent.node,bounds:this.poolComponent.shape.getBBox()}),this.$emit("save-state"))},resizeTopLeft:function(e,t,n){if(n.ui){var o="top-left",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var a=this.poolComponent.shape.getBBox(),s=a.x,c=a.y,l=a.width,d=a.height,u=this.shape.getBBox(),p=u.x,h=u.y,f=u.width,m=u.height,g=this.poolComponent.sortedLanes(),v=g.slice(1).reduce((function(e,t){return e+t.getBBox().height}),Th),b=Math.max(s+l-(i+this.pointWidth),s+l-this.elementLeftX+Ch,Eh),y=Math.max(c+d-(r+this.pointWidth),c+d-this.elementTopY,this.poolComponent.laneSet?v:Sh),w=Math.max(p+f-(i+this.pointWidth),p+f-this.elementLeftX+Ah+Ch,Mh),x=Math.max(h+m-(r+this.pointHeight),Th);if(this.isLane)if(this.shape===g[0]){var k=Math.max(s+l-(i+this.pointWidth)+Ch,s+l-this.elementLeftX+Ch,Eh);this.poolComponent.shape.resize(k,y,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes()}else{var C=g[g.indexOf(this.shape)-1];this.shape.resize(w,Math.min(h+m-(C.getBBox().y+Th),x),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else e.set("previousPosition",{x:i,y:r}),this.shape.resize(b,y,{direction:o}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeTopRight:function(e,t,n){if(n.ui){var o="top-right",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var a=this.poolComponent.shape.getBBox(),s=a.x,c=a.y,l=a.height,d=this.shape.getBBox(),u=d.x,p=d.y,h=d.height,f=this.poolComponent.sortedLanes(),m=f.slice(1).reduce((function(e,t){return e+t.getBBox().height}),Th),g=Math.max(i-s,this.elementRightX-s,Eh),v=Math.max(c+l-(r+this.pointWidth),c+l-this.elementTopY,this.poolComponent.laneSet?m:Sh),b=Math.max(i-u,this.elementRightX-u,Mh),y=Math.max(p+h-(r+this.pointHeight),Th);if(this.isLane)if(this.shape===f[0])this.poolComponent.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes();else{var w=f[f.indexOf(this.shape)-1];this.shape.resize(b,Math.min(p+h-(w.getBBox().y+Th),y),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeBottomLeft:function(e,t,n){if(n.ui){var o="bottom-left",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var a=this.poolComponent.shape.getBBox(),s=a.x,c=a.y,l=a.width,d=this.shape.getBBox(),u=d.x,p=d.y,h=d.width,f=this.poolComponent.sortedLanes(),m=f.slice(0,f.length-1).reduce((function(e,t){return e+t.getBBox().height}),Th),g=Math.max(s+l-(i+this.pointWidth),s+l-this.elementLeftX+Ch,Eh),v=Math.max(r-c,this.elementBottomY-c,this.poolComponent.laneSet?m:Sh),b=Math.max(u+h-(i+this.pointWidth),u+h-this.elementLeftX+Ah+Ch,Mh),y=Math.max(r-p,Th);if(this.isLane)if(this.shape===f[f.length-1]){var w=Math.max(s+l-(i+this.pointWidth)+Ch,s+l-this.elementLeftX+Ch,Eh);this.poolComponent.shape.resize(w,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes()}else{var x=f[f.indexOf(this.shape)+1];this.shape.resize(b,Math.min(x.getBBox().y+x.getBBox().height-Th-p,y),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeBottomRight:function(e,t,n){if(n.ui){var o="bottom-right",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var a=this.poolComponent.shape.getBBox(),s=a.x,c=a.y,l=this.shape.getBBox(),d=l.x,u=l.y,p=this.poolComponent.sortedLanes(),h=p.slice(0,p.length-1).reduce((function(e,t){return e+t.getBBox().height}),Th),f=Math.max(i-s,this.elementRightX-s,Eh),m=Math.max(r-c,this.elementBottomY-c,this.poolComponent.laneSet?h:Sh),g=Math.max(i-d,this.elementRightX-d,Mh),v=Math.max(r-u,Th);if(this.isLane)if(this.shape===p[p.length-1])this.poolComponent.shape.resize(f,m,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes();else{var b=p[p.indexOf(this.shape)+1];this.shape.resize(g,Math.min(b.getBBox().y+b.getBBox().height-Th-u,v),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(f,m,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},addResizeAnchors:function(){var e=this;this.anchorPoints.forEach((function(t){try{e.shape.embed(t)}catch(n){}t.addTo(e.graph),t.toFront()}))},removeResizeAnchors:function(){this.anchorPoints.forEach((function(e){e.remove()}))},updateAnchorPointPosition:function(e){if(0!==this.anchorPoints.length){var t=this.shape.getBBox(),n=t.x,o=t.y,i=t.width,r=t.height;0!==e&&this.anchorPoints[0].position(n+i,o+r),1!==e&&this.anchorPoints[1].position(n-this.pointWidth,o+r),2!==e&&this.anchorPoints[2].position(n+i,o-this.pointHeight),3!==e&&this.anchorPoints[3].position(n-this.pointWidth,o-this.pointWidth)}},setPointAttributes:function(e,t,n){e.attr({body:{fill:"#fff",stroke:" #fff",opacity:.8},image:{xlinkHref:kh.a,cursor:t,buttonId:n,refWidth:20,refHeight:20,resetOffset:!0}})}},mounted:function(){var e=this;this.$nextTick((function(){e.configureResize()}))}},_h=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Oh=[],Dh={components:{CrownConfig:Mi},props:["graph","node","nodes","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,Ph],data:function(){return{shape:null,definition:null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new d["shapes"].standard.Rectangle,this.shape.set("type","PoolLane");var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.set("elementMove",!1),this.shape.attr("body/cursor","default"),this.shape.attr("body",{fill:B}),this.shape.attr("label",{text:d["util"].breakText(this.node.definition.get("name"),{width:e.height}),fill:"black",transform:"rotate(-90)",refX:Ch/2}),this.shape.component=this,this.shape.addTo(this.graph),this.planeElements.includes(this.node.diagram)||this.planeElements.push(this.node.diagram)},beforeDestroy:function(){var e=this.node.pool.component,t=e.laneSet.get("lanes");if(ki()(t,this.node.definition),0===t.length)return e.containingProcess.set("laneSets",[]),void(e.laneSet=null)}},Ih=Dh,Nh=ut(Ih,_h,Oh,!1,null,null,null),Rh=Nh.exports,jh={id:rs,component:Rh,bpmnType:"bpmn:Lane",control:!1,category:"BPMN",label:"Lane",definition:function(e){return e.create("bpmn:Lane",{name:""})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:150,width:600,x:null,y:null})})},inspectorConfig:[{name:"Lane",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-pool-lane"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Lh=function(){var e=this,t=e._self._c;return t("crown-button",e._g({attrs:{id:"lane-above-button","aria-label":"Add lane above icon",width:25}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-lane-above"]}})],1)},Bh=[],Fh=n("b6e5"),zh=n.n(Fh),Hh={components:{CrownButton:ht,FontAwesomeIcon:xn["FontAwesomeIcon"]},data:function(){return{laneAboveIcon:zh.a}},created:function(){cn["library"].add(un)}},qh=Hh,Vh=ut(qh,Lh,Bh,!1,null,null,null),Uh=Vh.exports,Gh=function(){var e=this,t=e._self._c;return t("crown-button",e._g({attrs:{id:"lane-below-button","aria-label":"Add lane below icon",width:25}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-lane-below"]}})],1)},Wh=[],$h=n("0424"),Xh=n.n($h),Yh={components:{CrownButton:ht,FontAwesomeIcon:xn["FontAwesomeIcon"]},data:function(){return{laneBelowIcon:Xh.a}},created:function(){cn["library"].add(pn)}},Zh=Yh,Kh=ut(Zh,Gh,Wh,!1,null,null,null),Jh=Kh.exports,Qh=d["shapes"].standard.Rectangle.define("processmaker.modeler.bpmn.pool",{markup:[].concat(g(d["shapes"].standard.Rectangle.prototype.markup),[{tagName:"polyline",selector:"polyline"}]),attrs:{label:{fill:"black",transform:"rotate(-90)",refX:Ch/2},polyline:{refPointsKeepOffset:"".concat(Ch,",0 ").concat(Ch,",200"),stroke:"#000",fill:"#fff",strokeWidth:2}}}),ef=Qh,tf=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},nf=[],of={inheritAttrs:!1,components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,Bi,he],data:function(){return{shape:null,definition:null,dropdownData:[]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new d["shapes"].standard.Path,this.shape.attr("root/title","joint.shapes.standard.Path"),this.shape.attr("label",{refY:65,text:this.node.definition.get("name"),fill:"black"}),this.shape.attr("body",{refD:"M1,1 L25,1 L35,10 L35,49 L1,49 L1,1 M24,1 L24,10 L35,10"});var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.addTo(this.graph),this.shape.component=this}},rf=of,af=ut(rf,tf,nf,!1,null,null,null),sf=af.exports,cf="processmaker-modeler-data-object",lf={id:cf,component:sf,bpmnType:"bpmn:DataObjectReference",control:!0,category:"BPMN",icon:n("82c7"),label:Jt[cf],rank:80,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataObjectReference",{name:t(Jt[cf])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:36})})},inspectorConfig:[{name:Jt[cf],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-object"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},df=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},uf=[],pf=d["shapes"].standard.Cylinder.extend({markup:[].concat(g(d["shapes"].standard.Cylinder.prototype.markup),[{tagName:"ellipse",selector:"thirdLine"},{tagName:"ellipse",selector:"secondLine"},{tagName:"ellipse",selector:"firstLine"}]),defaults:d["util"].deepSupplement({attrs:{thirdLine:{refCx:"50%",refRx:"50%",cy:20,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},secondLine:{refCx:"50%",refRx:"50%",cy:15,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},firstLine:{refCx:"50%",refRx:"50%",cy:10,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},label:{refY:50,fill:"#000"}}},d["shapes"].standard.Cylinder.prototype.defaults)}),hf={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[wr,Bi,he],data:function(){return{shape:null,definition:null,dropdownData:[]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new pf,this.shape.attr("label/text",this.node.definition.get("name"));var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.addTo(this.graph),this.shape.component=this}},ff=hf,mf=ut(ff,df,uf,!1,null,null,null),gf=mf.exports,vf="processmaker-modeler-data-store",bf={id:vf,component:gf,bpmnType:"bpmn:DataStoreReference",control:!0,category:"BPMN",icon:n("44ad2"),label:Jt[vf],rank:90,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataStoreReference",{name:t(Jt[vf])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:50})})},inspectorConfig:[{name:Jt[vf],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-store"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]};function yf(e,t){var n=new ef,o=e.diagram.bounds;return n.position(o.x,o.y),n.resize(o.width,o.height),n.attr("label/text",d["util"].breakText(e.definition.get("name"),{width:o.width})),n.attr("body",{fill:B}),n.addTo(t),n}function wf(e,t){e.getElements().filter((function(e){return e!==t})).filter((function(e){var t=e.component;return!t.node.isBpmnType("bpmn:BoundaryEvent")})).forEach((function(e){var n=e.component;t.embed(n.shape),n.node.pool=t}))}function xf(e,t){e.fitEmbeds({padding:Ah+Ch}),e.resize(e.getBBox().width-Ch,e.getBBox().height-Ch),e.resize(e.getBBox().width,e.getBBox().height-Ch,{direction:"top"});var n=e.get("size"),o=n.width,i=n.height,r=t.diagram.bounds;e.resize(Math.max(o,r.width),Math.max(i,r.height))}function kf(e,t,n){var o=yf(t,n);return e||(wf(n,o),xf(o,t)),o}function Cf(e){return e.component&&e.component.node.type!==rs&&e.component.node.type!==vh&&e.component.node.type!==cf&&e.component.node.type!==vf}var Sf={components:{CrownConfig:Mi,AddLaneAboveButton:Uh,AddLaneBelowButton:Jh},props:["graph","node","nodes","id","collaboration","processes","moddle","processNode","rootElements","highlighted","nodeRegistry","paper","planeElements","isRendering","paperManager","nodeIdGenerator"],mixins:[wr,Ph,he],data:function(){return{shape:null,definition:null,laneSet:null,isAddingLaneAbove:!1,anchorPointFunction:Ce(20)}},computed:{containingProcess:function(){var e=this;return this.node.definition.get("processRef")?this.processes.find((function(t){return t.id===e.node.definition.get("processRef").id})):null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},methods:{addLaneAbove:function(){this.isAddingLaneAbove=!0,this.addLane()},addLaneBelow:function(){this.isAddingLaneAbove=!1,this.addLane()},sortedLanes:function(){return this.shape.getEmbeddedCells().filter((function(e){var t=e.component;return t&&t.node.type===rs})).sort((function(e,t){return e.position().y-t.position().y}))},getElementsUnderArea:function(e,t){var n=e.getBBox(),o=n.x,i=n.y,r=n.width,a=n.height,s={x:o,y:i,width:r,height:a};return t.findModelsInArea(s)},moveEmbeddedElements:function(e,t){var n=this;this.getElementsUnderArea(e,this.graph).filter((function(t){return t.isEmbeddedIn(e)})).forEach((function(e){e.component.node.pool=t,ki()(n.containingProcess.get("flowElements"),e.component.node.definition),t.component.containingProcess.get("flowElements").push(e.component.node.definition)}))},moveFlow:function(e,t){var n=e.component.node.definition;ki()(this.containingProcess.get("flowElements"),n),t.component.containingProcess.get("flowElements").push(n)},moveElement:function(e,t){var n=e.component.node.definition;if(this.laneSet){var o=this.laneSet.get("lanes").find((function(e){return e.get("flowNodeRef").includes(n)}));ki()(o.get("flowNodeRef"),n)}ki()(this.containingProcess.get("flowElements"),n),t.component.containingProcess.get("flowElements").push(n),this.moveEmbeddedElements(e,t),e.component.node.pool=t,this.shape.unembed(e),t.component.addToPool(e)},addLane:function(){var e=this;return w(b().mark((function t(){var n,o;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=[],e.laneSet||(e.createLaneSet(),o=jh.definition(e.moddle,e.$t),e.shape.getEmbeddedCells().filter((function(e){return Cf(e)})).forEach((function(e){o.get("flowNodeRef").push(e.component.node.definition)})),n.push(e.pushNewLane(o))),n.push(e.pushNewLane()),t.next=5,Promise.all(n);case 5:e.$emit("set-shape-stacking",e.shape),e.graph.getLinks().forEach((function(t){e.$emit("set-shape-stacking",t)})),e.$emit("save-state");case 8:case"end":return t.stop()}}),t)})))()},createLaneSet:function(){var e=this.moddle.create("bpmn:LaneSet");this.laneSet=e;var t=this.nodeIdGenerator,n=t.generate(),o=_e(n,1),i=o[0];this.laneSet.set("id",i),this.containingProcess.get("laneSets").push(e)},pushNewLane:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jh.definition(this.moddle,this.$t);e.set("color",this.node.definition.get("color")),this.$emit("set-pool-target",this.shape);var t=jh.diagram(this.moddle);return t.bounds.width=this.shape.getBBox().width,this.$emit("add-node",new an(jh.id,e,t)),this.$nextTick()},addToPool:function(e){e.component.node.isBpmnType("bpmn:BoundaryEvent")||(this.shape.unembed(e),this.shape.embed(e),this.expandToFitElement(e,this.shape),e.component.node.type!==rs&&this.laneSet&&this.updateLaneChildren())},positionAndSizeLane:function(e,t){var n=t.getBBox(),o=n.width,i=n.height,r=e.component.node.diagram.bounds;if(!r.x||!r.y){var a=1===t.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type===rs})).length,s=a?i:r.height;e.resize(o-Ch,s),e.position(Ch,a?0:this.isAddingLaneAbove?-s:i,{parentRelative:!0}),t.resize(o,a?i:i+s,{direction:this.isAddingLaneAbove?"top-right":"bottom-right"}),this.fixResizeRounding(),this.updateAnchorPointPosition();var c=e.position(),l=c.x,d=c.y;r.set("x",l),r.set("y",d),r.set("width",e.get("size").width),r.set("height",e.get("size").height),ze.commit("updateNodeBounds",{node:this.node,bounds:t.getBBox()})}},expandToFitElement:function(e,t){if(e.component.node.type!==ws){var n=t.getBBox(),o=n.x,i=n.y,r=n.width,a=n.height;if(e.component.node.type!==rs){var s=e.get("size"),c=s.width,l=s.height,d=e.position(),u=d.x,p=d.y,h=u-o,f=p-i,m=h+c,g=h,v=f,b=f+l,y=0,w=0,x="bottom",k="right";m>r-Ah&&(y=m+Ah),g<Ch+Ah&&(y=r+(Ch+Ah-g),k="left"),v<Ah&&(w=Ah-v+a,x="top"),b>a-Ah&&(w=b+Ah),(y||w)&&(t.resize(Math.max(y,r),Math.max(w,a),{direction:"".concat(x,"-").concat(k)}),this.fixResizeRounding(),this.updateAnchorPointPosition(),this.laneSet&&(this.resizeLanes(),this.sortedLanes().forEach((function(e){ze.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),ze.commit("updateNodeBounds",{node:this.node,bounds:t.getBBox()}),this.$emit("save-state"))}else this.positionAndSizeLane(e,t)}},fillLanes:function(e,t,n){var o,i=this.shape.get("size").height,r=this.sortedLanes().reduce((function(e,t){return e+t.getBBox().height}),0),a=n?e.get("size").height:i-r;switch(t){case"top-right":o="bottom-right";break;case"top-left":o="bottom-left";break;case"bottom-right":o="top-right";break;case"bottom-left":o="top-left";break}var s=this.sortedLanes().indexOf(e),c=e.getBBox(),l=c.width,d=this.sortedLanes()[s+(t.includes("top")?-1:1)];d.resize(l,d.getBBox().height+a,{direction:o}),this.shape.resize(l+Ch,i,{direction:o}),this.sortedLanes().forEach((function(e){return e.resize(l,e.getBBox().height,{direction:o})}))},resizeLanes:function(){var e=this;this.sortedLanes().forEach((function(t,n,o){var i=e.shape.get("size"),r=i.width,a=i.height,s=t.get("size"),c=s.height,l=t.position({parentRelative:!0}),d=l.y,u=c,p=d;if(0===n&&(u=c+t.position({parentRelative:!0}).y,p=0),n===o.length-1){var h=a-(t.position({parentRelative:!0}).y+c);u=c+h}t.resize(r-Ch,u),t.position(Ch,p,{parentRelative:!0})}))},captureChildren:function(){var e=this;this.graph.getElements().filter((function(t){var n=t.component;return n&&n!==e})).forEach((function(t){var n=t.component;n.node.isBpmnType("bpmn:BoundaryEvent")||(e.shape.embed(n.shape),n.node.pool=e.shape)})),this.$emit("set-shape-stacking",this.shape),this.resizePool(this.shape)},fitEmbeds:function(){this.shape.fitEmbeds({padding:Ah+Ch}),this.shape.resize(this.shape.getBBox().width-Ch,this.shape.getBBox().height-Ch),this.shape.resize(this.shape.getBBox().width,this.shape.getBBox().height-Ch,{direction:"top"})},resizePool:function(e){var t=this;this.fitEmbeds();var n=this.shape.get("size"),o=n.width,i=n.height,r=this.node.diagram.bounds;this.shape.resize(Math.max(o,r.width),Math.max(i,r.height)),this.shape.getEmbeddedCells().forEach((function(n){t.expandToFitElement(n,e)}));var a=this.shape.position(),s=a.x,c=a.y,l=this.shape.get("size"),d=l.width,u=l.height;this.node.diagram.bounds.x=s,this.node.diagram.bounds.y=c,this.node.diagram.bounds.width=d,this.node.diagram.bounds.height=u},updateLaneChildren:function(){var e=this,t={};this.shape.getEmbeddedCells().filter((function(t){return Cf(t)&&t.component.node.pool===e.shape})).forEach((function(n){var o=e.graph.findModelsUnderElement(n,{searchBy:"center"}).find((function(e){return e.component&&e.component.node.type===rs}));t[o.id]?t[o.id].push(n.component.node.definition):t[o.id]=[n.component.node.definition]})),this.sortedLanes().forEach((function(e){var n=t[e.id],o=e.component.node.definition.get("flowNodeRef"),i=n?n.length!==o.length:o.length>0;i&&ze.commit("updateNodeProp",{node:e.component.node,key:"flowNodeRef",value:n||[]})}))},hasPools:function(){return this.collaboration.get("participants").length>0},setPoolSize:function(e){var t=this;e.getEmbeddedCells().forEach((function(n){t.expandToFitElement(n,e)}));var n=e.position(),o=n.x,i=n.y,r=e.get("size"),a=r.width,s=r.height;this.node.diagram.bounds.x=o,this.node.diagram.bounds.y=i,this.node.diagram.bounds.width=a,this.node.diagram.bounds.height=s}},mounted:function(){this.$emit("set-pools",this.node.definition),this.laneSet=this.containingProcess.get("laneSets")[0],this.shape=kf(this.collaboration,this.node,this.graph),this.shape.component=this,this.collaboration||this.captureChildren(),this.setPoolSize(this.shape),this.$emit("set-shape-stacking",this.shape)},beforeDestroy:function(){var e=this.collaboration.get("participants");ki()(e,this.node.definition),this.hasPools()?ki()(this.rootElements,this.containingProcess):this.$emit("unset-pools")},created:function(){this.$t=this.$t.bind(this)}},Ef=Sf,Af=ut(Ef,yh,wh,!1,null,null,null),Mf=Af.exports,Tf={id:Un,component:Mf,bpmnType:"bpmn:Participant",control:!0,category:"BPMN",icon:n("cc6d"),label:"Pool",rank:60,definition:function(e,t){return e.create("bpmn:Participant",{name:t("Pool")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:300,width:600})})},inspectorConfig:[{name:"Pool",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-pool"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Pf=function(){var e=this,t=e._self._c;return t("b-card-footer",{staticClass:"p-0 border-0 statusbar d-flex align-items-center justify-content-end pr-3 pl-3 border-top"},[e._t("default"),t("b-btn",{staticClass:"mr-auto",attrs:{disabled:!e.xmlManager,variant:"secondary",size:"sm","data-test":"downloadXMLBtn"},on:{click:function(t){e.xmlManager&&e.xmlManager.download()}}},[t("i",{staticClass:"fas fa-download mr-1"}),e._v(" "+e._s(e.$t("Download BPMN"))+" ")]),t("div",{staticClass:"status-bar-container d-flex align-items-center justify-content-end"},[e.autoValidate?[0===e.numberOfProblemsToDisplay?t("button",{staticClass:"btn btn-light",attrs:{type:"button","data-test":"validation-list-valid",disabled:!0}},[e._v(" "+e._s(e.$t("BPMN Valid"))+" "),t("span",{staticClass:"badge badge-success badge-pill"},[t("font-awesome-icon",{attrs:{icon:e.faCheck}})],1)]):t("button",{staticClass:"btn btn-light",attrs:{type:"button","data-test":"validation-list-toggle"},on:{click:function(t){e.shouldDisplayProblemsPanel=!e.shouldDisplayProblemsPanel}}},[e._v(" "+e._s(e.$t("BPMN Issues"))+" "),t("span",{staticClass:"badge badge-primary badge-pill"},[e._v(" "+e._s(e.numberOfProblemsToDisplay)+" ")]),t("font-awesome-icon",{staticClass:"ml-3",attrs:{icon:e.chevronIcon}})],1)]:e._e(),t("span",{staticClass:"divider"}),t("b-form-checkbox",{staticClass:"h-100 d-flex align-items-center",attrs:{"data-test":"validation-toggle",switch:""},model:{value:e.autoValidate,callback:function(t){e.autoValidate=t},expression:"autoValidate"}},[e._v(" "+e._s(e.$t("Auto validate"))+" ")]),t("transition",{attrs:{name:"slide"}},[e.isProblemsPanelDisplayed?t("div",{staticClass:"validation-container position-absolute text-left"},[t("dl",{staticClass:"validation-container__list align-items-baseline",attrs:{"data-test":"validation-list"}},[e._l(e.errorList,(function(n,o){return[t("dt",{key:"".concat(n.errorId,"_").concat(o),staticClass:"text-capitalize"},[t("font-awesome-icon",{staticClass:"status-bar-container__status-icon ml-1 mr-1 mt-1",style:{color:e.isErrorCategory(n)?e.errorColor:e.warningColor},attrs:{icon:e.isErrorCategory(n)?e.faTimesCircle:e.faExclamationTriangle}}),e._v(" "+e._s(n.errorKey)+" ")],1),t("dd",{key:"".concat(n.errorId,"_").concat(o,"_dd")},[t("p",{staticClass:"pl-4 mb-0 font-italic"},[e._v(e._s(n.message)+".")]),n.id?t("p",{staticClass:"pl-4 mb-0"},[t("span",{staticClass:"font-weight-bold"},[e._v(e._s(e.$t("Node ID"))+":")]),e._v(" "+e._s(n.id))]):e._e()])]})),e._l(e.warnings,(function(n,o){return[t("dt",{key:n.title+o,staticClass:"text-capitalize"},[t("font-awesome-icon",{staticClass:"status-bar-container__status-icon ml-1 mr-1 mt-1",style:{color:e.warningColor},attrs:{icon:e.faExclamationTriangle}}),e._v(" "+e._s(n.title)+" ")],1),t("dd",{key:n.title+o+"__dd",staticClass:"font-italic pl-4"},[e._v(e._s(n.text))])]}))],2)]):e._e()])],2)],2)},_f=[];n("5db7"),n("73d9");function Of(e){return Object.entries(e).flatMap((function(e){var t=_e(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return Vt(Vt({},e),{},{errorKey:n},{errorId:"".concat(e.id,"_").concat(e.message.split(" ").join("_"))})}))}))}var Df={components:{FontAwesomeIcon:xn["FontAwesomeIcon"]},props:["validationErrors","warnings","xmlManager"],data:function(){return{shouldDisplayProblemsPanel:!1,errorColor:"#D9534F",warningColor:"#F0AD4E",faExclamationTriangle:oi["faExclamationTriangle"],faTimesCircle:oi["faTimesCircle"],faChevronUp:oi["faChevronUp"],faChevronDown:oi["faChevronDown"],faCheck:oi["faCheck"]}},computed:{autoValidate:{get:function(){return ze.getters.autoValidate},set:function(e){ze.commit("setAutoValidate",e)}},errorList:function(){return Of(this.validationErrors)},numberOfProblemsToDisplay:function(){return this.errorList.length+this.warnings.length},isProblemsPanelDisplayed:function(){return this.shouldDisplayProblemsPanel&&this.numberOfProblemsToDisplay>0&&this.autoValidate},chevronIcon:function(){return this.shouldDisplayProblemsPanel?oi["faChevronUp"]:oi["faChevronDown"]}},methods:{isErrorCategory:function(e){return"error"===e.category}}},If=Df,Nf=(n("2dba"),ut(If,Pf,_f,!1,null,"1ad192c7",null)),Rf=Nf.exports,jf=function(){var e=this,t=e._self._c;return t("span",{attrs:{"data-test":"body-container"}},[e.showComponent?t("tool-bar",{attrs:{"canvas-drag-position":e.canvasDragPosition,cursor:e.cursor,"is-rendering":e.isRendering,"paper-manager":e.paperManager,"breadcrumb-data":e.breadcrumbData,panelsCompressed:e.panelsCompressed,"validation-errors":e.validationErrors,warnings:e.allWarnings,"xml-manager":e.xmlManager,validationBar:e.validationBar},on:{"load-xml":e.loadXML,"toggle-panels-compressed":function(t){e.panelsCompressed=!e.panelsCompressed},"toggle-mini-map-open":function(t){e.miniMapOpen=t},saveBpmn:e.saveBpmn,publishTemplate:e.publishTemplate,publishPmBlock:e.publishPmBlock,close:e.close,"save-state":e.pushToUndoStack,clearSelection:e.clearSelection}}):e._e(),t("b-row",{staticClass:"modeler h-100"},[e.tooltipTarget?t("b-tooltip",{key:e.tooltipTarget.id,attrs:{target:e.getTooltipTarget,title:e.tooltipTitle}}):e._e(),e.showComponent?t("explorer-rail",{attrs:{"node-types":e.nodeTypes,"pm-block-nodes":e.pmBlockNodes},on:{"set-cursor":function(t){e.cursor=t},onCreateElement:e.onCreateElementHandler}}):e._e(),t("b-col",{ref:"paper-container",staticClass:"paper-container h-100 pr-4",class:[e.cursor,{"grabbing-cursor":e.isGrabbing}],style:{width:e.parentWidth,height:e.parentHeight}},[t("div",{ref:"paper",staticClass:"main-paper",attrs:{"data-test":"paper"}})]),e.showComponent?t("InspectorButton",{attrs:{showInspector:e.isOpenInspector},on:{toggleInspector:e.handleToggleInspector}}):e._e(),e.showComponent?t("InspectorPanel",{directives:[{name:"show",rawName:"v-show",value:e.isOpenInspector&&!(e.highlightedNodes.length>1),expression:"isOpenInspector && !(highlightedNodes.length > 1)"}],ref:"inspector-panel",staticClass:"inspector h-100",style:{height:e.parentHeight},attrs:{nodeRegistry:e.nodeRegistry,moddle:e.moddle,definitions:e.definitions,processNode:e.processNode,"parent-height":e.parentHeight,"canvas-drag-position":e.canvasDragPosition},on:{"save-state":e.pushToUndoStack,"shape-resize":function(t){return e.shapeResize(!1)},toggleInspector:e.handleToggleInspector}}):e._e(),e._l(e.nodes,(function(n){return t(n.type,{key:n._modelerId,ref:"nodeComponent",refInFor:!0,tag:"component",attrs:{graph:e.graph,paper:e.paper,node:n,id:n.id,highlighted:e.highlightedNodes.includes(n),"has-error":e.invalidNodes.includes(n),"border-outline":e.borderOutline(n.id),collaboration:e.collaboration,"process-node":e.processNode,processes:e.processes,"plane-elements":e.planeElements,moddle:e.moddle,nodeRegistry:e.nodeRegistry,"root-elements":e.definitions.get("rootElements"),isRendering:e.isRendering,paperManager:e.paperManager,"auto-validate":e.autoValidate,"node-id-generator":e.nodeIdGenerator,"is-active":n===e.activeNode,"is-completed":e.requestCompletedNodes.includes(n.definition.id),"is-in-progress":e.requestInProgressNodes.includes(n.definition.id),"is-idle":e.requestIdleNodes.includes(n.definition.id)},on:{"add-node":e.addNode,"remove-node":e.removeNode,"set-cursor":function(t){e.cursor=t},"set-pool-target":function(t){e.poolTarget=t},"unset-pools":e.unsetPools,clearSelection:e.clearSelection,"set-pools":e.setPools,"save-state":e.pushToUndoStack,"set-shape-stacking":e.setShapeStacking,setTooltip:function(t){e.tooltipTarget=t},"replace-node":e.replaceNode,"replace-generic-flow":e.replaceGenericFlow,"copy-element":e.copyElement,"copy-selection":e.copyElement,"paste-element":e.pasteElements,"clone-element":e.cloneElement,"clone-selection":e.cloneSelection,"default-flow":e.toggleDefaultFlow,"shape-resize":e.shapeResize}})})),t("RailBottom",{attrs:{nodeTypes:e.nodeTypes,"paper-manager":e.paperManager,graph:e.graph,"is-rendering":e.isRendering},on:{"load-xml":e.loadXML,clearSelection:e.clearSelection,"set-cursor":function(t){e.cursor=t},onCreateElement:e.onCreateElementHandler}}),e.paper?t("selection",{ref:"selector",attrs:{graph:e.graph,paperManager:e.paperManager,useModelGeometry:!1,processNode:e.processNode},on:{"clone-selection":e.cloneSelection,"remove-nodes":e.removeNodes,"save-state":e.pushToUndoStack}}):e._e()],2)],1)},Lf=[],Bf=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Ff=[],zf=d["shapes"].standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"}],defaults:d["util"].deepSupplement({type:"processmaker.components.nodes.boundaryEvent.Shape",size:{width:36,height:36},attrs:{label:{refY:"130%"},body:{stroke:"#212529",strokeWidth:.85,fill:"#FFF"},body2:{cx:18,cy:18,r:15,strokeWidth:.85,stroke:"#212529",fill:"#FFF"},image:{refX:5,refY:5,ref:"circle",width:26,height:26}}},d["shapes"].standard.Circle.prototype.defaults)}),Hf={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","isActive"],mixins:[wr,he,Bi],data:function(){return{shape:null,previousPosition:null,validPosition:null,invalidTargetElement:null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)},"node.definition.cancelActivity":function(e){this.toggleInterruptingStyle(e)}},methods:{getTaskUnderShape:function(){return this.graph.findModelsUnderElement(this.shape).find((function(e){return Po(e.component)}))},setShapeBorderDashSpacing:function(e){this.shape.attr({body:{strokeDasharray:e},body2:{strokeDasharray:e}})},setSolidShapeBorder:function(){var e=0;this.setShapeBorderDashSpacing(e)},setDashedShapeBorder:function(){var e=5;this.setShapeBorderDashSpacing(e)},toggleInterruptingStyle:function(){this.node.definition.cancelActivity?this.setSolidShapeBorder():this.setDashedShapeBorder()},setShapeProperties:function(){var e=this.node.diagram.bounds,t=e.x,n=e.y,o=e.width,i=e.height;this.shape.position(t,n),this.shape.resize(o,i),this.shape.attr("label/text",this.node.definition.get("name")),this.shape.component=this},hasPositionChanged:function(){if(!this.previousPosition)return!0;var e=this.shape.position(),t=e.x,n=e.y,o=this.previousPosition,i=o.x,r=o.y;return t!==i||n!==r},getCenterPosition:function(){var e=this.shape.position(),t=e.x,n=e.y,o=this.shape.size(),i=o.width,r=o.height;return{x:t+i/2,y:n+r/2}},updateShapePosition:function(e){if(this.hasPositionChanged()){var t=we(this.getCenterPosition(),e),n=t.x,o=t.y,i=this.shape.size(),r=i.width,a=i.height;this.shape.position(n-r/2,o-a/2),this.previousPosition=this.shape.position()}},attachBoundaryEventToTask:function(e){if(e){var t=this.shape.getParentCell();t&&t.unembed(this.shape),e.embed(this.shape),this.node.definition.set("attachedToRef",e.component.node.definition)}},resetToInitialPosition:function(){this.shape.position(this.validPosition.x,this.validPosition.y),ze.commit("allowSavingElementPosition"),this.$emit("shape-resize")},moveBoundaryEventIfOverTask:function(){var e=this.getTaskUnderShape();_o(this.node.type,e)?(this.attachBoundaryEventToTask(e),this.updateShapePosition(e),this.$emit("shape-resize")):this.resetToInitialPosition()},resetInvalidTarget:function(){this.invalidTargetElement&&(Ae(this.invalidTargetElement),this.invalidTargetElement=null,this.$emit("shape-resize"))},attachToValidTarget:function(e){var t=this;e.model===this.shape&&(ze.commit("preventSavingElementPosition"),this.validPosition=this.shape.position(),this.shape.listenToOnce(this.paper,"cell:pointerup blank:pointerup",(function(){t.moveBoundaryEventIfOverTask(),t.resetInvalidTarget(),ze.commit("allowSavingElementPosition")})))},turnInvalidTargetRed:function(){if(this.isActive){var e=this.graph.findModelsUnderElement(this.shape).filter((function(e){return e.component}))[0],t=this.invalidTargetElement===e;if(!t){var n=this.shape.getParentCell();e&&e!==n&&!_o(this.node.type,e)&&e.attr("body/fill",P),this.invalidTargetElement&&Ae(this.invalidTargetElement),this.invalidTargetElement=e}}}},mounted:function(){var e=this;return w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.shape=new zf,e.setShapeProperties(),e.shape.addTo(e.graph),t.next=5,e.$nextTick();case 5:e.toggleInterruptingStyle(),n=e.getTaskUnderShape(),e.attachBoundaryEventToTask(n),e.updateShapePosition(n);case 9:case"end":return t.stop()}}),t)})))()}},qf=Hf,Vf=ut(qf,Bf,Ff,!1,null,null,null),Uf=Vf.exports,Gf={id:"processmaker-modeler-boundary-event",component:Uf,bpmnType:"bpmn:BoundaryEvent",control:!0,category:"BPMN",label:"Boundary Event",definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Event"),cancelActivity:!0})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},validateIncoming:function(){return!1},inspectorConfig:[{name:"Boundary Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-boundary-event"},items:[{component:"FormInput",config:Ar}]}]}]},Wf=n("f2e1"),$f=n.n(Wf),Xf=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.explorerOpen,expression:"explorerOpen"}],attrs:{id:"explorer-rail","data-test":"explorer-rail"}},[t("div",{staticClass:"rail-menu"},[t("b-tabs",{staticClass:"tabs--container",attrs:{"no-nav-style":!0}},[e._l(e.tabs,(function(n){return[t("b-tab",{key:n.idx,attrs:{title:e.$t(n.label),active:n.idx===e.tabIndex},on:{click:function(t){return e.setTabIndex(n.idx)}}})]}))],2),t("div",{staticClass:"close--container",on:{click:function(t){return e.closeRail()}}},[t("font-awesome-icon",{attrs:{icon:e.faTimes()}})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:0===e.tabIndex,expression:"tabIndex === 0"}],staticClass:"node-types__container"},[t("filter-node-types",{attrs:{type:"object"}}),t("node-types-loop",e._g({},e.$listeners))],1),t("div",{directives:[{name:"show",rawName:"v-show",value:1===e.tabIndex,expression:"tabIndex === 1"}],staticClass:"pm-blocks__container"},[t("filter-node-types",{attrs:{type:"pmBlock"}}),t("pm-blocks-loop",e._g({},e.$listeners))],1)])},Yf=[],Zf=5e3;De.a.use(Ie["a"]);var Kf=new Ie["a"].Store({state:{nodeTypes:[],pinnedNodeTypes:[],filteredNodeTypes:[],pmBlockNodeTypes:[],filteredPmBlockNodeTypes:[],explorerOpen:!1,searchTerm:"",selectedNode:null,ghostNode:null},getters:{getNodeTypes:function(e){return e.nodeTypes},getPinnedNodeTypes:function(e){return e.pinnedNodeTypes},getFilteredNodeTypes:function(e){return e.filteredNodeTypes},getExplorerOpen:function(e){return e.explorerOpen},getSearchTerm:function(e){return e.searchTerm},getPmBlockNodeTypes:function(e){return e.pmBlockNodeTypes},getFilteredPmBlockNodeTypes:function(e){return e.filteredPmBlockNodeTypes},getSelectedNode:function(e){return e.selectedNode},getGhostNode:function(e){return e.ghostNode}},mutations:{setNodeTypes:function(e,t){e.nodeTypes=t.filter((function(e){return e.control})).map((function(e){var t;return{id:Object(ft["uniqueId"])("nodeType_"),type:e.id,icon:e.icon,label:e.label,bpmnType:e.bpmnType,rank:e.rank||Zf,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return Vt(Vt({},e),{},{type:e.id})}))}})).sort((function(e,t){return e.rank-t.rank}))},setPinnedNodes:function(e,t){e.pinnedNodeTypes.push(t),e.pinnedNodeTypes=Object(ft["uniqBy"])(e.pinnedNodeTypes,"type"),e.pinnedNodeTypes.sort((function(e,t){return e.rank-t.rank}))},setUnpinNode:function(e,t){e.pinnedNodeTypes=e.pinnedNodeTypes.filter((function(e){return e!==t}))},setFilteredNodeTypes:function(e,t){var n=e.pinnedNodeTypes,o=e.nodeTypes;e.searchTerm=t;var i=Object(ft["uniqBy"])([].concat(g(n),g(o)),"id");e.filteredNodeTypes=i.filter((function(e){return e.label.toLowerCase().includes(t.toLowerCase())}))},setPmBlockNodeTypes:function(e,t){e.pmBlockNodeTypes=t.filter((function(e){return e.control})).map((function(e){var t;return{id:Object(ft["uniqueId"])("pmBlockNode_"),type:e.id,icon:e.icon,customIcon:e.customIcon,svgIcon:e.svgIcon,label:e.label,description:e.description,bpmnType:e.bpmnType,rank:e.rank||Zf,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return Vt(Vt({},e),{},{type:e.id})}))}})).sort((function(e,t){return e.rank-t.rank}))},setFilteredPmBlockNodeTypes:function(e,t){var n=e.pmBlockNodeTypes;e.searchTerm=t;var o=Object(ft["uniqBy"])(g(n),"id");e.filteredPmBlockNodeTypes=o.filter((function(e){return e.label.toLowerCase().includes(t.toLowerCase())}))},clearFilteredNodes:function(e){e.filteredNodeTypes=[],e.searchTerm=""},clearFilteredPmBlockNodes:function(e){e.filteredNodeTypes=[],e.filteredPmBlockNodeTypes=[],e.searchTerm=""},closeExplorer:function(e){e.explorerOpen=!1},toggleExplorer:function(e){e.explorerOpen=!e.explorerOpen},setSelectedNode:function(e,t){e.selectedNode=t},clearSelectedNode:function(e){e.selectedNode=null},setGhostNode:function(e,t){e.ghostNode=t}},actions:{getUserPinnedObjects:function(e){var t=e.commit;if(window.ProcessMaker.user){var n=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.get("/users/".concat(n,"/get_pinnned_controls")).then((function(e){var n=e.data;n.forEach((function(e){t("setPinnedNodes",e)}))})).catch((function(e){console.error(e)}))}else{var o=localStorage.pinnedNodes?JSON.parse(localStorage.pinnedNodes):[];o.forEach((function(e){t("setPinnedNodes",e)}))}},addUserPinnedObject:function(e,t){var n=e.commit,o=e.state;n("setPinnedNodes",t);var i=o.pinnedNodeTypes;if(window.ProcessMaker.user){var r=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.put("/users/".concat(r,"/update_pinned_controls"),{pinnedNodes:i}).catch((function(e){console.error(e)}))}else localStorage.pinnedNodes=JSON.stringify(i)},removeUserPinnedObject:function(e,t){var n=e.commit,o=e.state;n("setUnpinNode",t);var i=o.pinnedNodeTypes;if(window.ProcessMaker.user){var r=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.put("/users/".concat(r,"/update_pinned_controls"),{pinnedNodes:i}).catch((function(e){console.error(e)}))}else localStorage.pinnedNodes=JSON.stringify(i)}}}),Jf=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"searchNodeTypes"}},[t("label",{staticClass:"position-relative d-block"},[t("i",{staticClass:"fas fa-search position-absolute h-100 text-muted ml-2"}),t("b-input",{attrs:{placeholder:e.placeholder},model:{value:e.searchTerm,callback:function(t){e.searchTerm=t},expression:"searchTerm"}})],1)])},Qf=[],em={name:"FilterNodeTypes",props:["type"],data:function(){return{searchTerm:""}},watch:{searchTerm:function(e){"pmBlock"===this.type?(0===e.length&&Kf.commit("clearFilteredPmBlockNodes"),e.length>0&&Kf.commit("setFilteredPmBlockNodeTypes",e)):(0===e.length&&Kf.commit("clearFilteredNodes"),e.length>0&&Kf.commit("setFilteredNodeTypes",e))},type:function(e,t){this.searchTerm=t===e?this.searchTerm:""}},computed:{nodeTypes:function(){var e=Kf.getters.getPinnedNodeTypes,t=Kf.getters.getNodeTypes;return[].concat(g(e),g(t))},pmBlockNodes:function(){var e=Kf.getters.getPmBlockNodeTypes;return g(e)},placeholder:function(){return"pmBlock"===this.type?this.$t("Search PM Blocks"):this.$t("Search Objects")}}},tm=em,nm=(n("d4e3"),ut(tm,Jf,Qf,!1,null,"c468f432",null)),om=nm.exports,im=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"nodeTypesList"}},[e.filteredNodes.length>0?t("div",{attrs:{id:"filteredNodes-container"}},[e._l(e.filteredNodes,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.target!==t.currentTarget?null:e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),e.nodeTypeAlreadyPinned(n,n.type)?t("img",{staticClass:"pinIcon",attrs:{src:e.pinFillIcon,alt:"Unpin Element"},on:{click:function(t){return e.unPin(n)}}}):t("img",{staticClass:"pinIcon",attrs:{src:e.pinIcon,alt:"Pin Element"},on:{click:function(t){return e.addPin(n)}}})])]}))],2):e._e(),0!==e.filteredNodes.length||e.searchTerm?e._e():[e.pinnedObjects.length>0?t("div",{staticClass:"pinnedObjects"},[t("p",[e._v(e._s(e.$t("Pinned Objects")))]),e._l(e.pinnedObjects,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),t("img",{staticClass:"pinIcon",attrs:{src:e.pinFillIcon,alt:"Pin/Unpin Element"},on:{click:function(t){return e.unPin(n)}}})])]}))],2):e._e(),t("div",{staticClass:"objectCategory"},[t("p",[e._v(e._s(e.$t("Object Category")))]),e._l(e.unpinnedObjects,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),t("img",{staticClass:"pinIcon",attrs:{src:e.pinIcon,alt:"Pin/Unpin Element"},on:{click:function(t){return e.addPin(n)}}})])]}))],2)]],2)},rm=[],am=n("71be"),sm=n.n(am),cm=n("1813"),lm=n.n(cm),dm={data:function(){return{wasClicked:!1,selectedSubmenuItem:null,xOffset:0,yOffset:0,helperStyles:{backgroundColor:"#ffffff",position:"absolute",height:"40px",width:"40px",zIndex:"10",opacity:"0.5",pointerEvents:"none"},popperType:null}},methods:{onClickHandler:function(e,t){var n=this;this.createDraggingHelper(e,t),document.addEventListener("mousemove",this.setDraggingPosition),this.setDraggingPosition(e),this.selectedItem&&this.selectedItem.type===t.type?this.deselect():(this.wasClicked=!0,Kf.commit("setSelectedNode",t),this.$emit("onSetCursor","crosshair"),this.parent||(this.popperType=t.type),window.ProcessMaker.EventBus.$on("custom-pointerclick",(function(e){window.ProcessMaker.EventBus.$off("custom-pointerclick"),document.removeEventListener("mousemove",n.setDraggingPosition),n.movedElement&&document.body.removeChild(n.movedElement),n.popperType=null,n.selectedSubmenuItem=null,n.onCreateElement(e),Kf.commit("clearSelectedNode"),Kf.commit("setGhostNode",null),n.$emit("onSetCursor","none")})))},onCreateElement:function(e){this.wasClicked&&this.selectedItem&&(this.parent&&(this.parent=null),this.$emit("onCreateElement",{event:e,control:this.selectedItem}),this.wasClicked=!1,e.preventDefault())},setDraggingPosition:function(e){var t=e.pageX,n=e.pageY,o=this.movedElement;o&&(o.style.left="".concat(t,"px"),o.style.top="".concat(n,"px")),Kf.commit("setGhostNode",o)},createDraggingHelper:function(e,t){var n=this;this.movedElement&&(document.removeEventListener("mousemove",this.setDraggingPosition),document.body.removeChild(this.movedElement),Kf.commit("setGhostNode",null));var o=e.target;Kf.commit("setGhostNode",document.createElement("img"));var i=this.movedElement;Object.keys(this.helperStyles).forEach((function(e){i.style[e]=n.helperStyles[e]})),i.src=t.icon,Kf.commit("setGhostNode",i),document.body.appendChild(this.movedElement),this.xOffset=e.clientX-o.getBoundingClientRect().left,this.yOffset=e.clientY-o.getBoundingClientRect().top},deselect:function(){window.ProcessMaker.EventBus.$off("custom-pointerclick"),document.removeEventListener("mousemove",this.setDraggingPosition),this.movedElement&&document.body.removeChild(this.movedElement),this.$emit("onSetCursor","none"),this.wasClicked=!1,Kf.commit("clearSelectedNode"),Kf.commit("setGhostNode",null)}},computed:{selectedItem:function(){return Kf.getters.getSelectedNode},movedElement:function(){return Kf.getters.getGhostNode}}},um={name:"NodeTypesLoop",mixins:[dm],data:function(){return{pinIcon:sm.a,pinFillIcon:lm.a,showPin:!1}},created:function(){Kf.dispatch("getUserPinnedObjects")},methods:{nodeTypeAlreadyPinned:function(e,t){return!!this.pinnedObjects.find((function(e){return e.type===t}))},unPin:function(e){return this.deselect(),Kf.dispatch("removeUserPinnedObject",e)},addPin:function(e){return this.deselect(),Kf.dispatch("addUserPinnedObject",e)}},computed:{pinnedObjects:function(){return Kf.getters.getPinnedNodeTypes},objects:function(){return Kf.getters.getNodeTypes},unpinnedObjects:function(){var e=this,t=this.objects;return t.filter((function(t){return!e.pinnedObjects.some((function(e){return e.type===t.type}))}))},filteredNodes:function(){return Kf.getters.getFilteredNodeTypes},searchTerm:function(){return Kf.getters.getSearchTerm}}},pm=um,hm=(n("6346"),ut(pm,im,rm,!1,null,null,null)),fm=hm.exports,mm=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"pmBlockNodeTypesList"}},[e.filteredPmBlockNodes.length>0?t("div",{attrs:{id:"filteredPmBlockNodes-container"}},[e._l(e.filteredPmBlockNodes,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",on:{click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("div",{staticClass:"d-flex"},[n.svgIcon?t("img",{staticClass:"node-types__item__icon",attrs:{src:n.svgIcon,alt:e.$t(n.label)}}):t("i",{staticClass:"node-types__item__icon",class:n.customIcon}),t("label",[e._v(e._s(e.$t(n.label)))])])])]}))],2):e._e(),0!==e.filteredPmBlockNodes.length||e.searchTerm?e._e():[t("div",{staticClass:"pmBlocksContainer p-2"},[e._l(e.pmBlockNodeTypes,(function(n){return[t("div",{key:n.id,staticClass:"pm-block-node-types__item p-2 d-block",on:{click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("div",{staticClass:"d-flex"},[n.svgIcon?t("img",{staticClass:"node-types__item__icon",attrs:{src:n.svgIcon,alt:e.$t(n.label)}}):t("i",{staticClass:"node-types__item__icon",class:n.customIcon}),t("label",[e._v(e._s(e.$t(n.label)))])])])]}))],2)]],2)},gm=[],vm={name:"PmBlocksLoop",mixins:[dm],computed:{pmBlockNodeTypes:function(){return Kf.getters.getPmBlockNodeTypes},filteredPmBlockNodes:function(){return Kf.getters.getFilteredPmBlockNodeTypes},searchTerm:function(){return Kf.getters.getSearchTerm}}},bm=vm,ym=(n("fbd9"),ut(bm,mm,gm,!1,null,null,null)),wm=ym.exports,xm={name:"ExplorerRail",props:{explorerExpanded:{type:Boolean},nodeTypes:{type:Array},pmBlockNodes:{type:Array}},components:{FontAwesomeIcon:xn["FontAwesomeIcon"],FilterNodeTypes:om,NodeTypesLoop:fm,PmBlocksLoop:wm},data:function(){return{tabs:[{idx:0,label:"Add Object"},{idx:1,label:"PM Blocks"}],tabIndex:0}},computed:{explorerOpen:function(){return Kf.getters.getExplorerOpen}},created:function(){Kf.commit("setNodeTypes",this.nodeTypes)},methods:{faTimes:function(){return oi["faTimes"]},setTabIndex:function(e){this.tabIndex!==e&&(this.tabIndex=e,this.clearFilteredObjects())},closeRail:function(){Kf.commit("closeExplorer"),this.clearFilteredObjects()},clearFilteredObjects:function(){Kf.commit("clearFilteredNodes"),Kf.commit("clearFilteredPmBlockNodes")}}},km=xm,Cm=(n("3da3"),ut(km,Xf,Yf,!1,null,null,null)),Sm=Cm.exports,Em=n("c04c"),Am=n.n(Em),Mm=function(){var e=this,t=e._self._c;return t("button",{staticClass:"inspector-button",attrs:{type:"button","data-cy":"inspector-button"},on:{click:e.toggleInspector}},[t("inline-svg",{attrs:{src:e.inspectorIcon}})],1)},Tm=[],Pm=n("6d5e"),_m=n.n(Pm),Om={components:{InlineSvg:_m.a},props:{showInspector:{type:Boolean,default:!0}},data:function(){return{inspectorIcon:n("b328")}},methods:{toggleInspector:function(){this.$emit("toggleInspector",!this.showInspector)}}},Dm=Om,Im=(n("ea51"),ut(Dm,Mm,Tm,!1,null,"cebfb20a",null)),Nm=Im.exports,Rm=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"inspector"}},[t("b-col",{staticClass:"pl-0 h-100 overflow-hidden inspector-column",class:[{"ignore-pointer":e.canvasDragPosition}],attrs:{id:"inspector","data-test":"inspector-column"}},[t("b-card",{staticClass:"inspector-container border-top-0 border-bottom-0 border-right-0 rounded-0",style:{height:e.parentHeight},attrs:{"no-body":"","data-test":"inspector-container","data-cy":"inspector-panel"},scopedSlots:e._u([{key:"header",fn:function(){return[t("div",{staticClass:"inspector-header"},[t("div",{staticClass:"inspector-header-title"},[e._v(" "+e._s(e.$t("Configuration"))+" ")]),t("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close","data-cy":"inspector-close-button"},on:{click:e.onClose}},[e._v(" × ")])])]},proxy:!0}])},[e.highlightedNode?t("vue-form-renderer",{key:e.highlightedNode._modelerId,ref:"formRenderer",staticClass:"overflow-auto h-100 inspector-font-size",attrs:{data:e.data,config:e.config},on:{update:e.updateDefinition},nativeOn:{focusout:function(t){return e.updateState.apply(null,arguments)}}}):e._e()],1)],1)],1)},jm=[],Lm=n("bb3a"),Bm=n("2ac6"),Fm=(n("1946"),n("bcdf")),zm=n.n(Fm),Hm={id:"processmaker-modeler-process",bpmnType:"bpmn:Process",control:!1,label:"Process",inspectorConfig:[{name:"Process Information",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-process"},items:[{component:"FormInput",config:Ii},{component:"FormInput",config:{label:"Name",helper:"The Name of the Process",name:"name",placeholder:""}}]}]}]},qm=Hm.id,Vm=Hm;De.a.component("FormText",Lm["renderer"].FormText),De.a.component("FormInput",Bm["FormInput"]),De.a.component("FormSelect",Bm["FormSelect"]),De.a.component("FormTextArea",Bm["FormTextArea"]),De.a.component("FormCheckbox",Bm["FormCheckbox"]),De.a.component("FormRadioButtonGroup",Bm["FormRadioButtonGroup"]),De.a.component("FormAccordion",Bm["FormAccordion"]),De.a.component("FormDatePicker",Bm["FormDatePicker"]),De.a.component("FormMultiSelect",Bm["FormMultiSelect"]);var Um={props:["nodeRegistry","moddle","processNode","parentHeight","canvasDragPosition","definitions"],data:function(){return{data:{},config:[],inspectorHandler:null,translated:[],isVisible:!0}},watch:{highlightedNode:function(){document.activeElement.blur(),this.prepareData(),this.prepareConfig()},"highlightedNode.definition.assignment":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignmentLock":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.allowReassignment":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignedUsers":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignedGroups":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignmentRules":function(e,t){this.handleAssignmentChanges(e,t)}},computed:{highlightedNode:function(){return ze.getters.highlightedNodes[0]},isAnyNodeActive:function(){return this.highlightedNode},updateDefinition:function(){var e=this;if(!this.isAnyNodeActive)return zm.a;var t=this.defaultInspectorHandler;return this.isProcessNodeActive&&(t=this.processNodeInspectorHandler),this.hasCustomInspectorHandler&&(t=this.customInspectorHandler),function(n){if(n){if(Lr()(n.documentation)&&k()(e.highlightedNode.definition.get("documentation")[0],"text")!==n.documentation){var o=n.documentation?[e.moddle.create("bpmn:Documentation",{text:n.documentation})]:void 0;e.setNodeProp(e.highlightedNode,"documentation",o)}t(ia()(n,["documentation"]))}}},hasCustomInspectorHandler:function(){return this.nodeRegistry[this.highlightedNode.type].inspectorHandler},isProcessNodeActive:function(){return this.highlightedNode===this.processNode}},methods:{onClose:function(){this.$emit("toggleInspector",!1)},handleAssignmentChanges:function(e,t){e!==t&&this.prepareData()},prepareConfig:function(){if(!this.highlightedNode)return this.config={name:"Empty",items:[]};var e=this.highlightedNode,t=e.type,n=e.definition;if(this.highlightedNode===this.processNode)return this.config=Vm.inspectorConfig;var o=rn()(this.nodeRegistry[t].inspectorConfig),i=k()(o,"[0].items[0].items");if(this.isSequenceFlow(t)&&this.isConnectedToGateway(n)){var r=this.$t("Enter the expression that describes the workflow condition");r+=' <a href="https://processmaker.gitbook.io/processmaker/v/processmaker-4.3/designing-processes/expression-syntax-components" target="_blank"><i class="far fa-question-circle mr-1"></a>';var a={component:"FormInput",config:{label:this.$t("Expression"),helper:r,name:"conditionExpression"}},s=i.find((function(e){return e.config&&"Name"===e.config.label})),c=i.indexOf(s);s&&c>=0?i.splice(c+1,0,a):i.push(a)}return this.config=o},prepareData:function(){if(!this.highlightedNode)return{};var e=this.highlightedNode&&this.highlightedNode.type,t=function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];return e[o]=i,e}),{})};this.data=e&&this.nodeRegistry[e].inspectorData?this.nodeRegistry[e].inspectorData(this.highlightedNode,t,this):t(this.highlightedNode)},isSequenceFlow:function(e){return e===us},isConnectedToGateway:function(e){return["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.sourceRef.$type)},isConnectedToSubProcess:function(e){return"bpmn:CallActivity"===e.targetRef.$type},customInspectorHandler:function(e){return this.nodeRegistry[this.highlightedNode.type].inspectorHandler(e,this.highlightedNode,this.setNodeProp,this.moddle,this.definitions,this.defaultInspectorHandler)},processNodeInspectorHandler:function(e){return this.defaultInspectorHandler(ia()(e,["artifacts","flowElements","laneSets"]))},setNodeProp:function(e,t,n){this.$emit("shape-resize"),ze.commit("updateNodeProp",{node:e,key:t,value:n})},defaultInspectorHandler:function(e){for(var t in ia()(e,["$type","eventDefinitions"]))this.highlightedNode.definition.get(t)!==e[t]&&this.setNodeProp(this.highlightedNode,t,e[t])},updateState:function(){this.$emit("save-state")}}},Gm=Um,Wm=(n("e8a4"),ut(Gm,Rm,jm,!1,null,"37f66186",null)),$m=Wm.exports;De.a.use(Ie["a"]);var Xm=new Ie["a"].Store({state:{stack:[],position:null,disabled:!1,isVersionsInstalled:!1,isDraft:!1,isLoading:!1},getters:{canUndo:function(e){return e.position>0},canRedo:function(e){return e.position<e.stack.length-1},currentState:function(e){return e.stack[e.position]},isVersionsInstalled:function(e){return e.isVersionsInstalled},isDraft:function(e){return e.isDraft},isLoading:function(e){return e.isLoading}},mutations:{setPosition:function(e,t){e.position=t},setState:function(e,t){e.stack=e.stack.slice(0,e.position+1),e.stack.push(t)},clearStack:function(e){e.stack=[e.stack[e.stack.length-1]]},disableSavingState:function(e){e.disabled=!0},enableSavingState:function(e){e.disabled=!1},isVersionsInstalled:function(e,t){e.isVersionsInstalled=t},isDraft:function(e,t){e.isDraft=t},isLoading:function(e,t){e.isLoading=t}},actions:{pushState:function(e,t){var n=e.state,o=e.getters,i=e.commit;t===o.currentState||n.disabled||(i("setState",t),i("setPosition",n.stack.length-1))},undo:function(e){var t=e.state,n=e.getters,o=e.commit;n.canUndo&&o("setPosition",t.position-1)},redo:function(e){var t=e.state,n=e.getters,o=e.commit;n.canRedo&&o("setPosition",t.position+1)},enableVersions:function(e){var t=e.commit;t("isVersionsInstalled",!0)},setVersionIndicator:function(e,t){var n=e.commit;n("isDraft",t)},setLoadingState:function(e,t){var n=e.commit;n("isLoading",t)}}}),Ym=n("e356"),Zm=n("1251"),Km=n.n(Zm),Jm=n("38ab"),Qm=n.n(Jm),eg=n("6864"),tg=n.n(eg),ng=n("cb02"),og=n.n(ng),ig=n("bd0e"),rg=n.n(ig),ag=n("c521"),sg=n.n(ag),cg=n("8c96"),lg=n.n(cg),dg=n("b470"),ug=n.n(dg),pg=n("31e3"),hg=n.n(pg),fg=n("d5bd"),mg=n.n(fg),gg=n("408e"),vg=n.n(gg),bg=n("b7ff"),yg=n.n(bg),wg=n("b36d"),xg=n.n(wg),kg=n("beab"),Cg=n.n(kg),Sg=n("1a64"),Eg=n.n(Sg),Ag=n("af7f"),Mg=n.n(Ag),Tg=n("5fd8"),Pg=n.n(Tg),_g=n("fde4"),Og=n.n(_g),Dg={};function Ig(){}Ig.prototype.resolveRule=function(e,t){const n=Dg[e+"/"+t];if(!n)throw new Error("cannot resolve rule <"+e+"/"+t+">");return n},Ig.prototype.resolveConfig=function(e,t){throw new Error("cannot resolve config <"+t+"> in <"+e+">")};var Ng=new Ig,Rg={"conditional-flows":"error","end-event-required":"error","event-sub-process-typed-start-event":"error","label-required":"error","no-complex-gateway":"error","no-disconnected":"error","no-gateway-join-fork":"error","no-implicit-split":"error","single-event-definition":"error","start-event-required":"error","sub-process-blank-start-event":"error","superfluous-gateway":"warning","processmaker/custom-validation":"error","processmaker/gateway-direction":"error","processmaker/event-based-gateway":"error","processmaker/call-activity-child-process":"error","processmaker/id-required":"error","processmaker/signal-ref-required":"error"},jg={rules:Rg},Lg={resolver:Ng,config:jg},Bg=Lg;function Fg(e,t,n,o,i,r,a){var s={allowDrop:!1,poolTarget:null};if(!Ug(e,t,a))return s.allowDrop=!1,s;if(qg(n.type))return s.allowDrop=!0,s;if(Gg(n.bpmnType)){var c=i.findModelsFromPoint(Wg(e,t,o)).sort((function(e,t){return t.get("z")-e.get("z")}))[0];return s.allowDrop=_o(n.type,c),s}if(Vg(r))return s.allowDrop=!0,s;if(zg(n.bpmnType))return s.allowDrop=!0,s;var l=Hg(e,t,o,i);return l&&(s.allowDrop=!0,s.poolTarget=l),s}function zg(e){return"bpmn:TextAnnotation"===e}function Hg(e,t,n,o){return o.findModelsFromPoint(Wg(e,t,n)).find((function(e){var t=e.component;return t&&t.node.type===Un}))}function qg(e){return e===Un}function Vg(e){return!e||0===e.get("participants").length}function Ug(e,t,n){var o=n.getBoundingClientRect(),i=o.left,r=o.top,a=o.width,s=o.height,c=new d["g"].rect(i,r,a,s),l=new d["g"].Point(e,t);return c.containsPoint(l)}function Gg(e){return"bpmn:BoundaryEvent"===e}function Wg(e,t,n){return n.clientToLocalPoint({x:e,y:t})}Dg["bpmnlint/conditional-flows"]=Km.a,Dg["bpmnlint/end-event-required"]=Qm.a,Dg["bpmnlint/event-sub-process-typed-start-event"]=tg.a,Dg["bpmnlint/label-required"]=og.a,Dg["bpmnlint/no-complex-gateway"]=rg.a,Dg["bpmnlint/no-disconnected"]=sg.a,Dg["bpmnlint/no-gateway-join-fork"]=lg.a,Dg["bpmnlint/no-implicit-split"]=ug.a,Dg["bpmnlint/single-event-definition"]=hg.a,Dg["bpmnlint/start-event-required"]=mg.a,Dg["bpmnlint/sub-process-blank-start-event"]=vg.a,Dg["bpmnlint/superfluous-gateway"]=yg.a,Dg["bpmnlint-plugin-processmaker/custom-validation"]=xg.a,Dg["bpmnlint-plugin-processmaker/gateway-direction"]=Cg.a,Dg["bpmnlint-plugin-processmaker/event-based-gateway"]=Eg.a,Dg["bpmnlint-plugin-processmaker/call-activity-child-process"]=Mg.a,Dg["bpmnlint-plugin-processmaker/id-required"]=Pg.a,Dg["bpmnlint-plugin-processmaker/signal-ref-required"]=Og.a;var $g,Xg,Yg,Zg,Kg,Jg,Qg,ev,tv,nv,ov,iv,rv=n("28b7"),av=n.n(rv),sv={extends:Uf,mixins:[Zr],data:function(){return{nodeIcon:av.a}}},cv=sv,lv=ut(cv,$g,Xg,!1,null,null,null),dv=lv.exports,uv="processmaker-modeler-boundary-error-event",pv=na()(rn()(Gf),{id:uv,component:dv,control:!1,label:"Boundary Error Event",icon:n("6ed0"),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Error Event"),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorConfig:[{items:[{items:[{}]},qr,Ir]}]}),hv={extends:Uf,mixins:[Zr],data:function(){return{nodeIcon:nu.a}},mounted:function(){this.shape.attr({image:{"ref-x":4,"ref-y":4,width:18,height:18}})}},fv=hv,mv=ut(fv,Yg,Zg,!1,null,null,null),gv=mv.exports,vv={component:"FormCheckbox",config:{label:"Interrupting",name:"cancelActivity",helper:"Select to interrupt the current Request workflow and route to the alternate workflow, thereby preventing parallel workflow"}},bv=vv,yv="processmaker-modeler-boundary-conditional-event",wv=na()(rn()(Gf),Vt(Vt({},cu),{},{id:yv,component:gv,control:!1,label:"Boundary Conditional Event",definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Conditional Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(g(su()),[bv])},Ir,qr]}]})),xv=n("38ec"),kv=n.n(xv),Cv={extends:Uf,mounted:function(){this.shape.attr("image/xlink:href",kv.a)},methods:{isValidBoundaryEventTarget:function(e){return Oo(e.component)}}},Sv=Cv,Ev=ut(Sv,Kg,Jg,!1,null,null,null),Av=Ev.exports,Mv="processmaker-modeler-boundary-escalation-event",Tv=na()(rn()(Gf),{id:Mv,component:Av,control:!1,label:"Boundary Escalation Event",icon:n("565d"),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Escalation Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:EscalationEventDefinition")]})},inspectorConfig:[{items:[{items:[{},bv]},qr,Ir]}]}),Pv=n("3d5d"),_v=n.n(Pv),Ov={extends:Uf,mixins:[Zr],data:function(){return{nodeIcon:_v.a}},methods:{isValidBoundaryEventTarget:function(e){var t=e.component;return t&&t.node.isBpmnType("bpmn:CallActivity")}},mounted:function(){var e=dd();this.shape.attr(e)}},Dv=Ov,Iv=ut(Dv,Qg,ev,!1,null,null,null),Nv=Iv.exports,Rv="processmaker-modeler-boundary-message-event",jv=na()(rn()(Gf),Vt(Vt({},Ls),{},{id:Rv,component:Nv,control:!1,label:"Boundary Message Event",icon:n("45bc"),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Message Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},bv,Ns("Message that will trigger this boundary event")]},qr,Ir]}]})),Lv=n("ec41"),Bv=n.n(Lv),Fv={extends:Uf,mixins:[Zr],data:function(){return{nodeIcon:Bv.a}},mounted:function(){var e=this.node.diagram.bounds;this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({image:{"ref-x":3,"ref-y":1,width:e.get("width")-15,height:e.get("height")-15}})}},zv=Fv,Hv=ut(zv,tv,nv,!1,null,null,null),qv=Hv.exports,Vv="processmaker-modeler-boundary-signal-event",Uv=na()(rn()(Gf),Vt(Vt({},Qs),{},{id:Vv,component:qv,control:!1,label:"Boundary Signal Event",icon:n("a8c3"),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Signal Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},bv,Js("Signal that will trigger this boundary event")]},qr,Ir]}]})),Gv=n("ed66"),Wv=n.n(Gv),$v={extends:Uf,mixins:[Zr],data:function(){return{nodeIcon:Wv.a}}},Xv=$v,Yv=ut(Xv,ov,iv,!1,null,null,null),Zv=Yv.exports,Kv="processmaker-modeler-boundary-timer-event",Jv=na()(rn()(Gf),{id:Kv,component:Zv,control:!1,label:"Boundary Timer Event",icon:n("8bfb"),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Timer Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:TimerEventDefinition",{timeDuration:e.create("bpmn:Expression",{body:nd})})]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=_e(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],a=i[0][r].body;e[o]={type:r,body:a}}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var a=e[r],s=a.type,c=a.body,l=i.get(r)[0][s];if(l&&l.body===c)continue;var d=U({},s,o.create("bpmn:Expression",{body:c})),u=[o.create("bpmn:TimerEventDefinition",d)];n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{items:[{items:[{},bv]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-boundary-timer-event"},items:[{component:sd,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},Ir,qr]}]});function Qv(e,t,n){var o=cp(e,t,"set");return hp(e,o,n),n}var eb=new WeakMap,tb=function(){function e(t){Ut(this,e),ap(this,eb,{writable:!0,value:void 0}),U(this,"preventTranslate",!1),Qv(this,eb,t)}return Wt(e,[{key:"paper",get:function(){return lp(this,eb)}},{key:"scale",get:function(){return lp(this,eb).scale()},set:function(e){lp(this,eb).scale(e),lp(this,eb).trigger("scale:changed")}},{key:"roundToNearestGridMultiple",value:function(t){return Math.round(t/e.gridSize)*e.gridSize}},{key:"ceilToNearestGridMultiple",value:function(t){return Math.ceil(t/e.gridSize)*e.gridSize}},{key:"translate",value:function(e,t){this.preventTranslate||(lp(this,eb).translate(e,t),lp(this,eb).trigger("translate:changed"))}},{key:"addEventHandler",value:function(e,t,n){lp(this,eb).on(e,t,n)}},{key:"addOnceHandler",value:function(e,t){lp(this,eb).once(e,t)}},{key:"removeEventHandler",value:function(e,t,n){lp(this,eb).off(e,t,n)}},{key:"setPaperDimensions",value:function(e,t){lp(this,eb).setDimensions(e,t)}},{key:"performAtomicAction",value:function(){var e=w(b().mark((function e(t){return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return lp(this,eb).freeze(),e.next=3,t(lp(this,eb));case 3:lp(this,eb).unfreeze();case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"clientToGridPoint",value:function(e,t){var n=lp(this,eb).localToPagePoint(0,0),o=this.scale;return{x:this.roundToNearestGridMultiple((e-n.x)/o.sx),y:this.roundToNearestGridMultiple((t-n.y)/o.sy)}}},{key:"setStateInvalid",value:function(){this.paper.drawBackground({color:P})}},{key:"setStateValid",value:function(){this.paper.drawBackground({color:_})}},{key:"awaitScheduledUpdates",value:function(){var e=this;return lp(this,eb)._updates.priorities.some((function(e){return!d["util"].isEmpty(e)}))?new Promise((function(t){e.addOnceHandler("render:done",t)})):Promise.resolve()}}],[{key:"factory",value:function(t,n,o){var i=3,r=new d["dia"].Paper({async:!0,el:t,model:o,sorting:"sorting-approximate",gridSize:e.gridSize,drawGrid:!0,snapLinks:!1,snapElements:!1,clickThreshold:10,perpendicularLinks:!0,interactive:n,highlighting:{default:{options:{padding:i}}}});return r.translate(168,20),new this(r)}}]),e}();function nb(e,t,n){var o=rb(e,t,n);ib(o,t),e.inspectorConfig[0].items.sort(ob)}function ob(e,t){return ab(e)?1:ab(t)?-1:0}function ib(e,t){var n=e.findIndex((function(e){var n=!t.container&&t.config&&e.config&&t.config.name&&t.config.name===e.config.name;return t.id&&t.id===e.id||n}));-1!==n?e[n]=t:e.push(t)}function rb(e,t,n){return"undefined"!==typeof t.container?e.inspectorConfig[0].items:n?(e=e.inspectorConfig[0],n.split(".").forEach((function(t){e=e&&e.items.find((function(e){return e.config&&e.config.name===t}))})),e?e.items:null):e.inspectorConfig[0].items[0].items}function ab(e){return e.config&&"Advanced"===e.config.label}function sb(e,t){hb(e)&&lb(e);var n=pb(e);n&&lb(n),cb(e)&&!hb(e)&&db(e),ub(t)}function cb(e){return e.component.node.type!==rs}function lb(e){db(e);var t=e.component.node.definition.processRef&&e.component.node.definition.processRef.laneSets[0];if(t){var n=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type===rs})),o=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type!==rs}));n.forEach(db),o.forEach(db)}}function db(e){e.toFront({deep:!0})}function ub(e){e.getLinks().forEach(db)}function pb(e){return e.component.node.pool}function hb(e){return e.component.node.type===Un}U(tb,"gridSize",vu);var fb=function(){var e=this,t=e._self._c;return t("b-row",{staticClass:"w-100 m-0"},[t("div",{staticClass:"toolbar d-flex justify-content-between align-items-center border-top border-bottom",class:{"ignore-pointer":e.canvasDragPosition},attrs:{role:"toolbar","aria-label":"Toolbar"}},[t("breadcrumb",{attrs:{"breadcrumb-data":e.breadcrumbData}}),t("div",{staticClass:"d-flex mr-3"},[t("TopRail",{attrs:{"validation-errors":e.validationErrors,warnings:e.warnings}},e._l(e.validationBar,(function(e,n){return t(e.button,{key:"validation-status-".concat(n),tag:"component"})})),1),t("div",{staticClass:"d-flex align-items-center btn-group btn-group-sm",attrs:{role:"group","aria-label":"Publish controls","data-cy":"publish-control"}},[t("div",{staticClass:"divider"}),e.isVersionsInstalled?[t("div",{staticClass:"toolbar-item toolbar-version-status",attrs:{"data-cy":"publish-version-status"}},[e._v(" "+e._s(e.versionStatus)+" ")]),t("div",{staticClass:"toolbar-item toolbar-loading-status",attrs:{"data-cy":"publish-loading-status"}},[t("span",[e._v(" "+e._s(e.loadingStatus)+" ")]),t("font-awesome-icon",{staticClass:"text-success",attrs:{icon:e.loadingIcon,spin:e.isLoading}})],1),t("a",{staticClass:"toolbar-item toolbar-publish",attrs:{title:e.$t("Publish"),"data-cy":"publish-btn"},on:{click:function(t){return e.$emit("saveBpmn")}}},[e._v(" "+e._s(e.$t("Publish"))+" ")]),t("a",{staticClass:"toolbar-item toolbar-close",attrs:{title:e.$t("Close"),"data-cy":"close-btn"},on:{click:function(t){return e.$emit("close")}}},[e._v(" "+e._s(e.$t("Close"))+" ")]),t("EllipsisMenu",{attrs:{actions:e.ellipsisMenuActions,divider:!1,"data-cy":"ellipsis-menu"},on:{navigate:e.onNavigate,show:e.onShow,hide:e.onHide}})]:[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"save-button",attrs:{"data-test":"mini-map-btn",title:e.$t("Save")},on:{click:function(t){return e.$emit("saveBpmn")}}},[t("font-awesome-icon",{attrs:{icon:e.saveIcon}}),t("span",{staticClass:"save-button-label"},[e._v(e._s(e.$t("Save")))])],1),t("b-btn",{staticClass:"ml-1 rounded",attrs:{disabled:!e.xmlManager,variant:"secondary",size:"sm","data-test":"downloadXMLBtn"},on:{click:function(t){e.xmlManager&&e.xmlManager.download()}}},[t("i",{staticClass:"fas fa-download mr-1"}),e._v(" "+e._s(e.$t("Download BPMN"))+" ")]),t("b-btn",{directives:[{name:"b-modal",rawName:"v-b-modal",value:"uploadmodal",expression:"'uploadmodal'"}],staticClass:"ml-1 rounded",attrs:{variant:"secondary",size:"sm"}},[t("i",{staticClass:"fas fa-upload mr-1"}),e._v(" "+e._s(e.$t("Upload XML"))+" ")])]],2)],1)],1)])},mb=[],gb=function(){var e=this,t=e._self._c;return t("nav",{attrs:{id:"breadcrumbs"}},[e.breadcrumbData.length>0?t("ol",{staticClass:"breadcrumb"},[e._m(0),e._l(e.breadcrumbData[0],(function(n,o){return t("li",{key:o,staticClass:"breadcrumb-item"},[n.url?t("a",{attrs:{href:n.url}},[e._v(e._s(n.text))]):e._e(),n.url?e._e():t("span",[e._v(e._s(n.text))])])}))],2):e._e()])},vb=[function(){var e=this,t=e._self._c;return t("li",{staticClass:"breadcrumb-item"},[t("a",{attrs:{href:"/"}},[t("i",{staticClass:"fas fa-home"})])])}],bb={name:"breadcrumb",props:{breadcrumbData:{type:Array,default:function(){return[]}}}},yb=bb,wb=(n("d5ef"),ut(yb,gb,vb,!1,null,"d1e148b4",null)),xb=wb.exports,kb=function(){var e=this,t=e._self._c;return t("div",{staticClass:"top-rail-container"},[t("ValidateIssue",{directives:[{name:"show",rawName:"v-show",value:e.isOpenIssue,expression:"isOpenIssue"}],attrs:{"number-of-errors":e.numberOfErrors},on:{openPanel:e.handleOpenPanel}}),t("ValidateButton",{on:{openIssue:e.handleOpenIssue}}),t("ValidatePanel",{directives:[{name:"show",rawName:"v-show",value:e.isOpenIssue&&e.isOpenPanel,expression:"isOpenIssue && isOpenPanel"}],attrs:{"error-list":e.errorList,warnings:e.warnings}}),e._t("default")],2)},Cb=[],Sb=function(){var e=this,t=e._self._c;return t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],class:["validate-button",{"validate-button-active":e.isOpen}],attrs:{type:"button",title:e.$t("Auto validate"),"data-cy":"validate-button"},on:{click:function(t){return t.preventDefault(),e.handleOpen.apply(null,arguments)}}},[t("inline-svg",{attrs:{src:e.isOpen?e.validateOpenIcon:e.validateCloseIcon}})],1)},Eb=[],Ab={components:{InlineSvg:_m.a},data:function(){return{isOpen:!1,validateCloseIcon:n("f4e5"),validateOpenIcon:n("5342")}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openIssue",this.isOpen)}}},Mb=Ab,Tb=(n("e297"),ut(Mb,Sb,Eb,!1,null,"207802aa",null)),Pb=Tb.exports,_b=function(){var e=this,t=e._self._c;return t("button",{staticClass:"issue-box",attrs:{type:"button",disabled:0===e.numberOfErrors,"data-cy":"validate-issue-button"},on:{click:function(t){return t.preventDefault(),e.handleOpen.apply(null,arguments)}}},[t("span",{staticClass:"issue-title"},[e._v("Issues")]),t("span",{staticClass:"issue-badge"},[e._v(e._s(e.numberOfErrors))]),t("span",{staticClass:"issue-icon"},[t("inline-svg",{attrs:{src:e.isOpen?e.issueOpenIcon:e.issueCloseIcon}})],1)])},Ob=[],Db={components:{InlineSvg:_m.a},props:{numberOfErrors:{type:Number,required:!0}},data:function(){return{isOpen:!1,issueCloseIcon:n("a2b0"),issueOpenIcon:n("2eb4")}},watch:{numberOfErrors:function(e){0===e&&(this.isOpen=!1)}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openPanel",this.isOpen)}}},Ib=Db,Nb=(n("bde1"),ut(Ib,_b,Ob,!1,null,"337583fe",null)),Rb=Nb.exports,jb=function(){var e=this,t=e._self._c;return t("div",{staticClass:"validate-container",attrs:{"data-cy":"validate-panel"}},[e._l(e.errorList,(function(n,o){return t("div",{key:"".concat(n.errorId,"_").concat(o),staticClass:"validate-item-box"},[t("vue-inline-svg",{attrs:{src:e.issueIcon}}),t("div",{staticClass:"validate-item-info"},[t("div",{staticClass:"validate-item-title"},[e._v(e._s(n.errorKey))]),t("div",{staticClass:"validate-item-description"},[e._v(e._s(n.message)+".")]),n.id?t("div",{staticClass:"validate-item-node"},[t("span",{staticClass:"validate-item-node-title"},[e._v(e._s(e.$t("Node ID"))+":")]),e._v(" "+e._s(n.id)+" ")]):e._e()])],1)})),e._l(e.warnings,(function(n,o){return t("div",{key:n.title+o,staticClass:"validate-item-box"},[t("vue-inline-svg",{attrs:{src:e.issueIcon}}),t("div",{staticClass:"validate-item-info"},[t("div",{staticClass:"validate-item-title"},[e._v(e._s(n.title))]),t("div",{staticClass:"validate-item-description"},[e._v(e._s(n.text)+".")])])],1)}))],2)},Lb=[],Bb={components:{VueInlineSvg:_m.a},props:{errorList:{type:Array,required:!0},warnings:{type:Array,required:!0}},data:function(){return{issueIcon:n("6435")}}},Fb=Bb,zb=(n("f2b4"),ut(Fb,jb,Lb,!1,null,"0722e36d",null)),Hb=zb.exports,qb={components:{ValidateButton:Pb,ValidateIssue:Rb,ValidatePanel:Hb},props:{validationErrors:{type:Object,required:!0},warnings:{type:Array,required:!0}},data:function(){return{isOpenIssue:!1,isOpenPanel:!1}},computed:{errorList:function(){return Object.entries(this.validationErrors).flatMap((function(e){var t=_e(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return Vt(Vt({},e),{},{errorKey:n},{errorId:"".concat(e.id,"_").concat(e.message.split(" ").join("_"))})}))}))},numberOfErrors:function(){return this.errorList.length+this.warnings.length}},watch:{numberOfErrors:function(e){0===e&&(this.isOpenPanel=!1)}},methods:{handleOpenIssue:function(e){this.isOpenIssue=e,ze.commit("setAutoValidate",this.isOpenIssue)},handleOpenPanel:function(e){this.isOpenPanel=e}}},Vb=qb,Ub=(n("12df"),ut(Vb,kb,Cb,!1,null,"78331cf6",null)),Gb=Ub.exports,Wb={name:"tool-bar",components:{Breadcrumb:xb,TopRail:Gb,FontAwesomeIcon:xn["FontAwesomeIcon"]},props:["canvasDragPosition","cursor","paperManager","isRendering","breadcrumbData","panelsCompressed","validationErrors","warnings","xmlManager","validationBar"],watch:{miniMapOpen:function(e){this.$emit("toggle-mini-map-open",e)},canUndo:function(e){e||this.$root.$emit("bv::hide::tooltip")},canRedo:function(e){e||this.$root.$emit("bv::hide::tooltip")}},computed:{canUndo:function(){return Xm.getters.canUndo},canRedo:function(){return Xm.getters.canRedo},versionStatus:function(){var e=Xm.getters.isDraft?"Draft":"Published";return this.$t(e)},isVersionsInstalled:function(){return Xm.getters.isVersionsInstalled},isLoading:function(){return Xm.getters.isLoading},loadingStatus:function(){var e=this.isLoading?"Saving":"Saved";return this.$t(e)},loadingIcon:function(){return this.isLoading?this.spinner:this.savedIcon}},data:function(){return{plusIcon:oi["faPlus"],minusIcon:oi["faMinus"],scale:1,initialScale:1,minimumScale:.2,scaleStep:.1,mapIcon:oi["faMapMarked"],miniMapOpen:!1,compressIcon:oi["faCompress"],expandIcon:oi["faExpand"],undoIcon:oi["faUndo"],redoIcon:oi["faRedo"],saveIcon:oi["faSave"],savedIcon:oi["faCheckCircle"],spinner:oi["faSpinner"],ellipsisMenuActions:[{value:"save-template",content:this.$t("Save as Template"),icon:""},{value:"save-pm-block",content:this.$t("Save as PM Block"),icon:""},{value:"discard-draft",content:this.$t("Discard Draft"),icon:""}]}},methods:{undo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Xm.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Xm.dispatch("redo").then((function(){return e.$emit("load-xml")}))},onNavigate:function(e){switch(e.value){case"discard-draft":window.ProcessMaker.EventBus.$emit("open-versions-discard-modal");break;case"save-template":this.$emit("publishTemplate");break;case"save-pm-block":this.$emit("publishPmBlock");break;default:break}},onShow:function(){var e=document.getElementById("inspector");e&&(e.style.zIndex="1")},onHide:function(){var e=document.getElementById("inspector");e&&(e.style.zIndex="2")}},mounted:function(){var e,t=null===(e=this.$root.$children[0])||void 0===e?void 0:e.process,n=this.ellipsisMenuActions.findIndex((function(e){return"save-template"===e.value}));null!==t&&void 0!==t&&t.is_template&&this.ellipsisMenuActions.splice(n,1),"PM_BLOCK"===(null===t||void 0===t?void 0:t.asset_type)&&this.ellipsisMenuActions.splice(n,2)}},$b=Wb,Xb=(n("02e5"),ut($b,fb,mb,!1,null,null,null)),Yb=Xb.exports;function Zb(e,t){var n=function(e){return e.isBpmnType("bpmn:MessageFlow",vt,xt)||e.isType("processmaker-modeler-pool")};if(!n(e))if(e.isType("processmaker-modeler-lane"))t.get("laneSets")[0].get("lanes").push(e.definition);else{var o="flowElements";(e.isBpmnType("bpmn:TextAnnotation")||e.isBpmnType("bpmn:Association"))&&(o="artifacts"),t.get(o).push(e.definition)}}var Kb={methods:{zoomInOutHandler:function(e,t){var n="+"===e.key||"NumpadAdd"===e.key||107===e.keyCode||187===e.keyCode,o="-"===e.key||"NumpadSubtract"===e.key||109===e.keyCode||189===e.keyCode;n&&t.mod&&this.zoomIn(e),o&&t.mod&&this.zoomOut(e)},zoomIn:function(e){e.preventDefault(),this.canvasScale=this.paperManager.scale.sx+this.scaleStep},zoomOut:function(e){e.preventDefault(),this.canvasScale=Math.max(this.minimumScale,this.paperManager.scale.sx-=this.scaleStep)}}},Jb={methods:{copyPasteHandler:function(e,t){var n=e.target.nodeName.toLowerCase(),o="body"===n,i=e.key.toLowerCase(),r="c"===i,a="v"===i;o&&r&&t.mod&&this.copy(e),o&&a&&t.mod&&this.paste(e)},copy:function(e){e.preventDefault(),window.ProcessMaker.$modeler.copyElement()},paste:function(e){e.preventDefault(),window.ProcessMaker.$modeler.pasteElements()}}},Qb=(n("4ec9"),tb.gridSize/2),ey=new Map;ey.set("Up",[0,-Qb]),ey.set("Down",[0,Qb]),ey.set("Left",[-Qb,0]),ey.set("Right",[Qb,0]);var ty=["PoolLane","processmaker.components.nodes.boundaryEvent.Shape"];function ny(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(oy(e)){var o=t.filter(iy);if(0!==o.length){var i=ry(e),r=_e(i,2),a=r[0],s=r[1];o.forEach((function(e){e.translate(a,s,{movedWithArrowKeys:!0}),sy(e)})),n()}}}function oy(e){var t=["up","down","left","right"];return t.some((function(t){return e.toLowerCase().includes(t)}))}function iy(e){return e&&!ty.includes(e.get("type"))}function ry(e){var t=e.match(/^(?:Arrow)?(Up|Down|Left|Right)$/);return null!==t?ey.get(t[1]):[0,0]}function ay(e){return!e||"processmaker.modeler.bpmn.pool"!==e.get("type")}function sy(e){var t=e.getParentCell();ay(t)||(t.component.expandToFitElement(e,t),t.component.laneSet&&t.component.updateLaneChildren())}var cy={methods:{escapeKeyHandler:function(e){this.selectedNode&&(e.preventDefault(),window.ProcessMaker.EventBus.$emit("custom-pointerclick",e))}},computed:{selectedNode:function(){return Kf.getters.getSelectedNode},movedElement:function(){return Kf.getters.getGhostNode}}},ly={mixins:[Kb,Jb,cy],computed:{clientLeftPaper:function(){return ze.getters.clientLeftPaper}},mounted:function(){document.addEventListener("keydown",this.keydownListener),document.addEventListener("keyup",this.keyupListener)},methods:{handleHotkeys:function(e,t){this.zoomInOutHandler(e,t),this.copyPasteHandler(e,t),this.escapeKeyHandler(e)},keyupListener:function(e){"Space"===e.code&&(this.isGrabbing=!1,this.paperManager.removeEventHandler("blank:pointermove"))},keydownListener:function(e){var t=this,n=this.isAppleOS(),o=n?e.metaKey:e.ctrlKey,i={mod:o,isAppleOS:n,modeler:this};try{this.handleHotkeys(e,i)}catch(a){console.error(a)}var r=!e.target.toString().toLowerCase().includes("body");r||("Space"===e.code&&(this.isGrabbing=!0,this.paperManager.addEventHandler("blank:pointermove",(function(e,n,o){if(!t.canvasDragPosition){var i=t.paperManager.scale;t.canvasDragPosition={x:n*i.sx,y:o*i.sy}}t.canvasDragPosition&&!t.clientLeftPaper&&t.paperManager.translate(e.offsetX-t.canvasDragPosition.x,e.offsetY-t.canvasDragPosition.y)}))),ny(e.key,ze.getters.highlightedShapes,this.pushToUndoStack))}}};n("5d41");function dy(e,t){while(!Object.prototype.hasOwnProperty.call(e,t))if(e=Fn(e),null===e)break;return e}function uy(){return uy="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=dy(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},uy.apply(this,arguments)}var py,hy=function(e){Bn(n,e);var t=Vn(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Wt(n,[{key:"clone",value:function(e,t,o){return this.withTimerKeys(uy(Fn(n.prototype),"clone",this).call(this,e,t,o))}},{key:"withTimerKeys",value:function(e){var t=this,o=n.timerPropertyKeys.find((function(e){return t.definition.eventDefinitions[0][e]}));return e.definition.eventDefinitions[0][o]||(e.definition.eventDefinitions[0][o]={}),e.definition.eventDefinitions[0][o].body=this.definition.eventDefinitions[0][o].body,e}}]),n}(an);function fy(e){return my.apply(this,arguments)}function my(){return my=w(b().mark((function e(t){var n,o,i;return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=gy(t),o=document.querySelector('[name="name"]')||document.querySelector('[name="text"]'),n&&o&&document.activeElement!==o){e.next=4;break}return e.abrupt("return");case 4:if(i=document.getElementById("accordion-button-Configuration"),!i||"false"!==i.getAttribute("aria-expanded")){e.next=10;break}return clearTimeout(py),i.click(),e.next=10,vy();case 10:n.style.outline="1px dashed blue",o.addEventListener("blur",(function(){n.style.outline=""})),o.focus(),o.select();case 14:case"end":return e.stop()}}),e)}))),my.apply(this,arguments)}function gy(e){if(e.selectors)return e.selectors.label||Array.from(e.selectors.root.children).find((function(e){return e.classList.contains("labels")}))}function vy(){return new Promise((function(e){py=setTimeout(e)}))}U(hy,"timerPropertyKeys",["timeDuration","timeDate","timeCycle"]);var by=n("21a6"),yy=n.n(by),wy=new WeakMap,xy=new WeakMap,ky=function(){function e(t){Ut(this,e),ap(this,wy,{writable:!0,value:void 0}),ap(this,xy,{writable:!0,value:void 0}),Qv(this,wy,t)}return Wt(e,[{key:"definitions",set:function(e){Qv(this,xy,e)}},{key:"getDefinitionsFromXml",value:function(e){var t=this;return new Promise((function(n,o){lp(t,wy).fromXML(e,(function(e,i){e&&o(e),i.exporter="ProcessMaker Modeler",i.exporterVersion="1.0",t.cleanBrokenReferences(i),n(i)}))}))}},{key:"cleanBrokenReferences",value:function(e){var t=e.rootElements,n=e.diagrams,o=[];t.forEach((function(t){"bpmn:Process"===t.$type&&t.flowElements&&(t.flowElements=t.flowElements.filter((function(e){return"bpmn:SequenceFlow"!==e.$type||(e.sourceRef&&e.targetRef||o.push(e),e.sourceRef&&e.targetRef)}))),"bpmn:Process"===t.$type&&t.laneSets&&t.laneSets.forEach((function(t){t.lanes=t.lanes.filter((function(t){if(!e.diagrams)return!1;var n=e.diagrams.find((function(e){return e.plane.planeElement.find((function(e){return e&&e.bpmnElement.id===t.id}))}));return n}))}))})),n.forEach((function(e){"bpmndi:BPMNDiagram"===e.$type&&e.plane&&e.plane.planeElement&&(e.plane.planeElement=e.plane.planeElement.filter((function(e){return"bpmndi:BPMNEdge"!==e.$type||e.bpmnElement&&!o.includes(e.bpmnElement)})))}))}},{key:"download",value:function(){lp(this,xy)&&lp(this,wy).toXML(lp(this,xy),{format:!0},(function(e,t){if(e)alert(e);else{if(Ci())return void(window.xml=t);var n=new File([t],"bpmnProcess.xml",{type:"text/xml"});yy.a.saveAs(n)}}))}}]),e}();function Cy(e){return e.isStartEvent()?Xt:e.isTask()?Jt:e.isGateway()?en:e.isIntermediateEvent()?nn:e.isEndEvent()?Zt:null}function Sy(e){if(!e)return!1;var t=Cy(e);return!t||!Object.values(t).includes(e.definition.name)}function Ey(e,t){return t.reduce((function(e,t){return e.concat(t.get("artifacts"))}),[]).filter((function(e){return"bpmn:Association"===e.$type})).filter((function(t){return t.targetRef===e.definition}))}function Ay(e,t){var n=Object.values(e).flatMap((function(e){return e.map((function(e){return t.find((function(t){return t.id===e.id}))}))})),o=t.filter((function(e){return!e.id}));return[].concat(g(n),g(o))}var My=function(){function e(t,n,o,i,r,a){Ut(this,e),this._nodeThatWillBeReplaced=t,this._definition=n,this._graph=o,this._newNode=i,this._processes=r,this._collaboration=a}return Wt(e,[{key:"migrate",value:function(){var e,t,n=this;Sy(this._nodeThatWillBeReplaced)&&(this._definition.name=this._nodeThatWillBeReplaced.definition.name);var o=function(e){var t=n._graph.getLinks().find((function(t){return t.component&&t.component.node.definition===e}));t.component.node._modelerId+="_replaced"},i=this._nodeThatWillBeReplaced.definition.get("incoming"),r=this._nodeThatWillBeReplaced.definition.get("outgoing");(e=this._definition.get("incoming")).push.apply(e,g(i)),(t=this._definition.get("outgoing")).push.apply(t,g(r)),r.forEach((function(e){e.set("sourceRef",n._newNode.definition),n._handleSequenceFlowForGateway(e),o(e)})),i.forEach((function(e){e.set("targetRef",n._newNode.definition),n._handleSequenceFlowForGateway(e),o(e)}));var a=Ey(this._nodeThatWillBeReplaced,this._processes);if(a.forEach((function(e){e.set("targetRef",n._newNode.definition),o(e)})),this._collaboration){var s=this._collaboration.get("messageFlows");s.filter((function(e){return e.sourceRef===n._nodeThatWillBeReplaced.definition})).forEach((function(e){e.set("sourceRef",n._newNode.definition),o(e)})),s.filter((function(e){return e.targetRef===n._nodeThatWillBeReplaced.definition})).forEach((function(e){e.set("targetRef",n._newNode.definition),o(e)}))}}},{key:"_handleSequenceFlowForGateway",value:function(e){var t=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.sourceRef.$type);t||delete e.conditionExpression}}]),e}(),Ty=["bpmn:ServiceTask","bpmn:ManualTask","bpmn:CallActivity","bpmn:ScriptTask"],Py=function(e){if(-1!==Ty.indexOf(e.bpmnType)){e.inspectorConfig[0].items.splice(e.loopInspectorIndex||1,0,Mp);var t=e.inspectorHandler||function(){},n=e.inspectorData||null;e.inspectorHandler=function(e,n,o,i,r,a){t(e,n,o,i,r,a),e=Ep(e,n,o,i,r),a(e)},e.inspectorData=function(e,t,o){var i=n?n(e,t,o):t(e);return Ap(i,e,t,o),i}}},_y={methods:{cloneNodesSelection:function(){var e=this,t=[],n=[],o=[],i=[],r=[],a=this.highlightedNodes,s=this.$refs.selector.$el,c=[us,rs,Ni,ws,sn],l=[wt],d=[gt];return"function"===typeof s.getBoundingClientRect&&a.forEach((function(a){if(c.includes(a.type)){var s=e.cloneFlowAndSetNewId(a);n.push(s),t.push(s)}else if(l.includes(a.type)){var u=e.cloneFlowAndSetNewId(a);i.push(u),t.push(u)}else if(d.includes(a.type)){var p=e.cloneFlowAndSetNewId(a);r.push(p),t.push(p)}else{var h=e.cloneElementAndCalculateOffset(a);a.definition&&"bpmn:BoundaryEvent"!==a.definition.$type?t.push(h):o.push(h)}})),t=[].concat(g(t),o),this.connectClonedFlows(n,t),this.connectClonedDataInputAssociations(i,t),this.connectClonedDataOutputAssociations(r,t),t},getDataInputOutputAssociationTargetRef:function(e){if("bpmn:DataInput"===e.targetRef.$type){var t=e.targetRef.$parent;return Dt(t,this)}if("bpmn:DataInputAssociation"===e.targetRef.$type){var n=e.targetRef.$parent;return Dt(n,this)}return e.targetRef},cloneFlowAndSetNewId:function(e){var t=e.cloneFlow(this.nodeRegistry,this.moddle,this.$t);return t.setIds(this.nodeIdGenerator),t},cloneElementAndCalculateOffset:function(e){var t=e.clone(this.nodeRegistry,this.moddle,this.$t),n=this.$refs.selector.$el.getBoundingClientRect(),o=n.height,i=this.paper.scale(),r=i.sy,a=o/r;return t.diagram.bounds.y+=a,t.setIds(this.nodeIdGenerator),t},connectClonedFlows:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef,r=o.definition.targetRef,a=t.find((function(e){return e.cloneOf===i.id})),s=t.find((function(e){return e.cloneOf===r.id}));if(a&&s){e.definition.set("sourceRef",a.definition),e.definition.set("targetRef",s.definition),a.definition.outgoing?a.definition.outgoing.push(e.definition):a.definition.set("outgoing",[e.definition]),s.definition.incoming?s.definition.incoming.push(e.definition):s.definition.set("incoming",[e.definition]);var c=n.$refs.selector.$el.getBoundingClientRect(),l=c.height,d=n.paper.scale(),u=d.sy,p=l/u;e.diagram.waypoint.forEach((function(e){e.y+=p}))}else t.splice(t.indexOf(e),1)}))},connectClonedDataInputAssociations:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef[0],r=t.find((function(e){return e.cloneOf===i.id})),a=n.getDataInputOutputAssociationTargetRef(o.definition),s=t.find((function(e){return e.cloneOf===a.id})),c=Ot(n.moddle,s,r.definition);e.definition.set("sourceRef",[r.definition]),e.definition.set("targetRef",c),s.definition.set("dataInputAssociations",[e.definition])}))},connectClonedDataOutputAssociations:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef||o.definition.$parent,r=o.definition.targetRef,a=t.find((function(e){return e.cloneOf===i.id})),s=t.find((function(e){return e.cloneOf===r.id}));e.definition.set("targetRef",s.definition),e.definition.set("sourceRef",a.definition);var c=a.definition.get("dataOutputAssociations")||[];a.definition.set("dataOutputAssociations",[].concat(g(c),[e.definition]))}))}}},Oy=function(){var e=this,t=e._self._c;return t("div",{staticClass:"rail-container",attrs:{"data-cy":"rail-bottom"}},[t("div",{ref:"railLeftBox",staticClass:"rail-left",style:[e.overlap?{position:"relative"}:{position:"absolute"}]},[t("MiniPaperControl",{directives:[{name:"show",rawName:"v-show",value:e.showComponent,expression:"showComponent"}],attrs:{"paper-manager":e.paperManager,graph:e.graph}}),t("ZoomControl",{ref:"zoomBox",attrs:{"paper-manager":e.paperManager}})],1),t("div",{staticClass:"rail-center",style:[e.overlap?{width:"auto"}:{width:"100%"}]},[t("UndoRedoControl",{directives:[{name:"show",rawName:"v-show",value:e.showComponent,expression:"showComponent"}],ref:"undoRedoBox",attrs:{"is-rendering":e.isRendering},on:{"load-xml":function(t){return e.$emit("load-xml")},clearSelection:function(t){return e.$emit("clearSelection")}}}),t("Controls",{directives:[{name:"show",rawName:"v-show",value:e.showComponent,expression:"showComponent"}],ref:"controlBox",attrs:{nodeTypes:e.nodeTypes},on:{onCreateElement:e.onCreateElementHandler,onSetCursor:e.onSetCursorHandler}})],1)])},Dy=[],Iy=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mini-paper-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"mini-paper-button",class:e.miniMapOpen?"mini-paper-button-active":"",attrs:{type:"button","data-cy":"mini-paper-button",title:e.miniMapOpen?e.$t("Hide Mini-Map"):e.$t("Show Mini-Map")},on:{click:function(t){e.miniMapOpen=!e.miniMapOpen}}},[t("inline-svg",{attrs:{src:e.miniMapIcon}})],1),t("mini-paper",{attrs:{isOpen:e.miniMapOpen,paperManager:e.paperManager,graph:e.graph}})],1)},Ny=[],Ry=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mini-paper-container",class:e.isOpen?"opened":"closed",attrs:{"data-cy":"mini-map-box"},on:{click:e.movePaper}},[t("div",{ref:"miniPaper",staticClass:"mini-paper"})])},jy=[],Ly=new WeakMap,By=function(){function e(t){Ut(this,e),ap(this,Ly,{writable:!0,value:void 0}),Qv(this,Ly,t)}return Wt(e,[{key:"miniMap",get:function(){return lp(this,Ly)}},{key:"scaleMiniMap",value:function(){this.miniMap.scaleContentToFit({padding:10,maxScaleX:.5,maxScaleY:.5})}},{key:"calculateNewPaperPosition",value:function(e,t,n,o,i,r){var a=this.miniMap.paperToLocalPoint(e,t),s=a.x,c=a.y;return{newX:i/2-s*n,newY:r/2-c*o}}}],[{key:"factory",value:function(e,t){var n=new d["dia"].Paper({el:t,model:e,width:230,height:200,interactive:!1});return new this(n)}}]),e}(),Fy={data:function(){return{miniMapManager:null,newX:0,newY:0}},props:{isOpen:{type:Boolean},paperManager:{type:Object},graph:{type:Object}},watch:{isOpen:function(e){e&&this.miniMapManager.scaleMiniMap()}},computed:{miniMap:function(){return this.miniMapManager.miniMap}},methods:{movePaper:function(e){var t=e.offsetX,n=e.offsetY,o=this.paperManager.scale,i=o.sx,r=o.sy,a=this.paperManager.paper.el,s=a.clientWidth,c=a.clientHeight,l=this.miniMapManager.calculateNewPaperPosition(t,n,i,r,s,c),d=l.newX,u=l.newY;this.newX=d,this.newY=u,this.paperManager.translate(this.newX,this.newY)}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return window.Cypress&&(window.MiniPaper=e),t.next=3,e.$nextTick();case 3:e.miniMapManager=By.factory(e.graph,e.$refs.miniPaper),e.paperManager.addEventHandler("render:done",e.miniMapManager.scaleMiniMap,e),window.ProcessMaker.EventBus.$on("modeler-change",(function(){return e.miniMapManager.scaleMiniMap()}));case 6:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){this.paperManager.removeEventHandler("render:done",this.miniMapManager.scaleMiniMap,this)}},zy=Fy,Hy=(n("11cc"),ut(zy,Ry,jy,!1,null,"76e95759",null)),qy=Hy.exports,Vy={components:{InlineSvg:_m.a,MiniPaper:qy},props:{paperManager:Object,graph:Object},data:function(){return{miniMapOpen:!1,miniMapIcon:n("853d")}}},Uy=Vy,Gy=(n("b32f"),ut(Uy,Iy,Ny,!1,null,"7f06057f",null)),Wy=Gy.exports,$y=function(){var e=this,t=e._self._c;return t("div",{staticClass:"zoom-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button",attrs:{type:"button","data-cy":"zoom-out-control",title:e.$t("Zoom Out")},on:{click:e.onClickZoomOut}},[t("inline-svg",{attrs:{src:e.minusIcon}})],1),e.paperManager?t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button zoom-reset",attrs:{"data-cy":"zoom-reset-control",title:e.$t("Reset to initial scale")},on:{click:e.onClickReset}},[e._v(e._s(e.percentageText))]):e._e(),t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button",attrs:{type:"button","data-cy":"zoom-in-control",title:e.$t("Zoom In")},on:{click:e.onClickZoomIn}},[t("inline-svg",{attrs:{src:e.plusIcon}})],1)])},Xy=[],Yy={components:{InlineSvg:_m.a},props:{paperManager:Object},data:function(){return{initialScale:1,minimumScale:.2,scaleStep:.1,minusIcon:n("32f48"),plusIcon:n("2d60")}},computed:{percentageText:function(){return"".concat(Math.round(100*this.$props.paperManager.scale.sx),"%")}},methods:{onClickZoomOut:function(){this.paperManager.scale=Math.max(this.minimumScale,this.paperManager.scale.sx-=this.scaleStep)},onClickZoomIn:function(){this.paperManager.scale=this.paperManager.scale.sx+this.scaleStep},onClickReset:function(){this.paperManager.scale=this.initialScale}}},Zy=Yy,Ky=(n("3061"),ut(Zy,$y,Xy,!1,null,"1cb38178",null)),Jy=Ky.exports,Qy=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ur-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"ur-button",attrs:{type:"button","data-cy":"undo-control",disabled:!e.canUndo,title:e.$t("Undo")},on:{click:e.undo}},[t("inline-svg",{attrs:{src:e.undoIcon}})],1),t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"ur-button",attrs:{type:"button","data-cy":"redo-control",disabled:!e.canRedo,title:e.$t("Redo")},on:{click:e.redo}},[t("inline-svg",{attrs:{src:e.redoIcon}})],1)])},ew=[],tw={components:{InlineSvg:_m.a},props:{isRendering:{type:Boolean}},data:function(){return{undoIcon:n("e69d"),redoIcon:n("ffaa")}},watch:{canUndo:function(e){e||this.$root.$emit("bv::hide::tooltip")},canRedo:function(e){e||this.$root.$emit("bv::hide::tooltip")}},computed:{canUndo:function(){return Xm.getters.canUndo},canRedo:function(){return Xm.getters.canRedo}},methods:{undo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Xm.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Xm.dispatch("redo").then((function(){return e.$emit("load-xml")}))}}},nw=tw,ow=(n("f362"),ut(nw,Qy,ew,!1,null,"379ae012",null)),iw=ow.exports,rw=function(){var e=this,t=e._self._c;return e.controls?t("ul",{staticClass:"control-list"},[e._l(e.controls,(function(n){return t("li",{key:n.id,class:["control-item",{active:e.selectedItem&&e.selectedItem.type===n.type}],attrs:{id:n.id,"data-test":"".concat(n.type,"-main")},on:{click:function(t){return t.stopPropagation(),e.onClickControlHandler(t,n)}}},[t("SubmenuPopper",{attrs:{data:n,selectedItem:e.selectedSubmenuItem,popperType:e.popperType},on:{clickToSubmenu:e.clickToSubmenuHandler}})],1)})),t("li",{staticClass:"control-item"},[t("div",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],class:{"control-add":!0,"control-active":e.explorerOpen},attrs:{title:e.$t("Add")},on:{click:e.toggleExplorer}},[t("inline-svg",{attrs:{src:e.plusIcon}})],1)])],2):e._e()},aw=[],sw=function(){var e=this,t=e._self._c;return e.data.items?t("popper",{attrs:{trigger:"clickToOpen",options:{placement:"top",modifiers:{offset:{offset:"0,5px"},preventOverflow:{escapeWithReference:!0}}},"append-to-body":!0,"visible-arrow":!1,"force-show":e.popperType===e.data.type}},[t("div",[t("ul",{staticClass:"control-submenu"},e._l(e.data.items,(function(n,o){return t("li",{key:o,class:["control-submenu-list",{active:e.selectedItem===n.type}],attrs:{"data-test":n.type},on:{click:function(t){return e.onClickHandler(t,n)}}},[t("inline-svg",{attrs:{src:n.icon,alt:n.label}}),t("div",{staticClass:"control-submenu-list-label"},[e._v(" "+e._s(n.label)+" ")])],1)})),0)]),t("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"control-submenu-item",attrs:{slot:"reference",alt:e.data.label,title:e.$t(e.data.label)},slot:"reference"},[t("div",{staticClass:"control-submenu-options"},[t("span")]),t("inline-svg",{attrs:{src:e.data.icon}})],1)]):t("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"control-submenu-item",attrs:{alt:e.data.label,title:e.$t(e.data.label)}},[t("inline-svg",{attrs:{src:e.data.icon}})],1)},cw=[],lw=n("526e"),dw=n.n(lw),uw=(n("a101"),{props:{data:{type:Object},selectedItem:{type:String},popperType:{type:String}},components:{Popper:dw.a,InlineSvg:_m.a},data:function(){return{wasClickedSubmenu:!1,element:null,wasClicked:!1}},methods:{onClickHandler:function(e,t){e.stopPropagation(),this.$emit("clickToSubmenu",{event:e,control:t})}}}),pw=uw,hw=(n("6840"),ut(pw,sw,cw,!1,null,"acf58eca",null)),fw=hw.exports,mw={components:{SubmenuPopper:fw,InlineSvg:_m.a},props:{nodeTypes:Array},mixins:[dm],data:function(){return{plusIcon:n("2d60"),currentType:null}},created:function(){Kf.dispatch("getUserPinnedObjects")},computed:{controls:function(){return Kf.getters.getPinnedNodeTypes},explorerOpen:function(){return Kf.getters.getExplorerOpen}},methods:{clickToSubmenuHandler:function(e){window.ProcessMaker.EventBus.$off("custom-pointerclick"),this.wasClicked=!1,this.parent=this.selectedItem,this.selectedSubmenuItem=e.control.type,this.onClickHandler(e.event,e.control)},onClickControlHandler:function(e,t){this.selectedSubmenuItem=null,this.popperType=this.currentType===t.type?null:t.type,this.onClickHandler(e,t),this.currentType=this.popperType},toggleExplorer:function(){this.deselect(),this.popperType=null,this.selectedSubmenuItem=null,Kf.commit("toggleExplorer"),Kf.commit("clearFilteredNodes"),Kf.commit("clearFilteredPmBlockNodes")}}},gw=mw,vw=(n("a87b"),ut(gw,rw,aw,!1,null,"0e6b16b8",null)),bw=vw.exports,yw={components:{MiniPaperControl:Wy,ZoomControl:Jy,UndoRedoControl:iw,Controls:bw},props:{paperManager:Object,graph:Object,isRendering:Boolean,nodeTypes:Array},data:function(){return{overlap:!1,widthOverlapControl:0,leftOverlapUndoRedo:0,controlObserver:null}},created:function(){this.controlObserver=new ResizeObserver(this.onControlObserver)},methods:{onCreateElementHandler:function(e){this.$emit("onCreateElement",e)},onSetCursorHandler:function(e){this.$emit("set-cursor",e)},onControlObserver:function(e){var t=e[0].target.getBoundingClientRect(),n=this.$refs.zoomBox.$el.getBoundingClientRect(),o=this.$refs.undoRedoBox.$el.getBoundingClientRect();if(this.overlap){if(t.width<this.widthOverlapControl){var i=window.getComputedStyle(this.$refs.zoomBox.$el),r=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10),a=window.getComputedStyle(this.$refs.railLeftBox),s=parseInt(a.paddingLeft,10)+parseInt(a.paddingRight,10),c=this.leftOverlapUndoRedo+(this.widthOverlapControl-t.width)-r-s;c>n.right&&(this.overlap=!1)}}else o.left<n.right&&(this.overlap=!0,this.widthOverlapControl=t.width,this.leftOverlapUndoRedo=o.left)}},computed:{showComponent:function(){return ze.getters.showComponent}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(Oe["nextTick"])();case 2:e.controlObserver.observe(e.$refs.controlBox.$el);case 3:case"end":return t.stop()}}),t)})))()}},ww=yw,xw=(n("79e3"),ut(ww,Oy,Dy,!1,null,"575d4232",null)),kw=xw.exports,Cw=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Sw=[],Ew=function(e){Bn(n,e);var t=Vn(n);function n(){return Ut(this,n),t.apply(this,arguments)}return Wt(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=yt(this.moddle),r=bt(this.moddle);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var a=n.sourceAnchor,s=n.targetAnchor;i.waypoint=[a,s].map((function(e){return o.moddle.create("dc:Point",e)}));var c=new an(gt,r,i);c.dataAssociationProps={sourceShape:e,targetCoords:{x:void 0,y:void 0}};var l=k()(e,"component.node"),d=l.definition.get("dataOutputAssociations")||[];return l.definition.set("dataOutputAssociations",[].concat(g(d),[c.definition])),c}}],[{key:"isValid",value:function(e){var t=e.sourceShape,n=e.targetShape,o=k()(t,"component.node"),i=k()(n,"component.node");if(!i)return!1;var r=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],a=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],s=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateCatchEvent","bpmn:StartEvent"],c=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],l=o.definition.$type,d=i.definition.$type,u="bpmn:DataStoreReference"===o.definition.$type,p="bpmn:DataObjectReference"===o.definition.$type,h="bpmn:DataStoreReference"===i.definition.$type,f="bpmn:DataObjectReference"===i.definition.$type;return!(!u||!a.includes(d))||(!(!p||!c.includes(d))||(!(!h||!r.includes(l))||f&&s.includes(l)))}},{key:"isValidSourceNode",value:function(e){return!Wn.isNodeDisallowedFromDataAssociation(e)}}]),n}(Wn),Aw=[Ew,as,ms],Mw={name:sn,components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null}},computed:{isValidConnection:function(){var e=this;return Aw.some((function(t){return t.isValid({sourceShape:e.sourceShape,targetShape:e.target,sourceConfig:e.sourceConfig,targetConfig:e.targetConfig})}))},targetType:function(){return k()(this.target,"component.node.type")},shapeName:function(){return this.node.definition.get("name")},nameLabel:{get:function(){return this.shape.label(0).attrs.text.text},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.shape.label(0,{attrs:{text:{text:e}}})}}},watch:{},methods:{completeLink:function(){var e=this,t=Aw.find((function(t){return t.isValid({sourceShape:e.sourceShape,targetShape:e.target,sourceConfig:e.sourceConfig,targetConfig:e.targetConfig})})),n=new t(this.nodeRegistry,this.moddle,this.paper),o=this.shape.findView(this.paper);this.$emit("replace-generic-flow",{actualFlow:n.makeFlowNode(this.sourceShape,this.target,o),genericFlow:this.node,targetNode:k()(this.target,"component.node")})},updateRouter:function(){this.shape.router("normal")},createDefaultFlowMarker:function(){this.shape.attr("line",{strokeWidth:1,strokeDasharray:"2 2"})}},mounted:function(){this.shape=new d["shapes"].standard.Link,this.shape.connector("rounded",{radius:5}),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},Tw=Mw,Pw=ut(Tw,Cw,Sw,!1,null,null,null),_w=Pw.exports,Ow=function(){var e=this,t=e._self._c;return e.showLasso&&e.style?t("div",{ref:"drag",staticClass:"box",style:e.style,attrs:{"data-cy":"selection-box","data-length":e.selected.length}},[t("crown-multiselect",e._g({attrs:{paper:e.paperManager.paper,graph:e.$parent.graph,moddle:e.$parent.moddle,collaboration:e.$parent.collaboration,"process-node":e.$parent.processNode,"plane-elements":e.$parent.planeElements,"is-rendering":e.$parent.isRendering,"dropdown-data":[],"has-pools":e.hasPoolsOrLanesSelected},on:{"save-state":function(t){return e.$emit("save-state")}}},e.$listeners))],1):e._e()},Dw=[],Iw=function(){var e=this,t=e._self._c;return e.isMultiSelect?t("div",{staticClass:"crown-config crown-multiselect",style:e.style,attrs:{role:"menu"}},[e._t("default"),e._l(e.availableButtons,(function(e){return t("button",{key:e.label,staticClass:"crown-button",attrs:{"aria-label":e.label,title:e.label,"data-test":e.testId,role:e.role},on:{click:e.action}},["fpm"===e.iconPrefix?t("font-awesome-icon",{attrs:{icon:[e.iconPrefix,"fa-".concat(e.icon)]}}):t("i",{class:"".concat(e.iconPrefix," fa-").concat(e.icon," text-dark")})],1)})),t("crown-align",{directives:[{name:"show",rawName:"v-show",value:e.showAlignmentButtons,expression:"showAlignmentButtons"}],attrs:{paper:e.paper},on:{"save-state":function(t){return e.$emit("save-state")}}})],2):e._e()},Nw=[],Rw=function(){var e=this,t=e._self._c;return e.isMultiSelect?t("div",{staticClass:"crown-config crown-align",style:e.style,attrs:{role:"menu"}},[e._t("default"),e._l(e.availableButtons,(function(e){return t("button",{key:e.label,staticClass:"crown-button",attrs:{"aria-label":e.label,title:e.label,"data-test":e.testId,role:e.role,disabled:e.disabled},on:{mousedown:function(e){e.stopPropagation(),e.preventDefault()},click:function(t){return t.stopPropagation(),t.preventDefault(),e.action.apply(null,arguments)}}},[t("font-awesome-icon",{attrs:{icon:["fpm","fa-".concat(e.icon)]}})],1)}))],2):e._e()},jw=[],Lw=function(e){return e.position().y+e.size().height},Bw=function(e){return e.position().x},Fw=function(e){return e.position().x+e.size().width/2},zw=function(e){return e.position().y+e.size().height/2},Hw=function(e){return e.position().x+e.size().width},qw=function(e){return e.position().y},Vw=function(e){return Boolean(e&&e.position&&e.size)},Uw={poolLane:"PoolLane",boundaryEvent:"processmaker.components.nodes.boundaryEvent.Shape"},Gw=[Uw.boundaryEvent,Uw.poolLane],Ww=function(e){return!Gw.includes(e.get("type"))};function $w(e){return Vw(e)&&Ww(e)}function Xw(e,t){var n=t-Lw(e);e.translate(0,n)}function Yw(e,t){var n=t-Bw(e);e.translate(n,0)}function Zw(e,t){var n=t-Hw(e);e.translate(n,0)}function Kw(e,t){var n=t-Fw(e);e.translate(n,0)}function Jw(e,t){var n=t-zw(e);e.translate(0,n)}function Qw(e,t){var n=t-qw(e);e.translate(0,n)}function ex(e){var t=cx(e);e.forEach((function(e){Yw(e,t.left)}))}function tx(e){var t=cx(e);e.forEach((function(e){Zw(e,t.right)}))}function nx(e){var t=cx(e);e.forEach((function(e){Qw(e,t.top)}))}function ox(e){var t=cx(e);e.forEach((function(e){Xw(e,t.bottom)}))}function ix(e){var t=cx(e);e.forEach((function(e){Kw(e,t.hMiddle)}))}function rx(e){var t=cx(e);e.forEach((function(e){Jw(e,t.vMiddle)}))}function ax(e){var t=cx(e),n=e.length,o=3;if(!(n<o)){var i=e.reduce((function(e,t){return t.size().height+e}),0),r=e.sort((function(e,t){return zw(e)-zw(t)})),a=t.top+e[0].size().height,s=(t.height-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(Qw(e,a+s),a+=s+e.size().height)}))}}function sx(e){var t=cx(e),n=e.length,o=3;if(!(n<o)){var i=e.reduce((function(e,t){return t.size().width+e}),0),r=e.sort((function(e,t){return Fw(e)-Fw(t)})),a=t.left+e[0].size().width,s=(t.width-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(Yw(e,a+s),a+=s+e.size().width)}))}}function cx(e){if(!e||!e.length||0===e.length)return{left:0,right:0,top:0,bottom:0,width:0,height:0,vMiddle:0,hMiddle:0};var t=function(e){return Vw(e)?e.position().x:0},n=function(e){return Vw(e)?e.position().x+e.size().width:0},o=function(e){return Vw(e)?e.position().y:0},i=function(e){return Vw(e)?e.position().y+e.size().height:0},r=Math.min.apply(Math,g(e.map(t))),a=Math.max.apply(Math,g(e.map(n))),s=Math.min.apply(Math,g(e.map(o))),c=Math.max.apply(Math,g(e.map(i))),l=a-r,d=c-s;return{left:r,right:a,top:s,bottom:c,width:l,height:d,vMiddle:s+d/2,hMiddle:r+l/2}}function lx(e){var t=e.filter((function(e){return $w(e)})),n=cx(e),o=t.length>1;return{can:{align:{left:o&&t.some((function(e){return Bw(e)!==n.left})),horizontalCenter:o&&t.some((function(e){return Fw(e)!==n.hMiddle})),right:o&&t.some((function(e){return Hw(e)!==n.right})),bottom:o&&t.some((function(e){return Lw(e)!==n.bottom})),verticalCenter:o&&t.some((function(e){return zw(e)!==n.vMiddle})),top:o&&t.some((function(e){return qw(e)!==n.top}))},distribute:{horizontally:o&&t.length>2,vertically:o&&t.length>2}},align:{left:function(){return ex(t)},horizontalCenter:function(){return ix(t)},right:function(){return tx(t)},bottom:function(){return ox(t)},verticalCenter:function(){return rx(t)},top:function(){return nx(t)}},distribute:{horizontally:function(){return sx(t)},vertically:function(){return ax(t)}}}}var dx,ux,px,hx,fx={components:{FontAwesomeIcon:xn["FontAwesomeIcon"]},props:{paper:Object,hasPools:Boolean},data:function(){return{runningInCypressTest:Ci(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null,buttons:[{label:this.$t("Align Left"),icon:"align-left",testId:"align-left",role:"menuitem",action:this.alignLeft,condition:"align.left",disabled:!1},{label:this.$t("Center Horizontally"),icon:"center-horizontally",testId:"align-horizontally",role:"menuitem",action:this.centerHorizontally,condition:"align.horizontalCenter",disabled:!1},{label:this.$t("Align Right"),icon:"align-right",testId:"align-right",role:"menuitem",action:this.alignRight,condition:"align.right",disabled:!1},{label:this.$t("Align Bottom"),icon:"align-bottom",testId:"align-bottom",role:"menuitem",action:this.alignBottom,condition:"align.bottom",disabled:!1},{label:this.$t("Center Vertically"),icon:"center-vertically",testId:"center-vertically",role:"menuitem",action:this.centerVertically,condition:"align.verticalCenter",disabled:!1},{label:this.$t("Align Top"),icon:"align-top",testId:"align-top",role:"menuitem",action:this.alignTop,condition:"align.top",disabled:!1},{label:this.$t("Distribute Horizontally"),icon:"distribute-horizontally",testId:"distribute-horizontally",role:"menuitem",action:this.distributeHorizontally,condition:"distribute.horizontally",disabled:!1},{label:this.$t("Distribute Vertically"),icon:"distribute-vertically",testId:"distribute-vertically",role:"menuitem",action:this.distributeVertically,condition:"distribute.vertically",disabled:!1}]}},created:function(){this.$t=this.$t.bind(this),cn["library"].add(gn),cn["library"].add(mn),cn["library"].add(vn),cn["library"].add(bn),cn["library"].add(fn),cn["library"].add(hn),cn["library"].add(wn),cn["library"].add(yn)},watch:{selectedShapes:function(){this.$root.$emit("bv::hide::tooltip")}},computed:{selectedShapes:function(){return this.disableButtons(),lx(ze.getters.highlightedShapes)},isMultiSelect:function(){var e=ze.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return ze.getters.highlightedShapes},availableButtons:function(){var e=this.hasPools;return this.buttons.filter((function(t){return"copy-button"===t.testId?!e:"clone-button"!==t.testId||!e}))}},methods:{disableButtons:function(){var e=lx(ze.getters.highlightedShapes);this.buttons.forEach((function(t){t.disabled=!Object(ft["get"])(e.can,t.condition,!0)}))},alignLeft:function(){this.undoableAction(this.selectedShapes.align.left)},centerHorizontally:function(){this.undoableAction(this.selectedShapes.align.horizontalCenter)},alignRight:function(){this.undoableAction(this.selectedShapes.align.right)},alignBottom:function(){this.undoableAction(this.selectedShapes.align.bottom)},centerVertically:function(){this.undoableAction(this.selectedShapes.align.verticalCenter)},alignTop:function(){this.undoableAction(this.selectedShapes.align.top)},distributeHorizontally:function(){this.undoableAction(this.selectedShapes.distribute.horizontally)},distributeVertically:function(){this.undoableAction(this.selectedShapes.distribute.vertically)},undoableAction:function(e){e(),this.$emit("save-state"),this.disableButtons()},paperNotRendered:function(){return!this.isRendering},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,ze.getters.allowSavingElementPosition&&this.$emit("save-state")},paperDoneRendering:function(){var e=this;if(this.isRendering)return new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown)},setUpPositionHandling:function(){}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig();case 5:case"end":return t.stop()}}),t)})))()}},mx=fx,gx=(n("970e"),n("9669"),ut(mx,Rw,jw,!1,null,"3b497294",null)),vx=gx.exports,bx={props:{paper:Object,hasPools:Boolean},components:{crownAlign:vx,FontAwesomeIcon:xn["FontAwesomeIcon"]},data:function(){return{showAlignmentButtons:!1,runningInCypressTest:Ci(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null,buttons:[{label:"Copy Selection",iconPrefix:"fa",icon:"clipboard",testId:"copy-button",role:"menuitem",action:this.copySelection},{label:"Clone Selection",iconPrefix:"fa",icon:"copy",testId:"clone-button",role:"menuitem",action:this.cloneSelection},{label:"Align",iconPrefix:"fpm",icon:"align-left",testId:"align",role:"menuitem",action:this.showAlign},{label:"Delete Element",iconPrefix:"fa",icon:"trash-alt",testId:"delete-button",role:"menuitem",action:this.deleteElement}]}},created:function(){this.$t=this.$t.bind(this),cn["library"].add(mn)},computed:{isMultiSelect:function(){var e=ze.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return ze.getters.highlightedShapes},availableButtons:function(){var e=this.hasPools;return this.buttons.filter((function(t){return"copy-button"===t.testId?!e:"clone-button"!==t.testId||!e}))}},methods:{showAlign:function(){this.showAlignmentButtons=!this.showAlignmentButtons},copySelection:function(){this.$emit("copy-selection")},cloneSelection:function(){this.$emit("clone-selection")},deleteElement:function(){this.$emit("remove-nodes")},paperNotRendered:function(){return!this.isRendering},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,ze.getters.allowSavingElementPosition&&this.$emit("save-state")},paperDoneRendering:function(){var e=this;if(this.isRendering)return new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown)},setUpPositionHandling:function(){}},mounted:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig();case 5:case"end":return t.stop()}}),t)})))()}},yx=bx,wx=(n("2fe7"),ut(yx,Iw,Nw,!1,null,"4c5325cc",null)),xx=wx.exports,kx={name:"Selection",components:{CrownMultiselect:xx},props:{graph:Object,paperManager:Object,useModelGeometry:Boolean,processNode:Object},data:function(){return{start:null,isSelecting:!1,isSelected:!1,selected:[],conectedLinks:[],dragging:!1,style:{left:"0px",top:"0px",width:"0px",height:"0px"},mouseX:0,mouseY:0,top:0,left:0,initialPosition:null,hasMouseDown:!1,hasMouseMoved:!1,showLasso:!1,isOutOfThePool:!1,stopForceMove:!1,draggableBlackList:[rs],selectionBlackList:[sn],selectableBlackList:[sn],newPool:null,oldPool:null,isValidSelectionLinks:!0,invalidPool:null}},mounted:function(){this.paperManager.paper.on("scale:changed ",this.updateSelectionBox),this.paperManager.paper.on("translate:changed ",this.translateChanged)},computed:{hasPoolsOrLanesSelected:function(){return this.selected.some((function(e){return e.model.component.node.type===Un||e.model.component.node.type===rs}))}},watch:{selected:function(e){this.prepareConectedLinks(e),this.addToHighlightedNodes(e)}},methods:{selectElements:function(e){var t=this;return w(b().mark((function n(){return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$nextTick();case 2:return t.clearSelection(),t.selected=e,t.showLasso=!0,t.isSelected=!0,t.isSelecting=!0,t.start=null,n.next=10,t.$nextTick();case 10:t.updateSelectionBox();case 11:case"end":return n.stop()}}),n)})))()},selectElement:function(e){var t=arguments,n=this;return w(b().mark((function o(){var i;return b().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=t.length>1&&void 0!==t[1]&&t[1],!e.model.component||!n.selectableBlackList.includes(e.model.component.node.type)){o.next=3;break}return o.abrupt("return");case 3:return n.showLasso=!0,n.isSelected=!0,n.isSelecting=!0,n.start=null,i?n.shiftKeySelectionHandler(e):n.selected=[e],n.filterSelected(),o.next=11,n.$nextTick();case 11:!1===ze.getters.isReadOnly&&n.updateSelectionBox();case 12:case"end":return o.stop()}}),o)})))()},shiftKeySelectionHandler:function(e){var t=this;if(!(e&&e.model&&e.model.component&&this.draggableBlackList.includes(e.model.component.node.type))){var n=this.selected.find((function(e){return t.draggableBlackList.includes(e.model.component.node.type)}));if(n)this.selected=[e];else{var o=this.selected.find((function(e){return e.model.component.node.type===Un}));o&&e.model.component.node.type!==Un?this.selected=[e]:e.model.component&&e.model.component.node.type===Un?this.hasOnlyPools(this.selected)?this.selectOrUnselectShape(e):this.selected=[e]:e.model.component&&e.model.component.node.pool&&(o=this.getPool(this.selected),o&&e.model.component.node.pool.id!==o.model.get("id"))?this.selected=[e]:this.selectOrUnselectShape(e)}}},selectOrUnselectShape:function(e){var t=this.selected.find((function(t){return t.id===e.id}));t?this.selected=this.selected.filter((function(t){return t.id!==e.id})):this.selected.push(e)},clearSelection:function(){this.initSelection()},initSelection:function(){this.isSelecting=!1,this.start=null,this.selected=[],this.showLasso=!1,this.isSelected=!1,this.style={left:"0px",top:"0px",width:"0px",height:"0px"}},startSelection:function(e){var t=this.paperManager.paper,n=d["util"].normalizeEvent(e),o=n.clientX,i=n.clientY,r=n.offsetX,a=n.offsetY,s=t.$el.offset();this.clearSelection(),this.isSelecting=!0,this.showLasso=!0,this.start={x:o-s.left+window.pageXOffset+t.$el.scrollLeft(),y:i-s.top+window.pageYOffset+t.$el.scrollTop()},this._offset={x:r,y:a}},updateSelection:function(e){var t=this.paperManager.paper;if(this.isSelecting&&!this.isSelected&&this.start){var n=d["util"].normalizeEvent(e),o=t.$el.offset(),i={x:n.clientX-o.left+window.pageXOffset+t.$el.scrollLeft(),y:n.clientY-o.top+window.pageYOffset+t.$el.scrollTop()},r={height:i.y-this.start.y,width:i.x-this.start.x};this.style.left="".concat(r.width<0?this._offset.x+r.width:this.start.x,"px"),this.style.top="".concat(r.height<0?this._offset.y+r.height:this.start.y,"px"),this.style.width="".concat(Math.abs(r.width),"px"),this.style.height="".concat(Math.abs(r.height),"px")}},endSelection:function(){var e=this.paperManager.paper;if(this.isSelecting&&!this.isSelected){var t=e.$el.offset(),n={left:this.$el.offsetLeft+t.left,top:this.$el.offsetTop+t.top},o=this.$el.clientWidth,i=this.$el.clientHeight,r=Object(d["V"])(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var a=e.scale();o/=a.sx,i/=a.sy;var s=d["g"].rect(r.x,r.y,o,i);this.selected=this.getElementsInSelectedArea(s,{strict:!1}),this.filterSelected(),this.selected&&this.selected.length>0?(this.updateSelectionBox(),this.isSelected=!0):(this.clearSelection(),this.isSelected=!1,this.start=null),this.start=null}},getElementsInSelectedArea:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.paperManager.paper,i=o.findViewsInArea(e,t);return n?(this.graph.getLinks().forEach((function(t){e.intersect(t.getBBox())&&i.push(o.findViewByModel(t))})),i):i},isPositionWithinArea:function(e,t){var n=t.x,o=t.y,i=t.width,r=t.height;return e.x>=n&&e.x<=n+i&&e.y>=o&&e.y<=o+r},prepareConectedLinks:function(e){var t=this,n=this.paperManager.paper;this.conectedLinks=[],this.isValidSelectionLinks=!0,e.forEach((function(e){var o=t.graph.getConnectedLinks(e.model);if(e.model.component&&e.model.component.node.type===Un){var i=e.model.getBBox(),r=n.model.getLinks().filter((function(e){var n=e.getSourcePoint(),o=e.getTargetPoint();return t.isPositionWithinArea(n,i)||t.isPositionWithinArea(o,i)}));r&&(o=[].concat(g(o),g(r)))}o.forEach((function(e){var o=n.findViewByModel(e);t.conectedLinks.some((function(e){return e.id===o.id}))||(t.conectedLinks.push(o),t.validateSelectionLinks(o))}))}))},validateSelectionLinks:function(e){if(this.isValidSelectionLinks){var t=this.selected.find((function(t){return t.model.get("id")===e.model.getSourceElement().get("id")})),n=this.selected.find((function(t){return t.model.get("id")===e.model.getTargetElement().get("id")}));this.isValidSelectionLinks=!(!t||!n)}},getSelectionVertex:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={x:1/0,y:1/0},i={width:0,height:0},r=this.useModelGeometry,a=["PoolLane","standard.Link"];return e.filter((function(e){return n||!a.includes(e.model.get("type"))})).map((function(e){var n=t?e.model.getBBox({useModelGeometry:r}):e.getBBox({useModelGeometry:r}).inflate(7);o.x=Math.min(o.x,n.x),o.y=Math.min(o.y,n.y),i.width=Math.max(i.width,n.x+n.width),i.height=Math.max(i.height,n.y+n.height)})),{minX:o.x,minY:o.y,maxX:i.width,maxY:i.height}},updateSelectionBox:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e||this.isSelecting&&this.style)if(this.selected.length>0){var n=this.getSelectionVertex(this.selected,!1,!0);this.style.left="".concat(n.minX,"px"),this.style.top="".concat(n.minY,"px"),this.left=parseInt(this.style.left),this.top=parseInt(this.style.top),this.style.width="".concat(n.maxX-n.minX,"px"),this.style.height="".concat(n.maxY-n.minY,"px")}else t&&this.clearSelection()},filterSelected:function(){var e=[us,gt,wt,Ni,ws],t=this.selected.filter((function(e){return e.model.component})).filter((function(e){return"processmaker-modeler-pool"===e.model.component.node.type})).map((function(e){return e.model.component.node.id}));this.selected=this.selected.filter((function(n){if(n.model.component&&n.model.component.node.pool)return n.model.component.node.pool&&!t.includes(n.model.component.node.pool.component.node.id);if(n.model.component&&e.includes(n.model.component.node.type)){var o=n.model.getParentCell();if(o.component&&o.component.node.pool)return!t.includes(o.component.node.pool.component.node.id)}return!0}))},translateChanged:function(){this.isSelecting&&this.updateSelectionBox()},hasLanes:function(e){var t=["processmaker-modeler-lane"],n=e.find((function(e){return t.includes(e.model.component.node.type)}));return!!n},hasOnlyLinks:function(e){var t=this.selected.filter((function(e){return"standard.Link"===e.model.get("type")}));return t&&e.length===t.length},hasOnlyPools:function(e){var t=this.selected.filter((function(e){return e.model.component&&e.model.component.node.type===Un}));return t&&e.length===t.length},startDrag:function(e){if(this.$refs.drag){this.stopForceMove=!1,this.dragging=!0,this.hasMouseMoved=!1;var t=d["util"].normalizeEvent(e);this.mouseX=t.clientX,this.mouseY=t.clientY,this.top=this.$refs.drag.offsetTop,this.left=this.$refs.drag.offsetLeft,this.initialPosition={top:this.top,left:this.left},this.hasLanes(this.selected)||this.hasOnlyLinks(this.selected)?this.stopForceMove=!0:this.selected&&1===this.selected.length&&"processmaker.components.nodes.boundaryEvent.Shape"===this.selected[0].model.get("type")&&this.selected[0].model.component.attachToValidTarget(this.selected[0])}},drag:function(e){if(!this.stopForceMove&&this.dragging){this.hasMouseMoved=!0;var t=d["util"].normalizeEvent(e),n=t.clientX-this.mouseX,o=t.clientY-this.mouseY;this.top+=o,this.left+=n,this.mouseX=t.clientX,this.mouseY=t.clientY;var i=this.paperManager.paper.scale();this.style.left="".concat(this.left,"px"),this.style.top="".concat(this.top,"px"),this.translateSelectedShapes(n/i.sx,o/i.sy),this.overPoolDrag(e)}},stopDrag:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.dragging=!1,e.stopForceMove=!1,t.next=4,e.$nextTick();case 4:return t.next=6,e.paperManager.awaitScheduledUpdates();case 6:e.overPoolStopDrag(),e.updateSelectionBox();case 8:case"end":return t.stop()}}),t)})))()},updateFlowsWaypoint:function(){this.conectedLinks.forEach((function(e){if(e.model.component&&"standard.Link"===e.model.get("type")){var t=e.sourceAnchor,n=e.targetAnchor;e.model.component.node.diagram.waypoint=[t].concat(g(e.model.component.shape.vertices()),[n]).map((function(t){return e.model.component.moddle.create("dc:Point",t)}))}}))},translateSelectedShapes:function(e,t,n){var o=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"],i=this.selected.filter((function(e){return!o.includes(e.model.get("type"))}));if(n&&i.filter((function(e){return n.model.get("id")!==e.model.get("id")})),this.selected&&1===this.selected.length&&"processmaker.components.nodes.boundaryEvent.Shape"===this.selected[0].model.get("type"))return this.selected[0].model.translate(e,t),void this.selected[0].model.component.turnInvalidTargetRed();i.forEach((function(n){return n.model.translate(e,t)}))},getShapesFromPoint:function(e){var t=d["util"].normalizeEvent(e),n=t.clientX,o=t.clientY,i=Object(d["V"])(this.paperManager.paper.viewport).toLocalPoint(n,o);return this.paperManager.paper.findViewsFromPoint(i)},addToHighlightedNodes:function(e){if(ze.commit("highlightNode"),e.length>0){var t=e.filter((function(e){return e.model.component})).map((function(e){return e.model.component.node}));ze.commit("addToHighlightedNodes",t)}else ze.commit("highlightNode",this.processNode)},getChildShape:function(e){var t=null,n=this.getShapesFromPoint(e);return 1===n.length?n[0]:(n.forEach((function(e){e.model.get("parent")&&e.model.component.node.type!==rs&&(t=e)})),t)},markSelectedByPoint:function(e){var t=this.getChildShape(e);t&&(this.selected=[t]),this.selected.length>0&&(this.isSelected=!0,this.isSelecting=!0,this.showLasso=!0,this.updateSelectionBox())},getElementsInsideSelector:function(){var e=this.paperManager.paper,t=e.$el.offset(),n={left:this.$el.offsetLeft+t.left,top:this.$el.offsetTop+t.top},o=this.$el.clientWidth,i=this.$el.clientHeight,r=Object(d["V"])(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var a=e.scale();o/=a.sx,i/=a.sy;var s=d["g"].rect(r.x,r.y,o,i);return this.getElementsInSelectedArea(s,{strict:!1})},getPool:function(e){var t=this.paperManager.paper,n=null;return e&&e.length>0&&e.forEach((function(e){var t=e.model;n||t.getParentCell()&&t.getParentCell().component.node.type===Un&&(n=t.getParentCell())})),t.findViewByModel(n)},isNotPoolChilds:function(e){if(e.length>0){var t=e.find((function(e){var t=e.model;return t.component&&t.component.node.type===Un})),n=e.find((function(e){var t=e.model;return t.getParentCell()&&t.getParentCell().component.node.type===Un}));return!!t||!n}return!1},overPoolDrag:function(e){if(!this.isNotPoolChilds(this.selected)){var t=this.getPool(this.selected),n=this.getShapesFromPoint(e),o=n.find((function(e){return e.model.component&&e.model.component.node.type===Un}));this.newPool=null,this.oldPool=null,o?(this.paperManager.setStateValid(),this.invalidPool&&(this.invalidPool.model.component.shape.attr("body/fill",B),this.invalidPool=null),t&&t.model.get("id")!==o.model.get("id")&&(this.newPool=o,this.oldPool=t,this.isOutOfThePool=!1,this.isValidSelectionLinks||(this.isOutOfThePool=!0,this.invalidPool=o,o.model.component.shape.attr("body/fill",P),ze.commit("preventSavingElementPosition")))):(this.isOutOfThePool=!0,ze.commit("preventSavingElementPosition"),this.paperManager.setStateInvalid())}},overPoolStopDrag:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.isNotPoolChilds(e.selected)){t.next=4;break}return e.updateFlowsWaypoint(),e.$emit("save-state"),t.abrupt("return");case 4:e.isOutOfThePool?(e.rollbackSelection(),e.invalidPool&&(e.invalidPool.model.component.shape.attr("body/fill",B),e.invalidPool=null)):(e.updateFlowsWaypoint(),e.newPool?(e.moveElements(e.selected,e.oldPool,e.newPool),e.moveConectedLinks(e.conectedLinks,e.oldPool,e.newPool),e.newPool=null,e.oldPool=null,e.updateLaneChildren(e.selected),e.$emit("save-state")):(e.expandToFitElement(e.selected),e.updateLaneChildren(e.selected),e.$emit("save-state")));case 5:case"end":return t.stop()}}),t)})))()},rollbackSelection:function(){var e=this;return w(b().mark((function t(){var n,o,i,r;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.initialPosition.left-e.left,o=e.initialPosition.top-e.top,e.style.left="".concat(e.initialPosition.left,"px"),e.style.top="".concat(e.initialPosition.top,"px"),i=e.paperManager.paper.scale(),r=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"],e.selected.filter((function(e){return!r.includes(e.model.get("type"))})).forEach((function(e){e.model.translate(n/i.sx,o/i.sy)})),e.isOutOfThePool=!1,t.next=10,ze.commit("allowSavingElementPosition");case 10:return e.paperManager.setStateValid(),t.next=13,e.$nextTick();case 13:return t.next=15,e.paperManager.awaitScheduledUpdates();case 15:e.updateSelectionBox(!0);case 16:case"end":return t.stop()}}),t)})))()},expandToFitElement:function(e){if(e.length>0){var t=e.find((function(e){var t=e.model;return!!t.getParentCell()&&t.getParentCell().component.node.type===Un})).model.getParentCell(),n=this.getSelectionVertex(this.selected,!0),o=t.getBBox(),i=o.x,r=o.y,a=o.width,s=o.height,c=n.maxX-n.minX,l=n.maxY-n.minY,d=n.minX-i,u=n.minY-r,p=d+c,h=d,f=u,m=u+l,g=0,v=0,b="bottom",y="right";p>a-Ah&&(g=p+Ah),h<Ch+Ah&&(g=a+(Ch+Ah-h),y="left"),f<Ah&&(v=Ah-f+s,b="top"),m>s&&(v=m+Ah),(g||v)&&(t.resize(Math.max(g,a),Math.max(v,s),{direction:"".concat(b,"-").concat(y)}),t.component.fixResizeRounding(),t.component.laneSet&&(t.component.resizeLanes(),t.component.sortedLanes().forEach((function(e){ze.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),t.component.updateAnchorPointPosition(),ze.commit("updateNodeBounds",{node:t.component.node,bounds:t.getBBox()}))}},updateLaneChildren:function(e){if(e){var t=e.find((function(e){var t=e.model;return!!t.getParentCell()&&t.getParentCell().component.node.type===Un}));t&&(t.model.getParentCell(),t.model.component.laneSet&&t.component.updateLaneChildren())}},moveElements:function(e,t,n){var o=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"];e.filter((function(e){return!o.includes(e.model.get("type"))})).forEach((function(e){t.model.component.moveElement(e.model,n.model)}))},moveConectedLinks:function(e,t,n){e.forEach((function(e){t.model.component.moveFlow(e.model,n.model)}))}}},Cx=kx,Sx=(n("4ff9"),ut(Cx,Ow,Dw,!1,null,"82f4c144",null)),Ex=Sx.exports,Ax={components:{ToolBar:Yb,ExplorerRail:Sm,InspectorButton:Nm,InspectorPanel:$m,ProcessmakerModelerGenericFlow:_w,Selection:Ex,RailBottom:kw},props:{owner:Object,decorations:{type:Object,default:function(){return{}}},readOnly:{type:Boolean,default:function(){return!1}},validationBar:Array,requestIdleNodes:{type:Array,default:function(){return[]}},requestCompletedNodes:{type:Array,default:function(){return[]}},requestInProgressNodes:{type:Array,default:function(){return[]}}},mixins:[ly,_y],data:function(){return{pasteInProgress:!1,cloneInProgress:!1,internalClipboard:[],tooltipTarget:null,parsers:{},extensions:[],nodeRegistry:{},graph:null,paper:null,paperManager:null,definitions:null,nodeIdGenerator:null,planeElements:null,canvasDragPosition:null,processNode:null,collaboration:null,moddle:null,allowDrop:!0,poolTarget:null,processes:[],cursor:null,parentHeight:null,parentWidth:null,linter:null,validationErrors:{},miniMapOpen:!1,panelsCompressed:!1,isOpenInspector:!1,isGrabbing:!1,isRendering:!1,allWarnings:[],nodeTypes:[],pmBlockNodes:[],breadcrumbData:[],activeNode:null,xmlManager:null,previouslyStackedShape:null,keyMod:this.isAppleOS()?"Command":"Control",canvasScale:1,initialScale:1,minimumScale:.2,scaleStep:.1,isDragging:!1,isSelecting:!1,isIntoTheSelection:!1,dragStart:null}},watch:{isRendering:function(){var e="Loading process, please be patient.";if(this.isRendering)return window.ProcessMaker.alert(e,"warning"),document.body.style.cursor="wait !important",void(this.cursor="wait");window.ProcessMaker.navbar.alerts=window.ProcessMaker.navbar.alerts.filter((function(t){return t.alertText!==e})),document.body.style.cursor="auto",this.cursor=null},currentXML:function(){this.validateIfAutoValidateIsOn()},definitions:function(){this.validateIfAutoValidateIsOn()},autoValidate:function(){this.validateIfAutoValidateIsOn()},canvasScale:function(e){this.paperManager.scale=e}},computed:{noElementsSelected:function(){return 0===this.highlightedNodes.filter((function(e){return!e.isType("processmaker-modeler-process")})).length},tooltipTitle:function(){if(this.tooltipTarget)return this.tooltipTarget.$el.data("title")},autoValidate:function(){return ze.getters.autoValidate},nodes:function(){return ze.getters.nodes},currentXML:function(){return Xm.getters.currentState},copiedElements:function(){return ze.getters.copiedElements},highlightedNode:function(){return ze.getters.highlightedNodes[0]},highlightedNodes:function(){return ze.getters.highlightedNodes},invalidNodes:function(){return Ay(this.validationErrors,this.nodes)},showComponent:function(){return ze.getters.showComponent}},methods:{handleToggleInspector:function(e){this.isOpenInspector=e},isAppleOS:function(){return"undefined"!==typeof navigator&&/Mac|iPad|iPhone/.test(navigator.platform)},shapeResize:function(){var e=arguments,t=this;return w(b().mark((function n(){var o;return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=!(e.length>0&&void 0!==e[0])||e[0],n.next=3,t.$nextTick();case 3:return n.next=5,t.paperManager.awaitScheduledUpdates();case 5:t.$refs.selector.updateSelectionBox(!0,o);case 6:case"end":return n.stop()}}),n)})))()},toggleDefaultFlow:function(e){var t=e.definition.sourceRef;t.default&&t.default.id===e.id&&(e=null),t.set("default",e)},cloneElement:function(e,t){var n=e.clone(this.nodeRegistry,this.moddle,this.$t),o=(e.diagram.bounds.height+30)*t;n.diagram.bounds.y+=o,this.addNode(n)},copyElement:function(){var e=[us,gt,wt,sn,qm],t=[uv,yv,Mv,Rv,Vv,Kv];1===this.highlightedNodes.length&&(e.includes(this.highlightedNodes[0].type)||t.includes(this.highlightedNodes[0].type))||(ze.commit("setCopiedElements",this.cloneNodesSelection()),this.$bvToast.toast(this.$t("Object(s) have been copied"),{noCloseButton:!0,variant:"success",solid:!0,toaster:"b-toaster-top-center"}))},publishTemplate:function(){this.$emit("publishTemplate")},publishPmBlock:function(){this.$emit("publishPmBlock")},pasteElements:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!(e.copiedElements.length>0)||e.pasteInProgress){t.next=21;break}return e.pasteInProgress=!0,t.prev=2,t.next=5,e.addClonedNodes(e.copiedElements);case 5:return t.next=7,e.$nextTick();case 7:return t.next=9,e.paperManager.awaitScheduledUpdates();case 9:return t.next=11,e.$refs.selector.selectElements(e.findViewElementsFromNodes(e.copiedElements),!0);case 11:return t.next=13,e.$nextTick();case 13:return t.next=15,ze.commit("setCopiedElements",e.cloneNodesSelection());case 15:e.scrollToSelection();case 16:return t.prev=16,e.pasteInProgress=!1,t.next=20,e.pushToUndoStack();case 20:return t.finish(16);case 21:case"end":return t.stop()}}),t,null,[[2,,16,21]])})))()},cloneSelection:function(){var e=this;return w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.cloneNodesSelection(),!n||0!==n.length){t.next=3;break}return t.abrupt("return");case 3:return t.prev=3,e.cloneInProgress=!0,e.$refs.selector.clearSelection(),t.next=8,e.addClonedNodes(n);case 8:return t.next=10,e.$nextTick();case 10:return t.next=12,e.paperManager.awaitScheduledUpdates();case 12:return t.next=14,e.$refs.selector.selectElements(e.findViewElementsFromNodes(n));case 14:e.scrollToSelection();case 15:return t.prev=15,e.cloneInProgress=!1,t.next=19,e.pushToUndoStack();case 19:return t.finish(15);case 20:case"end":return t.stop()}}),t,null,[[3,,15,20]])})))()},scrollToSelection:function(){var e=this.$refs["paper-container"].getBoundingClientRect(),t=this.$refs.selector,n=t.$el.getBoundingClientRect();if(n.right>e.right||n.bottom>e.bottom||n.left<e.left||n.top<e.top){var o=this.paper.translate(),i=o.ty-(n.top-e.top-n.height);this.paper.translate(o.tx,i),t.updateSelectionBox(!0)}},findViewElementsFromNodes:function(e){var t=this;return e.map((function(e){var n=t.$refs.nodeComponent.find((function(t){return t.node===e})),o=n.shape;return t.paper.findViewByModel(o)}))},close:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$emit("close");case 1:case"end":return t.stop()}}),t)})))()},saveBpmn:function(){var e=this;return w(b().mark((function t(){var n,o,i,r,a;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=document.querySelector(".mini-paper svg"),o="text { font-family: sans-serif; }",i=document.createElement("style"),i.appendChild(document.createTextNode(o)),n.appendChild(i),t.next=7,e.getXmlFromDiagram();case 7:r=t.sent,a=(new XMLSerializer).serializeToString(n),e.$emit("saveBpmn",{xml:r,svg:a});case 10:case"end":return t.stop()}}),t)})))()},borderOutline:function(e){return this.decorations.borderOutline&&this.decorations.borderOutline[e]},addWarning:function(e){this.allWarnings.push(e),this.$emit("warnings",this.allWarnings)},validatePlaneElements:function(){var e=this;this.planeElements.filter((function(e){return!e.bpmnElement})).map((function(t){return{title:e.$t("Non-existent Element"),text:e.$t("bpmdi:BPMNShape ")+t.id+e.$t(" references a non-existent element and was not parsed")}})).forEach((function(t){return e.addWarning(t)}))},cleanPlaneElements:function(){Am()(this.planeElements,(function(e){return!e.bpmnElement}))},getTooltipTarget:function(){return this.tooltipTarget.$el[0]},validateIfAutoValidateIsOn:function(){this.autoValidate&&this.validateBpmnDiagram()},translateConfig:function(e){if(e.config){var t=e.config;t.label=this.$t(t.label),t.helper=this.$t(t.helper)}e.items&&e.items.forEach(this.translateConfig)},pushToUndoStack:function(){var e=this;return w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.pasteInProgress&&!e.cloneInProgress){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,e.getXmlFromDiagram();case 5:return n=t.sent,t.next=8,Xm.dispatch("pushState",n);case 8:window.ProcessMaker.EventBus.$emit("modeler-change"),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](2),console.warn(t.t0.message);case 14:case"end":return t.stop()}}),t,null,[[2,11]])})))()},getXmlFromDiagram:function(){var e=this;return new Promise((function(t,n){e.toXML((function(e,o){e?n(e):t(o)}))}))},validateBpmnDiagram:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(ze.getters.globalProcesses&&0!==ze.getters.globalProcesses.length){t.next=3;break}return t.next=3,ze.dispatch("fetchGlobalProcesses");case 3:return t.next=5,e.linter.lint(e.definitions);case 5:e.validationErrors=t.sent,e.$emit("validate",e.validationErrors);case 7:case"end":return t.stop()}}),t)})))()},setPools:function(e){var t;(this.collaboration||(this.collaboration=this.moddle.create("bpmn:Collaboration"),this.definitions.get("rootElements").push(this.collaboration),this.collaboration.set("id","collaboration_0"),this.plane.set("bpmnElement",this.collaboration)),e.get("processRef"))?this.collaboration.get("participants").includes(e)||this.collaboration.get("participants").push(e):(0===this.collaboration.get("participants").length?t=this.processNode.definition:(t=this.moddle.create("bpmn:Process"),this.processes.push(t),t.set("id",this.nodeIdGenerator.generateProcessId()),this.definitions.get("rootElements").push(t)),e.set("processRef",t),this.collaboration.get("participants").push(e))},unsetPools:function(){ki()(this.definitions.get("rootElements"),this.collaboration),this.plane.set("bpmnElement",this.processNode.definition),this.collaboration=null},highlightNode:function(e,t){if(e&&this.highlightedNode)if(t&&t.shiftKey)ze.commit("addToHighlightedNodes",[e]);else{var n=mt.a.isEqual(e.id,this.highlightedNode.id);n||ze.commit("highlightNode",e)}},blurFocusedScreenBuilderElement:function(){var e=["INPUT","SELECT"];e.includes(document.activeElement&&document.activeElement.tagName)&&document.activeElement.blur()},registerStatusBar:function(e){this.owner.validationBar.push(e)},registerComponentMixin:function(e,t){e.mixins||(e.mixins=[]),e.mixins.push(t)},registerBpmnExtension:function(e,t){this.extensions[e]=t},registerNode:function(e,t){var n=this,o=function(){return e.id},i=function(t){if(t.get("implementation")===e.implementation)return e.id};this.translateConfig(e.inspectorConfig[0]),Py(e),this.nodeRegistry[e.id]=e,De.a.component(e.id,e.component),this.nodeTypes.push(e);var r=Array.isArray(e.bpmnType)?e.bpmnType:[e.bpmnType];r.forEach((function(r){n.parsers[r]||(n.parsers[r]={custom:[],implementation:[],default:[]}),t?n.parsers[r].custom.push(t):e.implementation?n.parsers[r].implementation.push(i):n.parsers[r].default.push(o)}))},registerPmBlock:function(e,t){var n=this,o=function(){return e.id};this.translateConfig(e.inspectorConfig[0]),Py(e),this.nodeRegistry[e.id]=e,De.a.component(e.id,e.component),this.pmBlockNodes.push(e);var i=Array.isArray(e.bpmnType)?e.bpmnType:[e.bpmnType];i.forEach((function(e){t?n.parsers[e].custom.push(t):n.parsers[e].default.push(o)})),Kf.commit("setPmBlockNodeTypes",this.pmBlockNodes)},addMessageFlows:function(){this.collaboration&&this.collaboration.get("messageFlows").filter(this.hasSourceAndTarget).forEach(this.setNode)},loadAssociations:function(e,t){var n=this;t.filter((function(e){return"bpmn:Association"===e.$type&&n.hasSourceAndTarget(e)})).forEach((function(o){return n.setNode(o,e,t)}))},loadDataAssociations:function(e){var t=this,n=e.filter((function(e){return e.get("dataOutputAssociations")&&e.get("dataOutputAssociations").length>0}));n.forEach((function(n){n.get("dataOutputAssociations").forEach((function(n){t.setNode(n,e)}))}));var o=e.filter((function(e){return e.get("dataInputAssociations")&&e.get("dataInputAssociations").length>0}));o.forEach((function(n){n.get("dataInputAssociations").forEach((function(n){t.setNode(n,e)}))}))},loadArtifacts:function(e,t){var n=this;t.filter((function(e){return"bpmn:Association"!==e.$type})).forEach((function(o){return n.setNode(o,e,t)}))},loadSequenceFlows:function(e,t){var n=this;e.filter((function(e){return"bpmn:SequenceFlow"===e.$type&&n.hasSourceAndTarget(e)})).forEach((function(o){return n.setNode(o,e,t)}))},loadFlowElements:function(e,t){var n=this;e.filter((function(e){return"bpmn:SequenceFlow"!==e.$type})).forEach((function(o){return n.setNode(o,e,t)}))},addLanes:function(e){e.get("laneSets")[0]&&e.laneSets[0].lanes.forEach(this.setNode)},addPools:function(){this.collaboration&&this.collaboration.get("participants").forEach(this.setNode)},setUpDiagram:function(){var e=this;this.processes.forEach((function(t){e.ensureCancelActivityIsAddedToBoundaryEvents(t),e.addLanes(t);var n=t.get("flowElements"),o=t.get("artifacts");e.loadFlowElements(n,o),e.loadSequenceFlows(n,o),e.loadArtifacts(n,o),e.loadAssociations(n,o),e.loadDataAssociations(n)})),ze.commit("setRootElements",this.definitions.rootElements),this.addMessageFlows(),ze.commit("highlightNode",this.processNode)},getCollaboration:function(){return this.definitions.rootElements.find((function(e){var t=e.$type;return"bpmn:Collaboration"===t}))},getProcesses:function(){return this.definitions.rootElements.filter((function(e){var t=e.$type;return"bpmn:Process"===t}))},getPlane:function(){return this.definitions.diagrams[0].plane},getPlaneElements:function(){return this.plane.get("planeElement")},parse:function(){var e=this;this.collaboration=this.getCollaboration(),this.processes=this.getProcesses(),this.plane=this.getPlane(),this.planeElements=this.getPlaneElements(),this.validatePlaneElements(),this.cleanPlaneElements(),this.processNode=new an("processmaker-modeler-process",this.processes[0],this.planeElements.find((function(t){return t.bpmnElement.id===e.processes[0].id})))},removeUnsupportedElementAttributes:function(e){var t=["extensionElements"];t.filter((function(t){return e.get(t)})).forEach((function(t){return e.set(t,void 0)}))},getCustomParser:function(e){var t=this,n=this.parsers[e.$type];if(n){var o=n.custom.find((function(n){return n(e,t.moddle)})),i=n.implementation.find((function(n){return n(e,t.moddle)})),r=n.default.find((function(n){return n(e,t.moddle)}));return o||i||r}},handleUnsupportedElement:function(e,t,n,o,i){this.addWarning({title:this.$t("Unsupported Element"),text:e+this.$t(" is an unsupported element type in parse")}),ki()(t,n),ki()(o,n),ki()(this.planeElements,i),this.collaboration&&ki()(this.collaboration.get("messageFlows"),n);var r=n.get("incoming");r&&ki()(t,r);var a=n.get("outgoing");a&&ki()(t,a)},setNode:function(e,t,n){var o=this.planeElements.find((function(t){return t.bpmnElement.id===e.id})),i=e.$type,r=this.getCustomParser(e);if(r){this.removeUnsupportedElementAttributes(e);var a=r(e,this.moddle),s=["bpmn:TextAnnotation","bpmn:Association","bpmn:DataOutputAssociation","bpmn:DataInputAssociation"],c=-1===s.indexOf(i);c&&!e.get("name")&&e.set("name","");var l=this.createNode(a,e,o);ze.commit("addNode",l)}else this.handleUnsupportedElement(i,t,e,n,o)},createNode:function(e,t,n){return an.isTimerType(e)?new hy(e,t,n):(Object.keys(t).forEach((function(e){void 0!==t[e]&&null!==t[e]||delete t[e]})),new an(e,t,n))},hasSourceAndTarget:function(e){var t=e.sourceRef&&this.parsers[e.sourceRef.$type],n=e.targetRef&&this.parsers[e.targetRef.$type];return t&&n},waitForCursorToChange:function(){var e=this;return w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=300,t.next=3,e.$nextTick();case 3:return t.abrupt("return",new Promise((function(e){return setTimeout(e,n)})));case 4:case"end":return t.stop()}}),t)})))()},renderPaper:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isRendering=!0,t.next=3,e.paperManager.performAtomicAction(w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.waitForCursorToChange();case 2:e.parse(),e.addPools(),e.setUpDiagram();case 5:case"end":return t.stop()}}),t)}))));case 3:return t.next=5,e.paperManager.awaitScheduledUpdates();case 5:e.isRendering=!1,e.$emit("parsed");case 7:case"end":return t.stop()}}),t)})))()},loadXML:function(){var e=arguments,t=this;return w(b().mark((function n(){var o,i;return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=e.length>0&&void 0!==e[0]?e[0]:null,i=!1,null===o&&(o=t.currentXML,i=!0),n.next=5,t.xmlManager.getDefinitionsFromXml(o);case 5:return t.definitions=n.sent,t.xmlManager.definitions=t.definitions,t.nodeIdGenerator=Cp(t.definitions),ze.commit("clearNodes"),n.next=11,t.renderPaper();case 11:i&&window.ProcessMaker.EventBus.$emit("modeler-change");case 12:case"end":return n.stop()}}),n)})))()},getBoundaryEvents:function(e){return e.get("flowElements").filter((function(e){var t=e.$type;return"bpmn:BoundaryEvent"===t}))},createBoundaryEvent:function(e){var t=Gf.definition(this.moddle,this.$t);return t.set("id",e.get("id")),t.set("name",e.get("name")),t.set("eventDefinitions",e.get("eventDefinitions")),t.set("cancelActivity",e.get("cancelActivity")),t.set("attachedToRef",e.get("attachedToRef")),t.set("color",e.get("color")),t.$parent=e.$parent,e.get("outgoing").length>0&&t.set("outgoing",e.get("outgoing")),t},ensureCancelActivityIsAddedToBoundaryEvents:function(e){var t=this;this.getBoundaryEvents(e).forEach((function(n){var o=t.createBoundaryEvent(n);n.get("outgoing").forEach((function(e){return e.set("sourceRef",o)})),t.replaceDefinition(n,o,e)}))},replaceDefinition:function(e,t,n){var o=n.get("flowElements").indexOf(e);n.flowElements[o]=t;var i=this.planeElements.find((function(t){return t.bpmnElement===e}));i.bpmnElement=t},toXML:function(e){this.moddle.toXML(this.definitions,{format:!0},e)},onCreateElementHandler:function(e){var t=e.event,n=e.control;this.handleDrop({clientX:t.clientX,clientY:t.clientY,control:n})},handleDrop:function(e){var t=this;return w(b().mark((function n(){var o,i,r,a,s,c,l,d,u,p,h;return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=e.clientX,i=e.clientY,r=e.control,a=e.nodeThatWillBeReplaced,t.validateDropTarget({clientX:o,clientY:i,control:r}),t.allowDrop){n.next=4;break}return n.abrupt("return");case 4:return s=t.nodeRegistry[r.type].definition(t.moddle,t.$t),c=t.nodeRegistry[r.type].diagram(t.moddle),l=t.paperManager.clientToGridPoint(o,i),d=l.x,u=l.y,c.bounds.x=d,c.bounds.y=u,p=t.createNode(r.type,s,c),p.isBpmnType("bpmn:BoundaryEvent")&&t.setShapeCenterUnderCursor(c),t.highlightNode(p),n.next=14,t.addNode(p);case 14:if(a){n.next=16;break}return n.abrupt("return");case 16:return h=new My(a,s,t.graph,p,t.processes,t.collaboration),h.migrate(),n.abrupt("return",p);case 19:case"end":return n.stop()}}),n)})))()},setShapeCenterUnderCursor:function(e){e.bounds.x-=e.bounds.width/2,e.bounds.y-=e.bounds.height/2},selectNewNode:function(e){var t=this;return w(b().mark((function n(){var o,i;return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$nextTick();case 2:return n.next=4,t.paperManager.awaitScheduledUpdates();case 4:return o=t.$refs.nodeComponent.find((function(t){return t.node===e})),i=o.shapeView,n.next=8,t.$refs.selector.selectElement(i);case 8:case"end":return n.stop()}}),n)})))()},addNode:function(e){var t=this;return w(b().mark((function n(){var o;return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.pool||(e.pool=t.poolTarget),o=e.getTargetProcess(t.processes,t.processNode),Zb(e,o),e.setIds(t.nodeIdGenerator),t.planeElements.push(e.diagram),ze.commit("addNode",e),t.poolTarget=null,![us,rs,Ni,ws,gt,wt,sn].includes(e.type)){n.next=9;break}return n.abrupt("return");case 9:return t.selectNewNode(e),n.abrupt("return",new Promise((function(e){setTimeout((function(){t.pushToUndoStack(),e()}))})));case 11:case"end":return n.stop()}}),n)})))()},addClonedNodes:function(e){var t=this;return w(b().mark((function n(){return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.forEach((function(e){e.pool||(e.pool=t.poolTarget);var n=e.getTargetProcess(t.processes,t.processNode);Zb(e,n),t.planeElements.push(e.diagram),ze.commit("addNode",e),t.poolTarget=null}));case 1:case"end":return n.stop()}}),n)})))()},removeNode:function(e){var t=arguments,n=this;return w(b().mark((function o(){var i,r,a;return b().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=t.length>1&&void 0!==t[1]?t[1]:{},r=i.removeRelationships,a=void 0===r||r,e){o.next=3;break}return o.abrupt("return");case 3:return a&&(Et(e,n),At(e,n),Mt(e,n)),Pt(e),Tt(n.graph,e,n.removeNode),_t(e),n.removeNodesFromLane(e),n.removeNodesFromPool(e),ze.commit("removeNode",e),ze.commit("highlightNode",n.processNode),n.$refs.selector.clearSelection(),o.next=14,n.$nextTick();case 14:return o.next=16,n.pushToUndoStack();case 16:n.processes=n.getProcesses(),n.processes&&n.processes.length>0&&(n.processNode=new an("processmaker-modeler-process",n.processes[0],n.planeElements.find((function(e){return e.bpmnElement.id===n.processes[0].id}))));case 18:case"end":return o.stop()}}),o)})))()},removeNodes:function(){var e=this;return w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.performSingleUndoRedoTransaction(w(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.paperManager.performAtomicAction(w(b().mark((function t(){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=[],e.highlightedNodes.forEach((function(t){return n.push(e.removeNode(t,{removeRelationships:!0}))})),t.next=4,Promise.all(n);case 4:ze.commit("highlightNode");case 5:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})))()},replaceNode:function(e){var t=this,n=e.node,o=e.typeToReplaceWith;this.performSingleUndoRedoTransaction(w(b().mark((function e(){return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(w(b().mark((function e(){var i,r,a,s;return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.paper.localToClientPoint(n.diagram.bounds),r=i.x,a=i.y,e.next=3,t.handleDrop({clientX:r,clientY:a,control:{type:o},nodeThatWillBeReplaced:n});case 3:return s=e.sent,e.next=6,t.removeNode(n,{removeRelationships:!1});case 6:t.highlightNode(s),t.selectNewNode(s);case 8:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)}))))},replaceGenericFlow:function(e){var t=this,n=e.actualFlow,o=e.genericFlow,i=e.targetNode;this.performSingleUndoRedoTransaction(w(b().mark((function e(){return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(w(b().mark((function e(){return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.highlightNode(null);case 2:return e.next=4,t.$nextTick();case 4:return e.next=6,t.addNode(n);case 6:return e.next=8,ze.commit("removeNode",o);case 8:return e.next=10,t.$nextTick();case 10:return e.next=12,t.highlightNode(i);case 12:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)}))))},performSingleUndoRedoTransaction:function(e){var t=this;return w(b().mark((function n(){return b().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return Xm.commit("disableSavingState"),n.next=3,e();case 3:return Xm.commit("enableSavingState"),n.next=6,t.pushToUndoStack();case 6:case"end":return n.stop()}}),n)})))()},removeNodesFromLane:function(e){var t=e.pool&&e.pool.component.laneSet&&e.pool.component.laneSet.get("lanes").find((function(t){return t.get("flowNodeRef").includes(e.definition)}));t&&ki()(t.get("flowNodeRef"),e.definition)},removeNodesFromPool:function(e){var t=this;if("processmaker-modeler-pool"===e.type&&e.definition.processRef){e.definition.processRef.artifacts&&e.definition.processRef.artifacts.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)})),e.definition.processRef.flowElements&&e.definition.processRef.flowElements.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)}));var n=e.definition.processRef.laneSets;n&&n.length>0&&n[0].lanes.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)}))}},handleResize:function(){var e=this.$el.parentElement,t=e.clientWidth,n=e.clientHeight;this.parentWidth=t+"px",this.parentHeight=n+"px",this.paperManager.setPaperDimensions(t,n)},validateDropTarget:function(e){var t=e.clientX,n=e.clientY,o=e.control,i=Fg(t,n,o,this.paperManager.paper,this.graph,this.collaboration,this.$refs["paper-container"]),r=i.allowDrop,a=i.poolTarget;this.allowDrop=r,this.poolTarget=a},isBpmnNode:function(e){return null!=e.component},setShapeStacking:function(e){var t=this;this.isRendering||!e.component.node.isType("processmaker-modeler-pool")&&e===this.previouslyStackedShape||(this.previouslyStackedShape=e,this.paperManager.performAtomicAction((function(){return sb(e,t.graph)})))},showSavedNotification:function(){Xm.dispatch("saved")},enableVersions:function(){Xm.dispatch("enableVersions")},setVersionIndicator:function(e){Xm.dispatch("setVersionIndicator",e)},setLoadingState:function(e){Xm.dispatch("setLoadingState",e)},clearSelection:function(){this.$refs.selector.clearSelection()},isPointInSelection:function(e){var t=this.$refs.selector.$el;if("function"===typeof t.getBoundingClientRect){var n=t.getBoundingClientRect(),o=n.x,i=n.y,r=n.width,a=n.height;if(e.clientX>=o&&e.clientX<=o+r&&e.clientY>=i&&e.clientY<=i+a)return!0}return!1},pointerDowInShape:function(e,t){var n=this;return w(b().mark((function o(){var i,r,a;return b().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=e.clientX,r=e.clientY,a=n.paper.findViewByModel(t),n.isDragging=!1,n.isSelecting=!1,n.isIntoTheSelection=!1,n.dragStart={x:i,y:r},!n.isPointInSelection(e)){o.next=10;break}n.isIntoTheSelection=!0,o.next=15;break;case 10:if(e.shiftKey){o.next=15;break}return o.next=13,n.$refs.selector.selectElement(a);case 13:return o.next=15,n.$nextTick();case 15:n.$refs.selector.startDrag({clientX:e.clientX,clientY:e.clientY});case 16:case"end":return o.stop()}}),o)})))()},pointerDownHandler:function(e){var t=e.clientX,n=e.clientY;this.isDragging=!1,this.isSelecting=!1,this.isIntoTheSelection=!1,this.dragStart={x:t,y:n},this.isPointInSelection(e)?(this.isIntoTheSelection=!0,this.$refs.selector.startDrag({clientX:e.clientX,clientY:e.clientY})):(this.isSelecting=!0,this.$refs.selector.startSelection(e))},pointerMoveHandler:function(e){var t=e.clientX,n=e.clientY;ze.getters.isReadOnly?this.canvasDragPosition&&!this.clientLeftPaper&&this.paperManager.translate(e.offsetX-this.canvasDragPosition.x,e.offsetY-this.canvasDragPosition.y):this.isGrabbing||(this.dragStart&&(Math.abs(t-this.dragStart.x)>5||Math.abs(n-this.dragStart.y)>5)?(this.isDragging=!0,this.dragStart=null):this.isSelecting?this.$refs.selector.updateSelection(e):this.isDragging&&this.$refs.selector.drag(e))},pointerUpHandler:function(e,t){!this.isDragging&&this.dragStart?t?this.$refs.selector.selectElement(t,e.shiftKey):this.clearSelection():this.isSelecting?this.$refs.selector.endSelection(this.paperManager.paper):this.$refs.selector.stopDrag(e),window.ProcessMaker.EventBus.$emit("custom-pointerclick",e),this.isDragging=!1,this.dragStart=null,this.isSelecting=!1}},created:function(){Ci()&&(window.store=ze,window.undoRedoStore=Xm),this.$t=this.$t.bind(this),window.ProcessMaker.EventBus.$emit("modeler-before-init",{registerComponentMixin:this.registerComponentMixin}),this.registerNode(Vm),window.ProcessMaker.EventBus.$emit("modeler-init",{registerInspectorExtension:nb,registerBpmnExtension:this.registerBpmnExtension,registerNode:this.registerNode,registerStatusBar:this.registerStatusBar,registerPmBlock:this.registerPmBlock}),this.moddle=new $f.a(this.extensions),this.linter=new Ym["Linter"](Bg),this.xmlManager=new ky(this.moddle),this.$emit("set-xml-manager",this.xmlManager)},mounted:function(){var e=this;ze.commit("setReadOnly",this.readOnly),this.graph=new d["dia"].Graph,ze.commit("setGraph",this.graph),this.graph.set("interactiveFunc",(function(e){var t="standard.EmbeddedImage"===e.model.get("type");return{elementMove:t,labelMove:!1}})),this.paperManager=tb.factory(this.$refs.paper,this.graph.get("interactiveFunc"),this.graph),this.paper=this.paperManager.paper,this.paperManager.addEventHandler("cell:pointerdblclick",fy),this.handleResize(),window.addEventListener("resize",this.handleResize),ze.commit("setPaper",this.paperManager.paper),this.paperManager.addEventHandler("element:pointerclick",this.blurFocusedScreenBuilderElement,this),this.paperManager.addEventHandler("blank:pointerdown",(function(t,n,o){if(!e.isGrabbing){ze.getters.isReadOnly&&(e.isGrabbing=!0);var i=e.paperManager.scale;e.canvasDragPosition={x:n*i.sx,y:o*i.sy},e.isOverShape=!1,e.pointerDownHandler(t)}}),this),this.paperManager.addEventHandler("cell:mouseover element:mouseover",(function(t){var n=t.model;e.isBpmnNode(n)&&"default"!==n.attr("body/cursor")&&!e.isGrabbing&&n.attr("body/cursor","move"),e.isGrabbing&&e.isBpmnNode(n)&&n.attr("body/cursor","grabbing")})),this.paperManager.addEventHandler("blank:pointerup",(function(t){e.isGrabbing=!1,e.canvasDragPosition=null,e.activeNode=null,e.pointerUpHandler(t)}),this),this.paperManager.addEventHandler("cell:pointerup",(function(t,n){e.canvasDragPosition=null,e.activeNode=null,e.pointerUpHandler(n,t)}),this),this.$refs["paper-container"].addEventListener("mouseenter",(function(){ze.commit("setClientLeftPaper",!1)})),this.$el.addEventListener("mousemove",(function(t){e.pointerMoveHandler(t)})),this.$refs["paper-container"].addEventListener("mouseleave",(function(){e.paperManager.removeEventHandler("blank:pointermove"),ze.commit("setClientLeftPaper",!0)})),this.paperManager.addEventHandler("cell:pointerclick",(function(e,t,n,o){var i=e.model.get("onClick");i&&i(e,t,n,o)})),this.paperManager.addEventHandler("cell:pointerclick",(function(t,n){var o=t.model;e.isBpmnNode(o)&&(e.isGrabbing||(o.component.$emit("click",n),e.$emit("click",{event:n,node:e.highlightedNode.definition})))})),this.paperManager.addEventHandler("cell:pointerdown",(function(t,n){var o=t.model;e.isBpmnNode(o)&&(e.isGrabbing||(e.setShapeStacking(o),e.activeNode=o.component.node,e.isOverShape=!0,e.pointerDowInShape(n,o)))})),this.paperManager.addEventHandler("cell:pointermove",(function(t,n,o,i){if(e.isGrabbing){if(!e.canvasDragPosition){var r=e.paperManager.scale;e.canvasDragPosition={x:o*r.sx,y:i*r.sy}}e.canvasDragPosition&&!e.clientLeftPaper&&e.paperManager.translate(n.offsetX-e.canvasDragPosition.x,n.offsetY-e.canvasDragPosition.y)}})),window.ProcessMaker.EventBus.$emit("modeler-start",{loadXML:function(){var t=w(b().mark((function t(n){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.loadXML(n);case 2:return t.next=4,Xm.dispatch("pushState",n);case 4:case"end":return t.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}(),addWarnings:function(t){return e.$emit("warnings",t)},addBreadcrumbs:function(t){return e.breadcrumbData.push(t)}})}},Mx=Ax,Tx=(n("71e5"),ut(Mx,jf,Lf,!1,null,null,null)),Px=Tx.exports,_x=n("f0c1"),Ox=n.n(_x),Dx={extends:Fu,mixins:[Zr],data:function(){return{nodeIcon:Ox.a,iconName:""}}},Ix=Dx,Nx=ut(Ix,dx,ux,!1,null,null,null),Rx=Nx.exports,jx=76,Lx="processmaker-modeler-manual-task",Bx={id:Lx,component:Rx,bpmnType:"bpmn:ManualTask",control:!1,category:"BPMN",icon:n("222f"),label:Jt[Lx],loopInspectorIndex:1,definition:function(e,t){return e.create("bpmn:ManualTask",{name:t(Jt[Lx]),assignment:"requester",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:jx,width:116})})},inspectorConfig:[{name:Jt[Lx],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-manual-task"},items:[{component:"FormInput",config:Ar}]},qr,Ir]}]},Fx={extends:sc,data:function(){return{nodeIcon:nu.a}},mounted:function(){var e=this.node.diagram.bounds;this.shape.attr({image:{"ref-x":7,"ref-y":7,width:e.get("width")-14,height:e.get("height")-14}})}},zx=Fx,Hx=ut(zx,px,hx,!1,null,null,null),qx=Hx.exports,Vx="processmaker-modeler-conditional-start-event",Ux=na()(rn()(Sc),Vt(Vt({},cu),{},{id:Vx,component:qx,label:Xt[Vx],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Xt[Vx]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(g(su()))}]}]})),Gx=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Wx=[],$x={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=k()(this.target,"component.node.definition.$type");if(!e)return!1;var t=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],n=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],o="bpmn:DataStoreReference"===this.sourceNode.definition.$type,i="bpmn:DataObjectReference"===this.sourceNode.definition.$type;return!(!o||!t.includes(e))||i&&n.includes(e)}},methods:{findSourceShape:function(){if(this.node.dataAssociationProps)return this.node.dataAssociationProps.sourceShape;var e=this.node.definition.sourceRef[0],t=this.graph.getElements().find((function(t){return t.component.node.definition===e}));return t},getTargetRef:function(){return this.node.dataAssociationProps?this.node.dataAssociationProps.targetCoords:Dt(this.node.definition.targetRef.$parent,this.$parent)},updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement(),t=Ot(this.moddle,e.component.node,this.sourceNode.definition);this.node.definition.set("targetRef",t),this.node.definition.set("sourceRef",[this.sourceNode.definition]),e.component.node.definition.set("dataInputAssociations",[this.node.definition])}},mounted:function(){this.shape=new d["shapes"].standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Qe.a,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){this.targetNode&&(It(this.targetNode,this.sourceNode.definition),Object(ft["pull"])(this.targetNode.definition.get("dataInputAssociations"),this.node.definition))}},Xx=$x,Yx=ut(Xx,Gx,Wx,!1,null,null,null),Zx=Yx.exports,Kx=Vt(Vt({},i),{},{component:Zx,control:!1,inspectorConfig:[{name:"Data Input Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-input-association"},items:[{component:"FormInput",config:Ii}]}]}]}),Jx=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Qx=[],ek={components:{CrownConfig:Mi},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ke],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=k()(this.target,"component.node.type");if(!e)return!1;var t="bpmn:DataObjectReference"!==this.targetConfig.bpmnType&&"bpmn:DataStoreReference"!==this.targetConfig.bpmnType;return!t}},methods:{findSourceShape:function(){var e=this;return this.node.dataAssociationProps?this.node.dataAssociationProps.sourceShape:this.graph.getElements().find((function(t){return t.component&&t.component.node.definition.get("dataOutputAssociations")&&t.component.node.definition.get("dataOutputAssociations").includes(e.node.definition)}))},updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){this.node.definition.set("targetRef",this.targetNode.definition);var e=this.sourceNode.definition.get("dataOutputAssociations")||[];this.sourceNode.definition.set("dataOutputAssociations",[].concat(g(e),[this.node.definition]))}},mounted:function(){this.shape=new d["shapes"].standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Qe.a,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){Object(ft["pull"])(this.sourceNode.definition.get("dataOutputAssociations"),this.node.definition)}},tk=ek,nk=ut(tk,Jx,Qx,!1,null,null,null),ok=nk.exports,ik=Vt(Vt({},o),{},{component:ok,control:!1,inspectorConfig:[{name:"Data Output Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-output-association"},items:[{component:"FormInput",config:Ii}]}]}]}),rk=n("b99f"),ak=[Ac,lf,bf,Ur,Ip,ch,Bx,eh,lh,Oa,za,ts,$a,ps,xs,Ri,Kx,ik,Tf,jh,bh],sk=[[jc,"bpmn:StartEvent","bpmn:SignalEventDefinition"],[bl,"bpmn:StartEvent","bpmn:TimerEventDefinition"],[Uc,"bpmn:StartEvent","bpmn:MessageEventDefinition"],[Ux,"bpmn:StartEvent","bpmn:ConditionalEventDefinition"],[ld,"bpmn:IntermediateCatchEvent","bpmn:TimerEventDefinition"],[Pd,"bpmn:IntermediateCatchEvent","bpmn:MessageEventDefinition"],[Bd,"bpmn:IntermediateCatchEvent","bpmn:SignalEventDefinition"],[Wd,"bpmn:IntermediateThrowEvent","bpmn:MessageEventDefinition"],[eu,"bpmn:IntermediateThrowEvent","bpmn:SignalEventDefinition"],[du,"bpmn:IntermediateCatchEvent","bpmn:ConditionalEventDefinition"],[Jv,"bpmn:BoundaryEvent","bpmn:TimerEventDefinition"],[pv,"bpmn:BoundaryEvent","bpmn:ErrorEventDefinition"],[Tv,"bpmn:BoundaryEvent","bpmn:EscalationEventDefinition"],[jv,"bpmn:BoundaryEvent","bpmn:MessageEventDefinition"],[Uv,"bpmn:BoundaryEvent","bpmn:SignalEventDefinition"],[wv,"bpmn:BoundaryEvent","bpmn:ConditionalEventDefinition"],[Fs,"bpmn:EndEvent","bpmn:MessageEventDefinition"],[aa,"bpmn:EndEvent","bpmn:ErrorEventDefinition"],[tc,"bpmn:EndEvent","bpmn:SignalEventDefinition"],[fa,"bpmn:EndEvent","bpmn:TerminateEventDefinition"]],ck=function(e,t,n){return function(o){var i=o.get("eventDefinitions"),r=o.$type===t&&i&&i.length&&i[0].$type===n;if(r)return e.id}};function lk(e){var t=e.registerNode,n=e.registerBpmnExtension;sk.forEach((function(e){var n=_e(e,3),o=n[0],i=n[1],r=n[2];t(o,ck(o,i,r))})),ak.forEach((function(e){return t(e)})),n("pm",rk)}},fb6a:function(e,t,n){"use strict";var o=n("23e7"),i=n("e8b5"),r=n("68ee"),a=n("861d"),s=n("23cb"),c=n("07fa"),l=n("fc6a"),d=n("8418"),u=n("b622"),p=n("1dde"),h=n("f36a"),f=p("slice"),m=u("species"),g=Array,v=Math.max;o({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,o,u,p=l(this),f=c(p),b=s(e,f),y=s(void 0===t?f:t,f);if(i(p)&&(n=p.constructor,r(n)&&(n===g||i(n.prototype))?n=void 0:a(n)&&(n=n[m],null===n&&(n=void 0)),n===g||void 0===n))return h(p,b,y);for(o=new(void 0===n?g:n)(v(y-b,0)),u=0;b<y;b++,u++)b in p&&d(o,u,p[b]);return o.length=u,o}})},fba5:function(e,t,n){var o=n("cb5a");function i(e){return o(this.__data__,e)>-1}e.exports=i},fbaa:function(e,t,n){var o=n("0be3");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("499e").default;i("4fc6c0b2",o,!0,{sourceMap:!1,shadowMode:!1})},fbd9:function(e,t,n){"use strict";n("4ce4")},fc6a:function(e,t,n){var o=n("44ad"),i=n("1d80");e.exports=function(e){return o(i(e))}},fc6f:function(e,t,n){var o=n("24fb");t=o(!1),t.push([e.i,'.cog-container[data-v-31668547]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex}.element-list[data-v-31668547]{white-space:nowrap;top:2.5rem;left:0;border-radius:5px;padding:0;-webkit-box-shadow:5px 5px 10px rgba(0,0,0,.2);box-shadow:5px 5px 10px rgba(0,0,0,.2)}.element-list[data-v-31668547],.element-list[data-v-31668547]:after{position:absolute;background-color:#fff}.element-list[data-v-31668547]:after{content:"";width:1.25rem;height:1.25rem;top:-.2rem;left:.5rem;z-index:-1;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:1px}.element-list--item[data-v-31668547]{list-style:none}.element-list--item__button[data-v-31668547]{background:none;padding:.25rem .85rem;border:none;color:#000;font-size:.85rem}.element-list--item__button[data-v-31668547]:disabled{opacity:.6;cursor:not-allowed}',""]),e.exports=t},fca5:function(e,t,n){e.exports=n.p+"img/intermediate-message-catch-event.9d25208e.svg"},fce3:function(e,t,n){var o=n("d039"),i=n("da84"),r=i.RegExp;e.exports=o((function(){var e=r(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},fdbc:function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(e,t,n){var o=n("04f8");e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fde4:function(e,t,n){const{is:o,isAny:i}=n("7b95");e.exports=function(){function e(e){return Array.isArray(e.eventDefinitions)&&e.eventDefinitions.length>0}function t(e){return e.eventDefinitions.filter(e=>o(e,"bpmn:SignalEventDefinition")&&!e.signalRef)}function n(n,o){if(!i(n,["bpmn:StartEvent","bpmn:EndEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent"]))return;if(!e(n))return;const r=t(n);r.length>0&&o.report(n.id,"Missing signal reference")}return{check:n}}},ffaa:function(e,t,n){e.exports=n.p+"img/redo.8425ce7e.svg"},ffd6:function(e,t,n){var o=n("3729"),i=n("1310"),r="[object Symbol]";function a(e){return"symbol"==typeof e||i(e)&&o(e)==r}e.exports=a}})}));
|
|
35
35
|
//# sourceMappingURL=modeler.umd.min.js.map
|