@processmaker/modeler 1.39.7 → 1.39.8
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 +142 -94
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +142 -94
- 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 +4 -2
- package/src/NodeIdGenerator.js +8 -0
- package/src/components/modeler/Modeler.vue +40 -10
- package/src/components/nodes/node.js +2 -3
- package/src/components/topRail/multiplayerViewUsers/MultiplayerViewUsers.vue +1 -1
- package/src/multiplayer/multiplayer.js +48 -0
- package/src/multiplayer/room.js +10 -0
- package/src/setup/globals.js +1 -1
- package/src/setup/initialLoad.js +7 -1
package/dist/modeler.umd.min.js
CHANGED
|
@@ -31,5 +31,5 @@ v=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o=Object.d
|
|
|
31
31
|
* (c) 2021 Evan You
|
|
32
32
|
* @license MIT
|
|
33
33
|
*/
|
|
34
|
-
function bt(e){var t=Number(e.version.split(".")[0]);if(t>=2)e.mixin({beforeCreate:o});else{var n=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[o].concat(e.init):o,n.call(this,e)}}function o(){var e=this.$options;e.store?this.$store="function"===typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}var yt="undefined"!==typeof window?window:"undefined"!==typeof h.g?h.g:{},wt=yt.__VUE_DEVTOOLS_GLOBAL_HOOK__;function xt(e){wt&&(e._devtoolHook=wt,wt.emit("vuex:init",e),wt.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){wt.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){wt.emit("vuex:action",e,t)}),{prepend:!0}))}function kt(e,t){return e.filter(t)[0]}function Ct(e,t){if(void 0===t&&(t=[]),null===e||"object"!==typeof e)return e;var n=kt(t,(function(t){return t.original===e}));if(n)return n.copy;var o=Array.isArray(e)?[]:{};return t.push({original:e,copy:o}),Object.keys(e).forEach((function(n){o[n]=Ct(e[n],t)})),o}function St(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Et(e){return null!==e&&"object"===typeof e}function At(e){return e&&"function"===typeof e.then}function Mt(e,t){return function(){return e(t)}}var _t=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},Tt={namespaced:{configurable:!0}};Tt.namespaced.get=function(){return!!this._rawModule.namespaced},_t.prototype.addChild=function(e,t){this._children[e]=t},_t.prototype.removeChild=function(e){delete this._children[e]},_t.prototype.getChild=function(e){return this._children[e]},_t.prototype.hasChild=function(e){return e in this._children},_t.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},_t.prototype.forEachChild=function(e){St(this._children,e)},_t.prototype.forEachGetter=function(e){this._rawModule.getters&&St(this._rawModule.getters,e)},_t.prototype.forEachAction=function(e){this._rawModule.actions&&St(this._rawModule.actions,e)},_t.prototype.forEachMutation=function(e){this._rawModule.mutations&&St(this._rawModule.mutations,e)},Object.defineProperties(_t.prototype,Tt);var Pt=function(e){this.register([],e,!1)};function Ot(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return void 0;Ot(e.concat(o),t.getChild(o),n.modules[o])}}Pt.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Pt.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},Pt.prototype.update=function(e){Ot([],this.root,e)},Pt.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var i=new _t(t,n);if(0===e.length)this.root=i;else{var r=this.get(e.slice(0,-1));r.addChild(e[e.length-1],i)}t.modules&&St(t.modules,(function(t,i){o.register(e.concat(i),t,n)}))},Pt.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},Pt.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Dt;var It=function(e){var t=this;void 0===e&&(e={}),!Dt&&"undefined"!==typeof window&&window.Vue&&$t(window.Vue);var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Pt(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new Dt,this._makeLocalGettersCache=Object.create(null);var i=this,r=this,s=r.dispatch,a=r.commit;this.dispatch=function(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return a.call(i,e,t,n)},this.strict=o;var l=this._modules.root.state;jt(this,l,[],this._modules.root),Lt(this,l),n.forEach((function(e){return e(t)}));var c=void 0!==e.devtools?e.devtools:Dt.config.devtools;c&&xt(this)},Nt={state:{configurable:!0}};function Rt(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Bt(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;jt(e,n,[],e._modules.root,!0),Lt(e,n,t)}function Lt(e,t,n){var o=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,r={};St(i,(function(t,n){r[n]=Mt(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var s=Dt.config.silent;Dt.config.silent=!0,e._vm=new Dt({data:{$$state:t},computed:r}),Dt.config.silent=s,e.strict&&Ut(e),o&&(n&&e._withCommit((function(){o._data.$$state=null})),Dt.nextTick((function(){return o.$destroy()})))}function jt(e,t,n,o,i){var r=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!r&&!i){var a=Gt(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){Dt.set(a,l,o.state)}))}var c=o.context=Ft(e,s,n);o.forEachMutation((function(t,n){var o=s+n;qt(e,o,t,c)})),o.forEachAction((function(t,n){var o=t.root?n:s+n,i=t.handler||t;Ht(e,o,i,c)})),o.forEachGetter((function(t,n){var o=s+n;Vt(e,o,t,c)})),o.forEachChild((function(o,r){jt(e,t,n.concat(r),o,i)}))}function Ft(e,t,n){var o=""===t,i={dispatch:o?e.dispatch:function(n,o,i){var r=Wt(n,o,i),s=r.payload,a=r.options,l=r.type;return a&&a.root||(l=t+l),e.dispatch(l,s)},commit:o?e.commit:function(n,o,i){var r=Wt(n,o,i),s=r.payload,a=r.options,l=r.type;a&&a.root||(l=t+l),e.commit(l,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return zt(e,t)}},state:{get:function(){return Gt(e.state,n)}}}),i}function zt(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,o)===t){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function qt(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push((function(t){n.call(e,o.state,t)}))}function Ht(e,t,n,o){var i=e._actions[t]||(e._actions[t]=[]);i.push((function(t){var i=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return At(i)||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}function Vt(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)})}function Ut(e){e._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function Gt(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Wt(e,t,n){return Et(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function $t(e){Dt&&e===Dt||(Dt=e,bt(Dt))}Nt.state.get=function(){return this._vm._data.$$state},Nt.state.set=function(e){0},It.prototype.commit=function(e,t,n){var o=this,i=Wt(e,t,n),r=i.type,s=i.payload,a=(i.options,{type:r,payload:s}),l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,o.state)})))},It.prototype.dispatch=function(e,t){var n=this,o=Wt(e,t),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(c){0}var l=a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(c){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(c){0}t(e)}))}))}},It.prototype.subscribe=function(e,t){return Rt(e,this._subscribers,t)},It.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return Rt(n,this._actionSubscribers,t)},It.prototype.watch=function(e,t,n){var o=this;return this._watcherVM.$watch((function(){return e(o.state,o.getters)}),t,n)},It.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},It.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),jt(this,this.state,e,this._modules.get(e),n.preserveState),Lt(this,this.state)},It.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=Gt(t.state,e.slice(0,-1));Dt.delete(n,e[e.length-1])})),Bt(this)},It.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},It.prototype.hotUpdate=function(e){this._modules.update(e),Bt(this,!0)},It.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(It.prototype,Nt);var Xt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var o=nn(this.$store,"mapState",e);if(!o)return;t=o.context.state,n=o.context.getters}return"function"===typeof i?i.call(this,t,n):t[i]},n[o].vuex=!0})),n})),Yt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.commit;if(e){var r=nn(this.$store,"mapMutations",e);if(!r)return;o=r.context.commit}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),Zt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;i=e+i,n[o]=function(){if(!e||nn(this.$store,"mapGetters",e))return this.$store.getters[i]},n[o].vuex=!0})),n})),Kt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.dispatch;if(e){var r=nn(this.$store,"mapActions",e);if(!r)return;o=r.context.dispatch}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),Jt=function(e){return{mapState:Xt.bind(null,e),mapGetters:Zt.bind(null,e),mapMutations:Yt.bind(null,e),mapActions:Kt.bind(null,e)}};function Qt(e){return en(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function en(e){return Array.isArray(e)||Et(e)}function tn(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function nn(e,t,n){var o=e._modulesNamespaceMap[n];return o}function on(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var o=e.transformer;void 0===o&&(o=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var r=e.actionFilter;void 0===r&&(r=function(e,t){return!0});var s=e.actionTransformer;void 0===s&&(s=function(e){return e});var a=e.logMutations;void 0===a&&(a=!0);var l=e.logActions;void 0===l&&(l=!0);var c=e.logger;return void 0===c&&(c=console),function(e){var d=Ct(e.state);"undefined"!==typeof c&&(a&&e.subscribe((function(e,r){var s=Ct(r);if(n(e,d,s)){var a=an(),l=i(e),u="mutation "+e.type+a;rn(c,u,t),c.log("%c prev state","color: #9E9E9E; font-weight: bold",o(d)),c.log("%c mutation","color: #03A9F4; font-weight: bold",l),c.log("%c next state","color: #4CAF50; font-weight: bold",o(s)),sn(c)}d=s})),l&&e.subscribeAction((function(e,n){if(r(e,n)){var o=an(),i=s(e),a="action "+e.type+o;rn(c,a,t),c.log("%c action","color: #03A9F4; font-weight: bold",i),sn(c)}})))}}function rn(e,t,n){var o=n?e.groupCollapsed:e.group;try{o.call(e,t)}catch(i){e.log(t)}}function sn(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function an(){var e=new Date;return" @ "+cn(e.getHours(),2)+":"+cn(e.getMinutes(),2)+":"+cn(e.getSeconds(),2)+"."+cn(e.getMilliseconds(),3)}function ln(e,t){return new Array(t+1).join(e)}function cn(e,t){return ln("0",t-e.toString().length)+e}var dn={Store:It,install:$t,version:"3.6.2",mapState:Xt,mapMutations:Yt,mapGetters:Zt,mapActions:Kt,createNamespacedHelpers:Jt,createLogger:on},un=dn,pn=h(85564),hn=h.n(pn),fn=h(44908),mn=h.n(fn);function gn(e,t,n){Object.hasOwn(e,t)?e.set(t,n):(delete Object.getPrototypeOf(e)[t],vt().set(e,t,n))}function vn(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}))}vt().use(un);var bn=new un.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 hn()(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=mt(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}))||(gn(n.definition,o,i),null==i&&vt()["delete"](n.definition,o))},clearNodes:function(e){e.nodes=[]},highlightNode:function(e,t){e.highlightedNodes=t?[t]:[]},addToHighlightedNodes:function(e,t){var n=mn()([].concat(m(e.highlightedNodes),m(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){vn(e,"messageRef",(function(e){var n=e.messageRef;return n===t}))},removeSignalRef:function(e,t){vn(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 y(v().mark((function t(){var n,o,i;return v().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]])})))()}}}),yn="#5096db",wn="#FF0000",xn="#3FA6FF",kn="#DCF2FF",Cn="#CCCCCC",Sn="#F5F5F5",En="#00BA7C",An="#D6FFE6",Mn={source:"source",target:"target"};function _n(e){return e.x&&e.y}var Tn={props:["highlighted","paper","paperManager","isCompleted","isIdle"],data:function(){return{sourceShape:null,target:null,listeningToMouseup:!1,listeningToMouseleave:!1,vertices:null,anchorPointFunction:st}},watch:{target:function(e,t){t&&t!==e&&ut(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){bn.getters.isReadOnly||(e?(this.shape.attr({line:{stroke:"#5096db"},".joint-highlight-stroke":{display:"none"}}),this.shapeView.showTools()):(ut(this.shape),this.shapeView.hideTools()))}},computed:{shapeView:function(){return this.shape.findView(this.paper)},sourceNode:function(){return x()(this.sourceShape,"component.node")},targetNode:function(){return x()(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:En}}):this.isIdle&&this.shape.attr({line:{stroke:Cn}})},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&&_n(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(),s=r.width,a=r.height;return n?{x:o+n.x,y:i+n.y}:{x:o+s/2,y:i+a/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,Mn.source,t)},setTarget:function(e,t){this.setEndpoint(e,Mn.target,t)},completeLink:function(){this.shape.stopListening(this.paper,"cell:mouseleave"),this.$emit("set-cursor",null),this.resetPaper();var e=this.shape.getTargetElement();ut(e),this.shape.on("change:vertices",this.onChangeVertices),this.shape.on("change:source",this.onChangeTargets),this.shape.on("change:target",this.onChangeTargets),this.shape.listenTo(this.sourceShape,"change:position",this.updateWaypoints),this.shape.listenTo(e,"change:position",this.updateWaypoints),this.shape.listenTo(this.paper,"link:mouseleave",this.storeWaypoints);var t=this.shape.getSourceElement();t.embed(this.shape),this.$emit("set-shape-stacking",t)},waitForUpdateWaypoints:function(){var e=this;return new Promise((function(t){e.updateWaypoints(),e.updateWaypoints.flush(),t()}))},storeWaypoints:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.highlighted||e.listeningToMouseleave){t.next=6;break}return e.updateWaypoints(),t.next=4,e.$nextTick();case 4:e.listeningToMouseleave=!0,e.$emit("save-state");case 6:case"end":return t.stop()}}),t)})))()},onChangeTargets:function(e,t,n){var o=this;return y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n||!n.ui){e.next=7;break}return e.next=3,o.$nextTick();case 3:return e.next=5,o.waitForUpdateWaypoints();case 5:return e.next=7,o.storeWaypoints();case 7:case"end":return e.stop()}}),e)})))()},onChangeVertices:function(e,t,n){var o=this;return y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n||!n.ui){e.next=6;break}return o.updateWaypoints(),e.next=4,o.$nextTick();case 4:o.listeningToMouseleave=!1,o.$emit("save-state");case 6: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(m(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&&Ee(this.target,fe));this.setTarget(this.target),this.updateRouter(),this.$emit("set-cursor","default"),Ee(this.target,he),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"),ut(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&&ut(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 a.linkTools.Vertices,t=new a.linkTools.SourceAnchor({snap:this.getAnchorPointFunction("source")}),n=new a.linkTools.TargetAnchor({snap:this.getAnchorPointFunction("target")}),o=new a.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=C()(this.updateWaypoints,100),this.emitSave.bind(this)},mounted:function(){var e=this;return y(v().mark((function t(){var n,o,i,r,s,a,l,c,d,u,p,h,f,m;return v().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(){bn.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],s=i[i.length-1],a=o.position(),l=a.x,c=a.y,d={x:s.x-l,y:s.y-c},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")})),bn.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()}},Pn=h.p+"img/association-head.0b14da7b.svg",On={none:"None",one:"One",both:"Both"},Dn=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("preview-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()},In=[],Nn=(h(47941),function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,m(t.validPreviewElements))?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("Preview"),role:"menuitem",id:"preview-button","aria-label":"Preview"},on:{click:function(e){return t.preview()}}},[n("i",{staticClass:"fas fa-eye cog-container--button"})]):t._e()}),Rn=[],Bn=h.p+"img/trash-alt-solid.9d41abd9.svg",Ln=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)},jn=[],Fn={props:{id:String,ariaLabel:String,src:String,width:{type:Number,default:19},height:{type:Number,default:20}}},zn=Fn;h(21353);function qn(e,t,n,o,i,r,s,a){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=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(s)},c._ssrRegister=l):i&&(l=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}var Hn=qn(zn,Ln,jn,!1,null,"09d8a8ac",null),Vn=Hn.exports,Un=["bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],Gn=Un,Wn={components:{CrownButton:Vn},props:{graph:Object,shape:Object,node:Object},data:function(){return{trashIcon:Bn,validPreviewElements:Gn}},computed:{isPoolLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{preview:function(){this.$emit("previewNode",this.node)}}},$n=Wn,Xn=qn($n,Nn,Rn,!1,null,null,null),Yn=Xn.exports,Zn=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"})])},Kn=[],Jn=h(50467),Qn=h.n(Jn),eo="processmaker-modeler-data-output-association",to="bpmn:DataOutputAssociation";function no(e){return e.create("bpmn:DataOutputAssociation",{targetRef:{x:void 0,y:void 0}})}function oo(e){return e.create("bpmndi:BPMNEdge")}var io="processmaker-modeler-data-input-association",ro="bpmn:DataInputAssociation";function so(e){return e.create("bpmn:DataInputAssociation",{targetRef:{x:void 0,y:void 0}})}function ao(e){return e.create("bpmndi:BPMNEdge")}function lo(e,t){var n=this,o=e.getConnectedLinks(t);o.forEach((function(e){return n.$emit("remove-node",e.component.node)}))}function co(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 uo(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 po(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 ho(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 fo(e){if(!e.isBpmnType(to,ro)){var t=e.definition,n=t.sourceRef,o=t.targetRef;n&&(0,Jn.pull)(n.get("outgoing"),e.definition),o&&o.id&&(0,Jn.pull)(o.get("incoming"),e.definition)}}function mo(e){var t=(0,Jn.get)(e,"definition.sourceRef.default.id",null);t&&t===e.id&&e.definition.sourceRef.set("default",null)}function go(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 s=t.definition.ioSpecification.outputSets[0];s||t.definition.ioSpecification.set("outputSets",[e.create("bpmn:OutputSet",{dataOutputRefs:[]})]),s=t.definition.ioSpecification.outputSets[0],t.definition.ioSpecification.inputSets||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]);var a=t.definition.ioSpecification.inputSets[0];a||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]),a=t.definition.ioSpecification.inputSets[0];var l=a.get("dataInputRefs").find((function(e){return e.id===i}));return l||a.dataInputRefs.push(r),r}function vo(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 bo(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&&((0,Jn.pull)(e.definition.ioSpecification.dataInputs,i),e.definition.ioSpecification.inputSets)){var r=e.definition.ioSpecification.inputSets[0];if(r){var s=r.dataInputRefs.find((function(e){return e.id===o}));if(s&&(0,Jn.pull)(r.dataInputRefs,s),0===r.dataInputRefs.length&&delete e.definition.ioSpecification.inputSets,e.definition.ioSpecification.outputSets){var a=e.definition.ioSpecification.outputSets[0];!a||a.dataOutputRefs&&0!==a.dataOutputRefs.length||delete e.definition.ioSpecification.outputSets}e.definition.ioSpecification.inputSets||e.definition.ioSpecification.outputSets||delete e.definition.ioSpecification}}}}var yo={components:{CrownButton:Vn},props:{graph:Object,shape:Object,node:Object},data:function(){return{trashIcon:Bn}},computed:{isPoolLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{removeFlows:lo,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)}}},wo=yo,xo=qn(wo,Zn,Kn,!1,null,null,null),ko=xo.exports,Co=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()},So=[],Eo=h.p+"img/connect-elements.ab6af00f.svg";h(38880),h(49337);function Ao(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 Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ao(Object(n),!0).forEach((function(t){Te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ao(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function To(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,_e(o.key),o)}}function Po(e,t,n){return t&&To(e.prototype,t),n&&To(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}h(15306);var Oo={"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"},Do=Oo,Io={"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"},No=Io,Ro={"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"},Bo=Ro,Lo={"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"},jo=Lo,Fo={"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"},zo=Fo,qo=h(50361),Ho=h.n(qo),Vo=function(){function e(t,n,o){_o(this,e),Te(this,"type",void 0),Te(this,"definition",void 0),Te(this,"diagram",void 0),Te(this,"pool",void 0),this.type=t,this.definition=n,this.diagram=o}return Po(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(Do).includes(this.type)}},{key:"isEndEvent",value:function(){return Object.keys(No).includes(this.type)}},{key:"isTask",value:function(){return Object.keys(Bo).includes(this.type)}},{key:"isGateway",value:function(){return Object.keys(jo).includes(this.type)}},{key:"isIntermediateEvent",value:function(){return Object.keys(zo).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=mt(i,2),s=r[0],a=r[1];if(this.id||(this.id=s),this.diagram&&(this.diagram.id=a,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 l=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+"_",l+"_")),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+"_",l+"_")),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),s=t[this.type].diagram(n),a=new this.constructor(this.type,r,s);return a.id=null,a.pool=this.pool,a.cloneOf=this.id,e.diagramPropertiesToCopy.forEach((function(e){return a.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"===g(t)?Ho()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",Mo({},t[o].signalRef));a.definition.set(e,n)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return a.definition.eventDefinitions&&a.definition.eventDefinitions[0]&&Object.hasOwn(a.definition.eventDefinitions[0],e)&&a.definition.eventDefinitions[0].set(e,null)})),a}},{key:"cloneFlow",value:function(t,n,o){var i=this,r=t[this.type].definition(n,o),s=t[this.type].diagram(n),a=new this.constructor(this.type,r,s);return a.id=null,a.pool=this.pool,a.cloneOf=this.id,a.diagram=n.create("bpmndi:BPMNEdge",{waypoint:[]}),this.diagram.waypoint.forEach((function(e){var t=n.create("dc:Point",{x:e.x,y:e.y});a.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"===g(t)?Ho()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",Mo({},t[o].signalRef));a.definition.set(e,n),a.definition.set("sourceRef",null),a.definition.set("targetRef",null)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return a.definition.eventDefinitions&&a.definition.eventDefinitions[0]&&Object.hasOwn(a.definition.eventDefinitions[0],e)&&a.definition.eventDefinitions[0].set(e,null)})),a}},{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}();Te(Vo,"diagramPropertiesToCopy",["x","y","width","height"]),Te(Vo,"definitionPropertiesToNotCopy",["$type","id","dataOutputAssociations"]),Te(Vo,"flowDefinitionPropertiesToNotCopy",["$type","id","sourceRef","targetRef"]),Te(Vo,"eventDefinitionPropertiesToNotCopy",["errorRef","messageRef"]);var Uo="processmaker-modeler-generic-flow",Go=h(65554),Wo={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"]},$o={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"]},Xo={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"]},Yo={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"]},Zo={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"]},Ko={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"]},Jo={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"]},Qo={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"]},ei={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"]},ti={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"]},ni={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"]},oi={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"]},ii=h(39865),ri=["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"],si={components:{CrownButton:Vn,FontAwesomeIcon:ii.FontAwesomeIcon},props:["node","moddle","nodeRegistry"],data:function(){return{sequenceFlow:Eo}},computed:{paper:function(){return bn.getters.paper},sequenceFlowConfig:function(){return this.nodeRegistry[Uo]},nodeConfig:function(){return this.nodeRegistry[this.node.type]},allowOutgoingSequenceFlow:function(){var e=this;return!ri.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,s=null;e&&(s=(0,a.V)(this.paper.viewport).toLocalPoint(i,r));var l=this.moddle.create("bpmn:SequenceFlow",{name:"",sourceRef:this.node.definition,targetRef:{x:n||s.x,y:o||s.y}});this.$emit("add-node",new Vo(Uo,l,this.moddle.create("bpmndi:BPMNEdge")))}},created:function(){this.$t=this.$t.bind(this),Go.library.add($o)}},ai=si,li=qn(ai,Co,So,!1,null,null,null),ci=li.exports,di=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()},ui=[],pi=h.p+"img/connect-artifacts.e3e5e73f.svg",hi={components:{CrownButton:Vn},props:["node","moddle","shape"],data:function(){return{connectIcon:pi}},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:On.none});this.$emit("add-node",new Vo("processmaker-modeler-association",i,this.moddle.create("bpmndi:BPMNEdge")))}}},fi=hi,mi=qn(fi,di,ui,!1,null,null,null),gi=mi.exports,vi=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()},bi=[];function yi(e,t){return yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yi(e,t)}function wi(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&&yi(e,t)}h(12419),h(81299);function xi(e){return xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xi(e)}function ki(){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 Ci(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Si(e,t){if(t&&("object"===g(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ci(e)}function Ei(e){var t=ki();return function(){var n,o=xi(e);if(t){var i=xi(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Si(this,n)}}var Ai="processmaker-modeler-pool",Mi=function(){function e(t,n,o){_o(this,e),Te(this,"nodeRegistry",void 0),Te(this,"moddle",void 0),Te(this,"paper",void 0),this.nodeRegistry=t,this.moddle=n,this.paper=o}return Po(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!=x()(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=x()(e,"component.node.type");return t===Ai}}]),e}(),_i=function(e){wi(n,e);var t=Ei(n);function n(){return _o(this,n),t.apply(this,arguments)}return Po(n,null,[{key:"isADataNode",value:function(e){return e.isBpmnType.apply(e,m(n.dataNodeTypes))}},{key:"isNodeDisallowedFromDataAssociation",value:function(e){return e.isBpmnType.apply(e,m(n.disallowedNodes))}}]),n}(Mi);Te(_i,"dataNodeTypes",["bpmn:DataStoreReference","bpmn:DataObjectReference"]),Te(_i,"disallowedNodes",["bpmn:EndEvent","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:Participant","bpmn:Lane","bpmn:TextAnnotation","bpmn:Association"]);var Ti={components:{CrownButton:Vn},props:["node","moddle","shape"],data:function(){return{connectIcon:pi}},computed:{paper:function(){return bn.getters.paper},allowOutgoingDataAssociationFlow:function(){return _i.isADataNode(this.node)}},methods:{addDataAssociation:function(n,o,i){this.$emit("toggle-crown-state",!1);var r=n.clientX,s=n.clientY,l=null;n&&(l=(0,a.V)(this.paper.viewport).toLocalPoint(r,s));var c=this.node.isBpmnType("bpmn:DataStoreReference","bpmn:DataObjectReference"),d=c?t:e,u=d.definition(this.moddle),p=new Vo(d.id,u,d.diagram(this.moddle));p.dataAssociationProps={sourceShape:this.shape,targetCoords:{x:o||l.x,y:i||l.y}},this.$emit("add-node",p)}}},Pi=Ti,Oi=qn(Pi,vi,bi,!1,null,null,null),Di=Oi.exports,Ii=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,m(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()},Ni=[],Ri=h.p+"img/clipboard.06edfa02.svg",Bi=["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"],Li=Bi,ji={components:{CrownButton:Vn},props:["node"],data:function(){return{copyCount:0,copyIcon:Ri,validCopyElements:Li}},methods:{copyElement:function(){this.$emit("copy-element")}}},Fi=ji,zi=qn(Fi,Ii,Ni,!1,null,null,null),qi=zi.exports,Hi=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,m(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()},Vi=[],Ui=h.p+"img/copy-regular.67a8edbd.svg",Gi={components:{CrownButton:Vn},props:["node"],data:function(){return{copyCount:0,cloneIcon:Ui,validCopyElements:Li}},methods:{cloneElement:function(){this.$emit("clone-element",this.node,++this.copyCount)}}},Wi=Gi,$i=qn(Wi,Hi,Vi,!1,null,null,null),Xi=$i.exports,Yi=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)},Zi=[],Ki=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,s=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(s,e.node,i)},on:{click:function(t){return e.replaceNode({node:e.node,typeToReplaceWith:i})}}},[e._v(e._s(e.$t(o))+" ")]),e.isDisabled(s,e.node,i)?t("b-tooltip",{attrs:{target:i,variant:"warning",placement:"right"}},[e._v(" "+e._s(e.$t(e.tooltip(s,e.node,i)))+" ")]):e._e()],1)})),0):e._e()],1):e._e()},Ji=[],Qi={name:"CrownTaskDropdown",components:{CrownButton:Vn},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)}}},er=Qi,tr=(h(5648),qn(er,Ki,Ji,!1,null,"31668547",null)),nr=tr.exports,or=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,s=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(s))+" ")])],1)})),0):e._e()],1):e._e()},ir=[],rr=h.p+"img/boundary-event.40a868e9.svg",sr=["bpmn:Task","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:SendTask","bpmn:ReceiveTask","bpmn:UserTask","bpmn:GlobalTask","bpmn:ManualTask","bpmn:CallActivity"];function ar(e){return e&&sr.some((function(t){return e.node.isBpmnType(t)}))}function lr(e,t){return!(!t||!ar(t.component))&&dr(t)}function cr(e){return e&&e.node.isBpmnType("bpmn:CallActivity")}function dr(e){return 0!==dt(e).length}var ur={name:"CrownBoundaryEventDropdown",components:{CrownButton:Vn,FontAwesomeIcon:ii.FontAwesomeIcon},props:{dropdownOpen:{type:Boolean,required:!0},dropdownData:Array,nodeRegistry:Object,moddle:Object,node:Object,shape:Object},data:function(){return{boundaryEventIcon:rr}},methods:{getErrorTooltipText:function(e){return 0===this.getEmptyBoundaryEventPositionsForShape(this.shape).length?"No available space":e},canAddBoundaryEventToTarget:lr,getEmptyBoundaryEventPositionsForShape:dt,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=dt(this.shape)[0];n.bounds.x=o.x-n.bounds.width/2,n.bounds.y=o.y-n.bounds.height/2;var i=new Vo(e,t,n);i.pool=this.node.pool,bn.commit("highlightNode",i),this.$emit("add-node",i)}}},created:function(){this.$t=this.$t.bind(this),Go.library.add(Wo)}},pr=ur,hr=(h(56073),qn(pr,or,ir,!1,null,null,null)),fr=hr.exports,mr=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)},gr=[],vr=(h(27479),h(87714),h(82801),h(1174),h(94023)),br=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)},yr=[],wr=(h(64765),h(69600),h(42238)),xr=h.n(wr),kr=["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"],Cr=["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"],Sr=function(){function e(){_o(this,e)}return Po(e,null,[{key:"list",value:function(){var e=this,t=[];kr.forEach((function(n){xr()[n]&&t.push(e.parseIcon(n,xr()[n]))}));for(var n=0,o=Object.entries(xr());n<o.length;n++){var i=mt(o[n],2),r=i[0],s=i[1];this.shouldIncludeIcon(r,s)&&t.push(this.parseIcon(r,s))}return t}},{key:"grouped",value:function(){for(var e=[{group:"Common",icons:[]},{group:"All Icons",icons:[]}],t=0,n=Object.entries(xr());t<n.length;t++){var o=mt(n[t],2),i=o[0],r=o[1];Cr.includes(i)||(kr.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 Cr.includes(e)||kr.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 Er=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)},Ar=[],Mr={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()}}},_r=Mr,Tr=(h(94960),qn(_r,Er,Ar,!1,null,null,null)),Pr=Tr.exports,Or={components:{FileUploadButton:Pr},props:{value:{required:!1},allowCustom:{type:Boolean,default:!0},default:{type:String,default:"search"}},data:function(){return{all:Sr.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()}}},Dr=Or,Ir=(h(18785),qn(Dr,br,yr,!1,null,null,null)),Nr=Ir.exports,Rr=h(9943),Br={props:{dropdownOpen:{type:Boolean,required:!0},node:Object,showCustomIconPicker:{type:Boolean,default:!1},iconName:{type:String,default:""}},components:{CrownButton:Vn,"sketch-picker":vr.Sketch,IconSelector:Nr},data:function(){return{colors:pe,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){bn.commit("updateNodeProp",{node:this.node,key:"color",value:e}),vt().set(this.node.definition,"color",e),this.$emit("save-state")},resetNodeColor:function(){bn.commit("updateNodeProp",{node:this.node,key:"color",value:void 0}),vt().set(this.node.definition,"color",void 0),this.$emit("save-state")},setCustomIcon:function(e){if(e){var t=(0,Go.icon)({prefix:"fas",iconName:e}),n=t.html,o=btoa(n);bn.commit("updateNodeProp",{node:this.node,key:"customIcon",value:o}),vt().set(this.node.definition,"customIcon",o),this.$emit("set-custom-icon-name",e),this.$emit("save-state")}},resetCustomIcon:function(){bn.commit("updateNodeProp",{node:this.node,key:"customIcon",value:void 0}),vt().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),Go.library.add(Rr.fas)}},Lr=Br,jr=(h(82969),qn(Lr,mr,gr,!1,null,"0c72746a",null)),Fr=jr.exports,zr={name:"CrownDropdowns",components:{CrownTaskDropdown:nr,CrownBoundaryEventDropdown:fr,CrownColorDropdown:Fr},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}}},qr=zr,Hr=(h(64883),qn(qr,Yi,Zi,!1,null,"0a847d3c",null)),Vr=Hr.exports,Ur=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()},Gr=[],Wr=h.p+"img/default-flow.3f3d5309.svg",$r={components:{CrownButton:Vn},props:["node"],data:function(){return{icon:Wr}},methods:{click:function(){this.$emit("default-flow",this.node)}}},Xr=$r,Yr=qn(Xr,Ur,Gr,!1,null,null,null),Zr=Yr.exports,Kr={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()}))}},Jr=h(97019),Qr=h.n(Jr);function es(){return!!window.Cypress}var ts={components:{CrownDropdowns:Vr,PreviewButton:Yn,DeleteButton:ko,GenericFlowButton:ci,AssociationFlowButton:gi,CopyButton:qi,CloneButton:Xi,DefaultFlow:Zr,DataAssociationFlowButton:Di},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:[Kr],watch:{"node.definition.color":{handler:function(){this.setNodeColor()}},highlightedShapes:function(e,t){nt()(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:es(),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===bn.getters.isReadOnly},isMultiselect:function(){var e=bn.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 bn.getters.highlightedShapes}},methods:{setNodeColor:function(){var e=this.node.definition.get("color"),t=Se(this.node,e),n=t.fill,o=t.stroke;Ee(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,bn.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 y(v().mark((function t(){return v().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(),Qr()(this.process.get("flowElements"),this.node.definition),Qr()(this.planeElements,this.node.diagram),Qr()(this.process.get("artifacts"),this.node.definition),this.collaboration&&Qr()(this.collaboration.get("messageFlows"),this.node.definition)}},ns=ts,os=(h(78135),qn(ns,Dn,In,!1,null,null,null)),is=os.exports,rs={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Tn],data:function(){return{shape:null,initialAssociationDirection:this.node.definition.associationDirection,associationDirection:On}},computed:{isValidConnection:function(){var e=x()(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 a.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":Pn,width:20,height:20,y:-10},sourceMarker:{type:"image","xlink:href":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this,this.updateAssociationMarker(this.initialAssociationDirection)}},ss=rs,as=qn(ss,r,s,!1,null,null,null),ls=as.exports,cs={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]*$/"},ds=cs,us="processmaker-modeler-association",ps={id:us,component:ls,bpmnType:"bpmn:Association",control:!1,definition:function(e){return e.create("bpmn:Association",{associationDirection:"".concat(On.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:ds},{component:"FormSelect",config:{label:"Direction",helper:"Select Direction",name:"associationDirection",options:[{value:"".concat(On.none),content:"None"},{value:"".concat(On.one),content:"One"},{value:"".concat(On.both),content:"Both"}]}}]}]}]},hs=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))},fs=[],ms={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 y(v().mark((function t(){return v().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 y(v().mark((function t(){return v().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)})))()}},gs=3,vs=16,bs=4;function ys(e,t){var n=t.size(),o=n.width,i=n.height;for(var r in e)xs(t,r,o),ks(t,r,i),Cs(t,r,e,o)}function ws(e,t){var n=e.attr(t);return void 0===n?bs:n}function xs(e,t,n){var o=ws(e,t+"/ref-padding-x");-1!==t.indexOf("Right")?e.attr(t+"/ref-x",n-vs-o):-1!==t.indexOf("Left")&&e.attr(t+"/ref-x",o+(Es(e)?16:0))}function ks(e,t,n){var o=ws(e,t+"/ref-padding-y");-1!==t.indexOf("bottom")&&e.attr(t+"/ref-y",n-vs-o)}function Cs(e,t,n,o){for(var i=0,r=0;r<gs;r++)e.attr(t+"."+r+"/xlink:href",null);var s=Ss(n,t);for(var a in s)if(e.attr(t+"."+i+"/xlink:href",n[t][a]),i++,i>=gs)break;e.attr(t+"/ref-width",vs*i),-1!==t.indexOf("Center")&&e.attr(t+"/ref-x",(o-i*vs)/2)}function Ss(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 Es(e){return!!e.attr("image/xlink:href")}var As=3,Ms=16;function _s(e){for(var t=[],n=0;n<As;n++)t.push({tagName:"image",selector:e+"."+n});return{tagName:"g",selector:e,children:t}}function Ts(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o={};o[e]=t;for(var i=0;i<As;i++)o[e+"."+i]={"ref-x":i*Ms*n,"ref-y":0,width:Ms,height:Ms};return o}var Ps,Os,Ds,Is,Ns,Rs,Bs,Ls,js,Fs,zs,qs,Hs,Vs,Us={data:function(){return{markers:{topLeft:{},topCenter:{},topRight:{},bottomLeft:{},bottomCenter:{},bottomRight:{}}}},watch:{markers:{deep:!0,handler:function(){this.recalcMarkersAlignment()}}},methods:{recalcMarkersAlignment:function(){ys(this.markers,this.shape)}}},Gs=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},_s("topLeft"),_s("topCenter"),_s("topRight"),_s("bottomLeft"),_s("bottomCenter"),_s("bottomRight")],defaults:a.util.deepSupplement({size:{width:36,height:36},attrs:Mo(Mo(Mo(Mo(Mo(Mo({image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},Ts("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),Ts("topCenter",{ref:"circle","ref-y":-20})),Ts("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),Ts("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),Ts("bottomCenter",{ref:"circle","ref-padding-y":-40})),Ts("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},a.shapes.standard.Circle.prototype.defaults)}),Ws={highlighter:{name:"stroke",options:{padding:10,attrs:{stroke:wn,"stroke-width":10,opacity:.3}}}},$s={highlighter:{name:"stroke",options:{attrs:{stroke:yn,"stroke-width":3,"data-cy":"selected"}}}},Xs={highlighter:{name:"stroke",options:{attrs:{stroke:En,"stroke-width":5}}}},Ys={highlighter:{name:"stroke",options:{attrs:{stroke:xn,"stroke-width":5}}}},Zs={highlighter:{name:"stroke",options:{attrs:{stroke:Cn,"stroke-width":5}}}},Ks={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]")||this.shapeView.$el}},methods:{setShapeHighlight:function(){if(bn.getters.isReadOnly)return this.shapeView.unhighlight(this.shapeBody,Xs),this.isCompleted&&(this.shape.attr("body/fill",An),this.shapeView.highlight(this.shapeBody,Xs)),this.shapeView.unhighlight(this.shapeBody,Ys),this.isInProgress&&(this.shape.attr("body/fill",kn),this.shapeView.highlight(this.shapeBody,Ys)),void(this.isIdle&&(this.shape.attr("body/fill",Sn),this.shapeView.highlight(this.shapeBody,Zs)));this.shapeView&&(this.shapeView.unhighlight(this.shapeBody,Ws),this.hasError&&this.autoValidate&&this.shapeView.highlight(this.shapeBody,Ws),this.shapeView.unhighlight(this.shapeBody,$s),this.highlighted&&this.shapeView.highlight(this.shapeBody,$s))},setBorderOutline:function(e){this.currentBorderOutline&&this.shapeView.unhighlight(this.shapeBody,this.currentBorderOutline),this.currentBorderOutline=e?Ho()(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)}))}))}))}},Js={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je,ms],data:function(){return{shape:null,definition:null,dropdownData:[{label:No["processmaker-modeler-end-event"],nodeType:"processmaker-modeler-end-event"},{label:No["processmaker-modeler-message-end-event"],nodeType:"processmaker-modeler-message-end-event",dataTest:"switch-to-message-end-event"},{label:No["processmaker-modeler-error-end-event"],nodeType:"processmaker-modeler-error-end-event",dataTest:"switch-to-error-end-event"},{label:No["processmaker-modeler-signal-end-event"],nodeType:"processmaker-modeler-signal-end-event",dataTest:"switch-to-signal-end-event"},{label:No["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 Gs,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:xe,stroke:ke},label:{text:this.node.definition.get("name"),refY:"130%"}}),this.shape.addTo(this.graph),this.shape.component=this}},Qs=Js,ea=qn(Qs,hs,fs,!1,null,null,null),ta=ea.exports,na={label:"Name",name:"name",helper:"Enter the name of this element",validation:"required"},oa=na,ia=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)},ra=[],sa={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!!bn.state.nodes.every((function(t){return t.definition.id!==e}))}}},aa=sa,la=qn(aa,ia,ra,!1,null,null,null),ca=la.exports,da={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:ca,config:ds}]},ua=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)},pa=[],ha=h(47037),fa=h.n(ha),ma={props:{value:{type:[String,Array],default:""},label:{type:String,default:"Description"}},inheritAttrs:!1,computed:{textValue:function(){return fa()(this.value)?this.value:x()(this.value[0],"text","")}},methods:{onBlur:function(){var e=this.$root.$children.find((function(e){return e.$refs.modeler}));e.$refs.modeler.pushToUndoStack()}}},ga=ma,va=(h(14855),qn(ga,ua,pa,!1,null,null,null)),ba=va.exports,ya={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Documentation",icon:"book",name:"documentation-accordion"},items:[{component:ba,config:{label:"Description",name:"documentation",helper:""}}]},wa="processmaker-modeler-end-event",xa={id:wa,component:ta,bpmnType:"bpmn:EndEvent",control:!0,category:"BPMN",icon:h(48807),label:No[wa],rank:30,items:[{icon:h(48807),label:No[wa],control:!0,rank:31,id:"processmaker-modeler-end-event"},{icon:h(52080),label:No["processmaker-modeler-message-end-event"],control:!0,rank:32,id:"processmaker-modeler-message-end-event"},{icon:h(95093),label:No["processmaker-modeler-error-end-event"],control:!0,rank:33,id:"processmaker-modeler-error-end-event"},{icon:h(96425),label:No["processmaker-modeler-signal-end-event"],control:!0,rank:34,id:"processmaker-modeler-signal-end-event"},{icon:h(47616),label:No["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(No[wa])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:No[wa],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-end-event"},items:[{component:"FormInput",config:oa}]},ya,da]}]},ka=(h(85827),h(84384)),Ca=h.n(ka),Sa=(h(75505),function(e){var t=btoa(e);return"data:image/svg+xml;base64,".concat(t)}),Ea=function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml"),o=t.definition.get("color")||Ae(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)})),Sa(n.documentElement.outerHTML)},Aa=Ea,Ma={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",Aa(this.icon,this.node))}},mounted:function(){this.updateIconColor()}},_a={extends:ta,mixins:[Ma],props:["moddle","rootElements","id"],data:function(){return{error:this.moddle.create("bpmn:Error",{id:"".concat(this.id,"_error"),name:"".concat(this.id,"_error")}),nodeIcon:Ca()}},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(){Qr()(this.rootElements,this.error)}},Ta=_a,Pa=qn(Ta,Ps,Os,!1,null,null,null),Oa=Pa.exports,Da=h(82492),Ia=h.n(Da),Na=h(57557),Ra=h.n(Na),Ba="processmaker-modeler-error-end-event",La=Ia()(Ho()(xa),{id:Ba,component:Oa,control:!1,label:No[Ba],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(No[Ba]),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(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 Ra()(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"}}]}]}]}),ja=h(43258),Fa=h.n(ja),za={extends:ta,mixins:[Ma],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:Fa()}}},qa=za,Ha=qn(qa,Ds,Is,!1,null,null,null),Va=Ha.exports,Ua="processmaker-modeler-terminate-end-event",Ga=Ia()(Ho()(xa),{id:Ua,component:Va,control:!1,label:No[Ua],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(No[Ua]),eventDefinitions:[e.create("bpmn:TerminateEventDefinition")]})}}),Wa=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))},$a=[],Xa=18,Ya=a.dia.Element.define("processmaker.components.nodes.gateway.Shape",{markup:[].concat(m(a.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:Xa,height:Xa,fill:"transparent",xlinkHref:"",refX:"50%",refX2:-Xa/2,refY:"50%",refY2:-Xa/2}}}),Za=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"],Ka={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je,ms],created:function(){var e=this.node.definition.default||null;delete this.node.definition.default,Za.indexOf(this.node.definition.$type)>-1&&this.$set(this.node.definition,"default",e)},data:function(){return{shape:null,definition:null,labelWidth:175,dropdownData:[{label:jo["processmaker-modeler-exclusive-gateway"],nodeType:"processmaker-modeler-exclusive-gateway"},{label:jo["processmaker-modeler-inclusive-gateway"],nodeType:"processmaker-modeler-inclusive-gateway",dataTest:"switch-to-inclusive-gateway"},{label:jo["processmaker-modeler-parallel-gateway"],nodeType:"processmaker-modeler-parallel-gateway",dataTest:"switch-to-parallel-gateway"},{label:jo["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 Ya;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}},Ja=Ka,Qa=qn(Ja,Wa,$a,!1,null,null,null),el=Qa.exports,tl=h(4074),nl=h.n(tl),ol={extends:el,mixins:[Ma],data:function(){return{nodeIcon:nl()}}},il=ol,rl=qn(il,Ns,Rs,!1,null,null,null),sl=rl.exports,al="processmaker-modeler-exclusive-gateway",ll={id:al,component:sl,bpmnType:"bpmn:ExclusiveGateway",control:!0,category:"BPMN",icon:h(21678),label:"Gateway",rank:50,items:[{icon:h(52794),label:"Exclusive Gateway",control:!0,rank:51,id:"processmaker-modeler-exclusive-gateway"},{icon:h(59749),label:"Inclusive Gateway",control:!0,rank:52,id:"processmaker-modeler-inclusive-gateway"},{icon:h(23726),label:"Parallel Gateway",control:!0,rank:53,id:"processmaker-modeler-parallel-gateway"},{icon:h(93763),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(jo[al])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:jo[al],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-exlcusive-gateway"},items:[{component:"FormInput",config:oa}]},ya,da]}]},cl=h(62635),dl=h.n(cl),ul={diverging:"Diverging",converging:"Converging"},pl={extends:el,mixins:[Ma],data:function(){return{incoming:this.node.definition.get("incoming"),nodeIcon:dl()}},watch:{incoming:function(e){var t=e.length<=1?ul.diverging:ul.converging;this.node.definition.set("gatewayDirection",t)}}},hl=pl,fl=qn(hl,Bs,Ls,!1,null,null,null),ml=fl.exports,gl="processmaker-modeler-inclusive-gateway",vl={id:gl,component:ml,bpmnType:"bpmn:InclusiveGateway",control:!1,category:"BPMN",label:jo[gl],definition:function(e,t){return e.create("bpmn:InclusiveGateway",{name:t(jo[gl]),gatewayDirection:ul.diverging})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:jo[gl],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-inclusive-gateway-config"},items:[{component:"FormInput",config:oa}]},ya,{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-inclusive-gateway-advanced"},items:[{component:"FormInput",config:ds},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:ul.diverging,content:"Diverging"},{value:ul.converging,content:"Converging"}]}}]}]}]},bl=h(70718),yl=h.n(bl),wl={extends:el,mixins:[Ma],data:function(){return{nodeIcon:yl()}},watch:{"node.definition":{deep:!0,immediate:!0,handler:function(){delete this.node.definition.default}}}},xl=wl,kl=qn(xl,js,Fs,!1,null,null,null),Cl=kl.exports,Sl={id:"processmaker-modeler-parallel-gateway",component:Cl,bpmnType:"bpmn:ParallelGateway",control:!1,category:"BPMN",label:"Parallel Gateway",definition:function(e,t){return e.create("bpmn:ParallelGateway",{name:t("Parallel Gateway"),gatewayDirection:ul.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:oa}]},ya,{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-parallel-gateway-direction"},items:[{component:"FormInput",config:ds},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:ul.diverging,content:"Diverging"},{value:ul.converging,content:"Converging"}]}}]}]}]},El=h(30666),Al=h.n(El),Ml={extends:el,mixins:[Ma],data:function(){return{nodeIcon:Al()}}},_l=Ml,Tl=qn(_l,zs,qs,!1,null,null,null),Pl=Tl.exports,Ol="processmaker-modeler-event-based-gateway",Dl={id:Ol,component:Pl,bpmnType:"bpmn:EventBasedGateway",control:!1,category:"BPMN",label:jo[Ol],definition:function(e,t){return e.create("bpmn:EventBasedGateway",{name:t(jo[Ol])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:jo[Ol],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"}}]},ya,da]}]},Il=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))},Nl=[],Rl={offset:{y:-20}},Bl="processmaker-modeler-lane",Ll=function(e){wi(n,e);var t=Ei(n);function n(){return _o(this,n),t.apply(this,arguments)}return Po(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 s=n.sourceAnchor,a=n.targetAnchor;return i.waypoint=[s,a].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 Vo("processmaker-modeler-sequence-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.targetConfig,r=x()(o,"component.node"),s=x()(t,"component.node");return Mi.hasTargetType(o)&&Mi.targetIsNotSource(s,r)&&n.targetIsNotALane(r)&&n.targetIsInSamePool(t,o)&&n.eventBasedGatewayTarget(s,r)&&n.isValidSource(t,i)&&n.sourceIsNotPool(s)&&!_i.isADataNode(s)&&!_i.isADataNode(r)}},{key:"isValidSource",value:function(e,t){return null==t.validateIncoming||t.validateIncoming(e.node)}},{key:"targetIsNotALane",value:function(e){return!e.isType(Bl)}},{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}(Mi),jl={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Tn],data:function(){return{shape:null}},computed:{isValidConnection:function(){return Ll.isValid({sourceShape:this.sourceShape,targetShape:this.target,targetConfig:this.targetConfig})},targetType:function(){return x()(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:Rl}])},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 a.shapes.standard.Link,this.shape.connector("rounded",{radius:5}),this.createLabel(),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},Fl=jl,zl=qn(Fl,Il,Nl,!1,null,null,null),ql=zl.exports,Hl="processmaker-modeler-sequence-flow",Vl={id:Hl,component:ql,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=mt(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 s in e)if(i[s]!==e[s])if("conditionExpression"===s&&r){if(i[s].body!==e[s]){var a=o.create("bpmn:FormalExpression",{body:e[s]});n(t,s,a)}}else n(t,s,e[s])},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:Mo(Mo({},oa),{},{validation:null})}]},ya,da]}]},Ul=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)}}})},Gl=[],Wl=function(e){wi(n,e);var t=Ei(n);function n(){return _o(this,n),t.apply(this,arguments)}return Po(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 s=n.sourceAnchor,a=n.targetAnchor;return i.waypoint=[s,a].map((function(e){return o.moddle.create("dc:Point",e)})),new Vo("processmaker-modeler-message-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.sourceConfig,r=x()(o,"component.node"),s=x()(t,"component.node");return Mi.hasTargetType(o)&&n.isValidTargetType(r)&&Mi.targetIsValidStartEventType(r)&&Mi.targetIsValidIntermediateEventType(r)&&Mi.targetIsValidBoundaryEventType(r)&&Mi.targetIsNotContainingPool(o,s)&&Mi.targetIsInDifferentPool(o,t)&&Mi.targetIsNotSource(r,s)&&Mi.allowOutgoingFlow(i,s)}},{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}(Mi),$l={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Tn],data:function(){return{shape:null}},computed:{isValidConnection:function(){return Wl.isValid({sourceShape:this.sourceShape,targetShape:this.target,sourceConfig:this.sourceConfig})},targetType:function(){return x()(this.target,"component.node.type")},sourceType:function(){return x()(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 a.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}},Xl=$l,Yl=qn(Xl,Ul,Gl,!1,null,null,null),Zl=Yl.exports,Kl="processmaker-modeler-message-flow",Jl={id:Kl,component:Zl,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:oa}]},ya,da]}]},Ql=h(18256),ec=h.n(Ql),tc={extends:ta,mixins:[Ma],props:["node","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:ec()}},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(){Qr()(this.rootElements,this.message),bn.commit("removeMessageRef",this.message)}},nc=tc,oc=qn(nc,Hs,Vs,!1,null,null,null),ic=oc.exports,rc=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)},sc=[],ac=(h(4723),h(34553),{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 bn.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 bn.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=bn.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=bn.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=bn.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=bn.getters.rootElements.findIndex((function(t){return t.id===e.deleteMessage.id}));t>-1&&bn.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 bn.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}),bn.getters.rootElements.push(t)),this.$emit("input",(0,Jn.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});bn.getters.rootElements.push(e),this.showNewMessage=!1},updateOptions:function(e){this.options=(0,Jn.uniqBy)([].concat(m(this.localMessages),m(e)),"id")},loadOptions:function(){this.updateOptions([])},loadSelected:function(e){var t=bn.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(0,Jn.get)(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}}),lc=ac,cc=(h(1277),h(25930),qn(lc,rc,sc,!1,null,"395d11da",null)),dc=cc.exports;function uc(e){return{component:dc,config:{label:"Message",name:"messageRef",helper:e}}}var pc,hc,fc={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(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 Ra()(e,["$type","eventDefinitions","messageRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var s=i.rootElements.find((function(t){return t.id===e.messageRef}));!s&&e.messageRef&&(s=o.create("bpmn:Message",{id:e.messageRef,name:e.messageRef}),i.rootElements.push(s)),t.definition.get("eventDefinitions")[0].messageRef=s}},mc="processmaker-modeler-message-end-event",gc=Ia()(Ho()(xa),Mo(Mo({},fc),{},{id:mc,component:ic,control:!1,label:No[mc],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(No[mc]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},uc("Select the message reference that this element throws")]}]}]})),vc=h(77389),bc=h.n(vc),yc={extends:ta,mixins:[Ma],data:function(){return{nodeIcon:bc()}},mounted:function(){this.shape.attr({image:{"ref-y":3}})}},wc=yc,xc=qn(wc,pc,hc,!1,null,null,null),kc=xc.exports,Cc=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)},Sc=[],Ec={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 bn.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 bn.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=bn.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=bn.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=bn.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=bn.getters.rootElements.findIndex((function(t){return t.id===e.deleteSignal.id}));t>-1&&bn.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 bn.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}),bn.getters.rootElements.push(t)),this.$emit("input",(0,Jn.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});bn.getters.rootElements.push(e),this.showNewSignal=!1},updateOptions:function(e){this.options=(0,Jn.uniqBy)([].concat(m(e),m(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=bn.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(0,Jn.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(0,Jn.get)(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}},Ac=Ec,Mc=(h(59244),h(34924),qn(Ac,Cc,Sc,!1,null,"607e6d70",null)),_c=Mc.exports;function Tc(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{component:_c,config:{label:"Signal",name:"signalRef",helper:e,canEdit:t}}}var Pc={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(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 Ra()(e,["$type","eventDefinitions","signalRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var s=i.rootElements.find((function(t){return t.id===e.signalRef}));!s&&e.signalRef&&(s=o.create("bpmn:Signal",{id:e.signalRef,name:e.signalRef}),i.rootElements.push(s)),t.definition.get("eventDefinitions")[0].signalRef=s}},Oc="processmaker-modeler-signal-end-event",Dc=Ia()(Ho()(xa),Mo(Mo({},Pc),{},{id:Oc,component:kc,control:!1,label:No[Oc],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(No[Oc]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Tc("Select the signal reference that this element throws")]}]}]})),Ic=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))},Nc=[],Rc={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je,Us,ms,Ma],data:function(){return{shape:new Gs,definition:null,dropdownData:[{label:Do["processmaker-modeler-start-event"],nodeType:"processmaker-modeler-start-event",dataTest:"switch-to-start-event"},{label:Do["processmaker-modeler-start-timer-event"],nodeType:"processmaker-modeler-start-timer-event",dataTest:"switch-to-start-timer-event"},{label:Do["processmaker-modeler-signal-start-event"],nodeType:"processmaker-modeler-signal-start-event",dataTest:"switch-to-signal-start-event"},{label:Do["processmaker-modeler-message-start-event"],nodeType:"processmaker-modeler-message-start-event",dataTest:"switch-to-message-start-event"},{label:Do["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:be,fill:ve},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}},Bc=Rc,Lc=qn(Bc,Ic,Nc,!1,null,null,null),jc=Lc.exports,Fc=h(27879),zc=h.n(Fc);function qc(e){if(!e)return!1;var t=JSON.parse(e);return t&&t.web_entry&&"DISABLED"!==t.web_entry.mode}var Hc,Vc,Uc,Gc,Wc,$c,Xc,Yc,Zc={extends:jc,watch:{"node.definition.config":{immediate:!0,handler:function(e){if(qc(e))return this.nodeIcon=zc(),void this.shape.attr("image/xlink:href",Aa(zc(),this.node));this.nodeIcon=null,this.shape.attr("image/xlink:href",null)}}}},Kc=Zc,Jc=qn(Kc,Hc,Vc,!1,null,null,null),Qc=Jc.exports,ed=36,td={bpmnType:"bpmn:StartEvent",control:!1,category:"BPMN",diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:ed,width:ed,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:oa}]},ya,da]}]},nd="processmaker-modeler-start-event",od=Ia()(Ho()(td),{id:nd,component:Qc,control:!0,icon:h(34954),label:Do[nd],rank:10,items:[{icon:h(34954),label:Do[nd],control:!0,bpmnType:"bpmn:StartEvent",rank:10,id:"processmaker-modeler-start-event"},{icon:h(42123),label:Do["processmaker-modeler-message-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:11,id:"processmaker-modeler-message-start-event"},{icon:h(47658),label:Do["processmaker-modeler-conditional-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:12,id:"processmaker-modeler-conditional-start-event"},{icon:h(43762),label:Do["processmaker-modeler-signal-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:13,id:"processmaker-modeler-signal-start-event"},{icon:h(8519),label:Do["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(Do[nd])})}}),id=h(69766),rd=h.n(id),sd={extends:jc,data:function(){return{nodeIcon:rd()}},mounted:function(){this.shape.attr({image:{"ref-x":5,"ref-y":3}})}},ad=sd,ld=qn(ad,Uc,Gc,!1,null,null,null),cd=ld.exports,dd={label:"Request Variable",name:"config",helper:"Enter the request variable that will store the signal payload","data-cy":"signal-request-variable"},ud=dd,pd="processmaker-modeler-signal-start-event",hd=Ia()(Ho()(td),Mo(Mo({},Pc),{},{id:pd,component:cd,label:Do[pd],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Do[pd]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Tc("Signal that will trigger this start event",!1),{component:"FormInput",config:ud}]}]}]})),fd=h(47179),md=h.n(fd),gd={extends:jc,data:function(){return{nodeIcon:md()}}},vd=gd,bd=qn(vd,Wc,$c,!1,null,null,null),yd=bd.exports,wd="processmaker-modeler-message-start-event",xd=Ia()(Ho()(td),Mo(Mo({},fc),{},{id:wd,component:yd,label:Do[wd],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Do[wd]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},uc("Message that will trigger this start event")]}]}]})),kd=h(93698),Cd=h.n(kd),Sd={extends:jc,data:function(){return{nodeIcon:Cd()}}},Ed=Sd,Ad=qn(Ed,Xc,Yc,!1,null,null,null),Md=Ad.exports,_d=(h(82481),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)}),Td=[],Pd=h(26985),Od=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()},Dd=[];function Id(e){return null===e?"":"string"===typeof e?e:e.isLuxonDateTime?e.toISO():e.toISOString()}function Nd(e,t,n,o,i){var r=Id(e),s=Id(t),a="after"===o?i:"",l="ondate"===o?s:"";return"R".concat(a,"/").concat(r,"/").concat(n)+(l?"/"+l:"")}function Rd(e,t){return"P".concat(e).concat(t)}var Bd,Ld,jd=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,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"never",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"1";_o(this,e),Te(this,"_startDate",void 0),Te(this,"_repeat",void 0),Te(this,"_periodicityValue",void 0),Te(this,"_selectedWeekdays",void 0),Te(this,"_endDate",void 0),Te(this,"_ends",void 0),Te(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=s,this._times=a}return Po(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?Pd.DateTime.fromISO(e).toUTC():e.isLuxonDateTime?e.toUTC():Pd.DateTime.fromJSDate(e).toUTC()}},{key:"getFormattedDateWithWeekdayIntervals",value:function(){var e=this,t=Rd(this._repeat,this._periodicityValue),n=[this._startDate.toISO()];return this._selectedWeekdays.forEach((function(o){var i=e.getWeekDayDate(o),r=Nd(i,e._endDate,t,e._ends,e._times);n.push(r)})),n.join("|")}},{key:"getWeekDayDate",value:function(e){var t=Pd.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=Rd(this._repeat,this._periodicityValue);return Nd(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}(),Fd={props:{selectWeekdays:{type:Array,default:function(){return[]}},startDate:{type:String,default:Pd.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:Pd.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 jd(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)}},zd=Fd,qd=(h(41168),qn(zd,Od,Dd,!1,null,"4ae18478",null)),Hd=qd.exports,Vd={day:"D",week:"W",month:"M",year:"Y"},Ud={components:{WeekdaySelect:Hd},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:Pd.DateTime,expression:null,startDate:Pd.DateTime.local().toUTC().toISO(),repeat:"1",periodicity:"week",ends:"never",endDate:Pd.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 Vd[this.periodicity]},timerExpression:function(){if(this.isWeeklyPeriodSelected()&&this.expression)return this.expression;var e=Rd(this.repeat,this.periodicityValue);return Nd(this.startDate,this.endDate,e,this.ends,this.times)}},methods:{isWeeklyPeriodSelected:function(){return"week"===this.periodicity},setStartDate:function(e){this.startDate=Pd.DateTime.fromISO(e,{zone:"utc"}).set({seconds:0,milliseconds:0}).toUTC().toISO()},setEndDate:function(e){var t=Pd.DateTime.fromISO(this.startDate,{zone:"utc"});this.endDate=Pd.DateTime.fromISO(e,{zone:"utc"}).set({hours:t.hour,minutes:t.minute,seconds:0,milliseconds:0}).toUTC().toISO()},parseTimerConfig:function(e){var t,n,o=this;if(null!==(t=e[0])&&void 0!==t&&null!==(n=t.timeCycle)&&void 0!==n&&n.body)try{var i=!1,r=e[0].timeCycle.body.split("|");r.forEach((function(e){if("R"!==e.substr(0,1))o.startDate=e,i=!0;else{var t=e.match(/R(\d*)\/([^/]+)\/P(\d+)(\w)(?:\/([^/]+))?/);if(t){if(o.times=t[1]||"1",o.repeat=t[3],o.periodicity=Object.keys(Vd).find((function(e){return Vd[e]===t[4]})),i||(o.startDate=t[2],i=!0),o.isWeeklyPeriodSelected()){var n=Pd.DateTime.fromISO(t[2],{zone:"utc"}).toLocal().weekday;o.selectedWeekdays.push(n)}o.endDate=t[5]||Pd.DateTime.local().toUTC().toISO(),o.ends=t[5]?"ondate":t[1]?"after":"never"}}i=!0}))}catch(ka){this.resetTimerExpression()}},resetTimerExpression:function(){this.startDate=Pd.DateTime.local().toUTC().toISO(),this.times="1",this.repeat="1",this.periodicity="week",this.endDate=Pd.DateTime.local().toUTC().toISO(),this.ends="never",this.expression=null,this.selectedWeekdays=[]}}},Gd=Ud,Wd=(h(33383),h(66667),qn(Gd,_d,Td,!1,null,"72709fd0",null)),$d=Wd.exports,Xd="processmaker-modeler-start-timer-event",Yd=Ia()(Ho()(td),{id:Xd,component:Md,label:Do[Xd],definition:function(e,t){var n=e.create("bpmn:StartEvent",{name:t(Do[Xd])});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 s=e[r];if("object"===g(s))continue;var a=i.get(r)[0].timeCycle;if(a&&a.body===s)continue;var l={timeCycle:o.create("bpmn:Expression",{body:s})},c=[o.create("bpmn:TimerEventDefinition",l)];n(t,"eventDefinitions",c)}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:$d,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},ya,da]}]}),Zd=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))},Kd=[],Jd=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},_s("topLeft"),_s("topCenter"),_s("topRight"),_s("bottomLeft"),_s("bottomCenter"),_s("bottomRight")],defaults:a.util.deepSupplement({type:"processmaker.components.nodes.intermediateEvent.Shape",size:{width:36,height:36},attrs:Mo(Mo(Mo(Mo(Mo(Mo({body:{fill:ye,stroke:we},body2:{cx:18,cy:18,r:15,"stroke-width":2,fill:ye,stroke:we},image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},Ts("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),Ts("topCenter",{ref:"circle","ref-y":-20})),Ts("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),Ts("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),Ts("bottomCenter",{ref:"circle","ref-padding-y":-40})),Ts("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},a.shapes.standard.Circle.prototype.defaults)}),Qd={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je,Us,ms],data:function(){return{shape:null,definition:null,dropdownData:[{label:zo["processmaker-modeler-intermediate-catch-timer-event"],nodeType:"processmaker-modeler-intermediate-catch-timer-event",dataTest:"switch-to-intermediate-timer-catch-event"},{label:zo["processmaker-modeler-intermediate-signal-catch-event"],nodeType:"processmaker-modeler-intermediate-signal-catch-event",dataTest:"switch-to-intermediate-signal-catch-event"},{label:zo["processmaker-modeler-intermediate-signal-throw-event"],nodeType:"processmaker-modeler-intermediate-signal-throw-event",dataTest:"switch-to-intermediate-signal-throw-event"},{label:zo["processmaker-modeler-intermediate-message-catch-event"],nodeType:"processmaker-modeler-intermediate-message-catch-event",dataTest:"switch-to-intermediate-message-catch-event"},{label:zo["processmaker-modeler-intermediate-message-throw-event"],nodeType:"processmaker-modeler-intermediate-message-throw-event",dataTest:"switch-to-intermediate-message-throw-event"},{label:zo["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 Jd;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}},eu=Qd,tu=qn(eu,Zd,Kd,!1,null,null,null),nu=tu.exports,ou=h(39653),iu=h.n(ou),ru={extends:nu,mixins:[Ma],data:function(){return{nodeIcon:iu()}}},su=ru,au=qn(su,Bd,Ld,!1,null,null,null),lu=au.exports,cu=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)},du=[],uu=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)},pu=[],hu=h(10928),fu=h.n(hu),mu={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},gu={props:["value","repeatInput"],data:function(){var e=[{name:mu.minute,value:"M",isTime:!0},{name:mu.hour,value:"H",isTime:!0},{name:mu.day,value:"D"},{name:mu.week,value:"W"},{name:mu.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=fu()(e);if("M"===n){var o=t?mu.minute:mu.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]}}},vu=gu,bu=qn(vu,uu,pu,!1,null,null,null),yu=bu.exports,wu=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)},xu=[],ku={data:function(){return{DateTime:Pd.DateTime}},props:{value:String},methods:{getTimezone:function(){return"undefined"!==typeof window.ProcessMaker&&window.ProcessMaker.user&&window.ProcessMaker.user.timezone||"local"},convertFromUTC:function(e){return Pd.DateTime.fromISO(e,{zone:"utc"}).setZone(this.getTimezone()).toISO()},emitValue:function(e){var t=Pd.DateTime.fromISO(e).toUTC().toISO();this.$emit("input",t)}}},Cu=ku,Su=qn(Cu,wu,xu,!1,null,null,null),Eu=Su.exports,Au=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)},Mu=[],_u={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},Tu={components:{WeekdaySelect:Hd},props:["value","repeatInput"],data:function(){var e=[{name:_u.minute,value:"M",isTime:!0},{name:_u.hour,value:"H",isTime:!0},{name:_u.day,value:"D"},{name:_u.week,value:"W",isWeek:!0},{name:_u.month,value:"M"}];return{DateTime:Pd.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=Pd.DateTime.fromISO(t[2],{zone:"utc"}).toLocal().weekday;n.push(o)}})),n},getPeriodFromDelayString:function(e){var t=this.isTimePeriod(e),n=fu()(e);if("M"===n){var o=t?_u.minute:_u.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}}},Pu=Tu,Ou=qn(Pu,Au,Mu,!1,null,null,null),Du=Ou.exports,Iu="PT1H",Nu={timeDuration:"DurationExpression",timeDate:"DateTimeExpression",timeCycle:"CycleExpression"},Ru={props:{value:{type:Object},typeHelper:{type:String,default:"Select the type of delay"}},components:{DurationExpression:yu,DateTimeExpression:Eu,CycleExpression:Du},computed:{component:function(){return Nu[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)?Iu:Pd.DateTime.local().toUTC().toISO();this.emitChange(e,t)},isDelayType:function(e){return Nu[e]===Nu.timeDuration},isCycleType:function(e){return Nu[e]===Nu.timeCycle},emitChange:function(e,t){this.$emit("input",{type:e,body:t})}}},Bu=Ru,Lu=qn(Bu,cu,du,!1,null,null,null),ju=Lu.exports,Fu="processmaker-modeler-intermediate-catch-timer-event",zu={id:Fu,component:lu,bpmnType:"bpmn:IntermediateCatchEvent",control:!0,category:"BPMN",icon:h(58455),label:"Intermediate Event",rank:20,items:[{icon:h(24462),label:"Intermediate Timer Event",control:!0,rank:21,id:"processmaker-modeler-intermediate-catch-timer-event"},{icon:h(48351),label:"Intermediate Signal Catch Event",control:!0,rank:22,id:"processmaker-modeler-intermediate-signal-catch-event"},{icon:h(20894),label:"Intermediate Signal Throw Event",control:!0,rank:23,id:"processmaker-modeler-intermediate-signal-throw-event"},{icon:h(5294),label:"Intermediate Message Catch Event",control:!0,rank:24,id:"processmaker-modeler-intermediate-message-catch-event"},{icon:h(16383),label:"Intermediate Message Throw Event",control:!0,rank:25,id:"processmaker-modeler-intermediate-message-throw-event"},{icon:h(74726),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(zo[Fu]),eventDefinitions:[e.create("bpmn:TimerEventDefinition",{timeDuration:e.create("bpmn:Expression",{body:Iu})})]})},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=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],s=i[0][r].body;e[o]={type:r,body:s}}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 s=e[r],a=s.type,l=s.body,c=i.get(r)[0][a];if(c&&c.body===l)continue;var d=Te({},a,o.create("bpmn:Expression",{body:l})),u=[o.create("bpmn:TimerEventDefinition",d)];n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{name:zo[Fu],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-timer-config"},items:[{component:"FormInput",config:oa}]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-intermediate-timer-event-timing-control"},items:[{component:ju,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},ya,da]}]};function qu(){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 Hu,Vu,Uu,Gu,Wu,$u,Xu,Yu,Zu,Ku,Ju=h(89454),Qu=h.n(Ju),ep={extends:nu,mixins:[Ma],data:function(){return{nodeIcon:Qu()}},mounted:function(){var e=qu(we,2,ye);this.shape.attr(e)}},tp=ep,np=qn(tp,Hu,Vu,!1,null,null,null),op=np.exports,ip={id:"processmaker-modeler-intermediate-message",component:nu,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:oa}]},ya,da]}]},rp="processmaker-modeler-intermediate-message-catch-event",sp=Ia()(Ho()(ip),Mo(Mo({},fc),{},{id:rp,component:op,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:zo[rp],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(zo[rp]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},uc("Message that will catch this intermediate event")]}]}]})),ap=h(74225),lp=h.n(ap),cp={extends:nu,mixins:[Ma],data:function(){return{nodeIcon:lp()}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},dp=cp,up=qn(dp,Uu,Gu,!1,null,null,null),pp=up.exports,hp={id:"processmaker-modeler-intermediate-event",component:nu,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:oa}]},ya,da]}]},fp="processmaker-modeler-intermediate-signal-catch-event",mp=Ia()(Ho()(hp),Mo(Mo({},Pc),{},{id:fp,component:pp,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:zo[fp],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(zo[fp]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Tc("Signal that will catch this intermediate event",!1),{component:"FormInput",config:ud}]}]}]})),gp=h(98358),vp=h.n(gp),bp={extends:nu,mixins:[Ma],props:["moddle","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:vp()}},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(){Qr()(this.rootElements,this.message),bn.commit("removeMessageRef",this.message)}},yp=bp,wp=qn(yp,Wu,$u,!1,null,null,null),xp=wp.exports,kp="processmaker-modeler-intermediate-message-throw-event",Cp=Ia()(Ho()(ip),Mo(Mo({},fc),{},{id:kp,component:xp,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:zo[kp],icon:h(16383),definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(zo[kp]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},uc("Select the message reference that this element throws")]}]}]})),Sp=h(67471),Ep=h.n(Sp),Ap={extends:nu,mixins:[Ma],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:Ep()}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},Mp=Ap,_p=qn(Mp,Xu,Yu,!1,null,null,null),Tp=_p.exports,Pp="processmaker-modeler-intermediate-signal-throw-event",Op=Ia()(Ho()(hp),Mo(Mo({},Pc),{},{id:Pp,component:Tp,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:zo[Pp],definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(zo[Pp]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Tc("Select the signal reference that this element throws")]}]}]})),Dp=h(94081),Ip=h.n(Dp),Np={extends:nu,mixins:[Ma],data:function(){return{nodeIcon:Ip()}},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}})}},Rp=Np,Bp=qn(Rp,Zu,Ku,!1,null,null,null),Lp=Bp.exports;function jp(){return[{component:"FormInput",config:{label:"Condition",name:"condition",helper:"Expression to evaluate condition"}}]}var Fp={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(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 Ra()(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]))}},zp="processmaker-modeler-intermediate-conditional-catch-event",qp=Ia()(Ho()(hp),Mo(Mo({},Fp),{},{id:zp,component:Lp,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:zo[zp],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(zo[zp]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(m(jp()))}]}]})),Hp=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))},Vp=[],Up=a.shapes.standard.Rectangle.extend({markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},_s("topLeft"),_s("topCenter"),_s("topRight"),_s("bottomLeft"),_s("bottomCenter"),_s("bottomRight")],defaults:a.util.deepSupplement({type:"processmaker.components.nodes.task.Shape",size:{width:100,height:60},attrs:Mo(Mo(Mo(Mo(Mo(Mo({image:{"ref-x":4,"ref-y":4,ref:"rect",width:16,height:16,"data-test":"nodeIcon"}},Ts("topLeft",{"ref-y":4,ref:"rect"})),Ts("topCenter",{"ref-y":4,ref:"rect"})),Ts("topRight",{"ref-y":4,"ref-x":96,ref:"rect"},-1)),Ts("bottomLeft",{ref:"rect"})),Ts("bottomCenter",{ref:"rect"})),Ts("bottomRight",{"ref-x":96,ref:"rect"},-1))},a.shapes.standard.Rectangle.prototype.defaults)}),Gp=76,Wp=116,$p={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",Aa(atob(e),this.node))}},mounted:function(){this.node.definition.get("customIcon")&&this.setCustomIcon(this.node.definition.get("customIcon"))}},Xp=10,Yp=[{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"}],Zp=Yp,Kp=h.p+"img/sequential.f86ad08b.svg",Jp=h.p+"img/parallel.cf1d1995.svg",Qp=h.p+"img/loop.00441d9f.svg",eh="bpmn:StandardLoopCharacteristics",th="bpmn:MultiInstanceLoopCharacteristics";function nh(e,t,n,o){var i=e.get("loopCharacteristics"),r=[eh,th];if(i&&r.includes(i.$type))if(i.$type!==eh){var s=i.isSequential?Kp:Jp;n(t.bottomCenter,"loopCharacteristics",s)}else n(t.bottomCenter,"loopCharacteristics",Qp);else o(t.bottomCenter,"loopCharacteristics")}var oh=h.p+"img/compensation.495ae0a2.svg";function ih(e,t,n,o){e.isForCompensation?n(t.bottomCenter,"compensation",oh):o(t.bottomCenter,"compensation")}var rh,sh,ah=15,lh=2*Ms,ch={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je,Us,ms,$p],data:function(){return{shape:null,definition:null,dropdownData:[{label:Bo["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:Bo["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:Bo["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:Bo["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],boundaryEventDropdownData:Zp,anchorPointFunction:at}},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",a.util.breakText(e,{width:t}));var n=this.shape.size(),o=n.height,i=this.calculateSizeOnGrid(),r=this.useTaskHeight(i)?Gp:i;o!==r&&(this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment())},"node.definition.isForCompensation":function(){ih(this.node.definition,this.markers,this.$set,this.$delete)},"node.definition":{deep:!0,handler:function(){nh(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,s={x:n,y:o,width:i,height:r};return this.graph.findModelsInArea(s)},calculateSizeOnGrid:function(){var e=Xp-Gp%Xp,t=Math.floor(this.shapeView.selectors.label.getBBox().height),n=t+ah+lh,o=this.paperManager.ceilToNearestGridMultiple(n)-e;return this.middleIsOddNumber(o)&&(o+=Xp),o},useTaskHeight:function(e){return e<Gp||!this.node.definition.name},middleIsOddNumber:function(e){return 1===Math.abs(e/2%2)}},mounted:function(){this.shape=new Up;var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),ih(this.node.definition,this.markers,this.$set,this.$delete),nh(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8},label:{text:a.util.breakText(this.node.definition.get("name"),{width:e.width}),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this}},dh=ch,uh=qn(dh,Hp,Vp,!1,null,null,null),ph=uh.exports,hh=h(95514),fh=h.n(hh),mh={extends:ph,mixins:[Ma],data:function(){return{nodeIcon:fh()}}},gh=mh,vh=qn(gh,rh,sh,!1,null,null,null),bh=vh.exports,yh=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)},wh=[],xh={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})}}},kh=xh,Ch=qn(kh,yh,wh,!1,null,"66aabb37",null),Sh=Ch.exports,Eh={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:ca,config:ds},{component:Sh,name:"taskMarkers",config:{label:"Marker Flags",name:"markerFlags",style:"display:none"}}]},Ah=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)},Mh=[],_h={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){(0,Jn.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",(0,Jn.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.loopMaximum=this.getLoopMaximum(),this.loopCondition=this.getLoopCondition()},saveData:function(){(0,Jn.isEqual)(this.local,this.value)||this.$emit("input",(0,Jn.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}}},Th=_h,Ph=qn(Th,Ah,Mh,!1,null,null,null),Oh=Ph.exports;h(19601),h(36210);function Dh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ih(e,t,n){Dh(e,t),t.set(e,n)}function Nh(e,t){return t.get?t.get.call(e):t.value}function Rh(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Bh(e,t){var n=Rh(e,t,"get");return Nh(e,n)}function Lh(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}function jh(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}function Fh(e,t,n){return Lh(e,t),jh(n,"get"),Nh(e,n)}function zh(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 qh(e,t,n,o){return Lh(e,t),jh(n,"set"),zh(e,n,o),o}h(24603),h(28450),h(88386),h(39714),h(4129);var Hh=new WeakMap,Vh=new WeakMap,Uh=new WeakMap,Gh=function(){function e(t){_o(this,e),Ih(this,Hh,{writable:!0,value:function(){var t,n=e.prefix+Fh(e,e,Wh);return qh(e,e,Wh,(t=Fh(e,e,Wh),t++,t)),n}}),Ih(this,Vh,{writable:!0,value:function(){var t,n=e.prefix+Fh(e,e,$h)+"_di";return qh(e,e,$h,(t=Fh(e,e,$h),t++,t)),n}}),Ih(this,Uh,{writable:!0,value:function(){var t,n=e.processPrefix+Fh(e,e,Xh);return qh(e,e,Xh,(t=Fh(e,e,Xh),t++,t)),n}}),this.definitions=t,this.refreshLastIdCounter(),this.refreshLastDiagramIdCounter(),this.refreshLastProcessIdCounter()}return Po(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),s=r?parseInt(r[1]):0;s>i&&(i=s)}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);qh(e,e,Wh,t+1)}},{key:"getCounter",value:function(){return this.refreshLastIdCounter(),Fh(e,e,Wh)}},{key:"refreshLastDiagramIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.prefix,"(\\d+)_di$")),this.definitions.diagrams);qh(e,e,$h,t+1)}},{key:"refreshLastProcessIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.processPrefix,"(\\d+)$")),this.definitions.rootElements);qh(e,e,Xh,t+1)}},{key:"generate",value:function(){var e=Bh(this,Hh).call(this),t=Bh(this,Vh).call(this);return[e,t]}},{key:"generateProcessId",value:function(){return Bh(this,Uh).call(this)}}]),e}();Te(Gh,"prefix","node_"),Te(Gh,"processPrefix","Process_");var Wh={writable:!0,value:1},$h={writable:!0,value:1},Xh={writable:!0,value:1},Yh=null;function Zh(e){return Yh||(Yh=new Gh(e)),Yh}var Kh=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_o(this,e),this.index=window.NODE_INSPECTOR_FIRST_INDEX||(new Date).getTime(),this.definitions=t,this.nodeIdGenerator=Zh(this.definitions),this.options=Object.assign({prefix:this.nodeIdGenerator.generate()[0]},n),this.createdModdleNodes={}}return Po(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(Ra()(e,"$type","$config","markerFlags")).reduce((function(o,i){var s=r.setDefinitionProps(e[i],t,n,void 0,i);return null!==s&&void 0!==s?o[i]=s:void 0===s&&delete o[i],o}),o||this.createModdleNode(n,e))}catch(s){throw'Unable to create moddle node of type "'.concat(e.$type,'" \n ').concat(s)}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(Ra()(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}(),Jh=function(e,t,n,o,i){var r=new Kh(i,{prefix:"".concat(t.definition.id,"_inner")}),s=r.setDefinitionProps(e.$loopCharactetistics,n,o,{});return s=r.setReferences(s),s.loopCharacteristics?(delete t.definition.loopCharacteristics,n(t,"loopCharacteristics",s.loopCharacteristics)):(t.definition.loopCharacteristics=null,delete t.definition.loopCharacteristics),s.ioSpecification?(delete t.definition.ioSpecification,n(t,"ioSpecification",s.ioSpecification)):delete t.definition.ioSpecification,Ra()(e,["$loopCharactetistics"])},Qh=function(e,t,n,o){var i=o.definitions,r=new Kh(i);e.$loopCharactetistics=r.getDefinitionProps({id:t.definition.id,loopCharacteristics:t.definition.loopCharacteristics,ioSpecification:t.definition.ioSpecification}),delete e.loopCharacteristics,delete e.ioSpecification},ef={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Loop Activity",icon:"redo",name:"loop-characteristics-accordion"},items:[{component:Oh,name:"LoopCharactetistics",config:{name:"$loopCharactetistics"}}]},tf="processmaker-modeler-task",nf={id:"processmaker-modeler-task",component:ph,bpmnType:["bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:SubProcess"],control:!0,category:"BPMN",rank:40,icon:h(45849),label:"Task",items:[{icon:h(45849),label:"Form Task",control:!0,rank:41,id:"processmaker-modeler-task"},{icon:h(24678),label:"Manual Task",control:!0,rank:42,id:"processmaker-modeler-manual-task"},{icon:h(37901),label:"Script Task",control:!0,rank:43,id:"processmaker-modeler-script-task"},{icon:h(47356),label:"Sub Process",control:!0,rank:44,id:"processmaker-modeler-call-activity"}],definition:function(e,t){return e.create("bpmn:Task",{name:t(Bo[tf]),assignment:"requester"})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Gp,width:Wp})})},inspectorHandler:function(e,t,n,o,i,r){of(e.markerFlags,t,n,o),Jh(e,t,n,o,i),r(Ra()(e,"markerFlags","$loopCharactetistics"))},inspectorData:function(e,t,n){var o=t(e);return Qh(o,e,t,n),o.markerFlags={isForCompensation:o.isForCompensation},delete o.isForCompensation,o},inspectorConfig:[{name:Bo[tf],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-task"},items:[{component:"FormInput",config:oa}]},ef,ya,Eh]}],loopCharacteristicsHandler:Jh,loopCharacteristicsData:Qh};function of(e,t,n){if(e){var o=t.definition.get("isForCompensation"),i=e.isForCompensation;null!=i&&i!==o&&n(t,"isForCompensation",i)}}var rf,sf,af=Mo(Mo({},nf),{},{component:bh}),lf=(h(38862),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)}),cf=[],df=h.p+"img/subprocess.19c191a3.svg",uf=15,pf=2*Ms,hf='<svg version="1.1"\n baseProfile="full"\n width="16" height="16"\n xmlns="http://www.w3.org/2000/svg"></svg>',ff={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","paperManager"],mixins:[Ks,Je,Us,ms,Ma,$p],data:function(){return{subProcessSvg:null,failedToLoadPreview:!1,boundaryEventDropdownData:Zp,dropdownData:[{label:Bo["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:Bo["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:Bo["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:Bo["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],nodeIcon:hf,iconName:"",anchorPointFunction:at}},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",a.util.breakText(e,{width:t}));var n=this.shapeView.selectors.label.getBBox().height,o=this.shape.size(),i=o.height;if(n+uf+pf!==i){var r=Math.max(n+uf+pf,Gp);this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment()}},"node.definition.config":function(e){bn.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(){nh(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 Up,this.$set(this.markers.bottomCenter,"subprocess",df);var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),nh(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8,strokeWidth:4},label:{text:a.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"))}},mf=ff,gf=qn(mf,lf,cf,!1,null,null,null),vf=gf.exports,bf=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)},yf=[],wf=h(45578),xf=h.n(wf),kf={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 xf()(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=C()((function(t){e.loadProcesses(t)}),500),0===this.processList.length?this.loadProcesses():this.loadBpmnValues()}},Cf=kf,Sf=qn(Cf,bf,yf,!1,null,null,null),Ef=Sf.exports,Af="processmaker-modeler-call-activity",Mf={id:Af,component:vf,bpmnType:"bpmn:CallActivity",control:!1,category:"BPMN",icon:h(12893),label:Bo[Af],definition:function(e,t){return e.create("bpmn:CallActivity",{name:t(Bo[Af]),calledElement:"",config:"{}",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Gp,width:Wp})})},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:Bo[Af],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-subprocess"},items:[{component:"FormInput",config:oa},{component:Ef,config:{name:"config"}}]},ya,da]}]},_f=h(87465),Tf=h.n(_f),Pf={extends:ph,mixins:[Ma],data:function(){return{nodeIcon:Tf(),iconName:""}}},Of=Pf,Df=qn(Of,rf,sf,!1,null,null,null),If=Df.exports,Nf="processmaker-modeler-script-task",Rf={id:Nf,component:If,bpmnType:"bpmn:ScriptTask",control:!1,category:"BPMN",icon:h(75763),label:Bo[Nf],definition:function(e,t){return e.create("bpmn:ScriptTask",{name:t(Bo[Nf]),scriptRef:null,loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Gp,width:Wp})})},inspectorConfig:[{name:Bo[Nf],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-script-task"},items:[{component:"FormInput",config:oa}]},ya,da]}]},Bf=Mo(Mo({},nf),{},{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:oa}]},ya,da]}]}),Lf=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))},jf=[],Ff=160,zf={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","paperManager","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je],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:a.util.breakText(e,{width:Ff}),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 a.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"))}},qf=zf,Hf=qn(qf,Lf,jf,!1,null,null,null),Vf=Hf.exports,Uf="processmaker-modeler-text-annotation",Gf={id:Uf,component:Vf,bpmnType:"bpmn:TextAnnotation",control:!0,category:"BPMN",icon:h(15153),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"}}]},ya,da]}]},Wf=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)},$f=[],Xf=h.p+"img/highlight-shape.5f7b1ba9.svg",Yf=30,Zf=200,Kf=300,Jf=20,Qf=300,em=100,tm={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===bn.getters.isReadOnly&&this.addResizeAnchors(),this.calculateElementLimits(),this.updateAnchorPointPosition()):this.removeResizeAnchors())}},computed:{poolComponent:function(){return x()(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!==Bl&&"processmaker-modeler-message-flow"!==e.component.node.type})).map((function(e){return e.getBBox()})),this.elementTopY=Math.min.apply(Math,m(this.elementBounds.map((function(e){var t=e.y;return t-Jf})))),this.elementBottomY=Math.max.apply(Math,m(this.elementBounds.map((function(e){var t=e.y,n=e.height;return t+n+Jf})))),this.elementRightX=Math.max.apply(Math,m(this.elementBounds.map((function(e){var t=e.x,n=e.width;return t+n+Jf})))),this.elementLeftX=Math.min.apply(Math,m(this.elementBounds.map((function(e){var t=e.x;return t-Jf}))))},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 a.shapes.standard.EmbeddedImage,n=new a.shapes.standard.EmbeddedImage,o=new a.shapes.standard.EmbeddedImage,i=new a.shapes.standard.EmbeddedImage;this.anchorPoints=[t,n,o,i];var r=this.shape.getBBox(),s=r.x,l=r.y,c=r.width,d=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(s+c,l+d),n.position(s-this.pointWidth,l+d),o.position(s+c,l-this.pointHeight),i.position(s-this.pointWidth,l-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){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),bn.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 s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.width,d=s.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}),em),b=Math.max(a+c-(i+this.pointWidth),a+c-this.elementLeftX+Yf,Kf),y=Math.max(l+d-(r+this.pointWidth),l+d-this.elementTopY,this.poolComponent.laneSet?v:Zf),w=Math.max(p+f-(i+this.pointWidth),p+f-this.elementLeftX+Jf+Yf,Qf),x=Math.max(h+m-(r+this.pointHeight),em);if(this.isLane)if(this.shape===g[0]){var k=Math.max(a+c-(i+this.pointWidth)+Yf,a+c-this.elementLeftX+Yf,Kf);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+em),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 s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.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}),em),g=Math.max(i-a,this.elementRightX-a,Kf),v=Math.max(l+c-(r+this.pointWidth),l+c-this.elementTopY,this.poolComponent.laneSet?m:Zf),b=Math.max(i-u,this.elementRightX-u,Qf),y=Math.max(p+h-(r+this.pointHeight),em);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+em),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 s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.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}),em),g=Math.max(a+c-(i+this.pointWidth),a+c-this.elementLeftX+Yf,Kf),v=Math.max(r-l,this.elementBottomY-l,this.poolComponent.laneSet?m:Zf),b=Math.max(u+h-(i+this.pointWidth),u+h-this.elementLeftX+Jf+Yf,Qf),y=Math.max(r-p,em);if(this.isLane)if(this.shape===f[f.length-1]){var w=Math.max(a+c-(i+this.pointWidth)+Yf,a+c-this.elementLeftX+Yf,Kf);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-em-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 s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=this.shape.getBBox(),d=c.x,u=c.y,p=this.poolComponent.sortedLanes(),h=p.slice(0,p.length-1).reduce((function(e,t){return e+t.getBBox().height}),em),f=Math.max(i-a,this.elementRightX-a,Kf),m=Math.max(r-l,this.elementBottomY-l,this.poolComponent.laneSet?h:Zf),g=Math.max(i-d,this.elementRightX-d,Qf),v=Math.max(r-u,em);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-em-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(ka){}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:Xf,cursor:t,buttonId:n,refWidth:20,refHeight:20,resetOffset:!0}})}},mounted:function(){var e=this;this.$nextTick((function(){e.configureResize()}))}},nm=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))},om=[],im={components:{CrownConfig:is},props:["graph","node","nodes","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,tm],data:function(){return{shape:null,definition:null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new a.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:Ce}),this.shape.attr("label",{text:a.util.breakText(this.node.definition.get("name"),{width:e.height}),fill:"black",transform:"rotate(-90)",refX:Yf/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(Qr()(t,this.node.definition),0===t.length)return e.containingProcess.set("laneSets",[]),void(e.laneSet=null)}},rm=im,sm=qn(rm,nm,om,!1,null,null,null),am=sm.exports,lm={id:Bl,component:am,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:oa}]},ya,da]}]},cm=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)},dm=[],um=h.p+"img/lane-above.37ee2b80.svg",pm={components:{CrownButton:Vn,FontAwesomeIcon:ii.FontAwesomeIcon},data:function(){return{laneAboveIcon:um}},created:function(){Go.library.add(Xo)}},hm=pm,fm=qn(hm,cm,dm,!1,null,null,null),mm=fm.exports,gm=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)},vm=[],bm=h.p+"img/lane-below.22169670.svg",ym={components:{CrownButton:Vn,FontAwesomeIcon:ii.FontAwesomeIcon},data:function(){return{laneBelowIcon:bm}},created:function(){Go.library.add(Yo)}},wm=ym,xm=qn(wm,gm,vm,!1,null,null,null),km=xm.exports,Cm=a.shapes.standard.Rectangle.define("processmaker.modeler.bpmn.pool",{markup:[].concat(m(a.shapes.standard.Rectangle.prototype.markup),[{tagName:"polyline",selector:"polyline"}]),attrs:{label:{fill:"black",transform:"rotate(-90)",refX:Yf/2},polyline:{refPointsKeepOffset:"".concat(Yf,",0 ").concat(Yf,",200"),stroke:"#000",fill:"#fff",strokeWidth:2}}}),Sm=Cm,Em=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))},Am=[],Mm={inheritAttrs:!1,components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,ms,Je],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 a.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}},_m=Mm,Tm=qn(_m,Em,Am,!1,null,null,null),Pm=Tm.exports,Om="processmaker-modeler-data-object",Dm={id:Om,component:Pm,bpmnType:"bpmn:DataObjectReference",control:!0,category:"BPMN",icon:h(91012),label:Bo[Om],rank:80,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataObjectReference",{name:t(Bo[Om])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:36})})},inspectorConfig:[{name:Bo[Om],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-object"},items:[{component:"FormInput",config:oa}]},ya,da]}]},Im=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))},Nm=[],Rm=a.shapes.standard.Cylinder.extend({markup:[].concat(m(a.shapes.standard.Cylinder.prototype.markup),[{tagName:"ellipse",selector:"thirdLine"},{tagName:"ellipse",selector:"secondLine"},{tagName:"ellipse",selector:"firstLine"}]),defaults:a.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"}}},a.shapes.standard.Cylinder.prototype.defaults)}),Bm={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,ms,Je],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 Rm,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}},Lm=Bm,jm=qn(Lm,Im,Nm,!1,null,null,null),Fm=jm.exports,zm="processmaker-modeler-data-store",qm={id:zm,component:Fm,bpmnType:"bpmn:DataStoreReference",control:!0,category:"BPMN",icon:h(63427),label:Bo[zm],rank:90,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataStoreReference",{name:t(Bo[zm])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:50})})},inspectorConfig:[{name:Bo[zm],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-store"},items:[{component:"FormInput",config:oa}]},ya,da]}]};function Hm(e,t){var n=new Sm,o=e.diagram.bounds;return n.position(o.x,o.y),n.resize(o.width,o.height),n.attr("label/text",a.util.breakText(e.definition.get("name"),{width:o.width})),n.attr("body",{fill:Ce}),n.addTo(t),n}function Vm(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 Um(e,t){e.fitEmbeds({padding:Jf+Yf}),e.resize(e.getBBox().width-Yf,e.getBBox().height-Yf),e.resize(e.getBBox().width,e.getBBox().height-Yf,{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 Gm(e,t,n){var o=Hm(t,n);return e||(Vm(n,o),Um(o,t)),o}function Wm(e){return e.component&&e.component.node.type!==Bl&&e.component.node.type!==Uf&&e.component.node.type!==Om&&e.component.node.type!==zm}var $m={components:{CrownConfig:is,AddLaneAboveButton:mm,AddLaneBelowButton:km},props:["graph","node","nodes","id","collaboration","processes","moddle","processNode","rootElements","highlighted","nodeRegistry","paper","planeElements","isRendering","paperManager","nodeIdGenerator"],mixins:[Ks,tm,Je],data:function(){return{shape:null,definition:null,laneSet:null,isAddingLaneAbove:!1,anchorPointFunction:lt(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===Bl})).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,s=n.height,a={x:o,y:i,width:r,height:s};return t.findModelsInArea(a)},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,Qr()(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;Qr()(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)}));Qr()(o.get("flowNodeRef"),n)}Qr()(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 y(v().mark((function t(){var n,o;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=[],e.laneSet||(e.createLaneSet(),o=lm.definition(e.moddle,e.$t),e.shape.getEmbeddedCells().filter((function(e){return Wm(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=mt(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]:lm.definition(this.moddle,this.$t);e.set("color",this.node.definition.get("color")),this.$emit("set-pool-target",this.shape);var t=lm.diagram(this.moddle);return t.bounds.width=this.shape.getBBox().width,this.$emit("add-node",new Vo(lm.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!==Bl&&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 s=1===t.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type===Bl})).length,a=s?i:r.height;e.resize(o-Yf,a),e.position(Yf,s?0:this.isAddingLaneAbove?-a:i,{parentRelative:!0}),t.resize(o,s?i:i+a,{direction:this.isAddingLaneAbove?"top-right":"bottom-right"}),this.fixResizeRounding(),this.updateAnchorPointPosition();var l=e.position(),c=l.x,d=l.y;r.set("x",c),r.set("y",d),r.set("width",e.get("size").width),r.set("height",e.get("size").height),bn.commit("updateNodeBounds",{node:this.node,bounds:t.getBBox()})}},expandToFitElement:function(e,t){if(e.component.node.type!==Kl){var n=t.getBBox(),o=n.x,i=n.y,r=n.width,s=n.height;if(e.component.node.type!==Bl){var a=e.get("size"),l=a.width,c=a.height,d=e.position(),u=d.x,p=d.y,h=u-o,f=p-i,m=h+l,g=h,v=f,b=f+c,y=0,w=0,x="bottom",k="right";m>r-Jf&&(y=m+Jf),g<Yf+Jf&&(y=r+(Yf+Jf-g),k="left"),v<Jf&&(w=Jf-v+s,x="top"),b>s-Jf&&(w=b+Jf),(y||w)&&(t.resize(Math.max(y,r),Math.max(w,s),{direction:"".concat(x,"-").concat(k)}),this.fixResizeRounding(),this.updateAnchorPointPosition(),this.laneSet&&(this.resizeLanes(),this.sortedLanes().forEach((function(e){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),bn.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),s=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 a=this.sortedLanes().indexOf(e),l=e.getBBox(),c=l.width,d=this.sortedLanes()[a+(t.includes("top")?-1:1)];d.resize(c,d.getBBox().height+s,{direction:o}),this.shape.resize(c+Yf,i,{direction:o}),this.sortedLanes().forEach((function(e){return e.resize(c,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,s=i.height,a=t.get("size"),l=a.height,c=t.position({parentRelative:!0}),d=c.y,u=l,p=d;if(0===n&&(u=l+t.position({parentRelative:!0}).y,p=0),n===o.length-1){var h=s-(t.position({parentRelative:!0}).y+l);u=l+h}t.resize(r-Yf,u),t.position(Yf,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:Jf+Yf}),this.shape.resize(this.shape.getBBox().width-Yf,this.shape.getBBox().height-Yf),this.shape.resize(this.shape.getBBox().width,this.shape.getBBox().height-Yf,{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 s=this.shape.position(),a=s.x,l=s.y,c=this.shape.get("size"),d=c.width,u=c.height;this.node.diagram.bounds.x=a,this.node.diagram.bounds.y=l,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 Wm(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===Bl}));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&&bn.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"),s=r.width,a=r.height;this.node.diagram.bounds.x=o,this.node.diagram.bounds.y=i,this.node.diagram.bounds.width=s,this.node.diagram.bounds.height=a}},mounted:function(){this.$emit("set-pools",this.node.definition),this.laneSet=this.containingProcess.get("laneSets")[0],this.shape=Gm(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");Qr()(e,this.node.definition),this.hasPools()?Qr()(this.rootElements,this.containingProcess):this.$emit("unset-pools")},created:function(){this.$t=this.$t.bind(this)}},Xm=$m,Ym=qn(Xm,Wf,$f,!1,null,null,null),Zm=Ym.exports,Km={id:Ai,component:Zm,bpmnType:"bpmn:Participant",control:!0,category:"BPMN",icon:h(77217),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:oa}]},ya,da]}]},Jm=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)},Qm=[];h(86535),h(99244);function eg(e){return Object.entries(e).flatMap((function(e){var t=mt(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return Mo(Mo({},e),{},{errorKey:n},{errorId:"".concat(e.id,"_").concat(e.message.split(" ").join("_"))})}))}))}var tg={components:{FontAwesomeIcon:ii.FontAwesomeIcon},props:["validationErrors","warnings","xmlManager"],data:function(){return{shouldDisplayProblemsPanel:!1,errorColor:"#D9534F",warningColor:"#F0AD4E",faExclamationTriangle:Rr.faExclamationTriangle,faTimesCircle:Rr.faTimesCircle,faChevronUp:Rr.faChevronUp,faChevronDown:Rr.faChevronDown,faCheck:Rr.faCheck}},computed:{autoValidate:{get:function(){return bn.getters.autoValidate},set:function(e){bn.commit("setAutoValidate",e)}},errorList:function(){return eg(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?Rr.faChevronUp:Rr.faChevronDown}},methods:{isErrorCategory:function(e){return"error"===e.category}}},ng=tg,og=(h(99088),qn(ng,Jm,Qm,!1,null,"1ad192c7",null)),ig=og.exports,rg=function(){var e=this,t=e._self._c;return t("span",{attrs:{"data-test":"body-container"}},[e.showComponent?t("tool-bar",{ref:"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,"extra-actions":e.extraActions,players:e.players},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,action:e.handleToolbarAction}}):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&&e.showInspectorButton?t("InspectorButton",{ref:"inspector-button",style:{right:e.inspectorButtonRight+"px"},attrs:{showInspector:e.isOpenInspector},on:{toggleInspector:function(t){e.handleToggleInspector(t),e.setInspectorButtonPosition(t)}}}):e._e(),t("PreviewPanel",{ref:"preview-panel",attrs:{visible:e.isOpenPreview,nodeRegistry:e.nodeRegistry},on:{togglePreview:function(t){e.handleTogglePreview(t),e.setInspectorButtonPosition(t)},previewResize:e.setInspectorButtonPosition}}),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,previewNode:function(t){e.handlePreview(t),e.setInspectorButtonPosition(t)},"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),e._l(e.players,(function(e){return t("RemoteCursor",{key:e.id,attrs:{"cursor-color":e.color,username:e.name,top:e.top,left:e.left}})}))],2)},sg=[],ag=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))},lg=[],cg=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"}],defaults:a.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}}},a.shapes.standard.Circle.prototype.defaults)}),dg={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","isActive"],mixins:[Ks,Je,ms],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 ar(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=rt(this.getCenterPosition(),e),n=t.x,o=t.y,i=this.shape.size(),r=i.width,s=i.height;this.shape.position(n-r/2,o-s/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),bn.commit("allowSavingElementPosition"),this.$emit("shape-resize")},moveBoundaryEventIfOverTask:function(){var e=this.getTaskUnderShape();lr(this.node.type,e)?(this.attachBoundaryEventToTask(e),this.updateShapePosition(e),this.$emit("shape-resize")):this.resetToInitialPosition()},resetInvalidTarget:function(){this.invalidTargetElement&&(ut(this.invalidTargetElement),this.invalidTargetElement=null,this.$emit("shape-resize"))},attachToValidTarget:function(e){var t=this;e.model===this.shape&&(bn.commit("preventSavingElementPosition"),this.validPosition=this.shape.position(),this.shape.listenToOnce(this.paper,"cell:pointerup blank:pointerup",(function(){t.moveBoundaryEventIfOverTask(),t.resetInvalidTarget(),bn.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&&!lr(this.node.type,e)&&e.attr("body/fill",fe),this.invalidTargetElement&&ut(this.invalidTargetElement),this.invalidTargetElement=e}}}},mounted:function(){var e=this;return y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.shape=new cg,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)})))()}},ug=dg,pg=qn(ug,ag,lg,!1,null,null,null),hg=pg.exports,fg={id:"processmaker-modeler-boundary-event",component:hg,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:oa}]}]}]},mg=h(67629),gg=h.n(mg),vg=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)])},bg=[],yg=5e3;vt().use(un);var wg=new un.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:(0,Jn.uniqueId)("nodeType_"),type:e.id,icon:e.icon,label:e.label,bpmnType:e.bpmnType,rank:e.rank||yg,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return Mo(Mo({},e),{},{type:e.id})}))}})).sort((function(e,t){return e.rank-t.rank}))},setPinnedNodes:function(e,t){e.pinnedNodeTypes.push(t),e.pinnedNodeTypes=(0,Jn.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=(0,Jn.uniqBy)([].concat(m(n),m(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:(0,Jn.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||yg,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return Mo(Mo({},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=(0,Jn.uniqBy)(m(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)}}}),xg=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)])},kg=[],Cg={name:"FilterNodeTypes",props:["type"],data:function(){return{searchTerm:""}},watch:{searchTerm:function(e){"pmBlock"===this.type?(0===e.length&&wg.commit("clearFilteredPmBlockNodes"),e.length>0&&wg.commit("setFilteredPmBlockNodeTypes",e)):(0===e.length&&wg.commit("clearFilteredNodes"),e.length>0&&wg.commit("setFilteredNodeTypes",e))},type:function(e,t){this.searchTerm=t===e?this.searchTerm:""}},computed:{nodeTypes:function(){var e=wg.getters.getPinnedNodeTypes,t=wg.getters.getNodeTypes;return[].concat(m(e),m(t))},pmBlockNodes:function(){var e=wg.getters.getPmBlockNodeTypes;return m(e)},placeholder:function(){return"pmBlock"===this.type?this.$t("Search PM Blocks"):this.$t("Search Objects")}}},Sg=Cg,Eg=(h(29062),qn(Sg,xg,kg,!1,null,"c468f432",null)),Ag=Eg.exports,Mg=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)},_g=[],Tg=h.p+"img/pin-angle.95ef112b.svg",Pg=h.p+"img/pin-angle-fill.45c5a07f.svg",Og={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,wg.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),wg.commit("clearSelectedNode"),wg.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")),wg.commit("setGhostNode",o)},createDraggingHelper:function(e,t){var n=this;this.movedElement&&(document.removeEventListener("mousemove",this.setDraggingPosition),document.body.removeChild(this.movedElement),wg.commit("setGhostNode",null));var o=e.target;wg.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,wg.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,wg.commit("clearSelectedNode"),wg.commit("setGhostNode",null)}},computed:{selectedItem:function(){return wg.getters.getSelectedNode},movedElement:function(){return wg.getters.getGhostNode}}},Dg={name:"NodeTypesLoop",mixins:[Og],data:function(){return{pinIcon:Tg,pinFillIcon:Pg,showPin:!1}},created:function(){wg.dispatch("getUserPinnedObjects")},methods:{nodeTypeAlreadyPinned:function(e,t){return!!this.pinnedObjects.find((function(e){return e.type===t}))},unPin:function(e){return this.deselect(),wg.dispatch("removeUserPinnedObject",e)},addPin:function(e){return this.deselect(),wg.dispatch("addUserPinnedObject",e)}},computed:{pinnedObjects:function(){return wg.getters.getPinnedNodeTypes},objects:function(){return wg.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 wg.getters.getFilteredNodeTypes},searchTerm:function(){return wg.getters.getSearchTerm}}},Ig=Dg,Ng=(h(3410),qn(Ig,Mg,_g,!1,null,null,null)),Rg=Ng.exports,Bg=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)},Lg=[],jg={name:"PmBlocksLoop",mixins:[Og],computed:{pmBlockNodeTypes:function(){return wg.getters.getPmBlockNodeTypes},filteredPmBlockNodes:function(){return wg.getters.getFilteredPmBlockNodeTypes},searchTerm:function(){return wg.getters.getSearchTerm}}},Fg=jg,zg=(h(48649),qn(Fg,Bg,Lg,!1,null,null,null)),qg=zg.exports,Hg={name:"ExplorerRail",props:{explorerExpanded:{type:Boolean},nodeTypes:{type:Array},pmBlockNodes:{type:Array}},components:{FontAwesomeIcon:ii.FontAwesomeIcon,FilterNodeTypes:Ag,NodeTypesLoop:Rg,PmBlocksLoop:qg},data:function(){return{tabs:[{idx:0,label:"Add Object"},{idx:1,label:"PM Blocks"}],tabIndex:0}},computed:{explorerOpen:function(){return wg.getters.getExplorerOpen}},created:function(){wg.commit("setNodeTypes",this.nodeTypes)},methods:{faTimes:function(){return Rr.faTimes},setTabIndex:function(e){this.tabIndex!==e&&(this.tabIndex=e,this.clearFilteredObjects())},closeRail:function(){wg.commit("closeExplorer"),this.clearFilteredObjects()},clearFilteredObjects:function(){wg.commit("clearFilteredNodes"),wg.commit("clearFilteredPmBlockNodes")}}},Vg=Hg,Ug=(h(14906),qn(Vg,vg,bg,!1,null,null,null)),Gg=Ug.exports,Wg=h(82729),$g=h.n(Wg),Xg=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)},Yg=[];const Zg={};function Kg(e){return Object.keys(e).reduce(((t,n)=>(!1!==e[n]&&null!==e[n]&&void 0!==e[n]&&(t[n]=e[n]),t)),{})}const Jg={name:"InlineSvg",inheritAttrs:!1,render(e){return this.svgElSource?e("svg",{on:this.$listeners,attrs:Object.assign(this.getSvgAttrs(this.svgElSource),Kg(this.$attrs)),domProps:{innerHTML:this.getSvgContent(this.svgElSource)}}):null},props:{src:{type:String,required:!0},title:{type:String},transformSource:{type:Function,default:e=>e},keepDuringLoading:{type:Boolean,default:!0}},data(){return{svgElSource:null}},watch:{src(e){this.getSource(e)}},mounted(){this.getSource(this.src)},methods:{getSvgAttrs(e){let t={};const n=e.attributes;if(!n)return t;for(let o=n.length-1;o>=0;o--)t[n[o].name]=n[o].value;return t},getSvgContent(e){return e=e.cloneNode(!0),e=this.transformSource(e),this.title&&Qg(e,this.title),e.innerHTML},getSource(e){Zg[e]||(Zg[e]=this.download(e)),this.svgElSource&&Zg[e].getIsPending()&&!this.keepDuringLoading&&(this.svgElSource=null,this.$emit("unloaded")),Zg[e].then((e=>{this.svgElSource=e,this.$nextTick((()=>{this.$emit("loaded",this.$el)}))})).catch((t=>{this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete Zg[e],this.$emit("error",t)}))},download(e){return ev(new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET",e,!0),o.onload=()=>{if(o.status>=200&&o.status<400)try{const e=new DOMParser,i=e.parseFromString(o.responseText,"text/xml");let r=i.getElementsByTagName("svg")[0];r?t(r):n(new Error('Loaded file is not valid SVG"'))}catch(e){n(e)}else n(new Error("Error loading SVG"))},o.onerror=n,o.send()})))}}};function Qg(e,t){const n=e.getElementsByTagName("title");if(n.length)n[0].textContent=t;else{const n=document.createElementNS("http://www.w3.org/2000/svg","title");n.textContent=t,e.insertBefore(n,e.firstChild)}}function ev(e){if(e.getIsPending)return e;let t=!0,n=e.then((e=>(t=!1,e)),(e=>{throw t=!1,e}));return n.getIsPending=function(){return t},n}var tv={components:{InlineSvg:Jg},props:{showInspector:{type:Boolean,default:!0}},data:function(){return{inspectorIcon:h(28400)}},methods:{toggleInspector:function(){this.$emit("toggleInspector",!this.showInspector)}}},nv=tv,ov=(h(5728),qn(nv,Xg,Yg,!1,null,"cebfb20a",null)),iv=ov.exports,rv=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)},sv=[],av=h(43637),lv=h(21223),cv=(h(85780),h(50308)),dv=h.n(cv),uv={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:ds},{component:"FormInput",config:{label:"Name",helper:"The Name of the Process",name:"name",placeholder:""}}]}]}]},pv=uv.id,hv=uv;vt().component("FormText",av.renderer.FormText),vt().component("FormInput",lv.FormInput),vt().component("FormSelect",lv.FormSelect),vt().component("FormTextArea",lv.FormTextArea),vt().component("FormCheckbox",lv.FormCheckbox),vt().component("FormRadioButtonGroup",lv.FormRadioButtonGroup),vt().component("FormAccordion",lv.FormAccordion),vt().component("FormDatePicker",lv.FormDatePicker),vt().component("FormMultiSelect",lv.FormMultiSelect);var fv={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 bn.getters.highlightedNodes[0]},isAnyNodeActive:function(){return this.highlightedNode},updateDefinition:function(){var e=this;if(!this.isAnyNodeActive)return dv();var t=this.defaultInspectorHandler;return this.isProcessNodeActive&&(t=this.processNodeInspectorHandler),this.hasCustomInspectorHandler&&(t=this.customInspectorHandler),function(n){if(n){if(fa()(n.documentation)&&x()(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(Ra()(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=hv.inspectorConfig;var o=Ho()(this.nodeRegistry[t].inspectorConfig),i=x()(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://docs.processmaker.com/designing-processes/expression-syntax-components" target="_blank"><i class="far fa-question-circle mr-1"></a>';var s={component:"FormInput",config:{label:this.$t("Expression"),helper:r,name:"conditionExpression"}},a=i.find((function(e){return e.config&&"Name"===e.config.label})),l=i.indexOf(a);a&&l>=0?i.splice(l+1,0,s):i.push(s)}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=mt(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===Hl},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(Ra()(e,["artifacts","flowElements","laneSets"]))},setNodeProp:function(e,t,n){this.$emit("shape-resize"),bn.commit("updateNodeProp",{node:e,key:t,value:n})},defaultInspectorHandler:function(e){for(var t in Ra()(e,["$type","eventDefinitions"]))this.highlightedNode.definition.get(t)!==e[t]&&this.setNodeProp(this.highlightedNode,t,e[t])},updateState:function(){this.$emit("save-state")}}},mv=fv,gv=(h(97896),qn(mv,rv,sv,!1,null,"738023ac",null)),vv=gv.exports,bv=function(){var e=this,t=e._self._c;return t("b-col",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"pl-0 h-100 overflow-hidden preview-column",style:{maxWidth:e.width+"px"},attrs:{id:"preview_panel","data-test":"preview-column"},on:{mousedown:e.onMouseDown,mouseup:e.onMouseUp,mousemove:e.onMouseMove}},[t("b-row",{staticClass:"control-bar"},[t("b-col",{attrs:{cols:"9"}},[t("div",[t("i",{directives:[{name:"show",rawName:"v-show",value:1==e.selectedPreview,expression:"selectedPreview == 1"}],staticClass:"fas fa-file-alt"}),t("b",{directives:[{name:"show",rawName:"v-show",value:2==e.selectedPreview,expression:"selectedPreview == 2"}]},[e._v(" {} ")]),t("b-dropdown",{staticClass:"dropdown-right",staticStyle:{"margin-top":"-10px"},attrs:{variant:"ellipsis","no-caret":"","no-flip":"",lazy:""},scopedSlots:e._u([{key:"button-content",fn:function(){return[t("i",{staticClass:"fas fa-sort-down"})]},proxy:!0}]),model:{value:e.selectedPreview,callback:function(t){e.selectedPreview=t},expression:"selectedPreview"}},[t("b-dropdown-item",{key:"1",staticClass:"ellipsis-dropdown-item mx-auto",on:{click:function(t){return e.onSelectedPreview(1)}}},[t("div",{staticClass:"ellipsis-dropdown-content"},[t("b",{staticClass:"pr-1 fa-fw fas fa-file-alt"}),t("span",[e._v(e._s(e.$t("Document")))])])]),t("b-dropdown-item",{key:"2",staticClass:"ellipsis-dropdown-item mx-auto",on:{click:function(t){return e.onSelectedPreview(2)}}},[t("div",{staticClass:"ellipsis-dropdown-content"},[t("b",{staticClass:"pr-1 fa-fw"},[e._v("{ }")]),t("span",[e._v(e._s(e.$t("Object")))])])])],1),t("span",[e._v(e._s(e.$t("Preview"))+" - "+e._s(e.taskTitle))])],1)]),t("b-col",{staticClass:"actions"},[t("div",[t("i",{staticClass:"fas fa-external-link-alt"}),t("i",{staticClass:"fas fa-times",on:{click:function(t){return e.onClose()}}})])])],1),t("b-row",[t("div",{staticStyle:{"background-color":"#0074D9",height:"20px",width:"100%"}},[e._v(" ")])]),t("b-row",[t("div",{staticClass:"item-title"},[e._v(" "+e._s(e.screenTitle)+" ")]),t("div",{staticClass:"task-title"},[e._v(" "+e._s(e.taskTitle)+" ")])]),t("no-preview-available")],1)},yv=[],wv=function(){var e=this,t=e._self._c;return t("div",{staticClass:"no-preview"},[t("img",{attrs:{src:e.noPreviewImg,alt:"no preview"}}),t("h1",[e._v("No Screen Asigned")]),t("h2",[e._v("This is a placeholder screen. Please, assign a screen to this task.")])])},xv=[],kv={data:function(){return{noPreviewImg:h(2431)}}},Cv=kv,Sv=(h(97203),qn(Cv,wv,xv,!1,null,"7ec3935d",null)),Ev=Sv.exports,Av={props:["nodeRegistry","visible"],components:{NoPreviewAvailable:Ev},data:function(){return{data:{},selectedPreview:"1",taskTitle:"",screenTitle:"",width:400,isDragging:!1,currentPos:400}},watch:{highlightedNode:function(){document.activeElement.blur(),this.prepareData()},"highlightedNode.definition":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 bn.getters.highlightedNodes[0]}},methods:{prepareData:function(){var e,t;if(!this.highlightedNode)return{};this.taskTitle=null===this||void 0===this||null===(e=this.highlightedNode)||void 0===e||null===(t=e.definition)||void 0===t?void 0:t.name},handleAssignmentChanges:function(e,t){e!==t&&this.prepareData()},onSelectedPreview:function(e){this.selectedPreview=e},previewNode:function(e){this.taskTitle=null===e||void 0===e?void 0:e.name,this.showPanel=!0},onClose:function(){this.$emit("togglePreview",!1)},onMouseDown:function(e){this.isDragging=!0,this.currentPos=e.x},onMouseUp:function(){this.isDragging=!1},onMouseMove:function(e){if(this.isDragging){var t=this.currentPos-e.x;this.currentPos=e.x,this.width=parseInt(this.width)+t,this.$emit("previewResize",this.width)}}}},Mv=Av,_v=(h(40617),qn(Mv,bv,yv,!1,null,"03688ded",null)),Tv=_v.exports;vt().use(un);var Pv=new un.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)}}}),Ov=h(51540),Dv=h(51248),Iv=h.n(Dv),Nv=h(48909),Rv=h.n(Nv),Bv=h(82317),Lv=h.n(Bv),jv=h(83184),Fv=h.n(jv),zv=h(36111),qv=h.n(zv),Hv=h(25795),Vv=h.n(Hv),Uv=h(37554),Gv=h.n(Uv),Wv=h(19869),$v=h.n(Wv),Xv=h(88687),Yv=h.n(Xv),Zv=h(37028),Kv=h.n(Zv),Jv=h(89185),Qv=h.n(Jv),eb=h(34652),tb=h.n(eb),nb=h(49252),ob=h.n(nb),ib=h(93414),rb=h.n(ib),sb=h(68522),ab=h.n(sb),lb=h(7174),cb=h.n(lb),db=h(74815),ub=h.n(db),pb=h(24874),hb=h.n(pb),fb={};function mb(){}mb.prototype.resolveRule=function(e,t){const n=fb[e+"/"+t];if(!n)throw new Error("cannot resolve rule <"+e+"/"+t+">");return n},mb.prototype.resolveConfig=function(e,t){throw new Error("cannot resolve config <"+t+"> in <"+e+">")};var gb=new mb,vb={"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"},bb={rules:vb},yb={resolver:gb,config:bb},wb=yb;function xb(e,t,n,o,i,r,s){var a={allowDrop:!1,poolTarget:null};if(!Ab(e,t,s))return a.allowDrop=!1,a;if(Sb(n.type))return a.allowDrop=!0,a;if(Mb(n.bpmnType)){var l=i.findModelsFromPoint(_b(e,t,o)).sort((function(e,t){return t.get("z")-e.get("z")}))[0];return a.allowDrop=lr(n.type,l),a}if(Eb(r))return a.allowDrop=!0,a;if(kb(n.bpmnType))return a.allowDrop=!0,a;var c=Cb(e,t,o,i);return c&&(a.allowDrop=!0,a.poolTarget=c),a}function kb(e){return"bpmn:TextAnnotation"===e}function Cb(e,t,n,o){return o.findModelsFromPoint(_b(e,t,n)).find((function(e){var t=e.component;return t&&t.node.type===Ai}))}function Sb(e){return e===Ai}function Eb(e){return!e||0===e.get("participants").length}function Ab(e,t,n){var o=n.getBoundingClientRect(),i=o.left,r=o.top,s=o.width,l=o.height,c=new a.g.rect(i,r,s,l),d=new a.g.Point(e,t);return c.containsPoint(d)}function Mb(e){return"bpmn:BoundaryEvent"===e}function _b(e,t,n){return n.clientToLocalPoint({x:e,y:t})}fb["bpmnlint/conditional-flows"]=Iv(),fb["bpmnlint/end-event-required"]=Rv(),fb["bpmnlint/event-sub-process-typed-start-event"]=Lv(),fb["bpmnlint/label-required"]=Fv(),fb["bpmnlint/no-complex-gateway"]=qv(),fb["bpmnlint/no-disconnected"]=Vv(),fb["bpmnlint/no-gateway-join-fork"]=Gv(),fb["bpmnlint/no-implicit-split"]=$v(),fb["bpmnlint/single-event-definition"]=Yv(),fb["bpmnlint/start-event-required"]=Kv(),fb["bpmnlint/sub-process-blank-start-event"]=Qv(),fb["bpmnlint/superfluous-gateway"]=tb(),fb["bpmnlint-plugin-processmaker/custom-validation"]=ob(),fb["bpmnlint-plugin-processmaker/gateway-direction"]=rb(),fb["bpmnlint-plugin-processmaker/event-based-gateway"]=ab(),fb["bpmnlint-plugin-processmaker/call-activity-child-process"]=cb(),fb["bpmnlint-plugin-processmaker/id-required"]=ub(),fb["bpmnlint-plugin-processmaker/signal-ref-required"]=hb();var Tb,Pb,Ob,Db,Ib,Nb,Rb,Bb,Lb,jb,Fb,zb,qb=h(7407),Hb=h.n(qb),Vb={extends:hg,mixins:[Ma],data:function(){return{nodeIcon:Hb()}}},Ub=Vb,Gb=qn(Ub,Tb,Pb,!1,null,null,null),Wb=Gb.exports,$b="processmaker-modeler-boundary-error-event",Xb=Ia()(Ho()(fg),{id:$b,component:Wb,control:!1,label:"Boundary Error Event",icon:h(43634),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Error Event"),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorConfig:[{items:[{items:[{}]},ya,da]}]}),Yb={extends:hg,mixins:[Ma],data:function(){return{nodeIcon:Ip()}},mounted:function(){this.shape.attr({image:{"ref-x":4,"ref-y":4,width:18,height:18}})}},Zb=Yb,Kb=qn(Zb,Ob,Db,!1,null,null,null),Jb=Kb.exports,Qb={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"}},ey=Qb,ty="processmaker-modeler-boundary-conditional-event",ny=Ia()(Ho()(fg),Mo(Mo({},Fp),{},{id:ty,component:Jb,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(m(jp()),[ey])},da,ya]}]})),oy=h.p+"img/boundary-escalation-icon.c999a95e.svg",iy={extends:hg,mounted:function(){this.shape.attr("image/xlink:href",oy)},methods:{isValidBoundaryEventTarget:function(e){return cr(e.component)}}},ry=iy,sy=qn(ry,Ib,Nb,!1,null,null,null),ay=sy.exports,ly="processmaker-modeler-boundary-escalation-event",cy=Ia()(Ho()(fg),{id:ly,component:ay,control:!1,label:"Boundary Escalation Event",icon:h(62442),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Escalation Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:EscalationEventDefinition")]})},inspectorConfig:[{items:[{items:[{},ey]},ya,da]}]}),dy=h(81146),uy=h.n(dy),py={extends:hg,mixins:[Ma],data:function(){return{nodeIcon:uy()}},methods:{isValidBoundaryEventTarget:function(e){var t=e.component;return t&&t.node.isBpmnType("bpmn:CallActivity")}},mounted:function(){var e=qu();this.shape.attr(e)}},hy=py,fy=qn(hy,Rb,Bb,!1,null,null,null),my=fy.exports,gy="processmaker-modeler-boundary-message-event",vy=Ia()(Ho()(fg),Mo(Mo({},fc),{},{id:gy,component:my,control:!1,label:"Boundary Message Event",icon:h(52018),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Message Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},ey,uc("Message that will trigger this boundary event")]},ya,da]}]})),by=h(16221),yy=h.n(by),wy={extends:hg,mixins:[Ma],data:function(){return{nodeIcon:yy()}},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}})}},xy=wy,ky=qn(xy,Lb,jb,!1,null,null,null),Cy=ky.exports,Sy="processmaker-modeler-boundary-signal-event",Ey=Ia()(Ho()(fg),Mo(Mo({},Pc),{},{id:Sy,component:Cy,control:!1,label:"Boundary Signal Event",icon:h(34070),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Signal Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},ey,Tc("Signal that will trigger this boundary event")]},ya,da]}]})),Ay=h(50889),My=h.n(Ay),_y={extends:hg,mixins:[Ma],data:function(){return{nodeIcon:My()}},methods:{addTimerEventDefinitionId:function(){var e="".concat(this.id,"_timer_event_definition");this.node.definition.get("eventDefinitions")[0].id=e}},mounted:function(){this.addTimerEventDefinitionId()}},Ty=_y,Py=qn(Ty,Fb,zb,!1,null,null,null),Oy=Py.exports,Dy="processmaker-modeler-boundary-timer-event",Iy=Ia()(Ho()(fg),{id:Dy,component:Oy,control:!1,label:"Boundary Timer Event",icon:h(99400),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:Iu})})]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],s=i[0][r].body;e[o]={type:r,body:s}}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 s=e[r],a=s.type,l=s.body,c=i.get(r)[0][a];if(c&&c.body===l)continue;var d=Te({},a,o.create("bpmn:Expression",{body:l})),u=[o.create("bpmn:TimerEventDefinition",d)];u[0].id=t.definition.get("eventDefinitions")[0].id,n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{items:[{items:[{},ey]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-boundary-timer-event"},items:[{component:ju,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},da,ya]}]});function Ny(e,t,n){var o=Rh(e,t,"set");return zh(e,o,n),n}var Ry=new WeakMap,By=function(){function e(t){_o(this,e),Ih(this,Ry,{writable:!0,value:void 0}),Te(this,"preventTranslate",!1),Ny(this,Ry,t)}return Po(e,[{key:"paper",get:function(){return Bh(this,Ry)}},{key:"scale",get:function(){return Bh(this,Ry).scale()},set:function(e){Bh(this,Ry).scale(e),Bh(this,Ry).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||(Bh(this,Ry).translate(e,t),Bh(this,Ry).trigger("translate:changed"))}},{key:"addEventHandler",value:function(e,t,n){Bh(this,Ry).on(e,t,n)}},{key:"addOnceHandler",value:function(e,t){Bh(this,Ry).once(e,t)}},{key:"removeEventHandler",value:function(e,t,n){Bh(this,Ry).off(e,t,n)}},{key:"setPaperDimensions",value:function(e,t){Bh(this,Ry).setDimensions(e,t)}},{key:"performAtomicAction",value:function(){var e=y(v().mark((function e(t){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Bh(this,Ry).freeze(),e.next=3,t(Bh(this,Ry));case 3:Bh(this,Ry).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=Bh(this,Ry).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:fe})}},{key:"setStateValid",value:function(){this.paper.drawBackground({color:me})}},{key:"awaitScheduledUpdates",value:function(){var e=this;return Bh(this,Ry)._updates.priorities.some((function(e){return!a.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 a.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 Ly(e,t,n){var o=zy(e,t,n);Fy(o,t),e.inspectorConfig[0].items.sort(jy)}function jy(e,t){return qy(e)?1:qy(t)?-1:0}function Fy(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 zy(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 qy(e){return e.config&&"Advanced"===e.config.label}function Hy(e,t){Xy(e)&&Uy(e);var n=$y(e);n&&Uy(n),Vy(e)&&!Xy(e)&&Gy(e),Wy(t)}function Vy(e){return e.component.node.type!==Bl}function Uy(e){Gy(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===Bl})),o=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type!==Bl}));n.forEach(Gy),o.forEach(Gy)}}function Gy(e){e.toFront({deep:!0})}function Wy(e){e.getLinks().forEach(Gy)}function $y(e){return e.component.node.pool}function Xy(e){return e.component.node.type===Ai}Te(By,"gridSize",Xp);var Yy=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,players:e.players}},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.combinedMenuActions,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)])},Zy=[],Ky=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()])},Jy=[function(){var e=this,t=e._self._c;return t("li",{staticClass:"breadcrumb-item"},[t("a",{attrs:{href:"/"}},[t("i",{staticClass:"fas fa-home"})])])}],Qy={name:"breadcrumb",props:{breadcrumbData:{type:Array,default:function(){return[]}}}},ew=Qy,tw=(h(61573),qn(ew,Ky,Jy,!1,null,"d1e148b4",null)),nw=tw.exports,ow=function(){var e=this,t=e._self._c;return t("div",{staticClass:"top-rail-container"},[t("MultiplayerViewUsers",{attrs:{players:e.players}}),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)},iw=[],rw=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)},sw=[],aw={components:{InlineSvg:Jg},data:function(){return{isOpen:!1,validateCloseIcon:h(13828),validateOpenIcon:h(78540)}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openIssue",this.isOpen)}},mounted:function(){var e=this;window.ProcessMaker.EventBus.$on("save-changes-activate-autovalidate",(function(){e.handleOpen()}))}},lw=aw,cw=(h(70947),qn(lw,rw,sw,!1,null,"5880bbc6",null)),dw=cw.exports,uw=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)])},pw=[],hw={components:{InlineSvg:Jg},props:{numberOfErrors:{type:Number,required:!0}},data:function(){return{isOpen:!1,issueCloseIcon:h(61339),issueOpenIcon:h(68058)}},watch:{numberOfErrors:function(e){0===e&&(this.isOpen=!1)}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openPanel",this.isOpen)}}},fw=hw,mw=(h(59724),qn(fw,uw,pw,!1,null,"337583fe",null)),gw=mw.exports,vw=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)},bw=[],yw={components:{VueInlineSvg:Jg},props:{errorList:{type:Array,required:!0},warnings:{type:Array,required:!0}},data:function(){return{issueIcon:h(4298)}}},ww=yw,xw=(h(95254),qn(ww,vw,bw,!1,null,"0722e36d",null)),kw=xw.exports,Cw=function(){var e=this,t=e._self._c;return t("b-avatar-group",{staticClass:"container"},[e._l(e.players,(function(e){return[t("Avatar",{key:e.key,attrs:{badgeBackgroundColor:e.color,imgSrc:e.imgSrc,userName:e.name}})]}))],2)},Sw=[],Ew=function(){var e=this,t=e._self._c;return t("span",{staticClass:"b-avatar rounded-circle",style:{backgroundColor:e.generateColorHsl(e.userName,e.saturationRange,e.lightnessRange)}},[e.imgSrc?t("span",{staticClass:"b-avatar-img"},[t("img",{attrs:{src:e.imgSrc,alt:e.userName}})]):t("span",{staticClass:"b-avatar-text avatar-initials"},[t("span",[e._v(" "+e._s(this.getInitials(e.userName))+" ")])]),t("span",{staticClass:"b-avatar-badge badge-danger",style:{bottom:"0px",right:"0px",backgroundColor:e.badgeBackgroundColor}})])},Aw=[],Mw={props:{badgeBackgroundColor:{type:String,required:!1},imgSrc:{type:String,required:!1},userName:{type:String,required:!1}},data:function(){return{saturation:50,lightness:50,range:10}},computed:{saturationRange:function(){return this.getRange(this.saturation,this.range)},lightnessRange:function(){return this.getRange(this.lightness,this.range)}},methods:{getInitials:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.split(" "),n=t[0].charAt(0).toUpperCase(),o=t[t.length-1].charAt(0).toUpperCase();return"".concat(n).concat(o)},getHashOfString:function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return t=Math.abs(t),t},getRange:function(e,t){return[Math.max(0,e-t),Math.min(e+t,100)]},normalizeHash:function(e,t,n){return Math.floor(e%(n-t)+t)},generateHSL:function(e,t,n){var o=this.getHashOfString(e),i=this.normalizeHash(o,0,360),r=this.normalizeHash(o,t[0],t[1]),s=this.normalizeHash(o,n[0],n[1]);return[i,r,s]},HSLtoString:function(e){return"hsl(".concat(e[0],", ").concat(e[1],"%, ").concat(e[2],"%)")},generateColorHsl:function(e,t,n){return this.HSLtoString(this.generateHSL(e,t,n))}}},_w=Mw,Tw=(h(4913),qn(_w,Ew,Aw,!1,null,"1c50a604",null)),Pw=Tw.exports,Ow={components:{Avatar:Pw},props:{players:{type:Array,required:!0}}},Dw=Ow,Iw=qn(Dw,Cw,Sw,!1,null,null,null),Nw=Iw.exports,Rw={components:{ValidateButton:dw,ValidateIssue:gw,ValidatePanel:kw,MultiplayerViewUsers:Nw},props:{validationErrors:{type:Object,required:!0},warnings:{type:Array,required:!0},players:{type:Array,required:!1}},data:function(){return{isOpenIssue:!1,isOpenPanel:!1}},computed:{errorList:function(){return Object.entries(this.validationErrors).flatMap((function(e){var t=mt(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return Mo(Mo({},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,bn.commit("setAutoValidate",this.isOpenIssue)},handleOpenPanel:function(e){this.isOpenPanel=e}}},Bw=Rw,Lw=(h(53713),qn(Bw,ow,iw,!1,null,"f6aad76c",null)),jw=Lw.exports,Fw={name:"tool-bar",components:{Breadcrumb:nw,TopRail:jw,FontAwesomeIcon:ii.FontAwesomeIcon},props:["canvasDragPosition","cursor","paperManager","isRendering","breadcrumbData","panelsCompressed","validationErrors","warnings","xmlManager","validationBar","players","extraActions"],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:{combinedMenuActions:function(){return this.extraActions?this.ellipsisMenuActions.concat(this.extraActions):this.ellipsisMenuActions},canUndo:function(){return Pv.getters.canUndo},canRedo:function(){return Pv.getters.canRedo},versionStatus:function(){var e=Pv.getters.isDraft?"Draft":"Published";return this.$t(e)},isVersionsInstalled:function(){return Pv.getters.isVersionsInstalled},isLoading:function(){return Pv.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:Rr.faPlus,minusIcon:Rr.faMinus,scale:1,initialScale:1,minimumScale:.2,scaleStep:.1,mapIcon:Rr.faMapMarked,miniMapOpen:!1,compressIcon:Rr.faCompress,expandIcon:Rr.faExpand,undoIcon:Rr.faUndo,redoIcon:Rr.faRedo,saveIcon:Rr.faSave,savedIcon:Rr.faCheckCircle,spinner:Rr.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||Pv.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Pv.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:this.$emit("action",e)}},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)}},zw=Fw,qw=(h(91503),qn(zw,Yy,Zy,!1,null,null,null)),Hw=qw.exports;function Vw(e,t){var n=function(e){return e.isBpmnType("bpmn:MessageFlow",to,ro)||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 Uw={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)}}},Gw={methods:{copyPasteHandler:function(e,t){var n=e.target.nodeName.toLowerCase(),o="body"===n,i=e.key.toLowerCase(),r="c"===i,s="v"===i;o&&r&&t.mod&&this.copy(e),o&&s&&t.mod&&this.paste(e)},copy:function(e){e.preventDefault(),window.ProcessMaker.$modeler.copyElement()},paste:function(e){e.preventDefault(),window.ProcessMaker.$modeler.pasteElements()}}},Ww=(h(51532),By.gridSize/2),$w=new Map;$w.set("Up",[0,-Ww]),$w.set("Down",[0,Ww]),$w.set("Left",[-Ww,0]),$w.set("Right",[Ww,0]);var Xw=["PoolLane","processmaker.components.nodes.boundaryEvent.Shape"];function Yw(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(Zw(e)){var o=t.filter(Kw);if(0!==o.length){var i=Jw(e),r=mt(i,2),s=r[0],a=r[1];o.forEach((function(e){e.translate(s,a,{movedWithArrowKeys:!0}),ex(e)})),n()}}}function Zw(e){var t=["up","down","left","right"];return t.some((function(t){return e.toLowerCase().includes(t)}))}function Kw(e){return e&&!Xw.includes(e.get("type"))}function Jw(e){var t=e.match(/^(?:Arrow)?(Up|Down|Left|Right)$/);return null!==t?$w.get(t[1]):[0,0]}function Qw(e){return!e||"processmaker.modeler.bpmn.pool"!==e.get("type")}function ex(e){var t=e.getParentCell();Qw(t)||(t.component.expandToFitElement(e,t),t.component.laneSet&&t.component.updateLaneChildren())}var tx={methods:{escapeKeyHandler:function(e){this.selectedNode&&(e.preventDefault(),window.ProcessMaker.EventBus.$emit("custom-pointerclick",e))}},computed:{selectedNode:function(){return wg.getters.getSelectedNode},movedElement:function(){return wg.getters.getGhostNode}}},nx={mixins:[Uw,Gw,tx],computed:{clientLeftPaper:function(){return bn.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(ka){console.error(ka)}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)}))),Yw(e.key,bn.getters.highlightedShapes,this.pushToUndoStack))}}};h(74819);function ox(e,t){while(!Object.prototype.hasOwnProperty.call(e,t))if(e=xi(e),null===e)break;return e}function ix(){return ix="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=ox(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ix.apply(this,arguments)}var rx,sx=function(e){wi(n,e);var t=Ei(n);function n(){return _o(this,n),t.apply(this,arguments)}return Po(n,[{key:"clone",value:function(e,t,o){return this.withTimerKeys(ix(xi(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}(Vo);function ax(e){return lx.apply(this,arguments)}function lx(){return lx=y(v().mark((function e(t){var n,o,i;return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=cx(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(rx),i.click(),e.next=10,dx();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)}))),lx.apply(this,arguments)}function cx(e){if(e.selectors)return e.selectors.label||Array.from(e.selectors.root.children).find((function(e){return e.classList.contains("labels")}))}function dx(){return new Promise((function(e){rx=setTimeout(e)}))}Te(sx,"timerPropertyKeys",["timeDuration","timeDate","timeCycle"]);var ux=h(93162),px=h.n(ux),hx=new WeakMap,fx=new WeakMap,mx=function(){function e(t){_o(this,e),Ih(this,hx,{writable:!0,value:void 0}),Ih(this,fx,{writable:!0,value:void 0}),Ny(this,hx,t)}return Po(e,[{key:"definitions",set:function(e){Ny(this,fx,e)}},{key:"getDefinitionsFromXml",value:function(e){var t=this;return new Promise((function(n,o){Bh(t,hx).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(){Bh(this,fx)&&Bh(this,hx).toXML(Bh(this,fx),{format:!0},(function(e,t){if(e)alert(e);else{if(es())return void(window.xml=t);var n=new File([t],"bpmnProcess.xml",{type:"text/xml"});px().saveAs(n)}}))}}]),e}();function gx(e){return e.isStartEvent()?Do:e.isTask()?Bo:e.isGateway()?jo:e.isIntermediateEvent()?zo:e.isEndEvent()?No:null}function vx(e){if(!e)return!1;var t=gx(e);return!t||!Object.values(t).includes(e.definition.name)}function bx(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 yx(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(m(n),m(o))}var wx=function(){function e(t,n,o,i,r,s){_o(this,e),this._nodeThatWillBeReplaced=t,this._definition=n,this._graph=o,this._newNode=i,this._processes=r,this._collaboration=s}return Po(e,[{key:"migrate",value:function(){var e,t,n=this;vx(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,m(i)),(t=this._definition.get("outgoing")).push.apply(t,m(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 s=bx(this._nodeThatWillBeReplaced,this._processes);if(s.forEach((function(e){e.set("targetRef",n._newNode.definition),o(e)})),this._collaboration){var a=this._collaboration.get("messageFlows");a.filter((function(e){return e.sourceRef===n._nodeThatWillBeReplaced.definition})).forEach((function(e){e.set("sourceRef",n._newNode.definition),o(e)})),a.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}(),xx=["bpmn:ServiceTask","bpmn:ManualTask","bpmn:CallActivity","bpmn:ScriptTask"],kx=function(e){if(-1!==xx.indexOf(e.bpmnType)){e.inspectorConfig[0].items.splice(e.loopInspectorIndex||1,0,ef);var t=e.inspectorHandler||function(){},n=e.inspectorData||null;e.inspectorHandler=function(e,n,o,i,r,s){t(e,n,o,i,r,s),e=Jh(e,n,o,i,r),s(e)},e.inspectorData=function(e,t,o){var i=n?n(e,t,o):t(e);return Qh(i,e,t,o),i}}},Cx={methods:{cloneNodesSelection:function(){var e=this,t=[],n=[],o=[],i=[],r=[],s=this.highlightedNodes,a=this.$refs.selector.$el,l=[Hl,Bl,us,Kl,Uo],c=[io],d=[eo];return"function"===typeof a.getBoundingClientRect&&s.forEach((function(s){if(l.includes(s.type)){var a=e.cloneFlowAndSetNewId(s);n.push(a),t.push(a)}else if(c.includes(s.type)){var u=e.cloneFlowAndSetNewId(s);i.push(u),t.push(u)}else if(d.includes(s.type)){var p=e.cloneFlowAndSetNewId(s);r.push(p),t.push(p)}else{var h=e.cloneElementAndCalculateOffset(s);s.definition&&"bpmn:BoundaryEvent"!==s.definition.$type?t.push(h):o.push(h)}})),t=[].concat(m(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 vo(t,this)}if("bpmn:DataInputAssociation"===e.targetRef.$type){var n=e.targetRef.$parent;return vo(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,s=o/r;return t.diagram.bounds.y+=s,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,s=t.find((function(e){return e.cloneOf===i.id})),a=t.find((function(e){return e.cloneOf===r.id}));if(s&&a){e.definition.set("sourceRef",s.definition),e.definition.set("targetRef",a.definition),s.definition.outgoing?s.definition.outgoing.push(e.definition):s.definition.set("outgoing",[e.definition]),a.definition.incoming?a.definition.incoming.push(e.definition):a.definition.set("incoming",[e.definition]);var l=n.$refs.selector.$el.getBoundingClientRect(),c=l.height,d=n.paper.scale(),u=d.sy,p=c/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})),s=n.getDataInputOutputAssociationTargetRef(o.definition),a=t.find((function(e){return e.cloneOf===s.id})),l=go(n.moddle,a,r.definition);e.definition.set("sourceRef",[r.definition]),e.definition.set("targetRef",l),a.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,s=t.find((function(e){return e.cloneOf===i.id})),a=t.find((function(e){return e.cloneOf===r.id}));e.definition.set("targetRef",a.definition),e.definition.set("sourceRef",s.definition);var l=s.definition.get("dataOutputAssociations")||[];s.definition.set("dataOutputAssociations",[].concat(m(l),[e.definition]))}))}}},Sx=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",{class:{"hidden-opacity":!1===e.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)])},Ex=[],Ax=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)},Mx=[],_x=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"})])},Tx=[],Px=new WeakMap,Ox=function(){function e(t){_o(this,e),Ih(this,Px,{writable:!0,value:void 0}),Ny(this,Px,t)}return Po(e,[{key:"miniMap",get:function(){return Bh(this,Px)}},{key:"scaleMiniMap",value:function(){this.miniMap.scaleContentToFit({padding:10,maxScaleX:.5,maxScaleY:.5})}},{key:"calculateNewPaperPosition",value:function(e,t,n,o,i,r){var s=this.miniMap.paperToLocalPoint(e,t),a=s.x,l=s.y;return{newX:i/2-a*n,newY:r/2-l*o}}}],[{key:"factory",value:function(e,t){var n=new a.dia.Paper({el:t,model:e,width:230,height:200,interactive:!1});return new this(n)}}]),e}(),Dx={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,s=this.paperManager.paper.el,a=s.clientWidth,l=s.clientHeight,c=this.miniMapManager.calculateNewPaperPosition(t,n,i,r,a,l),d=c.newX,u=c.newY;this.newX=d,this.newY=u,this.paperManager.translate(this.newX,this.newY)}},mounted:function(){var e=this;return y(v().mark((function t(){return v().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=Ox.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)}},Ix=Dx,Nx=(h(63564),qn(Ix,_x,Tx,!1,null,"76e95759",null)),Rx=Nx.exports,Bx={components:{InlineSvg:Jg,MiniPaper:Rx},props:{paperManager:Object,graph:Object},data:function(){return{miniMapOpen:!1,miniMapIcon:h(65759)}}},Lx=Bx,jx=(h(71776),qn(Lx,Ax,Mx,!1,null,"7f06057f",null)),Fx=jx.exports,zx=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)])},qx=[],Hx={components:{InlineSvg:Jg},props:{paperManager:Object},data:function(){return{initialScale:1,minimumScale:.2,scaleStep:.1,minusIcon:h(22044),plusIcon:h(29943)}},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}}},Vx=Hx,Ux=(h(5365),qn(Vx,zx,qx,!1,null,"576edbd4",null)),Gx=Ux.exports,Wx=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)])},$x=[],Xx={components:{InlineSvg:Jg},props:{isRendering:{type:Boolean}},data:function(){return{undoIcon:h(28994),redoIcon:h(45617)}},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 Pv.getters.canUndo},canRedo:function(){return Pv.getters.canRedo}},methods:{undo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Pv.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Pv.dispatch("redo").then((function(){return e.$emit("load-xml")}))}}},Yx=Xx,Zx=(h(81935),qn(Yx,Wx,$x,!1,null,"379ae012",null)),Kx=Zx.exports,Jx=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()},Qx=[],ek=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)},tk=[],nk=h(95951),ok=h.n(nk),ik=(h(44301),{props:{data:{type:Object},selectedItem:{type:String},popperType:{type:String}},components:{Popper:ok(),InlineSvg:Jg},data:function(){return{wasClickedSubmenu:!1,element:null,wasClicked:!1}},methods:{onClickHandler:function(e,t){e.stopPropagation(),this.$emit("clickToSubmenu",{event:e,control:t})}}}),rk=ik,sk=(h(19366),qn(rk,ek,tk,!1,null,"acf58eca",null)),ak=sk.exports,lk={components:{SubmenuPopper:ak,InlineSvg:Jg},props:{nodeTypes:Array},mixins:[Og],data:function(){return{plusIcon:h(29943),currentType:null}},created:function(){wg.dispatch("getUserPinnedObjects")},computed:{controls:function(){return wg.getters.getPinnedNodeTypes},explorerOpen:function(){return wg.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,wg.commit("toggleExplorer"),wg.commit("clearFilteredNodes"),wg.commit("clearFilteredPmBlockNodes")}}},ck=lk,dk=(h(33422),qn(ck,Jx,Qx,!1,null,"0e6b16b8",null)),uk=dk.exports,pk={components:{MiniPaperControl:Fx,ZoomControl:Gx,UndoRedoControl:Kx,Controls:uk},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),s=window.getComputedStyle(this.$refs.railLeftBox),a=parseInt(s.paddingLeft,10)+parseInt(s.paddingRight,10),l=this.leftOverlapUndoRedo+(this.widthOverlapControl-t.width)-r-a;l>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 bn.getters.showComponent}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,gt.nextTick)();case 2:e.controlObserver.observe(e.$refs.controlBox.$el);case 3:case"end":return t.stop()}}),t)})))()}},hk=pk,fk=(h(44697),qn(hk,Sx,Ex,!1,null,"5393ebfe",null)),mk=fk.exports,gk=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))},vk=[],bk=function(e){wi(n,e);var t=Ei(n);function n(){return _o(this,n),t.apply(this,arguments)}return Po(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=oo(this.moddle),r=no(this.moddle);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var s=n.sourceAnchor,a=n.targetAnchor;i.waypoint=[s,a].map((function(e){return o.moddle.create("dc:Point",e)}));var l=new Vo(eo,r,i);l.dataAssociationProps={sourceShape:e,targetCoords:{x:void 0,y:void 0}};var c=x()(e,"component.node"),d=c.definition.get("dataOutputAssociations")||[];return c.definition.set("dataOutputAssociations",[].concat(m(d),[l.definition])),l}}],[{key:"isValid",value:function(e){var t=e.sourceShape,n=e.targetShape,o=x()(t,"component.node"),i=x()(n,"component.node");if(!i)return!1;var r=["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"],a=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateCatchEvent","bpmn:StartEvent"],l=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],c=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||!s.includes(d))||(!(!p||!l.includes(d))||(!(!h||!r.includes(c))||f&&a.includes(c)))}},{key:"isValidSourceNode",value:function(e){return!_i.isNodeDisallowedFromDataAssociation(e)}}]),n}(_i),yk=[bk,Ll,Wl],wk={name:Uo,components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Tn],data:function(){return{shape:null}},computed:{isValidConnection:function(){var e=this;return yk.some((function(t){return t.isValid({sourceShape:e.sourceShape,targetShape:e.target,sourceConfig:e.sourceConfig,targetConfig:e.targetConfig})}))},targetType:function(){return x()(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=yk.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:x()(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 a.shapes.standard.Link,this.shape.connector("rounded",{radius:5}),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},xk=wk,kk=qn(xk,gk,vk,!1,null,null,null),Ck=kk.exports,Sk=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()},Ek=[],Ak=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()},Mk=[],_k=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()},Tk=[],Pk=function(e){return e.position().y+e.size().height},Ok=function(e){return e.position().x},Dk=function(e){return e.position().x+e.size().width/2},Ik=function(e){return e.position().y+e.size().height/2},Nk=function(e){return e.position().x+e.size().width},Rk=function(e){return e.position().y},Bk=function(e){return Boolean(e&&e.position&&e.size)},Lk={poolLane:"PoolLane",boundaryEvent:"processmaker.components.nodes.boundaryEvent.Shape"},jk=[Lk.boundaryEvent,Lk.poolLane],Fk=function(e){return!jk.includes(e.get("type"))};function zk(e){return Bk(e)&&Fk(e)}function qk(e,t){var n=t-Pk(e);e.translate(0,n)}function Hk(e,t){var n=t-Ok(e);e.translate(n,0)}function Vk(e,t){var n=t-Nk(e);e.translate(n,0)}function Uk(e,t){var n=t-Dk(e);e.translate(n,0)}function Gk(e,t){var n=t-Ik(e);e.translate(0,n)}function Wk(e,t){var n=t-Rk(e);e.translate(0,n)}function $k(e){var t=tC(e);e.forEach((function(e){Hk(e,t.left)}))}function Xk(e){var t=tC(e);e.forEach((function(e){Vk(e,t.right)}))}function Yk(e){var t=tC(e);e.forEach((function(e){Wk(e,t.top)}))}function Zk(e){var t=tC(e);e.forEach((function(e){qk(e,t.bottom)}))}function Kk(e){var t=tC(e);e.forEach((function(e){Uk(e,t.hMiddle)}))}function Jk(e){var t=tC(e);e.forEach((function(e){Gk(e,t.vMiddle)}))}function Qk(e){var t=tC(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 Ik(e)-Ik(t)})),s=t.top+e[0].size().height,a=(t.height-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(Wk(e,s+a),s+=a+e.size().height)}))}}function eC(e){var t=tC(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 Dk(e)-Dk(t)})),s=t.left+e[0].size().width,a=(t.width-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(Hk(e,s+a),s+=a+e.size().width)}))}}function tC(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 Bk(e)?e.position().x:0},n=function(e){return Bk(e)?e.position().x+e.size().width:0},o=function(e){return Bk(e)?e.position().y:0},i=function(e){return Bk(e)?e.position().y+e.size().height:0},r=Math.min.apply(Math,m(e.map(t))),s=Math.max.apply(Math,m(e.map(n))),a=Math.min.apply(Math,m(e.map(o))),l=Math.max.apply(Math,m(e.map(i))),c=s-r,d=l-a;return{left:r,right:s,top:a,bottom:l,width:c,height:d,vMiddle:a+d/2,hMiddle:r+c/2}}function nC(e){var t=e.filter((function(e){return zk(e)})),n=tC(e),o=t.length>1;return{can:{align:{left:o&&t.some((function(e){return Ok(e)!==n.left})),horizontalCenter:o&&t.some((function(e){return Dk(e)!==n.hMiddle})),right:o&&t.some((function(e){return Nk(e)!==n.right})),bottom:o&&t.some((function(e){return Pk(e)!==n.bottom})),verticalCenter:o&&t.some((function(e){return Ik(e)!==n.vMiddle})),top:o&&t.some((function(e){return Rk(e)!==n.top}))},distribute:{horizontally:o&&t.length>2,vertically:o&&t.length>2}},align:{left:function(){return $k(t)},horizontalCenter:function(){return Kk(t)},right:function(){return Xk(t)},bottom:function(){return Zk(t)},verticalCenter:function(){return Jk(t)},top:function(){return Yk(t)}},distribute:{horizontally:function(){return eC(t)},vertically:function(){return Qk(t)}}}}var oC,iC,rC,sC,aC={components:{FontAwesomeIcon:ii.FontAwesomeIcon},props:{paper:Object,hasPools:Boolean},data:function(){return{runningInCypressTest:es(),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),Go.library.add(Qo),Go.library.add(Jo),Go.library.add(ei),Go.library.add(ti),Go.library.add(Ko),Go.library.add(Zo),Go.library.add(oi),Go.library.add(ni)},watch:{selectedShapes:function(){this.$root.$emit("bv::hide::tooltip")}},computed:{selectedShapes:function(){return this.disableButtons(),nC(bn.getters.highlightedShapes)},isMultiSelect:function(){var e=bn.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return bn.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=nC(bn.getters.highlightedShapes);this.buttons.forEach((function(t){t.disabled=!(0,Jn.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,bn.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 y(v().mark((function t(){return v().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)})))()}},lC=aC,cC=(h(81856),h(69100),qn(lC,_k,Tk,!1,null,"46e3ac40",null)),dC=cC.exports,uC={props:{paper:Object,hasPools:Boolean},components:{crownAlign:dC,FontAwesomeIcon:ii.FontAwesomeIcon},data:function(){return{showAlignmentButtons:!1,runningInCypressTest:es(),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),Go.library.add(Jo)},computed:{isMultiSelect:function(){var e=bn.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return bn.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,bn.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 y(v().mark((function t(){return v().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)})))()}},pC=uC,hC=(h(6718),qn(pC,Ak,Mk,!1,null,"bcd827ec",null)),fC=hC.exports,mC={name:"Selection",components:{CrownMultiselect:fC},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:[Bl],selectionBlackList:[Uo],selectableBlackList:[Uo],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===Ai||e.model.component.node.type===Bl}))}},watch:{selected:function(e){this.prepareConectedLinks(e),this.addToHighlightedNodes(e)}},methods:{selectElements:function(e){var t=this;return y(v().mark((function n(){return v().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 y(v().mark((function o(){var i;return v().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===bn.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===Ai}));o&&e.model.component.node.type!==Ai?this.selected=[e]:e.model.component&&e.model.component.node.type===Ai?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=a.util.normalizeEvent(e),o=n.clientX,i=n.clientY,r=n.offsetX,s=n.offsetY,l=t.$el.offset();this.clearSelection(),this.isSelecting=!0,this.showLasso=!0,this.start={x:o-l.left+window.pageXOffset+t.$el.scrollLeft(),y:i-l.top+window.pageYOffset+t.$el.scrollTop()},this._offset={x:r,y:s}},updateSelection:function(e){var t=this.paperManager.paper;if(this.isSelecting&&!this.isSelected&&this.start){var n=a.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=(0,a.V)(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var s=e.scale();o/=s.sx,i/=s.sy;var l=a.g.rect(r.x,r.y,o,i);this.selected=this.getElementsInSelectedArea(l,{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===Ai){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(m(o),m(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,s=["PoolLane","standard.Link"];return e.filter((function(e){return n||!s.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=[Hl,eo,io,us,Kl],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===Ai}));return t&&e.length===t.length},startDrag:function(e){if(this.$refs.drag){this.stopForceMove=!1,this.dragging=!0,this.hasMouseMoved=!1;var t=a.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=a.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 y(v().mark((function t(){return v().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(m(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=a.util.normalizeEvent(e),n=t.clientX,o=t.clientY,i=(0,a.V)(this.paperManager.paper.viewport).toLocalPoint(n,o);return this.paperManager.paper.findViewsFromPoint(i)},addToHighlightedNodes:function(e){if(bn.commit("highlightNode"),e.length>0){var t=e.filter((function(e){return e.model.component})).map((function(e){return e.model.component.node}));bn.commit("addToHighlightedNodes",t)}else bn.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!==Bl&&(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=(0,a.V)(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var s=e.scale();o/=s.sx,i/=s.sy;var l=a.g.rect(r.x,r.y,o,i);return this.getElementsInSelectedArea(l,{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===Ai&&(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===Ai})),n=e.find((function(e){var t=e.model;return t.getParentCell()&&t.getParentCell().component.node.type===Ai}));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===Ai}));this.newPool=null,this.oldPool=null,o?(this.paperManager.setStateValid(),this.invalidPool&&(this.invalidPool.model.component.shape.attr("body/fill",Ce),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",fe),bn.commit("preventSavingElementPosition")))):(this.isOutOfThePool=!0,bn.commit("preventSavingElementPosition"),this.paperManager.setStateInvalid())}},overPoolStopDrag:function(){var e=this;return y(v().mark((function t(){return v().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",Ce),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 y(v().mark((function t(){var n,o,i,r;return v().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,bn.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===Ai})).model.getParentCell(),n=this.getSelectionVertex(this.selected,!0),o=t.getBBox(),i=o.x,r=o.y,s=o.width,a=o.height,l=n.maxX-n.minX,c=n.maxY-n.minY,d=n.minX-i,u=n.minY-r,p=d+l,h=d,f=u,m=u+c,g=0,v=0,b="bottom",y="right";p>s-Jf&&(g=p+Jf),h<Yf+Jf&&(g=s+(Yf+Jf-h),y="left"),f<Jf&&(v=Jf-f+a,b="top"),m>a&&(v=m+Jf),(g||v)&&(t.resize(Math.max(g,s),Math.max(v,a),{direction:"".concat(b,"-").concat(y)}),t.component.fixResizeRounding(),t.component.laneSet&&(t.component.resizeLanes(),t.component.sortedLanes().forEach((function(e){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),t.component.updateAnchorPointPosition(),bn.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===Ai}));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)}))}}},gC=mC,vC=(h(40213),qn(gC,Sk,Ek,!1,null,"82f4c144",null)),bC=vC.exports,yC=function(){var e=this,t=e._self._c;return t("div",{staticClass:"remote-cursor",style:{left:e.left+"px",top:e.top+"px"}},[t("inline-svg",{attrs:{src:e.cursorIcon,fill:e.cursorColor}}),t("div",{staticClass:"remote-username"},[e._v(" "+e._s(e.username)+" ")])],1)},wC=[],xC={components:{InlineSvg:Jg},props:{cursorColor:{type:String,default:"#000000"},username:{type:String},top:{type:Number},left:{type:Number}},data:function(){return{cursorIcon:h(61264)}}},kC=xC,CC=(h(89655),qn(kC,yC,wC,!1,null,"70c20f1a",null)),SC=CC.exports,EC={components:{PreviewPanel:Tv,ToolBar:Hw,ExplorerRail:Gg,InspectorButton:iv,InspectorPanel:vv,ProcessmakerModelerGenericFlow:Ck,Selection:bC,RailBottom:mk,RemoteCursor:SC},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:[nx,Cx],data:function(){return{extraActions:[],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,isOpenPreview:!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,players:[],showInspectorButton:!0,inspectorButtonRight:65}},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 bn.getters.autoValidate},nodes:function(){return bn.getters.nodes},currentXML:function(){return Pv.getters.currentState},copiedElements:function(){return bn.getters.copiedElements},highlightedNode:function(){return bn.getters.highlightedNodes[0]},highlightedNodes:function(){return bn.getters.highlightedNodes},invalidNodes:function(){return yx(this.validationErrors,this.nodes)},showComponent:function(){return bn.getters.showComponent}},methods:{handleToolbarAction:function(e){e.handler instanceof Function&&e.handler(this)},handleToggleInspector:function(e){this.showInspectorButton=!(null===e||void 0===e||e),this.isOpenInspector=e},handlePreview:function(e){this.$refs["preview-panel"].previewNode(e),this.handleTogglePreview(!0)},handleTogglePreview:function(e){this.isOpenPreview=e},setInspectorButtonPosition:function(){var e=this.$refs["preview-panel"].width;this.isOpenInspector||(this.isOpenPreview&&!this.isOpenInspector&&(this.inspectorButtonRight=65+e),this.isOpenPreview||this.isOpenInspector||(this.inspectorButtonRight=65))},isAppleOS:function(){return"undefined"!==typeof navigator&&/Mac|iPad|iPhone/.test(navigator.platform)},shapeResize:function(){var e=arguments,t=this;return y(v().mark((function n(){var o;return v().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=[Hl,eo,io,Uo,pv],t=[$b,ty,ly,gy,Sy,Dy];1===this.highlightedNodes.length&&(e.includes(this.highlightedNodes[0].type)||t.includes(this.highlightedNodes[0].type))||(bn.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 y(v().mark((function t(){return v().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,bn.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 y(v().mark((function t(){var n;return v().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 y(v().mark((function t(){return v().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 y(v().mark((function t(){var n,o,i,r,s;return v().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,s=(new XMLSerializer).serializeToString(n),e.$emit("saveBpmn",{xml:r,svg:s});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(){$g()(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 y(v().mark((function t(){var n;return v().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,Pv.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 y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(bn.getters.globalProcesses&&0!==bn.getters.globalProcesses.length){t.next=3;break}return t.next=3,bn.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(){Qr()(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)bn.commit("addToHighlightedNodes",[e]);else{var n=Qn().isEqual(e.id,this.highlightedNode.id);n||bn.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]),kx(e),this.nodeRegistry[e.id]=e,vt().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]),kx(e),this.nodeRegistry[e.id]=e,vt().component(e.id,e.component),this.pmBlockNodes.push(e);var i=Array.isArray(e.bpmnType)?e.bpmnType:[e.bpmnType];i.forEach((function(e){n.parsers[e]||(n.parsers[e]={custom:[],implementation:[],default:[]}),t?n.parsers[e].custom.push(t):n.parsers[e].default.push(o)})),wg.commit("setPmBlockNodeTypes",this.pmBlockNodes)},registerMenuAction:function(e){if(!e.value||"string"!==typeof e.value)throw new Error("Menu action must have a action.value");if(!e.content||"string"!==typeof e.content)throw new Error("Menu action must have a action.content");this.extraActions.push(e)},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)})),bn.commit("setRootElements",this.definitions.rootElements),this.addMessageFlows(),bn.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 Vo("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")}),Qr()(t,n),Qr()(o,n),Qr()(this.planeElements,i),this.collaboration&&Qr()(this.collaboration.get("messageFlows"),n);var r=n.get("incoming");r&&Qr()(t,r);var s=n.get("outgoing");s&&Qr()(t,s)},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 s=e.config?JSON.parse(e.config):{},a=(null===s||void 0===s?void 0:s.processKey)||r(e,this.moddle),l=["bpmn:TextAnnotation","bpmn:Association","bpmn:DataOutputAssociation","bpmn:DataInputAssociation"],c=-1===l.indexOf(i);c&&!e.get("name")&&e.set("name",""),this.createNodeAsync(a,e,o)}else this.handleUnsupportedElement(i,t,e,n,o)},createNodeAsync:function(e,t,n){var o=this;return y(v().mark((function i(){var r;return v().wrap((function(i){while(1)switch(i.prev=i.next){case 0:r=o.createNode(e,t,n),bn.commit("addNode",r);case 2:case"end":return i.stop()}}),i)})))()},createNode:function(e,t,n){return Vo.isTimerType(e)?new sx(e,t,n):(Object.keys(t).forEach((function(e){void 0!==t[e]&&null!==t[e]||delete t[e]})),new Vo(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 y(v().mark((function t(){var n;return v().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 y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isRendering=!0,t.next=3,e.paperManager.performAtomicAction(y(v().mark((function t(){return v().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 y(v().mark((function n(){var o,i;return v().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=Zh(t.definitions),bn.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=fg.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 y(v().mark((function n(){var o,i,r,s,a,l,c,d,u,p,h;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=e.clientX,i=e.clientY,r=e.control,s=e.nodeThatWillBeReplaced,t.validateDropTarget({clientX:o,clientY:i,control:r}),t.allowDrop){n.next=4;break}return n.abrupt("return");case 4:return a=t.nodeRegistry[r.type].definition(t.moddle,t.$t),l=t.nodeRegistry[r.type].diagram(t.moddle),c=t.paperManager.clientToGridPoint(o,i),d=c.x,u=c.y,l.bounds.x=d,l.bounds.y=u,p=t.createNode(r.type,a,l),p.isBpmnType("bpmn:BoundaryEvent")&&t.setShapeCenterUnderCursor(l),t.highlightNode(p),n.next=14,t.addNode(p);case 14:if(s){n.next=16;break}return n.abrupt("return");case 16:return h=new wx(s,a,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 y(v().mark((function n(){var o,i;return v().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 y(v().mark((function n(){var o;return v().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),Vw(e,o),e.setIds(t.nodeIdGenerator),t.planeElements.push(e.diagram),bn.commit("addNode",e),t.poolTarget=null,![Hl,Bl,us,Kl,eo,io,Uo].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 y(v().mark((function n(){return v().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);Vw(e,n),t.planeElements.push(e.diagram),bn.commit("addNode",e),t.poolTarget=null}));case 1:case"end":return n.stop()}}),n)})))()},removeNode:function(e){var t=arguments,n=this;return y(v().mark((function o(){var i,r,s;return v().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,s=void 0===r||r,e){o.next=3;break}return o.abrupt("return");case 3:return s&&(co(e,n),uo(e,n),po(e,n)),fo(e),ho(n.graph,e,n.removeNode),mo(e),n.removeNodesFromLane(e),n.removeNodesFromPool(e),bn.commit("removeNode",e),bn.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 Vo("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 y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.performSingleUndoRedoTransaction(y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.paperManager.performAtomicAction(y(v().mark((function t(){var n;return v().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:bn.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(y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(y(v().mark((function e(){var i,r,s,a;return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.paper.localToClientPoint(n.diagram.bounds),r=i.x,s=i.y,e.next=3,t.handleDrop({clientX:r,clientY:s,control:{type:o},nodeThatWillBeReplaced:n});case 3:return a=e.sent,e.next=6,t.removeNode(n,{removeRelationships:!1});case 6:t.highlightNode(a),t.selectNewNode(a);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(y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(y(v().mark((function e(){return v().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,bn.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 y(v().mark((function n(){return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return Pv.commit("disableSavingState"),n.next=3,e();case 3:return Pv.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&&Qr()(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=xb(t,n,o,this.paperManager.paper,this.graph,this.collaboration,this.$refs["paper-container"]),r=i.allowDrop,s=i.poolTarget;this.allowDrop=r,this.poolTarget=s},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 Hy(e,t.graph)})))},showSavedNotification:function(){Pv.dispatch("saved")},enableVersions:function(){Pv.dispatch("enableVersions")},setVersionIndicator:function(e){Pv.dispatch("setVersionIndicator",e)},setLoadingState:function(e){Pv.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,s=n.height;if(e.clientX>=o&&e.clientX<=o+r&&e.clientY>=i&&e.clientY<=i+s)return!0}return!1},pointerDowInShape:function(e,t){var n=this;return y(v().mark((function o(){var i,r,s;return v().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=e.clientX,r=e.clientY,s=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(s);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;bn.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(){es()&&(window.store=bn,window.undoRedoStore=Pv),this.$t=this.$t.bind(this),window.ProcessMaker.EventBus.$emit("modeler-before-init",{registerComponentMixin:this.registerComponentMixin}),this.registerNode(hv),window.ProcessMaker.EventBus.$emit("modeler-init",{$t:this.$t,modeler:this,registerMenuAction:this.registerMenuAction,registerInspectorExtension:Ly,registerBpmnExtension:this.registerBpmnExtension,registerNode:this.registerNode,registerStatusBar:this.registerStatusBar,registerPmBlock:this.registerPmBlock}),this.moddle=new(gg())(this.extensions),this.linter=new Ov.Linter(wb),this.xmlManager=new mx(this.moddle),this.$emit("set-xml-manager",this.xmlManager)},mounted:function(){var e=this;bn.commit("setReadOnly",this.readOnly),this.graph=new a.dia.Graph,bn.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=By.factory(this.$refs.paper,this.graph.get("interactiveFunc"),this.graph),this.paper=this.paperManager.paper,this.paperManager.addEventHandler("cell:pointerdblclick",ax),this.handleResize(),window.addEventListener("resize",this.handleResize),bn.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){bn.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(){bn.commit("setClientLeftPaper",!1)})),this.$el.addEventListener("mousemove",(function(t){e.pointerMoveHandler(t)})),this.$refs["paper-container"].addEventListener("mouseleave",(function(){e.paperManager.removeEventHandler("blank:pointermove"),bn.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",{$t:this.$t,modeler:this,registerMenuAction:this.registerMenuAction,loadXML:function(){var t=y(v().mark((function t(n){return v().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,Pv.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)}})}},AC=EC,MC=(h(75317),qn(AC,rg,sg,!1,null,null,null)),_C=MC.exports,TC=h(87299),PC=h.n(TC),OC={extends:ph,mixins:[Ma],data:function(){return{nodeIcon:PC(),iconName:""}}},DC=OC,IC=qn(DC,oC,iC,!1,null,null,null),NC=IC.exports,RC=76,BC="processmaker-modeler-manual-task",LC={id:BC,component:NC,bpmnType:"bpmn:ManualTask",control:!1,category:"BPMN",icon:h(8565),label:Bo[BC],loopInspectorIndex:1,definition:function(e,t){return e.create("bpmn:ManualTask",{name:t(Bo[BC]),assignment:"requester",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:RC,width:116})})},inspectorConfig:[{name:Bo[BC],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-manual-task"},items:[{component:"FormInput",config:oa}]},ya,da]}]},jC={extends:jc,data:function(){return{nodeIcon:Ip()}},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}})}},FC=jC,zC=qn(FC,rC,sC,!1,null,null,null),qC=zC.exports,HC="processmaker-modeler-conditional-start-event",VC=Ia()(Ho()(td),Mo(Mo({},Fp),{},{id:HC,component:qC,label:Do[HC],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Do[HC]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(m(jp()))}]}]})),UC=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))},GC=[],WC={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Tn],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=x()(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:vo(this.node.definition.targetRef.$parent,this.$parent)},updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement(),t=go(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 a.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":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){this.targetNode&&(bo(this.targetNode,this.sourceNode.definition),(0,Jn.pull)(this.targetNode.definition.get("dataInputAssociations"),this.node.definition))}},$C=WC,XC=qn($C,UC,GC,!1,null,null,null),YC=XC.exports,ZC=Mo(Mo({},t),{},{component:YC,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:ds}]}]}]}),KC=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))},JC=[],QC={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Tn],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=x()(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(m(e),[this.node.definition]))}},mounted:function(){this.shape=new a.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":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){(0,Jn.pull)(this.sourceNode.definition.get("dataOutputAssociations"),this.node.definition)}},eS=QC,tS=qn(eS,KC,JC,!1,null,null,null),nS=tS.exports,oS=Mo(Mo({},e),{},{component:nS,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:ds}]}]}]}),iS=JSON.parse('{"name":"ProcessMaker","uri":"http://processmaker.com/BPMN/2.0/Schema.xsd","prefix":"pm","xml":{"tagAlias":"lowerCase"},"associations":[],"types":[{"name":"BaseElement","extends":["bpmn:BaseElement"],"isAbstract":true,"properties":[{"name":"color","isAttr":true,"type":"String"}]},{"name":"Task","extends":["bpmn:Task"],"properties":[{"name":"screenRef","isAttr":true,"type":"String"},{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"screenVersion","isAttr":true,"type":"String"},{"name":"dueIn","isAttr":true,"type":"Integer"},{"name":"notifyAfterRouting","isAttr":true,"type":"Boolean"},{"name":"notifyRequestCreator","isAttr":true,"type":"Boolean"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"assignmentLock","isAttr":true,"type":"Boolean"},{"name":"allowReassignment","isAttr":true,"type":"Boolean"},{"name":"assignmentRules","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"customIcon","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"ScriptTask","extends":["bpmn:ScriptTask"],"properties":[{"name":"scriptRef","isAttr":true,"type":"String"},{"name":"scriptVersion","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"ServiceTask","extends":["bpmn:ServiceTask"],"properties":[{"name":"implementationVersion","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"Message","extends":["bpmn:Message"],"properties":[{"name":"payload","isAttr":true,"type":"String"}]},{"name":"EndEvent","extends":["bpmn:EndEvent"],"properties":[{"name":"screenRef","isAttr":true,"type":"String"},{"name":"screenVersion","isAttr":true,"type":"String"}]},{"name":"StartEvent","extends":["bpmn:StartEvent"],"properties":[{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"IntermediateCatchEvent","extends":["bpmn:IntermediateCatchEvent"],"properties":[{"name":"allowedUsers","isAttr":true,"type":"String"},{"name":"allowedGroups","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"whitelist","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"MessageEventDefinition","extends":["bpmn:MessageEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"}]},{"name":"MessageEventDefinition","extends":["bpmn:MessageEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinition","extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"config","isAttr":true,"type":"String"}]},{"name":"SequenceFlow","extends":["bpmn:SequenceFlow"],"properties":[{"name":"config","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"customIcon","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"Signal","extends":["bpmn:Signal"],"properties":[{"name":"config","isAttr":true,"type":"String"},{"name":"detail","isAttr":true,"type":"String"}]}],"emumerations":[]}'),rS=[od,Dm,qm,xa,af,Rf,LC,Mf,Bf,ll,vl,Dl,Sl,Vl,Jl,ps,ZC,oS,Km,lm,Gf],sS=[[hd,"bpmn:StartEvent","bpmn:SignalEventDefinition"],[Yd,"bpmn:StartEvent","bpmn:TimerEventDefinition"],[xd,"bpmn:StartEvent","bpmn:MessageEventDefinition"],[VC,"bpmn:StartEvent","bpmn:ConditionalEventDefinition"],[zu,"bpmn:IntermediateCatchEvent","bpmn:TimerEventDefinition"],[sp,"bpmn:IntermediateCatchEvent","bpmn:MessageEventDefinition"],[mp,"bpmn:IntermediateCatchEvent","bpmn:SignalEventDefinition"],[Cp,"bpmn:IntermediateThrowEvent","bpmn:MessageEventDefinition"],[Op,"bpmn:IntermediateThrowEvent","bpmn:SignalEventDefinition"],[qp,"bpmn:IntermediateCatchEvent","bpmn:ConditionalEventDefinition"],[Iy,"bpmn:BoundaryEvent","bpmn:TimerEventDefinition"],[Xb,"bpmn:BoundaryEvent","bpmn:ErrorEventDefinition"],[cy,"bpmn:BoundaryEvent","bpmn:EscalationEventDefinition"],[vy,"bpmn:BoundaryEvent","bpmn:MessageEventDefinition"],[Ey,"bpmn:BoundaryEvent","bpmn:SignalEventDefinition"],[ny,"bpmn:BoundaryEvent","bpmn:ConditionalEventDefinition"],[gc,"bpmn:EndEvent","bpmn:MessageEventDefinition"],[La,"bpmn:EndEvent","bpmn:ErrorEventDefinition"],[Dc,"bpmn:EndEvent","bpmn:SignalEventDefinition"],[Ga,"bpmn:EndEvent","bpmn:TerminateEventDefinition"]],aS=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 lS(e){var t=e.registerNode,n=e.registerBpmnExtension;sS.forEach((function(e){var n=mt(e,3),o=n[0],i=n[1],r=n[2];t(o,aS(o,i,r))})),rS.forEach((function(e){return t(e)})),n("pm",iS)}}(),f}()}));
|
|
34
|
+
function bt(e){var t=Number(e.version.split(".")[0]);if(t>=2)e.mixin({beforeCreate:o});else{var n=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[o].concat(e.init):o,n.call(this,e)}}function o(){var e=this.$options;e.store?this.$store="function"===typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}var yt="undefined"!==typeof window?window:"undefined"!==typeof h.g?h.g:{},wt=yt.__VUE_DEVTOOLS_GLOBAL_HOOK__;function xt(e){wt&&(e._devtoolHook=wt,wt.emit("vuex:init",e),wt.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){wt.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){wt.emit("vuex:action",e,t)}),{prepend:!0}))}function kt(e,t){return e.filter(t)[0]}function Ct(e,t){if(void 0===t&&(t=[]),null===e||"object"!==typeof e)return e;var n=kt(t,(function(t){return t.original===e}));if(n)return n.copy;var o=Array.isArray(e)?[]:{};return t.push({original:e,copy:o}),Object.keys(e).forEach((function(n){o[n]=Ct(e[n],t)})),o}function St(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Et(e){return null!==e&&"object"===typeof e}function At(e){return e&&"function"===typeof e.then}function Mt(e,t){return function(){return e(t)}}var _t=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},Tt={namespaced:{configurable:!0}};Tt.namespaced.get=function(){return!!this._rawModule.namespaced},_t.prototype.addChild=function(e,t){this._children[e]=t},_t.prototype.removeChild=function(e){delete this._children[e]},_t.prototype.getChild=function(e){return this._children[e]},_t.prototype.hasChild=function(e){return e in this._children},_t.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},_t.prototype.forEachChild=function(e){St(this._children,e)},_t.prototype.forEachGetter=function(e){this._rawModule.getters&&St(this._rawModule.getters,e)},_t.prototype.forEachAction=function(e){this._rawModule.actions&&St(this._rawModule.actions,e)},_t.prototype.forEachMutation=function(e){this._rawModule.mutations&&St(this._rawModule.mutations,e)},Object.defineProperties(_t.prototype,Tt);var Pt=function(e){this.register([],e,!1)};function Ot(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return void 0;Ot(e.concat(o),t.getChild(o),n.modules[o])}}Pt.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Pt.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},Pt.prototype.update=function(e){Ot([],this.root,e)},Pt.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var i=new _t(t,n);if(0===e.length)this.root=i;else{var r=this.get(e.slice(0,-1));r.addChild(e[e.length-1],i)}t.modules&&St(t.modules,(function(t,i){o.register(e.concat(i),t,n)}))},Pt.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},Pt.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Dt;var It=function(e){var t=this;void 0===e&&(e={}),!Dt&&"undefined"!==typeof window&&window.Vue&&$t(window.Vue);var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Pt(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new Dt,this._makeLocalGettersCache=Object.create(null);var i=this,r=this,s=r.dispatch,a=r.commit;this.dispatch=function(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return a.call(i,e,t,n)},this.strict=o;var l=this._modules.root.state;jt(this,l,[],this._modules.root),Lt(this,l),n.forEach((function(e){return e(t)}));var c=void 0!==e.devtools?e.devtools:Dt.config.devtools;c&&xt(this)},Nt={state:{configurable:!0}};function Rt(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Bt(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;jt(e,n,[],e._modules.root,!0),Lt(e,n,t)}function Lt(e,t,n){var o=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,r={};St(i,(function(t,n){r[n]=Mt(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var s=Dt.config.silent;Dt.config.silent=!0,e._vm=new Dt({data:{$$state:t},computed:r}),Dt.config.silent=s,e.strict&&Ut(e),o&&(n&&e._withCommit((function(){o._data.$$state=null})),Dt.nextTick((function(){return o.$destroy()})))}function jt(e,t,n,o,i){var r=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!r&&!i){var a=Gt(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){Dt.set(a,l,o.state)}))}var c=o.context=Ft(e,s,n);o.forEachMutation((function(t,n){var o=s+n;qt(e,o,t,c)})),o.forEachAction((function(t,n){var o=t.root?n:s+n,i=t.handler||t;Ht(e,o,i,c)})),o.forEachGetter((function(t,n){var o=s+n;Vt(e,o,t,c)})),o.forEachChild((function(o,r){jt(e,t,n.concat(r),o,i)}))}function Ft(e,t,n){var o=""===t,i={dispatch:o?e.dispatch:function(n,o,i){var r=Wt(n,o,i),s=r.payload,a=r.options,l=r.type;return a&&a.root||(l=t+l),e.dispatch(l,s)},commit:o?e.commit:function(n,o,i){var r=Wt(n,o,i),s=r.payload,a=r.options,l=r.type;a&&a.root||(l=t+l),e.commit(l,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return zt(e,t)}},state:{get:function(){return Gt(e.state,n)}}}),i}function zt(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,o)===t){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function qt(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push((function(t){n.call(e,o.state,t)}))}function Ht(e,t,n,o){var i=e._actions[t]||(e._actions[t]=[]);i.push((function(t){var i=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return At(i)||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}function Vt(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)})}function Ut(e){e._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function Gt(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Wt(e,t,n){return Et(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function $t(e){Dt&&e===Dt||(Dt=e,bt(Dt))}Nt.state.get=function(){return this._vm._data.$$state},Nt.state.set=function(e){0},It.prototype.commit=function(e,t,n){var o=this,i=Wt(e,t,n),r=i.type,s=i.payload,a=(i.options,{type:r,payload:s}),l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,o.state)})))},It.prototype.dispatch=function(e,t){var n=this,o=Wt(e,t),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(c){0}var l=a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(c){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(c){0}t(e)}))}))}},It.prototype.subscribe=function(e,t){return Rt(e,this._subscribers,t)},It.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return Rt(n,this._actionSubscribers,t)},It.prototype.watch=function(e,t,n){var o=this;return this._watcherVM.$watch((function(){return e(o.state,o.getters)}),t,n)},It.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},It.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),jt(this,this.state,e,this._modules.get(e),n.preserveState),Lt(this,this.state)},It.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=Gt(t.state,e.slice(0,-1));Dt.delete(n,e[e.length-1])})),Bt(this)},It.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},It.prototype.hotUpdate=function(e){this._modules.update(e),Bt(this,!0)},It.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(It.prototype,Nt);var Xt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var o=nn(this.$store,"mapState",e);if(!o)return;t=o.context.state,n=o.context.getters}return"function"===typeof i?i.call(this,t,n):t[i]},n[o].vuex=!0})),n})),Yt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.commit;if(e){var r=nn(this.$store,"mapMutations",e);if(!r)return;o=r.context.commit}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),Zt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;i=e+i,n[o]=function(){if(!e||nn(this.$store,"mapGetters",e))return this.$store.getters[i]},n[o].vuex=!0})),n})),Kt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.dispatch;if(e){var r=nn(this.$store,"mapActions",e);if(!r)return;o=r.context.dispatch}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),Jt=function(e){return{mapState:Xt.bind(null,e),mapGetters:Zt.bind(null,e),mapMutations:Yt.bind(null,e),mapActions:Kt.bind(null,e)}};function Qt(e){return en(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function en(e){return Array.isArray(e)||Et(e)}function tn(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function nn(e,t,n){var o=e._modulesNamespaceMap[n];return o}function on(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var o=e.transformer;void 0===o&&(o=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var r=e.actionFilter;void 0===r&&(r=function(e,t){return!0});var s=e.actionTransformer;void 0===s&&(s=function(e){return e});var a=e.logMutations;void 0===a&&(a=!0);var l=e.logActions;void 0===l&&(l=!0);var c=e.logger;return void 0===c&&(c=console),function(e){var d=Ct(e.state);"undefined"!==typeof c&&(a&&e.subscribe((function(e,r){var s=Ct(r);if(n(e,d,s)){var a=an(),l=i(e),u="mutation "+e.type+a;rn(c,u,t),c.log("%c prev state","color: #9E9E9E; font-weight: bold",o(d)),c.log("%c mutation","color: #03A9F4; font-weight: bold",l),c.log("%c next state","color: #4CAF50; font-weight: bold",o(s)),sn(c)}d=s})),l&&e.subscribeAction((function(e,n){if(r(e,n)){var o=an(),i=s(e),a="action "+e.type+o;rn(c,a,t),c.log("%c action","color: #03A9F4; font-weight: bold",i),sn(c)}})))}}function rn(e,t,n){var o=n?e.groupCollapsed:e.group;try{o.call(e,t)}catch(i){e.log(t)}}function sn(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function an(){var e=new Date;return" @ "+cn(e.getHours(),2)+":"+cn(e.getMinutes(),2)+":"+cn(e.getSeconds(),2)+"."+cn(e.getMilliseconds(),3)}function ln(e,t){return new Array(t+1).join(e)}function cn(e,t){return ln("0",t-e.toString().length)+e}var dn={Store:It,install:$t,version:"3.6.2",mapState:Xt,mapMutations:Yt,mapGetters:Zt,mapActions:Kt,createNamespacedHelpers:Jt,createLogger:on},un=dn,pn=h(85564),hn=h.n(pn),fn=h(44908),mn=h.n(fn);function gn(e,t,n){Object.hasOwn(e,t)?e.set(t,n):(delete Object.getPrototypeOf(e)[t],vt().set(e,t,n))}function vn(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}))}vt().use(un);var bn=new un.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 hn()(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=mt(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}))||(gn(n.definition,o,i),null==i&&vt()["delete"](n.definition,o))},clearNodes:function(e){e.nodes=[]},highlightNode:function(e,t){e.highlightedNodes=t?[t]:[]},addToHighlightedNodes:function(e,t){var n=mn()([].concat(m(e.highlightedNodes),m(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){vn(e,"messageRef",(function(e){var n=e.messageRef;return n===t}))},removeSignalRef:function(e,t){vn(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 y(v().mark((function t(){var n,o,i;return v().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]])})))()}}}),yn="#5096db",wn="#FF0000",xn="#3FA6FF",kn="#DCF2FF",Cn="#CCCCCC",Sn="#F5F5F5",En="#00BA7C",An="#D6FFE6",Mn={source:"source",target:"target"};function _n(e){return e.x&&e.y}var Tn={props:["highlighted","paper","paperManager","isCompleted","isIdle"],data:function(){return{sourceShape:null,target:null,listeningToMouseup:!1,listeningToMouseleave:!1,vertices:null,anchorPointFunction:st}},watch:{target:function(e,t){t&&t!==e&&ut(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){bn.getters.isReadOnly||(e?(this.shape.attr({line:{stroke:"#5096db"},".joint-highlight-stroke":{display:"none"}}),this.shapeView.showTools()):(ut(this.shape),this.shapeView.hideTools()))}},computed:{shapeView:function(){return this.shape.findView(this.paper)},sourceNode:function(){return x()(this.sourceShape,"component.node")},targetNode:function(){return x()(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:En}}):this.isIdle&&this.shape.attr({line:{stroke:Cn}})},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&&_n(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(),s=r.width,a=r.height;return n?{x:o+n.x,y:i+n.y}:{x:o+s/2,y:i+a/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,Mn.source,t)},setTarget:function(e,t){this.setEndpoint(e,Mn.target,t)},completeLink:function(){this.shape.stopListening(this.paper,"cell:mouseleave"),this.$emit("set-cursor",null),this.resetPaper();var e=this.shape.getTargetElement();ut(e),this.shape.on("change:vertices",this.onChangeVertices),this.shape.on("change:source",this.onChangeTargets),this.shape.on("change:target",this.onChangeTargets),this.shape.listenTo(this.sourceShape,"change:position",this.updateWaypoints),this.shape.listenTo(e,"change:position",this.updateWaypoints),this.shape.listenTo(this.paper,"link:mouseleave",this.storeWaypoints);var t=this.shape.getSourceElement();t.embed(this.shape),this.$emit("set-shape-stacking",t)},waitForUpdateWaypoints:function(){var e=this;return new Promise((function(t){e.updateWaypoints(),e.updateWaypoints.flush(),t()}))},storeWaypoints:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.highlighted||e.listeningToMouseleave){t.next=6;break}return e.updateWaypoints(),t.next=4,e.$nextTick();case 4:e.listeningToMouseleave=!0,e.$emit("save-state");case 6:case"end":return t.stop()}}),t)})))()},onChangeTargets:function(e,t,n){var o=this;return y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n||!n.ui){e.next=7;break}return e.next=3,o.$nextTick();case 3:return e.next=5,o.waitForUpdateWaypoints();case 5:return e.next=7,o.storeWaypoints();case 7:case"end":return e.stop()}}),e)})))()},onChangeVertices:function(e,t,n){var o=this;return y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n||!n.ui){e.next=6;break}return o.updateWaypoints(),e.next=4,o.$nextTick();case 4:o.listeningToMouseleave=!1,o.$emit("save-state");case 6: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(m(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&&Ee(this.target,fe));this.setTarget(this.target),this.updateRouter(),this.$emit("set-cursor","default"),Ee(this.target,he),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"),ut(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&&ut(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 a.linkTools.Vertices,t=new a.linkTools.SourceAnchor({snap:this.getAnchorPointFunction("source")}),n=new a.linkTools.TargetAnchor({snap:this.getAnchorPointFunction("target")}),o=new a.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=C()(this.updateWaypoints,100),this.emitSave.bind(this)},mounted:function(){var e=this;return y(v().mark((function t(){var n,o,i,r,s,a,l,c,d,u,p,h,f,m;return v().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(){bn.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],s=i[i.length-1],a=o.position(),l=a.x,c=a.y,d={x:s.x-l,y:s.y-c},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")})),bn.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()}},Pn=h.p+"img/association-head.0b14da7b.svg",On={none:"None",one:"One",both:"Both"},Dn=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("preview-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()},In=[],Nn=(h(47941),function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,m(t.validPreviewElements))?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("Preview"),role:"menuitem",id:"preview-button","aria-label":"Preview"},on:{click:function(e){return t.preview()}}},[n("i",{staticClass:"fas fa-eye cog-container--button"})]):t._e()}),Rn=[],Bn=h.p+"img/trash-alt-solid.9d41abd9.svg",Ln=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)},jn=[],Fn={props:{id:String,ariaLabel:String,src:String,width:{type:Number,default:19},height:{type:Number,default:20}}},zn=Fn;h(21353);function qn(e,t,n,o,i,r,s,a){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=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(s)},c._ssrRegister=l):i&&(l=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}var Hn=qn(zn,Ln,jn,!1,null,"09d8a8ac",null),Vn=Hn.exports,Un=["bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],Gn=Un,Wn={components:{CrownButton:Vn},props:{graph:Object,shape:Object,node:Object},data:function(){return{trashIcon:Bn,validPreviewElements:Gn}},computed:{isPoolLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{preview:function(){this.$emit("previewNode",this.node)}}},$n=Wn,Xn=qn($n,Nn,Rn,!1,null,null,null),Yn=Xn.exports,Zn=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"})])},Kn=[],Jn=h(50467),Qn=h.n(Jn),eo="processmaker-modeler-data-output-association",to="bpmn:DataOutputAssociation";function no(e){return e.create("bpmn:DataOutputAssociation",{targetRef:{x:void 0,y:void 0}})}function oo(e){return e.create("bpmndi:BPMNEdge")}var io="processmaker-modeler-data-input-association",ro="bpmn:DataInputAssociation";function so(e){return e.create("bpmn:DataInputAssociation",{targetRef:{x:void 0,y:void 0}})}function ao(e){return e.create("bpmndi:BPMNEdge")}function lo(e,t){var n=this,o=e.getConnectedLinks(t);o.forEach((function(e){return n.$emit("remove-node",e.component.node)}))}function co(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 uo(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 po(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 ho(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 fo(e){if(!e.isBpmnType(to,ro)){var t=e.definition,n=t.sourceRef,o=t.targetRef;n&&(0,Jn.pull)(n.get("outgoing"),e.definition),o&&o.id&&(0,Jn.pull)(o.get("incoming"),e.definition)}}function mo(e){var t=(0,Jn.get)(e,"definition.sourceRef.default.id",null);t&&t===e.id&&e.definition.sourceRef.set("default",null)}function go(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 s=t.definition.ioSpecification.outputSets[0];s||t.definition.ioSpecification.set("outputSets",[e.create("bpmn:OutputSet",{dataOutputRefs:[]})]),s=t.definition.ioSpecification.outputSets[0],t.definition.ioSpecification.inputSets||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]);var a=t.definition.ioSpecification.inputSets[0];a||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]),a=t.definition.ioSpecification.inputSets[0];var l=a.get("dataInputRefs").find((function(e){return e.id===i}));return l||a.dataInputRefs.push(r),r}function vo(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 bo(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&&((0,Jn.pull)(e.definition.ioSpecification.dataInputs,i),e.definition.ioSpecification.inputSets)){var r=e.definition.ioSpecification.inputSets[0];if(r){var s=r.dataInputRefs.find((function(e){return e.id===o}));if(s&&(0,Jn.pull)(r.dataInputRefs,s),0===r.dataInputRefs.length&&delete e.definition.ioSpecification.inputSets,e.definition.ioSpecification.outputSets){var a=e.definition.ioSpecification.outputSets[0];!a||a.dataOutputRefs&&0!==a.dataOutputRefs.length||delete e.definition.ioSpecification.outputSets}e.definition.ioSpecification.inputSets||e.definition.ioSpecification.outputSets||delete e.definition.ioSpecification}}}}var yo={components:{CrownButton:Vn},props:{graph:Object,shape:Object,node:Object},data:function(){return{trashIcon:Bn}},computed:{isPoolLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{removeFlows:lo,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)}}},wo=yo,xo=qn(wo,Zn,Kn,!1,null,null,null),ko=xo.exports,Co=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()},So=[],Eo=h.p+"img/connect-elements.ab6af00f.svg";h(38880),h(49337);function Ao(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 Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ao(Object(n),!0).forEach((function(t){Te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ao(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function To(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,_e(o.key),o)}}function Po(e,t,n){return t&&To(e.prototype,t),n&&To(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}h(15306);var Oo={"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"},Do=Oo,Io={"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"},No=Io,Ro={"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"},Bo=Ro,Lo={"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"},jo=Lo,Fo={"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"},zo=Fo,qo=h(50361),Ho=h.n(qo),Vo=function(){function e(t,n,o){_o(this,e),Te(this,"type",void 0),Te(this,"definition",void 0),Te(this,"diagram",void 0),Te(this,"pool",void 0),this.type=t,this.definition=n,this.diagram=o}return Po(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(Do).includes(this.type)}},{key:"isEndEvent",value:function(){return Object.keys(No).includes(this.type)}},{key:"isTask",value:function(){return Object.keys(Bo).includes(this.type)}},{key:"isGateway",value:function(){return Object.keys(jo).includes(this.type)}},{key:"isIntermediateEvent",value:function(){return Object.keys(zo).includes(this.type)}},{key:"id",get:function(){return this.definition.id},set:function(e){this.definition.id=e}},{key:"setIds",value:function(e,t){var n,o,i=this,r=t?[t+"_di"]:e.generate(),s=mt(r,2),a=s[0],l=s[1];if(this.id||(this.id=a),this.diagram&&(this.diagram.id=l,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(t){var o=t.get("id");o.substring(0,i.cloneOf.length)===i.cloneOf?(t.set("id",o.replace(i.cloneOf+"_",c+"_")),n=t):t.set("id",e.generate()[0])})),this.definition.ioSpecification.get("dataOutputs")&&this.definition.ioSpecification.get("dataOutputs").forEach((function(t){var n=t.get("id");n.substring(0,i.cloneOf.length)===i.cloneOf?(t.set("id",n.replace(i.cloneOf+"_",c+"_")),o=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&&n&&this.definition.loopCharacteristics.set("loopDataInputRef",n),this.definition.loopCharacteristics.loopDataOutputRef&&o&&this.definition.loopCharacteristics.set("loopDataOutputRef",o),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),s=t[this.type].diagram(n),a=new this.constructor(this.type,r,s);return a.id=null,a.pool=this.pool,a.cloneOf=this.id,e.diagramPropertiesToCopy.forEach((function(e){return a.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"===g(t)?Ho()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",Mo({},t[o].signalRef));a.definition.set(e,n)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return a.definition.eventDefinitions&&a.definition.eventDefinitions[0]&&Object.hasOwn(a.definition.eventDefinitions[0],e)&&a.definition.eventDefinitions[0].set(e,null)})),a}},{key:"cloneFlow",value:function(t,n,o){var i=this,r=t[this.type].definition(n,o),s=t[this.type].diagram(n),a=new this.constructor(this.type,r,s);return a.id=null,a.pool=this.pool,a.cloneOf=this.id,a.diagram=n.create("bpmndi:BPMNEdge",{waypoint:[]}),this.diagram.waypoint.forEach((function(e){var t=n.create("dc:Point",{x:e.x,y:e.y});a.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"===g(t)?Ho()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",Mo({},t[o].signalRef));a.definition.set(e,n),a.definition.set("sourceRef",null),a.definition.set("targetRef",null)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return a.definition.eventDefinitions&&a.definition.eventDefinitions[0]&&Object.hasOwn(a.definition.eventDefinitions[0],e)&&a.definition.eventDefinitions[0].set(e,null)})),a}},{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}();Te(Vo,"diagramPropertiesToCopy",["x","y","width","height"]),Te(Vo,"definitionPropertiesToNotCopy",["$type","id","dataOutputAssociations"]),Te(Vo,"flowDefinitionPropertiesToNotCopy",["$type","id","sourceRef","targetRef"]),Te(Vo,"eventDefinitionPropertiesToNotCopy",["errorRef","messageRef"]);var Uo="processmaker-modeler-generic-flow",Go=h(65554),Wo={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"]},$o={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"]},Xo={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"]},Yo={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"]},Zo={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"]},Ko={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"]},Jo={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"]},Qo={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"]},ei={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"]},ti={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"]},ni={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"]},oi={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"]},ii=h(39865),ri=["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"],si={components:{CrownButton:Vn,FontAwesomeIcon:ii.FontAwesomeIcon},props:["node","moddle","nodeRegistry"],data:function(){return{sequenceFlow:Eo}},computed:{paper:function(){return bn.getters.paper},sequenceFlowConfig:function(){return this.nodeRegistry[Uo]},nodeConfig:function(){return this.nodeRegistry[this.node.type]},allowOutgoingSequenceFlow:function(){var e=this;return!ri.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,s=null;e&&(s=(0,a.V)(this.paper.viewport).toLocalPoint(i,r));var l=this.moddle.create("bpmn:SequenceFlow",{name:"",sourceRef:this.node.definition,targetRef:{x:n||s.x,y:o||s.y}});this.$emit("add-node",new Vo(Uo,l,this.moddle.create("bpmndi:BPMNEdge")))}},created:function(){this.$t=this.$t.bind(this),Go.library.add($o)}},ai=si,li=qn(ai,Co,So,!1,null,null,null),ci=li.exports,di=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()},ui=[],pi=h.p+"img/connect-artifacts.e3e5e73f.svg",hi={components:{CrownButton:Vn},props:["node","moddle","shape"],data:function(){return{connectIcon:pi}},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:On.none});this.$emit("add-node",new Vo("processmaker-modeler-association",i,this.moddle.create("bpmndi:BPMNEdge")))}}},fi=hi,mi=qn(fi,di,ui,!1,null,null,null),gi=mi.exports,vi=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()},bi=[];function yi(e,t){return yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yi(e,t)}function wi(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&&yi(e,t)}h(12419),h(81299);function xi(e){return xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xi(e)}function ki(){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 Ci(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Si(e,t){if(t&&("object"===g(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ci(e)}function Ei(e){var t=ki();return function(){var n,o=xi(e);if(t){var i=xi(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Si(this,n)}}var Ai="processmaker-modeler-pool",Mi=function(){function e(t,n,o){_o(this,e),Te(this,"nodeRegistry",void 0),Te(this,"moddle",void 0),Te(this,"paper",void 0),this.nodeRegistry=t,this.moddle=n,this.paper=o}return Po(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!=x()(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=x()(e,"component.node.type");return t===Ai}}]),e}(),_i=function(e){wi(n,e);var t=Ei(n);function n(){return _o(this,n),t.apply(this,arguments)}return Po(n,null,[{key:"isADataNode",value:function(e){return e.isBpmnType.apply(e,m(n.dataNodeTypes))}},{key:"isNodeDisallowedFromDataAssociation",value:function(e){return e.isBpmnType.apply(e,m(n.disallowedNodes))}}]),n}(Mi);Te(_i,"dataNodeTypes",["bpmn:DataStoreReference","bpmn:DataObjectReference"]),Te(_i,"disallowedNodes",["bpmn:EndEvent","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:Participant","bpmn:Lane","bpmn:TextAnnotation","bpmn:Association"]);var Ti={components:{CrownButton:Vn},props:["node","moddle","shape"],data:function(){return{connectIcon:pi}},computed:{paper:function(){return bn.getters.paper},allowOutgoingDataAssociationFlow:function(){return _i.isADataNode(this.node)}},methods:{addDataAssociation:function(n,o,i){this.$emit("toggle-crown-state",!1);var r=n.clientX,s=n.clientY,l=null;n&&(l=(0,a.V)(this.paper.viewport).toLocalPoint(r,s));var c=this.node.isBpmnType("bpmn:DataStoreReference","bpmn:DataObjectReference"),d=c?t:e,u=d.definition(this.moddle),p=new Vo(d.id,u,d.diagram(this.moddle));p.dataAssociationProps={sourceShape:this.shape,targetCoords:{x:o||l.x,y:i||l.y}},this.$emit("add-node",p)}}},Pi=Ti,Oi=qn(Pi,vi,bi,!1,null,null,null),Di=Oi.exports,Ii=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,m(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()},Ni=[],Ri=h.p+"img/clipboard.06edfa02.svg",Bi=["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"],Li=Bi,ji={components:{CrownButton:Vn},props:["node"],data:function(){return{copyCount:0,copyIcon:Ri,validCopyElements:Li}},methods:{copyElement:function(){this.$emit("copy-element")}}},Fi=ji,zi=qn(Fi,Ii,Ni,!1,null,null,null),qi=zi.exports,Hi=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,m(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()},Vi=[],Ui=h.p+"img/copy-regular.67a8edbd.svg",Gi={components:{CrownButton:Vn},props:["node"],data:function(){return{copyCount:0,cloneIcon:Ui,validCopyElements:Li}},methods:{cloneElement:function(){this.$emit("clone-element",this.node,++this.copyCount)}}},Wi=Gi,$i=qn(Wi,Hi,Vi,!1,null,null,null),Xi=$i.exports,Yi=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)},Zi=[],Ki=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,s=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(s,e.node,i)},on:{click:function(t){return e.replaceNode({node:e.node,typeToReplaceWith:i})}}},[e._v(e._s(e.$t(o))+" ")]),e.isDisabled(s,e.node,i)?t("b-tooltip",{attrs:{target:i,variant:"warning",placement:"right"}},[e._v(" "+e._s(e.$t(e.tooltip(s,e.node,i)))+" ")]):e._e()],1)})),0):e._e()],1):e._e()},Ji=[],Qi={name:"CrownTaskDropdown",components:{CrownButton:Vn},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)}}},er=Qi,tr=(h(5648),qn(er,Ki,Ji,!1,null,"31668547",null)),nr=tr.exports,or=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,s=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(s))+" ")])],1)})),0):e._e()],1):e._e()},ir=[],rr=h.p+"img/boundary-event.40a868e9.svg",sr=["bpmn:Task","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:SendTask","bpmn:ReceiveTask","bpmn:UserTask","bpmn:GlobalTask","bpmn:ManualTask","bpmn:CallActivity"];function ar(e){return e&&sr.some((function(t){return e.node.isBpmnType(t)}))}function lr(e,t){return!(!t||!ar(t.component))&&dr(t)}function cr(e){return e&&e.node.isBpmnType("bpmn:CallActivity")}function dr(e){return 0!==dt(e).length}var ur={name:"CrownBoundaryEventDropdown",components:{CrownButton:Vn,FontAwesomeIcon:ii.FontAwesomeIcon},props:{dropdownOpen:{type:Boolean,required:!0},dropdownData:Array,nodeRegistry:Object,moddle:Object,node:Object,shape:Object},data:function(){return{boundaryEventIcon:rr}},methods:{getErrorTooltipText:function(e){return 0===this.getEmptyBoundaryEventPositionsForShape(this.shape).length?"No available space":e},canAddBoundaryEventToTarget:lr,getEmptyBoundaryEventPositionsForShape:dt,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=dt(this.shape)[0];n.bounds.x=o.x-n.bounds.width/2,n.bounds.y=o.y-n.bounds.height/2;var i=new Vo(e,t,n);i.pool=this.node.pool,bn.commit("highlightNode",i),this.$emit("add-node",i)}}},created:function(){this.$t=this.$t.bind(this),Go.library.add(Wo)}},pr=ur,hr=(h(56073),qn(pr,or,ir,!1,null,null,null)),fr=hr.exports,mr=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)},gr=[],vr=(h(27479),h(87714),h(82801),h(1174),h(94023)),br=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)},yr=[],wr=(h(64765),h(69600),h(42238)),xr=h.n(wr),kr=["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"],Cr=["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"],Sr=function(){function e(){_o(this,e)}return Po(e,null,[{key:"list",value:function(){var e=this,t=[];kr.forEach((function(n){xr()[n]&&t.push(e.parseIcon(n,xr()[n]))}));for(var n=0,o=Object.entries(xr());n<o.length;n++){var i=mt(o[n],2),r=i[0],s=i[1];this.shouldIncludeIcon(r,s)&&t.push(this.parseIcon(r,s))}return t}},{key:"grouped",value:function(){for(var e=[{group:"Common",icons:[]},{group:"All Icons",icons:[]}],t=0,n=Object.entries(xr());t<n.length;t++){var o=mt(n[t],2),i=o[0],r=o[1];Cr.includes(i)||(kr.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 Cr.includes(e)||kr.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 Er=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)},Ar=[],Mr={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()}}},_r=Mr,Tr=(h(94960),qn(_r,Er,Ar,!1,null,null,null)),Pr=Tr.exports,Or={components:{FileUploadButton:Pr},props:{value:{required:!1},allowCustom:{type:Boolean,default:!0},default:{type:String,default:"search"}},data:function(){return{all:Sr.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()}}},Dr=Or,Ir=(h(18785),qn(Dr,br,yr,!1,null,null,null)),Nr=Ir.exports,Rr=h(9943),Br={props:{dropdownOpen:{type:Boolean,required:!0},node:Object,showCustomIconPicker:{type:Boolean,default:!1},iconName:{type:String,default:""}},components:{CrownButton:Vn,"sketch-picker":vr.Sketch,IconSelector:Nr},data:function(){return{colors:pe,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){bn.commit("updateNodeProp",{node:this.node,key:"color",value:e}),vt().set(this.node.definition,"color",e),this.$emit("save-state")},resetNodeColor:function(){bn.commit("updateNodeProp",{node:this.node,key:"color",value:void 0}),vt().set(this.node.definition,"color",void 0),this.$emit("save-state")},setCustomIcon:function(e){if(e){var t=(0,Go.icon)({prefix:"fas",iconName:e}),n=t.html,o=btoa(n);bn.commit("updateNodeProp",{node:this.node,key:"customIcon",value:o}),vt().set(this.node.definition,"customIcon",o),this.$emit("set-custom-icon-name",e),this.$emit("save-state")}},resetCustomIcon:function(){bn.commit("updateNodeProp",{node:this.node,key:"customIcon",value:void 0}),vt().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),Go.library.add(Rr.fas)}},Lr=Br,jr=(h(82969),qn(Lr,mr,gr,!1,null,"0c72746a",null)),Fr=jr.exports,zr={name:"CrownDropdowns",components:{CrownTaskDropdown:nr,CrownBoundaryEventDropdown:fr,CrownColorDropdown:Fr},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}}},qr=zr,Hr=(h(64883),qn(qr,Yi,Zi,!1,null,"0a847d3c",null)),Vr=Hr.exports,Ur=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()},Gr=[],Wr=h.p+"img/default-flow.3f3d5309.svg",$r={components:{CrownButton:Vn},props:["node"],data:function(){return{icon:Wr}},methods:{click:function(){this.$emit("default-flow",this.node)}}},Xr=$r,Yr=qn(Xr,Ur,Gr,!1,null,null,null),Zr=Yr.exports,Kr={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()}))}},Jr=h(97019),Qr=h.n(Jr);function es(){return!!window.Cypress}var ts={components:{CrownDropdowns:Vr,PreviewButton:Yn,DeleteButton:ko,GenericFlowButton:ci,AssociationFlowButton:gi,CopyButton:qi,CloneButton:Xi,DefaultFlow:Zr,DataAssociationFlowButton:Di},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:[Kr],watch:{"node.definition.color":{handler:function(){this.setNodeColor()}},highlightedShapes:function(e,t){nt()(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:es(),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===bn.getters.isReadOnly},isMultiselect:function(){var e=bn.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 bn.getters.highlightedShapes}},methods:{setNodeColor:function(){var e=this.node.definition.get("color"),t=Se(this.node,e),n=t.fill,o=t.stroke;Ee(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,bn.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 y(v().mark((function t(){return v().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(),Qr()(this.process.get("flowElements"),this.node.definition),Qr()(this.planeElements,this.node.diagram),Qr()(this.process.get("artifacts"),this.node.definition),this.collaboration&&Qr()(this.collaboration.get("messageFlows"),this.node.definition)}},ns=ts,os=(h(78135),qn(ns,Dn,In,!1,null,null,null)),is=os.exports,rs={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Tn],data:function(){return{shape:null,initialAssociationDirection:this.node.definition.associationDirection,associationDirection:On}},computed:{isValidConnection:function(){var e=x()(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 a.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":Pn,width:20,height:20,y:-10},sourceMarker:{type:"image","xlink:href":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this,this.updateAssociationMarker(this.initialAssociationDirection)}},ss=rs,as=qn(ss,r,s,!1,null,null,null),ls=as.exports,cs={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]*$/"},ds=cs,us="processmaker-modeler-association",ps={id:us,component:ls,bpmnType:"bpmn:Association",control:!1,definition:function(e){return e.create("bpmn:Association",{associationDirection:"".concat(On.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:ds},{component:"FormSelect",config:{label:"Direction",helper:"Select Direction",name:"associationDirection",options:[{value:"".concat(On.none),content:"None"},{value:"".concat(On.one),content:"One"},{value:"".concat(On.both),content:"Both"}]}}]}]}]},hs=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))},fs=[],ms={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 y(v().mark((function t(){return v().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 y(v().mark((function t(){return v().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)})))()}},gs=3,vs=16,bs=4;function ys(e,t){var n=t.size(),o=n.width,i=n.height;for(var r in e)xs(t,r,o),ks(t,r,i),Cs(t,r,e,o)}function ws(e,t){var n=e.attr(t);return void 0===n?bs:n}function xs(e,t,n){var o=ws(e,t+"/ref-padding-x");-1!==t.indexOf("Right")?e.attr(t+"/ref-x",n-vs-o):-1!==t.indexOf("Left")&&e.attr(t+"/ref-x",o+(Es(e)?16:0))}function ks(e,t,n){var o=ws(e,t+"/ref-padding-y");-1!==t.indexOf("bottom")&&e.attr(t+"/ref-y",n-vs-o)}function Cs(e,t,n,o){for(var i=0,r=0;r<gs;r++)e.attr(t+"."+r+"/xlink:href",null);var s=Ss(n,t);for(var a in s)if(e.attr(t+"."+i+"/xlink:href",n[t][a]),i++,i>=gs)break;e.attr(t+"/ref-width",vs*i),-1!==t.indexOf("Center")&&e.attr(t+"/ref-x",(o-i*vs)/2)}function Ss(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 Es(e){return!!e.attr("image/xlink:href")}var As=3,Ms=16;function _s(e){for(var t=[],n=0;n<As;n++)t.push({tagName:"image",selector:e+"."+n});return{tagName:"g",selector:e,children:t}}function Ts(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o={};o[e]=t;for(var i=0;i<As;i++)o[e+"."+i]={"ref-x":i*Ms*n,"ref-y":0,width:Ms,height:Ms};return o}var Ps,Os,Ds,Is,Ns,Rs,Bs,Ls,js,Fs,zs,qs,Hs,Vs,Us={data:function(){return{markers:{topLeft:{},topCenter:{},topRight:{},bottomLeft:{},bottomCenter:{},bottomRight:{}}}},watch:{markers:{deep:!0,handler:function(){this.recalcMarkersAlignment()}}},methods:{recalcMarkersAlignment:function(){ys(this.markers,this.shape)}}},Gs=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},_s("topLeft"),_s("topCenter"),_s("topRight"),_s("bottomLeft"),_s("bottomCenter"),_s("bottomRight")],defaults:a.util.deepSupplement({size:{width:36,height:36},attrs:Mo(Mo(Mo(Mo(Mo(Mo({image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},Ts("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),Ts("topCenter",{ref:"circle","ref-y":-20})),Ts("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),Ts("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),Ts("bottomCenter",{ref:"circle","ref-padding-y":-40})),Ts("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},a.shapes.standard.Circle.prototype.defaults)}),Ws={highlighter:{name:"stroke",options:{padding:10,attrs:{stroke:wn,"stroke-width":10,opacity:.3}}}},$s={highlighter:{name:"stroke",options:{attrs:{stroke:yn,"stroke-width":3,"data-cy":"selected"}}}},Xs={highlighter:{name:"stroke",options:{attrs:{stroke:En,"stroke-width":5}}}},Ys={highlighter:{name:"stroke",options:{attrs:{stroke:xn,"stroke-width":5}}}},Zs={highlighter:{name:"stroke",options:{attrs:{stroke:Cn,"stroke-width":5}}}},Ks={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]")||this.shapeView.$el}},methods:{setShapeHighlight:function(){if(bn.getters.isReadOnly)return this.shapeView.unhighlight(this.shapeBody,Xs),this.isCompleted&&(this.shape.attr("body/fill",An),this.shapeView.highlight(this.shapeBody,Xs)),this.shapeView.unhighlight(this.shapeBody,Ys),this.isInProgress&&(this.shape.attr("body/fill",kn),this.shapeView.highlight(this.shapeBody,Ys)),void(this.isIdle&&(this.shape.attr("body/fill",Sn),this.shapeView.highlight(this.shapeBody,Zs)));this.shapeView&&(this.shapeView.unhighlight(this.shapeBody,Ws),this.hasError&&this.autoValidate&&this.shapeView.highlight(this.shapeBody,Ws),this.shapeView.unhighlight(this.shapeBody,$s),this.highlighted&&this.shapeView.highlight(this.shapeBody,$s))},setBorderOutline:function(e){this.currentBorderOutline&&this.shapeView.unhighlight(this.shapeBody,this.currentBorderOutline),this.currentBorderOutline=e?Ho()(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)}))}))}))}},Js={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je,ms],data:function(){return{shape:null,definition:null,dropdownData:[{label:No["processmaker-modeler-end-event"],nodeType:"processmaker-modeler-end-event"},{label:No["processmaker-modeler-message-end-event"],nodeType:"processmaker-modeler-message-end-event",dataTest:"switch-to-message-end-event"},{label:No["processmaker-modeler-error-end-event"],nodeType:"processmaker-modeler-error-end-event",dataTest:"switch-to-error-end-event"},{label:No["processmaker-modeler-signal-end-event"],nodeType:"processmaker-modeler-signal-end-event",dataTest:"switch-to-signal-end-event"},{label:No["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 Gs,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:xe,stroke:ke},label:{text:this.node.definition.get("name"),refY:"130%"}}),this.shape.addTo(this.graph),this.shape.component=this}},Qs=Js,ea=qn(Qs,hs,fs,!1,null,null,null),ta=ea.exports,na={label:"Name",name:"name",helper:"Enter the name of this element",validation:"required"},oa=na,ia=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)},ra=[],sa={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!!bn.state.nodes.every((function(t){return t.definition.id!==e}))}}},aa=sa,la=qn(aa,ia,ra,!1,null,null,null),ca=la.exports,da={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:ca,config:ds}]},ua=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)},pa=[],ha=h(47037),fa=h.n(ha),ma={props:{value:{type:[String,Array],default:""},label:{type:String,default:"Description"}},inheritAttrs:!1,computed:{textValue:function(){return fa()(this.value)?this.value:x()(this.value[0],"text","")}},methods:{onBlur:function(){var e=this.$root.$children.find((function(e){return e.$refs.modeler}));e.$refs.modeler.pushToUndoStack()}}},ga=ma,va=(h(14855),qn(ga,ua,pa,!1,null,null,null)),ba=va.exports,ya={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Documentation",icon:"book",name:"documentation-accordion"},items:[{component:ba,config:{label:"Description",name:"documentation",helper:""}}]},wa="processmaker-modeler-end-event",xa={id:wa,component:ta,bpmnType:"bpmn:EndEvent",control:!0,category:"BPMN",icon:h(48807),label:No[wa],rank:30,items:[{icon:h(48807),label:No[wa],control:!0,rank:31,id:"processmaker-modeler-end-event"},{icon:h(52080),label:No["processmaker-modeler-message-end-event"],control:!0,rank:32,id:"processmaker-modeler-message-end-event"},{icon:h(95093),label:No["processmaker-modeler-error-end-event"],control:!0,rank:33,id:"processmaker-modeler-error-end-event"},{icon:h(96425),label:No["processmaker-modeler-signal-end-event"],control:!0,rank:34,id:"processmaker-modeler-signal-end-event"},{icon:h(47616),label:No["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(No[wa])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:No[wa],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-end-event"},items:[{component:"FormInput",config:oa}]},ya,da]}]},ka=(h(85827),h(84384)),Ca=h.n(ka),Sa=(h(75505),function(e){var t=btoa(e);return"data:image/svg+xml;base64,".concat(t)}),Ea=function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml"),o=t.definition.get("color")||Ae(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)})),Sa(n.documentElement.outerHTML)},Aa=Ea,Ma={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",Aa(this.icon,this.node))}},mounted:function(){this.updateIconColor()}},_a={extends:ta,mixins:[Ma],props:["moddle","rootElements","id"],data:function(){return{error:this.moddle.create("bpmn:Error",{id:"".concat(this.id,"_error"),name:"".concat(this.id,"_error")}),nodeIcon:Ca()}},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(){Qr()(this.rootElements,this.error)}},Ta=_a,Pa=qn(Ta,Ps,Os,!1,null,null,null),Oa=Pa.exports,Da=h(82492),Ia=h.n(Da),Na=h(57557),Ra=h.n(Na),Ba="processmaker-modeler-error-end-event",La=Ia()(Ho()(xa),{id:Ba,component:Oa,control:!1,label:No[Ba],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(No[Ba]),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(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 Ra()(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"}}]}]}]}),ja=h(43258),Fa=h.n(ja),za={extends:ta,mixins:[Ma],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:Fa()}}},qa=za,Ha=qn(qa,Ds,Is,!1,null,null,null),Va=Ha.exports,Ua="processmaker-modeler-terminate-end-event",Ga=Ia()(Ho()(xa),{id:Ua,component:Va,control:!1,label:No[Ua],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(No[Ua]),eventDefinitions:[e.create("bpmn:TerminateEventDefinition")]})}}),Wa=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))},$a=[],Xa=18,Ya=a.dia.Element.define("processmaker.components.nodes.gateway.Shape",{markup:[].concat(m(a.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:Xa,height:Xa,fill:"transparent",xlinkHref:"",refX:"50%",refX2:-Xa/2,refY:"50%",refY2:-Xa/2}}}),Za=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"],Ka={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je,ms],created:function(){var e=this.node.definition.default||null;delete this.node.definition.default,Za.indexOf(this.node.definition.$type)>-1&&this.$set(this.node.definition,"default",e)},data:function(){return{shape:null,definition:null,labelWidth:175,dropdownData:[{label:jo["processmaker-modeler-exclusive-gateway"],nodeType:"processmaker-modeler-exclusive-gateway"},{label:jo["processmaker-modeler-inclusive-gateway"],nodeType:"processmaker-modeler-inclusive-gateway",dataTest:"switch-to-inclusive-gateway"},{label:jo["processmaker-modeler-parallel-gateway"],nodeType:"processmaker-modeler-parallel-gateway",dataTest:"switch-to-parallel-gateway"},{label:jo["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 Ya;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}},Ja=Ka,Qa=qn(Ja,Wa,$a,!1,null,null,null),el=Qa.exports,tl=h(4074),nl=h.n(tl),ol={extends:el,mixins:[Ma],data:function(){return{nodeIcon:nl()}}},il=ol,rl=qn(il,Ns,Rs,!1,null,null,null),sl=rl.exports,al="processmaker-modeler-exclusive-gateway",ll={id:al,component:sl,bpmnType:"bpmn:ExclusiveGateway",control:!0,category:"BPMN",icon:h(21678),label:"Gateway",rank:50,items:[{icon:h(52794),label:"Exclusive Gateway",control:!0,rank:51,id:"processmaker-modeler-exclusive-gateway"},{icon:h(59749),label:"Inclusive Gateway",control:!0,rank:52,id:"processmaker-modeler-inclusive-gateway"},{icon:h(23726),label:"Parallel Gateway",control:!0,rank:53,id:"processmaker-modeler-parallel-gateway"},{icon:h(93763),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(jo[al])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:jo[al],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-exlcusive-gateway"},items:[{component:"FormInput",config:oa}]},ya,da]}]},cl=h(62635),dl=h.n(cl),ul={diverging:"Diverging",converging:"Converging"},pl={extends:el,mixins:[Ma],data:function(){return{incoming:this.node.definition.get("incoming"),nodeIcon:dl()}},watch:{incoming:function(e){var t=e.length<=1?ul.diverging:ul.converging;this.node.definition.set("gatewayDirection",t)}}},hl=pl,fl=qn(hl,Bs,Ls,!1,null,null,null),ml=fl.exports,gl="processmaker-modeler-inclusive-gateway",vl={id:gl,component:ml,bpmnType:"bpmn:InclusiveGateway",control:!1,category:"BPMN",label:jo[gl],definition:function(e,t){return e.create("bpmn:InclusiveGateway",{name:t(jo[gl]),gatewayDirection:ul.diverging})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:jo[gl],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-inclusive-gateway-config"},items:[{component:"FormInput",config:oa}]},ya,{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-inclusive-gateway-advanced"},items:[{component:"FormInput",config:ds},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:ul.diverging,content:"Diverging"},{value:ul.converging,content:"Converging"}]}}]}]}]},bl=h(70718),yl=h.n(bl),wl={extends:el,mixins:[Ma],data:function(){return{nodeIcon:yl()}},watch:{"node.definition":{deep:!0,immediate:!0,handler:function(){delete this.node.definition.default}}}},xl=wl,kl=qn(xl,js,Fs,!1,null,null,null),Cl=kl.exports,Sl={id:"processmaker-modeler-parallel-gateway",component:Cl,bpmnType:"bpmn:ParallelGateway",control:!1,category:"BPMN",label:"Parallel Gateway",definition:function(e,t){return e.create("bpmn:ParallelGateway",{name:t("Parallel Gateway"),gatewayDirection:ul.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:oa}]},ya,{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-parallel-gateway-direction"},items:[{component:"FormInput",config:ds},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:ul.diverging,content:"Diverging"},{value:ul.converging,content:"Converging"}]}}]}]}]},El=h(30666),Al=h.n(El),Ml={extends:el,mixins:[Ma],data:function(){return{nodeIcon:Al()}}},_l=Ml,Tl=qn(_l,zs,qs,!1,null,null,null),Pl=Tl.exports,Ol="processmaker-modeler-event-based-gateway",Dl={id:Ol,component:Pl,bpmnType:"bpmn:EventBasedGateway",control:!1,category:"BPMN",label:jo[Ol],definition:function(e,t){return e.create("bpmn:EventBasedGateway",{name:t(jo[Ol])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:jo[Ol],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"}}]},ya,da]}]},Il=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))},Nl=[],Rl={offset:{y:-20}},Bl="processmaker-modeler-lane",Ll=function(e){wi(n,e);var t=Ei(n);function n(){return _o(this,n),t.apply(this,arguments)}return Po(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 s=n.sourceAnchor,a=n.targetAnchor;return i.waypoint=[s,a].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 Vo("processmaker-modeler-sequence-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.targetConfig,r=x()(o,"component.node"),s=x()(t,"component.node");return Mi.hasTargetType(o)&&Mi.targetIsNotSource(s,r)&&n.targetIsNotALane(r)&&n.targetIsInSamePool(t,o)&&n.eventBasedGatewayTarget(s,r)&&n.isValidSource(t,i)&&n.sourceIsNotPool(s)&&!_i.isADataNode(s)&&!_i.isADataNode(r)}},{key:"isValidSource",value:function(e,t){return null==t.validateIncoming||t.validateIncoming(e.node)}},{key:"targetIsNotALane",value:function(e){return!e.isType(Bl)}},{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}(Mi),jl={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Tn],data:function(){return{shape:null}},computed:{isValidConnection:function(){return Ll.isValid({sourceShape:this.sourceShape,targetShape:this.target,targetConfig:this.targetConfig})},targetType:function(){return x()(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:Rl}])},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 a.shapes.standard.Link,this.shape.connector("rounded",{radius:5}),this.createLabel(),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},Fl=jl,zl=qn(Fl,Il,Nl,!1,null,null,null),ql=zl.exports,Hl="processmaker-modeler-sequence-flow",Vl={id:Hl,component:ql,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=mt(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 s in e)if(i[s]!==e[s])if("conditionExpression"===s&&r){if(i[s].body!==e[s]){var a=o.create("bpmn:FormalExpression",{body:e[s]});n(t,s,a)}}else n(t,s,e[s])},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:Mo(Mo({},oa),{},{validation:null})}]},ya,da]}]},Ul=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)}}})},Gl=[],Wl=function(e){wi(n,e);var t=Ei(n);function n(){return _o(this,n),t.apply(this,arguments)}return Po(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 s=n.sourceAnchor,a=n.targetAnchor;return i.waypoint=[s,a].map((function(e){return o.moddle.create("dc:Point",e)})),new Vo("processmaker-modeler-message-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.sourceConfig,r=x()(o,"component.node"),s=x()(t,"component.node");return Mi.hasTargetType(o)&&n.isValidTargetType(r)&&Mi.targetIsValidStartEventType(r)&&Mi.targetIsValidIntermediateEventType(r)&&Mi.targetIsValidBoundaryEventType(r)&&Mi.targetIsNotContainingPool(o,s)&&Mi.targetIsInDifferentPool(o,t)&&Mi.targetIsNotSource(r,s)&&Mi.allowOutgoingFlow(i,s)}},{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}(Mi),$l={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Tn],data:function(){return{shape:null}},computed:{isValidConnection:function(){return Wl.isValid({sourceShape:this.sourceShape,targetShape:this.target,sourceConfig:this.sourceConfig})},targetType:function(){return x()(this.target,"component.node.type")},sourceType:function(){return x()(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 a.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}},Xl=$l,Yl=qn(Xl,Ul,Gl,!1,null,null,null),Zl=Yl.exports,Kl="processmaker-modeler-message-flow",Jl={id:Kl,component:Zl,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:oa}]},ya,da]}]},Ql=h(18256),ec=h.n(Ql),tc={extends:ta,mixins:[Ma],props:["node","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:ec()}},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(){Qr()(this.rootElements,this.message),bn.commit("removeMessageRef",this.message)}},nc=tc,oc=qn(nc,Hs,Vs,!1,null,null,null),ic=oc.exports,rc=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)},sc=[],ac=(h(4723),h(34553),{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 bn.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 bn.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=bn.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=bn.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=bn.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=bn.getters.rootElements.findIndex((function(t){return t.id===e.deleteMessage.id}));t>-1&&bn.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 bn.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}),bn.getters.rootElements.push(t)),this.$emit("input",(0,Jn.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});bn.getters.rootElements.push(e),this.showNewMessage=!1},updateOptions:function(e){this.options=(0,Jn.uniqBy)([].concat(m(this.localMessages),m(e)),"id")},loadOptions:function(){this.updateOptions([])},loadSelected:function(e){var t=bn.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(0,Jn.get)(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}}),lc=ac,cc=(h(1277),h(25930),qn(lc,rc,sc,!1,null,"395d11da",null)),dc=cc.exports;function uc(e){return{component:dc,config:{label:"Message",name:"messageRef",helper:e}}}var pc,hc,fc={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(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 Ra()(e,["$type","eventDefinitions","messageRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var s=i.rootElements.find((function(t){return t.id===e.messageRef}));!s&&e.messageRef&&(s=o.create("bpmn:Message",{id:e.messageRef,name:e.messageRef}),i.rootElements.push(s)),t.definition.get("eventDefinitions")[0].messageRef=s}},mc="processmaker-modeler-message-end-event",gc=Ia()(Ho()(xa),Mo(Mo({},fc),{},{id:mc,component:ic,control:!1,label:No[mc],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(No[mc]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},uc("Select the message reference that this element throws")]}]}]})),vc=h(77389),bc=h.n(vc),yc={extends:ta,mixins:[Ma],data:function(){return{nodeIcon:bc()}},mounted:function(){this.shape.attr({image:{"ref-y":3}})}},wc=yc,xc=qn(wc,pc,hc,!1,null,null,null),kc=xc.exports,Cc=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)},Sc=[],Ec={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 bn.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 bn.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=bn.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=bn.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=bn.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=bn.getters.rootElements.findIndex((function(t){return t.id===e.deleteSignal.id}));t>-1&&bn.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 bn.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}),bn.getters.rootElements.push(t)),this.$emit("input",(0,Jn.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});bn.getters.rootElements.push(e),this.showNewSignal=!1},updateOptions:function(e){this.options=(0,Jn.uniqBy)([].concat(m(e),m(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=bn.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(0,Jn.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(0,Jn.get)(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}},Ac=Ec,Mc=(h(59244),h(34924),qn(Ac,Cc,Sc,!1,null,"607e6d70",null)),_c=Mc.exports;function Tc(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{component:_c,config:{label:"Signal",name:"signalRef",helper:e,canEdit:t}}}var Pc={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(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 Ra()(e,["$type","eventDefinitions","signalRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var s=i.rootElements.find((function(t){return t.id===e.signalRef}));!s&&e.signalRef&&(s=o.create("bpmn:Signal",{id:e.signalRef,name:e.signalRef}),i.rootElements.push(s)),t.definition.get("eventDefinitions")[0].signalRef=s}},Oc="processmaker-modeler-signal-end-event",Dc=Ia()(Ho()(xa),Mo(Mo({},Pc),{},{id:Oc,component:kc,control:!1,label:No[Oc],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(No[Oc]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Tc("Select the signal reference that this element throws")]}]}]})),Ic=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))},Nc=[],Rc={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je,Us,ms,Ma],data:function(){return{shape:new Gs,definition:null,dropdownData:[{label:Do["processmaker-modeler-start-event"],nodeType:"processmaker-modeler-start-event",dataTest:"switch-to-start-event"},{label:Do["processmaker-modeler-start-timer-event"],nodeType:"processmaker-modeler-start-timer-event",dataTest:"switch-to-start-timer-event"},{label:Do["processmaker-modeler-signal-start-event"],nodeType:"processmaker-modeler-signal-start-event",dataTest:"switch-to-signal-start-event"},{label:Do["processmaker-modeler-message-start-event"],nodeType:"processmaker-modeler-message-start-event",dataTest:"switch-to-message-start-event"},{label:Do["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:be,fill:ve},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}},Bc=Rc,Lc=qn(Bc,Ic,Nc,!1,null,null,null),jc=Lc.exports,Fc=h(27879),zc=h.n(Fc);function qc(e){if(!e)return!1;var t=JSON.parse(e);return t&&t.web_entry&&"DISABLED"!==t.web_entry.mode}var Hc,Vc,Uc,Gc,Wc,$c,Xc,Yc,Zc={extends:jc,watch:{"node.definition.config":{immediate:!0,handler:function(e){if(qc(e))return this.nodeIcon=zc(),void this.shape.attr("image/xlink:href",Aa(zc(),this.node));this.nodeIcon=null,this.shape.attr("image/xlink:href",null)}}}},Kc=Zc,Jc=qn(Kc,Hc,Vc,!1,null,null,null),Qc=Jc.exports,ed=36,td={bpmnType:"bpmn:StartEvent",control:!1,category:"BPMN",diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:ed,width:ed,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:oa}]},ya,da]}]},nd="processmaker-modeler-start-event",od=Ia()(Ho()(td),{id:nd,component:Qc,control:!0,icon:h(34954),label:Do[nd],rank:10,items:[{icon:h(34954),label:Do[nd],control:!0,bpmnType:"bpmn:StartEvent",rank:10,id:"processmaker-modeler-start-event"},{icon:h(42123),label:Do["processmaker-modeler-message-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:11,id:"processmaker-modeler-message-start-event"},{icon:h(47658),label:Do["processmaker-modeler-conditional-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:12,id:"processmaker-modeler-conditional-start-event"},{icon:h(43762),label:Do["processmaker-modeler-signal-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:13,id:"processmaker-modeler-signal-start-event"},{icon:h(8519),label:Do["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(Do[nd])})}}),id=h(69766),rd=h.n(id),sd={extends:jc,data:function(){return{nodeIcon:rd()}},mounted:function(){this.shape.attr({image:{"ref-x":5,"ref-y":3}})}},ad=sd,ld=qn(ad,Uc,Gc,!1,null,null,null),cd=ld.exports,dd={label:"Request Variable",name:"config",helper:"Enter the request variable that will store the signal payload","data-cy":"signal-request-variable"},ud=dd,pd="processmaker-modeler-signal-start-event",hd=Ia()(Ho()(td),Mo(Mo({},Pc),{},{id:pd,component:cd,label:Do[pd],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Do[pd]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Tc("Signal that will trigger this start event",!1),{component:"FormInput",config:ud}]}]}]})),fd=h(47179),md=h.n(fd),gd={extends:jc,data:function(){return{nodeIcon:md()}}},vd=gd,bd=qn(vd,Wc,$c,!1,null,null,null),yd=bd.exports,wd="processmaker-modeler-message-start-event",xd=Ia()(Ho()(td),Mo(Mo({},fc),{},{id:wd,component:yd,label:Do[wd],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Do[wd]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},uc("Message that will trigger this start event")]}]}]})),kd=h(93698),Cd=h.n(kd),Sd={extends:jc,data:function(){return{nodeIcon:Cd()}}},Ed=Sd,Ad=qn(Ed,Xc,Yc,!1,null,null,null),Md=Ad.exports,_d=(h(82481),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)}),Td=[],Pd=h(26985),Od=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()},Dd=[];function Id(e){return null===e?"":"string"===typeof e?e:e.isLuxonDateTime?e.toISO():e.toISOString()}function Nd(e,t,n,o,i){var r=Id(e),s=Id(t),a="after"===o?i:"",l="ondate"===o?s:"";return"R".concat(a,"/").concat(r,"/").concat(n)+(l?"/"+l:"")}function Rd(e,t){return"P".concat(e).concat(t)}var Bd,Ld,jd=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,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"never",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"1";_o(this,e),Te(this,"_startDate",void 0),Te(this,"_repeat",void 0),Te(this,"_periodicityValue",void 0),Te(this,"_selectedWeekdays",void 0),Te(this,"_endDate",void 0),Te(this,"_ends",void 0),Te(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=s,this._times=a}return Po(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?Pd.DateTime.fromISO(e).toUTC():e.isLuxonDateTime?e.toUTC():Pd.DateTime.fromJSDate(e).toUTC()}},{key:"getFormattedDateWithWeekdayIntervals",value:function(){var e=this,t=Rd(this._repeat,this._periodicityValue),n=[this._startDate.toISO()];return this._selectedWeekdays.forEach((function(o){var i=e.getWeekDayDate(o),r=Nd(i,e._endDate,t,e._ends,e._times);n.push(r)})),n.join("|")}},{key:"getWeekDayDate",value:function(e){var t=Pd.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=Rd(this._repeat,this._periodicityValue);return Nd(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}(),Fd={props:{selectWeekdays:{type:Array,default:function(){return[]}},startDate:{type:String,default:Pd.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:Pd.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 jd(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)}},zd=Fd,qd=(h(41168),qn(zd,Od,Dd,!1,null,"4ae18478",null)),Hd=qd.exports,Vd={day:"D",week:"W",month:"M",year:"Y"},Ud={components:{WeekdaySelect:Hd},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:Pd.DateTime,expression:null,startDate:Pd.DateTime.local().toUTC().toISO(),repeat:"1",periodicity:"week",ends:"never",endDate:Pd.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 Vd[this.periodicity]},timerExpression:function(){if(this.isWeeklyPeriodSelected()&&this.expression)return this.expression;var e=Rd(this.repeat,this.periodicityValue);return Nd(this.startDate,this.endDate,e,this.ends,this.times)}},methods:{isWeeklyPeriodSelected:function(){return"week"===this.periodicity},setStartDate:function(e){this.startDate=Pd.DateTime.fromISO(e,{zone:"utc"}).set({seconds:0,milliseconds:0}).toUTC().toISO()},setEndDate:function(e){var t=Pd.DateTime.fromISO(this.startDate,{zone:"utc"});this.endDate=Pd.DateTime.fromISO(e,{zone:"utc"}).set({hours:t.hour,minutes:t.minute,seconds:0,milliseconds:0}).toUTC().toISO()},parseTimerConfig:function(e){var t,n,o=this;if(null!==(t=e[0])&&void 0!==t&&null!==(n=t.timeCycle)&&void 0!==n&&n.body)try{var i=!1,r=e[0].timeCycle.body.split("|");r.forEach((function(e){if("R"!==e.substr(0,1))o.startDate=e,i=!0;else{var t=e.match(/R(\d*)\/([^/]+)\/P(\d+)(\w)(?:\/([^/]+))?/);if(t){if(o.times=t[1]||"1",o.repeat=t[3],o.periodicity=Object.keys(Vd).find((function(e){return Vd[e]===t[4]})),i||(o.startDate=t[2],i=!0),o.isWeeklyPeriodSelected()){var n=Pd.DateTime.fromISO(t[2],{zone:"utc"}).toLocal().weekday;o.selectedWeekdays.push(n)}o.endDate=t[5]||Pd.DateTime.local().toUTC().toISO(),o.ends=t[5]?"ondate":t[1]?"after":"never"}}i=!0}))}catch(ka){this.resetTimerExpression()}},resetTimerExpression:function(){this.startDate=Pd.DateTime.local().toUTC().toISO(),this.times="1",this.repeat="1",this.periodicity="week",this.endDate=Pd.DateTime.local().toUTC().toISO(),this.ends="never",this.expression=null,this.selectedWeekdays=[]}}},Gd=Ud,Wd=(h(33383),h(66667),qn(Gd,_d,Td,!1,null,"72709fd0",null)),$d=Wd.exports,Xd="processmaker-modeler-start-timer-event",Yd=Ia()(Ho()(td),{id:Xd,component:Md,label:Do[Xd],definition:function(e,t){var n=e.create("bpmn:StartEvent",{name:t(Do[Xd])});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 s=e[r];if("object"===g(s))continue;var a=i.get(r)[0].timeCycle;if(a&&a.body===s)continue;var l={timeCycle:o.create("bpmn:Expression",{body:s})},c=[o.create("bpmn:TimerEventDefinition",l)];n(t,"eventDefinitions",c)}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:$d,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},ya,da]}]}),Zd=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))},Kd=[],Jd=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},_s("topLeft"),_s("topCenter"),_s("topRight"),_s("bottomLeft"),_s("bottomCenter"),_s("bottomRight")],defaults:a.util.deepSupplement({type:"processmaker.components.nodes.intermediateEvent.Shape",size:{width:36,height:36},attrs:Mo(Mo(Mo(Mo(Mo(Mo({body:{fill:ye,stroke:we},body2:{cx:18,cy:18,r:15,"stroke-width":2,fill:ye,stroke:we},image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},Ts("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),Ts("topCenter",{ref:"circle","ref-y":-20})),Ts("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),Ts("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),Ts("bottomCenter",{ref:"circle","ref-padding-y":-40})),Ts("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},a.shapes.standard.Circle.prototype.defaults)}),Qd={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je,Us,ms],data:function(){return{shape:null,definition:null,dropdownData:[{label:zo["processmaker-modeler-intermediate-catch-timer-event"],nodeType:"processmaker-modeler-intermediate-catch-timer-event",dataTest:"switch-to-intermediate-timer-catch-event"},{label:zo["processmaker-modeler-intermediate-signal-catch-event"],nodeType:"processmaker-modeler-intermediate-signal-catch-event",dataTest:"switch-to-intermediate-signal-catch-event"},{label:zo["processmaker-modeler-intermediate-signal-throw-event"],nodeType:"processmaker-modeler-intermediate-signal-throw-event",dataTest:"switch-to-intermediate-signal-throw-event"},{label:zo["processmaker-modeler-intermediate-message-catch-event"],nodeType:"processmaker-modeler-intermediate-message-catch-event",dataTest:"switch-to-intermediate-message-catch-event"},{label:zo["processmaker-modeler-intermediate-message-throw-event"],nodeType:"processmaker-modeler-intermediate-message-throw-event",dataTest:"switch-to-intermediate-message-throw-event"},{label:zo["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 Jd;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}},eu=Qd,tu=qn(eu,Zd,Kd,!1,null,null,null),nu=tu.exports,ou=h(39653),iu=h.n(ou),ru={extends:nu,mixins:[Ma],data:function(){return{nodeIcon:iu()}}},su=ru,au=qn(su,Bd,Ld,!1,null,null,null),lu=au.exports,cu=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)},du=[],uu=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)},pu=[],hu=h(10928),fu=h.n(hu),mu={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},gu={props:["value","repeatInput"],data:function(){var e=[{name:mu.minute,value:"M",isTime:!0},{name:mu.hour,value:"H",isTime:!0},{name:mu.day,value:"D"},{name:mu.week,value:"W"},{name:mu.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=fu()(e);if("M"===n){var o=t?mu.minute:mu.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]}}},vu=gu,bu=qn(vu,uu,pu,!1,null,null,null),yu=bu.exports,wu=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)},xu=[],ku={data:function(){return{DateTime:Pd.DateTime}},props:{value:String},methods:{getTimezone:function(){return"undefined"!==typeof window.ProcessMaker&&window.ProcessMaker.user&&window.ProcessMaker.user.timezone||"local"},convertFromUTC:function(e){return Pd.DateTime.fromISO(e,{zone:"utc"}).setZone(this.getTimezone()).toISO()},emitValue:function(e){var t=Pd.DateTime.fromISO(e).toUTC().toISO();this.$emit("input",t)}}},Cu=ku,Su=qn(Cu,wu,xu,!1,null,null,null),Eu=Su.exports,Au=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)},Mu=[],_u={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},Tu={components:{WeekdaySelect:Hd},props:["value","repeatInput"],data:function(){var e=[{name:_u.minute,value:"M",isTime:!0},{name:_u.hour,value:"H",isTime:!0},{name:_u.day,value:"D"},{name:_u.week,value:"W",isWeek:!0},{name:_u.month,value:"M"}];return{DateTime:Pd.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=Pd.DateTime.fromISO(t[2],{zone:"utc"}).toLocal().weekday;n.push(o)}})),n},getPeriodFromDelayString:function(e){var t=this.isTimePeriod(e),n=fu()(e);if("M"===n){var o=t?_u.minute:_u.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}}},Pu=Tu,Ou=qn(Pu,Au,Mu,!1,null,null,null),Du=Ou.exports,Iu="PT1H",Nu={timeDuration:"DurationExpression",timeDate:"DateTimeExpression",timeCycle:"CycleExpression"},Ru={props:{value:{type:Object},typeHelper:{type:String,default:"Select the type of delay"}},components:{DurationExpression:yu,DateTimeExpression:Eu,CycleExpression:Du},computed:{component:function(){return Nu[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)?Iu:Pd.DateTime.local().toUTC().toISO();this.emitChange(e,t)},isDelayType:function(e){return Nu[e]===Nu.timeDuration},isCycleType:function(e){return Nu[e]===Nu.timeCycle},emitChange:function(e,t){this.$emit("input",{type:e,body:t})}}},Bu=Ru,Lu=qn(Bu,cu,du,!1,null,null,null),ju=Lu.exports,Fu="processmaker-modeler-intermediate-catch-timer-event",zu={id:Fu,component:lu,bpmnType:"bpmn:IntermediateCatchEvent",control:!0,category:"BPMN",icon:h(58455),label:"Intermediate Event",rank:20,items:[{icon:h(24462),label:"Intermediate Timer Event",control:!0,rank:21,id:"processmaker-modeler-intermediate-catch-timer-event"},{icon:h(48351),label:"Intermediate Signal Catch Event",control:!0,rank:22,id:"processmaker-modeler-intermediate-signal-catch-event"},{icon:h(20894),label:"Intermediate Signal Throw Event",control:!0,rank:23,id:"processmaker-modeler-intermediate-signal-throw-event"},{icon:h(5294),label:"Intermediate Message Catch Event",control:!0,rank:24,id:"processmaker-modeler-intermediate-message-catch-event"},{icon:h(16383),label:"Intermediate Message Throw Event",control:!0,rank:25,id:"processmaker-modeler-intermediate-message-throw-event"},{icon:h(74726),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(zo[Fu]),eventDefinitions:[e.create("bpmn:TimerEventDefinition",{timeDuration:e.create("bpmn:Expression",{body:Iu})})]})},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=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],s=i[0][r].body;e[o]={type:r,body:s}}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 s=e[r],a=s.type,l=s.body,c=i.get(r)[0][a];if(c&&c.body===l)continue;var d=Te({},a,o.create("bpmn:Expression",{body:l})),u=[o.create("bpmn:TimerEventDefinition",d)];n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{name:zo[Fu],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-timer-config"},items:[{component:"FormInput",config:oa}]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-intermediate-timer-event-timing-control"},items:[{component:ju,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},ya,da]}]};function qu(){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 Hu,Vu,Uu,Gu,Wu,$u,Xu,Yu,Zu,Ku,Ju=h(89454),Qu=h.n(Ju),ep={extends:nu,mixins:[Ma],data:function(){return{nodeIcon:Qu()}},mounted:function(){var e=qu(we,2,ye);this.shape.attr(e)}},tp=ep,np=qn(tp,Hu,Vu,!1,null,null,null),op=np.exports,ip={id:"processmaker-modeler-intermediate-message",component:nu,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:oa}]},ya,da]}]},rp="processmaker-modeler-intermediate-message-catch-event",sp=Ia()(Ho()(ip),Mo(Mo({},fc),{},{id:rp,component:op,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:zo[rp],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(zo[rp]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},uc("Message that will catch this intermediate event")]}]}]})),ap=h(74225),lp=h.n(ap),cp={extends:nu,mixins:[Ma],data:function(){return{nodeIcon:lp()}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},dp=cp,up=qn(dp,Uu,Gu,!1,null,null,null),pp=up.exports,hp={id:"processmaker-modeler-intermediate-event",component:nu,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:oa}]},ya,da]}]},fp="processmaker-modeler-intermediate-signal-catch-event",mp=Ia()(Ho()(hp),Mo(Mo({},Pc),{},{id:fp,component:pp,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:zo[fp],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(zo[fp]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Tc("Signal that will catch this intermediate event",!1),{component:"FormInput",config:ud}]}]}]})),gp=h(98358),vp=h.n(gp),bp={extends:nu,mixins:[Ma],props:["moddle","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:vp()}},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(){Qr()(this.rootElements,this.message),bn.commit("removeMessageRef",this.message)}},yp=bp,wp=qn(yp,Wu,$u,!1,null,null,null),xp=wp.exports,kp="processmaker-modeler-intermediate-message-throw-event",Cp=Ia()(Ho()(ip),Mo(Mo({},fc),{},{id:kp,component:xp,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:zo[kp],icon:h(16383),definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(zo[kp]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},uc("Select the message reference that this element throws")]}]}]})),Sp=h(67471),Ep=h.n(Sp),Ap={extends:nu,mixins:[Ma],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:Ep()}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},Mp=Ap,_p=qn(Mp,Xu,Yu,!1,null,null,null),Tp=_p.exports,Pp="processmaker-modeler-intermediate-signal-throw-event",Op=Ia()(Ho()(hp),Mo(Mo({},Pc),{},{id:Pp,component:Tp,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:zo[Pp],definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(zo[Pp]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Tc("Select the signal reference that this element throws")]}]}]})),Dp=h(94081),Ip=h.n(Dp),Np={extends:nu,mixins:[Ma],data:function(){return{nodeIcon:Ip()}},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}})}},Rp=Np,Bp=qn(Rp,Zu,Ku,!1,null,null,null),Lp=Bp.exports;function jp(){return[{component:"FormInput",config:{label:"Condition",name:"condition",helper:"Expression to evaluate condition"}}]}var Fp={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(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 Ra()(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]))}},zp="processmaker-modeler-intermediate-conditional-catch-event",qp=Ia()(Ho()(hp),Mo(Mo({},Fp),{},{id:zp,component:Lp,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:zo[zp],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(zo[zp]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(m(jp()))}]}]})),Hp=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))},Vp=[],Up=a.shapes.standard.Rectangle.extend({markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},_s("topLeft"),_s("topCenter"),_s("topRight"),_s("bottomLeft"),_s("bottomCenter"),_s("bottomRight")],defaults:a.util.deepSupplement({type:"processmaker.components.nodes.task.Shape",size:{width:100,height:60},attrs:Mo(Mo(Mo(Mo(Mo(Mo({image:{"ref-x":4,"ref-y":4,ref:"rect",width:16,height:16,"data-test":"nodeIcon"}},Ts("topLeft",{"ref-y":4,ref:"rect"})),Ts("topCenter",{"ref-y":4,ref:"rect"})),Ts("topRight",{"ref-y":4,"ref-x":96,ref:"rect"},-1)),Ts("bottomLeft",{ref:"rect"})),Ts("bottomCenter",{ref:"rect"})),Ts("bottomRight",{"ref-x":96,ref:"rect"},-1))},a.shapes.standard.Rectangle.prototype.defaults)}),Gp=76,Wp=116,$p={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",Aa(atob(e),this.node))}},mounted:function(){this.node.definition.get("customIcon")&&this.setCustomIcon(this.node.definition.get("customIcon"))}},Xp=10,Yp=[{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"}],Zp=Yp,Kp=h.p+"img/sequential.f86ad08b.svg",Jp=h.p+"img/parallel.cf1d1995.svg",Qp=h.p+"img/loop.00441d9f.svg",eh="bpmn:StandardLoopCharacteristics",th="bpmn:MultiInstanceLoopCharacteristics";function nh(e,t,n,o){var i=e.get("loopCharacteristics"),r=[eh,th];if(i&&r.includes(i.$type))if(i.$type!==eh){var s=i.isSequential?Kp:Jp;n(t.bottomCenter,"loopCharacteristics",s)}else n(t.bottomCenter,"loopCharacteristics",Qp);else o(t.bottomCenter,"loopCharacteristics")}var oh=h.p+"img/compensation.495ae0a2.svg";function ih(e,t,n,o){e.isForCompensation?n(t.bottomCenter,"compensation",oh):o(t.bottomCenter,"compensation")}var rh,sh,ah=15,lh=2*Ms,ch={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je,Us,ms,$p],data:function(){return{shape:null,definition:null,dropdownData:[{label:Bo["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:Bo["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:Bo["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:Bo["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],boundaryEventDropdownData:Zp,anchorPointFunction:at}},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",a.util.breakText(e,{width:t}));var n=this.shape.size(),o=n.height,i=this.calculateSizeOnGrid(),r=this.useTaskHeight(i)?Gp:i;o!==r&&(this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment())},"node.definition.isForCompensation":function(){ih(this.node.definition,this.markers,this.$set,this.$delete)},"node.definition":{deep:!0,handler:function(){nh(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,s={x:n,y:o,width:i,height:r};return this.graph.findModelsInArea(s)},calculateSizeOnGrid:function(){var e=Xp-Gp%Xp,t=Math.floor(this.shapeView.selectors.label.getBBox().height),n=t+ah+lh,o=this.paperManager.ceilToNearestGridMultiple(n)-e;return this.middleIsOddNumber(o)&&(o+=Xp),o},useTaskHeight:function(e){return e<Gp||!this.node.definition.name},middleIsOddNumber:function(e){return 1===Math.abs(e/2%2)}},mounted:function(){this.shape=new Up;var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),ih(this.node.definition,this.markers,this.$set,this.$delete),nh(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8},label:{text:a.util.breakText(this.node.definition.get("name"),{width:e.width}),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this}},dh=ch,uh=qn(dh,Hp,Vp,!1,null,null,null),ph=uh.exports,hh=h(95514),fh=h.n(hh),mh={extends:ph,mixins:[Ma],data:function(){return{nodeIcon:fh()}}},gh=mh,vh=qn(gh,rh,sh,!1,null,null,null),bh=vh.exports,yh=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)},wh=[],xh={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})}}},kh=xh,Ch=qn(kh,yh,wh,!1,null,"66aabb37",null),Sh=Ch.exports,Eh={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:ca,config:ds},{component:Sh,name:"taskMarkers",config:{label:"Marker Flags",name:"markerFlags",style:"display:none"}}]},Ah=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)},Mh=[],_h={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){(0,Jn.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",(0,Jn.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.loopMaximum=this.getLoopMaximum(),this.loopCondition=this.getLoopCondition()},saveData:function(){(0,Jn.isEqual)(this.local,this.value)||this.$emit("input",(0,Jn.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}}},Th=_h,Ph=qn(Th,Ah,Mh,!1,null,null,null),Oh=Ph.exports;h(19601),h(36210);function Dh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ih(e,t,n){Dh(e,t),t.set(e,n)}function Nh(e,t){return t.get?t.get.call(e):t.value}function Rh(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Bh(e,t){var n=Rh(e,t,"get");return Nh(e,n)}function Lh(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}function jh(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}function Fh(e,t,n){return Lh(e,t),jh(n,"get"),Nh(e,n)}function zh(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 qh(e,t,n,o){return Lh(e,t),jh(n,"set"),zh(e,n,o),o}h(24603),h(28450),h(88386),h(39714),h(4129);var Hh=new WeakMap,Vh=new WeakMap,Uh=new WeakMap,Gh=function(){function e(t){_o(this,e),Ih(this,Hh,{writable:!0,value:function(){var t,n=e.prefix+Fh(e,e,Wh);return qh(e,e,Wh,(t=Fh(e,e,Wh),t++,t)),n}}),Ih(this,Vh,{writable:!0,value:function(){var t,n=e.prefix+Fh(e,e,$h)+"_di";return qh(e,e,$h,(t=Fh(e,e,$h),t++,t)),n}}),Ih(this,Uh,{writable:!0,value:function(){var t,n=e.processPrefix+Fh(e,e,Xh);return qh(e,e,Xh,(t=Fh(e,e,Xh),t++,t)),n}}),this.definitions=t,this.refreshLastIdCounter(),this.refreshLastDiagramIdCounter(),this.refreshLastProcessIdCounter()}return Po(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),s=r?parseInt(r[1]):0;s>i&&(i=s)}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);qh(e,e,Wh,t+1)}},{key:"getCounter",value:function(){return this.refreshLastIdCounter(),Fh(e,e,Wh)}},{key:"getDefinitionNumber",value:function(){return Fh(e,e,Wh)}},{key:"updateCounters",value:function(){var t,n;qh(e,e,Wh,(t=Fh(e,e,Wh),t++,t)),qh(e,e,$h,(n=Fh(e,e,$h),n++,n))}},{key:"refreshLastDiagramIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.prefix,"(\\d+)_di$")),this.definitions.diagrams);qh(e,e,$h,t+1)}},{key:"refreshLastProcessIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.processPrefix,"(\\d+)$")),this.definitions.rootElements);qh(e,e,Xh,t+1)}},{key:"generate",value:function(){var e=Bh(this,Hh).call(this),t=Bh(this,Vh).call(this);return[e,t]}},{key:"generateProcessId",value:function(){return Bh(this,Uh).call(this)}}]),e}();Te(Gh,"prefix","node_"),Te(Gh,"processPrefix","Process_");var Wh={writable:!0,value:1},$h={writable:!0,value:1},Xh={writable:!0,value:1},Yh=null;function Zh(e){return Yh||(Yh=new Gh(e)),Yh}var Kh=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_o(this,e),this.index=window.NODE_INSPECTOR_FIRST_INDEX||(new Date).getTime(),this.definitions=t,this.nodeIdGenerator=Zh(this.definitions),this.options=Object.assign({prefix:this.nodeIdGenerator.generate()[0]},n),this.createdModdleNodes={}}return Po(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(Ra()(e,"$type","$config","markerFlags")).reduce((function(o,i){var s=r.setDefinitionProps(e[i],t,n,void 0,i);return null!==s&&void 0!==s?o[i]=s:void 0===s&&delete o[i],o}),o||this.createModdleNode(n,e))}catch(s){throw'Unable to create moddle node of type "'.concat(e.$type,'" \n ').concat(s)}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(Ra()(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}(),Jh=function(e,t,n,o,i){var r=new Kh(i,{prefix:"".concat(t.definition.id,"_inner")}),s=r.setDefinitionProps(e.$loopCharactetistics,n,o,{});return s=r.setReferences(s),s.loopCharacteristics?(delete t.definition.loopCharacteristics,n(t,"loopCharacteristics",s.loopCharacteristics)):(t.definition.loopCharacteristics=null,delete t.definition.loopCharacteristics),s.ioSpecification?(delete t.definition.ioSpecification,n(t,"ioSpecification",s.ioSpecification)):delete t.definition.ioSpecification,Ra()(e,["$loopCharactetistics"])},Qh=function(e,t,n,o){var i=o.definitions,r=new Kh(i);e.$loopCharactetistics=r.getDefinitionProps({id:t.definition.id,loopCharacteristics:t.definition.loopCharacteristics,ioSpecification:t.definition.ioSpecification}),delete e.loopCharacteristics,delete e.ioSpecification},ef={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Loop Activity",icon:"redo",name:"loop-characteristics-accordion"},items:[{component:Oh,name:"LoopCharactetistics",config:{name:"$loopCharactetistics"}}]},tf="processmaker-modeler-task",nf={id:"processmaker-modeler-task",component:ph,bpmnType:["bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:SubProcess"],control:!0,category:"BPMN",rank:40,icon:h(45849),label:"Task",items:[{icon:h(45849),label:"Form Task",control:!0,rank:41,id:"processmaker-modeler-task"},{icon:h(24678),label:"Manual Task",control:!0,rank:42,id:"processmaker-modeler-manual-task"},{icon:h(37901),label:"Script Task",control:!0,rank:43,id:"processmaker-modeler-script-task"},{icon:h(47356),label:"Sub Process",control:!0,rank:44,id:"processmaker-modeler-call-activity"}],definition:function(e,t){return e.create("bpmn:Task",{name:t(Bo[tf]),assignment:"requester"})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Gp,width:Wp})})},inspectorHandler:function(e,t,n,o,i,r){of(e.markerFlags,t,n,o),Jh(e,t,n,o,i),r(Ra()(e,"markerFlags","$loopCharactetistics"))},inspectorData:function(e,t,n){var o=t(e);return Qh(o,e,t,n),o.markerFlags={isForCompensation:o.isForCompensation},delete o.isForCompensation,o},inspectorConfig:[{name:Bo[tf],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-task"},items:[{component:"FormInput",config:oa}]},ef,ya,Eh]}],loopCharacteristicsHandler:Jh,loopCharacteristicsData:Qh};function of(e,t,n){if(e){var o=t.definition.get("isForCompensation"),i=e.isForCompensation;null!=i&&i!==o&&n(t,"isForCompensation",i)}}var rf,sf,af=Mo(Mo({},nf),{},{component:bh}),lf=(h(38862),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)}),cf=[],df=h.p+"img/subprocess.19c191a3.svg",uf=15,pf=2*Ms,hf='<svg version="1.1"\n baseProfile="full"\n width="16" height="16"\n xmlns="http://www.w3.org/2000/svg"></svg>',ff={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","paperManager"],mixins:[Ks,Je,Us,ms,Ma,$p],data:function(){return{subProcessSvg:null,failedToLoadPreview:!1,boundaryEventDropdownData:Zp,dropdownData:[{label:Bo["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:Bo["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:Bo["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:Bo["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],nodeIcon:hf,iconName:"",anchorPointFunction:at}},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",a.util.breakText(e,{width:t}));var n=this.shapeView.selectors.label.getBBox().height,o=this.shape.size(),i=o.height;if(n+uf+pf!==i){var r=Math.max(n+uf+pf,Gp);this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment()}},"node.definition.config":function(e){bn.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(){nh(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 Up,this.$set(this.markers.bottomCenter,"subprocess",df);var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),nh(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8,strokeWidth:4},label:{text:a.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"))}},mf=ff,gf=qn(mf,lf,cf,!1,null,null,null),vf=gf.exports,bf=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)},yf=[],wf=h(45578),xf=h.n(wf),kf={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 xf()(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=C()((function(t){e.loadProcesses(t)}),500),0===this.processList.length?this.loadProcesses():this.loadBpmnValues()}},Cf=kf,Sf=qn(Cf,bf,yf,!1,null,null,null),Ef=Sf.exports,Af="processmaker-modeler-call-activity",Mf={id:Af,component:vf,bpmnType:"bpmn:CallActivity",control:!1,category:"BPMN",icon:h(12893),label:Bo[Af],definition:function(e,t){return e.create("bpmn:CallActivity",{name:t(Bo[Af]),calledElement:"",config:"{}",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Gp,width:Wp})})},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:Bo[Af],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-subprocess"},items:[{component:"FormInput",config:oa},{component:Ef,config:{name:"config"}}]},ya,da]}]},_f=h(87465),Tf=h.n(_f),Pf={extends:ph,mixins:[Ma],data:function(){return{nodeIcon:Tf(),iconName:""}}},Of=Pf,Df=qn(Of,rf,sf,!1,null,null,null),If=Df.exports,Nf="processmaker-modeler-script-task",Rf={id:Nf,component:If,bpmnType:"bpmn:ScriptTask",control:!1,category:"BPMN",icon:h(75763),label:Bo[Nf],definition:function(e,t){return e.create("bpmn:ScriptTask",{name:t(Bo[Nf]),scriptRef:null,loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Gp,width:Wp})})},inspectorConfig:[{name:Bo[Nf],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-script-task"},items:[{component:"FormInput",config:oa}]},ya,da]}]},Bf=Mo(Mo({},nf),{},{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:oa}]},ya,da]}]}),Lf=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))},jf=[],Ff=160,zf={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","paperManager","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,Je],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:a.util.breakText(e,{width:Ff}),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 a.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"))}},qf=zf,Hf=qn(qf,Lf,jf,!1,null,null,null),Vf=Hf.exports,Uf="processmaker-modeler-text-annotation",Gf={id:Uf,component:Vf,bpmnType:"bpmn:TextAnnotation",control:!0,category:"BPMN",icon:h(15153),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"}}]},ya,da]}]},Wf=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)},$f=[],Xf=h.p+"img/highlight-shape.5f7b1ba9.svg",Yf=30,Zf=200,Kf=300,Jf=20,Qf=300,em=100,tm={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===bn.getters.isReadOnly&&this.addResizeAnchors(),this.calculateElementLimits(),this.updateAnchorPointPosition()):this.removeResizeAnchors())}},computed:{poolComponent:function(){return x()(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!==Bl&&"processmaker-modeler-message-flow"!==e.component.node.type})).map((function(e){return e.getBBox()})),this.elementTopY=Math.min.apply(Math,m(this.elementBounds.map((function(e){var t=e.y;return t-Jf})))),this.elementBottomY=Math.max.apply(Math,m(this.elementBounds.map((function(e){var t=e.y,n=e.height;return t+n+Jf})))),this.elementRightX=Math.max.apply(Math,m(this.elementBounds.map((function(e){var t=e.x,n=e.width;return t+n+Jf})))),this.elementLeftX=Math.min.apply(Math,m(this.elementBounds.map((function(e){var t=e.x;return t-Jf}))))},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 a.shapes.standard.EmbeddedImage,n=new a.shapes.standard.EmbeddedImage,o=new a.shapes.standard.EmbeddedImage,i=new a.shapes.standard.EmbeddedImage;this.anchorPoints=[t,n,o,i];var r=this.shape.getBBox(),s=r.x,l=r.y,c=r.width,d=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(s+c,l+d),n.position(s-this.pointWidth,l+d),o.position(s+c,l-this.pointHeight),i.position(s-this.pointWidth,l-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){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),bn.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 s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.width,d=s.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}),em),b=Math.max(a+c-(i+this.pointWidth),a+c-this.elementLeftX+Yf,Kf),y=Math.max(l+d-(r+this.pointWidth),l+d-this.elementTopY,this.poolComponent.laneSet?v:Zf),w=Math.max(p+f-(i+this.pointWidth),p+f-this.elementLeftX+Jf+Yf,Qf),x=Math.max(h+m-(r+this.pointHeight),em);if(this.isLane)if(this.shape===g[0]){var k=Math.max(a+c-(i+this.pointWidth)+Yf,a+c-this.elementLeftX+Yf,Kf);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+em),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 s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.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}),em),g=Math.max(i-a,this.elementRightX-a,Kf),v=Math.max(l+c-(r+this.pointWidth),l+c-this.elementTopY,this.poolComponent.laneSet?m:Zf),b=Math.max(i-u,this.elementRightX-u,Qf),y=Math.max(p+h-(r+this.pointHeight),em);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+em),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 s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.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}),em),g=Math.max(a+c-(i+this.pointWidth),a+c-this.elementLeftX+Yf,Kf),v=Math.max(r-l,this.elementBottomY-l,this.poolComponent.laneSet?m:Zf),b=Math.max(u+h-(i+this.pointWidth),u+h-this.elementLeftX+Jf+Yf,Qf),y=Math.max(r-p,em);if(this.isLane)if(this.shape===f[f.length-1]){var w=Math.max(a+c-(i+this.pointWidth)+Yf,a+c-this.elementLeftX+Yf,Kf);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-em-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 s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=this.shape.getBBox(),d=c.x,u=c.y,p=this.poolComponent.sortedLanes(),h=p.slice(0,p.length-1).reduce((function(e,t){return e+t.getBBox().height}),em),f=Math.max(i-a,this.elementRightX-a,Kf),m=Math.max(r-l,this.elementBottomY-l,this.poolComponent.laneSet?h:Zf),g=Math.max(i-d,this.elementRightX-d,Qf),v=Math.max(r-u,em);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-em-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(ka){}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:Xf,cursor:t,buttonId:n,refWidth:20,refHeight:20,resetOffset:!0}})}},mounted:function(){var e=this;this.$nextTick((function(){e.configureResize()}))}},nm=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))},om=[],im={components:{CrownConfig:is},props:["graph","node","nodes","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,tm],data:function(){return{shape:null,definition:null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new a.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:Ce}),this.shape.attr("label",{text:a.util.breakText(this.node.definition.get("name"),{width:e.height}),fill:"black",transform:"rotate(-90)",refX:Yf/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(Qr()(t,this.node.definition),0===t.length)return e.containingProcess.set("laneSets",[]),void(e.laneSet=null)}},rm=im,sm=qn(rm,nm,om,!1,null,null,null),am=sm.exports,lm={id:Bl,component:am,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:oa}]},ya,da]}]},cm=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)},dm=[],um=h.p+"img/lane-above.37ee2b80.svg",pm={components:{CrownButton:Vn,FontAwesomeIcon:ii.FontAwesomeIcon},data:function(){return{laneAboveIcon:um}},created:function(){Go.library.add(Xo)}},hm=pm,fm=qn(hm,cm,dm,!1,null,null,null),mm=fm.exports,gm=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)},vm=[],bm=h.p+"img/lane-below.22169670.svg",ym={components:{CrownButton:Vn,FontAwesomeIcon:ii.FontAwesomeIcon},data:function(){return{laneBelowIcon:bm}},created:function(){Go.library.add(Yo)}},wm=ym,xm=qn(wm,gm,vm,!1,null,null,null),km=xm.exports,Cm=a.shapes.standard.Rectangle.define("processmaker.modeler.bpmn.pool",{markup:[].concat(m(a.shapes.standard.Rectangle.prototype.markup),[{tagName:"polyline",selector:"polyline"}]),attrs:{label:{fill:"black",transform:"rotate(-90)",refX:Yf/2},polyline:{refPointsKeepOffset:"".concat(Yf,",0 ").concat(Yf,",200"),stroke:"#000",fill:"#fff",strokeWidth:2}}}),Sm=Cm,Em=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))},Am=[],Mm={inheritAttrs:!1,components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,ms,Je],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 a.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}},_m=Mm,Tm=qn(_m,Em,Am,!1,null,null,null),Pm=Tm.exports,Om="processmaker-modeler-data-object",Dm={id:Om,component:Pm,bpmnType:"bpmn:DataObjectReference",control:!0,category:"BPMN",icon:h(91012),label:Bo[Om],rank:80,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataObjectReference",{name:t(Bo[Om])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:36})})},inspectorConfig:[{name:Bo[Om],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-object"},items:[{component:"FormInput",config:oa}]},ya,da]}]},Im=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))},Nm=[],Rm=a.shapes.standard.Cylinder.extend({markup:[].concat(m(a.shapes.standard.Cylinder.prototype.markup),[{tagName:"ellipse",selector:"thirdLine"},{tagName:"ellipse",selector:"secondLine"},{tagName:"ellipse",selector:"firstLine"}]),defaults:a.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"}}},a.shapes.standard.Cylinder.prototype.defaults)}),Bm={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Ks,ms,Je],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 Rm,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}},Lm=Bm,jm=qn(Lm,Im,Nm,!1,null,null,null),Fm=jm.exports,zm="processmaker-modeler-data-store",qm={id:zm,component:Fm,bpmnType:"bpmn:DataStoreReference",control:!0,category:"BPMN",icon:h(63427),label:Bo[zm],rank:90,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataStoreReference",{name:t(Bo[zm])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:50})})},inspectorConfig:[{name:Bo[zm],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-store"},items:[{component:"FormInput",config:oa}]},ya,da]}]};function Hm(e,t){var n=new Sm,o=e.diagram.bounds;return n.position(o.x,o.y),n.resize(o.width,o.height),n.attr("label/text",a.util.breakText(e.definition.get("name"),{width:o.width})),n.attr("body",{fill:Ce}),n.addTo(t),n}function Vm(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 Um(e,t){e.fitEmbeds({padding:Jf+Yf}),e.resize(e.getBBox().width-Yf,e.getBBox().height-Yf),e.resize(e.getBBox().width,e.getBBox().height-Yf,{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 Gm(e,t,n){var o=Hm(t,n);return e||(Vm(n,o),Um(o,t)),o}function Wm(e){return e.component&&e.component.node.type!==Bl&&e.component.node.type!==Uf&&e.component.node.type!==Om&&e.component.node.type!==zm}var $m={components:{CrownConfig:is,AddLaneAboveButton:mm,AddLaneBelowButton:km},props:["graph","node","nodes","id","collaboration","processes","moddle","processNode","rootElements","highlighted","nodeRegistry","paper","planeElements","isRendering","paperManager","nodeIdGenerator"],mixins:[Ks,tm,Je],data:function(){return{shape:null,definition:null,laneSet:null,isAddingLaneAbove:!1,anchorPointFunction:lt(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===Bl})).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,s=n.height,a={x:o,y:i,width:r,height:s};return t.findModelsInArea(a)},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,Qr()(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;Qr()(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)}));Qr()(o.get("flowNodeRef"),n)}Qr()(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 y(v().mark((function t(){var n,o;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=[],e.laneSet||(e.createLaneSet(),o=lm.definition(e.moddle,e.$t),e.shape.getEmbeddedCells().filter((function(e){return Wm(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=mt(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]:lm.definition(this.moddle,this.$t);e.set("color",this.node.definition.get("color")),this.$emit("set-pool-target",this.shape);var t=lm.diagram(this.moddle);return t.bounds.width=this.shape.getBBox().width,this.$emit("add-node",new Vo(lm.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!==Bl&&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 s=1===t.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type===Bl})).length,a=s?i:r.height;e.resize(o-Yf,a),e.position(Yf,s?0:this.isAddingLaneAbove?-a:i,{parentRelative:!0}),t.resize(o,s?i:i+a,{direction:this.isAddingLaneAbove?"top-right":"bottom-right"}),this.fixResizeRounding(),this.updateAnchorPointPosition();var l=e.position(),c=l.x,d=l.y;r.set("x",c),r.set("y",d),r.set("width",e.get("size").width),r.set("height",e.get("size").height),bn.commit("updateNodeBounds",{node:this.node,bounds:t.getBBox()})}},expandToFitElement:function(e,t){if(e.component.node.type!==Kl){var n=t.getBBox(),o=n.x,i=n.y,r=n.width,s=n.height;if(e.component.node.type!==Bl){var a=e.get("size"),l=a.width,c=a.height,d=e.position(),u=d.x,p=d.y,h=u-o,f=p-i,m=h+l,g=h,v=f,b=f+c,y=0,w=0,x="bottom",k="right";m>r-Jf&&(y=m+Jf),g<Yf+Jf&&(y=r+(Yf+Jf-g),k="left"),v<Jf&&(w=Jf-v+s,x="top"),b>s-Jf&&(w=b+Jf),(y||w)&&(t.resize(Math.max(y,r),Math.max(w,s),{direction:"".concat(x,"-").concat(k)}),this.fixResizeRounding(),this.updateAnchorPointPosition(),this.laneSet&&(this.resizeLanes(),this.sortedLanes().forEach((function(e){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),bn.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),s=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 a=this.sortedLanes().indexOf(e),l=e.getBBox(),c=l.width,d=this.sortedLanes()[a+(t.includes("top")?-1:1)];d.resize(c,d.getBBox().height+s,{direction:o}),this.shape.resize(c+Yf,i,{direction:o}),this.sortedLanes().forEach((function(e){return e.resize(c,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,s=i.height,a=t.get("size"),l=a.height,c=t.position({parentRelative:!0}),d=c.y,u=l,p=d;if(0===n&&(u=l+t.position({parentRelative:!0}).y,p=0),n===o.length-1){var h=s-(t.position({parentRelative:!0}).y+l);u=l+h}t.resize(r-Yf,u),t.position(Yf,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:Jf+Yf}),this.shape.resize(this.shape.getBBox().width-Yf,this.shape.getBBox().height-Yf),this.shape.resize(this.shape.getBBox().width,this.shape.getBBox().height-Yf,{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 s=this.shape.position(),a=s.x,l=s.y,c=this.shape.get("size"),d=c.width,u=c.height;this.node.diagram.bounds.x=a,this.node.diagram.bounds.y=l,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 Wm(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===Bl}));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&&bn.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"),s=r.width,a=r.height;this.node.diagram.bounds.x=o,this.node.diagram.bounds.y=i,this.node.diagram.bounds.width=s,this.node.diagram.bounds.height=a}},mounted:function(){this.$emit("set-pools",this.node.definition),this.laneSet=this.containingProcess.get("laneSets")[0],this.shape=Gm(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");Qr()(e,this.node.definition),this.hasPools()?Qr()(this.rootElements,this.containingProcess):this.$emit("unset-pools")},created:function(){this.$t=this.$t.bind(this)}},Xm=$m,Ym=qn(Xm,Wf,$f,!1,null,null,null),Zm=Ym.exports,Km={id:Ai,component:Zm,bpmnType:"bpmn:Participant",control:!0,category:"BPMN",icon:h(77217),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:oa}]},ya,da]}]},Jm=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)},Qm=[];h(86535),h(99244);function eg(e){return Object.entries(e).flatMap((function(e){var t=mt(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return Mo(Mo({},e),{},{errorKey:n},{errorId:"".concat(e.id,"_").concat(e.message.split(" ").join("_"))})}))}))}var tg={components:{FontAwesomeIcon:ii.FontAwesomeIcon},props:["validationErrors","warnings","xmlManager"],data:function(){return{shouldDisplayProblemsPanel:!1,errorColor:"#D9534F",warningColor:"#F0AD4E",faExclamationTriangle:Rr.faExclamationTriangle,faTimesCircle:Rr.faTimesCircle,faChevronUp:Rr.faChevronUp,faChevronDown:Rr.faChevronDown,faCheck:Rr.faCheck}},computed:{autoValidate:{get:function(){return bn.getters.autoValidate},set:function(e){bn.commit("setAutoValidate",e)}},errorList:function(){return eg(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?Rr.faChevronUp:Rr.faChevronDown}},methods:{isErrorCategory:function(e){return"error"===e.category}}},ng=tg,og=(h(99088),qn(ng,Jm,Qm,!1,null,"1ad192c7",null)),ig=og.exports,rg=function(){var e=this,t=e._self._c;return t("span",{attrs:{"data-test":"body-container"}},[e.showComponent?t("tool-bar",{ref:"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,"extra-actions":e.extraActions,players:e.players},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,action:e.handleToolbarAction}}):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&&e.showInspectorButton?t("InspectorButton",{ref:"inspector-button",style:{right:e.inspectorButtonRight+"px"},attrs:{showInspector:e.isOpenInspector},on:{toggleInspector:function(t){e.handleToggleInspector(t),e.setInspectorButtonPosition(t)}}}):e._e(),t("PreviewPanel",{ref:"preview-panel",attrs:{visible:e.isOpenPreview,nodeRegistry:e.nodeRegistry},on:{togglePreview:function(t){e.handleTogglePreview(t),e.setInspectorButtonPosition(t)},previewResize:e.setInspectorButtonPosition}}),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,previewNode:function(t){e.handlePreview(t),e.setInspectorButtonPosition(t)},"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),e._l(e.players,(function(e){return t("RemoteCursor",{key:e.id,attrs:{"cursor-color":e.color,username:e.name,top:e.top,left:e.left}})}))],2)},sg=[],ag=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))},lg=[],cg=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"}],defaults:a.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}}},a.shapes.standard.Circle.prototype.defaults)}),dg={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","isActive"],mixins:[Ks,Je,ms],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 ar(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=rt(this.getCenterPosition(),e),n=t.x,o=t.y,i=this.shape.size(),r=i.width,s=i.height;this.shape.position(n-r/2,o-s/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),bn.commit("allowSavingElementPosition"),this.$emit("shape-resize")},moveBoundaryEventIfOverTask:function(){var e=this.getTaskUnderShape();lr(this.node.type,e)?(this.attachBoundaryEventToTask(e),this.updateShapePosition(e),this.$emit("shape-resize")):this.resetToInitialPosition()},resetInvalidTarget:function(){this.invalidTargetElement&&(ut(this.invalidTargetElement),this.invalidTargetElement=null,this.$emit("shape-resize"))},attachToValidTarget:function(e){var t=this;e.model===this.shape&&(bn.commit("preventSavingElementPosition"),this.validPosition=this.shape.position(),this.shape.listenToOnce(this.paper,"cell:pointerup blank:pointerup",(function(){t.moveBoundaryEventIfOverTask(),t.resetInvalidTarget(),bn.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&&!lr(this.node.type,e)&&e.attr("body/fill",fe),this.invalidTargetElement&&ut(this.invalidTargetElement),this.invalidTargetElement=e}}}},mounted:function(){var e=this;return y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.shape=new cg,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)})))()}},ug=dg,pg=qn(ug,ag,lg,!1,null,null,null),hg=pg.exports,fg={id:"processmaker-modeler-boundary-event",component:hg,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:oa}]}]}]},mg=h(67629),gg=h.n(mg),vg=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)])},bg=[],yg=5e3;vt().use(un);var wg=new un.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:(0,Jn.uniqueId)("nodeType_"),type:e.id,icon:e.icon,label:e.label,bpmnType:e.bpmnType,rank:e.rank||yg,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return Mo(Mo({},e),{},{type:e.id})}))}})).sort((function(e,t){return e.rank-t.rank}))},setPinnedNodes:function(e,t){e.pinnedNodeTypes.push(t),e.pinnedNodeTypes=(0,Jn.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=(0,Jn.uniqBy)([].concat(m(n),m(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:(0,Jn.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||yg,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return Mo(Mo({},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=(0,Jn.uniqBy)(m(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)}}}),xg=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)])},kg=[],Cg={name:"FilterNodeTypes",props:["type"],data:function(){return{searchTerm:""}},watch:{searchTerm:function(e){"pmBlock"===this.type?(0===e.length&&wg.commit("clearFilteredPmBlockNodes"),e.length>0&&wg.commit("setFilteredPmBlockNodeTypes",e)):(0===e.length&&wg.commit("clearFilteredNodes"),e.length>0&&wg.commit("setFilteredNodeTypes",e))},type:function(e,t){this.searchTerm=t===e?this.searchTerm:""}},computed:{nodeTypes:function(){var e=wg.getters.getPinnedNodeTypes,t=wg.getters.getNodeTypes;return[].concat(m(e),m(t))},pmBlockNodes:function(){var e=wg.getters.getPmBlockNodeTypes;return m(e)},placeholder:function(){return"pmBlock"===this.type?this.$t("Search PM Blocks"):this.$t("Search Objects")}}},Sg=Cg,Eg=(h(29062),qn(Sg,xg,kg,!1,null,"c468f432",null)),Ag=Eg.exports,Mg=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)},_g=[],Tg=h.p+"img/pin-angle.95ef112b.svg",Pg=h.p+"img/pin-angle-fill.45c5a07f.svg",Og={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,wg.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),wg.commit("clearSelectedNode"),wg.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")),wg.commit("setGhostNode",o)},createDraggingHelper:function(e,t){var n=this;this.movedElement&&(document.removeEventListener("mousemove",this.setDraggingPosition),document.body.removeChild(this.movedElement),wg.commit("setGhostNode",null));var o=e.target;wg.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,wg.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,wg.commit("clearSelectedNode"),wg.commit("setGhostNode",null)}},computed:{selectedItem:function(){return wg.getters.getSelectedNode},movedElement:function(){return wg.getters.getGhostNode}}},Dg={name:"NodeTypesLoop",mixins:[Og],data:function(){return{pinIcon:Tg,pinFillIcon:Pg,showPin:!1}},created:function(){wg.dispatch("getUserPinnedObjects")},methods:{nodeTypeAlreadyPinned:function(e,t){return!!this.pinnedObjects.find((function(e){return e.type===t}))},unPin:function(e){return this.deselect(),wg.dispatch("removeUserPinnedObject",e)},addPin:function(e){return this.deselect(),wg.dispatch("addUserPinnedObject",e)}},computed:{pinnedObjects:function(){return wg.getters.getPinnedNodeTypes},objects:function(){return wg.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 wg.getters.getFilteredNodeTypes},searchTerm:function(){return wg.getters.getSearchTerm}}},Ig=Dg,Ng=(h(3410),qn(Ig,Mg,_g,!1,null,null,null)),Rg=Ng.exports,Bg=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)},Lg=[],jg={name:"PmBlocksLoop",mixins:[Og],computed:{pmBlockNodeTypes:function(){return wg.getters.getPmBlockNodeTypes},filteredPmBlockNodes:function(){return wg.getters.getFilteredPmBlockNodeTypes},searchTerm:function(){return wg.getters.getSearchTerm}}},Fg=jg,zg=(h(48649),qn(Fg,Bg,Lg,!1,null,null,null)),qg=zg.exports,Hg={name:"ExplorerRail",props:{explorerExpanded:{type:Boolean},nodeTypes:{type:Array},pmBlockNodes:{type:Array}},components:{FontAwesomeIcon:ii.FontAwesomeIcon,FilterNodeTypes:Ag,NodeTypesLoop:Rg,PmBlocksLoop:qg},data:function(){return{tabs:[{idx:0,label:"Add Object"},{idx:1,label:"PM Blocks"}],tabIndex:0}},computed:{explorerOpen:function(){return wg.getters.getExplorerOpen}},created:function(){wg.commit("setNodeTypes",this.nodeTypes)},methods:{faTimes:function(){return Rr.faTimes},setTabIndex:function(e){this.tabIndex!==e&&(this.tabIndex=e,this.clearFilteredObjects())},closeRail:function(){wg.commit("closeExplorer"),this.clearFilteredObjects()},clearFilteredObjects:function(){wg.commit("clearFilteredNodes"),wg.commit("clearFilteredPmBlockNodes")}}},Vg=Hg,Ug=(h(14906),qn(Vg,vg,bg,!1,null,null,null)),Gg=Ug.exports,Wg=h(82729),$g=h.n(Wg),Xg=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)},Yg=[];const Zg={};function Kg(e){return Object.keys(e).reduce(((t,n)=>(!1!==e[n]&&null!==e[n]&&void 0!==e[n]&&(t[n]=e[n]),t)),{})}const Jg={name:"InlineSvg",inheritAttrs:!1,render(e){return this.svgElSource?e("svg",{on:this.$listeners,attrs:Object.assign(this.getSvgAttrs(this.svgElSource),Kg(this.$attrs)),domProps:{innerHTML:this.getSvgContent(this.svgElSource)}}):null},props:{src:{type:String,required:!0},title:{type:String},transformSource:{type:Function,default:e=>e},keepDuringLoading:{type:Boolean,default:!0}},data(){return{svgElSource:null}},watch:{src(e){this.getSource(e)}},mounted(){this.getSource(this.src)},methods:{getSvgAttrs(e){let t={};const n=e.attributes;if(!n)return t;for(let o=n.length-1;o>=0;o--)t[n[o].name]=n[o].value;return t},getSvgContent(e){return e=e.cloneNode(!0),e=this.transformSource(e),this.title&&Qg(e,this.title),e.innerHTML},getSource(e){Zg[e]||(Zg[e]=this.download(e)),this.svgElSource&&Zg[e].getIsPending()&&!this.keepDuringLoading&&(this.svgElSource=null,this.$emit("unloaded")),Zg[e].then((e=>{this.svgElSource=e,this.$nextTick((()=>{this.$emit("loaded",this.$el)}))})).catch((t=>{this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete Zg[e],this.$emit("error",t)}))},download(e){return ev(new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET",e,!0),o.onload=()=>{if(o.status>=200&&o.status<400)try{const e=new DOMParser,i=e.parseFromString(o.responseText,"text/xml");let r=i.getElementsByTagName("svg")[0];r?t(r):n(new Error('Loaded file is not valid SVG"'))}catch(e){n(e)}else n(new Error("Error loading SVG"))},o.onerror=n,o.send()})))}}};function Qg(e,t){const n=e.getElementsByTagName("title");if(n.length)n[0].textContent=t;else{const n=document.createElementNS("http://www.w3.org/2000/svg","title");n.textContent=t,e.insertBefore(n,e.firstChild)}}function ev(e){if(e.getIsPending)return e;let t=!0,n=e.then((e=>(t=!1,e)),(e=>{throw t=!1,e}));return n.getIsPending=function(){return t},n}var tv={components:{InlineSvg:Jg},props:{showInspector:{type:Boolean,default:!0}},data:function(){return{inspectorIcon:h(28400)}},methods:{toggleInspector:function(){this.$emit("toggleInspector",!this.showInspector)}}},nv=tv,ov=(h(5728),qn(nv,Xg,Yg,!1,null,"cebfb20a",null)),iv=ov.exports,rv=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)},sv=[],av=h(43637),lv=h(21223),cv=(h(85780),h(50308)),dv=h.n(cv),uv={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:ds},{component:"FormInput",config:{label:"Name",helper:"The Name of the Process",name:"name",placeholder:""}}]}]}]},pv=uv.id,hv=uv;vt().component("FormText",av.renderer.FormText),vt().component("FormInput",lv.FormInput),vt().component("FormSelect",lv.FormSelect),vt().component("FormTextArea",lv.FormTextArea),vt().component("FormCheckbox",lv.FormCheckbox),vt().component("FormRadioButtonGroup",lv.FormRadioButtonGroup),vt().component("FormAccordion",lv.FormAccordion),vt().component("FormDatePicker",lv.FormDatePicker),vt().component("FormMultiSelect",lv.FormMultiSelect);var fv={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 bn.getters.highlightedNodes[0]},isAnyNodeActive:function(){return this.highlightedNode},updateDefinition:function(){var e=this;if(!this.isAnyNodeActive)return dv();var t=this.defaultInspectorHandler;return this.isProcessNodeActive&&(t=this.processNodeInspectorHandler),this.hasCustomInspectorHandler&&(t=this.customInspectorHandler),function(n){if(n){if(fa()(n.documentation)&&x()(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(Ra()(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=hv.inspectorConfig;var o=Ho()(this.nodeRegistry[t].inspectorConfig),i=x()(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://docs.processmaker.com/designing-processes/expression-syntax-components" target="_blank"><i class="far fa-question-circle mr-1"></a>';var s={component:"FormInput",config:{label:this.$t("Expression"),helper:r,name:"conditionExpression"}},a=i.find((function(e){return e.config&&"Name"===e.config.label})),l=i.indexOf(a);a&&l>=0?i.splice(l+1,0,s):i.push(s)}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=mt(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===Hl},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(Ra()(e,["artifacts","flowElements","laneSets"]))},setNodeProp:function(e,t,n){this.$emit("shape-resize"),bn.commit("updateNodeProp",{node:e,key:t,value:n})},defaultInspectorHandler:function(e){for(var t in Ra()(e,["$type","eventDefinitions"]))this.highlightedNode.definition.get(t)!==e[t]&&this.setNodeProp(this.highlightedNode,t,e[t])},updateState:function(){this.$emit("save-state")}}},mv=fv,gv=(h(97896),qn(mv,rv,sv,!1,null,"738023ac",null)),vv=gv.exports,bv=function(){var e=this,t=e._self._c;return t("b-col",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"pl-0 h-100 overflow-hidden preview-column",style:{maxWidth:e.width+"px"},attrs:{id:"preview_panel","data-test":"preview-column"},on:{mousedown:e.onMouseDown,mouseup:e.onMouseUp,mousemove:e.onMouseMove}},[t("b-row",{staticClass:"control-bar"},[t("b-col",{attrs:{cols:"9"}},[t("div",[t("i",{directives:[{name:"show",rawName:"v-show",value:1==e.selectedPreview,expression:"selectedPreview == 1"}],staticClass:"fas fa-file-alt"}),t("b",{directives:[{name:"show",rawName:"v-show",value:2==e.selectedPreview,expression:"selectedPreview == 2"}]},[e._v(" {} ")]),t("b-dropdown",{staticClass:"dropdown-right",staticStyle:{"margin-top":"-10px"},attrs:{variant:"ellipsis","no-caret":"","no-flip":"",lazy:""},scopedSlots:e._u([{key:"button-content",fn:function(){return[t("i",{staticClass:"fas fa-sort-down"})]},proxy:!0}]),model:{value:e.selectedPreview,callback:function(t){e.selectedPreview=t},expression:"selectedPreview"}},[t("b-dropdown-item",{key:"1",staticClass:"ellipsis-dropdown-item mx-auto",on:{click:function(t){return e.onSelectedPreview(1)}}},[t("div",{staticClass:"ellipsis-dropdown-content"},[t("b",{staticClass:"pr-1 fa-fw fas fa-file-alt"}),t("span",[e._v(e._s(e.$t("Document")))])])]),t("b-dropdown-item",{key:"2",staticClass:"ellipsis-dropdown-item mx-auto",on:{click:function(t){return e.onSelectedPreview(2)}}},[t("div",{staticClass:"ellipsis-dropdown-content"},[t("b",{staticClass:"pr-1 fa-fw"},[e._v("{ }")]),t("span",[e._v(e._s(e.$t("Object")))])])])],1),t("span",[e._v(e._s(e.$t("Preview"))+" - "+e._s(e.taskTitle))])],1)]),t("b-col",{staticClass:"actions"},[t("div",[t("i",{staticClass:"fas fa-external-link-alt"}),t("i",{staticClass:"fas fa-times",on:{click:function(t){return e.onClose()}}})])])],1),t("b-row",[t("div",{staticStyle:{"background-color":"#0074D9",height:"20px",width:"100%"}},[e._v(" ")])]),t("b-row",[t("div",{staticClass:"item-title"},[e._v(" "+e._s(e.screenTitle)+" ")]),t("div",{staticClass:"task-title"},[e._v(" "+e._s(e.taskTitle)+" ")])]),t("no-preview-available")],1)},yv=[],wv=function(){var e=this,t=e._self._c;return t("div",{staticClass:"no-preview"},[t("img",{attrs:{src:e.noPreviewImg,alt:"no preview"}}),t("h1",[e._v("No Screen Asigned")]),t("h2",[e._v("This is a placeholder screen. Please, assign a screen to this task.")])])},xv=[],kv={data:function(){return{noPreviewImg:h(2431)}}},Cv=kv,Sv=(h(97203),qn(Cv,wv,xv,!1,null,"7ec3935d",null)),Ev=Sv.exports,Av={props:["nodeRegistry","visible"],components:{NoPreviewAvailable:Ev},data:function(){return{data:{},selectedPreview:"1",taskTitle:"",screenTitle:"",width:400,isDragging:!1,currentPos:400}},watch:{highlightedNode:function(){document.activeElement.blur(),this.prepareData()},"highlightedNode.definition":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 bn.getters.highlightedNodes[0]}},methods:{prepareData:function(){var e,t;if(!this.highlightedNode)return{};this.taskTitle=null===this||void 0===this||null===(e=this.highlightedNode)||void 0===e||null===(t=e.definition)||void 0===t?void 0:t.name},handleAssignmentChanges:function(e,t){e!==t&&this.prepareData()},onSelectedPreview:function(e){this.selectedPreview=e},previewNode:function(e){this.taskTitle=null===e||void 0===e?void 0:e.name,this.showPanel=!0},onClose:function(){this.$emit("togglePreview",!1)},onMouseDown:function(e){this.isDragging=!0,this.currentPos=e.x},onMouseUp:function(){this.isDragging=!1},onMouseMove:function(e){if(this.isDragging){var t=this.currentPos-e.x;this.currentPos=e.x,this.width=parseInt(this.width)+t,this.$emit("previewResize",this.width)}}}},Mv=Av,_v=(h(40617),qn(Mv,bv,yv,!1,null,"03688ded",null)),Tv=_v.exports;vt().use(un);var Pv=new un.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)}}}),Ov=h(51540),Dv=h(51248),Iv=h.n(Dv),Nv=h(48909),Rv=h.n(Nv),Bv=h(82317),Lv=h.n(Bv),jv=h(83184),Fv=h.n(jv),zv=h(36111),qv=h.n(zv),Hv=h(25795),Vv=h.n(Hv),Uv=h(37554),Gv=h.n(Uv),Wv=h(19869),$v=h.n(Wv),Xv=h(88687),Yv=h.n(Xv),Zv=h(37028),Kv=h.n(Zv),Jv=h(89185),Qv=h.n(Jv),eb=h(34652),tb=h.n(eb),nb=h(49252),ob=h.n(nb),ib=h(93414),rb=h.n(ib),sb=h(68522),ab=h.n(sb),lb=h(7174),cb=h.n(lb),db=h(74815),ub=h.n(db),pb=h(24874),hb=h.n(pb),fb={};function mb(){}mb.prototype.resolveRule=function(e,t){const n=fb[e+"/"+t];if(!n)throw new Error("cannot resolve rule <"+e+"/"+t+">");return n},mb.prototype.resolveConfig=function(e,t){throw new Error("cannot resolve config <"+t+"> in <"+e+">")};var gb=new mb,vb={"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"},bb={rules:vb},yb={resolver:gb,config:bb},wb=yb;function xb(e,t,n,o,i,r,s){var a={allowDrop:!1,poolTarget:null};if(!Ab(e,t,s))return a.allowDrop=!1,a;if(Sb(n.type))return a.allowDrop=!0,a;if(Mb(n.bpmnType)){var l=i.findModelsFromPoint(_b(e,t,o)).sort((function(e,t){return t.get("z")-e.get("z")}))[0];return a.allowDrop=lr(n.type,l),a}if(Eb(r))return a.allowDrop=!0,a;if(kb(n.bpmnType))return a.allowDrop=!0,a;var c=Cb(e,t,o,i);return c&&(a.allowDrop=!0,a.poolTarget=c),a}function kb(e){return"bpmn:TextAnnotation"===e}function Cb(e,t,n,o){return o.findModelsFromPoint(_b(e,t,n)).find((function(e){var t=e.component;return t&&t.node.type===Ai}))}function Sb(e){return e===Ai}function Eb(e){return!e||0===e.get("participants").length}function Ab(e,t,n){var o=n.getBoundingClientRect(),i=o.left,r=o.top,s=o.width,l=o.height,c=new a.g.rect(i,r,s,l),d=new a.g.Point(e,t);return c.containsPoint(d)}function Mb(e){return"bpmn:BoundaryEvent"===e}function _b(e,t,n){return n.clientToLocalPoint({x:e,y:t})}fb["bpmnlint/conditional-flows"]=Iv(),fb["bpmnlint/end-event-required"]=Rv(),fb["bpmnlint/event-sub-process-typed-start-event"]=Lv(),fb["bpmnlint/label-required"]=Fv(),fb["bpmnlint/no-complex-gateway"]=qv(),fb["bpmnlint/no-disconnected"]=Vv(),fb["bpmnlint/no-gateway-join-fork"]=Gv(),fb["bpmnlint/no-implicit-split"]=$v(),fb["bpmnlint/single-event-definition"]=Yv(),fb["bpmnlint/start-event-required"]=Kv(),fb["bpmnlint/sub-process-blank-start-event"]=Qv(),fb["bpmnlint/superfluous-gateway"]=tb(),fb["bpmnlint-plugin-processmaker/custom-validation"]=ob(),fb["bpmnlint-plugin-processmaker/gateway-direction"]=rb(),fb["bpmnlint-plugin-processmaker/event-based-gateway"]=ab(),fb["bpmnlint-plugin-processmaker/call-activity-child-process"]=cb(),fb["bpmnlint-plugin-processmaker/id-required"]=ub(),fb["bpmnlint-plugin-processmaker/signal-ref-required"]=hb();var Tb,Pb,Ob,Db,Ib,Nb,Rb,Bb,Lb,jb,Fb,zb,qb=h(7407),Hb=h.n(qb),Vb={extends:hg,mixins:[Ma],data:function(){return{nodeIcon:Hb()}}},Ub=Vb,Gb=qn(Ub,Tb,Pb,!1,null,null,null),Wb=Gb.exports,$b="processmaker-modeler-boundary-error-event",Xb=Ia()(Ho()(fg),{id:$b,component:Wb,control:!1,label:"Boundary Error Event",icon:h(43634),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Error Event"),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorConfig:[{items:[{items:[{}]},ya,da]}]}),Yb={extends:hg,mixins:[Ma],data:function(){return{nodeIcon:Ip()}},mounted:function(){this.shape.attr({image:{"ref-x":4,"ref-y":4,width:18,height:18}})}},Zb=Yb,Kb=qn(Zb,Ob,Db,!1,null,null,null),Jb=Kb.exports,Qb={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"}},ey=Qb,ty="processmaker-modeler-boundary-conditional-event",ny=Ia()(Ho()(fg),Mo(Mo({},Fp),{},{id:ty,component:Jb,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(m(jp()),[ey])},da,ya]}]})),oy=h.p+"img/boundary-escalation-icon.c999a95e.svg",iy={extends:hg,mounted:function(){this.shape.attr("image/xlink:href",oy)},methods:{isValidBoundaryEventTarget:function(e){return cr(e.component)}}},ry=iy,sy=qn(ry,Ib,Nb,!1,null,null,null),ay=sy.exports,ly="processmaker-modeler-boundary-escalation-event",cy=Ia()(Ho()(fg),{id:ly,component:ay,control:!1,label:"Boundary Escalation Event",icon:h(62442),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Escalation Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:EscalationEventDefinition")]})},inspectorConfig:[{items:[{items:[{},ey]},ya,da]}]}),dy=h(81146),uy=h.n(dy),py={extends:hg,mixins:[Ma],data:function(){return{nodeIcon:uy()}},methods:{isValidBoundaryEventTarget:function(e){var t=e.component;return t&&t.node.isBpmnType("bpmn:CallActivity")}},mounted:function(){var e=qu();this.shape.attr(e)}},hy=py,fy=qn(hy,Rb,Bb,!1,null,null,null),my=fy.exports,gy="processmaker-modeler-boundary-message-event",vy=Ia()(Ho()(fg),Mo(Mo({},fc),{},{id:gy,component:my,control:!1,label:"Boundary Message Event",icon:h(52018),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Message Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},ey,uc("Message that will trigger this boundary event")]},ya,da]}]})),by=h(16221),yy=h.n(by),wy={extends:hg,mixins:[Ma],data:function(){return{nodeIcon:yy()}},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}})}},xy=wy,ky=qn(xy,Lb,jb,!1,null,null,null),Cy=ky.exports,Sy="processmaker-modeler-boundary-signal-event",Ey=Ia()(Ho()(fg),Mo(Mo({},Pc),{},{id:Sy,component:Cy,control:!1,label:"Boundary Signal Event",icon:h(34070),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Signal Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},ey,Tc("Signal that will trigger this boundary event")]},ya,da]}]})),Ay=h(50889),My=h.n(Ay),_y={extends:hg,mixins:[Ma],data:function(){return{nodeIcon:My()}},methods:{addTimerEventDefinitionId:function(){var e="".concat(this.id,"_timer_event_definition");this.node.definition.get("eventDefinitions")[0].id=e}},mounted:function(){this.addTimerEventDefinitionId()}},Ty=_y,Py=qn(Ty,Fb,zb,!1,null,null,null),Oy=Py.exports,Dy="processmaker-modeler-boundary-timer-event",Iy=Ia()(Ho()(fg),{id:Dy,component:Oy,control:!1,label:"Boundary Timer Event",icon:h(99400),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:Iu})})]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],s=i[0][r].body;e[o]={type:r,body:s}}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 s=e[r],a=s.type,l=s.body,c=i.get(r)[0][a];if(c&&c.body===l)continue;var d=Te({},a,o.create("bpmn:Expression",{body:l})),u=[o.create("bpmn:TimerEventDefinition",d)];u[0].id=t.definition.get("eventDefinitions")[0].id,n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{items:[{items:[{},ey]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-boundary-timer-event"},items:[{component:ju,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},da,ya]}]});function Ny(e,t,n){var o=Rh(e,t,"set");return zh(e,o,n),n}var Ry=new WeakMap,By=function(){function e(t){_o(this,e),Ih(this,Ry,{writable:!0,value:void 0}),Te(this,"preventTranslate",!1),Ny(this,Ry,t)}return Po(e,[{key:"paper",get:function(){return Bh(this,Ry)}},{key:"scale",get:function(){return Bh(this,Ry).scale()},set:function(e){Bh(this,Ry).scale(e),Bh(this,Ry).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||(Bh(this,Ry).translate(e,t),Bh(this,Ry).trigger("translate:changed"))}},{key:"addEventHandler",value:function(e,t,n){Bh(this,Ry).on(e,t,n)}},{key:"addOnceHandler",value:function(e,t){Bh(this,Ry).once(e,t)}},{key:"removeEventHandler",value:function(e,t,n){Bh(this,Ry).off(e,t,n)}},{key:"setPaperDimensions",value:function(e,t){Bh(this,Ry).setDimensions(e,t)}},{key:"performAtomicAction",value:function(){var e=y(v().mark((function e(t){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Bh(this,Ry).freeze(),e.next=3,t(Bh(this,Ry));case 3:Bh(this,Ry).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=Bh(this,Ry).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:fe})}},{key:"setStateValid",value:function(){this.paper.drawBackground({color:me})}},{key:"awaitScheduledUpdates",value:function(){var e=this;return Bh(this,Ry)._updates.priorities.some((function(e){return!a.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 a.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 Ly(e,t,n){var o=zy(e,t,n);Fy(o,t),e.inspectorConfig[0].items.sort(jy)}function jy(e,t){return qy(e)?1:qy(t)?-1:0}function Fy(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 zy(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 qy(e){return e.config&&"Advanced"===e.config.label}function Hy(e,t){Xy(e)&&Uy(e);var n=$y(e);n&&Uy(n),Vy(e)&&!Xy(e)&&Gy(e),Wy(t)}function Vy(e){return e.component.node.type!==Bl}function Uy(e){Gy(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===Bl})),o=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type!==Bl}));n.forEach(Gy),o.forEach(Gy)}}function Gy(e){e.toFront({deep:!0})}function Wy(e){e.getLinks().forEach(Gy)}function $y(e){return e.component.node.pool}function Xy(e){return e.component.node.type===Ai}Te(By,"gridSize",Xp);var Yy=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,players:e.players}},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.combinedMenuActions,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)])},Zy=[],Ky=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()])},Jy=[function(){var e=this,t=e._self._c;return t("li",{staticClass:"breadcrumb-item"},[t("a",{attrs:{href:"/"}},[t("i",{staticClass:"fas fa-home"})])])}],Qy={name:"breadcrumb",props:{breadcrumbData:{type:Array,default:function(){return[]}}}},ew=Qy,tw=(h(61573),qn(ew,Ky,Jy,!1,null,"d1e148b4",null)),nw=tw.exports,ow=function(){var e=this,t=e._self._c;return t("div",{staticClass:"top-rail-container"},[t("MultiplayerViewUsers",{attrs:{players:e.players}}),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)},iw=[],rw=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)},sw=[],aw={components:{InlineSvg:Jg},data:function(){return{isOpen:!1,validateCloseIcon:h(13828),validateOpenIcon:h(78540)}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openIssue",this.isOpen)}},mounted:function(){var e=this;window.ProcessMaker.EventBus.$on("save-changes-activate-autovalidate",(function(){e.handleOpen()}))}},lw=aw,cw=(h(70947),qn(lw,rw,sw,!1,null,"5880bbc6",null)),dw=cw.exports,uw=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)])},pw=[],hw={components:{InlineSvg:Jg},props:{numberOfErrors:{type:Number,required:!0}},data:function(){return{isOpen:!1,issueCloseIcon:h(61339),issueOpenIcon:h(68058)}},watch:{numberOfErrors:function(e){0===e&&(this.isOpen=!1)}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openPanel",this.isOpen)}}},fw=hw,mw=(h(59724),qn(fw,uw,pw,!1,null,"337583fe",null)),gw=mw.exports,vw=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)},bw=[],yw={components:{VueInlineSvg:Jg},props:{errorList:{type:Array,required:!0},warnings:{type:Array,required:!0}},data:function(){return{issueIcon:h(4298)}}},ww=yw,xw=(h(95254),qn(ww,vw,bw,!1,null,"0722e36d",null)),kw=xw.exports,Cw=function(){var e=this,t=e._self._c;return t("b-avatar-group",{staticClass:"container"},[e._l(e.players,(function(e){return[t("Avatar",{key:e.key,attrs:{badgeBackgroundColor:e.color,imgSrc:e.imgSrc,userName:e.name}})]}))],2)},Sw=[],Ew=function(){var e=this,t=e._self._c;return t("span",{staticClass:"b-avatar rounded-circle",style:{backgroundColor:e.generateColorHsl(e.userName,e.saturationRange,e.lightnessRange)}},[e.imgSrc?t("span",{staticClass:"b-avatar-img"},[t("img",{attrs:{src:e.imgSrc,alt:e.userName}})]):t("span",{staticClass:"b-avatar-text avatar-initials"},[t("span",[e._v(" "+e._s(this.getInitials(e.userName))+" ")])]),t("span",{staticClass:"b-avatar-badge badge-danger",style:{bottom:"0px",right:"0px",backgroundColor:e.badgeBackgroundColor}})])},Aw=[],Mw={props:{badgeBackgroundColor:{type:String,required:!1},imgSrc:{type:String,required:!1},userName:{type:String,required:!1}},data:function(){return{saturation:50,lightness:50,range:10}},computed:{saturationRange:function(){return this.getRange(this.saturation,this.range)},lightnessRange:function(){return this.getRange(this.lightness,this.range)}},methods:{getInitials:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.split(" "),n=t[0].charAt(0).toUpperCase(),o=t[t.length-1].charAt(0).toUpperCase();return"".concat(n).concat(o)},getHashOfString:function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return t=Math.abs(t),t},getRange:function(e,t){return[Math.max(0,e-t),Math.min(e+t,100)]},normalizeHash:function(e,t,n){return Math.floor(e%(n-t)+t)},generateHSL:function(e,t,n){var o=this.getHashOfString(e),i=this.normalizeHash(o,0,360),r=this.normalizeHash(o,t[0],t[1]),s=this.normalizeHash(o,n[0],n[1]);return[i,r,s]},HSLtoString:function(e){return"hsl(".concat(e[0],", ").concat(e[1],"%, ").concat(e[2],"%)")},generateColorHsl:function(e,t,n){return this.HSLtoString(this.generateHSL(e,t,n))}}},_w=Mw,Tw=(h(4913),qn(_w,Ew,Aw,!1,null,"1c50a604",null)),Pw=Tw.exports,Ow={components:{Avatar:Pw},props:{players:{type:Array,required:!0}}},Dw=Ow,Iw=qn(Dw,Cw,Sw,!1,null,null,null),Nw=Iw.exports,Rw={components:{ValidateButton:dw,ValidateIssue:gw,ValidatePanel:kw,MultiplayerViewUsers:Nw},props:{validationErrors:{type:Object,required:!0},warnings:{type:Array,required:!0},players:{type:Array,required:!1}},data:function(){return{isOpenIssue:!1,isOpenPanel:!1}},computed:{errorList:function(){return Object.entries(this.validationErrors).flatMap((function(e){var t=mt(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return Mo(Mo({},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,bn.commit("setAutoValidate",this.isOpenIssue)},handleOpenPanel:function(e){this.isOpenPanel=e}}},Bw=Rw,Lw=(h(53713),qn(Bw,ow,iw,!1,null,"f6aad76c",null)),jw=Lw.exports,Fw={name:"tool-bar",components:{Breadcrumb:nw,TopRail:jw,FontAwesomeIcon:ii.FontAwesomeIcon},props:["canvasDragPosition","cursor","paperManager","isRendering","breadcrumbData","panelsCompressed","validationErrors","warnings","xmlManager","validationBar","players","extraActions"],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:{combinedMenuActions:function(){return this.extraActions?this.ellipsisMenuActions.concat(this.extraActions):this.ellipsisMenuActions},canUndo:function(){return Pv.getters.canUndo},canRedo:function(){return Pv.getters.canRedo},versionStatus:function(){var e=Pv.getters.isDraft?"Draft":"Published";return this.$t(e)},isVersionsInstalled:function(){return Pv.getters.isVersionsInstalled},isLoading:function(){return Pv.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:Rr.faPlus,minusIcon:Rr.faMinus,scale:1,initialScale:1,minimumScale:.2,scaleStep:.1,mapIcon:Rr.faMapMarked,miniMapOpen:!1,compressIcon:Rr.faCompress,expandIcon:Rr.faExpand,undoIcon:Rr.faUndo,redoIcon:Rr.faRedo,saveIcon:Rr.faSave,savedIcon:Rr.faCheckCircle,spinner:Rr.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||Pv.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Pv.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:this.$emit("action",e)}},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)}},zw=Fw,qw=(h(91503),qn(zw,Yy,Zy,!1,null,null,null)),Hw=qw.exports;function Vw(e,t){var n=function(e){return e.isBpmnType("bpmn:MessageFlow",to,ro)||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 Uw={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)}}},Gw={methods:{copyPasteHandler:function(e,t){var n=e.target.nodeName.toLowerCase(),o="body"===n,i=e.key.toLowerCase(),r="c"===i,s="v"===i;o&&r&&t.mod&&this.copy(e),o&&s&&t.mod&&this.paste(e)},copy:function(e){e.preventDefault(),window.ProcessMaker.$modeler.copyElement()},paste:function(e){e.preventDefault(),window.ProcessMaker.$modeler.pasteElements()}}},Ww=(h(51532),By.gridSize/2),$w=new Map;$w.set("Up",[0,-Ww]),$w.set("Down",[0,Ww]),$w.set("Left",[-Ww,0]),$w.set("Right",[Ww,0]);var Xw=["PoolLane","processmaker.components.nodes.boundaryEvent.Shape"];function Yw(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(Zw(e)){var o=t.filter(Kw);if(0!==o.length){var i=Jw(e),r=mt(i,2),s=r[0],a=r[1];o.forEach((function(e){e.translate(s,a,{movedWithArrowKeys:!0}),ex(e)})),n()}}}function Zw(e){var t=["up","down","left","right"];return t.some((function(t){return e.toLowerCase().includes(t)}))}function Kw(e){return e&&!Xw.includes(e.get("type"))}function Jw(e){var t=e.match(/^(?:Arrow)?(Up|Down|Left|Right)$/);return null!==t?$w.get(t[1]):[0,0]}function Qw(e){return!e||"processmaker.modeler.bpmn.pool"!==e.get("type")}function ex(e){var t=e.getParentCell();Qw(t)||(t.component.expandToFitElement(e,t),t.component.laneSet&&t.component.updateLaneChildren())}var tx={methods:{escapeKeyHandler:function(e){this.selectedNode&&(e.preventDefault(),window.ProcessMaker.EventBus.$emit("custom-pointerclick",e))}},computed:{selectedNode:function(){return wg.getters.getSelectedNode},movedElement:function(){return wg.getters.getGhostNode}}},nx={mixins:[Uw,Gw,tx],computed:{clientLeftPaper:function(){return bn.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(ka){console.error(ka)}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)}))),Yw(e.key,bn.getters.highlightedShapes,this.pushToUndoStack))}}};h(74819);function ox(e,t){while(!Object.prototype.hasOwnProperty.call(e,t))if(e=xi(e),null===e)break;return e}function ix(){return ix="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=ox(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},ix.apply(this,arguments)}var rx,sx=function(e){wi(n,e);var t=Ei(n);function n(){return _o(this,n),t.apply(this,arguments)}return Po(n,[{key:"clone",value:function(e,t,o){return this.withTimerKeys(ix(xi(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}(Vo);function ax(e){return lx.apply(this,arguments)}function lx(){return lx=y(v().mark((function e(t){var n,o,i;return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=cx(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(rx),i.click(),e.next=10,dx();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)}))),lx.apply(this,arguments)}function cx(e){if(e.selectors)return e.selectors.label||Array.from(e.selectors.root.children).find((function(e){return e.classList.contains("labels")}))}function dx(){return new Promise((function(e){rx=setTimeout(e)}))}Te(sx,"timerPropertyKeys",["timeDuration","timeDate","timeCycle"]);var ux=h(93162),px=h.n(ux),hx=new WeakMap,fx=new WeakMap,mx=function(){function e(t){_o(this,e),Ih(this,hx,{writable:!0,value:void 0}),Ih(this,fx,{writable:!0,value:void 0}),Ny(this,hx,t)}return Po(e,[{key:"definitions",set:function(e){Ny(this,fx,e)}},{key:"getDefinitionsFromXml",value:function(e){var t=this;return new Promise((function(n,o){Bh(t,hx).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(){Bh(this,fx)&&Bh(this,hx).toXML(Bh(this,fx),{format:!0},(function(e,t){if(e)alert(e);else{if(es())return void(window.xml=t);var n=new File([t],"bpmnProcess.xml",{type:"text/xml"});px().saveAs(n)}}))}}]),e}();function gx(e){return e.isStartEvent()?Do:e.isTask()?Bo:e.isGateway()?jo:e.isIntermediateEvent()?zo:e.isEndEvent()?No:null}function vx(e){if(!e)return!1;var t=gx(e);return!t||!Object.values(t).includes(e.definition.name)}function bx(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 yx(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(m(n),m(o))}var wx=function(){function e(t,n,o,i,r,s){_o(this,e),this._nodeThatWillBeReplaced=t,this._definition=n,this._graph=o,this._newNode=i,this._processes=r,this._collaboration=s}return Po(e,[{key:"migrate",value:function(){var e,t,n=this;vx(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,m(i)),(t=this._definition.get("outgoing")).push.apply(t,m(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 s=bx(this._nodeThatWillBeReplaced,this._processes);if(s.forEach((function(e){e.set("targetRef",n._newNode.definition),o(e)})),this._collaboration){var a=this._collaboration.get("messageFlows");a.filter((function(e){return e.sourceRef===n._nodeThatWillBeReplaced.definition})).forEach((function(e){e.set("sourceRef",n._newNode.definition),o(e)})),a.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}(),xx=["bpmn:ServiceTask","bpmn:ManualTask","bpmn:CallActivity","bpmn:ScriptTask"],kx=function(e){if(-1!==xx.indexOf(e.bpmnType)){e.inspectorConfig[0].items.splice(e.loopInspectorIndex||1,0,ef);var t=e.inspectorHandler||function(){},n=e.inspectorData||null;e.inspectorHandler=function(e,n,o,i,r,s){t(e,n,o,i,r,s),e=Jh(e,n,o,i,r),s(e)},e.inspectorData=function(e,t,o){var i=n?n(e,t,o):t(e);return Qh(i,e,t,o),i}}},Cx={methods:{cloneNodesSelection:function(){var e=this,t=[],n=[],o=[],i=[],r=[],s=this.highlightedNodes,a=this.$refs.selector.$el,l=[Hl,Bl,us,Kl,Uo],c=[io],d=[eo];return"function"===typeof a.getBoundingClientRect&&s.forEach((function(s){if(l.includes(s.type)){var a=e.cloneFlowAndSetNewId(s);n.push(a),t.push(a)}else if(c.includes(s.type)){var u=e.cloneFlowAndSetNewId(s);i.push(u),t.push(u)}else if(d.includes(s.type)){var p=e.cloneFlowAndSetNewId(s);r.push(p),t.push(p)}else{var h=e.cloneElementAndCalculateOffset(s);s.definition&&"bpmn:BoundaryEvent"!==s.definition.$type?t.push(h):o.push(h)}})),t=[].concat(m(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 vo(t,this)}if("bpmn:DataInputAssociation"===e.targetRef.$type){var n=e.targetRef.$parent;return vo(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,s=o/r;return t.diagram.bounds.y+=s,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,s=t.find((function(e){return e.cloneOf===i.id})),a=t.find((function(e){return e.cloneOf===r.id}));if(s&&a){e.definition.set("sourceRef",s.definition),e.definition.set("targetRef",a.definition),s.definition.outgoing?s.definition.outgoing.push(e.definition):s.definition.set("outgoing",[e.definition]),a.definition.incoming?a.definition.incoming.push(e.definition):a.definition.set("incoming",[e.definition]);var l=n.$refs.selector.$el.getBoundingClientRect(),c=l.height,d=n.paper.scale(),u=d.sy,p=c/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})),s=n.getDataInputOutputAssociationTargetRef(o.definition),a=t.find((function(e){return e.cloneOf===s.id})),l=go(n.moddle,a,r.definition);e.definition.set("sourceRef",[r.definition]),e.definition.set("targetRef",l),a.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,s=t.find((function(e){return e.cloneOf===i.id})),a=t.find((function(e){return e.cloneOf===r.id}));e.definition.set("targetRef",a.definition),e.definition.set("sourceRef",s.definition);var l=s.definition.get("dataOutputAssociations")||[];s.definition.set("dataOutputAssociations",[].concat(m(l),[e.definition]))}))}}},Sx=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",{class:{"hidden-opacity":!1===e.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)])},Ex=[],Ax=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)},Mx=[],_x=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"})])},Tx=[],Px=new WeakMap,Ox=function(){function e(t){_o(this,e),Ih(this,Px,{writable:!0,value:void 0}),Ny(this,Px,t)}return Po(e,[{key:"miniMap",get:function(){return Bh(this,Px)}},{key:"scaleMiniMap",value:function(){this.miniMap.scaleContentToFit({padding:10,maxScaleX:.5,maxScaleY:.5})}},{key:"calculateNewPaperPosition",value:function(e,t,n,o,i,r){var s=this.miniMap.paperToLocalPoint(e,t),a=s.x,l=s.y;return{newX:i/2-a*n,newY:r/2-l*o}}}],[{key:"factory",value:function(e,t){var n=new a.dia.Paper({el:t,model:e,width:230,height:200,interactive:!1});return new this(n)}}]),e}(),Dx={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,s=this.paperManager.paper.el,a=s.clientWidth,l=s.clientHeight,c=this.miniMapManager.calculateNewPaperPosition(t,n,i,r,a,l),d=c.newX,u=c.newY;this.newX=d,this.newY=u,this.paperManager.translate(this.newX,this.newY)}},mounted:function(){var e=this;return y(v().mark((function t(){return v().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=Ox.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)}},Ix=Dx,Nx=(h(63564),qn(Ix,_x,Tx,!1,null,"76e95759",null)),Rx=Nx.exports,Bx={components:{InlineSvg:Jg,MiniPaper:Rx},props:{paperManager:Object,graph:Object},data:function(){return{miniMapOpen:!1,miniMapIcon:h(65759)}}},Lx=Bx,jx=(h(71776),qn(Lx,Ax,Mx,!1,null,"7f06057f",null)),Fx=jx.exports,zx=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)])},qx=[],Hx={components:{InlineSvg:Jg},props:{paperManager:Object},data:function(){return{initialScale:1,minimumScale:.2,scaleStep:.1,minusIcon:h(22044),plusIcon:h(29943)}},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}}},Vx=Hx,Ux=(h(5365),qn(Vx,zx,qx,!1,null,"576edbd4",null)),Gx=Ux.exports,Wx=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)])},$x=[],Xx={components:{InlineSvg:Jg},props:{isRendering:{type:Boolean}},data:function(){return{undoIcon:h(28994),redoIcon:h(45617)}},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 Pv.getters.canUndo},canRedo:function(){return Pv.getters.canRedo}},methods:{undo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Pv.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||Pv.dispatch("redo").then((function(){return e.$emit("load-xml")}))}}},Yx=Xx,Zx=(h(81935),qn(Yx,Wx,$x,!1,null,"379ae012",null)),Kx=Zx.exports,Jx=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()},Qx=[],ek=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)},tk=[],nk=h(95951),ok=h.n(nk),ik=(h(44301),{props:{data:{type:Object},selectedItem:{type:String},popperType:{type:String}},components:{Popper:ok(),InlineSvg:Jg},data:function(){return{wasClickedSubmenu:!1,element:null,wasClicked:!1}},methods:{onClickHandler:function(e,t){e.stopPropagation(),this.$emit("clickToSubmenu",{event:e,control:t})}}}),rk=ik,sk=(h(19366),qn(rk,ek,tk,!1,null,"acf58eca",null)),ak=sk.exports,lk={components:{SubmenuPopper:ak,InlineSvg:Jg},props:{nodeTypes:Array},mixins:[Og],data:function(){return{plusIcon:h(29943),currentType:null}},created:function(){wg.dispatch("getUserPinnedObjects")},computed:{controls:function(){return wg.getters.getPinnedNodeTypes},explorerOpen:function(){return wg.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,wg.commit("toggleExplorer"),wg.commit("clearFilteredNodes"),wg.commit("clearFilteredPmBlockNodes")}}},ck=lk,dk=(h(33422),qn(ck,Jx,Qx,!1,null,"0e6b16b8",null)),uk=dk.exports,pk={components:{MiniPaperControl:Fx,ZoomControl:Gx,UndoRedoControl:Kx,Controls:uk},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),s=window.getComputedStyle(this.$refs.railLeftBox),a=parseInt(s.paddingLeft,10)+parseInt(s.paddingRight,10),l=this.leftOverlapUndoRedo+(this.widthOverlapControl-t.width)-r-a;l>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 bn.getters.showComponent}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,gt.nextTick)();case 2:e.controlObserver.observe(e.$refs.controlBox.$el);case 3:case"end":return t.stop()}}),t)})))()}},hk=pk,fk=(h(44697),qn(hk,Sx,Ex,!1,null,"5393ebfe",null)),mk=fk.exports,gk=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))},vk=[],bk=function(e){wi(n,e);var t=Ei(n);function n(){return _o(this,n),t.apply(this,arguments)}return Po(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=oo(this.moddle),r=no(this.moddle);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var s=n.sourceAnchor,a=n.targetAnchor;i.waypoint=[s,a].map((function(e){return o.moddle.create("dc:Point",e)}));var l=new Vo(eo,r,i);l.dataAssociationProps={sourceShape:e,targetCoords:{x:void 0,y:void 0}};var c=x()(e,"component.node"),d=c.definition.get("dataOutputAssociations")||[];return c.definition.set("dataOutputAssociations",[].concat(m(d),[l.definition])),l}}],[{key:"isValid",value:function(e){var t=e.sourceShape,n=e.targetShape,o=x()(t,"component.node"),i=x()(n,"component.node");if(!i)return!1;var r=["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"],a=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateCatchEvent","bpmn:StartEvent"],l=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],c=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||!s.includes(d))||(!(!p||!l.includes(d))||(!(!h||!r.includes(c))||f&&a.includes(c)))}},{key:"isValidSourceNode",value:function(e){return!_i.isNodeDisallowedFromDataAssociation(e)}}]),n}(_i),yk=[bk,Ll,Wl],wk={name:Uo,components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Tn],data:function(){return{shape:null}},computed:{isValidConnection:function(){var e=this;return yk.some((function(t){return t.isValid({sourceShape:e.sourceShape,targetShape:e.target,sourceConfig:e.sourceConfig,targetConfig:e.targetConfig})}))},targetType:function(){return x()(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=yk.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:x()(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 a.shapes.standard.Link,this.shape.connector("rounded",{radius:5}),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},xk=wk,kk=qn(xk,gk,vk,!1,null,null,null),Ck=kk.exports,Sk=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()},Ek=[],Ak=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()},Mk=[],_k=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()},Tk=[],Pk=function(e){return e.position().y+e.size().height},Ok=function(e){return e.position().x},Dk=function(e){return e.position().x+e.size().width/2},Ik=function(e){return e.position().y+e.size().height/2},Nk=function(e){return e.position().x+e.size().width},Rk=function(e){return e.position().y},Bk=function(e){return Boolean(e&&e.position&&e.size)},Lk={poolLane:"PoolLane",boundaryEvent:"processmaker.components.nodes.boundaryEvent.Shape"},jk=[Lk.boundaryEvent,Lk.poolLane],Fk=function(e){return!jk.includes(e.get("type"))};function zk(e){return Bk(e)&&Fk(e)}function qk(e,t){var n=t-Pk(e);e.translate(0,n)}function Hk(e,t){var n=t-Ok(e);e.translate(n,0)}function Vk(e,t){var n=t-Nk(e);e.translate(n,0)}function Uk(e,t){var n=t-Dk(e);e.translate(n,0)}function Gk(e,t){var n=t-Ik(e);e.translate(0,n)}function Wk(e,t){var n=t-Rk(e);e.translate(0,n)}function $k(e){var t=tC(e);e.forEach((function(e){Hk(e,t.left)}))}function Xk(e){var t=tC(e);e.forEach((function(e){Vk(e,t.right)}))}function Yk(e){var t=tC(e);e.forEach((function(e){Wk(e,t.top)}))}function Zk(e){var t=tC(e);e.forEach((function(e){qk(e,t.bottom)}))}function Kk(e){var t=tC(e);e.forEach((function(e){Uk(e,t.hMiddle)}))}function Jk(e){var t=tC(e);e.forEach((function(e){Gk(e,t.vMiddle)}))}function Qk(e){var t=tC(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 Ik(e)-Ik(t)})),s=t.top+e[0].size().height,a=(t.height-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(Wk(e,s+a),s+=a+e.size().height)}))}}function eC(e){var t=tC(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 Dk(e)-Dk(t)})),s=t.left+e[0].size().width,a=(t.width-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(Hk(e,s+a),s+=a+e.size().width)}))}}function tC(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 Bk(e)?e.position().x:0},n=function(e){return Bk(e)?e.position().x+e.size().width:0},o=function(e){return Bk(e)?e.position().y:0},i=function(e){return Bk(e)?e.position().y+e.size().height:0},r=Math.min.apply(Math,m(e.map(t))),s=Math.max.apply(Math,m(e.map(n))),a=Math.min.apply(Math,m(e.map(o))),l=Math.max.apply(Math,m(e.map(i))),c=s-r,d=l-a;return{left:r,right:s,top:a,bottom:l,width:c,height:d,vMiddle:a+d/2,hMiddle:r+c/2}}function nC(e){var t=e.filter((function(e){return zk(e)})),n=tC(e),o=t.length>1;return{can:{align:{left:o&&t.some((function(e){return Ok(e)!==n.left})),horizontalCenter:o&&t.some((function(e){return Dk(e)!==n.hMiddle})),right:o&&t.some((function(e){return Nk(e)!==n.right})),bottom:o&&t.some((function(e){return Pk(e)!==n.bottom})),verticalCenter:o&&t.some((function(e){return Ik(e)!==n.vMiddle})),top:o&&t.some((function(e){return Rk(e)!==n.top}))},distribute:{horizontally:o&&t.length>2,vertically:o&&t.length>2}},align:{left:function(){return $k(t)},horizontalCenter:function(){return Kk(t)},right:function(){return Xk(t)},bottom:function(){return Zk(t)},verticalCenter:function(){return Jk(t)},top:function(){return Yk(t)}},distribute:{horizontally:function(){return eC(t)},vertically:function(){return Qk(t)}}}}var oC,iC,rC,sC,aC={components:{FontAwesomeIcon:ii.FontAwesomeIcon},props:{paper:Object,hasPools:Boolean},data:function(){return{runningInCypressTest:es(),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),Go.library.add(Qo),Go.library.add(Jo),Go.library.add(ei),Go.library.add(ti),Go.library.add(Ko),Go.library.add(Zo),Go.library.add(oi),Go.library.add(ni)},watch:{selectedShapes:function(){this.$root.$emit("bv::hide::tooltip")}},computed:{selectedShapes:function(){return this.disableButtons(),nC(bn.getters.highlightedShapes)},isMultiSelect:function(){var e=bn.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return bn.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=nC(bn.getters.highlightedShapes);this.buttons.forEach((function(t){t.disabled=!(0,Jn.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,bn.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 y(v().mark((function t(){return v().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)})))()}},lC=aC,cC=(h(81856),h(69100),qn(lC,_k,Tk,!1,null,"46e3ac40",null)),dC=cC.exports,uC={props:{paper:Object,hasPools:Boolean},components:{crownAlign:dC,FontAwesomeIcon:ii.FontAwesomeIcon},data:function(){return{showAlignmentButtons:!1,runningInCypressTest:es(),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),Go.library.add(Jo)},computed:{isMultiSelect:function(){var e=bn.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return bn.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,bn.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 y(v().mark((function t(){return v().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)})))()}},pC=uC,hC=(h(6718),qn(pC,Ak,Mk,!1,null,"bcd827ec",null)),fC=hC.exports,mC={name:"Selection",components:{CrownMultiselect:fC},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:[Bl],selectionBlackList:[Uo],selectableBlackList:[Uo],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===Ai||e.model.component.node.type===Bl}))}},watch:{selected:function(e){this.prepareConectedLinks(e),this.addToHighlightedNodes(e)}},methods:{selectElements:function(e){var t=this;return y(v().mark((function n(){return v().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 y(v().mark((function o(){var i;return v().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===bn.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===Ai}));o&&e.model.component.node.type!==Ai?this.selected=[e]:e.model.component&&e.model.component.node.type===Ai?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=a.util.normalizeEvent(e),o=n.clientX,i=n.clientY,r=n.offsetX,s=n.offsetY,l=t.$el.offset();this.clearSelection(),this.isSelecting=!0,this.showLasso=!0,this.start={x:o-l.left+window.pageXOffset+t.$el.scrollLeft(),y:i-l.top+window.pageYOffset+t.$el.scrollTop()},this._offset={x:r,y:s}},updateSelection:function(e){var t=this.paperManager.paper;if(this.isSelecting&&!this.isSelected&&this.start){var n=a.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=(0,a.V)(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var s=e.scale();o/=s.sx,i/=s.sy;var l=a.g.rect(r.x,r.y,o,i);this.selected=this.getElementsInSelectedArea(l,{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===Ai){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(m(o),m(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,s=["PoolLane","standard.Link"];return e.filter((function(e){return n||!s.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=[Hl,eo,io,us,Kl],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===Ai}));return t&&e.length===t.length},startDrag:function(e){if(this.$refs.drag){this.stopForceMove=!1,this.dragging=!0,this.hasMouseMoved=!1;var t=a.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=a.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 y(v().mark((function t(){return v().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(m(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=a.util.normalizeEvent(e),n=t.clientX,o=t.clientY,i=(0,a.V)(this.paperManager.paper.viewport).toLocalPoint(n,o);return this.paperManager.paper.findViewsFromPoint(i)},addToHighlightedNodes:function(e){if(bn.commit("highlightNode"),e.length>0){var t=e.filter((function(e){return e.model.component})).map((function(e){return e.model.component.node}));bn.commit("addToHighlightedNodes",t)}else bn.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!==Bl&&(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=(0,a.V)(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var s=e.scale();o/=s.sx,i/=s.sy;var l=a.g.rect(r.x,r.y,o,i);return this.getElementsInSelectedArea(l,{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===Ai&&(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===Ai})),n=e.find((function(e){var t=e.model;return t.getParentCell()&&t.getParentCell().component.node.type===Ai}));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===Ai}));this.newPool=null,this.oldPool=null,o?(this.paperManager.setStateValid(),this.invalidPool&&(this.invalidPool.model.component.shape.attr("body/fill",Ce),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",fe),bn.commit("preventSavingElementPosition")))):(this.isOutOfThePool=!0,bn.commit("preventSavingElementPosition"),this.paperManager.setStateInvalid())}},overPoolStopDrag:function(){var e=this;return y(v().mark((function t(){return v().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",Ce),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 y(v().mark((function t(){var n,o,i,r;return v().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,bn.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===Ai})).model.getParentCell(),n=this.getSelectionVertex(this.selected,!0),o=t.getBBox(),i=o.x,r=o.y,s=o.width,a=o.height,l=n.maxX-n.minX,c=n.maxY-n.minY,d=n.minX-i,u=n.minY-r,p=d+l,h=d,f=u,m=u+c,g=0,v=0,b="bottom",y="right";p>s-Jf&&(g=p+Jf),h<Yf+Jf&&(g=s+(Yf+Jf-h),y="left"),f<Jf&&(v=Jf-f+a,b="top"),m>a&&(v=m+Jf),(g||v)&&(t.resize(Math.max(g,s),Math.max(v,a),{direction:"".concat(b,"-").concat(y)}),t.component.fixResizeRounding(),t.component.laneSet&&(t.component.resizeLanes(),t.component.sortedLanes().forEach((function(e){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),t.component.updateAnchorPointPosition(),bn.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===Ai}));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)}))}}},gC=mC,vC=(h(40213),qn(gC,Sk,Ek,!1,null,"82f4c144",null)),bC=vC.exports,yC=function(){var e=this,t=e._self._c;return t("div",{staticClass:"remote-cursor",style:{left:e.left+"px",top:e.top+"px"}},[t("inline-svg",{attrs:{src:e.cursorIcon,fill:e.cursorColor}}),t("div",{staticClass:"remote-username"},[e._v(" "+e._s(e.username)+" ")])],1)},wC=[],xC={components:{InlineSvg:Jg},props:{cursorColor:{type:String,default:"#000000"},username:{type:String},top:{type:Number},left:{type:Number}},data:function(){return{cursorIcon:h(61264)}}},kC=xC,CC=(h(89655),qn(kC,yC,wC,!1,null,"70c20f1a",null)),SC=CC.exports,EC={components:{PreviewPanel:Tv,ToolBar:Hw,ExplorerRail:Gg,InspectorButton:iv,InspectorPanel:vv,ProcessmakerModelerGenericFlow:Ck,Selection:bC,RailBottom:mk,RemoteCursor:SC},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:[nx,Cx],data:function(){return{extraActions:[],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,isOpenPreview:!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,players:[],showInspectorButton:!0,inspectorButtonRight:65,multiplayer:null,isMultiplayer:!1}},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 bn.getters.autoValidate},nodes:function(){return bn.getters.nodes},currentXML:function(){return Pv.getters.currentState},copiedElements:function(){return bn.getters.copiedElements},highlightedNode:function(){return bn.getters.highlightedNodes[0]},highlightedNodes:function(){return bn.getters.highlightedNodes},invalidNodes:function(){return yx(this.validationErrors,this.nodes)},showComponent:function(){return bn.getters.showComponent}},methods:{handleToolbarAction:function(e){e.handler instanceof Function&&e.handler(this)},handleToggleInspector:function(e){this.showInspectorButton=!(null===e||void 0===e||e),this.isOpenInspector=e},handlePreview:function(e){this.$refs["preview-panel"].previewNode(e),this.handleTogglePreview(!0)},handleTogglePreview:function(e){this.isOpenPreview=e},setInspectorButtonPosition:function(){var e=this.$refs["preview-panel"].width;this.isOpenInspector||(this.isOpenPreview&&!this.isOpenInspector&&(this.inspectorButtonRight=65+e),this.isOpenPreview||this.isOpenInspector||(this.inspectorButtonRight=65))},isAppleOS:function(){return"undefined"!==typeof navigator&&/Mac|iPad|iPhone/.test(navigator.platform)},shapeResize:function(){var e=arguments,t=this;return y(v().mark((function n(){var o;return v().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=[Hl,eo,io,Uo,pv],t=[$b,ty,ly,gy,Sy,Dy];1===this.highlightedNodes.length&&(e.includes(this.highlightedNodes[0].type)||t.includes(this.highlightedNodes[0].type))||(bn.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 y(v().mark((function t(){return v().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,bn.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 y(v().mark((function t(){var n;return v().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 y(v().mark((function t(){return v().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 y(v().mark((function t(){var n,o,i,r,s;return v().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,s=(new XMLSerializer).serializeToString(n),e.$emit("saveBpmn",{xml:r,svg:s});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(){$g()(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 y(v().mark((function t(){var n;return v().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,Pv.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 y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(bn.getters.globalProcesses&&0!==bn.getters.globalProcesses.length){t.next=3;break}return t.next=3,bn.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(){Qr()(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)bn.commit("addToHighlightedNodes",[e]);else{var n=Qn().isEqual(e.id,this.highlightedNode.id);n||bn.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]),kx(e),this.nodeRegistry[e.id]=e,vt().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]),kx(e),this.nodeRegistry[e.id]=e,vt().component(e.id,e.component),this.pmBlockNodes.push(e);var i=Array.isArray(e.bpmnType)?e.bpmnType:[e.bpmnType];i.forEach((function(e){n.parsers[e]||(n.parsers[e]={custom:[],implementation:[],default:[]}),t?n.parsers[e].custom.push(t):n.parsers[e].default.push(o)})),wg.commit("setPmBlockNodeTypes",this.pmBlockNodes)},registerMenuAction:function(e){if(!e.value||"string"!==typeof e.value)throw new Error("Menu action must have a action.value");if(!e.content||"string"!==typeof e.content)throw new Error("Menu action must have a action.content");this.extraActions.push(e)},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)})),bn.commit("setRootElements",this.definitions.rootElements),this.addMessageFlows(),bn.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 Vo("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")}),Qr()(t,n),Qr()(o,n),Qr()(this.planeElements,i),this.collaboration&&Qr()(this.collaboration.get("messageFlows"),n);var r=n.get("incoming");r&&Qr()(t,r);var s=n.get("outgoing");s&&Qr()(t,s)},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 s=e.config?JSON.parse(e.config):{},a=(null===s||void 0===s?void 0:s.processKey)||r(e,this.moddle),l=["bpmn:TextAnnotation","bpmn:Association","bpmn:DataOutputAssociation","bpmn:DataInputAssociation"],c=-1===l.indexOf(i);c&&!e.get("name")&&e.set("name",""),this.createNodeAsync(a,e,o)}else this.handleUnsupportedElement(i,t,e,n,o)},createNodeAsync:function(e,t,n){var o=this;return y(v().mark((function i(){var r;return v().wrap((function(i){while(1)switch(i.prev=i.next){case 0:r=o.createNode(e,t,n),bn.commit("addNode",r);case 2:case"end":return i.stop()}}),i)})))()},createNode:function(e,t,n){return Vo.isTimerType(e)?new sx(e,t,n):(Object.keys(t).forEach((function(e){void 0!==t[e]&&null!==t[e]||delete t[e]})),new Vo(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 y(v().mark((function t(){var n;return v().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 y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isRendering=!0,t.next=3,e.paperManager.performAtomicAction(y(v().mark((function t(){return v().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 y(v().mark((function n(){var o,i;return v().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=Zh(t.definitions),bn.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=fg.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=e.clientX,n=e.clientY,o=e.control;this.isMultiplayer?window.ProcessMaker.EventBus.$emit("multiplayer-addNode",{clientX:t,clientY:n,control:o,id:"node_".concat(this.nodeIdGenerator.getDefinitionNumber())}):this.handleDropProcedure(e)},handleDropProcedure:function(e){var t=arguments,n=this;return y(v().mark((function o(){var i,r,s,a,l,c,d,u,p,h,f,m,g;return v().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=!(t.length>1&&void 0!==t[1])||t[1],r=e.clientX,s=e.clientY,a=e.control,l=e.nodeThatWillBeReplaced,c=e.id,n.validateDropTarget({clientX:r,clientY:s,control:a}),n.allowDrop){o.next=5;break}return o.abrupt("return");case 5:return d=n.nodeRegistry[a.type].definition(n.moddle,n.$t),u=n.nodeRegistry[a.type].diagram(n.moddle),p=n.paperManager.clientToGridPoint(r,s),h=p.x,f=p.y,u.bounds.x=h,u.bounds.y=f,m=n.createNode(a.type,d,u),m.isBpmnType("bpmn:BoundaryEvent")&&n.setShapeCenterUnderCursor(u),i&&n.highlightNode(m),o.next=15,n.addNode(m,c,i);case 15:if(l){o.next=17;break}return o.abrupt("return");case 17:return g=new wx(l,d,n.graph,m,n.processes,n.collaboration),g.migrate(),o.abrupt("return",m);case 20:case"end":return o.stop()}}),o)})))()},setShapeCenterUnderCursor:function(e){e.bounds.x-=e.bounds.width/2,e.bounds.y-=e.bounds.height/2},selectNewNode:function(e){var t=this;return y(v().mark((function n(){var o,i;return v().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=arguments,n=this;return y(v().mark((function o(){var i,r,s;return v().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=t.length>1&&void 0!==t[1]?t[1]:null,r=!(t.length>2&&void 0!==t[2])||t[2],e.pool||(e.pool=n.poolTarget),s=e.getTargetProcess(n.processes,n.processNode),Vw(e,s),e.setIds(n.nodeIdGenerator,i),n.planeElements.push(e.diagram),bn.commit("addNode",e),n.poolTarget=null,![Hl,Bl,us,Kl,eo,io,Uo].includes(e.type)){o.next=11;break}return o.abrupt("return");case 11:return r&&n.selectNewNode(e),o.abrupt("return",new Promise((function(e){setTimeout((function(){n.pushToUndoStack(),e()}))})));case 13:case"end":return o.stop()}}),o)})))()},addClonedNodes:function(e){var t=this;return y(v().mark((function n(){return v().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);Vw(e,n),t.planeElements.push(e.diagram),bn.commit("addNode",e),t.poolTarget=null}));case 1:case"end":return n.stop()}}),n)})))()},removeNode:function(e){var t=arguments,n=this;return y(v().mark((function o(){var i,r,s;return v().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,s=void 0===r||r,e){o.next=3;break}return o.abrupt("return");case 3:return s&&(co(e,n),uo(e,n),po(e,n)),fo(e),ho(n.graph,e,n.removeNode),mo(e),n.removeNodesFromLane(e),n.removeNodesFromPool(e),bn.commit("removeNode",e),bn.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 Vo("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 y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.performSingleUndoRedoTransaction(y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.paperManager.performAtomicAction(y(v().mark((function t(){var n;return v().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:bn.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(y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(y(v().mark((function e(){var i,r,s,a;return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.paper.localToClientPoint(n.diagram.bounds),r=i.x,s=i.y,e.next=3,t.handleDropProcedure({clientX:r,clientY:s,control:{type:o},nodeThatWillBeReplaced:n});case 3:return a=e.sent,e.next=6,t.removeNode(n,{removeRelationships:!1});case 6:t.highlightNode(a),t.selectNewNode(a);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(y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(y(v().mark((function e(){return v().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,bn.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 y(v().mark((function n(){return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return Pv.commit("disableSavingState"),n.next=3,e();case 3:return Pv.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&&Qr()(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=xb(t,n,o,this.paperManager.paper,this.graph,this.collaboration,this.$refs["paper-container"]),r=i.allowDrop,s=i.poolTarget;this.allowDrop=r,this.poolTarget=s},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 Hy(e,t.graph)})))},showSavedNotification:function(){Pv.dispatch("saved")},enableVersions:function(){Pv.dispatch("enableVersions")},setVersionIndicator:function(e){Pv.dispatch("setVersionIndicator",e)},setLoadingState:function(e){Pv.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,s=n.height;if(e.clientX>=o&&e.clientX<=o+r&&e.clientY>=i&&e.clientY<=i+s)return!0}return!1},pointerDowInShape:function(e,t){var n=this;return y(v().mark((function o(){var i,r,s;return v().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=e.clientX,r=e.clientY,s=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(s);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;bn.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},enableMultiplayer:function(){this.isMultiplayer=!0}},created:function(){es()&&(window.store=bn,window.undoRedoStore=Pv),this.$t=this.$t.bind(this),window.ProcessMaker.EventBus.$emit("modeler-before-init",{registerComponentMixin:this.registerComponentMixin}),this.registerNode(hv),window.ProcessMaker.EventBus.$emit("modeler-init",{$t:this.$t,modeler:this,registerMenuAction:this.registerMenuAction,registerInspectorExtension:Ly,registerBpmnExtension:this.registerBpmnExtension,registerNode:this.registerNode,registerStatusBar:this.registerStatusBar,registerPmBlock:this.registerPmBlock}),this.moddle=new(gg())(this.extensions),this.linter=new Ov.Linter(wb),this.xmlManager=new mx(this.moddle),this.$emit("set-xml-manager",this.xmlManager)},mounted:function(){var e=this;bn.commit("setReadOnly",this.readOnly),this.graph=new a.dia.Graph,bn.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=By.factory(this.$refs.paper,this.graph.get("interactiveFunc"),this.graph),this.paper=this.paperManager.paper,this.paperManager.addEventHandler("cell:pointerdblclick",ax),this.handleResize(),window.addEventListener("resize",this.handleResize),bn.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){bn.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(){bn.commit("setClientLeftPaper",!1)})),this.$el.addEventListener("mousemove",(function(t){e.pointerMoveHandler(t)})),this.$refs["paper-container"].addEventListener("mouseleave",(function(){e.paperManager.removeEventHandler("blank:pointermove"),bn.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",{$t:this.$t,modeler:this,registerMenuAction:this.registerMenuAction,loadXML:function(){var t=y(v().mark((function t(n){return v().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,Pv.dispatch("pushState",n);case 4:e.isMultiplayer&&window.ProcessMaker.EventBus.$emit("multiplayer-start",{modeler:e,callback:e.enableMultiplayer});case 5: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)}})}},AC=EC,MC=(h(75317),qn(AC,rg,sg,!1,null,null,null)),_C=MC.exports,TC=h(87299),PC=h.n(TC),OC={extends:ph,mixins:[Ma],data:function(){return{nodeIcon:PC(),iconName:""}}},DC=OC,IC=qn(DC,oC,iC,!1,null,null,null),NC=IC.exports,RC=76,BC="processmaker-modeler-manual-task",LC={id:BC,component:NC,bpmnType:"bpmn:ManualTask",control:!1,category:"BPMN",icon:h(8565),label:Bo[BC],loopInspectorIndex:1,definition:function(e,t){return e.create("bpmn:ManualTask",{name:t(Bo[BC]),assignment:"requester",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:RC,width:116})})},inspectorConfig:[{name:Bo[BC],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-manual-task"},items:[{component:"FormInput",config:oa}]},ya,da]}]},jC={extends:jc,data:function(){return{nodeIcon:Ip()}},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}})}},FC=jC,zC=qn(FC,rC,sC,!1,null,null,null),qC=zC.exports,HC="processmaker-modeler-conditional-start-event",VC=Ia()(Ho()(td),Mo(Mo({},Fp),{},{id:HC,component:qC,label:Do[HC],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(Do[HC]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(m(jp()))}]}]})),UC=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))},GC=[],WC={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Tn],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=x()(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:vo(this.node.definition.targetRef.$parent,this.$parent)},updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement(),t=go(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 a.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":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){this.targetNode&&(bo(this.targetNode,this.sourceNode.definition),(0,Jn.pull)(this.targetNode.definition.get("dataInputAssociations"),this.node.definition))}},$C=WC,XC=qn($C,UC,GC,!1,null,null,null),YC=XC.exports,ZC=Mo(Mo({},t),{},{component:YC,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:ds}]}]}]}),KC=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))},JC=[],QC={components:{CrownConfig:is},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Tn],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=x()(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(m(e),[this.node.definition]))}},mounted:function(){this.shape=new a.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":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){(0,Jn.pull)(this.sourceNode.definition.get("dataOutputAssociations"),this.node.definition)}},eS=QC,tS=qn(eS,KC,JC,!1,null,null,null),nS=tS.exports,oS=Mo(Mo({},e),{},{component:nS,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:ds}]}]}]}),iS=JSON.parse('{"name":"ProcessMaker","uri":"http://processmaker.com/BPMN/2.0/Schema.xsd","prefix":"pm","xml":{"tagAlias":"lowerCase"},"associations":[],"types":[{"name":"BaseElement","extends":["bpmn:BaseElement"],"isAbstract":true,"properties":[{"name":"color","isAttr":true,"type":"String"}]},{"name":"Task","extends":["bpmn:Task"],"properties":[{"name":"screenRef","isAttr":true,"type":"String"},{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"screenVersion","isAttr":true,"type":"String"},{"name":"dueIn","isAttr":true,"type":"Integer"},{"name":"notifyAfterRouting","isAttr":true,"type":"Boolean"},{"name":"notifyRequestCreator","isAttr":true,"type":"Boolean"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"assignmentLock","isAttr":true,"type":"Boolean"},{"name":"allowReassignment","isAttr":true,"type":"Boolean"},{"name":"assignmentRules","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"customIcon","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"ScriptTask","extends":["bpmn:ScriptTask"],"properties":[{"name":"scriptRef","isAttr":true,"type":"String"},{"name":"scriptVersion","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"ServiceTask","extends":["bpmn:ServiceTask"],"properties":[{"name":"implementationVersion","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"Message","extends":["bpmn:Message"],"properties":[{"name":"payload","isAttr":true,"type":"String"}]},{"name":"EndEvent","extends":["bpmn:EndEvent"],"properties":[{"name":"screenRef","isAttr":true,"type":"String"},{"name":"screenVersion","isAttr":true,"type":"String"}]},{"name":"StartEvent","extends":["bpmn:StartEvent"],"properties":[{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"IntermediateCatchEvent","extends":["bpmn:IntermediateCatchEvent"],"properties":[{"name":"allowedUsers","isAttr":true,"type":"String"},{"name":"allowedGroups","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"whitelist","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"MessageEventDefinition","extends":["bpmn:MessageEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"}]},{"name":"MessageEventDefinition","extends":["bpmn:MessageEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinition","extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"config","isAttr":true,"type":"String"}]},{"name":"SequenceFlow","extends":["bpmn:SequenceFlow"],"properties":[{"name":"config","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"customIcon","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"Signal","extends":["bpmn:Signal"],"properties":[{"name":"config","isAttr":true,"type":"String"},{"name":"detail","isAttr":true,"type":"String"}]}],"emumerations":[]}'),rS=[od,Dm,qm,xa,af,Rf,LC,Mf,Bf,ll,vl,Dl,Sl,Vl,Jl,ps,ZC,oS,Km,lm,Gf],sS=[[hd,"bpmn:StartEvent","bpmn:SignalEventDefinition"],[Yd,"bpmn:StartEvent","bpmn:TimerEventDefinition"],[xd,"bpmn:StartEvent","bpmn:MessageEventDefinition"],[VC,"bpmn:StartEvent","bpmn:ConditionalEventDefinition"],[zu,"bpmn:IntermediateCatchEvent","bpmn:TimerEventDefinition"],[sp,"bpmn:IntermediateCatchEvent","bpmn:MessageEventDefinition"],[mp,"bpmn:IntermediateCatchEvent","bpmn:SignalEventDefinition"],[Cp,"bpmn:IntermediateThrowEvent","bpmn:MessageEventDefinition"],[Op,"bpmn:IntermediateThrowEvent","bpmn:SignalEventDefinition"],[qp,"bpmn:IntermediateCatchEvent","bpmn:ConditionalEventDefinition"],[Iy,"bpmn:BoundaryEvent","bpmn:TimerEventDefinition"],[Xb,"bpmn:BoundaryEvent","bpmn:ErrorEventDefinition"],[cy,"bpmn:BoundaryEvent","bpmn:EscalationEventDefinition"],[vy,"bpmn:BoundaryEvent","bpmn:MessageEventDefinition"],[Ey,"bpmn:BoundaryEvent","bpmn:SignalEventDefinition"],[ny,"bpmn:BoundaryEvent","bpmn:ConditionalEventDefinition"],[gc,"bpmn:EndEvent","bpmn:MessageEventDefinition"],[La,"bpmn:EndEvent","bpmn:ErrorEventDefinition"],[Dc,"bpmn:EndEvent","bpmn:SignalEventDefinition"],[Ga,"bpmn:EndEvent","bpmn:TerminateEventDefinition"]],aS=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 lS(e){var t=e.registerNode,n=e.registerBpmnExtension;sS.forEach((function(e){var n=mt(e,3),o=n[0],i=n[1],r=n[2];t(o,aS(o,i,r))})),rS.forEach((function(e){return t(e)})),n("pm",iS)}}(),f}()}));
|
|
35
35
|
//# sourceMappingURL=modeler.umd.min.js.map
|